donut-decomp/asm/libnw4r_snd/snd_ExternalSoundPlayer.s

459 lines
21 KiB
ArmAsm

.include "macros.inc"
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
.global __ct__Q44nw4r3snd6detail19ExternalSoundPlayerFv
__ct__Q44nw4r3snd6detail19ExternalSoundPlayerFv:
/* 80108F00 00104D40 38 A3 00 04 */ addi r5, r3, 0x4
/* 80108F04 00104D44 38 80 00 00 */ li r4, 0x0
/* 80108F08 00104D48 38 00 00 01 */ li r0, 0x1
/* 80108F0C 00104D4C 90 83 00 00 */ stw r4, 0x0(r3)
/* 80108F10 00104D50 90 A3 00 04 */ stw r5, 0x4(r3)
/* 80108F14 00104D54 90 A3 00 08 */ stw r5, 0x8(r3)
/* 80108F18 00104D58 90 03 00 0C */ stw r0, 0xc(r3)
/* 80108F1C 00104D5C 4E 80 00 20 */ blr
.global __dt__Q44nw4r3snd6detail19ExternalSoundPlayerFv
__dt__Q44nw4r3snd6detail19ExternalSoundPlayerFv:
/* 80108F20 00104D60 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80108F24 00104D64 7C 08 02 A6 */ mflr r0
/* 80108F28 00104D68 2C 03 00 00 */ cmpwi r3, 0x0
/* 80108F2C 00104D6C 90 01 00 24 */ stw r0, 0x24(r1)
/* 80108F30 00104D70 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80108F34 00104D74 93 C1 00 18 */ stw r30, 0x18(r1)
/* 80108F38 00104D78 93 A1 00 14 */ stw r29, 0x14(r1)
/* 80108F3C 00104D7C 7C 9D 23 78 */ mr r29, r4
/* 80108F40 00104D80 93 81 00 10 */ stw r28, 0x10(r1)
/* 80108F44 00104D84 7C 7C 1B 78 */ mr r28, r3
/* 80108F48 00104D88 41 82 00 50 */ beq lbl_80108F98
/* 80108F4C 00104D8C 83 E3 00 04 */ lwz r31, 0x4(r3)
/* 80108F50 00104D90 3B C3 00 04 */ addi r30, r3, 0x4
/* 80108F54 00104D94 48 00 00 18 */ b lbl_80108F6C
.global lbl_80108F58
lbl_80108F58:
/* 80108F58 00104D98 7F E3 FB 78 */ mr r3, r31
/* 80108F5C 00104D9C 83 FF 00 00 */ lwz r31, 0x0(r31)
/* 80108F60 00104DA0 7F 84 E3 78 */ mr r4, r28
/* 80108F64 00104DA4 38 63 FE F8 */ addi r3, r3, -0x108
/* 80108F68 00104DA8 4B FF D8 59 */ bl DetachExternalSoundPlayer__Q44nw4r3snd6detail10BasicSoundFPQ44nw4r3snd6detail19ExternalSoundPlayer
.global lbl_80108F6C
lbl_80108F6C:
/* 80108F6C 00104DAC 7C 1F F0 40 */ cmplw r31, r30
/* 80108F70 00104DB0 40 82 FF E8 */ bne lbl_80108F58
/* 80108F74 00104DB4 2C 1C 00 00 */ cmpwi r28, 0x0
/* 80108F78 00104DB8 41 82 00 10 */ beq lbl_80108F88
/* 80108F7C 00104DBC 7F 83 E3 78 */ mr r3, r28
/* 80108F80 00104DC0 38 80 00 00 */ li r4, 0x0
/* 80108F84 00104DC4 48 01 6C FD */ bl __dt__Q44nw4r2ut6detail12LinkListImplFv
.global lbl_80108F88
lbl_80108F88:
/* 80108F88 00104DC8 2C 1D 00 00 */ cmpwi r29, 0x0
/* 80108F8C 00104DCC 40 81 00 0C */ ble lbl_80108F98
/* 80108F90 00104DD0 7F 83 E3 78 */ mr r3, r28
/* 80108F94 00104DD4 48 0B 67 81 */ bl __dl__FPv
.global lbl_80108F98
lbl_80108F98:
/* 80108F98 00104DD8 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80108F9C 00104DDC 7F 83 E3 78 */ mr r3, r28
/* 80108FA0 00104DE0 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 80108FA4 00104DE4 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 80108FA8 00104DE8 83 81 00 10 */ lwz r28, 0x10(r1)
/* 80108FAC 00104DEC 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80108FB0 00104DF0 7C 08 03 A6 */ mtlr r0
/* 80108FB4 00104DF4 38 21 00 20 */ addi r1, r1, 0x20
/* 80108FB8 00104DF8 4E 80 00 20 */ blr
/* 80108FBC 00104DFC 00 00 00 00 */ .4byte 0x00000000
.global StopAllSound__Q44nw4r3snd6detail19ExternalSoundPlayerFi
StopAllSound__Q44nw4r3snd6detail19ExternalSoundPlayerFi:
/* 80108FC0 00104E00 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80108FC4 00104E04 7C 08 02 A6 */ mflr r0
/* 80108FC8 00104E08 90 01 00 24 */ stw r0, 0x24(r1)
/* 80108FCC 00104E0C 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80108FD0 00104E10 93 C1 00 18 */ stw r30, 0x18(r1)
/* 80108FD4 00104E14 3B C3 00 04 */ addi r30, r3, 0x4
/* 80108FD8 00104E18 93 A1 00 14 */ stw r29, 0x14(r1)
/* 80108FDC 00104E1C 7C 9D 23 78 */ mr r29, r4
/* 80108FE0 00104E20 83 E3 00 04 */ lwz r31, 0x4(r3)
/* 80108FE4 00104E24 48 00 00 18 */ b lbl_80108FFC
.global lbl_80108FE8
lbl_80108FE8:
/* 80108FE8 00104E28 7F E3 FB 78 */ mr r3, r31
/* 80108FEC 00104E2C 83 FF 00 00 */ lwz r31, 0x0(r31)
/* 80108FF0 00104E30 7F A4 EB 78 */ mr r4, r29
/* 80108FF4 00104E34 38 63 FE F8 */ addi r3, r3, -0x108
/* 80108FF8 00104E38 4B FF C7 19 */ bl Stop__Q44nw4r3snd6detail10BasicSoundFi
.global lbl_80108FFC
lbl_80108FFC:
/* 80108FFC 00104E3C 7C 1F F0 40 */ cmplw r31, r30
/* 80109000 00104E40 40 82 FF E8 */ bne lbl_80108FE8
/* 80109004 00104E44 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80109008 00104E48 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8010900C 00104E4C 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 80109010 00104E50 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 80109014 00104E54 7C 08 03 A6 */ mtlr r0
/* 80109018 00104E58 38 21 00 20 */ addi r1, r1, 0x20
/* 8010901C 00104E5C 4E 80 00 20 */ blr
.global PauseAllSound__Q44nw4r3snd6detail19ExternalSoundPlayerFbi
PauseAllSound__Q44nw4r3snd6detail19ExternalSoundPlayerFbi:
/* 80109020 00104E60 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80109024 00104E64 7C 08 02 A6 */ mflr r0
/* 80109028 00104E68 90 01 00 24 */ stw r0, 0x24(r1)
/* 8010902C 00104E6C 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80109030 00104E70 93 C1 00 18 */ stw r30, 0x18(r1)
/* 80109034 00104E74 3B C3 00 04 */ addi r30, r3, 0x4
/* 80109038 00104E78 93 A1 00 14 */ stw r29, 0x14(r1)
/* 8010903C 00104E7C 7C BD 2B 78 */ mr r29, r5
/* 80109040 00104E80 93 81 00 10 */ stw r28, 0x10(r1)
/* 80109044 00104E84 7C 9C 23 78 */ mr r28, r4
/* 80109048 00104E88 83 E3 00 04 */ lwz r31, 0x4(r3)
/* 8010904C 00104E8C 48 00 00 1C */ b lbl_80109068
.global lbl_80109050
lbl_80109050:
/* 80109050 00104E90 7F E3 FB 78 */ mr r3, r31
/* 80109054 00104E94 83 FF 00 00 */ lwz r31, 0x0(r31)
/* 80109058 00104E98 7F 84 E3 78 */ mr r4, r28
/* 8010905C 00104E9C 7F A5 EB 78 */ mr r5, r29
/* 80109060 00104EA0 38 63 FE F8 */ addi r3, r3, -0x108
/* 80109064 00104EA4 4B FF C8 9D */ bl Pause__Q44nw4r3snd6detail10BasicSoundFbi
.global lbl_80109068
lbl_80109068:
/* 80109068 00104EA8 7C 1F F0 40 */ cmplw r31, r30
/* 8010906C 00104EAC 40 82 FF E4 */ bne lbl_80109050
/* 80109070 00104EB0 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80109074 00104EB4 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80109078 00104EB8 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8010907C 00104EBC 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 80109080 00104EC0 83 81 00 10 */ lwz r28, 0x10(r1)
/* 80109084 00104EC4 7C 08 03 A6 */ mtlr r0
/* 80109088 00104EC8 38 21 00 20 */ addi r1, r1, 0x20
/* 8010908C 00104ECC 4E 80 00 20 */ blr
.global DetachSoundActorAll__Q44nw4r3snd6detail19ExternalSoundPlayerFPQ34nw4r3snd10SoundActor
DetachSoundActorAll__Q44nw4r3snd6detail19ExternalSoundPlayerFPQ34nw4r3snd10SoundActor:
/* 80109090 00104ED0 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80109094 00104ED4 7C 08 02 A6 */ mflr r0
/* 80109098 00104ED8 90 01 00 24 */ stw r0, 0x24(r1)
/* 8010909C 00104EDC 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 801090A0 00104EE0 93 C1 00 18 */ stw r30, 0x18(r1)
/* 801090A4 00104EE4 3B C3 00 04 */ addi r30, r3, 0x4
/* 801090A8 00104EE8 93 A1 00 14 */ stw r29, 0x14(r1)
/* 801090AC 00104EEC 7C 9D 23 78 */ mr r29, r4
/* 801090B0 00104EF0 83 E3 00 04 */ lwz r31, 0x4(r3)
/* 801090B4 00104EF4 48 00 00 18 */ b lbl_801090CC
.global lbl_801090B8
lbl_801090B8:
/* 801090B8 00104EF8 7F E3 FB 78 */ mr r3, r31
/* 801090BC 00104EFC 83 FF 00 00 */ lwz r31, 0x0(r31)
/* 801090C0 00104F00 7F A4 EB 78 */ mr r4, r29
/* 801090C4 00104F04 38 63 FE F8 */ addi r3, r3, -0x108
/* 801090C8 00104F08 4B FF D6 E9 */ bl DetachSoundActor__Q44nw4r3snd6detail10BasicSoundFPQ34nw4r3snd10SoundActor
.global lbl_801090CC
lbl_801090CC:
/* 801090CC 00104F0C 7C 1F F0 40 */ cmplw r31, r30
/* 801090D0 00104F10 40 82 FF E8 */ bne lbl_801090B8
/* 801090D4 00104F14 80 01 00 24 */ lwz r0, 0x24(r1)
/* 801090D8 00104F18 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 801090DC 00104F1C 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 801090E0 00104F20 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 801090E4 00104F24 7C 08 03 A6 */ mtlr r0
/* 801090E8 00104F28 38 21 00 20 */ addi r1, r1, 0x20
/* 801090EC 00104F2C 4E 80 00 20 */ blr
.global AppendSound__Q44nw4r3snd6detail19ExternalSoundPlayerFPQ44nw4r3snd6detail10BasicSound
AppendSound__Q44nw4r3snd6detail19ExternalSoundPlayerFPQ44nw4r3snd6detail10BasicSound:
/* 801090F0 00104F30 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 801090F4 00104F34 7C 08 02 A6 */ mflr r0
/* 801090F8 00104F38 90 01 00 24 */ stw r0, 0x24(r1)
/* 801090FC 00104F3C 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80109100 00104F40 93 C1 00 18 */ stw r30, 0x18(r1)
/* 80109104 00104F44 7C 9E 23 78 */ mr r30, r4
/* 80109108 00104F48 93 A1 00 14 */ stw r29, 0x14(r1)
/* 8010910C 00104F4C 7C 7D 1B 78 */ mr r29, r3
/* 80109110 00104F50 93 81 00 10 */ stw r28, 0x10(r1)
/* 80109114 00104F54 48 00 BB CD */ bl GetInstance__Q44nw4r3snd6detail11SoundThreadFv
/* 80109118 00104F58 38 63 03 54 */ addi r3, r3, 0x354
/* 8010911C 00104F5C 4B F1 9A 85 */ bl OSLockMutex
/* 80109120 00104F60 88 7E 00 98 */ lbz r3, 0x98(r30)
/* 80109124 00104F64 80 1E 00 50 */ lwz r0, 0x50(r30)
/* 80109128 00104F68 7C 63 02 14 */ add r3, r3, r0
/* 8010912C 00104F6C 2C 03 00 7F */ cmpwi r3, 0x7f
/* 80109130 00104F70 40 81 00 0C */ ble lbl_8010913C
/* 80109134 00104F74 3B E0 00 7F */ li r31, 0x7f
/* 80109138 00104F78 48 00 00 0C */ b lbl_80109144
.global lbl_8010913C
lbl_8010913C:
/* 8010913C 00104F7C 7C 60 FE 70 */ srawi r0, r3, 31
/* 80109140 00104F80 7C 7F 00 78 */ andc r31, r3, r0
.global lbl_80109144
lbl_80109144:
/* 80109144 00104F84 80 1D 00 0C */ lwz r0, 0xc(r29)
/* 80109148 00104F88 2C 00 00 00 */ cmpwi r0, 0x0
/* 8010914C 00104F8C 40 82 00 18 */ bne lbl_80109164
/* 80109150 00104F90 48 00 BB 91 */ bl GetInstance__Q44nw4r3snd6detail11SoundThreadFv
/* 80109154 00104F94 38 63 03 54 */ addi r3, r3, 0x354
/* 80109158 00104F98 4B F1 9B 29 */ bl OSUnlockMutex
/* 8010915C 00104F9C 38 60 00 00 */ li r3, 0x0
/* 80109160 00104FA0 48 00 01 14 */ b lbl_80109274
.global lbl_80109164
lbl_80109164:
/* 80109164 00104FA4 3B 9D 00 04 */ addi r28, r29, 0x4
/* 80109168 00104FA8 48 00 00 C8 */ b lbl_80109230
.global lbl_8010916C
lbl_8010916C:
/* 8010916C 00104FAC 80 9D 00 04 */ lwz r4, 0x4(r29)
/* 80109170 00104FB0 38 C0 00 80 */ li r6, 0x80
/* 80109174 00104FB4 38 60 00 00 */ li r3, 0x0
/* 80109178 00104FB8 48 00 00 44 */ b lbl_801091BC
/* 8010917C 00104FBC 60 00 00 00 */ nop
.global lbl_80109180
lbl_80109180:
/* 80109180 00104FC0 88 A4 FF 90 */ lbz r5, -0x70(r4)
/* 80109184 00104FC4 38 E4 FE F8 */ addi r7, r4, -0x108
/* 80109188 00104FC8 80 04 FF 48 */ lwz r0, -0xb8(r4)
/* 8010918C 00104FCC 7C A5 02 14 */ add r5, r5, r0
/* 80109190 00104FD0 2C 05 00 7F */ cmpwi r5, 0x7f
/* 80109194 00104FD4 40 81 00 0C */ ble lbl_801091A0
/* 80109198 00104FD8 38 00 00 7F */ li r0, 0x7f
/* 8010919C 00104FDC 48 00 00 0C */ b lbl_801091A8
.global lbl_801091A0
lbl_801091A0:
/* 801091A0 00104FE0 7C A0 FE 70 */ srawi r0, r5, 31
/* 801091A4 00104FE4 7C A0 00 78 */ andc r0, r5, r0
.global lbl_801091A8
lbl_801091A8:
/* 801091A8 00104FE8 7C 06 00 00 */ cmpw r6, r0
/* 801091AC 00104FEC 40 81 00 0C */ ble lbl_801091B8
/* 801091B0 00104FF0 7C E3 3B 78 */ mr r3, r7
/* 801091B4 00104FF4 7C 06 03 78 */ mr r6, r0
.global lbl_801091B8
lbl_801091B8:
/* 801091B8 00104FF8 80 84 00 00 */ lwz r4, 0x0(r4)
.global lbl_801091BC
lbl_801091BC:
/* 801091BC 00104FFC 7C 04 E0 40 */ cmplw r4, r28
/* 801091C0 00105000 40 82 FF C0 */ bne lbl_80109180
/* 801091C4 00105004 2C 03 00 00 */ cmpwi r3, 0x0
/* 801091C8 00105008 40 82 00 18 */ bne lbl_801091E0
/* 801091CC 0010500C 48 00 BB 15 */ bl GetInstance__Q44nw4r3snd6detail11SoundThreadFv
/* 801091D0 00105010 38 63 03 54 */ addi r3, r3, 0x354
/* 801091D4 00105014 4B F1 9A AD */ bl OSUnlockMutex
/* 801091D8 00105018 38 60 00 00 */ li r3, 0x0
/* 801091DC 0010501C 48 00 00 98 */ b lbl_80109274
.global lbl_801091E0
lbl_801091E0:
/* 801091E0 00105020 88 83 00 98 */ lbz r4, 0x98(r3)
/* 801091E4 00105024 80 03 00 50 */ lwz r0, 0x50(r3)
/* 801091E8 00105028 7C 84 02 14 */ add r4, r4, r0
/* 801091EC 0010502C 2C 04 00 7F */ cmpwi r4, 0x7f
/* 801091F0 00105030 40 81 00 0C */ ble lbl_801091FC
/* 801091F4 00105034 38 00 00 7F */ li r0, 0x7f
/* 801091F8 00105038 48 00 00 0C */ b lbl_80109204
.global lbl_801091FC
lbl_801091FC:
/* 801091FC 0010503C 7C 80 FE 70 */ srawi r0, r4, 31
/* 80109200 00105040 7C 80 00 78 */ andc r0, r4, r0
.global lbl_80109204
lbl_80109204:
/* 80109204 00105044 7C 1F 00 00 */ cmpw r31, r0
/* 80109208 00105048 40 80 00 18 */ bge lbl_80109220
/* 8010920C 0010504C 48 00 BA D5 */ bl GetInstance__Q44nw4r3snd6detail11SoundThreadFv
/* 80109210 00105050 38 63 03 54 */ addi r3, r3, 0x354
/* 80109214 00105054 4B F1 9A 6D */ bl OSUnlockMutex
/* 80109218 00105058 38 60 00 00 */ li r3, 0x0
/* 8010921C 0010505C 48 00 00 58 */ b lbl_80109274
.global lbl_80109220
lbl_80109220:
/* 80109220 00105060 81 83 00 00 */ lwz r12, 0x0(r3)
/* 80109224 00105064 81 8C 00 10 */ lwz r12, 0x10(r12)
/* 80109228 00105068 7D 89 03 A6 */ mtctr r12
/* 8010922C 0010506C 4E 80 04 21 */ bctrl
.global lbl_80109230
lbl_80109230:
/* 80109230 00105070 80 7D 00 00 */ lwz r3, 0x0(r29)
/* 80109234 00105074 80 1D 00 0C */ lwz r0, 0xc(r29)
/* 80109238 00105078 7C 03 00 00 */ cmpw r3, r0
/* 8010923C 0010507C 40 80 FF 30 */ bge lbl_8010916C
/* 80109240 00105080 38 1D 00 04 */ addi r0, r29, 0x4
/* 80109244 00105084 90 01 00 08 */ stw r0, 0x8(r1)
/* 80109248 00105088 7F A3 EB 78 */ mr r3, r29
/* 8010924C 0010508C 38 81 00 08 */ addi r4, r1, 0x8
/* 80109250 00105090 38 BE 01 08 */ addi r5, r30, 0x108
/* 80109254 00105094 48 01 6B 5D */ bl Insert__Q44nw4r2ut6detail12LinkListImplFQ54nw4r2ut6detail12LinkListImpl8IteratorPQ34nw4r2ut12LinkListNode
/* 80109258 00105098 7F C3 F3 78 */ mr r3, r30
/* 8010925C 0010509C 7F A4 EB 78 */ mr r4, r29
/* 80109260 001050A0 4B F2 D8 E1 */ bl GXInitTexObjTlut
/* 80109264 001050A4 48 00 BA 7D */ bl GetInstance__Q44nw4r3snd6detail11SoundThreadFv
/* 80109268 001050A8 38 63 03 54 */ addi r3, r3, 0x354
/* 8010926C 001050AC 4B F1 9A 15 */ bl OSUnlockMutex
/* 80109270 001050B0 38 60 00 01 */ li r3, 0x1
.global lbl_80109274
lbl_80109274:
/* 80109274 001050B4 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80109278 001050B8 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8010927C 001050BC 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 80109280 001050C0 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 80109284 001050C4 83 81 00 10 */ lwz r28, 0x10(r1)
/* 80109288 001050C8 7C 08 03 A6 */ mtlr r0
/* 8010928C 001050CC 38 21 00 20 */ addi r1, r1, 0x20
/* 80109290 001050D0 4E 80 00 20 */ blr
/* 80109294 001050D4 00 00 00 00 */ .4byte 0x00000000
/* 80109298 001050D8 00 00 00 00 */ .4byte 0x00000000
/* 8010929C 001050DC 00 00 00 00 */ .4byte 0x00000000
.global SetPlayableSoundCount__Q44nw4r3snd6detail19ExternalSoundPlayerFi
SetPlayableSoundCount__Q44nw4r3snd6detail19ExternalSoundPlayerFi:
/* 801092A0 001050E0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 801092A4 001050E4 7C 08 02 A6 */ mflr r0
/* 801092A8 001050E8 90 01 00 14 */ stw r0, 0x14(r1)
/* 801092AC 001050EC 93 E1 00 0C */ stw r31, 0xc(r1)
/* 801092B0 001050F0 93 C1 00 08 */ stw r30, 0x8(r1)
/* 801092B4 001050F4 7C 7E 1B 78 */ mr r30, r3
/* 801092B8 001050F8 80 03 00 00 */ lwz r0, 0x0(r3)
/* 801092BC 001050FC 90 83 00 0C */ stw r4, 0xc(r3)
/* 801092C0 00105100 7C 00 20 00 */ cmpw r0, r4
/* 801092C4 00105104 40 81 00 80 */ ble lbl_80109344
/* 801092C8 00105108 3B E3 00 04 */ addi r31, r3, 0x4
/* 801092CC 0010510C 48 00 00 68 */ b lbl_80109334
.global lbl_801092D0
lbl_801092D0:
/* 801092D0 00105110 80 9E 00 04 */ lwz r4, 0x4(r30)
/* 801092D4 00105114 38 C0 00 80 */ li r6, 0x80
/* 801092D8 00105118 38 60 00 00 */ li r3, 0x0
/* 801092DC 0010511C 48 00 00 40 */ b lbl_8010931C
.global lbl_801092E0
lbl_801092E0:
/* 801092E0 00105120 88 A4 FF 90 */ lbz r5, -0x70(r4)
/* 801092E4 00105124 38 E4 FE F8 */ addi r7, r4, -0x108
/* 801092E8 00105128 80 04 FF 48 */ lwz r0, -0xb8(r4)
/* 801092EC 0010512C 7C A5 02 14 */ add r5, r5, r0
/* 801092F0 00105130 2C 05 00 7F */ cmpwi r5, 0x7f
/* 801092F4 00105134 40 81 00 0C */ ble lbl_80109300
/* 801092F8 00105138 38 00 00 7F */ li r0, 0x7f
/* 801092FC 0010513C 48 00 00 0C */ b lbl_80109308
.global lbl_80109300
lbl_80109300:
/* 80109300 00105140 7C A0 FE 70 */ srawi r0, r5, 31
/* 80109304 00105144 7C A0 00 78 */ andc r0, r5, r0
.global lbl_80109308
lbl_80109308:
/* 80109308 00105148 7C 06 00 00 */ cmpw r6, r0
/* 8010930C 0010514C 40 81 00 0C */ ble lbl_80109318
/* 80109310 00105150 7C E3 3B 78 */ mr r3, r7
/* 80109314 00105154 7C 06 03 78 */ mr r6, r0
.global lbl_80109318
lbl_80109318:
/* 80109318 00105158 80 84 00 00 */ lwz r4, 0x0(r4)
.global lbl_8010931C
lbl_8010931C:
/* 8010931C 0010515C 7C 04 F8 40 */ cmplw r4, r31
/* 80109320 00105160 40 82 FF C0 */ bne lbl_801092E0
/* 80109324 00105164 81 83 00 00 */ lwz r12, 0x0(r3)
/* 80109328 00105168 81 8C 00 10 */ lwz r12, 0x10(r12)
/* 8010932C 0010516C 7D 89 03 A6 */ mtctr r12
/* 80109330 00105170 4E 80 04 21 */ bctrl
.global lbl_80109334
lbl_80109334:
/* 80109334 00105174 80 7E 00 00 */ lwz r3, 0x0(r30)
/* 80109338 00105178 80 1E 00 0C */ lwz r0, 0xc(r30)
/* 8010933C 0010517C 7C 03 00 00 */ cmpw r3, r0
/* 80109340 00105180 41 81 FF 90 */ bgt lbl_801092D0
.global lbl_80109344
lbl_80109344:
/* 80109344 00105184 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80109348 00105188 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8010934C 0010518C 83 C1 00 08 */ lwz r30, 0x8(r1)
/* 80109350 00105190 7C 08 03 A6 */ mtlr r0
/* 80109354 00105194 38 21 00 10 */ addi r1, r1, 0x10
/* 80109358 00105198 4E 80 00 20 */ blr
/* 8010935C 0010519C 00 00 00 00 */ .4byte 0x00000000
.global RemoveSound__Q44nw4r3snd6detail19ExternalSoundPlayerFPQ44nw4r3snd6detail10BasicSound
RemoveSound__Q44nw4r3snd6detail19ExternalSoundPlayerFPQ44nw4r3snd6detail10BasicSound:
/* 80109360 001051A0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80109364 001051A4 7C 08 02 A6 */ mflr r0
/* 80109368 001051A8 90 01 00 14 */ stw r0, 0x14(r1)
/* 8010936C 001051AC 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80109370 001051B0 7C 9F 23 78 */ mr r31, r4
/* 80109374 001051B4 38 84 01 08 */ addi r4, r4, 0x108
/* 80109378 001051B8 93 C1 00 08 */ stw r30, 0x8(r1)
/* 8010937C 001051BC 7C 7E 1B 78 */ mr r30, r3
/* 80109380 001051C0 48 01 6A 61 */ bl Erase__Q44nw4r2ut6detail12LinkListImplFPQ34nw4r2ut12LinkListNode
/* 80109384 001051C4 7F E3 FB 78 */ mr r3, r31
/* 80109388 001051C8 7F C4 F3 78 */ mr r4, r30
/* 8010938C 001051CC 4B FF D4 35 */ bl DetachExternalSoundPlayer__Q44nw4r3snd6detail10BasicSoundFPQ44nw4r3snd6detail19ExternalSoundPlayer
/* 80109390 001051D0 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80109394 001051D4 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80109398 001051D8 83 C1 00 08 */ lwz r30, 0x8(r1)
/* 8010939C 001051DC 7C 08 03 A6 */ mtlr r0
/* 801093A0 001051E0 38 21 00 10 */ addi r1, r1, 0x10
/* 801093A4 001051E4 4E 80 00 20 */ blr
/* 801093A8 001051E8 00 00 00 00 */ .4byte 0x00000000
/* 801093AC 001051EC 00 00 00 00 */ .4byte 0x00000000
.global detail_CanPlaySound__Q44nw4r3snd6detail19ExternalSoundPlayerFi
detail_CanPlaySound__Q44nw4r3snd6detail19ExternalSoundPlayerFi:
/* 801093B0 001051F0 80 A3 00 0C */ lwz r5, 0xc(r3)
/* 801093B4 001051F4 2C 05 00 00 */ cmpwi r5, 0x0
/* 801093B8 001051F8 40 82 00 0C */ bne lbl_801093C4
/* 801093BC 001051FC 38 60 00 00 */ li r3, 0x0
/* 801093C0 00105200 4E 80 00 20 */ blr
.global lbl_801093C4
lbl_801093C4:
/* 801093C4 00105204 80 03 00 00 */ lwz r0, 0x0(r3)
/* 801093C8 00105208 7C 00 28 00 */ cmpw r0, r5
/* 801093CC 0010520C 41 80 00 A4 */ blt lbl_80109470
/* 801093D0 00105210 80 A3 00 04 */ lwz r5, 0x4(r3)
/* 801093D4 00105214 38 03 00 04 */ addi r0, r3, 0x4
/* 801093D8 00105218 39 00 00 80 */ li r8, 0x80
/* 801093DC 0010521C 38 E0 00 00 */ li r7, 0x0
/* 801093E0 00105220 48 00 00 44 */ b lbl_80109424
/* 801093E4 00105224 60 00 00 00 */ nop
.global lbl_801093E8
lbl_801093E8:
/* 801093E8 00105228 88 C5 FF 90 */ lbz r6, -0x70(r5)
/* 801093EC 0010522C 39 25 FE F8 */ addi r9, r5, -0x108
/* 801093F0 00105230 80 65 FF 48 */ lwz r3, -0xb8(r5)
/* 801093F4 00105234 7C C6 1A 14 */ add r6, r6, r3
/* 801093F8 00105238 2C 06 00 7F */ cmpwi r6, 0x7f
/* 801093FC 0010523C 40 81 00 0C */ ble lbl_80109408
/* 80109400 00105240 38 60 00 7F */ li r3, 0x7f
/* 80109404 00105244 48 00 00 0C */ b lbl_80109410
.global lbl_80109408
lbl_80109408:
/* 80109408 00105248 7C C3 FE 70 */ srawi r3, r6, 31
/* 8010940C 0010524C 7C C3 18 78 */ andc r3, r6, r3
.global lbl_80109410
lbl_80109410:
/* 80109410 00105250 7C 08 18 00 */ cmpw r8, r3
/* 80109414 00105254 40 81 00 0C */ ble lbl_80109420
/* 80109418 00105258 7D 27 4B 78 */ mr r7, r9
/* 8010941C 0010525C 7C 68 1B 78 */ mr r8, r3
.global lbl_80109420
lbl_80109420:
/* 80109420 00105260 80 A5 00 00 */ lwz r5, 0x0(r5)
.global lbl_80109424
lbl_80109424:
/* 80109424 00105264 7C 05 00 40 */ cmplw r5, r0
/* 80109428 00105268 40 82 FF C0 */ bne lbl_801093E8
/* 8010942C 0010526C 2C 07 00 00 */ cmpwi r7, 0x0
/* 80109430 00105270 40 82 00 0C */ bne lbl_8010943C
/* 80109434 00105274 38 60 00 00 */ li r3, 0x0
/* 80109438 00105278 4E 80 00 20 */ blr
.global lbl_8010943C
lbl_8010943C:
/* 8010943C 0010527C 88 67 00 98 */ lbz r3, 0x98(r7)
/* 80109440 00105280 80 07 00 50 */ lwz r0, 0x50(r7)
/* 80109444 00105284 7C 63 02 14 */ add r3, r3, r0
/* 80109448 00105288 2C 03 00 7F */ cmpwi r3, 0x7f
/* 8010944C 0010528C 40 81 00 0C */ ble lbl_80109458
/* 80109450 00105290 38 00 00 7F */ li r0, 0x7f
/* 80109454 00105294 48 00 00 0C */ b lbl_80109460
.global lbl_80109458
lbl_80109458:
/* 80109458 00105298 7C 60 FE 70 */ srawi r0, r3, 31
/* 8010945C 0010529C 7C 60 00 78 */ andc r0, r3, r0
.global lbl_80109460
lbl_80109460:
/* 80109460 001052A0 7C 04 00 00 */ cmpw r4, r0
/* 80109464 001052A4 40 80 00 0C */ bge lbl_80109470
/* 80109468 001052A8 38 60 00 00 */ li r3, 0x0
/* 8010946C 001052AC 4E 80 00 20 */ blr
.global lbl_80109470
lbl_80109470:
/* 80109470 001052B0 38 60 00 01 */ li r3, 0x1
/* 80109474 001052B4 4E 80 00 20 */ blr
/* 80109478 001052B8 00 00 00 00 */ .4byte 0x00000000
/* 8010947C 001052BC 00 00 00 00 */ .4byte 0x00000000