summaryrefslogtreecommitdiff
path: root/asm/TRK_MINNOW_DOLPHIN/targimpl.s
blob: ce5b958c2ea63037111308ae2cc0c5c641ba9124 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
.include "macros.inc"

.section .text, "ax"  # 0x80005600 - 0x8036FBA0
.global __TRK_get_MSR
__TRK_get_MSR:
/* 8008A438 00087378  7C 60 00 A6 */	mfmsr r3
/* 8008A43C 0008737C  4E 80 00 20 */	blr 

.global __TRK_set_MSR
__TRK_set_MSR:
/* 8008A440 00087380  7C 60 01 24 */	mtmsr r3
/* 8008A444 00087384  4E 80 00 20 */	blr 

.global TRKValidMemory32
TRKValidMemory32:
/* 8008A448 00087388  7C 08 02 A6 */	mflr r0
/* 8008A44C 0008738C  90 01 00 04 */	stw r0, 4(r1)
/* 8008A450 00087390  94 21 FF E8 */	stwu r1, -0x18(r1)
/* 8008A454 00087394  93 E1 00 14 */	stw r31, 0x14(r1)
/* 8008A458 00087398  93 C1 00 10 */	stw r30, 0x10(r1)
/* 8008A45C 0008739C  93 A1 00 0C */	stw r29, 0xc(r1)
/* 8008A460 000873A0  7C BE 2B 78 */	mr r30, r5
/* 8008A464 000873A4  7F E4 1A 14 */	add r31, r4, r3
/* 8008A468 000873A8  3B FF FF FF */	addi r31, r31, -1
/* 8008A46C 000873AC  7C 1F 18 40 */	cmplw r31, r3
/* 8008A470 000873B0  38 A0 07 00 */	li r5, 0x700
/* 8008A474 000873B4  40 80 00 0C */	bge lbl_8008A480
/* 8008A478 000873B8  38 60 07 00 */	li r3, 0x700
/* 8008A47C 000873BC  48 00 00 E8 */	b lbl_8008A564
lbl_8008A480:
/* 8008A480 000873C0  3C 80 80 37 */	lis r4, gTRKMemMap@ha
/* 8008A484 000873C4  38 84 22 10 */	addi r4, r4, gTRKMemMap@l
/* 8008A488 000873C8  38 C0 00 00 */	li r6, 0
/* 8008A48C 000873CC  48 00 00 04 */	b lbl_8008A490
lbl_8008A490:
/* 8008A490 000873D0  48 00 00 04 */	b lbl_8008A494
lbl_8008A494:
/* 8008A494 000873D4  80 04 00 04 */	lwz r0, 4(r4)
/* 8008A498 000873D8  7C 03 00 40 */	cmplw r3, r0
/* 8008A49C 000873DC  41 81 00 C4 */	bgt lbl_8008A560
/* 8008A4A0 000873E0  80 04 00 00 */	lwz r0, 0(r4)
/* 8008A4A4 000873E4  7C 1F 00 40 */	cmplw r31, r0
/* 8008A4A8 000873E8  41 80 00 B8 */	blt lbl_8008A560
/* 8008A4AC 000873EC  57 C0 06 3E */	clrlwi r0, r30, 0x18
/* 8008A4B0 000873F0  28 00 00 00 */	cmplwi r0, 0
/* 8008A4B4 000873F4  40 82 00 18 */	bne lbl_8008A4CC
/* 8008A4B8 000873F8  54 C0 20 36 */	slwi r0, r6, 4
/* 8008A4BC 000873FC  7C 84 02 14 */	add r4, r4, r0
/* 8008A4C0 00087400  80 04 00 08 */	lwz r0, 8(r4)
/* 8008A4C4 00087404  2C 00 00 00 */	cmpwi r0, 0
/* 8008A4C8 00087408  41 82 00 2C */	beq lbl_8008A4F4
lbl_8008A4CC:
/* 8008A4CC 0008740C  57 C0 06 3E */	clrlwi r0, r30, 0x18
/* 8008A4D0 00087410  28 00 00 01 */	cmplwi r0, 1
/* 8008A4D4 00087414  40 82 00 28 */	bne lbl_8008A4FC
/* 8008A4D8 00087418  3C 80 80 37 */	lis r4, gTRKMemMap@ha
/* 8008A4DC 0008741C  38 84 22 10 */	addi r4, r4, gTRKMemMap@l
/* 8008A4E0 00087420  54 C0 20 36 */	slwi r0, r6, 4
/* 8008A4E4 00087424  7C 84 02 14 */	add r4, r4, r0
/* 8008A4E8 00087428  80 04 00 0C */	lwz r0, 0xc(r4)
/* 8008A4EC 0008742C  2C 00 00 00 */	cmpwi r0, 0
/* 8008A4F0 00087430  40 82 00 0C */	bne lbl_8008A4FC
lbl_8008A4F4:
/* 8008A4F4 00087434  38 A0 07 00 */	li r5, 0x700
/* 8008A4F8 00087438  48 00 00 68 */	b lbl_8008A560
lbl_8008A4FC:
/* 8008A4FC 0008743C  3C 80 80 37 */	lis r4, gTRKMemMap@ha
/* 8008A500 00087440  54 DD 20 36 */	slwi r29, r6, 4
/* 8008A504 00087444  38 04 22 10 */	addi r0, r4, gTRKMemMap@l
/* 8008A508 00087448  7C 80 EA 14 */	add r4, r0, r29
/* 8008A50C 0008744C  80 04 00 00 */	lwz r0, 0(r4)
/* 8008A510 00087450  38 A0 00 00 */	li r5, 0
/* 8008A514 00087454  7C 03 00 40 */	cmplw r3, r0
/* 8008A518 00087458  40 80 00 14 */	bge lbl_8008A52C
/* 8008A51C 0008745C  7F C5 F3 78 */	mr r5, r30
/* 8008A520 00087460  7C 83 00 50 */	subf r4, r3, r0
/* 8008A524 00087464  4B FF FF 25 */	bl TRKValidMemory32
/* 8008A528 00087468  7C 65 1B 78 */	mr r5, r3
lbl_8008A52C:
/* 8008A52C 0008746C  2C 05 00 00 */	cmpwi r5, 0
/* 8008A530 00087470  40 82 00 30 */	bne lbl_8008A560
/* 8008A534 00087474  3C 60 80 37 */	lis r3, gTRKMemMap@ha
/* 8008A538 00087478  38 03 22 10 */	addi r0, r3, gTRKMemMap@l
/* 8008A53C 0008747C  7C 60 EA 14 */	add r3, r0, r29
/* 8008A540 00087480  80 63 00 04 */	lwz r3, 4(r3)
/* 8008A544 00087484  7C 1F 18 40 */	cmplw r31, r3
/* 8008A548 00087488  40 81 00 18 */	ble lbl_8008A560
/* 8008A54C 0008748C  7F C5 F3 78 */	mr r5, r30
/* 8008A550 00087490  7C 83 F8 50 */	subf r4, r3, r31
/* 8008A554 00087494  4B FF FE F5 */	bl TRKValidMemory32
/* 8008A558 00087498  7C 65 1B 78 */	mr r5, r3
/* 8008A55C 0008749C  48 00 00 04 */	b lbl_8008A560
lbl_8008A560:
/* 8008A560 000874A0  7C A3 2B 78 */	mr r3, r5
lbl_8008A564:
/* 8008A564 000874A4  83 E1 00 14 */	lwz r31, 0x14(r1)
/* 8008A568 000874A8  83 C1 00 10 */	lwz r30, 0x10(r1)
/* 8008A56C 000874AC  83 A1 00 0C */	lwz r29, 0xc(r1)
/* 8008A570 000874B0  38 21 00 18 */	addi r1, r1, 0x18
/* 8008A574 000874B4  80 01 00 04 */	lwz r0, 4(r1)
/* 8008A578 000874B8  7C 08 03 A6 */	mtlr r0
/* 8008A57C 000874BC  4E 80 00 20 */	blr 

.global TRK_ppc_memcpy
TRK_ppc_memcpy:
/* 8008A580 000874C0  7D 00 00 A6 */	mfmsr r8
/* 8008A584 000874C4  39 40 00 00 */	li r10, 0
lbl_8008A588:
/* 8008A588 000874C8  7C 0A 28 00 */	cmpw r10, r5
/* 8008A58C 000874CC  41 82 00 24 */	beq lbl_8008A5B0
/* 8008A590 000874D0  7C E0 01 24 */	mtmsr r7
/* 8008A594 000874D4  7C 00 04 AC */	sync 0
/* 8008A598 000874D8  7D 2A 20 AE */	lbzx r9, r10, r4
/* 8008A59C 000874DC  7C C0 01 24 */	mtmsr r6
/* 8008A5A0 000874E0  7C 00 04 AC */	sync 0
/* 8008A5A4 000874E4  7D 2A 19 AE */	stbx r9, r10, r3
/* 8008A5A8 000874E8  39 4A 00 01 */	addi r10, r10, 1
/* 8008A5AC 000874EC  4B FF FF DC */	b lbl_8008A588
lbl_8008A5B0:
/* 8008A5B0 000874F0  7D 00 01 24 */	mtmsr r8
/* 8008A5B4 000874F4  7C 00 04 AC */	sync 0
/* 8008A5B8 000874F8  4E 80 00 20 */	blr 

.global TRKTargetAccessMemory
TRKTargetAccessMemory:
/* 8008A5BC 000874FC  7C 08 02 A6 */	mflr r0
/* 8008A5C0 00087500  90 01 00 04 */	stw r0, 4(r1)
/* 8008A5C4 00087504  94 21 FF C8 */	stwu r1, -0x38(r1)
/* 8008A5C8 00087508  BF 21 00 1C */	stmw r25, 0x1c(r1)
/* 8008A5CC 0008750C  7C 7A 1B 78 */	mr r26, r3
/* 8008A5D0 00087510  7C 9B 23 78 */	mr r27, r4
/* 8008A5D4 00087514  7C BC 2B 78 */	mr r28, r5
/* 8008A5D8 00087518  7C FD 3B 78 */	mr r29, r7
/* 8008A5DC 0008751C  3C 60 80 3B */	lis r3, gTRKExceptionStatus@ha
/* 8008A5E0 00087520  38 A3 F0 24 */	addi r5, r3, gTRKExceptionStatus@l
/* 8008A5E4 00087524  80 85 00 00 */	lwz r4, 0(r5)
/* 8008A5E8 00087528  3B E5 00 0D */	addi r31, r5, 0xd
/* 8008A5EC 0008752C  80 05 00 04 */	lwz r0, 4(r5)
/* 8008A5F0 00087530  3B C0 00 00 */	li r30, 0
/* 8008A5F4 00087534  7F 63 DB 78 */	mr r3, r27
/* 8008A5F8 00087538  90 81 00 08 */	stw r4, 8(r1)
/* 8008A5FC 0008753C  90 01 00 0C */	stw r0, 0xc(r1)
/* 8008A600 00087540  80 85 00 08 */	lwz r4, 8(r5)
/* 8008A604 00087544  80 05 00 0C */	lwz r0, 0xc(r5)
/* 8008A608 00087548  90 81 00 10 */	stw r4, 0x10(r1)
/* 8008A60C 0008754C  90 01 00 14 */	stw r0, 0x14(r1)
/* 8008A610 00087550  9B DF 00 00 */	stb r30, 0(r31)
/* 8008A614 00087554  48 00 14 B5 */	bl TRKTargetTranslate
/* 8008A618 00087558  2C 1D 00 00 */	cmpwi r29, 0
/* 8008A61C 0008755C  7C 79 1B 78 */	mr r25, r3
/* 8008A620 00087560  41 82 00 08 */	beq lbl_8008A628
/* 8008A624 00087564  48 00 00 08 */	b lbl_8008A62C
lbl_8008A628:
/* 8008A628 00087568  3B C0 00 01 */	li r30, 1
lbl_8008A62C:
/* 8008A62C 0008756C  80 9C 00 00 */	lwz r4, 0(r28)
/* 8008A630 00087570  7F 23 CB 78 */	mr r3, r25
/* 8008A634 00087574  7F C5 F3 78 */	mr r5, r30
/* 8008A638 00087578  4B FF FE 11 */	bl TRKValidMemory32
/* 8008A63C 0008757C  7C 7E 1B 78 */	mr r30, r3
/* 8008A640 00087580  2C 1E 00 00 */	cmpwi r30, 0
/* 8008A644 00087584  41 82 00 10 */	beq lbl_8008A654
/* 8008A648 00087588  38 00 00 00 */	li r0, 0
/* 8008A64C 0008758C  90 1C 00 00 */	stw r0, 0(r28)
/* 8008A650 00087590  48 00 00 78 */	b lbl_8008A6C8
lbl_8008A654:
/* 8008A654 00087594  4B FF FD E5 */	bl __TRK_get_MSR
/* 8008A658 00087598  3C 80 80 3F */	lis r4, gTRKCPUState@ha
/* 8008A65C 0008759C  2C 1D 00 00 */	cmpwi r29, 0
/* 8008A660 000875A0  38 84 AC 30 */	addi r4, r4, gTRKCPUState@l
/* 8008A664 000875A4  80 04 01 F8 */	lwz r0, 0x1f8(r4)
/* 8008A668 000875A8  7C 68 1B 78 */	mr r8, r3
/* 8008A66C 000875AC  54 00 06 F6 */	rlwinm r0, r0, 0, 0x1b, 0x1b
/* 8008A670 000875B0  7D 07 03 78 */	or r7, r8, r0
/* 8008A674 000875B4  41 82 00 1C */	beq lbl_8008A690
/* 8008A678 000875B8  80 BC 00 00 */	lwz r5, 0(r28)
/* 8008A67C 000875BC  7F 43 D3 78 */	mr r3, r26
/* 8008A680 000875C0  7F 24 CB 78 */	mr r4, r25
/* 8008A684 000875C4  7D 06 43 78 */	mr r6, r8
/* 8008A688 000875C8  4B FF FE F9 */	bl TRK_ppc_memcpy
/* 8008A68C 000875CC  48 00 00 3C */	b lbl_8008A6C8
lbl_8008A690:
/* 8008A690 000875D0  80 BC 00 00 */	lwz r5, 0(r28)
/* 8008A694 000875D4  7F 23 CB 78 */	mr r3, r25
/* 8008A698 000875D8  7F 44 D3 78 */	mr r4, r26
/* 8008A69C 000875DC  7C E6 3B 78 */	mr r6, r7
/* 8008A6A0 000875E0  7D 07 43 78 */	mr r7, r8
/* 8008A6A4 000875E4  4B FF FE DD */	bl TRK_ppc_memcpy
/* 8008A6A8 000875E8  7F 23 CB 78 */	mr r3, r25
/* 8008A6AC 000875EC  80 9C 00 00 */	lwz r4, 0(r28)
/* 8008A6B0 000875F0  4B FF FC 8D */	bl TRK_flush_cache
/* 8008A6B4 000875F4  7C 1B C8 40 */	cmplw r27, r25
/* 8008A6B8 000875F8  41 82 00 10 */	beq lbl_8008A6C8
/* 8008A6BC 000875FC  7F 63 DB 78 */	mr r3, r27
/* 8008A6C0 00087600  80 9C 00 00 */	lwz r4, 0(r28)
/* 8008A6C4 00087604  4B FF FC 79 */	bl TRK_flush_cache
lbl_8008A6C8:
/* 8008A6C8 00087608  88 1F 00 00 */	lbz r0, 0(r31)
/* 8008A6CC 0008760C  28 00 00 00 */	cmplwi r0, 0
/* 8008A6D0 00087610  41 82 00 10 */	beq lbl_8008A6E0
/* 8008A6D4 00087614  38 00 00 00 */	li r0, 0
/* 8008A6D8 00087618  90 1C 00 00 */	stw r0, 0(r28)
/* 8008A6DC 0008761C  3B C0 07 02 */	li r30, 0x702
lbl_8008A6E0:
/* 8008A6E0 00087620  3C 60 80 3B */	lis r3, gTRKExceptionStatus@ha
/* 8008A6E4 00087624  80 81 00 08 */	lwz r4, 8(r1)
/* 8008A6E8 00087628  80 01 00 0C */	lwz r0, 0xc(r1)
/* 8008A6EC 0008762C  38 A3 F0 24 */	addi r5, r3, gTRKExceptionStatus@l
/* 8008A6F0 00087630  7F C3 F3 78 */	mr r3, r30
/* 8008A6F4 00087634  90 85 00 00 */	stw r4, 0(r5)
/* 8008A6F8 00087638  90 05 00 04 */	stw r0, 4(r5)
/* 8008A6FC 0008763C  80 81 00 10 */	lwz r4, 0x10(r1)
/* 8008A700 00087640  80 01 00 14 */	lwz r0, 0x14(r1)
/* 8008A704 00087644  90 85 00 08 */	stw r4, 8(r5)
/* 8008A708 00087648  90 05 00 0C */	stw r0, 0xc(r5)
/* 8008A70C 0008764C  BB 21 00 1C */	lmw r25, 0x1c(r1)
/* 8008A710 00087650  38 21 00 38 */	addi r1, r1, 0x38
/* 8008A714 00087654  80 01 00 04 */	lwz r0, 4(r1)
/* 8008A718 00087658  7C 08 03 A6 */	mtlr r0
/* 8008A71C 0008765C  4E 80 00 20 */	blr 

