summaryrefslogtreecommitdiff
path: root/asm/Dolphin/gd/GDPixel.s
blob: 95d6f0f5f62ebd2e0f91e46fff20ec4d3fcc4264 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
.include "macros.inc"

.section .text, "ax"  # 0x80005600 - 0x8036FBA0
.global GDSetBlendMode
GDSetBlendMode:
/* 800B181C 000AE75C  7C 08 02 A6 */	mflr r0
/* 800B1820 000AE760  90 01 00 04 */	stw r0, 4(r1)
/* 800B1824 000AE764  94 21 FF D8 */	stwu r1, -0x28(r1)
/* 800B1828 000AE768  93 E1 00 24 */	stw r31, 0x24(r1)
/* 800B182C 000AE76C  3B E6 00 00 */	addi r31, r6, 0
/* 800B1830 000AE770  93 C1 00 20 */	stw r30, 0x20(r1)
/* 800B1834 000AE774  7C BE 2B 78 */	mr r30, r5
/* 800B1838 000AE778  93 A1 00 1C */	stw r29, 0x1c(r1)
/* 800B183C 000AE77C  3B A4 00 00 */	addi r29, r4, 0
/* 800B1840 000AE780  93 81 00 18 */	stw r28, 0x18(r1)
/* 800B1844 000AE784  3B 83 00 00 */	addi r28, r3, 0
/* 800B1848 000AE788  80 ED 95 B8 */	lwz r7, __GDCurrentDL@sda21(r13)
/* 800B184C 000AE78C  80 67 00 08 */	lwz r3, 8(r7)
/* 800B1850 000AE790  80 07 00 0C */	lwz r0, 0xc(r7)
/* 800B1854 000AE794  38 63 00 01 */	addi r3, r3, 1
/* 800B1858 000AE798  7C 03 00 40 */	cmplw r3, r0
/* 800B185C 000AE79C  40 81 00 08 */	ble lbl_800B1864
/* 800B1860 000AE7A0  4B FF D8 F5 */	bl GDOverflowed
lbl_800B1864:
/* 800B1864 000AE7A4  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1868 000AE7A8  38 A0 00 61 */	li r5, 0x61
/* 800B186C 000AE7AC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1870 000AE7B0  38 03 00 01 */	addi r0, r3, 1
/* 800B1874 000AE7B4  90 04 00 08 */	stw r0, 8(r4)
/* 800B1878 000AE7B8  98 A3 00 00 */	stb r5, 0(r3)
/* 800B187C 000AE7BC  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1880 000AE7C0  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1884 000AE7C4  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B1888 000AE7C8  38 63 00 04 */	addi r3, r3, 4
/* 800B188C 000AE7CC  7C 03 00 40 */	cmplw r3, r0
/* 800B1890 000AE7D0  40 81 00 08 */	ble lbl_800B1898
/* 800B1894 000AE7D4  4B FF D8 C1 */	bl GDOverflowed
lbl_800B1898:
/* 800B1898 000AE7D8  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B189C 000AE7DC  39 00 00 FE */	li r8, 0xfe
/* 800B18A0 000AE7E0  38 E0 00 00 */	li r7, 0
/* 800B18A4 000AE7E4  80 64 00 08 */	lwz r3, 8(r4)
/* 800B18A8 000AE7E8  38 C0 00 1F */	li r6, 0x1f
/* 800B18AC 000AE7EC  38 A0 00 E3 */	li r5, 0xe3
/* 800B18B0 000AE7F0  38 03 00 01 */	addi r0, r3, 1
/* 800B18B4 000AE7F4  90 04 00 08 */	stw r0, 8(r4)
/* 800B18B8 000AE7F8  99 03 00 00 */	stb r8, 0(r3)
/* 800B18BC 000AE7FC  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B18C0 000AE800  80 64 00 08 */	lwz r3, 8(r4)
/* 800B18C4 000AE804  38 03 00 01 */	addi r0, r3, 1
/* 800B18C8 000AE808  90 04 00 08 */	stw r0, 8(r4)
/* 800B18CC 000AE80C  98 E3 00 00 */	stb r7, 0(r3)
/* 800B18D0 000AE810  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B18D4 000AE814  80 64 00 08 */	lwz r3, 8(r4)
/* 800B18D8 000AE818  38 03 00 01 */	addi r0, r3, 1
/* 800B18DC 000AE81C  90 04 00 08 */	stw r0, 8(r4)
/* 800B18E0 000AE820  98 C3 00 00 */	stb r6, 0(r3)
/* 800B18E4 000AE824  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B18E8 000AE828  80 64 00 08 */	lwz r3, 8(r4)
/* 800B18EC 000AE82C  38 03 00 01 */	addi r0, r3, 1
/* 800B18F0 000AE830  90 04 00 08 */	stw r0, 8(r4)
/* 800B18F4 000AE834  98 A3 00 00 */	stb r5, 0(r3)
/* 800B18F8 000AE838  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B18FC 000AE83C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1900 000AE840  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B1904 000AE844  38 63 00 01 */	addi r3, r3, 1
/* 800B1908 000AE848  7C 03 00 40 */	cmplw r3, r0
/* 800B190C 000AE84C  40 81 00 08 */	ble lbl_800B1914
/* 800B1910 000AE850  4B FF D8 45 */	bl GDOverflowed
lbl_800B1914:
/* 800B1914 000AE854  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1918 000AE858  38 A0 00 61 */	li r5, 0x61
/* 800B191C 000AE85C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1920 000AE860  38 03 00 01 */	addi r0, r3, 1
/* 800B1924 000AE864  90 04 00 08 */	stw r0, 8(r4)
/* 800B1928 000AE868  98 A3 00 00 */	stb r5, 0(r3)
/* 800B192C 000AE86C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1930 000AE870  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1934 000AE874  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B1938 000AE878  38 63 00 04 */	addi r3, r3, 4
/* 800B193C 000AE87C  7C 03 00 40 */	cmplw r3, r0
/* 800B1940 000AE880  40 81 00 08 */	ble lbl_800B1948
/* 800B1944 000AE884  4B FF D8 11 */	bl GDOverflowed
lbl_800B1948:
/* 800B1948 000AE888  2C 1C 00 01 */	cmpwi r28, 1
/* 800B194C 000AE88C  38 80 00 01 */	li r4, 1
/* 800B1950 000AE890  41 82 00 10 */	beq lbl_800B1960
/* 800B1954 000AE894  2C 1C 00 03 */	cmpwi r28, 3
/* 800B1958 000AE898  41 82 00 08 */	beq lbl_800B1960
/* 800B195C 000AE89C  38 80 00 00 */	li r4, 0
lbl_800B1960:
/* 800B1960 000AE8A0  20 7C 00 03 */	subfic r3, r28, 3
/* 800B1964 000AE8A4  80 CD 95 B8 */	lwz r6, __GDCurrentDL@sda21(r13)
/* 800B1968 000AE8A8  20 1C 00 02 */	subfic r0, r28, 2
/* 800B196C 000AE8AC  7C 00 00 34 */	cntlzw r0, r0
/* 800B1970 000AE8B0  80 E6 00 08 */	lwz r7, 8(r6)
/* 800B1974 000AE8B4  54 00 E1 3C */	rlwinm r0, r0, 0x1c, 4, 0x1e
/* 800B1978 000AE8B8  7C 69 00 34 */	cntlzw r9, r3
/* 800B197C 000AE8BC  7C 08 23 78 */	or r8, r0, r4
/* 800B1980 000AE8C0  38 A7 00 01 */	addi r5, r7, 1
/* 800B1984 000AE8C4  90 A6 00 08 */	stw r5, 8(r6)
/* 800B1988 000AE8C8  57 C3 28 34 */	slwi r3, r30, 5
/* 800B198C 000AE8CC  57 A4 40 2E */	slwi r4, r29, 8
/* 800B1990 000AE8D0  7C 66 43 78 */	or r6, r3, r8
/* 800B1994 000AE8D4  7C 88 33 78 */	or r8, r4, r6
/* 800B1998 000AE8D8  55 25 30 28 */	rlwinm r5, r9, 6, 0, 0x14
/* 800B199C 000AE8DC  57 E6 60 26 */	slwi r6, r31, 0xc
/* 800B19A0 000AE8E0  7C A8 43 78 */	or r8, r5, r8
/* 800B19A4 000AE8E4  7C C8 43 78 */	or r8, r6, r8
/* 800B19A8 000AE8E8  65 08 41 00 */	oris r8, r8, 0x4100
/* 800B19AC 000AE8EC  55 08 46 3E */	srwi r8, r8, 0x18
/* 800B19B0 000AE8F0  99 07 00 00 */	stb r8, 0(r7)
/* 800B19B4 000AE8F4  2C 1C 00 01 */	cmpwi r28, 1
/* 800B19B8 000AE8F8  38 E0 00 01 */	li r7, 1
/* 800B19BC 000AE8FC  41 82 00 10 */	beq lbl_800B19CC
/* 800B19C0 000AE900  2C 1C 00 03 */	cmpwi r28, 3
/* 800B19C4 000AE904  41 82 00 08 */	beq lbl_800B19CC
/* 800B19C8 000AE908  38 E0 00 00 */	li r7, 0
lbl_800B19CC:
/* 800B19CC 000AE90C  7C 07 3B 78 */	or r7, r0, r7
/* 800B19D0 000AE910  81 2D 95 B8 */	lwz r9, __GDCurrentDL@sda21(r13)
/* 800B19D4 000AE914  7C 67 3B 78 */	or r7, r3, r7
/* 800B19D8 000AE918  7C 87 3B 78 */	or r7, r4, r7
/* 800B19DC 000AE91C  81 09 00 08 */	lwz r8, 8(r9)
/* 800B19E0 000AE920  7C A7 3B 78 */	or r7, r5, r7
/* 800B19E4 000AE924  7C CA 3B 78 */	or r10, r6, r7
/* 800B19E8 000AE928  38 E8 00 01 */	addi r7, r8, 1
/* 800B19EC 000AE92C  65 4A 41 00 */	oris r10, r10, 0x4100
/* 800B19F0 000AE930  90 E9 00 08 */	stw r7, 8(r9)
/* 800B19F4 000AE934  55 47 86 3E */	rlwinm r7, r10, 0x10, 0x18, 0x1f
/* 800B19F8 000AE938  2C 1C 00 01 */	cmpwi r28, 1
/* 800B19FC 000AE93C  98 E8 00 00 */	stb r7, 0(r8)
/* 800B1A00 000AE940  38 E0 00 01 */	li r7, 1
/* 800B1A04 000AE944  41 82 00 10 */	beq lbl_800B1A14
/* 800B1A08 000AE948  2C 1C 00 03 */	cmpwi r28, 3
/* 800B1A0C 000AE94C  41 82 00 08 */	beq lbl_800B1A14
/* 800B1A10 000AE950  38 E0 00 00 */	li r7, 0
lbl_800B1A14:
/* 800B1A14 000AE954  7C 07 3B 78 */	or r7, r0, r7
/* 800B1A18 000AE958  81 2D 95 B8 */	lwz r9, __GDCurrentDL@sda21(r13)
/* 800B1A1C 000AE95C  7C 67 3B 78 */	or r7, r3, r7
/* 800B1A20 000AE960  7C 87 3B 78 */	or r7, r4, r7
/* 800B1A24 000AE964  81 09 00 08 */	lwz r8, 8(r9)
/* 800B1A28 000AE968  7C A7 3B 78 */	or r7, r5, r7
/* 800B1A2C 000AE96C  7C CA 3B 78 */	or r10, r6, r7
/* 800B1A30 000AE970  38 E8 00 01 */	addi r7, r8, 1
/* 800B1A34 000AE974  65 4A 41 00 */	oris r10, r10, 0x4100
/* 800B1A38 000AE978  90 E9 00 08 */	stw r7, 8(r9)
/* 800B1A3C 000AE97C  55 47 C6 3E */	rlwinm r7, r10, 0x18, 0x18, 0x1f
/* 800B1A40 000AE980  2C 1C 00 01 */	cmpwi r28, 1
/* 800B1A44 000AE984  98 E8 00 00 */	stb r7, 0(r8)
/* 800B1A48 000AE988  38 E0 00 01 */	li r7, 1
/* 800B1A4C 000AE98C  41 82 00 10 */	beq lbl_800B1A5C
/* 800B1A50 000AE990  2C 1C 00 03 */	cmpwi r28, 3
/* 800B1A54 000AE994  41 82 00 08 */	beq lbl_800B1A5C
/* 800B1A58 000AE998  38 E0 00 00 */	li r7, 0
lbl_800B1A5C:
/* 800B1A5C 000AE99C  7C 00 3B 78 */	or r0, r0, r7
/* 800B1A60 000AE9A0  80 ED 95 B8 */	lwz r7, __GDCurrentDL@sda21(r13)
/* 800B1A64 000AE9A4  7C 60 03 78 */	or r0, r3, r0
/* 800B1A68 000AE9A8  7C 80 03 78 */	or r0, r4, r0
/* 800B1A6C 000AE9AC  80 67 00 08 */	lwz r3, 8(r7)
/* 800B1A70 000AE9B0  7C A0 03 78 */	or r0, r5, r0
/* 800B1A74 000AE9B4  7C C4 03 78 */	or r4, r6, r0
/* 800B1A78 000AE9B8  38 03 00 01 */	addi r0, r3, 1
/* 800B1A7C 000AE9BC  90 07 00 08 */	stw r0, 8(r7)
/* 800B1A80 000AE9C0  60 84 00 00 */	ori r4, r4, 0
/* 800B1A84 000AE9C4  98 83 00 00 */	stb r4, 0(r3)
/* 800B1A88 000AE9C8  80 01 00 2C */	lwz r0, 0x2c(r1)
/* 800B1A8C 000AE9CC  83 E1 00 24 */	lwz r31, 0x24(r1)
/* 800B1A90 000AE9D0  83 C1 00 20 */	lwz r30, 0x20(r1)
/* 800B1A94 000AE9D4  83 A1 00 1C */	lwz r29, 0x1c(r1)
/* 800B1A98 000AE9D8  83 81 00 18 */	lwz r28, 0x18(r1)
/* 800B1A9C 000AE9DC  38 21 00 28 */	addi r1, r1, 0x28
/* 800B1AA0 000AE9E0  7C 08 03 A6 */	mtlr r0
/* 800B1AA4 000AE9E4  4E 80 00 20 */	blr 

