prime/asm/musyx/runtime/synthdata.s

2242 lines
104 KiB
ArmAsm

.include "macros.inc"
.section .bss
.balign 8
.global dataKeymapTab
dataKeymapTab:
.skip 0x800
.global dataLayerTab
dataLayerTab:
.skip 0xC00
.global dataCurveTab
dataCurveTab:
.skip 0x4000
.global dataSmpSDirs
dataSmpSDirs:
.skip 0x600
.global dataFXGroups
dataFXGroups:
.skip 0x400
.global dataMacMaintab
dataMacMaintab:
.skip 0x800
.global dataMacSubTabmem
dataMacSubTabmem:
.skip 0x4000
.global "key$731"
"key$731":
.skip 0x20
.global "key$493"
"key$493":
.skip 0xC
.global "key$487"
"key$487":
.skip 0xC
.section .sbss
.balign 8
"result$494":
.skip 0x4
"result$768":
.skip 0x4
"key$767":
.skip 0x8
"result$760":
.skip 0x4
"key$759":
.skip 0x8
"sheader$733":
.skip 0x4
"result$732":
.skip 0x4
"result$714":
.skip 0x4
"key$713":
.skip 0x8
"main$712":
.skip 0x4
"base$711":
.skip 0x4
dataFXGroupNum:
.skip 0x2
dataMacTotal:
.skip 0x2
dataLayerNum:
.skip 0x2
dataKeymapNum:
.skip 0x2
dataCurveNum:
.skip 0x2
dataSmpSDirNum:
.skip 0x6
.section .text, "ax"
.global dataInsertKeymap
dataInsertKeymap:
/* 803A0C34 0039DB94 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 803A0C38 0039DB98 7C 08 02 A6 */ mflr r0
/* 803A0C3C 0039DB9C 90 01 00 14 */ stw r0, 0x14(r1)
/* 803A0C40 0039DBA0 93 E1 00 0C */ stw r31, 0xc(r1)
/* 803A0C44 0039DBA4 7C 9F 23 78 */ mr r31, r4
/* 803A0C48 0039DBA8 93 C1 00 08 */ stw r30, 8(r1)
/* 803A0C4C 0039DBAC 7C 7E 1B 78 */ mr r30, r3
/* 803A0C50 0039DBB0 48 01 44 6D */ bl hwDisableIrq
/* 803A0C54 0039DBB4 3C 60 80 55 */ lis r3, dataKeymapTab@ha
/* 803A0C58 0039DBB8 A0 CD AE D6 */ lhz r6, dataKeymapNum@sda21(r13)
/* 803A0C5C 0039DBBC 38 83 2C F8 */ addi r4, r3, dataKeymapTab@l
/* 803A0C60 0039DBC0 57 C0 04 3E */ clrlwi r0, r30, 0x10
/* 803A0C64 0039DBC4 38 E0 00 00 */ li r7, 0
/* 803A0C68 0039DBC8 48 00 00 0C */ b lbl_803A0C74
lbl_803A0C6C:
/* 803A0C6C 0039DBCC 38 84 00 08 */ addi r4, r4, 8
/* 803A0C70 0039DBD0 38 E7 00 01 */ addi r7, r7, 1
lbl_803A0C74:
/* 803A0C74 0039DBD4 7C 07 30 00 */ cmpw r7, r6
/* 803A0C78 0039DBD8 40 80 00 10 */ bge lbl_803A0C88
/* 803A0C7C 0039DBDC A0 64 00 04 */ lhz r3, 4(r4)
/* 803A0C80 0039DBE0 7C 03 00 40 */ cmplw r3, r0
/* 803A0C84 0039DBE4 41 80 FF E8 */ blt lbl_803A0C6C
lbl_803A0C88:
/* 803A0C88 0039DBE8 7C 07 30 00 */ cmpw r7, r6
/* 803A0C8C 0039DBEC 40 80 01 34 */ bge lbl_803A0DC0
/* 803A0C90 0039DBF0 3C 60 80 55 */ lis r3, dataKeymapTab@ha
/* 803A0C94 0039DBF4 54 E0 18 38 */ slwi r0, r7, 3
/* 803A0C98 0039DBF8 38 A3 2C F8 */ addi r5, r3, dataKeymapTab@l
/* 803A0C9C 0039DBFC 57 C3 04 3E */ clrlwi r3, r30, 0x10
/* 803A0CA0 0039DC00 7C 85 02 14 */ add r4, r5, r0
/* 803A0CA4 0039DC04 A0 04 00 04 */ lhz r0, 4(r4)
/* 803A0CA8 0039DC08 7C 03 00 40 */ cmplw r3, r0
/* 803A0CAC 0039DC0C 41 82 00 FC */ beq lbl_803A0DA8
/* 803A0CB0 0039DC10 28 06 01 00 */ cmplwi r6, 0x100
/* 803A0CB4 0039DC14 40 80 00 E8 */ bge lbl_803A0D9C
/* 803A0CB8 0039DC18 38 66 FF FF */ addi r3, r6, -1
/* 803A0CBC 0039DC1C 7C 03 38 00 */ cmpw r3, r7
/* 803A0CC0 0039DC20 54 60 18 38 */ slwi r0, r3, 3
/* 803A0CC4 0039DC24 38 63 00 01 */ addi r3, r3, 1
/* 803A0CC8 0039DC28 7C A5 02 14 */ add r5, r5, r0
/* 803A0CCC 0039DC2C 7C 67 18 50 */ subf r3, r7, r3
/* 803A0CD0 0039DC30 41 80 00 BC */ blt lbl_803A0D8C
/* 803A0CD4 0039DC34 54 60 E8 FF */ rlwinm. r0, r3, 0x1d, 3, 0x1f
/* 803A0CD8 0039DC38 7C 09 03 A6 */ mtctr r0
/* 803A0CDC 0039DC3C 41 82 00 94 */ beq lbl_803A0D70
lbl_803A0CE0:
/* 803A0CE0 0039DC40 80 85 00 00 */ lwz r4, 0(r5)
/* 803A0CE4 0039DC44 80 05 00 04 */ lwz r0, 4(r5)
/* 803A0CE8 0039DC48 90 85 00 08 */ stw r4, 8(r5)
/* 803A0CEC 0039DC4C 90 05 00 0C */ stw r0, 0xc(r5)
/* 803A0CF0 0039DC50 80 85 FF F8 */ lwz r4, -8(r5)
/* 803A0CF4 0039DC54 80 05 FF FC */ lwz r0, -4(r5)
/* 803A0CF8 0039DC58 90 85 00 00 */ stw r4, 0(r5)
/* 803A0CFC 0039DC5C 90 05 00 04 */ stw r0, 4(r5)
/* 803A0D00 0039DC60 80 85 FF F0 */ lwz r4, -0x10(r5)
/* 803A0D04 0039DC64 80 05 FF F4 */ lwz r0, -0xc(r5)
/* 803A0D08 0039DC68 90 85 FF F8 */ stw r4, -8(r5)
/* 803A0D0C 0039DC6C 90 05 FF FC */ stw r0, -4(r5)
/* 803A0D10 0039DC70 80 85 FF E8 */ lwz r4, -0x18(r5)
/* 803A0D14 0039DC74 80 05 FF EC */ lwz r0, -0x14(r5)
/* 803A0D18 0039DC78 90 85 FF F0 */ stw r4, -0x10(r5)
/* 803A0D1C 0039DC7C 90 05 FF F4 */ stw r0, -0xc(r5)
/* 803A0D20 0039DC80 80 85 FF E0 */ lwz r4, -0x20(r5)
/* 803A0D24 0039DC84 80 05 FF E4 */ lwz r0, -0x1c(r5)
/* 803A0D28 0039DC88 90 85 FF E8 */ stw r4, -0x18(r5)
/* 803A0D2C 0039DC8C 90 05 FF EC */ stw r0, -0x14(r5)
/* 803A0D30 0039DC90 80 85 FF D8 */ lwz r4, -0x28(r5)
/* 803A0D34 0039DC94 80 05 FF DC */ lwz r0, -0x24(r5)
/* 803A0D38 0039DC98 90 85 FF E0 */ stw r4, -0x20(r5)
/* 803A0D3C 0039DC9C 90 05 FF E4 */ stw r0, -0x1c(r5)
/* 803A0D40 0039DCA0 80 85 FF D0 */ lwz r4, -0x30(r5)
/* 803A0D44 0039DCA4 80 05 FF D4 */ lwz r0, -0x2c(r5)
/* 803A0D48 0039DCA8 90 85 FF D8 */ stw r4, -0x28(r5)
/* 803A0D4C 0039DCAC 90 05 FF DC */ stw r0, -0x24(r5)
/* 803A0D50 0039DCB0 80 85 FF C8 */ lwz r4, -0x38(r5)
/* 803A0D54 0039DCB4 80 05 FF CC */ lwz r0, -0x34(r5)
/* 803A0D58 0039DCB8 90 85 FF D0 */ stw r4, -0x30(r5)
/* 803A0D5C 0039DCBC 90 05 FF D4 */ stw r0, -0x2c(r5)
/* 803A0D60 0039DCC0 38 A5 FF C0 */ addi r5, r5, -64
/* 803A0D64 0039DCC4 42 00 FF 7C */ bdnz lbl_803A0CE0
/* 803A0D68 0039DCC8 70 63 00 07 */ andi. r3, r3, 7
/* 803A0D6C 0039DCCC 41 82 00 20 */ beq lbl_803A0D8C
lbl_803A0D70:
/* 803A0D70 0039DCD0 7C 69 03 A6 */ mtctr r3
lbl_803A0D74:
/* 803A0D74 0039DCD4 80 85 00 00 */ lwz r4, 0(r5)
/* 803A0D78 0039DCD8 80 05 00 04 */ lwz r0, 4(r5)
/* 803A0D7C 0039DCDC 90 85 00 08 */ stw r4, 8(r5)
/* 803A0D80 0039DCE0 90 05 00 0C */ stw r0, 0xc(r5)
/* 803A0D84 0039DCE4 38 A5 FF F8 */ addi r5, r5, -8
/* 803A0D88 0039DCE8 42 00 FF EC */ bdnz lbl_803A0D74
lbl_803A0D8C:
/* 803A0D8C 0039DCEC A0 6D AE D6 */ lhz r3, dataKeymapNum@sda21(r13)
/* 803A0D90 0039DCF0 38 03 00 01 */ addi r0, r3, 1
/* 803A0D94 0039DCF4 B0 0D AE D6 */ sth r0, dataKeymapNum@sda21(r13)
/* 803A0D98 0039DCF8 48 00 00 4C */ b lbl_803A0DE4
lbl_803A0D9C:
/* 803A0D9C 0039DCFC 48 01 42 E9 */ bl hwEnableIrq
/* 803A0DA0 0039DD00 38 60 00 00 */ li r3, 0
/* 803A0DA4 0039DD04 48 00 00 68 */ b lbl_803A0E0C
lbl_803A0DA8:
/* 803A0DA8 0039DD08 A0 64 00 06 */ lhz r3, 6(r4)
/* 803A0DAC 0039DD0C 38 03 00 01 */ addi r0, r3, 1
/* 803A0DB0 0039DD10 B0 04 00 06 */ sth r0, 6(r4)
/* 803A0DB4 0039DD14 48 01 42 D1 */ bl hwEnableIrq
/* 803A0DB8 0039DD18 38 60 00 00 */ li r3, 0
/* 803A0DBC 0039DD1C 48 00 00 50 */ b lbl_803A0E0C
lbl_803A0DC0:
/* 803A0DC0 0039DD20 28 06 01 00 */ cmplwi r6, 0x100
/* 803A0DC4 0039DD24 40 80 00 14 */ bge lbl_803A0DD8
/* 803A0DC8 0039DD28 A0 6D AE D6 */ lhz r3, dataKeymapNum@sda21(r13)
/* 803A0DCC 0039DD2C 38 03 00 01 */ addi r0, r3, 1
/* 803A0DD0 0039DD30 B0 0D AE D6 */ sth r0, dataKeymapNum@sda21(r13)
/* 803A0DD4 0039DD34 48 00 00 10 */ b lbl_803A0DE4
lbl_803A0DD8:
/* 803A0DD8 0039DD38 48 01 42 AD */ bl hwEnableIrq
/* 803A0DDC 0039DD3C 38 60 00 00 */ li r3, 0
/* 803A0DE0 0039DD40 48 00 00 2C */ b lbl_803A0E0C
lbl_803A0DE4:
/* 803A0DE4 0039DD44 3C 60 80 55 */ lis r3, dataKeymapTab@ha
/* 803A0DE8 0039DD48 54 E5 18 38 */ slwi r5, r7, 3
/* 803A0DEC 0039DD4C 38 83 2C F8 */ addi r4, r3, dataKeymapTab@l
/* 803A0DF0 0039DD50 38 00 00 01 */ li r0, 1
/* 803A0DF4 0039DD54 7C 64 2A 14 */ add r3, r4, r5
/* 803A0DF8 0039DD58 B3 C3 00 04 */ sth r30, 4(r3)
/* 803A0DFC 0039DD5C 7F E4 29 2E */ stwx r31, r4, r5
/* 803A0E00 0039DD60 B0 03 00 06 */ sth r0, 6(r3)
/* 803A0E04 0039DD64 48 01 42 81 */ bl hwEnableIrq
/* 803A0E08 0039DD68 38 60 00 01 */ li r3, 1
lbl_803A0E0C:
/* 803A0E0C 0039DD6C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 803A0E10 0039DD70 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 803A0E14 0039DD74 83 C1 00 08 */ lwz r30, 8(r1)
/* 803A0E18 0039DD78 7C 08 03 A6 */ mtlr r0
/* 803A0E1C 0039DD7C 38 21 00 10 */ addi r1, r1, 0x10
/* 803A0E20 0039DD80 4E 80 00 20 */ blr
.global dataRemoveKeymap
dataRemoveKeymap:
/* 803A0E24 0039DD84 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 803A0E28 0039DD88 7C 08 02 A6 */ mflr r0
/* 803A0E2C 0039DD8C 90 01 00 14 */ stw r0, 0x14(r1)
/* 803A0E30 0039DD90 93 E1 00 0C */ stw r31, 0xc(r1)
/* 803A0E34 0039DD94 7C 7F 1B 78 */ mr r31, r3
/* 803A0E38 0039DD98 48 01 42 85 */ bl hwDisableIrq
/* 803A0E3C 0039DD9C 3C 60 80 55 */ lis r3, dataKeymapTab@ha
/* 803A0E40 0039DDA0 A0 CD AE D6 */ lhz r6, dataKeymapNum@sda21(r13)
/* 803A0E44 0039DDA4 38 83 2C F8 */ addi r4, r3, dataKeymapTab@l
/* 803A0E48 0039DDA8 38 E0 00 00 */ li r7, 0
/* 803A0E4C 0039DDAC 57 E3 04 3E */ clrlwi r3, r31, 0x10
/* 803A0E50 0039DDB0 48 00 00 0C */ b lbl_803A0E5C
lbl_803A0E54:
/* 803A0E54 0039DDB4 38 84 00 08 */ addi r4, r4, 8
/* 803A0E58 0039DDB8 38 E7 00 01 */ addi r7, r7, 1
lbl_803A0E5C:
/* 803A0E5C 0039DDBC 7C 07 30 00 */ cmpw r7, r6
/* 803A0E60 0039DDC0 40 80 00 10 */ bge lbl_803A0E70
/* 803A0E64 0039DDC4 A0 04 00 04 */ lhz r0, 4(r4)
/* 803A0E68 0039DDC8 7C 03 00 40 */ cmplw r3, r0
/* 803A0E6C 0039DDCC 40 82 FF E8 */ bne lbl_803A0E54
lbl_803A0E70:
/* 803A0E70 0039DDD0 7C 07 30 00 */ cmpw r7, r6
/* 803A0E74 0039DDD4 41 82 01 10 */ beq lbl_803A0F84
/* 803A0E78 0039DDD8 3C 60 80 55 */ lis r3, dataKeymapTab@ha
/* 803A0E7C 0039DDDC 54 E0 18 38 */ slwi r0, r7, 3
/* 803A0E80 0039DDE0 38 A3 2C F8 */ addi r5, r3, dataKeymapTab@l
/* 803A0E84 0039DDE4 7C 85 02 14 */ add r4, r5, r0
/* 803A0E88 0039DDE8 A0 64 00 06 */ lhz r3, 6(r4)
/* 803A0E8C 0039DDEC 38 63 FF FF */ addi r3, r3, -1
/* 803A0E90 0039DDF0 54 60 04 3F */ clrlwi. r0, r3, 0x10
/* 803A0E94 0039DDF4 B0 64 00 06 */ sth r3, 6(r4)
/* 803A0E98 0039DDF8 40 82 00 EC */ bne lbl_803A0F84
/* 803A0E9C 0039DDFC 38 67 00 01 */ addi r3, r7, 1
/* 803A0EA0 0039DE00 7C 03 30 00 */ cmpw r3, r6
/* 803A0EA4 0039DE04 54 60 18 38 */ slwi r0, r3, 3
/* 803A0EA8 0039DE08 7C 63 30 50 */ subf r3, r3, r6
/* 803A0EAC 0039DE0C 7C A5 02 14 */ add r5, r5, r0
/* 803A0EB0 0039DE10 40 80 00 BC */ bge lbl_803A0F6C
/* 803A0EB4 0039DE14 54 60 E8 FF */ rlwinm. r0, r3, 0x1d, 3, 0x1f
/* 803A0EB8 0039DE18 7C 09 03 A6 */ mtctr r0
/* 803A0EBC 0039DE1C 41 82 00 94 */ beq lbl_803A0F50
lbl_803A0EC0:
/* 803A0EC0 0039DE20 80 85 00 00 */ lwz r4, 0(r5)
/* 803A0EC4 0039DE24 80 05 00 04 */ lwz r0, 4(r5)
/* 803A0EC8 0039DE28 90 85 FF F8 */ stw r4, -8(r5)
/* 803A0ECC 0039DE2C 90 05 FF FC */ stw r0, -4(r5)
/* 803A0ED0 0039DE30 80 85 00 08 */ lwz r4, 8(r5)
/* 803A0ED4 0039DE34 80 05 00 0C */ lwz r0, 0xc(r5)
/* 803A0ED8 0039DE38 90 85 00 00 */ stw r4, 0(r5)
/* 803A0EDC 0039DE3C 90 05 00 04 */ stw r0, 4(r5)
/* 803A0EE0 0039DE40 80 85 00 10 */ lwz r4, 0x10(r5)
/* 803A0EE4 0039DE44 80 05 00 14 */ lwz r0, 0x14(r5)
/* 803A0EE8 0039DE48 90 85 00 08 */ stw r4, 8(r5)
/* 803A0EEC 0039DE4C 90 05 00 0C */ stw r0, 0xc(r5)
/* 803A0EF0 0039DE50 80 85 00 18 */ lwz r4, 0x18(r5)
/* 803A0EF4 0039DE54 80 05 00 1C */ lwz r0, 0x1c(r5)
/* 803A0EF8 0039DE58 90 85 00 10 */ stw r4, 0x10(r5)
/* 803A0EFC 0039DE5C 90 05 00 14 */ stw r0, 0x14(r5)
/* 803A0F00 0039DE60 80 85 00 20 */ lwz r4, 0x20(r5)
/* 803A0F04 0039DE64 80 05 00 24 */ lwz r0, 0x24(r5)
/* 803A0F08 0039DE68 90 85 00 18 */ stw r4, 0x18(r5)
/* 803A0F0C 0039DE6C 90 05 00 1C */ stw r0, 0x1c(r5)
/* 803A0F10 0039DE70 80 85 00 28 */ lwz r4, 0x28(r5)
/* 803A0F14 0039DE74 80 05 00 2C */ lwz r0, 0x2c(r5)
/* 803A0F18 0039DE78 90 85 00 20 */ stw r4, 0x20(r5)
/* 803A0F1C 0039DE7C 90 05 00 24 */ stw r0, 0x24(r5)
/* 803A0F20 0039DE80 80 85 00 30 */ lwz r4, 0x30(r5)
/* 803A0F24 0039DE84 80 05 00 34 */ lwz r0, 0x34(r5)
/* 803A0F28 0039DE88 90 85 00 28 */ stw r4, 0x28(r5)
/* 803A0F2C 0039DE8C 90 05 00 2C */ stw r0, 0x2c(r5)
/* 803A0F30 0039DE90 80 85 00 38 */ lwz r4, 0x38(r5)
/* 803A0F34 0039DE94 80 05 00 3C */ lwz r0, 0x3c(r5)
/* 803A0F38 0039DE98 90 85 00 30 */ stw r4, 0x30(r5)
/* 803A0F3C 0039DE9C 90 05 00 34 */ stw r0, 0x34(r5)
/* 803A0F40 0039DEA0 38 A5 00 40 */ addi r5, r5, 0x40
/* 803A0F44 0039DEA4 42 00 FF 7C */ bdnz lbl_803A0EC0
/* 803A0F48 0039DEA8 70 63 00 07 */ andi. r3, r3, 7
/* 803A0F4C 0039DEAC 41 82 00 20 */ beq lbl_803A0F6C
lbl_803A0F50:
/* 803A0F50 0039DEB0 7C 69 03 A6 */ mtctr r3
lbl_803A0F54:
/* 803A0F54 0039DEB4 80 85 00 00 */ lwz r4, 0(r5)
/* 803A0F58 0039DEB8 80 05 00 04 */ lwz r0, 4(r5)
/* 803A0F5C 0039DEBC 90 85 FF F8 */ stw r4, -8(r5)
/* 803A0F60 0039DEC0 90 05 FF FC */ stw r0, -4(r5)
/* 803A0F64 0039DEC4 38 A5 00 08 */ addi r5, r5, 8
/* 803A0F68 0039DEC8 42 00 FF EC */ bdnz lbl_803A0F54
lbl_803A0F6C:
/* 803A0F6C 0039DECC A0 6D AE D6 */ lhz r3, dataKeymapNum@sda21(r13)
/* 803A0F70 0039DED0 38 03 FF FF */ addi r0, r3, -1
/* 803A0F74 0039DED4 B0 0D AE D6 */ sth r0, dataKeymapNum@sda21(r13)
/* 803A0F78 0039DED8 48 01 41 0D */ bl hwEnableIrq
/* 803A0F7C 0039DEDC 38 60 00 01 */ li r3, 1
/* 803A0F80 0039DEE0 48 00 00 0C */ b lbl_803A0F8C
lbl_803A0F84:
/* 803A0F84 0039DEE4 48 01 41 01 */ bl hwEnableIrq
/* 803A0F88 0039DEE8 38 60 00 00 */ li r3, 0
lbl_803A0F8C:
/* 803A0F8C 0039DEEC 80 01 00 14 */ lwz r0, 0x14(r1)
/* 803A0F90 0039DEF0 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 803A0F94 0039DEF4 7C 08 03 A6 */ mtlr r0
/* 803A0F98 0039DEF8 38 21 00 10 */ addi r1, r1, 0x10
/* 803A0F9C 0039DEFC 4E 80 00 20 */ blr
.global dataInsertLayer
dataInsertLayer:
/* 803A0FA0 0039DF00 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 803A0FA4 0039DF04 7C 08 02 A6 */ mflr r0
/* 803A0FA8 0039DF08 90 01 00 24 */ stw r0, 0x24(r1)
/* 803A0FAC 0039DF0C 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 803A0FB0 0039DF10 7C BF 2B 78 */ mr r31, r5
/* 803A0FB4 0039DF14 93 C1 00 18 */ stw r30, 0x18(r1)
/* 803A0FB8 0039DF18 7C 9E 23 78 */ mr r30, r4
/* 803A0FBC 0039DF1C 93 A1 00 14 */ stw r29, 0x14(r1)
/* 803A0FC0 0039DF20 7C 7D 1B 78 */ mr r29, r3
/* 803A0FC4 0039DF24 48 01 40 F9 */ bl hwDisableIrq
/* 803A0FC8 0039DF28 3C 60 80 55 */ lis r3, dataLayerTab@ha
/* 803A0FCC 0039DF2C A0 ED AE D4 */ lhz r7, dataLayerNum@sda21(r13)
/* 803A0FD0 0039DF30 38 83 34 F8 */ addi r4, r3, dataLayerTab@l
/* 803A0FD4 0039DF34 57 A0 04 3E */ clrlwi r0, r29, 0x10
/* 803A0FD8 0039DF38 39 00 00 00 */ li r8, 0
/* 803A0FDC 0039DF3C 48 00 00 0C */ b lbl_803A0FE8
lbl_803A0FE0:
/* 803A0FE0 0039DF40 38 84 00 0C */ addi r4, r4, 0xc
/* 803A0FE4 0039DF44 39 08 00 01 */ addi r8, r8, 1
lbl_803A0FE8:
/* 803A0FE8 0039DF48 7C 08 38 00 */ cmpw r8, r7
/* 803A0FEC 0039DF4C 40 80 00 10 */ bge lbl_803A0FFC
/* 803A0FF0 0039DF50 A0 64 00 04 */ lhz r3, 4(r4)
/* 803A0FF4 0039DF54 7C 03 00 40 */ cmplw r3, r0
/* 803A0FF8 0039DF58 41 80 FF E8 */ blt lbl_803A0FE0
lbl_803A0FFC:
/* 803A0FFC 0039DF5C 7C 08 38 00 */ cmpw r8, r7
/* 803A1000 0039DF60 40 80 01 7C */ bge lbl_803A117C
/* 803A1004 0039DF64 1C 08 00 0C */ mulli r0, r8, 0xc
/* 803A1008 0039DF68 3C 60 80 55 */ lis r3, dataLayerTab@ha
/* 803A100C 0039DF6C 57 A6 04 3E */ clrlwi r6, r29, 0x10
/* 803A1010 0039DF70 38 A3 34 F8 */ addi r5, r3, dataLayerTab@l
/* 803A1014 0039DF74 7C 85 02 14 */ add r4, r5, r0
/* 803A1018 0039DF78 A0 04 00 04 */ lhz r0, 4(r4)
/* 803A101C 0039DF7C 7C 06 00 40 */ cmplw r6, r0
/* 803A1020 0039DF80 41 82 01 44 */ beq lbl_803A1164
/* 803A1024 0039DF84 28 07 01 00 */ cmplwi r7, 0x100
/* 803A1028 0039DF88 40 80 01 30 */ bge lbl_803A1158
/* 803A102C 0039DF8C 38 67 FF FF */ addi r3, r7, -1
/* 803A1030 0039DF90 1C 03 00 0C */ mulli r0, r3, 0xc
/* 803A1034 0039DF94 7C 03 40 00 */ cmpw r3, r8
/* 803A1038 0039DF98 38 63 00 01 */ addi r3, r3, 1
/* 803A103C 0039DF9C 7C A5 02 14 */ add r5, r5, r0
/* 803A1040 0039DFA0 7C 68 18 50 */ subf r3, r8, r3
/* 803A1044 0039DFA4 41 80 01 04 */ blt lbl_803A1148
/* 803A1048 0039DFA8 54 60 E8 FF */ rlwinm. r0, r3, 0x1d, 3, 0x1f
/* 803A104C 0039DFAC 7C 09 03 A6 */ mtctr r0
/* 803A1050 0039DFB0 41 82 00 D4 */ beq lbl_803A1124
lbl_803A1054:
/* 803A1054 0039DFB4 80 85 00 00 */ lwz r4, 0(r5)
/* 803A1058 0039DFB8 80 05 00 04 */ lwz r0, 4(r5)
/* 803A105C 0039DFBC 90 85 00 0C */ stw r4, 0xc(r5)
/* 803A1060 0039DFC0 90 05 00 10 */ stw r0, 0x10(r5)
/* 803A1064 0039DFC4 80 05 00 08 */ lwz r0, 8(r5)
/* 803A1068 0039DFC8 90 05 00 14 */ stw r0, 0x14(r5)
/* 803A106C 0039DFCC 80 85 FF F4 */ lwz r4, -0xc(r5)
/* 803A1070 0039DFD0 80 05 FF F8 */ lwz r0, -8(r5)
/* 803A1074 0039DFD4 90 85 00 00 */ stw r4, 0(r5)
/* 803A1078 0039DFD8 90 05 00 04 */ stw r0, 4(r5)
/* 803A107C 0039DFDC 80 05 FF FC */ lwz r0, -4(r5)
/* 803A1080 0039DFE0 90 05 00 08 */ stw r0, 8(r5)
/* 803A1084 0039DFE4 80 85 FF E8 */ lwz r4, -0x18(r5)
/* 803A1088 0039DFE8 80 05 FF EC */ lwz r0, -0x14(r5)
/* 803A108C 0039DFEC 90 85 FF F4 */ stw r4, -0xc(r5)
/* 803A1090 0039DFF0 90 05 FF F8 */ stw r0, -8(r5)
/* 803A1094 0039DFF4 80 05 FF F0 */ lwz r0, -0x10(r5)
/* 803A1098 0039DFF8 90 05 FF FC */ stw r0, -4(r5)
/* 803A109C 0039DFFC 80 85 FF DC */ lwz r4, -0x24(r5)
/* 803A10A0 0039E000 80 05 FF E0 */ lwz r0, -0x20(r5)
/* 803A10A4 0039E004 90 85 FF E8 */ stw r4, -0x18(r5)
/* 803A10A8 0039E008 90 05 FF EC */ stw r0, -0x14(r5)
/* 803A10AC 0039E00C 80 05 FF E4 */ lwz r0, -0x1c(r5)
/* 803A10B0 0039E010 90 05 FF F0 */ stw r0, -0x10(r5)
/* 803A10B4 0039E014 80 85 FF D0 */ lwz r4, -0x30(r5)
/* 803A10B8 0039E018 80 05 FF D4 */ lwz r0, -0x2c(r5)
/* 803A10BC 0039E01C 90 85 FF DC */ stw r4, -0x24(r5)
/* 803A10C0 0039E020 90 05 FF E0 */ stw r0, -0x20(r5)
/* 803A10C4 0039E024 80 05 FF D8 */ lwz r0, -0x28(r5)
/* 803A10C8 0039E028 90 05 FF E4 */ stw r0, -0x1c(r5)
/* 803A10CC 0039E02C 80 85 FF C4 */ lwz r4, -0x3c(r5)
/* 803A10D0 0039E030 80 05 FF C8 */ lwz r0, -0x38(r5)
/* 803A10D4 0039E034 90 85 FF D0 */ stw r4, -0x30(r5)
/* 803A10D8 0039E038 90 05 FF D4 */ stw r0, -0x2c(r5)
/* 803A10DC 0039E03C 80 05 FF CC */ lwz r0, -0x34(r5)
/* 803A10E0 0039E040 90 05 FF D8 */ stw r0, -0x28(r5)
/* 803A10E4 0039E044 80 85 FF B8 */ lwz r4, -0x48(r5)
/* 803A10E8 0039E048 80 05 FF BC */ lwz r0, -0x44(r5)
/* 803A10EC 0039E04C 90 85 FF C4 */ stw r4, -0x3c(r5)
/* 803A10F0 0039E050 90 05 FF C8 */ stw r0, -0x38(r5)
/* 803A10F4 0039E054 80 05 FF C0 */ lwz r0, -0x40(r5)
/* 803A10F8 0039E058 90 05 FF CC */ stw r0, -0x34(r5)
/* 803A10FC 0039E05C 80 85 FF AC */ lwz r4, -0x54(r5)
/* 803A1100 0039E060 80 05 FF B0 */ lwz r0, -0x50(r5)
/* 803A1104 0039E064 90 85 FF B8 */ stw r4, -0x48(r5)
/* 803A1108 0039E068 90 05 FF BC */ stw r0, -0x44(r5)
/* 803A110C 0039E06C 80 05 FF B4 */ lwz r0, -0x4c(r5)
/* 803A1110 0039E070 90 05 FF C0 */ stw r0, -0x40(r5)
/* 803A1114 0039E074 38 A5 FF A0 */ addi r5, r5, -96
/* 803A1118 0039E078 42 00 FF 3C */ bdnz lbl_803A1054
/* 803A111C 0039E07C 70 63 00 07 */ andi. r3, r3, 7
/* 803A1120 0039E080 41 82 00 28 */ beq lbl_803A1148
lbl_803A1124:
/* 803A1124 0039E084 7C 69 03 A6 */ mtctr r3
lbl_803A1128:
/* 803A1128 0039E088 80 85 00 00 */ lwz r4, 0(r5)
/* 803A112C 0039E08C 80 05 00 04 */ lwz r0, 4(r5)
/* 803A1130 0039E090 90 85 00 0C */ stw r4, 0xc(r5)
/* 803A1134 0039E094 90 05 00 10 */ stw r0, 0x10(r5)
/* 803A1138 0039E098 80 05 00 08 */ lwz r0, 8(r5)
/* 803A113C 0039E09C 90 05 00 14 */ stw r0, 0x14(r5)
/* 803A1140 0039E0A0 38 A5 FF F4 */ addi r5, r5, -12
/* 803A1144 0039E0A4 42 00 FF E4 */ bdnz lbl_803A1128
lbl_803A1148:
/* 803A1148 0039E0A8 A0 6D AE D4 */ lhz r3, dataLayerNum@sda21(r13)
/* 803A114C 0039E0AC 38 03 00 01 */ addi r0, r3, 1
/* 803A1150 0039E0B0 B0 0D AE D4 */ sth r0, dataLayerNum@sda21(r13)
/* 803A1154 0039E0B4 48 00 00 4C */ b lbl_803A11A0
lbl_803A1158:
/* 803A1158 0039E0B8 48 01 3F 2D */ bl hwEnableIrq
/* 803A115C 0039E0BC 38 60 00 00 */ li r3, 0
/* 803A1160 0039E0C0 48 00 00 6C */ b lbl_803A11CC
lbl_803A1164:
/* 803A1164 0039E0C4 A0 64 00 08 */ lhz r3, 8(r4)
/* 803A1168 0039E0C8 38 03 00 01 */ addi r0, r3, 1
/* 803A116C 0039E0CC B0 04 00 08 */ sth r0, 8(r4)
/* 803A1170 0039E0D0 48 01 3F 15 */ bl hwEnableIrq
/* 803A1174 0039E0D4 38 60 00 00 */ li r3, 0
/* 803A1178 0039E0D8 48 00 00 54 */ b lbl_803A11CC
lbl_803A117C:
/* 803A117C 0039E0DC 28 07 01 00 */ cmplwi r7, 0x100
/* 803A1180 0039E0E0 40 80 00 14 */ bge lbl_803A1194
/* 803A1184 0039E0E4 A0 6D AE D4 */ lhz r3, dataLayerNum@sda21(r13)
/* 803A1188 0039E0E8 38 03 00 01 */ addi r0, r3, 1
/* 803A118C 0039E0EC B0 0D AE D4 */ sth r0, dataLayerNum@sda21(r13)
/* 803A1190 0039E0F0 48 00 00 10 */ b lbl_803A11A0
lbl_803A1194:
/* 803A1194 0039E0F4 48 01 3E F1 */ bl hwEnableIrq
/* 803A1198 0039E0F8 38 60 00 00 */ li r3, 0
/* 803A119C 0039E0FC 48 00 00 30 */ b lbl_803A11CC
lbl_803A11A0:
/* 803A11A0 0039E100 1C A8 00 0C */ mulli r5, r8, 0xc
/* 803A11A4 0039E104 3C 60 80 55 */ lis r3, dataLayerTab@ha
/* 803A11A8 0039E108 38 00 00 01 */ li r0, 1
/* 803A11AC 0039E10C 38 83 34 F8 */ addi r4, r3, dataLayerTab@l
/* 803A11B0 0039E110 7C 64 2A 14 */ add r3, r4, r5
/* 803A11B4 0039E114 B3 A3 00 04 */ sth r29, 4(r3)
/* 803A11B8 0039E118 7F C4 29 2E */ stwx r30, r4, r5
/* 803A11BC 0039E11C B3 E3 00 06 */ sth r31, 6(r3)
/* 803A11C0 0039E120 B0 03 00 08 */ sth r0, 8(r3)
/* 803A11C4 0039E124 48 01 3E C1 */ bl hwEnableIrq
/* 803A11C8 0039E128 38 60 00 01 */ li r3, 1
lbl_803A11CC:
/* 803A11CC 0039E12C 80 01 00 24 */ lwz r0, 0x24(r1)
/* 803A11D0 0039E130 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 803A11D4 0039E134 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 803A11D8 0039E138 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 803A11DC 0039E13C 7C 08 03 A6 */ mtlr r0
/* 803A11E0 0039E140 38 21 00 20 */ addi r1, r1, 0x20
/* 803A11E4 0039E144 4E 80 00 20 */ blr
.global dataRemoveLayer
dataRemoveLayer:
/* 803A11E8 0039E148 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 803A11EC 0039E14C 7C 08 02 A6 */ mflr r0
/* 803A11F0 0039E150 90 01 00 14 */ stw r0, 0x14(r1)
/* 803A11F4 0039E154 93 E1 00 0C */ stw r31, 0xc(r1)
/* 803A11F8 0039E158 7C 7F 1B 78 */ mr r31, r3
/* 803A11FC 0039E15C 48 01 3E C1 */ bl hwDisableIrq
/* 803A1200 0039E160 3C 60 80 55 */ lis r3, dataLayerTab@ha
/* 803A1204 0039E164 A0 CD AE D4 */ lhz r6, dataLayerNum@sda21(r13)
/* 803A1208 0039E168 38 83 34 F8 */ addi r4, r3, dataLayerTab@l
/* 803A120C 0039E16C 38 E0 00 00 */ li r7, 0
/* 803A1210 0039E170 57 E3 04 3E */ clrlwi r3, r31, 0x10
/* 803A1214 0039E174 48 00 00 0C */ b lbl_803A1220
lbl_803A1218:
/* 803A1218 0039E178 38 84 00 0C */ addi r4, r4, 0xc
/* 803A121C 0039E17C 38 E7 00 01 */ addi r7, r7, 1
lbl_803A1220:
/* 803A1220 0039E180 7C 07 30 00 */ cmpw r7, r6
/* 803A1224 0039E184 40 80 00 10 */ bge lbl_803A1234
/* 803A1228 0039E188 A0 04 00 04 */ lhz r0, 4(r4)
/* 803A122C 0039E18C 7C 03 00 40 */ cmplw r3, r0
/* 803A1230 0039E190 40 82 FF E8 */ bne lbl_803A1218
lbl_803A1234:
/* 803A1234 0039E194 7C 07 30 00 */ cmpw r7, r6
/* 803A1238 0039E198 41 82 01 58 */ beq lbl_803A1390
/* 803A123C 0039E19C 1C 07 00 0C */ mulli r0, r7, 0xc
/* 803A1240 0039E1A0 3C 60 80 55 */ lis r3, dataLayerTab@ha
/* 803A1244 0039E1A4 38 A3 34 F8 */ addi r5, r3, dataLayerTab@l
/* 803A1248 0039E1A8 7C 85 02 14 */ add r4, r5, r0
/* 803A124C 0039E1AC A0 64 00 08 */ lhz r3, 8(r4)
/* 803A1250 0039E1B0 38 63 FF FF */ addi r3, r3, -1
/* 803A1254 0039E1B4 54 60 04 3F */ clrlwi. r0, r3, 0x10
/* 803A1258 0039E1B8 B0 64 00 08 */ sth r3, 8(r4)
/* 803A125C 0039E1BC 40 82 01 34 */ bne lbl_803A1390
/* 803A1260 0039E1C0 38 67 00 01 */ addi r3, r7, 1
/* 803A1264 0039E1C4 1C 03 00 0C */ mulli r0, r3, 0xc
/* 803A1268 0039E1C8 7C 03 30 00 */ cmpw r3, r6
/* 803A126C 0039E1CC 7C 63 30 50 */ subf r3, r3, r6
/* 803A1270 0039E1D0 7C A5 02 14 */ add r5, r5, r0
/* 803A1274 0039E1D4 40 80 01 04 */ bge lbl_803A1378
/* 803A1278 0039E1D8 54 60 E8 FF */ rlwinm. r0, r3, 0x1d, 3, 0x1f
/* 803A127C 0039E1DC 7C 09 03 A6 */ mtctr r0
/* 803A1280 0039E1E0 41 82 00 D4 */ beq lbl_803A1354
lbl_803A1284:
/* 803A1284 0039E1E4 80 85 00 00 */ lwz r4, 0(r5)
/* 803A1288 0039E1E8 80 05 00 04 */ lwz r0, 4(r5)
/* 803A128C 0039E1EC 90 85 FF F4 */ stw r4, -0xc(r5)
/* 803A1290 0039E1F0 90 05 FF F8 */ stw r0, -8(r5)
/* 803A1294 0039E1F4 80 05 00 08 */ lwz r0, 8(r5)
/* 803A1298 0039E1F8 90 05 FF FC */ stw r0, -4(r5)
/* 803A129C 0039E1FC 80 85 00 0C */ lwz r4, 0xc(r5)
/* 803A12A0 0039E200 80 05 00 10 */ lwz r0, 0x10(r5)
/* 803A12A4 0039E204 90 85 00 00 */ stw r4, 0(r5)
/* 803A12A8 0039E208 90 05 00 04 */ stw r0, 4(r5)
/* 803A12AC 0039E20C 80 05 00 14 */ lwz r0, 0x14(r5)
/* 803A12B0 0039E210 90 05 00 08 */ stw r0, 8(r5)
/* 803A12B4 0039E214 80 85 00 18 */ lwz r4, 0x18(r5)
/* 803A12B8 0039E218 80 05 00 1C */ lwz r0, 0x1c(r5)
/* 803A12BC 0039E21C 90 85 00 0C */ stw r4, 0xc(r5)
/* 803A12C0 0039E220 90 05 00 10 */ stw r0, 0x10(r5)
/* 803A12C4 0039E224 80 05 00 20 */ lwz r0, 0x20(r5)
/* 803A12C8 0039E228 90 05 00 14 */ stw r0, 0x14(r5)
/* 803A12CC 0039E22C 80 85 00 24 */ lwz r4, 0x24(r5)
/* 803A12D0 0039E230 80 05 00 28 */ lwz r0, 0x28(r5)
/* 803A12D4 0039E234 90 85 00 18 */ stw r4, 0x18(r5)
/* 803A12D8 0039E238 90 05 00 1C */ stw r0, 0x1c(r5)
/* 803A12DC 0039E23C 80 05 00 2C */ lwz r0, 0x2c(r5)
/* 803A12E0 0039E240 90 05 00 20 */ stw r0, 0x20(r5)
/* 803A12E4 0039E244 80 85 00 30 */ lwz r4, 0x30(r5)
/* 803A12E8 0039E248 80 05 00 34 */ lwz r0, 0x34(r5)
/* 803A12EC 0039E24C 90 85 00 24 */ stw r4, 0x24(r5)
/* 803A12F0 0039E250 90 05 00 28 */ stw r0, 0x28(r5)
/* 803A12F4 0039E254 80 05 00 38 */ lwz r0, 0x38(r5)
/* 803A12F8 0039E258 90 05 00 2C */ stw r0, 0x2c(r5)
/* 803A12FC 0039E25C 80 85 00 3C */ lwz r4, 0x3c(r5)
/* 803A1300 0039E260 80 05 00 40 */ lwz r0, 0x40(r5)
/* 803A1304 0039E264 90 85 00 30 */ stw r4, 0x30(r5)
/* 803A1308 0039E268 90 05 00 34 */ stw r0, 0x34(r5)
/* 803A130C 0039E26C 80 05 00 44 */ lwz r0, 0x44(r5)
/* 803A1310 0039E270 90 05 00 38 */ stw r0, 0x38(r5)
/* 803A1314 0039E274 80 85 00 48 */ lwz r4, 0x48(r5)
/* 803A1318 0039E278 80 05 00 4C */ lwz r0, 0x4c(r5)
/* 803A131C 0039E27C 90 85 00 3C */ stw r4, 0x3c(r5)
/* 803A1320 0039E280 90 05 00 40 */ stw r0, 0x40(r5)
/* 803A1324 0039E284 80 05 00 50 */ lwz r0, 0x50(r5)
/* 803A1328 0039E288 90 05 00 44 */ stw r0, 0x44(r5)
/* 803A132C 0039E28C 80 85 00 54 */ lwz r4, 0x54(r5)
/* 803A1330 0039E290 80 05 00 58 */ lwz r0, 0x58(r5)
/* 803A1334 0039E294 90 85 00 48 */ stw r4, 0x48(r5)
/* 803A1338 0039E298 90 05 00 4C */ stw r0, 0x4c(r5)
/* 803A133C 0039E29C 80 05 00 5C */ lwz r0, 0x5c(r5)
/* 803A1340 0039E2A0 90 05 00 50 */ stw r0, 0x50(r5)
/* 803A1344 0039E2A4 38 A5 00 60 */ addi r5, r5, 0x60
/* 803A1348 0039E2A8 42 00 FF 3C */ bdnz lbl_803A1284
/* 803A134C 0039E2AC 70 63 00 07 */ andi. r3, r3, 7
/* 803A1350 0039E2B0 41 82 00 28 */ beq lbl_803A1378
lbl_803A1354:
/* 803A1354 0039E2B4 7C 69 03 A6 */ mtctr r3
lbl_803A1358:
/* 803A1358 0039E2B8 80 85 00 00 */ lwz r4, 0(r5)
/* 803A135C 0039E2BC 80 05 00 04 */ lwz r0, 4(r5)
/* 803A1360 0039E2C0 90 85 FF F4 */ stw r4, -0xc(r5)
/* 803A1364 0039E2C4 90 05 FF F8 */ stw r0, -8(r5)
/* 803A1368 0039E2C8 80 05 00 08 */ lwz r0, 8(r5)
/* 803A136C 0039E2CC 90 05 FF FC */ stw r0, -4(r5)
/* 803A1370 0039E2D0 38 A5 00 0C */ addi r5, r5, 0xc
/* 803A1374 0039E2D4 42 00 FF E4 */ bdnz lbl_803A1358
lbl_803A1378:
/* 803A1378 0039E2D8 A0 6D AE D4 */ lhz r3, dataLayerNum@sda21(r13)
/* 803A137C 0039E2DC 38 03 FF FF */ addi r0, r3, -1
/* 803A1380 0039E2E0 B0 0D AE D4 */ sth r0, dataLayerNum@sda21(r13)
/* 803A1384 0039E2E4 48 01 3D 01 */ bl hwEnableIrq
/* 803A1388 0039E2E8 38 60 00 01 */ li r3, 1
/* 803A138C 0039E2EC 48 00 00 0C */ b lbl_803A1398
lbl_803A1390:
/* 803A1390 0039E2F0 48 01 3C F5 */ bl hwEnableIrq
/* 803A1394 0039E2F4 38 60 00 00 */ li r3, 0
lbl_803A1398:
/* 803A1398 0039E2F8 80 01 00 14 */ lwz r0, 0x14(r1)
/* 803A139C 0039E2FC 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 803A13A0 0039E300 7C 08 03 A6 */ mtlr r0
/* 803A13A4 0039E304 38 21 00 10 */ addi r1, r1, 0x10
/* 803A13A8 0039E308 4E 80 00 20 */ blr
.global dataInsertCurve
dataInsertCurve:
/* 803A13AC 0039E30C 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 803A13B0 0039E310 7C 08 02 A6 */ mflr r0
/* 803A13B4 0039E314 90 01 00 24 */ stw r0, 0x24(r1)
/* 803A13B8 0039E318 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 803A13BC 0039E31C 7C 9F 23 78 */ mr r31, r4
/* 803A13C0 0039E320 93 C1 00 18 */ stw r30, 0x18(r1)
/* 803A13C4 0039E324 7C 7E 1B 78 */ mr r30, r3
/* 803A13C8 0039E328 93 A1 00 14 */ stw r29, 0x14(r1)
/* 803A13CC 0039E32C 48 01 3C F1 */ bl hwDisableIrq
/* 803A13D0 0039E330 3C 60 80 55 */ lis r3, dataCurveTab@ha
/* 803A13D4 0039E334 A0 CD AE D8 */ lhz r6, dataCurveNum@sda21(r13)
/* 803A13D8 0039E338 38 83 40 F8 */ addi r4, r3, dataCurveTab@l
/* 803A13DC 0039E33C 57 C0 04 3E */ clrlwi r0, r30, 0x10
/* 803A13E0 0039E340 38 E0 00 00 */ li r7, 0
/* 803A13E4 0039E344 48 00 00 0C */ b lbl_803A13F0
lbl_803A13E8:
/* 803A13E8 0039E348 38 84 00 08 */ addi r4, r4, 8
/* 803A13EC 0039E34C 38 E7 00 01 */ addi r7, r7, 1
lbl_803A13F0:
/* 803A13F0 0039E350 7C 07 30 00 */ cmpw r7, r6
/* 803A13F4 0039E354 40 80 00 10 */ bge lbl_803A1404
/* 803A13F8 0039E358 A0 64 00 04 */ lhz r3, 4(r4)
/* 803A13FC 0039E35C 7C 03 00 40 */ cmplw r3, r0
/* 803A1400 0039E360 41 80 FF E8 */ blt lbl_803A13E8
lbl_803A1404:
/* 803A1404 0039E364 7C 07 30 00 */ cmpw r7, r6
/* 803A1408 0039E368 40 80 01 40 */ bge lbl_803A1548
/* 803A140C 0039E36C 3C 60 80 55 */ lis r3, dataCurveTab@ha
/* 803A1410 0039E370 54 FD 18 38 */ slwi r29, r7, 3
/* 803A1414 0039E374 38 83 40 F8 */ addi r4, r3, dataCurveTab@l
/* 803A1418 0039E378 57 C5 04 3E */ clrlwi r5, r30, 0x10
/* 803A141C 0039E37C 7C 64 EA 14 */ add r3, r4, r29
/* 803A1420 0039E380 A0 03 00 04 */ lhz r0, 4(r3)
/* 803A1424 0039E384 7C 05 00 40 */ cmplw r5, r0
/* 803A1428 0039E388 41 82 00 FC */ beq lbl_803A1524
/* 803A142C 0039E38C 28 06 08 00 */ cmplwi r6, 0x800
/* 803A1430 0039E390 40 80 00 E8 */ bge lbl_803A1518
/* 803A1434 0039E394 38 66 FF FF */ addi r3, r6, -1
/* 803A1438 0039E398 7C 03 38 00 */ cmpw r3, r7
/* 803A143C 0039E39C 54 60 18 38 */ slwi r0, r3, 3
/* 803A1440 0039E3A0 38 63 00 01 */ addi r3, r3, 1
/* 803A1444 0039E3A4 7C A4 02 14 */ add r5, r4, r0
/* 803A1448 0039E3A8 7C 67 18 50 */ subf r3, r7, r3
/* 803A144C 0039E3AC 41 80 00 BC */ blt lbl_803A1508
/* 803A1450 0039E3B0 54 60 E8 FF */ rlwinm. r0, r3, 0x1d, 3, 0x1f
/* 803A1454 0039E3B4 7C 09 03 A6 */ mtctr r0
/* 803A1458 0039E3B8 41 82 00 94 */ beq lbl_803A14EC
lbl_803A145C:
/* 803A145C 0039E3BC 80 85 00 00 */ lwz r4, 0(r5)
/* 803A1460 0039E3C0 80 05 00 04 */ lwz r0, 4(r5)
/* 803A1464 0039E3C4 90 85 00 08 */ stw r4, 8(r5)
/* 803A1468 0039E3C8 90 05 00 0C */ stw r0, 0xc(r5)
/* 803A146C 0039E3CC 80 85 FF F8 */ lwz r4, -8(r5)
/* 803A1470 0039E3D0 80 05 FF FC */ lwz r0, -4(r5)
/* 803A1474 0039E3D4 90 85 00 00 */ stw r4, 0(r5)
/* 803A1478 0039E3D8 90 05 00 04 */ stw r0, 4(r5)
/* 803A147C 0039E3DC 80 85 FF F0 */ lwz r4, -0x10(r5)
/* 803A1480 0039E3E0 80 05 FF F4 */ lwz r0, -0xc(r5)
/* 803A1484 0039E3E4 90 85 FF F8 */ stw r4, -8(r5)
/* 803A1488 0039E3E8 90 05 FF FC */ stw r0, -4(r5)
/* 803A148C 0039E3EC 80 85 FF E8 */ lwz r4, -0x18(r5)
/* 803A1490 0039E3F0 80 05 FF EC */ lwz r0, -0x14(r5)
/* 803A1494 0039E3F4 90 85 FF F0 */ stw r4, -0x10(r5)
/* 803A1498 0039E3F8 90 05 FF F4 */ stw r0, -0xc(r5)
/* 803A149C 0039E3FC 80 85 FF E0 */ lwz r4, -0x20(r5)
/* 803A14A0 0039E400 80 05 FF E4 */ lwz r0, -0x1c(r5)
/* 803A14A4 0039E404 90 85 FF E8 */ stw r4, -0x18(r5)
/* 803A14A8 0039E408 90 05 FF EC */ stw r0, -0x14(r5)
/* 803A14AC 0039E40C 80 85 FF D8 */ lwz r4, -0x28(r5)
/* 803A14B0 0039E410 80 05 FF DC */ lwz r0, -0x24(r5)
/* 803A14B4 0039E414 90 85 FF E0 */ stw r4, -0x20(r5)
/* 803A14B8 0039E418 90 05 FF E4 */ stw r0, -0x1c(r5)
/* 803A14BC 0039E41C 80 85 FF D0 */ lwz r4, -0x30(r5)
/* 803A14C0 0039E420 80 05 FF D4 */ lwz r0, -0x2c(r5)
/* 803A14C4 0039E424 90 85 FF D8 */ stw r4, -0x28(r5)
/* 803A14C8 0039E428 90 05 FF DC */ stw r0, -0x24(r5)
/* 803A14CC 0039E42C 80 85 FF C8 */ lwz r4, -0x38(r5)
/* 803A14D0 0039E430 80 05 FF CC */ lwz r0, -0x34(r5)
/* 803A14D4 0039E434 90 85 FF D0 */ stw r4, -0x30(r5)
/* 803A14D8 0039E438 90 05 FF D4 */ stw r0, -0x2c(r5)
/* 803A14DC 0039E43C 38 A5 FF C0 */ addi r5, r5, -64
/* 803A14E0 0039E440 42 00 FF 7C */ bdnz lbl_803A145C
/* 803A14E4 0039E444 70 63 00 07 */ andi. r3, r3, 7
/* 803A14E8 0039E448 41 82 00 20 */ beq lbl_803A1508
lbl_803A14EC:
/* 803A14EC 0039E44C 7C 69 03 A6 */ mtctr r3
lbl_803A14F0:
/* 803A14F0 0039E450 80 85 00 00 */ lwz r4, 0(r5)
/* 803A14F4 0039E454 80 05 00 04 */ lwz r0, 4(r5)
/* 803A14F8 0039E458 90 85 00 08 */ stw r4, 8(r5)
/* 803A14FC 0039E45C 90 05 00 0C */ stw r0, 0xc(r5)
/* 803A1500 0039E460 38 A5 FF F8 */ addi r5, r5, -8
/* 803A1504 0039E464 42 00 FF EC */ bdnz lbl_803A14F0
lbl_803A1508:
/* 803A1508 0039E468 A0 6D AE D8 */ lhz r3, dataCurveNum@sda21(r13)
/* 803A150C 0039E46C 38 03 00 01 */ addi r0, r3, 1
/* 803A1510 0039E470 B0 0D AE D8 */ sth r0, dataCurveNum@sda21(r13)
/* 803A1514 0039E474 48 00 00 58 */ b lbl_803A156C
lbl_803A1518:
/* 803A1518 0039E478 48 01 3B 6D */ bl hwEnableIrq
/* 803A151C 0039E47C 38 60 00 00 */ li r3, 0
/* 803A1520 0039E480 48 00 00 74 */ b lbl_803A1594
lbl_803A1524:
/* 803A1524 0039E484 48 01 3B 61 */ bl hwEnableIrq
/* 803A1528 0039E488 3C 80 80 55 */ lis r4, dataCurveTab@ha
/* 803A152C 0039E48C 38 60 00 00 */ li r3, 0
/* 803A1530 0039E490 38 04 40 F8 */ addi r0, r4, dataCurveTab@l
/* 803A1534 0039E494 7C A0 EA 14 */ add r5, r0, r29
/* 803A1538 0039E498 A0 85 00 06 */ lhz r4, 6(r5)
/* 803A153C 0039E49C 38 04 00 01 */ addi r0, r4, 1
/* 803A1540 0039E4A0 B0 05 00 06 */ sth r0, 6(r5)
/* 803A1544 0039E4A4 48 00 00 50 */ b lbl_803A1594
lbl_803A1548:
/* 803A1548 0039E4A8 28 06 08 00 */ cmplwi r6, 0x800
/* 803A154C 0039E4AC 40 80 00 14 */ bge lbl_803A1560
/* 803A1550 0039E4B0 A0 6D AE D8 */ lhz r3, dataCurveNum@sda21(r13)
/* 803A1554 0039E4B4 38 03 00 01 */ addi r0, r3, 1
/* 803A1558 0039E4B8 B0 0D AE D8 */ sth r0, dataCurveNum@sda21(r13)
/* 803A155C 0039E4BC 48 00 00 10 */ b lbl_803A156C
lbl_803A1560:
/* 803A1560 0039E4C0 48 01 3B 25 */ bl hwEnableIrq
/* 803A1564 0039E4C4 38 60 00 00 */ li r3, 0
/* 803A1568 0039E4C8 48 00 00 2C */ b lbl_803A1594
lbl_803A156C:
/* 803A156C 0039E4CC 3C 60 80 55 */ lis r3, dataCurveTab@ha
/* 803A1570 0039E4D0 54 E5 18 38 */ slwi r5, r7, 3
/* 803A1574 0039E4D4 38 83 40 F8 */ addi r4, r3, dataCurveTab@l
/* 803A1578 0039E4D8 38 00 00 01 */ li r0, 1
/* 803A157C 0039E4DC 7C 64 2A 14 */ add r3, r4, r5
/* 803A1580 0039E4E0 B3 C3 00 04 */ sth r30, 4(r3)
/* 803A1584 0039E4E4 7F E4 29 2E */ stwx r31, r4, r5
/* 803A1588 0039E4E8 B0 03 00 06 */ sth r0, 6(r3)
/* 803A158C 0039E4EC 48 01 3A F9 */ bl hwEnableIrq
/* 803A1590 0039E4F0 38 60 00 01 */ li r3, 1
lbl_803A1594:
/* 803A1594 0039E4F4 80 01 00 24 */ lwz r0, 0x24(r1)
/* 803A1598 0039E4F8 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 803A159C 0039E4FC 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 803A15A0 0039E500 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 803A15A4 0039E504 7C 08 03 A6 */ mtlr r0
/* 803A15A8 0039E508 38 21 00 20 */ addi r1, r1, 0x20
/* 803A15AC 0039E50C 4E 80 00 20 */ blr
.global dataRemoveCurve
dataRemoveCurve:
/* 803A15B0 0039E510 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 803A15B4 0039E514 7C 08 02 A6 */ mflr r0
/* 803A15B8 0039E518 90 01 00 14 */ stw r0, 0x14(r1)
/* 803A15BC 0039E51C 93 E1 00 0C */ stw r31, 0xc(r1)
/* 803A15C0 0039E520 7C 7F 1B 78 */ mr r31, r3
/* 803A15C4 0039E524 48 01 3A F9 */ bl hwDisableIrq
/* 803A15C8 0039E528 3C 60 80 55 */ lis r3, dataCurveTab@ha
/* 803A15CC 0039E52C A0 CD AE D8 */ lhz r6, dataCurveNum@sda21(r13)
/* 803A15D0 0039E530 38 83 40 F8 */ addi r4, r3, dataCurveTab@l
/* 803A15D4 0039E534 38 E0 00 00 */ li r7, 0
/* 803A15D8 0039E538 57 E3 04 3E */ clrlwi r3, r31, 0x10
/* 803A15DC 0039E53C 48 00 00 0C */ b lbl_803A15E8
lbl_803A15E0:
/* 803A15E0 0039E540 38 84 00 08 */ addi r4, r4, 8
/* 803A15E4 0039E544 38 E7 00 01 */ addi r7, r7, 1
lbl_803A15E8:
/* 803A15E8 0039E548 7C 07 30 00 */ cmpw r7, r6
/* 803A15EC 0039E54C 40 80 00 10 */ bge lbl_803A15FC
/* 803A15F0 0039E550 A0 04 00 04 */ lhz r0, 4(r4)
/* 803A15F4 0039E554 7C 03 00 40 */ cmplw r3, r0
/* 803A15F8 0039E558 40 82 FF E8 */ bne lbl_803A15E0
lbl_803A15FC:
/* 803A15FC 0039E55C 7C 07 30 00 */ cmpw r7, r6
/* 803A1600 0039E560 41 82 01 10 */ beq lbl_803A1710
/* 803A1604 0039E564 3C 60 80 55 */ lis r3, dataCurveTab@ha
/* 803A1608 0039E568 54 E0 18 38 */ slwi r0, r7, 3
/* 803A160C 0039E56C 38 A3 40 F8 */ addi r5, r3, dataCurveTab@l
/* 803A1610 0039E570 7C 85 02 14 */ add r4, r5, r0
/* 803A1614 0039E574 A0 64 00 06 */ lhz r3, 6(r4)
/* 803A1618 0039E578 38 63 FF FF */ addi r3, r3, -1
/* 803A161C 0039E57C 54 60 04 3F */ clrlwi. r0, r3, 0x10
/* 803A1620 0039E580 B0 64 00 06 */ sth r3, 6(r4)
/* 803A1624 0039E584 40 82 00 EC */ bne lbl_803A1710
/* 803A1628 0039E588 38 67 00 01 */ addi r3, r7, 1
/* 803A162C 0039E58C 7C 03 30 00 */ cmpw r3, r6
/* 803A1630 0039E590 54 60 18 38 */ slwi r0, r3, 3
/* 803A1634 0039E594 7C 63 30 50 */ subf r3, r3, r6
/* 803A1638 0039E598 7C A5 02 14 */ add r5, r5, r0
/* 803A163C 0039E59C 40 80 00 BC */ bge lbl_803A16F8
/* 803A1640 0039E5A0 54 60 E8 FF */ rlwinm. r0, r3, 0x1d, 3, 0x1f
/* 803A1644 0039E5A4 7C 09 03 A6 */ mtctr r0
/* 803A1648 0039E5A8 41 82 00 94 */ beq lbl_803A16DC
lbl_803A164C:
/* 803A164C 0039E5AC 80 85 00 00 */ lwz r4, 0(r5)
/* 803A1650 0039E5B0 80 05 00 04 */ lwz r0, 4(r5)
/* 803A1654 0039E5B4 90 85 FF F8 */ stw r4, -8(r5)
/* 803A1658 0039E5B8 90 05 FF FC */ stw r0, -4(r5)
/* 803A165C 0039E5BC 80 85 00 08 */ lwz r4, 8(r5)
/* 803A1660 0039E5C0 80 05 00 0C */ lwz r0, 0xc(r5)
/* 803A1664 0039E5C4 90 85 00 00 */ stw r4, 0(r5)
/* 803A1668 0039E5C8 90 05 00 04 */ stw r0, 4(r5)
/* 803A166C 0039E5CC 80 85 00 10 */ lwz r4, 0x10(r5)
/* 803A1670 0039E5D0 80 05 00 14 */ lwz r0, 0x14(r5)
/* 803A1674 0039E5D4 90 85 00 08 */ stw r4, 8(r5)
/* 803A1678 0039E5D8 90 05 00 0C */ stw r0, 0xc(r5)
/* 803A167C 0039E5DC 80 85 00 18 */ lwz r4, 0x18(r5)
/* 803A1680 0039E5E0 80 05 00 1C */ lwz r0, 0x1c(r5)
/* 803A1684 0039E5E4 90 85 00 10 */ stw r4, 0x10(r5)
/* 803A1688 0039E5E8 90 05 00 14 */ stw r0, 0x14(r5)
/* 803A168C 0039E5EC 80 85 00 20 */ lwz r4, 0x20(r5)
/* 803A1690 0039E5F0 80 05 00 24 */ lwz r0, 0x24(r5)
/* 803A1694 0039E5F4 90 85 00 18 */ stw r4, 0x18(r5)
/* 803A1698 0039E5F8 90 05 00 1C */ stw r0, 0x1c(r5)
/* 803A169C 0039E5FC 80 85 00 28 */ lwz r4, 0x28(r5)
/* 803A16A0 0039E600 80 05 00 2C */ lwz r0, 0x2c(r5)
/* 803A16A4 0039E604 90 85 00 20 */ stw r4, 0x20(r5)
/* 803A16A8 0039E608 90 05 00 24 */ stw r0, 0x24(r5)
/* 803A16AC 0039E60C 80 85 00 30 */ lwz r4, 0x30(r5)
/* 803A16B0 0039E610 80 05 00 34 */ lwz r0, 0x34(r5)
/* 803A16B4 0039E614 90 85 00 28 */ stw r4, 0x28(r5)
/* 803A16B8 0039E618 90 05 00 2C */ stw r0, 0x2c(r5)
/* 803A16BC 0039E61C 80 85 00 38 */ lwz r4, 0x38(r5)
/* 803A16C0 0039E620 80 05 00 3C */ lwz r0, 0x3c(r5)
/* 803A16C4 0039E624 90 85 00 30 */ stw r4, 0x30(r5)
/* 803A16C8 0039E628 90 05 00 34 */ stw r0, 0x34(r5)
/* 803A16CC 0039E62C 38 A5 00 40 */ addi r5, r5, 0x40
/* 803A16D0 0039E630 42 00 FF 7C */ bdnz lbl_803A164C
/* 803A16D4 0039E634 70 63 00 07 */ andi. r3, r3, 7
/* 803A16D8 0039E638 41 82 00 20 */ beq lbl_803A16F8
lbl_803A16DC:
/* 803A16DC 0039E63C 7C 69 03 A6 */ mtctr r3
lbl_803A16E0:
/* 803A16E0 0039E640 80 85 00 00 */ lwz r4, 0(r5)
/* 803A16E4 0039E644 80 05 00 04 */ lwz r0, 4(r5)
/* 803A16E8 0039E648 90 85 FF F8 */ stw r4, -8(r5)
/* 803A16EC 0039E64C 90 05 FF FC */ stw r0, -4(r5)
/* 803A16F0 0039E650 38 A5 00 08 */ addi r5, r5, 8
/* 803A16F4 0039E654 42 00 FF EC */ bdnz lbl_803A16E0
lbl_803A16F8:
/* 803A16F8 0039E658 A0 6D AE D8 */ lhz r3, dataCurveNum@sda21(r13)
/* 803A16FC 0039E65C 38 03 FF FF */ addi r0, r3, -1
/* 803A1700 0039E660 B0 0D AE D8 */ sth r0, dataCurveNum@sda21(r13)
/* 803A1704 0039E664 48 01 39 81 */ bl hwEnableIrq
/* 803A1708 0039E668 38 60 00 01 */ li r3, 1
/* 803A170C 0039E66C 48 00 00 0C */ b lbl_803A1718
lbl_803A1710:
/* 803A1710 0039E670 48 01 39 75 */ bl hwEnableIrq
/* 803A1714 0039E674 38 60 00 00 */ li r3, 0
lbl_803A1718:
/* 803A1718 0039E678 80 01 00 14 */ lwz r0, 0x14(r1)
/* 803A171C 0039E67C 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 803A1720 0039E680 7C 08 03 A6 */ mtlr r0
/* 803A1724 0039E684 38 21 00 10 */ addi r1, r1, 0x10
/* 803A1728 0039E688 4E 80 00 20 */ blr
.global dataInsertSDir
dataInsertSDir:
/* 803A172C 0039E68C 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 803A1730 0039E690 7C 08 02 A6 */ mflr r0
/* 803A1734 0039E694 3C A0 80 56 */ lis r5, dataSmpSDirs@ha
/* 803A1738 0039E698 90 01 00 24 */ stw r0, 0x24(r1)
/* 803A173C 0039E69C 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 803A1740 0039E6A0 3B E5 80 F8 */ addi r31, r5, dataSmpSDirs@l
/* 803A1744 0039E6A4 93 C1 00 18 */ stw r30, 0x18(r1)
/* 803A1748 0039E6A8 93 A1 00 14 */ stw r29, 0x14(r1)
/* 803A174C 0039E6AC 7C 9D 23 78 */ mr r29, r4
/* 803A1750 0039E6B0 38 80 00 00 */ li r4, 0
/* 803A1754 0039E6B4 93 81 00 10 */ stw r28, 0x10(r1)
/* 803A1758 0039E6B8 7C 7C 1B 78 */ mr r28, r3
/* 803A175C 0039E6BC 7F E3 FB 78 */ mr r3, r31
/* 803A1760 0039E6C0 A0 CD AE DA */ lhz r6, dataSmpSDirNum@sda21(r13)
/* 803A1764 0039E6C4 48 00 00 0C */ b lbl_803A1770
lbl_803A1768:
/* 803A1768 0039E6C8 38 63 00 0C */ addi r3, r3, 0xc
/* 803A176C 0039E6CC 38 84 00 01 */ addi r4, r4, 1
lbl_803A1770:
/* 803A1770 0039E6D0 7C 04 30 00 */ cmpw r4, r6
/* 803A1774 0039E6D4 40 80 00 10 */ bge lbl_803A1784
/* 803A1778 0039E6D8 80 03 00 00 */ lwz r0, 0(r3)
/* 803A177C 0039E6DC 7C 00 E0 40 */ cmplw r0, r28
/* 803A1780 0039E6E0 40 82 FF E8 */ bne lbl_803A1768
lbl_803A1784:
/* 803A1784 0039E6E4 7C 04 30 00 */ cmpw r4, r6
/* 803A1788 0039E6E8 40 82 01 08 */ bne lbl_803A1890
/* 803A178C 0039E6EC 28 06 00 80 */ cmplwi r6, 0x80
/* 803A1790 0039E6F0 40 80 00 F8 */ bge lbl_803A1888
/* 803A1794 0039E6F4 7F 83 E3 78 */ mr r3, r28
/* 803A1798 0039E6F8 3B C0 00 00 */ li r30, 0
/* 803A179C 0039E6FC 48 00 00 0C */ b lbl_803A17A8
lbl_803A17A0:
/* 803A17A0 0039E700 3B DE 00 01 */ addi r30, r30, 1
/* 803A17A4 0039E704 38 63 00 20 */ addi r3, r3, 0x20
lbl_803A17A8:
/* 803A17A8 0039E708 A0 03 00 00 */ lhz r0, 0(r3)
/* 803A17AC 0039E70C 28 00 FF FF */ cmplwi r0, 0xffff
/* 803A17B0 0039E710 40 82 FF F0 */ bne lbl_803A17A0
/* 803A17B4 0039E714 48 01 39 09 */ bl hwDisableIrq
/* 803A17B8 0039E718 57 C0 04 3E */ clrlwi r0, r30, 0x10
/* 803A17BC 0039E71C 39 60 00 00 */ li r11, 0
/* 803A17C0 0039E720 48 00 00 88 */ b lbl_803A1848
lbl_803A17C4:
/* 803A17C4 0039E724 A1 0D AE DA */ lhz r8, dataSmpSDirNum@sda21(r13)
/* 803A17C8 0039E728 55 63 2A F4 */ rlwinm r3, r11, 5, 0xb, 0x1a
/* 803A17CC 0039E72C 7F E7 FB 78 */ mr r7, r31
/* 803A17D0 0039E730 39 40 00 00 */ li r10, 0
/* 803A17D4 0039E734 7D 3C 1A 14 */ add r9, r28, r3
/* 803A17D8 0039E738 7D 09 03 A6 */ mtctr r8
/* 803A17DC 0039E73C 2C 08 00 00 */ cmpwi r8, 0
/* 803A17E0 0039E740 40 81 00 44 */ ble lbl_803A1824
lbl_803A17E4:
/* 803A17E4 0039E744 A0 C7 00 08 */ lhz r6, 8(r7)
/* 803A17E8 0039E748 39 80 00 00 */ li r12, 0
/* 803A17EC 0039E74C 48 00 00 20 */ b lbl_803A180C
lbl_803A17F0:
/* 803A17F0 0039E750 80 87 00 00 */ lwz r4, 0(r7)
/* 803A17F4 0039E754 55 83 2A F4 */ rlwinm r3, r12, 5, 0xb, 0x1a
/* 803A17F8 0039E758 A0 A9 00 00 */ lhz r5, 0(r9)
/* 803A17FC 0039E75C 7C 64 1A 2E */ lhzx r3, r4, r3
/* 803A1800 0039E760 7C 05 18 40 */ cmplw r5, r3
/* 803A1804 0039E764 41 82 00 20 */ beq lbl_803A1824
/* 803A1808 0039E768 39 8C 00 01 */ addi r12, r12, 1
lbl_803A180C:
/* 803A180C 0039E76C 55 83 04 3E */ clrlwi r3, r12, 0x10
/* 803A1810 0039E770 7C 03 30 40 */ cmplw r3, r6
/* 803A1814 0039E774 41 80 FF DC */ blt lbl_803A17F0
/* 803A1818 0039E778 38 E7 00 0C */ addi r7, r7, 0xc
/* 803A181C 0039E77C 39 4A 00 01 */ addi r10, r10, 1
/* 803A1820 0039E780 42 00 FF C4 */ bdnz lbl_803A17E4
lbl_803A1824:
/* 803A1824 0039E784 7C 0A 40 00 */ cmpw r10, r8
/* 803A1828 0039E788 41 82 00 14 */ beq lbl_803A183C
/* 803A182C 0039E78C 3C 60 00 01 */ lis r3, 0x0000FFFF@ha
/* 803A1830 0039E790 38 63 FF FF */ addi r3, r3, 0x0000FFFF@l
/* 803A1834 0039E794 B0 69 00 02 */ sth r3, 2(r9)
/* 803A1838 0039E798 48 00 00 0C */ b lbl_803A1844
lbl_803A183C:
/* 803A183C 0039E79C 38 60 00 00 */ li r3, 0
/* 803A1840 0039E7A0 B0 69 00 02 */ sth r3, 2(r9)
lbl_803A1844:
/* 803A1844 0039E7A4 39 6B 00 01 */ addi r11, r11, 1
lbl_803A1848:
/* 803A1848 0039E7A8 55 63 04 3E */ clrlwi r3, r11, 0x10
/* 803A184C 0039E7AC 7C 03 00 40 */ cmplw r3, r0
/* 803A1850 0039E7B0 41 80 FF 74 */ blt lbl_803A17C4
/* 803A1854 0039E7B4 A0 8D AE DA */ lhz r4, dataSmpSDirNum@sda21(r13)
/* 803A1858 0039E7B8 3C 60 80 56 */ lis r3, dataSmpSDirs@ha
/* 803A185C 0039E7BC 38 63 80 F8 */ addi r3, r3, dataSmpSDirs@l
/* 803A1860 0039E7C0 1C A4 00 0C */ mulli r5, r4, 0xc
/* 803A1864 0039E7C4 38 04 00 01 */ addi r0, r4, 1
/* 803A1868 0039E7C8 B0 0D AE DA */ sth r0, dataSmpSDirNum@sda21(r13)
/* 803A186C 0039E7CC 7F 83 29 2E */ stwx r28, r3, r5
/* 803A1870 0039E7D0 7C 63 2A 14 */ add r3, r3, r5
/* 803A1874 0039E7D4 B3 C3 00 08 */ sth r30, 8(r3)
/* 803A1878 0039E7D8 93 A3 00 04 */ stw r29, 4(r3)
/* 803A187C 0039E7DC 48 01 38 09 */ bl hwEnableIrq
/* 803A1880 0039E7E0 38 60 00 01 */ li r3, 1
/* 803A1884 0039E7E4 48 00 00 10 */ b lbl_803A1894
lbl_803A1888:
/* 803A1888 0039E7E8 38 60 00 00 */ li r3, 0
/* 803A188C 0039E7EC 48 00 00 08 */ b lbl_803A1894
lbl_803A1890:
/* 803A1890 0039E7F0 38 60 00 01 */ li r3, 1
lbl_803A1894:
/* 803A1894 0039E7F4 80 01 00 24 */ lwz r0, 0x24(r1)
/* 803A1898 0039E7F8 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 803A189C 0039E7FC 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 803A18A0 0039E800 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 803A18A4 0039E804 83 81 00 10 */ lwz r28, 0x10(r1)
/* 803A18A8 0039E808 7C 08 03 A6 */ mtlr r0
/* 803A18AC 0039E80C 38 21 00 20 */ addi r1, r1, 0x20
/* 803A18B0 0039E810 4E 80 00 20 */ blr
.global dataRemoveSDir
dataRemoveSDir:
/* 803A18B4 0039E814 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 803A18B8 0039E818 7C 08 02 A6 */ mflr r0
/* 803A18BC 0039E81C 3C 80 80 56 */ lis r4, dataSmpSDirs@ha
/* 803A18C0 0039E820 90 01 00 24 */ stw r0, 0x24(r1)
/* 803A18C4 0039E824 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 803A18C8 0039E828 3B E4 80 F8 */ addi r31, r4, dataSmpSDirs@l
/* 803A18CC 0039E82C 93 C1 00 18 */ stw r30, 0x18(r1)
/* 803A18D0 0039E830 3B C0 00 00 */ li r30, 0
/* 803A18D4 0039E834 93 A1 00 14 */ stw r29, 0x14(r1)
/* 803A18D8 0039E838 7C 7D 1B 78 */ mr r29, r3
/* 803A18DC 0039E83C 7F E3 FB 78 */ mr r3, r31
/* 803A18E0 0039E840 A0 AD AE DA */ lhz r5, dataSmpSDirNum@sda21(r13)
/* 803A18E4 0039E844 48 00 00 0C */ b lbl_803A18F0
lbl_803A18E8:
/* 803A18E8 0039E848 38 63 00 0C */ addi r3, r3, 0xc
/* 803A18EC 0039E84C 3B DE 00 01 */ addi r30, r30, 1
lbl_803A18F0:
/* 803A18F0 0039E850 7C 1E 28 00 */ cmpw r30, r5
/* 803A18F4 0039E854 40 80 00 10 */ bge lbl_803A1904
/* 803A18F8 0039E858 80 03 00 00 */ lwz r0, 0(r3)
/* 803A18FC 0039E85C 7C 00 E8 40 */ cmplw r0, r29
/* 803A1900 0039E860 40 82 FF E8 */ bne lbl_803A18E8
lbl_803A1904:
/* 803A1904 0039E864 7C 1E 28 00 */ cmpw r30, r5
/* 803A1908 0039E868 41 82 02 54 */ beq lbl_803A1B5C
/* 803A190C 0039E86C 48 01 37 B1 */ bl hwDisableIrq
/* 803A1910 0039E870 7F A4 EB 78 */ mr r4, r29
/* 803A1914 0039E874 48 00 00 1C */ b lbl_803A1930
lbl_803A1918:
/* 803A1918 0039E878 A0 04 00 02 */ lhz r0, 2(r4)
/* 803A191C 0039E87C 28 00 FF FF */ cmplwi r0, 0xffff
/* 803A1920 0039E880 41 82 00 0C */ beq lbl_803A192C
/* 803A1924 0039E884 28 00 00 00 */ cmplwi r0, 0
/* 803A1928 0039E888 40 82 00 14 */ bne lbl_803A193C
lbl_803A192C:
/* 803A192C 0039E88C 38 84 00 20 */ addi r4, r4, 0x20
lbl_803A1930:
/* 803A1930 0039E890 A0 64 00 00 */ lhz r3, 0(r4)
/* 803A1934 0039E894 28 03 FF FF */ cmplwi r3, 0xffff
/* 803A1938 0039E898 40 82 FF E0 */ bne lbl_803A1918
lbl_803A193C:
/* 803A193C 0039E89C 28 03 FF FF */ cmplwi r3, 0xffff
/* 803A1940 0039E8A0 40 82 02 18 */ bne lbl_803A1B58
/* 803A1944 0039E8A4 7F A8 EB 78 */ mr r8, r29
/* 803A1948 0039E8A8 48 00 00 A8 */ b lbl_803A19F0
lbl_803A194C:
/* 803A194C 0039E8AC A0 08 00 02 */ lhz r0, 2(r8)
/* 803A1950 0039E8B0 28 00 FF FF */ cmplwi r0, 0xffff
/* 803A1954 0039E8B4 41 82 00 98 */ beq lbl_803A19EC
/* 803A1958 0039E8B8 7F E5 FB 78 */ mr r5, r31
/* 803A195C 0039E8BC 39 20 00 00 */ li r9, 0
/* 803A1960 0039E8C0 48 00 00 80 */ b lbl_803A19E0
lbl_803A1964:
/* 803A1964 0039E8C4 80 E5 00 00 */ lwz r7, 0(r5)
/* 803A1968 0039E8C8 7C 07 E8 40 */ cmplw r7, r29
/* 803A196C 0039E8CC 41 82 00 6C */ beq lbl_803A19D8
/* 803A1970 0039E8D0 A0 05 00 08 */ lhz r0, 8(r5)
/* 803A1974 0039E8D4 39 40 00 00 */ li r10, 0
/* 803A1978 0039E8D8 38 80 00 00 */ li r4, 0
/* 803A197C 0039E8DC 7C 09 03 A6 */ mtctr r0
/* 803A1980 0039E8E0 2C 00 00 00 */ cmpwi r0, 0
/* 803A1984 0039E8E4 40 81 00 48 */ ble lbl_803A19CC
lbl_803A1988:
/* 803A1988 0039E8E8 80 05 00 00 */ lwz r0, 0(r5)
/* 803A198C 0039E8EC A0 68 00 00 */ lhz r3, 0(r8)
/* 803A1990 0039E8F0 7C C0 22 14 */ add r6, r0, r4
/* 803A1994 0039E8F4 A0 06 00 00 */ lhz r0, 0(r6)
/* 803A1998 0039E8F8 7C 03 00 40 */ cmplw r3, r0
/* 803A199C 0039E8FC 40 82 00 24 */ bne lbl_803A19C0
/* 803A19A0 0039E900 A0 06 00 02 */ lhz r0, 2(r6)
/* 803A19A4 0039E904 28 00 FF FF */ cmplwi r0, 0xffff
/* 803A19A8 0039E908 40 82 00 18 */ bne lbl_803A19C0
/* 803A19AC 0039E90C 55 43 28 34 */ slwi r3, r10, 5
/* 803A19B0 0039E910 38 80 00 00 */ li r4, 0
/* 803A19B4 0039E914 38 03 00 02 */ addi r0, r3, 2
/* 803A19B8 0039E918 7C 87 03 2E */ sthx r4, r7, r0
/* 803A19BC 0039E91C 48 00 00 10 */ b lbl_803A19CC
lbl_803A19C0:
/* 803A19C0 0039E920 38 84 00 20 */ addi r4, r4, 0x20
/* 803A19C4 0039E924 39 4A 00 01 */ addi r10, r10, 1
/* 803A19C8 0039E928 42 00 FF C0 */ bdnz lbl_803A1988
lbl_803A19CC:
/* 803A19CC 0039E92C A0 05 00 08 */ lhz r0, 8(r5)
/* 803A19D0 0039E930 7C 0A 00 00 */ cmpw r10, r0
/* 803A19D4 0039E934 40 82 00 18 */ bne lbl_803A19EC
lbl_803A19D8:
/* 803A19D8 0039E938 38 A5 00 0C */ addi r5, r5, 0xc
/* 803A19DC 0039E93C 39 29 00 01 */ addi r9, r9, 1
lbl_803A19E0:
/* 803A19E0 0039E940 A0 0D AE DA */ lhz r0, dataSmpSDirNum@sda21(r13)
/* 803A19E4 0039E944 7C 09 00 00 */ cmpw r9, r0
/* 803A19E8 0039E948 41 80 FF 7C */ blt lbl_803A1964
lbl_803A19EC:
/* 803A19EC 0039E94C 39 08 00 20 */ addi r8, r8, 0x20
lbl_803A19F0:
/* 803A19F0 0039E950 A0 08 00 00 */ lhz r0, 0(r8)
/* 803A19F4 0039E954 28 00 FF FF */ cmplwi r0, 0xffff
/* 803A19F8 0039E958 40 82 FF 54 */ bne lbl_803A194C
/* 803A19FC 0039E95C 7F A4 EB 78 */ mr r4, r29
/* 803A1A00 0039E960 38 60 00 00 */ li r3, 0
/* 803A1A04 0039E964 48 00 00 0C */ b lbl_803A1A10
lbl_803A1A08:
/* 803A1A08 0039E968 B0 64 00 02 */ sth r3, 2(r4)
/* 803A1A0C 0039E96C 38 84 00 20 */ addi r4, r4, 0x20
lbl_803A1A10:
/* 803A1A10 0039E970 A0 04 00 00 */ lhz r0, 0(r4)
/* 803A1A14 0039E974 28 00 FF FF */ cmplwi r0, 0xffff
/* 803A1A18 0039E978 40 82 FF F0 */ bne lbl_803A1A08
/* 803A1A1C 0039E97C 38 FE 00 01 */ addi r7, r30, 1
/* 803A1A20 0039E980 A0 CD AE DA */ lhz r6, dataSmpSDirNum@sda21(r13)
/* 803A1A24 0039E984 1C 87 00 0C */ mulli r4, r7, 0xc
/* 803A1A28 0039E988 3C 60 80 56 */ lis r3, dataSmpSDirs@ha
/* 803A1A2C 0039E98C 7C 07 30 00 */ cmpw r7, r6
/* 803A1A30 0039E990 38 03 80 F8 */ addi r0, r3, dataSmpSDirs@l
/* 803A1A34 0039E994 7C A0 22 14 */ add r5, r0, r4
/* 803A1A38 0039E998 7C 67 30 50 */ subf r3, r7, r6
/* 803A1A3C 0039E99C 40 80 01 04 */ bge lbl_803A1B40
/* 803A1A40 0039E9A0 54 60 E8 FF */ rlwinm. r0, r3, 0x1d, 3, 0x1f
/* 803A1A44 0039E9A4 7C 09 03 A6 */ mtctr r0
/* 803A1A48 0039E9A8 41 82 00 D4 */ beq lbl_803A1B1C
lbl_803A1A4C:
/* 803A1A4C 0039E9AC 80 85 00 00 */ lwz r4, 0(r5)
/* 803A1A50 0039E9B0 80 05 00 04 */ lwz r0, 4(r5)
/* 803A1A54 0039E9B4 90 85 FF F4 */ stw r4, -0xc(r5)
/* 803A1A58 0039E9B8 90 05 FF F8 */ stw r0, -8(r5)
/* 803A1A5C 0039E9BC 80 05 00 08 */ lwz r0, 8(r5)
/* 803A1A60 0039E9C0 90 05 FF FC */ stw r0, -4(r5)
/* 803A1A64 0039E9C4 80 85 00 0C */ lwz r4, 0xc(r5)
/* 803A1A68 0039E9C8 80 05 00 10 */ lwz r0, 0x10(r5)
/* 803A1A6C 0039E9CC 90 85 00 00 */ stw r4, 0(r5)
/* 803A1A70 0039E9D0 90 05 00 04 */ stw r0, 4(r5)
/* 803A1A74 0039E9D4 80 05 00 14 */ lwz r0, 0x14(r5)
/* 803A1A78 0039E9D8 90 05 00 08 */ stw r0, 8(r5)
/* 803A1A7C 0039E9DC 80 85 00 18 */ lwz r4, 0x18(r5)
/* 803A1A80 0039E9E0 80 05 00 1C */ lwz r0, 0x1c(r5)
/* 803A1A84 0039E9E4 90 85 00 0C */ stw r4, 0xc(r5)
/* 803A1A88 0039E9E8 90 05 00 10 */ stw r0, 0x10(r5)
/* 803A1A8C 0039E9EC 80 05 00 20 */ lwz r0, 0x20(r5)
/* 803A1A90 0039E9F0 90 05 00 14 */ stw r0, 0x14(r5)
/* 803A1A94 0039E9F4 80 85 00 24 */ lwz r4, 0x24(r5)
/* 803A1A98 0039E9F8 80 05 00 28 */ lwz r0, 0x28(r5)
/* 803A1A9C 0039E9FC 90 85 00 18 */ stw r4, 0x18(r5)
/* 803A1AA0 0039EA00 90 05 00 1C */ stw r0, 0x1c(r5)
/* 803A1AA4 0039EA04 80 05 00 2C */ lwz r0, 0x2c(r5)
/* 803A1AA8 0039EA08 90 05 00 20 */ stw r0, 0x20(r5)
/* 803A1AAC 0039EA0C 80 85 00 30 */ lwz r4, 0x30(r5)
/* 803A1AB0 0039EA10 80 05 00 34 */ lwz r0, 0x34(r5)
/* 803A1AB4 0039EA14 90 85 00 24 */ stw r4, 0x24(r5)
/* 803A1AB8 0039EA18 90 05 00 28 */ stw r0, 0x28(r5)
/* 803A1ABC 0039EA1C 80 05 00 38 */ lwz r0, 0x38(r5)
/* 803A1AC0 0039EA20 90 05 00 2C */ stw r0, 0x2c(r5)
/* 803A1AC4 0039EA24 80 85 00 3C */ lwz r4, 0x3c(r5)
/* 803A1AC8 0039EA28 80 05 00 40 */ lwz r0, 0x40(r5)
/* 803A1ACC 0039EA2C 90 85 00 30 */ stw r4, 0x30(r5)
/* 803A1AD0 0039EA30 90 05 00 34 */ stw r0, 0x34(r5)
/* 803A1AD4 0039EA34 80 05 00 44 */ lwz r0, 0x44(r5)
/* 803A1AD8 0039EA38 90 05 00 38 */ stw r0, 0x38(r5)
/* 803A1ADC 0039EA3C 80 85 00 48 */ lwz r4, 0x48(r5)
/* 803A1AE0 0039EA40 80 05 00 4C */ lwz r0, 0x4c(r5)
/* 803A1AE4 0039EA44 90 85 00 3C */ stw r4, 0x3c(r5)
/* 803A1AE8 0039EA48 90 05 00 40 */ stw r0, 0x40(r5)
/* 803A1AEC 0039EA4C 80 05 00 50 */ lwz r0, 0x50(r5)
/* 803A1AF0 0039EA50 90 05 00 44 */ stw r0, 0x44(r5)
/* 803A1AF4 0039EA54 80 85 00 54 */ lwz r4, 0x54(r5)
/* 803A1AF8 0039EA58 80 05 00 58 */ lwz r0, 0x58(r5)
/* 803A1AFC 0039EA5C 90 85 00 48 */ stw r4, 0x48(r5)
/* 803A1B00 0039EA60 90 05 00 4C */ stw r0, 0x4c(r5)
/* 803A1B04 0039EA64 80 05 00 5C */ lwz r0, 0x5c(r5)
/* 803A1B08 0039EA68 90 05 00 50 */ stw r0, 0x50(r5)
/* 803A1B0C 0039EA6C 38 A5 00 60 */ addi r5, r5, 0x60
/* 803A1B10 0039EA70 42 00 FF 3C */ bdnz lbl_803A1A4C
/* 803A1B14 0039EA74 70 63 00 07 */ andi. r3, r3, 7
/* 803A1B18 0039EA78 41 82 00 28 */ beq lbl_803A1B40
lbl_803A1B1C:
/* 803A1B1C 0039EA7C 7C 69 03 A6 */ mtctr r3
lbl_803A1B20:
/* 803A1B20 0039EA80 80 85 00 00 */ lwz r4, 0(r5)
/* 803A1B24 0039EA84 80 05 00 04 */ lwz r0, 4(r5)
/* 803A1B28 0039EA88 90 85 FF F4 */ stw r4, -0xc(r5)
/* 803A1B2C 0039EA8C 90 05 FF F8 */ stw r0, -8(r5)
/* 803A1B30 0039EA90 80 05 00 08 */ lwz r0, 8(r5)
/* 803A1B34 0039EA94 90 05 FF FC */ stw r0, -4(r5)
/* 803A1B38 0039EA98 38 A5 00 0C */ addi r5, r5, 0xc
/* 803A1B3C 0039EA9C 42 00 FF E4 */ bdnz lbl_803A1B20
lbl_803A1B40:
/* 803A1B40 0039EAA0 A0 6D AE DA */ lhz r3, dataSmpSDirNum@sda21(r13)
/* 803A1B44 0039EAA4 38 03 FF FF */ addi r0, r3, -1
/* 803A1B48 0039EAA8 B0 0D AE DA */ sth r0, dataSmpSDirNum@sda21(r13)
/* 803A1B4C 0039EAAC 48 01 35 39 */ bl hwEnableIrq
/* 803A1B50 0039EAB0 38 60 00 01 */ li r3, 1
/* 803A1B54 0039EAB4 48 00 00 0C */ b lbl_803A1B60
lbl_803A1B58:
/* 803A1B58 0039EAB8 48 01 35 2D */ bl hwEnableIrq
lbl_803A1B5C:
/* 803A1B5C 0039EABC 38 60 00 00 */ li r3, 0
lbl_803A1B60:
/* 803A1B60 0039EAC0 80 01 00 24 */ lwz r0, 0x24(r1)
/* 803A1B64 0039EAC4 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 803A1B68 0039EAC8 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 803A1B6C 0039EACC 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 803A1B70 0039EAD0 7C 08 03 A6 */ mtlr r0
/* 803A1B74 0039EAD4 38 21 00 20 */ addi r1, r1, 0x20
/* 803A1B78 0039EAD8 4E 80 00 20 */ blr
.global dataAddSampleReference
dataAddSampleReference:
/* 803A1B7C 0039EADC 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 803A1B80 0039EAE0 7C 08 02 A6 */ mflr r0
/* 803A1B84 0039EAE4 3C 80 80 56 */ lis r4, dataSmpSDirs@ha
/* 803A1B88 0039EAE8 54 63 04 3E */ clrlwi r3, r3, 0x10
/* 803A1B8C 0039EAEC 90 01 00 24 */ stw r0, 0x24(r1)
/* 803A1B90 0039EAF0 38 84 80 F8 */ addi r4, r4, dataSmpSDirs@l
/* 803A1B94 0039EAF4 38 A0 00 00 */ li r5, 0
/* 803A1B98 0039EAF8 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 803A1B9C 0039EAFC 3B E0 00 00 */ li r31, 0
/* 803A1BA0 0039EB00 A0 0D AE DA */ lhz r0, dataSmpSDirNum@sda21(r13)
/* 803A1BA4 0039EB04 7C 09 03 A6 */ mtctr r0
/* 803A1BA8 0039EB08 28 00 00 00 */ cmplwi r0, 0
/* 803A1BAC 0039EB0C 40 81 00 44 */ ble lbl_803A1BF0
lbl_803A1BB0:
/* 803A1BB0 0039EB10 80 C4 00 00 */ lwz r6, 0(r4)
/* 803A1BB4 0039EB14 48 00 00 24 */ b lbl_803A1BD8
lbl_803A1BB8:
/* 803A1BB8 0039EB18 7C 00 18 40 */ cmplw r0, r3
/* 803A1BBC 0039EB1C 40 82 00 18 */ bne lbl_803A1BD4
/* 803A1BC0 0039EB20 A0 06 00 02 */ lhz r0, 2(r6)
/* 803A1BC4 0039EB24 28 00 FF FF */ cmplwi r0, 0xffff
/* 803A1BC8 0039EB28 41 82 00 0C */ beq lbl_803A1BD4
/* 803A1BCC 0039EB2C 7C DF 33 78 */ mr r31, r6
/* 803A1BD0 0039EB30 48 00 00 20 */ b lbl_803A1BF0
lbl_803A1BD4:
/* 803A1BD4 0039EB34 38 C6 00 20 */ addi r6, r6, 0x20
lbl_803A1BD8:
/* 803A1BD8 0039EB38 A0 06 00 00 */ lhz r0, 0(r6)
/* 803A1BDC 0039EB3C 28 00 FF FF */ cmplwi r0, 0xffff
/* 803A1BE0 0039EB40 40 82 FF D8 */ bne lbl_803A1BB8
/* 803A1BE4 0039EB44 38 84 00 0C */ addi r4, r4, 0xc
/* 803A1BE8 0039EB48 38 A5 00 01 */ addi r5, r5, 1
/* 803A1BEC 0039EB4C 42 00 FF C4 */ bdnz lbl_803A1BB0
lbl_803A1BF0:
/* 803A1BF0 0039EB50 A0 1F 00 02 */ lhz r0, 2(r31)
/* 803A1BF4 0039EB54 28 00 00 00 */ cmplwi r0, 0
/* 803A1BF8 0039EB58 40 82 00 38 */ bne lbl_803A1C30
/* 803A1BFC 0039EB5C 1C 65 00 0C */ mulli r3, r5, 0xc
/* 803A1C00 0039EB60 3C 80 80 56 */ lis r4, dataSmpSDirs@ha
/* 803A1C04 0039EB64 80 DF 00 04 */ lwz r6, 4(r31)
/* 803A1C08 0039EB68 38 1F 00 0C */ addi r0, r31, 0xc
/* 803A1C0C 0039EB6C 38 84 80 F8 */ addi r4, r4, dataSmpSDirs@l
/* 803A1C10 0039EB70 7C 64 1A 14 */ add r3, r4, r3
/* 803A1C14 0039EB74 80 A3 00 04 */ lwz r5, 4(r3)
/* 803A1C18 0039EB78 38 61 00 08 */ addi r3, r1, 8
/* 803A1C1C 0039EB7C 38 9F 00 08 */ addi r4, r31, 8
/* 803A1C20 0039EB80 7C A6 2A 14 */ add r5, r6, r5
/* 803A1C24 0039EB84 90 BF 00 08 */ stw r5, 8(r31)
/* 803A1C28 0039EB88 90 01 00 08 */ stw r0, 8(r1)
/* 803A1C2C 0039EB8C 48 01 21 81 */ bl hwSaveSample
lbl_803A1C30:
/* 803A1C30 0039EB90 A0 9F 00 02 */ lhz r4, 2(r31)
/* 803A1C34 0039EB94 38 60 00 01 */ li r3, 1
/* 803A1C38 0039EB98 38 04 00 01 */ addi r0, r4, 1
/* 803A1C3C 0039EB9C B0 1F 00 02 */ sth r0, 2(r31)
/* 803A1C40 0039EBA0 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 803A1C44 0039EBA4 80 01 00 24 */ lwz r0, 0x24(r1)
/* 803A1C48 0039EBA8 7C 08 03 A6 */ mtlr r0
/* 803A1C4C 0039EBAC 38 21 00 20 */ addi r1, r1, 0x20
/* 803A1C50 0039EBB0 4E 80 00 20 */ blr
.global dataRemoveSampleReference
dataRemoveSampleReference:
/* 803A1C54 0039EBB4 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 803A1C58 0039EBB8 7C 08 02 A6 */ mflr r0
/* 803A1C5C 0039EBBC 3C 80 80 56 */ lis r4, dataSmpSDirs@ha
/* 803A1C60 0039EBC0 90 01 00 14 */ stw r0, 0x14(r1)
/* 803A1C64 0039EBC4 38 84 80 F8 */ addi r4, r4, dataSmpSDirs@l
/* 803A1C68 0039EBC8 54 60 04 3E */ clrlwi r0, r3, 0x10
/* 803A1C6C 0039EBCC A0 AD AE DA */ lhz r5, dataSmpSDirNum@sda21(r13)
/* 803A1C70 0039EBD0 7C A9 03 A6 */ mtctr r5
/* 803A1C74 0039EBD4 28 05 00 00 */ cmplwi r5, 0
/* 803A1C78 0039EBD8 40 81 00 60 */ ble lbl_803A1CD8
lbl_803A1C7C:
/* 803A1C7C 0039EBDC 80 A4 00 00 */ lwz r5, 0(r4)
/* 803A1C80 0039EBE0 48 00 00 44 */ b lbl_803A1CC4
lbl_803A1C84:
/* 803A1C84 0039EBE4 7C 03 00 40 */ cmplw r3, r0
/* 803A1C88 0039EBE8 40 82 00 38 */ bne lbl_803A1CC0
/* 803A1C8C 0039EBEC A0 65 00 02 */ lhz r3, 2(r5)
/* 803A1C90 0039EBF0 28 03 FF FF */ cmplwi r3, 0xffff
/* 803A1C94 0039EBF4 41 82 00 2C */ beq lbl_803A1CC0
/* 803A1C98 0039EBF8 38 03 FF FF */ addi r0, r3, -1
/* 803A1C9C 0039EBFC B0 05 00 02 */ sth r0, 2(r5)
/* 803A1CA0 0039EC00 A0 05 00 02 */ lhz r0, 2(r5)
/* 803A1CA4 0039EC04 28 00 00 00 */ cmplwi r0, 0
/* 803A1CA8 0039EC08 40 82 00 10 */ bne lbl_803A1CB8
/* 803A1CAC 0039EC0C 80 85 00 08 */ lwz r4, 8(r5)
/* 803A1CB0 0039EC10 38 65 00 0C */ addi r3, r5, 0xc
/* 803A1CB4 0039EC14 48 01 21 AD */ bl hwRemoveSample
lbl_803A1CB8:
/* 803A1CB8 0039EC18 38 60 00 01 */ li r3, 1
/* 803A1CBC 0039EC1C 48 00 00 20 */ b lbl_803A1CDC
lbl_803A1CC0:
/* 803A1CC0 0039EC20 38 A5 00 20 */ addi r5, r5, 0x20
lbl_803A1CC4:
/* 803A1CC4 0039EC24 A0 65 00 00 */ lhz r3, 0(r5)
/* 803A1CC8 0039EC28 28 03 FF FF */ cmplwi r3, 0xffff
/* 803A1CCC 0039EC2C 40 82 FF B8 */ bne lbl_803A1C84
/* 803A1CD0 0039EC30 38 84 00 0C */ addi r4, r4, 0xc
/* 803A1CD4 0039EC34 42 00 FF A8 */ bdnz lbl_803A1C7C
lbl_803A1CD8:
/* 803A1CD8 0039EC38 38 60 00 00 */ li r3, 0
lbl_803A1CDC:
/* 803A1CDC 0039EC3C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 803A1CE0 0039EC40 7C 08 03 A6 */ mtlr r0
/* 803A1CE4 0039EC44 38 21 00 10 */ addi r1, r1, 0x10
/* 803A1CE8 0039EC48 4E 80 00 20 */ blr
.global dataInsertFX
dataInsertFX:
/* 803A1CEC 0039EC4C 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 803A1CF0 0039EC50 7C 08 02 A6 */ mflr r0
/* 803A1CF4 0039EC54 3C C0 80 56 */ lis r6, dataFXGroups@ha
/* 803A1CF8 0039EC58 90 01 00 24 */ stw r0, 0x24(r1)
/* 803A1CFC 0039EC5C 38 C6 86 F8 */ addi r6, r6, dataFXGroups@l
/* 803A1D00 0039EC60 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 803A1D04 0039EC64 7C BF 2B 78 */ mr r31, r5
/* 803A1D08 0039EC68 93 C1 00 18 */ stw r30, 0x18(r1)
/* 803A1D0C 0039EC6C 7C 9E 23 78 */ mr r30, r4
/* 803A1D10 0039EC70 38 80 00 00 */ li r4, 0
/* 803A1D14 0039EC74 93 A1 00 14 */ stw r29, 0x14(r1)
/* 803A1D18 0039EC78 7C 7D 1B 78 */ mr r29, r3
/* 803A1D1C 0039EC7C 54 63 04 3E */ clrlwi r3, r3, 0x10
/* 803A1D20 0039EC80 A0 ED AE D0 */ lhz r7, dataFXGroupNum@sda21(r13)
/* 803A1D24 0039EC84 48 00 00 0C */ b lbl_803A1D30
lbl_803A1D28:
/* 803A1D28 0039EC88 38 C6 00 08 */ addi r6, r6, 8
/* 803A1D2C 0039EC8C 38 84 00 01 */ addi r4, r4, 1
lbl_803A1D30:
/* 803A1D30 0039EC90 7C 04 38 00 */ cmpw r4, r7
/* 803A1D34 0039EC94 40 80 00 10 */ bge lbl_803A1D44
/* 803A1D38 0039EC98 A0 06 00 00 */ lhz r0, 0(r6)
/* 803A1D3C 0039EC9C 7C 03 00 40 */ cmplw r3, r0
/* 803A1D40 0039ECA0 40 82 FF E8 */ bne lbl_803A1D28
lbl_803A1D44:
/* 803A1D44 0039ECA4 7C 04 38 00 */ cmpw r4, r7
/* 803A1D48 0039ECA8 40 82 00 A0 */ bne lbl_803A1DE8
/* 803A1D4C 0039ECAC 28 07 00 80 */ cmplwi r7, 0x80
/* 803A1D50 0039ECB0 40 80 00 98 */ bge lbl_803A1DE8
/* 803A1D54 0039ECB4 48 01 33 69 */ bl hwDisableIrq
/* 803A1D58 0039ECB8 A0 0D AE D0 */ lhz r0, dataFXGroupNum@sda21(r13)
/* 803A1D5C 0039ECBC 3C 80 80 56 */ lis r4, dataFXGroups@ha
/* 803A1D60 0039ECC0 38 84 86 F8 */ addi r4, r4, dataFXGroups@l
/* 803A1D64 0039ECC4 57 E5 04 3F */ clrlwi. r5, r31, 0x10
/* 803A1D68 0039ECC8 54 00 18 38 */ slwi r0, r0, 3
/* 803A1D6C 0039ECCC 38 60 00 1F */ li r3, 0x1f
/* 803A1D70 0039ECD0 7F A4 03 2E */ sthx r29, r4, r0
/* 803A1D74 0039ECD4 7C 84 02 14 */ add r4, r4, r0
/* 803A1D78 0039ECD8 B3 E4 00 02 */ sth r31, 2(r4)
/* 803A1D7C 0039ECDC 93 C4 00 04 */ stw r30, 4(r4)
/* 803A1D80 0039ECE0 40 81 00 50 */ ble lbl_803A1DD0
/* 803A1D84 0039ECE4 54 A0 E8 FF */ rlwinm. r0, r5, 0x1d, 3, 0x1f
/* 803A1D88 0039ECE8 7C 09 03 A6 */ mtctr r0
/* 803A1D8C 0039ECEC 41 82 00 34 */ beq lbl_803A1DC0
lbl_803A1D90:
/* 803A1D90 0039ECF0 98 7E 00 09 */ stb r3, 9(r30)
/* 803A1D94 0039ECF4 98 7E 00 13 */ stb r3, 0x13(r30)
/* 803A1D98 0039ECF8 98 7E 00 1D */ stb r3, 0x1d(r30)
/* 803A1D9C 0039ECFC 98 7E 00 27 */ stb r3, 0x27(r30)
/* 803A1DA0 0039ED00 98 7E 00 31 */ stb r3, 0x31(r30)
/* 803A1DA4 0039ED04 98 7E 00 3B */ stb r3, 0x3b(r30)
/* 803A1DA8 0039ED08 98 7E 00 45 */ stb r3, 0x45(r30)
/* 803A1DAC 0039ED0C 98 7E 00 4F */ stb r3, 0x4f(r30)
/* 803A1DB0 0039ED10 3B DE 00 50 */ addi r30, r30, 0x50
/* 803A1DB4 0039ED14 42 00 FF DC */ bdnz lbl_803A1D90
/* 803A1DB8 0039ED18 70 A5 00 07 */ andi. r5, r5, 7
/* 803A1DBC 0039ED1C 41 82 00 14 */ beq lbl_803A1DD0
lbl_803A1DC0:
/* 803A1DC0 0039ED20 7C A9 03 A6 */ mtctr r5
lbl_803A1DC4:
/* 803A1DC4 0039ED24 98 7E 00 09 */ stb r3, 9(r30)
/* 803A1DC8 0039ED28 3B DE 00 0A */ addi r30, r30, 0xa
/* 803A1DCC 0039ED2C 42 00 FF F8 */ bdnz lbl_803A1DC4
lbl_803A1DD0:
/* 803A1DD0 0039ED30 A0 6D AE D0 */ lhz r3, dataFXGroupNum@sda21(r13)
/* 803A1DD4 0039ED34 38 03 00 01 */ addi r0, r3, 1
/* 803A1DD8 0039ED38 B0 0D AE D0 */ sth r0, dataFXGroupNum@sda21(r13)
/* 803A1DDC 0039ED3C 48 01 32 A9 */ bl hwEnableIrq
/* 803A1DE0 0039ED40 38 60 00 01 */ li r3, 1
/* 803A1DE4 0039ED44 48 00 00 08 */ b lbl_803A1DEC
lbl_803A1DE8:
/* 803A1DE8 0039ED48 38 60 00 00 */ li r3, 0
lbl_803A1DEC:
/* 803A1DEC 0039ED4C 80 01 00 24 */ lwz r0, 0x24(r1)
/* 803A1DF0 0039ED50 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 803A1DF4 0039ED54 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 803A1DF8 0039ED58 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 803A1DFC 0039ED5C 7C 08 03 A6 */ mtlr r0
/* 803A1E00 0039ED60 38 21 00 20 */ addi r1, r1, 0x20
/* 803A1E04 0039ED64 4E 80 00 20 */ blr
.global dataRemoveFX
dataRemoveFX:
/* 803A1E08 0039ED68 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 803A1E0C 0039ED6C 7C 08 02 A6 */ mflr r0
/* 803A1E10 0039ED70 3C 80 80 56 */ lis r4, dataFXGroups@ha
/* 803A1E14 0039ED74 54 63 04 3E */ clrlwi r3, r3, 0x10
/* 803A1E18 0039ED78 90 01 00 14 */ stw r0, 0x14(r1)
/* 803A1E1C 0039ED7C 38 84 86 F8 */ addi r4, r4, dataFXGroups@l
/* 803A1E20 0039ED80 93 E1 00 0C */ stw r31, 0xc(r1)
/* 803A1E24 0039ED84 3B E0 00 00 */ li r31, 0
/* 803A1E28 0039ED88 A0 AD AE D0 */ lhz r5, dataFXGroupNum@sda21(r13)
/* 803A1E2C 0039ED8C 48 00 00 0C */ b lbl_803A1E38
lbl_803A1E30:
/* 803A1E30 0039ED90 38 84 00 08 */ addi r4, r4, 8
/* 803A1E34 0039ED94 3B FF 00 01 */ addi r31, r31, 1
lbl_803A1E38:
/* 803A1E38 0039ED98 7C 1F 28 00 */ cmpw r31, r5
/* 803A1E3C 0039ED9C 40 80 00 10 */ bge lbl_803A1E4C
/* 803A1E40 0039EDA0 A0 04 00 00 */ lhz r0, 0(r4)
/* 803A1E44 0039EDA4 7C 03 00 40 */ cmplw r3, r0
/* 803A1E48 0039EDA8 40 82 FF E8 */ bne lbl_803A1E30
lbl_803A1E4C:
/* 803A1E4C 0039EDAC 7C 1F 28 00 */ cmpw r31, r5
/* 803A1E50 0039EDB0 41 82 00 FC */ beq lbl_803A1F4C
/* 803A1E54 0039EDB4 48 01 32 69 */ bl hwDisableIrq
/* 803A1E58 0039EDB8 A0 AD AE D0 */ lhz r5, dataFXGroupNum@sda21(r13)
/* 803A1E5C 0039EDBC 38 DF 00 01 */ addi r6, r31, 1
/* 803A1E60 0039EDC0 3C 60 80 56 */ lis r3, dataFXGroups@ha
/* 803A1E64 0039EDC4 7C 06 28 00 */ cmpw r6, r5
/* 803A1E68 0039EDC8 54 C4 18 38 */ slwi r4, r6, 3
/* 803A1E6C 0039EDCC 38 03 86 F8 */ addi r0, r3, dataFXGroups@l
/* 803A1E70 0039EDD0 7C 66 28 50 */ subf r3, r6, r5
/* 803A1E74 0039EDD4 7C A0 22 14 */ add r5, r0, r4
/* 803A1E78 0039EDD8 40 80 00 BC */ bge lbl_803A1F34
/* 803A1E7C 0039EDDC 54 60 E8 FF */ rlwinm. r0, r3, 0x1d, 3, 0x1f
/* 803A1E80 0039EDE0 7C 09 03 A6 */ mtctr r0
/* 803A1E84 0039EDE4 41 82 00 94 */ beq lbl_803A1F18
lbl_803A1E88:
/* 803A1E88 0039EDE8 80 85 00 00 */ lwz r4, 0(r5)
/* 803A1E8C 0039EDEC 80 05 00 04 */ lwz r0, 4(r5)
/* 803A1E90 0039EDF0 90 85 FF F8 */ stw r4, -8(r5)
/* 803A1E94 0039EDF4 90 05 FF FC */ stw r0, -4(r5)
/* 803A1E98 0039EDF8 80 85 00 08 */ lwz r4, 8(r5)
/* 803A1E9C 0039EDFC 80 05 00 0C */ lwz r0, 0xc(r5)
/* 803A1EA0 0039EE00 90 85 00 00 */ stw r4, 0(r5)
/* 803A1EA4 0039EE04 90 05 00 04 */ stw r0, 4(r5)
/* 803A1EA8 0039EE08 80 85 00 10 */ lwz r4, 0x10(r5)
/* 803A1EAC 0039EE0C 80 05 00 14 */ lwz r0, 0x14(r5)
/* 803A1EB0 0039EE10 90 85 00 08 */ stw r4, 8(r5)
/* 803A1EB4 0039EE14 90 05 00 0C */ stw r0, 0xc(r5)
/* 803A1EB8 0039EE18 80 85 00 18 */ lwz r4, 0x18(r5)
/* 803A1EBC 0039EE1C 80 05 00 1C */ lwz r0, 0x1c(r5)
/* 803A1EC0 0039EE20 90 85 00 10 */ stw r4, 0x10(r5)
/* 803A1EC4 0039EE24 90 05 00 14 */ stw r0, 0x14(r5)
/* 803A1EC8 0039EE28 80 85 00 20 */ lwz r4, 0x20(r5)
/* 803A1ECC 0039EE2C 80 05 00 24 */ lwz r0, 0x24(r5)
/* 803A1ED0 0039EE30 90 85 00 18 */ stw r4, 0x18(r5)
/* 803A1ED4 0039EE34 90 05 00 1C */ stw r0, 0x1c(r5)
/* 803A1ED8 0039EE38 80 85 00 28 */ lwz r4, 0x28(r5)
/* 803A1EDC 0039EE3C 80 05 00 2C */ lwz r0, 0x2c(r5)
/* 803A1EE0 0039EE40 90 85 00 20 */ stw r4, 0x20(r5)
/* 803A1EE4 0039EE44 90 05 00 24 */ stw r0, 0x24(r5)
/* 803A1EE8 0039EE48 80 85 00 30 */ lwz r4, 0x30(r5)
/* 803A1EEC 0039EE4C 80 05 00 34 */ lwz r0, 0x34(r5)
/* 803A1EF0 0039EE50 90 85 00 28 */ stw r4, 0x28(r5)
/* 803A1EF4 0039EE54 90 05 00 2C */ stw r0, 0x2c(r5)
/* 803A1EF8 0039EE58 80 85 00 38 */ lwz r4, 0x38(r5)
/* 803A1EFC 0039EE5C 80 05 00 3C */ lwz r0, 0x3c(r5)
/* 803A1F00 0039EE60 90 85 00 30 */ stw r4, 0x30(r5)
/* 803A1F04 0039EE64 90 05 00 34 */ stw r0, 0x34(r5)
/* 803A1F08 0039EE68 38 A5 00 40 */ addi r5, r5, 0x40
/* 803A1F0C 0039EE6C 42 00 FF 7C */ bdnz lbl_803A1E88
/* 803A1F10 0039EE70 70 63 00 07 */ andi. r3, r3, 7
/* 803A1F14 0039EE74 41 82 00 20 */ beq lbl_803A1F34
lbl_803A1F18:
/* 803A1F18 0039EE78 7C 69 03 A6 */ mtctr r3
lbl_803A1F1C:
/* 803A1F1C 0039EE7C 80 85 00 00 */ lwz r4, 0(r5)
/* 803A1F20 0039EE80 80 05 00 04 */ lwz r0, 4(r5)
/* 803A1F24 0039EE84 90 85 FF F8 */ stw r4, -8(r5)
/* 803A1F28 0039EE88 90 05 FF FC */ stw r0, -4(r5)
/* 803A1F2C 0039EE8C 38 A5 00 08 */ addi r5, r5, 8
/* 803A1F30 0039EE90 42 00 FF EC */ bdnz lbl_803A1F1C
lbl_803A1F34:
/* 803A1F34 0039EE94 A0 6D AE D0 */ lhz r3, dataFXGroupNum@sda21(r13)
/* 803A1F38 0039EE98 38 03 FF FF */ addi r0, r3, -1
/* 803A1F3C 0039EE9C B0 0D AE D0 */ sth r0, dataFXGroupNum@sda21(r13)
/* 803A1F40 0039EEA0 48 01 31 45 */ bl hwEnableIrq
/* 803A1F44 0039EEA4 38 60 00 01 */ li r3, 1
/* 803A1F48 0039EEA8 48 00 00 08 */ b lbl_803A1F50
lbl_803A1F4C:
/* 803A1F4C 0039EEAC 38 60 00 00 */ li r3, 0
lbl_803A1F50:
/* 803A1F50 0039EEB0 80 01 00 14 */ lwz r0, 0x14(r1)
/* 803A1F54 0039EEB4 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 803A1F58 0039EEB8 7C 08 03 A6 */ mtlr r0
/* 803A1F5C 0039EEBC 38 21 00 10 */ addi r1, r1, 0x10
/* 803A1F60 0039EEC0 4E 80 00 20 */ blr
.global dataInsertMacro
dataInsertMacro:
/* 803A1F64 0039EEC4 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 803A1F68 0039EEC8 7C 08 02 A6 */ mflr r0
/* 803A1F6C 0039EECC 90 01 00 14 */ stw r0, 0x14(r1)
/* 803A1F70 0039EED0 93 E1 00 0C */ stw r31, 0xc(r1)
/* 803A1F74 0039EED4 7C 9F 23 78 */ mr r31, r4
/* 803A1F78 0039EED8 93 C1 00 08 */ stw r30, 8(r1)
/* 803A1F7C 0039EEDC 7C 7E 1B 78 */ mr r30, r3
/* 803A1F80 0039EEE0 48 01 31 3D */ bl hwDisableIrq
/* 803A1F84 0039EEE4 3C 60 80 56 */ lis r3, dataMacMaintab@ha
/* 803A1F88 0039EEE8 57 C0 E5 3A */ rlwinm r0, r30, 0x1c, 0x14, 0x1d
/* 803A1F8C 0039EEEC 38 63 8A F8 */ addi r3, r3, dataMacMaintab@l
/* 803A1F90 0039EEF0 57 C6 04 3E */ clrlwi r6, r30, 0x10
/* 803A1F94 0039EEF4 7C E3 02 2E */ lhzx r7, r3, r0
/* 803A1F98 0039EEF8 28 07 00 00 */ cmplwi r7, 0
/* 803A1F9C 0039EEFC 40 82 00 1C */ bne lbl_803A1FB8
/* 803A1FA0 0039EF00 A0 AD AE D2 */ lhz r5, dataMacTotal@sda21(r13)
/* 803A1FA4 0039EF04 7C 83 02 14 */ add r4, r3, r0
/* 803A1FA8 0039EF08 B0 A4 00 02 */ sth r5, 2(r4)
/* 803A1FAC 0039EF0C 7C A8 2B 78 */ mr r8, r5
/* 803A1FB0 0039EF10 7C A4 2B 78 */ mr r4, r5
/* 803A1FB4 0039EF14 48 00 00 88 */ b lbl_803A203C
lbl_803A1FB8:
/* 803A1FB8 0039EF18 7C A3 02 14 */ add r5, r3, r0
/* 803A1FBC 0039EF1C 3C 80 80 56 */ lis r4, dataMacSubTabmem@ha
/* 803A1FC0 0039EF20 A1 05 00 02 */ lhz r8, 2(r5)
/* 803A1FC4 0039EF24 38 A4 92 F8 */ addi r5, r4, dataMacSubTabmem@l
/* 803A1FC8 0039EF28 39 20 00 00 */ li r9, 0
/* 803A1FCC 0039EF2C 48 00 00 08 */ b lbl_803A1FD4
lbl_803A1FD0:
/* 803A1FD0 0039EF30 39 29 00 01 */ addi r9, r9, 1
lbl_803A1FD4:
/* 803A1FD4 0039EF34 7C 09 38 00 */ cmpw r9, r7
/* 803A1FD8 0039EF38 40 80 00 1C */ bge lbl_803A1FF4
/* 803A1FDC 0039EF3C 7C 88 4A 14 */ add r4, r8, r9
/* 803A1FE0 0039EF40 54 84 18 38 */ slwi r4, r4, 3
/* 803A1FE4 0039EF44 7C 85 22 14 */ add r4, r5, r4
/* 803A1FE8 0039EF48 A0 84 00 04 */ lhz r4, 4(r4)
/* 803A1FEC 0039EF4C 7C 04 30 40 */ cmplw r4, r6
/* 803A1FF0 0039EF50 41 80 FF E0 */ blt lbl_803A1FD0
lbl_803A1FF4:
/* 803A1FF4 0039EF54 7C 09 38 00 */ cmpw r9, r7
/* 803A1FF8 0039EF58 40 80 00 40 */ bge lbl_803A2038
/* 803A1FFC 0039EF5C 7C 88 4A 14 */ add r4, r8, r9
/* 803A2000 0039EF60 3C A0 80 56 */ lis r5, dataMacSubTabmem@ha
/* 803A2004 0039EF64 38 A5 92 F8 */ addi r5, r5, dataMacSubTabmem@l
/* 803A2008 0039EF68 57 C7 04 3E */ clrlwi r7, r30, 0x10
/* 803A200C 0039EF6C 54 86 18 38 */ slwi r6, r4, 3
/* 803A2010 0039EF70 7C C5 32 14 */ add r6, r5, r6
/* 803A2014 0039EF74 A0 A6 00 04 */ lhz r5, 4(r6)
/* 803A2018 0039EF78 7C 07 28 40 */ cmplw r7, r5
/* 803A201C 0039EF7C 40 82 00 20 */ bne lbl_803A203C
/* 803A2020 0039EF80 A0 66 00 06 */ lhz r3, 6(r6)
/* 803A2024 0039EF84 38 03 00 01 */ addi r0, r3, 1
/* 803A2028 0039EF88 B0 06 00 06 */ sth r0, 6(r6)
/* 803A202C 0039EF8C 48 01 30 59 */ bl hwEnableIrq
/* 803A2030 0039EF90 38 60 00 00 */ li r3, 0
/* 803A2034 0039EF94 48 00 02 1C */ b lbl_803A2250
lbl_803A2038:
/* 803A2038 0039EF98 7C 88 4A 14 */ add r4, r8, r9
lbl_803A203C:
/* 803A203C 0039EF9C A0 AD AE D2 */ lhz r5, dataMacTotal@sda21(r13)
/* 803A2040 0039EFA0 28 05 08 00 */ cmplwi r5, 0x800
/* 803A2044 0039EFA4 40 80 02 04 */ bge lbl_803A2248
/* 803A2048 0039EFA8 3C C0 80 56 */ lis r6, dataMacMaintab@ha
/* 803A204C 0039EFAC 38 A0 00 40 */ li r5, 0x40
/* 803A2050 0039EFB0 38 C6 8A F8 */ addi r6, r6, dataMacMaintab@l
/* 803A2054 0039EFB4 38 E0 00 00 */ li r7, 0
/* 803A2058 0039EFB8 7C A9 03 A6 */ mtctr r5
lbl_803A205C:
/* 803A205C 0039EFBC A0 A6 00 02 */ lhz r5, 2(r6)
/* 803A2060 0039EFC0 7C 05 40 00 */ cmpw r5, r8
/* 803A2064 0039EFC4 40 81 00 0C */ ble lbl_803A2070
/* 803A2068 0039EFC8 38 A5 00 01 */ addi r5, r5, 1
/* 803A206C 0039EFCC B0 A6 00 02 */ sth r5, 2(r6)
lbl_803A2070:
/* 803A2070 0039EFD0 A0 A6 00 06 */ lhz r5, 6(r6)
/* 803A2074 0039EFD4 38 C6 00 04 */ addi r6, r6, 4
/* 803A2078 0039EFD8 7C 05 40 00 */ cmpw r5, r8
/* 803A207C 0039EFDC 40 81 00 0C */ ble lbl_803A2088
/* 803A2080 0039EFE0 38 A5 00 01 */ addi r5, r5, 1
/* 803A2084 0039EFE4 B0 A6 00 02 */ sth r5, 2(r6)
lbl_803A2088:
/* 803A2088 0039EFE8 A0 A6 00 06 */ lhz r5, 6(r6)
/* 803A208C 0039EFEC 38 C6 00 04 */ addi r6, r6, 4
/* 803A2090 0039EFF0 7C 05 40 00 */ cmpw r5, r8
/* 803A2094 0039EFF4 40 81 00 0C */ ble lbl_803A20A0
/* 803A2098 0039EFF8 38 A5 00 01 */ addi r5, r5, 1
/* 803A209C 0039EFFC B0 A6 00 02 */ sth r5, 2(r6)
lbl_803A20A0:
/* 803A20A0 0039F000 A0 A6 00 06 */ lhz r5, 6(r6)
/* 803A20A4 0039F004 38 C6 00 04 */ addi r6, r6, 4
/* 803A20A8 0039F008 7C 05 40 00 */ cmpw r5, r8
/* 803A20AC 0039F00C 40 81 00 0C */ ble lbl_803A20B8
/* 803A20B0 0039F010 38 A5 00 01 */ addi r5, r5, 1
/* 803A20B4 0039F014 B0 A6 00 02 */ sth r5, 2(r6)
lbl_803A20B8:
/* 803A20B8 0039F018 A0 A6 00 06 */ lhz r5, 6(r6)
/* 803A20BC 0039F01C 38 C6 00 04 */ addi r6, r6, 4
/* 803A20C0 0039F020 7C 05 40 00 */ cmpw r5, r8
/* 803A20C4 0039F024 40 81 00 0C */ ble lbl_803A20D0
/* 803A20C8 0039F028 38 A5 00 01 */ addi r5, r5, 1
/* 803A20CC 0039F02C B0 A6 00 02 */ sth r5, 2(r6)
lbl_803A20D0:
/* 803A20D0 0039F030 A0 A6 00 06 */ lhz r5, 6(r6)
/* 803A20D4 0039F034 38 C6 00 04 */ addi r6, r6, 4
/* 803A20D8 0039F038 7C 05 40 00 */ cmpw r5, r8
/* 803A20DC 0039F03C 40 81 00 0C */ ble lbl_803A20E8
/* 803A20E0 0039F040 38 A5 00 01 */ addi r5, r5, 1
/* 803A20E4 0039F044 B0 A6 00 02 */ sth r5, 2(r6)
lbl_803A20E8:
/* 803A20E8 0039F048 A0 A6 00 06 */ lhz r5, 6(r6)
/* 803A20EC 0039F04C 38 C6 00 04 */ addi r6, r6, 4
/* 803A20F0 0039F050 7C 05 40 00 */ cmpw r5, r8
/* 803A20F4 0039F054 40 81 00 0C */ ble lbl_803A2100
/* 803A20F8 0039F058 38 A5 00 01 */ addi r5, r5, 1
/* 803A20FC 0039F05C B0 A6 00 02 */ sth r5, 2(r6)
lbl_803A2100:
/* 803A2100 0039F060 A0 A6 00 06 */ lhz r5, 6(r6)
/* 803A2104 0039F064 38 C6 00 04 */ addi r6, r6, 4
/* 803A2108 0039F068 7C 05 40 00 */ cmpw r5, r8
/* 803A210C 0039F06C 40 81 00 0C */ ble lbl_803A2118
/* 803A2110 0039F070 38 A5 00 01 */ addi r5, r5, 1
/* 803A2114 0039F074 B0 A6 00 02 */ sth r5, 2(r6)
lbl_803A2118:
/* 803A2118 0039F078 38 C6 00 04 */ addi r6, r6, 4
/* 803A211C 0039F07C 38 E7 00 07 */ addi r7, r7, 7
/* 803A2120 0039F080 42 00 FF 3C */ bdnz lbl_803A205C
/* 803A2124 0039F084 A0 CD AE D2 */ lhz r6, dataMacTotal@sda21(r13)
/* 803A2128 0039F088 3C A0 80 56 */ lis r5, dataMacSubTabmem@ha
/* 803A212C 0039F08C 38 A5 92 F8 */ addi r5, r5, dataMacSubTabmem@l
/* 803A2130 0039F090 38 C6 FF FF */ addi r6, r6, -1
/* 803A2134 0039F094 7C 06 20 00 */ cmpw r6, r4
/* 803A2138 0039F098 54 C7 18 38 */ slwi r7, r6, 3
/* 803A213C 0039F09C 38 C6 00 01 */ addi r6, r6, 1
/* 803A2140 0039F0A0 7D 05 3A 14 */ add r8, r5, r7
/* 803A2144 0039F0A4 7C C4 30 50 */ subf r6, r4, r6
/* 803A2148 0039F0A8 41 80 00 BC */ blt lbl_803A2204
/* 803A214C 0039F0AC 54 C5 E8 FF */ rlwinm. r5, r6, 0x1d, 3, 0x1f
/* 803A2150 0039F0B0 7C A9 03 A6 */ mtctr r5
/* 803A2154 0039F0B4 41 82 00 94 */ beq lbl_803A21E8
lbl_803A2158:
/* 803A2158 0039F0B8 80 E8 00 00 */ lwz r7, 0(r8)
/* 803A215C 0039F0BC 80 A8 00 04 */ lwz r5, 4(r8)
/* 803A2160 0039F0C0 90 E8 00 08 */ stw r7, 8(r8)
/* 803A2164 0039F0C4 90 A8 00 0C */ stw r5, 0xc(r8)
/* 803A2168 0039F0C8 80 E8 FF F8 */ lwz r7, -8(r8)
/* 803A216C 0039F0CC 80 A8 FF FC */ lwz r5, -4(r8)
/* 803A2170 0039F0D0 90 E8 00 00 */ stw r7, 0(r8)
/* 803A2174 0039F0D4 90 A8 00 04 */ stw r5, 4(r8)
/* 803A2178 0039F0D8 80 E8 FF F0 */ lwz r7, -0x10(r8)
/* 803A217C 0039F0DC 80 A8 FF F4 */ lwz r5, -0xc(r8)
/* 803A2180 0039F0E0 90 E8 FF F8 */ stw r7, -8(r8)
/* 803A2184 0039F0E4 90 A8 FF FC */ stw r5, -4(r8)
/* 803A2188 0039F0E8 80 E8 FF E8 */ lwz r7, -0x18(r8)
/* 803A218C 0039F0EC 80 A8 FF EC */ lwz r5, -0x14(r8)
/* 803A2190 0039F0F0 90 E8 FF F0 */ stw r7, -0x10(r8)
/* 803A2194 0039F0F4 90 A8 FF F4 */ stw r5, -0xc(r8)
/* 803A2198 0039F0F8 80 E8 FF E0 */ lwz r7, -0x20(r8)
/* 803A219C 0039F0FC 80 A8 FF E4 */ lwz r5, -0x1c(r8)
/* 803A21A0 0039F100 90 E8 FF E8 */ stw r7, -0x18(r8)
/* 803A21A4 0039F104 90 A8 FF EC */ stw r5, -0x14(r8)
/* 803A21A8 0039F108 80 E8 FF D8 */ lwz r7, -0x28(r8)
/* 803A21AC 0039F10C 80 A8 FF DC */ lwz r5, -0x24(r8)
/* 803A21B0 0039F110 90 E8 FF E0 */ stw r7, -0x20(r8)
/* 803A21B4 0039F114 90 A8 FF E4 */ stw r5, -0x1c(r8)
/* 803A21B8 0039F118 80 E8 FF D0 */ lwz r7, -0x30(r8)
/* 803A21BC 0039F11C 80 A8 FF D4 */ lwz r5, -0x2c(r8)
/* 803A21C0 0039F120 90 E8 FF D8 */ stw r7, -0x28(r8)
/* 803A21C4 0039F124 90 A8 FF DC */ stw r5, -0x24(r8)
/* 803A21C8 0039F128 80 E8 FF C8 */ lwz r7, -0x38(r8)
/* 803A21CC 0039F12C 80 A8 FF CC */ lwz r5, -0x34(r8)
/* 803A21D0 0039F130 90 E8 FF D0 */ stw r7, -0x30(r8)
/* 803A21D4 0039F134 90 A8 FF D4 */ stw r5, -0x2c(r8)
/* 803A21D8 0039F138 39 08 FF C0 */ addi r8, r8, -64
/* 803A21DC 0039F13C 42 00 FF 7C */ bdnz lbl_803A2158
/* 803A21E0 0039F140 70 C6 00 07 */ andi. r6, r6, 7
/* 803A21E4 0039F144 41 82 00 20 */ beq lbl_803A2204
lbl_803A21E8:
/* 803A21E8 0039F148 7C C9 03 A6 */ mtctr r6
lbl_803A21EC:
/* 803A21EC 0039F14C 80 E8 00 00 */ lwz r7, 0(r8)
/* 803A21F0 0039F150 80 A8 00 04 */ lwz r5, 4(r8)
/* 803A21F4 0039F154 90 E8 00 08 */ stw r7, 8(r8)
/* 803A21F8 0039F158 90 A8 00 0C */ stw r5, 0xc(r8)
/* 803A21FC 0039F15C 39 08 FF F8 */ addi r8, r8, -8
/* 803A2200 0039F160 42 00 FF EC */ bdnz lbl_803A21EC
lbl_803A2204:
/* 803A2204 0039F164 3C C0 80 56 */ lis r6, dataMacSubTabmem@ha
/* 803A2208 0039F168 7C A3 02 2E */ lhzx r5, r3, r0
/* 803A220C 0039F16C 39 06 92 F8 */ addi r8, r6, dataMacSubTabmem@l
/* 803A2210 0039F170 54 89 18 38 */ slwi r9, r4, 3
/* 803A2214 0039F174 7C E8 4A 14 */ add r7, r8, r9
/* 803A2218 0039F178 A0 8D AE D2 */ lhz r4, dataMacTotal@sda21(r13)
/* 803A221C 0039F17C B3 C7 00 04 */ sth r30, 4(r7)
/* 803A2220 0039F180 38 A5 00 01 */ addi r5, r5, 1
/* 803A2224 0039F184 38 84 00 01 */ addi r4, r4, 1
/* 803A2228 0039F188 38 C0 00 01 */ li r6, 1
/* 803A222C 0039F18C 7F E8 49 2E */ stwx r31, r8, r9
/* 803A2230 0039F190 B0 C7 00 06 */ sth r6, 6(r7)
/* 803A2234 0039F194 7C A3 03 2E */ sthx r5, r3, r0
/* 803A2238 0039F198 B0 8D AE D2 */ sth r4, dataMacTotal@sda21(r13)
/* 803A223C 0039F19C 48 01 2E 49 */ bl hwEnableIrq
/* 803A2240 0039F1A0 38 60 00 01 */ li r3, 1
/* 803A2244 0039F1A4 48 00 00 0C */ b lbl_803A2250
lbl_803A2248:
/* 803A2248 0039F1A8 48 01 2E 3D */ bl hwEnableIrq
/* 803A224C 0039F1AC 38 60 00 00 */ li r3, 0
lbl_803A2250:
/* 803A2250 0039F1B0 80 01 00 14 */ lwz r0, 0x14(r1)
/* 803A2254 0039F1B4 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 803A2258 0039F1B8 83 C1 00 08 */ lwz r30, 8(r1)
/* 803A225C 0039F1BC 7C 08 03 A6 */ mtlr r0
/* 803A2260 0039F1C0 38 21 00 10 */ addi r1, r1, 0x10
/* 803A2264 0039F1C4 4E 80 00 20 */ blr
.global dataRemoveMacro
dataRemoveMacro:
/* 803A2268 0039F1C8 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 803A226C 0039F1CC 7C 08 02 A6 */ mflr r0
/* 803A2270 0039F1D0 90 01 00 14 */ stw r0, 0x14(r1)
/* 803A2274 0039F1D4 93 E1 00 0C */ stw r31, 0xc(r1)
/* 803A2278 0039F1D8 7C 7F 1B 78 */ mr r31, r3
/* 803A227C 0039F1DC 48 01 2E 41 */ bl hwDisableIrq
/* 803A2280 0039F1E0 3C 60 80 56 */ lis r3, dataMacMaintab@ha
/* 803A2284 0039F1E4 57 E0 E5 3A */ rlwinm r0, r31, 0x1c, 0x14, 0x1d
/* 803A2288 0039F1E8 38 63 8A F8 */ addi r3, r3, dataMacMaintab@l
/* 803A228C 0039F1EC 57 E7 04 3E */ clrlwi r7, r31, 0x10
/* 803A2290 0039F1F0 7D 03 02 2E */ lhzx r8, r3, r0
/* 803A2294 0039F1F4 28 08 00 00 */ cmplwi r8, 0
/* 803A2298 0039F1F8 41 82 02 38 */ beq lbl_803A24D0
/* 803A229C 0039F1FC 7C 83 02 14 */ add r4, r3, r0
/* 803A22A0 0039F200 3C A0 80 56 */ lis r5, dataMacSubTabmem@ha
/* 803A22A4 0039F204 A0 84 00 02 */ lhz r4, 2(r4)
/* 803A22A8 0039F208 38 C5 92 F8 */ addi r6, r5, dataMacSubTabmem@l
/* 803A22AC 0039F20C 39 20 00 00 */ li r9, 0
/* 803A22B0 0039F210 48 00 00 08 */ b lbl_803A22B8
lbl_803A22B4:
/* 803A22B4 0039F214 39 29 00 01 */ addi r9, r9, 1
lbl_803A22B8:
/* 803A22B8 0039F218 7C 09 40 00 */ cmpw r9, r8
/* 803A22BC 0039F21C 40 80 00 1C */ bge lbl_803A22D8
/* 803A22C0 0039F220 7C A4 4A 14 */ add r5, r4, r9
/* 803A22C4 0039F224 54 A5 18 38 */ slwi r5, r5, 3
/* 803A22C8 0039F228 7C A6 2A 14 */ add r5, r6, r5
/* 803A22CC 0039F22C A0 A5 00 04 */ lhz r5, 4(r5)
/* 803A22D0 0039F230 7C 07 28 40 */ cmplw r7, r5
/* 803A22D4 0039F234 40 82 FF E0 */ bne lbl_803A22B4
lbl_803A22D8:
/* 803A22D8 0039F238 7C 09 40 00 */ cmpw r9, r8
/* 803A22DC 0039F23C 40 80 01 F4 */ bge lbl_803A24D0
/* 803A22E0 0039F240 3C A0 80 56 */ lis r5, dataMacSubTabmem@ha
/* 803A22E4 0039F244 7D 24 4A 14 */ add r9, r4, r9
/* 803A22E8 0039F248 39 05 92 F8 */ addi r8, r5, dataMacSubTabmem@l
/* 803A22EC 0039F24C 55 25 18 38 */ slwi r5, r9, 3
/* 803A22F0 0039F250 7C E8 2A 14 */ add r7, r8, r5
/* 803A22F4 0039F254 A0 A7 00 06 */ lhz r5, 6(r7)
/* 803A22F8 0039F258 38 C5 FF FF */ addi r6, r5, -1
/* 803A22FC 0039F25C 54 C5 04 3F */ clrlwi. r5, r6, 0x10
/* 803A2300 0039F260 B0 C7 00 06 */ sth r6, 6(r7)
/* 803A2304 0039F264 40 82 01 CC */ bne lbl_803A24D0
/* 803A2308 0039F268 A0 CD AE D2 */ lhz r6, dataMacTotal@sda21(r13)
/* 803A230C 0039F26C 38 E9 00 01 */ addi r7, r9, 1
/* 803A2310 0039F270 54 E5 18 38 */ slwi r5, r7, 3
/* 803A2314 0039F274 7C 07 30 00 */ cmpw r7, r6
/* 803A2318 0039F278 7C C7 30 50 */ subf r6, r7, r6
/* 803A231C 0039F27C 7D 08 2A 14 */ add r8, r8, r5
/* 803A2320 0039F280 40 80 00 BC */ bge lbl_803A23DC
/* 803A2324 0039F284 54 C5 E8 FF */ rlwinm. r5, r6, 0x1d, 3, 0x1f
/* 803A2328 0039F288 7C A9 03 A6 */ mtctr r5
/* 803A232C 0039F28C 41 82 00 94 */ beq lbl_803A23C0
lbl_803A2330:
/* 803A2330 0039F290 80 E8 00 00 */ lwz r7, 0(r8)
/* 803A2334 0039F294 80 A8 00 04 */ lwz r5, 4(r8)
/* 803A2338 0039F298 90 E8 FF F8 */ stw r7, -8(r8)
/* 803A233C 0039F29C 90 A8 FF FC */ stw r5, -4(r8)
/* 803A2340 0039F2A0 80 E8 00 08 */ lwz r7, 8(r8)
/* 803A2344 0039F2A4 80 A8 00 0C */ lwz r5, 0xc(r8)
/* 803A2348 0039F2A8 90 E8 00 00 */ stw r7, 0(r8)
/* 803A234C 0039F2AC 90 A8 00 04 */ stw r5, 4(r8)
/* 803A2350 0039F2B0 80 E8 00 10 */ lwz r7, 0x10(r8)
/* 803A2354 0039F2B4 80 A8 00 14 */ lwz r5, 0x14(r8)
/* 803A2358 0039F2B8 90 E8 00 08 */ stw r7, 8(r8)
/* 803A235C 0039F2BC 90 A8 00 0C */ stw r5, 0xc(r8)
/* 803A2360 0039F2C0 80 E8 00 18 */ lwz r7, 0x18(r8)
/* 803A2364 0039F2C4 80 A8 00 1C */ lwz r5, 0x1c(r8)
/* 803A2368 0039F2C8 90 E8 00 10 */ stw r7, 0x10(r8)
/* 803A236C 0039F2CC 90 A8 00 14 */ stw r5, 0x14(r8)
/* 803A2370 0039F2D0 80 E8 00 20 */ lwz r7, 0x20(r8)
/* 803A2374 0039F2D4 80 A8 00 24 */ lwz r5, 0x24(r8)
/* 803A2378 0039F2D8 90 E8 00 18 */ stw r7, 0x18(r8)
/* 803A237C 0039F2DC 90 A8 00 1C */ stw r5, 0x1c(r8)
/* 803A2380 0039F2E0 80 E8 00 28 */ lwz r7, 0x28(r8)
/* 803A2384 0039F2E4 80 A8 00 2C */ lwz r5, 0x2c(r8)
/* 803A2388 0039F2E8 90 E8 00 20 */ stw r7, 0x20(r8)
/* 803A238C 0039F2EC 90 A8 00 24 */ stw r5, 0x24(r8)
/* 803A2390 0039F2F0 80 E8 00 30 */ lwz r7, 0x30(r8)
/* 803A2394 0039F2F4 80 A8 00 34 */ lwz r5, 0x34(r8)
/* 803A2398 0039F2F8 90 E8 00 28 */ stw r7, 0x28(r8)
/* 803A239C 0039F2FC 90 A8 00 2C */ stw r5, 0x2c(r8)
/* 803A23A0 0039F300 80 E8 00 38 */ lwz r7, 0x38(r8)
/* 803A23A4 0039F304 80 A8 00 3C */ lwz r5, 0x3c(r8)
/* 803A23A8 0039F308 90 E8 00 30 */ stw r7, 0x30(r8)
/* 803A23AC 0039F30C 90 A8 00 34 */ stw r5, 0x34(r8)
/* 803A23B0 0039F310 39 08 00 40 */ addi r8, r8, 0x40
/* 803A23B4 0039F314 42 00 FF 7C */ bdnz lbl_803A2330
/* 803A23B8 0039F318 70 C6 00 07 */ andi. r6, r6, 7
/* 803A23BC 0039F31C 41 82 00 20 */ beq lbl_803A23DC
lbl_803A23C0:
/* 803A23C0 0039F320 7C C9 03 A6 */ mtctr r6
lbl_803A23C4:
/* 803A23C4 0039F324 80 E8 00 00 */ lwz r7, 0(r8)
/* 803A23C8 0039F328 80 A8 00 04 */ lwz r5, 4(r8)
/* 803A23CC 0039F32C 90 E8 FF F8 */ stw r7, -8(r8)
/* 803A23D0 0039F330 90 A8 FF FC */ stw r5, -4(r8)
/* 803A23D4 0039F334 39 08 00 08 */ addi r8, r8, 8
/* 803A23D8 0039F338 42 00 FF EC */ bdnz lbl_803A23C4
lbl_803A23DC:
/* 803A23DC 0039F33C 3C C0 80 56 */ lis r6, dataMacMaintab@ha
/* 803A23E0 0039F340 38 A0 00 40 */ li r5, 0x40
/* 803A23E4 0039F344 38 C6 8A F8 */ addi r6, r6, dataMacMaintab@l
/* 803A23E8 0039F348 38 E0 00 00 */ li r7, 0
/* 803A23EC 0039F34C 7C A9 03 A6 */ mtctr r5
lbl_803A23F0:
/* 803A23F0 0039F350 A0 A6 00 02 */ lhz r5, 2(r6)
/* 803A23F4 0039F354 7C 05 20 00 */ cmpw r5, r4
/* 803A23F8 0039F358 40 81 00 0C */ ble lbl_803A2404
/* 803A23FC 0039F35C 38 A5 FF FF */ addi r5, r5, -1
/* 803A2400 0039F360 B0 A6 00 02 */ sth r5, 2(r6)
lbl_803A2404:
/* 803A2404 0039F364 A0 A6 00 06 */ lhz r5, 6(r6)
/* 803A2408 0039F368 38 C6 00 04 */ addi r6, r6, 4
/* 803A240C 0039F36C 7C 05 20 00 */ cmpw r5, r4
/* 803A2410 0039F370 40 81 00 0C */ ble lbl_803A241C
/* 803A2414 0039F374 38 A5 FF FF */ addi r5, r5, -1
/* 803A2418 0039F378 B0 A6 00 02 */ sth r5, 2(r6)
lbl_803A241C:
/* 803A241C 0039F37C A0 A6 00 06 */ lhz r5, 6(r6)
/* 803A2420 0039F380 38 C6 00 04 */ addi r6, r6, 4
/* 803A2424 0039F384 7C 05 20 00 */ cmpw r5, r4
/* 803A2428 0039F388 40 81 00 0C */ ble lbl_803A2434
/* 803A242C 0039F38C 38 A5 FF FF */ addi r5, r5, -1
/* 803A2430 0039F390 B0 A6 00 02 */ sth r5, 2(r6)
lbl_803A2434:
/* 803A2434 0039F394 A0 A6 00 06 */ lhz r5, 6(r6)
/* 803A2438 0039F398 38 C6 00 04 */ addi r6, r6, 4
/* 803A243C 0039F39C 7C 05 20 00 */ cmpw r5, r4
/* 803A2440 0039F3A0 40 81 00 0C */ ble lbl_803A244C
/* 803A2444 0039F3A4 38 A5 FF FF */ addi r5, r5, -1
/* 803A2448 0039F3A8 B0 A6 00 02 */ sth r5, 2(r6)
lbl_803A244C:
/* 803A244C 0039F3AC A0 A6 00 06 */ lhz r5, 6(r6)
/* 803A2450 0039F3B0 38 C6 00 04 */ addi r6, r6, 4
/* 803A2454 0039F3B4 7C 05 20 00 */ cmpw r5, r4
/* 803A2458 0039F3B8 40 81 00 0C */ ble lbl_803A2464
/* 803A245C 0039F3BC 38 A5 FF FF */ addi r5, r5, -1
/* 803A2460 0039F3C0 B0 A6 00 02 */ sth r5, 2(r6)
lbl_803A2464:
/* 803A2464 0039F3C4 A0 A6 00 06 */ lhz r5, 6(r6)
/* 803A2468 0039F3C8 38 C6 00 04 */ addi r6, r6, 4
/* 803A246C 0039F3CC 7C 05 20 00 */ cmpw r5, r4
/* 803A2470 0039F3D0 40 81 00 0C */ ble lbl_803A247C
/* 803A2474 0039F3D4 38 A5 FF FF */ addi r5, r5, -1
/* 803A2478 0039F3D8 B0 A6 00 02 */ sth r5, 2(r6)
lbl_803A247C:
/* 803A247C 0039F3DC A0 A6 00 06 */ lhz r5, 6(r6)
/* 803A2480 0039F3E0 38 C6 00 04 */ addi r6, r6, 4
/* 803A2484 0039F3E4 7C 05 20 00 */ cmpw r5, r4
/* 803A2488 0039F3E8 40 81 00 0C */ ble lbl_803A2494
/* 803A248C 0039F3EC 38 A5 FF FF */ addi r5, r5, -1
/* 803A2490 0039F3F0 B0 A6 00 02 */ sth r5, 2(r6)
lbl_803A2494:
/* 803A2494 0039F3F4 A0 A6 00 06 */ lhz r5, 6(r6)
/* 803A2498 0039F3F8 38 C6 00 04 */ addi r6, r6, 4
/* 803A249C 0039F3FC 7C 05 20 00 */ cmpw r5, r4
/* 803A24A0 0039F400 40 81 00 0C */ ble lbl_803A24AC
/* 803A24A4 0039F404 38 A5 FF FF */ addi r5, r5, -1
/* 803A24A8 0039F408 B0 A6 00 02 */ sth r5, 2(r6)
lbl_803A24AC:
/* 803A24AC 0039F40C 38 C6 00 04 */ addi r6, r6, 4
/* 803A24B0 0039F410 38 E7 00 07 */ addi r7, r7, 7
/* 803A24B4 0039F414 42 00 FF 3C */ bdnz lbl_803A23F0
/* 803A24B8 0039F418 7C A3 02 2E */ lhzx r5, r3, r0
/* 803A24BC 0039F41C A0 8D AE D2 */ lhz r4, dataMacTotal@sda21(r13)
/* 803A24C0 0039F420 38 A5 FF FF */ addi r5, r5, -1
/* 803A24C4 0039F424 38 84 FF FF */ addi r4, r4, -1
/* 803A24C8 0039F428 7C A3 03 2E */ sthx r5, r3, r0
/* 803A24CC 0039F42C B0 8D AE D2 */ sth r4, dataMacTotal@sda21(r13)
lbl_803A24D0:
/* 803A24D0 0039F430 48 01 2B B5 */ bl hwEnableIrq
/* 803A24D4 0039F434 80 01 00 14 */ lwz r0, 0x14(r1)
/* 803A24D8 0039F438 38 60 00 00 */ li r3, 0
/* 803A24DC 0039F43C 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 803A24E0 0039F440 7C 08 03 A6 */ mtlr r0
/* 803A24E4 0039F444 38 21 00 10 */ addi r1, r1, 0x10
/* 803A24E8 0039F448 4E 80 00 20 */ blr
.fn maccmp, local
/* 803A24EC 0039F44C A0 84 00 04 */ lhz r4, 4(r4)
/* 803A24F0 0039F450 A0 03 00 04 */ lhz r0, 4(r3)
/* 803A24F4 0039F454 7C 64 00 50 */ subf r3, r4, r0
/* 803A24F8 0039F458 4E 80 00 20 */ blr
.endfn maccmp
.global dataGetMacro
dataGetMacro:
/* 803A24FC 0039F45C 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 803A2500 0039F460 7C 08 02 A6 */ mflr r0
/* 803A2504 0039F464 3C 80 80 56 */ lis r4, dataMacMaintab@ha
/* 803A2508 0039F468 54 66 E5 3A */ rlwinm r6, r3, 0x1c, 0x14, 0x1d
/* 803A250C 0039F46C 90 01 00 14 */ stw r0, 0x14(r1)
/* 803A2510 0039F470 38 84 8A F8 */ addi r4, r4, dataMacMaintab@l
/* 803A2514 0039F474 54 60 D5 BE */ rlwinm r0, r3, 0x1a, 0x16, 0x1f
/* 803A2518 0039F478 7C A4 32 2E */ lhzx r5, r4, r6
/* 803A251C 0039F47C 90 0D AE C8 */ stw r0, "main$712"@sda21(r13)
/* 803A2520 0039F480 28 05 00 00 */ cmplwi r5, 0
/* 803A2524 0039F484 41 82 00 50 */ beq lbl_803A2574
/* 803A2528 0039F488 7C 84 32 14 */ add r4, r4, r6
/* 803A252C 0039F48C 38 ED AE C0 */ addi r7, r13, "key$713"@sda21
/* 803A2530 0039F490 A1 04 00 02 */ lhz r8, 2(r4)
/* 803A2534 0039F494 3C C0 80 56 */ lis r6, dataMacSubTabmem@ha
/* 803A2538 0039F498 B0 67 00 04 */ sth r3, 4(r7)
/* 803A253C 0039F49C 3C 80 80 3A */ lis r4, maccmp@ha
/* 803A2540 0039F4A0 38 06 92 F8 */ addi r0, r6, dataMacSubTabmem@l
/* 803A2544 0039F4A4 55 03 18 38 */ slwi r3, r8, 3
/* 803A2548 0039F4A8 38 E4 24 EC */ addi r7, r4, maccmp@l
/* 803A254C 0039F4AC 91 0D AE CC */ stw r8, "base$711"@sda21(r13)
/* 803A2550 0039F4B0 7C 80 1A 14 */ add r4, r0, r3
/* 803A2554 0039F4B4 38 6D AE C0 */ addi r3, r13, "key$713"@sda21
/* 803A2558 0039F4B8 38 C0 00 08 */ li r6, 8
/* 803A255C 0039F4BC 48 01 08 ED */ bl sndBSearch
/* 803A2560 0039F4C0 28 03 00 00 */ cmplwi r3, 0
/* 803A2564 0039F4C4 90 6D AE BC */ stw r3, "result$714"@sda21(r13)
/* 803A2568 0039F4C8 41 82 00 0C */ beq lbl_803A2574
/* 803A256C 0039F4CC 80 63 00 00 */ lwz r3, 0(r3)
/* 803A2570 0039F4D0 48 00 00 08 */ b lbl_803A2578
lbl_803A2574:
/* 803A2574 0039F4D4 38 60 00 00 */ li r3, 0
lbl_803A2578:
/* 803A2578 0039F4D8 80 01 00 14 */ lwz r0, 0x14(r1)
/* 803A257C 0039F4DC 7C 08 03 A6 */ mtlr r0
/* 803A2580 0039F4E0 38 21 00 10 */ addi r1, r1, 0x10
/* 803A2584 0039F4E4 4E 80 00 20 */ blr
.fn smpcmp, local
/* 803A2588 0039F4E8 A0 84 00 00 */ lhz r4, 0(r4)
/* 803A258C 0039F4EC A0 03 00 00 */ lhz r0, 0(r3)
/* 803A2590 0039F4F0 7C 64 00 50 */ subf r3, r4, r0
/* 803A2594 0039F4F4 4E 80 00 20 */ blr
.endfn smpcmp
.global dataGetSample
dataGetSample:
/* 803A2598 0039F4F8 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 803A259C 0039F4FC 7C 08 02 A6 */ mflr r0
/* 803A25A0 0039F500 90 01 00 24 */ stw r0, 0x24(r1)
/* 803A25A4 0039F504 39 61 00 20 */ addi r11, r1, 0x20
/* 803A25A8 0039F508 4B FE 74 D5 */ bl _savegpr_27
/* 803A25AC 0039F50C 3C A0 80 56 */ lis r5, "key$731"@ha
/* 803A25B0 0039F510 3C C0 80 56 */ lis r6, dataSmpSDirs@ha
/* 803A25B4 0039F514 3B 85 D2 F8 */ addi r28, r5, "key$731"@l
/* 803A25B8 0039F518 7C 9E 23 78 */ mr r30, r4
/* 803A25BC 0039F51C 3C A0 80 3A */ lis r5, smpcmp@ha
/* 803A25C0 0039F520 B0 7C 00 00 */ sth r3, 0(r28)
/* 803A25C4 0039F524 3B 66 80 F8 */ addi r27, r6, dataSmpSDirs@l
/* 803A25C8 0039F528 3B E0 00 00 */ li r31, 0
/* 803A25CC 0039F52C 3B A5 25 88 */ addi r29, r5, smpcmp@l
/* 803A25D0 0039F530 48 00 00 C8 */ b lbl_803A2698
lbl_803A25D4:
/* 803A25D4 0039F534 80 9B 00 00 */ lwz r4, 0(r27)
/* 803A25D8 0039F538 7F 83 E3 78 */ mr r3, r28
/* 803A25DC 0039F53C A0 BB 00 08 */ lhz r5, 8(r27)
/* 803A25E0 0039F540 7F A7 EB 78 */ mr r7, r29
/* 803A25E4 0039F544 38 C0 00 20 */ li r6, 0x20
/* 803A25E8 0039F548 48 01 08 61 */ bl sndBSearch
/* 803A25EC 0039F54C 28 03 00 00 */ cmplwi r3, 0
/* 803A25F0 0039F550 90 6D AE B8 */ stw r3, "result$732"@sda21(r13)
/* 803A25F4 0039F554 41 82 00 9C */ beq lbl_803A2690
/* 803A25F8 0039F558 A0 03 00 02 */ lhz r0, 2(r3)
/* 803A25FC 0039F55C 28 00 FF FF */ cmplwi r0, 0xffff
/* 803A2600 0039F560 41 82 00 90 */ beq lbl_803A2690
/* 803A2604 0039F564 38 63 00 0C */ addi r3, r3, 0xc
/* 803A2608 0039F568 38 00 00 00 */ li r0, 0
/* 803A260C 0039F56C 90 6D AE B4 */ stw r3, "sheader$733"@sda21(r13)
/* 803A2610 0039F570 80 63 00 00 */ lwz r3, 0(r3)
/* 803A2614 0039F574 90 7E 00 00 */ stw r3, 0(r30)
/* 803A2618 0039F578 80 6D AE B8 */ lwz r3, "result$732"@sda21(r13)
/* 803A261C 0039F57C 80 63 00 08 */ lwz r3, 8(r3)
/* 803A2620 0039F580 90 7E 00 04 */ stw r3, 4(r30)
/* 803A2624 0039F584 90 1E 00 0C */ stw r0, 0xc(r30)
/* 803A2628 0039F588 80 6D AE B4 */ lwz r3, "sheader$733"@sda21(r13)
/* 803A262C 0039F58C 80 03 00 08 */ lwz r0, 8(r3)
/* 803A2630 0039F590 90 1E 00 14 */ stw r0, 0x14(r30)
/* 803A2634 0039F594 80 6D AE B4 */ lwz r3, "sheader$733"@sda21(r13)
/* 803A2638 0039F598 80 03 00 04 */ lwz r0, 4(r3)
/* 803A263C 0039F59C 54 00 02 3E */ clrlwi r0, r0, 8
/* 803A2640 0039F5A0 90 1E 00 10 */ stw r0, 0x10(r30)
/* 803A2644 0039F5A4 80 6D AE B4 */ lwz r3, "sheader$733"@sda21(r13)
/* 803A2648 0039F5A8 80 03 00 0C */ lwz r0, 0xc(r3)
/* 803A264C 0039F5AC 90 1E 00 18 */ stw r0, 0x18(r30)
/* 803A2650 0039F5B0 80 6D AE B4 */ lwz r3, "sheader$733"@sda21(r13)
/* 803A2654 0039F5B4 80 03 00 04 */ lwz r0, 4(r3)
/* 803A2658 0039F5B8 54 00 46 3E */ srwi r0, r0, 0x18
/* 803A265C 0039F5BC 98 1E 00 1C */ stb r0, 0x1c(r30)
/* 803A2660 0039F5C0 80 6D AE B8 */ lwz r3, "result$732"@sda21(r13)
/* 803A2664 0039F5C4 80 83 00 1C */ lwz r4, 0x1c(r3)
/* 803A2668 0039F5C8 28 04 00 00 */ cmplwi r4, 0
/* 803A266C 0039F5CC 41 82 00 1C */ beq lbl_803A2688
/* 803A2670 0039F5D0 1C 1F 00 0C */ mulli r0, r31, 0xc
/* 803A2674 0039F5D4 3C 60 80 56 */ lis r3, dataSmpSDirs@ha
/* 803A2678 0039F5D8 38 63 80 F8 */ addi r3, r3, dataSmpSDirs@l
/* 803A267C 0039F5DC 7C 03 00 2E */ lwzx r0, r3, r0
/* 803A2680 0039F5E0 7C 04 02 14 */ add r0, r4, r0
/* 803A2684 0039F5E4 90 1E 00 08 */ stw r0, 8(r30)
lbl_803A2688:
/* 803A2688 0039F5E8 38 60 00 00 */ li r3, 0
/* 803A268C 0039F5EC 48 00 00 1C */ b lbl_803A26A8
lbl_803A2690:
/* 803A2690 0039F5F0 3B 7B 00 0C */ addi r27, r27, 0xc
/* 803A2694 0039F5F4 3B FF 00 01 */ addi r31, r31, 1
lbl_803A2698:
/* 803A2698 0039F5F8 A0 0D AE DA */ lhz r0, dataSmpSDirNum@sda21(r13)
/* 803A269C 0039F5FC 7C 1F 00 00 */ cmpw r31, r0
/* 803A26A0 0039F600 41 80 FF 34 */ blt lbl_803A25D4
/* 803A26A4 0039F604 38 60 FF FF */ li r3, -1
lbl_803A26A8:
/* 803A26A8 0039F608 39 61 00 20 */ addi r11, r1, 0x20
/* 803A26AC 0039F60C 4B FE 74 1D */ bl _restgpr_27
/* 803A26B0 0039F610 80 01 00 24 */ lwz r0, 0x24(r1)
/* 803A26B4 0039F614 7C 08 03 A6 */ mtlr r0
/* 803A26B8 0039F618 38 21 00 20 */ addi r1, r1, 0x20
/* 803A26BC 0039F61C 4E 80 00 20 */ blr
.fn curvecmp, local
/* 803A26C0 0039F620 A0 84 00 04 */ lhz r4, 4(r4)
/* 803A26C4 0039F624 A0 03 00 04 */ lhz r0, 4(r3)
/* 803A26C8 0039F628 7C 64 00 50 */ subf r3, r4, r0
/* 803A26CC 0039F62C 4E 80 00 20 */ blr
.endfn curvecmp
.global dataGetCurve
dataGetCurve:
/* 803A26D0 0039F630 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 803A26D4 0039F634 7C 08 02 A6 */ mflr r0
/* 803A26D8 0039F638 3C 80 80 55 */ lis r4, dataCurveTab@ha
/* 803A26DC 0039F63C 3C C0 80 3A */ lis r6, curvecmp@ha
/* 803A26E0 0039F640 90 01 00 14 */ stw r0, 0x14(r1)
/* 803A26E4 0039F644 38 AD AE AC */ addi r5, r13, "key$759"@sda21
/* 803A26E8 0039F648 38 E6 26 C0 */ addi r7, r6, curvecmp@l
/* 803A26EC 0039F64C 38 84 40 F8 */ addi r4, r4, dataCurveTab@l
/* 803A26F0 0039F650 B0 65 00 04 */ sth r3, 4(r5)
/* 803A26F4 0039F654 38 6D AE AC */ addi r3, r13, "key$759"@sda21
/* 803A26F8 0039F658 A0 AD AE D8 */ lhz r5, dataCurveNum@sda21(r13)
/* 803A26FC 0039F65C 38 C0 00 08 */ li r6, 8
/* 803A2700 0039F660 48 01 07 49 */ bl sndBSearch
/* 803A2704 0039F664 28 03 00 00 */ cmplwi r3, 0
/* 803A2708 0039F668 90 6D AE A8 */ stw r3, "result$760"@sda21(r13)
/* 803A270C 0039F66C 41 82 00 0C */ beq lbl_803A2718
/* 803A2710 0039F670 80 63 00 00 */ lwz r3, 0(r3)
/* 803A2714 0039F674 48 00 00 08 */ b lbl_803A271C
lbl_803A2718:
/* 803A2718 0039F678 38 60 00 00 */ li r3, 0
lbl_803A271C:
/* 803A271C 0039F67C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 803A2720 0039F680 7C 08 03 A6 */ mtlr r0
/* 803A2724 0039F684 38 21 00 10 */ addi r1, r1, 0x10
/* 803A2728 0039F688 4E 80 00 20 */ blr
.global dataGetKeymap
dataGetKeymap:
/* 803A272C 0039F68C 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 803A2730 0039F690 7C 08 02 A6 */ mflr r0
/* 803A2734 0039F694 3C 80 80 55 */ lis r4, dataKeymapTab@ha
/* 803A2738 0039F698 3C C0 80 3A */ lis r6, curvecmp@ha
/* 803A273C 0039F69C 90 01 00 14 */ stw r0, 0x14(r1)
/* 803A2740 0039F6A0 38 AD AE A0 */ addi r5, r13, "key$767"@sda21
/* 803A2744 0039F6A4 38 E6 26 C0 */ addi r7, r6, curvecmp@l
/* 803A2748 0039F6A8 38 84 2C F8 */ addi r4, r4, dataKeymapTab@l
/* 803A274C 0039F6AC B0 65 00 04 */ sth r3, 4(r5)
/* 803A2750 0039F6B0 38 6D AE A0 */ addi r3, r13, "key$767"@sda21
/* 803A2754 0039F6B4 A0 AD AE D6 */ lhz r5, dataKeymapNum@sda21(r13)
/* 803A2758 0039F6B8 38 C0 00 08 */ li r6, 8
/* 803A275C 0039F6BC 48 01 06 ED */ bl sndBSearch
/* 803A2760 0039F6C0 28 03 00 00 */ cmplwi r3, 0
/* 803A2764 0039F6C4 90 6D AE 9C */ stw r3, "result$768"@sda21(r13)
/* 803A2768 0039F6C8 41 82 00 0C */ beq lbl_803A2774
/* 803A276C 0039F6CC 80 63 00 00 */ lwz r3, 0(r3)
/* 803A2770 0039F6D0 48 00 00 08 */ b lbl_803A2778
lbl_803A2774:
/* 803A2774 0039F6D4 38 60 00 00 */ li r3, 0
lbl_803A2778:
/* 803A2778 0039F6D8 80 01 00 14 */ lwz r0, 0x14(r1)
/* 803A277C 0039F6DC 7C 08 03 A6 */ mtlr r0
/* 803A2780 0039F6E0 38 21 00 10 */ addi r1, r1, 0x10
/* 803A2784 0039F6E4 4E 80 00 20 */ blr
.fn layercmp, local
/* 803A2788 0039F6E8 A0 84 00 04 */ lhz r4, 4(r4)
/* 803A278C 0039F6EC A0 03 00 04 */ lhz r0, 4(r3)
/* 803A2790 0039F6F0 7C 64 00 50 */ subf r3, r4, r0
/* 803A2794 0039F6F4 4E 80 00 20 */ blr
.endfn layercmp
.global dataGetLayer
dataGetLayer:
/* 803A2798 0039F6F8 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 803A279C 0039F6FC 7C 08 02 A6 */ mflr r0
/* 803A27A0 0039F700 3C A0 80 56 */ lis r5, "key$493"@ha
/* 803A27A4 0039F704 3C C0 80 55 */ lis r6, dataLayerTab@ha
/* 803A27A8 0039F708 90 01 00 14 */ stw r0, 0x14(r1)
/* 803A27AC 0039F70C 39 05 D3 18 */ addi r8, r5, "key$493"@l
/* 803A27B0 0039F710 3C A0 80 3A */ lis r5, layercmp@ha
/* 803A27B4 0039F714 38 06 34 F8 */ addi r0, r6, dataLayerTab@l
/* 803A27B8 0039F718 93 E1 00 0C */ stw r31, 0xc(r1)
/* 803A27BC 0039F71C 38 E5 27 88 */ addi r7, r5, layercmp@l
/* 803A27C0 0039F720 7C 9F 23 78 */ mr r31, r4
/* 803A27C4 0039F724 7C 04 03 78 */ mr r4, r0
/* 803A27C8 0039F728 B0 68 00 04 */ sth r3, 4(r8)
/* 803A27CC 0039F72C 7D 03 43 78 */ mr r3, r8
/* 803A27D0 0039F730 A0 AD AE D4 */ lhz r5, dataLayerNum@sda21(r13)
/* 803A27D4 0039F734 38 C0 00 0C */ li r6, 0xc
/* 803A27D8 0039F738 48 01 06 71 */ bl sndBSearch
/* 803A27DC 0039F73C 28 03 00 00 */ cmplwi r3, 0
/* 803A27E0 0039F740 90 6D AE 98 */ stw r3, "result$494"@sda21(r13)
/* 803A27E4 0039F744 41 82 00 18 */ beq lbl_803A27FC
/* 803A27E8 0039F748 A0 03 00 06 */ lhz r0, 6(r3)
/* 803A27EC 0039F74C B0 1F 00 00 */ sth r0, 0(r31)
/* 803A27F0 0039F750 80 6D AE 98 */ lwz r3, "result$494"@sda21(r13)
/* 803A27F4 0039F754 80 63 00 00 */ lwz r3, 0(r3)
/* 803A27F8 0039F758 48 00 00 08 */ b lbl_803A2800
lbl_803A27FC:
/* 803A27FC 0039F75C 38 60 00 00 */ li r3, 0
lbl_803A2800:
/* 803A2800 0039F760 80 01 00 14 */ lwz r0, 0x14(r1)
/* 803A2804 0039F764 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 803A2808 0039F768 7C 08 03 A6 */ mtlr r0
/* 803A280C 0039F76C 38 21 00 10 */ addi r1, r1, 0x10
/* 803A2810 0039F770 4E 80 00 20 */ blr
.fn fxcmp, local
/* 803A2814 0039F774 A0 84 00 00 */ lhz r4, 0(r4)
/* 803A2818 0039F778 A0 03 00 00 */ lhz r0, 0(r3)
/* 803A281C 0039F77C 7C 64 00 50 */ subf r3, r4, r0
/* 803A2820 0039F780 4E 80 00 20 */ blr
.endfn fxcmp
.global dataGetFX
dataGetFX:
/* 803A2824 0039F784 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 803A2828 0039F788 7C 08 02 A6 */ mflr r0
/* 803A282C 0039F78C 3C 80 80 56 */ lis r4, "key$487"@ha
/* 803A2830 0039F790 3C A0 80 56 */ lis r5, dataFXGroups@ha
/* 803A2834 0039F794 90 01 00 24 */ stw r0, 0x24(r1)
/* 803A2838 0039F798 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 803A283C 0039F79C 93 C1 00 18 */ stw r30, 0x18(r1)
/* 803A2840 0039F7A0 3B C4 D3 24 */ addi r30, r4, "key$487"@l
/* 803A2844 0039F7A4 3C 80 80 3A */ lis r4, fxcmp@ha
/* 803A2848 0039F7A8 93 A1 00 14 */ stw r29, 0x14(r1)
/* 803A284C 0039F7AC 3B A5 86 F8 */ addi r29, r5, dataFXGroups@l
/* 803A2850 0039F7B0 3B E4 28 14 */ addi r31, r4, fxcmp@l
/* 803A2854 0039F7B4 93 81 00 10 */ stw r28, 0x10(r1)
/* 803A2858 0039F7B8 3B 80 00 00 */ li r28, 0
/* 803A285C 0039F7BC B0 7E 00 00 */ sth r3, 0(r30)
/* 803A2860 0039F7C0 48 00 00 30 */ b lbl_803A2890
lbl_803A2864:
/* 803A2864 0039F7C4 80 9D 00 04 */ lwz r4, 4(r29)
/* 803A2868 0039F7C8 7F C3 F3 78 */ mr r3, r30
/* 803A286C 0039F7CC A0 BD 00 02 */ lhz r5, 2(r29)
/* 803A2870 0039F7D0 7F E7 FB 78 */ mr r7, r31
/* 803A2874 0039F7D4 38 C0 00 0A */ li r6, 0xa
/* 803A2878 0039F7D8 48 01 05 D1 */ bl sndBSearch
/* 803A287C 0039F7DC 28 03 00 00 */ cmplwi r3, 0
/* 803A2880 0039F7E0 41 82 00 08 */ beq lbl_803A2888
/* 803A2884 0039F7E4 48 00 00 1C */ b lbl_803A28A0
lbl_803A2888:
/* 803A2888 0039F7E8 3B BD 00 08 */ addi r29, r29, 8
/* 803A288C 0039F7EC 3B 9C 00 01 */ addi r28, r28, 1
lbl_803A2890:
/* 803A2890 0039F7F0 A0 0D AE D0 */ lhz r0, dataFXGroupNum@sda21(r13)
/* 803A2894 0039F7F4 7C 1C 00 00 */ cmpw r28, r0
/* 803A2898 0039F7F8 41 80 FF CC */ blt lbl_803A2864
/* 803A289C 0039F7FC 38 60 00 00 */ li r3, 0
lbl_803A28A0:
/* 803A28A0 0039F800 80 01 00 24 */ lwz r0, 0x24(r1)
/* 803A28A4 0039F804 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 803A28A8 0039F808 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 803A28AC 0039F80C 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 803A28B0 0039F810 83 81 00 10 */ lwz r28, 0x10(r1)
/* 803A28B4 0039F814 7C 08 03 A6 */ mtlr r0
/* 803A28B8 0039F818 38 21 00 20 */ addi r1, r1, 0x20
/* 803A28BC 0039F81C 4E 80 00 20 */ blr
.global dataInit
dataInit:
/* 803A28C0 0039F820 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 803A28C4 0039F824 7C 08 02 A6 */ mflr r0
/* 803A28C8 0039F828 38 A0 00 00 */ li r5, 0
/* 803A28CC 0039F82C 90 01 00 14 */ stw r0, 0x14(r1)
/* 803A28D0 0039F830 38 00 00 00 */ li r0, 0
/* 803A28D4 0039F834 2C 05 02 00 */ cmpwi r5, 0x200
/* 803A28D8 0039F838 B0 0D AE DA */ sth r0, dataSmpSDirNum@sda21(r13)
/* 803A28DC 0039F83C B0 0D AE D8 */ sth r0, dataCurveNum@sda21(r13)
/* 803A28E0 0039F840 B0 0D AE D6 */ sth r0, dataKeymapNum@sda21(r13)
/* 803A28E4 0039F844 B0 0D AE D4 */ sth r0, dataLayerNum@sda21(r13)
/* 803A28E8 0039F848 B0 0D AE D0 */ sth r0, dataFXGroupNum@sda21(r13)
/* 803A28EC 0039F84C B0 0D AE D2 */ sth r0, dataMacTotal@sda21(r13)
/* 803A28F0 0039F850 40 80 00 A0 */ bge lbl_803A2990
/* 803A28F4 0039F854 3C A0 80 56 */ lis r5, dataMacMaintab@ha
/* 803A28F8 0039F858 38 00 00 20 */ li r0, 0x20
/* 803A28FC 0039F85C 38 A5 8A F8 */ addi r5, r5, dataMacMaintab@l
/* 803A2900 0039F860 7C 09 03 A6 */ mtctr r0
lbl_803A2904:
/* 803A2904 0039F864 38 00 00 00 */ li r0, 0
/* 803A2908 0039F868 B0 05 00 00 */ sth r0, 0(r5)
/* 803A290C 0039F86C B0 05 00 02 */ sth r0, 2(r5)
/* 803A2910 0039F870 B0 05 00 04 */ sth r0, 4(r5)
/* 803A2914 0039F874 B0 05 00 06 */ sth r0, 6(r5)
/* 803A2918 0039F878 B0 05 00 08 */ sth r0, 8(r5)
/* 803A291C 0039F87C B0 05 00 0A */ sth r0, 0xa(r5)
/* 803A2920 0039F880 B0 05 00 0C */ sth r0, 0xc(r5)
/* 803A2924 0039F884 B0 05 00 0E */ sth r0, 0xe(r5)
/* 803A2928 0039F888 B0 05 00 10 */ sth r0, 0x10(r5)
/* 803A292C 0039F88C B0 05 00 12 */ sth r0, 0x12(r5)
/* 803A2930 0039F890 B0 05 00 14 */ sth r0, 0x14(r5)
/* 803A2934 0039F894 B0 05 00 16 */ sth r0, 0x16(r5)
/* 803A2938 0039F898 B0 05 00 18 */ sth r0, 0x18(r5)
/* 803A293C 0039F89C B0 05 00 1A */ sth r0, 0x1a(r5)
/* 803A2940 0039F8A0 B0 05 00 1C */ sth r0, 0x1c(r5)
/* 803A2944 0039F8A4 B0 05 00 1E */ sth r0, 0x1e(r5)
/* 803A2948 0039F8A8 B0 05 00 20 */ sth r0, 0x20(r5)
/* 803A294C 0039F8AC B0 05 00 22 */ sth r0, 0x22(r5)
/* 803A2950 0039F8B0 B0 05 00 24 */ sth r0, 0x24(r5)
/* 803A2954 0039F8B4 B0 05 00 26 */ sth r0, 0x26(r5)
/* 803A2958 0039F8B8 B0 05 00 28 */ sth r0, 0x28(r5)
/* 803A295C 0039F8BC B0 05 00 2A */ sth r0, 0x2a(r5)
/* 803A2960 0039F8C0 B0 05 00 2C */ sth r0, 0x2c(r5)
/* 803A2964 0039F8C4 B0 05 00 2E */ sth r0, 0x2e(r5)
/* 803A2968 0039F8C8 B0 05 00 30 */ sth r0, 0x30(r5)
/* 803A296C 0039F8CC B0 05 00 32 */ sth r0, 0x32(r5)
/* 803A2970 0039F8D0 B0 05 00 34 */ sth r0, 0x34(r5)
/* 803A2974 0039F8D4 B0 05 00 36 */ sth r0, 0x36(r5)
/* 803A2978 0039F8D8 B0 05 00 38 */ sth r0, 0x38(r5)
/* 803A297C 0039F8DC B0 05 00 3A */ sth r0, 0x3a(r5)
/* 803A2980 0039F8E0 B0 05 00 3C */ sth r0, 0x3c(r5)
/* 803A2984 0039F8E4 B0 05 00 3E */ sth r0, 0x3e(r5)
/* 803A2988 0039F8E8 38 A5 00 40 */ addi r5, r5, 0x40
/* 803A298C 0039F8EC 42 00 FF 78 */ bdnz lbl_803A2904
lbl_803A2990:
/* 803A2990 0039F8F0 48 01 13 D9 */ bl hwInitSampleMem
/* 803A2994 0039F8F4 80 01 00 14 */ lwz r0, 0x14(r1)
/* 803A2998 0039F8F8 7C 08 03 A6 */ mtlr r0
/* 803A299C 0039F8FC 38 21 00 10 */ addi r1, r1, 0x10
/* 803A29A0 0039F900 4E 80 00 20 */ blr
.global dataExit
dataExit:
/* 803A29A4 0039F904 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 803A29A8 0039F908 7C 08 02 A6 */ mflr r0
/* 803A29AC 0039F90C 90 01 00 14 */ stw r0, 0x14(r1)
/* 803A29B0 0039F910 48 01 13 DD */ bl hwExitSampleMem
/* 803A29B4 0039F914 80 01 00 14 */ lwz r0, 0x14(r1)
/* 803A29B8 0039F918 7C 08 03 A6 */ mtlr r0
/* 803A29BC 0039F91C 38 21 00 10 */ addi r1, r1, 0x10
/* 803A29C0 0039F920 4E 80 00 20 */ blr