.global TRKTargetReadInstruction
TRKTargetReadInstruction:
/* 8008A720 00087660  7C 08 02 A6 */	mflr r0
/* 8008A724 00087664  90 01 00 04 */	stw r0, 4(r1)
/* 8008A728 00087668  94 21 FF F0 */	stwu r1, -0x10(r1)
/* 8008A72C 0008766C  38 00 00 04 */	li r0, 4
/* 8008A730 00087670  38 A1 00 08 */	addi r5, r1, 8
/* 8008A734 00087674  90 01 00 08 */	stw r0, 8(r1)
/* 8008A738 00087678  38 C0 00 00 */	li r6, 0
/* 8008A73C 0008767C  38 E0 00 01 */	li r7, 1
/* 8008A740 00087680  4B FF FE 7D */	bl TRKTargetAccessMemory
/* 8008A744 00087684  2C 03 00 00 */	cmpwi r3, 0
/* 8008A748 00087688  40 82 00 14 */	bne lbl_8008A75C
/* 8008A74C 0008768C  80 01 00 08 */	lwz r0, 8(r1)
/* 8008A750 00087690  28 00 00 04 */	cmplwi r0, 4
/* 8008A754 00087694  41 82 00 08 */	beq lbl_8008A75C
/* 8008A758 00087698  38 60 07 00 */	li r3, 0x700
lbl_8008A75C:
/* 8008A75C 0008769C  38 21 00 10 */	addi r1, r1, 0x10
/* 8008A760 000876A0  80 01 00 04 */	lwz r0, 4(r1)
/* 8008A764 000876A4  7C 08 03 A6 */	mtlr r0
/* 8008A768 000876A8  4E 80 00 20 */	blr 

.global TRKTargetAccessDefault
TRKTargetAccessDefault:
/* 8008A76C 000876AC  7C 08 02 A6 */	mflr r0
/* 8008A770 000876B0  90 01 00 04 */	stw r0, 4(r1)
/* 8008A774 000876B4  94 21 FF E0 */	stwu r1, -0x20(r1)
/* 8008A778 000876B8  93 E1 00 1C */	stw r31, 0x1c(r1)
/* 8008A77C 000876BC  93 C1 00 18 */	stw r30, 0x18(r1)
/* 8008A780 000876C0  7C DF 33 78 */	mr r31, r6
/* 8008A784 000876C4  28 04 00 24 */	cmplwi r4, 0x24
/* 8008A788 000876C8  40 81 00 0C */	ble lbl_8008A794
/* 8008A78C 000876CC  38 60 07 01 */	li r3, 0x701
/* 8008A790 000876D0  48 00 00 C0 */	b lbl_8008A850
lbl_8008A794:
/* 8008A794 000876D4  3C C0 80 3B */	lis r6, gTRKExceptionStatus@ha
/* 8008A798 000876D8  2C 07 00 00 */	cmpwi r7, 0
/* 8008A79C 000876DC  39 06 F0 24 */	addi r8, r6, gTRKExceptionStatus@l
/* 8008A7A0 000876E0  80 08 00 00 */	lwz r0, 0(r8)
/* 8008A7A4 000876E4  7C 83 20 50 */	subf r4, r3, r4
/* 8008A7A8 000876E8  80 E8 00 04 */	lwz r7, 4(r8)
/* 8008A7AC 000876EC  39 24 00 01 */	addi r9, r4, 1
/* 8008A7B0 000876F0  3C 80 80 3F */	lis r4, gTRKCPUState@ha
/* 8008A7B4 000876F4  90 01 00 08 */	stw r0, 8(r1)
/* 8008A7B8 000876F8  38 04 AC 30 */	addi r0, r4, gTRKCPUState@l
/* 8008A7BC 000876FC  54 63 10 3A */	slwi r3, r3, 2
/* 8008A7C0 00087700  3B C8 00 0D */	addi r30, r8, 0xd
/* 8008A7C4 00087704  90 E1 00 0C */	stw r7, 0xc(r1)
/* 8008A7C8 00087708  7C 80 1A 14 */	add r4, r0, r3
/* 8008A7CC 0008770C  80 E8 00 08 */	lwz r7, 8(r8)
/* 8008A7D0 00087710  38 C0 00 00 */	li r6, 0
/* 8008A7D4 00087714  80 68 00 0C */	lwz r3, 0xc(r8)
/* 8008A7D8 00087718  55 20 10 3A */	slwi r0, r9, 2
/* 8008A7DC 0008771C  90 E1 00 10 */	stw r7, 0x10(r1)
/* 8008A7E0 00087720  7D 27 4B 78 */	mr r7, r9
/* 8008A7E4 00087724  90 61 00 14 */	stw r3, 0x14(r1)
/* 8008A7E8 00087728  98 DE 00 00 */	stb r6, 0(r30)
/* 8008A7EC 0008772C  90 1F 00 00 */	stw r0, 0(r31)
/* 8008A7F0 00087730  41 82 00 14 */	beq lbl_8008A804
/* 8008A7F4 00087734  7C A3 2B 78 */	mr r3, r5
/* 8008A7F8 00087738  7C E5 3B 78 */	mr r5, r7
/* 8008A7FC 0008773C  4B FF DD 7D */	bl TRKAppendBuffer_ui32
/* 8008A800 00087740  48 00 00 10 */	b lbl_8008A810
lbl_8008A804:
/* 8008A804 00087744  7C A3 2B 78 */	mr r3, r5
/* 8008A808 00087748  7C E5 3B 78 */	mr r5, r7
/* 8008A80C 0008774C  4B FF E0 41 */	bl TRKReadBuffer_ui32
lbl_8008A810:
/* 8008A810 00087750  88 1E 00 00 */	lbz r0, 0(r30)
/* 8008A814 00087754  28 00 00 00 */	cmplwi r0, 0
/* 8008A818 00087758  41 82 00 10 */	beq lbl_8008A828
/* 8008A81C 0008775C  38 00 00 00 */	li r0, 0
/* 8008A820 00087760  90 1F 00 00 */	stw r0, 0(r31)
/* 8008A824 00087764  38 60 07 02 */	li r3, 0x702
lbl_8008A828:
/* 8008A828 00087768  3C A0 80 3B */	lis r5, gTRKExceptionStatus@ha
/* 8008A82C 0008776C  80 81 00 08 */	lwz r4, 8(r1)
/* 8008A830 00087770  80 01 00 0C */	lwz r0, 0xc(r1)
/* 8008A834 00087774  38 A5 F0 24 */	addi r5, r5, gTRKExceptionStatus@l
/* 8008A838 00087778  90 85 00 00 */	stw r4, 0(r5)
/* 8008A83C 0008777C  90 05 00 04 */	stw r0, 4(r5)
/* 8008A840 00087780  80 81 00 10 */	lwz r4, 0x10(r1)
/* 8008A844 00087784  80 01 00 14 */	lwz r0, 0x14(r1)
/* 8008A848 00087788  90 85 00 08 */	stw r4, 8(r5)
/* 8008A84C 0008778C  90 05 00 0C */	stw r0, 0xc(r5)
lbl_8008A850:
/* 8008A850 00087790  83 E1 00 1C */	lwz r31, 0x1c(r1)
/* 8008A854 00087794  83 C1 00 18 */	lwz r30, 0x18(r1)
/* 8008A858 00087798  38 21 00 20 */	addi r1, r1, 0x20
/* 8008A85C 0008779C  80 01 00 04 */	lwz r0, 4(r1)
/* 8008A860 000877A0  7C 08 03 A6 */	mtlr r0
/* 8008A864 000877A4  4E 80 00 20 */	blr 

.global TRKTargetAccessFP
TRKTargetAccessFP:
/* 8008A868 000877A8  7C 08 02 A6 */	mflr r0
/* 8008A86C 000877AC  90 01 00 04 */	stw r0, 4(r1)
/* 8008A870 000877B0  94 21 FF C0 */	stwu r1, -0x40(r1)
/* 8008A874 000877B4  BF 21 00 24 */	stmw r25, 0x24(r1)
/* 8008A878 000877B8  7C 79 1B 78 */	mr r25, r3
/* 8008A87C 000877BC  7C 9C 23 78 */	mr r28, r4
/* 8008A880 000877C0  7C BD 2B 78 */	mr r29, r5
/* 8008A884 000877C4  7C DE 33 78 */	mr r30, r6
/* 8008A888 000877C8  7C FF 3B 78 */	mr r31, r7
/* 8008A88C 000877CC  28 1C 00 21 */	cmplwi r28, 0x21
/* 8008A890 000877D0  40 81 00 0C */	ble lbl_8008A89C
/* 8008A894 000877D4  38 60 07 01 */	li r3, 0x701
/* 8008A898 000877D8  48 00 01 04 */	b lbl_8008A99C
lbl_8008A89C:
/* 8008A89C 000877DC  3C 60 80 3B */	lis r3, gTRKExceptionStatus@ha
/* 8008A8A0 000877E0  38 83 F0 24 */	addi r4, r3, gTRKExceptionStatus@l
/* 8008A8A4 000877E4  80 64 00 00 */	lwz r3, 0(r4)
/* 8008A8A8 000877E8  3B 44 00 0D */	addi r26, r4, 0xd
/* 8008A8AC 000877EC  80 04 00 04 */	lwz r0, 4(r4)
/* 8008A8B0 000877F0  3B 60 00 00 */	li r27, 0
/* 8008A8B4 000877F4  90 61 00 08 */	stw r3, 8(r1)
/* 8008A8B8 000877F8  90 01 00 0C */	stw r0, 0xc(r1)
/* 8008A8BC 000877FC  80 64 00 08 */	lwz r3, 8(r4)
/* 8008A8C0 00087800  80 04 00 0C */	lwz r0, 0xc(r4)
/* 8008A8C4 00087804  90 61 00 10 */	stw r3, 0x10(r1)
/* 8008A8C8 00087808  90 01 00 14 */	stw r0, 0x14(r1)
/* 8008A8CC 0008780C  9B 7A 00 00 */	stb r27, 0(r26)
/* 8008A8D0 00087810  4B FF FB 69 */	bl __TRK_get_MSR
/* 8008A8D4 00087814  60 63 20 00 */	ori r3, r3, 0x2000
/* 8008A8D8 00087818  4B FF FB 69 */	bl __TRK_set_MSR
/* 8008A8DC 0008781C  93 7E 00 00 */	stw r27, 0(r30)
/* 8008A8E0 00087820  7F 3B CB 78 */	mr r27, r25
/* 8008A8E4 00087824  38 60 00 00 */	li r3, 0
/* 8008A8E8 00087828  48 00 00 04 */	b lbl_8008A8EC
lbl_8008A8EC:
/* 8008A8EC 0008782C  48 00 00 04 */	b lbl_8008A8F0
lbl_8008A8F0:
/* 8008A8F0 00087830  48 00 00 5C */	b lbl_8008A94C
lbl_8008A8F4:
/* 8008A8F4 00087834  2C 1F 00 00 */	cmpwi r31, 0
/* 8008A8F8 00087838  41 82 00 28 */	beq lbl_8008A920
/* 8008A8FC 0008783C  7F 64 DB 78 */	mr r4, r27
/* 8008A900 00087840  38 61 00 18 */	addi r3, r1, 0x18
/* 8008A904 00087844  7F E5 FB 78 */	mr r5, r31
/* 8008A908 00087848  48 00 0F 15 */	bl TRKPPCAccessFPRegister
/* 8008A90C 0008784C  80 A1 00 18 */	lwz r5, 0x18(r1)
/* 8008A910 00087850  7F A3 EB 78 */	mr r3, r29
/* 8008A914 00087854  80 C1 00 1C */	lwz r6, 0x1c(r1)
/* 8008A918 00087858  4B FF DB 71 */	bl TRKAppendBuffer1_ui64
/* 8008A91C 0008785C  48 00 00 20 */	b lbl_8008A93C
lbl_8008A920:
/* 8008A920 00087860  7F A3 EB 78 */	mr r3, r29
/* 8008A924 00087864  38 81 00 18 */	addi r4, r1, 0x18
/* 8008A928 00087868  4B FF DE 01 */	bl TRKReadBuffer1_ui64
/* 8008A92C 0008786C  7F 64 DB 78 */	mr r4, r27
/* 8008A930 00087870  38 61 00 18 */	addi r3, r1, 0x18
/* 8008A934 00087874  7F E5 FB 78 */	mr r5, r31
/* 8008A938 00087878  48 00 0E E5 */	bl TRKPPCAccessFPRegister
lbl_8008A93C:
/* 8008A93C 0008787C  80 9E 00 00 */	lwz r4, 0(r30)
/* 8008A940 00087880  3B 7B 00 01 */	addi r27, r27, 1
/* 8008A944 00087884  38 04 00 08 */	addi r0, r4, 8
/* 8008A948 00087888  90 1E 00 00 */	stw r0, 0(r30)
lbl_8008A94C:
/* 8008A94C 0008788C  7C 1B E0 40 */	cmplw r27, r28
/* 8008A950 00087890  41 81 00 0C */	bgt lbl_8008A95C
/* 8008A954 00087894  2C 03 00 00 */	cmpwi r3, 0
/* 8008A958 00087898  41 82 FF 9C */	beq lbl_8008A8F4
lbl_8008A95C:
/* 8008A95C 0008789C  88 1A 00 00 */	lbz r0, 0(r26)
/* 8008A960 000878A0  28 00 00 00 */	cmplwi r0, 0
/* 8008A964 000878A4  41 82 00 10 */	beq lbl_8008A974
/* 8008A968 000878A8  38 00 00 00 */	li r0, 0
/* 8008A96C 000878AC  90 1E 00 00 */	stw r0, 0(r30)
/* 8008A970 000878B0  38 60 07 02 */	li r3, 0x702
lbl_8008A974:
/* 8008A974 000878B4  3C A0 80 3B */	lis r5, gTRKExceptionStatus@ha
/* 8008A978 000878B8  80 81 00 08 */	lwz r4, 8(r1)
/* 8008A97C 000878BC  80 01 00 0C */	lwz r0, 0xc(r1)
/* 8008A980 000878C0  38 A5 F0 24 */	addi r5, r5, gTRKExceptionStatus@l
/* 8008A984 000878C4  90 85 00 00 */	stw r4, 0(r5)
/* 8008A988 000878C8  90 05 00 04 */	stw r0, 4(r5)
/* 8008A98C 000878CC  80 81 00 10 */	lwz r4, 0x10(r1)
/* 8008A990 000878D0  80 01 00 14 */	lwz r0, 0x14(r1)
/* 8008A994 000878D4  90 85 00 08 */	stw r4, 8(r5)
/* 8008A998 000878D8  90 05 00 0C */	stw r0, 0xc(r5)
lbl_8008A99C:
/* 8008A99C 000878DC  BB 21 00 24 */	lmw r25, 0x24(r1)
/* 8008A9A0 000878E0  38 21 00 40 */	addi r1, r1, 0x40
/* 8008A9A4 000878E4  80 01 00 04 */	lwz r0, 4(r1)
/* 8008A9A8 000878E8  7C 08 03 A6 */	mtlr r0
/* 8008A9AC 000878EC  4E 80 00 20 */	blr 