.global GDSetBlendModeEtc
GDSetBlendModeEtc:
/* 800B1AA8 000AE9E8  7C 08 02 A6 */	mflr r0
/* 800B1AAC 000AE9EC  90 01 00 04 */	stw r0, 4(r1)
/* 800B1AB0 000AE9F0  94 21 FF C0 */	stwu r1, -0x40(r1)
/* 800B1AB4 000AE9F4  BF 21 00 24 */	stmw r25, 0x24(r1)
/* 800B1AB8 000AE9F8  3B 23 00 00 */	addi r25, r3, 0
/* 800B1ABC 000AE9FC  3B 44 00 00 */	addi r26, r4, 0
/* 800B1AC0 000AEA00  7C BB 2B 78 */	mr r27, r5
/* 800B1AC4 000AEA04  3B 86 00 00 */	addi r28, r6, 0
/* 800B1AC8 000AEA08  3B A7 00 00 */	addi r29, r7, 0
/* 800B1ACC 000AEA0C  3B C8 00 00 */	addi r30, r8, 0
/* 800B1AD0 000AEA10  3B E9 00 00 */	addi r31, r9, 0
/* 800B1AD4 000AEA14  81 4D 95 B8 */	lwz r10, __GDCurrentDL@sda21(r13)
/* 800B1AD8 000AEA18  80 6A 00 08 */	lwz r3, 8(r10)
/* 800B1ADC 000AEA1C  80 0A 00 0C */	lwz r0, 0xc(r10)
/* 800B1AE0 000AEA20  38 63 00 01 */	addi r3, r3, 1
/* 800B1AE4 000AEA24  7C 03 00 40 */	cmplw r3, r0
/* 800B1AE8 000AEA28  40 81 00 08 */	ble lbl_800B1AF0
/* 800B1AEC 000AEA2C  4B FF D6 69 */	bl GDOverflowed
lbl_800B1AF0:
/* 800B1AF0 000AEA30  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1AF4 000AEA34  38 A0 00 61 */	li r5, 0x61
/* 800B1AF8 000AEA38  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1AFC 000AEA3C  38 03 00 01 */	addi r0, r3, 1
/* 800B1B00 000AEA40  90 04 00 08 */	stw r0, 8(r4)
/* 800B1B04 000AEA44  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1B08 000AEA48  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1B0C 000AEA4C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1B10 000AEA50  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B1B14 000AEA54  38 63 00 04 */	addi r3, r3, 4
/* 800B1B18 000AEA58  7C 03 00 40 */	cmplw r3, r0
/* 800B1B1C 000AEA5C  40 81 00 08 */	ble lbl_800B1B24
/* 800B1B20 000AEA60  4B FF D6 35 */	bl GDOverflowed
lbl_800B1B24:
/* 800B1B24 000AEA64  2C 19 00 01 */	cmpwi r25, 1
/* 800B1B28 000AEA68  38 80 00 01 */	li r4, 1
/* 800B1B2C 000AEA6C  41 82 00 10 */	beq lbl_800B1B3C
/* 800B1B30 000AEA70  2C 19 00 03 */	cmpwi r25, 3
/* 800B1B34 000AEA74  41 82 00 08 */	beq lbl_800B1B3C
/* 800B1B38 000AEA78  38 80 00 00 */	li r4, 0
lbl_800B1B3C:
/* 800B1B3C 000AEA7C  20 79 00 03 */	subfic r3, r25, 3
/* 800B1B40 000AEA80  80 CD 95 B8 */	lwz r6, __GDCurrentDL@sda21(r13)
/* 800B1B44 000AEA84  20 19 00 02 */	subfic r0, r25, 2
/* 800B1B48 000AEA88  7C 00 00 34 */	cntlzw r0, r0
/* 800B1B4C 000AEA8C  81 46 00 08 */	lwz r10, 8(r6)
/* 800B1B50 000AEA90  54 00 E1 3C */	rlwinm r0, r0, 0x1c, 4, 0x1e
/* 800B1B54 000AEA94  7C 6B 00 34 */	cntlzw r11, r3
/* 800B1B58 000AEA98  7C 07 23 78 */	or r7, r0, r4
/* 800B1B5C 000AEA9C  38 AA 00 01 */	addi r5, r10, 1
/* 800B1B60 000AEAA0  90 A6 00 08 */	stw r5, 8(r6)
/* 800B1B64 000AEAA4  57 E3 15 BA */	rlwinm r3, r31, 2, 0x16, 0x1d
/* 800B1B68 000AEAA8  57 A4 1D 78 */	rlwinm r4, r29, 3, 0x15, 0x1c
/* 800B1B6C 000AEAAC  7C 66 3B 78 */	or r6, r3, r7
/* 800B1B70 000AEAB0  7C 87 33 78 */	or r7, r4, r6
/* 800B1B74 000AEAB4  57 C5 25 36 */	rlwinm r5, r30, 4, 0x14, 0x1b
/* 800B1B78 000AEAB8  7C A8 3B 78 */	or r8, r5, r7
/* 800B1B7C 000AEABC  57 66 28 34 */	slwi r6, r27, 5
/* 800B1B80 000AEAC0  7C C9 43 78 */	or r9, r6, r8
/* 800B1B84 000AEAC4  57 47 40 2E */	slwi r7, r26, 8
/* 800B1B88 000AEAC8  55 68 30 28 */	rlwinm r8, r11, 6, 0, 0x14
/* 800B1B8C 000AEACC  7C EB 4B 78 */	or r11, r7, r9
/* 800B1B90 000AEAD0  57 89 60 26 */	slwi r9, r28, 0xc
/* 800B1B94 000AEAD4  7D 0B 5B 78 */	or r11, r8, r11
/* 800B1B98 000AEAD8  7D 2B 5B 78 */	or r11, r9, r11
/* 800B1B9C 000AEADC  65 6B 41 00 */	oris r11, r11, 0x4100
/* 800B1BA0 000AEAE0  55 6B 46 3E */	srwi r11, r11, 0x18
/* 800B1BA4 000AEAE4  99 6A 00 00 */	stb r11, 0(r10)
/* 800B1BA8 000AEAE8  2C 19 00 01 */	cmpwi r25, 1
/* 800B1BAC 000AEAEC  39 40 00 01 */	li r10, 1
/* 800B1BB0 000AEAF0  41 82 00 10 */	beq lbl_800B1BC0
/* 800B1BB4 000AEAF4  2C 19 00 03 */	cmpwi r25, 3
/* 800B1BB8 000AEAF8  41 82 00 08 */	beq lbl_800B1BC0
/* 800B1BBC 000AEAFC  39 40 00 00 */	li r10, 0
lbl_800B1BC0:
/* 800B1BC0 000AEB00  7C 0A 53 78 */	or r10, r0, r10
/* 800B1BC4 000AEB04  81 8D 95 B8 */	lwz r12, __GDCurrentDL@sda21(r13)
/* 800B1BC8 000AEB08  7C 6A 53 78 */	or r10, r3, r10
/* 800B1BCC 000AEB0C  7C 8A 53 78 */	or r10, r4, r10
/* 800B1BD0 000AEB10  81 6C 00 08 */	lwz r11, 8(r12)
/* 800B1BD4 000AEB14  7C AA 53 78 */	or r10, r5, r10
/* 800B1BD8 000AEB18  7C CA 53 78 */	or r10, r6, r10
/* 800B1BDC 000AEB1C  7C EA 53 78 */	or r10, r7, r10
/* 800B1BE0 000AEB20  7D 0A 53 78 */	or r10, r8, r10
/* 800B1BE4 000AEB24  7D 3A 53 78 */	or r26, r9, r10
/* 800B1BE8 000AEB28  39 4B 00 01 */	addi r10, r11, 1
/* 800B1BEC 000AEB2C  67 5A 41 00 */	oris r26, r26, 0x4100
/* 800B1BF0 000AEB30  91 4C 00 08 */	stw r10, 8(r12)
/* 800B1BF4 000AEB34  57 4A 86 3E */	rlwinm r10, r26, 0x10, 0x18, 0x1f
/* 800B1BF8 000AEB38  2C 19 00 01 */	cmpwi r25, 1
/* 800B1BFC 000AEB3C  99 4B 00 00 */	stb r10, 0(r11)
/* 800B1C00 000AEB40  39 40 00 01 */	li r10, 1
/* 800B1C04 000AEB44  41 82 00 10 */	beq lbl_800B1C14
/* 800B1C08 000AEB48  2C 19 00 03 */	cmpwi r25, 3
/* 800B1C0C 000AEB4C  41 82 00 08 */	beq lbl_800B1C14
/* 800B1C10 000AEB50  39 40 00 00 */	li r10, 0
lbl_800B1C14:
/* 800B1C14 000AEB54  7C 0A 53 78 */	or r10, r0, r10
/* 800B1C18 000AEB58  81 8D 95 B8 */	lwz r12, __GDCurrentDL@sda21(r13)
/* 800B1C1C 000AEB5C  7C 6A 53 78 */	or r10, r3, r10
/* 800B1C20 000AEB60  7C 8A 53 78 */	or r10, r4, r10
/* 800B1C24 000AEB64  81 6C 00 08 */	lwz r11, 8(r12)
/* 800B1C28 000AEB68  7C AA 53 78 */	or r10, r5, r10
/* 800B1C2C 000AEB6C  7C CA 53 78 */	or r10, r6, r10
/* 800B1C30 000AEB70  7C EA 53 78 */	or r10, r7, r10
/* 800B1C34 000AEB74  7D 0A 53 78 */	or r10, r8, r10
/* 800B1C38 000AEB78  7D 3A 53 78 */	or r26, r9, r10
/* 800B1C3C 000AEB7C  39 4B 00 01 */	addi r10, r11, 1
/* 800B1C40 000AEB80  67 5A 41 00 */	oris r26, r26, 0x4100
/* 800B1C44 000AEB84  91 4C 00 08 */	stw r10, 8(r12)
/* 800B1C48 000AEB88  57 4A C6 3E */	rlwinm r10, r26, 0x18, 0x18, 0x1f
/* 800B1C4C 000AEB8C  2C 19 00 01 */	cmpwi r25, 1
/* 800B1C50 000AEB90  99 4B 00 00 */	stb r10, 0(r11)
/* 800B1C54 000AEB94  39 40 00 01 */	li r10, 1
/* 800B1C58 000AEB98  41 82 00 10 */	beq lbl_800B1C68
/* 800B1C5C 000AEB9C  2C 19 00 03 */	cmpwi r25, 3
/* 800B1C60 000AEBA0  41 82 00 08 */	beq lbl_800B1C68
/* 800B1C64 000AEBA4  39 40 00 00 */	li r10, 0
lbl_800B1C68:
/* 800B1C68 000AEBA8  7C 00 53 78 */	or r0, r0, r10
/* 800B1C6C 000AEBAC  81 4D 95 B8 */	lwz r10, __GDCurrentDL@sda21(r13)
/* 800B1C70 000AEBB0  7C 60 03 78 */	or r0, r3, r0
/* 800B1C74 000AEBB4  7C 80 03 78 */	or r0, r4, r0
/* 800B1C78 000AEBB8  80 6A 00 08 */	lwz r3, 8(r10)
/* 800B1C7C 000AEBBC  7C A0 03 78 */	or r0, r5, r0
/* 800B1C80 000AEBC0  7C C0 03 78 */	or r0, r6, r0
/* 800B1C84 000AEBC4  7C E0 03 78 */	or r0, r7, r0
/* 800B1C88 000AEBC8  7D 00 03 78 */	or r0, r8, r0
/* 800B1C8C 000AEBCC  7D 24 03 78 */	or r4, r9, r0
/* 800B1C90 000AEBD0  38 03 00 01 */	addi r0, r3, 1
/* 800B1C94 000AEBD4  90 0A 00 08 */	stw r0, 8(r10)
/* 800B1C98 000AEBD8  60 84 00 00 */	ori r4, r4, 0
/* 800B1C9C 000AEBDC  98 83 00 00 */	stb r4, 0(r3)
/* 800B1CA0 000AEBE0  BB 21 00 24 */	lmw r25, 0x24(r1)
/* 800B1CA4 000AEBE4  80 01 00 44 */	lwz r0, 0x44(r1)
/* 800B1CA8 000AEBE8  38 21 00 40 */	addi r1, r1, 0x40
/* 800B1CAC 000AEBEC  7C 08 03 A6 */	mtlr r0
/* 800B1CB0 000AEBF0  4E 80 00 20 */	blr 

