.include "macros.inc"

.section .sbss
.balign 8
.global sp
sp:
	.skip 0x8

.section .text, "ax"

.global vsUpdateBuffer
vsUpdateBuffer:
/* 803A9D7C 003A6CDC  94 21 FF F0 */	stwu r1, -0x10(r1)
/* 803A9D80 003A6CE0  7C 08 02 A6 */	mflr r0
/* 803A9D84 003A6CE4  90 01 00 14 */	stw r0, 0x14(r1)
/* 803A9D88 003A6CE8  93 E1 00 0C */	stw r31, 0xc(r1)
/* 803A9D8C 003A6CEC  7C 7F 1B 78 */	mr r31, r3
/* 803A9D90 003A6CF0  93 C1 00 08 */	stw r30, 8(r1)
/* 803A9D94 003A6CF4  81 03 00 04 */	lwz r8, 4(r3)
/* 803A9D98 003A6CF8  7C 08 20 40 */	cmplw r8, r4
/* 803A9D9C 003A6CFC  41 82 01 C0 */	beq lbl_803A9F5C
/* 803A9DA0 003A6D00  40 80 00 98 */	bge lbl_803A9E38
/* 803A9DA4 003A6D04  88 1F 00 02 */	lbz r0, 2(r31)
/* 803A9DA8 003A6D08  2C 00 00 05 */	cmpwi r0, 5
/* 803A9DAC 003A6D0C  41 82 00 08 */	beq lbl_803A9DB4
/* 803A9DB0 003A6D10  48 00 01 AC */	b lbl_803A9F5C
lbl_803A9DB4:
/* 803A9DB4 003A6D14  3C A0 24 92 */	lis r5, 0x24924925@ha
/* 803A9DB8 003A6D18  38 00 00 00 */	li r0, 0
/* 803A9DBC 003A6D1C  38 A5 49 25 */	addi r5, r5, 0x24924925@l
/* 803A9DC0 003A6D20  3C 60 80 56 */	lis r3, vs@ha
/* 803A9DC4 003A6D24  7C E5 40 16 */	mulhwu r7, r5, r8
/* 803A9DC8 003A6D28  38 A3 E3 10 */	addi r5, r3, vs@l
/* 803A9DCC 003A6D2C  38 60 00 01 */	li r3, 1
/* 803A9DD0 003A6D30  7C C7 40 50 */	subf r6, r7, r8
/* 803A9DD4 003A6D34  54 C6 F8 7E */	srwi r6, r6, 1
/* 803A9DD8 003A6D38  7C C6 3A 14 */	add r6, r6, r7
/* 803A9DDC 003A6D3C  54 C6 00 38 */	rlwinm r6, r6, 0, 0, 0x1c
/* 803A9DE0 003A6D40  90 DF 00 14 */	stw r6, 0x14(r31)
/* 803A9DE4 003A6D44  80 DF 00 04 */	lwz r6, 4(r31)
/* 803A9DE8 003A6D48  7C C6 20 50 */	subf r6, r6, r4
/* 803A9DEC 003A6D4C  38 9F 00 10 */	addi r4, r31, 0x10
/* 803A9DF0 003A6D50  90 DF 00 18 */	stw r6, 0x18(r31)
/* 803A9DF4 003A6D54  90 1F 00 1C */	stw r0, 0x1c(r31)
/* 803A9DF8 003A6D58  90 1F 00 20 */	stw r0, 0x20(r31)
/* 803A9DFC 003A6D5C  81 85 09 4C */	lwz r12, 0x94c(r5)
/* 803A9E00 003A6D60  7D 89 03 A6 */	mtctr r12
/* 803A9E04 003A6D64  4E 80 04 21 */	bctrl
/* 803A9E08 003A6D68  28 03 00 00 */	cmplwi r3, 0
/* 803A9E0C 003A6D6C  41 82 01 50 */	beq lbl_803A9F5C
/* 803A9E10 003A6D70  3C 80 80 56 */	lis r4, vs@ha
/* 803A9E14 003A6D74  80 1F 00 04 */	lwz r0, 4(r31)
/* 803A9E18 003A6D78  38 84 E3 10 */	addi r4, r4, vs@l
/* 803A9E1C 003A6D7C  80 84 00 04 */	lwz r4, 4(r4)
/* 803A9E20 003A6D80  7C 60 1A 14 */	add r3, r0, r3
/* 803A9E24 003A6D84  7C 03 23 96 */	divwu r0, r3, r4
/* 803A9E28 003A6D88  7C 00 21 D6 */	mullw r0, r0, r4
/* 803A9E2C 003A6D8C  7C 00 18 50 */	subf r0, r0, r3
/* 803A9E30 003A6D90  90 1F 00 04 */	stw r0, 4(r31)
/* 803A9E34 003A6D94  48 00 01 28 */	b lbl_803A9F5C
lbl_803A9E38:
/* 803A9E38 003A6D98  28 04 00 00 */	cmplwi r4, 0
/* 803A9E3C 003A6D9C  40 82 00 94 */	bne lbl_803A9ED0
/* 803A9E40 003A6DA0  88 1F 00 02 */	lbz r0, 2(r31)
/* 803A9E44 003A6DA4  2C 00 00 05 */	cmpwi r0, 5
/* 803A9E48 003A6DA8  41 82 00 08 */	beq lbl_803A9E50
/* 803A9E4C 003A6DAC  48 00 01 10 */	b lbl_803A9F5C
lbl_803A9E50:
/* 803A9E50 003A6DB0  3C 80 24 92 */	lis r4, 0x24924925@ha
/* 803A9E54 003A6DB4  3C 60 80 56 */	lis r3, vs@ha
/* 803A9E58 003A6DB8  38 84 49 25 */	addi r4, r4, 0x24924925@l
/* 803A9E5C 003A6DBC  38 00 00 00 */	li r0, 0
/* 803A9E60 003A6DC0  7C C4 40 16 */	mulhwu r6, r4, r8
/* 803A9E64 003A6DC4  3B C3 E3 10 */	addi r30, r3, vs@l
/* 803A9E68 003A6DC8  38 9F 00 10 */	addi r4, r31, 0x10
/* 803A9E6C 003A6DCC  38 60 00 01 */	li r3, 1
/* 803A9E70 003A6DD0  7C A6 40 50 */	subf r5, r6, r8
/* 803A9E74 003A6DD4  54 A5 F8 7E */	srwi r5, r5, 1
/* 803A9E78 003A6DD8  7C A5 32 14 */	add r5, r5, r6
/* 803A9E7C 003A6DDC  54 A5 00 38 */	rlwinm r5, r5, 0, 0, 0x1c
/* 803A9E80 003A6DE0  90 BF 00 14 */	stw r5, 0x14(r31)
/* 803A9E84 003A6DE4  80 DF 00 04 */	lwz r6, 4(r31)
/* 803A9E88 003A6DE8  80 BE 00 04 */	lwz r5, 4(r30)
/* 803A9E8C 003A6DEC  7C A6 28 50 */	subf r5, r6, r5
/* 803A9E90 003A6DF0  90 BF 00 18 */	stw r5, 0x18(r31)
/* 803A9E94 003A6DF4  90 1F 00 1C */	stw r0, 0x1c(r31)
/* 803A9E98 003A6DF8  90 1F 00 20 */	stw r0, 0x20(r31)
/* 803A9E9C 003A6DFC  81 9E 09 4C */	lwz r12, 0x94c(r30)
/* 803A9EA0 003A6E00  7D 89 03 A6 */	mtctr r12
/* 803A9EA4 003A6E04  4E 80 04 21 */	bctrl
/* 803A9EA8 003A6E08  28 03 00 00 */	cmplwi r3, 0
/* 803A9EAC 003A6E0C  41 82 00 B0 */	beq lbl_803A9F5C
/* 803A9EB0 003A6E10  80 1F 00 04 */	lwz r0, 4(r31)
/* 803A9EB4 003A6E14  80 9E 00 04 */	lwz r4, 4(r30)
/* 803A9EB8 003A6E18  7C 60 1A 14 */	add r3, r0, r3
/* 803A9EBC 003A6E1C  7C 03 23 96 */	divwu r0, r3, r4
/* 803A9EC0 003A6E20  7C 00 21 D6 */	mullw r0, r0, r4
/* 803A9EC4 003A6E24  7C 00 18 50 */	subf r0, r0, r3
/* 803A9EC8 003A6E28  90 1F 00 04 */	stw r0, 4(r31)
/* 803A9ECC 003A6E2C  48 00 00 90 */	b lbl_803A9F5C
lbl_803A9ED0:
/* 803A9ED0 003A6E30  88 1F 00 02 */	lbz r0, 2(r31)
/* 803A9ED4 003A6E34  2C 00 00 05 */	cmpwi r0, 5
/* 803A9ED8 003A6E38  41 82 00 08 */	beq lbl_803A9EE0
/* 803A9EDC 003A6E3C  48 00 00 80 */	b lbl_803A9F5C
lbl_803A9EE0:
/* 803A9EE0 003A6E40  3C A0 24 92 */	lis r5, 0x24924925@ha
/* 803A9EE4 003A6E44  3C 60 80 56 */	lis r3, vs@ha
/* 803A9EE8 003A6E48  38 A5 49 25 */	addi r5, r5, 0x24924925@l
/* 803A9EEC 003A6E4C  38 00 00 00 */	li r0, 0
/* 803A9EF0 003A6E50  7C C5 40 16 */	mulhwu r6, r5, r8
/* 803A9EF4 003A6E54  3B C3 E3 10 */	addi r30, r3, vs@l
/* 803A9EF8 003A6E58  38 60 00 01 */	li r3, 1
/* 803A9EFC 003A6E5C  7C A6 40 50 */	subf r5, r6, r8
/* 803A9F00 003A6E60  54 A5 F8 7E */	srwi r5, r5, 1
/* 803A9F04 003A6E64  7C A5 32 14 */	add r5, r5, r6
/* 803A9F08 003A6E68  54 A5 00 38 */	rlwinm r5, r5, 0, 0, 0x1c
/* 803A9F0C 003A6E6C  90 BF 00 14 */	stw r5, 0x14(r31)
/* 803A9F10 003A6E70  80 DF 00 04 */	lwz r6, 4(r31)
/* 803A9F14 003A6E74  80 BE 00 04 */	lwz r5, 4(r30)
/* 803A9F18 003A6E78  7C A6 28 50 */	subf r5, r6, r5
/* 803A9F1C 003A6E7C  90 BF 00 18 */	stw r5, 0x18(r31)
/* 803A9F20 003A6E80  90 1F 00 1C */	stw r0, 0x1c(r31)
/* 803A9F24 003A6E84  90 9F 00 20 */	stw r4, 0x20(r31)
/* 803A9F28 003A6E88  38 9F 00 10 */	addi r4, r31, 0x10
/* 803A9F2C 003A6E8C  81 9E 09 4C */	lwz r12, 0x94c(r30)
/* 803A9F30 003A6E90  7D 89 03 A6 */	mtctr r12
/* 803A9F34 003A6E94  4E 80 04 21 */	bctrl
/* 803A9F38 003A6E98  28 03 00 00 */	cmplwi r3, 0
/* 803A9F3C 003A6E9C  41 82 00 20 */	beq lbl_803A9F5C
/* 803A9F40 003A6EA0  80 1F 00 04 */	lwz r0, 4(r31)
/* 803A9F44 003A6EA4  80 9E 00 04 */	lwz r4, 4(r30)
/* 803A9F48 003A6EA8  7C 60 1A 14 */	add r3, r0, r3
/* 803A9F4C 003A6EAC  7C 03 23 96 */	divwu r0, r3, r4
/* 803A9F50 003A6EB0  7C 00 21 D6 */	mullw r0, r0, r4
/* 803A9F54 003A6EB4  7C 00 18 50 */	subf r0, r0, r3
/* 803A9F58 003A6EB8  90 1F 00 04 */	stw r0, 4(r31)
lbl_803A9F5C:
/* 803A9F5C 003A6EBC  80 01 00 14 */	lwz r0, 0x14(r1)
/* 803A9F60 003A6EC0  83 E1 00 0C */	lwz r31, 0xc(r1)
/* 803A9F64 003A6EC4  83 C1 00 08 */	lwz r30, 8(r1)
/* 803A9F68 003A6EC8  7C 08 03 A6 */	mtlr r0
/* 803A9F6C 003A6ECC  38 21 00 10 */	addi r1, r1, 0x10
/* 803A9F70 003A6ED0  4E 80 00 20 */	blr