.global TRKTargetAccessExtended1
TRKTargetAccessExtended1:
/* 8008A9B0 000878F0  7C 08 02 A6 */	mflr r0
/* 8008A9B4 000878F4  90 01 00 04 */	stw r0, 4(r1)
/* 8008A9B8 000878F8  94 21 FF E0 */	stwu r1, -0x20(r1)
/* 8008A9BC 000878FC  93 E1 00 1C */	stw r31, 0x1c(r1)
/* 8008A9C0 00087900  93 C1 00 18 */	stw r30, 0x18(r1)
/* 8008A9C4 00087904  7C DE 33 78 */	mr r30, r6
/* 8008A9C8 00087908  28 04 00 60 */	cmplwi r4, 0x60
/* 8008A9CC 0008790C  40 81 00 0C */	ble lbl_8008A9D8
/* 8008A9D0 00087910  38 60 07 01 */	li r3, 0x701
/* 8008A9D4 00087914  48 00 01 3C */	b lbl_8008AB10
lbl_8008A9D8:
/* 8008A9D8 00087918  3C C0 80 3B */	lis r6, gTRKExceptionStatus@ha
/* 8008A9DC 0008791C  7C 03 20 40 */	cmplw r3, r4
/* 8008A9E0 00087920  39 26 F0 24 */	addi r9, r6, gTRKExceptionStatus@l
/* 8008A9E4 00087924  81 09 00 00 */	lwz r8, 0(r9)
/* 8008A9E8 00087928  3B E9 00 0D */	addi r31, r9, 0xd
/* 8008A9EC 0008792C  80 C9 00 04 */	lwz r6, 4(r9)
/* 8008A9F0 00087930  38 00 00 00 */	li r0, 0
/* 8008A9F4 00087934  91 01 00 08 */	stw r8, 8(r1)
/* 8008A9F8 00087938  90 C1 00 0C */	stw r6, 0xc(r1)
/* 8008A9FC 0008793C  81 09 00 08 */	lwz r8, 8(r9)
/* 8008AA00 00087940  80 C9 00 0C */	lwz r6, 0xc(r9)
/* 8008AA04 00087944  91 01 00 10 */	stw r8, 0x10(r1)
/* 8008AA08 00087948  90 C1 00 14 */	stw r6, 0x14(r1)
/* 8008AA0C 0008794C  98 1F 00 00 */	stb r0, 0(r31)
/* 8008AA10 00087950  90 1E 00 00 */	stw r0, 0(r30)
/* 8008AA14 00087954  41 81 00 BC */	bgt lbl_8008AAD0
/* 8008AA18 00087958  7C 83 20 50 */	subf r4, r3, r4
/* 8008AA1C 0008795C  80 1E 00 00 */	lwz r0, 0(r30)
/* 8008AA20 00087960  39 04 00 01 */	addi r8, r4, 1
/* 8008AA24 00087964  2C 07 00 00 */	cmpwi r7, 0
/* 8008AA28 00087968  55 06 10 3A */	slwi r6, r8, 2
/* 8008AA2C 0008796C  3C 80 80 3F */	lis r4, gTRKCPUState@ha
/* 8008AA30 00087970  7C 00 32 14 */	add r0, r0, r6
/* 8008AA34 00087974  90 1E 00 00 */	stw r0, 0(r30)
/* 8008AA38 00087978  38 E4 AC 30 */	addi r7, r4, gTRKCPUState@l
/* 8008AA3C 0008797C  54 60 10 3A */	slwi r0, r3, 2
/* 8008AA40 00087980  7C 87 02 14 */	add r4, r7, r0
/* 8008AA44 00087984  38 84 01 A8 */	addi r4, r4, 0x1a8
/* 8008AA48 00087988  41 82 00 14 */	beq lbl_8008AA5C
/* 8008AA4C 0008798C  7C A3 2B 78 */	mr r3, r5
/* 8008AA50 00087990  7D 05 43 78 */	mr r5, r8
/* 8008AA54 00087994  4B FF DB 25 */	bl TRKAppendBuffer_ui32
/* 8008AA58 00087998  48 00 00 78 */	b lbl_8008AAD0
lbl_8008AA5C:
/* 8008AA5C 0008799C  38 07 01 EC */	addi r0, r7, 0x1ec
/* 8008AA60 000879A0  7C 04 00 40 */	cmplw r4, r0
/* 8008AA64 000879A4  41 81 00 28 */	bgt lbl_8008AA8C
/* 8008AA68 000879A8  38 66 FF FC */	addi r3, r6, -4
/* 8008AA6C 000879AC  38 07 01 E8 */	addi r0, r7, 0x1e8
/* 8008AA70 000879B0  7C 64 1A 14 */	add r3, r4, r3
/* 8008AA74 000879B4  7C 03 00 40 */	cmplw r3, r0
/* 8008AA78 000879B8  41 80 00 14 */	blt lbl_8008AA8C
/* 8008AA7C 000879BC  3C 60 80 3B */	lis r3, gTRKRestoreFlags@ha
/* 8008AA80 000879C0  38 63 F0 18 */	addi r3, r3, gTRKRestoreFlags@l
/* 8008AA84 000879C4  38 00 00 01 */	li r0, 1
/* 8008AA88 000879C8  98 03 00 00 */	stb r0, 0(r3)
lbl_8008AA8C:
/* 8008AA8C 000879CC  3C 60 80 3F */	lis r3, gTRKCPUState@ha
/* 8008AA90 000879D0  38 63 AC 30 */	addi r3, r3, gTRKCPUState@l
/* 8008AA94 000879D4  38 C3 02 78 */	addi r6, r3, 0x278
/* 8008AA98 000879D8  7C 04 30 40 */	cmplw r4, r6
/* 8008AA9C 000879DC  41 81 00 28 */	bgt lbl_8008AAC4
/* 8008AAA0 000879E0  55 03 10 3A */	slwi r3, r8, 2
/* 8008AAA4 000879E4  38 03 FF FC */	addi r0, r3, -4
/* 8008AAA8 000879E8  7C 04 02 14 */	add r0, r4, r0
/* 8008AAAC 000879EC  7C 00 30 40 */	cmplw r0, r6
/* 8008AAB0 000879F0  41 80 00 14 */	blt lbl_8008AAC4
/* 8008AAB4 000879F4  3C 60 80 3B */	lis r3, gTRKRestoreFlags@ha
/* 8008AAB8 000879F8  38 63 F0 18 */	addi r3, r3, gTRKRestoreFlags@l
/* 8008AABC 000879FC  38 00 00 01 */	li r0, 1
/* 8008AAC0 00087A00  98 03 00 01 */	stb r0, 1(r3)
lbl_8008AAC4:
/* 8008AAC4 00087A04  7C A3 2B 78 */	mr r3, r5
/* 8008AAC8 00087A08  7D 05 43 78 */	mr r5, r8
/* 8008AACC 00087A0C  4B FF DD 81 */	bl TRKReadBuffer_ui32
lbl_8008AAD0:
/* 8008AAD0 00087A10  88 1F 00 00 */	lbz r0, 0(r31)
/* 8008AAD4 00087A14  28 00 00 00 */	cmplwi r0, 0
/* 8008AAD8 00087A18  41 82 00 10 */	beq lbl_8008AAE8
/* 8008AADC 00087A1C  38 00 00 00 */	li r0, 0
/* 8008AAE0 00087A20  90 1E 00 00 */	stw r0, 0(r30)
/* 8008AAE4 00087A24  38 60 07 02 */	li r3, 0x702
lbl_8008AAE8:
/* 8008AAE8 00087A28  3C A0 80 3B */	lis r5, gTRKExceptionStatus@ha
/* 8008AAEC 00087A2C  80 81 00 08 */	lwz r4, 8(r1)
/* 8008AAF0 00087A30  80 01 00 0C */	lwz r0, 0xc(r1)
/* 8008AAF4 00087A34  38 A5 F0 24 */	addi r5, r5, gTRKExceptionStatus@l
/* 8008AAF8 00087A38  90 85 00 00 */	stw r4, 0(r5)
/* 8008AAFC 00087A3C  90 05 00 04 */	stw r0, 4(r5)
/* 8008AB00 00087A40  80 81 00 10 */	lwz r4, 0x10(r1)
/* 8008AB04 00087A44  80 01 00 14 */	lwz r0, 0x14(r1)
/* 8008AB08 00087A48  90 85 00 08 */	stw r4, 8(r5)
/* 8008AB0C 00087A4C  90 05 00 0C */	stw r0, 0xc(r5)
lbl_8008AB10:
/* 8008AB10 00087A50  83 E1 00 1C */	lwz r31, 0x1c(r1)
/* 8008AB14 00087A54  83 C1 00 18 */	lwz r30, 0x18(r1)
/* 8008AB18 00087A58  38 21 00 20 */	addi r1, r1, 0x20
/* 8008AB1C 00087A5C  80 01 00 04 */	lwz r0, 4(r1)
/* 8008AB20 00087A60  7C 08 03 A6 */	mtlr r0
/* 8008AB24 00087A64  4E 80 00 20 */	blr 

.global TRKTargetAccessExtended2
TRKTargetAccessExtended2:
/* 8008AB28 00087A68  7C 08 02 A6 */	mflr r0
/* 8008AB2C 00087A6C  90 01 00 04 */	stw r0, 4(r1)
/* 8008AB30 00087A70  94 21 FF C0 */	stwu r1, -0x40(r1)
/* 8008AB34 00087A74  BF 21 00 24 */	stmw r25, 0x24(r1)
/* 8008AB38 00087A78  7C 79 1B 78 */	mr r25, r3
/* 8008AB3C 00087A7C  7C 9B 23 78 */	mr r27, r4
/* 8008AB40 00087A80  7C BC 2B 78 */	mr r28, r5
/* 8008AB44 00087A84  7C DD 33 78 */	mr r29, r6
/* 8008AB48 00087A88  7C FE 3B 78 */	mr r30, r7
/* 8008AB4C 00087A8C  28 1B 00 1F */	cmplwi r27, 0x1f
/* 8008AB50 00087A90  40 81 00 0C */	ble lbl_8008AB5C
/* 8008AB54 00087A94  38 60 07 01 */	li r3, 0x701
/* 8008AB58 00087A98  48 00 01 38 */	b lbl_8008AC90
lbl_8008AB5C:
/* 8008AB5C 00087A9C  3C 80 80 3B */	lis r4, gTRKExceptionStatus@ha
/* 8008AB60 00087AA0  38 61 00 08 */	addi r3, r1, 8
/* 8008AB64 00087AA4  38 E4 F0 24 */	addi r7, r4, gTRKExceptionStatus@l
/* 8008AB68 00087AA8  80 A7 00 00 */	lwz r5, 0(r7)
/* 8008AB6C 00087AAC  3B E7 00 0D */	addi r31, r7, 0xd
/* 8008AB70 00087AB0  80 07 00 04 */	lwz r0, 4(r7)
/* 8008AB74 00087AB4  3B 40 00 00 */	li r26, 0
/* 8008AB78 00087AB8  38 80 03 98 */	li r4, 0x398
/* 8008AB7C 00087ABC  90 A1 00 0C */	stw r5, 0xc(r1)
/* 8008AB80 00087AC0  38 A0 00 01 */	li r5, 1
/* 8008AB84 00087AC4  90 01 00 10 */	stw r0, 0x10(r1)
/* 8008AB88 00087AC8  80 C7 00 08 */	lwz r6, 8(r7)
/* 8008AB8C 00087ACC  80 07 00 0C */	lwz r0, 0xc(r7)
/* 8008AB90 00087AD0  90 C1 00 14 */	stw r6, 0x14(r1)
/* 8008AB94 00087AD4  90 01 00 18 */	stw r0, 0x18(r1)
/* 8008AB98 00087AD8  9B 5F 00 00 */	stb r26, 0(r31)
/* 8008AB9C 00087ADC  48 00 0B 59 */	bl TRKPPCAccessSPR
/* 8008ABA0 00087AE0  80 01 00 08 */	lwz r0, 8(r1)
/* 8008ABA4 00087AE4  38 61 00 08 */	addi r3, r1, 8
/* 8008ABA8 00087AE8  38 80 03 98 */	li r4, 0x398
/* 8008ABAC 00087AEC  64 00 A0 00 */	oris r0, r0, 0xa000
/* 8008ABB0 00087AF0  90 01 00 08 */	stw r0, 8(r1)
/* 8008ABB4 00087AF4  38 A0 00 00 */	li r5, 0
/* 8008ABB8 00087AF8  48 00 0B 3D */	bl TRKPPCAccessSPR
/* 8008ABBC 00087AFC  93 41 00 08 */	stw r26, 8(r1)
/* 8008ABC0 00087B00  38 61 00 08 */	addi r3, r1, 8
/* 8008ABC4 00087B04  38 80 03 90 */	li r4, 0x390
/* 8008ABC8 00087B08  38 A0 00 00 */	li r5, 0
/* 8008ABCC 00087B0C  48 00 0B 29 */	bl TRKPPCAccessSPR
/* 8008ABD0 00087B10  93 5D 00 00 */	stw r26, 0(r29)
/* 8008ABD4 00087B14  7F 3A CB 78 */	mr r26, r25
/* 8008ABD8 00087B18  38 60 00 00 */	li r3, 0
/* 8008ABDC 00087B1C  48 00 00 04 */	b lbl_8008ABE0
lbl_8008ABE0:
/* 8008ABE0 00087B20  48 00 00 04 */	b lbl_8008ABE4
lbl_8008ABE4:
/* 8008ABE4 00087B24  48 00 00 5C */	b lbl_8008AC40
lbl_8008ABE8:
/* 8008ABE8 00087B28  2C 1E 00 00 */	cmpwi r30, 0
/* 8008ABEC 00087B2C  41 82 00 28 */	beq lbl_8008AC14
/* 8008ABF0 00087B30  7F 44 D3 78 */	mr r4, r26
/* 8008ABF4 00087B34  38 61 00 1C */	addi r3, r1, 0x1c
/* 8008ABF8 00087B38  7F C5 F3 78 */	mr r5, r30
/* 8008ABFC 00087B3C  48 00 0B A9 */	bl TRKPPCAccessPairedSingleRegister
/* 8008AC00 00087B40  80 A1 00 1C */	lwz r5, 0x1c(r1)
/* 8008AC04 00087B44  7F 83 E3 78 */	mr r3, r28
/* 8008AC08 00087B48  80 C1 00 20 */	lwz r6, 0x20(r1)
/* 8008AC0C 00087B4C  4B FF D8 7D */	bl TRKAppendBuffer1_ui64
/* 8008AC10 00087B50  48 00 00 20 */	b lbl_8008AC30
lbl_8008AC14:
/* 8008AC14 00087B54  7F 83 E3 78 */	mr r3, r28
/* 8008AC18 00087B58  38 81 00 1C */	addi r4, r1, 0x1c
/* 8008AC1C 00087B5C  4B FF DB 0D */	bl TRKReadBuffer1_ui64
/* 8008AC20 00087B60  7F 44 D3 78 */	mr r4, r26
/* 8008AC24 00087B64  38 61 00 1C */	addi r3, r1, 0x1c
/* 8008AC28 00087B68  7F C5 F3 78 */	mr r5, r30
/* 8008AC2C 00087B6C  48 00 0B 79 */	bl TRKPPCAccessPairedSingleRegister
lbl_8008AC30:
/* 8008AC30 00087B70  80 9D 00 00 */	lwz r4, 0(r29)
/* 8008AC34 00087B74  3B 5A 00 01 */	addi r26, r26, 1
/* 8008AC38 00087B78  38 04 00 08 */	addi r0, r4, 8
/* 8008AC3C 00087B7C  90 1D 00 00 */	stw r0, 0(r29)
lbl_8008AC40:
/* 8008AC40 00087B80  7C 1A D8 40 */	cmplw r26, r27
/* 8008AC44 00087B84  41 81 00 0C */	bgt lbl_8008AC50
/* 8008AC48 00087B88  2C 03 00 00 */	cmpwi r3, 0
/* 8008AC4C 00087B8C  41 82 FF 9C */	beq lbl_8008ABE8
lbl_8008AC50:
/* 8008AC50 00087B90  88 1F 00 00 */	lbz r0, 0(r31)
/* 8008AC54 00087B94  28 00 00 00 */	cmplwi r0, 0
/* 8008AC58 00087B98  41 82 00 10 */	beq lbl_8008AC68
/* 8008AC5C 00087B9C  38 00 00 00 */	li r0, 0
/* 8008AC60 00087BA0  90 1D 00 00 */	stw r0, 0(r29)
/* 8008AC64 00087BA4  38 60 07 02 */	li r3, 0x702
lbl_8008AC68:
/* 8008AC68 00087BA8  3C A0 80 3B */	lis r5, gTRKExceptionStatus@ha
/* 8008AC6C 00087BAC  80 81 00 0C */	lwz r4, 0xc(r1)
/* 8008AC70 00087BB0  80 01 00 10 */	lwz r0, 0x10(r1)
/* 8008AC74 00087BB4  38 A5 F0 24 */	addi r5, r5, gTRKExceptionStatus@l
/* 8008AC78 00087BB8  90 85 00 00 */	stw r4, 0(r5)
/* 8008AC7C 00087BBC  90 05 00 04 */	stw r0, 4(r5)
/* 8008AC80 00087BC0  80 81 00 14 */	lwz r4, 0x14(r1)
/* 8008AC84 00087BC4  80 01 00 18 */	lwz r0, 0x18(r1)
/* 8008AC88 00087BC8  90 85 00 08 */	stw r4, 8(r5)
/* 8008AC8C 00087BCC  90 05 00 0C */	stw r0, 0xc(r5)
lbl_8008AC90:
/* 8008AC90 00087BD0  BB 21 00 24 */	lmw r25, 0x24(r1)
/* 8008AC94 00087BD4  38 21 00 40 */	addi r1, r1, 0x40
/* 8008AC98 00087BD8  80 01 00 04 */	lwz r0, 4(r1)
/* 8008AC9C 00087BDC  7C 08 03 A6 */	mtlr r0
/* 8008ACA0 00087BE0  4E 80 00 20 */	blr 