.global GDSetZMode
GDSetZMode:
/* 800B1CB4 000AEBF4  7C 08 02 A6 */	mflr r0
/* 800B1CB8 000AEBF8  90 01 00 04 */	stw r0, 4(r1)
/* 800B1CBC 000AEBFC  94 21 FF D8 */	stwu r1, -0x28(r1)
/* 800B1CC0 000AEC00  93 E1 00 24 */	stw r31, 0x24(r1)
/* 800B1CC4 000AEC04  7C BF 2B 78 */	mr r31, r5
/* 800B1CC8 000AEC08  93 C1 00 20 */	stw r30, 0x20(r1)
/* 800B1CCC 000AEC0C  3B C4 00 00 */	addi r30, r4, 0
/* 800B1CD0 000AEC10  93 A1 00 1C */	stw r29, 0x1c(r1)
/* 800B1CD4 000AEC14  3B A3 00 00 */	addi r29, r3, 0
/* 800B1CD8 000AEC18  80 CD 95 B8 */	lwz r6, __GDCurrentDL@sda21(r13)
/* 800B1CDC 000AEC1C  80 66 00 08 */	lwz r3, 8(r6)
/* 800B1CE0 000AEC20  80 06 00 0C */	lwz r0, 0xc(r6)
/* 800B1CE4 000AEC24  38 63 00 01 */	addi r3, r3, 1
/* 800B1CE8 000AEC28  7C 03 00 40 */	cmplw r3, r0
/* 800B1CEC 000AEC2C  40 81 00 08 */	ble lbl_800B1CF4
/* 800B1CF0 000AEC30  4B FF D4 65 */	bl GDOverflowed
lbl_800B1CF4:
/* 800B1CF4 000AEC34  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1CF8 000AEC38  38 A0 00 61 */	li r5, 0x61
/* 800B1CFC 000AEC3C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1D00 000AEC40  38 03 00 01 */	addi r0, r3, 1
/* 800B1D04 000AEC44  90 04 00 08 */	stw r0, 8(r4)
/* 800B1D08 000AEC48  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1D0C 000AEC4C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1D10 000AEC50  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1D14 000AEC54  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B1D18 000AEC58  38 63 00 04 */	addi r3, r3, 4
/* 800B1D1C 000AEC5C  7C 03 00 40 */	cmplw r3, r0
/* 800B1D20 000AEC60  40 81 00 08 */	ble lbl_800B1D28
/* 800B1D24 000AEC64  4B FF D4 31 */	bl GDOverflowed
lbl_800B1D28:
/* 800B1D28 000AEC68  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1D2C 000AEC6C  57 A5 06 3E */	clrlwi r5, r29, 0x18
/* 800B1D30 000AEC70  57 C0 08 3C */	slwi r0, r30, 1
/* 800B1D34 000AEC74  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1D38 000AEC78  57 E6 25 36 */	rlwinm r6, r31, 4, 0x14, 0x1b
/* 800B1D3C 000AEC7C  7C A0 03 78 */	or r0, r5, r0
/* 800B1D40 000AEC80  7C C0 03 78 */	or r0, r6, r0
/* 800B1D44 000AEC84  64 07 40 00 */	oris r7, r0, 0x4000
/* 800B1D48 000AEC88  38 03 00 01 */	addi r0, r3, 1
/* 800B1D4C 000AEC8C  90 04 00 08 */	stw r0, 8(r4)
/* 800B1D50 000AEC90  54 E0 46 3E */	srwi r0, r7, 0x18
/* 800B1D54 000AEC94  54 E6 86 3E */	rlwinm r6, r7, 0x10, 0x18, 0x1f
/* 800B1D58 000AEC98  98 03 00 00 */	stb r0, 0(r3)
/* 800B1D5C 000AEC9C  54 E5 C6 3E */	rlwinm r5, r7, 0x18, 0x18, 0x1f
/* 800B1D60 000AECA0  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1D64 000AECA4  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1D68 000AECA8  38 03 00 01 */	addi r0, r3, 1
/* 800B1D6C 000AECAC  90 04 00 08 */	stw r0, 8(r4)
/* 800B1D70 000AECB0  98 C3 00 00 */	stb r6, 0(r3)
/* 800B1D74 000AECB4  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1D78 000AECB8  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1D7C 000AECBC  38 03 00 01 */	addi r0, r3, 1
/* 800B1D80 000AECC0  90 04 00 08 */	stw r0, 8(r4)
/* 800B1D84 000AECC4  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1D88 000AECC8  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1D8C 000AECCC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1D90 000AECD0  38 03 00 01 */	addi r0, r3, 1
/* 800B1D94 000AECD4  90 04 00 08 */	stw r0, 8(r4)
/* 800B1D98 000AECD8  98 E3 00 00 */	stb r7, 0(r3)
/* 800B1D9C 000AECDC  80 01 00 2C */	lwz r0, 0x2c(r1)
/* 800B1DA0 000AECE0  83 E1 00 24 */	lwz r31, 0x24(r1)
/* 800B1DA4 000AECE4  83 C1 00 20 */	lwz r30, 0x20(r1)
/* 800B1DA8 000AECE8  83 A1 00 1C */	lwz r29, 0x1c(r1)
/* 800B1DAC 000AECEC  38 21 00 28 */	addi r1, r1, 0x28
/* 800B1DB0 000AECF0  7C 08 03 A6 */	mtlr r0
/* 800B1DB4 000AECF4  4E 80 00 20 */	blr 