.global vsSampleUpdates
vsSampleUpdates:
/* 803A9F74 003A6ED4  94 21 FF E0 */	stwu r1, -0x20(r1)
/* 803A9F78 003A6ED8  7C 08 02 A6 */	mflr r0
/* 803A9F7C 003A6EDC  90 01 00 24 */	stw r0, 0x24(r1)
/* 803A9F80 003A6EE0  39 61 00 20 */	addi r11, r1, 0x20
/* 803A9F84 003A6EE4  4B FD FA F5 */	bl _savegpr_26
/* 803A9F88 003A6EE8  3C 60 80 56 */	lis r3, vs@ha
/* 803A9F8C 003A6EEC  3B E3 E3 10 */	addi r31, r3, vs@l
/* 803A9F90 003A6EF0  80 1F 09 4C */	lwz r0, 0x94c(r31)
/* 803A9F94 003A6EF4  28 00 00 00 */	cmplwi r0, 0
/* 803A9F98 003A6EF8  41 82 01 D4 */	beq lbl_803AA16C
/* 803A9F9C 003A6EFC  3B A0 00 00 */	li r29, 0
/* 803A9FA0 003A6F00  7F FE FB 78 */	mr r30, r31
lbl_803A9FA4:
/* 803A9FA4 003A6F04  88 1E 09 08 */	lbz r0, 0x908(r30)
/* 803A9FA8 003A6F08  28 00 00 FF */	cmplwi r0, 0xff
/* 803A9FAC 003A6F0C  41 82 01 B0 */	beq lbl_803AA15C
/* 803A9FB0 003A6F10  7F A3 EB 78 */	mr r3, r29
/* 803A9FB4 003A6F14  48 00 95 F5 */	bl hwGetVirtualSampleState
/* 803A9FB8 003A6F18  28 03 00 00 */	cmplwi r3, 0
/* 803A9FBC 003A6F1C  41 82 01 A0 */	beq lbl_803AA15C
/* 803A9FC0 003A6F20  88 9E 09 08 */	lbz r4, 0x908(r30)
/* 803A9FC4 003A6F24  3C 60 80 56 */	lis r3, vs@ha
/* 803A9FC8 003A6F28  38 03 E3 10 */	addi r0, r3, vs@l
/* 803A9FCC 003A6F2C  7F A3 EB 78 */	mr r3, r29
/* 803A9FD0 003A6F30  1C 84 00 24 */	mulli r4, r4, 0x24
/* 803A9FD4 003A6F34  7C 80 22 14 */	add r4, r0, r4
/* 803A9FD8 003A6F38  3B 64 00 08 */	addi r27, r4, 8
/* 803A9FDC 003A6F3C  48 00 9B 95 */	bl hwGetPos
/* 803A9FE0 003A6F40  88 1B 00 02 */	lbz r0, 2(r27)
/* 803A9FE4 003A6F44  7C 7C 1B 78 */	mr r28, r3
/* 803A9FE8 003A6F48  28 00 00 05 */	cmplwi r0, 5
/* 803A9FEC 003A6F4C  40 82 00 28 */	bne lbl_803AA014
/* 803A9FF0 003A6F50  3C 60 24 92 */	lis r3, 0x24924925@ha
/* 803A9FF4 003A6F54  38 03 49 25 */	addi r0, r3, 0x24924925@l
/* 803A9FF8 003A6F58  7C 60 E0 16 */	mulhwu r3, r0, r28
/* 803A9FFC 003A6F5C  7C 03 E0 50 */	subf r0, r3, r28
/* 803AA000 003A6F60  54 00 F8 7E */	srwi r0, r0, 1
/* 803AA004 003A6F64  7C 00 1A 14 */	add r0, r0, r3
/* 803AA008 003A6F68  54 00 E8 FE */	srwi r0, r0, 3
/* 803AA00C 003A6F6C  1F 40 00 0E */	mulli r26, r0, 0xe
/* 803AA010 003A6F70  48 00 00 08 */	b lbl_803AA018
lbl_803AA014:
/* 803AA014 003A6F74  7F 9A E3 78 */	mr r26, r28
lbl_803AA018:
/* 803AA018 003A6F78  88 1B 00 00 */	lbz r0, 0(r27)
/* 803AA01C 003A6F7C  2C 00 00 01 */	cmpwi r0, 1
/* 803AA020 003A6F80  41 82 00 14 */	beq lbl_803AA034
/* 803AA024 003A6F84  41 80 01 38 */	blt lbl_803AA15C
/* 803AA028 003A6F88  2C 00 00 04 */	cmpwi r0, 4
/* 803AA02C 003A6F8C  40 80 01 30 */	bge lbl_803AA15C
/* 803AA030 003A6F90  48 00 00 14 */	b lbl_803AA044
lbl_803AA034:
/* 803AA034 003A6F94  7F 63 DB 78 */	mr r3, r27
/* 803AA038 003A6F98  7F 44 D3 78 */	mr r4, r26
/* 803AA03C 003A6F9C  4B FF FD 41 */	bl vsUpdateBuffer
/* 803AA040 003A6FA0  48 00 01 1C */	b lbl_803AA15C
lbl_803AA044:
/* 803AA044 003A6FA4  88 7B 00 03 */	lbz r3, 3(r27)
/* 803AA048 003A6FA8  48 00 9E E1 */	bl hwGetVirtualSampleID
/* 803AA04C 003A6FAC  A0 9B 00 12 */	lhz r4, 0x12(r27)
/* 803AA050 003A6FB0  88 1B 00 03 */	lbz r0, 3(r27)
/* 803AA054 003A6FB4  50 80 42 2E */	rlwimi r0, r4, 8, 8, 0x17
/* 803AA058 003A6FB8  7C 00 18 40 */	cmplw r0, r3
/* 803AA05C 003A6FBC  40 82 00 E0 */	bne lbl_803AA13C
/* 803AA060 003A6FC0  7F 63 DB 78 */	mr r3, r27
/* 803AA064 003A6FC4  7F 44 D3 78 */	mr r4, r26
/* 803AA068 003A6FC8  4B FF FD 15 */	bl vsUpdateBuffer
/* 803AA06C 003A6FCC  80 9B 00 0C */	lwz r4, 0xc(r27)
/* 803AA070 003A6FD0  7C 1C 20 40 */	cmplw r28, r4
/* 803AA074 003A6FD4  41 80 00 18 */	blt lbl_803AA08C
/* 803AA078 003A6FD8  80 1B 00 08 */	lwz r0, 8(r27)
/* 803AA07C 003A6FDC  7C 64 E0 50 */	subf r3, r4, r28
/* 803AA080 003A6FE0  7C 03 00 50 */	subf r0, r3, r0
/* 803AA084 003A6FE4  90 1B 00 08 */	stw r0, 8(r27)
/* 803AA088 003A6FE8  48 00 00 1C */	b lbl_803AA0A4
lbl_803AA08C:
/* 803AA08C 003A6FEC  80 7F 00 04 */	lwz r3, 4(r31)
/* 803AA090 003A6FF0  7C 9C 20 50 */	subf r4, r28, r4
/* 803AA094 003A6FF4  80 1B 00 08 */	lwz r0, 8(r27)
/* 803AA098 003A6FF8  7C 64 18 50 */	subf r3, r4, r3
/* 803AA09C 003A6FFC  7C 03 00 50 */	subf r0, r3, r0
/* 803AA0A0 003A7000  90 1B 00 08 */	stw r0, 8(r27)
lbl_803AA0A4:
/* 803AA0A4 003A7004  93 9B 00 0C */	stw r28, 0xc(r27)
/* 803AA0A8 003A7008  80 AD AE 78 */	lwz r5, synthVoice@sda21(r13)
/* 803AA0AC 003A700C  88 7B 00 03 */	lbz r3, 3(r27)
/* 803AA0B0 003A7010  80 1B 00 08 */	lwz r0, 8(r27)
/* 803AA0B4 003A7014  1C 83 04 04 */	mulli r4, r3, 0x404
/* 803AA0B8 003A7018  38 84 02 06 */	addi r4, r4, 0x206
/* 803AA0BC 003A701C  7C 85 22 2E */	lhzx r4, r5, r4
/* 803AA0C0 003A7020  1C 84 00 A0 */	mulli r4, r4, 0xa0
/* 803AA0C4 003A7024  38 84 0F FF */	addi r4, r4, 0xfff
/* 803AA0C8 003A7028  7C 84 66 70 */	srawi r4, r4, 0xc
/* 803AA0CC 003A702C  7C 84 01 94 */	addze r4, r4
/* 803AA0D0 003A7030  7C 04 00 00 */	cmpw r4, r0
/* 803AA0D4 003A7034  40 81 00 88 */	ble lbl_803AA15C
/* 803AA0D8 003A7038  48 00 9E 79 */	bl hwVoiceInStartup
/* 803AA0DC 003A703C  28 03 00 00 */	cmplwi r3, 0
/* 803AA0E0 003A7040  40 82 00 38 */	bne lbl_803AA118
/* 803AA0E4 003A7044  88 1B 00 00 */	lbz r0, 0(r27)
/* 803AA0E8 003A7048  28 00 00 02 */	cmplwi r0, 2
/* 803AA0EC 003A704C  40 82 00 24 */	bne lbl_803AA110
/* 803AA0F0 003A7050  88 7B 00 03 */	lbz r3, 3(r27)
/* 803AA0F4 003A7054  48 00 92 99 */	bl hwBreak
/* 803AA0F8 003A7058  88 1B 00 03 */	lbz r0, 3(r27)
/* 803AA0FC 003A705C  80 6D AE 78 */	lwz r3, synthVoice@sda21(r13)
/* 803AA100 003A7060  1C 00 04 04 */	mulli r0, r0, 0x404
/* 803AA104 003A7064  7C 63 02 14 */	add r3, r3, r0
/* 803AA108 003A7068  4B FF CB 6D */	bl macSampleEndNotify
/* 803AA10C 003A706C  48 00 00 0C */	b lbl_803AA118
lbl_803AA110:
/* 803AA110 003A7070  88 7B 00 03 */	lbz r3, 3(r27)
/* 803AA114 003A7074  4B FF E9 09 */	bl voiceKill
lbl_803AA118:
/* 803AA118 003A7078  38 00 00 00 */	li r0, 0
/* 803AA11C 003A707C  3C 60 80 56 */	lis r3, vs@ha
/* 803AA120 003A7080  98 1B 00 00 */	stb r0, 0(r27)
/* 803AA124 003A7084  38 03 E3 10 */	addi r0, r3, vs@l
/* 803AA128 003A7088  38 80 00 FF */	li r4, 0xff
/* 803AA12C 003A708C  88 7B 00 03 */	lbz r3, 3(r27)
/* 803AA130 003A7090  7C 60 1A 14 */	add r3, r0, r3
/* 803AA134 003A7094  98 83 09 08 */	stb r4, 0x908(r3)
/* 803AA138 003A7098  48 00 00 24 */	b lbl_803AA15C
lbl_803AA13C:
/* 803AA13C 003A709C  38 00 00 00 */	li r0, 0
/* 803AA140 003A70A0  3C 60 80 56 */	lis r3, vs@ha
/* 803AA144 003A70A4  98 1B 00 00 */	stb r0, 0(r27)
/* 803AA148 003A70A8  38 03 E3 10 */	addi r0, r3, vs@l
/* 803AA14C 003A70AC  38 80 00 FF */	li r4, 0xff
/* 803AA150 003A70B0  88 7B 00 03 */	lbz r3, 3(r27)
/* 803AA154 003A70B4  7C 60 1A 14 */	add r3, r0, r3
/* 803AA158 003A70B8  98 83 09 08 */	stb r4, 0x908(r3)
lbl_803AA15C:
/* 803AA15C 003A70BC  3B BD 00 01 */	addi r29, r29, 1
/* 803AA160 003A70C0  3B DE 00 01 */	addi r30, r30, 1
/* 803AA164 003A70C4  28 1D 00 40 */	cmplwi r29, 0x40
/* 803AA168 003A70C8  41 80 FE 3C */	blt lbl_803A9FA4
lbl_803AA16C:
/* 803AA16C 003A70CC  39 61 00 20 */	addi r11, r1, 0x20
/* 803AA170 003A70D0  4B FD F9 55 */	bl _restgpr_26
/* 803AA174 003A70D4  80 01 00 24 */	lwz r0, 0x24(r1)
/* 803AA178 003A70D8  7C 08 03 A6 */	mtlr r0
/* 803AA17C 003A70DC  38 21 00 20 */	addi r1, r1, 0x20
/* 803AA180 003A70E0  4E 80 00 20 */	blr