.global TRKTargetVersions
TRKTargetVersions:
/* 8008ACA4 00087BE4  38 00 00 00 */	li r0, 0
/* 8008ACA8 00087BE8  98 03 00 00 */	stb r0, 0(r3)
/* 8008ACAC 00087BEC  38 00 00 08 */	li r0, 8
/* 8008ACB0 00087BF0  38 80 00 01 */	li r4, 1
/* 8008ACB4 00087BF4  98 03 00 01 */	stb r0, 1(r3)
/* 8008ACB8 00087BF8  38 00 00 0A */	li r0, 0xa
/* 8008ACBC 00087BFC  98 83 00 02 */	stb r4, 2(r3)
/* 8008ACC0 00087C00  98 03 00 03 */	stb r0, 3(r3)
/* 8008ACC4 00087C04  38 60 00 00 */	li r3, 0
/* 8008ACC8 00087C08  4E 80 00 20 */	blr 

.global TRKTargetSupportMask
TRKTargetSupportMask:
/* 8008ACCC 00087C0C  38 00 00 7A */	li r0, 0x7a
/* 8008ACD0 00087C10  98 03 00 00 */	stb r0, 0(r3)
/* 8008ACD4 00087C14  38 E0 00 00 */	li r7, 0
/* 8008ACD8 00087C18  38 00 00 4F */	li r0, 0x4f
/* 8008ACDC 00087C1C  98 E3 00 01 */	stb r7, 1(r3)
/* 8008ACE0 00087C20  38 C0 00 07 */	li r6, 7
/* 8008ACE4 00087C24  38 A0 00 01 */	li r5, 1
/* 8008ACE8 00087C28  98 03 00 02 */	stb r0, 2(r3)
/* 8008ACEC 00087C2C  38 80 00 03 */	li r4, 3
/* 8008ACF0 00087C30  38 00 00 80 */	li r0, 0x80
/* 8008ACF4 00087C34  98 C3 00 03 */	stb r6, 3(r3)
/* 8008ACF8 00087C38  98 E3 00 04 */	stb r7, 4(r3)
/* 8008ACFC 00087C3C  98 E3 00 05 */	stb r7, 5(r3)
/* 8008AD00 00087C40  98 E3 00 06 */	stb r7, 6(r3)
/* 8008AD04 00087C44  98 E3 00 07 */	stb r7, 7(r3)
/* 8008AD08 00087C48  98 E3 00 08 */	stb r7, 8(r3)
/* 8008AD0C 00087C4C  98 E3 00 09 */	stb r7, 9(r3)
/* 8008AD10 00087C50  98 E3 00 0A */	stb r7, 0xa(r3)
/* 8008AD14 00087C54  98 E3 00 0B */	stb r7, 0xb(r3)
/* 8008AD18 00087C58  98 E3 00 0C */	stb r7, 0xc(r3)
/* 8008AD1C 00087C5C  98 E3 00 0D */	stb r7, 0xd(r3)
/* 8008AD20 00087C60  98 E3 00 0E */	stb r7, 0xe(r3)
/* 8008AD24 00087C64  98 E3 00 0F */	stb r7, 0xf(r3)
/* 8008AD28 00087C68  98 A3 00 10 */	stb r5, 0x10(r3)
/* 8008AD2C 00087C6C  98 E3 00 11 */	stb r7, 0x11(r3)
/* 8008AD30 00087C70  98 83 00 12 */	stb r4, 0x12(r3)
/* 8008AD34 00087C74  98 E3 00 13 */	stb r7, 0x13(r3)
/* 8008AD38 00087C78  98 E3 00 14 */	stb r7, 0x14(r3)
/* 8008AD3C 00087C7C  98 E3 00 15 */	stb r7, 0x15(r3)
/* 8008AD40 00087C80  98 E3 00 16 */	stb r7, 0x16(r3)
/* 8008AD44 00087C84  98 E3 00 17 */	stb r7, 0x17(r3)
/* 8008AD48 00087C88  98 E3 00 18 */	stb r7, 0x18(r3)
/* 8008AD4C 00087C8C  98 E3 00 19 */	stb r7, 0x19(r3)
/* 8008AD50 00087C90  98 83 00 1A */	stb r4, 0x1a(r3)
/* 8008AD54 00087C94  98 E3 00 1B */	stb r7, 0x1b(r3)
/* 8008AD58 00087C98  98 E3 00 1C */	stb r7, 0x1c(r3)
/* 8008AD5C 00087C9C  98 E3 00 1D */	stb r7, 0x1d(r3)
/* 8008AD60 00087CA0  98 E3 00 1E */	stb r7, 0x1e(r3)
/* 8008AD64 00087CA4  98 03 00 1F */	stb r0, 0x1f(r3)
/* 8008AD68 00087CA8  38 60 00 00 */	li r3, 0
/* 8008AD6C 00087CAC  4E 80 00 20 */	blr 

.global TRKTargetCPUType
TRKTargetCPUType:
/* 8008AD70 00087CB0  7C 08 02 A6 */	mflr r0
/* 8008AD74 00087CB4  90 01 00 04 */	stw r0, 4(r1)
/* 8008AD78 00087CB8  94 21 FF F0 */	stwu r1, -0x10(r1)
/* 8008AD7C 00087CBC  93 E1 00 0C */	stw r31, 0xc(r1)
/* 8008AD80 00087CC0  7C 7F 1B 78 */	mr r31, r3
/* 8008AD84 00087CC4  38 00 00 00 */	li r0, 0
/* 8008AD88 00087CC8  98 1F 00 00 */	stb r0, 0(r31)
/* 8008AD8C 00087CCC  48 00 12 39 */	bl TRKTargetCPUMinorType
/* 8008AD90 00087CD0  98 7F 00 01 */	stb r3, 1(r31)
/* 8008AD94 00087CD4  3C 60 80 3F */	lis r3, gTRKBigEndian@ha
/* 8008AD98 00087CD8  38 63 91 08 */	addi r3, r3, gTRKBigEndian@l
/* 8008AD9C 00087CDC  80 63 00 00 */	lwz r3, 0(r3)
/* 8008ADA0 00087CE0  38 80 00 04 */	li r4, 4
/* 8008ADA4 00087CE4  38 00 00 08 */	li r0, 8
/* 8008ADA8 00087CE8  54 63 06 3E */	clrlwi r3, r3, 0x18
/* 8008ADAC 00087CEC  98 7F 00 02 */	stb r3, 2(r31)
/* 8008ADB0 00087CF0  38 60 00 00 */	li r3, 0
/* 8008ADB4 00087CF4  98 9F 00 03 */	stb r4, 3(r31)
/* 8008ADB8 00087CF8  98 1F 00 04 */	stb r0, 4(r31)
/* 8008ADBC 00087CFC  98 9F 00 05 */	stb r4, 5(r31)
/* 8008ADC0 00087D00  98 1F 00 06 */	stb r0, 6(r31)
/* 8008ADC4 00087D04  83 E1 00 0C */	lwz r31, 0xc(r1)
/* 8008ADC8 00087D08  38 21 00 10 */	addi r1, r1, 0x10
/* 8008ADCC 00087D0C  80 01 00 04 */	lwz r0, 4(r1)
/* 8008ADD0 00087D10  7C 08 03 A6 */	mtlr r0
/* 8008ADD4 00087D14  4E 80 00 20 */	blr 

.global TRKInterruptHandler
TRKInterruptHandler:
/* 8008ADD8 00087D18  7C 5A 03 A6 */	mtspr 0x1a, r2
/* 8008ADDC 00087D1C  7C 9B 03 A6 */	mtspr 0x1b, r4
/* 8008ADE0 00087D20  7C 93 42 A6 */	mfspr r4, 0x113
/* 8008ADE4 00087D24  7C 40 00 26 */	mfcr r2
/* 8008ADE8 00087D28  7C 53 43 A6 */	mtspr 0x113, r2
/* 8008ADEC 00087D2C  3C 40 80 3E */	lis r2, gTRKState@h
/* 8008ADF0 00087D30  60 42 AB 88 */	ori r2, r2, gTRKState@l
/* 8008ADF4 00087D34  80 42 00 8C */	lwz r2, 0x8c(r2)
/* 8008ADF8 00087D38  60 42 80 02 */	ori r2, r2, 0x8002
/* 8008ADFC 00087D3C  68 42 80 02 */	xori r2, r2, 0x8002
/* 8008AE00 00087D40  7C 00 04 AC */	sync 0
/* 8008AE04 00087D44  7C 40 01 24 */	mtmsr r2
/* 8008AE08 00087D48  7C 00 04 AC */	sync 0
/* 8008AE0C 00087D4C  3C 40 80 3E */	lis r2, TRK_saved_exceptionID@h
/* 8008AE10 00087D50  60 42 AA E0 */	ori r2, r2, TRK_saved_exceptionID@l
/* 8008AE14 00087D54  B0 62 00 00 */	sth r3, 0x0(r2)
/* 8008AE18 00087D58  2C 03 05 00 */	cmpwi r3, 0x500
/* 8008AE1C 00087D5C  40 82 00 84 */	bne lbl_8008AEA0
/* 8008AE20 00087D60  3C 40 80 3E */	lis r2, gTRKCPUState@h
/* 8008AE24 00087D64  60 42 AC 30 */	ori r2, r2, gTRKCPUState@l
/* 8008AE28 00087D68  7C 68 02 A6 */	mflr r3
/* 8008AE2C 00087D6C  90 62 04 2C */	stw r3, 0x42c(r2)
/* 8008AE30 00087D70  48 00 13 8D */	bl TRKUARTInterruptHandler
/* 8008AE34 00087D74  3C 40 80 3E */	lis r2, gTRKCPUState@h
/* 8008AE38 00087D78  60 42 AC 30 */	ori r2, r2, gTRKCPUState@l
/* 8008AE3C 00087D7C  80 62 04 2C */	lwz r3, 0x42c(r2)
/* 8008AE40 00087D80  7C 68 03 A6 */	mtlr r3
/* 8008AE44 00087D84  3C 40 80 3E */	lis r2, gTRKState@h
/* 8008AE48 00087D88  60 42 AB 88 */	ori r2, r2, gTRKState@l
/* 8008AE4C 00087D8C  80 42 00 A0 */	lwz r2, 0xa0(r2)
/* 8008AE50 00087D90  88 42 00 00 */	lbz r2, 0x0(r2)
/* 8008AE54 00087D94  2C 02 00 00 */	cmpwi r2, 0
/* 8008AE58 00087D98  41 82 00 2C */	beq lbl_8008AE84
/* 8008AE5C 00087D9C  3C 40 80 3A */	lis r2, gTRKExceptionStatus@h
/* 8008AE60 00087DA0  60 42 F0 24 */	ori r2, r2, gTRKExceptionStatus@l
/* 8008AE64 00087DA4  88 42 00 0C */	lbz r2, 0xc(r2)
/* 8008AE68 00087DA8  2C 02 00 01 */	cmpwi r2, 1
/* 8008AE6C 00087DAC  41 82 00 18 */	beq lbl_8008AE84
/* 8008AE70 00087DB0  3C 40 80 3E */	lis r2, gTRKState@h
/* 8008AE74 00087DB4  60 42 AB 88 */	ori r2, r2, gTRKState@l
/* 8008AE78 00087DB8  38 60 00 01 */	li r3, 1
/* 8008AE7C 00087DBC  98 62 00 9C */	stb r3, 0x9c(r2)
/* 8008AE80 00087DC0  48 00 00 20 */	b lbl_8008AEA0
lbl_8008AE84:
/* 8008AE84 00087DC4  3C 40 80 3E */	lis r2, gTRKSaveState@h
/* 8008AE88 00087DC8  60 42 AA E4 */	ori r2, r2, gTRKSaveState@l
/* 8008AE8C 00087DCC  80 62 00 88 */	lwz r3, 0x88(r2)
/* 8008AE90 00087DD0  7C 6F F1 20 */	mtcrf 0xff, r3
/* 8008AE94 00087DD4  80 62 00 0C */	lwz r3, 0xc(r2)
/* 8008AE98 00087DD8  80 42 00 08 */	lwz r2, 0x8(r2)
/* 8008AE9C 00087DDC  4C 00 00 64 */	rfi 
lbl_8008AEA0:
/* 8008AEA0 00087DE0  3C 40 80 3E */	lis r2, TRK_saved_exceptionID@h
/* 8008AEA4 00087DE4  60 42 AA E0 */	ori r2, r2, TRK_saved_exceptionID@l
/* 8008AEA8 00087DE8  A0 62 00 00 */	lhz r3, 0x0(r2)
/* 8008AEAC 00087DEC  3C 40 80 3A */	lis r2, gTRKExceptionStatus@h
/* 8008AEB0 00087DF0  60 42 F0 24 */	ori r2, r2, gTRKExceptionStatus@l
/* 8008AEB4 00087DF4  88 42 00 0C */	lbz r2, 0xc(r2)
/* 8008AEB8 00087DF8  2C 02 00 00 */	cmpwi r2, 0
/* 8008AEBC 00087DFC  40 82 00 B0 */	bne TRKExceptionHandler
/* 8008AEC0 00087E00  3C 40 80 3E */	lis r2, gTRKCPUState@h
/* 8008AEC4 00087E04  60 42 AC 30 */	ori r2, r2, gTRKCPUState@l
/* 8008AEC8 00087E08  90 02 00 00 */	stw r0, 0x0(r2)
/* 8008AECC 00087E0C  90 22 00 04 */	stw r1, 0x4(r2)
/* 8008AED0 00087E10  7C 11 42 A6 */	mfspr r0, 0x111
/* 8008AED4 00087E14  90 02 00 08 */	stw r0, 0x8(r2)
/* 8008AED8 00087E18  B0 62 02 F8 */	sth r3, 0x2f8(r2)
/* 8008AEDC 00087E1C  B0 62 02 FA */	sth r3, 0x2fa(r2)
/* 8008AEE0 00087E20  7C 12 42 A6 */	mfspr r0, 0x112
/* 8008AEE4 00087E24  90 02 00 0C */	stw r0, 0xc(r2)
/* 8008AEE8 00087E28  BC 82 00 10 */	stmw r4, 0x10(r2)
/* 8008AEEC 00087E2C  7F 7A 02 A6 */	mfspr r27, 0x1a
/* 8008AEF0 00087E30  7F 88 02 A6 */	mflr r28
/* 8008AEF4 00087E34  7F B3 42 A6 */	mfspr r29, 0x113
/* 8008AEF8 00087E38  7F C9 02 A6 */	mfctr r30
/* 8008AEFC 00087E3C  7F E1 02 A6 */	mfxer r31
/* 8008AF00 00087E40  BF 62 00 80 */	stmw r27, 0x80(r2)
/* 8008AF04 00087E44  48 00 0D 51 */	bl TRKSaveExtended1Block
/* 8008AF08 00087E48  3C 40 80 3A */	lis r2, gTRKExceptionStatus@h
/* 8008AF0C 00087E4C  60 42 F0 24 */	ori r2, r2, gTRKExceptionStatus@l
/* 8008AF10 00087E50  38 60 00 01 */	li r3, 1
/* 8008AF14 00087E54  98 62 00 0C */	stb r3, 0xc(r2)
/* 8008AF18 00087E58  3C 40 80 3E */	lis r2, gTRKState@h
/* 8008AF1C 00087E5C  60 42 AB 88 */	ori r2, r2, gTRKState@l
/* 8008AF20 00087E60  80 02 00 8C */	lwz r0, 0x8c(r2)
/* 8008AF24 00087E64  7C 00 04 AC */	sync 0
/* 8008AF28 00087E68  7C 00 01 24 */	mtmsr r0
/* 8008AF2C 00087E6C  7C 00 04 AC */	sync 0
/* 8008AF30 00087E70  80 02 00 80 */	lwz r0, 0x80(r2)
/* 8008AF34 00087E74  7C 08 03 A6 */	mtlr r0
/* 8008AF38 00087E78  80 02 00 84 */	lwz r0, 0x84(r2)
/* 8008AF3C 00087E7C  7C 09 03 A6 */	mtctr r0
/* 8008AF40 00087E80  80 02 00 88 */	lwz r0, 0x88(r2)
/* 8008AF44 00087E84  7C 01 03 A6 */	mtxer r0
/* 8008AF48 00087E88  80 02 00 94 */	lwz r0, 0x94(r2)
/* 8008AF4C 00087E8C  7C 12 03 A6 */	mtdsisr r0
/* 8008AF50 00087E90  80 02 00 90 */	lwz r0, 0x90(r2)
/* 8008AF54 00087E94  7C 13 03 A6 */	mtdar r0
/* 8008AF58 00087E98  B8 62 00 0C */	lmw r3, 0xc(r2)
/* 8008AF5C 00087E9C  80 02 00 00 */	lwz r0, 0x0(r2)
/* 8008AF60 00087EA0  80 22 00 04 */	lwz r1, 0x4(r2)
/* 8008AF64 00087EA4  80 42 00 08 */	lwz r2, 0x8(r2)
/* 8008AF68 00087EA8  48 00 00 A0 */	b TRKPostInterruptEvent