.global GDSetDstAlpha
GDSetDstAlpha:
/* 800B1DB8 000AECF8  7C 08 02 A6 */	mflr r0
/* 800B1DBC 000AECFC  90 01 00 04 */	stw r0, 4(r1)
/* 800B1DC0 000AED00  94 21 FF E8 */	stwu r1, -0x18(r1)
/* 800B1DC4 000AED04  93 E1 00 14 */	stw r31, 0x14(r1)
/* 800B1DC8 000AED08  3B E4 00 00 */	addi r31, r4, 0
/* 800B1DCC 000AED0C  93 C1 00 10 */	stw r30, 0x10(r1)
/* 800B1DD0 000AED10  3B C3 00 00 */	addi r30, r3, 0
/* 800B1DD4 000AED14  80 AD 95 B8 */	lwz r5, __GDCurrentDL@sda21(r13)
/* 800B1DD8 000AED18  80 65 00 08 */	lwz r3, 8(r5)
/* 800B1DDC 000AED1C  80 05 00 0C */	lwz r0, 0xc(r5)
/* 800B1DE0 000AED20  38 63 00 01 */	addi r3, r3, 1
/* 800B1DE4 000AED24  7C 03 00 40 */	cmplw r3, r0
/* 800B1DE8 000AED28  40 81 00 08 */	ble lbl_800B1DF0
/* 800B1DEC 000AED2C  4B FF D3 69 */	bl GDOverflowed
lbl_800B1DF0:
/* 800B1DF0 000AED30  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1DF4 000AED34  38 A0 00 61 */	li r5, 0x61
/* 800B1DF8 000AED38  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1DFC 000AED3C  38 03 00 01 */	addi r0, r3, 1
/* 800B1E00 000AED40  90 04 00 08 */	stw r0, 8(r4)
/* 800B1E04 000AED44  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1E08 000AED48  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1E0C 000AED4C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1E10 000AED50  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B1E14 000AED54  38 63 00 04 */	addi r3, r3, 4
/* 800B1E18 000AED58  7C 03 00 40 */	cmplw r3, r0
/* 800B1E1C 000AED5C  40 81 00 08 */	ble lbl_800B1E24
/* 800B1E20 000AED60  4B FF D3 35 */	bl GDOverflowed
lbl_800B1E24:
/* 800B1E24 000AED64  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1E28 000AED68  57 C5 44 2E */	rlwinm r5, r30, 8, 0x10, 0x17
/* 800B1E2C 000AED6C  53 E5 06 3E */	rlwimi r5, r31, 0, 0x18, 0x1f
/* 800B1E30 000AED70  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1E34 000AED74  64 A7 42 00 */	oris r7, r5, 0x4200
/* 800B1E38 000AED78  54 E6 86 3E */	rlwinm r6, r7, 0x10, 0x18, 0x1f
/* 800B1E3C 000AED7C  38 03 00 01 */	addi r0, r3, 1
/* 800B1E40 000AED80  90 04 00 08 */	stw r0, 8(r4)
/* 800B1E44 000AED84  54 E0 46 3E */	srwi r0, r7, 0x18
/* 800B1E48 000AED88  54 E5 C6 3E */	rlwinm r5, r7, 0x18, 0x18, 0x1f
/* 800B1E4C 000AED8C  98 03 00 00 */	stb r0, 0(r3)
/* 800B1E50 000AED90  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1E54 000AED94  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1E58 000AED98  38 03 00 01 */	addi r0, r3, 1
/* 800B1E5C 000AED9C  90 04 00 08 */	stw r0, 8(r4)
/* 800B1E60 000AEDA0  98 C3 00 00 */	stb r6, 0(r3)
/* 800B1E64 000AEDA4  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1E68 000AEDA8  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1E6C 000AEDAC  38 03 00 01 */	addi r0, r3, 1
/* 800B1E70 000AEDB0  90 04 00 08 */	stw r0, 8(r4)
/* 800B1E74 000AEDB4  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1E78 000AEDB8  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1E7C 000AEDBC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1E80 000AEDC0  38 03 00 01 */	addi r0, r3, 1
/* 800B1E84 000AEDC4  90 04 00 08 */	stw r0, 8(r4)
/* 800B1E88 000AEDC8  98 E3 00 00 */	stb r7, 0(r3)
/* 800B1E8C 000AEDCC  80 01 00 1C */	lwz r0, 0x1c(r1)
/* 800B1E90 000AEDD0  83 E1 00 14 */	lwz r31, 0x14(r1)
/* 800B1E94 000AEDD4  83 C1 00 10 */	lwz r30, 0x10(r1)
/* 800B1E98 000AEDD8  38 21 00 18 */	addi r1, r1, 0x18
/* 800B1E9C 000AEDDC  7C 08 03 A6 */	mtlr r0
/* 800B1EA0 000AEDE0  4E 80 00 20 */	blr