.global dataInitStack
dataInitStack:
/* 803AA184 003A70E4  38 00 00 00 */	li r0, 0
/* 803AA188 003A70E8  B0 0D AF 18 */	sth r0, sp@sda21(r13)
/* 803AA18C 003A70EC  4E 80 00 20 */	blr

.global ScanIDList
ScanIDList:
/* 803AA190 003A70F0  94 21 FF F0 */	stwu r1, -0x10(r1)
/* 803AA194 003A70F4  7C 08 02 A6 */	mflr r0
/* 803AA198 003A70F8  90 01 00 14 */	stw r0, 0x14(r1)
/* 803AA19C 003A70FC  54 A0 06 3E */	clrlwi r0, r5, 0x18
/* 803AA1A0 003A7100  2C 00 00 02 */	cmpwi r0, 2
/* 803AA1A4 003A7104  41 82 00 A4 */	beq lbl_803AA248
/* 803AA1A8 003A7108  40 80 00 14 */	bge lbl_803AA1BC
/* 803AA1AC 003A710C  2C 00 00 00 */	cmpwi r0, 0
/* 803AA1B0 003A7110  41 82 00 1C */	beq lbl_803AA1CC
/* 803AA1B4 003A7114  40 80 02 34 */	bge lbl_803AA3E8
/* 803AA1B8 003A7118  48 00 02 44 */	b lbl_803AA3FC
lbl_803AA1BC:
/* 803AA1BC 003A711C  2C 00 00 04 */	cmpwi r0, 4
/* 803AA1C0 003A7120  41 82 01 AC */	beq lbl_803AA36C
/* 803AA1C4 003A7124  40 80 02 38 */	bge lbl_803AA3FC
/* 803AA1C8 003A7128  48 00 01 0C */	b lbl_803AA2D4
lbl_803AA1CC:
/* 803AA1CC 003A712C  28 06 00 00 */	cmplwi r6, 0
/* 803AA1D0 003A7130  40 82 00 70 */	bne lbl_803AA240
/* 803AA1D4 003A7134  28 04 00 00 */	cmplwi r4, 0
/* 803AA1D8 003A7138  40 82 00 0C */	bne lbl_803AA1E4
/* 803AA1DC 003A713C  38 C0 00 00 */	li r6, 0
/* 803AA1E0 003A7140  48 00 00 40 */	b lbl_803AA220
lbl_803AA1E4:
/* 803AA1E4 003A7144  80 04 00 00 */	lwz r0, 0(r4)
/* 803AA1E8 003A7148  54 65 04 3E */	clrlwi r5, r3, 0x10
/* 803AA1EC 003A714C  7C C4 02 14 */	add r6, r4, r0
/* 803AA1F0 003A7150  48 00 00 1C */	b lbl_803AA20C
lbl_803AA1F4:
/* 803AA1F4 003A7154  A0 06 00 04 */	lhz r0, 4(r6)
/* 803AA1F8 003A7158  7C 00 28 40 */	cmplw r0, r5
/* 803AA1FC 003A715C  40 82 00 08 */	bne lbl_803AA204
/* 803AA200 003A7160  48 00 00 20 */	b lbl_803AA220
lbl_803AA204:
/* 803AA204 003A7164  80 06 00 00 */	lwz r0, 0(r6)
/* 803AA208 003A7168  7C C6 02 14 */	add r6, r6, r0
lbl_803AA20C:
/* 803AA20C 003A716C  80 86 00 00 */	lwz r4, 0(r6)
/* 803AA210 003A7170  3C 04 00 01 */	addis r0, r4, 1
/* 803AA214 003A7174  28 00 FF FF */	cmplwi r0, 0xffff
/* 803AA218 003A7178  40 82 FF DC */	bne lbl_803AA1F4
/* 803AA21C 003A717C  38 C0 00 00 */	li r6, 0
lbl_803AA220:
/* 803AA220 003A7180  28 06 00 00 */	cmplwi r6, 0
/* 803AA224 003A7184  41 82 00 10 */	beq lbl_803AA234
/* 803AA228 003A7188  38 86 00 08 */	addi r4, r6, 8
/* 803AA22C 003A718C  4B FF 7D 39 */	bl dataInsertMacro
/* 803AA230 003A7190  48 00 01 CC */	b lbl_803AA3FC
lbl_803AA234:
/* 803AA234 003A7194  38 80 00 00 */	li r4, 0
/* 803AA238 003A7198  4B FF 7D 2D */	bl dataInsertMacro
/* 803AA23C 003A719C  48 00 01 C0 */	b lbl_803AA3FC
lbl_803AA240:
/* 803AA240 003A71A0  4B FF 80 29 */	bl dataRemoveMacro
/* 803AA244 003A71A4  48 00 01 B8 */	b lbl_803AA3FC
lbl_803AA248:
/* 803AA248 003A71A8  28 06 00 00 */	cmplwi r6, 0
/* 803AA24C 003A71AC  40 82 00 7C */	bne lbl_803AA2C8
/* 803AA250 003A71B0  28 04 00 00 */	cmplwi r4, 0
/* 803AA254 003A71B4  40 82 00 0C */	bne lbl_803AA260
/* 803AA258 003A71B8  38 C0 00 00 */	li r6, 0
/* 803AA25C 003A71BC  48 00 00 44 */	b lbl_803AA2A0
lbl_803AA260:
/* 803AA260 003A71C0  80 04 00 08 */	lwz r0, 8(r4)
/* 803AA264 003A71C4  60 65 40 00 */	ori r5, r3, 0x4000
/* 803AA268 003A71C8  54 A5 04 3E */	clrlwi r5, r5, 0x10
/* 803AA26C 003A71CC  7C C4 02 14 */	add r6, r4, r0
/* 803AA270 003A71D0  48 00 00 1C */	b lbl_803AA28C
lbl_803AA274:
/* 803AA274 003A71D4  A0 06 00 04 */	lhz r0, 4(r6)
/* 803AA278 003A71D8  7C 00 28 40 */	cmplw r0, r5
/* 803AA27C 003A71DC  40 82 00 08 */	bne lbl_803AA284
/* 803AA280 003A71E0  48 00 00 20 */	b lbl_803AA2A0
lbl_803AA284:
/* 803AA284 003A71E4  80 06 00 00 */	lwz r0, 0(r6)
/* 803AA288 003A71E8  7C C6 02 14 */	add r6, r6, r0
lbl_803AA28C:
/* 803AA28C 003A71EC  80 86 00 00 */	lwz r4, 0(r6)
/* 803AA290 003A71F0  3C 04 00 01 */	addis r0, r4, 1
/* 803AA294 003A71F4  28 00 FF FF */	cmplwi r0, 0xffff
/* 803AA298 003A71F8  40 82 FF DC */	bne lbl_803AA274
/* 803AA29C 003A71FC  38 C0 00 00 */	li r6, 0
lbl_803AA2A0:
/* 803AA2A0 003A7200  28 06 00 00 */	cmplwi r6, 0
/* 803AA2A4 003A7204  41 82 00 14 */	beq lbl_803AA2B8
/* 803AA2A8 003A7208  60 63 40 00 */	ori r3, r3, 0x4000
/* 803AA2AC 003A720C  38 86 00 08 */	addi r4, r6, 8
/* 803AA2B0 003A7210  4B FF 69 85 */	bl dataInsertKeymap
/* 803AA2B4 003A7214  48 00 01 48 */	b lbl_803AA3FC
lbl_803AA2B8:
/* 803AA2B8 003A7218  60 63 40 00 */	ori r3, r3, 0x4000
/* 803AA2BC 003A721C  38 80 00 00 */	li r4, 0
/* 803AA2C0 003A7220  4B FF 69 75 */	bl dataInsertKeymap
/* 803AA2C4 003A7224  48 00 01 38 */	b lbl_803AA3FC
lbl_803AA2C8:
/* 803AA2C8 003A7228  60 63 40 00 */	ori r3, r3, 0x4000
/* 803AA2CC 003A722C  4B FF 6B 59 */	bl dataRemoveKeymap
/* 803AA2D0 003A7230  48 00 01 2C */	b lbl_803AA3FC
lbl_803AA2D4:
/* 803AA2D4 003A7234  28 06 00 00 */	cmplwi r6, 0
/* 803AA2D8 003A7238  40 82 00 88 */	bne lbl_803AA360
/* 803AA2DC 003A723C  28 04 00 00 */	cmplwi r4, 0
/* 803AA2E0 003A7240  40 82 00 0C */	bne lbl_803AA2EC
/* 803AA2E4 003A7244  38 C0 00 00 */	li r6, 0
/* 803AA2E8 003A7248  48 00 00 44 */	b lbl_803AA32C
lbl_803AA2EC:
/* 803AA2EC 003A724C  80 04 00 0C */	lwz r0, 0xc(r4)
/* 803AA2F0 003A7250  60 65 80 00 */	ori r5, r3, 0x8000
/* 803AA2F4 003A7254  54 A5 04 3E */	clrlwi r5, r5, 0x10
/* 803AA2F8 003A7258  7C C4 02 14 */	add r6, r4, r0
/* 803AA2FC 003A725C  48 00 00 1C */	b lbl_803AA318
lbl_803AA300:
/* 803AA300 003A7260  A0 06 00 04 */	lhz r0, 4(r6)
/* 803AA304 003A7264  7C 00 28 40 */	cmplw r0, r5
/* 803AA308 003A7268  40 82 00 08 */	bne lbl_803AA310
/* 803AA30C 003A726C  48 00 00 20 */	b lbl_803AA32C
lbl_803AA310:
/* 803AA310 003A7270  80 06 00 00 */	lwz r0, 0(r6)
/* 803AA314 003A7274  7C C6 02 14 */	add r6, r6, r0
lbl_803AA318:
/* 803AA318 003A7278  80 86 00 00 */	lwz r4, 0(r6)
/* 803AA31C 003A727C  3C 04 00 01 */	addis r0, r4, 1
/* 803AA320 003A7280  28 00 FF FF */	cmplwi r0, 0xffff
/* 803AA324 003A7284  40 82 FF DC */	bne lbl_803AA300
/* 803AA328 003A7288  38 C0 00 00 */	li r6, 0
lbl_803AA32C:
/* 803AA32C 003A728C  28 06 00 00 */	cmplwi r6, 0
/* 803AA330 003A7290  41 82 00 1C */	beq lbl_803AA34C
/* 803AA334 003A7294  80 06 00 08 */	lwz r0, 8(r6)
/* 803AA338 003A7298  60 63 80 00 */	ori r3, r3, 0x8000
/* 803AA33C 003A729C  38 86 00 0C */	addi r4, r6, 0xc
/* 803AA340 003A72A0  54 05 04 3E */	clrlwi r5, r0, 0x10
/* 803AA344 003A72A4  4B FF 6C 5D */	bl dataInsertLayer
/* 803AA348 003A72A8  48 00 00 B4 */	b lbl_803AA3FC
lbl_803AA34C:
/* 803AA34C 003A72AC  60 63 80 00 */	ori r3, r3, 0x8000
/* 803AA350 003A72B0  38 80 00 00 */	li r4, 0
/* 803AA354 003A72B4  38 A0 00 00 */	li r5, 0
/* 803AA358 003A72B8  4B FF 6C 49 */	bl dataInsertLayer
/* 803AA35C 003A72BC  48 00 00 A0 */	b lbl_803AA3FC
lbl_803AA360:
/* 803AA360 003A72C0  60 63 80 00 */	ori r3, r3, 0x8000
/* 803AA364 003A72C4  4B FF 6E 85 */	bl dataRemoveLayer
/* 803AA368 003A72C8  48 00 00 94 */	b lbl_803AA3FC
lbl_803AA36C:
/* 803AA36C 003A72CC  28 06 00 00 */	cmplwi r6, 0
/* 803AA370 003A72D0  40 82 00 70 */	bne lbl_803AA3E0
/* 803AA374 003A72D4  28 04 00 00 */	cmplwi r4, 0
/* 803AA378 003A72D8  40 82 00 0C */	bne lbl_803AA384
/* 803AA37C 003A72DC  38 C0 00 00 */	li r6, 0
/* 803AA380 003A72E0  48 00 00 40 */	b lbl_803AA3C0
lbl_803AA384:
/* 803AA384 003A72E4  80 04 00 04 */	lwz r0, 4(r4)
/* 803AA388 003A72E8  54 65 04 3E */	clrlwi r5, r3, 0x10
/* 803AA38C 003A72EC  7C C4 02 14 */	add r6, r4, r0
/* 803AA390 003A72F0  48 00 00 1C */	b lbl_803AA3AC
lbl_803AA394:
/* 803AA394 003A72F4  A0 06 00 04 */	lhz r0, 4(r6)
/* 803AA398 003A72F8  7C 00 28 40 */	cmplw r0, r5
/* 803AA39C 003A72FC  40 82 00 08 */	bne lbl_803AA3A4
/* 803AA3A0 003A7300  48 00 00 20 */	b lbl_803AA3C0
lbl_803AA3A4:
/* 803AA3A4 003A7304  80 06 00 00 */	lwz r0, 0(r6)
/* 803AA3A8 003A7308  7C C6 02 14 */	add r6, r6, r0
lbl_803AA3AC:
/* 803AA3AC 003A730C  80 86 00 00 */	lwz r4, 0(r6)
/* 803AA3B0 003A7310  3C 04 00 01 */	addis r0, r4, 1
/* 803AA3B4 003A7314  28 00 FF FF */	cmplwi r0, 0xffff
/* 803AA3B8 003A7318  40 82 FF DC */	bne lbl_803AA394
/* 803AA3BC 003A731C  38 C0 00 00 */	li r6, 0
lbl_803AA3C0:
/* 803AA3C0 003A7320  28 06 00 00 */	cmplwi r6, 0
/* 803AA3C4 003A7324  41 82 00 10 */	beq lbl_803AA3D4
/* 803AA3C8 003A7328  38 86 00 08 */	addi r4, r6, 8
/* 803AA3CC 003A732C  4B FF 6F E1 */	bl dataInsertCurve
/* 803AA3D0 003A7330  48 00 00 2C */	b lbl_803AA3FC
lbl_803AA3D4:
/* 803AA3D4 003A7334  38 80 00 00 */	li r4, 0
/* 803AA3D8 003A7338  4B FF 6F D5 */	bl dataInsertCurve
/* 803AA3DC 003A733C  48 00 00 20 */	b lbl_803AA3FC
lbl_803AA3E0:
/* 803AA3E0 003A7340  4B FF 71 D1 */	bl dataRemoveCurve
/* 803AA3E4 003A7344  48 00 00 18 */	b lbl_803AA3FC
lbl_803AA3E8:
/* 803AA3E8 003A7348  28 06 00 00 */	cmplwi r6, 0
/* 803AA3EC 003A734C  40 82 00 0C */	bne lbl_803AA3F8
/* 803AA3F0 003A7350  4B FF 77 8D */	bl dataAddSampleReference
/* 803AA3F4 003A7354  48 00 00 08 */	b lbl_803AA3FC
lbl_803AA3F8:
/* 803AA3F8 003A7358  4B FF 78 5D */	bl dataRemoveSampleReference
lbl_803AA3FC:
/* 803AA3FC 003A735C  80 01 00 14 */	lwz r0, 0x14(r1)
/* 803AA400 003A7360  7C 08 03 A6 */	mtlr r0
/* 803AA404 003A7364  38 21 00 10 */	addi r1, r1, 0x10
/* 803AA408 003A7368  4E 80 00 20 */	blr