.global TRKExceptionHandler
TRKExceptionHandler:
/* 8008AF6C 00087EAC  3C 40 80 3A */	lis r2, gTRKExceptionStatus@h
/* 8008AF70 00087EB0  60 42 F0 24 */	ori r2, r2, gTRKExceptionStatus@l
/* 8008AF74 00087EB4  B0 62 00 08 */	sth r3, 0x8(r2)
/* 8008AF78 00087EB8  7C 7A 02 A6 */	mfspr r3, 0x1a
/* 8008AF7C 00087EBC  90 62 00 00 */	stw r3, 0x0(r2)
/* 8008AF80 00087EC0  A0 62 00 08 */	lhz r3, 0x8(r2)
/* 8008AF84 00087EC4  2C 03 02 00 */	cmpwi r3, 0x200
/* 8008AF88 00087EC8  41 82 00 50 */	beq lbl_8008AFD8
/* 8008AF8C 00087ECC  2C 03 03 00 */	cmpwi r3, 0x300
/* 8008AF90 00087ED0  41 82 00 48 */	beq lbl_8008AFD8
/* 8008AF94 00087ED4  2C 03 04 00 */	cmpwi r3, 0x400
/* 8008AF98 00087ED8  41 82 00 40 */	beq lbl_8008AFD8
/* 8008AF9C 00087EDC  2C 03 06 00 */	cmpwi r3, 0x600
/* 8008AFA0 00087EE0  41 82 00 38 */	beq lbl_8008AFD8
/* 8008AFA4 00087EE4  2C 03 07 00 */	cmpwi r3, 0x700
/* 8008AFA8 00087EE8  41 82 00 30 */	beq lbl_8008AFD8
/* 8008AFAC 00087EEC  2C 03 08 00 */	cmpwi r3, 0x800
/* 8008AFB0 00087EF0  41 82 00 28 */	beq lbl_8008AFD8
/* 8008AFB4 00087EF4  2C 03 10 00 */	cmpwi r3, 0x1000
/* 8008AFB8 00087EF8  41 82 00 20 */	beq lbl_8008AFD8
/* 8008AFBC 00087EFC  2C 03 11 00 */	cmpwi r3, 0x1100
/* 8008AFC0 00087F00  41 82 00 18 */	beq lbl_8008AFD8
/* 8008AFC4 00087F04  2C 03 12 00 */	cmpwi r3, 0x1200
/* 8008AFC8 00087F08  41 82 00 10 */	beq lbl_8008AFD8
/* 8008AFCC 00087F0C  2C 03 13 00 */	cmpwi r3, 0x1300
/* 8008AFD0 00087F10  41 82 00 08 */	beq lbl_8008AFD8
/* 8008AFD4 00087F14  48 00 00 10 */	b lbl_8008AFE4
lbl_8008AFD8:
/* 8008AFD8 00087F18  7C 7A 02 A6 */	mfspr r3, 0x1a
/* 8008AFDC 00087F1C  38 63 00 04 */	addi r3, r3, 4
/* 8008AFE0 00087F20  7C 7A 03 A6 */	mtspr 0x1a, r3
lbl_8008AFE4:
/* 8008AFE4 00087F24  3C 40 80 3A */	lis r2, gTRKExceptionStatus@h
/* 8008AFE8 00087F28  60 42 F0 24 */	ori r2, r2, gTRKExceptionStatus@l
/* 8008AFEC 00087F2C  38 60 00 01 */	li r3, 1
/* 8008AFF0 00087F30  98 62 00 0D */	stb r3, 0xd(r2)
/* 8008AFF4 00087F34  7C 73 42 A6 */	mfspr r3, 0x113
/* 8008AFF8 00087F38  7C 6F F1 20 */	mtcrf 0xff, r3
/* 8008AFFC 00087F3C  7C 51 42 A6 */	mfspr r2, 0x111
/* 8008B000 00087F40  7C 72 42 A6 */	mfspr r3, 0x112
/* 8008B004 00087F44  4C 00 00 64 */	rfi 

.global TRKPostInterruptEvent
TRKPostInterruptEvent:
/* 8008B008 00087F48  7C 08 02 A6 */	mflr r0
/* 8008B00C 00087F4C  90 01 00 04 */	stw r0, 4(r1)
/* 8008B010 00087F50  94 21 FF E8 */	stwu r1, -0x18(r1)
/* 8008B014 00087F54  3C 60 80 3F */	lis r3, gTRKState@ha
/* 8008B018 00087F58  38 63 AB 88 */	addi r3, r3, gTRKState@l
/* 8008B01C 00087F5C  38 63 00 9C */	addi r3, r3, 0x9c
/* 8008B020 00087F60  80 03 00 00 */	lwz r0, 0(r3)
/* 8008B024 00087F64  2C 00 00 00 */	cmpwi r0, 0
/* 8008B028 00087F68  41 82 00 10 */	beq lbl_8008B038
/* 8008B02C 00087F6C  38 00 00 00 */	li r0, 0
/* 8008B030 00087F70  90 03 00 00 */	stw r0, 0(r3)
/* 8008B034 00087F74  48 00 00 74 */	b lbl_8008B0A8
lbl_8008B038:
/* 8008B038 00087F78  3C 60 80 3F */	lis r3, gTRKCPUState@ha
/* 8008B03C 00087F7C  38 63 AC 30 */	addi r3, r3, gTRKCPUState@l
/* 8008B040 00087F80  80 03 02 F8 */	lwz r0, 0x2f8(r3)
/* 8008B044 00087F84  54 00 04 3E */	clrlwi r0, r0, 0x10
/* 8008B048 00087F88  2C 00 0D 00 */	cmpwi r0, 0xd00
/* 8008B04C 00087F8C  41 82 00 14 */	beq lbl_8008B060
/* 8008B050 00087F90  40 80 00 44 */	bge lbl_8008B094
/* 8008B054 00087F94  2C 00 07 00 */	cmpwi r0, 0x700
/* 8008B058 00087F98  41 82 00 08 */	beq lbl_8008B060
/* 8008B05C 00087F9C  48 00 00 38 */	b lbl_8008B094
lbl_8008B060:
/* 8008B060 00087FA0  3C 80 80 3F */	lis r4, gTRKCPUState@ha
/* 8008B064 00087FA4  38 61 00 08 */	addi r3, r1, 8
/* 8008B068 00087FA8  38 84 AC 30 */	addi r4, r4, gTRKCPUState@l
/* 8008B06C 00087FAC  80 84 00 80 */	lwz r4, 0x80(r4)
/* 8008B070 00087FB0  4B FF F6 B1 */	bl TRKTargetReadInstruction
/* 8008B074 00087FB4  80 61 00 08 */	lwz r3, 8(r1)
/* 8008B078 00087FB8  3C 03 F0 20 */	addis r0, r3, 0xf020
/* 8008B07C 00087FBC  28 00 00 00 */	cmplwi r0, 0
/* 8008B080 00087FC0  40 82 00 0C */	bne lbl_8008B08C
/* 8008B084 00087FC4  38 80 00 05 */	li r4, 5
/* 8008B088 00087FC8  48 00 00 10 */	b lbl_8008B098
lbl_8008B08C:
/* 8008B08C 00087FCC  38 80 00 03 */	li r4, 3
/* 8008B090 00087FD0  48 00 00 08 */	b lbl_8008B098
lbl_8008B094:
/* 8008B094 00087FD4  38 80 00 04 */	li r4, 4
lbl_8008B098:
/* 8008B098 00087FD8  38 61 00 0C */	addi r3, r1, 0xc
/* 8008B09C 00087FDC  4B FF CD ED */	bl TRKConstructEvent
/* 8008B0A0 00087FE0  38 61 00 0C */	addi r3, r1, 0xc
/* 8008B0A4 00087FE4  4B FF CD 05 */	bl TRKPostEvent
lbl_8008B0A8:
/* 8008B0A8 00087FE8  38 21 00 18 */	addi r1, r1, 0x18
/* 8008B0AC 00087FEC  80 01 00 04 */	lwz r0, 4(r1)
/* 8008B0B0 00087FF0  7C 08 03 A6 */	mtlr r0
/* 8008B0B4 00087FF4  4E 80 00 20 */	blr 

.global TRKSwapAndGo
TRKSwapAndGo:
/* 8008B0B8 00087FF8  3C 60 80 3E */	lis r3, gTRKState@h
/* 8008B0BC 00087FFC  60 63 AB 88 */	ori r3, r3, gTRKState@l
/* 8008B0C0 00088000  BC 03 00 00 */	stmw r0, 0(r3)
/* 8008B0C4 00088004  7C 00 00 A6 */	mfmsr r0
/* 8008B0C8 00088008  90 03 00 8C */	stw r0, 0x8c(r3)
/* 8008B0CC 0008800C  7C 08 02 A6 */	mflr r0
/* 8008B0D0 00088010  90 03 00 80 */	stw r0, 0x80(r3)
/* 8008B0D4 00088014  7C 09 02 A6 */	mfctr r0
/* 8008B0D8 00088018  90 03 00 84 */	stw r0, 0x84(r3)
/* 8008B0DC 0008801C  7C 01 02 A6 */	mfxer r0
/* 8008B0E0 00088020  90 03 00 88 */	stw r0, 0x88(r3)
/* 8008B0E4 00088024  7C 12 02 A6 */	mfdsisr r0
/* 8008B0E8 00088028  90 03 00 94 */	stw r0, 0x94(r3)
/* 8008B0EC 0008802C  7C 13 02 A6 */	mfdar r0
/* 8008B0F0 00088030  90 03 00 90 */	stw r0, 0x90(r3)
/* 8008B0F4 00088034  38 20 80 02 */	li r1, -32766
/* 8008B0F8 00088038  7C 21 08 F8 */	nor r1, r1, r1
/* 8008B0FC 0008803C  7C 60 00 A6 */	mfmsr r3
/* 8008B100 00088040  7C 63 08 38 */	and r3, r3, r1
/* 8008B104 00088044  7C 60 01 24 */	mtmsr r3
/* 8008B108 00088048  3C 40 80 3E */	lis r2, gTRKState@h
/* 8008B10C 0008804C  60 42 AB 88 */	ori r2, r2, gTRKState@l
/* 8008B110 00088050  80 42 00 A0 */	lwz r2, 0xa0(r2)
/* 8008B114 00088054  88 42 00 00 */	lbz r2, 0x0(r2)
/* 8008B118 00088058  2C 02 00 00 */	cmpwi r2, 0
/* 8008B11C 0008805C  41 82 00 18 */	beq lbl_8008B134
/* 8008B120 00088060  3C 40 80 3E */	lis r2, gTRKState@h
/* 8008B124 00088064  60 42 AB 88 */	ori r2, r2, gTRKState@l
/* 8008B128 00088068  38 60 00 01 */	li r3, 1
/* 8008B12C 0008806C  98 62 00 9C */	stb r3, 0x9c(r2)
/* 8008B130 00088070  48 00 00 4C */	b TRKInterruptHandlerEnableInterrupts
lbl_8008B134:
/* 8008B134 00088074  3C 40 80 3A */	lis r2, gTRKExceptionStatus@h
/* 8008B138 00088078  60 42 F0 24 */	ori r2, r2, gTRKExceptionStatus@l
/* 8008B13C 0008807C  38 60 00 00 */	li r3, 0
/* 8008B140 00088080  98 62 00 0C */	stb r3, 0xc(r2)
/* 8008B144 00088084  48 00 0C C9 */	bl TRKRestoreExtended1Block
/* 8008B148 00088088  3C 40 80 3E */	lis r2, gTRKCPUState@h
/* 8008B14C 0008808C  60 42 AC 30 */	ori r2, r2, gTRKCPUState@l
/* 8008B150 00088090  BB 62 00 80 */	lmw r27, 0x80(r2)
/* 8008B154 00088094  7F 7A 03 A6 */	mtspr 0x1a, r27
/* 8008B158 00088098  7F 88 03 A6 */	mtlr r28
/* 8008B15C 0008809C  7F AF F1 20 */	mtcrf 0xff, r29
/* 8008B160 000880A0  7F C9 03 A6 */	mtctr r30
/* 8008B164 000880A4  7F E1 03 A6 */	mtxer r31
/* 8008B168 000880A8  B8 62 00 0C */	lmw r3, 0xc(r2)
/* 8008B16C 000880AC  80 02 00 00 */	lwz r0, 0x0(r2)
/* 8008B170 000880B0  80 22 00 04 */	lwz r1, 0x4(r2)
/* 8008B174 000880B4  80 42 00 08 */	lwz r2, 0x8(r2)
/* 8008B178 000880B8  4C 00 00 64 */	rfi 

.global TRKInterruptHandlerEnableInterrupts
TRKInterruptHandlerEnableInterrupts:
/* 8008B17C 000880BC  3C 40 80 3E */	lis r2, gTRKState@h
/* 8008B180 000880C0  60 42 AB 88 */	ori r2, r2, gTRKState@l
/* 8008B184 000880C4  80 02 00 8C */	lwz r0, 0x8c(r2)
/* 8008B188 000880C8  7C 00 04 AC */	sync 0
/* 8008B18C 000880CC  7C 00 01 24 */	mtmsr r0
/* 8008B190 000880D0  7C 00 04 AC */	sync 0
/* 8008B194 000880D4  80 02 00 80 */	lwz r0, 0x80(r2)
/* 8008B198 000880D8  7C 08 03 A6 */	mtlr r0
/* 8008B19C 000880DC  80 02 00 84 */	lwz r0, 0x84(r2)
/* 8008B1A0 000880E0  7C 09 03 A6 */	mtctr r0
/* 8008B1A4 000880E4  80 02 00 88 */	lwz r0, 0x88(r2)
/* 8008B1A8 000880E8  7C 01 03 A6 */	mtxer r0
/* 8008B1AC 000880EC  80 02 00 94 */	lwz r0, 0x94(r2)
/* 8008B1B0 000880F0  7C 12 03 A6 */	mtdsisr r0
/* 8008B1B4 000880F4  80 02 00 90 */	lwz r0, 0x90(r2)
/* 8008B1B8 000880F8  7C 13 03 A6 */	mtdar r0
/* 8008B1BC 000880FC  B8 62 00 0C */	lmw r3, 0xc(r2)
/* 8008B1C0 00088100  80 02 00 00 */	lwz r0, 0x0(r2)
/* 8008B1C4 00088104  80 22 00 04 */	lwz r1, 0x4(r2)
/* 8008B1C8 00088108  80 42 00 08 */	lwz r2, 0x8(r2)
/* 8008B1CC 0008810C  4B FF FE 3C */	b TRKPostInterruptEvent

.global TRKTargetInterrupt
TRKTargetInterrupt:
/* 8008B1D0 00088110  7C 08 02 A6 */	mflr r0
/* 8008B1D4 00088114  90 01 00 04 */	stw r0, 4(r1)
/* 8008B1D8 00088118  94 21 FF F0 */	stwu r1, -0x10(r1)
/* 8008B1DC 0008811C  93 E1 00 0C */	stw r31, 0xc(r1)
/* 8008B1E0 00088120  88 03 00 00 */	lbz r0, 0(r3)
/* 8008B1E4 00088124  3B E0 00 00 */	li r31, 0
/* 8008B1E8 00088128  2C 00 00 05 */	cmpwi r0, 5
/* 8008B1EC 0008812C  40 80 00 30 */	bge lbl_8008B21C
/* 8008B1F0 00088130  2C 00 00 03 */	cmpwi r0, 3
/* 8008B1F4 00088134  40 80 00 08 */	bge lbl_8008B1FC
/* 8008B1F8 00088138  48 00 00 24 */	b lbl_8008B21C
lbl_8008B1FC:
/* 8008B1FC 0008813C  48 00 02 81 */	bl TRKTargetCheckStep
/* 8008B200 00088140  2C 03 00 00 */	cmpwi r3, 0
/* 8008B204 00088144  40 82 00 18 */	bne lbl_8008B21C
/* 8008B208 00088148  38 60 00 01 */	li r3, 1
/* 8008B20C 0008814C  48 00 04 B1 */	bl TRKTargetSetStopped
/* 8008B210 00088150  38 60 00 90 */	li r3, 0x90
/* 8008B214 00088154  4B FF F0 51 */	bl TRKDoNotifyStopped
/* 8008B218 00088158  7C 7F 1B 78 */	mr r31, r3
lbl_8008B21C:
/* 8008B21C 0008815C  7F E3 FB 78 */	mr r3, r31
/* 8008B220 00088160  83 E1 00 0C */	lwz r31, 0xc(r1)
/* 8008B224 00088164  38 21 00 10 */	addi r1, r1, 0x10
/* 8008B228 00088168  80 01 00 04 */	lwz r0, 4(r1)
/* 8008B22C 0008816C  7C 08 03 A6 */	mtlr r0
/* 8008B230 00088170  4E 80 00 20 */	blr 

