summaryrefslogtreecommitdiff
path: root/asm/Dolphin/gx/GXTransform.s
blob: 6fd845a80226910ad320e86a6ae04bb1e2f8d400 (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
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
.include "macros.inc"

.section .text, "ax"  # 0x80005600 - 0x8036FBA0
.global GXProject
GXProject:
/* 800AD3E0 000AA320  C0 83 00 00 */	lfs f4, 0(r3)
/* 800AD3E4 000AA324  C0 03 00 04 */	lfs f0, 4(r3)
/* 800AD3E8 000AA328  C0 C3 00 10 */	lfs f6, 0x10(r3)
/* 800AD3EC 000AA32C  ED 44 00 72 */	fmuls f10, f4, f1
/* 800AD3F0 000AA330  C0 A3 00 14 */	lfs f5, 0x14(r3)
/* 800AD3F4 000AA334  ED 20 00 B2 */	fmuls f9, f0, f2
/* 800AD3F8 000AA338  C0 83 00 20 */	lfs f4, 0x20(r3)
/* 800AD3FC 000AA33C  C0 03 00 24 */	lfs f0, 0x24(r3)
/* 800AD400 000AA340  C1 63 00 08 */	lfs f11, 8(r3)
/* 800AD404 000AA344  EC E6 00 72 */	fmuls f7, f6, f1
/* 800AD408 000AA348  EC C5 00 B2 */	fmuls f6, f5, f2
/* 800AD40C 000AA34C  C1 03 00 18 */	lfs f8, 0x18(r3)
/* 800AD410 000AA350  C0 A3 00 28 */	lfs f5, 0x28(r3)
/* 800AD414 000AA354  EC 84 00 72 */	fmuls f4, f4, f1
/* 800AD418 000AA358  EC 40 00 B2 */	fmuls f2, f0, f2
/* 800AD41C 000AA35C  ED 6B 00 F2 */	fmuls f11, f11, f3
/* 800AD420 000AA360  C0 22 8B B0 */	lfs f1, "@14"@sda21(r2)
/* 800AD424 000AA364  ED 2A 48 2A */	fadds f9, f10, f9
/* 800AD428 000AA368  C0 04 00 00 */	lfs f0, 0(r4)
/* 800AD42C 000AA36C  ED 08 00 F2 */	fmuls f8, f8, f3
/* 800AD430 000AA370  EC C7 30 2A */	fadds f6, f7, f6
/* 800AD434 000AA374  C1 43 00 0C */	lfs f10, 0xc(r3)
/* 800AD438 000AA378  ED 2B 48 2A */	fadds f9, f11, f9
/* 800AD43C 000AA37C  C0 E3 00 1C */	lfs f7, 0x1c(r3)
/* 800AD440 000AA380  EC C8 30 2A */	fadds f6, f8, f6
/* 800AD444 000AA384  EC 65 00 F2 */	fmuls f3, f5, f3
/* 800AD448 000AA388  C0 A3 00 2C */	lfs f5, 0x2c(r3)
/* 800AD44C 000AA38C  EC 44 10 2A */	fadds f2, f4, f2
/* 800AD450 000AA390  FC 01 00 00 */	fcmpu cr0, f1, f0
/* 800AD454 000AA394  ED 0A 48 2A */	fadds f8, f10, f9
/* 800AD458 000AA398  EC 03 10 2A */	fadds f0, f3, f2
/* 800AD45C 000AA39C  EC E7 30 2A */	fadds f7, f7, f6
/* 800AD460 000AA3A0  ED 25 00 2A */	fadds f9, f5, f0
/* 800AD464 000AA3A4  40 82 00 4C */	bne lbl_800AD4B0
/* 800AD468 000AA3A8  FC 00 48 50 */	fneg f0, f9
/* 800AD46C 000AA3AC  C0 22 8B B4 */	lfs f1, "@15"@sda21(r2)
/* 800AD470 000AA3B0  C0 C4 00 04 */	lfs f6, 4(r4)
/* 800AD474 000AA3B4  C0 A4 00 08 */	lfs f5, 8(r4)
/* 800AD478 000AA3B8  EC 01 00 24 */	fdivs f0, f1, f0
/* 800AD47C 000AA3BC  C0 84 00 0C */	lfs f4, 0xc(r4)
/* 800AD480 000AA3C0  C0 64 00 10 */	lfs f3, 0x10(r4)
/* 800AD484 000AA3C4  C0 24 00 14 */	lfs f1, 0x14(r4)
/* 800AD488 000AA3C8  C0 44 00 18 */	lfs f2, 0x18(r4)
/* 800AD48C 000AA3CC  EC 29 00 72 */	fmuls f1, f9, f1
/* 800AD490 000AA3D0  EC C8 01 B2 */	fmuls f6, f8, f6
/* 800AD494 000AA3D4  EC A9 01 72 */	fmuls f5, f9, f5
/* 800AD498 000AA3D8  EC 87 01 32 */	fmuls f4, f7, f4
/* 800AD49C 000AA3DC  EC 69 00 F2 */	fmuls f3, f9, f3
/* 800AD4A0 000AA3E0  EC C6 28 2A */	fadds f6, f6, f5
/* 800AD4A4 000AA3E4  EC E2 08 2A */	fadds f7, f2, f1
/* 800AD4A8 000AA3E8  EC 64 18 2A */	fadds f3, f4, f3
/* 800AD4AC 000AA3EC  48 00 00 38 */	b lbl_800AD4E4
lbl_800AD4B0:
/* 800AD4B0 000AA3F0  C0 44 00 04 */	lfs f2, 4(r4)
/* 800AD4B4 000AA3F4  C0 24 00 0C */	lfs f1, 0xc(r4)
/* 800AD4B8 000AA3F8  C0 04 00 14 */	lfs f0, 0x14(r4)
/* 800AD4BC 000AA3FC  EC A8 00 B2 */	fmuls f5, f8, f2
/* 800AD4C0 000AA400  C0 C4 00 08 */	lfs f6, 8(r4)
/* 800AD4C4 000AA404  EC 67 00 72 */	fmuls f3, f7, f1
/* 800AD4C8 000AA408  C0 84 00 10 */	lfs f4, 0x10(r4)
/* 800AD4CC 000AA40C  EC 29 00 32 */	fmuls f1, f9, f0
/* 800AD4D0 000AA410  C0 44 00 18 */	lfs f2, 0x18(r4)
/* 800AD4D4 000AA414  EC C6 28 2A */	fadds f6, f6, f5
/* 800AD4D8 000AA418  EC 64 18 2A */	fadds f3, f4, f3
/* 800AD4DC 000AA41C  C0 02 8B B4 */	lfs f0, "@15"@sda21(r2)
/* 800AD4E0 000AA420  EC E2 08 2A */	fadds f7, f2, f1
lbl_800AD4E4:
/* 800AD4E4 000AA424  C0 85 00 08 */	lfs f4, 8(r5)
/* 800AD4E8 000AA428  FC 20 18 50 */	fneg f1, f3
/* 800AD4EC 000AA42C  C0 A2 8B B8 */	lfs f5, "@16"@sda21(r2)
/* 800AD4F0 000AA430  EC 46 01 32 */	fmuls f2, f6, f4
/* 800AD4F4 000AA434  C0 65 00 00 */	lfs f3, 0(r5)
/* 800AD4F8 000AA438  EC 84 01 72 */	fmuls f4, f4, f5
/* 800AD4FC 000AA43C  EC 42 01 72 */	fmuls f2, f2, f5
/* 800AD500 000AA440  EC 40 00 B2 */	fmuls f2, f0, f2
/* 800AD504 000AA444  EC 43 10 2A */	fadds f2, f3, f2
/* 800AD508 000AA448  EC 44 10 2A */	fadds f2, f4, f2
/* 800AD50C 000AA44C  D0 46 00 00 */	stfs f2, 0(r6)
/* 800AD510 000AA450  C0 65 00 0C */	lfs f3, 0xc(r5)
/* 800AD514 000AA454  C0 45 00 04 */	lfs f2, 4(r5)
/* 800AD518 000AA458  EC 21 00 F2 */	fmuls f1, f1, f3
/* 800AD51C 000AA45C  EC 63 01 72 */	fmuls f3, f3, f5
/* 800AD520 000AA460  EC 21 01 72 */	fmuls f1, f1, f5
/* 800AD524 000AA464  EC 20 00 72 */	fmuls f1, f0, f1
/* 800AD528 000AA468  EC 22 08 2A */	fadds f1, f2, f1
/* 800AD52C 000AA46C  EC 23 08 2A */	fadds f1, f3, f1
/* 800AD530 000AA470  D0 27 00 00 */	stfs f1, 0(r7)
/* 800AD534 000AA474  C0 45 00 14 */	lfs f2, 0x14(r5)
/* 800AD538 000AA478  C0 25 00 10 */	lfs f1, 0x10(r5)
/* 800AD53C 000AA47C  EC 22 08 28 */	fsubs f1, f2, f1
/* 800AD540 000AA480  EC 27 00 72 */	fmuls f1, f7, f1
/* 800AD544 000AA484  EC 00 00 72 */	fmuls f0, f0, f1
/* 800AD548 000AA488  EC 02 00 2A */	fadds f0, f2, f0
/* 800AD54C 000AA48C  D0 08 00 00 */	stfs f0, 0(r8)
/* 800AD550 000AA490  4E 80 00 20 */	blr 

.global GXSetProjection
GXSetProjection:
/* 800AD554 000AA494  80 AD 82 C8 */	lwz r5, gx@sda21(r13)
/* 800AD558 000AA498  2C 04 00 01 */	cmpwi r4, 1
/* 800AD55C 000AA49C  90 85 04 20 */	stw r4, 0x420(r5)
/* 800AD560 000AA4A0  C0 03 00 00 */	lfs f0, 0(r3)
/* 800AD564 000AA4A4  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AD568 000AA4A8  D0 04 04 24 */	stfs f0, 0x424(r4)
/* 800AD56C 000AA4AC  C0 03 00 14 */	lfs f0, 0x14(r3)
/* 800AD570 000AA4B0  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AD574 000AA4B4  D0 04 04 2C */	stfs f0, 0x42c(r4)
/* 800AD578 000AA4B8  C0 03 00 28 */	lfs f0, 0x28(r3)
/* 800AD57C 000AA4BC  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AD580 000AA4C0  D0 04 04 34 */	stfs f0, 0x434(r4)
/* 800AD584 000AA4C4  C0 03 00 2C */	lfs f0, 0x2c(r3)
/* 800AD588 000AA4C8  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AD58C 000AA4CC  D0 04 04 38 */	stfs f0, 0x438(r4)
/* 800AD590 000AA4D0  40 82 00 20 */	bne lbl_800AD5B0
/* 800AD594 000AA4D4  C0 03 00 0C */	lfs f0, 0xc(r3)
/* 800AD598 000AA4D8  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AD59C 000AA4DC  D0 04 04 28 */	stfs f0, 0x428(r4)
/* 800AD5A0 000AA4E0  C0 03 00 1C */	lfs f0, 0x1c(r3)
/* 800AD5A4 000AA4E4  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AD5A8 000AA4E8  D0 03 04 30 */	stfs f0, 0x430(r3)
/* 800AD5AC 000AA4EC  48 00 00 1C */	b lbl_800AD5C8
lbl_800AD5B0:
/* 800AD5B0 000AA4F0  C0 03 00 08 */	lfs f0, 8(r3)
/* 800AD5B4 000AA4F4  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AD5B8 000AA4F8  D0 04 04 28 */	stfs f0, 0x428(r4)
/* 800AD5BC 000AA4FC  C0 03 00 18 */	lfs f0, 0x18(r3)
/* 800AD5C0 000AA500  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AD5C4 000AA504  D0 03 04 30 */	stfs f0, 0x430(r3)
lbl_800AD5C8:
/* 800AD5C8 000AA508  38 00 00 10 */	li r0, 0x10
/* 800AD5CC 000AA50C  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AD5D0 000AA510  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800AD5D4 000AA514  3C 60 00 06 */	lis r3, 0x00061020@ha
/* 800AD5D8 000AA518  98 05 80 00 */	stb r0, 0xCC008000@l(r5)
/* 800AD5DC 000AA51C  38 03 10 20 */	addi r0, r3, 0x00061020@l
/* 800AD5E0 000AA520  90 05 80 00 */	stw r0, -0x8000(r5)
/* 800AD5E4 000AA524  38 00 00 01 */	li r0, 1
/* 800AD5E8 000AA528  C0 04 04 24 */	lfs f0, 0x424(r4)
/* 800AD5EC 000AA52C  D0 05 80 00 */	stfs f0, -0x8000(r5)
/* 800AD5F0 000AA530  C0 04 04 28 */	lfs f0, 0x428(r4)
/* 800AD5F4 000AA534  D0 05 80 00 */	stfs f0, -0x8000(r5)
/* 800AD5F8 000AA538  C0 04 04 2C */	lfs f0, 0x42c(r4)
/* 800AD5FC 000AA53C  D0 05 80 00 */	stfs f0, -0x8000(r5)
/* 800AD600 000AA540  C0 04 04 30 */	lfs f0, 0x430(r4)
/* 800AD604 000AA544  D0 05 80 00 */	stfs f0, -0x8000(r5)
/* 800AD608 000AA548  C0 04 04 34 */	lfs f0, 0x434(r4)
/* 800AD60C 000AA54C  D0 05 80 00 */	stfs f0, -0x8000(r5)
/* 800AD610 000AA550  C0 04 04 38 */	lfs f0, 0x438(r4)
/* 800AD614 000AA554  D0 05 80 00 */	stfs f0, -0x8000(r5)
/* 800AD618 000AA558  80 64 04 20 */	lwz r3, 0x420(r4)
/* 800AD61C 000AA55C  90 65 80 00 */	stw r3, -0x8000(r5)
/* 800AD620 000AA560  B0 04 00 02 */	sth r0, 2(r4)
/* 800AD624 000AA564  4E 80 00 20 */	blr 

.global GXGetProjectionv
GXGetProjectionv:
/* 800AD628 000AA568  94 21 FF E8 */	stwu r1, -0x18(r1)
/* 800AD62C 000AA56C  3C 00 43 30 */	lis r0, 0x4330
/* 800AD630 000AA570  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AD634 000AA574  C8 22 8B C0 */	lfd f1, "@24"@sda21(r2)
/* 800AD638 000AA578  80 84 04 20 */	lwz r4, 0x420(r4)
/* 800AD63C 000AA57C  90 81 00 14 */	stw r4, 0x14(r1)
/* 800AD640 000AA580  90 01 00 10 */	stw r0, 0x10(r1)
/* 800AD644 000AA584  C8 01 00 10 */	lfd f0, 0x10(r1)
/* 800AD648 000AA588  EC 00 08 28 */	fsubs f0, f0, f1
/* 800AD64C 000AA58C  D0 03 00 00 */	stfs f0, 0(r3)
/* 800AD650 000AA590  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AD654 000AA594  C0 04 04 24 */	lfs f0, 0x424(r4)
/* 800AD658 000AA598  D0 03 00 04 */	stfs f0, 4(r3)
/* 800AD65C 000AA59C  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AD660 000AA5A0  C0 04 04 28 */	lfs f0, 0x428(r4)
/* 800AD664 000AA5A4  D0 03 00 08 */	stfs f0, 8(r3)
/* 800AD668 000AA5A8  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AD66C 000AA5AC  C0 04 04 2C */	lfs f0, 0x42c(r4)
/* 800AD670 000AA5B0  D0 03 00 0C */	stfs f0, 0xc(r3)
/* 800AD674 000AA5B4  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AD678 000AA5B8  C0 04 04 30 */	lfs f0, 0x430(r4)
/* 800AD67C 000AA5BC  D0 03 00 10 */	stfs f0, 0x10(r3)
/* 800AD680 000AA5C0  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AD684 000AA5C4  C0 04 04 34 */	lfs f0, 0x434(r4)
/* 800AD688 000AA5C8  D0 03 00 14 */	stfs f0, 0x14(r3)
/* 800AD68C 000AA5CC  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AD690 000AA5D0  C0 04 04 38 */	lfs f0, 0x438(r4)
/* 800AD694 000AA5D4  D0 03 00 18 */	stfs f0, 0x18(r3)
/* 800AD698 000AA5D8  38 21 00 18 */	addi r1, r1, 0x18
/* 800AD69C 000AA5DC  4E 80 00 20 */	blr 

.global WriteMTXPS4x3
WriteMTXPS4x3:
/* 800AD6A0 000AA5E0  E0 03 00 00 */	psq_l f0, 0(r3), 0, qr0
/* 800AD6A4 000AA5E4  E0 23 00 08 */	psq_l f1, 8(r3), 0, qr0
/* 800AD6A8 000AA5E8  E0 43 00 10 */	psq_l f2, 16(r3), 0, qr0
/* 800AD6AC 000AA5EC  E0 63 00 18 */	psq_l f3, 24(r3), 0, qr0
/* 800AD6B0 000AA5F0  E0 83 00 20 */	psq_l f4, 32(r3), 0, qr0
/* 800AD6B4 000AA5F4  E0 A3 00 28 */	psq_l f5, 40(r3), 0, qr0
/* 800AD6B8 000AA5F8  F0 04 00 00 */	psq_st f0, 0(r4), 0, qr0
/* 800AD6BC 000AA5FC  F0 24 00 00 */	psq_st f1, 0(r4), 0, qr0
/* 800AD6C0 000AA600  F0 44 00 00 */	psq_st f2, 0(r4), 0, qr0
/* 800AD6C4 000AA604  F0 64 00 00 */	psq_st f3, 0(r4), 0, qr0
/* 800AD6C8 000AA608  F0 84 00 00 */	psq_st f4, 0(r4), 0, qr0
/* 800AD6CC 000AA60C  F0 A4 00 00 */	psq_st f5, 0(r4), 0, qr0
/* 800AD6D0 000AA610  4E 80 00 20 */	blr 

.global WriteMTXPS3x3from3x4
WriteMTXPS3x3from3x4:
/* 800AD6D4 000AA614  E0 03 00 00 */	psq_l f0, 0(r3), 0, qr0
/* 800AD6D8 000AA618  C0 23 00 08 */	lfs f1, 8(r3)
/* 800AD6DC 000AA61C  E0 43 00 10 */	psq_l f2, 16(r3), 0, qr0
/* 800AD6E0 000AA620  C0 63 00 18 */	lfs f3, 0x18(r3)
/* 800AD6E4 000AA624  E0 83 00 20 */	psq_l f4, 32(r3), 0, qr0
/* 800AD6E8 000AA628  C0 A3 00 28 */	lfs f5, 0x28(r3)
/* 800AD6EC 000AA62C  F0 04 00 00 */	psq_st f0, 0(r4), 0, qr0
/* 800AD6F0 000AA630  D0 24 00 00 */	stfs f1, 0(r4)
/* 800AD6F4 000AA634  F0 44 00 00 */	psq_st f2, 0(r4), 0, qr0
/* 800AD6F8 000AA638  D0 64 00 00 */	stfs f3, 0(r4)
/* 800AD6FC 000AA63C  F0 84 00 00 */	psq_st f4, 0(r4), 0, qr0
/* 800AD700 000AA640  D0 A4 00 00 */	stfs f5, 0(r4)
/* 800AD704 000AA644  4E 80 00 20 */	blr 

.global WriteMTXPS4x2
WriteMTXPS4x2:
/* 800AD708 000AA648  E0 03 00 00 */	psq_l f0, 0(r3), 0, qr0
/* 800AD70C 000AA64C  E0 23 00 08 */	psq_l f1, 8(r3), 0, qr0
/* 800AD710 000AA650  E0 43 00 10 */	psq_l f2, 16(r3), 0, qr0
/* 800AD714 000AA654  E0 63 00 18 */	psq_l f3, 24(r3), 0, qr0
/* 800AD718 000AA658  F0 04 00 00 */	psq_st f0, 0(r4), 0, qr0
/* 800AD71C 000AA65C  F0 24 00 00 */	psq_st f1, 0(r4), 0, qr0
/* 800AD720 000AA660  F0 44 00 00 */	psq_st f2, 0(r4), 0, qr0
/* 800AD724 000AA664  F0 64 00 00 */	psq_st f3, 0(r4), 0, qr0
/* 800AD728 000AA668  4E 80 00 20 */	blr 

.global GXLoadPosMtxImm
GXLoadPosMtxImm:
/* 800AD72C 000AA66C  7C 08 02 A6 */	mflr r0
/* 800AD730 000AA670  90 01 00 04 */	stw r0, 4(r1)
/* 800AD734 000AA674  94 21 FF F8 */	stwu r1, -8(r1)
/* 800AD738 000AA678  38 C0 00 10 */	li r6, 0x10
/* 800AD73C 000AA67C  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800AD740 000AA680  54 80 10 3A */	slwi r0, r4, 2
/* 800AD744 000AA684  98 C5 80 00 */	stb r6, 0xCC008000@l(r5)
/* 800AD748 000AA688  64 00 00 0B */	oris r0, r0, 0xb
/* 800AD74C 000AA68C  90 05 80 00 */	stw r0, -0x8000(r5)
/* 800AD750 000AA690  38 85 80 00 */	addi r4, r5, -32768
/* 800AD754 000AA694  4B FF FF 4D */	bl WriteMTXPS4x3
/* 800AD758 000AA698  80 01 00 0C */	lwz r0, 0xc(r1)
/* 800AD75C 000AA69C  38 21 00 08 */	addi r1, r1, 8
/* 800AD760 000AA6A0  7C 08 03 A6 */	mtlr r0
/* 800AD764 000AA6A4  4E 80 00 20 */	blr 

.global GXLoadPosMtxIndx
GXLoadPosMtxIndx:
/* 800AD768 000AA6A8  54 80 10 3A */	slwi r0, r4, 2
/* 800AD76C 000AA6AC  54 00 05 1E */	rlwinm r0, r0, 0, 0x14, 0xf
/* 800AD770 000AA6B0  60 05 B0 00 */	ori r5, r0, 0xb000
/* 800AD774 000AA6B4  54 64 04 3E */	clrlwi r4, r3, 0x10
/* 800AD778 000AA6B8  38 00 00 20 */	li r0, 0x20
/* 800AD77C 000AA6BC  3C 60 CC 01 */	lis r3, 0xCC008000@ha
/* 800AD780 000AA6C0  98 03 80 00 */	stb r0, 0xCC008000@l(r3)
/* 800AD784 000AA6C4  54 A5 04 3E */	clrlwi r5, r5, 0x10
/* 800AD788 000AA6C8  54 80 80 1E */	slwi r0, r4, 0x10
/* 800AD78C 000AA6CC  7C A0 03 78 */	or r0, r5, r0
/* 800AD790 000AA6D0  90 03 80 00 */	stw r0, -0x8000(r3)
/* 800AD794 000AA6D4  4E 80 00 20 */	blr 

.global GXLoadNrmMtxImm
GXLoadNrmMtxImm:
/* 800AD798 000AA6D8  7C 08 02 A6 */	mflr r0
/* 800AD79C 000AA6DC  90 01 00 04 */	stw r0, 4(r1)
/* 800AD7A0 000AA6E0  94 21 FF F8 */	stwu r1, -8(r1)
/* 800AD7A4 000AA6E4  1C 84 00 03 */	mulli r4, r4, 3
/* 800AD7A8 000AA6E8  38 04 04 00 */	addi r0, r4, 0x400
/* 800AD7AC 000AA6EC  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800AD7B0 000AA6F0  38 C0 00 10 */	li r6, 0x10
/* 800AD7B4 000AA6F4  98 C5 80 00 */	stb r6, 0xCC008000@l(r5)
/* 800AD7B8 000AA6F8  64 00 00 08 */	oris r0, r0, 8
/* 800AD7BC 000AA6FC  38 85 80 00 */	addi r4, r5, -32768
/* 800AD7C0 000AA700  90 05 80 00 */	stw r0, -0x8000(r5)
/* 800AD7C4 000AA704  4B FF FF 11 */	bl WriteMTXPS3x3from3x4
/* 800AD7C8 000AA708  80 01 00 0C */	lwz r0, 0xc(r1)
/* 800AD7CC 000AA70C  38 21 00 08 */	addi r1, r1, 8
/* 800AD7D0 000AA710  7C 08 03 A6 */	mtlr r0
/* 800AD7D4 000AA714  4E 80 00 20 */	blr 

.global GXLoadNrmMtxIndx3x3
GXLoadNrmMtxIndx3x3:
/* 800AD7D8 000AA718  1C 84 00 03 */	mulli r4, r4, 3
/* 800AD7DC 000AA71C  38 04 04 00 */	addi r0, r4, 0x400
/* 800AD7E0 000AA720  54 00 05 1E */	rlwinm r0, r0, 0, 0x14, 0xf
/* 800AD7E4 000AA724  60 05 80 00 */	ori r5, r0, 0x8000
/* 800AD7E8 000AA728  54 64 04 3E */	clrlwi r4, r3, 0x10
/* 800AD7EC 000AA72C  38 00 00 28 */	li r0, 0x28
/* 800AD7F0 000AA730  3C 60 CC 01 */	lis r3, 0xCC008000@ha
/* 800AD7F4 000AA734  98 03 80 00 */	stb r0, 0xCC008000@l(r3)
/* 800AD7F8 000AA738  54 A5 04 3E */	clrlwi r5, r5, 0x10
/* 800AD7FC 000AA73C  54 80 80 1E */	slwi r0, r4, 0x10
/* 800AD800 000AA740  7C A0 03 78 */	or r0, r5, r0
/* 800AD804 000AA744  90 03 80 00 */	stw r0, -0x8000(r3)
/* 800AD808 000AA748  4E 80 00 20 */	blr 

.global GXSetCurrentMtx
GXSetCurrentMtx:
/* 800AD80C 000AA74C  7C 08 02 A6 */	mflr r0
/* 800AD810 000AA750  90 01 00 04 */	stw r0, 4(r1)
/* 800AD814 000AA754  94 21 FF F8 */	stwu r1, -8(r1)
/* 800AD818 000AA758  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AD81C 000AA75C  38 84 00 80 */	addi r4, r4, 0x80
/* 800AD820 000AA760  80 04 00 00 */	lwz r0, 0(r4)
/* 800AD824 000AA764  54 00 00 32 */	rlwinm r0, r0, 0, 0, 0x19
/* 800AD828 000AA768  7C 00 1B 78 */	or r0, r0, r3
/* 800AD82C 000AA76C  90 04 00 00 */	stw r0, 0(r4)
/* 800AD830 000AA770  38 60 00 00 */	li r3, 0
/* 800AD834 000AA774  48 00 03 41 */	bl __GXSetMatrixIndex
/* 800AD838 000AA778  80 01 00 0C */	lwz r0, 0xc(r1)
/* 800AD83C 000AA77C  38 21 00 08 */	addi r1, r1, 8
/* 800AD840 000AA780  7C 08 03 A6 */	mtlr r0
/* 800AD844 000AA784  4E 80 00 20 */	blr 

.global GXLoadTexMtxImm
GXLoadTexMtxImm:
/* 800AD848 000AA788  7C 08 02 A6 */	mflr r0
/* 800AD84C 000AA78C  90 01 00 04 */	stw r0, 4(r1)
/* 800AD850 000AA790  94 21 FF F8 */	stwu r1, -8(r1)
/* 800AD854 000AA794  28 04 00 40 */	cmplwi r4, 0x40
/* 800AD858 000AA798  41 80 00 14 */	blt lbl_800AD86C
/* 800AD85C 000AA79C  38 04 FF C0 */	addi r0, r4, -64
/* 800AD860 000AA7A0  54 04 10 3A */	slwi r4, r0, 2
/* 800AD864 000AA7A4  38 E4 05 00 */	addi r7, r4, 0x500
/* 800AD868 000AA7A8  48 00 00 08 */	b lbl_800AD870
lbl_800AD86C:
/* 800AD86C 000AA7AC  54 87 10 3A */	slwi r7, r4, 2
lbl_800AD870:
/* 800AD870 000AA7B0  2C 05 00 01 */	cmpwi r5, 1
/* 800AD874 000AA7B4  40 82 00 0C */	bne lbl_800AD880
/* 800AD878 000AA7B8  38 80 00 08 */	li r4, 8
/* 800AD87C 000AA7BC  48 00 00 08 */	b lbl_800AD884
lbl_800AD880:
/* 800AD880 000AA7C0  38 80 00 0C */	li r4, 0xc
lbl_800AD884:
/* 800AD884 000AA7C4  38 04 FF FF */	addi r0, r4, -1
/* 800AD888 000AA7C8  54 00 80 1E */	slwi r0, r0, 0x10
/* 800AD88C 000AA7CC  38 C0 00 10 */	li r6, 0x10
/* 800AD890 000AA7D0  3C 80 CC 01 */	lis r4, 0xCC008000@ha
/* 800AD894 000AA7D4  98 C4 80 00 */	stb r6, 0xCC008000@l(r4)
/* 800AD898 000AA7D8  7C E0 03 78 */	or r0, r7, r0
/* 800AD89C 000AA7DC  2C 05 00 00 */	cmpwi r5, 0
/* 800AD8A0 000AA7E0  90 04 80 00 */	stw r0, -0x8000(r4)
/* 800AD8A4 000AA7E4  40 82 00 10 */	bne lbl_800AD8B4
/* 800AD8A8 000AA7E8  38 84 80 00 */	addi r4, r4, -32768
/* 800AD8AC 000AA7EC  4B FF FD F5 */	bl WriteMTXPS4x3
/* 800AD8B0 000AA7F0  48 00 00 0C */	b lbl_800AD8BC
lbl_800AD8B4:
/* 800AD8B4 000AA7F4  38 84 80 00 */	addi r4, r4, -32768
/* 800AD8B8 000AA7F8  4B FF FE 51 */	bl WriteMTXPS4x2
lbl_800AD8BC:
/* 800AD8BC 000AA7FC  80 01 00 0C */	lwz r0, 0xc(r1)
/* 800AD8C0 000AA800  38 21 00 08 */	addi r1, r1, 8
/* 800AD8C4 000AA804  7C 08 03 A6 */	mtlr r0
/* 800AD8C8 000AA808  4E 80 00 20 */	blr 

.global GXSetViewportJitter
GXSetViewportJitter:
/* 800AD8CC 000AA80C  7C 08 02 A6 */	mflr r0
/* 800AD8D0 000AA810  90 01 00 04 */	stw r0, 4(r1)
/* 800AD8D4 000AA814  94 21 FF A0 */	stwu r1, -0x60(r1)
/* 800AD8D8 000AA818  DB E1 00 58 */	stfd f31, 0x58(r1)
/* 800AD8DC 000AA81C  DB C1 00 50 */	stfd f30, 0x50(r1)
/* 800AD8E0 000AA820  DB A1 00 48 */	stfd f29, 0x48(r1)
/* 800AD8E4 000AA824  DB 81 00 40 */	stfd f28, 0x40(r1)
/* 800AD8E8 000AA828  DB 61 00 38 */	stfd f27, 0x38(r1)
/* 800AD8EC 000AA82C  DB 41 00 30 */	stfd f26, 0x30(r1)
/* 800AD8F0 000AA830  28 03 00 00 */	cmplwi r3, 0
/* 800AD8F4 000AA834  40 82 00 0C */	bne lbl_800AD900
/* 800AD8F8 000AA838  C0 02 8B B8 */	lfs f0, "@16"@sda21(r2)
/* 800AD8FC 000AA83C  EC 42 00 28 */	fsubs f2, f2, f0
lbl_800AD900:
/* 800AD900 000AA840  C1 62 8B B8 */	lfs f11, "@16"@sda21(r2)
/* 800AD904 000AA844  FD 40 20 50 */	fneg f10, f4
/* 800AD908 000AA848  C0 02 8B CC */	lfs f0, "@64"@sda21(r2)
/* 800AD90C 000AA84C  C1 22 8B C8 */	lfs f9, "@63"@sda21(r2)
/* 800AD910 000AA850  EF E3 02 F2 */	fmuls f31, f3, f11
/* 800AD914 000AA854  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AD918 000AA858  EC E4 02 F2 */	fmuls f7, f4, f11
/* 800AD91C 000AA85C  D0 23 04 3C */	stfs f1, 0x43c(r3)
/* 800AD920 000AA860  ED 01 F8 2A */	fadds f8, f1, f31
/* 800AD924 000AA864  EF C0 01 B2 */	fmuls f30, f0, f6
/* 800AD928 000AA868  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AD92C 000AA86C  EC 22 38 2A */	fadds f1, f2, f7
/* 800AD930 000AA870  D0 43 04 40 */	stfs f2, 0x440(r3)
/* 800AD934 000AA874  EC 00 01 72 */	fmuls f0, f0, f5
/* 800AD938 000AA878  EF AA 02 F2 */	fmuls f29, f10, f11
/* 800AD93C 000AA87C  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AD940 000AA880  EF 69 40 2A */	fadds f27, f9, f8
/* 800AD944 000AA884  D0 63 04 44 */	stfs f3, 0x444(r3)
/* 800AD948 000AA888  EF 49 08 2A */	fadds f26, f9, f1
/* 800AD94C 000AA88C  EF 9E 00 28 */	fsubs f28, f30, f0
/* 800AD950 000AA890  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AD954 000AA894  D0 83 04 48 */	stfs f4, 0x448(r3)
/* 800AD958 000AA898  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AD95C 000AA89C  D0 A3 04 4C */	stfs f5, 0x44c(r3)
/* 800AD960 000AA8A0  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AD964 000AA8A4  D0 C3 04 50 */	stfs f6, 0x450(r3)
/* 800AD968 000AA8A8  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AD96C 000AA8AC  88 03 04 54 */	lbz r0, 0x454(r3)
/* 800AD970 000AA8B0  28 00 00 00 */	cmplwi r0, 0
/* 800AD974 000AA8B4  41 82 00 10 */	beq lbl_800AD984
/* 800AD978 000AA8B8  FC 20 28 90 */	fmr f1, f5
/* 800AD97C 000AA8BC  C0 43 04 58 */	lfs f2, 0x458(r3)
/* 800AD980 000AA8C0  4B FF F9 ED */	bl __GXSetRange
lbl_800AD984:
/* 800AD984 000AA8C4  38 00 00 10 */	li r0, 0x10
/* 800AD988 000AA8C8  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AD98C 000AA8CC  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800AD990 000AA8D0  3C 80 00 05 */	lis r4, 0x0005101A@ha
/* 800AD994 000AA8D4  98 05 80 00 */	stb r0, 0xCC008000@l(r5)
/* 800AD998 000AA8D8  38 04 10 1A */	addi r0, r4, 0x0005101A@l
/* 800AD99C 000AA8DC  90 05 80 00 */	stw r0, -0x8000(r5)
/* 800AD9A0 000AA8E0  38 00 00 01 */	li r0, 1
/* 800AD9A4 000AA8E4  D3 E5 80 00 */	stfs f31, -0x8000(r5)
/* 800AD9A8 000AA8E8  D3 A5 80 00 */	stfs f29, -0x8000(r5)
/* 800AD9AC 000AA8EC  D3 85 80 00 */	stfs f28, -0x8000(r5)
/* 800AD9B0 000AA8F0  D3 65 80 00 */	stfs f27, -0x8000(r5)
/* 800AD9B4 000AA8F4  D3 45 80 00 */	stfs f26, -0x8000(r5)
/* 800AD9B8 000AA8F8  D3 C5 80 00 */	stfs f30, -0x8000(r5)
/* 800AD9BC 000AA8FC  B0 03 00 02 */	sth r0, 2(r3)
/* 800AD9C0 000AA900  80 01 00 64 */	lwz r0, 0x64(r1)
/* 800AD9C4 000AA904  CB E1 00 58 */	lfd f31, 0x58(r1)
/* 800AD9C8 000AA908  CB C1 00 50 */	lfd f30, 0x50(r1)
/* 800AD9CC 000AA90C  CB A1 00 48 */	lfd f29, 0x48(r1)
/* 800AD9D0 000AA910  CB 81 00 40 */	lfd f28, 0x40(r1)
/* 800AD9D4 000AA914  CB 61 00 38 */	lfd f27, 0x38(r1)
/* 800AD9D8 000AA918  CB 41 00 30 */	lfd f26, 0x30(r1)
/* 800AD9DC 000AA91C  38 21 00 60 */	addi r1, r1, 0x60
/* 800AD9E0 000AA920  7C 08 03 A6 */	mtlr r0
/* 800AD9E4 000AA924  4E 80 00 20 */	blr 

.global GXSetViewport
GXSetViewport:
/* 800AD9E8 000AA928  7C 08 02 A6 */	mflr r0
/* 800AD9EC 000AA92C  90 01 00 04 */	stw r0, 4(r1)
/* 800AD9F0 000AA930  94 21 FF F8 */	stwu r1, -8(r1)
/* 800AD9F4 000AA934  38 60 00 01 */	li r3, 1
/* 800AD9F8 000AA938  4B FF FE D5 */	bl GXSetViewportJitter
/* 800AD9FC 000AA93C  80 01 00 0C */	lwz r0, 0xc(r1)
/* 800ADA00 000AA940  38 21 00 08 */	addi r1, r1, 8
/* 800ADA04 000AA944  7C 08 03 A6 */	mtlr r0
/* 800ADA08 000AA948  4E 80 00 20 */	blr 

.global GXGetViewportv
GXGetViewportv:
/* 800ADA0C 000AA94C  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800ADA10 000AA950  C0 04 04 3C */	lfs f0, 0x43c(r4)
/* 800ADA14 000AA954  D0 03 00 00 */	stfs f0, 0(r3)
/* 800ADA18 000AA958  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800ADA1C 000AA95C  C0 04 04 40 */	lfs f0, 0x440(r4)
/* 800ADA20 000AA960  D0 03 00 04 */	stfs f0, 4(r3)
/* 800ADA24 000AA964  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800ADA28 000AA968  C0 04 04 44 */	lfs f0, 0x444(r4)
/* 800ADA2C 000AA96C  D0 03 00 08 */	stfs f0, 8(r3)
/* 800ADA30 000AA970  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800ADA34 000AA974  C0 04 04 48 */	lfs f0, 0x448(r4)
/* 800ADA38 000AA978  D0 03 00 0C */	stfs f0, 0xc(r3)
/* 800ADA3C 000AA97C  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800ADA40 000AA980  C0 04 04 4C */	lfs f0, 0x44c(r4)
/* 800ADA44 000AA984  D0 03 00 10 */	stfs f0, 0x10(r3)
/* 800ADA48 000AA988  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800ADA4C 000AA98C  C0 04 04 50 */	lfs f0, 0x450(r4)
/* 800ADA50 000AA990  D0 03 00 14 */	stfs f0, 0x14(r3)
/* 800ADA54 000AA994  4E 80 00 20 */	blr 

.global GXSetScissor
GXSetScissor:
/* 800ADA58 000AA998  80 ED 82 C8 */	lwz r7, gx@sda21(r13)
/* 800ADA5C 000AA99C  39 03 01 56 */	addi r8, r3, 0x156
/* 800ADA60 000AA9A0  38 05 FF FF */	addi r0, r5, -1
/* 800ADA64 000AA9A4  38 A7 00 F8 */	addi r5, r7, 0xf8
/* 800ADA68 000AA9A8  80 65 00 00 */	lwz r3, 0(r5)
/* 800ADA6C 000AA9AC  7C 08 02 14 */	add r0, r8, r0
/* 800ADA70 000AA9B0  38 84 01 56 */	addi r4, r4, 0x156
/* 800ADA74 000AA9B4  54 63 00 28 */	rlwinm r3, r3, 0, 0, 0x14
/* 800ADA78 000AA9B8  7C 63 23 78 */	or r3, r3, r4
/* 800ADA7C 000AA9BC  90 65 00 00 */	stw r3, 0(r5)
/* 800ADA80 000AA9C0  38 66 FF FF */	addi r3, r6, -1
/* 800ADA84 000AA9C4  55 07 60 26 */	slwi r7, r8, 0xc
/* 800ADA88 000AA9C8  80 AD 82 C8 */	lwz r5, gx@sda21(r13)
/* 800ADA8C 000AA9CC  7C 84 1A 14 */	add r4, r4, r3
/* 800ADA90 000AA9D0  54 03 60 26 */	slwi r3, r0, 0xc
/* 800ADA94 000AA9D4  39 05 00 F8 */	addi r8, r5, 0xf8
/* 800ADA98 000AA9D8  80 08 00 00 */	lwz r0, 0(r8)
/* 800ADA9C 000AA9DC  38 C0 00 61 */	li r6, 0x61
/* 800ADAA0 000AA9E0  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800ADAA4 000AA9E4  54 00 05 10 */	rlwinm r0, r0, 0, 0x14, 8
/* 800ADAA8 000AA9E8  7C 00 3B 78 */	or r0, r0, r7
/* 800ADAAC 000AA9EC  90 08 00 00 */	stw r0, 0(r8)
/* 800ADAB0 000AA9F0  38 00 00 00 */	li r0, 0
/* 800ADAB4 000AA9F4  80 ED 82 C8 */	lwz r7, gx@sda21(r13)
/* 800ADAB8 000AA9F8  39 07 00 FC */	addi r8, r7, 0xfc
/* 800ADABC 000AA9FC  80 E8 00 00 */	lwz r7, 0(r8)
/* 800ADAC0 000AAA00  54 E7 00 28 */	rlwinm r7, r7, 0, 0, 0x14
/* 800ADAC4 000AAA04  7C E4 23 78 */	or r4, r7, r4
/* 800ADAC8 000AAA08  90 88 00 00 */	stw r4, 0(r8)
/* 800ADACC 000AAA0C  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800ADAD0 000AAA10  38 E4 00 FC */	addi r7, r4, 0xfc
/* 800ADAD4 000AAA14  80 87 00 00 */	lwz r4, 0(r7)
/* 800ADAD8 000AAA18  54 84 05 10 */	rlwinm r4, r4, 0, 0x14, 8
/* 800ADADC 000AAA1C  7C 83 1B 78 */	or r3, r4, r3
/* 800ADAE0 000AAA20  90 67 00 00 */	stw r3, 0(r7)
/* 800ADAE4 000AAA24  98 C5 80 00 */	stb r6, 0xCC008000@l(r5)
/* 800ADAE8 000AAA28  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800ADAEC 000AAA2C  80 64 00 F8 */	lwz r3, 0xf8(r4)
/* 800ADAF0 000AAA30  90 65 80 00 */	stw r3, -0x8000(r5)
/* 800ADAF4 000AAA34  98 C5 80 00 */	stb r6, -0x8000(r5)
/* 800ADAF8 000AAA38  80 64 00 FC */	lwz r3, 0xfc(r4)
/* 800ADAFC 000AAA3C  90 65 80 00 */	stw r3, -0x8000(r5)
/* 800ADB00 000AAA40  B0 04 00 02 */	sth r0, 2(r4)
/* 800ADB04 000AAA44  4E 80 00 20 */	blr 

.global GXSetScissorBoxOffset
GXSetScissorBoxOffset:
/* 800ADB08 000AAA48  38 A3 01 56 */	addi r5, r3, 0x156
/* 800ADB0C 000AAA4C  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800ADB10 000AAA50  38 04 01 56 */	addi r0, r4, 0x156
/* 800ADB14 000AAA54  54 A4 F8 7E */	srwi r4, r5, 1
/* 800ADB18 000AAA58  54 00 F8 7E */	srwi r0, r0, 1
/* 800ADB1C 000AAA5C  54 84 05 96 */	rlwinm r4, r4, 0, 0x16, 0xb
/* 800ADB20 000AAA60  54 00 50 2A */	slwi r0, r0, 0xa
/* 800ADB24 000AAA64  7C 80 03 78 */	or r0, r4, r0
/* 800ADB28 000AAA68  54 05 02 3E */	clrlwi r5, r0, 8
/* 800ADB2C 000AAA6C  38 00 00 61 */	li r0, 0x61
/* 800ADB30 000AAA70  3C 80 CC 01 */	lis r4, 0xCC008000@ha
/* 800ADB34 000AAA74  98 04 80 00 */	stb r0, 0xCC008000@l(r4)
/* 800ADB38 000AAA78  64 A5 59 00 */	oris r5, r5, 0x5900
/* 800ADB3C 000AAA7C  38 00 00 00 */	li r0, 0
/* 800ADB40 000AAA80  90 A4 80 00 */	stw r5, -0x8000(r4)
/* 800ADB44 000AAA84  B0 03 00 02 */	sth r0, 2(r3)
/* 800ADB48 000AAA88  4E 80 00 20 */	blr 

.global GXSetClipMode
GXSetClipMode:
/* 800ADB4C 000AAA8C  38 00 00 10 */	li r0, 0x10
/* 800ADB50 000AAA90  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800ADB54 000AAA94  3C C0 CC 01 */	lis r6, 0xCC008000@ha
/* 800ADB58 000AAA98  98 06 80 00 */	stb r0, 0xCC008000@l(r6)
/* 800ADB5C 000AAA9C  38 A0 10 05 */	li r5, 0x1005
/* 800ADB60 000AAAA0  38 00 00 01 */	li r0, 1
/* 800ADB64 000AAAA4  90 A6 80 00 */	stw r5, -0x8000(r6)
/* 800ADB68 000AAAA8  90 66 80 00 */	stw r3, -0x8000(r6)
/* 800ADB6C 000AAAAC  B0 04 00 02 */	sth r0, 2(r4)
/* 800ADB70 000AAAB0  4E 80 00 20 */	blr 

.global __GXSetMatrixIndex
__GXSetMatrixIndex:
/* 800ADB74 000AAAB4  2C 03 00 05 */	cmpwi r3, 5
/* 800ADB78 000AAAB8  40 80 00 3C */	bge lbl_800ADBB4
/* 800ADB7C 000AAABC  38 00 00 08 */	li r0, 8
/* 800ADB80 000AAAC0  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800ADB84 000AAAC4  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800ADB88 000AAAC8  98 05 80 00 */	stb r0, 0xCC008000@l(r5)
/* 800ADB8C 000AAACC  38 00 00 30 */	li r0, 0x30
/* 800ADB90 000AAAD0  38 60 00 10 */	li r3, 0x10
/* 800ADB94 000AAAD4  98 05 80 00 */	stb r0, -0x8000(r5)
/* 800ADB98 000AAAD8  38 00 10 18 */	li r0, 0x1018
/* 800ADB9C 000AAADC  80 84 00 80 */	lwz r4, 0x80(r4)
/* 800ADBA0 000AAAE0  90 85 80 00 */	stw r4, -0x8000(r5)
/* 800ADBA4 000AAAE4  98 65 80 00 */	stb r3, -0x8000(r5)
/* 800ADBA8 000AAAE8  90 05 80 00 */	stw r0, -0x8000(r5)
/* 800ADBAC 000AAAEC  90 85 80 00 */	stw r4, -0x8000(r5)
/* 800ADBB0 000AAAF0  48 00 00 38 */	b lbl_800ADBE8
lbl_800ADBB4:
/* 800ADBB4 000AAAF4  38 00 00 08 */	li r0, 8
/* 800ADBB8 000AAAF8  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800ADBBC 000AAAFC  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800ADBC0 000AAB00  98 05 80 00 */	stb r0, 0xCC008000@l(r5)
/* 800ADBC4 000AAB04  38 00 00 40 */	li r0, 0x40
/* 800ADBC8 000AAB08  38 60 00 10 */	li r3, 0x10
/* 800ADBCC 000AAB0C  98 05 80 00 */	stb r0, -0x8000(r5)
/* 800ADBD0 000AAB10  38 00 10 19 */	li r0, 0x1019
/* 800ADBD4 000AAB14  80 84 00 84 */	lwz r4, 0x84(r4)
/* 800ADBD8 000AAB18  90 85 80 00 */	stw r4, -0x8000(r5)
/* 800ADBDC 000AAB1C  98 65 80 00 */	stb r3, -0x8000(r5)
/* 800ADBE0 000AAB20  90 05 80 00 */	stw r0, -0x8000(r5)
/* 800ADBE4 000AAB24  90 85 80 00 */	stw r4, -0x8000(r5)
lbl_800ADBE8:
/* 800ADBE8 000AAB28  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800ADBEC 000AAB2C  38 00 00 01 */	li r0, 1
/* 800ADBF0 000AAB30  B0 03 00 02 */	sth r0, 2(r3)
/* 800ADBF4 000AAB34  4E 80 00 20 */	blr 

.section .sdata2, "a"  # 0x8040B460 - 0x80414020
.balign 8
"@14":
  .4byte 0
"@15":
	.4byte 0x3F800000
"@16":
	.4byte 0x3F000000
	.4byte 0
"@24":
	.4byte 0x43300000
	.4byte 0
"@63":
	.4byte 0x43AB0000
"@64":
	.4byte 0x4B7FFFFF