.global sndSetSampleDataUploadCallback
sndSetSampleDataUploadCallback:
/* 803AA40C 003A736C  94 21 FF F0 */	stwu r1, -0x10(r1)
/* 803AA410 003A7370  7C 08 02 A6 */	mflr r0
/* 803AA414 003A7374  90 01 00 14 */	stw r0, 0x14(r1)
/* 803AA418 003A7378  48 00 9A 29 */	bl hwSetSaveSampleCallback
/* 803AA41C 003A737C  80 01 00 14 */	lwz r0, 0x14(r1)
/* 803AA420 003A7380  7C 08 03 A6 */	mtlr r0
/* 803AA424 003A7384  38 21 00 10 */	addi r1, r1, 0x10
/* 803AA428 003A7388  4E 80 00 20 */	blr

.global sndPushGroup
sndPushGroup:
/* 803AA42C 003A738C  94 21 FF D0 */	stwu r1, -0x30(r1)
/* 803AA430 003A7390  7C 08 02 A6 */	mflr r0
/* 803AA434 003A7394  90 01 00 34 */	stw r0, 0x34(r1)
/* 803AA438 003A7398  39 61 00 30 */	addi r11, r1, 0x30
/* 803AA43C 003A739C  4B FD F6 39 */	bl _savegpr_25
/* 803AA440 003A73A0  88 0D AE 48 */	lbz r0, sndActive@sda21(r13)
/* 803AA444 003A73A4  7C 7B 1B 78 */	mr r27, r3
/* 803AA448 003A73A8  7C 9C 23 78 */	mr r28, r4
/* 803AA44C 003A73AC  7C DD 33 78 */	mr r29, r6
/* 803AA450 003A73B0  28 00 00 00 */	cmplwi r0, 0
/* 803AA454 003A73B4  7C FE 3B 78 */	mr r30, r7
/* 803AA458 003A73B8  41 82 02 E4 */	beq lbl_803AA73C
/* 803AA45C 003A73BC  A8 CD AF 18 */	lha r6, sp@sda21(r13)
/* 803AA460 003A73C0  2C 06 00 80 */	cmpwi r6, 0x80
/* 803AA464 003A73C4  40 80 02 D8 */	bge lbl_803AA73C
/* 803AA468 003A73C8  7F 7F DB 78 */	mr r31, r27
/* 803AA46C 003A73CC  57 84 04 3E */	clrlwi r4, r28, 0x10
/* 803AA470 003A73D0  48 00 02 BC */	b lbl_803AA72C
lbl_803AA474:
/* 803AA474 003A73D4  A0 1F 00 04 */	lhz r0, 4(r31)
/* 803AA478 003A73D8  7C 00 20 40 */	cmplw r0, r4
/* 803AA47C 003A73DC  40 82 02 A8 */	bne lbl_803AA724
/* 803AA480 003A73E0  1C 06 00 0C */	mulli r0, r6, 0xc
/* 803AA484 003A73E4  3C 80 80 56 */	lis r4, gs@ha
/* 803AA488 003A73E8  7C A3 2B 78 */	mr r3, r5
/* 803AA48C 003A73EC  38 84 EC 60 */	addi r4, r4, gs@l
/* 803AA490 003A73F0  7F E4 01 2E */	stwx r31, r4, r0
/* 803AA494 003A73F4  7C 84 02 14 */	add r4, r4, r0
/* 803AA498 003A73F8  93 64 00 08 */	stw r27, 8(r4)
/* 803AA49C 003A73FC  93 A4 00 04 */	stw r29, 4(r4)
/* 803AA4A0 003A7400  80 1F 00 0C */	lwz r0, 0xc(r31)
/* 803AA4A4 003A7404  7F 3B 02 14 */	add r25, r27, r0
/* 803AA4A8 003A7408  48 00 98 61 */	bl hwTransAddr
/* 803AA4AC 003A740C  7C 64 1B 78 */	mr r4, r3
/* 803AA4B0 003A7410  7F A3 EB 78 */	mr r3, r29
/* 803AA4B4 003A7414  4B FF 72 79 */	bl dataInsertSDir
/* 803AA4B8 003A7418  28 03 00 00 */	cmplwi r3, 0
/* 803AA4BC 003A741C  41 82 00 6C */	beq lbl_803AA528
/* 803AA4C0 003A7420  48 00 00 5C */	b lbl_803AA51C
lbl_803AA4C4:
/* 803AA4C4 003A7424  54 60 04 21 */	rlwinm. r0, r3, 0, 0x10, 0x10
/* 803AA4C8 003A7428  41 82 00 3C */	beq lbl_803AA504
/* 803AA4CC 003A742C  54 7A 04 BE */	clrlwi r26, r3, 0x12
/* 803AA4D0 003A7430  48 00 00 1C */	b lbl_803AA4EC
lbl_803AA4D4:
/* 803AA4D4 003A7434  7F 43 D3 78 */	mr r3, r26
/* 803AA4D8 003A7438  7F A4 EB 78 */	mr r4, r29
/* 803AA4DC 003A743C  38 A0 00 01 */	li r5, 1
/* 803AA4E0 003A7440  38 C0 00 00 */	li r6, 0
/* 803AA4E4 003A7444  4B FF FC AD */	bl ScanIDList
/* 803AA4E8 003A7448  3B 5A 00 01 */	addi r26, r26, 1
lbl_803AA4EC:
/* 803AA4EC 003A744C  A0 19 00 02 */	lhz r0, 2(r25)
/* 803AA4F0 003A7450  57 43 04 3E */	clrlwi r3, r26, 0x10
/* 803AA4F4 003A7454  7C 03 00 40 */	cmplw r3, r0
/* 803AA4F8 003A7458  40 81 FF DC */	ble lbl_803AA4D4
/* 803AA4FC 003A745C  3B 39 00 04 */	addi r25, r25, 4
/* 803AA500 003A7460  48 00 00 1C */	b lbl_803AA51C
lbl_803AA504:
/* 803AA504 003A7464  A0 79 00 00 */	lhz r3, 0(r25)
/* 803AA508 003A7468  7F A4 EB 78 */	mr r4, r29
/* 803AA50C 003A746C  38 A0 00 01 */	li r5, 1
/* 803AA510 003A7470  38 C0 00 00 */	li r6, 0
/* 803AA514 003A7474  3B 39 00 02 */	addi r25, r25, 2
/* 803AA518 003A7478  4B FF FC 79 */	bl ScanIDList
lbl_803AA51C:
/* 803AA51C 003A747C  A0 79 00 00 */	lhz r3, 0(r25)
/* 803AA520 003A7480  28 03 FF FF */	cmplwi r3, 0xffff
/* 803AA524 003A7484  40 82 FF A0 */	bne lbl_803AA4C4
lbl_803AA528:
/* 803AA528 003A7488  80 1F 00 08 */	lwz r0, 8(r31)
/* 803AA52C 003A748C  7F 5B 02 14 */	add r26, r27, r0
/* 803AA530 003A7490  48 00 00 5C */	b lbl_803AA58C
lbl_803AA534:
/* 803AA534 003A7494  54 60 04 21 */	rlwinm. r0, r3, 0, 0x10, 0x10
/* 803AA538 003A7498  41 82 00 3C */	beq lbl_803AA574
/* 803AA53C 003A749C  54 79 04 BE */	clrlwi r25, r3, 0x12
/* 803AA540 003A74A0  48 00 00 1C */	b lbl_803AA55C
lbl_803AA544:
/* 803AA544 003A74A4  7F 23 CB 78 */	mr r3, r25
/* 803AA548 003A74A8  7F C4 F3 78 */	mr r4, r30
/* 803AA54C 003A74AC  38 A0 00 00 */	li r5, 0
/* 803AA550 003A74B0  38 C0 00 00 */	li r6, 0
/* 803AA554 003A74B4  4B FF FC 3D */	bl ScanIDList
/* 803AA558 003A74B8  3B 39 00 01 */	addi r25, r25, 1
lbl_803AA55C:
/* 803AA55C 003A74BC  A0 1A 00 02 */	lhz r0, 2(r26)
/* 803AA560 003A74C0  57 23 04 3E */	clrlwi r3, r25, 0x10
/* 803AA564 003A74C4  7C 03 00 40 */	cmplw r3, r0
/* 803AA568 003A74C8  40 81 FF DC */	ble lbl_803AA544
/* 803AA56C 003A74CC  3B 5A 00 04 */	addi r26, r26, 4
/* 803AA570 003A74D0  48 00 00 1C */	b lbl_803AA58C
lbl_803AA574:
/* 803AA574 003A74D4  A0 7A 00 00 */	lhz r3, 0(r26)
/* 803AA578 003A74D8  7F C4 F3 78 */	mr r4, r30
/* 803AA57C 003A74DC  38 A0 00 00 */	li r5, 0
/* 803AA580 003A74E0  38 C0 00 00 */	li r6, 0
/* 803AA584 003A74E4  3B 5A 00 02 */	addi r26, r26, 2
/* 803AA588 003A74E8  4B FF FC 09 */	bl ScanIDList
lbl_803AA58C:
/* 803AA58C 003A74EC  A0 7A 00 00 */	lhz r3, 0(r26)
/* 803AA590 003A74F0  28 03 FF FF */	cmplwi r3, 0xffff
/* 803AA594 003A74F4  40 82 FF A0 */	bne lbl_803AA534
/* 803AA598 003A74F8  80 1F 00 10 */	lwz r0, 0x10(r31)
/* 803AA59C 003A74FC  7F 5B 02 14 */	add r26, r27, r0
/* 803AA5A0 003A7500  48 00 00 5C */	b lbl_803AA5FC
lbl_803AA5A4:
/* 803AA5A4 003A7504  54 60 04 21 */	rlwinm. r0, r3, 0, 0x10, 0x10
/* 803AA5A8 003A7508  41 82 00 3C */	beq lbl_803AA5E4
/* 803AA5AC 003A750C  54 79 04 BE */	clrlwi r25, r3, 0x12
/* 803AA5B0 003A7510  48 00 00 1C */	b lbl_803AA5CC
lbl_803AA5B4:
/* 803AA5B4 003A7514  7F 23 CB 78 */	mr r3, r25
/* 803AA5B8 003A7518  7F C4 F3 78 */	mr r4, r30
/* 803AA5BC 003A751C  38 A0 00 04 */	li r5, 4
/* 803AA5C0 003A7520  38 C0 00 00 */	li r6, 0
/* 803AA5C4 003A7524  4B FF FB CD */	bl ScanIDList
/* 803AA5C8 003A7528  3B 39 00 01 */	addi r25, r25, 1
lbl_803AA5CC:
/* 803AA5CC 003A752C  A0 1A 00 02 */	lhz r0, 2(r26)
/* 803AA5D0 003A7530  57 23 04 3E */	clrlwi r3, r25, 0x10
/* 803AA5D4 003A7534  7C 03 00 40 */	cmplw r3, r0
/* 803AA5D8 003A7538  40 81 FF DC */	ble lbl_803AA5B4
/* 803AA5DC 003A753C  3B 5A 00 04 */	addi r26, r26, 4
/* 803AA5E0 003A7540  48 00 00 1C */	b lbl_803AA5FC
lbl_803AA5E4:
/* 803AA5E4 003A7544  A0 7A 00 00 */	lhz r3, 0(r26)
/* 803AA5E8 003A7548  7F C4 F3 78 */	mr r4, r30
/* 803AA5EC 003A754C  38 A0 00 04 */	li r5, 4
/* 803AA5F0 003A7550  38 C0 00 00 */	li r6, 0
/* 803AA5F4 003A7554  3B 5A 00 02 */	addi r26, r26, 2
/* 803AA5F8 003A7558  4B FF FB 99 */	bl ScanIDList
lbl_803AA5FC:
/* 803AA5FC 003A755C  A0 7A 00 00 */	lhz r3, 0(r26)
/* 803AA600 003A7560  28 03 FF FF */	cmplwi r3, 0xffff
/* 803AA604 003A7564  40 82 FF A0 */	bne lbl_803AA5A4
/* 803AA608 003A7568  80 1F 00 14 */	lwz r0, 0x14(r31)
/* 803AA60C 003A756C  7F 5B 02 14 */	add r26, r27, r0
/* 803AA610 003A7570  48 00 00 5C */	b lbl_803AA66C
lbl_803AA614:
/* 803AA614 003A7574  54 60 04 21 */	rlwinm. r0, r3, 0, 0x10, 0x10
/* 803AA618 003A7578  41 82 00 3C */	beq lbl_803AA654
/* 803AA61C 003A757C  54 79 04 BE */	clrlwi r25, r3, 0x12
/* 803AA620 003A7580  48 00 00 1C */	b lbl_803AA63C
lbl_803AA624:
/* 803AA624 003A7584  7F 23 CB 78 */	mr r3, r25
/* 803AA628 003A7588  7F C4 F3 78 */	mr r4, r30
/* 803AA62C 003A758C  38 A0 00 02 */	li r5, 2
/* 803AA630 003A7590  38 C0 00 00 */	li r6, 0
/* 803AA634 003A7594  4B FF FB 5D */	bl ScanIDList
/* 803AA638 003A7598  3B 39 00 01 */	addi r25, r25, 1
lbl_803AA63C:
/* 803AA63C 003A759C  A0 1A 00 02 */	lhz r0, 2(r26)
/* 803AA640 003A75A0  57 23 04 3E */	clrlwi r3, r25, 0x10
/* 803AA644 003A75A4  7C 03 00 40 */	cmplw r3, r0
/* 803AA648 003A75A8  40 81 FF DC */	ble lbl_803AA624
/* 803AA64C 003A75AC  3B 5A 00 04 */	addi r26, r26, 4
/* 803AA650 003A75B0  48 00 00 1C */	b lbl_803AA66C
lbl_803AA654:
/* 803AA654 003A75B4  A0 7A 00 00 */	lhz r3, 0(r26)
/* 803AA658 003A75B8  7F C4 F3 78 */	mr r4, r30
/* 803AA65C 003A75BC  38 A0 00 02 */	li r5, 2
/* 803AA660 003A75C0  38 C0 00 00 */	li r6, 0
/* 803AA664 003A75C4  3B 5A 00 02 */	addi r26, r26, 2
/* 803AA668 003A75C8  4B FF FB 29 */	bl ScanIDList
lbl_803AA66C:
/* 803AA66C 003A75CC  A0 7A 00 00 */	lhz r3, 0(r26)
/* 803AA670 003A75D0  28 03 FF FF */	cmplwi r3, 0xffff
/* 803AA674 003A75D4  40 82 FF A0 */	bne lbl_803AA614
/* 803AA678 003A75D8  80 1F 00 18 */	lwz r0, 0x18(r31)
/* 803AA67C 003A75DC  7F 5B 02 14 */	add r26, r27, r0
/* 803AA680 003A75E0  48 00 00 5C */	b lbl_803AA6DC
lbl_803AA684:
/* 803AA684 003A75E4  54 60 04 21 */	rlwinm. r0, r3, 0, 0x10, 0x10
/* 803AA688 003A75E8  41 82 00 3C */	beq lbl_803AA6C4
/* 803AA68C 003A75EC  54 79 04 BE */	clrlwi r25, r3, 0x12
/* 803AA690 003A75F0  48 00 00 1C */	b lbl_803AA6AC
lbl_803AA694:
/* 803AA694 003A75F4  7F 23 CB 78 */	mr r3, r25
/* 803AA698 003A75F8  7F C4 F3 78 */	mr r4, r30
/* 803AA69C 003A75FC  38 A0 00 03 */	li r5, 3
/* 803AA6A0 003A7600  38 C0 00 00 */	li r6, 0
/* 803AA6A4 003A7604  4B FF FA ED */	bl ScanIDList
/* 803AA6A8 003A7608  3B 39 00 01 */	addi r25, r25, 1
lbl_803AA6AC:
/* 803AA6AC 003A760C  A0 1A 00 02 */	lhz r0, 2(r26)
/* 803AA6B0 003A7610  57 23 04 3E */	clrlwi r3, r25, 0x10
/* 803AA6B4 003A7614  7C 03 00 40 */	cmplw r3, r0
/* 803AA6B8 003A7618  40 81 FF DC */	ble lbl_803AA694
/* 803AA6BC 003A761C  3B 5A 00 04 */	addi r26, r26, 4
/* 803AA6C0 003A7620  48 00 00 1C */	b lbl_803AA6DC
lbl_803AA6C4:
/* 803AA6C4 003A7624  A0 7A 00 00 */	lhz r3, 0(r26)
/* 803AA6C8 003A7628  7F C4 F3 78 */	mr r4, r30
/* 803AA6CC 003A762C  38 A0 00 03 */	li r5, 3
/* 803AA6D0 003A7630  38 C0 00 00 */	li r6, 0
/* 803AA6D4 003A7634  3B 5A 00 02 */	addi r26, r26, 2
/* 803AA6D8 003A7638  4B FF FA B9 */	bl ScanIDList
lbl_803AA6DC:
/* 803AA6DC 003A763C  A0 7A 00 00 */	lhz r3, 0(r26)
/* 803AA6E0 003A7640  28 03 FF FF */	cmplwi r3, 0xffff
/* 803AA6E4 003A7644  40 82 FF A0 */	bne lbl_803AA684
/* 803AA6E8 003A7648  A0 1F 00 06 */	lhz r0, 6(r31)
/* 803AA6EC 003A764C  28 00 00 01 */	cmplwi r0, 1
/* 803AA6F0 003A7650  40 82 00 1C */	bne lbl_803AA70C
/* 803AA6F4 003A7654  80 1F 00 1C */	lwz r0, 0x1c(r31)
/* 803AA6F8 003A7658  7F 83 E3 78 */	mr r3, r28
/* 803AA6FC 003A765C  7C 9B 02 14 */	add r4, r27, r0
/* 803AA700 003A7660  A0 A4 00 00 */	lhz r5, 0(r4)
/* 803AA704 003A7664  38 84 00 04 */	addi r4, r4, 4
/* 803AA708 003A7668  4B FF 75 E5 */	bl dataInsertFX
lbl_803AA70C:
/* 803AA70C 003A766C  48 00 97 D9 */	bl hwSyncSampleMem
/* 803AA710 003A7670  A8 8D AF 18 */	lha r4, sp@sda21(r13)
/* 803AA714 003A7674  38 60 00 01 */	li r3, 1
/* 803AA718 003A7678  38 04 00 01 */	addi r0, r4, 1
/* 803AA71C 003A767C  B0 0D AF 18 */	sth r0, sp@sda21(r13)
/* 803AA720 003A7680  48 00 00 20 */	b lbl_803AA740
lbl_803AA724:
/* 803AA724 003A7684  80 1F 00 00 */	lwz r0, 0(r31)
/* 803AA728 003A7688  7F FB 02 14 */	add r31, r27, r0
lbl_803AA72C:
/* 803AA72C 003A768C  80 7F 00 00 */	lwz r3, 0(r31)
/* 803AA730 003A7690  3C 03 00 01 */	addis r0, r3, 1
/* 803AA734 003A7694  28 00 FF FF */	cmplwi r0, 0xffff
/* 803AA738 003A7698  40 82 FD 3C */	bne lbl_803AA474
lbl_803AA73C:
/* 803AA73C 003A769C  38 60 00 00 */	li r3, 0
lbl_803AA740:
/* 803AA740 003A76A0  39 61 00 30 */	addi r11, r1, 0x30
/* 803AA744 003A76A4  4B FD F3 7D */	bl _restgpr_25
/* 803AA748 003A76A8  80 01 00 34 */	lwz r0, 0x34(r1)
/* 803AA74C 003A76AC  7C 08 03 A6 */	mtlr r0
/* 803AA750 003A76B0  38 21 00 30 */	addi r1, r1, 0x30
/* 803AA754 003A76B4  4E 80 00 20 */	blr