.global TRKTargetAddStopInfo
TRKTargetAddStopInfo:
/* 8008B234 00088174  7C 08 02 A6 */	mflr r0
/* 8008B238 00088178  90 01 00 04 */	stw r0, 4(r1)
/* 8008B23C 0008817C  94 21 FF E8 */	stwu r1, -0x18(r1)
/* 8008B240 00088180  93 E1 00 14 */	stw r31, 0x14(r1)
/* 8008B244 00088184  93 C1 00 10 */	stw r30, 0x10(r1)
/* 8008B248 00088188  7C 7E 1B 78 */	mr r30, r3
/* 8008B24C 0008818C  3C 60 80 3F */	lis r3, gTRKCPUState@ha
/* 8008B250 00088190  38 63 AC 30 */	addi r3, r3, gTRKCPUState@l
/* 8008B254 00088194  3B E3 00 80 */	addi r31, r3, 0x80
/* 8008B258 00088198  80 9F 00 00 */	lwz r4, 0(r31)
/* 8008B25C 0008819C  7F C3 F3 78 */	mr r3, r30
/* 8008B260 000881A0  4B FF D1 C5 */	bl TRKAppendBuffer1_ui32
/* 8008B264 000881A4  2C 03 00 00 */	cmpwi r3, 0
/* 8008B268 000881A8  40 82 00 10 */	bne lbl_8008B278
/* 8008B26C 000881AC  38 61 00 08 */	addi r3, r1, 8
/* 8008B270 000881B0  80 9F 00 00 */	lwz r4, 0(r31)
/* 8008B274 000881B4  4B FF F4 AD */	bl TRKTargetReadInstruction
lbl_8008B278:
/* 8008B278 000881B8  2C 03 00 00 */	cmpwi r3, 0
/* 8008B27C 000881BC  40 82 00 10 */	bne lbl_8008B28C
/* 8008B280 000881C0  7F C3 F3 78 */	mr r3, r30
/* 8008B284 000881C4  80 81 00 08 */	lwz r4, 8(r1)
/* 8008B288 000881C8  4B FF D1 9D */	bl TRKAppendBuffer1_ui32
lbl_8008B28C:
/* 8008B28C 000881CC  2C 03 00 00 */	cmpwi r3, 0
/* 8008B290 000881D0  40 82 00 1C */	bne lbl_8008B2AC
/* 8008B294 000881D4  3C 60 80 3F */	lis r3, gTRKCPUState@ha
/* 8008B298 000881D8  38 63 AC 30 */	addi r3, r3, gTRKCPUState@l
/* 8008B29C 000881DC  80 03 02 F8 */	lwz r0, 0x2f8(r3)
/* 8008B2A0 000881E0  7F C3 F3 78 */	mr r3, r30
/* 8008B2A4 000881E4  54 04 04 3E */	clrlwi r4, r0, 0x10
/* 8008B2A8 000881E8  4B FF D1 29 */	bl TRKAppendBuffer1_ui16
lbl_8008B2AC:
/* 8008B2AC 000881EC  83 E1 00 14 */	lwz r31, 0x14(r1)
/* 8008B2B0 000881F0  83 C1 00 10 */	lwz r30, 0x10(r1)
/* 8008B2B4 000881F4  38 21 00 18 */	addi r1, r1, 0x18
/* 8008B2B8 000881F8  80 01 00 04 */	lwz r0, 4(r1)
/* 8008B2BC 000881FC  7C 08 03 A6 */	mtlr r0
/* 8008B2C0 00088200  4E 80 00 20 */	blr 

.global TRKTargetAddExceptionInfo
TRKTargetAddExceptionInfo:
/* 8008B2C4 00088204  7C 08 02 A6 */	mflr r0
/* 8008B2C8 00088208  90 01 00 04 */	stw r0, 4(r1)
/* 8008B2CC 0008820C  94 21 FF E8 */	stwu r1, -0x18(r1)
/* 8008B2D0 00088210  93 E1 00 14 */	stw r31, 0x14(r1)
/* 8008B2D4 00088214  93 C1 00 10 */	stw r30, 0x10(r1)
/* 8008B2D8 00088218  7C 7E 1B 78 */	mr r30, r3
/* 8008B2DC 0008821C  3C 60 80 3B */	lis r3, gTRKExceptionStatus@ha
/* 8008B2E0 00088220  3B E3 F0 24 */	addi r31, r3, gTRKExceptionStatus@l
/* 8008B2E4 00088224  80 9F 00 00 */	lwz r4, 0(r31)
/* 8008B2E8 00088228  7F C3 F3 78 */	mr r3, r30
/* 8008B2EC 0008822C  4B FF D1 39 */	bl TRKAppendBuffer1_ui32
/* 8008B2F0 00088230  2C 03 00 00 */	cmpwi r3, 0
/* 8008B2F4 00088234  40 82 00 10 */	bne lbl_8008B304
/* 8008B2F8 00088238  38 61 00 08 */	addi r3, r1, 8
/* 8008B2FC 0008823C  80 9F 00 00 */	lwz r4, 0(r31)
/* 8008B300 00088240  4B FF F4 21 */	bl TRKTargetReadInstruction
lbl_8008B304:
/* 8008B304 00088244  2C 03 00 00 */	cmpwi r3, 0
/* 8008B308 00088248  40 82 00 10 */	bne lbl_8008B318
/* 8008B30C 0008824C  7F C3 F3 78 */	mr r3, r30
/* 8008B310 00088250  80 81 00 08 */	lwz r4, 8(r1)
/* 8008B314 00088254  4B FF D1 11 */	bl TRKAppendBuffer1_ui32
lbl_8008B318:
/* 8008B318 00088258  2C 03 00 00 */	cmpwi r3, 0
/* 8008B31C 0008825C  40 82 00 18 */	bne lbl_8008B334
/* 8008B320 00088260  3C 60 80 3B */	lis r3, gTRKExceptionStatus@ha
/* 8008B324 00088264  38 63 F0 24 */	addi r3, r3, gTRKExceptionStatus@l
/* 8008B328 00088268  A0 83 00 08 */	lhz r4, 8(r3)
/* 8008B32C 0008826C  7F C3 F3 78 */	mr r3, r30
/* 8008B330 00088270  4B FF D0 A1 */	bl TRKAppendBuffer1_ui16
lbl_8008B334:
/* 8008B334 00088274  83 E1 00 14 */	lwz r31, 0x14(r1)
/* 8008B338 00088278  83 C1 00 10 */	lwz r30, 0x10(r1)
/* 8008B33C 0008827C  38 21 00 18 */	addi r1, r1, 0x18
/* 8008B340 00088280  80 01 00 04 */	lwz r0, 4(r1)
/* 8008B344 00088284  7C 08 03 A6 */	mtlr r0
/* 8008B348 00088288  4E 80 00 20 */	blr 

.global TRKTargetEnableTrace
TRKTargetEnableTrace:
/* 8008B34C 0008828C  2C 03 00 00 */	cmpwi r3, 0
/* 8008B350 00088290  41 82 00 1C */	beq lbl_8008B36C
/* 8008B354 00088294  3C 60 80 3F */	lis r3, gTRKCPUState@ha
/* 8008B358 00088298  38 63 AC 30 */	addi r3, r3, gTRKCPUState@l
/* 8008B35C 0008829C  80 03 01 F8 */	lwz r0, 0x1f8(r3)
/* 8008B360 000882A0  60 00 04 00 */	ori r0, r0, 0x400
/* 8008B364 000882A4  90 03 01 F8 */	stw r0, 0x1f8(r3)
/* 8008B368 000882A8  48 00 00 18 */	b lbl_8008B380
lbl_8008B36C:
/* 8008B36C 000882AC  3C 60 80 3F */	lis r3, gTRKCPUState@ha
/* 8008B370 000882B0  38 63 AC 30 */	addi r3, r3, gTRKCPUState@l
/* 8008B374 000882B4  80 03 01 F8 */	lwz r0, 0x1f8(r3)
/* 8008B378 000882B8  54 00 05 A8 */	rlwinm r0, r0, 0, 0x16, 0x14
/* 8008B37C 000882BC  90 03 01 F8 */	stw r0, 0x1f8(r3)
lbl_8008B380:
/* 8008B380 000882C0  38 60 00 00 */	li r3, 0
/* 8008B384 000882C4  4E 80 00 20 */	blr 

.global TRKTargetStepDone
TRKTargetStepDone:
/* 8008B388 000882C8  3C 60 80 3B */	lis r3, gTRKStepStatus@ha
/* 8008B38C 000882CC  38 A3 F0 34 */	addi r5, r3, gTRKStepStatus@l
/* 8008B390 000882D0  80 05 00 00 */	lwz r0, 0(r5)
/* 8008B394 000882D4  38 60 00 01 */	li r3, 1
/* 8008B398 000882D8  2C 00 00 00 */	cmpwi r0, 0
/* 8008B39C 000882DC  41 82 00 6C */	beq lbl_8008B408
/* 8008B3A0 000882E0  3C 80 80 3F */	lis r4, gTRKCPUState@ha
/* 8008B3A4 000882E4  38 84 AC 30 */	addi r4, r4, gTRKCPUState@l
/* 8008B3A8 000882E8  80 04 02 F8 */	lwz r0, 0x2f8(r4)
/* 8008B3AC 000882EC  54 00 04 3E */	clrlwi r0, r0, 0x10
/* 8008B3B0 000882F0  28 00 0D 00 */	cmplwi r0, 0xd00
/* 8008B3B4 000882F4  40 82 00 54 */	bne lbl_8008B408
/* 8008B3B8 000882F8  88 05 00 04 */	lbz r0, 4(r5)
/* 8008B3BC 000882FC  2C 00 00 01 */	cmpwi r0, 1
/* 8008B3C0 00088300  41 82 00 28 */	beq lbl_8008B3E8
/* 8008B3C4 00088304  40 80 00 44 */	bge lbl_8008B408
/* 8008B3C8 00088308  2C 00 00 00 */	cmpwi r0, 0
/* 8008B3CC 0008830C  40 80 00 08 */	bge lbl_8008B3D4
/* 8008B3D0 00088310  48 00 00 38 */	b lbl_8008B408
lbl_8008B3D4:
/* 8008B3D4 00088314  80 05 00 08 */	lwz r0, 8(r5)
/* 8008B3D8 00088318  28 00 00 00 */	cmplwi r0, 0
/* 8008B3DC 0008831C  41 82 00 2C */	beq lbl_8008B408
/* 8008B3E0 00088320  38 60 00 00 */	li r3, 0
/* 8008B3E4 00088324  48 00 00 24 */	b lbl_8008B408
lbl_8008B3E8:
/* 8008B3E8 00088328  80 84 00 80 */	lwz r4, 0x80(r4)
/* 8008B3EC 0008832C  80 05 00 0C */	lwz r0, 0xc(r5)
/* 8008B3F0 00088330  7C 04 00 40 */	cmplw r4, r0
/* 8008B3F4 00088334  41 80 00 14 */	blt lbl_8008B408
/* 8008B3F8 00088338  80 05 00 10 */	lwz r0, 0x10(r5)
/* 8008B3FC 0008833C  7C 04 00 40 */	cmplw r4, r0
/* 8008B400 00088340  41 81 00 08 */	bgt lbl_8008B408
/* 8008B404 00088344  38 60 00 00 */	li r3, 0
lbl_8008B408:
/* 8008B408 00088348  4E 80 00 20 */	blr 

.global TRKTargetDoStep
TRKTargetDoStep:
/* 8008B40C 0008834C  7C 08 02 A6 */	mflr r0
/* 8008B410 00088350  90 01 00 04 */	stw r0, 4(r1)
/* 8008B414 00088354  94 21 FF F0 */	stwu r1, -0x10(r1)
/* 8008B418 00088358  93 E1 00 0C */	stw r31, 0xc(r1)
/* 8008B41C 0008835C  3C 60 80 3B */	lis r3, gTRKStepStatus@ha
/* 8008B420 00088360  3B E3 F0 34 */	addi r31, r3, gTRKStepStatus@l
/* 8008B424 00088364  38 00 00 01 */	li r0, 1
/* 8008B428 00088368  90 1F 00 00 */	stw r0, 0(r31)
/* 8008B42C 0008836C  38 60 00 01 */	li r3, 1
/* 8008B430 00088370  4B FF FF 1D */	bl TRKTargetEnableTrace
/* 8008B434 00088374  88 1F 00 04 */	lbz r0, 4(r31)
/* 8008B438 00088378  28 00 00 00 */	cmplwi r0, 0
/* 8008B43C 0008837C  41 82 00 0C */	beq lbl_8008B448
/* 8008B440 00088380  28 00 00 10 */	cmplwi r0, 0x10
/* 8008B444 00088384  40 82 00 18 */	bne lbl_8008B45C
lbl_8008B448:
/* 8008B448 00088388  3C 60 80 3B */	lis r3, gTRKStepStatus@ha
/* 8008B44C 0008838C  38 83 F0 34 */	addi r4, r3, gTRKStepStatus@l
/* 8008B450 00088390  80 64 00 08 */	lwz r3, 8(r4)
/* 8008B454 00088394  38 03 FF FF */	addi r0, r3, -1
/* 8008B458 00088398  90 04 00 08 */	stw r0, 8(r4)
lbl_8008B45C:
/* 8008B45C 0008839C  38 60 00 00 */	li r3, 0
/* 8008B460 000883A0  48 00 02 5D */	bl TRKTargetSetStopped
/* 8008B464 000883A4  38 60 00 00 */	li r3, 0
/* 8008B468 000883A8  83 E1 00 0C */	lwz r31, 0xc(r1)
/* 8008B46C 000883AC  38 21 00 10 */	addi r1, r1, 0x10
/* 8008B470 000883B0  80 01 00 04 */	lwz r0, 4(r1)
/* 8008B474 000883B4  7C 08 03 A6 */	mtlr r0
/* 8008B478 000883B8  4E 80 00 20 */	blr 

.global TRKTargetCheckStep
TRKTargetCheckStep:
/* 8008B47C 000883BC  7C 08 02 A6 */	mflr r0
/* 8008B480 000883C0  90 01 00 04 */	stw r0, 4(r1)
/* 8008B484 000883C4  94 21 FF F0 */	stwu r1, -0x10(r1)
/* 8008B488 000883C8  93 E1 00 0C */	stw r31, 0xc(r1)
/* 8008B48C 000883CC  3C 60 80 3B */	lis r3, gTRKStepStatus@ha
/* 8008B490 000883D0  3B E3 F0 34 */	addi r31, r3, gTRKStepStatus@l
/* 8008B494 000883D4  80 1F 00 00 */	lwz r0, 0(r31)
/* 8008B498 000883D8  2C 00 00 00 */	cmpwi r0, 0
/* 8008B49C 000883DC  41 82 00 28 */	beq lbl_8008B4C4
/* 8008B4A0 000883E0  38 60 00 00 */	li r3, 0
/* 8008B4A4 000883E4  4B FF FE A9 */	bl TRKTargetEnableTrace
/* 8008B4A8 000883E8  4B FF FE E1 */	bl TRKTargetStepDone
/* 8008B4AC 000883EC  2C 03 00 00 */	cmpwi r3, 0
/* 8008B4B0 000883F0  41 82 00 10 */	beq lbl_8008B4C0
/* 8008B4B4 000883F4  38 00 00 00 */	li r0, 0
/* 8008B4B8 000883F8  90 1F 00 00 */	stw r0, 0(r31)
/* 8008B4BC 000883FC  48 00 00 08 */	b lbl_8008B4C4
lbl_8008B4C0:
/* 8008B4C0 00088400  4B FF FF 4D */	bl TRKTargetDoStep
lbl_8008B4C4:
/* 8008B4C4 00088404  3C 60 80 3B */	lis r3, gTRKStepStatus@ha
/* 8008B4C8 00088408  38 63 F0 34 */	addi r3, r3, gTRKStepStatus@l
/* 8008B4CC 0008840C  80 63 00 00 */	lwz r3, 0(r3)
/* 8008B4D0 00088410  83 E1 00 0C */	lwz r31, 0xc(r1)
/* 8008B4D4 00088414  38 21 00 10 */	addi r1, r1, 0x10
/* 8008B4D8 00088418  80 01 00 04 */	lwz r0, 4(r1)
/* 8008B4DC 0008841C  7C 08 03 A6 */	mtlr r0
/* 8008B4E0 00088420  4E 80 00 20 */	blr 

