summaryrefslogtreecommitdiff
path: root/asm/Dolphin/gx/GXFrameBuf.s
blob: 55751bde885ac64ce6b70cf876c0377da65d934d (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
.include "macros.inc"

.section .text, "ax"  # 0x80005600 - 0x8036FBA0
.global GXSetDispCopySrc
GXSetDispCopySrc:
/* 800A8BE8 000A5B28  80 ED 82 C8 */	lwz r7, gx@sda21(r13)
/* 800A8BEC 000A5B2C  39 00 00 00 */	li r8, 0
/* 800A8BF0 000A5B30  54 84 51 AA */	rlwinm r4, r4, 0xa, 6, 0x15
/* 800A8BF4 000A5B34  91 07 01 E0 */	stw r8, 0x1e0(r7)
/* 800A8BF8 000A5B38  54 A7 04 3E */	clrlwi r7, r5, 0x10
/* 800A8BFC 000A5B3C  54 C5 04 3E */	clrlwi r5, r6, 0x10
/* 800A8C00 000A5B40  80 CD 82 C8 */	lwz r6, gx@sda21(r13)
/* 800A8C04 000A5B44  38 05 FF FF */	addi r0, r5, -1
/* 800A8C08 000A5B48  54 65 04 3E */	clrlwi r5, r3, 0x10
/* 800A8C0C 000A5B4C  39 26 01 E0 */	addi r9, r6, 0x1e0
/* 800A8C10 000A5B50  80 C6 01 E0 */	lwz r6, 0x1e0(r6)
/* 800A8C14 000A5B54  38 67 FF FF */	addi r3, r7, -1
/* 800A8C18 000A5B58  54 C6 00 2A */	rlwinm r6, r6, 0, 0, 0x15
/* 800A8C1C 000A5B5C  7C C5 2B 78 */	or r5, r6, r5
/* 800A8C20 000A5B60  90 A9 00 00 */	stw r5, 0(r9)
/* 800A8C24 000A5B64  54 00 50 2A */	slwi r0, r0, 0xa
/* 800A8C28 000A5B68  80 AD 82 C8 */	lwz r5, gx@sda21(r13)
/* 800A8C2C 000A5B6C  38 C5 01 E0 */	addi r6, r5, 0x1e0
/* 800A8C30 000A5B70  80 A5 01 E0 */	lwz r5, 0x1e0(r5)
/* 800A8C34 000A5B74  54 A5 05 96 */	rlwinm r5, r5, 0, 0x16, 0xb
/* 800A8C38 000A5B78  7C A4 23 78 */	or r4, r5, r4
/* 800A8C3C 000A5B7C  90 86 00 00 */	stw r4, 0(r6)
/* 800A8C40 000A5B80  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A8C44 000A5B84  38 A4 01 E0 */	addi r5, r4, 0x1e0
/* 800A8C48 000A5B88  80 84 01 E0 */	lwz r4, 0x1e0(r4)
/* 800A8C4C 000A5B8C  54 84 02 3E */	clrlwi r4, r4, 8
/* 800A8C50 000A5B90  64 84 49 00 */	oris r4, r4, 0x4900
/* 800A8C54 000A5B94  90 85 00 00 */	stw r4, 0(r5)
/* 800A8C58 000A5B98  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A8C5C 000A5B9C  91 04 01 E4 */	stw r8, 0x1e4(r4)
/* 800A8C60 000A5BA0  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A8C64 000A5BA4  38 A4 01 E4 */	addi r5, r4, 0x1e4
/* 800A8C68 000A5BA8  80 84 01 E4 */	lwz r4, 0x1e4(r4)
/* 800A8C6C 000A5BAC  54 84 00 2A */	rlwinm r4, r4, 0, 0, 0x15
/* 800A8C70 000A5BB0  7C 83 1B 78 */	or r3, r4, r3
/* 800A8C74 000A5BB4  90 65 00 00 */	stw r3, 0(r5)
/* 800A8C78 000A5BB8  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8C7C 000A5BBC  38 83 01 E4 */	addi r4, r3, 0x1e4
/* 800A8C80 000A5BC0  80 63 01 E4 */	lwz r3, 0x1e4(r3)
/* 800A8C84 000A5BC4  54 63 05 96 */	rlwinm r3, r3, 0, 0x16, 0xb
/* 800A8C88 000A5BC8  7C 60 03 78 */	or r0, r3, r0
/* 800A8C8C 000A5BCC  90 04 00 00 */	stw r0, 0(r4)
/* 800A8C90 000A5BD0  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8C94 000A5BD4  84 03 01 E4 */	lwzu r0, 0x1e4(r3)
/* 800A8C98 000A5BD8  54 00 02 3E */	clrlwi r0, r0, 8
/* 800A8C9C 000A5BDC  64 00 4A 00 */	oris r0, r0, 0x4a00
/* 800A8CA0 000A5BE0  90 03 00 00 */	stw r0, 0(r3)
/* 800A8CA4 000A5BE4  4E 80 00 20 */	blr 

.global GXSetTexCopySrc
GXSetTexCopySrc:
/* 800A8CA8 000A5BE8  80 ED 82 C8 */	lwz r7, gx@sda21(r13)
/* 800A8CAC 000A5BEC  39 00 00 00 */	li r8, 0
/* 800A8CB0 000A5BF0  54 84 51 AA */	rlwinm r4, r4, 0xa, 6, 0x15
/* 800A8CB4 000A5BF4  91 07 01 F0 */	stw r8, 0x1f0(r7)
/* 800A8CB8 000A5BF8  54 A7 04 3E */	clrlwi r7, r5, 0x10
/* 800A8CBC 000A5BFC  54 C5 04 3E */	clrlwi r5, r6, 0x10
/* 800A8CC0 000A5C00  80 CD 82 C8 */	lwz r6, gx@sda21(r13)
/* 800A8CC4 000A5C04  38 05 FF FF */	addi r0, r5, -1
/* 800A8CC8 000A5C08  54 65 04 3E */	clrlwi r5, r3, 0x10
/* 800A8CCC 000A5C0C  39 26 01 F0 */	addi r9, r6, 0x1f0
/* 800A8CD0 000A5C10  80 C6 01 F0 */	lwz r6, 0x1f0(r6)
/* 800A8CD4 000A5C14  38 67 FF FF */	addi r3, r7, -1
/* 800A8CD8 000A5C18  54 C6 00 2A */	rlwinm r6, r6, 0, 0, 0x15
/* 800A8CDC 000A5C1C  7C C5 2B 78 */	or r5, r6, r5
/* 800A8CE0 000A5C20  90 A9 00 00 */	stw r5, 0(r9)
/* 800A8CE4 000A5C24  54 00 50 2A */	slwi r0, r0, 0xa
/* 800A8CE8 000A5C28  80 AD 82 C8 */	lwz r5, gx@sda21(r13)
/* 800A8CEC 000A5C2C  38 C5 01 F0 */	addi r6, r5, 0x1f0
/* 800A8CF0 000A5C30  80 A5 01 F0 */	lwz r5, 0x1f0(r5)
/* 800A8CF4 000A5C34  54 A5 05 96 */	rlwinm r5, r5, 0, 0x16, 0xb
/* 800A8CF8 000A5C38  7C A4 23 78 */	or r4, r5, r4
/* 800A8CFC 000A5C3C  90 86 00 00 */	stw r4, 0(r6)
/* 800A8D00 000A5C40  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A8D04 000A5C44  38 A4 01 F0 */	addi r5, r4, 0x1f0
/* 800A8D08 000A5C48  80 84 01 F0 */	lwz r4, 0x1f0(r4)
/* 800A8D0C 000A5C4C  54 84 02 3E */	clrlwi r4, r4, 8
/* 800A8D10 000A5C50  64 84 49 00 */	oris r4, r4, 0x4900
/* 800A8D14 000A5C54  90 85 00 00 */	stw r4, 0(r5)
/* 800A8D18 000A5C58  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A8D1C 000A5C5C  91 04 01 F4 */	stw r8, 0x1f4(r4)
/* 800A8D20 000A5C60  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A8D24 000A5C64  38 A4 01 F4 */	addi r5, r4, 0x1f4
/* 800A8D28 000A5C68  80 84 01 F4 */	lwz r4, 0x1f4(r4)
/* 800A8D2C 000A5C6C  54 84 00 2A */	rlwinm r4, r4, 0, 0, 0x15
/* 800A8D30 000A5C70  7C 83 1B 78 */	or r3, r4, r3
/* 800A8D34 000A5C74  90 65 00 00 */	stw r3, 0(r5)
/* 800A8D38 000A5C78  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8D3C 000A5C7C  38 83 01 F4 */	addi r4, r3, 0x1f4
/* 800A8D40 000A5C80  80 63 01 F4 */	lwz r3, 0x1f4(r3)
/* 800A8D44 000A5C84  54 63 05 96 */	rlwinm r3, r3, 0, 0x16, 0xb
/* 800A8D48 000A5C88  7C 60 03 78 */	or r0, r3, r0
/* 800A8D4C 000A5C8C  90 04 00 00 */	stw r0, 0(r4)
/* 800A8D50 000A5C90  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8D54 000A5C94  84 03 01 F4 */	lwzu r0, 0x1f4(r3)
/* 800A8D58 000A5C98  54 00 02 3E */	clrlwi r0, r0, 8
/* 800A8D5C 000A5C9C  64 00 4A 00 */	oris r0, r0, 0x4a00
/* 800A8D60 000A5CA0  90 03 00 00 */	stw r0, 0(r3)
/* 800A8D64 000A5CA4  4E 80 00 20 */	blr 

.global GXSetDispCopyDst
GXSetDispCopyDst:
/* 800A8D68 000A5CA8  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A8D6C 000A5CAC  38 00 00 00 */	li r0, 0
/* 800A8D70 000A5CB0  90 04 01 E8 */	stw r0, 0x1e8(r4)
/* 800A8D74 000A5CB4  54 60 0C 3C */	rlwinm r0, r3, 1, 0x10, 0x1e
/* 800A8D78 000A5CB8  7C 00 2E 70 */	srawi r0, r0, 5
/* 800A8D7C 000A5CBC  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8D80 000A5CC0  38 83 01 E8 */	addi r4, r3, 0x1e8
/* 800A8D84 000A5CC4  80 63 01 E8 */	lwz r3, 0x1e8(r3)
/* 800A8D88 000A5CC8  54 63 00 2A */	rlwinm r3, r3, 0, 0, 0x15
/* 800A8D8C 000A5CCC  7C 60 03 78 */	or r0, r3, r0
/* 800A8D90 000A5CD0  90 04 00 00 */	stw r0, 0(r4)
/* 800A8D94 000A5CD4  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8D98 000A5CD8  84 03 01 E8 */	lwzu r0, 0x1e8(r3)
/* 800A8D9C 000A5CDC  54 00 02 3E */	clrlwi r0, r0, 8
/* 800A8DA0 000A5CE0  64 00 4D 00 */	oris r0, r0, 0x4d00
/* 800A8DA4 000A5CE4  90 03 00 00 */	stw r0, 0(r3)
/* 800A8DA8 000A5CE8  4E 80 00 20 */	blr 

.global GXSetTexCopyDst
GXSetTexCopyDst:
/* 800A8DAC 000A5CEC  7C 08 02 A6 */	mflr r0
/* 800A8DB0 000A5CF0  2C 05 00 13 */	cmpwi r5, 0x13
/* 800A8DB4 000A5CF4  90 01 00 04 */	stw r0, 4(r1)
/* 800A8DB8 000A5CF8  38 00 00 00 */	li r0, 0
/* 800A8DBC 000A5CFC  39 03 00 00 */	addi r8, r3, 0
/* 800A8DC0 000A5D00  94 21 FF D0 */	stwu r1, -0x30(r1)
/* 800A8DC4 000A5D04  93 E1 00 2C */	stw r31, 0x2c(r1)
/* 800A8DC8 000A5D08  54 BF 07 3E */	clrlwi r31, r5, 0x1c
/* 800A8DCC 000A5D0C  93 C1 00 28 */	stw r30, 0x28(r1)
/* 800A8DD0 000A5D10  3B C6 00 00 */	addi r30, r6, 0
/* 800A8DD4 000A5D14  80 ED 82 C8 */	lwz r7, gx@sda21(r13)
/* 800A8DD8 000A5D18  98 07 02 00 */	stb r0, 0x200(r7)
/* 800A8DDC 000A5D1C  38 E4 00 00 */	addi r7, r4, 0
/* 800A8DE0 000A5D20  40 82 00 08 */	bne lbl_800A8DE8
/* 800A8DE4 000A5D24  3B E0 00 0B */	li r31, 0xb
lbl_800A8DE8:
/* 800A8DE8 000A5D28  2C 05 00 26 */	cmpwi r5, 0x26
/* 800A8DEC 000A5D2C  41 82 00 1C */	beq lbl_800A8E08
/* 800A8DF0 000A5D30  40 80 00 34 */	bge lbl_800A8E24
/* 800A8DF4 000A5D34  2C 05 00 04 */	cmpwi r5, 4
/* 800A8DF8 000A5D38  40 80 00 2C */	bge lbl_800A8E24
/* 800A8DFC 000A5D3C  2C 05 00 00 */	cmpwi r5, 0
/* 800A8E00 000A5D40  40 80 00 08 */	bge lbl_800A8E08
/* 800A8E04 000A5D44  48 00 00 20 */	b lbl_800A8E24
lbl_800A8E08:
/* 800A8E08 000A5D48  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8E0C 000A5D4C  84 03 01 FC */	lwzu r0, 0x1fc(r3)
/* 800A8E10 000A5D50  54 00 04 5C */	rlwinm r0, r0, 0, 0x11, 0xe
/* 800A8E14 000A5D54  64 00 00 01 */	oris r0, r0, 1
/* 800A8E18 000A5D58  60 00 80 00 */	ori r0, r0, 0x8000
/* 800A8E1C 000A5D5C  90 03 00 00 */	stw r0, 0(r3)
/* 800A8E20 000A5D60  48 00 00 18 */	b lbl_800A8E38
lbl_800A8E24:
/* 800A8E24 000A5D64  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8E28 000A5D68  84 03 01 FC */	lwzu r0, 0x1fc(r3)
/* 800A8E2C 000A5D6C  54 00 04 5C */	rlwinm r0, r0, 0, 0x11, 0xe
/* 800A8E30 000A5D70  64 00 00 01 */	oris r0, r0, 1
/* 800A8E34 000A5D74  90 03 00 00 */	stw r0, 0(r3)
lbl_800A8E38:
/* 800A8E38 000A5D78  54 A4 06 F6 */	rlwinm r4, r5, 0, 0x1b, 0x1b
/* 800A8E3C 000A5D7C  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8E40 000A5D80  38 04 FF F0 */	addi r0, r4, -16
/* 800A8E44 000A5D84  7C 00 00 34 */	cntlzw r0, r0
/* 800A8E48 000A5D88  54 00 DE 3E */	rlwinm r0, r0, 0x1b, 0x18, 0x1f
/* 800A8E4C 000A5D8C  98 03 02 00 */	stb r0, 0x200(r3)
/* 800A8E50 000A5D90  38 65 00 00 */	addi r3, r5, 0
/* 800A8E54 000A5D94  38 A7 00 00 */	addi r5, r7, 0
/* 800A8E58 000A5D98  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A8E5C 000A5D9C  38 E1 00 1C */	addi r7, r1, 0x1c
/* 800A8E60 000A5DA0  80 04 01 FC */	lwz r0, 0x1fc(r4)
/* 800A8E64 000A5DA4  38 C4 01 FC */	addi r6, r4, 0x1fc
/* 800A8E68 000A5DA8  38 88 00 00 */	addi r4, r8, 0
/* 800A8E6C 000A5DAC  54 00 07 76 */	rlwinm r0, r0, 0, 0x1d, 0x1b
/* 800A8E70 000A5DB0  53 E0 07 38 */	rlwimi r0, r31, 0, 0x1c, 0x1c
/* 800A8E74 000A5DB4  90 06 00 00 */	stw r0, 0(r6)
/* 800A8E78 000A5DB8  57 FF 07 7E */	clrlwi r31, r31, 0x1d
/* 800A8E7C 000A5DBC  38 C1 00 20 */	addi r6, r1, 0x20
/* 800A8E80 000A5DC0  39 01 00 18 */	addi r8, r1, 0x18
/* 800A8E84 000A5DC4  48 00 14 AD */	bl __GetImageTileCount
/* 800A8E88 000A5DC8  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8E8C 000A5DCC  38 00 00 00 */	li r0, 0
/* 800A8E90 000A5DD0  90 03 01 F8 */	stw r0, 0x1f8(r3)
/* 800A8E94 000A5DD4  57 C3 4B EC */	rlwinm r3, r30, 9, 0xf, 0x16
/* 800A8E98 000A5DD8  57 E0 20 36 */	slwi r0, r31, 4
/* 800A8E9C 000A5DDC  80 A1 00 20 */	lwz r5, 0x20(r1)
/* 800A8EA0 000A5DE0  80 81 00 18 */	lwz r4, 0x18(r1)
/* 800A8EA4 000A5DE4  80 CD 82 C8 */	lwz r6, gx@sda21(r13)
/* 800A8EA8 000A5DE8  7C 85 21 D6 */	mullw r4, r5, r4
/* 800A8EAC 000A5DEC  84 A6 01 F8 */	lwzu r5, 0x1f8(r6)
/* 800A8EB0 000A5DF0  54 A5 00 2A */	rlwinm r5, r5, 0, 0, 0x15
/* 800A8EB4 000A5DF4  7C A4 23 78 */	or r4, r5, r4
/* 800A8EB8 000A5DF8  90 86 00 00 */	stw r4, 0(r6)
/* 800A8EBC 000A5DFC  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A8EC0 000A5E00  38 A4 01 F8 */	addi r5, r4, 0x1f8
/* 800A8EC4 000A5E04  80 84 01 F8 */	lwz r4, 0x1f8(r4)
/* 800A8EC8 000A5E08  54 84 02 3E */	clrlwi r4, r4, 8
/* 800A8ECC 000A5E0C  64 84 4D 00 */	oris r4, r4, 0x4d00
/* 800A8ED0 000A5E10  90 85 00 00 */	stw r4, 0(r5)
/* 800A8ED4 000A5E14  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A8ED8 000A5E18  38 A4 01 FC */	addi r5, r4, 0x1fc
/* 800A8EDC 000A5E1C  80 84 01 FC */	lwz r4, 0x1fc(r4)
/* 800A8EE0 000A5E20  54 84 05 EA */	rlwinm r4, r4, 0, 0x17, 0x15
/* 800A8EE4 000A5E24  7C 83 1B 78 */	or r3, r4, r3
/* 800A8EE8 000A5E28  90 65 00 00 */	stw r3, 0(r5)
/* 800A8EEC 000A5E2C  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8EF0 000A5E30  38 83 01 FC */	addi r4, r3, 0x1fc
/* 800A8EF4 000A5E34  80 63 01 FC */	lwz r3, 0x1fc(r3)
/* 800A8EF8 000A5E38  54 63 07 30 */	rlwinm r3, r3, 0, 0x1c, 0x18
/* 800A8EFC 000A5E3C  7C 60 03 78 */	or r0, r3, r0
/* 800A8F00 000A5E40  90 04 00 00 */	stw r0, 0(r4)
/* 800A8F04 000A5E44  80 01 00 34 */	lwz r0, 0x34(r1)
/* 800A8F08 000A5E48  83 E1 00 2C */	lwz r31, 0x2c(r1)
/* 800A8F0C 000A5E4C  83 C1 00 28 */	lwz r30, 0x28(r1)
/* 800A8F10 000A5E50  38 21 00 30 */	addi r1, r1, 0x30
/* 800A8F14 000A5E54  7C 08 03 A6 */	mtlr r0
/* 800A8F18 000A5E58  4E 80 00 20 */	blr 

.global GXSetDispCopyFrame2Field
GXSetDispCopyFrame2Field:
/* 800A8F1C 000A5E5C  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A8F20 000A5E60  54 60 60 26 */	slwi r0, r3, 0xc
/* 800A8F24 000A5E64  84 64 01 EC */	lwzu r3, 0x1ec(r4)
/* 800A8F28 000A5E68  54 63 05 22 */	rlwinm r3, r3, 0, 0x14, 0x11
/* 800A8F2C 000A5E6C  7C 60 03 78 */	or r0, r3, r0
/* 800A8F30 000A5E70  90 04 00 00 */	stw r0, 0(r4)
/* 800A8F34 000A5E74  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8F38 000A5E78  84 03 01 FC */	lwzu r0, 0x1fc(r3)
/* 800A8F3C 000A5E7C  54 00 05 22 */	rlwinm r0, r0, 0, 0x14, 0x11
/* 800A8F40 000A5E80  90 03 00 00 */	stw r0, 0(r3)
/* 800A8F44 000A5E84  4E 80 00 20 */	blr 

.global GXSetCopyClamp
GXSetCopyClamp:
/* 800A8F48 000A5E88  80 AD 82 C8 */	lwz r5, gx@sda21(r13)
/* 800A8F4C 000A5E8C  54 64 07 FE */	clrlwi r4, r3, 0x1f
/* 800A8F50 000A5E90  38 04 FF FF */	addi r0, r4, -1
/* 800A8F54 000A5E94  80 85 01 EC */	lwz r4, 0x1ec(r5)
/* 800A8F58 000A5E98  38 C5 01 EC */	addi r6, r5, 0x1ec
/* 800A8F5C 000A5E9C  7C 00 00 34 */	cntlzw r0, r0
/* 800A8F60 000A5EA0  54 85 00 3C */	rlwinm r5, r4, 0, 0, 0x1e
/* 800A8F64 000A5EA4  54 04 DE 3E */	rlwinm r4, r0, 0x1b, 0x18, 0x1f
/* 800A8F68 000A5EA8  7C A0 23 78 */	or r0, r5, r4
/* 800A8F6C 000A5EAC  90 06 00 00 */	stw r0, 0(r6)
/* 800A8F70 000A5EB0  54 63 07 BC */	rlwinm r3, r3, 0, 0x1e, 0x1e
/* 800A8F74 000A5EB4  38 03 FF FE */	addi r0, r3, -2
/* 800A8F78 000A5EB8  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8F7C 000A5EBC  7C 00 00 34 */	cntlzw r0, r0
/* 800A8F80 000A5EC0  54 06 E5 FC */	rlwinm r6, r0, 0x1c, 0x17, 0x1e
/* 800A8F84 000A5EC4  38 A3 01 EC */	addi r5, r3, 0x1ec
/* 800A8F88 000A5EC8  80 63 01 EC */	lwz r3, 0x1ec(r3)
/* 800A8F8C 000A5ECC  54 60 07 FA */	rlwinm r0, r3, 0, 0x1f, 0x1d
/* 800A8F90 000A5ED0  7C 00 33 78 */	or r0, r0, r6
/* 800A8F94 000A5ED4  90 05 00 00 */	stw r0, 0(r5)
/* 800A8F98 000A5ED8  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8F9C 000A5EDC  84 03 01 FC */	lwzu r0, 0x1fc(r3)
/* 800A8FA0 000A5EE0  54 00 00 3C */	rlwinm r0, r0, 0, 0, 0x1e
/* 800A8FA4 000A5EE4  7C 00 23 78 */	or r0, r0, r4
/* 800A8FA8 000A5EE8  90 03 00 00 */	stw r0, 0(r3)
/* 800A8FAC 000A5EEC  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A8FB0 000A5EF0  84 03 01 FC */	lwzu r0, 0x1fc(r3)
/* 800A8FB4 000A5EF4  54 00 07 FA */	rlwinm r0, r0, 0, 0x1f, 0x1d
/* 800A8FB8 000A5EF8  7C 00 33 78 */	or r0, r0, r6
/* 800A8FBC 000A5EFC  90 03 00 00 */	stw r0, 0(r3)
/* 800A8FC0 000A5F00  4E 80 00 20 */	blr 

.global GXGetNumXfbLines
GXGetNumXfbLines:
/* 800A8FC4 000A5F04  7C 08 02 A6 */	mflr r0
/* 800A8FC8 000A5F08  90 01 00 04 */	stw r0, 4(r1)
/* 800A8FCC 000A5F0C  94 21 FF E0 */	stwu r1, -0x20(r1)
/* 800A8FD0 000A5F10  93 E1 00 1C */	stw r31, 0x1c(r1)
/* 800A8FD4 000A5F14  7C 7F 1B 78 */	mr r31, r3
/* 800A8FD8 000A5F18  C0 02 8A F0 */	lfs f0, "@83"@sda21(r2)
/* 800A8FDC 000A5F1C  EC 20 08 24 */	fdivs f1, f0, f1
/* 800A8FE0 000A5F20  4B FD 9B DD */	bl __cvt_fp2unsigned
/* 800A8FE4 000A5F24  57 E5 04 3E */	clrlwi r5, r31, 0x10
/* 800A8FE8 000A5F28  38 05 FF FF */	addi r0, r5, -1
/* 800A8FEC 000A5F2C  54 64 05 FE */	clrlwi r4, r3, 0x17
/* 800A8FF0 000A5F30  54 00 40 2E */	slwi r0, r0, 8
/* 800A8FF4 000A5F34  7C 60 23 96 */	divwu r3, r0, r4
/* 800A8FF8 000A5F38  28 04 00 80 */	cmplwi r4, 0x80
/* 800A8FFC 000A5F3C  38 63 00 01 */	addi r3, r3, 1
/* 800A9000 000A5F40  40 81 00 30 */	ble lbl_800A9030
/* 800A9004 000A5F44  28 04 01 00 */	cmplwi r4, 0x100
/* 800A9008 000A5F48  40 80 00 28 */	bge lbl_800A9030
/* 800A900C 000A5F4C  48 00 00 08 */	b lbl_800A9014
lbl_800A9010:
/* 800A9010 000A5F50  54 84 F8 7E */	srwi r4, r4, 1
lbl_800A9014:
/* 800A9014 000A5F54  54 80 07 FF */	clrlwi. r0, r4, 0x1f
/* 800A9018 000A5F58  41 82 FF F8 */	beq lbl_800A9010
/* 800A901C 000A5F5C  7C 05 23 96 */	divwu r0, r5, r4
/* 800A9020 000A5F60  7C 00 21 D6 */	mullw r0, r0, r4
/* 800A9024 000A5F64  7C 00 28 51 */	subf. r0, r0, r5
/* 800A9028 000A5F68  40 82 00 08 */	bne lbl_800A9030
/* 800A902C 000A5F6C  38 63 00 01 */	addi r3, r3, 1
lbl_800A9030:
/* 800A9030 000A5F70  28 03 04 00 */	cmplwi r3, 0x400
/* 800A9034 000A5F74  40 81 00 08 */	ble lbl_800A903C
/* 800A9038 000A5F78  38 60 04 00 */	li r3, 0x400
lbl_800A903C:
/* 800A903C 000A5F7C  80 01 00 24 */	lwz r0, 0x24(r1)
/* 800A9040 000A5F80  54 63 04 3E */	clrlwi r3, r3, 0x10
/* 800A9044 000A5F84  83 E1 00 1C */	lwz r31, 0x1c(r1)
/* 800A9048 000A5F88  38 21 00 20 */	addi r1, r1, 0x20
/* 800A904C 000A5F8C  7C 08 03 A6 */	mtlr r0
/* 800A9050 000A5F90  4E 80 00 20 */	blr 

.global GXGetYScaleFactor
GXGetYScaleFactor:
/* 800A9054 000A5F94  7C 08 02 A6 */	mflr r0
/* 800A9058 000A5F98  90 01 00 04 */	stw r0, 4(r1)
/* 800A905C 000A5F9C  3C 00 43 30 */	lis r0, 0x4330
/* 800A9060 000A5FA0  94 21 FF 88 */	stwu r1, -0x78(r1)
/* 800A9064 000A5FA4  DB E1 00 70 */	stfd f31, 0x70(r1)
/* 800A9068 000A5FA8  DB C1 00 68 */	stfd f30, 0x68(r1)
/* 800A906C 000A5FAC  DB A1 00 60 */	stfd f29, 0x60(r1)
/* 800A9070 000A5FB0  DB 81 00 58 */	stfd f28, 0x58(r1)
/* 800A9074 000A5FB4  BF 21 00 3C */	stmw r25, 0x3c(r1)
/* 800A9078 000A5FB8  54 9C 04 3E */	clrlwi r28, r4, 0x10
/* 800A907C 000A5FBC  54 7F 04 3E */	clrlwi r31, r3, 0x10
/* 800A9080 000A5FC0  93 81 00 34 */	stw r28, 0x34(r1)
/* 800A9084 000A5FC4  7C 7B 1B 78 */	mr r27, r3
/* 800A9088 000A5FC8  7C 99 23 78 */	mr r25, r4
/* 800A908C 000A5FCC  93 E1 00 2C */	stw r31, 0x2c(r1)
/* 800A9090 000A5FD0  90 01 00 30 */	stw r0, 0x30(r1)
/* 800A9094 000A5FD4  90 01 00 28 */	stw r0, 0x28(r1)
/* 800A9098 000A5FD8  C8 62 8A F8 */	lfd f3, "@138"@sda21(r2)
/* 800A909C 000A5FDC  C8 41 00 30 */	lfd f2, 0x30(r1)
/* 800A90A0 000A5FE0  C8 21 00 28 */	lfd f1, 0x28(r1)
/* 800A90A4 000A5FE4  EC 42 18 28 */	fsubs f2, f2, f3
/* 800A90A8 000A5FE8  C0 02 8A F0 */	lfs f0, "@83"@sda21(r2)
/* 800A90AC 000A5FEC  EC 21 18 28 */	fsubs f1, f1, f3
/* 800A90B0 000A5FF0  EC 42 08 24 */	fdivs f2, f2, f1
/* 800A90B4 000A5FF4  EC 20 10 24 */	fdivs f1, f0, f2
/* 800A90B8 000A5FF8  FF 80 10 90 */	fmr f28, f2
/* 800A90BC 000A5FFC  4B FD 9B 01 */	bl __cvt_fp2unsigned
/* 800A90C0 000A6000  38 1F FF FF */	addi r0, r31, -1
/* 800A90C4 000A6004  54 64 05 FE */	clrlwi r4, r3, 0x17
/* 800A90C8 000A6008  54 1E 40 2E */	slwi r30, r0, 8
/* 800A90CC 000A600C  7C 7E 23 96 */	divwu r3, r30, r4
/* 800A90D0 000A6010  28 04 00 80 */	cmplwi r4, 0x80
/* 800A90D4 000A6014  38 63 00 01 */	addi r3, r3, 1
/* 800A90D8 000A6018  40 81 00 30 */	ble lbl_800A9108
/* 800A90DC 000A601C  28 04 01 00 */	cmplwi r4, 0x100
/* 800A90E0 000A6020  40 80 00 28 */	bge lbl_800A9108
/* 800A90E4 000A6024  48 00 00 08 */	b lbl_800A90EC
lbl_800A90E8:
/* 800A90E8 000A6028  54 84 F8 7E */	srwi r4, r4, 1
lbl_800A90EC:
/* 800A90EC 000A602C  54 80 07 FF */	clrlwi. r0, r4, 0x1f
/* 800A90F0 000A6030  41 82 FF F8 */	beq lbl_800A90E8
/* 800A90F4 000A6034  7C 1F 23 96 */	divwu r0, r31, r4
/* 800A90F8 000A6038  7C 00 21 D6 */	mullw r0, r0, r4
/* 800A90FC 000A603C  7C 00 F8 51 */	subf. r0, r0, r31
/* 800A9100 000A6040  40 82 00 08 */	bne lbl_800A9108
/* 800A9104 000A6044  38 63 00 01 */	addi r3, r3, 1
lbl_800A9108:
/* 800A9108 000A6048  28 03 04 00 */	cmplwi r3, 0x400
/* 800A910C 000A604C  40 81 00 08 */	ble lbl_800A9114
/* 800A9110 000A6050  38 60 04 00 */	li r3, 0x400
lbl_800A9114:
/* 800A9114 000A6054  CB E2 8A F8 */	lfd f31, "@138"@sda21(r2)
/* 800A9118 000A6058  7C 60 1B 78 */	mr r0, r3
/* 800A911C 000A605C  C3 C2 8A F0 */	lfs f30, "@83"@sda21(r2)
/* 800A9120 000A6060  57 3D 04 3E */	clrlwi r29, r25, 0x10
/* 800A9124 000A6064  57 7A 04 3E */	clrlwi r26, r27, 0x10
/* 800A9128 000A6068  3F 20 43 30 */	lis r25, 0x4330
/* 800A912C 000A606C  48 00 00 88 */	b lbl_800A91B4
lbl_800A9130:
/* 800A9130 000A6070  3B 9C FF FF */	addi r28, r28, -1
/* 800A9134 000A6074  93 41 00 34 */	stw r26, 0x34(r1)
/* 800A9138 000A6078  93 81 00 2C */	stw r28, 0x2c(r1)
/* 800A913C 000A607C  93 21 00 28 */	stw r25, 0x28(r1)
/* 800A9140 000A6080  93 21 00 30 */	stw r25, 0x30(r1)
/* 800A9144 000A6084  C8 21 00 28 */	lfd f1, 0x28(r1)
/* 800A9148 000A6088  C8 01 00 30 */	lfd f0, 0x30(r1)
/* 800A914C 000A608C  EC 21 F8 28 */	fsubs f1, f1, f31
/* 800A9150 000A6090  EC 00 F8 28 */	fsubs f0, f0, f31
/* 800A9154 000A6094  EC 01 00 24 */	fdivs f0, f1, f0
/* 800A9158 000A6098  EC 3E 00 24 */	fdivs f1, f30, f0
/* 800A915C 000A609C  FF 80 00 90 */	fmr f28, f0
/* 800A9160 000A60A0  4B FD 9A 5D */	bl __cvt_fp2unsigned
/* 800A9164 000A60A4  54 64 05 FE */	clrlwi r4, r3, 0x17
/* 800A9168 000A60A8  7C 7E 23 96 */	divwu r3, r30, r4
/* 800A916C 000A60AC  28 04 00 80 */	cmplwi r4, 0x80
/* 800A9170 000A60B0  38 63 00 01 */	addi r3, r3, 1
/* 800A9174 000A60B4  40 81 00 30 */	ble lbl_800A91A4
/* 800A9178 000A60B8  28 04 01 00 */	cmplwi r4, 0x100
/* 800A917C 000A60BC  40 80 00 28 */	bge lbl_800A91A4
/* 800A9180 000A60C0  48 00 00 08 */	b lbl_800A9188
lbl_800A9184:
/* 800A9184 000A60C4  54 84 F8 7E */	srwi r4, r4, 1
lbl_800A9188:
/* 800A9188 000A60C8  54 80 07 FF */	clrlwi. r0, r4, 0x1f
/* 800A918C 000A60CC  41 82 FF F8 */	beq lbl_800A9184
/* 800A9190 000A60D0  7C 1F 23 96 */	divwu r0, r31, r4
/* 800A9194 000A60D4  7C 00 21 D6 */	mullw r0, r0, r4
/* 800A9198 000A60D8  7C 00 F8 51 */	subf. r0, r0, r31
/* 800A919C 000A60DC  40 82 00 08 */	bne lbl_800A91A4
/* 800A91A0 000A60E0  38 63 00 01 */	addi r3, r3, 1
lbl_800A91A4:
/* 800A91A4 000A60E4  28 03 04 00 */	cmplwi r3, 0x400
/* 800A91A8 000A60E8  40 81 00 08 */	ble lbl_800A91B0
/* 800A91AC 000A60EC  38 60 04 00 */	li r3, 0x400
lbl_800A91B0:
/* 800A91B0 000A60F0  7C 60 1B 78 */	mr r0, r3
lbl_800A91B4:
/* 800A91B4 000A60F4  7C 00 E8 40 */	cmplw r0, r29
/* 800A91B8 000A60F8  41 81 FF 78 */	bgt lbl_800A9130
/* 800A91BC 000A60FC  FF A0 E0 90 */	fmr f29, f28
/* 800A91C0 000A6100  CB C2 8A F8 */	lfd f30, "@138"@sda21(r2)
/* 800A91C4 000A6104  C3 E2 8A F0 */	lfs f31, "@83"@sda21(r2)
/* 800A91C8 000A6108  57 7B 04 3E */	clrlwi r27, r27, 0x10
/* 800A91CC 000A610C  3F 40 43 30 */	lis r26, 0x4330
/* 800A91D0 000A6110  48 00 00 8C */	b lbl_800A925C
lbl_800A91D4:
/* 800A91D4 000A6114  3B 9C 00 01 */	addi r28, r28, 1
/* 800A91D8 000A6118  93 61 00 34 */	stw r27, 0x34(r1)
/* 800A91DC 000A611C  FF A0 E0 90 */	fmr f29, f28
/* 800A91E0 000A6120  93 81 00 2C */	stw r28, 0x2c(r1)
/* 800A91E4 000A6124  93 41 00 28 */	stw r26, 0x28(r1)
/* 800A91E8 000A6128  93 41 00 30 */	stw r26, 0x30(r1)
/* 800A91EC 000A612C  C8 21 00 28 */	lfd f1, 0x28(r1)
/* 800A91F0 000A6130  C8 01 00 30 */	lfd f0, 0x30(r1)
/* 800A91F4 000A6134  EC 21 F0 28 */	fsubs f1, f1, f30
/* 800A91F8 000A6138  EC 00 F0 28 */	fsubs f0, f0, f30
/* 800A91FC 000A613C  EC 01 00 24 */	fdivs f0, f1, f0
/* 800A9200 000A6140  EC 3F 00 24 */	fdivs f1, f31, f0
/* 800A9204 000A6144  FF 80 00 90 */	fmr f28, f0
/* 800A9208 000A6148  4B FD 99 B5 */	bl __cvt_fp2unsigned
/* 800A920C 000A614C  54 64 05 FE */	clrlwi r4, r3, 0x17
/* 800A9210 000A6150  7C 7E 23 96 */	divwu r3, r30, r4
/* 800A9214 000A6154  28 04 00 80 */	cmplwi r4, 0x80
/* 800A9218 000A6158  38 63 00 01 */	addi r3, r3, 1
/* 800A921C 000A615C  40 81 00 30 */	ble lbl_800A924C
/* 800A9220 000A6160  28 04 01 00 */	cmplwi r4, 0x100
/* 800A9224 000A6164  40 80 00 28 */	bge lbl_800A924C
/* 800A9228 000A6168  48 00 00 08 */	b lbl_800A9230
lbl_800A922C:
/* 800A922C 000A616C  54 84 F8 7E */	srwi r4, r4, 1
lbl_800A9230:
/* 800A9230 000A6170  54 80 07 FF */	clrlwi. r0, r4, 0x1f
/* 800A9234 000A6174  41 82 FF F8 */	beq lbl_800A922C
/* 800A9238 000A6178  7C 1F 23 96 */	divwu r0, r31, r4
/* 800A923C 000A617C  7C 00 21 D6 */	mullw r0, r0, r4
/* 800A9240 000A6180  7C 00 F8 51 */	subf. r0, r0, r31
/* 800A9244 000A6184  40 82 00 08 */	bne lbl_800A924C
/* 800A9248 000A6188  38 63 00 01 */	addi r3, r3, 1
lbl_800A924C:
/* 800A924C 000A618C  28 03 04 00 */	cmplwi r3, 0x400
/* 800A9250 000A6190  40 81 00 08 */	ble lbl_800A9258
/* 800A9254 000A6194  38 60 04 00 */	li r3, 0x400
lbl_800A9258:
/* 800A9258 000A6198  7C 60 1B 78 */	mr r0, r3
lbl_800A925C:
/* 800A925C 000A619C  7C 00 E8 40 */	cmplw r0, r29
/* 800A9260 000A61A0  41 80 FF 74 */	blt lbl_800A91D4
/* 800A9264 000A61A4  BB 21 00 3C */	lmw r25, 0x3c(r1)
/* 800A9268 000A61A8  FC 20 E8 90 */	fmr f1, f29
/* 800A926C 000A61AC  80 01 00 7C */	lwz r0, 0x7c(r1)
/* 800A9270 000A61B0  CB E1 00 70 */	lfd f31, 0x70(r1)
/* 800A9274 000A61B4  CB C1 00 68 */	lfd f30, 0x68(r1)
/* 800A9278 000A61B8  CB A1 00 60 */	lfd f29, 0x60(r1)
/* 800A927C 000A61BC  CB 81 00 58 */	lfd f28, 0x58(r1)
/* 800A9280 000A61C0  38 21 00 78 */	addi r1, r1, 0x78
/* 800A9284 000A61C4  7C 08 03 A6 */	mtlr r0
/* 800A9288 000A61C8  4E 80 00 20 */	blr 

.global GXSetDispCopyYScale
GXSetDispCopyYScale:
/* 800A928C 000A61CC  7C 08 02 A6 */	mflr r0
/* 800A9290 000A61D0  90 01 00 04 */	stw r0, 4(r1)
/* 800A9294 000A61D4  94 21 FF F8 */	stwu r1, -8(r1)
/* 800A9298 000A61D8  C0 02 8A F0 */	lfs f0, "@83"@sda21(r2)
/* 800A929C 000A61DC  EC 20 08 24 */	fdivs f1, f0, f1
/* 800A92A0 000A61E0  4B FD 99 1D */	bl __cvt_fp2unsigned
/* 800A92A4 000A61E4  54 66 05 FE */	clrlwi r6, r3, 0x17
/* 800A92A8 000A61E8  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A92AC 000A61EC  38 00 00 61 */	li r0, 0x61
/* 800A92B0 000A61F0  3C 60 CC 01 */	lis r3, 0xCC008000@ha
/* 800A92B4 000A61F4  98 03 80 00 */	stb r0, 0xCC008000@l(r3)
/* 800A92B8 000A61F8  64 C0 4E 00 */	oris r0, r6, 0x4e00
/* 800A92BC 000A61FC  38 A0 00 00 */	li r5, 0
/* 800A92C0 000A6200  90 03 80 00 */	stw r0, -0x8000(r3)
/* 800A92C4 000A6204  20 66 01 00 */	subfic r3, r6, 0x100
/* 800A92C8 000A6208  30 03 FF FF */	addic r0, r3, -1
/* 800A92CC 000A620C  B0 A4 00 02 */	sth r5, 2(r4)
/* 800A92D0 000A6210  7C 00 19 10 */	subfe r0, r0, r3
/* 800A92D4 000A6214  54 00 53 AA */	rlwinm r0, r0, 0xa, 0xe, 0x15
/* 800A92D8 000A6218  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A92DC 000A621C  28 06 00 80 */	cmplwi r6, 0x80
/* 800A92E0 000A6220  38 86 00 00 */	addi r4, r6, 0
/* 800A92E4 000A6224  38 A3 01 EC */	addi r5, r3, 0x1ec
/* 800A92E8 000A6228  80 63 01 EC */	lwz r3, 0x1ec(r3)
/* 800A92EC 000A622C  54 63 05 A8 */	rlwinm r3, r3, 0, 0x16, 0x14
/* 800A92F0 000A6230  7C 60 03 78 */	or r0, r3, r0
/* 800A92F4 000A6234  90 05 00 00 */	stw r0, 0(r5)
/* 800A92F8 000A6238  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A92FC 000A623C  80 03 01 E4 */	lwz r0, 0x1e4(r3)
/* 800A9300 000A6240  54 05 B5 BE */	rlwinm r5, r0, 0x16, 0x16, 0x1f
/* 800A9304 000A6244  54 00 F3 AE */	rlwinm r0, r0, 0x1e, 0xe, 0x17
/* 800A9308 000A6248  7C 60 33 96 */	divwu r3, r0, r6
/* 800A930C 000A624C  38 A5 00 01 */	addi r5, r5, 1
/* 800A9310 000A6250  38 63 00 01 */	addi r3, r3, 1
/* 800A9314 000A6254  40 81 00 30 */	ble lbl_800A9344
/* 800A9318 000A6258  28 06 01 00 */	cmplwi r6, 0x100
/* 800A931C 000A625C  40 80 00 28 */	bge lbl_800A9344
/* 800A9320 000A6260  48 00 00 08 */	b lbl_800A9328
lbl_800A9324:
/* 800A9324 000A6264  54 84 F8 7E */	srwi r4, r4, 1
lbl_800A9328:
/* 800A9328 000A6268  54 80 07 FF */	clrlwi. r0, r4, 0x1f
/* 800A932C 000A626C  41 82 FF F8 */	beq lbl_800A9324
/* 800A9330 000A6270  7C 05 23 96 */	divwu r0, r5, r4
/* 800A9334 000A6274  7C 00 21 D6 */	mullw r0, r0, r4
/* 800A9338 000A6278  7C 00 28 51 */	subf. r0, r0, r5
/* 800A933C 000A627C  40 82 00 08 */	bne lbl_800A9344
/* 800A9340 000A6280  38 63 00 01 */	addi r3, r3, 1
lbl_800A9344:
/* 800A9344 000A6284  28 03 04 00 */	cmplwi r3, 0x400
/* 800A9348 000A6288  40 81 00 08 */	ble lbl_800A9350
/* 800A934C 000A628C  38 60 04 00 */	li r3, 0x400
lbl_800A9350:
/* 800A9350 000A6290  80 01 00 0C */	lwz r0, 0xc(r1)
/* 800A9354 000A6294  38 21 00 08 */	addi r1, r1, 8
/* 800A9358 000A6298  7C 08 03 A6 */	mtlr r0
/* 800A935C 000A629C  4E 80 00 20 */	blr 

.global GXSetCopyClear
GXSetCopyClear:
/* 800A9360 000A62A0  54 80 02 3E */	clrlwi r0, r4, 8
/* 800A9364 000A62A4  88 83 00 03 */	lbz r4, 3(r3)
/* 800A9368 000A62A8  88 A3 00 00 */	lbz r5, 0(r3)
/* 800A936C 000A62AC  38 C0 00 61 */	li r6, 0x61
/* 800A9370 000A62B0  54 87 40 2E */	slwi r7, r4, 8
/* 800A9374 000A62B4  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A9378 000A62B8  50 A7 06 3E */	rlwimi r7, r5, 0, 0x18, 0x1f
/* 800A937C 000A62BC  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800A9380 000A62C0  54 E7 02 3E */	clrlwi r7, r7, 8
/* 800A9384 000A62C4  98 C5 80 00 */	stb r6, 0xCC008000@l(r5)
/* 800A9388 000A62C8  64 E7 4F 00 */	oris r7, r7, 0x4f00
/* 800A938C 000A62CC  90 E5 80 00 */	stw r7, -0x8000(r5)
/* 800A9390 000A62D0  64 07 51 00 */	oris r7, r0, 0x5100
/* 800A9394 000A62D4  38 00 00 00 */	li r0, 0
/* 800A9398 000A62D8  89 03 00 02 */	lbz r8, 2(r3)
/* 800A939C 000A62DC  88 63 00 01 */	lbz r3, 1(r3)
/* 800A93A0 000A62E0  54 63 40 2E */	slwi r3, r3, 8
/* 800A93A4 000A62E4  98 C5 80 00 */	stb r6, -0x8000(r5)
/* 800A93A8 000A62E8  51 03 06 3E */	rlwimi r3, r8, 0, 0x18, 0x1f
/* 800A93AC 000A62EC  54 63 02 3E */	clrlwi r3, r3, 8
/* 800A93B0 000A62F0  64 63 50 00 */	oris r3, r3, 0x5000
/* 800A93B4 000A62F4  90 65 80 00 */	stw r3, -0x8000(r5)
/* 800A93B8 000A62F8  98 C5 80 00 */	stb r6, -0x8000(r5)
/* 800A93BC 000A62FC  90 E5 80 00 */	stw r7, -0x8000(r5)
/* 800A93C0 000A6300  B0 04 00 02 */	sth r0, 2(r4)
/* 800A93C4 000A6304  4E 80 00 20 */	blr 

.global GXSetCopyFilter
GXSetCopyFilter:
/* 800A93C8 000A6308  94 21 FF B0 */	stwu r1, -0x50(r1)
/* 800A93CC 000A630C  54 60 06 3F */	clrlwi. r0, r3, 0x18
/* 800A93D0 000A6310  BE E1 00 2C */	stmw r23, 0x2c(r1)
/* 800A93D4 000A6314  41 82 01 28 */	beq lbl_800A94FC
/* 800A93D8 000A6318  88 04 00 01 */	lbz r0, 1(r4)
/* 800A93DC 000A631C  88 64 00 07 */	lbz r3, 7(r4)
/* 800A93E0 000A6320  54 1E 20 36 */	slwi r30, r0, 4
/* 800A93E4 000A6324  89 04 00 00 */	lbz r8, 0(r4)
/* 800A93E8 000A6328  88 04 00 13 */	lbz r0, 0x13(r4)
/* 800A93EC 000A632C  54 79 20 36 */	slwi r25, r3, 4
/* 800A93F0 000A6330  89 44 00 06 */	lbz r10, 6(r4)
/* 800A93F4 000A6334  51 1E 07 3E */	rlwimi r30, r8, 0, 0x1c, 0x1f
/* 800A93F8 000A6338  89 64 00 02 */	lbz r11, 2(r4)
/* 800A93FC 000A633C  88 E4 00 0D */	lbz r7, 0xd(r4)
/* 800A9400 000A6340  51 59 07 3E */	rlwimi r25, r10, 0, 0x1c, 0x1f
/* 800A9404 000A6344  55 7B 40 2E */	slwi r27, r11, 8
/* 800A9408 000A6348  89 24 00 08 */	lbz r9, 8(r4)
/* 800A940C 000A634C  88 64 00 0E */	lbz r3, 0xe(r4)
/* 800A9410 000A6350  55 3A 40 2E */	slwi r26, r9, 8
/* 800A9414 000A6354  8B 84 00 03 */	lbz r28, 3(r4)
/* 800A9418 000A6358  53 DB 06 3E */	rlwimi r27, r30, 0, 0x18, 0x1f
/* 800A941C 000A635C  89 24 00 10 */	lbz r9, 0x10(r4)
/* 800A9420 000A6360  54 F7 20 36 */	slwi r23, r7, 4
/* 800A9424 000A6364  89 84 00 0C */	lbz r12, 0xc(r4)
/* 800A9428 000A6368  88 E4 00 15 */	lbz r7, 0x15(r4)
/* 800A942C 000A636C  54 78 40 2E */	slwi r24, r3, 8
/* 800A9430 000A6370  51 97 07 3E */	rlwimi r23, r12, 0, 0x1c, 0x1f
/* 800A9434 000A6374  8B A4 00 12 */	lbz r29, 0x12(r4)
/* 800A9438 000A6378  54 00 20 36 */	slwi r0, r0, 4
/* 800A943C 000A637C  53 A0 07 3E */	rlwimi r0, r29, 0, 0x1c, 0x1f
/* 800A9440 000A6380  89 04 00 14 */	lbz r8, 0x14(r4)
/* 800A9444 000A6384  57 9C 60 26 */	slwi r28, r28, 0xc
/* 800A9448 000A6388  8B E4 00 09 */	lbz r31, 9(r4)
/* 800A944C 000A638C  53 7C 05 3E */	rlwimi r28, r27, 0, 0x14, 0x1f
/* 800A9450 000A6390  8B A4 00 04 */	lbz r29, 4(r4)
/* 800A9454 000A6394  52 F8 06 3E */	rlwimi r24, r23, 0, 0x18, 0x1f
/* 800A9458 000A6398  89 44 00 0F */	lbz r10, 0xf(r4)
/* 800A945C 000A639C  55 17 40 2E */	slwi r23, r8, 8
/* 800A9460 000A63A0  89 84 00 0A */	lbz r12, 0xa(r4)
/* 800A9464 000A63A4  53 3A 06 3E */	rlwimi r26, r25, 0, 0x18, 0x1f
/* 800A9468 000A63A8  88 64 00 16 */	lbz r3, 0x16(r4)
/* 800A946C 000A63AC  55 59 60 26 */	slwi r25, r10, 0xc
/* 800A9470 000A63B0  8B C4 00 05 */	lbz r30, 5(r4)
/* 800A9474 000A63B4  50 17 06 3E */	rlwimi r23, r0, 0, 0x18, 0x1f
/* 800A9478 000A63B8  88 04 00 17 */	lbz r0, 0x17(r4)
/* 800A947C 000A63BC  57 FB 60 26 */	slwi r27, r31, 0xc
/* 800A9480 000A63C0  89 64 00 0B */	lbz r11, 0xb(r4)
/* 800A9484 000A63C4  89 04 00 11 */	lbz r8, 0x11(r4)
/* 800A9488 000A63C8  57 A4 80 1E */	slwi r4, r29, 0x10
/* 800A948C 000A63CC  54 E7 60 26 */	slwi r7, r7, 0xc
/* 800A9490 000A63D0  55 8A 80 1E */	slwi r10, r12, 0x10
/* 800A9494 000A63D4  53 5B 05 3E */	rlwimi r27, r26, 0, 0x14, 0x1f
/* 800A9498 000A63D8  54 6C 80 1E */	slwi r12, r3, 0x10
/* 800A949C 000A63DC  52 E7 05 3E */	rlwimi r7, r23, 0, 0x14, 0x1f
/* 800A94A0 000A63E0  53 84 04 3E */	rlwimi r4, r28, 0, 0x10, 0x1f
/* 800A94A4 000A63E4  57 C3 A0 16 */	slwi r3, r30, 0x14
/* 800A94A8 000A63E8  53 19 05 3E */	rlwimi r25, r24, 0, 0x14, 0x1f
/* 800A94AC 000A63EC  55 29 80 1E */	slwi r9, r9, 0x10
/* 800A94B0 000A63F0  53 6A 04 3E */	rlwimi r10, r27, 0, 0x10, 0x1f
/* 800A94B4 000A63F4  50 83 03 3E */	rlwimi r3, r4, 0, 0xc, 0x1f
/* 800A94B8 000A63F8  50 EC 04 3E */	rlwimi r12, r7, 0, 0x10, 0x1f
/* 800A94BC 000A63FC  54 67 02 3E */	clrlwi r7, r3, 8
/* 800A94C0 000A6400  55 63 A0 16 */	slwi r3, r11, 0x14
/* 800A94C4 000A6404  51 43 03 3E */	rlwimi r3, r10, 0, 0xc, 0x1f
/* 800A94C8 000A6408  54 64 02 3E */	clrlwi r4, r3, 8
/* 800A94CC 000A640C  55 03 A0 16 */	slwi r3, r8, 0x14
/* 800A94D0 000A6410  53 29 04 3E */	rlwimi r9, r25, 0, 0x10, 0x1f
/* 800A94D4 000A6414  51 23 03 3E */	rlwimi r3, r9, 0, 0xc, 0x1f
/* 800A94D8 000A6418  54 00 A0 16 */	slwi r0, r0, 0x14
/* 800A94DC 000A641C  51 80 03 3E */	rlwimi r0, r12, 0, 0xc, 0x1f
/* 800A94E0 000A6420  54 63 02 3E */	clrlwi r3, r3, 8
/* 800A94E4 000A6424  54 00 02 3E */	clrlwi r0, r0, 8
/* 800A94E8 000A6428  64 E8 01 00 */	oris r8, r7, 0x100
/* 800A94EC 000A642C  64 87 02 00 */	oris r7, r4, 0x200
/* 800A94F0 000A6430  64 69 03 00 */	oris r9, r3, 0x300
/* 800A94F4 000A6434  64 0A 04 00 */	oris r10, r0, 0x400
/* 800A94F8 000A6438  48 00 00 24 */	b lbl_800A951C
lbl_800A94FC:
/* 800A94FC 000A643C  3D 00 01 66 */	lis r8, 0x01666666@ha
/* 800A9500 000A6440  3C E0 02 66 */	lis r7, 0x02666666@ha
/* 800A9504 000A6444  3C 80 03 66 */	lis r4, 0x03666666@ha
/* 800A9508 000A6448  3C 60 04 66 */	lis r3, 0x04666666@ha
/* 800A950C 000A644C  39 08 66 66 */	addi r8, r8, 0x01666666@l
/* 800A9510 000A6450  38 E7 66 66 */	addi r7, r7, 0x02666666@l
/* 800A9514 000A6454  39 24 66 66 */	addi r9, r4, 0x03666666@l
/* 800A9518 000A6458  39 43 66 66 */	addi r10, r3, 0x04666666@l
lbl_800A951C:
/* 800A951C 000A645C  38 80 00 61 */	li r4, 0x61
/* 800A9520 000A6460  3C 60 CC 01 */	lis r3, 0xCC008000@ha
/* 800A9524 000A6464  98 83 80 00 */	stb r4, 0xCC008000@l(r3)
/* 800A9528 000A6468  54 A0 06 3F */	clrlwi. r0, r5, 0x18
/* 800A952C 000A646C  91 03 80 00 */	stw r8, -0x8000(r3)
/* 800A9530 000A6470  98 83 80 00 */	stb r4, -0x8000(r3)
/* 800A9534 000A6474  90 E3 80 00 */	stw r7, -0x8000(r3)
/* 800A9538 000A6478  98 83 80 00 */	stb r4, -0x8000(r3)
/* 800A953C 000A647C  91 23 80 00 */	stw r9, -0x8000(r3)
/* 800A9540 000A6480  98 83 80 00 */	stb r4, -0x8000(r3)
/* 800A9544 000A6484  91 43 80 00 */	stw r10, -0x8000(r3)
/* 800A9548 000A6488  41 82 00 68 */	beq lbl_800A95B0
/* 800A954C 000A648C  88 06 00 00 */	lbz r0, 0(r6)
/* 800A9550 000A6490  88 66 00 01 */	lbz r3, 1(r6)
/* 800A9554 000A6494  64 05 53 00 */	oris r5, r0, 0x5300
/* 800A9558 000A6498  88 06 00 04 */	lbz r0, 4(r6)
/* 800A955C 000A649C  88 86 00 02 */	lbz r4, 2(r6)
/* 800A9560 000A64A0  54 A7 06 A6 */	rlwinm r7, r5, 0, 0x1a, 0x13
/* 800A9564 000A64A4  54 65 30 32 */	slwi r5, r3, 6
/* 800A9568 000A64A8  88 66 00 05 */	lbz r3, 5(r6)
/* 800A956C 000A64AC  7C E7 2B 78 */	or r7, r7, r5
/* 800A9570 000A64B0  64 08 54 00 */	oris r8, r0, 0x5400
/* 800A9574 000A64B4  88 A6 00 03 */	lbz r5, 3(r6)
/* 800A9578 000A64B8  88 06 00 06 */	lbz r0, 6(r6)
/* 800A957C 000A64BC  54 E6 05 1A */	rlwinm r6, r7, 0, 0x14, 0xd
/* 800A9580 000A64C0  54 84 60 26 */	slwi r4, r4, 0xc
/* 800A9584 000A64C4  7C C6 23 78 */	or r6, r6, r4
/* 800A9588 000A64C8  55 04 06 A6 */	rlwinm r4, r8, 0, 0x1a, 0x13
/* 800A958C 000A64CC  54 63 30 32 */	slwi r3, r3, 6
/* 800A9590 000A64D0  7C 83 1B 78 */	or r3, r4, r3
/* 800A9594 000A64D4  54 C6 03 8E */	rlwinm r6, r6, 0, 0xe, 7
/* 800A9598 000A64D8  54 A4 90 1A */	slwi r4, r5, 0x12
/* 800A959C 000A64DC  54 63 05 1A */	rlwinm r3, r3, 0, 0x14, 0xd
/* 800A95A0 000A64E0  54 00 60 26 */	slwi r0, r0, 0xc
/* 800A95A4 000A64E4  7C C6 23 78 */	or r6, r6, r4
/* 800A95A8 000A64E8  7C 67 03 78 */	or r7, r3, r0
/* 800A95AC 000A64EC  48 00 00 14 */	b lbl_800A95C0
lbl_800A95B0:
/* 800A95B0 000A64F0  3C 80 53 59 */	lis r4, 0x53595000@ha
/* 800A95B4 000A64F4  3C 60 54 00 */	lis r3, 0x54000015@ha
/* 800A95B8 000A64F8  38 C4 50 00 */	addi r6, r4, 0x53595000@l
/* 800A95BC 000A64FC  38 E3 00 15 */	addi r7, r3, 0x54000015@l
lbl_800A95C0:
/* 800A95C0 000A6500  38 A0 00 61 */	li r5, 0x61
/* 800A95C4 000A6504  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A95C8 000A6508  3C 80 CC 01 */	lis r4, 0xCC008000@ha
/* 800A95CC 000A650C  98 A4 80 00 */	stb r5, 0xCC008000@l(r4)
/* 800A95D0 000A6510  38 00 00 00 */	li r0, 0
/* 800A95D4 000A6514  90 C4 80 00 */	stw r6, -0x8000(r4)
/* 800A95D8 000A6518  98 A4 80 00 */	stb r5, -0x8000(r4)
/* 800A95DC 000A651C  90 E4 80 00 */	stw r7, -0x8000(r4)
/* 800A95E0 000A6520  B0 03 00 02 */	sth r0, 2(r3)
/* 800A95E4 000A6524  BA E1 00 2C */	lmw r23, 0x2c(r1)
/* 800A95E8 000A6528  38 21 00 50 */	addi r1, r1, 0x50
/* 800A95EC 000A652C  4E 80 00 20 */	blr 

.global GXSetDispCopyGamma
GXSetDispCopyGamma:
/* 800A95F0 000A6530  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A95F4 000A6534  54 60 38 30 */	slwi r0, r3, 7
/* 800A95F8 000A6538  84 64 01 EC */	lwzu r3, 0x1ec(r4)
/* 800A95FC 000A653C  54 63 06 6C */	rlwinm r3, r3, 0, 0x19, 0x16
/* 800A9600 000A6540  7C 60 03 78 */	or r0, r3, r0
/* 800A9604 000A6544  90 04 00 00 */	stw r0, 0(r4)
/* 800A9608 000A6548  4E 80 00 20 */	blr 

.global GXCopyDisp
GXCopyDisp:
/* 800A960C 000A654C  54 80 06 3F */	clrlwi. r0, r4, 0x18
/* 800A9610 000A6550  41 82 00 3C */	beq lbl_800A964C
/* 800A9614 000A6554  80 ED 82 C8 */	lwz r7, gx@sda21(r13)
/* 800A9618 000A6558  38 00 00 61 */	li r0, 0x61
/* 800A961C 000A655C  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800A9620 000A6560  80 C7 01 D8 */	lwz r6, 0x1d8(r7)
/* 800A9624 000A6564  54 C6 00 3C */	rlwinm r6, r6, 0, 0, 0x1e
/* 800A9628 000A6568  98 05 80 00 */	stb r0, 0xCC008000@l(r5)
/* 800A962C 000A656C  60 C6 00 01 */	ori r6, r6, 1
/* 800A9630 000A6570  54 C6 07 F6 */	rlwinm r6, r6, 0, 0x1f, 0x1b
/* 800A9634 000A6574  60 C6 00 0E */	ori r6, r6, 0xe
/* 800A9638 000A6578  90 C5 80 00 */	stw r6, -0x8000(r5)
/* 800A963C 000A657C  80 C7 01 D0 */	lwz r6, 0x1d0(r7)
/* 800A9640 000A6580  98 05 80 00 */	stb r0, -0x8000(r5)
/* 800A9644 000A6584  54 C0 00 3A */	rlwinm r0, r6, 0, 0, 0x1d
/* 800A9648 000A6588  90 05 80 00 */	stw r0, -0x8000(r5)
lbl_800A964C:
/* 800A964C 000A658C  54 80 06 3F */	clrlwi. r0, r4, 0x18
/* 800A9650 000A6590  38 00 00 00 */	li r0, 0
/* 800A9654 000A6594  40 82 00 18 */	bne lbl_800A966C
/* 800A9658 000A6598  80 AD 82 C8 */	lwz r5, gx@sda21(r13)
/* 800A965C 000A659C  80 A5 01 DC */	lwz r5, 0x1dc(r5)
/* 800A9660 000A65A0  54 A5 07 7E */	clrlwi r5, r5, 0x1d
/* 800A9664 000A65A4  28 05 00 03 */	cmplwi r5, 3
/* 800A9668 000A65A8  40 82 00 30 */	bne lbl_800A9698
lbl_800A966C:
/* 800A966C 000A65AC  80 AD 82 C8 */	lwz r5, gx@sda21(r13)
/* 800A9670 000A65B0  80 E5 01 DC */	lwz r7, 0x1dc(r5)
/* 800A9674 000A65B4  54 E5 D7 FE */	rlwinm r5, r7, 0x1a, 0x1f, 0x1f
/* 800A9678 000A65B8  28 05 00 01 */	cmplwi r5, 1
/* 800A967C 000A65BC  40 82 00 1C */	bne lbl_800A9698
/* 800A9680 000A65C0  38 00 00 61 */	li r0, 0x61
/* 800A9684 000A65C4  3C C0 CC 01 */	lis r6, 0xCC008000@ha
/* 800A9688 000A65C8  98 06 80 00 */	stb r0, 0xCC008000@l(r6)
/* 800A968C 000A65CC  54 E5 06 B0 */	rlwinm r5, r7, 0, 0x1a, 0x18
/* 800A9690 000A65D0  38 00 00 01 */	li r0, 1
/* 800A9694 000A65D4  90 A6 80 00 */	stw r5, -0x8000(r6)
lbl_800A9698:
/* 800A9698 000A65D8  39 20 00 61 */	li r9, 0x61
/* 800A969C 000A65DC  80 ED 82 C8 */	lwz r7, gx@sda21(r13)
/* 800A96A0 000A65E0  3D 00 CC 01 */	lis r8, 0xCC008000@ha
/* 800A96A4 000A65E4  99 28 80 00 */	stb r9, 0xCC008000@l(r8)
/* 800A96A8 000A65E8  54 63 DA 3E */	rlwinm r3, r3, 0x1b, 8, 0x1f
/* 800A96AC 000A65EC  64 6A 4B 00 */	oris r10, r3, 0x4b00
/* 800A96B0 000A65F0  80 C7 01 E0 */	lwz r6, 0x1e0(r7)
/* 800A96B4 000A65F4  54 85 06 3F */	clrlwi. r5, r4, 0x18
/* 800A96B8 000A65F8  54 83 5B 68 */	rlwinm r3, r4, 0xb, 0xd, 0x14
/* 800A96BC 000A65FC  90 C8 80 00 */	stw r6, -0x8000(r8)
/* 800A96C0 000A6600  99 28 80 00 */	stb r9, -0x8000(r8)
/* 800A96C4 000A6604  80 87 01 E4 */	lwz r4, 0x1e4(r7)
/* 800A96C8 000A6608  90 88 80 00 */	stw r4, -0x8000(r8)
/* 800A96CC 000A660C  99 28 80 00 */	stb r9, -0x8000(r8)
/* 800A96D0 000A6610  80 87 01 E8 */	lwz r4, 0x1e8(r7)
/* 800A96D4 000A6614  90 88 80 00 */	stw r4, -0x8000(r8)
/* 800A96D8 000A6618  99 28 80 00 */	stb r9, -0x8000(r8)
/* 800A96DC 000A661C  91 48 80 00 */	stw r10, -0x8000(r8)
/* 800A96E0 000A6620  80 87 01 EC */	lwz r4, 0x1ec(r7)
/* 800A96E4 000A6624  54 84 05 66 */	rlwinm r4, r4, 0, 0x15, 0x13
/* 800A96E8 000A6628  7C 83 1B 78 */	or r3, r4, r3
/* 800A96EC 000A662C  90 67 01 EC */	stw r3, 0x1ec(r7)
/* 800A96F0 000A6630  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A96F4 000A6634  38 83 01 EC */	addi r4, r3, 0x1ec
/* 800A96F8 000A6638  80 63 01 EC */	lwz r3, 0x1ec(r3)
/* 800A96FC 000A663C  54 63 04 A0 */	rlwinm r3, r3, 0, 0x12, 0x10
/* 800A9700 000A6640  60 63 40 00 */	ori r3, r3, 0x4000
/* 800A9704 000A6644  90 64 00 00 */	stw r3, 0(r4)
/* 800A9708 000A6648  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A970C 000A664C  38 83 01 EC */	addi r4, r3, 0x1ec
/* 800A9710 000A6650  80 63 01 EC */	lwz r3, 0x1ec(r3)
/* 800A9714 000A6654  54 63 02 3E */	clrlwi r3, r3, 8
/* 800A9718 000A6658  64 63 52 00 */	oris r3, r3, 0x5200
/* 800A971C 000A665C  90 64 00 00 */	stw r3, 0(r4)
/* 800A9720 000A6660  99 28 80 00 */	stb r9, -0x8000(r8)
/* 800A9724 000A6664  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A9728 000A6668  80 64 01 EC */	lwz r3, 0x1ec(r4)
/* 800A972C 000A666C  90 68 80 00 */	stw r3, -0x8000(r8)
/* 800A9730 000A6670  41 82 00 1C */	beq lbl_800A974C
/* 800A9734 000A6674  99 28 80 00 */	stb r9, -0x8000(r8)
/* 800A9738 000A6678  80 64 01 D8 */	lwz r3, 0x1d8(r4)
/* 800A973C 000A667C  90 68 80 00 */	stw r3, -0x8000(r8)
/* 800A9740 000A6680  99 28 80 00 */	stb r9, -0x8000(r8)
/* 800A9744 000A6684  80 64 01 D0 */	lwz r3, 0x1d0(r4)
/* 800A9748 000A6688  90 68 80 00 */	stw r3, -0x8000(r8)
lbl_800A974C:
/* 800A974C 000A668C  54 00 06 3F */	clrlwi. r0, r0, 0x18
/* 800A9750 000A6690  41 82 00 1C */	beq lbl_800A976C
/* 800A9754 000A6694  38 00 00 61 */	li r0, 0x61
/* 800A9758 000A6698  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A975C 000A669C  3C 80 CC 01 */	lis r4, 0xCC008000@ha
/* 800A9760 000A66A0  98 04 80 00 */	stb r0, 0xCC008000@l(r4)
/* 800A9764 000A66A4  80 03 01 DC */	lwz r0, 0x1dc(r3)
/* 800A9768 000A66A8  90 04 80 00 */	stw r0, -0x8000(r4)
lbl_800A976C:
/* 800A976C 000A66AC  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A9770 000A66B0  38 00 00 00 */	li r0, 0
/* 800A9774 000A66B4  B0 03 00 02 */	sth r0, 2(r3)
/* 800A9778 000A66B8  4E 80 00 20 */	blr 

.global GXCopyTex
GXCopyTex:
/* 800A977C 000A66BC  54 80 06 3F */	clrlwi. r0, r4, 0x18
/* 800A9780 000A66C0  41 82 00 3C */	beq lbl_800A97BC
/* 800A9784 000A66C4  80 ED 82 C8 */	lwz r7, gx@sda21(r13)
/* 800A9788 000A66C8  38 00 00 61 */	li r0, 0x61
/* 800A978C 000A66CC  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800A9790 000A66D0  80 C7 01 D8 */	lwz r6, 0x1d8(r7)
/* 800A9794 000A66D4  54 C6 00 3C */	rlwinm r6, r6, 0, 0, 0x1e
/* 800A9798 000A66D8  98 05 80 00 */	stb r0, 0xCC008000@l(r5)
/* 800A979C 000A66DC  60 C6 00 01 */	ori r6, r6, 1
/* 800A97A0 000A66E0  54 C6 07 F6 */	rlwinm r6, r6, 0, 0x1f, 0x1b
/* 800A97A4 000A66E4  60 C6 00 0E */	ori r6, r6, 0xe
/* 800A97A8 000A66E8  90 C5 80 00 */	stw r6, -0x8000(r5)
/* 800A97AC 000A66EC  80 C7 01 D0 */	lwz r6, 0x1d0(r7)
/* 800A97B0 000A66F0  98 05 80 00 */	stb r0, -0x8000(r5)
/* 800A97B4 000A66F4  54 C0 00 3A */	rlwinm r0, r6, 0, 0, 0x1d
/* 800A97B8 000A66F8  90 05 80 00 */	stw r0, -0x8000(r5)
lbl_800A97BC:
/* 800A97BC 000A66FC  80 CD 82 C8 */	lwz r6, gx@sda21(r13)
/* 800A97C0 000A6700  38 00 00 00 */	li r0, 0
/* 800A97C4 000A6704  88 A6 02 00 */	lbz r5, 0x200(r6)
/* 800A97C8 000A6708  80 E6 01 DC */	lwz r7, 0x1dc(r6)
/* 800A97CC 000A670C  28 05 00 00 */	cmplwi r5, 0
/* 800A97D0 000A6710  41 82 00 1C */	beq lbl_800A97EC
/* 800A97D4 000A6714  54 E5 07 7E */	clrlwi r5, r7, 0x1d
/* 800A97D8 000A6718  28 05 00 03 */	cmplwi r5, 3
/* 800A97DC 000A671C  41 82 00 10 */	beq lbl_800A97EC
/* 800A97E0 000A6720  54 E0 00 38 */	rlwinm r0, r7, 0, 0, 0x1c
/* 800A97E4 000A6724  60 07 00 03 */	ori r7, r0, 3
/* 800A97E8 000A6728  38 00 00 01 */	li r0, 1
lbl_800A97EC:
/* 800A97EC 000A672C  54 85 06 3F */	clrlwi. r5, r4, 0x18
/* 800A97F0 000A6730  40 82 00 10 */	bne lbl_800A9800
/* 800A97F4 000A6734  54 E5 07 7E */	clrlwi r5, r7, 0x1d
/* 800A97F8 000A6738  28 05 00 03 */	cmplwi r5, 3
/* 800A97FC 000A673C  40 82 00 18 */	bne lbl_800A9814
lbl_800A9800:
/* 800A9800 000A6740  54 E5 D7 FE */	rlwinm r5, r7, 0x1a, 0x1f, 0x1f
/* 800A9804 000A6744  28 05 00 01 */	cmplwi r5, 1
/* 800A9808 000A6748  40 82 00 0C */	bne lbl_800A9814
/* 800A980C 000A674C  38 00 00 01 */	li r0, 1
/* 800A9810 000A6750  54 E7 06 B0 */	rlwinm r7, r7, 0, 0x1a, 0x18
lbl_800A9814:
/* 800A9814 000A6754  54 05 06 3F */	clrlwi. r5, r0, 0x18
/* 800A9818 000A6758  41 82 00 14 */	beq lbl_800A982C
/* 800A981C 000A675C  38 C0 00 61 */	li r6, 0x61
/* 800A9820 000A6760  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800A9824 000A6764  98 C5 80 00 */	stb r6, 0xCC008000@l(r5)
/* 800A9828 000A6768  90 E5 80 00 */	stw r7, -0x8000(r5)
lbl_800A982C:
/* 800A982C 000A676C  39 20 00 61 */	li r9, 0x61
/* 800A9830 000A6770  80 ED 82 C8 */	lwz r7, gx@sda21(r13)
/* 800A9834 000A6774  3D 00 CC 01 */	lis r8, 0xCC008000@ha
/* 800A9838 000A6778  99 28 80 00 */	stb r9, 0xCC008000@l(r8)
/* 800A983C 000A677C  54 63 DA 3E */	rlwinm r3, r3, 0x1b, 8, 0x1f
/* 800A9840 000A6780  64 6A 4B 00 */	oris r10, r3, 0x4b00
/* 800A9844 000A6784  80 C7 01 F0 */	lwz r6, 0x1f0(r7)
/* 800A9848 000A6788  54 85 06 3F */	clrlwi. r5, r4, 0x18
/* 800A984C 000A678C  54 83 5B 68 */	rlwinm r3, r4, 0xb, 0xd, 0x14
/* 800A9850 000A6790  90 C8 80 00 */	stw r6, -0x8000(r8)
/* 800A9854 000A6794  99 28 80 00 */	stb r9, -0x8000(r8)
/* 800A9858 000A6798  80 87 01 F4 */	lwz r4, 0x1f4(r7)
/* 800A985C 000A679C  90 88 80 00 */	stw r4, -0x8000(r8)
/* 800A9860 000A67A0  99 28 80 00 */	stb r9, -0x8000(r8)
/* 800A9864 000A67A4  80 87 01 F8 */	lwz r4, 0x1f8(r7)
/* 800A9868 000A67A8  90 88 80 00 */	stw r4, -0x8000(r8)
/* 800A986C 000A67AC  99 28 80 00 */	stb r9, -0x8000(r8)
/* 800A9870 000A67B0  91 48 80 00 */	stw r10, -0x8000(r8)
/* 800A9874 000A67B4  80 87 01 FC */	lwz r4, 0x1fc(r7)
/* 800A9878 000A67B8  54 84 05 66 */	rlwinm r4, r4, 0, 0x15, 0x13
/* 800A987C 000A67BC  7C 83 1B 78 */	or r3, r4, r3
/* 800A9880 000A67C0  90 67 01 FC */	stw r3, 0x1fc(r7)
/* 800A9884 000A67C4  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A9888 000A67C8  38 83 01 FC */	addi r4, r3, 0x1fc
/* 800A988C 000A67CC  80 63 01 FC */	lwz r3, 0x1fc(r3)
/* 800A9890 000A67D0  54 63 04 A0 */	rlwinm r3, r3, 0, 0x12, 0x10
/* 800A9894 000A67D4  90 64 00 00 */	stw r3, 0(r4)
/* 800A9898 000A67D8  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A989C 000A67DC  38 83 01 FC */	addi r4, r3, 0x1fc
/* 800A98A0 000A67E0  80 63 01 FC */	lwz r3, 0x1fc(r3)
/* 800A98A4 000A67E4  54 63 02 3E */	clrlwi r3, r3, 8
/* 800A98A8 000A67E8  64 63 52 00 */	oris r3, r3, 0x5200
/* 800A98AC 000A67EC  90 64 00 00 */	stw r3, 0(r4)
/* 800A98B0 000A67F0  99 28 80 00 */	stb r9, -0x8000(r8)
/* 800A98B4 000A67F4  80 8D 82 C8 */	lwz r4, gx@sda21(r13)
/* 800A98B8 000A67F8  80 64 01 FC */	lwz r3, 0x1fc(r4)
/* 800A98BC 000A67FC  90 68 80 00 */	stw r3, -0x8000(r8)
/* 800A98C0 000A6800  41 82 00 1C */	beq lbl_800A98DC
/* 800A98C4 000A6804  99 28 80 00 */	stb r9, -0x8000(r8)
/* 800A98C8 000A6808  80 64 01 D8 */	lwz r3, 0x1d8(r4)
/* 800A98CC 000A680C  90 68 80 00 */	stw r3, -0x8000(r8)
/* 800A98D0 000A6810  99 28 80 00 */	stb r9, -0x8000(r8)
/* 800A98D4 000A6814  80 64 01 D0 */	lwz r3, 0x1d0(r4)
/* 800A98D8 000A6818  90 68 80 00 */	stw r3, -0x8000(r8)
lbl_800A98DC:
/* 800A98DC 000A681C  54 00 06 3F */	clrlwi. r0, r0, 0x18
/* 800A98E0 000A6820  41 82 00 1C */	beq lbl_800A98FC
/* 800A98E4 000A6824  38 00 00 61 */	li r0, 0x61
/* 800A98E8 000A6828  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A98EC 000A682C  3C 80 CC 01 */	lis r4, 0xCC008000@ha
/* 800A98F0 000A6830  98 04 80 00 */	stb r0, 0xCC008000@l(r4)
/* 800A98F4 000A6834  80 03 01 DC */	lwz r0, 0x1dc(r3)
/* 800A98F8 000A6838  90 04 80 00 */	stw r0, -0x8000(r4)
lbl_800A98FC:
/* 800A98FC 000A683C  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A9900 000A6840  38 00 00 00 */	li r0, 0
/* 800A9904 000A6844  B0 03 00 02 */	sth r0, 2(r3)
/* 800A9908 000A6848  4E 80 00 20 */	blr 

.global GXClearBoundingBox
GXClearBoundingBox:
/* 800A990C 000A684C  38 C0 00 61 */	li r6, 0x61
/* 800A9910 000A6850  80 6D 82 C8 */	lwz r3, gx@sda21(r13)
/* 800A9914 000A6854  3C A0 CC 01 */	lis r5, 0xCC008000@ha
/* 800A9918 000A6858  3C 80 55 00 */	lis r4, 0x550003FF@ha
/* 800A991C 000A685C  98 C5 80 00 */	stb r6, 0xCC008000@l(r5)
/* 800A9920 000A6860  38 04 03 FF */	addi r0, r4, 0x550003FF@l
/* 800A9924 000A6864  90 05 80 00 */	stw r0, -0x8000(r5)
/* 800A9928 000A6868  3C 80 56 00 */	lis r4, 0x560003FF@ha
/* 800A992C 000A686C  38 84 03 FF */	addi r4, r4, 0x560003FF@l
/* 800A9930 000A6870  98 C5 80 00 */	stb r6, -0x8000(r5)
/* 800A9934 000A6874  38 00 00 00 */	li r0, 0
/* 800A9938 000A6878  90 85 80 00 */	stw r4, -0x8000(r5)
/* 800A993C 000A687C  B0 03 00 02 */	sth r0, 2(r3)
/* 800A9940 000A6880  4E 80 00 20 */	blr 

.section .data, "wa"  # 0x803A8380 - 0x803E6000
    .balign 8
.global GXNtsc480IntDf
GXNtsc480IntDf:
	.4byte 0
	.4byte 0x028001E0
	.4byte 0x01E00028
	.4byte 0x00000280
	.4byte 0x01E00000
	.4byte 0x00000001
	.4byte 0x00000606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060808
	.4byte 0x0A0C0A08
	.4byte 0x08000000
.global GXNtsc480Int
GXNtsc480Int:
	.4byte 0
	.4byte 0x028001E0
	.4byte 0x01E00028
	.4byte 0x00000280
	.4byte 0x01E00000
	.4byte 0x00000001
	.4byte 0x00000606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060000
	.4byte 0x15161500
	.4byte 0
.global GXMpal480IntDf
GXMpal480IntDf:
	.4byte 0x00000008
	.4byte 0x028001E0
	.4byte 0x01E00028
	.4byte 0x00000280
	.4byte 0x01E00000
	.4byte 0x00000001
	.4byte 0x00000606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060808
	.4byte 0x0A0C0A08
	.4byte 0x08000000
.global GXPal528IntDf
GXPal528IntDf:
	.4byte 0x00000004
	.4byte 0x02800210
	.4byte 0x02100028
	.4byte 0x00170280
	.4byte 0x02100000
	.4byte 0x00000001
	.4byte 0x00000606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060808
	.4byte 0x0A0C0A08
	.4byte 0x08000000
.global GXEurgb60Hz480IntDf
GXEurgb60Hz480IntDf:
	.4byte 0x00000014
	.4byte 0x028001E0
	.4byte 0x01E00028
	.4byte 0x00000280
	.4byte 0x01E00000
	.4byte 0x00000001
	.4byte 0x00000606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060606
	.4byte 0x06060808
	.4byte 0x0A0C0A08
	.4byte 0x08000000
	.4byte 0

.section .sdata2, "a"  # 0x8040B460 - 0x80414020
.balign 8
"@83":
	.4byte 0x43800000
	.4byte 0
"@138":
	.4byte 0x43300000
	.4byte 0