.global sndPopGroup
sndPopGroup:
/* 803AA758 003A76B8  94 21 FF E0 */	stwu r1, -0x20(r1)
/* 803AA75C 003A76BC  7C 08 02 A6 */	mflr r0
/* 803AA760 003A76C0  90 01 00 24 */	stw r0, 0x24(r1)
/* 803AA764 003A76C4  39 61 00 20 */	addi r11, r1, 0x20
/* 803AA768 003A76C8  4B FD F3 11 */	bl _savegpr_26
/* 803AA76C 003A76CC  A8 AD AF 18 */	lha r5, sp@sda21(r13)
/* 803AA770 003A76D0  3C 60 80 56 */	lis r3, gs@ha
/* 803AA774 003A76D4  38 83 EC 60 */	addi r4, r3, gs@l
/* 803AA778 003A76D8  38 65 FF FF */	addi r3, r5, -1
/* 803AA77C 003A76DC  7C 60 07 34 */	extsh r0, r3
/* 803AA780 003A76E0  B0 6D AF 18 */	sth r3, sp@sda21(r13)
/* 803AA784 003A76E4  1C 00 00 0C */	mulli r0, r0, 0xc
/* 803AA788 003A76E8  7C 64 02 14 */	add r3, r4, r0
/* 803AA78C 003A76EC  7F E4 00 2E */	lwzx r31, r4, r0
/* 803AA790 003A76F0  83 C3 00 08 */	lwz r30, 8(r3)
/* 803AA794 003A76F4  83 43 00 04 */	lwz r26, 4(r3)
/* 803AA798 003A76F8  48 00 A9 25 */	bl hwDisableIrq
/* 803AA79C 003A76FC  A0 1F 00 06 */	lhz r0, 6(r31)
/* 803AA7A0 003A7700  28 00 00 01 */	cmplwi r0, 1
/* 803AA7A4 003A7704  40 82 00 1C */	bne lbl_803AA7C0
/* 803AA7A8 003A7708  80 1F 00 1C */	lwz r0, 0x1c(r31)
/* 803AA7AC 003A770C  7C 7E 02 14 */	add r3, r30, r0
/* 803AA7B0 003A7710  A0 83 00 00 */	lhz r4, 0(r3)
/* 803AA7B4 003A7714  38 63 00 04 */	addi r3, r3, 4
/* 803AA7B8 003A7718  48 00 50 B5 */	bl s3dKillEmitterByFXID
/* 803AA7BC 003A771C  48 00 00 0C */	b lbl_803AA7C8
lbl_803AA7C0:
/* 803AA7C0 003A7720  A0 7F 00 04 */	lhz r3, 4(r31)
/* 803AA7C4 003A7724  4B FE B6 29 */	bl seqKillInstancesByGroupID
lbl_803AA7C8:
/* 803AA7C8 003A7728  80 1F 00 08 */	lwz r0, 8(r31)
/* 803AA7CC 003A772C  7C 7E 02 14 */	add r3, r30, r0
/* 803AA7D0 003A7730  4B FF E5 45 */	bl synthKillVoicesByMacroReferences
/* 803AA7D4 003A7734  48 00 A8 B1 */	bl hwEnableIrq
/* 803AA7D8 003A7738  80 1F 00 0C */	lwz r0, 0xc(r31)
/* 803AA7DC 003A773C  7F BE 02 14 */	add r29, r30, r0
/* 803AA7E0 003A7740  A0 1D 00 00 */	lhz r0, 0(r29)
/* 803AA7E4 003A7744  28 00 FF FF */	cmplwi r0, 0xffff
/* 803AA7E8 003A7748  41 82 00 B4 */	beq lbl_803AA89C
/* 803AA7EC 003A774C  7F BC EB 78 */	mr r28, r29
/* 803AA7F0 003A7750  48 00 00 08 */	b lbl_803AA7F8
lbl_803AA7F4:
/* 803AA7F4 003A7754  3B 9C 00 02 */	addi r28, r28, 2
lbl_803AA7F8:
/* 803AA7F8 003A7758  A0 1C 00 00 */	lhz r0, 0(r28)
/* 803AA7FC 003A775C  28 00 FF FF */	cmplwi r0, 0xffff
/* 803AA800 003A7760  40 82 FF F4 */	bne lbl_803AA7F4
/* 803AA804 003A7764  3B 9C FF FE */	addi r28, r28, -2
/* 803AA808 003A7768  48 00 00 8C */	b lbl_803AA894
lbl_803AA80C:
/* 803AA80C 003A776C  7C 1C E8 40 */	cmplw r28, r29
/* 803AA810 003A7770  41 82 00 6C */	beq lbl_803AA87C
/* 803AA814 003A7774  A0 1C FF FE */	lhz r0, -2(r28)
/* 803AA818 003A7778  54 00 04 21 */	rlwinm. r0, r0, 0, 0x10, 0x10
/* 803AA81C 003A777C  41 82 00 44 */	beq lbl_803AA860
/* 803AA820 003A7780  A0 1C 00 00 */	lhz r0, 0(r28)
/* 803AA824 003A7784  7C 1B 07 34 */	extsh r27, r0
/* 803AA828 003A7788  48 00 00 1C */	b lbl_803AA844
lbl_803AA82C:
/* 803AA82C 003A778C  57 63 04 3E */	clrlwi r3, r27, 0x10
/* 803AA830 003A7790  38 80 00 00 */	li r4, 0
/* 803AA834 003A7794  38 A0 00 01 */	li r5, 1
/* 803AA838 003A7798  38 C0 00 01 */	li r6, 1
/* 803AA83C 003A779C  4B FF F9 55 */	bl ScanIDList
/* 803AA840 003A77A0  3B 7B FF FF */	addi r27, r27, -1
lbl_803AA844:
/* 803AA844 003A77A4  A0 1C FF FE */	lhz r0, -2(r28)
/* 803AA848 003A77A8  7F 63 07 34 */	extsh r3, r27
/* 803AA84C 003A77AC  54 00 04 BE */	clrlwi r0, r0, 0x12
/* 803AA850 003A77B0  7C 03 00 00 */	cmpw r3, r0
/* 803AA854 003A77B4  40 80 FF D8 */	bge lbl_803AA82C
/* 803AA858 003A77B8  3B 9C FF FC */	addi r28, r28, -4
/* 803AA85C 003A77BC  48 00 00 38 */	b lbl_803AA894
lbl_803AA860:
/* 803AA860 003A77C0  A0 7C 00 00 */	lhz r3, 0(r28)
/* 803AA864 003A77C4  38 80 00 00 */	li r4, 0
/* 803AA868 003A77C8  38 A0 00 01 */	li r5, 1
/* 803AA86C 003A77CC  38 C0 00 01 */	li r6, 1
/* 803AA870 003A77D0  4B FF F9 21 */	bl ScanIDList
/* 803AA874 003A77D4  3B 9C FF FE */	addi r28, r28, -2
/* 803AA878 003A77D8  48 00 00 1C */	b lbl_803AA894
lbl_803AA87C:
/* 803AA87C 003A77DC  A0 7C 00 00 */	lhz r3, 0(r28)
/* 803AA880 003A77E0  38 80 00 00 */	li r4, 0
/* 803AA884 003A77E4  38 A0 00 01 */	li r5, 1
/* 803AA888 003A77E8  38 C0 00 01 */	li r6, 1
/* 803AA88C 003A77EC  4B FF F9 05 */	bl ScanIDList
/* 803AA890 003A77F0  3B 9C FF FE */	addi r28, r28, -2
lbl_803AA894:
/* 803AA894 003A77F4  7C 1C E8 40 */	cmplw r28, r29
/* 803AA898 003A77F8  40 80 FF 74 */	bge lbl_803AA80C
lbl_803AA89C:
/* 803AA89C 003A77FC  7F 43 D3 78 */	mr r3, r26
/* 803AA8A0 003A7800  4B FF 70 15 */	bl dataRemoveSDir
/* 803AA8A4 003A7804  80 1F 00 08 */	lwz r0, 8(r31)
/* 803AA8A8 003A7808  7F 9E 02 14 */	add r28, r30, r0
/* 803AA8AC 003A780C  48 00 00 5C */	b lbl_803AA908
lbl_803AA8B0:
/* 803AA8B0 003A7810  54 60 04 21 */	rlwinm. r0, r3, 0, 0x10, 0x10
/* 803AA8B4 003A7814  41 82 00 3C */	beq lbl_803AA8F0
/* 803AA8B8 003A7818  54 7B 04 BE */	clrlwi r27, r3, 0x12
/* 803AA8BC 003A781C  48 00 00 1C */	b lbl_803AA8D8
lbl_803AA8C0:
/* 803AA8C0 003A7820  7F 63 DB 78 */	mr r3, r27
/* 803AA8C4 003A7824  38 80 00 00 */	li r4, 0
/* 803AA8C8 003A7828  38 A0 00 00 */	li r5, 0
/* 803AA8CC 003A782C  38 C0 00 01 */	li r6, 1
/* 803AA8D0 003A7830  4B FF F8 C1 */	bl ScanIDList
/* 803AA8D4 003A7834  3B 7B 00 01 */	addi r27, r27, 1
lbl_803AA8D8:
/* 803AA8D8 003A7838  A0 1C 00 02 */	lhz r0, 2(r28)
/* 803AA8DC 003A783C  57 63 04 3E */	clrlwi r3, r27, 0x10
/* 803AA8E0 003A7840  7C 03 00 40 */	cmplw r3, r0
/* 803AA8E4 003A7844  40 81 FF DC */	ble lbl_803AA8C0
/* 803AA8E8 003A7848  3B 9C 00 04 */	addi r28, r28, 4
/* 803AA8EC 003A784C  48 00 00 1C */	b lbl_803AA908
lbl_803AA8F0:
/* 803AA8F0 003A7850  A0 7C 00 00 */	lhz r3, 0(r28)
/* 803AA8F4 003A7854  38 80 00 00 */	li r4, 0
/* 803AA8F8 003A7858  38 A0 00 00 */	li r5, 0
/* 803AA8FC 003A785C  38 C0 00 01 */	li r6, 1
/* 803AA900 003A7860  3B 9C 00 02 */	addi r28, r28, 2
/* 803AA904 003A7864  4B FF F8 8D */	bl ScanIDList
lbl_803AA908:
/* 803AA908 003A7868  A0 7C 00 00 */	lhz r3, 0(r28)
/* 803AA90C 003A786C  28 03 FF FF */	cmplwi r3, 0xffff
/* 803AA910 003A7870  40 82 FF A0 */	bne lbl_803AA8B0
/* 803AA914 003A7874  80 1F 00 10 */	lwz r0, 0x10(r31)
/* 803AA918 003A7878  7F 9E 02 14 */	add r28, r30, r0
/* 803AA91C 003A787C  48 00 00 5C */	b lbl_803AA978
lbl_803AA920:
/* 803AA920 003A7880  54 60 04 21 */	rlwinm. r0, r3, 0, 0x10, 0x10
/* 803AA924 003A7884  41 82 00 3C */	beq lbl_803AA960
/* 803AA928 003A7888  54 7B 04 BE */	clrlwi r27, r3, 0x12
/* 803AA92C 003A788C  48 00 00 1C */	b lbl_803AA948
lbl_803AA930:
/* 803AA930 003A7890  7F 63 DB 78 */	mr r3, r27
/* 803AA934 003A7894  38 80 00 00 */	li r4, 0
/* 803AA938 003A7898  38 A0 00 04 */	li r5, 4
/* 803AA93C 003A789C  38 C0 00 01 */	li r6, 1
/* 803AA940 003A78A0  4B FF F8 51 */	bl ScanIDList
/* 803AA944 003A78A4  3B 7B 00 01 */	addi r27, r27, 1
lbl_803AA948:
/* 803AA948 003A78A8  A0 1C 00 02 */	lhz r0, 2(r28)
/* 803AA94C 003A78AC  57 63 04 3E */	clrlwi r3, r27, 0x10
/* 803AA950 003A78B0  7C 03 00 40 */	cmplw r3, r0
/* 803AA954 003A78B4  40 81 FF DC */	ble lbl_803AA930
/* 803AA958 003A78B8  3B 9C 00 04 */	addi r28, r28, 4
/* 803AA95C 003A78BC  48 00 00 1C */	b lbl_803AA978
lbl_803AA960:
/* 803AA960 003A78C0  A0 7C 00 00 */	lhz r3, 0(r28)
/* 803AA964 003A78C4  38 80 00 00 */	li r4, 0
/* 803AA968 003A78C8  38 A0 00 04 */	li r5, 4
/* 803AA96C 003A78CC  38 C0 00 01 */	li r6, 1
/* 803AA970 003A78D0  3B 9C 00 02 */	addi r28, r28, 2
/* 803AA974 003A78D4  4B FF F8 1D */	bl ScanIDList
lbl_803AA978:
/* 803AA978 003A78D8  A0 7C 00 00 */	lhz r3, 0(r28)
/* 803AA97C 003A78DC  28 03 FF FF */	cmplwi r3, 0xffff
/* 803AA980 003A78E0  40 82 FF A0 */	bne lbl_803AA920
/* 803AA984 003A78E4  80 1F 00 14 */	lwz r0, 0x14(r31)
/* 803AA988 003A78E8  7F 9E 02 14 */	add r28, r30, r0
/* 803AA98C 003A78EC  48 00 00 5C */	b lbl_803AA9E8
lbl_803AA990:
/* 803AA990 003A78F0  54 60 04 21 */	rlwinm. r0, r3, 0, 0x10, 0x10
/* 803AA994 003A78F4  41 82 00 3C */	beq lbl_803AA9D0
/* 803AA998 003A78F8  54 7B 04 BE */	clrlwi r27, r3, 0x12
/* 803AA99C 003A78FC  48 00 00 1C */	b lbl_803AA9B8
lbl_803AA9A0:
/* 803AA9A0 003A7900  7F 63 DB 78 */	mr r3, r27
/* 803AA9A4 003A7904  38 80 00 00 */	li r4, 0
/* 803AA9A8 003A7908  38 A0 00 02 */	li r5, 2
/* 803AA9AC 003A790C  38 C0 00 01 */	li r6, 1
/* 803AA9B0 003A7910  4B FF F7 E1 */	bl ScanIDList
/* 803AA9B4 003A7914  3B 7B 00 01 */	addi r27, r27, 1
lbl_803AA9B8:
/* 803AA9B8 003A7918  A0 1C 00 02 */	lhz r0, 2(r28)
/* 803AA9BC 003A791C  57 63 04 3E */	clrlwi r3, r27, 0x10
/* 803AA9C0 003A7920  7C 03 00 40 */	cmplw r3, r0
/* 803AA9C4 003A7924  40 81 FF DC */	ble lbl_803AA9A0
/* 803AA9C8 003A7928  3B 9C 00 04 */	addi r28, r28, 4
/* 803AA9CC 003A792C  48 00 00 1C */	b lbl_803AA9E8
lbl_803AA9D0:
/* 803AA9D0 003A7930  A0 7C 00 00 */	lhz r3, 0(r28)
/* 803AA9D4 003A7934  38 80 00 00 */	li r4, 0
/* 803AA9D8 003A7938  38 A0 00 02 */	li r5, 2
/* 803AA9DC 003A793C  38 C0 00 01 */	li r6, 1
/* 803AA9E0 003A7940  3B 9C 00 02 */	addi r28, r28, 2
/* 803AA9E4 003A7944  4B FF F7 AD */	bl ScanIDList
lbl_803AA9E8:
/* 803AA9E8 003A7948  A0 7C 00 00 */	lhz r3, 0(r28)
/* 803AA9EC 003A794C  28 03 FF FF */	cmplwi r3, 0xffff
/* 803AA9F0 003A7950  40 82 FF A0 */	bne lbl_803AA990
/* 803AA9F4 003A7954  80 1F 00 18 */	lwz r0, 0x18(r31)
/* 803AA9F8 003A7958  7F 9E 02 14 */	add r28, r30, r0
/* 803AA9FC 003A795C  48 00 00 5C */	b lbl_803AAA58
lbl_803AAA00:
/* 803AAA00 003A7960  54 60 04 21 */	rlwinm. r0, r3, 0, 0x10, 0x10
/* 803AAA04 003A7964  41 82 00 3C */	beq lbl_803AAA40
/* 803AAA08 003A7968  54 7B 04 BE */	clrlwi r27, r3, 0x12
/* 803AAA0C 003A796C  48 00 00 1C */	b lbl_803AAA28
lbl_803AAA10:
/* 803AAA10 003A7970  7F 63 DB 78 */	mr r3, r27
/* 803AAA14 003A7974  38 80 00 00 */	li r4, 0
/* 803AAA18 003A7978  38 A0 00 03 */	li r5, 3
/* 803AAA1C 003A797C  38 C0 00 01 */	li r6, 1
/* 803AAA20 003A7980  4B FF F7 71 */	bl ScanIDList
/* 803AAA24 003A7984  3B 7B 00 01 */	addi r27, r27, 1
lbl_803AAA28:
/* 803AAA28 003A7988  A0 1C 00 02 */	lhz r0, 2(r28)
/* 803AAA2C 003A798C  57 63 04 3E */	clrlwi r3, r27, 0x10
/* 803AAA30 003A7990  7C 03 00 40 */	cmplw r3, r0
/* 803AAA34 003A7994  40 81 FF DC */	ble lbl_803AAA10
/* 803AAA38 003A7998  3B 9C 00 04 */	addi r28, r28, 4
/* 803AAA3C 003A799C  48 00 00 1C */	b lbl_803AAA58
lbl_803AAA40:
/* 803AAA40 003A79A0  A0 7C 00 00 */	lhz r3, 0(r28)
/* 803AAA44 003A79A4  38 80 00 00 */	li r4, 0
/* 803AAA48 003A79A8  38 A0 00 03 */	li r5, 3
/* 803AAA4C 003A79AC  38 C0 00 01 */	li r6, 1
/* 803AAA50 003A79B0  3B 9C 00 02 */	addi r28, r28, 2
/* 803AAA54 003A79B4  4B FF F7 3D */	bl ScanIDList
lbl_803AAA58:
/* 803AAA58 003A79B8  A0 7C 00 00 */	lhz r3, 0(r28)
/* 803AAA5C 003A79BC  28 03 FF FF */	cmplwi r3, 0xffff
/* 803AAA60 003A79C0  40 82 FF A0 */	bne lbl_803AAA00
/* 803AAA64 003A79C4  A0 1F 00 06 */	lhz r0, 6(r31)
/* 803AAA68 003A79C8  28 00 00 01 */	cmplwi r0, 1
/* 803AAA6C 003A79CC  40 82 00 0C */	bne lbl_803AAA78
/* 803AAA70 003A79D0  A0 7F 00 04 */	lhz r3, 4(r31)
/* 803AAA74 003A79D4  4B FF 73 95 */	bl dataRemoveFX
lbl_803AAA78:
/* 803AAA78 003A79D8  38 60 00 01 */	li r3, 1
/* 803AAA7C 003A79DC  39 61 00 20 */	addi r11, r1, 0x20
/* 803AAA80 003A79E0  4B FD F0 45 */	bl _restgpr_26
/* 803AAA84 003A79E4  80 01 00 24 */	lwz r0, 0x24(r1)
/* 803AAA88 003A79E8  7C 08 03 A6 */	mtlr r0
/* 803AAA8C 003A79EC  38 21 00 20 */	addi r1, r1, 0x20
/* 803AAA90 003A79F0  4E 80 00 20 */	blr