.global TRKTargetSingleStep
TRKTargetSingleStep:
/* 8008B4E4 00088424  7C 08 02 A6 */	mflr r0
/* 8008B4E8 00088428  90 01 00 04 */	stw r0, 4(r1)
/* 8008B4EC 0008842C  94 21 FF F8 */	stwu r1, -8(r1)
/* 8008B4F0 00088430  2C 04 00 00 */	cmpwi r4, 0
/* 8008B4F4 00088434  41 82 00 0C */	beq lbl_8008B500
/* 8008B4F8 00088438  38 60 07 03 */	li r3, 0x703
/* 8008B4FC 0008843C  48 00 00 1C */	b lbl_8008B518
lbl_8008B500:
/* 8008B500 00088440  3C 80 80 3B */	lis r4, gTRKStepStatus@ha
/* 8008B504 00088444  38 84 F0 34 */	addi r4, r4, gTRKStepStatus@l
/* 8008B508 00088448  38 00 00 00 */	li r0, 0
/* 8008B50C 0008844C  98 04 00 04 */	stb r0, 4(r4)
/* 8008B510 00088450  90 64 00 08 */	stw r3, 8(r4)
/* 8008B514 00088454  4B FF FE F9 */	bl TRKTargetDoStep
lbl_8008B518:
/* 8008B518 00088458  38 21 00 08 */	addi r1, r1, 8
/* 8008B51C 0008845C  80 01 00 04 */	lwz r0, 4(r1)
/* 8008B520 00088460  7C 08 03 A6 */	mtlr r0
/* 8008B524 00088464  4E 80 00 20 */	blr 

.global TRKTargetStepOutOfRange
TRKTargetStepOutOfRange:
/* 8008B528 00088468  7C 08 02 A6 */	mflr r0
/* 8008B52C 0008846C  90 01 00 04 */	stw r0, 4(r1)
/* 8008B530 00088470  94 21 FF F8 */	stwu r1, -8(r1)
/* 8008B534 00088474  2C 05 00 00 */	cmpwi r5, 0
/* 8008B538 00088478  41 82 00 0C */	beq lbl_8008B544
/* 8008B53C 0008847C  38 60 07 03 */	li r3, 0x703
/* 8008B540 00088480  48 00 00 20 */	b lbl_8008B560
lbl_8008B544:
/* 8008B544 00088484  3C A0 80 3B */	lis r5, gTRKStepStatus@ha
/* 8008B548 00088488  38 A5 F0 34 */	addi r5, r5, gTRKStepStatus@l
/* 8008B54C 0008848C  38 00 00 01 */	li r0, 1
/* 8008B550 00088490  98 05 00 04 */	stb r0, 4(r5)
/* 8008B554 00088494  90 65 00 0C */	stw r3, 0xc(r5)
/* 8008B558 00088498  90 85 00 10 */	stw r4, 0x10(r5)
/* 8008B55C 0008849C  4B FF FE B1 */	bl TRKTargetDoStep
lbl_8008B560:
/* 8008B560 000884A0  38 21 00 08 */	addi r1, r1, 8
/* 8008B564 000884A4  80 01 00 04 */	lwz r0, 4(r1)
/* 8008B568 000884A8  7C 08 03 A6 */	mtlr r0
/* 8008B56C 000884AC  4E 80 00 20 */	blr 

.global TRKTargetGetPC
TRKTargetGetPC:
/* 8008B570 000884B0  3C 60 80 3F */	lis r3, gTRKCPUState@ha
/* 8008B574 000884B4  38 63 AC 30 */	addi r3, r3, gTRKCPUState@l
/* 8008B578 000884B8  80 63 00 80 */	lwz r3, 0x80(r3)
/* 8008B57C 000884BC  4E 80 00 20 */	blr 

.global TRKTargetSupportRequest
TRKTargetSupportRequest:
/* 8008B580 000884C0  7C 08 02 A6 */	mflr r0
/* 8008B584 000884C4  90 01 00 04 */	stw r0, 4(r1)
/* 8008B588 000884C8  94 21 FF D0 */	stwu r1, -0x30(r1)
/* 8008B58C 000884CC  BF 61 00 1C */	stmw r27, 0x1c(r1)
/* 8008B590 000884D0  3C 60 80 3F */	lis r3, gTRKCPUState@ha
/* 8008B594 000884D4  38 63 AC 30 */	addi r3, r3, gTRKCPUState@l
/* 8008B598 000884D8  3B E3 00 0C */	addi r31, r3, 0xc
/* 8008B59C 000884DC  80 1F 00 00 */	lwz r0, 0(r31)
/* 8008B5A0 000884E0  54 1B 06 3E */	clrlwi r27, r0, 0x18
/* 8008B5A4 000884E4  28 1B 00 D1 */	cmplwi r27, 0xd1
/* 8008B5A8 000884E8  41 82 00 28 */	beq lbl_8008B5D0
/* 8008B5AC 000884EC  28 1B 00 D0 */	cmplwi r27, 0xd0
/* 8008B5B0 000884F0  41 82 00 20 */	beq lbl_8008B5D0
/* 8008B5B4 000884F4  38 61 00 0C */	addi r3, r1, 0xc
/* 8008B5B8 000884F8  38 80 00 04 */	li r4, 4
/* 8008B5BC 000884FC  4B FF C8 CD */	bl TRKConstructEvent
/* 8008B5C0 00088500  38 61 00 0C */	addi r3, r1, 0xc
/* 8008B5C4 00088504  4B FF C7 E5 */	bl TRKPostEvent
/* 8008B5C8 00088508  38 60 00 00 */	li r3, 0
/* 8008B5CC 0008850C  48 00 00 90 */	b lbl_8008B65C
lbl_8008B5D0:
/* 8008B5D0 00088510  3C 60 80 3F */	lis r3, gTRKCPUState@ha
/* 8008B5D4 00088514  38 C1 00 08 */	addi r6, r1, 8
/* 8008B5D8 00088518  38 83 AC 30 */	addi r4, r3, gTRKCPUState@l
/* 8008B5DC 0008851C  80 64 00 10 */	lwz r3, 0x10(r4)
/* 8008B5E0 00088520  20 1B 00 D1 */	subfic r0, r27, 0xd1
/* 8008B5E4 00088524  83 84 00 14 */	lwz r28, 0x14(r4)
/* 8008B5E8 00088528  3B C4 00 18 */	addi r30, r4, 0x18
/* 8008B5EC 0008852C  7C 00 00 34 */	cntlzw r0, r0
/* 8008B5F0 00088530  80 9E 00 00 */	lwz r4, 0(r30)
/* 8008B5F4 00088534  54 63 06 3E */	clrlwi r3, r3, 0x18
/* 8008B5F8 00088538  7F 85 E3 78 */	mr r5, r28
/* 8008B5FC 0008853C  54 08 D9 7E */	srwi r8, r0, 5
/* 8008B600 00088540  38 E0 00 01 */	li r7, 1
/* 8008B604 00088544  4B FF E7 CD */	bl TRKSuppAccessFile
/* 8008B608 00088548  88 01 00 08 */	lbz r0, 8(r1)
/* 8008B60C 0008854C  7C 7D 1B 78 */	mr r29, r3
/* 8008B610 00088550  28 00 00 00 */	cmplwi r0, 0
/* 8008B614 00088554  40 82 00 14 */	bne lbl_8008B628
/* 8008B618 00088558  2C 1D 00 00 */	cmpwi r29, 0
/* 8008B61C 0008855C  41 82 00 0C */	beq lbl_8008B628
/* 8008B620 00088560  38 00 00 01 */	li r0, 1
/* 8008B624 00088564  98 01 00 08 */	stb r0, 8(r1)
lbl_8008B628:
/* 8008B628 00088568  88 01 00 08 */	lbz r0, 8(r1)
/* 8008B62C 0008856C  28 1B 00 D1 */	cmplwi r27, 0xd1
/* 8008B630 00088570  90 1F 00 00 */	stw r0, 0(r31)
/* 8008B634 00088574  40 82 00 10 */	bne lbl_8008B644
/* 8008B638 00088578  80 7E 00 00 */	lwz r3, 0(r30)
/* 8008B63C 0008857C  80 9C 00 00 */	lwz r4, 0(r28)
/* 8008B640 00088580  4B FF EC FD */	bl TRK_flush_cache
lbl_8008B644:
/* 8008B644 00088584  3C 60 80 3F */	lis r3, gTRKCPUState@ha
/* 8008B648 00088588  38 A3 AC 30 */	addi r5, r3, gTRKCPUState@l
/* 8008B64C 0008858C  80 85 00 80 */	lwz r4, 0x80(r5)
/* 8008B650 00088590  7F A3 EB 78 */	mr r3, r29
/* 8008B654 00088594  38 04 00 04 */	addi r0, r4, 4
/* 8008B658 00088598  90 05 00 80 */	stw r0, 0x80(r5)
lbl_8008B65C:
/* 8008B65C 0008859C  BB 61 00 1C */	lmw r27, 0x1c(r1)
/* 8008B660 000885A0  38 21 00 30 */	addi r1, r1, 0x30
/* 8008B664 000885A4  80 01 00 04 */	lwz r0, 4(r1)
/* 8008B668 000885A8  7C 08 03 A6 */	mtlr r0
/* 8008B66C 000885AC  4E 80 00 20 */	blr 

.global TRKTargetFlushCache
TRKTargetFlushCache:
/* 8008B670 000885B0  7C 08 02 A6 */	mflr r0
/* 8008B674 000885B4  90 01 00 04 */	stw r0, 4(r1)
/* 8008B678 000885B8  94 21 FF F8 */	stwu r1, -8(r1)
/* 8008B67C 000885BC  7C 04 28 40 */	cmplw r4, r5
/* 8008B680 000885C0  40 80 00 18 */	bge lbl_8008B698
/* 8008B684 000885C4  7C 83 23 78 */	mr r3, r4
/* 8008B688 000885C8  7C 84 28 50 */	subf r4, r4, r5
/* 8008B68C 000885CC  4B FF EC B1 */	bl TRK_flush_cache
/* 8008B690 000885D0  38 60 00 00 */	li r3, 0
/* 8008B694 000885D4  48 00 00 08 */	b lbl_8008B69C
lbl_8008B698:
/* 8008B698 000885D8  38 60 07 00 */	li r3, 0x700
lbl_8008B69C:
/* 8008B69C 000885DC  38 21 00 08 */	addi r1, r1, 8
/* 8008B6A0 000885E0  80 01 00 04 */	lwz r0, 4(r1)
/* 8008B6A4 000885E4  7C 08 03 A6 */	mtlr r0
/* 8008B6A8 000885E8  4E 80 00 20 */	blr 

.global TRKTargetStopped
TRKTargetStopped:
/* 8008B6AC 000885EC  3C 60 80 3F */	lis r3, gTRKState@ha
/* 8008B6B0 000885F0  38 63 AB 88 */	addi r3, r3, gTRKState@l
/* 8008B6B4 000885F4  80 63 00 98 */	lwz r3, 0x98(r3)
/* 8008B6B8 000885F8  4E 80 00 20 */	blr 

.global TRKTargetSetStopped
TRKTargetSetStopped:
/* 8008B6BC 000885FC  3C 80 80 3F */	lis r4, gTRKState@ha
/* 8008B6C0 00088600  38 84 AB 88 */	addi r4, r4, gTRKState@l
/* 8008B6C4 00088604  90 64 00 98 */	stw r3, 0x98(r4)
/* 8008B6C8 00088608  4E 80 00 20 */	blr 

.global TRKTargetStop
TRKTargetStop:
/* 8008B6CC 0008860C  7C 08 02 A6 */	mflr r0
/* 8008B6D0 00088610  90 01 00 04 */	stw r0, 4(r1)
/* 8008B6D4 00088614  94 21 FF F8 */	stwu r1, -8(r1)
/* 8008B6D8 00088618  38 60 00 01 */	li r3, 1
/* 8008B6DC 0008861C  4B FF FF E1 */	bl TRKTargetSetStopped
/* 8008B6E0 00088620  38 60 00 00 */	li r3, 0
/* 8008B6E4 00088624  38 21 00 08 */	addi r1, r1, 8
/* 8008B6E8 00088628  80 01 00 04 */	lwz r0, 4(r1)
/* 8008B6EC 0008862C  7C 08 03 A6 */	mtlr r0
/* 8008B6F0 00088630  4E 80 00 20 */	blr 

.global TRKPPCAccessSPR
TRKPPCAccessSPR:
/* 8008B6F4 00088634  7C 08 02 A6 */	mflr r0
/* 8008B6F8 00088638  90 01 00 04 */	stw r0, 4(r1)
/* 8008B6FC 0008863C  94 21 FF E0 */	stwu r1, -0x20(r1)
/* 8008B700 00088640  3C C0 80 37 */	lis r6, "@233"@ha
/* 8008B704 00088644  2C 05 00 00 */	cmpwi r5, 0
/* 8008B708 00088648  38 E6 22 20 */	addi r7, r6, "@233"@l
/* 8008B70C 0008864C  80 C7 00 00 */	lwz r6, 0(r7)
/* 8008B710 00088650  80 07 00 04 */	lwz r0, 4(r7)
/* 8008B714 00088654  90 C1 00 08 */	stw r6, 8(r1)
/* 8008B718 00088658  90 01 00 0C */	stw r0, 0xc(r1)
/* 8008B71C 0008865C  80 C7 00 08 */	lwz r6, 8(r7)
/* 8008B720 00088660  80 07 00 0C */	lwz r0, 0xc(r7)
/* 8008B724 00088664  90 C1 00 10 */	stw r6, 0x10(r1)
/* 8008B728 00088668  90 01 00 14 */	stw r0, 0x14(r1)
/* 8008B72C 0008866C  80 07 00 10 */	lwz r0, 0x10(r7)
/* 8008B730 00088670  90 01 00 18 */	stw r0, 0x18(r1)
/* 8008B734 00088674  41 82 00 30 */	beq lbl_8008B764
/* 8008B738 00088678  54 80 05 34 */	rlwinm r0, r4, 0, 0x14, 0x1a
/* 8008B73C 0008867C  54 06 30 32 */	slwi r6, r0, 6
/* 8008B740 00088680  54 80 06 FE */	clrlwi r0, r4, 0x1b
/* 8008B744 00088684  64 C4 7C 80 */	oris r4, r6, 0x7c80
/* 8008B748 00088688  54 00 80 1E */	slwi r0, r0, 0x10
/* 8008B74C 0008868C  7C 80 03 78 */	or r0, r4, r0
/* 8008B750 00088690  60 00 02 A6 */	ori r0, r0, 0x2a6
/* 8008B754 00088694  90 01 00 08 */	stw r0, 8(r1)
/* 8008B758 00088698  3C 00 90 83 */	lis r0, 0x9083
/* 8008B75C 0008869C  90 01 00 0C */	stw r0, 0xc(r1)
/* 8008B760 000886A0  48 00 00 2C */	b lbl_8008B78C
lbl_8008B764:
/* 8008B764 000886A4  54 80 05 34 */	rlwinm r0, r4, 0, 0x14, 0x1a
/* 8008B768 000886A8  54 06 30 32 */	slwi r6, r0, 6
/* 8008B76C 000886AC  54 80 06 FE */	clrlwi r0, r4, 0x1b
/* 8008B770 000886B0  3C E0 80 83 */	lis r7, 0x8083
/* 8008B774 000886B4  64 C4 7C 80 */	oris r4, r6, 0x7c80
/* 8008B778 000886B8  90 E1 00 08 */	stw r7, 8(r1)
/* 8008B77C 000886BC  54 00 80 1E */	slwi r0, r0, 0x10
/* 8008B780 000886C0  7C 80 03 78 */	or r0, r4, r0
/* 8008B784 000886C4  60 00 03 A6 */	ori r0, r0, 0x3a6
/* 8008B788 000886C8  90 01 00 0C */	stw r0, 0xc(r1)
lbl_8008B78C:
/* 8008B78C 000886CC  38 81 00 08 */	addi r4, r1, 8
/* 8008B790 000886D0  48 00 02 0D */	bl TRKPPCAccessSpecialReg
/* 8008B794 000886D4  38 21 00 20 */	addi r1, r1, 0x20
/* 8008B798 000886D8  80 01 00 04 */	lwz r0, 4(r1)
/* 8008B79C 000886DC  7C 08 03 A6 */	mtlr r0
/* 8008B7A0 000886E0  4E 80 00 20 */	blr 

