summaryrefslogtreecommitdiff
path: root/asm/Dolphin/gd/GDLight.s
blob: 6e2a25d88bfe4c0e317384fec6e9aeced8b4ad0d (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
.include "macros.inc"

.section .text, "ax"  # 0x80005600 - 0x8036FBA0
.global GDSetLightAttn
GDSetLightAttn:
/* 800B0784 000AD6C4  7C 08 02 A6 */	mflr r0
/* 800B0788 000AD6C8  90 01 00 04 */	stw r0, 4(r1)
/* 800B078C 000AD6CC  7C 60 00 34 */	cntlzw r0, r3
/* 800B0790 000AD6D0  20 80 00 1F */	subfic r4, r0, 0x1f
/* 800B0794 000AD6D4  94 21 FF 70 */	stwu r1, -0x90(r1)
/* 800B0798 000AD6D8  54 80 04 3E */	clrlwi r0, r4, 0x10
/* 800B079C 000AD6DC  28 00 00 07 */	cmplwi r0, 7
/* 800B07A0 000AD6E0  DB E1 00 88 */	stfd f31, 0x88(r1)
/* 800B07A4 000AD6E4  FF E0 30 90 */	fmr f31, f6
/* 800B07A8 000AD6E8  DB C1 00 80 */	stfd f30, 0x80(r1)
/* 800B07AC 000AD6EC  FF C0 28 90 */	fmr f30, f5
/* 800B07B0 000AD6F0  DB A1 00 78 */	stfd f29, 0x78(r1)
/* 800B07B4 000AD6F4  FF A0 20 90 */	fmr f29, f4
/* 800B07B8 000AD6F8  DB 81 00 70 */	stfd f28, 0x70(r1)
/* 800B07BC 000AD6FC  FF 80 18 90 */	fmr f28, f3
/* 800B07C0 000AD700  DB 61 00 68 */	stfd f27, 0x68(r1)
/* 800B07C4 000AD704  FF 60 10 90 */	fmr f27, f2
/* 800B07C8 000AD708  DB 41 00 60 */	stfd f26, 0x60(r1)
/* 800B07CC 000AD70C  FF 40 08 90 */	fmr f26, f1
/* 800B07D0 000AD710  93 E1 00 5C */	stw r31, 0x5c(r1)
/* 800B07D4 000AD714  40 81 00 08 */	ble lbl_800B07DC
/* 800B07D8 000AD718  38 80 00 00 */	li r4, 0
lbl_800B07DC:
/* 800B07DC 000AD71C  80 AD 95 B8 */	lwz r5, __GDCurrentDL@sda21(r13)
/* 800B07E0 000AD720  54 84 24 36 */	rlwinm r4, r4, 4, 0x10, 0x1b
/* 800B07E4 000AD724  3B E4 06 04 */	addi r31, r4, 0x604
/* 800B07E8 000AD728  80 65 00 08 */	lwz r3, 8(r5)
/* 800B07EC 000AD72C  80 05 00 0C */	lwz r0, 0xc(r5)
/* 800B07F0 000AD730  38 63 00 01 */	addi r3, r3, 1
/* 800B07F4 000AD734  7C 03 00 40 */	cmplw r3, r0
/* 800B07F8 000AD738  40 81 00 08 */	ble lbl_800B0800
/* 800B07FC 000AD73C  4B FF E9 59 */	bl GDOverflowed
lbl_800B0800:
/* 800B0800 000AD740  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0804 000AD744  38 A0 00 10 */	li r5, 0x10
/* 800B0808 000AD748  80 64 00 08 */	lwz r3, 8(r4)
/* 800B080C 000AD74C  38 03 00 01 */	addi r0, r3, 1
/* 800B0810 000AD750  90 04 00 08 */	stw r0, 8(r4)
/* 800B0814 000AD754  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0818 000AD758  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B081C 000AD75C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0820 000AD760  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B0824 000AD764  38 63 00 02 */	addi r3, r3, 2
/* 800B0828 000AD768  7C 03 00 40 */	cmplw r3, r0
/* 800B082C 000AD76C  40 81 00 08 */	ble lbl_800B0834
/* 800B0830 000AD770  4B FF E9 25 */	bl GDOverflowed
lbl_800B0834:
/* 800B0834 000AD774  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0838 000AD778  38 C0 00 00 */	li r6, 0
/* 800B083C 000AD77C  38 A0 00 05 */	li r5, 5
/* 800B0840 000AD780  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0844 000AD784  38 03 00 01 */	addi r0, r3, 1
/* 800B0848 000AD788  90 04 00 08 */	stw r0, 8(r4)
/* 800B084C 000AD78C  98 C3 00 00 */	stb r6, 0(r3)
/* 800B0850 000AD790  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0854 000AD794  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0858 000AD798  38 03 00 01 */	addi r0, r3, 1
/* 800B085C 000AD79C  90 04 00 08 */	stw r0, 8(r4)
/* 800B0860 000AD7A0  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0864 000AD7A4  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0868 000AD7A8  80 64 00 08 */	lwz r3, 8(r4)
/* 800B086C 000AD7AC  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B0870 000AD7B0  38 63 00 02 */	addi r3, r3, 2
/* 800B0874 000AD7B4  7C 03 00 40 */	cmplw r3, r0
/* 800B0878 000AD7B8  40 81 00 08 */	ble lbl_800B0880
/* 800B087C 000AD7BC  4B FF E8 D9 */	bl GDOverflowed
lbl_800B0880:
/* 800B0880 000AD7C0  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0884 000AD7C4  57 E5 C6 3E */	rlwinm r5, r31, 0x18, 0x18, 0x1f
/* 800B0888 000AD7C8  80 64 00 08 */	lwz r3, 8(r4)
/* 800B088C 000AD7CC  38 03 00 01 */	addi r0, r3, 1
/* 800B0890 000AD7D0  90 04 00 08 */	stw r0, 8(r4)
/* 800B0894 000AD7D4  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0898 000AD7D8  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B089C 000AD7DC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B08A0 000AD7E0  38 03 00 01 */	addi r0, r3, 1
/* 800B08A4 000AD7E4  90 04 00 08 */	stw r0, 8(r4)
/* 800B08A8 000AD7E8  9B E3 00 00 */	stb r31, 0(r3)
/* 800B08AC 000AD7EC  D3 41 00 54 */	stfs f26, 0x54(r1)
/* 800B08B0 000AD7F0  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B08B4 000AD7F4  80 64 00 08 */	lwz r3, 8(r4)
/* 800B08B8 000AD7F8  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B08BC 000AD7FC  38 63 00 04 */	addi r3, r3, 4
/* 800B08C0 000AD800  7C 03 00 40 */	cmplw r3, r0
/* 800B08C4 000AD804  40 81 00 08 */	ble lbl_800B08CC
/* 800B08C8 000AD808  4B FF E8 8D */	bl GDOverflowed
lbl_800B08CC:
/* 800B08CC 000AD80C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B08D0 000AD810  80 01 00 54 */	lwz r0, 0x54(r1)
/* 800B08D4 000AD814  80 64 00 08 */	lwz r3, 8(r4)
/* 800B08D8 000AD818  54 05 46 3E */	srwi r5, r0, 0x18
/* 800B08DC 000AD81C  38 03 00 01 */	addi r0, r3, 1
/* 800B08E0 000AD820  90 04 00 08 */	stw r0, 8(r4)
/* 800B08E4 000AD824  98 A3 00 00 */	stb r5, 0(r3)
/* 800B08E8 000AD828  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B08EC 000AD82C  80 01 00 54 */	lwz r0, 0x54(r1)
/* 800B08F0 000AD830  80 64 00 08 */	lwz r3, 8(r4)
/* 800B08F4 000AD834  54 05 86 3E */	rlwinm r5, r0, 0x10, 0x18, 0x1f
/* 800B08F8 000AD838  38 03 00 01 */	addi r0, r3, 1
/* 800B08FC 000AD83C  90 04 00 08 */	stw r0, 8(r4)
/* 800B0900 000AD840  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0904 000AD844  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0908 000AD848  80 01 00 54 */	lwz r0, 0x54(r1)
/* 800B090C 000AD84C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0910 000AD850  54 05 C6 3E */	rlwinm r5, r0, 0x18, 0x18, 0x1f
/* 800B0914 000AD854  38 03 00 01 */	addi r0, r3, 1
/* 800B0918 000AD858  90 04 00 08 */	stw r0, 8(r4)
/* 800B091C 000AD85C  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0920 000AD860  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0924 000AD864  80 A1 00 54 */	lwz r5, 0x54(r1)
/* 800B0928 000AD868  80 64 00 08 */	lwz r3, 8(r4)
/* 800B092C 000AD86C  38 03 00 01 */	addi r0, r3, 1
/* 800B0930 000AD870  90 04 00 08 */	stw r0, 8(r4)
/* 800B0934 000AD874  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0938 000AD878  D3 61 00 50 */	stfs f27, 0x50(r1)
/* 800B093C 000AD87C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0940 000AD880  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0944 000AD884  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B0948 000AD888  38 63 00 04 */	addi r3, r3, 4
/* 800B094C 000AD88C  7C 03 00 40 */	cmplw r3, r0
/* 800B0950 000AD890  40 81 00 08 */	ble lbl_800B0958
/* 800B0954 000AD894  4B FF E8 01 */	bl GDOverflowed
lbl_800B0958:
/* 800B0958 000AD898  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B095C 000AD89C  80 01 00 50 */	lwz r0, 0x50(r1)
/* 800B0960 000AD8A0  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0964 000AD8A4  54 05 46 3E */	srwi r5, r0, 0x18
/* 800B0968 000AD8A8  38 03 00 01 */	addi r0, r3, 1
/* 800B096C 000AD8AC  90 04 00 08 */	stw r0, 8(r4)
/* 800B0970 000AD8B0  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0974 000AD8B4  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0978 000AD8B8  80 01 00 50 */	lwz r0, 0x50(r1)
/* 800B097C 000AD8BC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0980 000AD8C0  54 05 86 3E */	rlwinm r5, r0, 0x10, 0x18, 0x1f
/* 800B0984 000AD8C4  38 03 00 01 */	addi r0, r3, 1
/* 800B0988 000AD8C8  90 04 00 08 */	stw r0, 8(r4)
/* 800B098C 000AD8CC  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0990 000AD8D0  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0994 000AD8D4  80 01 00 50 */	lwz r0, 0x50(r1)
/* 800B0998 000AD8D8  80 64 00 08 */	lwz r3, 8(r4)
/* 800B099C 000AD8DC  54 05 C6 3E */	rlwinm r5, r0, 0x18, 0x18, 0x1f
/* 800B09A0 000AD8E0  38 03 00 01 */	addi r0, r3, 1
/* 800B09A4 000AD8E4  90 04 00 08 */	stw r0, 8(r4)
/* 800B09A8 000AD8E8  98 A3 00 00 */	stb r5, 0(r3)
/* 800B09AC 000AD8EC  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B09B0 000AD8F0  80 A1 00 50 */	lwz r5, 0x50(r1)
/* 800B09B4 000AD8F4  80 64 00 08 */	lwz r3, 8(r4)
/* 800B09B8 000AD8F8  38 03 00 01 */	addi r0, r3, 1
/* 800B09BC 000AD8FC  90 04 00 08 */	stw r0, 8(r4)
/* 800B09C0 000AD900  98 A3 00 00 */	stb r5, 0(r3)
/* 800B09C4 000AD904  D3 81 00 4C */	stfs f28, 0x4c(r1)
/* 800B09C8 000AD908  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B09CC 000AD90C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B09D0 000AD910  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B09D4 000AD914  38 63 00 04 */	addi r3, r3, 4
/* 800B09D8 000AD918  7C 03 00 40 */	cmplw r3, r0
/* 800B09DC 000AD91C  40 81 00 08 */	ble lbl_800B09E4
/* 800B09E0 000AD920  4B FF E7 75 */	bl GDOverflowed
lbl_800B09E4:
/* 800B09E4 000AD924  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B09E8 000AD928  80 01 00 4C */	lwz r0, 0x4c(r1)
/* 800B09EC 000AD92C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B09F0 000AD930  54 05 46 3E */	srwi r5, r0, 0x18
/* 800B09F4 000AD934  38 03 00 01 */	addi r0, r3, 1
/* 800B09F8 000AD938  90 04 00 08 */	stw r0, 8(r4)
/* 800B09FC 000AD93C  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0A00 000AD940  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0A04 000AD944  80 01 00 4C */	lwz r0, 0x4c(r1)
/* 800B0A08 000AD948  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0A0C 000AD94C  54 05 86 3E */	rlwinm r5, r0, 0x10, 0x18, 0x1f
/* 800B0A10 000AD950  38 03 00 01 */	addi r0, r3, 1
/* 800B0A14 000AD954  90 04 00 08 */	stw r0, 8(r4)
/* 800B0A18 000AD958  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0A1C 000AD95C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0A20 000AD960  80 01 00 4C */	lwz r0, 0x4c(r1)
/* 800B0A24 000AD964  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0A28 000AD968  54 05 C6 3E */	rlwinm r5, r0, 0x18, 0x18, 0x1f
/* 800B0A2C 000AD96C  38 03 00 01 */	addi r0, r3, 1
/* 800B0A30 000AD970  90 04 00 08 */	stw r0, 8(r4)
/* 800B0A34 000AD974  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0A38 000AD978  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0A3C 000AD97C  80 A1 00 4C */	lwz r5, 0x4c(r1)
/* 800B0A40 000AD980  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0A44 000AD984  38 03 00 01 */	addi r0, r3, 1
/* 800B0A48 000AD988  90 04 00 08 */	stw r0, 8(r4)
/* 800B0A4C 000AD98C  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0A50 000AD990  D3 A1 00 48 */	stfs f29, 0x48(r1)
/* 800B0A54 000AD994  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0A58 000AD998  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0A5C 000AD99C  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B0A60 000AD9A0  38 63 00 04 */	addi r3, r3, 4
/* 800B0A64 000AD9A4  7C 03 00 40 */	cmplw r3, r0
/* 800B0A68 000AD9A8  40 81 00 08 */	ble lbl_800B0A70
/* 800B0A6C 000AD9AC  4B FF E6 E9 */	bl GDOverflowed
lbl_800B0A70:
/* 800B0A70 000AD9B0  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0A74 000AD9B4  80 01 00 48 */	lwz r0, 0x48(r1)
/* 800B0A78 000AD9B8  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0A7C 000AD9BC  54 05 46 3E */	srwi r5, r0, 0x18
/* 800B0A80 000AD9C0  38 03 00 01 */	addi r0, r3, 1
/* 800B0A84 000AD9C4  90 04 00 08 */	stw r0, 8(r4)
/* 800B0A88 000AD9C8  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0A8C 000AD9CC  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0A90 000AD9D0  80 01 00 48 */	lwz r0, 0x48(r1)
/* 800B0A94 000AD9D4  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0A98 000AD9D8  54 05 86 3E */	rlwinm r5, r0, 0x10, 0x18, 0x1f
/* 800B0A9C 000AD9DC  38 03 00 01 */	addi r0, r3, 1
/* 800B0AA0 000AD9E0  90 04 00 08 */	stw r0, 8(r4)
/* 800B0AA4 000AD9E4  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0AA8 000AD9E8  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0AAC 000AD9EC  80 01 00 48 */	lwz r0, 0x48(r1)
/* 800B0AB0 000AD9F0  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0AB4 000AD9F4  54 05 C6 3E */	rlwinm r5, r0, 0x18, 0x18, 0x1f
/* 800B0AB8 000AD9F8  38 03 00 01 */	addi r0, r3, 1
/* 800B0ABC 000AD9FC  90 04 00 08 */	stw r0, 8(r4)
/* 800B0AC0 000ADA00  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0AC4 000ADA04  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0AC8 000ADA08  80 A1 00 48 */	lwz r5, 0x48(r1)
/* 800B0ACC 000ADA0C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0AD0 000ADA10  38 03 00 01 */	addi r0, r3, 1
/* 800B0AD4 000ADA14  90 04 00 08 */	stw r0, 8(r4)
/* 800B0AD8 000ADA18  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0ADC 000ADA1C  D3 C1 00 44 */	stfs f30, 0x44(r1)
/* 800B0AE0 000ADA20  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0AE4 000ADA24  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0AE8 000ADA28  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B0AEC 000ADA2C  38 63 00 04 */	addi r3, r3, 4
/* 800B0AF0 000ADA30  7C 03 00 40 */	cmplw r3, r0
/* 800B0AF4 000ADA34  40 81 00 08 */	ble lbl_800B0AFC
/* 800B0AF8 000ADA38  4B FF E6 5D */	bl GDOverflowed
lbl_800B0AFC:
/* 800B0AFC 000ADA3C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0B00 000ADA40  80 01 00 44 */	lwz r0, 0x44(r1)
/* 800B0B04 000ADA44  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0B08 000ADA48  54 05 46 3E */	srwi r5, r0, 0x18
/* 800B0B0C 000ADA4C  38 03 00 01 */	addi r0, r3, 1
/* 800B0B10 000ADA50  90 04 00 08 */	stw r0, 8(r4)
/* 800B0B14 000ADA54  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0B18 000ADA58  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0B1C 000ADA5C  80 01 00 44 */	lwz r0, 0x44(r1)
/* 800B0B20 000ADA60  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0B24 000ADA64  54 05 86 3E */	rlwinm r5, r0, 0x10, 0x18, 0x1f
/* 800B0B28 000ADA68  38 03 00 01 */	addi r0, r3, 1
/* 800B0B2C 000ADA6C  90 04 00 08 */	stw r0, 8(r4)
/* 800B0B30 000ADA70  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0B34 000ADA74  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0B38 000ADA78  80 01 00 44 */	lwz r0, 0x44(r1)
/* 800B0B3C 000ADA7C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0B40 000ADA80  54 05 C6 3E */	rlwinm r5, r0, 0x18, 0x18, 0x1f
/* 800B0B44 000ADA84  38 03 00 01 */	addi r0, r3, 1
/* 800B0B48 000ADA88  90 04 00 08 */	stw r0, 8(r4)
/* 800B0B4C 000ADA8C  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0B50 000ADA90  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0B54 000ADA94  80 A1 00 44 */	lwz r5, 0x44(r1)
/* 800B0B58 000ADA98  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0B5C 000ADA9C  38 03 00 01 */	addi r0, r3, 1
/* 800B0B60 000ADAA0  90 04 00 08 */	stw r0, 8(r4)
/* 800B0B64 000ADAA4  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0B68 000ADAA8  D3 E1 00 40 */	stfs f31, 0x40(r1)
/* 800B0B6C 000ADAAC  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0B70 000ADAB0  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0B74 000ADAB4  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B0B78 000ADAB8  38 63 00 04 */	addi r3, r3, 4
/* 800B0B7C 000ADABC  7C 03 00 40 */	cmplw r3, r0
/* 800B0B80 000ADAC0  40 81 00 08 */	ble lbl_800B0B88
/* 800B0B84 000ADAC4  4B FF E5 D1 */	bl GDOverflowed
lbl_800B0B88:
/* 800B0B88 000ADAC8  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0B8C 000ADACC  80 01 00 40 */	lwz r0, 0x40(r1)
/* 800B0B90 000ADAD0  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0B94 000ADAD4  54 05 46 3E */	srwi r5, r0, 0x18
/* 800B0B98 000ADAD8  38 03 00 01 */	addi r0, r3, 1
/* 800B0B9C 000ADADC  90 04 00 08 */	stw r0, 8(r4)
/* 800B0BA0 000ADAE0  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0BA4 000ADAE4  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0BA8 000ADAE8  80 01 00 40 */	lwz r0, 0x40(r1)
/* 800B0BAC 000ADAEC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0BB0 000ADAF0  54 05 86 3E */	rlwinm r5, r0, 0x10, 0x18, 0x1f
/* 800B0BB4 000ADAF4  38 03 00 01 */	addi r0, r3, 1
/* 800B0BB8 000ADAF8  90 04 00 08 */	stw r0, 8(r4)
/* 800B0BBC 000ADAFC  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0BC0 000ADB00  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0BC4 000ADB04  80 01 00 40 */	lwz r0, 0x40(r1)
/* 800B0BC8 000ADB08  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0BCC 000ADB0C  54 05 C6 3E */	rlwinm r5, r0, 0x18, 0x18, 0x1f
/* 800B0BD0 000ADB10  38 03 00 01 */	addi r0, r3, 1
/* 800B0BD4 000ADB14  90 04 00 08 */	stw r0, 8(r4)
/* 800B0BD8 000ADB18  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0BDC 000ADB1C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0BE0 000ADB20  80 A1 00 40 */	lwz r5, 0x40(r1)
/* 800B0BE4 000ADB24  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0BE8 000ADB28  38 03 00 01 */	addi r0, r3, 1
/* 800B0BEC 000ADB2C  90 04 00 08 */	stw r0, 8(r4)
/* 800B0BF0 000ADB30  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0BF4 000ADB34  80 01 00 94 */	lwz r0, 0x94(r1)
/* 800B0BF8 000ADB38  CB E1 00 88 */	lfd f31, 0x88(r1)
/* 800B0BFC 000ADB3C  CB C1 00 80 */	lfd f30, 0x80(r1)
/* 800B0C00 000ADB40  CB A1 00 78 */	lfd f29, 0x78(r1)
/* 800B0C04 000ADB44  CB 81 00 70 */	lfd f28, 0x70(r1)
/* 800B0C08 000ADB48  CB 61 00 68 */	lfd f27, 0x68(r1)
/* 800B0C0C 000ADB4C  CB 41 00 60 */	lfd f26, 0x60(r1)
/* 800B0C10 000ADB50  83 E1 00 5C */	lwz r31, 0x5c(r1)
/* 800B0C14 000ADB54  38 21 00 90 */	addi r1, r1, 0x90
/* 800B0C18 000ADB58  7C 08 03 A6 */	mtlr r0
/* 800B0C1C 000ADB5C  4E 80 00 20 */	blr 

.global GDSetLightColor
GDSetLightColor:
/* 800B0C20 000ADB60  7C 08 02 A6 */	mflr r0
/* 800B0C24 000ADB64  90 01 00 04 */	stw r0, 4(r1)
/* 800B0C28 000ADB68  7C 60 00 34 */	cntlzw r0, r3
/* 800B0C2C 000ADB6C  20 E0 00 1F */	subfic r7, r0, 0x1f
/* 800B0C30 000ADB70  94 21 FF E0 */	stwu r1, -0x20(r1)
/* 800B0C34 000ADB74  54 E0 04 3E */	clrlwi r0, r7, 0x10
/* 800B0C38 000ADB78  28 00 00 07 */	cmplwi r0, 7
/* 800B0C3C 000ADB7C  93 E1 00 1C */	stw r31, 0x1c(r1)
/* 800B0C40 000ADB80  93 C1 00 18 */	stw r30, 0x18(r1)
/* 800B0C44 000ADB84  88 64 00 01 */	lbz r3, 1(r4)
/* 800B0C48 000ADB88  88 A4 00 00 */	lbz r5, 0(r4)
/* 800B0C4C 000ADB8C  88 C4 00 02 */	lbz r6, 2(r4)
/* 800B0C50 000ADB90  54 63 80 1E */	slwi r3, r3, 0x10
/* 800B0C54 000ADB94  50 A3 C0 0E */	rlwimi r3, r5, 0x18, 0, 7
/* 800B0C58 000ADB98  88 84 00 03 */	lbz r4, 3(r4)
/* 800B0C5C 000ADB9C  50 C3 44 2E */	rlwimi r3, r6, 8, 0x10, 0x17
/* 800B0C60 000ADBA0  7C 9E 1B 78 */	or r30, r4, r3
/* 800B0C64 000ADBA4  40 81 00 08 */	ble lbl_800B0C6C
/* 800B0C68 000ADBA8  38 E0 00 00 */	li r7, 0
lbl_800B0C6C:
/* 800B0C6C 000ADBAC  80 AD 95 B8 */	lwz r5, __GDCurrentDL@sda21(r13)
/* 800B0C70 000ADBB0  54 E4 24 36 */	rlwinm r4, r7, 4, 0x10, 0x1b
/* 800B0C74 000ADBB4  3B E4 06 03 */	addi r31, r4, 0x603
/* 800B0C78 000ADBB8  80 65 00 08 */	lwz r3, 8(r5)
/* 800B0C7C 000ADBBC  80 05 00 0C */	lwz r0, 0xc(r5)
/* 800B0C80 000ADBC0  38 63 00 01 */	addi r3, r3, 1
/* 800B0C84 000ADBC4  7C 03 00 40 */	cmplw r3, r0
/* 800B0C88 000ADBC8  40 81 00 08 */	ble lbl_800B0C90
/* 800B0C8C 000ADBCC  4B FF E4 C9 */	bl GDOverflowed
lbl_800B0C90:
/* 800B0C90 000ADBD0  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0C94 000ADBD4  38 A0 00 10 */	li r5, 0x10
/* 800B0C98 000ADBD8  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0C9C 000ADBDC  38 03 00 01 */	addi r0, r3, 1
/* 800B0CA0 000ADBE0  90 04 00 08 */	stw r0, 8(r4)
/* 800B0CA4 000ADBE4  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0CA8 000ADBE8  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0CAC 000ADBEC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0CB0 000ADBF0  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B0CB4 000ADBF4  38 63 00 02 */	addi r3, r3, 2
/* 800B0CB8 000ADBF8  7C 03 00 40 */	cmplw r3, r0
/* 800B0CBC 000ADBFC  40 81 00 08 */	ble lbl_800B0CC4
/* 800B0CC0 000ADC00  4B FF E4 95 */	bl GDOverflowed
lbl_800B0CC4:
/* 800B0CC4 000ADC04  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0CC8 000ADC08  38 A0 00 00 */	li r5, 0
/* 800B0CCC 000ADC0C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0CD0 000ADC10  38 03 00 01 */	addi r0, r3, 1
/* 800B0CD4 000ADC14  90 04 00 08 */	stw r0, 8(r4)
/* 800B0CD8 000ADC18  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0CDC 000ADC1C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0CE0 000ADC20  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0CE4 000ADC24  38 03 00 01 */	addi r0, r3, 1
/* 800B0CE8 000ADC28  90 04 00 08 */	stw r0, 8(r4)
/* 800B0CEC 000ADC2C  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0CF0 000ADC30  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0CF4 000ADC34  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0CF8 000ADC38  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B0CFC 000ADC3C  38 63 00 02 */	addi r3, r3, 2
/* 800B0D00 000ADC40  7C 03 00 40 */	cmplw r3, r0
/* 800B0D04 000ADC44  40 81 00 08 */	ble lbl_800B0D0C
/* 800B0D08 000ADC48  4B FF E4 4D */	bl GDOverflowed
lbl_800B0D0C:
/* 800B0D0C 000ADC4C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0D10 000ADC50  57 E5 C6 3E */	rlwinm r5, r31, 0x18, 0x18, 0x1f
/* 800B0D14 000ADC54  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0D18 000ADC58  38 03 00 01 */	addi r0, r3, 1
/* 800B0D1C 000ADC5C  90 04 00 08 */	stw r0, 8(r4)
/* 800B0D20 000ADC60  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0D24 000ADC64  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0D28 000ADC68  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0D2C 000ADC6C  38 03 00 01 */	addi r0, r3, 1
/* 800B0D30 000ADC70  90 04 00 08 */	stw r0, 8(r4)
/* 800B0D34 000ADC74  9B E3 00 00 */	stb r31, 0(r3)
/* 800B0D38 000ADC78  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0D3C 000ADC7C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0D40 000ADC80  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B0D44 000ADC84  38 63 00 04 */	addi r3, r3, 4
/* 800B0D48 000ADC88  7C 03 00 40 */	cmplw r3, r0
/* 800B0D4C 000ADC8C  40 81 00 08 */	ble lbl_800B0D54
/* 800B0D50 000ADC90  4B FF E4 05 */	bl GDOverflowed
lbl_800B0D54:
/* 800B0D54 000ADC94  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0D58 000ADC98  57 C7 46 3E */	srwi r7, r30, 0x18
/* 800B0D5C 000ADC9C  57 C6 86 3E */	rlwinm r6, r30, 0x10, 0x18, 0x1f
/* 800B0D60 000ADCA0  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0D64 000ADCA4  57 C5 C6 3E */	rlwinm r5, r30, 0x18, 0x18, 0x1f
/* 800B0D68 000ADCA8  38 03 00 01 */	addi r0, r3, 1
/* 800B0D6C 000ADCAC  90 04 00 08 */	stw r0, 8(r4)
/* 800B0D70 000ADCB0  98 E3 00 00 */	stb r7, 0(r3)
/* 800B0D74 000ADCB4  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0D78 000ADCB8  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0D7C 000ADCBC  38 03 00 01 */	addi r0, r3, 1
/* 800B0D80 000ADCC0  90 04 00 08 */	stw r0, 8(r4)
/* 800B0D84 000ADCC4  98 C3 00 00 */	stb r6, 0(r3)
/* 800B0D88 000ADCC8  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0D8C 000ADCCC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0D90 000ADCD0  38 03 00 01 */	addi r0, r3, 1
/* 800B0D94 000ADCD4  90 04 00 08 */	stw r0, 8(r4)
/* 800B0D98 000ADCD8  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0D9C 000ADCDC  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0DA0 000ADCE0  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0DA4 000ADCE4  38 03 00 01 */	addi r0, r3, 1
/* 800B0DA8 000ADCE8  90 04 00 08 */	stw r0, 8(r4)
/* 800B0DAC 000ADCEC  9B C3 00 00 */	stb r30, 0(r3)
/* 800B0DB0 000ADCF0  80 01 00 24 */	lwz r0, 0x24(r1)
/* 800B0DB4 000ADCF4  83 E1 00 1C */	lwz r31, 0x1c(r1)
/* 800B0DB8 000ADCF8  83 C1 00 18 */	lwz r30, 0x18(r1)
/* 800B0DBC 000ADCFC  38 21 00 20 */	addi r1, r1, 0x20
/* 800B0DC0 000ADD00  7C 08 03 A6 */	mtlr r0
/* 800B0DC4 000ADD04  4E 80 00 20 */	blr 

.global GDSetLightPos
GDSetLightPos:
/* 800B0DC8 000ADD08  7C 08 02 A6 */	mflr r0
/* 800B0DCC 000ADD0C  90 01 00 04 */	stw r0, 4(r1)
/* 800B0DD0 000ADD10  7C 60 00 34 */	cntlzw r0, r3
/* 800B0DD4 000ADD14  20 80 00 1F */	subfic r4, r0, 0x1f
/* 800B0DD8 000ADD18  94 21 FF A8 */	stwu r1, -0x58(r1)
/* 800B0DDC 000ADD1C  54 80 04 3E */	clrlwi r0, r4, 0x10
/* 800B0DE0 000ADD20  28 00 00 07 */	cmplwi r0, 7
/* 800B0DE4 000ADD24  DB E1 00 50 */	stfd f31, 0x50(r1)
/* 800B0DE8 000ADD28  FF E0 18 90 */	fmr f31, f3
/* 800B0DEC 000ADD2C  DB C1 00 48 */	stfd f30, 0x48(r1)
/* 800B0DF0 000ADD30  FF C0 10 90 */	fmr f30, f2
/* 800B0DF4 000ADD34  DB A1 00 40 */	stfd f29, 0x40(r1)
/* 800B0DF8 000ADD38  FF A0 08 90 */	fmr f29, f1
/* 800B0DFC 000ADD3C  93 E1 00 3C */	stw r31, 0x3c(r1)
/* 800B0E00 000ADD40  40 81 00 08 */	ble lbl_800B0E08
/* 800B0E04 000ADD44  38 80 00 00 */	li r4, 0
lbl_800B0E08:
/* 800B0E08 000ADD48  80 AD 95 B8 */	lwz r5, __GDCurrentDL@sda21(r13)
/* 800B0E0C 000ADD4C  54 84 24 36 */	rlwinm r4, r4, 4, 0x10, 0x1b
/* 800B0E10 000ADD50  3B E4 06 0A */	addi r31, r4, 0x60a
/* 800B0E14 000ADD54  80 65 00 08 */	lwz r3, 8(r5)
/* 800B0E18 000ADD58  80 05 00 0C */	lwz r0, 0xc(r5)
/* 800B0E1C 000ADD5C  38 63 00 01 */	addi r3, r3, 1
/* 800B0E20 000ADD60  7C 03 00 40 */	cmplw r3, r0
/* 800B0E24 000ADD64  40 81 00 08 */	ble lbl_800B0E2C
/* 800B0E28 000ADD68  4B FF E3 2D */	bl GDOverflowed
lbl_800B0E2C:
/* 800B0E2C 000ADD6C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0E30 000ADD70  38 A0 00 10 */	li r5, 0x10
/* 800B0E34 000ADD74  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0E38 000ADD78  38 03 00 01 */	addi r0, r3, 1
/* 800B0E3C 000ADD7C  90 04 00 08 */	stw r0, 8(r4)
/* 800B0E40 000ADD80  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0E44 000ADD84  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0E48 000ADD88  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0E4C 000ADD8C  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B0E50 000ADD90  38 63 00 02 */	addi r3, r3, 2
/* 800B0E54 000ADD94  7C 03 00 40 */	cmplw r3, r0
/* 800B0E58 000ADD98  40 81 00 08 */	ble lbl_800B0E60
/* 800B0E5C 000ADD9C  4B FF E2 F9 */	bl GDOverflowed
lbl_800B0E60:
/* 800B0E60 000ADDA0  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0E64 000ADDA4  38 C0 00 00 */	li r6, 0
/* 800B0E68 000ADDA8  38 A0 00 02 */	li r5, 2
/* 800B0E6C 000ADDAC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0E70 000ADDB0  38 03 00 01 */	addi r0, r3, 1
/* 800B0E74 000ADDB4  90 04 00 08 */	stw r0, 8(r4)
/* 800B0E78 000ADDB8  98 C3 00 00 */	stb r6, 0(r3)
/* 800B0E7C 000ADDBC  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0E80 000ADDC0  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0E84 000ADDC4  38 03 00 01 */	addi r0, r3, 1
/* 800B0E88 000ADDC8  90 04 00 08 */	stw r0, 8(r4)
/* 800B0E8C 000ADDCC  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0E90 000ADDD0  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0E94 000ADDD4  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0E98 000ADDD8  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B0E9C 000ADDDC  38 63 00 02 */	addi r3, r3, 2
/* 800B0EA0 000ADDE0  7C 03 00 40 */	cmplw r3, r0
/* 800B0EA4 000ADDE4  40 81 00 08 */	ble lbl_800B0EAC
/* 800B0EA8 000ADDE8  4B FF E2 AD */	bl GDOverflowed
lbl_800B0EAC:
/* 800B0EAC 000ADDEC  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0EB0 000ADDF0  57 E5 C6 3E */	rlwinm r5, r31, 0x18, 0x18, 0x1f
/* 800B0EB4 000ADDF4  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0EB8 000ADDF8  38 03 00 01 */	addi r0, r3, 1
/* 800B0EBC 000ADDFC  90 04 00 08 */	stw r0, 8(r4)
/* 800B0EC0 000ADE00  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0EC4 000ADE04  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0EC8 000ADE08  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0ECC 000ADE0C  38 03 00 01 */	addi r0, r3, 1
/* 800B0ED0 000ADE10  90 04 00 08 */	stw r0, 8(r4)
/* 800B0ED4 000ADE14  9B E3 00 00 */	stb r31, 0(r3)
/* 800B0ED8 000ADE18  D3 A1 00 30 */	stfs f29, 0x30(r1)
/* 800B0EDC 000ADE1C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0EE0 000ADE20  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0EE4 000ADE24  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B0EE8 000ADE28  38 63 00 04 */	addi r3, r3, 4
/* 800B0EEC 000ADE2C  7C 03 00 40 */	cmplw r3, r0
/* 800B0EF0 000ADE30  40 81 00 08 */	ble lbl_800B0EF8
/* 800B0EF4 000ADE34  4B FF E2 61 */	bl GDOverflowed
lbl_800B0EF8:
/* 800B0EF8 000ADE38  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0EFC 000ADE3C  80 01 00 30 */	lwz r0, 0x30(r1)
/* 800B0F00 000ADE40  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0F04 000ADE44  54 05 46 3E */	srwi r5, r0, 0x18
/* 800B0F08 000ADE48  38 03 00 01 */	addi r0, r3, 1
/* 800B0F0C 000ADE4C  90 04 00 08 */	stw r0, 8(r4)
/* 800B0F10 000ADE50  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0F14 000ADE54  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0F18 000ADE58  80 01 00 30 */	lwz r0, 0x30(r1)
/* 800B0F1C 000ADE5C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0F20 000ADE60  54 05 86 3E */	rlwinm r5, r0, 0x10, 0x18, 0x1f
/* 800B0F24 000ADE64  38 03 00 01 */	addi r0, r3, 1
/* 800B0F28 000ADE68  90 04 00 08 */	stw r0, 8(r4)
/* 800B0F2C 000ADE6C  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0F30 000ADE70  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0F34 000ADE74  80 01 00 30 */	lwz r0, 0x30(r1)
/* 800B0F38 000ADE78  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0F3C 000ADE7C  54 05 C6 3E */	rlwinm r5, r0, 0x18, 0x18, 0x1f
/* 800B0F40 000ADE80  38 03 00 01 */	addi r0, r3, 1
/* 800B0F44 000ADE84  90 04 00 08 */	stw r0, 8(r4)
/* 800B0F48 000ADE88  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0F4C 000ADE8C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0F50 000ADE90  80 A1 00 30 */	lwz r5, 0x30(r1)
/* 800B0F54 000ADE94  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0F58 000ADE98  38 03 00 01 */	addi r0, r3, 1
/* 800B0F5C 000ADE9C  90 04 00 08 */	stw r0, 8(r4)
/* 800B0F60 000ADEA0  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0F64 000ADEA4  D3 C1 00 2C */	stfs f30, 0x2c(r1)
/* 800B0F68 000ADEA8  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0F6C 000ADEAC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0F70 000ADEB0  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B0F74 000ADEB4  38 63 00 04 */	addi r3, r3, 4
/* 800B0F78 000ADEB8  7C 03 00 40 */	cmplw r3, r0
/* 800B0F7C 000ADEBC  40 81 00 08 */	ble lbl_800B0F84
/* 800B0F80 000ADEC0  4B FF E1 D5 */	bl GDOverflowed
lbl_800B0F84:
/* 800B0F84 000ADEC4  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0F88 000ADEC8  80 01 00 2C */	lwz r0, 0x2c(r1)
/* 800B0F8C 000ADECC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0F90 000ADED0  54 05 46 3E */	srwi r5, r0, 0x18
/* 800B0F94 000ADED4  38 03 00 01 */	addi r0, r3, 1
/* 800B0F98 000ADED8  90 04 00 08 */	stw r0, 8(r4)
/* 800B0F9C 000ADEDC  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0FA0 000ADEE0  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0FA4 000ADEE4  80 01 00 2C */	lwz r0, 0x2c(r1)
/* 800B0FA8 000ADEE8  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0FAC 000ADEEC  54 05 86 3E */	rlwinm r5, r0, 0x10, 0x18, 0x1f
/* 800B0FB0 000ADEF0  38 03 00 01 */	addi r0, r3, 1
/* 800B0FB4 000ADEF4  90 04 00 08 */	stw r0, 8(r4)
/* 800B0FB8 000ADEF8  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0FBC 000ADEFC  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0FC0 000ADF00  80 01 00 2C */	lwz r0, 0x2c(r1)
/* 800B0FC4 000ADF04  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0FC8 000ADF08  54 05 C6 3E */	rlwinm r5, r0, 0x18, 0x18, 0x1f
/* 800B0FCC 000ADF0C  38 03 00 01 */	addi r0, r3, 1
/* 800B0FD0 000ADF10  90 04 00 08 */	stw r0, 8(r4)
/* 800B0FD4 000ADF14  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0FD8 000ADF18  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0FDC 000ADF1C  80 A1 00 2C */	lwz r5, 0x2c(r1)
/* 800B0FE0 000ADF20  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0FE4 000ADF24  38 03 00 01 */	addi r0, r3, 1
/* 800B0FE8 000ADF28  90 04 00 08 */	stw r0, 8(r4)
/* 800B0FEC 000ADF2C  98 A3 00 00 */	stb r5, 0(r3)
/* 800B0FF0 000ADF30  D3 E1 00 28 */	stfs f31, 0x28(r1)
/* 800B0FF4 000ADF34  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B0FF8 000ADF38  80 64 00 08 */	lwz r3, 8(r4)
/* 800B0FFC 000ADF3C  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B1000 000ADF40  38 63 00 04 */	addi r3, r3, 4
/* 800B1004 000ADF44  7C 03 00 40 */	cmplw r3, r0
/* 800B1008 000ADF48  40 81 00 08 */	ble lbl_800B1010
/* 800B100C 000ADF4C  4B FF E1 49 */	bl GDOverflowed
lbl_800B1010:
/* 800B1010 000ADF50  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1014 000ADF54  80 01 00 28 */	lwz r0, 0x28(r1)
/* 800B1018 000ADF58  80 64 00 08 */	lwz r3, 8(r4)
/* 800B101C 000ADF5C  54 05 46 3E */	srwi r5, r0, 0x18
/* 800B1020 000ADF60  38 03 00 01 */	addi r0, r3, 1
/* 800B1024 000ADF64  90 04 00 08 */	stw r0, 8(r4)
/* 800B1028 000ADF68  98 A3 00 00 */	stb r5, 0(r3)
/* 800B102C 000ADF6C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1030 000ADF70  80 01 00 28 */	lwz r0, 0x28(r1)
/* 800B1034 000ADF74  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1038 000ADF78  54 05 86 3E */	rlwinm r5, r0, 0x10, 0x18, 0x1f
/* 800B103C 000ADF7C  38 03 00 01 */	addi r0, r3, 1
/* 800B1040 000ADF80  90 04 00 08 */	stw r0, 8(r4)
/* 800B1044 000ADF84  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1048 000ADF88  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B104C 000ADF8C  80 01 00 28 */	lwz r0, 0x28(r1)
/* 800B1050 000ADF90  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1054 000ADF94  54 05 C6 3E */	rlwinm r5, r0, 0x18, 0x18, 0x1f
/* 800B1058 000ADF98  38 03 00 01 */	addi r0, r3, 1
/* 800B105C 000ADF9C  90 04 00 08 */	stw r0, 8(r4)
/* 800B1060 000ADFA0  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1064 000ADFA4  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1068 000ADFA8  80 A1 00 28 */	lwz r5, 0x28(r1)
/* 800B106C 000ADFAC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1070 000ADFB0  38 03 00 01 */	addi r0, r3, 1
/* 800B1074 000ADFB4  90 04 00 08 */	stw r0, 8(r4)
/* 800B1078 000ADFB8  98 A3 00 00 */	stb r5, 0(r3)
/* 800B107C 000ADFBC  80 01 00 5C */	lwz r0, 0x5c(r1)
/* 800B1080 000ADFC0  CB E1 00 50 */	lfd f31, 0x50(r1)
/* 800B1084 000ADFC4  CB C1 00 48 */	lfd f30, 0x48(r1)
/* 800B1088 000ADFC8  CB A1 00 40 */	lfd f29, 0x40(r1)
/* 800B108C 000ADFCC  83 E1 00 3C */	lwz r31, 0x3c(r1)
/* 800B1090 000ADFD0  38 21 00 58 */	addi r1, r1, 0x58
/* 800B1094 000ADFD4  7C 08 03 A6 */	mtlr r0
/* 800B1098 000ADFD8  4E 80 00 20 */	blr 

.global GDSetLightDir
GDSetLightDir:
/* 800B109C 000ADFDC  7C 08 02 A6 */	mflr r0
/* 800B10A0 000ADFE0  90 01 00 04 */	stw r0, 4(r1)
/* 800B10A4 000ADFE4  7C 60 00 34 */	cntlzw r0, r3
/* 800B10A8 000ADFE8  20 80 00 1F */	subfic r4, r0, 0x1f
/* 800B10AC 000ADFEC  94 21 FF A8 */	stwu r1, -0x58(r1)
/* 800B10B0 000ADFF0  54 80 04 3E */	clrlwi r0, r4, 0x10
/* 800B10B4 000ADFF4  28 00 00 07 */	cmplwi r0, 7
/* 800B10B8 000ADFF8  DB E1 00 50 */	stfd f31, 0x50(r1)
/* 800B10BC 000ADFFC  FF E0 18 90 */	fmr f31, f3
/* 800B10C0 000AE000  DB C1 00 48 */	stfd f30, 0x48(r1)
/* 800B10C4 000AE004  FF C0 10 90 */	fmr f30, f2
/* 800B10C8 000AE008  DB A1 00 40 */	stfd f29, 0x40(r1)
/* 800B10CC 000AE00C  FF A0 08 90 */	fmr f29, f1
/* 800B10D0 000AE010  93 E1 00 3C */	stw r31, 0x3c(r1)
/* 800B10D4 000AE014  40 81 00 08 */	ble lbl_800B10DC
/* 800B10D8 000AE018  38 80 00 00 */	li r4, 0
lbl_800B10DC:
/* 800B10DC 000AE01C  80 AD 95 B8 */	lwz r5, __GDCurrentDL@sda21(r13)
/* 800B10E0 000AE020  54 84 24 36 */	rlwinm r4, r4, 4, 0x10, 0x1b
/* 800B10E4 000AE024  3B E4 06 0D */	addi r31, r4, 0x60d
/* 800B10E8 000AE028  80 65 00 08 */	lwz r3, 8(r5)
/* 800B10EC 000AE02C  80 05 00 0C */	lwz r0, 0xc(r5)
/* 800B10F0 000AE030  38 63 00 01 */	addi r3, r3, 1
/* 800B10F4 000AE034  7C 03 00 40 */	cmplw r3, r0
/* 800B10F8 000AE038  40 81 00 08 */	ble lbl_800B1100
/* 800B10FC 000AE03C  4B FF E0 59 */	bl GDOverflowed
lbl_800B1100:
/* 800B1100 000AE040  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1104 000AE044  38 A0 00 10 */	li r5, 0x10
/* 800B1108 000AE048  80 64 00 08 */	lwz r3, 8(r4)
/* 800B110C 000AE04C  38 03 00 01 */	addi r0, r3, 1
/* 800B1110 000AE050  90 04 00 08 */	stw r0, 8(r4)
/* 800B1114 000AE054  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1118 000AE058  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B111C 000AE05C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1120 000AE060  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B1124 000AE064  38 63 00 02 */	addi r3, r3, 2
/* 800B1128 000AE068  7C 03 00 40 */	cmplw r3, r0
/* 800B112C 000AE06C  40 81 00 08 */	ble lbl_800B1134
/* 800B1130 000AE070  4B FF E0 25 */	bl GDOverflowed
lbl_800B1134:
/* 800B1134 000AE074  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1138 000AE078  38 C0 00 00 */	li r6, 0
/* 800B113C 000AE07C  38 A0 00 02 */	li r5, 2
/* 800B1140 000AE080  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1144 000AE084  38 03 00 01 */	addi r0, r3, 1
/* 800B1148 000AE088  90 04 00 08 */	stw r0, 8(r4)
/* 800B114C 000AE08C  98 C3 00 00 */	stb r6, 0(r3)
/* 800B1150 000AE090  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1154 000AE094  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1158 000AE098  38 03 00 01 */	addi r0, r3, 1
/* 800B115C 000AE09C  90 04 00 08 */	stw r0, 8(r4)
/* 800B1160 000AE0A0  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1164 000AE0A4  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1168 000AE0A8  80 64 00 08 */	lwz r3, 8(r4)
/* 800B116C 000AE0AC  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B1170 000AE0B0  38 63 00 02 */	addi r3, r3, 2
/* 800B1174 000AE0B4  7C 03 00 40 */	cmplw r3, r0
/* 800B1178 000AE0B8  40 81 00 08 */	ble lbl_800B1180
/* 800B117C 000AE0BC  4B FF DF D9 */	bl GDOverflowed
lbl_800B1180:
/* 800B1180 000AE0C0  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1184 000AE0C4  57 E5 C6 3E */	rlwinm r5, r31, 0x18, 0x18, 0x1f
/* 800B1188 000AE0C8  80 64 00 08 */	lwz r3, 8(r4)
/* 800B118C 000AE0CC  38 03 00 01 */	addi r0, r3, 1
/* 800B1190 000AE0D0  90 04 00 08 */	stw r0, 8(r4)
/* 800B1194 000AE0D4  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1198 000AE0D8  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B119C 000AE0DC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B11A0 000AE0E0  38 03 00 01 */	addi r0, r3, 1
/* 800B11A4 000AE0E4  90 04 00 08 */	stw r0, 8(r4)
/* 800B11A8 000AE0E8  9B E3 00 00 */	stb r31, 0(r3)
/* 800B11AC 000AE0EC  D3 A1 00 30 */	stfs f29, 0x30(r1)
/* 800B11B0 000AE0F0  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B11B4 000AE0F4  80 64 00 08 */	lwz r3, 8(r4)
/* 800B11B8 000AE0F8  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B11BC 000AE0FC  38 63 00 04 */	addi r3, r3, 4
/* 800B11C0 000AE100  7C 03 00 40 */	cmplw r3, r0
/* 800B11C4 000AE104  40 81 00 08 */	ble lbl_800B11CC
/* 800B11C8 000AE108  4B FF DF 8D */	bl GDOverflowed
lbl_800B11CC:
/* 800B11CC 000AE10C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B11D0 000AE110  80 01 00 30 */	lwz r0, 0x30(r1)
/* 800B11D4 000AE114  80 64 00 08 */	lwz r3, 8(r4)
/* 800B11D8 000AE118  54 05 46 3E */	srwi r5, r0, 0x18
/* 800B11DC 000AE11C  38 03 00 01 */	addi r0, r3, 1
/* 800B11E0 000AE120  90 04 00 08 */	stw r0, 8(r4)
/* 800B11E4 000AE124  98 A3 00 00 */	stb r5, 0(r3)
/* 800B11E8 000AE128  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B11EC 000AE12C  80 01 00 30 */	lwz r0, 0x30(r1)
/* 800B11F0 000AE130  80 64 00 08 */	lwz r3, 8(r4)
/* 800B11F4 000AE134  54 05 86 3E */	rlwinm r5, r0, 0x10, 0x18, 0x1f
/* 800B11F8 000AE138  38 03 00 01 */	addi r0, r3, 1
/* 800B11FC 000AE13C  90 04 00 08 */	stw r0, 8(r4)
/* 800B1200 000AE140  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1204 000AE144  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1208 000AE148  80 01 00 30 */	lwz r0, 0x30(r1)
/* 800B120C 000AE14C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1210 000AE150  54 05 C6 3E */	rlwinm r5, r0, 0x18, 0x18, 0x1f
/* 800B1214 000AE154  38 03 00 01 */	addi r0, r3, 1
/* 800B1218 000AE158  90 04 00 08 */	stw r0, 8(r4)
/* 800B121C 000AE15C  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1220 000AE160  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1224 000AE164  80 A1 00 30 */	lwz r5, 0x30(r1)
/* 800B1228 000AE168  80 64 00 08 */	lwz r3, 8(r4)
/* 800B122C 000AE16C  38 03 00 01 */	addi r0, r3, 1
/* 800B1230 000AE170  90 04 00 08 */	stw r0, 8(r4)
/* 800B1234 000AE174  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1238 000AE178  D3 C1 00 2C */	stfs f30, 0x2c(r1)
/* 800B123C 000AE17C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1240 000AE180  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1244 000AE184  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B1248 000AE188  38 63 00 04 */	addi r3, r3, 4
/* 800B124C 000AE18C  7C 03 00 40 */	cmplw r3, r0
/* 800B1250 000AE190  40 81 00 08 */	ble lbl_800B1258
/* 800B1254 000AE194  4B FF DF 01 */	bl GDOverflowed
lbl_800B1258:
/* 800B1258 000AE198  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B125C 000AE19C  80 01 00 2C */	lwz r0, 0x2c(r1)
/* 800B1260 000AE1A0  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1264 000AE1A4  54 05 46 3E */	srwi r5, r0, 0x18
/* 800B1268 000AE1A8  38 03 00 01 */	addi r0, r3, 1
/* 800B126C 000AE1AC  90 04 00 08 */	stw r0, 8(r4)
/* 800B1270 000AE1B0  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1274 000AE1B4  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1278 000AE1B8  80 01 00 2C */	lwz r0, 0x2c(r1)
/* 800B127C 000AE1BC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1280 000AE1C0  54 05 86 3E */	rlwinm r5, r0, 0x10, 0x18, 0x1f
/* 800B1284 000AE1C4  38 03 00 01 */	addi r0, r3, 1
/* 800B1288 000AE1C8  90 04 00 08 */	stw r0, 8(r4)
/* 800B128C 000AE1CC  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1290 000AE1D0  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1294 000AE1D4  80 01 00 2C */	lwz r0, 0x2c(r1)
/* 800B1298 000AE1D8  80 64 00 08 */	lwz r3, 8(r4)
/* 800B129C 000AE1DC  54 05 C6 3E */	rlwinm r5, r0, 0x18, 0x18, 0x1f
/* 800B12A0 000AE1E0  38 03 00 01 */	addi r0, r3, 1
/* 800B12A4 000AE1E4  90 04 00 08 */	stw r0, 8(r4)
/* 800B12A8 000AE1E8  98 A3 00 00 */	stb r5, 0(r3)
/* 800B12AC 000AE1EC  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B12B0 000AE1F0  80 A1 00 2C */	lwz r5, 0x2c(r1)
/* 800B12B4 000AE1F4  80 64 00 08 */	lwz r3, 8(r4)
/* 800B12B8 000AE1F8  38 03 00 01 */	addi r0, r3, 1
/* 800B12BC 000AE1FC  90 04 00 08 */	stw r0, 8(r4)
/* 800B12C0 000AE200  98 A3 00 00 */	stb r5, 0(r3)
/* 800B12C4 000AE204  D3 E1 00 28 */	stfs f31, 0x28(r1)
/* 800B12C8 000AE208  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B12CC 000AE20C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B12D0 000AE210  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B12D4 000AE214  38 63 00 04 */	addi r3, r3, 4
/* 800B12D8 000AE218  7C 03 00 40 */	cmplw r3, r0
/* 800B12DC 000AE21C  40 81 00 08 */	ble lbl_800B12E4
/* 800B12E0 000AE220  4B FF DE 75 */	bl GDOverflowed
lbl_800B12E4:
/* 800B12E4 000AE224  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B12E8 000AE228  80 01 00 28 */	lwz r0, 0x28(r1)
/* 800B12EC 000AE22C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B12F0 000AE230  54 05 46 3E */	srwi r5, r0, 0x18
/* 800B12F4 000AE234  38 03 00 01 */	addi r0, r3, 1
/* 800B12F8 000AE238  90 04 00 08 */	stw r0, 8(r4)
/* 800B12FC 000AE23C  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1300 000AE240  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1304 000AE244  80 01 00 28 */	lwz r0, 0x28(r1)
/* 800B1308 000AE248  80 64 00 08 */	lwz r3, 8(r4)
/* 800B130C 000AE24C  54 05 86 3E */	rlwinm r5, r0, 0x10, 0x18, 0x1f
/* 800B1310 000AE250  38 03 00 01 */	addi r0, r3, 1
/* 800B1314 000AE254  90 04 00 08 */	stw r0, 8(r4)
/* 800B1318 000AE258  98 A3 00 00 */	stb r5, 0(r3)
/* 800B131C 000AE25C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1320 000AE260  80 01 00 28 */	lwz r0, 0x28(r1)
/* 800B1324 000AE264  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1328 000AE268  54 05 C6 3E */	rlwinm r5, r0, 0x18, 0x18, 0x1f
/* 800B132C 000AE26C  38 03 00 01 */	addi r0, r3, 1
/* 800B1330 000AE270  90 04 00 08 */	stw r0, 8(r4)
/* 800B1334 000AE274  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1338 000AE278  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B133C 000AE27C  80 A1 00 28 */	lwz r5, 0x28(r1)
/* 800B1340 000AE280  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1344 000AE284  38 03 00 01 */	addi r0, r3, 1
/* 800B1348 000AE288  90 04 00 08 */	stw r0, 8(r4)
/* 800B134C 000AE28C  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1350 000AE290  80 01 00 5C */	lwz r0, 0x5c(r1)
/* 800B1354 000AE294  CB E1 00 50 */	lfd f31, 0x50(r1)
/* 800B1358 000AE298  CB C1 00 48 */	lfd f30, 0x48(r1)
/* 800B135C 000AE29C  CB A1 00 40 */	lfd f29, 0x40(r1)
/* 800B1360 000AE2A0  83 E1 00 3C */	lwz r31, 0x3c(r1)
/* 800B1364 000AE2A4  38 21 00 58 */	addi r1, r1, 0x58
/* 800B1368 000AE2A8  7C 08 03 A6 */	mtlr r0
/* 800B136C 000AE2AC  4E 80 00 20 */	blr 

.global GDSetChanMatColor
GDSetChanMatColor:
/* 800B1370 000AE2B0  7C 08 02 A6 */	mflr r0
/* 800B1374 000AE2B4  90 01 00 04 */	stw r0, 4(r1)
/* 800B1378 000AE2B8  94 21 FF E8 */	stwu r1, -0x18(r1)
/* 800B137C 000AE2BC  93 E1 00 14 */	stw r31, 0x14(r1)
/* 800B1380 000AE2C0  93 C1 00 10 */	stw r30, 0x10(r1)
/* 800B1384 000AE2C4  7C 7E 1B 78 */	mr r30, r3
/* 800B1388 000AE2C8  81 0D 95 B8 */	lwz r8, __GDCurrentDL@sda21(r13)
/* 800B138C 000AE2CC  88 04 00 01 */	lbz r0, 1(r4)
/* 800B1390 000AE2D0  80 68 00 08 */	lwz r3, 8(r8)
/* 800B1394 000AE2D4  54 05 80 1E */	slwi r5, r0, 0x10
/* 800B1398 000AE2D8  80 08 00 0C */	lwz r0, 0xc(r8)
/* 800B139C 000AE2DC  88 C4 00 00 */	lbz r6, 0(r4)
/* 800B13A0 000AE2E0  38 63 00 01 */	addi r3, r3, 1
/* 800B13A4 000AE2E4  88 E4 00 02 */	lbz r7, 2(r4)
/* 800B13A8 000AE2E8  7C 03 00 40 */	cmplw r3, r0
/* 800B13AC 000AE2EC  50 C5 C0 0E */	rlwimi r5, r6, 0x18, 0, 7
/* 800B13B0 000AE2F0  88 84 00 03 */	lbz r4, 3(r4)
/* 800B13B4 000AE2F4  50 E5 44 2E */	rlwimi r5, r7, 8, 0x10, 0x17
/* 800B13B8 000AE2F8  7C 9F 2B 78 */	or r31, r4, r5
/* 800B13BC 000AE2FC  40 81 00 08 */	ble lbl_800B13C4
/* 800B13C0 000AE300  4B FF DD 95 */	bl GDOverflowed
lbl_800B13C4:
/* 800B13C4 000AE304  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B13C8 000AE308  38 A0 00 10 */	li r5, 0x10
/* 800B13CC 000AE30C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B13D0 000AE310  38 03 00 01 */	addi r0, r3, 1
/* 800B13D4 000AE314  90 04 00 08 */	stw r0, 8(r4)
/* 800B13D8 000AE318  98 A3 00 00 */	stb r5, 0(r3)
/* 800B13DC 000AE31C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B13E0 000AE320  80 64 00 08 */	lwz r3, 8(r4)
/* 800B13E4 000AE324  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B13E8 000AE328  38 63 00 02 */	addi r3, r3, 2
/* 800B13EC 000AE32C  7C 03 00 40 */	cmplw r3, r0
/* 800B13F0 000AE330  40 81 00 08 */	ble lbl_800B13F8
/* 800B13F4 000AE334  4B FF DD 61 */	bl GDOverflowed
lbl_800B13F8:
/* 800B13F8 000AE338  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B13FC 000AE33C  38 A0 00 00 */	li r5, 0
/* 800B1400 000AE340  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1404 000AE344  38 03 00 01 */	addi r0, r3, 1
/* 800B1408 000AE348  90 04 00 08 */	stw r0, 8(r4)
/* 800B140C 000AE34C  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1410 000AE350  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1414 000AE354  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1418 000AE358  38 03 00 01 */	addi r0, r3, 1
/* 800B141C 000AE35C  90 04 00 08 */	stw r0, 8(r4)
/* 800B1420 000AE360  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1424 000AE364  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1428 000AE368  80 64 00 08 */	lwz r3, 8(r4)
/* 800B142C 000AE36C  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B1430 000AE370  38 63 00 02 */	addi r3, r3, 2
/* 800B1434 000AE374  7C 03 00 40 */	cmplw r3, r0
/* 800B1438 000AE378  40 81 00 08 */	ble lbl_800B1440
/* 800B143C 000AE37C  4B FF DD 19 */	bl GDOverflowed
lbl_800B1440:
/* 800B1440 000AE380  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1444 000AE384  57 C3 07 FE */	clrlwi r3, r30, 0x1f
/* 800B1448 000AE388  38 C3 10 0C */	addi r6, r3, 0x100c
/* 800B144C 000AE38C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1450 000AE390  54 C6 04 3E */	clrlwi r6, r6, 0x10
/* 800B1454 000AE394  7C C5 46 70 */	srawi r5, r6, 8
/* 800B1458 000AE398  38 03 00 01 */	addi r0, r3, 1
/* 800B145C 000AE39C  90 04 00 08 */	stw r0, 8(r4)
/* 800B1460 000AE3A0  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1464 000AE3A4  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1468 000AE3A8  80 64 00 08 */	lwz r3, 8(r4)
/* 800B146C 000AE3AC  38 03 00 01 */	addi r0, r3, 1
/* 800B1470 000AE3B0  90 04 00 08 */	stw r0, 8(r4)
/* 800B1474 000AE3B4  98 C3 00 00 */	stb r6, 0(r3)
/* 800B1478 000AE3B8  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B147C 000AE3BC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1480 000AE3C0  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B1484 000AE3C4  38 63 00 04 */	addi r3, r3, 4
/* 800B1488 000AE3C8  7C 03 00 40 */	cmplw r3, r0
/* 800B148C 000AE3CC  40 81 00 08 */	ble lbl_800B1494
/* 800B1490 000AE3D0  4B FF DC C5 */	bl GDOverflowed
lbl_800B1494:
/* 800B1494 000AE3D4  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1498 000AE3D8  57 E7 46 3E */	srwi r7, r31, 0x18
/* 800B149C 000AE3DC  57 E6 86 3E */	rlwinm r6, r31, 0x10, 0x18, 0x1f
/* 800B14A0 000AE3E0  80 64 00 08 */	lwz r3, 8(r4)
/* 800B14A4 000AE3E4  57 E5 C6 3E */	rlwinm r5, r31, 0x18, 0x18, 0x1f
/* 800B14A8 000AE3E8  38 03 00 01 */	addi r0, r3, 1
/* 800B14AC 000AE3EC  90 04 00 08 */	stw r0, 8(r4)
/* 800B14B0 000AE3F0  98 E3 00 00 */	stb r7, 0(r3)
/* 800B14B4 000AE3F4  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B14B8 000AE3F8  80 64 00 08 */	lwz r3, 8(r4)
/* 800B14BC 000AE3FC  38 03 00 01 */	addi r0, r3, 1
/* 800B14C0 000AE400  90 04 00 08 */	stw r0, 8(r4)
/* 800B14C4 000AE404  98 C3 00 00 */	stb r6, 0(r3)
/* 800B14C8 000AE408  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B14CC 000AE40C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B14D0 000AE410  38 03 00 01 */	addi r0, r3, 1
/* 800B14D4 000AE414  90 04 00 08 */	stw r0, 8(r4)
/* 800B14D8 000AE418  98 A3 00 00 */	stb r5, 0(r3)
/* 800B14DC 000AE41C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B14E0 000AE420  80 64 00 08 */	lwz r3, 8(r4)
/* 800B14E4 000AE424  38 03 00 01 */	addi r0, r3, 1
/* 800B14E8 000AE428  90 04 00 08 */	stw r0, 8(r4)
/* 800B14EC 000AE42C  9B E3 00 00 */	stb r31, 0(r3)
/* 800B14F0 000AE430  80 01 00 1C */	lwz r0, 0x1c(r1)
/* 800B14F4 000AE434  83 E1 00 14 */	lwz r31, 0x14(r1)
/* 800B14F8 000AE438  83 C1 00 10 */	lwz r30, 0x10(r1)
/* 800B14FC 000AE43C  38 21 00 18 */	addi r1, r1, 0x18
/* 800B1500 000AE440  7C 08 03 A6 */	mtlr r0
/* 800B1504 000AE444  4E 80 00 20 */	blr 

.global GDSetChanCtrl
GDSetChanCtrl:
/* 800B1508 000AE448  7C 08 02 A6 */	mflr r0
/* 800B150C 000AE44C  2C 09 00 00 */	cmpwi r9, 0
/* 800B1510 000AE450  90 01 00 04 */	stw r0, 4(r1)
/* 800B1514 000AE454  94 21 FF C0 */	stwu r1, -0x40(r1)
/* 800B1518 000AE458  BF 41 00 28 */	stmw r26, 0x28(r1)
/* 800B151C 000AE45C  3B 43 00 00 */	addi r26, r3, 0
/* 800B1520 000AE460  40 82 00 08 */	bne lbl_800B1528
/* 800B1524 000AE464  39 00 00 00 */	li r8, 0
lbl_800B1528:
/* 800B1528 000AE468  7C 69 00 D0 */	neg r3, r9
/* 800B152C 000AE46C  81 4D 95 B8 */	lwz r10, __GDCurrentDL@sda21(r13)
/* 800B1530 000AE470  30 03 FF FF */	addic r0, r3, -1
/* 800B1534 000AE474  7D 60 19 10 */	subfe r11, r0, r3
/* 800B1538 000AE478  80 6A 00 08 */	lwz r3, 8(r10)
/* 800B153C 000AE47C  80 0A 00 0C */	lwz r0, 0xc(r10)
/* 800B1540 000AE480  21 49 00 02 */	subfic r10, r9, 2
/* 800B1544 000AE484  54 84 0D FC */	rlwinm r4, r4, 1, 0x17, 0x1e
/* 800B1548 000AE488  31 2A FF FF */	addic r9, r10, -1
/* 800B154C 000AE48C  7D 49 51 10 */	subfe r10, r9, r10
/* 800B1550 000AE490  7C C4 23 78 */	or r4, r6, r4
/* 800B1554 000AE494  54 E9 16 BA */	rlwinm r9, r7, 2, 0x1a, 0x1d
/* 800B1558 000AE498  38 63 00 01 */	addi r3, r3, 1
/* 800B155C 000AE49C  7C 03 00 40 */	cmplw r3, r0
/* 800B1560 000AE4A0  54 A5 30 32 */	slwi r5, r5, 6
/* 800B1564 000AE4A4  7D 24 23 78 */	or r4, r9, r4
/* 800B1568 000AE4A8  7C A5 23 78 */	or r5, r5, r4
/* 800B156C 000AE4AC  55 04 38 30 */	slwi r4, r8, 7
/* 800B1570 000AE4B0  55 46 48 2C */	slwi r6, r10, 9
/* 800B1574 000AE4B4  7C A4 23 78 */	or r4, r5, r4
/* 800B1578 000AE4B8  7C C0 23 78 */	or r0, r6, r4
/* 800B157C 000AE4BC  55 63 50 2A */	slwi r3, r11, 0xa
/* 800B1580 000AE4C0  54 E4 3C 68 */	rlwinm r4, r7, 7, 0x11, 0x14
/* 800B1584 000AE4C4  7C 60 03 78 */	or r0, r3, r0
/* 800B1588 000AE4C8  7C 9B 03 78 */	or r27, r4, r0
/* 800B158C 000AE4CC  40 81 00 08 */	ble lbl_800B1594
/* 800B1590 000AE4D0  4B FF DB C5 */	bl GDOverflowed
lbl_800B1594:
/* 800B1594 000AE4D4  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1598 000AE4D8  38 A0 00 10 */	li r5, 0x10
/* 800B159C 000AE4DC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B15A0 000AE4E0  38 03 00 01 */	addi r0, r3, 1
/* 800B15A4 000AE4E4  90 04 00 08 */	stw r0, 8(r4)
/* 800B15A8 000AE4E8  98 A3 00 00 */	stb r5, 0(r3)
/* 800B15AC 000AE4EC  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B15B0 000AE4F0  80 64 00 08 */	lwz r3, 8(r4)
/* 800B15B4 000AE4F4  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B15B8 000AE4F8  38 63 00 02 */	addi r3, r3, 2
/* 800B15BC 000AE4FC  7C 03 00 40 */	cmplw r3, r0
/* 800B15C0 000AE500  40 81 00 08 */	ble lbl_800B15C8
/* 800B15C4 000AE504  4B FF DB 91 */	bl GDOverflowed
lbl_800B15C8:
/* 800B15C8 000AE508  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B15CC 000AE50C  38 A0 00 00 */	li r5, 0
/* 800B15D0 000AE510  80 64 00 08 */	lwz r3, 8(r4)
/* 800B15D4 000AE514  38 03 00 01 */	addi r0, r3, 1
/* 800B15D8 000AE518  90 04 00 08 */	stw r0, 8(r4)
/* 800B15DC 000AE51C  98 A3 00 00 */	stb r5, 0(r3)
/* 800B15E0 000AE520  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B15E4 000AE524  80 64 00 08 */	lwz r3, 8(r4)
/* 800B15E8 000AE528  38 03 00 01 */	addi r0, r3, 1
/* 800B15EC 000AE52C  90 04 00 08 */	stw r0, 8(r4)
/* 800B15F0 000AE530  98 A3 00 00 */	stb r5, 0(r3)
/* 800B15F4 000AE534  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B15F8 000AE538  80 64 00 08 */	lwz r3, 8(r4)
/* 800B15FC 000AE53C  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B1600 000AE540  38 63 00 02 */	addi r3, r3, 2
/* 800B1604 000AE544  7C 03 00 40 */	cmplw r3, r0
/* 800B1608 000AE548  40 81 00 08 */	ble lbl_800B1610
/* 800B160C 000AE54C  4B FF DB 49 */	bl GDOverflowed
lbl_800B1610:
/* 800B1610 000AE550  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1614 000AE554  57 43 07 BE */	clrlwi r3, r26, 0x1e
/* 800B1618 000AE558  38 C3 10 0E */	addi r6, r3, 0x100e
/* 800B161C 000AE55C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1620 000AE560  54 C6 04 3E */	clrlwi r6, r6, 0x10
/* 800B1624 000AE564  7C C5 46 70 */	srawi r5, r6, 8
/* 800B1628 000AE568  38 03 00 01 */	addi r0, r3, 1
/* 800B162C 000AE56C  90 04 00 08 */	stw r0, 8(r4)
/* 800B1630 000AE570  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1634 000AE574  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1638 000AE578  80 64 00 08 */	lwz r3, 8(r4)
/* 800B163C 000AE57C  38 03 00 01 */	addi r0, r3, 1
/* 800B1640 000AE580  90 04 00 08 */	stw r0, 8(r4)
/* 800B1644 000AE584  98 C3 00 00 */	stb r6, 0(r3)
/* 800B1648 000AE588  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B164C 000AE58C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1650 000AE590  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B1654 000AE594  38 63 00 04 */	addi r3, r3, 4
/* 800B1658 000AE598  7C 03 00 40 */	cmplw r3, r0
/* 800B165C 000AE59C  40 81 00 08 */	ble lbl_800B1664
/* 800B1660 000AE5A0  4B FF DA F5 */	bl GDOverflowed
lbl_800B1664:
/* 800B1664 000AE5A4  80 AD 95 B8 */	lwz r5, __GDCurrentDL@sda21(r13)
/* 800B1668 000AE5A8  38 1A FF FC */	addi r0, r26, -4
/* 800B166C 000AE5AC  57 7F 46 3E */	srwi r31, r27, 0x18
/* 800B1670 000AE5B0  80 85 00 08 */	lwz r4, 8(r5)
/* 800B1674 000AE5B4  57 7E 86 3E */	rlwinm r30, r27, 0x10, 0x18, 0x1f
/* 800B1678 000AE5B8  57 7D C6 3E */	rlwinm r29, r27, 0x18, 0x18, 0x1f
/* 800B167C 000AE5BC  38 64 00 01 */	addi r3, r4, 1
/* 800B1680 000AE5C0  90 65 00 08 */	stw r3, 8(r5)
/* 800B1684 000AE5C4  28 00 00 01 */	cmplwi r0, 1
/* 800B1688 000AE5C8  57 7C 06 3E */	clrlwi r28, r27, 0x18
/* 800B168C 000AE5CC  9B E4 00 00 */	stb r31, 0(r4)
/* 800B1690 000AE5D0  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1694 000AE5D4  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1698 000AE5D8  38 03 00 01 */	addi r0, r3, 1
/* 800B169C 000AE5DC  90 04 00 08 */	stw r0, 8(r4)
/* 800B16A0 000AE5E0  9B C3 00 00 */	stb r30, 0(r3)
/* 800B16A4 000AE5E4  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B16A8 000AE5E8  80 64 00 08 */	lwz r3, 8(r4)
/* 800B16AC 000AE5EC  38 03 00 01 */	addi r0, r3, 1
/* 800B16B0 000AE5F0  90 04 00 08 */	stw r0, 8(r4)
/* 800B16B4 000AE5F4  9B A3 00 00 */	stb r29, 0(r3)
/* 800B16B8 000AE5F8  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B16BC 000AE5FC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B16C0 000AE600  38 03 00 01 */	addi r0, r3, 1
/* 800B16C4 000AE604  90 04 00 08 */	stw r0, 8(r4)
/* 800B16C8 000AE608  9B 63 00 00 */	stb r27, 0(r3)
/* 800B16CC 000AE60C  41 81 01 3C */	bgt lbl_800B1808
/* 800B16D0 000AE610  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B16D4 000AE614  80 64 00 08 */	lwz r3, 8(r4)
/* 800B16D8 000AE618  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B16DC 000AE61C  38 63 00 01 */	addi r3, r3, 1
/* 800B16E0 000AE620  7C 03 00 40 */	cmplw r3, r0
/* 800B16E4 000AE624  40 81 00 08 */	ble lbl_800B16EC
/* 800B16E8 000AE628  4B FF DA 6D */	bl GDOverflowed
lbl_800B16EC:
/* 800B16EC 000AE62C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B16F0 000AE630  38 A0 00 10 */	li r5, 0x10
/* 800B16F4 000AE634  80 64 00 08 */	lwz r3, 8(r4)
/* 800B16F8 000AE638  38 03 00 01 */	addi r0, r3, 1
/* 800B16FC 000AE63C  90 04 00 08 */	stw r0, 8(r4)
/* 800B1700 000AE640  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1704 000AE644  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1708 000AE648  80 64 00 08 */	lwz r3, 8(r4)
/* 800B170C 000AE64C  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B1710 000AE650  38 63 00 02 */	addi r3, r3, 2
/* 800B1714 000AE654  7C 03 00 40 */	cmplw r3, r0
/* 800B1718 000AE658  40 81 00 08 */	ble lbl_800B1720
/* 800B171C 000AE65C  4B FF DA 39 */	bl GDOverflowed
lbl_800B1720:
/* 800B1720 000AE660  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1724 000AE664  38 A0 00 00 */	li r5, 0
/* 800B1728 000AE668  80 64 00 08 */	lwz r3, 8(r4)
/* 800B172C 000AE66C  38 03 00 01 */	addi r0, r3, 1
/* 800B1730 000AE670  90 04 00 08 */	stw r0, 8(r4)
/* 800B1734 000AE674  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1738 000AE678  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B173C 000AE67C  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1740 000AE680  38 03 00 01 */	addi r0, r3, 1
/* 800B1744 000AE684  90 04 00 08 */	stw r0, 8(r4)
/* 800B1748 000AE688  98 A3 00 00 */	stb r5, 0(r3)
/* 800B174C 000AE68C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B1750 000AE690  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1754 000AE694  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B1758 000AE698  38 63 00 02 */	addi r3, r3, 2
/* 800B175C 000AE69C  7C 03 00 40 */	cmplw r3, r0
/* 800B1760 000AE6A0  40 81 00 08 */	ble lbl_800B1768
/* 800B1764 000AE6A4  4B FF D9 F1 */	bl GDOverflowed
lbl_800B1768:
/* 800B1768 000AE6A8  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B176C 000AE6AC  38 DA 10 0C */	addi r6, r26, 0x100c
/* 800B1770 000AE6B0  54 C6 04 3E */	clrlwi r6, r6, 0x10
/* 800B1774 000AE6B4  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1778 000AE6B8  7C C5 46 70 */	srawi r5, r6, 8
/* 800B177C 000AE6BC  38 03 00 01 */	addi r0, r3, 1
/* 800B1780 000AE6C0  90 04 00 08 */	stw r0, 8(r4)
/* 800B1784 000AE6C4  98 A3 00 00 */	stb r5, 0(r3)
/* 800B1788 000AE6C8  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B178C 000AE6CC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B1790 000AE6D0  38 03 00 01 */	addi r0, r3, 1
/* 800B1794 000AE6D4  90 04 00 08 */	stw r0, 8(r4)
/* 800B1798 000AE6D8  98 C3 00 00 */	stb r6, 0(r3)
/* 800B179C 000AE6DC  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B17A0 000AE6E0  80 64 00 08 */	lwz r3, 8(r4)
/* 800B17A4 000AE6E4  80 04 00 0C */	lwz r0, 0xc(r4)
/* 800B17A8 000AE6E8  38 63 00 04 */	addi r3, r3, 4
/* 800B17AC 000AE6EC  7C 03 00 40 */	cmplw r3, r0
/* 800B17B0 000AE6F0  40 81 00 08 */	ble lbl_800B17B8
/* 800B17B4 000AE6F4  4B FF D9 A1 */	bl GDOverflowed
lbl_800B17B8:
/* 800B17B8 000AE6F8  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B17BC 000AE6FC  80 64 00 08 */	lwz r3, 8(r4)
/* 800B17C0 000AE700  38 03 00 01 */	addi r0, r3, 1
/* 800B17C4 000AE704  90 04 00 08 */	stw r0, 8(r4)
/* 800B17C8 000AE708  9B E3 00 00 */	stb r31, 0(r3)
/* 800B17CC 000AE70C  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B17D0 000AE710  80 64 00 08 */	lwz r3, 8(r4)
/* 800B17D4 000AE714  38 03 00 01 */	addi r0, r3, 1
/* 800B17D8 000AE718  90 04 00 08 */	stw r0, 8(r4)
/* 800B17DC 000AE71C  9B C3 00 00 */	stb r30, 0(r3)
/* 800B17E0 000AE720  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B17E4 000AE724  80 64 00 08 */	lwz r3, 8(r4)
/* 800B17E8 000AE728  38 03 00 01 */	addi r0, r3, 1
/* 800B17EC 000AE72C  90 04 00 08 */	stw r0, 8(r4)
/* 800B17F0 000AE730  9B A3 00 00 */	stb r29, 0(r3)
/* 800B17F4 000AE734  80 8D 95 B8 */	lwz r4, __GDCurrentDL@sda21(r13)
/* 800B17F8 000AE738  80 64 00 08 */	lwz r3, 8(r4)
/* 800B17FC 000AE73C  38 03 00 01 */	addi r0, r3, 1
/* 800B1800 000AE740  90 04 00 08 */	stw r0, 8(r4)
/* 800B1804 000AE744  9B 83 00 00 */	stb r28, 0(r3)
lbl_800B1808:
/* 800B1808 000AE748  BB 41 00 28 */	lmw r26, 0x28(r1)
/* 800B180C 000AE74C  80 01 00 44 */	lwz r0, 0x44(r1)
/* 800B1810 000AE750  38 21 00 40 */	addi r1, r1, 0x40
/* 800B1814 000AE754  7C 08 03 A6 */	mtlr r0
/* 800B1818 000AE758  4E 80 00 20 */	blr