Mother2GbaTranslation/notes/m2-subC980C.txt

1731 lines
123 KiB
Plaintext

80C980C: print next character (r0: window pointer)
m2_printch: push {r4-r7,r14} ;9 277
080C980E (T) mov r7,r8 ;2 279
080C9810 (T) push {r7} ;5 284
080C9812 (T) add sp,-#0x4 ;2 286
080C9814 (T) mov r5,r0 ;2 288
080C9816 (T) mov r4,#0x0 ;2 290
// Decrement [window+0x30]
080C9818 (T) ldrh r0,[r5,#0x30] ;6 296
080C981A (T) sub r0,#0x1 ;2 298
080C981C (T) strh r0,[r5,#0x30] ;7 305
// If [window+0x30] > 0, return 0
080C981E (T) lsl r0,r0,#0x10 ;2 307
080C9820 (T) cmp r0,#0x0 ;2 309
080C9822 (T) ble #0x80C9828 ;8 317
080C9824 (T) bl #0x80CA498 ;10 327
// char* ptr = [window+0x4] + [window+0x14]
080C9828 (T) mov r6,r5 ;2 329
080C982A (T) add r6,#0x14 ;2 331
080C982C (T) ldr r0,[r5,#0x4] ;9 340
080C982E (T) ldr r1,[r5,#0x14] ;9 349
080C9830 (T) add r7,r0,r1 ;2 351
// char c = *(ptr + 1)
080C9832 (T) ldrb r0,[r7,#0x1] ;4 355
// If c != 0xFF,
080C9834 (T) cmp r0,#0xFF ;2 357
080C9836 (T) beq #0x80C9860 ;8 365
// then: if (text_y >= window_height) OR ((text_y < window_height) AND (text_y + window_y > 0x1F)),
080C9838 (T) mov r0,#0x2C ;2 367
080C983A (T) ldsh r1,[r5,r0] ;6 373
080C983C (T) mov r2,#0x28 ;2 375
080C983E (T) ldsh r0,[r5,r2] ;6 381
080C9840 (T) cmp r1,r0 ;2 383
080C9842 (T) bge #0x80C984E ;8 391
080C9844 (T) mov r3,#0x24 ;2 393
080C9846 (T) ldsh r0,[r5,r3] ;6 399
080C9848 (T) add r0,r0,r1 ;2 401
080C984A (T) cmp r0,#0x1F ;2 403
080C984C (T) ble #0x80C9860 ;8 411
// then: call 80CA4BC with r0 = window ptr
080C984E (T) mov r0,r5 ;2 413
080C9850 (T) bl m2_scrolltext
// text_y -= 2
080C9854 (T) ldrh r0,[r5,#0x2C] ;6 429
080C9856 (T) sub r0,#0x2 ;2 431
080C9858 (T) strh r0,[r5,#0x2C] ;7 438
// text_x = 0
080C985A (T) strh r4,[r5,#0x2A] ;7 445
// return 0
080C985C (T) bl #0x80CA498 ;10 455
// Calculate tilemap pointer for current char
080C9860 (T) ldr r2,=#0x3005270 // pointer to tilemap in WRAM (i.e., 0x2028A58)
080C9862 (T) mov r3,#0x24 ;2 466
080C9864 (T) ldsh r0,[r5,r3] ;6 472
080C9866 (T) mov r3,#0x2C ;2 474
080C9868 (T) ldsh r1,[r5,r3] ;6 480
080C986A (T) add r0,r0,r1 // r0 = text_y + window_y
080C986C (T) lsl r0,r0,#0x6 // r0 *= 64
080C986E (T) ldr r2,[r2] ;4 488
080C9870 (T) add r2,r2,r0 // r2 = tilemap + (text_y + window_y) * 64
080C9872 (T) mov r1,#0x22 ;2 492
080C9874 (T) ldsh r0,[r5,r1] ;4 496
080C9876 (T) mov r3,#0x2A ;2 498
080C9878 (T) ldsh r1,[r5,r3] ;6 504
080C987A (T) add r0,r0,r1 // r0 = text_x + window_x
080C987C (T) lsl r0,r0,#0x1 // r0 *= 2
080C987E (T) add r2,r2,r0 // r2 = tilemap + (text_y + window_y) * 64 + (text_x + window_x) * 2
080C9880 (T) mov r8,r2 // r8 = r2
// If [window+0x44] == 6,
080C9882 (T) mov r0,r5 ;2 514
080C9884 (T) add r0,#0x44 ;2 516
080C9886 (T) ldrb r1,[r0] ;12 528
080C9888 (T) mov r3,r0 // r3 = window+0x44
080C988A (T) cmp r1,#0x6 ;2 532
080C988C (T) bne #0x80C98DC ;8 540
080C988E (T) ldr r2,=#0x3001D40 ;9 549
080C9890 (T) mov r4,#0xE5 ;2 551
080C9892 (T) lsl r4,r4,#0x1 ;2 553
080C9894 (T) add r0,r2,r4 ;2 555
080C9896 (T) ldrb r0,[r0] ;12 567
080C9898 (T) cmp r0,#0x1 ;2 569
080C989A (T) beq #0x80C98C2 ;8 577
080C989C (T) cmp r0,#0x1 ;2 579
080C989E (T) bgt #0x80C98B0 ;8 587
080C98A0 (T) cmp r0,#0x0 ;2 589
080C98A2 (T) beq #0x80C98BA ;8 597
080C98A4 (T) b #0x80C9BB8 ;8 605
080C98A6 (T) lsl r0,r0,#0x0 ;2 607
080C98A8 (T) strh r0,[r6,r1] ;5 612
080C98AA (T) lsl r0,r0,#0xC ;2 614
080C98AC (T) add r0,r0,5 ;2 616
080C98AE (T) lsl r0,r0,#0xC ;2 618
080C98B0 (T) cmp r0,#0x2 ;2 620
080C98B2 (T) beq #0x80C98CA ;8 628
080C98B4 (T) cmp r0,#0x3 ;2 630
080C98B6 (T) beq #0x80C98D2 ;8 638
080C98B8 (T) b #0x80C9BB8 ;8 646
080C98BA (T) ldr r1,[r5,#0x1C] ;9 655
080C98BC (T) mov r4,#0xE8 ;2 657
080C98BE (T) lsl r4,r4,#0x1 ;2 659
080C98C0 (T) b #0x80C98D8 ;8 667
080C98C2 (T) ldr r1,[r5,#0x1C] ;9 676
080C98C4 (T) mov r4,#0xEB ;2 678
080C98C6 (T) lsl r4,r4,#0x1 ;2 680
080C98C8 (T) b #0x80C98D8 ;8 688
080C98CA (T) ldr r1,[r5,#0x1C] ;9 697
080C98CC (T) mov r4,#0xEE ;2 699
080C98CE (T) lsl r4,r4,#0x1 ;2 701
080C98D0 (T) b #0x80C98D8 ;8 709
080C98D2 (T) ldr r1,[r5,#0x1C] ;9 718
080C98D4 (T) mov r4,#0xF1 ;2 720
080C98D6 (T) lsl r4,r4,#0x1 ;2 722
080C98D8 (T) add r0,r2,r4 ;2 724
080C98DA (T) b #0x80C9BB6 ;8 732
// Else if [window+0x44] == 7,
080C98DC (T) cmp r1,#0x7 ;2 734
080C98DE (T) bne #0x80C98EC ;8 742
080C98E0 (T) ldr r1,[r5,#0x1C] ;9 751
080C98E2 (T) ldr r0,=#0x3001F10 ;9 760
080C98E4 (T) b #0x80C9BB6 ;8 768
080C98E6 (T) lsl r0,r0,#0x0 ;2 770
080C98E8 (T) sub r0,r2,4 ;2 772
080C98EA (T) lsl r0,r0,#0xC ;2 774
// Else if [window+0x44] == 8,
080C98EC (T) cmp r1,#0x8 ;2 776
080C98EE (T) bne #0x80C98FC ;8 784
080C98F0 (T) ldr r1,[r5,#0x1C] ;9 793
080C98F2 (T) ldr r0,=#0x3001F16 ;9 802
080C98F4 (T) b #0x80C9BB6 ;8 810
080C98F6 (T) lsl r0,r0,#0x0 ;2 812
080C98F8 (T) sub r6,r2,4 ;2 814
080C98FA (T) lsl r0,r0,#0xC ;2 816
// Else if [window+0x44] == 9,
080C98FC (T) cmp r1,#0x9 ;2 818
080C98FE (T) bne #0x80C990C ;8 826
080C9900 (T) ldr r1,[r5,#0x1C] ;9 835
080C9902 (T) ldr r0,=#0x3001F1C ;9 844
080C9904 (T) b #0x80C9BB6 ;8 852
080C9906 (T) lsl r0,r0,#0x0 ;2 854
080C9908 (T) sub r4,r3,4 ;2 856
080C990A (T) lsl r0,r0,#0xC ;2 858
// Else if [window+0x44] == 10,
080C990C (T) cmp r1,#0xA ;2 860
080C990E (T) bne #0x80C991C ;8 868
080C9910 (T) ldr r1,[r5,#0x1C] ;9 877
080C9912 (T) ldr r0,=#0x3001F22 ;9 886
080C9914 (T) b #0x80C9BB6 ;8 894
080C9916 (T) lsl r0,r0,#0x0 ;2 896
080C9918 (T) sub r2,r4,4 ;2 898
080C991A (T) lsl r0,r0,#0xC ;2 900
// Else if [window+0x44] == 11,
080C991C (T) cmp r1,#0xB ;2 902
080C991E (T) bne #0x80C992C ;8 910
080C9920 (T) ldr r1,[r5,#0x1C] ;9 919
080C9922 (T) ldr r0,=#0x3001F30 ;9 928
080C9924 (T) b #0x80C9BB6 ;8 936
080C9926 (T) lsl r0,r0,#0x0 ;2 938
080C9928 (T) sub r0,r6,4 ;2 940
080C992A (T) lsl r0,r0,#0xC ;2 942
// Else if [window+0x44] == 12,
080C992C (T) cmp r1,#0xC ;2 944
080C992E (T) bne #0x80C993C ;8 952
080C9930 (T) ldr r1,[r5,#0x1C] ;9 961
080C9932 (T) ldr r0,=#0x3001F3A ;9 970
080C9934 (T) b #0x80C9BB6 ;8 978
080C9936 (T) lsl r0,r0,#0x0 ;2 980
080C9938 (T) sub r2,r7,4 ;2 982
080C993A (T) lsl r0,r0,#0xC ;2 984
// Else if [window+0x44] == 13,
080C993C (T) cmp r1,#0xD ;2 986
080C993E (T) bne #0x80C994C ;8 994
080C9940 (T) ldr r0,=#0x3005220 ;9 1003
080C9942 (T) ldr r1,[r0] ;12 1015
080C9944 (T) ldr r0,[r5,#0x1C] ;9 1024
080C9946 (T) b #0x80C9BB6 ;8 1032
080C9948 (T) strh r0,[r4,r0] ;13 1045
080C994A (T) lsl r0,r0,#0xC ;2 1047
// Else if [window+0x44] == 14,
080C994C (T) cmp r1,#0xE ;2 1049
080C994E (T) bne #0x80C9960 ;8 1057
080C9950 (T) ldr r0,=#0x3005220 ;9 1066
080C9952 (T) ldr r1,[r5,#0x1C] ;9 1075
080C9954 (T) add r1,#0x10 ;2 1077
080C9956 (T) ldr r0,[r0] ;12 1089
080C9958 (T) add r7,r0,r1 ;2 1091
080C995A (T) b #0x80C9BB8 ;8 1099
080C995C (T) strh r0,[r4,r0] ;13 1112
080C995E (T) lsl r0,r0,#0xC ;2 1114
// Else if [window+0x44] == 15,
080C9960 (T) cmp r1,#0xF ;2 1116
080C9962 (T) bne #0x80C9988 ;8 1124
080C9964 (T) ldr r0,=#0x8B1B8B8 ;9 1133
080C9966 (T) ldr r1,[r0,#0xC] ;12 1145
080C9968 (T) mov r0,r5 ;2 1147
080C996A (T) str r3,[sp] ;5 1152
080C996C (T) bl #0x80F49A0 ;10 1162
080C9970 (T) lsl r0,r0,#0x10 ;2 1164
080C9972 (T) asr r0,r0,#0x10 ;2 1166
080C9974 (T) ldr r3,[sp] ;4 1170
080C9976 (T) cmp r0,#0x1 ;2 1172
080C9978 (T) beq #0x80C997E ;8 1180
080C997A (T) bl #0x80CA498 ;10 1190
080C997E (T) strb r0,[r3] ;5 1195
080C9980 (T) bl #0x80CA498 ;10 1205
080C9984 (T) ???? ;0 1205
080C9986 (T) lsr r1,r6,#0x2 ;2 1207
// Else if [window+0x44] == 16,
080C9988 (T) ldrb r2,[r3] ;4 1211
080C998A (T) mov r1,r2 ;2 1213
080C998C (T) cmp r1,#0x10 ;2 1215
080C998E (T) bne #0x80C99AC ;8 1223
080C9990 (T) ldr r1,=#0x3005220 ;9 1232
080C9992 (T) ldrb r0,[r7] ;4 1236
080C9994 (T) add r0,#0x30 ;2 1238
080C9996 (T) ldr r1,[r1] ;9 1247
080C9998 (T) add r7,r1,r0 ;2 1249
080C999A (T) ldr r0,[r6] ;4 1253
080C999C (T) add r0,#0x1 ;2 1255
080C999E (T) str r0,[r6] ;5 1260
080C99A0 (T) mov r0,#0x1 ;2 1262
080C99A2 (T) strb r0,[r3] ;5 1267
080C99A4 (T) b #0x80C9C42 ;8 1275
080C99A6 (T) lsl r0,r0,#0x0 ;2 1277
080C99A8 (T) strh r0,[r4,r0] ;13 1290
080C99AA (T) lsl r0,r0,#0xC ;2 1292
// Else if [window+0x44] == 18,
080C99AC (T) cmp r1,#0x12 ;2 1294
080C99AE (T) bne #0x80C9A74 ;8 1302
080C99B0 (T) mov r6,r5 ;2 1304
080C99B2 (T) add r6,#0x1C ;2 1306
080C99B4 (T) ldr r0,[r5,#0x1C] ;9 1315
080C99B6 (T) mov r12,r0 ;2 1317
080C99B8 (T) cmp r0,#0x8 ;2 1319
080C99BA (T) bgt #0x80C99D8 ;8 1327
080C99BC (T) ldr r1,=#0x8B1C03E ;9 1336
080C99BE (T) lsl r0,r0,#0x1 ;2 1338
080C99C0 (T) add r0,r0,r1 ;2 1340
080C99C2 (T) ldrh r1,[r0] ;12 1352
080C99C4 (T) mov r0,#0x1F ;2 1354
080C99C6 (T) and r0,r1 ;2 1356
080C99C8 (T) lsr r1,r1,#0x5 ;2 1358
080C99CA (T) lsl r1,r1,#0x6 ;2 1360
080C99CC (T) add r0,r0,r1 ;2 1362
080C99CE (T) lsl r0,r0,#0x10 ;2 1364
080C99D0 (T) lsr r4,r0,#0x10 ;2 1366
080C99D2 (T) b #0x80C99DE ;8 1374
080C99D4 (T) stmia r0!,{r1-r5} ;49 1423
080C99D6 (T) lsr r1,r6,#0x2 ;2 1425
080C99D8 (T) ldr r0,=#0x8B1C059 ;9 1434
080C99DA (T) mov r1,r12 ;2 1436
080C99DC (T) add r7,r1,r0 ;2 1438
080C99DE (T) ldrh r0,[r5,#0x2E] ;6 1444
080C99E0 (T) strh r0,[r5,#0x30] ;7 1451
080C99E2 (T) ldr r0,[r6] ;4 1455
080C99E4 (T) cmp r0,#0x8 ;2 1457
080C99E6 (T) ble #0x80C99EA ;8 1465
080C99E8 (T) b #0x80C9C42 ;8 1473
080C99EA (T) ldr r3,=#0x30051EC ;9 1482
080C99EC (T) ldrh r0,[r3] ;4 1486
080C99EE (T) add r0,r4,r0 ;2 1488
080C99F0 (T) lsl r0,r0,#0x10 ;2 1490
080C99F2 (T) lsr r4,r0,#0x10 ;2 1492
080C99F4 (T) ldr r2,=#0x3005228 ;9 1501
080C99F6 (T) ldrh r1,[r2] ;4 1505
080C99F8 (T) mov r0,r4 ;2 1507
080C99FA (T) orr r0,r1 ;2 1509
080C99FC (T) mov r1,r8 ;2 1511
080C99FE (T) strh r0,[r1] ;7 1518
080C9A00 (T) add r1,#0x40 ;2 1520
080C9A02 (T) mov r0,r4 ;2 1522
080C9A04 (T) add r0,#0x20 ;2 1524
080C9A06 (T) ldrh r2,[r2] ;4 1528
080C9A08 (T) orr r0,r2 ;2 1530
080C9A0A (T) strh r0,[r1] ;7 1537
080C9A0C (T) ldr r1,=#0x8B1C050 ;9 1546
080C9A0E (T) mov r4,r12 ;2 1548
080C9A10 (T) lsl r0,r4,#0x1 ;2 1550
080C9A12 (T) add r0,r0,r1 ;2 1552
080C9A14 (T) ldrh r1,[r0] ;12 1564
080C9A16 (T) mov r0,#0x1F ;2 1566
080C9A18 (T) and r0,r1 ;2 1568
080C9A1A (T) lsr r1,r1,#0x5 ;2 1570
080C9A1C (T) lsl r1,r1,#0x6 ;2 1572
080C9A1E (T) add r0,r0,r1 ;2 1574
080C9A20 (T) lsl r0,r0,#0x10 ;2 1576
080C9A22 (T) lsr r0,r0,#0x10 ;2 1578
080C9A24 (T) ldrh r3,[r3] ;4 1582
080C9A26 (T) add r0,r0,r3 ;2 1584
080C9A28 (T) lsl r0,r0,#0x10 ;2 1586
080C9A2A (T) lsr r4,r0,#0x10 ;2 1588
080C9A2C (T) mov r1,r8 ;2 1590
080C9A2E (T) add r1,#0x80 ;2 1592
080C9A30 (T) mov r0,r4 ;2 1594
080C9A32 (T) orr r0,r2 ;2 1596
080C9A34 (T) strh r0,[r1] ;7 1603
080C9A36 (T) add r1,#0x40 ;2 1605
080C9A38 (T) mov r0,r4 ;2 1607
080C9A3A (T) add r0,#0x20 ;2 1609
080C9A3C (T) orr r0,r2 ;2 1611
080C9A3E (T) strh r0,[r1] ;7 1618
080C9A40 (T) ldrh r0,[r5,#0x2A] ;6 1624
080C9A42 (T) add r0,#0x1 ;2 1626
080C9A44 (T) strh r0,[r5,#0x2A] ;7 1633
080C9A46 (T) ldr r0,[r6] ;4 1637
080C9A48 (T) add r0,#0x1 ;2 1639
080C9A4A (T) str r0,[r6] ;5 1644
080C9A4C (T) cmp r0,#0x9 ;2 1646
080C9A4E (T) beq #0x80C9A54 ;8 1654
080C9A50 (T) bl #0x80CA498 ;10 1664
080C9A54 (T) mov r0,#0x2E ;2 1666
080C9A56 (T) ldsh r1,[r5,r0] ;6 1672
080C9A58 (T) lsl r0,r1,#0x4 ;2 1674
080C9A5A (T) sub r0,r0,r1 ;2 1676
080C9A5C (T) lsl r0,r0,#0x1 ;2 1678
080C9A5E (T) strh r0,[r5,#0x30] ;7 1685
080C9A60 (T) bl #0x80CA498 ;10 1695
080C9A64 (T) stmia r0!,{r0,r3,r4,r6} ;40 1735
080C9A66 (T) lsr r1,r6,#0x2 ;2 1737
080C9A68 (T) str r4,[r5,r7] ;6 1743
080C9A6A (T) lsl r0,r0,#0xC ;2 1745
080C9A6C (T) strh r0,[r5,r0] ;7 1752
080C9A6E (T) lsl r0,r0,#0xC ;2 1754
080C9A70 (T) stmia r0!,{r4,r6} ;22 1776
080C9A72 (T) lsr r1,r6,#0x2 ;2 1778
// Else if [window+0x44] == 17,
080C9A74 (T) cmp r1,#0x11 ;2 1780
080C9A76 (T) bne #0x80C9A84 ;8 1788
080C9A78 (T) ldr r1,[r5,#0x1C] ;9 1797
080C9A7A (T) ldr r0,=#0x8B1C030 ;9 1806
080C9A7C (T) b #0x80C9BB6 ;8 1814
080C9A7E (T) lsl r0,r0,#0x0 ;2 1816
080C9A80 (T) stmia r0!,{r4,r5} ;22 1838
080C9A82 (T) lsr r1,r6,#0x2 ;2 1840
// Else if [window+0x44] == 19,
080C9A84 (T) cmp r1,#0x13 ;2 1842
080C9A86 (T) bne #0x80C9AAC ;8 1850
080C9A88 (T) ldr r0,=#0x8B1B8B8 ;9 1859
080C9A8A (T) ldr r1,[r0,#0x18] ;12 1871
080C9A8C (T) mov r0,r5 ;2 1873
080C9A8E (T) str r3,[sp] ;5 1878
080C9A90 (T) bl #0x80F49A0 ;10 1888
080C9A94 (T) lsl r0,r0,#0x10 ;2 1890
080C9A96 (T) ldr r3,[sp] ;4 1894
080C9A98 (T) cmp r0,#0x0 ;2 1896
080C9A9A (T) beq #0x80C9AA0 ;8 1904
080C9A9C (T) mov r0,#0x1 ;2 1906
080C9A9E (T) strb r0,[r3] ;5 1911
080C9AA0 (T) ldrh r0,[r5,#0x2E] ;6 1917
080C9AA2 (T) strh r0,[r5,#0x30] ;7 1924
080C9AA4 (T) bl #0x80CA498 ;10 1934
080C9AA8 (T) ???? ;0 1934
080C9AAA (T) lsr r1,r6,#0x2 ;2 1936
// Else if [window+0x44] == 20,
080C9AAC (T) cmp r1,#0x14 ;2 1938
080C9AAE (T) bne #0x80C9AD4 ;8 1946
080C9AB0 (T) ldr r0,=#0x8B1B8B8 ;9 1955
080C9AB2 (T) ldr r1,[r0,#0x30] ;12 1967
080C9AB4 (T) mov r0,r5 ;2 1969
080C9AB6 (T) str r3,[sp] ;5 1974
080C9AB8 (T) bl #0x80F49A0 ;10 1984
080C9ABC (T) lsl r0,r0,#0x10 ;2 1986
080C9ABE (T) ldr r3,[sp] ;4 1990
080C9AC0 (T) cmp r0,#0x0 ;2 1992
080C9AC2 (T) beq #0x80C9AC8 ;8 2000
080C9AC4 (T) mov r0,#0x1 ;2 2002
080C9AC6 (T) strb r0,[r3] ;5 2007
080C9AC8 (T) ldrh r0,[r5,#0x2E] ;6 2013
080C9ACA (T) strh r0,[r5,#0x30] ;7 2020
080C9ACC (T) bl #0x80CA498 ;10 2030
080C9AD0 (T) ???? ;0 2030
080C9AD2 (T) lsr r1,r6,#0x2 ;2 2032
// Else if [window+0x44] <= 24,
080C9AD4 (T) mov r0,r2 ;2 2034
080C9AD6 (T) sub r0,#0x15 ;2 2036
080C9AD8 (T) lsl r0,r0,#0x18 ;2 2038
080C9ADA (T) lsr r0,r0,#0x18 ;2 2040
080C9ADC (T) cmp r0,#0x3 ;2 2042
080C9ADE (T) bhi #0x80C9B04 ;8 2050
080C9AE0 (T) ldr r0,=#0x8B1B8B8 ;9 2059
080C9AE2 (T) ldr r1,[r0,#0x1C] ;12 2071
080C9AE4 (T) mov r0,r5 ;2 2073
080C9AE6 (T) str r3,[sp] ;5 2078
080C9AE8 (T) bl #0x80F49A0 ;10 2088
080C9AEC (T) lsl r0,r0,#0x10 ;2 2090
080C9AEE (T) ldr r3,[sp] ;4 2094
080C9AF0 (T) cmp r0,#0x0 ;2 2096
080C9AF2 (T) beq #0x80C9AF8 ;8 2104
080C9AF4 (T) mov r0,#0x1 ;2 2106
080C9AF6 (T) strb r0,[r3] ;5 2111
080C9AF8 (T) ldrh r0,[r5,#0x2E] ;6 2117
080C9AFA (T) strh r0,[r5,#0x30] ;7 2124
080C9AFC (T) bl #0x80CA498 ;10 2134
080C9B00 (T) ???? ;0 2134
080C9B02 (T) lsr r1,r6,#0x2 ;2 2136
// Else if [window+0x44] <= 28,
080C9B04 (T) mov r0,r2 ;2 2138
080C9B06 (T) sub r0,#0x19 ;2 2140
080C9B08 (T) lsl r0,r0,#0x18 ;2 2142
080C9B0A (T) lsr r0,r0,#0x18 ;2 2144
080C9B0C (T) cmp r0,#0x3 ;2 2146
080C9B0E (T) bhi #0x80C9B34 ;8 2154
080C9B10 (T) ldr r0,=#0x8B1B8B8 ;9 2163
080C9B12 (T) ldr r1,[r0,#0x20] ;12 2175
080C9B14 (T) mov r0,r5 ;2 2177
080C9B16 (T) str r3,[sp] ;5 2182
080C9B18 (T) bl #0x80F49A0 ;10 2192
080C9B1C (T) lsl r0,r0,#0x10 ;2 2194
080C9B1E (T) ldr r3,[sp] ;4 2198
080C9B20 (T) cmp r0,#0x0 ;2 2200
080C9B22 (T) beq #0x80C9B28 ;8 2208
080C9B24 (T) mov r0,#0x1 ;2 2210
080C9B26 (T) strb r0,[r3] ;5 2215
080C9B28 (T) ldrh r0,[r5,#0x2E] ;6 2221
080C9B2A (T) strh r0,[r5,#0x30] ;7 2228
080C9B2C (T) bl #0x80CA498 ;10 2238
080C9B30 (T) ???? ;0 2238
080C9B32 (T) lsr r1,r6,#0x2 ;2 2240
// Else if [window+0x44] == 29,
080C9B34 (T) cmp r1,#0x1D ;2 2242
080C9B36 (T) bne #0x80C9B5C ;8 2250
080C9B38 (T) ldr r0,=#0x8B1B8B8 ;9 2259
080C9B3A (T) ldr r1,[r0,#0x24] ;12 2271
080C9B3C (T) mov r0,r5 ;2 2273
080C9B3E (T) str r3,[sp] ;5 2278
080C9B40 (T) bl #0x80F49A0 ;10 2288
080C9B44 (T) lsl r0,r0,#0x10 ;2 2290
080C9B46 (T) ldr r3,[sp] ;4 2294
080C9B48 (T) cmp r0,#0x0 ;2 2296
080C9B4A (T) beq #0x80C9B50 ;8 2304
080C9B4C (T) mov r0,#0x1 ;2 2306
080C9B4E (T) strb r0,[r3] ;5 2311
080C9B50 (T) ldrh r0,[r5,#0x2E] ;6 2317
080C9B52 (T) strh r0,[r5,#0x30] ;7 2324
// return 0
080C9B54 (T) bl #0x80CA498 ;10 2334
080C9B58 (T) ???? ;0 2334
080C9B5A (T) lsr r1,r6,#0x2 ;2 2336
// Else if [window+0x44] == 30,
080C9B5C (T) cmp r1,#0x1E ;2 2338
080C9B5E (T) bne #0x80C9B84 ;8 2346
080C9B60 (T) ldr r0,=#0x8B1B8B8 ;9 2355
080C9B62 (T) ldr r1,[r0,#0x28] ;12 2367
080C9B64 (T) mov r0,r5 ;2 2369
080C9B66 (T) str r3,[sp] ;5 2374
080C9B68 (T) bl #0x80F49A0 ;10 2384
080C9B6C (T) lsl r0,r0,#0x10 ;2 2386
080C9B6E (T) ldr r3,[sp] ;4 2390
080C9B70 (T) cmp r0,#0x0 ;2 2392
080C9B72 (T) beq #0x80C9B78 ;8 2400
080C9B74 (T) mov r0,#0x1 ;2 2402
080C9B76 (T) strb r0,[r3] ;5 2407
080C9B78 (T) ldrh r0,[r5,#0x2E] ;6 2413
080C9B7A (T) strh r0,[r5,#0x30] ;7 2420
// return 0
080C9B7C (T) bl #0x80CA498 ;10 2430
080C9B80 (T) ???? ;0 2430
080C9B82 (T) lsr r1,r6,#0x2 ;2 2432
// Else if [window+0x44] == 31,
080C9B84 (T) cmp r1,#0x1F ;2 2434
080C9B86 (T) bne #0x80C9BAC ;8 2442
080C9B88 (T) ldr r0,=#0x8B1B8B8 ;9 2451
080C9B8A (T) ldr r1,[r0,#0x2C] ;12 2463
080C9B8C (T) mov r0,r5 ;2 2465
080C9B8E (T) str r3,[sp] ;5 2470
080C9B90 (T) bl #0x80F49A0 ;10 2480
080C9B94 (T) lsl r0,r0,#0x10 ;2 2482
080C9B96 (T) ldr r3,[sp] ;4 2486
080C9B98 (T) cmp r0,#0x0 ;2 2488
080C9B9A (T) beq #0x80C9BA0 ;8 2496
080C9B9C (T) mov r0,#0x1 ;2 2498
080C9B9E (T) strb r0,[r3] ;5 2503
080C9BA0 (T) ldrh r0,[r5,#0x2E] ;6 2509
080C9BA2 (T) strh r0,[r5,#0x30] ;7 2516
// return 0
080C9BA4 (T) bl #0x80CA498 ;10 2526
080C9BA8 (T) ???? ;0 2526
080C9BAA (T) lsr r1,r6,#0x2 ;2 2528
// Else if [window+0x44] == 32,
080C9BAC (T) ldrb r0,[r3] ;4 2532
080C9BAE (T) cmp r0,#0x20 ;2 2534
080C9BB0 (T) bne #0x80C9BC4 ;8 2542
080C9BB2 (T) ldr r1,[r5,#0x1C] ;9 2551
080C9BB4 (T) ldr r0,=#0x3001F28 ;9 2560
080C9BB6 (T) add r7,r1,r0 ;2 2562
080C9BB8 (T) mov r6,r5 ;2 2564
080C9BBA (T) add r6,#0x1C ;2 2566
080C9BBC (T) b #0x80C9C42 ;8 2574
080C9BBE (T) lsl r0,r0,#0x0 ;2 2576
080C9BC0 (T) sub r0,r5,4 ;2 2578
080C9BC2 (T) lsl r0,r0,#0xC ;2 2580
// Else if [window+0x44] == 33,
080C9BC4 (T) cmp r0,#0x21 ;2 2582
080C9BC6 (T) bne #0x80C9C28 ;8 2590
080C9BC8 (T) mov r2,#0x2C ;2 2592
080C9BCA (T) ldsh r1,[r5,r2] ;6 2598
080C9BCC (T) mov r4,#0x28 ;2 2600
080C9BCE (T) ldsh r0,[r5,r4] ;6 2606
080C9BD0 (T) cmp r1,r0 ;2 2608
080C9BD2 (T) bge #0x80C9BE2 ;8 2616
080C9BD4 (T) mov r1,#0x24 ;2 2618
080C9BD6 (T) ldsh r0,[r5,r1] ;4 2622
080C9BD8 (T) mov r2,#0x2C ;2 2624
080C9BDA (T) ldsh r1,[r5,r2] ;6 2630
080C9BDC (T) add r0,r0,r1 ;2 2632
080C9BDE (T) cmp r0,#0x1F ;2 2634
080C9BE0 (T) ble #0x80C9BF6 ;8 2642
080C9BE2 (T) mov r0,r5 ;2 2644
080C9BE4 (T) str r3,[sp] ;5 2649
080C9BE6 (T) bl #0x80CA4BC ;10 2659
080C9BEA (T) ldrh r0,[r5,#0x2C] ;6 2665
080C9BEC (T) sub r0,#0x2 ;2 2667
080C9BEE (T) mov r1,#0x0 ;2 2669
080C9BF0 (T) strh r0,[r5,#0x2C] ;7 2676
080C9BF2 (T) strh r1,[r5,#0x2A] ;7 2683
080C9BF4 (T) ldr r3,[sp] ;4 2687
080C9BF6 (T) ldr r1,=#0x8B1B8B8 ;9 2696
080C9BF8 (T) ldrb r0,[r7] ;4 2700
080C9BFA (T) lsl r0,r0,#0x2 ;2 2702
080C9BFC (T) add r0,r0,r1 ;2 2704
080C9BFE (T) ldr r1,[r0] ;12 2716
080C9C00 (T) mov r0,r5 ;2 2718
080C9C02 (T) str r3,[sp] ;5 2723
080C9C04 (T) bl #0x80F49A0 ;10 2733
080C9C08 (T) lsl r0,r0,#0x10 ;2 2735
080C9C0A (T) asr r1,r0,#0x10 ;2 2737
080C9C0C (T) ldr r3,[sp] ;4 2741
080C9C0E (T) cmp r1,#0x1 ;2 2743
080C9C10 (T) beq #0x80C9C16 ;8 2751
080C9C12 (T) bl #0x80CA498 ;10 2761
080C9C16 (T) ldr r0,[r6] ;4 2765
080C9C18 (T) add r0,#0x2 ;2 2767
080C9C1A (T) str r0,[r6] ;5 2772
080C9C1C (T) strb r1,[r3] ;5 2777
080C9C1E (T) bl #0x80CA498 ;10 2787
080C9C22 (T) lsl r0,r0,#0x0 ;2 2789
080C9C24 (T) ???? ;0 2789
080C9C26 (T) lsr r1,r6,#0x2 ;2 2791
// Else if [window+0x44] == 34,
080C9C28 (T) cmp r0,#0x22 ;2 2793
080C9C2A (T) bne #0x80C9C42 ;8 2801
080C9C2C (T) mov r0,r5 ;2 2803
080C9C2E (T) bl #0x80C9444 ;10 2813
080C9C32 (T) ldr r1,[r5,#0x10] ;9 2822
080C9C34 (T) strh r0,[r1,#0x2] ;7 2829
080C9C36 (T) ldr r0,[r5,#0x10] ;9 2838
080C9C38 (T) mov r3,#0x2 ;2 2840
080C9C3A (T) ldsh r0,[r0,r3] ;12 2852
080C9C3C (T) mov r0,#0x1 ;2 2854
080C9C3E (T) bl #0x80CA49A ;10 2864
// ================================================================================================================
// If c == 0xFF,
080C9C42 (T) ldrb r0,[r7,#0x1] ;4 2868
080C9C44 (T) cmp r0,#0xFF ;2 2870
080C9C46 (T) beq #0x80C9C4A ;8 2878
080C9C48 (T) b #0x80CA2C2 ;8 2886
// then: c = *ptr
080C9C4A (T) ldrb r0,[r7] ;4 2890
080C9C4C (T) mov r4,r0 ;2 2892
080C9C4E (T) mov r1,r0 ;2 2894
080C9C50 (T) cmp r4,#0x60 ;2 2896
080C9C52 (T) bls #0x80C9CBA ;8 2904
080C9C54 (T) cmp r4,#0x9F ;2 2906
080C9C56 (T) bne #0x80C9C6A ;8 2914
080C9C58 (T) ldr r0,[r6] ;4 2918
080C9C5A (T) add r0,#0x2 ;2 2920
080C9C5C (T) str r0,[r6] ;5 2925
080C9C5E (T) mov r0,#0x0 ;2 2927
080C9C60 (T) str r0,[r5,#0x1C] ;10 2937
080C9C62 (T) mov r0,#0xD ;2 2939
080C9C64 (T) strb r0,[r3] ;5 2944
080C9C66 (T) bl #0x80CA498 ;10 2954
080C9C6A (T) cmp r4,#0xAC ;2 2956
080C9C6C (T) bne #0x80C9C80 ;8 2964
080C9C6E (T) ldr r0,[r6] ;4 2968
080C9C70 (T) add r0,#0x2 ;2 2970
080C9C72 (T) str r0,[r6] ;5 2975
080C9C74 (T) mov r0,#0x0 ;2 2977
080C9C76 (T) str r0,[r5,#0x1C] ;10 2987
080C9C78 (T) mov r0,#0xF ;2 2989
080C9C7A (T) strb r0,[r3] ;5 2994
080C9C7C (T) bl #0x80CA498 ;10 3004
080C9C80 (T) cmp r4,#0xAD ;2 3006
080C9C82 (T) bne #0x80C9C96 ;8 3014
080C9C84 (T) ldr r0,[r6] ;4 3018
080C9C86 (T) add r0,#0x2 ;2 3020
080C9C88 (T) str r0,[r6] ;5 3025
080C9C8A (T) mov r0,#0x0 ;2 3027
080C9C8C (T) str r0,[r5,#0x1C] ;10 3037
080C9C8E (T) mov r0,#0xE ;2 3039
080C9C90 (T) strb r0,[r3] ;5 3044
080C9C92 (T) bl #0x80CA498 ;10 3054
080C9C96 (T) cmp r4,#0x63 ;2 3056
080C9C98 (T) bne #0x80C9CAC ;8 3064
080C9C9A (T) ldr r0,[r6] ;4 3068
080C9C9C (T) add r0,#0x2 ;2 3070
080C9C9E (T) str r0,[r6] ;5 3075
080C9CA0 (T) mov r0,#0x0 ;2 3077
080C9CA2 (T) str r0,[r5,#0x1C] ;10 3087
080C9CA4 (T) mov r0,#0x14 ;2 3089
080C9CA6 (T) strb r0,[r3] ;5 3094
080C9CA8 (T) bl #0x80CA498 ;10 3104
080C9CAC (T) mov r0,r7 ;2 3106
080C9CAE (T) bl #0x80A6C24 ;10 3116
080C9CB2 (T) ldr r1,[r6] ;4 3120
080C9CB4 (T) add r1,r1,r0 ;2 3122
080C9CB6 (T) str r1,[r6] ;5 3127
080C9CB8 (T) b #0x80CA498 ;8 3135
080C9CBA (T) cmp r4,#0x1 ;2 3137
080C9CBC (T) bne #0x80C9D28 ;8 3145
080C9CBE (T) ldrh r0,[r5,#0x2C] ;6 3151
080C9CC0 (T) add r0,#0x2 ;2 3153
080C9CC2 (T) mov r4,#0x0 ;2 3155
080C9CC4 (T) strh r0,[r5,#0x2C] ;7 3162
080C9CC6 (T) strh r4,[r5,#0x2A] ;7 3169
080C9CC8 (T) ldr r0,[r6] ;4 3173
080C9CCA (T) add r0,#0x2 ;2 3175
080C9CCC (T) str r0,[r6] ;5 3180
080C9CCE (T) ldr r3,=#0x3005220 ;9 3189
080C9CD0 (T) ldr r1,[r3] ;4 3193
080C9CD2 (T) ldr r2,=#0x4BA ;9 3202
080C9CD4 (T) add r0,r1,r2 ;2 3204
080C9CD6 (T) strh r4,[r0] ;13 3217
080C9CD8 (T) add r2,#0x2 ;2 3219
080C9CDA (T) add r0,r1,r2 ;2 3221
080C9CDC (T) strh r4,[r0] ;13 3234
080C9CDE (T) sub r2,#0x4 ;2 3236
080C9CE0 (T) add r1,r1,r2 ;2 3238
080C9CE2 (T) ldrb r0,[r1] ;6 3244
080C9CE4 (T) add r0,#0x1 ;2 3246
080C9CE6 (T) strb r0,[r1] ;7 3253
080C9CE8 (T) ldr r0,[r3] ;4 3257
080C9CEA (T) add r1,r0,r2 ;2 3259
080C9CEC (T) ldrb r0,[r1] ;6 3265
080C9CEE (T) cmp r0,#0x2 ;2 3267
080C9CF0 (T) bls #0x80C9CF6 ;8 3275
080C9CF2 (T) mov r0,#0x0 ;2 3277
080C9CF4 (T) strb r0,[r1] ;7 3284
080C9CF6 (T) mov r3,#0x2C ;2 3286
080C9CF8 (T) ldsh r1,[r5,r3] ;6 3292
080C9CFA (T) mov r2,#0x28 ;2 3294
080C9CFC (T) ldsh r0,[r5,r2] ;6 3300
080C9CFE (T) cmp r1,r0 ;2 3302
080C9D00 (T) bge #0x80C9D0E ;8 3310
080C9D02 (T) mov r3,#0x24 ;2 3312
080C9D04 (T) ldsh r0,[r5,r3] ;6 3318
080C9D06 (T) add r0,r0,r1 ;2 3320
080C9D08 (T) cmp r0,#0x1F ;2 3322
080C9D0A (T) bgt #0x80C9D0E ;8 3330
080C9D0C (T) b #0x80CA498 ;8 3338
080C9D0E (T) mov r0,r5 ;2 3340
080C9D10 (T) bl #0x80CA4BC ;10 3350
080C9D14 (T) ldrh r0,[r5,#0x2C] ;6 3356
080C9D16 (T) sub r0,#0x2 ;2 3358
080C9D18 (T) strh r0,[r5,#0x2C] ;7 3365
080C9D1A (T) strh r4,[r5,#0x2A] ;7 3372
080C9D1C (T) b #0x80CA498 ;8 3380
080C9D1E (T) lsl r0,r0,#0x0 ;2 3382
080C9D20 (T) strh r0,[r4,r0] ;13 3395
080C9D22 (T) lsl r0,r0,#0xC ;2 3397
080C9D24 (T) lsl r2,r7,#0x12 ;2 3399
080C9D26 (T) lsl r0,r0,#0x0 ;2 3401
080C9D28 (T) cmp r4,#0x0 ;2 3403
080C9D2A (T) bne #0x80C9D58 ;8 3411
080C9D2C (T) ldrb r0,[r3] ;4 3415
080C9D2E (T) sub r0,#0x6 ;2 3417
080C9D30 (T) lsl r0,r0,#0x18 ;2 3419
080C9D32 (T) lsr r0,r0,#0x18 ;2 3421
080C9D34 (T) cmp r0,#0x1A ;2 3423
080C9D36 (T) bhi #0x80C9D3E ;8 3431
080C9D38 (T) mov r0,#0x1 ;2 3433
080C9D3A (T) strb r0,[r3] ;5 3438
080C9D3C (T) b #0x80CA498 ;8 3446
080C9D3E (T) mov r0,r7 ;2 3448
080C9D40 (T) str r3,[sp] ;5 3453
080C9D42 (T) bl #0x80A7C18 ;10 3463
080C9D46 (T) mov r1,r0 ;2 3465
080C9D48 (T) ldr r3,[sp] ;4 3469
080C9D4A (T) cmp r1,#0x0 ;2 3471
080C9D4C (T) bne #0x80C9D50 ;8 3479
080C9D4E (T) b #0x80C9FAA ;8 3487
080C9D50 (T) ldr r0,[r6] ;4 3491
080C9D52 (T) add r0,#0x2 ;2 3493
080C9D54 (T) add r0,r0,r1 ;2 3495
080C9D56 (T) b #0x80CA496 ;8 3503
080C9D58 (T) cmp r4,#0x2 ;2 3505
080C9D5A (T) bne #0x80C9D72 ;8 3513
080C9D5C (T) ldrh r0,[r5,#0x2C] ;6 3519
080C9D5E (T) add r0,#0x2 ;2 3521
080C9D60 (T) mov r2,#0x0 ;2 3523
080C9D62 (T) strh r0,[r5,#0x2C] ;7 3530
080C9D64 (T) strh r2,[r5,#0x2A] ;7 3537
080C9D66 (T) ldr r0,[r6] ;4 3541
080C9D68 (T) add r0,#0x2 ;2 3543
080C9D6A (T) str r0,[r6] ;5 3548
080C9D6C (T) strh r2,[r5,#0x32] ;7 3555
080C9D6E (T) strb r4,[r3] ;5 3560
080C9D70 (T) b #0x80C9DA4 ;8 3568
080C9D72 (T) cmp r4,#0x22 ;2 3570
080C9D74 (T) bne #0x80C9D94 ;8 3578
080C9D76 (T) mov r2,#0x0 ;2 3580
080C9D78 (T) strh r2,[r5,#0x2A] ;7 3587
080C9D7A (T) ldr r0,[r6] ;4 3591
080C9D7C (T) add r0,#0x2 ;2 3593
080C9D7E (T) str r0,[r6] ;5 3598
080C9D80 (T) ldr r0,[r5] ;9 3607
080C9D82 (T) ldr r1,=#0xFFFFFEFF ;9 3616
080C9D84 (T) and r0,r1 ;2 3618
080C9D86 (T) str r0,[r5] ;10 3628
080C9D88 (T) strh r2,[r5,#0x32] ;7 3635
080C9D8A (T) mov r0,#0x2 ;2 3637
080C9D8C (T) strb r0,[r3] ;5 3642
080C9D8E (T) b #0x80CA49A ;8 3650
080C9D90 (T) bl lr+#0xDFE ;10 3660
080C9D92 (T) bl lr+#0xFFE ;10 3670
080C9D94 (T) cmp r4,#0x1D ;2 3672
080C9D96 (T) bne #0x80C9DDC ;8 3680
080C9D98 (T) ldr r0,[r6] ;4 3684
080C9D9A (T) add r0,#0x2 ;2 3686
080C9D9C (T) str r0,[r6] ;5 3691
080C9D9E (T) mov r2,#0x0 ;2 3693
080C9DA0 (T) mov r0,#0x3 ;2 3695
080C9DA2 (T) strb r0,[r3] ;5 3700
080C9DA4 (T) ldr r3,=#0x3005220 ;9 3709
080C9DA6 (T) ldr r1,[r3] ;4 3713
080C9DA8 (T) ldr r4,=#0x4BA ;9 3722
080C9DAA (T) add r0,r1,r4 ;2 3724
080C9DAC (T) strh r2,[r0] ;13 3737
080C9DAE (T) add r4,#0x2 ;2 3739
080C9DB0 (T) add r0,r1,r4 ;2 3741
080C9DB2 (T) strh r2,[r0] ;13 3754
080C9DB4 (T) mov r2,#0x97 ;2 3756
080C9DB6 (T) lsl r2,r2,#0x3 ;2 3758
080C9DB8 (T) add r1,r1,r2 ;2 3760
080C9DBA (T) ldrb r0,[r1] ;6 3766
080C9DBC (T) add r0,#0x1 ;2 3768
080C9DBE (T) strb r0,[r1] ;7 3775
080C9DC0 (T) ldr r0,[r3] ;4 3779
080C9DC2 (T) add r1,r0,r2 ;2 3781
080C9DC4 (T) ldrb r0,[r1] ;6 3787
080C9DC6 (T) cmp r0,#0x2 ;2 3789
080C9DC8 (T) bls #0x80C9DCE ;8 3797
080C9DCA (T) mov r0,#0x0 ;2 3799
080C9DCC (T) strb r0,[r1] ;7 3806
080C9DCE (T) mov r0,#0x2 ;2 3808
080C9DD0 (T) b #0x80CA49A ;8 3816
080C9DD2 (T) lsl r0,r0,#0x0 ;2 3818
080C9DD4 (T) strh r0,[r4,r0] ;13 3831
080C9DD6 (T) lsl r0,r0,#0xC ;2 3833
080C9DD8 (T) lsl r2,r7,#0x12 ;2 3835
080C9DDA (T) lsl r0,r0,#0x0 ;2 3837
080C9DDC (T) cmp r4,#0xC ;2 3839
080C9DDE (T) bne #0x80C9DF0 ;8 3847
080C9DE0 (T) ldr r0,[r6] ;4 3851
080C9DE2 (T) add r0,#0x2 ;2 3853
080C9DE4 (T) str r0,[r6] ;5 3858
080C9DE6 (T) mov r0,#0x0 ;2 3860
080C9DE8 (T) str r0,[r5,#0x1C] ;10 3870
080C9DEA (T) mov r0,#0x6 ;2 3872
080C9DEC (T) strb r0,[r3] ;5 3877
080C9DEE (T) b #0x80CA498 ;8 3885
080C9DF0 (T) cmp r4,#0xD ;2 3887
080C9DF2 (T) bne #0x80C9E04 ;8 3895
080C9DF4 (T) ldr r0,[r6] ;4 3899
080C9DF6 (T) add r0,#0x2 ;2 3901
080C9DF8 (T) str r0,[r6] ;5 3906
080C9DFA (T) mov r0,#0x0 ;2 3908
080C9DFC (T) str r0,[r5,#0x1C] ;10 3918
080C9DFE (T) mov r0,#0x7 ;2 3920
080C9E00 (T) strb r0,[r3] ;5 3925
080C9E02 (T) b #0x80CA498 ;8 3933
080C9E04 (T) cmp r4,#0xE ;2 3935
080C9E06 (T) bne #0x80C9E18 ;8 3943
080C9E08 (T) ldr r0,[r6] ;4 3947
080C9E0A (T) add r0,#0x2 ;2 3949
080C9E0C (T) str r0,[r6] ;5 3954
080C9E0E (T) mov r0,#0x0 ;2 3956
080C9E10 (T) str r0,[r5,#0x1C] ;10 3966
080C9E12 (T) mov r0,#0x8 ;2 3968
080C9E14 (T) strb r0,[r3] ;5 3973
080C9E16 (T) b #0x80CA498 ;8 3981
080C9E18 (T) lsl r0,r1,#0x18 ;2 3983
080C9E1A (T) lsr r0,r0,#0x18 ;2 3985
080C9E1C (T) cmp r0,#0xF ;2 3987
080C9E1E (T) bne #0x80C9E30 ;8 3995
080C9E20 (T) ldr r0,[r6] ;4 3999
080C9E22 (T) add r0,#0x2 ;2 4001
080C9E24 (T) str r0,[r6] ;5 4006
080C9E26 (T) mov r0,#0x0 ;2 4008
080C9E28 (T) str r0,[r5,#0x1C] ;10 4018
080C9E2A (T) mov r0,#0x9 ;2 4020
080C9E2C (T) strb r0,[r3] ;5 4025
080C9E2E (T) b #0x80CA498 ;8 4033
080C9E30 (T) cmp r0,#0x10 ;2 4035
080C9E32 (T) bne #0x80C9E44 ;8 4043
080C9E34 (T) ldr r0,[r6] ;4 4047
080C9E36 (T) add r0,#0x2 ;2 4049
080C9E38 (T) str r0,[r6] ;5 4054
080C9E3A (T) mov r0,#0x0 ;2 4056
080C9E3C (T) str r0,[r5,#0x1C] ;10 4066
080C9E3E (T) mov r0,#0xA ;2 4068
080C9E40 (T) strb r0,[r3] ;5 4073
080C9E42 (T) b #0x80CA498 ;8 4081
080C9E44 (T) cmp r0,#0x11 ;2 4083
080C9E46 (T) bne #0x80C9E58 ;8 4091
080C9E48 (T) ldr r0,[r6] ;4 4095
080C9E4A (T) add r0,#0x2 ;2 4097
080C9E4C (T) str r0,[r6] ;5 4102
080C9E4E (T) mov r0,#0x0 ;2 4104
080C9E50 (T) str r0,[r5,#0x1C] ;10 4114
080C9E52 (T) mov r0,#0xB ;2 4116
080C9E54 (T) strb r0,[r3] ;5 4121
080C9E56 (T) b #0x80CA498 ;8 4129
080C9E58 (T) cmp r0,#0x12 ;2 4131
080C9E5A (T) bne #0x80C9E6C ;8 4139
080C9E5C (T) ldr r0,[r6] ;4 4143
080C9E5E (T) add r0,#0x2 ;2 4145
080C9E60 (T) str r0,[r6] ;5 4150
080C9E62 (T) mov r0,#0x0 ;2 4152
080C9E64 (T) str r0,[r5,#0x1C] ;10 4162
080C9E66 (T) mov r0,#0xC ;2 4164
080C9E68 (T) strb r0,[r3] ;5 4169
080C9E6A (T) b #0x80CA498 ;8 4177
080C9E6C (T) cmp r0,#0x15 ;2 4179
080C9E6E (T) bne #0x80C9E80 ;8 4187
080C9E70 (T) ldr r0,[r6] ;4 4191
080C9E72 (T) add r0,#0x2 ;2 4193
080C9E74 (T) str r0,[r6] ;5 4198
080C9E76 (T) mov r0,#0x0 ;2 4200
080C9E78 (T) str r0,[r5,#0x1C] ;10 4210
080C9E7A (T) mov r0,#0x20 ;2 4212
080C9E7C (T) strb r0,[r3] ;5 4217
080C9E7E (T) b #0x80CA498 ;8 4225
080C9E80 (T) cmp r0,#0x2D ;2 4227
080C9E82 (T) bne #0x80C9E98 ;8 4235
080C9E84 (T) ldr r0,[r6] ;4 4239
080C9E86 (T) add r0,#0x2 ;2 4241
080C9E88 (T) str r0,[r6] ;5 4246
080C9E8A (T) mov r1,#0x0 ;2 4248
080C9E8C (T) str r1,[r5,#0x1C] ;10 4258
080C9E8E (T) ldr r0,[r5,#0x10] ;9 4267
080C9E90 (T) strb r1,[r0,#0x12] ;13 4280
080C9E92 (T) mov r0,#0x1E ;2 4282
080C9E94 (T) strb r0,[r3] ;5 4287
080C9E96 (T) b #0x80CA498 ;8 4295
080C9E98 (T) cmp r0,#0x2E ;2 4297
080C9E9A (T) bne #0x80C9EB0 ;8 4305
080C9E9C (T) ldr r0,[r6] ;4 4309
080C9E9E (T) add r0,#0x2 ;2 4311
080C9EA0 (T) str r0,[r6] ;5 4316
080C9EA2 (T) mov r1,#0x0 ;2 4318
080C9EA4 (T) str r1,[r5,#0x1C] ;10 4328
080C9EA6 (T) ldr r0,[r5,#0x10] ;9 4337
080C9EA8 (T) strb r1,[r0,#0x12] ;13 4350
080C9EAA (T) mov r0,#0x1F ;2 4352
080C9EAC (T) strb r0,[r3] ;5 4357
080C9EAE (T) b #0x80CA498 ;8 4365
080C9EB0 (T) cmp r0,#0x4 ;2 4367
080C9EB2 (T) bne #0x80C9EF8 ;8 4375
080C9EB4 (T) mov r0,#0x0 ;2 4377
080C9EB6 (T) str r0,[r5,#0x1C] ;10 4387
080C9EB8 (T) ldr r0,=#0x30051E0 ;9 4396
080C9EBA (T) ldrb r0,[r0] ;12 4408
080C9EBC (T) cmp r0,#0x0 ;2 4410
080C9EBE (T) bne #0x80C9EE4 ;8 4418
080C9EC0 (T) add r7,#0x2 ;2 4420
080C9EC2 (T) ldr r2,[r6] ;4 4424
080C9EC4 (T) add r2,#0x2 ;2 4426
080C9EC6 (T) ldrb r1,[r7] ;4 4430
080C9EC8 (T) ldrb r0,[r7,#0x1] ;4 4434
080C9ECA (T) lsl r0,r0,#0x8 ;2 4436
080C9ECC (T) orr r1,r0 ;2 4438
080C9ECE (T) ldrb r0,[r7,#0x2] ;4 4442
080C9ED0 (T) lsl r0,r0,#0x10 ;2 4444
080C9ED2 (T) orr r1,r0 ;2 4446
080C9ED4 (T) ldrb r0,[r7,#0x3] ;4 4450
080C9ED6 (T) lsl r0,r0,#0x18 ;2 4452
080C9ED8 (T) orr r1,r0 ;2 4454
080C9EDA (T) add r2,r2,r1 ;2 4456
080C9EDC (T) str r2,[r6] ;5 4461
080C9EDE (T) b #0x80C9EEA ;8 4469
080C9EE0 (T) str r0,[r4,r7] ;5 4474
080C9EE2 (T) lsl r0,r0,#0xC ;2 4476
080C9EE4 (T) ldr r0,[r6] ;4 4480
080C9EE6 (T) add r0,#0x6 ;2 4482
080C9EE8 (T) str r0,[r6] ;5 4487
080C9EEA (T) mov r0,#0x0 ;2 4489
080C9EEC (T) mov r1,#0x0 ;2 4491
080C9EEE (T) strh r1,[r5,#0x2A] ;7 4498
080C9EF0 (T) mov r1,r5 ;2 4500
080C9EF2 (T) add r1,#0x43 ;2 4502
080C9EF4 (T) strb r0,[r1] ;7 4509
080C9EF6 (T) b #0x80CA498 ;8 4517
080C9EF8 (T) cmp r0,#0x5 ;2 4519
080C9EFA (T) bne #0x80C9F40 ;8 4527
080C9EFC (T) mov r0,#0x0 ;2 4529
080C9EFE (T) str r0,[r5,#0x1C] ;10 4539
080C9F00 (T) ldr r0,=#0x30051E0 ;9 4548
080C9F02 (T) ldrb r0,[r0] ;12 4560
080C9F04 (T) cmp r0,#0x1 ;2 4562
080C9F06 (T) bne #0x80C9F2C ;8 4570
080C9F08 (T) add r7,#0x2 ;2 4572
080C9F0A (T) ldr r2,[r6] ;4 4576
080C9F0C (T) add r2,#0x2 ;2 4578
080C9F0E (T) ldrb r1,[r7] ;4 4582
080C9F10 (T) ldrb r0,[r7,#0x1] ;4 4586
080C9F12 (T) lsl r0,r0,#0x8 ;2 4588
080C9F14 (T) orr r1,r0 ;2 4590
080C9F16 (T) ldrb r0,[r7,#0x2] ;4 4594
080C9F18 (T) lsl r0,r0,#0x10 ;2 4596
080C9F1A (T) orr r1,r0 ;2 4598
080C9F1C (T) ldrb r0,[r7,#0x3] ;4 4602
080C9F1E (T) lsl r0,r0,#0x18 ;2 4604
080C9F20 (T) orr r1,r0 ;2 4606
080C9F22 (T) add r2,r2,r1 ;2 4608
080C9F24 (T) str r2,[r6] ;5 4613
080C9F26 (T) b #0x80C9F32 ;8 4621
080C9F28 (T) str r0,[r4,r7] ;5 4626
080C9F2A (T) lsl r0,r0,#0xC ;2 4628
080C9F2C (T) ldr r0,[r6] ;4 4632
080C9F2E (T) add r0,#0x6 ;2 4634
080C9F30 (T) str r0,[r6] ;5 4639
080C9F32 (T) mov r0,#0x0 ;2 4641
080C9F34 (T) mov r1,#0x0 ;2 4643
080C9F36 (T) strh r1,[r5,#0x2A] ;7 4650
080C9F38 (T) mov r1,r5 ;2 4652
080C9F3A (T) add r1,#0x43 ;2 4654
080C9F3C (T) strb r0,[r1] ;7 4661
080C9F3E (T) b #0x80CA498 ;8 4669
080C9F40 (T) cmp r0,#0x6 ;2 4671
080C9F42 (T) bne #0x80C9F72 ;8 4679
080C9F44 (T) ldr r0,[r6] ;4 4683
080C9F46 (T) add r0,#0x2 ;2 4685
080C9F48 (T) str r0,[r6] ;5 4690
080C9F4A (T) add r7,#0x2 ;2 4692
080C9F4C (T) mov r2,#0x0 ;2 4694
080C9F4E (T) str r2,[r5,#0x1C] ;10 4704
080C9F50 (T) ldrb r1,[r7] ;4 4708
080C9F52 (T) ldrb r0,[r7,#0x1] ;4 4712
080C9F54 (T) lsl r0,r0,#0x8 ;2 4714
080C9F56 (T) orr r1,r0 ;2 4716
080C9F58 (T) ldrb r0,[r7,#0x2] ;4 4720
080C9F5A (T) lsl r0,r0,#0x10 ;2 4722
080C9F5C (T) orr r1,r0 ;2 4724
080C9F5E (T) ldrb r0,[r7,#0x3] ;4 4728
080C9F60 (T) lsl r0,r0,#0x18 ;2 4730
080C9F62 (T) orr r1,r0 ;2 4732
080C9F64 (T) ldr r0,[r6] ;4 4736
080C9F66 (T) add r0,r0,r1 ;2 4738
080C9F68 (T) str r0,[r6] ;5 4743
080C9F6A (T) mov r0,r5 ;2 4745
080C9F6C (T) add r0,#0x43 ;2 4747
080C9F6E (T) strb r2,[r0] ;13 4760
080C9F70 (T) b #0x80CA498 ;8 4768
080C9F72 (T) lsl r0,r1,#0x18 ;2 4770
080C9F74 (T) lsr r0,r0,#0x18 ;2 4772
080C9F76 (T) cmp r0,#0x14 ;2 4774
080C9F78 (T) bne #0x80C9FBC ;8 4782
080C9F7A (T) ldr r0,[r6] ;4 4786
080C9F7C (T) add r0,#0x2 ;2 4788
080C9F7E (T) str r0,[r6] ;5 4793
080C9F80 (T) mov r4,#0x0 ;2 4795
080C9F82 (T) str r4,[r5,#0x1C] ;10 4805
080C9F84 (T) add r7,#0x2 ;2 4807
080C9F86 (T) ldrb r0,[r7] ;4 4811
080C9F88 (T) ldrb r1,[r7,#0x1] ;4 4815
080C9F8A (T) lsl r1,r1,#0x8 ;2 4817
080C9F8C (T) orr r0,r1 ;2 4819
080C9F8E (T) lsl r0,r0,#0x10 ;2 4821
080C9F90 (T) asr r0,r0,#0x10 ;2 4823
080C9F92 (T) str r3,[sp] ;5 4828
080C9F94 (T) bl #0x80AE01C ;10 4838
080C9F98 (T) ldr r0,=#0x300521C ;9 4847
080C9F9A (T) mov r2,#0x1 ;2 4849
080C9F9C (T) strb r2,[r0] ;13 4862
080C9F9E (T) ldr r1,=#0x3004EF8 ;9 4871
080C9FA0 (T) add r0,r7,2 ;2 4873
080C9FA2 (T) str r0,[r1] ;10 4883
080C9FA4 (T) ldr r0,=#0x3004ED4 ;9 4892
080C9FA6 (T) strb r2,[r0] ;13 4905
080C9FA8 (T) ldr r3,[sp] ;4 4909
080C9FAA (T) strb r4,[r3] ;5 4914
080C9FAC (T) b #0x80C9C3C ;8 4922
080C9FAE (T) lsl r0,r0,#0x0 ;2 4924
080C9FB0 (T) strh r4,[r3,r0] ;13 4937
080C9FB2 (T) lsl r0,r0,#0xC ;2 4939
080C9FB4 (T) ldr r6,=#0xF0231C39 ;9 4948
080C9FB6 (T) lsl r0,r0,#0xC ;2 4950
080C9FB8 (T) ldr r6,=#0x85A83002 ;9 4959
080C9FBA (T) lsl r0,r0,#0xC ;2 4961
080C9FBC (T) cmp r0,#0x8 ;2 4963
080C9FBE (T) bne #0x80C9FE2 ;8 4971
080C9FC0 (T) ldr r0,[r6] ;4 4975
080C9FC2 (T) add r0,#0x2 ;2 4977
080C9FC4 (T) str r0,[r6] ;5 4982
080C9FC6 (T) mov r4,#0x0 ;2 4984
080C9FC8 (T) str r4,[r5,#0x1C] ;10 4994
080C9FCA (T) add r7,#0x2 ;2 4996
080C9FCC (T) mov r0,r7 ;2 4998
080C9FCE (T) mov r1,#0x1 ;2 5000
080C9FD0 (T) bl #0x802623C ;10 5010
080C9FD4 (T) ldr r0,[r6] ;4 5014
080C9FD6 (T) add r0,#0x2 ;2 5016
080C9FD8 (T) str r0,[r6] ;5 5021
080C9FDA (T) mov r0,r5 ;2 5023
080C9FDC (T) add r0,#0x43 ;2 5025
080C9FDE (T) strb r4,[r0] ;13 5038
080C9FE0 (T) b #0x80CA498 ;8 5046
080C9FE2 (T) cmp r0,#0x9 ;2 5048
080C9FE4 (T) bne #0x80CA008 ;8 5056
080C9FE6 (T) ldr r0,[r6] ;4 5060
080C9FE8 (T) add r0,#0x2 ;2 5062
080C9FEA (T) str r0,[r6] ;5 5067
080C9FEC (T) mov r4,#0x0 ;2 5069
080C9FEE (T) str r4,[r5,#0x1C] ;10 5079
080C9FF0 (T) add r7,#0x2 ;2 5081
080C9FF2 (T) mov r0,r7 ;2 5083
080C9FF4 (T) mov r1,#0x0 ;2 5085
080C9FF6 (T) bl #0x802623C ;10 5095
080C9FFA (T) ldr r0,[r6] ;4 5099
080C9FFC (T) add r0,#0x2 ;2 5101
080C9FFE (T) str r0,[r6] ;5 5106
080CA000 (T) mov r0,r5 ;2 5108
080CA002 (T) add r0,#0x43 ;2 5110
080CA004 (T) strb r4,[r0] ;13 5123
080CA006 (T) b #0x80CA498 ;8 5131
080CA008 (T) cmp r0,#0x18 ;2 5133
080CA00A (T) bne #0x80CA022 ;8 5141
080CA00C (T) ldr r0,[r6] ;4 5145
080CA00E (T) add r0,#0x2 ;2 5147
080CA010 (T) str r0,[r6] ;5 5152
080CA012 (T) add r7,#0x2 ;2 5154
080CA014 (T) ldrh r0,[r7] ;4 5158
080CA016 (T) strh r0,[r5,#0x2E] ;7 5165
080CA018 (T) ldrh r0,[r7] ;4 5169
080CA01A (T) strh r0,[r5,#0x30] ;7 5176
080CA01C (T) ldr r0,[r6] ;4 5180
080CA01E (T) add r0,#0x2 ;2 5182
080CA020 (T) b #0x80CA496 ;8 5190
080CA022 (T) cmp r0,#0x19 ;2 5192
080CA024 (T) bne #0x80CA04C ;8 5200
080CA026 (T) ldr r0,[r6] ;4 5204
080CA028 (T) add r0,#0x2 ;2 5206
080CA02A (T) str r0,[r6] ;5 5211
080CA02C (T) ldr r1,=#0x3001D40 ;9 5220
080CA02E (T) ldr r0,=#0x69C ;9 5229
080CA030 (T) add r1,r1,r0 ;2 5231
080CA032 (T) ldrh r0,[r7,#0x2] ;4 5235
080CA034 (T) ldrh r1,[r1] ;6 5241
080CA036 (T) add r0,r0,r1 ;2 5243
080CA038 (T) strh r0,[r5,#0x2E] ;7 5250
080CA03A (T) strh r0,[r5,#0x30] ;7 5257
080CA03C (T) ldr r0,[r6] ;4 5261
080CA03E (T) add r0,#0x2 ;2 5263
080CA040 (T) b #0x80CA496 ;8 5271
080CA042 (T) lsl r0,r0,#0x0 ;2 5273
080CA044 (T) add r0,r0,5 ;2 5275
080CA046 (T) lsl r0,r0,#0xC ;2 5277
080CA048 (T) lsl r4,r3,#0x1A ;2 5279
080CA04A (T) lsl r0,r0,#0x0 ;2 5281
080CA04C (T) cmp r0,#0x1B ;2 5283
080CA04E (T) bne #0x80CA060 ;8 5291
080CA050 (T) ldr r0,[r6] ;4 5295
080CA052 (T) add r0,#0x2 ;2 5297
080CA054 (T) str r0,[r6] ;5 5302
080CA056 (T) ldrh r0,[r7,#0x2] ;4 5306
080CA058 (T) strh r0,[r5,#0x30] ;7 5313
080CA05A (T) ldr r0,[r6] ;4 5317
080CA05C (T) add r0,#0x2 ;2 5319
080CA05E (T) b #0x80CA496 ;8 5327
080CA060 (T) cmp r0,#0x1A ;2 5329
080CA062 (T) bne #0x80CA074 ;8 5337
080CA064 (T) ldr r0,[r6] ;4 5341
080CA066 (T) add r0,#0x2 ;2 5343
080CA068 (T) str r0,[r6] ;5 5348
080CA06A (T) mov r0,#0x0 ;2 5350
080CA06C (T) str r0,[r5,#0x1C] ;10 5360
080CA06E (T) mov r0,#0x21 ;2 5362
080CA070 (T) strb r0,[r3] ;5 5367
080CA072 (T) b #0x80CA498 ;8 5375
080CA074 (T) cmp r0,#0x1E ;2 5377
080CA076 (T) bne #0x80CA09C ;8 5385
080CA078 (T) ldr r0,[r6] ;4 5389
080CA07A (T) add r0,#0x2 ;2 5391
080CA07C (T) str r0,[r6] ;5 5396
080CA07E (T) ldrb r0,[r7,#0x2] ;4 5400
080CA080 (T) ldrb r1,[r7,#0x3] ;4 5404
080CA082 (T) lsl r1,r1,#0x8 ;2 5406
080CA084 (T) orr r0,r1 ;2 5408
080CA086 (T) sub r0,#0x1 ;2 5410
080CA088 (T) lsl r0,r0,#0x10 ;2 5412
080CA08A (T) asr r0,r0,#0x10 ;2 5414
080CA08C (T) bl #0x80C97B0 ;10 5424
080CA090 (T) ldr r0,[r6] ;4 5428
080CA092 (T) add r0,#0x2 ;2 5430
080CA094 (T) str r0,[r6] ;5 5435
080CA096 (T) mov r0,#0x0 ;2 5437
080CA098 (T) str r0,[r5,#0x1C] ;10 5447
080CA09A (T) b #0x80CA49A ;8 5455
080CA09C (T) cmp r0,#0x1F ;2 5457
080CA09E (T) bne #0x80CA0B0 ;8 5465
080CA0A0 (T) ldr r0,[r6] ;4 5469
080CA0A2 (T) add r0,#0x2 ;2 5471
080CA0A4 (T) str r0,[r6] ;5 5476
080CA0A6 (T) mov r0,#0x0 ;2 5478
080CA0A8 (T) str r0,[r5,#0x1C] ;10 5488
080CA0AA (T) mov r0,#0x10 ;2 5490
080CA0AC (T) strb r0,[r3] ;5 5495
080CA0AE (T) b #0x80CA498 ;8 5503
080CA0B0 (T) cmp r0,#0x20 ;2 5505
080CA0B2 (T) bne #0x80CA0C4 ;8 5513
080CA0B4 (T) ldr r0,[r6] ;4 5517
080CA0B6 (T) add r0,#0x2 ;2 5519
080CA0B8 (T) str r0,[r6] ;5 5524
080CA0BA (T) mov r0,#0x0 ;2 5526
080CA0BC (T) str r0,[r5,#0x1C] ;10 5536
080CA0BE (T) mov r0,#0x12 ;2 5538
080CA0C0 (T) strb r0,[r3] ;5 5543
080CA0C2 (T) b #0x80CA498 ;8 5551
080CA0C4 (T) lsl r0,r1,#0x18 ;2 5553
080CA0C6 (T) lsr r0,r0,#0x18 ;2 5555
080CA0C8 (T) cmp r0,#0x21 ;2 5557
080CA0CA (T) bne #0x80CA0DC ;8 5565
080CA0CC (T) ldr r0,[r6] ;4 5569
080CA0CE (T) add r0,#0x2 ;2 5571
080CA0D0 (T) str r0,[r6] ;5 5576
080CA0D2 (T) mov r0,#0x0 ;2 5578
080CA0D4 (T) str r0,[r5,#0x1C] ;10 5588
080CA0D6 (T) mov r0,#0x11 ;2 5590
080CA0D8 (T) strb r0,[r3] ;5 5595
080CA0DA (T) b #0x80CA498 ;8 5603
080CA0DC (T) cmp r0,#0x23 ;2 5605
080CA0DE (T) bne #0x80CA0F0 ;8 5613
080CA0E0 (T) ldr r0,[r6] ;4 5617
080CA0E2 (T) add r0,#0x2 ;2 5619
080CA0E4 (T) str r0,[r6] ;5 5624
080CA0E6 (T) mov r0,#0x0 ;2 5626
080CA0E8 (T) str r0,[r5,#0x1C] ;10 5636
080CA0EA (T) mov r0,#0x13 ;2 5638
080CA0EC (T) strb r0,[r3] ;5 5643
080CA0EE (T) b #0x80CA498 ;8 5651
080CA0F0 (T) cmp r0,#0x24 ;2 5653
080CA0F2 (T) bne #0x80CA104 ;8 5661
080CA0F4 (T) ldr r0,[r6] ;4 5665
080CA0F6 (T) add r0,#0x2 ;2 5667
080CA0F8 (T) str r0,[r6] ;5 5672
080CA0FA (T) mov r0,#0x0 ;2 5674
080CA0FC (T) str r0,[r5,#0x1C] ;10 5684
080CA0FE (T) mov r0,#0x15 ;2 5686
080CA100 (T) strb r0,[r3] ;5 5691
080CA102 (T) b #0x80CA498 ;8 5699
080CA104 (T) cmp r0,#0x28 ;2 5701
080CA106 (T) bne #0x80CA118 ;8 5709
080CA108 (T) ldr r0,[r6] ;4 5713
080CA10A (T) add r0,#0x2 ;2 5715
080CA10C (T) str r0,[r6] ;5 5720
080CA10E (T) mov r0,#0x0 ;2 5722
080CA110 (T) str r0,[r5,#0x1C] ;10 5732
080CA112 (T) mov r0,#0x19 ;2 5734
080CA114 (T) strb r0,[r3] ;5 5739
080CA116 (T) b #0x80CA498 ;8 5747
080CA118 (T) cmp r0,#0x25 ;2 5749
080CA11A (T) bne #0x80CA12C ;8 5757
080CA11C (T) ldr r0,[r6] ;4 5761
080CA11E (T) add r0,#0x2 ;2 5763
080CA120 (T) str r0,[r6] ;5 5768
080CA122 (T) mov r0,#0x0 ;2 5770
080CA124 (T) str r0,[r5,#0x1C] ;10 5780
080CA126 (T) mov r0,#0x16 ;2 5782
080CA128 (T) strb r0,[r3] ;5 5787
080CA12A (T) b #0x80CA498 ;8 5795
080CA12C (T) cmp r0,#0x29 ;2 5797
080CA12E (T) bne #0x80CA140 ;8 5805
080CA130 (T) ldr r0,[r6] ;4 5809
080CA132 (T) add r0,#0x2 ;2 5811
080CA134 (T) str r0,[r6] ;5 5816
080CA136 (T) mov r0,#0x0 ;2 5818
080CA138 (T) str r0,[r5,#0x1C] ;10 5828
080CA13A (T) mov r0,#0x1A ;2 5830
080CA13C (T) strb r0,[r3] ;5 5835
080CA13E (T) b #0x80CA498 ;8 5843
080CA140 (T) cmp r0,#0x26 ;2 5845
080CA142 (T) bne #0x80CA154 ;8 5853
080CA144 (T) ldr r0,[r6] ;4 5857
080CA146 (T) add r0,#0x2 ;2 5859
080CA148 (T) str r0,[r6] ;5 5864
080CA14A (T) mov r0,#0x0 ;2 5866
080CA14C (T) str r0,[r5,#0x1C] ;10 5876
080CA14E (T) mov r0,#0x17 ;2 5878
080CA150 (T) strb r0,[r3] ;5 5883
080CA152 (T) b #0x80CA498 ;8 5891
080CA154 (T) cmp r0,#0x2A ;2 5893
080CA156 (T) bne #0x80CA168 ;8 5901
080CA158 (T) ldr r0,[r6] ;4 5905
080CA15A (T) add r0,#0x2 ;2 5907
080CA15C (T) str r0,[r6] ;5 5912
080CA15E (T) mov r0,#0x0 ;2 5914
080CA160 (T) str r0,[r5,#0x1C] ;10 5924
080CA162 (T) mov r0,#0x1B ;2 5926
080CA164 (T) strb r0,[r3] ;5 5931
080CA166 (T) b #0x80CA498 ;8 5939
080CA168 (T) cmp r0,#0x27 ;2 5941
080CA16A (T) bne #0x80CA17C ;8 5949
080CA16C (T) ldr r0,[r6] ;4 5953
080CA16E (T) add r0,#0x2 ;2 5955
080CA170 (T) str r0,[r6] ;5 5960
080CA172 (T) mov r0,#0x0 ;2 5962
080CA174 (T) str r0,[r5,#0x1C] ;10 5972
080CA176 (T) mov r0,#0x18 ;2 5974
080CA178 (T) strb r0,[r3] ;5 5979
080CA17A (T) b #0x80CA498 ;8 5987
080CA17C (T) cmp r0,#0x2B ;2 5989
080CA17E (T) bne #0x80CA190 ;8 5997
080CA180 (T) ldr r0,[r6] ;4 6001
080CA182 (T) add r0,#0x2 ;2 6003
080CA184 (T) str r0,[r6] ;5 6008
080CA186 (T) mov r0,#0x0 ;2 6010
080CA188 (T) str r0,[r5,#0x1C] ;10 6020
080CA18A (T) mov r0,#0x1C ;2 6022
080CA18C (T) strb r0,[r3] ;5 6027
080CA18E (T) b #0x80CA498 ;8 6035
080CA190 (T) lsl r0,r1,#0x18 ;2 6037
080CA192 (T) lsr r0,r0,#0x18 ;2 6039
080CA194 (T) cmp r0,#0x2C ;2 6041
080CA196 (T) bne #0x80CA1A8 ;8 6049
080CA198 (T) ldr r0,[r6] ;4 6053
080CA19A (T) add r0,#0x2 ;2 6055
080CA19C (T) str r0,[r6] ;5 6060
080CA19E (T) mov r0,#0x0 ;2 6062
080CA1A0 (T) str r0,[r5,#0x1C] ;10 6072
080CA1A2 (T) mov r0,#0x1D ;2 6074
080CA1A4 (T) strb r0,[r3] ;5 6079
080CA1A6 (T) b #0x80CA498 ;8 6087
080CA1A8 (T) cmp r0,#0x1C ;2 6089
080CA1AA (T) bne #0x80CA1F0 ;8 6097
080CA1AC (T) ldr r0,[r6] ;4 6101
080CA1AE (T) add r0,#0x2 ;2 6103
080CA1B0 (T) str r0,[r6] ;5 6108
080CA1B2 (T) add r7,#0x2 ;2 6110
080CA1B4 (T) mov r4,#0x0 ;2 6112
080CA1B6 (T) str r4,[r5,#0x1C] ;10 6122
080CA1B8 (T) mov r0,r7 ;2 6124
080CA1BA (T) bl #0x80262DC ;10 6134
080CA1BE (T) cmp r0,#0x0 ;2 6136
080CA1C0 (T) beq #0x80CA1EA ;8 6144
080CA1C2 (T) ldr r2,[r6] ;4 6148
080CA1C4 (T) add r2,#0x2 ;2 6150
080CA1C6 (T) str r2,[r6] ;5 6155
080CA1C8 (T) add r7,#0x2 ;2 6157
080CA1CA (T) ldrb r1,[r7] ;4 6161
080CA1CC (T) ldrb r0,[r7,#0x1] ;4 6165
080CA1CE (T) lsl r0,r0,#0x8 ;2 6167
080CA1D0 (T) orr r1,r0 ;2 6169
080CA1D2 (T) ldrb r0,[r7,#0x2] ;4 6173
080CA1D4 (T) lsl r0,r0,#0x10 ;2 6175
080CA1D6 (T) orr r1,r0 ;2 6177
080CA1D8 (T) ldrb r0,[r7,#0x3] ;4 6181
080CA1DA (T) lsl r0,r0,#0x18 ;2 6183
080CA1DC (T) orr r1,r0 ;2 6185
080CA1DE (T) add r2,r2,r1 ;2 6187
080CA1E0 (T) str r2,[r6] ;5 6192
080CA1E2 (T) mov r0,r5 ;2 6194
080CA1E4 (T) add r0,#0x43 ;2 6196
080CA1E6 (T) strb r4,[r0] ;13 6209
080CA1E8 (T) b #0x80CA498 ;8 6217
080CA1EA (T) ldr r0,[r6] ;4 6221
080CA1EC (T) add r0,#0x6 ;2 6223
080CA1EE (T) b #0x80CA496 ;8 6231
080CA1F0 (T) cmp r0,#0x3 ;2 6233
080CA1F2 (T) bne #0x80CA2BC ;8 6241
080CA1F4 (T) ldr r0,[r6] ;4 6245
080CA1F6 (T) add r4,r7,2 ;2 6247
080CA1F8 (T) add r0,#0x4 ;2 6249
080CA1FA (T) str r0,[r6] ;5 6254
080CA1FC (T) ldrh r0,[r5,#0x2C] ;6 6260
080CA1FE (T) add r0,#0x2 ;2 6262
080CA200 (T) mov r1,#0x0 ;2 6264
080CA202 (T) mov r6,#0x0 ;2 6266
080CA204 (T) strh r0,[r5,#0x2C] ;7 6273
080CA206 (T) strh r6,[r5,#0x2A] ;7 6280
080CA208 (T) mov r0,r5 ;2 6282
080CA20A (T) add r0,#0x43 ;2 6284
080CA20C (T) strb r1,[r0] ;13 6297
080CA20E (T) mov r0,#0x4 ;2 6299
080CA210 (T) strb r0,[r3] ;5 6304
080CA212 (T) ldr r0,=#0x8B19A64 ;9 6313
080CA214 (T) ldr r1,=#0x8B198B4 ;9 6322
080CA216 (T) mov r3,#0x0 ;2 6324
080CA218 (T) ldsh r2,[r4,r3] ;4 6328
080CA21A (T) bl #0x80BE260 ;10 6338
080CA21E (T) str r0,[r5,#0xC] ;10 6348
080CA220 (T) strh r6,[r5,#0x32] ;7 6355
080CA222 (T) ldr r3,=#0x8B1F280 ;9 6364
080CA224 (T) mov r1,#0x0 ;2 6366
080CA226 (T) ldsh r0,[r4,r1] ;6 6372
080CA228 (T) lsl r0,r0,#0x2 ;2 6374
080CA22A (T) add r0,r0,r3 ;2 6376
080CA22C (T) ldrh r2,[r0] ;12 6388
080CA22E (T) mov r1,r5 ;2 6390
080CA230 (T) add r1,#0x40 ;2 6392
080CA232 (T) strh r2,[r1] ;7 6399
080CA234 (T) ldrh r0,[r0] ;12 6411
080CA236 (T) strh r0,[r5,#0x34] ;7 6418
080CA238 (T) ldrh r0,[r5,#0x2C] ;6 6424
080CA23A (T) strh r0,[r5,#0x36] ;7 6431
080CA23C (T) mov r2,#0x0 ;2 6433
080CA23E (T) ldsh r0,[r4,r2] ;4 6437
080CA240 (T) lsl r0,r0,#0x2 ;2 6439
080CA242 (T) add r0,r0,r3 ;2 6441
080CA244 (T) ldrh r0,[r0,#0x2] ;12 6453
080CA246 (T) mov r2,r5 ;2 6455
080CA248 (T) add r2,#0x42 ;2 6457
080CA24A (T) strb r0,[r2] ;5 6462
080CA24C (T) mov r0,#0x1 ;2 6464
080CA24E (T) strh r0,[r5,#0x3E] ;7 6471
080CA250 (T) mov r3,#0x2C ;2 6473
080CA252 (T) ldsh r1,[r5,r3] ;6 6479
080CA254 (T) mov r4,#0x28 ;2 6481
080CA256 (T) ldsh r0,[r5,r4] ;6 6487
080CA258 (T) cmp r1,r0 ;2 6489
080CA25A (T) bge #0x80CA26A ;8 6497
080CA25C (T) mov r1,#0x24 ;2 6499
080CA25E (T) ldsh r0,[r5,r1] ;4 6503
080CA260 (T) mov r2,#0x2C ;2 6505
080CA262 (T) ldsh r1,[r5,r2] ;6 6511
080CA264 (T) add r0,r0,r1 ;2 6513
080CA266 (T) cmp r0,#0x1F ;2 6515
080CA268 (T) ble #0x80CA278 ;8 6523
080CA26A (T) mov r0,r5 ;2 6525
080CA26C (T) bl #0x80CA4BC ;10 6535
080CA270 (T) ldrh r0,[r5,#0x2C] ;6 6541
080CA272 (T) sub r0,#0x2 ;2 6543
080CA274 (T) strh r0,[r5,#0x2C] ;7 6550
080CA276 (T) strh r6,[r5,#0x2A] ;7 6557
080CA278 (T) ldr r3,=#0x3005220 ;9 6566
080CA27A (T) ldr r1,[r3] ;4 6570
080CA27C (T) ldr r4,=#0x4BA ;9 6579
080CA27E (T) add r0,r1,r4 ;2 6581
080CA280 (T) mov r2,#0x0 ;2 6583
080CA282 (T) strh r2,[r0] ;13 6596
080CA284 (T) add r4,#0x2 ;2 6598
080CA286 (T) add r0,r1,r4 ;2 6600
080CA288 (T) strh r2,[r0] ;13 6613
080CA28A (T) mov r2,#0x97 ;2 6615
080CA28C (T) lsl r2,r2,#0x3 ;2 6617
080CA28E (T) add r1,r1,r2 ;2 6619
080CA290 (T) ldrb r0,[r1] ;6 6625
080CA292 (T) add r0,#0x1 ;2 6627
080CA294 (T) strb r0,[r1] ;7 6634
080CA296 (T) ldr r0,[r3] ;4 6638
080CA298 (T) add r1,r0,r2 ;2 6640
080CA29A (T) ldrb r0,[r1] ;6 6646
080CA29C (T) cmp r0,#0x2 ;2 6648
080CA29E (T) bhi #0x80CA2A2 ;8 6656
080CA2A0 (T) b #0x80CA498 ;8 6664
080CA2A2 (T) mov r0,#0x0 ;2 6666
080CA2A4 (T) strb r0,[r1] ;7 6673
080CA2A6 (T) b #0x80CA498 ;8 6681
080CA2A8 (T) ldr r2,[sp,#0x190] ;4 6685
080CA2AA (T) lsr r1,r6,#0x2 ;2 6687
080CA2AC (T) ldr r0,[sp,#0x2D0] ;4 6691
080CA2AE (T) lsr r1,r6,#0x2 ;2 6693
080CA2B0 (T) ???? ;10 6703
080CA2B2 (T) lsr r1,r6,#0x2 ;2 6705
080CA2B4 (T) strh r0,[r4,r0] ;13 6718
080CA2B6 (T) lsl r0,r0,#0xC ;2 6720
080CA2B8 (T) lsl r2,r7,#0x12 ;2 6722
080CA2BA (T) lsl r0,r0,#0x0 ;2 6724
080CA2BC (T) ldr r0,[r6] ;4 6728
080CA2BE (T) add r0,#0x2 ;2 6730
080CA2C0 (T) b #0x80CA496 ;8 6738
// Else,
// If [0x30051F0 == 1],
080CA2C2 (T) ldr r4,=#0x30051F0 ;9 6747
080CA2C4 (T) ldrb r0,[r4] ;4 6751
080CA2C6 (T) cmp r0,#0x1 ;2 6753
080CA2C8 (T) bne #0x80CA2DA ;8 6761
// then:
080CA2CA (T) mov r0,#0x2E ;2 6763
080CA2CC (T) ldsh r2,[r5,r0] ;6 6769
080CA2CE (T) mov r0,r5 ;2 6771
080CA2D0 (T) mov r1,#0x0 ;2 6773
080CA2D2 (T) bl #0x80BE490 ;10 6783
080CA2D6 (T) mov r0,#0x0 ;2 6785
080CA2D8 (T) strb r0,[r4] ;5 6790
// If window flag 0x20 is set,
080CA2DA (T) ldr r0,[r5] ;9 6799
080CA2DC (T) mov r1,#0x20 ;2 6801
080CA2DE (T) and r0,r1 ;2 6803
080CA2E0 (T) cmp r0,#0x0 ;2 6805
080CA2E2 (T) beq #0x80CA2EA ;8 6813
// then:
080CA2E4 (T) mov r0,r5 ;2 6815
080CA2E6 (T) bl #0x80C87D0 ;10 6825
// copy [window+0x2E] to [window+0x30]
080CA2EA (T) ldrh r0,[r5,#0x2E] ;6 6831
080CA2EC (T) mov r4,#0x0 ;2 6833
080CA2EE (T) strh r0,[r5,#0x30] ;7 6840
// If (text_x >= window_width) OR ((text_x < window_width) AND (text_x + window_x >= 0x1F)),
080CA2F0 (T) mov r2,#0x2A ;2 6842
080CA2F2 (T) ldsh r1,[r5,r2] // r1 = window_x
080CA2F4 (T) mov r3,#0x26 ;2 6850
080CA2F6 (T) ldsh r0,[r5,r3] // r0 = window_width
080CA2F8 (T) cmp r1,r0 ;2 6858
080CA2FA (T) bge #0x80CA30A ;8 6866
080CA2FC (T) mov r1,#0x22 ;2 6868
080CA2FE (T) ldsh r0,[r5,r1] ;4 6872
080CA300 (T) mov r2,#0x2A ;2 6874
080CA302 (T) ldsh r1,[r5,r2] ;6 6880
080CA304 (T) add r0,r0,r1 ;2 6882
080CA306 (T) cmp r0,#0x1F ;2 6884
080CA308 (T) ble #0x80CA388 ;8 6892
// then: increment text_y
080CA30A (T) ldrh r0,[r5,#0x2C] ;6 6898
080CA30C (T) add r0,#0x2 ;2 6900
080CA30E (T) strh r0,[r5,#0x2C] ;7 6907
// text_x = 0
080CA310 (T) strh r4,[r5,#0x2A] ;7 6914
// If (text_y >= window_height) OR ((text_y < window_height) AND (text_y + window_y) >= 0x1F),
080CA312 (T) lsl r0,r0,#0x10 ;2 6916
080CA314 (T) asr r0,r0,#0x10 ;2 6918
080CA316 (T) mov r3,#0x28 ;2 6920
080CA318 (T) ldsh r1,[r5,r3] // r1 = window_height
080CA31A (T) cmp r0,r1 ;2 6928
080CA31C (T) bge #0x80CA32C ;8 6936
080CA31E (T) mov r1,#0x24 ;2 6938
080CA320 (T) ldsh r0,[r5,r1] ;4 6942
080CA322 (T) mov r2,#0x2C ;2 6944
080CA324 (T) ldsh r1,[r5,r2] ;6 6950
080CA326 (T) add r0,r0,r1 ;2 6952
080CA328 (T) cmp r0,#0x1F ;2 6954
080CA32A (T) ble #0x80CA33A ;8 6962
// then: call 80CA4BC with r0 = window ptr
080CA32C (T) mov r0,r5 ;2 6964
080CA32E (T) bl #0x80CA4BC ;10 6974
// text_y -= 2
080CA332 (T) ldrh r0,[r5,#0x2C] ;6 6980
080CA334 (T) sub r0,#0x2 ;2 6982
080CA336 (T) strh r0,[r5,#0x2C] ;7 6989
// text_x = 0
080CA338 (T) strh r4,[r5,#0x2A] ;7 6996
// compute tilemap pointer
080CA33A (T) ldr r2,=#0x3005270 ;9 7005
080CA33C (T) mov r3,#0x24 ;2 7007
080CA33E (T) ldsh r0,[r5,r3] // r0 = window_y
080CA340 (T) mov r4,#0x2C ;2 7015
080CA342 (T) ldsh r1,[r5,r4] // r1 = text_y
080CA344 (T) add r0,r0,r1 ;2 7023
080CA346 (T) lsl r0,r0,#0x6 // r0 = (window_y + text_y) * 64
080CA348 (T) ldr r2,[r2] // r2 = tilemap pointer
080CA34A (T) add r2,r2,r0 // r2 = tilemap + (window_y + text_y) * 64
080CA34C (T) mov r1,#0x22 ;2 7033
080CA34E (T) ldsh r0,[r5,r1] // r0 = window_x
080CA350 (T) mov r3,#0x2A ;2 7039
080CA352 (T) ldsh r1,[r5,r3] // r1 = text_x
080CA354 (T) add r0,r0,r1 ;2 7047
080CA356 (T) lsl r0,r0,#0x1 // r0 = (window_x + text_x) * 2
080CA358 (T) add r2,r2,r0 // r2 = tilemap + (window_y + text_y) * 64 + (window_x + text_x) * 2
080CA35A (T) mov r8,r2 ;2 7053
// ?
080CA35C (T) ldr r3,=#0x3005220 ;9 7062
080CA35E (T) ldr r1,[r3] ;4 7066
080CA360 (T) ldr r4,=#0x4BA ;9 7075
080CA362 (T) add r0,r1,r4 ;2 7077
080CA364 (T) mov r2,#0x0 ;2 7079
080CA366 (T) strh r2,[r0] ;13 7092
080CA368 (T) add r4,#0x2 ;2 7094
080CA36A (T) add r0,r1,r4 ;2 7096
080CA36C (T) strh r2,[r0] ;13 7109
080CA36E (T) mov r2,#0x97 ;2 7111
080CA370 (T) lsl r2,r2,#0x3 ;2 7113
080CA372 (T) add r1,r1,r2 ;2 7115
080CA374 (T) ldrb r0,[r1] ;6 7121
080CA376 (T) add r0,#0x1 ;2 7123
080CA378 (T) strb r0,[r1] ;7 7130
080CA37A (T) ldr r0,[r3] ;4 7134
080CA37C (T) add r1,r0,r2 ;2 7136
080CA37E (T) ldrb r0,[r1] ;6 7142
080CA380 (T) cmp r0,#0x2 ;2 7144
080CA382 (T) bls #0x80CA388 ;8 7152
080CA384 (T) mov r0,#0x0 ;2 7154
080CA386 (T) strb r0,[r1] ;7 7161
// ?
080CA388 (T) ldr r0,=#0x3005220 ;9 7170
080CA38A (T) ldr r0,[r0] ;12 7182
080CA38C (T) ldr r1,=#0x4B9 ;9 7191
080CA38E (T) add r0,r0,r1 ;2 7193
080CA390 (T) ldrb r0,[r0] ;12 7205
080CA392 (T) cmp r0,#0x0 ;2 7207
080CA394 (T) beq #0x80CA408 ;8 7215
080CA396 (T) mov r0,r5 ;2 7217
080CA398 (T) mov r1,r7 ;2 7219
080CA39A (T) bl #0x80ED770 ;10 7229
080CA39E (T) lsl r0,r0,#0x10 ;2 7231
080CA3A0 (T) cmp r0,#0x0 ;2 7233
080CA3A2 (T) beq #0x80CA46C ;8 7241
080CA3A4 (T) ldr r0,=#0x8B1B4B0 ;9 7250
080CA3A6 (T) ldrb r1,[r7] ;4 7254
080CA3A8 (T) lsl r1,r1,#0x1 ;2 7256
080CA3AA (T) add r1,r1,r0 ;2 7258
080CA3AC (T) ldr r0,=#0x30051EC ;9 7267
080CA3AE (T) ldrh r0,[r0] ;12 7279
080CA3B0 (T) ldrh r1,[r1] ;6 7285
080CA3B2 (T) add r0,r0,r1 ;2 7287
080CA3B4 (T) lsl r0,r0,#0x10 ;2 7289
080CA3B6 (T) lsr r4,r0,#0x10 ;2 7291
080CA3B8 (T) ldr r2,=#0x3005270 ;9 7300
080CA3BA (T) mov r3,#0x24 ;2 7302
080CA3BC (T) ldsh r0,[r5,r3] ;6 7308
080CA3BE (T) mov r3,#0x2C ;2 7310
080CA3C0 (T) ldsh r1,[r5,r3] ;6 7316
080CA3C2 (T) add r0,r0,r1 ;2 7318
080CA3C4 (T) lsl r0,r0,#0x6 ;2 7320
080CA3C6 (T) ldr r2,[r2] ;4 7324
080CA3C8 (T) add r2,r2,r0 ;2 7326
080CA3CA (T) mov r1,#0x22 ;2 7328
080CA3CC (T) ldsh r0,[r5,r1] ;4 7332
080CA3CE (T) mov r3,#0x2A ;2 7334
080CA3D0 (T) ldsh r1,[r5,r3] ;6 7340
080CA3D2 (T) add r0,r0,r1 ;2 7342
080CA3D4 (T) lsl r0,r0,#0x1 ;2 7344
080CA3D6 (T) add r2,r2,r0 ;2 7346
080CA3D8 (T) mov r8,r2 ;2 7348
080CA3DA (T) ldr r3,=#0x3005228 ;9 7357
080CA3DC (T) ldrh r1,[r3] ;4 7361
080CA3DE (T) mov r0,r4 ;2 7363
080CA3E0 (T) orr r0,r1 ;2 7365
080CA3E2 (T) strh r0,[r2] ;5 7370
080CA3E4 (T) b #0x80CA460 ;8 7378
080CA3E6 (T) lsl r0,r0,#0x0 ;2 7380
080CA3E8 (T) str r0,[r6,r7] ;6 7386
080CA3EA (T) lsl r0,r0,#0xC ;2 7388
080CA3EC (T) strh r0,[r6,r1] ;5 7393
080CA3EE (T) lsl r0,r0,#0xC ;2 7395
080CA3F0 (T) strh r0,[r4,r0] ;13 7408
080CA3F2 (T) lsl r0,r0,#0xC ;2 7410
080CA3F4 (T) lsl r2,r7,#0x12 ;2 7412
080CA3F6 (T) lsl r0,r0,#0x0 ;2 7414
080CA3F8 (T) lsl r1,r7,#0x12 ;2 7416
080CA3FA (T) lsl r0,r0,#0x0 ;2 7418
080CA3FC (T) push {r4,r5,r7} ;31 7449
080CA3FE (T) lsr r1,r6,#0x2 ;2 7451
080CA400 (T) str r4,[r5,r7] ;6 7457
080CA402 (T) lsl r0,r0,#0xC ;2 7459
080CA404 (T) strh r0,[r5,r0] ;7 7466
080CA406 (T) lsl r0,r0,#0xC ;2 7468
080CA408 (T) ldr r0,=#0x3005344 ;9 7477
080CA40A (T) mov r4,#0x0 ;2 7479
080CA40C (T) ldsh r0,[r0,r4] ;12 7491
080CA40E (T) cmp r0,#0x0 ;2 7493
080CA410 (T) beq #0x80CA440 ;8 7501
// If (text_x == 0) AND (c == 0xFD) AND ([0x3005218] & 0x10 != 0),
080CA412 (T) mov r1,#0x2A ;2 7503
080CA414 (T) ldsh r0,[r5,r1] ;4 7507
080CA416 (T) cmp r0,#0x0 ;2 7509
080CA418 (T) bne #0x80CA440 ;8 7517
080CA41A (T) ldrb r0,[r7] ;4 7521
080CA41C (T) cmp r0,#0xFD ;2 7523
080CA41E (T) bne #0x80CA440 ;8 7531
080CA420 (T) ldr r0,=#0x3005218 ;9 7540
080CA422 (T) ldrb r1,[r0] ;12 7552
080CA424 (T) mov r0,#0x10 ;2 7554
080CA426 (T) and r0,r1 ;2 7556
080CA428 (T) cmp r0,#0x0 ;2 7558
080CA42A (T) beq #0x80CA440 ;8 7566
// then: r0 = 0x8B1B54A
080CA42C (T) ldr r0,=#0x8B1B4B0 ;9 7575
080CA42E (T) add r0,#0x9A ;2 7577
080CA430 (T) b #0x80CA448 ;8 7585
080CA432 (T) lsl r0,r0,#0x0 ;2 7587
080CA434 (T) strh r4,[r0,r5] ;7 7594
080CA436 (T) lsl r0,r0,#0xC ;2 7596
080CA438 (T) strh r0,[r3,r0] ;13 7609
080CA43A (T) lsl r0,r0,#0xC ;2 7611
080CA43C (T) push {r4,r5,r7} ;31 7642
080CA43E (T) lsr r1,r6,#0x2 ;2 7644
// else: r0 = 0x8B1B4B0 + (c * 2)
080CA440 (T) ldr r1,=#0x8B1B4B0 ;9 7653
080CA442 (T) ldrb r0,[r7] ;4 7657
080CA444 (T) lsl r0,r0,#0x1 ;2 7659
080CA446 (T) add r0,r0,r1 ;2 7661
// r0 = tile offset + c
080CA448 (T) ldrh r4,[r0] ;12 7673
080CA44A (T) ldr r0,=#0x30051EC ;9 7682
080CA44C (T) ldrh r0,[r0] ;12 7694
080CA44E (T) add r0,r4,r0 ;2 7696
080CA450 (T) lsl r0,r0,#0x10 ;2 7698
080CA452 (T) lsr r4,r0,#0x10 ;2 7700
// r1 = palette << 0xC
080CA454 (T) ldr r3,=#0x3005228 ;9 7709
080CA456 (T) ldrh r1,[r3] ;4 7713
// [r2] = (palette << 0xC) | (tile_offset + c)
080CA458 (T) mov r0,r4 ;2 7715
080CA45A (T) orr r0,r1 ;2 7717
080CA45C (T) mov r2,r8 ;2 7719
080CA45E (T) strh r0,[r2] ;5 7724
// [r2+0x40] = (palette << 0xC) | (tile_offset + c + 0x20)
080CA460 (T) add r2,#0x40 ;2 7726
080CA462 (T) mov r0,r4 ;2 7728
080CA464 (T) add r0,#0x20 ;2 7730
080CA466 (T) ldrh r1,[r3] ;4 7734
080CA468 (T) orr r0,r1 ;2 7736
080CA46A (T) strh r0,[r2] ;5 7741
// If (c != 0x4D) && ([window+0x2E] != 0) && ([0x3005218] & 0x1 != 0),
080CA46C (T) ldrb r0,[r7] ;4 7745
080CA46E (T) cmp r0,#0x4D ;2 7747
080CA470 (T) beq #0x80CA48C ;8 7755
080CA472 (T) mov r3,#0x2E ;2 7757
080CA474 (T) ldsh r0,[r5,r3] ;6 7763
080CA476 (T) cmp r0,#0x0 ;2 7765
080CA478 (T) beq #0x80CA48C ;8 7773
080CA47A (T) ldr r0,=#0x3005218 ;9 7782
080CA47C (T) ldrb r1,[r0] ;12 7794
080CA47E (T) mov r0,#0x1 ;2 7796
080CA480 (T) and r0,r1 ;2 7798
080CA482 (T) cmp r0,#0x0 ;2 7800
080CA484 (T) beq #0x80CA48C ;8 7808
// then: call 8001720 with r0 = 0x133
080CA486 (T) ldr r0,=#0x133 ;9 7817
080CA488 (T) bl #0x8001720 ;10 7827
// text_x++
080CA48C (T) ldrh r0,[r5,#0x2A] ;6 7833
080CA48E (T) add r0,#0x1 ;2 7835
080CA490 (T) strh r0,[r5,#0x2A] ;7 7842
// text_offset++
080CA492 (T) ldr r0,[r6] ;4 7846
080CA494 (T) add r0,#0x1 ;2 7848
080CA496 (T) str r0,[r6] ;5 7853
// return 0
080CA498 (T) mov r0,#0x0 ;2 7855
080CA49A (T) add sp,#0x4 ;2 7857
080CA49C (T) pop {r3} ;4 7861
080CA49E (T) mov r8,r3 ;2 7863
080CA4A0 (T) pop {r4-r7} ;7 7870
080CA4A2 (T) pop {r1} ;4 7874
080CA4A4 (T) bx r1 ;8 7882