.global sndSeqPlaySong
sndSeqPlaySong:
/* 803AAA94 003A79F4  94 21 FF D0 */	stwu r1, -0x30(r1)
/* 803AAA98 003A79F8  7C 08 02 A6 */	mflr r0
/* 803AAA9C 003A79FC  90 01 00 34 */	stw r0, 0x34(r1)
/* 803AAAA0 003A7A00  39 61 00 30 */	addi r11, r1, 0x30
/* 803AAAA4 003A7A04  4B FD EF D1 */	bl _savegpr_25
/* 803AAAA8 003A7A08  A8 0D AF 18 */	lha r0, sp@sda21(r13)
/* 803AAAAC 003A7A0C  3D 20 80 56 */	lis r9, gs@ha
/* 803AAAB0 003A7A10  7C BD 2B 78 */	mr r29, r5
/* 803AAAB4 003A7A14  7C DE 33 78 */	mr r30, r6
/* 803AAAB8 003A7A18  7C 7C 1B 78 */	mr r28, r3
/* 803AAABC 003A7A1C  39 29 EC 60 */	addi r9, r9, gs@l
/* 803AAAC0 003A7A20  7D 1F 43 78 */	mr r31, r8
/* 803AAAC4 003A7A24  54 65 04 3E */	clrlwi r5, r3, 0x10
/* 803AAAC8 003A7A28  38 C0 00 00 */	li r6, 0
/* 803AAACC 003A7A2C  7C 09 03 A6 */	mtctr r0
/* 803AAAD0 003A7A30  2C 00 00 00 */	cmpwi r0, 0
/* 803AAAD4 003A7A34  40 81 00 F0 */	ble lbl_803AABC4
lbl_803AAAD8:
/* 803AAAD8 003A7A38  80 69 00 00 */	lwz r3, 0(r9)
/* 803AAADC 003A7A3C  A0 03 00 04 */	lhz r0, 4(r3)
/* 803AAAE0 003A7A40  7C 05 00 40 */	cmplw r5, r0
/* 803AAAE4 003A7A44  40 82 00 D4 */	bne lbl_803AABB8
/* 803AAAE8 003A7A48  1C A6 00 0C */	mulli r5, r6, 0xc
/* 803AAAEC 003A7A4C  3C 60 80 56 */	lis r3, gs@ha
/* 803AAAF0 003A7A50  38 63 EC 60 */	addi r3, r3, gs@l
/* 803AAAF4 003A7A54  7C C3 28 2E */	lwzx r6, r3, r5
/* 803AAAF8 003A7A58  A0 06 00 06 */	lhz r0, 6(r6)
/* 803AAAFC 003A7A5C  28 00 00 00 */	cmplwi r0, 0
/* 803AAB00 003A7A60  40 82 00 B0 */	bne lbl_803AABB0
/* 803AAB04 003A7A64  7C 63 2A 14 */	add r3, r3, r5
/* 803AAB08 003A7A68  80 A6 00 1C */	lwz r5, 0x1c(r6)
/* 803AAB0C 003A7A6C  81 03 00 08 */	lwz r8, 8(r3)
/* 803AAB10 003A7A70  54 80 04 3E */	clrlwi r0, r4, 0x10
/* 803AAB14 003A7A74  80 86 00 20 */	lwz r4, 0x20(r6)
/* 803AAB18 003A7A78  80 66 00 24 */	lwz r3, 0x24(r6)
/* 803AAB1C 003A7A7C  7F 68 2A 14 */	add r27, r8, r5
/* 803AAB20 003A7A80  7F 48 22 14 */	add r26, r8, r4
/* 803AAB24 003A7A84  7F 28 1A 14 */	add r25, r8, r3
/* 803AAB28 003A7A88  48 00 00 74 */	b lbl_803AAB9C
lbl_803AAB2C:
/* 803AAB2C 003A7A8C  7C 03 00 40 */	cmplw r3, r0
/* 803AAB30 003A7A90  40 82 00 68 */	bne lbl_803AAB98
/* 803AAB34 003A7A94  54 E0 06 3F */	clrlwi. r0, r7, 0x18
/* 803AAB38 003A7A98  41 82 00 2C */	beq lbl_803AAB64
/* 803AAB3C 003A7A9C  7F 63 DB 78 */	mr r3, r27
/* 803AAB40 003A7AA0  7F 44 D3 78 */	mr r4, r26
/* 803AAB44 003A7AA4  7F 25 CB 78 */	mr r5, r25
/* 803AAB48 003A7AA8  7F A6 EB 78 */	mr r6, r29
/* 803AAB4C 003A7AAC  7F C7 F3 78 */	mr r7, r30
/* 803AAB50 003A7AB0  7F E8 FB 78 */	mr r8, r31
/* 803AAB54 003A7AB4  7F 89 E3 78 */	mr r9, r28
/* 803AAB58 003A7AB8  4B FE A2 41 */	bl seqStartPlay
/* 803AAB5C 003A7ABC  7C 79 1B 78 */	mr r25, r3
/* 803AAB60 003A7AC0  48 00 00 30 */	b lbl_803AAB90
lbl_803AAB64:
/* 803AAB64 003A7AC4  48 00 A5 59 */	bl hwDisableIrq
/* 803AAB68 003A7AC8  7F 63 DB 78 */	mr r3, r27
/* 803AAB6C 003A7ACC  7F 44 D3 78 */	mr r4, r26
/* 803AAB70 003A7AD0  7F 25 CB 78 */	mr r5, r25
/* 803AAB74 003A7AD4  7F A6 EB 78 */	mr r6, r29
/* 803AAB78 003A7AD8  7F C7 F3 78 */	mr r7, r30
/* 803AAB7C 003A7ADC  7F E8 FB 78 */	mr r8, r31
/* 803AAB80 003A7AE0  7F 89 E3 78 */	mr r9, r28
/* 803AAB84 003A7AE4  4B FE A2 15 */	bl seqStartPlay
/* 803AAB88 003A7AE8  7C 79 1B 78 */	mr r25, r3
/* 803AAB8C 003A7AEC  48 00 A4 F9 */	bl hwEnableIrq
lbl_803AAB90:
/* 803AAB90 003A7AF0  7F 23 CB 78 */	mr r3, r25
/* 803AAB94 003A7AF4  48 00 00 34 */	b lbl_803AABC8
lbl_803AAB98:
/* 803AAB98 003A7AF8  3B 39 00 54 */	addi r25, r25, 0x54
lbl_803AAB9C:
/* 803AAB9C 003A7AFC  A0 79 00 00 */	lhz r3, 0(r25)
/* 803AABA0 003A7B00  28 03 FF FF */	cmplwi r3, 0xffff
/* 803AABA4 003A7B04  40 82 FF 88 */	bne lbl_803AAB2C
/* 803AABA8 003A7B08  38 60 FF FF */	li r3, -1
/* 803AABAC 003A7B0C  48 00 00 1C */	b lbl_803AABC8
lbl_803AABB0:
/* 803AABB0 003A7B10  38 60 FF FF */	li r3, -1
/* 803AABB4 003A7B14  48 00 00 14 */	b lbl_803AABC8
lbl_803AABB8:
/* 803AABB8 003A7B18  39 29 00 0C */	addi r9, r9, 0xc
/* 803AABBC 003A7B1C  38 C6 00 01 */	addi r6, r6, 1
/* 803AABC0 003A7B20  42 00 FF 18 */	bdnz lbl_803AAAD8
lbl_803AABC4:
/* 803AABC4 003A7B24  38 60 FF FF */	li r3, -1
lbl_803AABC8:
/* 803AABC8 003A7B28  39 61 00 30 */	addi r11, r1, 0x30
/* 803AABCC 003A7B2C  4B FD EE F5 */	bl _restgpr_25
/* 803AABD0 003A7B30  80 01 00 34 */	lwz r0, 0x34(r1)
/* 803AABD4 003A7B34  7C 08 03 A6 */	mtlr r0
/* 803AABD8 003A7B38  38 21 00 30 */	addi r1, r1, 0x30
/* 803AABDC 003A7B3C  4E 80 00 20 */	blr

