summaryrefslogtreecommitdiff
path: root/asm/Dolphin/gx/GXTexture.s
blob: d73aaaf9db68c16dd94ff868d44173af14816ab8 (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
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
.include "macros.inc"

.section .text, "ax"  # 0x80005600 - 0x8036FBA0
.global GXGetTexBufferSize
GXGetTexBufferSize:
/* 800AA1D4 000A7114  94 21 FF D8 */	stwu r1, -0x28(r1)
/* 800AA1D8 000A7118  28 05 00 3C */	cmplwi r5, 0x3c
/* 800AA1DC 000A711C  93 E1 00 24 */	stw r31, 0x24(r1)
/* 800AA1E0 000A7120  41 81 00 40 */	bgt lbl_800AA220
/* 800AA1E4 000A7124  3D 00 80 3B */	lis r8, "@92"@ha
/* 800AA1E8 000A7128  39 08 18 E8 */	addi r8, r8, "@92"@l
/* 800AA1EC 000A712C  54 A0 10 3A */	slwi r0, r5, 2
/* 800AA1F0 000A7130  7C 08 00 2E */	lwzx r0, r8, r0
/* 800AA1F4 000A7134  7C 09 03 A6 */	mtctr r0
/* 800AA1F8 000A7138  4E 80 04 20 */	bctr 
lbl_800AA1FC:
/* 800AA1FC 000A713C  38 00 00 03 */	li r0, 3
/* 800AA200 000A7140  39 00 00 03 */	li r8, 3
/* 800AA204 000A7144  48 00 00 24 */	b lbl_800AA228
lbl_800AA208:
/* 800AA208 000A7148  38 00 00 03 */	li r0, 3
/* 800AA20C 000A714C  39 00 00 02 */	li r8, 2
/* 800AA210 000A7150  48 00 00 18 */	b lbl_800AA228
lbl_800AA214:
/* 800AA214 000A7154  38 00 00 02 */	li r0, 2
/* 800AA218 000A7158  39 00 00 02 */	li r8, 2
/* 800AA21C 000A715C  48 00 00 0C */	b lbl_800AA228
lbl_800AA220:
/* 800AA220 000A7160  39 00 00 00 */	li r8, 0
/* 800AA224 000A7164  38 00 00 00 */	li r0, 0
lbl_800AA228:
/* 800AA228 000A7168  28 05 00 06 */	cmplwi r5, 6
/* 800AA22C 000A716C  41 82 00 0C */	beq lbl_800AA238
/* 800AA230 000A7170  28 05 00 16 */	cmplwi r5, 0x16
/* 800AA234 000A7174  40 82 00 0C */	bne lbl_800AA240
lbl_800AA238:
/* 800AA238 000A7178  38 A0 00 40 */	li r5, 0x40
/* 800AA23C 000A717C  48 00 00 08 */	b lbl_800AA244
lbl_800AA240:
/* 800AA240 000A7180  38 A0 00 20 */	li r5, 0x20
lbl_800AA244:
/* 800AA244 000A7184  54 C6 06 3E */	clrlwi r6, r6, 0x18
/* 800AA248 000A7188  28 06 00 01 */	cmplwi r6, 1
/* 800AA24C 000A718C  40 82 00 A0 */	bne lbl_800AA2EC
/* 800AA250 000A7190  54 E9 06 3E */	clrlwi r9, r7, 0x18
/* 800AA254 000A7194  38 C0 00 01 */	li r6, 1
/* 800AA258 000A7198  7D 29 03 A6 */	mtctr r9
/* 800AA25C 000A719C  7C C7 40 30 */	slw r7, r6, r8
/* 800AA260 000A71A0  7C C6 00 30 */	slw r6, r6, r0
/* 800AA264 000A71A4  28 09 00 00 */	cmplwi r9, 0
/* 800AA268 000A71A8  39 46 FF FF */	addi r10, r6, -1
/* 800AA26C 000A71AC  38 E7 FF FF */	addi r7, r7, -1
/* 800AA270 000A71B0  3B E0 00 00 */	li r31, 0
/* 800AA274 000A71B4  40 81 00 AC */	ble lbl_800AA320
lbl_800AA278:
/* 800AA278 000A71B8  54 6B 04 3E */	clrlwi r11, r3, 0x10
/* 800AA27C 000A71BC  7C CB 52 14 */	add r6, r11, r10
/* 800AA280 000A71C0  54 8C 04 3E */	clrlwi r12, r4, 0x10
/* 800AA284 000A71C4  7C C9 06 30 */	sraw r9, r6, r0
/* 800AA288 000A71C8  7C CC 3A 14 */	add r6, r12, r7
/* 800AA28C 000A71CC  7C C6 46 30 */	sraw r6, r6, r8
/* 800AA290 000A71D0  7C C9 31 D6 */	mullw r6, r9, r6
/* 800AA294 000A71D4  7C C5 31 D6 */	mullw r6, r5, r6
/* 800AA298 000A71D8  28 0B 00 01 */	cmplwi r11, 1
/* 800AA29C 000A71DC  7F FF 32 14 */	add r31, r31, r6
/* 800AA2A0 000A71E0  40 82 00 0C */	bne lbl_800AA2AC
/* 800AA2A4 000A71E4  28 0C 00 01 */	cmplwi r12, 1
/* 800AA2A8 000A71E8  41 82 00 78 */	beq lbl_800AA320
lbl_800AA2AC:
/* 800AA2AC 000A71EC  54 63 04 3E */	clrlwi r3, r3, 0x10
/* 800AA2B0 000A71F0  28 03 00 01 */	cmplwi r3, 1
/* 800AA2B4 000A71F4  40 81 00 0C */	ble lbl_800AA2C0
/* 800AA2B8 000A71F8  7D 66 0E 70 */	srawi r6, r11, 1
/* 800AA2BC 000A71FC  48 00 00 08 */	b lbl_800AA2C4
lbl_800AA2C0:
/* 800AA2C0 000A7200  38 C0 00 01 */	li r6, 1
lbl_800AA2C4:
/* 800AA2C4 000A7204  54 83 04 3E */	clrlwi r3, r4, 0x10
/* 800AA2C8 000A7208  28 03 00 01 */	cmplwi r3, 1
/* 800AA2CC 000A720C  54 C3 04 3E */	clrlwi r3, r6, 0x10
/* 800AA2D0 000A7210  40 81 00 0C */	ble lbl_800AA2DC
/* 800AA2D4 000A7214  7D 84 0E 70 */	srawi r4, r12, 1
/* 800AA2D8 000A7218  48 00 00 08 */	b lbl_800AA2E0
lbl_800AA2DC:
/* 800AA2DC 000A721C  38 80 00 01 */	li r4, 1
lbl_800AA2E0:
/* 800AA2E0 000A7220  54 84 04 3E */	clrlwi r4, r4, 0x10
/* 800AA2E4 000A7224  42 00 FF 94 */	bdnz lbl_800AA278
/* 800AA2E8 000A7228  48 00 00 38 */	b lbl_800AA320
lbl_800AA2EC:
/* 800AA2EC 000A722C  38 C0 00 01 */	li r6, 1
/* 800AA2F0 000A7230  7C C7 00 30 */	slw r7, r6, r0
/* 800AA2F4 000A7234  7C C6 40 30 */	slw r6, r6, r8
/* 800AA2F8 000A7238  54 69 04 3E */	clrlwi r9, r3, 0x10
/* 800AA2FC 000A723C  38 67 FF FF */	addi r3, r7, -1
/* 800AA300 000A7240  7C E9 1A 14 */	add r7, r9, r3
/* 800AA304 000A7244  54 84 04 3E */	clrlwi r4, r4, 0x10
/* 800AA308 000A7248  38 66 FF FF */	addi r3, r6, -1
/* 800AA30C 000A724C  7C E6 06 30 */	sraw r6, r7, r0
/* 800AA310 000A7250  7C 04 1A 14 */	add r0, r4, r3
/* 800AA314 000A7254  7C 00 46 30 */	sraw r0, r0, r8
/* 800AA318 000A7258  7C 06 01 D6 */	mullw r0, r6, r0
/* 800AA31C 000A725C  7F E5 01 D6 */	mullw r31, r5, r0
lbl_800AA320:
/* 800AA320 000A7260  7F E3 FB 78 */	mr r3, r31
/* 800AA324 000A7264  83 E1 00 24 */	lwz r31, 0x24(r1)
/* 800AA328 000A7268  38 21 00 28 */	addi r1, r1, 0x28
/* 800AA32C 000A726C  4E 80 00 20 */	blr 

.global __GetImageTileCount
__GetImageTileCount:
/* 800AA330 000A7270  28 03 00 3C */	cmplwi r3, 0x3c
/* 800AA334 000A7274  41 81 00 40 */	bgt lbl_800AA374
/* 800AA338 000A7278  3D 20 80 3B */	lis r9, "@133"@ha
/* 800AA33C 000A727C  39 29 19 DC */	addi r9, r9, "@133"@l
/* 800AA340 000A7280  54 60 10 3A */	slwi r0, r3, 2
/* 800AA344 000A7284  7C 09 00 2E */	lwzx r0, r9, r0
/* 800AA348 000A7288  7C 09 03 A6 */	mtctr r0
/* 800AA34C 000A728C  4E 80 04 20 */	bctr 
lbl_800AA350:
/* 800AA350 000A7290  39 60 00 03 */	li r11, 3
/* 800AA354 000A7294  39 80 00 03 */	li r12, 3
/* 800AA358 000A7298  48 00 00 24 */	b lbl_800AA37C
lbl_800AA35C:
/* 800AA35C 000A729C  39 60 00 03 */	li r11, 3
/* 800AA360 000A72A0  39 80 00 02 */	li r12, 2
/* 800AA364 000A72A4  48 00 00 18 */	b lbl_800AA37C
lbl_800AA368:
/* 800AA368 000A72A8  39 60 00 02 */	li r11, 2
/* 800AA36C 000A72AC  39 80 00 02 */	li r12, 2
/* 800AA370 000A72B0  48 00 00 0C */	b lbl_800AA37C
lbl_800AA374:
/* 800AA374 000A72B4  39 80 00 00 */	li r12, 0
/* 800AA378 000A72B8  39 60 00 00 */	li r11, 0
lbl_800AA37C:
/* 800AA37C 000A72BC  54 80 04 3F */	clrlwi. r0, r4, 0x10
/* 800AA380 000A72C0  40 82 00 08 */	bne lbl_800AA388
/* 800AA384 000A72C4  38 80 00 01 */	li r4, 1
lbl_800AA388:
/* 800AA388 000A72C8  54 A0 04 3F */	clrlwi. r0, r5, 0x10
/* 800AA38C 000A72CC  40 82 00 08 */	bne lbl_800AA394
/* 800AA390 000A72D0  38 A0 00 01 */	li r5, 1
lbl_800AA394:
/* 800AA394 000A72D4  39 40 00 01 */	li r10, 1
/* 800AA398 000A72D8  7D 49 58 30 */	slw r9, r10, r11
/* 800AA39C 000A72DC  54 84 04 3E */	clrlwi r4, r4, 0x10
/* 800AA3A0 000A72E0  38 09 FF FF */	addi r0, r9, -1
/* 800AA3A4 000A72E4  7C 04 02 14 */	add r0, r4, r0
/* 800AA3A8 000A72E8  7C 00 5E 30 */	sraw r0, r0, r11
/* 800AA3AC 000A72EC  7D 44 60 30 */	slw r4, r10, r12
/* 800AA3B0 000A72F0  90 06 00 00 */	stw r0, 0(r6)
/* 800AA3B4 000A72F4  54 A5 04 3E */	clrlwi r5, r5, 0x10
/* 800AA3B8 000A72F8  38 04 FF FF */	addi r0, r4, -1
/* 800AA3BC 000A72FC  7C 05 02 14 */	add r0, r5, r0
/* 800AA3C0 000A7300  7C 00 66 30 */	sraw r0, r0, r12
/* 800AA3C4 000A7304  2C 03 00 06 */	cmpwi r3, 6
/* 800AA3C8 000A7308  90 07 00 00 */	stw r0, 0(r7)
/* 800AA3CC 000A730C  41 82 00 10 */	beq lbl_800AA3DC
/* 800AA3D0 000A7310  2C 03 00 16 */	cmpwi r3, 0x16
/* 800AA3D4 000A7314  41 82 00 08 */	beq lbl_800AA3DC
/* 800AA3D8 000A7318  39 40 00 00 */	li r10, 0
lbl_800AA3DC:
/* 800AA3DC 000A731C  2C 0A 00 00 */	cmpwi r10, 0
/* 800AA3E0 000A7320  41 82 00 0C */	beq lbl_800AA3EC
/* 800AA3E4 000A7324  38 00 00 02 */	li r0, 2
/* 800AA3E8 000A7328  48 00 00 08 */	b lbl_800AA3F0
lbl_800AA3EC:
/* 800AA3EC 000A732C  38 00 00 01 */	li r0, 1
lbl_800AA3F0:
/* 800AA3F0 000A7330  90 08 00 00 */	stw r0, 0(r8)
/* 800AA3F4 000A7334  4E 80 00 20 */	blr 

.global GXInitTexObj
GXInitTexObj:
/* 800AA3F8 000A7338  7C 08 02 A6 */	mflr r0
/* 800AA3FC 000A733C  90 01 00 04 */	stw r0, 4(r1)
/* 800AA400 000A7340  94 21 FF A0 */	stwu r1, -0x60(r1)
/* 800AA404 000A7344  BF 01 00 40 */	stmw r24, 0x40(r1)
/* 800AA408 000A7348  3B 64 00 00 */	addi r27, r4, 0
/* 800AA40C 000A734C  3B 85 00 00 */	addi r28, r5, 0
/* 800AA410 000A7350  3B E3 00 00 */	addi r31, r3, 0
/* 800AA414 000A7354  3B A6 00 00 */	addi r29, r6, 0
/* 800AA418 000A7358  3B C7 00 00 */	addi r30, r7, 0
/* 800AA41C 000A735C  3B 08 00 00 */	addi r24, r8, 0
/* 800AA420 000A7360  3B 29 00 00 */	addi r25, r9, 0
/* 800AA424 000A7364  3B 4A 00 00 */	addi r26, r10, 0
/* 800AA428 000A7368  38 80 00 00 */	li r4, 0
/* 800AA42C 000A736C  38 A0 00 20 */	li r5, 0x20
/* 800AA430 000A7370  4B F5 8C D1 */	bl memset
/* 800AA434 000A7374  80 9F 00 00 */	lwz r4, 0(r31)
/* 800AA438 000A7378  57 40 06 3F */	clrlwi. r0, r26, 0x18
/* 800AA43C 000A737C  57 23 10 3A */	slwi r3, r25, 2
/* 800AA440 000A7380  54 84 00 3A */	rlwinm r4, r4, 0, 0, 0x1d
/* 800AA444 000A7384  7C 84 C3 78 */	or r4, r4, r24
/* 800AA448 000A7388  90 9F 00 00 */	stw r4, 0(r31)
/* 800AA44C 000A738C  80 1F 00 00 */	lwz r0, 0(r31)
/* 800AA450 000A7390  54 00 07 B6 */	rlwinm r0, r0, 0, 0x1e, 0x1b
/* 800AA454 000A7394  7C 00 1B 78 */	or r0, r0, r3
/* 800AA458 000A7398  90 1F 00 00 */	stw r0, 0(r31)
/* 800AA45C 000A739C  80 1F 00 00 */	lwz r0, 0(r31)
/* 800AA460 000A73A0  54 00 07 34 */	rlwinm r0, r0, 0, 0x1c, 0x1a
/* 800AA464 000A73A4  60 00 00 10 */	ori r0, r0, 0x10
/* 800AA468 000A73A8  90 1F 00 00 */	stw r0, 0(r31)
/* 800AA46C 000A73AC  41 82 00 A4 */	beq lbl_800AA510
/* 800AA470 000A73B0  88 7F 00 1F */	lbz r3, 0x1f(r31)
/* 800AA474 000A73B4  38 1E FF F8 */	addi r0, r30, -8
/* 800AA478 000A73B8  28 00 00 02 */	cmplwi r0, 2
/* 800AA47C 000A73BC  60 60 00 01 */	ori r0, r3, 1
/* 800AA480 000A73C0  98 1F 00 1F */	stb r0, 0x1f(r31)
/* 800AA484 000A73C4  41 81 00 18 */	bgt lbl_800AA49C
/* 800AA488 000A73C8  80 1F 00 00 */	lwz r0, 0(r31)
/* 800AA48C 000A73CC  54 00 06 EE */	rlwinm r0, r0, 0, 0x1b, 0x17
/* 800AA490 000A73D0  60 00 00 A0 */	ori r0, r0, 0xa0
/* 800AA494 000A73D4  90 1F 00 00 */	stw r0, 0(r31)
/* 800AA498 000A73D8  48 00 00 14 */	b lbl_800AA4AC
lbl_800AA49C:
/* 800AA49C 000A73DC  80 1F 00 00 */	lwz r0, 0(r31)
/* 800AA4A0 000A73E0  54 00 06 EE */	rlwinm r0, r0, 0, 0x1b, 0x17
/* 800AA4A4 000A73E4  60 00 00 C0 */	ori r0, r0, 0xc0
/* 800AA4A8 000A73E8  90 1F 00 00 */	stw r0, 0(r31)
lbl_800AA4AC:
/* 800AA4AC 000A73EC  57 83 04 3E */	clrlwi r3, r28, 0x10
/* 800AA4B0 000A73F0  57 A0 04 3E */	clrlwi r0, r29, 0x10
/* 800AA4B4 000A73F4  7C 03 00 40 */	cmplw r3, r0
/* 800AA4B8 000A73F8  40 81 00 10 */	ble lbl_800AA4C8
/* 800AA4BC 000A73FC  7C 60 00 34 */	cntlzw r0, r3
/* 800AA4C0 000A7400  20 00 00 1F */	subfic r0, r0, 0x1f
/* 800AA4C4 000A7404  48 00 00 0C */	b lbl_800AA4D0
lbl_800AA4C8:
/* 800AA4C8 000A7408  7C 00 00 34 */	cntlzw r0, r0
/* 800AA4CC 000A740C  20 00 00 1F */	subfic r0, r0, 0x1f
lbl_800AA4D0:
/* 800AA4D0 000A7410  90 01 00 3C */	stw r0, 0x3c(r1)
/* 800AA4D4 000A7414  3C 00 43 30 */	lis r0, 0x4330
/* 800AA4D8 000A7418  80 7F 00 04 */	lwz r3, 4(r31)
/* 800AA4DC 000A741C  90 01 00 38 */	stw r0, 0x38(r1)
/* 800AA4E0 000A7420  C8 22 8B 30 */	lfd f1, "@166"@sda21(r2)
/* 800AA4E4 000A7424  54 63 06 1E */	rlwinm r3, r3, 0, 0x18, 0xf
/* 800AA4E8 000A7428  C8 01 00 38 */	lfd f0, 0x38(r1)
/* 800AA4EC 000A742C  C0 42 8B 28 */	lfs f2, "@164"@sda21(r2)
/* 800AA4F0 000A7430  EC 00 08 28 */	fsubs f0, f0, f1
/* 800AA4F4 000A7434  EC 02 00 32 */	fmuls f0, f2, f0
/* 800AA4F8 000A7438  FC 00 00 1E */	fctiwz f0, f0
/* 800AA4FC 000A743C  D8 01 00 30 */	stfd f0, 0x30(r1)
/* 800AA500 000A7440  80 01 00 34 */	lwz r0, 0x34(r1)
/* 800AA504 000A7444  50 03 44 2E */	rlwimi r3, r0, 8, 0x10, 0x17
/* 800AA508 000A7448  90 7F 00 04 */	stw r3, 4(r31)
/* 800AA50C 000A744C  48 00 00 14 */	b lbl_800AA520
lbl_800AA510:
/* 800AA510 000A7450  80 1F 00 00 */	lwz r0, 0(r31)
/* 800AA514 000A7454  54 00 06 EE */	rlwinm r0, r0, 0, 0x1b, 0x17
/* 800AA518 000A7458  60 00 00 80 */	ori r0, r0, 0x80
/* 800AA51C 000A745C  90 1F 00 00 */	stw r0, 0(r31)
lbl_800AA520:
/* 800AA520 000A7460  93 DF 00 14 */	stw r30, 0x14(r31)
/* 800AA524 000A7464  57 A3 04 3E */	clrlwi r3, r29, 0x10
/* 800AA528 000A7468  57 C7 07 3E */	clrlwi r7, r30, 0x1c
/* 800AA52C 000A746C  80 BF 00 08 */	lwz r5, 8(r31)
/* 800AA530 000A7470  57 84 04 3E */	clrlwi r4, r28, 0x10
/* 800AA534 000A7474  38 03 FF FF */	addi r0, r3, -1
/* 800AA538 000A7478  54 A6 00 2A */	rlwinm r6, r5, 0, 0, 0x15
/* 800AA53C 000A747C  38 A4 FF FF */	addi r5, r4, -1
/* 800AA540 000A7480  7C C5 2B 78 */	or r5, r6, r5
/* 800AA544 000A7484  90 BF 00 08 */	stw r5, 8(r31)
/* 800AA548 000A7488  54 05 50 2A */	slwi r5, r0, 0xa
/* 800AA54C 000A748C  57 60 D9 FE */	rlwinm r0, r27, 0x1b, 7, 0x1f
/* 800AA550 000A7490  80 DF 00 08 */	lwz r6, 8(r31)
/* 800AA554 000A7494  28 07 00 0E */	cmplwi r7, 0xe
/* 800AA558 000A7498  54 C6 05 96 */	rlwinm r6, r6, 0, 0x16, 0xb
/* 800AA55C 000A749C  7C C5 2B 78 */	or r5, r6, r5
/* 800AA560 000A74A0  90 BF 00 08 */	stw r5, 8(r31)
/* 800AA564 000A74A4  80 BF 00 08 */	lwz r5, 8(r31)
/* 800AA568 000A74A8  54 A5 03 0E */	rlwinm r5, r5, 0, 0xc, 7
/* 800AA56C 000A74AC  53 C5 A2 16 */	rlwimi r5, r30, 0x14, 8, 0xb
/* 800AA570 000A74B0  90 BF 00 08 */	stw r5, 8(r31)
/* 800AA574 000A74B4  80 BF 00 0C */	lwz r5, 0xc(r31)
/* 800AA578 000A74B8  54 A5 00 14 */	rlwinm r5, r5, 0, 0, 0xa
/* 800AA57C 000A74BC  7C A0 03 78 */	or r0, r5, r0
/* 800AA580 000A74C0  90 1F 00 0C */	stw r0, 0xc(r31)
/* 800AA584 000A74C4  41 81 00 80 */	bgt lbl_800AA604
/* 800AA588 000A74C8  3C A0 80 3B */	lis r5, "@168"@ha
/* 800AA58C 000A74CC  38 A5 1A D0 */	addi r5, r5, "@168"@l
/* 800AA590 000A74D0  54 E0 10 3A */	slwi r0, r7, 2
/* 800AA594 000A74D4  7C 05 00 2E */	lwzx r0, r5, r0
/* 800AA598 000A74D8  7C 09 03 A6 */	mtctr r0
/* 800AA59C 000A74DC  4E 80 04 20 */	bctr 
lbl_800AA5A0:
/* 800AA5A0 000A74E0  38 00 00 01 */	li r0, 1
/* 800AA5A4 000A74E4  98 1F 00 1E */	stb r0, 0x1e(r31)
/* 800AA5A8 000A74E8  38 00 00 03 */	li r0, 3
/* 800AA5AC 000A74EC  38 E0 00 03 */	li r7, 3
/* 800AA5B0 000A74F0  48 00 00 64 */	b lbl_800AA614
lbl_800AA5B4:
/* 800AA5B4 000A74F4  38 00 00 02 */	li r0, 2
/* 800AA5B8 000A74F8  98 1F 00 1E */	stb r0, 0x1e(r31)
/* 800AA5BC 000A74FC  38 00 00 03 */	li r0, 3
/* 800AA5C0 000A7500  38 E0 00 02 */	li r7, 2
/* 800AA5C4 000A7504  48 00 00 50 */	b lbl_800AA614
lbl_800AA5C8:
/* 800AA5C8 000A7508  38 00 00 02 */	li r0, 2
/* 800AA5CC 000A750C  98 1F 00 1E */	stb r0, 0x1e(r31)
/* 800AA5D0 000A7510  38 00 00 02 */	li r0, 2
/* 800AA5D4 000A7514  38 E0 00 02 */	li r7, 2
/* 800AA5D8 000A7518  48 00 00 3C */	b lbl_800AA614
lbl_800AA5DC:
/* 800AA5DC 000A751C  38 00 00 03 */	li r0, 3
/* 800AA5E0 000A7520  98 1F 00 1E */	stb r0, 0x1e(r31)
/* 800AA5E4 000A7524  38 00 00 02 */	li r0, 2
/* 800AA5E8 000A7528  38 E0 00 02 */	li r7, 2
/* 800AA5EC 000A752C  48 00 00 28 */	b lbl_800AA614
lbl_800AA5F0:
/* 800AA5F0 000A7530  38 00 00 00 */	li r0, 0
/* 800AA5F4 000A7534  98 1F 00 1E */	stb r0, 0x1e(r31)
/* 800AA5F8 000A7538  38 00 00 03 */	li r0, 3
/* 800AA5FC 000A753C  38 E0 00 03 */	li r7, 3
/* 800AA600 000A7540  48 00 00 14 */	b lbl_800AA614
lbl_800AA604:
/* 800AA604 000A7544  38 00 00 02 */	li r0, 2
/* 800AA608 000A7548  98 1F 00 1E */	stb r0, 0x1e(r31)
/* 800AA60C 000A754C  38 00 00 02 */	li r0, 2
/* 800AA610 000A7550  38 E0 00 02 */	li r7, 2
lbl_800AA614:
/* 800AA614 000A7554  54 08 04 3E */	clrlwi r8, r0, 0x10
/* 800AA618 000A7558  38 C0 00 01 */	li r6, 1
/* 800AA61C 000A755C  7C C5 40 30 */	slw r5, r6, r8
/* 800AA620 000A7560  54 E7 04 3E */	clrlwi r7, r7, 0x10
/* 800AA624 000A7564  38 05 FF FF */	addi r0, r5, -1
/* 800AA628 000A7568  7C C5 38 30 */	slw r5, r6, r7
/* 800AA62C 000A756C  7C 84 02 14 */	add r4, r4, r0
/* 800AA630 000A7570  38 05 FF FF */	addi r0, r5, -1
/* 800AA634 000A7574  7C 84 46 30 */	sraw r4, r4, r8
/* 800AA638 000A7578  7C 03 02 14 */	add r0, r3, r0
/* 800AA63C 000A757C  7C 00 3E 30 */	sraw r0, r0, r7
/* 800AA640 000A7580  7C 04 01 D6 */	mullw r0, r4, r0
/* 800AA644 000A7584  54 00 04 7E */	clrlwi r0, r0, 0x11
/* 800AA648 000A7588  B0 1F 00 1C */	sth r0, 0x1c(r31)
/* 800AA64C 000A758C  88 1F 00 1F */	lbz r0, 0x1f(r31)
/* 800AA650 000A7590  60 00 00 02 */	ori r0, r0, 2
/* 800AA654 000A7594  98 1F 00 1F */	stb r0, 0x1f(r31)
/* 800AA658 000A7598  80 01 00 64 */	lwz r0, 0x64(r1)
/* 800AA65C 000A759C  BB 01 00 40 */	lmw r24, 0x40(r1)
/* 800AA660 000A75A0  38 21 00 60 */	addi r1, r1, 0x60
/* 800AA664 000A75A4  7C 08 03 A6 */	mtlr r0
/* 800AA668 000A75A8  4E 80 00 20 */	blr 

.global GXInitTexObjCI
GXInitTexObjCI:
/* 800AA66C 000A75AC  7C 08 02 A6 */	mflr r0
/* 800AA670 000A75B0  90 01 00 04 */	stw r0, 4(r1)
/* 800AA674 000A75B4  94 21 FF D0 */	stwu r1, -0x30(r1)
/* 800AA678 000A75B8  93 E1 00 2C */	stw r31, 0x2c(r1)
/* 800AA67C 000A75BC  83 E1 00 38 */	lwz r31, 0x38(r1)
/* 800AA680 000A75C0  93 C1 00 28 */	stw r30, 0x28(r1)
/* 800AA684 000A75C4  7C 7E 1B 78 */	mr r30, r3
/* 800AA688 000A75C8  4B FF FD 71 */	bl GXInitTexObj
/* 800AA68C 000A75CC  88 1E 00 1F */	lbz r0, 0x1f(r30)
/* 800AA690 000A75D0  54 00 07 FA */	rlwinm r0, r0, 0, 0x1f, 0x1d
/* 800AA694 000A75D4  98 1E 00 1F */	stb r0, 0x1f(r30)
/* 800AA698 000A75D8  93 FE 00 18 */	stw r31, 0x18(r30)
/* 800AA69C 000A75DC  80 01 00 34 */	lwz r0, 0x34(r1)
/* 800AA6A0 000A75E0  83 E1 00 2C */	lwz r31, 0x2c(r1)
/* 800AA6A4 000A75E4  83 C1 00 28 */	lwz r30, 0x28(r1)
/* 800AA6A8 000A75E8  38 21 00 30 */	addi r1, r1, 0x30
/* 800AA6AC 000A75EC  7C 08 03 A6 */	mtlr r0
/* 800AA6B0 000A75F0  4E 80 00 20 */	blr 

.global GXInitTexObjLOD
GXInitTexObjLOD:
/* 800AA6B4 000A75F4  94 21 FF C8 */	stwu r1, -0x38(r1)
/* 800AA6B8 000A75F8  C0 02 8B 38 */	lfs f0, "@192"@sda21(r2)
/* 800AA6BC 000A75FC  FC 03 00 40 */	fcmpo cr0, f3, f0
/* 800AA6C0 000A7600  40 80 00 0C */	bge lbl_800AA6CC
/* 800AA6C4 000A7604  FC 60 00 90 */	fmr f3, f0
/* 800AA6C8 000A7608  48 00 00 18 */	b lbl_800AA6E0
lbl_800AA6CC:
/* 800AA6CC 000A760C  C0 02 8B 3C */	lfs f0, "@193"@sda21(r2)
/* 800AA6D0 000A7610  FC 03 00 40 */	fcmpo cr0, f3, f0
/* 800AA6D4 000A7614  4C 41 13 82 */	cror 2, 1, 2
/* 800AA6D8 000A7618  40 82 00 08 */	bne lbl_800AA6E0
/* 800AA6DC 000A761C  C0 62 8B 40 */	lfs f3, "@194"@sda21(r2)
lbl_800AA6E0:
/* 800AA6E0 000A7620  C0 02 8B 44 */	lfs f0, "@195"@sda21(r2)
/* 800AA6E4 000A7624  2C 05 00 01 */	cmpwi r5, 1
/* 800AA6E8 000A7628  80 03 00 00 */	lwz r0, 0(r3)
/* 800AA6EC 000A762C  EC 00 00 F2 */	fmuls f0, f0, f3
/* 800AA6F0 000A7630  54 05 05 DC */	rlwinm r5, r0, 0, 0x17, 0xe
/* 800AA6F4 000A7634  FC 00 00 1E */	fctiwz f0, f0
/* 800AA6F8 000A7638  D8 01 00 30 */	stfd f0, 0x30(r1)
/* 800AA6FC 000A763C  80 01 00 34 */	lwz r0, 0x34(r1)
/* 800AA700 000A7640  50 05 4B EC */	rlwimi r5, r0, 9, 0xf, 0x16
/* 800AA704 000A7644  90 A3 00 00 */	stw r5, 0(r3)
/* 800AA708 000A7648  40 82 00 0C */	bne lbl_800AA714
/* 800AA70C 000A764C  38 A0 00 01 */	li r5, 1
/* 800AA710 000A7650  48 00 00 08 */	b lbl_800AA718
lbl_800AA714:
/* 800AA714 000A7654  38 A0 00 00 */	li r5, 0
lbl_800AA718:
/* 800AA718 000A7658  81 23 00 00 */	lwz r9, 0(r3)
/* 800AA71C 000A765C  54 E0 06 3F */	clrlwi. r0, r7, 0x18
/* 800AA720 000A7660  54 A5 20 36 */	slwi r5, r5, 4
/* 800AA724 000A7664  55 27 07 34 */	rlwinm r7, r9, 0, 0x1c, 0x1a
/* 800AA728 000A7668  7C E5 2B 78 */	or r5, r7, r5
/* 800AA72C 000A766C  90 A3 00 00 */	stw r5, 0(r3)
/* 800AA730 000A7670  38 AD 82 E0 */	addi r5, r13, GX2HWFiltConv@sda21
/* 800AA734 000A7674  7C 05 20 AE */	lbzx r0, r5, r4
/* 800AA738 000A7678  80 E3 00 00 */	lwz r7, 0(r3)
/* 800AA73C 000A767C  54 00 28 34 */	slwi r0, r0, 5
/* 800AA740 000A7680  54 E4 06 EE */	rlwinm r4, r7, 0, 0x1b, 0x17
/* 800AA744 000A7684  7C 80 03 78 */	or r0, r4, r0
/* 800AA748 000A7688  90 03 00 00 */	stw r0, 0(r3)
/* 800AA74C 000A768C  41 82 00 0C */	beq lbl_800AA758
/* 800AA750 000A7690  38 00 00 00 */	li r0, 0
/* 800AA754 000A7694  48 00 00 08 */	b lbl_800AA75C
lbl_800AA758:
/* 800AA758 000A7698  38 00 00 01 */	li r0, 1
lbl_800AA75C:
/* 800AA75C 000A769C  80 83 00 00 */	lwz r4, 0(r3)
/* 800AA760 000A76A0  54 00 40 2E */	slwi r0, r0, 8
/* 800AA764 000A76A4  54 84 06 2C */	rlwinm r4, r4, 0, 0x18, 0x16
/* 800AA768 000A76A8  7C 80 03 78 */	or r0, r4, r0
/* 800AA76C 000A76AC  90 03 00 00 */	stw r0, 0(r3)
/* 800AA770 000A76B0  55 04 98 18 */	slwi r4, r8, 0x13
/* 800AA774 000A76B4  54 C0 A8 D4 */	rlwinm r0, r6, 0x15, 3, 0xa
/* 800AA778 000A76B8  80 A3 00 00 */	lwz r5, 0(r3)
/* 800AA77C 000A76BC  54 A5 03 DA */	rlwinm r5, r5, 0, 0xf, 0xd
/* 800AA780 000A76C0  90 A3 00 00 */	stw r5, 0(r3)
/* 800AA784 000A76C4  80 A3 00 00 */	lwz r5, 0(r3)
/* 800AA788 000A76C8  54 A5 03 98 */	rlwinm r5, r5, 0, 0xe, 0xc
/* 800AA78C 000A76CC  90 A3 00 00 */	stw r5, 0(r3)
/* 800AA790 000A76D0  80 A3 00 00 */	lwz r5, 0(r3)
/* 800AA794 000A76D4  54 A5 03 54 */	rlwinm r5, r5, 0, 0xd, 0xa
/* 800AA798 000A76D8  7C A4 23 78 */	or r4, r5, r4
/* 800AA79C 000A76DC  90 83 00 00 */	stw r4, 0(r3)
/* 800AA7A0 000A76E0  80 83 00 00 */	lwz r4, 0(r3)
/* 800AA7A4 000A76E4  54 84 02 D2 */	rlwinm r4, r4, 0, 0xb, 9
/* 800AA7A8 000A76E8  7C 80 03 78 */	or r0, r4, r0
/* 800AA7AC 000A76EC  90 03 00 00 */	stw r0, 0(r3)
/* 800AA7B0 000A76F0  C0 02 8B 48 */	lfs f0, "@196"@sda21(r2)
/* 800AA7B4 000A76F4  FC 01 00 40 */	fcmpo cr0, f1, f0
/* 800AA7B8 000A76F8  40 80 00 0C */	bge lbl_800AA7C4
/* 800AA7BC 000A76FC  FC 20 00 90 */	fmr f1, f0
/* 800AA7C0 000A7700  48 00 00 14 */	b lbl_800AA7D4
lbl_800AA7C4:
/* 800AA7C4 000A7704  C0 02 8B 4C */	lfs f0, "@197"@sda21(r2)
/* 800AA7C8 000A7708  FC 01 00 40 */	fcmpo cr0, f1, f0
/* 800AA7CC 000A770C  40 81 00 08 */	ble lbl_800AA7D4
/* 800AA7D0 000A7710  FC 20 00 90 */	fmr f1, f0
lbl_800AA7D4:
/* 800AA7D4 000A7714  C0 62 8B 28 */	lfs f3, "@164"@sda21(r2)
/* 800AA7D8 000A7718  C0 02 8B 48 */	lfs f0, "@196"@sda21(r2)
/* 800AA7DC 000A771C  EC 23 00 72 */	fmuls f1, f3, f1
/* 800AA7E0 000A7720  FC 02 00 40 */	fcmpo cr0, f2, f0
/* 800AA7E4 000A7724  FC 20 08 1E */	fctiwz f1, f1
/* 800AA7E8 000A7728  D8 21 00 30 */	stfd f1, 0x30(r1)
/* 800AA7EC 000A772C  80 81 00 34 */	lwz r4, 0x34(r1)
/* 800AA7F0 000A7730  40 80 00 0C */	bge lbl_800AA7FC
/* 800AA7F4 000A7734  FC 40 00 90 */	fmr f2, f0
/* 800AA7F8 000A7738  48 00 00 14 */	b lbl_800AA80C
lbl_800AA7FC:
/* 800AA7FC 000A773C  C0 02 8B 4C */	lfs f0, "@197"@sda21(r2)
/* 800AA800 000A7740  FC 02 00 40 */	fcmpo cr0, f2, f0
/* 800AA804 000A7744  40 81 00 08 */	ble lbl_800AA80C
/* 800AA808 000A7748  FC 40 00 90 */	fmr f2, f0
lbl_800AA80C:
/* 800AA80C 000A774C  80 03 00 04 */	lwz r0, 4(r3)
/* 800AA810 000A7750  54 00 00 2E */	rlwinm r0, r0, 0, 0, 0x17
/* 800AA814 000A7754  50 80 06 3E */	rlwimi r0, r4, 0, 0x18, 0x1f
/* 800AA818 000A7758  90 03 00 04 */	stw r0, 4(r3)
/* 800AA81C 000A775C  C0 02 8B 28 */	lfs f0, "@164"@sda21(r2)
/* 800AA820 000A7760  80 03 00 04 */	lwz r0, 4(r3)
/* 800AA824 000A7764  EC 00 00 B2 */	fmuls f0, f0, f2
/* 800AA828 000A7768  54 04 06 1E */	rlwinm r4, r0, 0, 0x18, 0xf
/* 800AA82C 000A776C  FC 00 00 1E */	fctiwz f0, f0
/* 800AA830 000A7770  D8 01 00 30 */	stfd f0, 0x30(r1)
/* 800AA834 000A7774  80 01 00 34 */	lwz r0, 0x34(r1)
/* 800AA838 000A7778  50 04 44 2E */	rlwimi r4, r0, 8, 0x10, 0x17
/* 800AA83C 000A777C  90 83 00 04 */	stw r4, 4(r3)
/* 800AA840 000A7780  38 21 00 38 */	addi r1, r1, 0x38
/* 800AA844 000A7784  4E 80 00 20 */	blr 

.global GXGetTexObjAll
GXGetTexObjAll:
/* 800AA848 000A7788  80 03 00 0C */	lwz r0, 0xc(r3)
/* 800AA84C 000A778C  54 00 29 B4 */	rlwinm r0, r0, 5, 6, 0x1a
/* 800AA850 000A7790  90 04 00 00 */	stw r0, 0(r4)
/* 800AA854 000A7794  80 03 00 08 */	lwz r0, 8(r3)
/* 800AA858 000A7798  54 04 05 BE */	clrlwi r4, r0, 0x16
/* 800AA85C 000A779C  38 04 00 01 */	addi r0, r4, 1
/* 800AA860 000A77A0  B0 05 00 00 */	sth r0, 0(r5)
/* 800AA864 000A77A4  80 03 00 08 */	lwz r0, 8(r3)
/* 800AA868 000A77A8  54 04 B5 BE */	rlwinm r4, r0, 0x16, 0x16, 0x1f
/* 800AA86C 000A77AC  38 04 00 01 */	addi r0, r4, 1
/* 800AA870 000A77B0  B0 06 00 00 */	sth r0, 0(r6)
/* 800AA874 000A77B4  80 03 00 14 */	lwz r0, 0x14(r3)
/* 800AA878 000A77B8  90 07 00 00 */	stw r0, 0(r7)
/* 800AA87C 000A77BC  80 03 00 00 */	lwz r0, 0(r3)
/* 800AA880 000A77C0  54 00 07 BE */	clrlwi r0, r0, 0x1e
/* 800AA884 000A77C4  90 08 00 00 */	stw r0, 0(r8)
/* 800AA888 000A77C8  80 03 00 00 */	lwz r0, 0(r3)
/* 800AA88C 000A77CC  54 00 F7 BE */	rlwinm r0, r0, 0x1e, 0x1e, 0x1f
/* 800AA890 000A77D0  90 09 00 00 */	stw r0, 0(r9)
/* 800AA894 000A77D4  88 03 00 1F */	lbz r0, 0x1f(r3)
/* 800AA898 000A77D8  54 03 07 FE */	clrlwi r3, r0, 0x1f
/* 800AA89C 000A77DC  38 03 FF FF */	addi r0, r3, -1
/* 800AA8A0 000A77E0  7C 00 00 34 */	cntlzw r0, r0
/* 800AA8A4 000A77E4  54 00 DE 3E */	rlwinm r0, r0, 0x1b, 0x18, 0x1f
/* 800AA8A8 000A77E8  98 0A 00 00 */	stb r0, 0(r10)
/* 800AA8AC 000A77EC  4E 80 00 20 */	blr 

.global GXGetTexObjWidth
GXGetTexObjWidth:
/* 800AA8B0 000A77F0  80 03 00 08 */	lwz r0, 8(r3)
/* 800AA8B4 000A77F4  54 03 05 BE */	clrlwi r3, r0, 0x16
/* 800AA8B8 000A77F8  38 63 00 01 */	addi r3, r3, 1
/* 800AA8BC 000A77FC  4E 80 00 20 */	blr 

.global GXGetTexObjHeight
GXGetTexObjHeight:
/* 800AA8C0 000A7800  80 03 00 08 */	lwz r0, 8(r3)
/* 800AA8C4 000A7804  54 03 B5 BE */	rlwinm r3, r0, 0x16, 0x16, 0x1f
/* 800AA8C8 000A7808  38 63 00 01 */	addi r3, r3, 1
/* 800AA8CC 000A780C  4E 80 00 20 */	blr 

.global GXGetTexObjFmt
GXGetTexObjFmt:
/* 800AA8D0 000A7810  80 63 00 14 */	lwz r3, 0x14(r3)
/* 800AA8D4 000A7814  4E 80 00 20 */	blr 

.global GXLoadTexObjPreLoaded
GXLoadTexObjPreLoaded:
/* 800AA8D8 000A7818  7C 08 02 A6 */	mflr r0
/* 800AA8DC 000A781C  38 ED 80 48 */	addi r7, r13, GXTexImage0Ids@sda21
/* 800AA8E0 000A7820  90 01 00 04 */	stw r0, 4(r1)
/* 800AA8E4 000A7824  94 21 FF D8 */	stwu r1, -0x28(r1)
/* 800AA8E8 000A7828  93 E1 00 24 */	stw r31, 0x24(r1)
/* 800AA8EC 000A782C  3F E0 CC 01 */	lis r31, 0xCC008000@ha
/* 800AA8F0 000A7830  93 C1 00 20 */	stw r30, 0x20(r1)
/* 800AA8F4 000A7834  3B C0 00 61 */	li r30, 0x61
/* 800AA8F8 000A7838  93 A1 00 1C */	stw r29, 0x1c(r1)
/* 800AA8FC 000A783C  3B A5 00 00 */	addi r29, r5, 0
/* 800AA900 000A7840  38 AD 80 58 */	addi r5, r13, GXTexImage2Ids@sda21
/* 800AA904 000A7844  93 81 00 18 */	stw r28, 0x18(r1)
/* 800AA908 000A7848  7C 7C 1B 78 */	mr r28, r3
/* 800AA90C 000A784C  80 C3 00 00 */	lwz r6, 0(r3)
/* 800AA910 000A7850  38 6D 80 38 */	addi r3, r13, GXTexMode0Ids@sda21
/* 800AA914 000A7854  7C 03 E8 AE */	lbzx r0, r3, r29
/* 800AA918 000A7858  38 6D 80 40 */	addi r3, r13, GXTexMode1Ids@sda21
/* 800AA91C 000A785C  54 00 C0 0E */	slwi r0, r0, 0x18
/* 800AA920 000A7860  50 C0 02 3E */	rlwimi r0, r6, 0, 8, 0x1f
/* 800AA924 000A7864  90 1C 00 00 */	stw r0, 0(r28)
/* 800AA928 000A7868  38 CD 80 50 */	addi r6, r13, GXTexImage1Ids@sda21
/* 800AA92C 000A786C  7C 03 E8 AE */	lbzx r0, r3, r29
/* 800AA930 000A7870  38 6D 80 60 */	addi r3, r13, GXTexImage3Ids@sda21
/* 800AA934 000A7874  81 1C 00 04 */	lwz r8, 4(r28)
/* 800AA938 000A7878  54 00 C0 0E */	slwi r0, r0, 0x18
/* 800AA93C 000A787C  51 00 02 3E */	rlwimi r0, r8, 0, 8, 0x1f
/* 800AA940 000A7880  90 1C 00 04 */	stw r0, 4(r28)
/* 800AA944 000A7884  7C 07 E8 AE */	lbzx r0, r7, r29
/* 800AA948 000A7888  81 1C 00 08 */	lwz r8, 8(r28)
/* 800AA94C 000A788C  54 00 C0 0E */	slwi r0, r0, 0x18
/* 800AA950 000A7890  51 00 02 3E */	rlwimi r0, r8, 0, 8, 0x1f
/* 800AA954 000A7894  90 1C 00 08 */	stw r0, 8(r28)
/* 800AA958 000A7898  7C 06 E8 AE */	lbzx r0, r6, r29
/* 800AA95C 000A789C  80 E4 00 00 */	lwz r7, 0(r4)
/* 800AA960 000A78A0  54 00 C0 0E */	slwi r0, r0, 0x18
/* 800AA964 000A78A4  50 E0 02 3E */	rlwimi r0, r7, 0, 8, 0x1f
/* 800AA968 000A78A8  90 04 00 00 */	stw r0, 0(r4)
/* 800AA96C 000A78AC  7C 05 E8 AE */	lbzx r0, r5, r29
/* 800AA970 000A78B0  80 C4 00 04 */	lwz r6, 4(r4)
/* 800AA974 000A78B4  54 00 C0 0E */	slwi r0, r0, 0x18
/* 800AA978 000A78B8  50 C0 02 3E */	rlwimi r0, r6, 0, 8, 0x1f
/* 800AA97C 000A78BC  90 04 00 04 */	stw r0, 4(r4)
/* 800AA980 000A78C0  7C 03 E8 AE */	lbzx r0, r3, r29
/* 800AA984 000A78C4  80 BC 00 0C */	lwz r5, 0xc(r28)
/* 800AA988 000A78C8  54 00 C0 0E */	slwi r0, r0, 0x18
/* 800AA98C 000A78CC  50 A0 02 3E */	rlwimi r0, r5, 0, 8, 0x1f
/* 800AA990 000A78D0  90 1C 00 0C */	stw r0, 0xc(r28)
/* 800AA994 000A78D4  9B DF 80 00 */	stb r30, 0xCC008000@l(r31)
/* 800AA998 000A78D8  80 1C 00 00 */	lwz r0, 0(r28)
/* 800AA99C 000A78DC  90 1F 80 00 */	stw r0, -0x8000(r31)
/* 800AA9A0 000A78E0  9B DF 80 00 */	stb r30, -0x8000(r31)
/* 800AA9A4 000A78E4  80 1C 00 04 */	lwz r0, 4(r28)
/* 800AA9A8 000A78E8  90 1F 80 00 */	stw r0, -0x8000(r31)
/* 800AA9AC 000A78EC  9B DF 80 00 */	stb r30, -0x8000(r31)
/* 800AA9B0 000A78F0  80 1C 00 08 */	lwz r0, 8(r28)
/* 800AA9B4 000A78F4  90 1F 80 00 */	stw r0, -0x8000(r31)
/* 800AA9B8 000A78F8  9B DF 80 00 */	stb r30, -0x8000(r31)
/* 800AA9BC 000A78FC  80 04 00 00 */	lwz r0, 0(r4)
/* 800AA9C0 000A7900  90 1F 80 00 */	stw r0, -0x8000(r31)
/* 800AA9C4 000A7904  9B DF 80 00 */	stb r30, -0x8000(r31)
/* 800AA9C8 000A7908  80 04 00 04 */	lwz r0, 4(r4)
/* 800AA9CC 000A790C  90 1F 80 00 */	stw r0, -0x8000(r31)
/* 800AA9D0 000A7910  9B DF 80 00 */	stb r30, -0x8000(r31)
/* 800AA9D4 000A7914  80 1C 00 0C */	lwz r0, 0xc(r28)
/* 800AA9D8 000A7918  90 1F 80 00 */	stw r0, -0x8000(r31)
/* 800AA9DC 000A791C  88 1C 00 1F */	lbz r0, 0x1f(r28)
/* 800AA9E0 000A7920  54 00 07 BD */	rlwinm. r0, r0, 0, 0x1e, 0x1e
/* 800AA9E4 000A7924  40 82 00 3C */	bne lbl_800AAA20
/* 800AA9E8 000A7928  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AA9EC 000A792C  80 7C 00 18 */	lwz r3, 0x18(r28)
/* 800AA9F0 000A7930  81 84 04 14 */	lwz r12, 0x414(r4)
/* 800AA9F4 000A7934  7D 88 03 A6 */	mtlr r12
/* 800AA9F8 000A7938  4E 80 00 21 */	blrl 
/* 800AA9FC 000A793C  38 8D 80 68 */	addi r4, r13, GXTexTlutIds@sda21
/* 800AAA00 000A7940  80 A3 00 04 */	lwz r5, 4(r3)
/* 800AAA04 000A7944  7C 04 E8 AE */	lbzx r0, r4, r29
/* 800AAA08 000A7948  54 00 C0 0E */	slwi r0, r0, 0x18
/* 800AAA0C 000A794C  50 A0 02 3E */	rlwimi r0, r5, 0, 8, 0x1f
/* 800AAA10 000A7950  90 03 00 04 */	stw r0, 4(r3)
/* 800AAA14 000A7954  9B DF 80 00 */	stb r30, -0x8000(r31)
/* 800AAA18 000A7958  80 03 00 04 */	lwz r0, 4(r3)
/* 800AAA1C 000A795C  90 1F 80 00 */	stw r0, -0x8000(r31)
lbl_800AAA20:
/* 800AAA20 000A7960  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AAA24 000A7964  57 A5 10 3A */	slwi r5, r29, 2
/* 800AAA28 000A7968  80 9C 00 08 */	lwz r4, 8(r28)
/* 800AAA2C 000A796C  38 00 00 00 */	li r0, 0
/* 800AAA30 000A7970  7C 63 2A 14 */	add r3, r3, r5
/* 800AAA34 000A7974  90 83 04 5C */	stw r4, 0x45c(r3)
/* 800AAA38 000A7978  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AAA3C 000A797C  80 9C 00 00 */	lwz r4, 0(r28)
/* 800AAA40 000A7980  7C 63 2A 14 */	add r3, r3, r5
/* 800AAA44 000A7984  90 83 04 7C */	stw r4, 0x47c(r3)
/* 800AAA48 000A7988  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AAA4C 000A798C  80 64 04 F4 */	lwz r3, 0x4f4(r4)
/* 800AAA50 000A7990  60 63 00 01 */	ori r3, r3, 1
/* 800AAA54 000A7994  90 64 04 F4 */	stw r3, 0x4f4(r4)
/* 800AAA58 000A7998  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AAA5C 000A799C  B0 03 00 02 */	sth r0, 2(r3)
/* 800AAA60 000A79A0  80 01 00 2C */	lwz r0, 0x2c(r1)
/* 800AAA64 000A79A4  83 E1 00 24 */	lwz r31, 0x24(r1)
/* 800AAA68 000A79A8  83 C1 00 20 */	lwz r30, 0x20(r1)
/* 800AAA6C 000A79AC  83 A1 00 1C */	lwz r29, 0x1c(r1)
/* 800AAA70 000A79B0  83 81 00 18 */	lwz r28, 0x18(r1)
/* 800AAA74 000A79B4  38 21 00 28 */	addi r1, r1, 0x28
/* 800AAA78 000A79B8  7C 08 03 A6 */	mtlr r0
/* 800AAA7C 000A79BC  4E 80 00 20 */	blr 

.global GXLoadTexObj
GXLoadTexObj:
/* 800AAA80 000A79C0  7C 08 02 A6 */	mflr r0
/* 800AAA84 000A79C4  90 01 00 04 */	stw r0, 4(r1)
/* 800AAA88 000A79C8  94 21 FF E8 */	stwu r1, -0x18(r1)
/* 800AAA8C 000A79CC  93 E1 00 14 */	stw r31, 0x14(r1)
/* 800AAA90 000A79D0  3B E4 00 00 */	addi r31, r4, 0
/* 800AAA94 000A79D4  93 C1 00 10 */	stw r30, 0x10(r1)
/* 800AAA98 000A79D8  3B C3 00 00 */	addi r30, r3, 0
/* 800AAA9C 000A79DC  80 AD 82 C8 */	lwz r5, gx@sda21(r13)
/* 800AAAA0 000A79E0  81 85 04 10 */	lwz r12, 0x410(r5)
/* 800AAAA4 000A79E4  7D 88 03 A6 */	mtlr r12
/* 800AAAA8 000A79E8  4E 80 00 21 */	blrl 
/* 800AAAAC 000A79EC  38 83 00 00 */	addi r4, r3, 0
/* 800AAAB0 000A79F0  38 7E 00 00 */	addi r3, r30, 0
/* 800AAAB4 000A79F4  38 BF 00 00 */	addi r5, r31, 0
/* 800AAAB8 000A79F8  4B FF FE 21 */	bl GXLoadTexObjPreLoaded
/* 800AAABC 000A79FC  80 01 00 1C */	lwz r0, 0x1c(r1)
/* 800AAAC0 000A7A00  83 E1 00 14 */	lwz r31, 0x14(r1)
/* 800AAAC4 000A7A04  83 C1 00 10 */	lwz r30, 0x10(r1)
/* 800AAAC8 000A7A08  38 21 00 18 */	addi r1, r1, 0x18
/* 800AAACC 000A7A0C  7C 08 03 A6 */	mtlr r0
/* 800AAAD0 000A7A10  4E 80 00 20 */	blr 

.global GXInitTlutObj
GXInitTlutObj:
/* 800AAAD4 000A7A14  38 00 00 00 */	li r0, 0
/* 800AAAD8 000A7A18  90 03 00 00 */	stw r0, 0(r3)
/* 800AAADC 000A7A1C  54 A5 50 2A */	slwi r5, r5, 0xa
/* 800AAAE0 000A7A20  54 80 D9 FE */	rlwinm r0, r4, 0x1b, 7, 0x1f
/* 800AAAE4 000A7A24  80 E3 00 00 */	lwz r7, 0(r3)
/* 800AAAE8 000A7A28  54 E4 05 A6 */	rlwinm r4, r7, 0, 0x16, 0x13
/* 800AAAEC 000A7A2C  7C 84 2B 78 */	or r4, r4, r5
/* 800AAAF0 000A7A30  90 83 00 00 */	stw r4, 0(r3)
/* 800AAAF4 000A7A34  80 83 00 04 */	lwz r4, 4(r3)
/* 800AAAF8 000A7A38  54 84 00 14 */	rlwinm r4, r4, 0, 0, 0xa
/* 800AAAFC 000A7A3C  7C 80 03 78 */	or r0, r4, r0
/* 800AAB00 000A7A40  90 03 00 04 */	stw r0, 4(r3)
/* 800AAB04 000A7A44  80 03 00 04 */	lwz r0, 4(r3)
/* 800AAB08 000A7A48  54 00 02 3E */	clrlwi r0, r0, 8
/* 800AAB0C 000A7A4C  64 00 64 00 */	oris r0, r0, 0x6400
/* 800AAB10 000A7A50  90 03 00 04 */	stw r0, 4(r3)
/* 800AAB14 000A7A54  B0 C3 00 08 */	sth r6, 8(r3)
/* 800AAB18 000A7A58  4E 80 00 20 */	blr 

.global GXLoadTlut
GXLoadTlut:
/* 800AAB1C 000A7A5C  7C 08 02 A6 */	mflr r0
/* 800AAB20 000A7A60  90 01 00 04 */	stw r0, 4(r1)
/* 800AAB24 000A7A64  94 21 FF E0 */	stwu r1, -0x20(r1)
/* 800AAB28 000A7A68  93 E1 00 1C */	stw r31, 0x1c(r1)
/* 800AAB2C 000A7A6C  93 C1 00 18 */	stw r30, 0x18(r1)
/* 800AAB30 000A7A70  7C 7E 1B 78 */	mr r30, r3
/* 800AAB34 000A7A74  38 64 00 00 */	addi r3, r4, 0
/* 800AAB38 000A7A78  80 AD 82 C8 */	lwz r5, gx@sda21(r13)
/* 800AAB3C 000A7A7C  81 85 04 14 */	lwz r12, 0x414(r5)
/* 800AAB40 000A7A80  7D 88 03 A6 */	mtlr r12
/* 800AAB44 000A7A84  4E 80 00 21 */	blrl 
/* 800AAB48 000A7A88  7C 7F 1B 78 */	mr r31, r3
/* 800AAB4C 000A7A8C  48 00 0E 99 */	bl __GXFlushTextureState
/* 800AAB50 000A7A90  38 80 00 61 */	li r4, 0x61
/* 800AAB54 000A7A94  3C 60 CC 01 */	lis r3, 0xCC008000@ha
/* 800AAB58 000A7A98  98 83 80 00 */	stb r4, 0xCC008000@l(r3)
/* 800AAB5C 000A7A9C  80 1E 00 04 */	lwz r0, 4(r30)
/* 800AAB60 000A7AA0  90 03 80 00 */	stw r0, -0x8000(r3)
/* 800AAB64 000A7AA4  98 83 80 00 */	stb r4, -0x8000(r3)
/* 800AAB68 000A7AA8  80 1F 00 00 */	lwz r0, 0(r31)
/* 800AAB6C 000A7AAC  90 03 80 00 */	stw r0, -0x8000(r3)
/* 800AAB70 000A7AB0  48 00 0E 75 */	bl __GXFlushTextureState
/* 800AAB74 000A7AB4  80 1F 00 00 */	lwz r0, 0(r31)
/* 800AAB78 000A7AB8  80 7E 00 00 */	lwz r3, 0(r30)
/* 800AAB7C 000A7ABC  54 00 05 BE */	clrlwi r0, r0, 0x16
/* 800AAB80 000A7AC0  50 60 00 2A */	rlwimi r0, r3, 0, 0, 0x15
/* 800AAB84 000A7AC4  90 1E 00 00 */	stw r0, 0(r30)
/* 800AAB88 000A7AC8  80 7E 00 00 */	lwz r3, 0(r30)
/* 800AAB8C 000A7ACC  80 1E 00 04 */	lwz r0, 4(r30)
/* 800AAB90 000A7AD0  90 7F 00 04 */	stw r3, 4(r31)
/* 800AAB94 000A7AD4  90 1F 00 08 */	stw r0, 8(r31)
/* 800AAB98 000A7AD8  80 1E 00 08 */	lwz r0, 8(r30)
/* 800AAB9C 000A7ADC  90 1F 00 0C */	stw r0, 0xc(r31)
/* 800AABA0 000A7AE0  80 01 00 24 */	lwz r0, 0x24(r1)
/* 800AABA4 000A7AE4  83 E1 00 1C */	lwz r31, 0x1c(r1)
/* 800AABA8 000A7AE8  83 C1 00 18 */	lwz r30, 0x18(r1)
/* 800AABAC 000A7AEC  38 21 00 20 */	addi r1, r1, 0x20
/* 800AABB0 000A7AF0  7C 08 03 A6 */	mtlr r0
/* 800AABB4 000A7AF4  4E 80 00 20 */	blr 

.global GXInitTexCacheRegion
GXInitTexCacheRegion:
/* 800AABB8 000A7AF8  2C 06 00 01 */	cmpwi r6, 1
/* 800AABBC 000A7AFC  41 82 00 28 */	beq lbl_800AABE4
/* 800AABC0 000A7B00  40 80 00 10 */	bge lbl_800AABD0
/* 800AABC4 000A7B04  2C 06 00 00 */	cmpwi r6, 0
/* 800AABC8 000A7B08  40 80 00 14 */	bge lbl_800AABDC
/* 800AABCC 000A7B0C  48 00 00 24 */	b lbl_800AABF0
lbl_800AABD0:
/* 800AABD0 000A7B10  2C 06 00 03 */	cmpwi r6, 3
/* 800AABD4 000A7B14  40 80 00 1C */	bge lbl_800AABF0
/* 800AABD8 000A7B18  48 00 00 14 */	b lbl_800AABEC
lbl_800AABDC:
/* 800AABDC 000A7B1C  39 40 00 03 */	li r10, 3
/* 800AABE0 000A7B20  48 00 00 10 */	b lbl_800AABF0
lbl_800AABE4:
/* 800AABE4 000A7B24  39 40 00 04 */	li r10, 4
/* 800AABE8 000A7B28  48 00 00 08 */	b lbl_800AABF0
lbl_800AABEC:
/* 800AABEC 000A7B2C  39 40 00 05 */	li r10, 5
lbl_800AABF0:
/* 800AABF0 000A7B30  38 00 00 00 */	li r0, 0
/* 800AABF4 000A7B34  90 03 00 00 */	stw r0, 0(r3)
/* 800AABF8 000A7B38  54 A6 D9 7E */	srwi r6, r5, 5
/* 800AABFC 000A7B3C  55 45 78 20 */	slwi r5, r10, 0xf
/* 800AAC00 000A7B40  81 23 00 00 */	lwz r9, 0(r3)
/* 800AAC04 000A7B44  55 40 90 1A */	slwi r0, r10, 0x12
/* 800AAC08 000A7B48  2C 08 00 02 */	cmpwi r8, 2
/* 800AAC0C 000A7B4C  55 29 00 20 */	rlwinm r9, r9, 0, 0, 0x10
/* 800AAC10 000A7B50  7D 26 33 78 */	or r6, r9, r6
/* 800AAC14 000A7B54  90 C3 00 00 */	stw r6, 0(r3)
/* 800AAC18 000A7B58  80 C3 00 00 */	lwz r6, 0(r3)
/* 800AAC1C 000A7B5C  54 C6 04 5A */	rlwinm r6, r6, 0, 0x11, 0xd
/* 800AAC20 000A7B60  7C C5 2B 78 */	or r5, r6, r5
/* 800AAC24 000A7B64  90 A3 00 00 */	stw r5, 0(r3)
/* 800AAC28 000A7B68  80 A3 00 00 */	lwz r5, 0(r3)
/* 800AAC2C 000A7B6C  54 A5 03 94 */	rlwinm r5, r5, 0, 0xe, 0xa
/* 800AAC30 000A7B70  7C A0 03 78 */	or r0, r5, r0
/* 800AAC34 000A7B74  90 03 00 00 */	stw r0, 0(r3)
/* 800AAC38 000A7B78  80 03 00 00 */	lwz r0, 0(r3)
/* 800AAC3C 000A7B7C  54 00 02 D2 */	rlwinm r0, r0, 0, 0xb, 9
/* 800AAC40 000A7B80  90 03 00 00 */	stw r0, 0(r3)
/* 800AAC44 000A7B84  41 82 00 34 */	beq lbl_800AAC78
/* 800AAC48 000A7B88  40 80 00 14 */	bge lbl_800AAC5C
/* 800AAC4C 000A7B8C  2C 08 00 00 */	cmpwi r8, 0
/* 800AAC50 000A7B90  41 82 00 18 */	beq lbl_800AAC68
/* 800AAC54 000A7B94  40 80 00 1C */	bge lbl_800AAC70
/* 800AAC58 000A7B98  48 00 00 2C */	b lbl_800AAC84
lbl_800AAC5C:
/* 800AAC5C 000A7B9C  2C 08 00 04 */	cmpwi r8, 4
/* 800AAC60 000A7BA0  40 80 00 24 */	bge lbl_800AAC84
/* 800AAC64 000A7BA4  48 00 00 1C */	b lbl_800AAC80
lbl_800AAC68:
/* 800AAC68 000A7BA8  39 40 00 03 */	li r10, 3
/* 800AAC6C 000A7BAC  48 00 00 18 */	b lbl_800AAC84
lbl_800AAC70:
/* 800AAC70 000A7BB0  39 40 00 04 */	li r10, 4
/* 800AAC74 000A7BB4  48 00 00 10 */	b lbl_800AAC84
lbl_800AAC78:
/* 800AAC78 000A7BB8  39 40 00 05 */	li r10, 5
/* 800AAC7C 000A7BBC  48 00 00 08 */	b lbl_800AAC84
lbl_800AAC80:
/* 800AAC80 000A7BC0  39 40 00 00 */	li r10, 0
lbl_800AAC84:
/* 800AAC84 000A7BC4  38 00 00 00 */	li r0, 0
/* 800AAC88 000A7BC8  90 03 00 04 */	stw r0, 4(r3)
/* 800AAC8C 000A7BCC  54 E7 D9 7E */	srwi r7, r7, 5
/* 800AAC90 000A7BD0  55 46 78 20 */	slwi r6, r10, 0xf
/* 800AAC94 000A7BD4  81 03 00 04 */	lwz r8, 4(r3)
/* 800AAC98 000A7BD8  55 45 90 1A */	slwi r5, r10, 0x12
/* 800AAC9C 000A7BDC  38 00 00 01 */	li r0, 1
/* 800AACA0 000A7BE0  55 08 00 20 */	rlwinm r8, r8, 0, 0, 0x10
/* 800AACA4 000A7BE4  7D 07 3B 78 */	or r7, r8, r7
/* 800AACA8 000A7BE8  90 E3 00 04 */	stw r7, 4(r3)
/* 800AACAC 000A7BEC  80 E3 00 04 */	lwz r7, 4(r3)
/* 800AACB0 000A7BF0  54 E7 04 5A */	rlwinm r7, r7, 0, 0x11, 0xd
/* 800AACB4 000A7BF4  7C E6 33 78 */	or r6, r7, r6
/* 800AACB8 000A7BF8  90 C3 00 04 */	stw r6, 4(r3)
/* 800AACBC 000A7BFC  80 C3 00 04 */	lwz r6, 4(r3)
/* 800AACC0 000A7C00  54 C6 03 94 */	rlwinm r6, r6, 0, 0xe, 0xa
/* 800AACC4 000A7C04  7C C5 2B 78 */	or r5, r6, r5
/* 800AACC8 000A7C08  90 A3 00 04 */	stw r5, 4(r3)
/* 800AACCC 000A7C0C  98 83 00 0C */	stb r4, 0xc(r3)
/* 800AACD0 000A7C10  98 03 00 0D */	stb r0, 0xd(r3)
/* 800AACD4 000A7C14  4E 80 00 20 */	blr 

.global GXInitTlutRegion
GXInitTlutRegion:
/* 800AACD8 000A7C18  38 00 00 00 */	li r0, 0
/* 800AACDC 000A7C1C  90 03 00 00 */	stw r0, 0(r3)
/* 800AACE0 000A7C20  3C 04 FF F8 */	addis r0, r4, 0xfff8
/* 800AACE4 000A7C24  54 04 BA 7E */	srwi r4, r0, 9
/* 800AACE8 000A7C28  80 C3 00 00 */	lwz r6, 0(r3)
/* 800AACEC 000A7C2C  54 A0 50 2A */	slwi r0, r5, 0xa
/* 800AACF0 000A7C30  54 C5 00 2A */	rlwinm r5, r6, 0, 0, 0x15
/* 800AACF4 000A7C34  7C A4 23 78 */	or r4, r5, r4
/* 800AACF8 000A7C38  90 83 00 00 */	stw r4, 0(r3)
/* 800AACFC 000A7C3C  80 83 00 00 */	lwz r4, 0(r3)
/* 800AAD00 000A7C40  54 84 05 94 */	rlwinm r4, r4, 0, 0x16, 0xa
/* 800AAD04 000A7C44  7C 80 03 78 */	or r0, r4, r0
/* 800AAD08 000A7C48  90 03 00 00 */	stw r0, 0(r3)
/* 800AAD0C 000A7C4C  80 03 00 00 */	lwz r0, 0(r3)
/* 800AAD10 000A7C50  54 00 02 3E */	clrlwi r0, r0, 8
/* 800AAD14 000A7C54  64 00 65 00 */	oris r0, r0, 0x6500
/* 800AAD18 000A7C58  90 03 00 00 */	stw r0, 0(r3)
/* 800AAD1C 000A7C5C  4E 80 00 20 */	blr 

.global GXInvalidateTexAll
GXInvalidateTexAll:
/* 800AAD20 000A7C60  7C 08 02 A6 */	mflr r0
/* 800AAD24 000A7C64  90 01 00 04 */	stw r0, 4(r1)
/* 800AAD28 000A7C68  94 21 FF F8 */	stwu r1, -8(r1)
/* 800AAD2C 000A7C6C  48 00 0C B9 */	bl __GXFlushTextureState
/* 800AAD30 000A7C70  38 C0 00 61 */	li r6, 0x61
/* 800AAD34 000A7C74  3C 60 66 00 */	lis r3, 0x66001000@ha
/* 800AAD38 000A7C78  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800AAD3C 000A7C7C  98 C5 80 00 */	stb r6, 0xCC008000@l(r5)
/* 800AAD40 000A7C80  38 83 10 00 */	addi r4, r3, 0x66001000@l
/* 800AAD44 000A7C84  38 03 11 00 */	addi r0, r3, 0x1100
/* 800AAD48 000A7C88  90 85 80 00 */	stw r4, -0x8000(r5)
/* 800AAD4C 000A7C8C  98 C5 80 00 */	stb r6, -0x8000(r5)
/* 800AAD50 000A7C90  90 05 80 00 */	stw r0, -0x8000(r5)
/* 800AAD54 000A7C94  48 00 0C 91 */	bl __GXFlushTextureState
/* 800AAD58 000A7C98  80 01 00 0C */	lwz r0, 0xc(r1)
/* 800AAD5C 000A7C9C  38 21 00 08 */	addi r1, r1, 8
/* 800AAD60 000A7CA0  7C 08 03 A6 */	mtlr r0
/* 800AAD64 000A7CA4  4E 80 00 20 */	blr 

.global GXSetTexRegionCallback
GXSetTexRegionCallback:
/* 800AAD68 000A7CA8  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AAD6C 000A7CAC  84 04 04 10 */	lwzu r0, 0x410(r4)
/* 800AAD70 000A7CB0  90 64 00 00 */	stw r3, 0(r4)
/* 800AAD74 000A7CB4  7C 03 03 78 */	mr r3, r0
/* 800AAD78 000A7CB8  4E 80 00 20 */	blr 

.global GXSetTlutRegionCallback
GXSetTlutRegionCallback:
/* 800AAD7C 000A7CBC  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AAD80 000A7CC0  84 04 04 14 */	lwzu r0, 0x414(r4)
/* 800AAD84 000A7CC4  90 64 00 00 */	stw r3, 0(r4)
/* 800AAD88 000A7CC8  7C 03 03 78 */	mr r3, r0
/* 800AAD8C 000A7CCC  4E 80 00 20 */	blr 

.global GXSetTexCoordScaleManually
GXSetTexCoordScaleManually:
/* 800AAD90 000A7CD0  80 ED 82 C8 */	lwz r7, gx@sda21(r13)
/* 800AAD94 000A7CD4  38 00 00 01 */	li r0, 1
/* 800AAD98 000A7CD8  54 84 06 3F */	clrlwi. r4, r4, 0x18
/* 800AAD9C 000A7CDC  39 07 04 DC */	addi r8, r7, 0x4dc
/* 800AADA0 000A7CE0  80 E7 04 DC */	lwz r7, 0x4dc(r7)
/* 800AADA4 000A7CE4  7C 00 18 30 */	slw r0, r0, r3
/* 800AADA8 000A7CE8  7C E7 00 78 */	andc r7, r7, r0
/* 800AADAC 000A7CEC  7C 80 18 30 */	slw r0, r4, r3
/* 800AADB0 000A7CF0  7C E0 03 78 */	or r0, r7, r0
/* 800AADB4 000A7CF4  90 08 00 00 */	stw r0, 0(r8)
/* 800AADB8 000A7CF8  4D 82 00 20 */	beqlr 
/* 800AADBC 000A7CFC  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AADC0 000A7D00  54 68 10 3A */	slwi r8, r3, 2
/* 800AADC4 000A7D04  38 05 FF FF */	addi r0, r5, -1
/* 800AADC8 000A7D08  7C A4 42 14 */	add r5, r4, r8
/* 800AADCC 000A7D0C  80 85 00 B8 */	lwz r4, 0xb8(r5)
/* 800AADD0 000A7D10  38 66 FF FF */	addi r3, r6, -1
/* 800AADD4 000A7D14  38 E0 00 61 */	li r7, 0x61
/* 800AADD8 000A7D18  54 84 00 1E */	rlwinm r4, r4, 0, 0, 0xf
/* 800AADDC 000A7D1C  50 04 04 3E */	rlwimi r4, r0, 0, 0x10, 0x1f
/* 800AADE0 000A7D20  90 85 00 B8 */	stw r4, 0xb8(r5)
/* 800AADE4 000A7D24  3C C0 CC 01 */	lis r6, 0xCC008000@ha
/* 800AADE8 000A7D28  38 00 00 00 */	li r0, 0
/* 800AADEC 000A7D2C  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AADF0 000A7D30  7C A4 42 14 */	add r5, r4, r8
/* 800AADF4 000A7D34  80 85 00 D8 */	lwz r4, 0xd8(r5)
/* 800AADF8 000A7D38  54 84 00 1E */	rlwinm r4, r4, 0, 0, 0xf
/* 800AADFC 000A7D3C  50 64 04 3E */	rlwimi r4, r3, 0, 0x10, 0x1f
/* 800AAE00 000A7D40  90 85 00 D8 */	stw r4, 0xd8(r5)
/* 800AAE04 000A7D44  80 AD 82 C8 */	lwz r5, gx@sda21(r13)
/* 800AAE08 000A7D48  98 E6 80 00 */	stb r7, 0xCC008000@l(r6)
/* 800AAE0C 000A7D4C  7C 85 42 14 */	add r4, r5, r8
/* 800AAE10 000A7D50  80 64 00 B8 */	lwz r3, 0xb8(r4)
/* 800AAE14 000A7D54  90 66 80 00 */	stw r3, -0x8000(r6)
/* 800AAE18 000A7D58  98 E6 80 00 */	stb r7, -0x8000(r6)
/* 800AAE1C 000A7D5C  80 64 00 D8 */	lwz r3, 0xd8(r4)
/* 800AAE20 000A7D60  90 66 80 00 */	stw r3, -0x8000(r6)
/* 800AAE24 000A7D64  B0 05 00 02 */	sth r0, 2(r5)
/* 800AAE28 000A7D68  4E 80 00 20 */	blr 

.global GXSetTexCoordCylWrap
GXSetTexCoordCylWrap:
/* 800AAE2C 000A7D6C  80 0D 82 C8 */	lwz r0, gx@sda21(r13)
/* 800AAE30 000A7D70  54 68 10 3A */	slwi r8, r3, 2
/* 800AAE34 000A7D74  54 84 89 DC */	rlwinm r4, r4, 0x11, 7, 0xe
/* 800AAE38 000A7D78  7C E0 42 14 */	add r7, r0, r8
/* 800AAE3C 000A7D7C  80 C7 00 B8 */	lwz r6, 0xb8(r7)
/* 800AAE40 000A7D80  38 00 00 01 */	li r0, 1
/* 800AAE44 000A7D84  7C 00 18 30 */	slw r0, r0, r3
/* 800AAE48 000A7D88  54 C6 03 DA */	rlwinm r6, r6, 0, 0xf, 0xd
/* 800AAE4C 000A7D8C  7C C4 23 78 */	or r4, r6, r4
/* 800AAE50 000A7D90  90 87 00 B8 */	stw r4, 0xb8(r7)
/* 800AAE54 000A7D94  54 A4 89 DC */	rlwinm r4, r5, 0x11, 7, 0xe
/* 800AAE58 000A7D98  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AAE5C 000A7D9C  7C A3 42 14 */	add r5, r3, r8
/* 800AAE60 000A7DA0  80 65 00 D8 */	lwz r3, 0xd8(r5)
/* 800AAE64 000A7DA4  54 63 03 DA */	rlwinm r3, r3, 0, 0xf, 0xd
/* 800AAE68 000A7DA8  7C 63 23 78 */	or r3, r3, r4
/* 800AAE6C 000A7DAC  90 65 00 D8 */	stw r3, 0xd8(r5)
/* 800AAE70 000A7DB0  80 ED 82 C8 */	lwz r7, gx@sda21(r13)
/* 800AAE74 000A7DB4  80 67 04 DC */	lwz r3, 0x4dc(r7)
/* 800AAE78 000A7DB8  7C 60 00 39 */	and. r0, r3, r0
/* 800AAE7C 000A7DBC  4D 82 00 20 */	beqlr 
/* 800AAE80 000A7DC0  38 C0 00 61 */	li r6, 0x61
/* 800AAE84 000A7DC4  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800AAE88 000A7DC8  98 C5 80 00 */	stb r6, 0xCC008000@l(r5)
/* 800AAE8C 000A7DCC  7C 87 42 14 */	add r4, r7, r8
/* 800AAE90 000A7DD0  38 00 00 00 */	li r0, 0
/* 800AAE94 000A7DD4  80 64 00 B8 */	lwz r3, 0xb8(r4)
/* 800AAE98 000A7DD8  90 65 80 00 */	stw r3, -0x8000(r5)
/* 800AAE9C 000A7DDC  98 C5 80 00 */	stb r6, -0x8000(r5)
/* 800AAEA0 000A7DE0  80 64 00 D8 */	lwz r3, 0xd8(r4)
/* 800AAEA4 000A7DE4  90 65 80 00 */	stw r3, -0x8000(r5)
/* 800AAEA8 000A7DE8  B0 07 00 02 */	sth r0, 2(r7)
/* 800AAEAC 000A7DEC  4E 80 00 20 */	blr 

.global __SetSURegs
__SetSURegs:
/* 800AAEB0 000A7DF0  80 AD 82 C8 */	lwz r5, gx@sda21(r13)
/* 800AAEB4 000A7DF4  54 80 10 3A */	slwi r0, r4, 2
/* 800AAEB8 000A7DF8  54 69 10 3A */	slwi r9, r3, 2
/* 800AAEBC 000A7DFC  7C 85 02 14 */	add r4, r5, r0
/* 800AAEC0 000A7E00  7C 65 4A 14 */	add r3, r5, r9
/* 800AAEC4 000A7E04  80 A3 04 5C */	lwz r5, 0x45c(r3)
/* 800AAEC8 000A7E08  38 E0 00 61 */	li r7, 0x61
/* 800AAECC 000A7E0C  80 64 00 B8 */	lwz r3, 0xb8(r4)
/* 800AAED0 000A7E10  3C C0 CC 01 */	lis r6, 0xCC008000@ha
/* 800AAED4 000A7E14  54 63 00 1E */	rlwinm r3, r3, 0, 0, 0xf
/* 800AAED8 000A7E18  50 A3 05 BE */	rlwimi r3, r5, 0, 0x16, 0x1f
/* 800AAEDC 000A7E1C  90 64 00 B8 */	stw r3, 0xb8(r4)
/* 800AAEE0 000A7E20  38 60 00 00 */	li r3, 0
/* 800AAEE4 000A7E24  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800AAEE8 000A7E28  7D 04 02 14 */	add r8, r4, r0
/* 800AAEEC 000A7E2C  80 88 00 D8 */	lwz r4, 0xd8(r8)
/* 800AAEF0 000A7E30  54 84 00 1E */	rlwinm r4, r4, 0, 0, 0xf
/* 800AAEF4 000A7E34  50 A4 B5 BE */	rlwimi r4, r5, 0x16, 0x16, 0x1f
/* 800AAEF8 000A7E38  90 88 00 D8 */	stw r4, 0xd8(r8)
/* 800AAEFC 000A7E3C  80 AD 82 C8 */	lwz r5, gx@sda21(r13)
/* 800AAF00 000A7E40  7C 85 4A 14 */	add r4, r5, r9
/* 800AAF04 000A7E44  81 24 04 7C */	lwz r9, 0x47c(r4)
/* 800AAF08 000A7E48  7D 45 02 14 */	add r10, r5, r0
/* 800AAF0C 000A7E4C  80 AA 00 B8 */	lwz r5, 0xb8(r10)
/* 800AAF10 000A7E50  55 24 F7 BE */	rlwinm r4, r9, 0x1e, 0x1e, 0x1f
/* 800AAF14 000A7E54  21 04 00 01 */	subfic r8, r4, 1
/* 800AAF18 000A7E58  55 24 07 BE */	clrlwi r4, r9, 0x1e
/* 800AAF1C 000A7E5C  20 84 00 01 */	subfic r4, r4, 1
/* 800AAF20 000A7E60  7C 84 00 34 */	cntlzw r4, r4
/* 800AAF24 000A7E64  54 A5 04 1C */	rlwinm r5, r5, 0, 0x10, 0xe
/* 800AAF28 000A7E68  54 84 5A 1E */	rlwinm r4, r4, 0xb, 8, 0xf
/* 800AAF2C 000A7E6C  7C A4 23 78 */	or r4, r5, r4
/* 800AAF30 000A7E70  90 8A 00 B8 */	stw r4, 0xb8(r10)
/* 800AAF34 000A7E74  7D 04 00 34 */	cntlzw r4, r8
/* 800AAF38 000A7E78  54 84 5A 1E */	rlwinm r4, r4, 0xb, 8, 0xf
/* 800AAF3C 000A7E7C  80 AD 82 C8 */	lwz r5, gx@sda21(r13)
/* 800AAF40 000A7E80  7D 05 02 14 */	add r8, r5, r0
/* 800AAF44 000A7E84  80 A8 00 D8 */	lwz r5, 0xd8(r8)
/* 800AAF48 000A7E88  54 A5 04 1C */	rlwinm r5, r5, 0, 0x10, 0xe
/* 800AAF4C 000A7E8C  7C A4 23 78 */	or r4, r5, r4
/* 800AAF50 000A7E90  90 88 00 D8 */	stw r4, 0xd8(r8)
/* 800AAF54 000A7E94  80 AD 82 C8 */	lwz r5, gx@sda21(r13)
/* 800AAF58 000A7E98  98 E6 80 00 */	stb r7, 0xCC008000@l(r6)
/* 800AAF5C 000A7E9C  7C 85 02 14 */	add r4, r5, r0
/* 800AAF60 000A7EA0  80 04 00 B8 */	lwz r0, 0xb8(r4)
/* 800AAF64 000A7EA4  90 06 80 00 */	stw r0, -0x8000(r6)
/* 800AAF68 000A7EA8  98 E6 80 00 */	stb r7, -0x8000(r6)
/* 800AAF6C 000A7EAC  80 04 00 D8 */	lwz r0, 0xd8(r4)
/* 800AAF70 000A7EB0  90 06 80 00 */	stw r0, -0x8000(r6)
/* 800AAF74 000A7EB4  B0 65 00 02 */	sth r3, 2(r5)
/* 800AAF78 000A7EB8  4E 80 00 20 */	blr 

.global __GXSetSUTexRegs
__GXSetSUTexRegs:
/* 800AAF7C 000A7EBC  7C 08 02 A6 */	mflr r0
/* 800AAF80 000A7EC0  90 01 00 04 */	stw r0, 4(r1)
/* 800AAF84 000A7EC4  94 21 FF D8 */	stwu r1, -0x28(r1)
/* 800AAF88 000A7EC8  BF 61 00 14 */	stmw r27, 0x14(r1)
/* 800AAF8C 000A7ECC  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AAF90 000A7ED0  80 03 04 DC */	lwz r0, 0x4dc(r3)
/* 800AAF94 000A7ED4  28 00 00 FF */	cmplwi r0, 0xff
/* 800AAF98 000A7ED8  41 82 01 4C */	beq lbl_800AB0E4
/* 800AAF9C 000A7EDC  80 03 02 04 */	lwz r0, 0x204(r3)
/* 800AAFA0 000A7EE0  3B E0 00 00 */	li r31, 0
/* 800AAFA4 000A7EE4  54 03 B7 3E */	rlwinm r3, r0, 0x16, 0x1c, 0x1f
/* 800AAFA8 000A7EE8  3B C3 00 01 */	addi r30, r3, 1
/* 800AAFAC 000A7EEC  54 1B 87 7E */	rlwinm r27, r0, 0x10, 0x1d, 0x1f
/* 800AAFB0 000A7EF0  48 00 00 A0 */	b lbl_800AB050
lbl_800AAFB4:
/* 800AAFB4 000A7EF4  2C 1F 00 02 */	cmpwi r31, 2
/* 800AAFB8 000A7EF8  41 82 00 4C */	beq lbl_800AB004
/* 800AAFBC 000A7EFC  40 80 00 14 */	bge lbl_800AAFD0
/* 800AAFC0 000A7F00  2C 1F 00 00 */	cmpwi r31, 0
/* 800AAFC4 000A7F04  41 82 00 18 */	beq lbl_800AAFDC
/* 800AAFC8 000A7F08  40 80 00 28 */	bge lbl_800AAFF0
/* 800AAFCC 000A7F0C  48 00 00 5C */	b lbl_800AB028
lbl_800AAFD0:
/* 800AAFD0 000A7F10  2C 1F 00 04 */	cmpwi r31, 4
/* 800AAFD4 000A7F14  40 80 00 54 */	bge lbl_800AB028
/* 800AAFD8 000A7F18  48 00 00 40 */	b lbl_800AB018
lbl_800AAFDC:
/* 800AAFDC 000A7F1C  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AAFE0 000A7F20  80 03 01 20 */	lwz r0, 0x120(r3)
/* 800AAFE4 000A7F24  54 1D 07 7E */	clrlwi r29, r0, 0x1d
/* 800AAFE8 000A7F28  54 1C EF 7E */	rlwinm r28, r0, 0x1d, 0x1d, 0x1f
/* 800AAFEC 000A7F2C  48 00 00 3C */	b lbl_800AB028
lbl_800AAFF0:
/* 800AAFF0 000A7F30  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AAFF4 000A7F34  80 03 01 20 */	lwz r0, 0x120(r3)
/* 800AAFF8 000A7F38  54 1D D7 7E */	rlwinm r29, r0, 0x1a, 0x1d, 0x1f
/* 800AAFFC 000A7F3C  54 1C BF 7E */	rlwinm r28, r0, 0x17, 0x1d, 0x1f
/* 800AB000 000A7F40  48 00 00 28 */	b lbl_800AB028
lbl_800AB004:
/* 800AB004 000A7F44  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AB008 000A7F48  80 03 01 20 */	lwz r0, 0x120(r3)
/* 800AB00C 000A7F4C  54 1D A7 7E */	rlwinm r29, r0, 0x14, 0x1d, 0x1f
/* 800AB010 000A7F50  54 1C 8F 7E */	rlwinm r28, r0, 0x11, 0x1d, 0x1f
/* 800AB014 000A7F54  48 00 00 14 */	b lbl_800AB028
lbl_800AB018:
/* 800AB018 000A7F58  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AB01C 000A7F5C  80 03 01 20 */	lwz r0, 0x120(r3)
/* 800AB020 000A7F60  54 1D 77 7E */	rlwinm r29, r0, 0xe, 0x1d, 0x1f
/* 800AB024 000A7F64  54 1C 5F 7E */	rlwinm r28, r0, 0xb, 0x1d, 0x1f
lbl_800AB028:
/* 800AB028 000A7F68  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800AB02C 000A7F6C  38 00 00 01 */	li r0, 1
/* 800AB030 000A7F70  7C 00 E0 30 */	slw r0, r0, r28
/* 800AB034 000A7F74  80 63 04 DC */	lwz r3, 0x4dc(r3)
/* 800AB038 000A7F78  7C 60 00 39 */	and. r0, r3, r0
/* 800AB03C 000A7F7C  40 82 00 10 */	bne lbl_800AB04C
/* 800AB040 000A7F80  38 7D 00 00 */	addi r3, r29, 0
/* 800AB044 000A7F84  38 9C 00 00 */	addi r4, r28, 0
/* 800AB048 000A7F88  4B FF FE 69 */	bl __SetSURegs
lbl_800AB04C:
/* 800AB04C 000A7F8C  3B FF 00 01 */	addi r31, r31, 1
lbl_800AB050:
/* 800AB050 000A7F90  7C 1F D8 40 */	cmplw r31, r27
/* 800AB054 000A7F94  41 80 FF 60 */	blt lbl_800AAFB4
/* 800AB058 000A7F98  3B E0 00 00 */	li r31, 0
/* 800AB05C 000A7F9C  3B 7F 00 00 */	addi r27, r31, 0
/* 800AB060 000A7FA0  48 00 00 7C */	b lbl_800AB0DC
lbl_800AB064:
/* 800AB064 000A7FA4  80 AD 82 C8 */	lwz r5, gx@sda21(r13)
/* 800AB068 000A7FA8  38 7B 04 9C */	addi r3, r27, 0x49c
/* 800AB06C 000A7FAC  57 E4 08 3A */	rlwinm r4, r31, 1, 0, 0x1d
/* 800AB070 000A7FB0  7C 65 18 2E */	lwzx r3, r5, r3
/* 800AB074 000A7FB4  57 E0 07 FF */	clrlwi. r0, r31, 0x1f
/* 800AB078 000A7FB8  38 84 01 00 */	addi r4, r4, 0x100
/* 800AB07C 000A7FBC  7C 85 22 14 */	add r4, r5, r4
/* 800AB080 000A7FC0  54 7D 06 2C */	rlwinm r29, r3, 0, 0x18, 0x16
/* 800AB084 000A7FC4  41 82 00 10 */	beq lbl_800AB094
/* 800AB088 000A7FC8  80 04 00 00 */	lwz r0, 0(r4)
/* 800AB08C 000A7FCC  54 1C 8F 7E */	rlwinm r28, r0, 0x11, 0x1d, 0x1f
/* 800AB090 000A7FD0  48 00 00 0C */	b lbl_800AB09C
lbl_800AB094:
/* 800AB094 000A7FD4  80 04 00 00 */	lwz r0, 0(r4)
/* 800AB098 000A7FD8  54 1C EF 7E */	rlwinm r28, r0, 0x1d, 0x1d, 0x1f
lbl_800AB09C:
/* 800AB09C 000A7FDC  28 1D 00 FF */	cmplwi r29, 0xff
/* 800AB0A0 000A7FE0  41 82 00 34 */	beq lbl_800AB0D4
/* 800AB0A4 000A7FE4  38 80 00 01 */	li r4, 1
/* 800AB0A8 000A7FE8  80 65 04 DC */	lwz r3, 0x4dc(r5)
/* 800AB0AC 000A7FEC  7C 80 E0 30 */	slw r0, r4, r28
/* 800AB0B0 000A7FF0  7C 60 00 39 */	and. r0, r3, r0
/* 800AB0B4 000A7FF4  40 82 00 20 */	bne lbl_800AB0D4
/* 800AB0B8 000A7FF8  80 65 04 E0 */	lwz r3, 0x4e0(r5)
/* 800AB0BC 000A7FFC  7C 80 F8 30 */	slw r0, r4, r31
/* 800AB0C0 000A8000  7C 60 00 39 */	and. r0, r3, r0
/* 800AB0C4 000A8004  41 82 00 10 */	beq lbl_800AB0D4
/* 800AB0C8 000A8008  38 7D 00 00 */	addi r3, r29, 0
/* 800AB0CC 000A800C  38 9C 00 00 */	addi r4, r28, 0
/* 800AB0D0 000A8010  4B FF FD E1 */	bl __SetSURegs
lbl_800AB0D4:
/* 800AB0D4 000A8014  3B 7B 00 04 */	addi r27, r27, 4
/* 800AB0D8 000A8018  3B FF 00 01 */	addi r31, r31, 1
lbl_800AB0DC:
/* 800AB0DC 000A801C  7C 1F F0 40 */	cmplw r31, r30
/* 800AB0E0 000A8020  41 80 FF 84 */	blt lbl_800AB064
lbl_800AB0E4:
/* 800AB0E4 000A8024  BB 61 00 14 */	lmw r27, 0x14(r1)
/* 800AB0E8 000A8028  80 01 00 2C */	lwz r0, 0x2c(r1)
/* 800AB0EC 000A802C  38 21 00 28 */	addi r1, r1, 0x28
/* 800AB0F0 000A8030  7C 08 03 A6 */	mtlr r0
/* 800AB0F4 000A8034  4E 80 00 20 */	blr 

.global __GXSetTmemConfig
__GXSetTmemConfig:
/* 800AB0F8 000A8038  94 21 FF E8 */	stwu r1, -0x18(r1)
/* 800AB0FC 000A803C  2C 03 00 01 */	cmpwi r3, 1
/* 800AB100 000A8040  93 E1 00 14 */	stw r31, 0x14(r1)
/* 800AB104 000A8044  93 C1 00 10 */	stw r30, 0x10(r1)
/* 800AB108 000A8048  41 82 00 0C */	beq lbl_800AB114
/* 800AB10C 000A804C  40 80 01 14 */	bge lbl_800AB220
/* 800AB110 000A8050  48 00 01 10 */	b lbl_800AB220
lbl_800AB114:
/* 800AB114 000A8054  38 00 00 61 */	li r0, 0x61
/* 800AB118 000A8058  3C 60 CC 01 */	lis r3, 0xCC008000@ha
/* 800AB11C 000A805C  3C 80 8C 0E */	lis r4, 0x8C0D8000@ha
/* 800AB120 000A8060  98 03 80 00 */	stb r0, 0xCC008000@l(r3)
/* 800AB124 000A8064  38 84 80 00 */	addi r4, r4, 0x8C0D8000@l
/* 800AB128 000A8068  90 83 80 00 */	stw r4, -0x8000(r3)
/* 800AB12C 000A806C  3C 80 90 0E */	lis r4, 0x900DC000@ha
/* 800AB130 000A8070  3C E0 8D 0E */	lis r7, 0x8D0D8800@ha
/* 800AB134 000A8074  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB138 000A8078  38 84 C0 00 */	addi r4, r4, 0x900DC000@l
/* 800AB13C 000A807C  3C C0 91 0E */	lis r6, 0x910DC800@ha
/* 800AB140 000A8080  90 83 80 00 */	stw r4, -0x8000(r3)
/* 800AB144 000A8084  3C A0 8E 0E */	lis r5, 0x8E0D9000@ha
/* 800AB148 000A8088  3C 80 92 0E */	lis r4, 0x920DD000@ha
/* 800AB14C 000A808C  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB150 000A8090  38 E7 88 00 */	addi r7, r7, 0x8D0D8800@l
/* 800AB154 000A8094  3F C0 8F 0E */	lis r30, 0x8F0D9800@ha
/* 800AB158 000A8098  90 E3 80 00 */	stw r7, -0x8000(r3)
/* 800AB15C 000A809C  3D 80 93 0E */	lis r12, 0x930DD800@ha
/* 800AB160 000A80A0  3D 60 AC 0E */	lis r11, 0xAC0DA000@ha
/* 800AB164 000A80A4  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB168 000A80A8  38 C6 C8 00 */	addi r6, r6, 0x910DC800@l
/* 800AB16C 000A80AC  3D 40 B0 0E */	lis r10, 0xB00DE000@ha
/* 800AB170 000A80B0  90 C3 80 00 */	stw r6, -0x8000(r3)
/* 800AB174 000A80B4  3D 20 AD 0E */	lis r9, 0xAD0DA800@ha
/* 800AB178 000A80B8  3D 00 B1 0E */	lis r8, 0xB10DE800@ha
/* 800AB17C 000A80BC  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB180 000A80C0  38 A5 90 00 */	addi r5, r5, 0x8E0D9000@l
/* 800AB184 000A80C4  3C E0 AE 0E */	lis r7, 0xAE0DB000@ha
/* 800AB188 000A80C8  90 A3 80 00 */	stw r5, -0x8000(r3)
/* 800AB18C 000A80CC  3C C0 B2 0E */	lis r6, 0xB20DF000@ha
/* 800AB190 000A80D0  3C A0 AF 0E */	lis r5, 0xAF0DB800@ha
/* 800AB194 000A80D4  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB198 000A80D8  3B E4 D0 00 */	addi r31, r4, 0x920DD000@l
/* 800AB19C 000A80DC  3C 80 B3 0E */	lis r4, 0xB30DF800@ha
/* 800AB1A0 000A80E0  93 E3 80 00 */	stw r31, -0x8000(r3)
/* 800AB1A4 000A80E4  3B DE 98 00 */	addi r30, r30, 0x8F0D9800@l
/* 800AB1A8 000A80E8  39 8C D8 00 */	addi r12, r12, 0x930DD800@l
/* 800AB1AC 000A80EC  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB1B0 000A80F0  39 6B A0 00 */	addi r11, r11, 0xAC0DA000@l
/* 800AB1B4 000A80F4  39 4A E0 00 */	addi r10, r10, 0xB00DE000@l
/* 800AB1B8 000A80F8  93 C3 80 00 */	stw r30, -0x8000(r3)
/* 800AB1BC 000A80FC  39 29 A8 00 */	addi r9, r9, 0xAD0DA800@l
/* 800AB1C0 000A8100  39 08 E8 00 */	addi r8, r8, 0xB10DE800@l
/* 800AB1C4 000A8104  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB1C8 000A8108  38 E7 B0 00 */	addi r7, r7, 0xAE0DB000@l
/* 800AB1CC 000A810C  38 C6 F0 00 */	addi r6, r6, 0xB20DF000@l
/* 800AB1D0 000A8110  91 83 80 00 */	stw r12, -0x8000(r3)
/* 800AB1D4 000A8114  38 A5 B8 00 */	addi r5, r5, 0xAF0DB800@l
/* 800AB1D8 000A8118  38 84 F8 00 */	addi r4, r4, 0xB30DF800@l
/* 800AB1DC 000A811C  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB1E0 000A8120  91 63 80 00 */	stw r11, -0x8000(r3)
/* 800AB1E4 000A8124  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB1E8 000A8128  91 43 80 00 */	stw r10, -0x8000(r3)
/* 800AB1EC 000A812C  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB1F0 000A8130  91 23 80 00 */	stw r9, -0x8000(r3)
/* 800AB1F4 000A8134  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB1F8 000A8138  91 03 80 00 */	stw r8, -0x8000(r3)
/* 800AB1FC 000A813C  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB200 000A8140  90 E3 80 00 */	stw r7, -0x8000(r3)
/* 800AB204 000A8144  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB208 000A8148  90 C3 80 00 */	stw r6, -0x8000(r3)
/* 800AB20C 000A814C  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB210 000A8150  90 A3 80 00 */	stw r5, -0x8000(r3)
/* 800AB214 000A8154  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB218 000A8158  90 83 80 00 */	stw r4, -0x8000(r3)
/* 800AB21C 000A815C  48 00 01 0C */	b lbl_800AB328
lbl_800AB220:
/* 800AB220 000A8160  38 00 00 61 */	li r0, 0x61
/* 800AB224 000A8164  3C 60 CC 01 */	lis r3, 0xCC008000@ha
/* 800AB228 000A8168  3C 80 8C 0E */	lis r4, 0x8C0D8000@ha
/* 800AB22C 000A816C  98 03 80 00 */	stb r0, 0xCC008000@l(r3)
/* 800AB230 000A8170  38 84 80 00 */	addi r4, r4, 0x8C0D8000@l
/* 800AB234 000A8174  90 83 80 00 */	stw r4, -0x8000(r3)
/* 800AB238 000A8178  3C 80 90 0E */	lis r4, 0x900DC000@ha
/* 800AB23C 000A817C  3C E0 8D 0E */	lis r7, 0x8D0D8400@ha
/* 800AB240 000A8180  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB244 000A8184  38 84 C0 00 */	addi r4, r4, 0x900DC000@l
/* 800AB248 000A8188  3C C0 91 0E */	lis r6, 0x910DC400@ha
/* 800AB24C 000A818C  90 83 80 00 */	stw r4, -0x8000(r3)
/* 800AB250 000A8190  3C A0 8E 0E */	lis r5, 0x8E0D8800@ha
/* 800AB254 000A8194  3C 80 92 0E */	lis r4, 0x920DC800@ha
/* 800AB258 000A8198  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB25C 000A819C  38 E7 84 00 */	addi r7, r7, 0x8D0D8400@l
/* 800AB260 000A81A0  3F E0 8F 0E */	lis r31, 0x8F0D8C00@ha
/* 800AB264 000A81A4  90 E3 80 00 */	stw r7, -0x8000(r3)
/* 800AB268 000A81A8  3D 80 93 0E */	lis r12, 0x930DCC00@ha
/* 800AB26C 000A81AC  3D 60 AC 0E */	lis r11, 0xAC0D9000@ha
/* 800AB270 000A81B0  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB274 000A81B4  38 C6 C4 00 */	addi r6, r6, 0x910DC400@l
/* 800AB278 000A81B8  3D 40 B0 0E */	lis r10, 0xB00DD000@ha
/* 800AB27C 000A81BC  90 C3 80 00 */	stw r6, -0x8000(r3)
/* 800AB280 000A81C0  3D 20 AD 0E */	lis r9, 0xAD0D9400@ha
/* 800AB284 000A81C4  3D 00 B1 0E */	lis r8, 0xB10DD400@ha
/* 800AB288 000A81C8  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB28C 000A81CC  38 A5 88 00 */	addi r5, r5, 0x8E0D8800@l
/* 800AB290 000A81D0  3C E0 AE 0E */	lis r7, 0xAE0D9800@ha
/* 800AB294 000A81D4  90 A3 80 00 */	stw r5, -0x8000(r3)
/* 800AB298 000A81D8  3C C0 B2 0E */	lis r6, 0xB20DD800@ha
/* 800AB29C 000A81DC  3C A0 AF 0E */	lis r5, 0xAF0D9C00@ha
/* 800AB2A0 000A81E0  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB2A4 000A81E4  3B C4 C8 00 */	addi r30, r4, 0x920DC800@l
/* 800AB2A8 000A81E8  3C 80 B3 0E */	lis r4, 0xB30DDC00@ha
/* 800AB2AC 000A81EC  93 C3 80 00 */	stw r30, -0x8000(r3)
/* 800AB2B0 000A81F0  3B FF 8C 00 */	addi r31, r31, 0x8F0D8C00@l
/* 800AB2B4 000A81F4  39 8C CC 00 */	addi r12, r12, 0x930DCC00@l
/* 800AB2B8 000A81F8  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB2BC 000A81FC  39 6B 90 00 */	addi r11, r11, 0xAC0D9000@l
/* 800AB2C0 000A8200  39 4A D0 00 */	addi r10, r10, 0xB00DD000@l
/* 800AB2C4 000A8204  93 E3 80 00 */	stw r31, -0x8000(r3)
/* 800AB2C8 000A8208  39 29 94 00 */	addi r9, r9, 0xAD0D9400@l
/* 800AB2CC 000A820C  39 08 D4 00 */	addi r8, r8, 0xB10DD400@l
/* 800AB2D0 000A8210  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB2D4 000A8214  38 E7 98 00 */	addi r7, r7, 0xAE0D9800@l
/* 800AB2D8 000A8218  38 C6 D8 00 */	addi r6, r6, 0xB20DD800@l
/* 800AB2DC 000A821C  91 83 80 00 */	stw r12, -0x8000(r3)
/* 800AB2E0 000A8220  38 A5 9C 00 */	addi r5, r5, 0xAF0D9C00@l
/* 800AB2E4 000A8224  38 84 DC 00 */	addi r4, r4, 0xB30DDC00@l
/* 800AB2E8 000A8228  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB2EC 000A822C  91 63 80 00 */	stw r11, -0x8000(r3)
/* 800AB2F0 000A8230  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB2F4 000A8234  91 43 80 00 */	stw r10, -0x8000(r3)
/* 800AB2F8 000A8238  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB2FC 000A823C  91 23 80 00 */	stw r9, -0x8000(r3)
/* 800AB300 000A8240  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB304 000A8244  91 03 80 00 */	stw r8, -0x8000(r3)
/* 800AB308 000A8248  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB30C 000A824C  90 E3 80 00 */	stw r7, -0x8000(r3)
/* 800AB310 000A8250  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB314 000A8254  90 C3 80 00 */	stw r6, -0x8000(r3)
/* 800AB318 000A8258  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB31C 000A825C  90 A3 80 00 */	stw r5, -0x8000(r3)
/* 800AB320 000A8260  98 03 80 00 */	stb r0, -0x8000(r3)
/* 800AB324 000A8264  90 83 80 00 */	stw r4, -0x8000(r3)
lbl_800AB328:
/* 800AB328 000A8268  83 E1 00 14 */	lwz r31, 0x14(r1)
/* 800AB32C 000A826C  83 C1 00 10 */	lwz r30, 0x10(r1)
/* 800AB330 000A8270  38 21 00 18 */	addi r1, r1, 0x18
/* 800AB334 000A8274  4E 80 00 20 */	blr 

.section .data, "wa"  # 0x803A8380 - 0x803E6000
"@92":
    .4byte lbl_800AA1FC
    .4byte lbl_800AA208
    .4byte lbl_800AA208
    .4byte lbl_800AA214
    .4byte lbl_800AA214
    .4byte lbl_800AA214
    .4byte lbl_800AA214
    .4byte lbl_800AA220
    .4byte lbl_800AA1FC
    .4byte lbl_800AA208
    .4byte lbl_800AA214
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA1FC
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA208
    .4byte lbl_800AA220
    .4byte lbl_800AA214
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA214
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA1FC
    .4byte lbl_800AA220
    .4byte lbl_800AA208
    .4byte lbl_800AA214
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA208
    .4byte lbl_800AA208
    .4byte lbl_800AA208
    .4byte lbl_800AA208
    .4byte lbl_800AA214
    .4byte lbl_800AA214
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA1FC
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA220
    .4byte lbl_800AA208
    .4byte lbl_800AA208
    .4byte lbl_800AA220
    .4byte lbl_800AA214
"@133":
    .4byte lbl_800AA350
    .4byte lbl_800AA35C
    .4byte lbl_800AA35C
    .4byte lbl_800AA368
    .4byte lbl_800AA368
    .4byte lbl_800AA368
    .4byte lbl_800AA368
    .4byte lbl_800AA374
    .4byte lbl_800AA350
    .4byte lbl_800AA35C
    .4byte lbl_800AA368
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA350
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA35C
    .4byte lbl_800AA374
    .4byte lbl_800AA368
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA368
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA350
    .4byte lbl_800AA374
    .4byte lbl_800AA35C
    .4byte lbl_800AA368
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA35C
    .4byte lbl_800AA35C
    .4byte lbl_800AA35C
    .4byte lbl_800AA35C
    .4byte lbl_800AA368
    .4byte lbl_800AA368
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA350
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA374
    .4byte lbl_800AA35C
    .4byte lbl_800AA35C
    .4byte lbl_800AA374
    .4byte lbl_800AA368
"@168":
    .4byte lbl_800AA5A0
    .4byte lbl_800AA5B4
    .4byte lbl_800AA5B4
    .4byte lbl_800AA5C8
    .4byte lbl_800AA5C8
    .4byte lbl_800AA5C8
    .4byte lbl_800AA5DC
    .4byte lbl_800AA604
    .4byte lbl_800AA5A0
    .4byte lbl_800AA5B4
    .4byte lbl_800AA5C8
    .4byte lbl_800AA604
    .4byte lbl_800AA604
    .4byte lbl_800AA604
    .4byte lbl_800AA5F0

.section .sdata, "wa"  # 0x80408AC0 - 0x804097C0
GX2HWFiltConv:
	.4byte 0x00040105
	.4byte 0x02060000

.section .sdata2, "a"  # 0x8040B460 - 0x80414020
.balign 8
"@164":
	.4byte 0x41800000
	.4byte 0
"@166":
	.4byte 0x43300000
	.4byte 0
"@192":
	.4byte 0xC0800000
"@193":
	.4byte 0x40800000
"@194":
	.4byte 0x407F5C29
"@195":
	.4byte 0x42000000
"@196":
  .4byte 0
"@197":
	.4byte 0x41200000