.global TRKPPCAccessPairedSingleRegister
TRKPPCAccessPairedSingleRegister:
/* 8008B7A4 000886E4  7C 08 02 A6 */	mflr r0
/* 8008B7A8 000886E8  90 01 00 04 */	stw r0, 4(r1)
/* 8008B7AC 000886EC  94 21 FF E0 */	stwu r1, -0x20(r1)
/* 8008B7B0 000886F0  3C C0 80 37 */	lis r6, "@238"@ha
/* 8008B7B4 000886F4  2C 05 00 00 */	cmpwi r5, 0
/* 8008B7B8 000886F8  38 E6 22 34 */	addi r7, r6, "@238"@l
/* 8008B7BC 000886FC  80 C7 00 00 */	lwz r6, 0(r7)
/* 8008B7C0 00088700  80 07 00 04 */	lwz r0, 4(r7)
/* 8008B7C4 00088704  90 C1 00 08 */	stw r6, 8(r1)
/* 8008B7C8 00088708  90 01 00 0C */	stw r0, 0xc(r1)
/* 8008B7CC 0008870C  80 C7 00 08 */	lwz r6, 8(r7)
/* 8008B7D0 00088710  80 07 00 0C */	lwz r0, 0xc(r7)
/* 8008B7D4 00088714  90 C1 00 10 */	stw r6, 0x10(r1)
/* 8008B7D8 00088718  90 01 00 14 */	stw r0, 0x14(r1)
/* 8008B7DC 0008871C  80 07 00 10 */	lwz r0, 0x10(r7)
/* 8008B7E0 00088720  90 01 00 18 */	stw r0, 0x18(r1)
/* 8008B7E4 00088724  41 82 00 14 */	beq lbl_8008B7F8
/* 8008B7E8 00088728  54 80 A8 14 */	slwi r0, r4, 0x15
/* 8008B7EC 0008872C  64 00 F0 03 */	oris r0, r0, 0xf003
/* 8008B7F0 00088730  90 01 00 08 */	stw r0, 8(r1)
/* 8008B7F4 00088734  48 00 00 10 */	b lbl_8008B804
lbl_8008B7F8:
/* 8008B7F8 00088738  54 80 A8 14 */	slwi r0, r4, 0x15
/* 8008B7FC 0008873C  64 00 E0 03 */	oris r0, r0, 0xe003
/* 8008B800 00088740  90 01 00 08 */	stw r0, 8(r1)
lbl_8008B804:
/* 8008B804 00088744  38 81 00 08 */	addi r4, r1, 8
/* 8008B808 00088748  48 00 01 95 */	bl TRKPPCAccessSpecialReg
/* 8008B80C 0008874C  38 21 00 20 */	addi r1, r1, 0x20
/* 8008B810 00088750  80 01 00 04 */	lwz r0, 4(r1)
/* 8008B814 00088754  7C 08 03 A6 */	mtlr r0
/* 8008B818 00088758  4E 80 00 20 */	blr 

.global TRKPPCAccessFPRegister
TRKPPCAccessFPRegister:
/* 8008B81C 0008875C  7C 08 02 A6 */	mflr r0
/* 8008B820 00088760  90 01 00 04 */	stw r0, 4(r1)
/* 8008B824 00088764  94 21 FF D8 */	stwu r1, -0x28(r1)
/* 8008B828 00088768  93 E1 00 24 */	stw r31, 0x24(r1)
/* 8008B82C 0008876C  93 C1 00 20 */	stw r30, 0x20(r1)
/* 8008B830 00088770  7C 7E 1B 78 */	mr r30, r3
/* 8008B834 00088774  7C BF 2B 78 */	mr r31, r5
/* 8008B838 00088778  3C 60 80 37 */	lis r3, "@243"@ha
/* 8008B83C 0008877C  28 04 00 20 */	cmplwi r4, 0x20
/* 8008B840 00088780  38 C3 22 48 */	addi r6, r3, "@243"@l
/* 8008B844 00088784  80 A6 00 00 */	lwz r5, 0(r6)
/* 8008B848 00088788  38 60 00 00 */	li r3, 0
/* 8008B84C 0008878C  80 06 00 04 */	lwz r0, 4(r6)
/* 8008B850 00088790  90 A1 00 08 */	stw r5, 8(r1)
/* 8008B854 00088794  90 01 00 0C */	stw r0, 0xc(r1)
/* 8008B858 00088798  80 A6 00 08 */	lwz r5, 8(r6)
/* 8008B85C 0008879C  80 06 00 0C */	lwz r0, 0xc(r6)
/* 8008B860 000887A0  90 A1 00 10 */	stw r5, 0x10(r1)
/* 8008B864 000887A4  90 01 00 14 */	stw r0, 0x14(r1)
/* 8008B868 000887A8  80 06 00 10 */	lwz r0, 0x10(r6)
/* 8008B86C 000887AC  90 01 00 18 */	stw r0, 0x18(r1)
/* 8008B870 000887B0  40 80 00 3C */	bge lbl_8008B8AC
/* 8008B874 000887B4  2C 1F 00 00 */	cmpwi r31, 0
/* 8008B878 000887B8  41 82 00 14 */	beq lbl_8008B88C
/* 8008B87C 000887BC  54 80 A8 14 */	slwi r0, r4, 0x15
/* 8008B880 000887C0  64 00 D8 03 */	oris r0, r0, 0xd803
/* 8008B884 000887C4  90 01 00 08 */	stw r0, 8(r1)
/* 8008B888 000887C8  48 00 00 10 */	b lbl_8008B898
lbl_8008B88C:
/* 8008B88C 000887CC  54 80 A8 14 */	slwi r0, r4, 0x15
/* 8008B890 000887D0  64 00 C8 03 */	oris r0, r0, 0xc803
/* 8008B894 000887D4  90 01 00 08 */	stw r0, 8(r1)
lbl_8008B898:
/* 8008B898 000887D8  7F C3 F3 78 */	mr r3, r30
/* 8008B89C 000887DC  38 81 00 08 */	addi r4, r1, 8
/* 8008B8A0 000887E0  7F E5 FB 78 */	mr r5, r31
/* 8008B8A4 000887E4  48 00 00 F9 */	bl TRKPPCAccessSpecialReg
/* 8008B8A8 000887E8  48 00 00 DC */	b lbl_8008B984
lbl_8008B8AC:
/* 8008B8AC 000887EC  40 82 00 8C */	bne lbl_8008B938
/* 8008B8B0 000887F0  2C 1F 00 00 */	cmpwi r31, 0
/* 8008B8B4 000887F4  41 82 00 2C */	beq lbl_8008B8E0
/* 8008B8B8 000887F8  3C 00 D8 24 */	lis r0, 0xd824
/* 8008B8BC 000887FC  3C 60 FC 20 */	lis r3, 0xFC20048E@ha
/* 8008B8C0 00088800  90 01 00 08 */	stw r0, 8(r1)
/* 8008B8C4 00088804  38 03 04 8E */	addi r0, r3, 0xFC20048E@l
/* 8008B8C8 00088808  90 01 00 0C */	stw r0, 0xc(r1)
/* 8008B8CC 0008880C  3C 60 D8 23 */	lis r3, 0xd823
/* 8008B8D0 00088810  3C 00 C8 24 */	lis r0, 0xc824
/* 8008B8D4 00088814  90 61 00 10 */	stw r3, 0x10(r1)
/* 8008B8D8 00088818  90 01 00 14 */	stw r0, 0x14(r1)
/* 8008B8DC 0008881C  48 00 00 28 */	b lbl_8008B904
lbl_8008B8E0:
/* 8008B8E0 00088820  3C 00 D8 24 */	lis r0, 0xd824
/* 8008B8E4 00088824  90 01 00 08 */	stw r0, 8(r1)
/* 8008B8E8 00088828  3C 00 C8 23 */	lis r0, 0xc823
/* 8008B8EC 0008882C  3C 60 FD FE */	lis r3, 0xFDFE0D8E@ha
/* 8008B8F0 00088830  90 01 00 0C */	stw r0, 0xc(r1)
/* 8008B8F4 00088834  38 63 0D 8E */	addi r3, r3, 0xFDFE0D8E@l
/* 8008B8F8 00088838  3C 00 C8 24 */	lis r0, 0xc824
/* 8008B8FC 0008883C  90 61 00 10 */	stw r3, 0x10(r1)
/* 8008B900 00088840  90 01 00 14 */	stw r0, 0x14(r1)
lbl_8008B904:
/* 8008B904 00088844  7F C3 F3 78 */	mr r3, r30
/* 8008B908 00088848  38 81 00 08 */	addi r4, r1, 8
/* 8008B90C 0008884C  7F E5 FB 78 */	mr r5, r31
/* 8008B910 00088850  48 00 00 8D */	bl TRKPPCAccessSpecialReg
/* 8008B914 00088854  80 DE 00 04 */	lwz r6, 4(r30)
/* 8008B918 00088858  38 00 FF FF */	li r0, -1
/* 8008B91C 0008885C  80 BE 00 00 */	lwz r5, 0(r30)
/* 8008B920 00088860  38 80 00 00 */	li r4, 0
/* 8008B924 00088864  7C C0 00 38 */	and r0, r6, r0
/* 8008B928 00088868  90 1E 00 04 */	stw r0, 4(r30)
/* 8008B92C 0008886C  7C A0 20 38 */	and r0, r5, r4
/* 8008B930 00088870  90 1E 00 00 */	stw r0, 0(r30)
/* 8008B934 00088874  48 00 00 50 */	b lbl_8008B984
lbl_8008B938:
/* 8008B938 00088878  28 04 00 21 */	cmplwi r4, 0x21
/* 8008B93C 0008887C  40 82 00 48 */	bne lbl_8008B984
/* 8008B940 00088880  2C 1F 00 00 */	cmpwi r31, 0
/* 8008B944 00088884  40 82 00 0C */	bne lbl_8008B950
/* 8008B948 00088888  80 1E 00 04 */	lwz r0, 4(r30)
/* 8008B94C 0008888C  90 1E 00 00 */	stw r0, 0(r30)
lbl_8008B950:
/* 8008B950 00088890  7F C3 F3 78 */	mr r3, r30
/* 8008B954 00088894  7F E5 FB 78 */	mr r5, r31
/* 8008B958 00088898  38 80 03 FE */	li r4, 0x3fe
/* 8008B95C 0008889C  4B FF FD 99 */	bl TRKPPCAccessSPR
/* 8008B960 000888A0  2C 1F 00 00 */	cmpwi r31, 0
/* 8008B964 000888A4  41 82 00 20 */	beq lbl_8008B984
/* 8008B968 000888A8  80 BE 00 00 */	lwz r5, 0(r30)
/* 8008B96C 000888AC  38 00 FF FF */	li r0, -1
/* 8008B970 000888B0  38 80 00 00 */	li r4, 0
/* 8008B974 000888B4  7C A0 00 38 */	and r0, r5, r0
/* 8008B978 000888B8  90 1E 00 04 */	stw r0, 4(r30)
/* 8008B97C 000888BC  7C 80 20 38 */	and r0, r4, r4
/* 8008B980 000888C0  90 1E 00 00 */	stw r0, 0(r30)
lbl_8008B984:
/* 8008B984 000888C4  83 E1 00 24 */	lwz r31, 0x24(r1)
/* 8008B988 000888C8  83 C1 00 20 */	lwz r30, 0x20(r1)
/* 8008B98C 000888CC  38 21 00 28 */	addi r1, r1, 0x28
/* 8008B990 000888D0  80 01 00 04 */	lwz r0, 4(r1)
/* 8008B994 000888D4  7C 08 03 A6 */	mtlr r0
/* 8008B998 000888D8  4E 80 00 20 */	blr 

.global TRKPPCAccessSpecialReg
TRKPPCAccessSpecialReg:
/* 8008B99C 000888DC  7C 08 02 A6 */	mflr r0
/* 8008B9A0 000888E0  90 01 00 04 */	stw r0, 4(r1)
/* 8008B9A4 000888E4  94 21 FF F0 */	stwu r1, -0x10(r1)
/* 8008B9A8 000888E8  93 E1 00 0C */	stw r31, 0xc(r1)
/* 8008B9AC 000888EC  93 C1 00 08 */	stw r30, 8(r1)
/* 8008B9B0 000888F0  7C 7E 1B 78 */	mr r30, r3
/* 8008B9B4 000888F4  7C 9F 23 78 */	mr r31, r4
/* 8008B9B8 000888F8  3C 60 4E 80 */	lis r3, 0x4E800020@ha
/* 8008B9BC 000888FC  38 03 00 20 */	addi r0, r3, 0x4E800020@l
/* 8008B9C0 00088900  90 1F 00 10 */	stw r0, 0x10(r31)
/* 8008B9C4 00088904  7F E3 FB 78 */	mr r3, r31
/* 8008B9C8 00088908  38 80 00 14 */	li r4, 0x14
/* 8008B9CC 0008890C  4B FF E9 71 */	bl TRK_flush_cache
/* 8008B9D0 00088910  3C 60 80 3F */	lis r3, TRKvalue128_temp@ha
/* 8008B9D4 00088914  38 83 AB 78 */	addi r4, r3, TRKvalue128_temp@l
/* 8008B9D8 00088918  7F C3 F3 78 */	mr r3, r30
/* 8008B9DC 0008891C  7F EC FB 78 */	mr r12, r31
/* 8008B9E0 00088920  7D 88 03 A6 */	mtlr r12
/* 8008B9E4 00088924  4E 80 00 21 */	blrl 
/* 8008B9E8 00088928  38 60 00 00 */	li r3, 0
/* 8008B9EC 0008892C  83 E1 00 0C */	lwz r31, 0xc(r1)
/* 8008B9F0 00088930  83 C1 00 08 */	lwz r30, 8(r1)
/* 8008B9F4 00088934  38 21 00 10 */	addi r1, r1, 0x10
/* 8008B9F8 00088938  80 01 00 04 */	lwz r0, 4(r1)
/* 8008B9FC 0008893C  7C 08 03 A6 */	mtlr r0
/* 8008BA00 00088940  4E 80 00 20 */	blr 

.global TRKTargetSetInputPendingPtr
TRKTargetSetInputPendingPtr:
/* 8008BA04 00088944  3C 80 80 3F */	lis r4, gTRKState@ha
/* 8008BA08 00088948  38 84 AB 88 */	addi r4, r4, gTRKState@l
/* 8008BA0C 0008894C  90 64 00 A0 */	stw r3, 0xa0(r4)
/* 8008BA10 00088950  4E 80 00 20 */	blr 

.section .rodata, "a"  # 0x8036FFA0 - 0x803A8380
.balign 8
.global gTRKMemMap
gTRKMemMap:
	.4byte 0
	.4byte 0xFFFFFFFF
	.4byte 0x00000001
	.4byte 0x00000001
"@233":
	.4byte 0x60000000
	.4byte 0x60000000
	.4byte 0x60000000
	.4byte 0x60000000
	.4byte 0x60000000
"@238":
	.4byte 0x60000000
	.4byte 0x60000000
	.4byte 0x60000000
	.4byte 0x60000000
	.4byte 0x60000000
"@243":
	.4byte 0x60000000
	.4byte 0x60000000
	.4byte 0x60000000
	.4byte 0x60000000
	.4byte 0x60000000
	.4byte 0

.section .data, "wa"  # 0x803A8380 - 0x803E6000
.global gTRKRestoreFlags
gTRKRestoreFlags:
  .4byte 0
  .4byte 0
  .4byte 0
.global gTRKExceptionStatus
gTRKExceptionStatus:
	.4byte 0
	.4byte 0
	.4byte 0
	.4byte 0x01000000
.global gTRKStepStatus
gTRKStepStatus:
  .4byte 0
  .4byte 0
  .4byte 0
  .4byte 0
  .4byte 0

.section .bss, "wa"  # 0x803E6000 - 0x80408AC0
TRK_saved_exceptionID:
	.skip 0x4
.global gTRKSaveState
gTRKSaveState:
	.skip 0x94
TRKvalue128_temp:
	.skip 0x10
.global gTRKState
gTRKState:
	.skip 0xA8
.global gTRKCPUState
gTRKCPUState:
	.skip 0x430