.global sndSeqPlayEx
sndSeqPlayEx:
/* 803AABE0 003A7B40  94 21 FF D0 */	stwu r1, -0x30(r1)
/* 803AABE4 003A7B44  7C 08 02 A6 */	mflr r0
/* 803AABE8 003A7B48  90 01 00 34 */	stw r0, 0x34(r1)
/* 803AABEC 003A7B4C  39 61 00 30 */	addi r11, r1, 0x30
/* 803AABF0 003A7B50  4B FD EE 85 */	bl _savegpr_25
/* 803AABF4 003A7B54  A8 0D AF 18 */	lha r0, sp@sda21(r13)
/* 803AABF8 003A7B58  3D 00 80 56 */	lis r8, gs@ha
/* 803AABFC 003A7B5C  7C BD 2B 78 */	mr r29, r5
/* 803AAC00 003A7B60  7C DE 33 78 */	mr r30, r6
/* 803AAC04 003A7B64  7C 7C 1B 78 */	mr r28, r3
/* 803AAC08 003A7B68  39 08 EC 60 */	addi r8, r8, gs@l
/* 803AAC0C 003A7B6C  7C FF 3B 78 */	mr r31, r7
/* 803AAC10 003A7B70  54 65 04 3E */	clrlwi r5, r3, 0x10
/* 803AAC14 003A7B74  38 C0 00 00 */	li r6, 0
/* 803AAC18 003A7B78  7C 09 03 A6 */	mtctr r0
/* 803AAC1C 003A7B7C  2C 00 00 00 */	cmpwi r0, 0
/* 803AAC20 003A7B80  40 81 00 BC */	ble lbl_803AACDC
lbl_803AAC24:
/* 803AAC24 003A7B84  80 68 00 00 */	lwz r3, 0(r8)
/* 803AAC28 003A7B88  A0 03 00 04 */	lhz r0, 4(r3)
/* 803AAC2C 003A7B8C  7C 05 00 40 */	cmplw r5, r0
/* 803AAC30 003A7B90  40 82 00 A0 */	bne lbl_803AACD0
/* 803AAC34 003A7B94  1C A6 00 0C */	mulli r5, r6, 0xc
/* 803AAC38 003A7B98  3C 60 80 56 */	lis r3, gs@ha
/* 803AAC3C 003A7B9C  38 63 EC 60 */	addi r3, r3, gs@l
/* 803AAC40 003A7BA0  7C C3 28 2E */	lwzx r6, r3, r5
/* 803AAC44 003A7BA4  A0 06 00 06 */	lhz r0, 6(r6)
/* 803AAC48 003A7BA8  28 00 00 00 */	cmplwi r0, 0
/* 803AAC4C 003A7BAC  40 82 00 7C */	bne lbl_803AACC8
/* 803AAC50 003A7BB0  7C 63 2A 14 */	add r3, r3, r5
/* 803AAC54 003A7BB4  80 A6 00 1C */	lwz r5, 0x1c(r6)
/* 803AAC58 003A7BB8  80 E3 00 08 */	lwz r7, 8(r3)
/* 803AAC5C 003A7BBC  54 80 04 3E */	clrlwi r0, r4, 0x10
/* 803AAC60 003A7BC0  80 86 00 20 */	lwz r4, 0x20(r6)
/* 803AAC64 003A7BC4  80 66 00 24 */	lwz r3, 0x24(r6)
/* 803AAC68 003A7BC8  7F 27 2A 14 */	add r25, r7, r5
/* 803AAC6C 003A7BCC  7F 47 22 14 */	add r26, r7, r4
/* 803AAC70 003A7BD0  7F 67 1A 14 */	add r27, r7, r3
/* 803AAC74 003A7BD4  48 00 00 40 */	b lbl_803AACB4
lbl_803AAC78:
/* 803AAC78 003A7BD8  7C 03 00 40 */	cmplw r3, r0
/* 803AAC7C 003A7BDC  40 82 00 34 */	bne lbl_803AACB0
/* 803AAC80 003A7BE0  48 00 A4 3D */	bl hwDisableIrq
/* 803AAC84 003A7BE4  7F 23 CB 78 */	mr r3, r25
/* 803AAC88 003A7BE8  7F 44 D3 78 */	mr r4, r26
/* 803AAC8C 003A7BEC  7F 65 DB 78 */	mr r5, r27
/* 803AAC90 003A7BF0  7F A6 EB 78 */	mr r6, r29
/* 803AAC94 003A7BF4  7F C7 F3 78 */	mr r7, r30
/* 803AAC98 003A7BF8  7F E8 FB 78 */	mr r8, r31
/* 803AAC9C 003A7BFC  7F 89 E3 78 */	mr r9, r28
/* 803AACA0 003A7C00  4B FE A0 F9 */	bl seqStartPlay
/* 803AACA4 003A7C04  7C 7C 1B 78 */	mr r28, r3
/* 803AACA8 003A7C08  48 00 A3 DD */	bl hwEnableIrq
/* 803AACAC 003A7C0C  48 00 00 34 */	b lbl_803AACE0
lbl_803AACB0:
/* 803AACB0 003A7C10  3B 7B 00 54 */	addi r27, r27, 0x54
lbl_803AACB4:
/* 803AACB4 003A7C14  A0 7B 00 00 */	lhz r3, 0(r27)
/* 803AACB8 003A7C18  28 03 FF FF */	cmplwi r3, 0xffff
/* 803AACBC 003A7C1C  40 82 FF BC */	bne lbl_803AAC78
/* 803AACC0 003A7C20  3B 80 FF FF */	li r28, -1
/* 803AACC4 003A7C24  48 00 00 1C */	b lbl_803AACE0
lbl_803AACC8:
/* 803AACC8 003A7C28  3B 80 FF FF */	li r28, -1
/* 803AACCC 003A7C2C  48 00 00 14 */	b lbl_803AACE0
lbl_803AACD0:
/* 803AACD0 003A7C30  39 08 00 0C */	addi r8, r8, 0xc
/* 803AACD4 003A7C34  38 C6 00 01 */	addi r6, r6, 1
/* 803AACD8 003A7C38  42 00 FF 4C */	bdnz lbl_803AAC24
lbl_803AACDC:
/* 803AACDC 003A7C3C  3B 80 FF FF */	li r28, -1
lbl_803AACE0:
/* 803AACE0 003A7C40  7F 83 E3 78 */	mr r3, r28
/* 803AACE4 003A7C44  39 61 00 30 */	addi r11, r1, 0x30
/* 803AACE8 003A7C48  4B FD ED D9 */	bl _restgpr_25
/* 803AACEC 003A7C4C  80 01 00 34 */	lwz r0, 0x34(r1)
/* 803AACF0 003A7C50  7C 08 03 A6 */	mtlr r0
/* 803AACF4 003A7C54  38 21 00 30 */	addi r1, r1, 0x30
/* 803AACF8 003A7C58  4E 80 00 20 */	blr