From 18c84b0be7dad29936e7bb70db017c8298c42e8f Mon Sep 17 00:00:00 2001 From: Synray <31429825+Synray@users.noreply.github.com> Date: Sat, 21 Aug 2021 16:37:41 -0700 Subject: [PATCH] Match audio_seqplayer.c (#914) * Match Audio_SequencePlayerProcessSequence Round two: fight! * Match Audio_SequenceChannelProcessScript * Remove asm * Whitespace * Review changes * Update src/code/audio_seqplayer.c Co-authored-by: Dragorn421 * Whoops Co-authored-by: fig02 Co-authored-by: Dragorn421 --- .../Audio_SequenceChannelProcessScript.s | 1150 ----------------- .../Audio_SequencePlayerProcessSequence.s | 743 ----------- src/code/audio_seqplayer.c | 102 +- 3 files changed, 44 insertions(+), 1951 deletions(-) delete mode 100644 asm/non_matchings/code/audio_seqplayer/Audio_SequenceChannelProcessScript.s delete mode 100644 asm/non_matchings/code/audio_seqplayer/Audio_SequencePlayerProcessSequence.s diff --git a/asm/non_matchings/code/audio_seqplayer/Audio_SequenceChannelProcessScript.s b/asm/non_matchings/code/audio_seqplayer/Audio_SequenceChannelProcessScript.s deleted file mode 100644 index c5cf4b6083..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/Audio_SequenceChannelProcessScript.s +++ /dev/null @@ -1,1150 +0,0 @@ -.late_rodata -glabel jtbl_801496B4 - .word L800EB820 - .word L800EB834 - .word L800EB86C - .word L800EB83C - .word L800EB890 - .word L800EB8A4 - .word L800EB8C0 - .word L800EB8D8 - .word L800EB920 - .word L800EB9EC - .word L800EB9F8 - .word L800EBA04 - .word L800EBA18 - .word L800EB968 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB2D8 - .word L800EB220 - .word L800EB2EC - .word L800EB2FC - .word L800EB234 - .word L800EB4D8 - .word L800EB53C - .word L800EB55C - .word L800EB55C - .word L800EB5B8 - .word L800EB5D0 - .word L800EB55C - .word L800EB59C - .word L800EB5F0 - .word L800EB5FC - .word L800EB620 - .word L800EB654 - .word L800EB660 - .word L800EB380 - .word L800EB4CC - .word L800EB0F4 - .word L800EB0F4 - .word L800EB454 - .word L800EB43C - .word L800EB430 - .word L800EB41C - .word L800EB410 - .word L800EB3F8 - .word L800EB3E0 - .word L800EB354 - .word L800EB30C - .word L800EB328 - .word L800EB494 - .word L800EB46C - .word L800EB4BC - .word L800EB678 - .word L800EB66C - .word L800EB6D4 - .word L800EB6E0 - .word L800EB748 - .word L800EB800 - .word L800EB1E0 - .word L800EB270 - .word L800EB7B8 - .word L800EB814 - .word L800EB3B0 - .word L800EB0F4 - .word L800EB210 - .word L800EB1F0 - -glabel jtbl_801497BC - .word L800EBB5C - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EBB6C - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EBA84 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EBAB4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EBAEC - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EBB00 - -glabel jtbl_80149860 - .word L800EBBD0 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EBBDC - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EBC88 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EBCB4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EBCD8 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EBC6C - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EB0F4 - .word L800EBC4C - -.text -glabel Audio_SequenceChannelProcessScript -/* B62208 800EB068 27BDFF78 */ addiu $sp, $sp, -0x88 -/* B6220C 800EB06C AFBF003C */ sw $ra, 0x3c($sp) -/* B62210 800EB070 AFBE0038 */ sw $fp, 0x38($sp) -/* B62214 800EB074 AFB70034 */ sw $s7, 0x34($sp) -/* B62218 800EB078 AFB60030 */ sw $s6, 0x30($sp) -/* B6221C 800EB07C AFB5002C */ sw $s5, 0x2c($sp) -/* B62220 800EB080 AFB40028 */ sw $s4, 0x28($sp) -/* B62224 800EB084 AFB30024 */ sw $s3, 0x24($sp) -/* B62228 800EB088 AFB20020 */ sw $s2, 0x20($sp) -/* B6222C 800EB08C AFB1001C */ sw $s1, 0x1c($sp) -/* B62230 800EB090 AFB00018 */ sw $s0, 0x18($sp) -/* B62234 800EB094 8C8E0000 */ lw $t6, ($a0) -/* B62238 800EB098 0080A025 */ move $s4, $a0 -/* B6223C 800EB09C 000EC080 */ sll $t8, $t6, 2 -/* B62240 800EB0A0 07030004 */ bgezl $t8, .L800EB0B4 -/* B62244 800EB0A4 8E97004C */ lw $s7, 0x4c($s4) -/* B62248 800EB0A8 10000315 */ b .L800EBD00 -/* B6224C 800EB0AC 00008025 */ move $s0, $zero -/* B62250 800EB0B0 8E97004C */ lw $s7, 0x4c($s4) -.L800EB0B4: -/* B62254 800EB0B4 8EF90000 */ lw $t9, ($s7) -/* B62258 800EB0B8 00194880 */ sll $t1, $t9, 2 -/* B6225C 800EB0BC 05230006 */ bgezl $t1, .L800EB0D8 -/* B62260 800EB0C0 9683001E */ lhu $v1, 0x1e($s4) -/* B62264 800EB0C4 928A0003 */ lbu $t2, 3($s4) -/* B62268 800EB0C8 314B0080 */ andi $t3, $t2, 0x80 -/* B6226C 800EB0CC 55600317 */ bnezl $t3, .L800EBD2C -/* B62270 800EB0D0 8FBF003C */ lw $ra, 0x3c($sp) -/* B62274 800EB0D4 9683001E */ lhu $v1, 0x1e($s4) -.L800EB0D8: -/* B62278 800EB0D8 26960060 */ addiu $s6, $s4, 0x60 -/* B6227C 800EB0DC 28610002 */ slti $at, $v1, 2 -/* B62280 800EB0E0 14200003 */ bnez $at, .L800EB0F0 -/* B62284 800EB0E4 246CFFFF */ addiu $t4, $v1, -1 -/* B62288 800EB0E8 10000304 */ b .L800EBCFC -/* B6228C 800EB0EC A68C001E */ sh $t4, 0x1e($s4) -.L800EB0F0: -/* B62290 800EB0F0 241EFFFF */ li $fp, -1 -.L800EB0F4: -glabel L800EB0F4 -/* B62294 800EB0F4 0C03A752 */ jal Audio_M64ReadU8 -/* B62298 800EB0F8 02C02025 */ move $a0, $s6 -/* B6229C 800EB0FC 284100B0 */ slti $at, $v0, 0xb0 -/* B622A0 800EB100 305200FF */ andi $s2, $v0, 0xff -/* B622A4 800EB104 14200249 */ bnez $at, .L800EBA2C -/* B622A8 800EB108 00402025 */ move $a0, $v0 -/* B622AC 800EB10C 3C038013 */ lui $v1, %hi(D_80130470) -/* B622B0 800EB110 00641821 */ addu $v1, $v1, $a0 -/* B622B4 800EB114 90630470 */ lbu $v1, %lo(D_80130470)($v1) -/* B622B8 800EB118 27B00060 */ addiu $s0, $sp, 0x60 -/* B622BC 800EB11C 30650003 */ andi $a1, $v1, 3 -/* B622C0 800EB120 30AD00FF */ andi $t5, $a1, 0xff -/* B622C4 800EB124 19A00013 */ blez $t5, .L800EB174 -/* B622C8 800EB128 30B500FF */ andi $s5, $a1, 0xff -/* B622CC 800EB12C 00157880 */ sll $t7, $s5, 2 -/* B622D0 800EB130 01F09821 */ addu $s3, $t7, $s0 -.L800EB134: -/* B622D4 800EB134 30780080 */ andi $t8, $v1, 0x80 -/* B622D8 800EB138 17000005 */ bnez $t8, .L800EB150 -/* B622DC 800EB13C 00608825 */ move $s1, $v1 -/* B622E0 800EB140 0C03A752 */ jal Audio_M64ReadU8 -/* B622E4 800EB144 02C02025 */ move $a0, $s6 -/* B622E8 800EB148 10000004 */ b .L800EB15C -/* B622EC 800EB14C AE020000 */ sw $v0, ($s0) -.L800EB150: -/* B622F0 800EB150 0C03A757 */ jal Audio_M64ReadS16 -/* B622F4 800EB154 02C02025 */ move $a0, $s6 -/* B622F8 800EB158 AE020000 */ sw $v0, ($s0) -.L800EB15C: -/* B622FC 800EB15C 26100004 */ addiu $s0, $s0, 4 -/* B62300 800EB160 0213082B */ sltu $at, $s0, $s3 -/* B62304 800EB164 00111840 */ sll $v1, $s1, 1 -/* B62308 800EB168 1420FFF2 */ bnez $at, .L800EB134 -/* B6230C 800EB16C 306300FF */ andi $v1, $v1, 0xff -/* B62310 800EB170 00001025 */ move $v0, $zero -.L800EB174: -/* B62314 800EB174 2A4100F2 */ slti $at, $s2, 0xf2 -/* B62318 800EB178 14200010 */ bnez $at, .L800EB1BC -/* B6231C 800EB17C 02408025 */ move $s0, $s2 -/* B62320 800EB180 02E02025 */ move $a0, $s7 -/* B62324 800EB184 02C02825 */ move $a1, $s6 -/* B62328 800EB188 02003025 */ move $a2, $s0 -/* B6232C 800EB18C 0C03A4EA */ jal Audio_HandleScriptFlowControl -/* B62330 800EB190 8FA70060 */ lw $a3, 0x60($sp) -/* B62334 800EB194 1040FFD7 */ beqz $v0, .L800EB0F4 -/* B62338 800EB198 00000000 */ nop -/* B6233C 800EB19C 145E0005 */ bne $v0, $fp, .L800EB1B4 -/* B62340 800EB1A0 00000000 */ nop -/* B62344 800EB1A4 0C03A632 */ jal Audio_SequenceChannelDisable -/* B62348 800EB1A8 02802025 */ move $a0, $s4 -/* B6234C 800EB1AC 100002D4 */ b .L800EBD00 -/* B62350 800EB1B0 00008025 */ move $s0, $zero -.L800EB1B4: -/* B62354 800EB1B4 100002D1 */ b .L800EBCFC -/* B62358 800EB1B8 A682001E */ sh $v0, 0x1e($s4) -.L800EB1BC: -/* B6235C 800EB1BC 2619FF50 */ addiu $t9, $s0, -0xb0 -/* B62360 800EB1C0 2F210042 */ sltiu $at, $t9, 0x42 -/* B62364 800EB1C4 1020FFCB */ beqz $at, .L800EB0F4 -/* B62368 800EB1C8 0019C880 */ sll $t9, $t9, 2 -/* B6236C 800EB1CC 3C018015 */ lui $at, %hi(jtbl_801496B4) -/* B62370 800EB1D0 00390821 */ addu $at, $at, $t9 -/* B62374 800EB1D4 8C3996B4 */ lw $t9, %lo(jtbl_801496B4)($at) -/* B62378 800EB1D8 03200008 */ jr $t9 -/* B6237C 800EB1DC 00000000 */ nop -glabel L800EB1E0 -/* B62380 800EB1E0 92890000 */ lbu $t1, ($s4) -/* B62384 800EB1E4 352A0020 */ ori $t2, $t1, 0x20 -/* B62388 800EB1E8 100002C4 */ b .L800EBCFC -/* B6238C 800EB1EC A28A0000 */ sb $t2, ($s4) -glabel L800EB1F0 -/* B62390 800EB1F0 26900084 */ addiu $s0, $s4, 0x84 -/* B62394 800EB1F4 0C039F80 */ jal Audio_NotePoolClear -/* B62398 800EB1F8 02002025 */ move $a0, $s0 -/* B6239C 800EB1FC 93A50063 */ lbu $a1, 0x63($sp) -/* B623A0 800EB200 0C039FD8 */ jal Audio_NotePoolFill -/* B623A4 800EB204 02002025 */ move $a0, $s0 -/* B623A8 800EB208 1000FFBA */ b .L800EB0F4 -/* B623AC 800EB20C 00000000 */ nop -glabel L800EB210 -/* B623B0 800EB210 0C039F80 */ jal Audio_NotePoolClear -/* B623B4 800EB214 26840084 */ addiu $a0, $s4, 0x84 -/* B623B8 800EB218 1000FFB6 */ b .L800EB0F4 -/* B623BC 800EB21C 00000000 */ nop -glabel L800EB220 -/* B623C0 800EB220 97B10062 */ lhu $s1, 0x62($sp) -/* B623C4 800EB224 8EEB0018 */ lw $t3, 0x18($s7) -/* B623C8 800EB228 01716021 */ addu $t4, $t3, $s1 -/* B623CC 800EB22C 1000FFB1 */ b .L800EB0F4 -/* B623D0 800EB230 AE8C003C */ sw $t4, 0x3c($s4) -glabel L800EB234 -/* B623D4 800EB234 82C20019 */ lb $v0, 0x19($s6) -/* B623D8 800EB238 13C2FFAE */ beq $fp, $v0, .L800EB0F4 -/* B623DC 800EB23C 00000000 */ nop -/* B623E0 800EB240 8E8D003C */ lw $t5, 0x3c($s4) -/* B623E4 800EB244 00027840 */ sll $t7, $v0, 1 -/* B623E8 800EB248 8EE80018 */ lw $t0, 0x18($s7) -/* B623EC 800EB24C 01AF8021 */ addu $s0, $t5, $t7 -/* B623F0 800EB250 92180000 */ lbu $t8, ($s0) -/* B623F4 800EB254 920E0001 */ lbu $t6, 1($s0) -/* B623F8 800EB258 0018CA00 */ sll $t9, $t8, 8 -/* B623FC 800EB25C 01D98821 */ addu $s1, $t6, $t9 -/* B62400 800EB260 3231FFFF */ andi $s1, $s1, 0xffff -/* B62404 800EB264 01114821 */ addu $t1, $t0, $s1 -/* B62408 800EB268 1000FFA2 */ b .L800EB0F4 -/* B6240C 800EB26C AE89003C */ sw $t1, 0x3c($s4) -glabel L800EB270 -/* B62410 800EB270 92EB0005 */ lbu $t3, 5($s7) -/* B62414 800EB274 93AA0063 */ lbu $t2, 0x63($sp) -/* B62418 800EB278 240100FF */ li $at, 255 -/* B6241C 800EB27C 1161000D */ beq $t3, $at, .L800EB2B4 -/* B62420 800EB280 01409025 */ move $s2, $t2 -/* B62424 800EB284 92EC0004 */ lbu $t4, 4($s7) -/* B62428 800EB288 3C028017 */ lui $v0, %hi(gAudioContext+0x283c) # $v0, 0x8017 -/* B6242C 800EB28C 8C4219BC */ lw $v0, %lo(gAudioContext+0x283c)($v0) -/* B62430 800EB290 000C6840 */ sll $t5, $t4, 1 -/* B62434 800EB294 004D7821 */ addu $t7, $v0, $t5 -/* B62438 800EB298 95F10000 */ lhu $s1, ($t7) -/* B6243C 800EB29C 0222C021 */ addu $t8, $s1, $v0 -/* B62440 800EB2A0 93150000 */ lbu $s5, ($t8) -/* B62444 800EB2A4 02357021 */ addu $t6, $s1, $s5 -/* B62448 800EB2A8 01CAC823 */ subu $t9, $t6, $t2 -/* B6244C 800EB2AC 03224021 */ addu $t0, $t9, $v0 -/* B62450 800EB2B0 91120000 */ lbu $s2, ($t0) -.L800EB2B4: -/* B62454 800EB2B4 24040001 */ li $a0, 1 -/* B62458 800EB2B8 24050002 */ li $a1, 2 -/* B6245C 800EB2BC 0C037C1D */ jal func_800DF074 -/* B62460 800EB2C0 02403025 */ move $a2, $s2 -/* B62464 800EB2C4 50400003 */ beql $v0, $zero, .L800EB2D4 -/* B62468 800EB2C8 8FA90064 */ lw $t1, 0x64($sp) -/* B6246C 800EB2CC A2920007 */ sb $s2, 7($s4) -/* B62470 800EB2D0 8FA90064 */ lw $t1, 0x64($sp) -.L800EB2D4: -/* B62474 800EB2D4 AFA90060 */ sw $t1, 0x60($sp) -glabel L800EB2D8 -/* B62478 800EB2D8 93A50063 */ lbu $a1, 0x63($sp) -/* B6247C 800EB2DC 0C03ABE6 */ jal Audio_SetInstrument -/* B62480 800EB2E0 02802025 */ move $a0, $s4 -/* B62484 800EB2E4 1000FF83 */ b .L800EB0F4 -/* B62488 800EB2E8 00000000 */ nop -glabel L800EB2EC -/* B6248C 800EB2EC 928B0000 */ lbu $t3, ($s4) -/* B62490 800EB2F0 316CFFFD */ andi $t4, $t3, 0xfffd -/* B62494 800EB2F4 1000FF7F */ b .L800EB0F4 -/* B62498 800EB2F8 A28C0000 */ sb $t4, ($s4) -glabel L800EB2FC -/* B6249C 800EB2FC 928F0000 */ lbu $t7, ($s4) -/* B624A0 800EB300 35F80002 */ ori $t8, $t7, 2 -/* B624A4 800EB304 1000FF7B */ b .L800EB0F4 -/* B624A8 800EB308 A2980000 */ sb $t8, ($s4) -glabel L800EB30C -/* B624AC 800EB30C 93A50063 */ lbu $a1, 0x63($sp) -/* B624B0 800EB310 0C03AC11 */ jal Audio_SequenceChannelSetVolume -/* B624B4 800EB314 02802025 */ move $a0, $s4 -/* B624B8 800EB318 928A0001 */ lbu $t2, 1($s4) -/* B624BC 800EB31C 35590040 */ ori $t9, $t2, 0x40 -/* B624C0 800EB320 1000FF74 */ b .L800EB0F4 -/* B624C4 800EB324 A2990001 */ sb $t9, 1($s4) -glabel L800EB328 -/* B624C8 800EB328 93B20063 */ lbu $s2, 0x63($sp) -/* B624CC 800EB32C 3C013C00 */ li $at, 0x3C000000 # 0.000000 -/* B624D0 800EB330 44814000 */ mtc1 $at, $f8 -/* B624D4 800EB334 44922000 */ mtc1 $s2, $f4 -/* B624D8 800EB338 92890001 */ lbu $t1, 1($s4) -/* B624DC 800EB33C 468021A0 */ cvt.s.w $f6, $f4 -/* B624E0 800EB340 352B0040 */ ori $t3, $t1, 0x40 -/* B624E4 800EB344 A28B0001 */ sb $t3, 1($s4) -/* B624E8 800EB348 46083282 */ mul.s $f10, $f6, $f8 -/* B624EC 800EB34C 1000FF69 */ b .L800EB0F4 -/* B624F0 800EB350 E68A0028 */ swc1 $f10, 0x28($s4) -glabel L800EB354 -/* B624F4 800EB354 97B10062 */ lhu $s1, 0x62($sp) -/* B624F8 800EB358 3C014700 */ li $at, 0x47000000 # 0.000000 -/* B624FC 800EB35C 44812000 */ mtc1 $at, $f4 -/* B62500 800EB360 44918000 */ mtc1 $s1, $f16 -/* B62504 800EB364 928D0001 */ lbu $t5, 1($s4) -/* B62508 800EB368 468084A0 */ cvt.s.w $f18, $f16 -/* B6250C 800EB36C 35AF0080 */ ori $t7, $t5, 0x80 -/* B62510 800EB370 A28F0001 */ sb $t7, 1($s4) -/* B62514 800EB374 46049183 */ div.s $f6, $f18, $f4 -/* B62518 800EB378 1000FF5E */ b .L800EB0F4 -/* B6251C 800EB37C E6860038 */ swc1 $f6, 0x38($s4) -glabel L800EB380 -/* B62520 800EB380 93B20063 */ lbu $s2, 0x63($sp) -/* B62524 800EB384 928A0001 */ lbu $t2, 1($s4) -/* B62528 800EB388 3C018013 */ lui $at, %hi(gPitchBendFrequencyScale) -/* B6252C 800EB38C 26520080 */ addiu $s2, $s2, 0x80 -/* B62530 800EB390 325200FF */ andi $s2, $s2, 0xff -/* B62534 800EB394 0012C080 */ sll $t8, $s2, 2 -/* B62538 800EB398 00380821 */ addu $at, $at, $t8 -/* B6253C 800EB39C C428F0B4 */ lwc1 $f8, %lo(gPitchBendFrequencyScale)($at) -/* B62540 800EB3A0 35590080 */ ori $t9, $t2, 0x80 -/* B62544 800EB3A4 A2990001 */ sb $t9, 1($s4) -/* B62548 800EB3A8 1000FF52 */ b .L800EB0F4 -/* B6254C 800EB3AC E6880038 */ swc1 $f8, 0x38($s4) -glabel L800EB3B0 -/* B62550 800EB3B0 93B20063 */ lbu $s2, 0x63($sp) -/* B62554 800EB3B4 928B0001 */ lbu $t3, 1($s4) -/* B62558 800EB3B8 3C018013 */ lui $at, %hi(D_8012F4B4) -/* B6255C 800EB3BC 26520080 */ addiu $s2, $s2, 0x80 -/* B62560 800EB3C0 325200FF */ andi $s2, $s2, 0xff -/* B62564 800EB3C4 00124080 */ sll $t0, $s2, 2 -/* B62568 800EB3C8 00280821 */ addu $at, $at, $t0 -/* B6256C 800EB3CC C42AF4B4 */ lwc1 $f10, %lo(D_8012F4B4)($at) -/* B62570 800EB3D0 356C0080 */ ori $t4, $t3, 0x80 -/* B62574 800EB3D4 A28C0001 */ sb $t4, 1($s4) -/* B62578 800EB3D8 1000FF46 */ b .L800EB0F4 -/* B6257C 800EB3DC E68A0038 */ swc1 $f10, 0x38($s4) -glabel L800EB3E0 -/* B62580 800EB3E0 928F0001 */ lbu $t7, 1($s4) -/* B62584 800EB3E4 93B20063 */ lbu $s2, 0x63($sp) -/* B62588 800EB3E8 35F80020 */ ori $t8, $t7, 0x20 -/* B6258C 800EB3EC A2980001 */ sb $t8, 1($s4) -/* B62590 800EB3F0 1000FF40 */ b .L800EB0F4 -/* B62594 800EB3F4 A292000A */ sb $s2, 0xa($s4) -glabel L800EB3F8 -/* B62598 800EB3F8 928A0001 */ lbu $t2, 1($s4) -/* B6259C 800EB3FC 93B20063 */ lbu $s2, 0x63($sp) -/* B625A0 800EB400 35590020 */ ori $t9, $t2, 0x20 -/* B625A4 800EB404 A2990001 */ sb $t9, 1($s4) -/* B625A8 800EB408 1000FF3A */ b .L800EB0F4 -/* B625AC 800EB40C A292000B */ sb $s2, 0xb($s4) -glabel L800EB410 -/* B625B0 800EB410 83A20063 */ lb $v0, 0x63($sp) -/* B625B4 800EB414 1000FF37 */ b .L800EB0F4 -/* B625B8 800EB418 A6820026 */ sh $v0, 0x26($s4) -glabel L800EB41C -/* B625BC 800EB41C 97B10062 */ lhu $s1, 0x62($sp) -/* B625C0 800EB420 8EE80018 */ lw $t0, 0x18($s7) -/* B625C4 800EB424 01114821 */ addu $t1, $t0, $s1 -/* B625C8 800EB428 1000FF32 */ b .L800EB0F4 -/* B625CC 800EB42C AE890080 */ sw $t1, 0x80($s4) -glabel L800EB430 -/* B625D0 800EB430 93B20063 */ lbu $s2, 0x63($sp) -/* B625D4 800EB434 1000FF2F */ b .L800EB0F4 -/* B625D8 800EB438 A292007C */ sb $s2, 0x7c($s4) -glabel L800EB43C -/* B625DC 800EB43C 93B20063 */ lbu $s2, 0x63($sp) -/* B625E0 800EB440 A6800012 */ sh $zero, 0x12($s4) -/* B625E4 800EB444 A680001A */ sh $zero, 0x1a($s4) -/* B625E8 800EB448 001258C0 */ sll $t3, $s2, 3 -/* B625EC 800EB44C 1000FF29 */ b .L800EB0F4 -/* B625F0 800EB450 A68B0016 */ sh $t3, 0x16($s4) -glabel L800EB454 -/* B625F4 800EB454 93B20063 */ lbu $s2, 0x63($sp) -/* B625F8 800EB458 A6800018 */ sh $zero, 0x18($s4) -/* B625FC 800EB45C 00121140 */ sll $v0, $s2, 5 -/* B62600 800EB460 A6820014 */ sh $v0, 0x14($s4) -/* B62604 800EB464 1000FF23 */ b .L800EB0F4 -/* B62608 800EB468 A6820010 */ sh $v0, 0x10($s4) -glabel L800EB46C -/* B6260C 800EB46C 93B20063 */ lbu $s2, 0x63($sp) -/* B62610 800EB470 001260C0 */ sll $t4, $s2, 3 -/* B62614 800EB474 A68C0012 */ sh $t4, 0x12($s4) -/* B62618 800EB478 93B20067 */ lbu $s2, 0x67($sp) -/* B6261C 800EB47C 001268C0 */ sll $t5, $s2, 3 -/* B62620 800EB480 A68D0016 */ sh $t5, 0x16($s4) -/* B62624 800EB484 93B2006B */ lbu $s2, 0x6b($sp) -/* B62628 800EB488 00127900 */ sll $t7, $s2, 4 -/* B6262C 800EB48C 1000FF19 */ b .L800EB0F4 -/* B62630 800EB490 A68F001A */ sh $t7, 0x1a($s4) -glabel L800EB494 -/* B62634 800EB494 93B20063 */ lbu $s2, 0x63($sp) -/* B62638 800EB498 0012C140 */ sll $t8, $s2, 5 -/* B6263C 800EB49C A6980010 */ sh $t8, 0x10($s4) -/* B62640 800EB4A0 93B20067 */ lbu $s2, 0x67($sp) -/* B62644 800EB4A4 00127140 */ sll $t6, $s2, 5 -/* B62648 800EB4A8 A68E0014 */ sh $t6, 0x14($s4) -/* B6264C 800EB4AC 93B2006B */ lbu $s2, 0x6b($sp) -/* B62650 800EB4B0 00125100 */ sll $t2, $s2, 4 -/* B62654 800EB4B4 1000FF0F */ b .L800EB0F4 -/* B62658 800EB4B8 A68A0018 */ sh $t2, 0x18($s4) -glabel L800EB4BC -/* B6265C 800EB4BC 93B20063 */ lbu $s2, 0x63($sp) -/* B62660 800EB4C0 0012C900 */ sll $t9, $s2, 4 -/* B62664 800EB4C4 1000FF0B */ b .L800EB0F4 -/* B62668 800EB4C8 A699001C */ sh $t9, 0x1c($s4) -glabel L800EB4CC -/* B6266C 800EB4CC 93B20063 */ lbu $s2, 0x63($sp) -/* B62670 800EB4D0 1000FF08 */ b .L800EB0F4 -/* B62674 800EB4D4 A2920004 */ sb $s2, 4($s4) -glabel L800EB4D8 -/* B62678 800EB4D8 92E90005 */ lbu $t1, 5($s7) -/* B6267C 800EB4DC 93A80063 */ lbu $t0, 0x63($sp) -/* B62680 800EB4E0 240100FF */ li $at, 255 -/* B62684 800EB4E4 1121000D */ beq $t1, $at, .L800EB51C -/* B62688 800EB4E8 01009025 */ move $s2, $t0 -/* B6268C 800EB4EC 92EB0004 */ lbu $t3, 4($s7) -/* B62690 800EB4F0 3C028017 */ lui $v0, %hi(gAudioContext+0x283c) # $v0, 0x8017 -/* B62694 800EB4F4 8C4219BC */ lw $v0, %lo(gAudioContext+0x283c)($v0) -/* B62698 800EB4F8 000B6040 */ sll $t4, $t3, 1 -/* B6269C 800EB4FC 004C6821 */ addu $t5, $v0, $t4 -/* B626A0 800EB500 95B10000 */ lhu $s1, ($t5) -/* B626A4 800EB504 02227821 */ addu $t7, $s1, $v0 -/* B626A8 800EB508 91F50000 */ lbu $s5, ($t7) -/* B626AC 800EB50C 0235C021 */ addu $t8, $s1, $s5 -/* B626B0 800EB510 03087023 */ subu $t6, $t8, $t0 -/* B626B4 800EB514 01C25021 */ addu $t2, $t6, $v0 -/* B626B8 800EB518 91520000 */ lbu $s2, ($t2) -.L800EB51C: -/* B626BC 800EB51C 24040001 */ li $a0, 1 -/* B626C0 800EB520 24050002 */ li $a1, 2 -/* B626C4 800EB524 0C037C1D */ jal func_800DF074 -/* B626C8 800EB528 02403025 */ move $a2, $s2 -/* B626CC 800EB52C 1040FEF1 */ beqz $v0, .L800EB0F4 -/* B626D0 800EB530 00000000 */ nop -/* B626D4 800EB534 1000FEEF */ b .L800EB0F4 -/* B626D8 800EB538 A2920007 */ sb $s2, 7($s4) -glabel L800EB53C -/* B626DC 800EB53C 93B20063 */ lbu $s2, 0x63($sp) -/* B626E0 800EB540 97B10066 */ lhu $s1, 0x66($sp) -/* B626E4 800EB544 8EF90018 */ lw $t9, 0x18($s7) -/* B626E8 800EB548 92C90019 */ lbu $t1, 0x19($s6) -/* B626EC 800EB54C 03311021 */ addu $v0, $t9, $s1 -/* B626F0 800EB550 01325821 */ addu $t3, $t1, $s2 -/* B626F4 800EB554 1000FEE7 */ b .L800EB0F4 -/* B626F8 800EB558 A04B0000 */ sb $t3, ($v0) -glabel L800EB55C -/* B626FC 800EB55C 240100C8 */ li $at, 200 -/* B62700 800EB560 16010005 */ bne $s0, $at, .L800EB578 -/* B62704 800EB564 83A20063 */ lb $v0, 0x63($sp) -/* B62708 800EB568 82CC0019 */ lb $t4, 0x19($s6) -/* B6270C 800EB56C 01826823 */ subu $t5, $t4, $v0 -/* B62710 800EB570 1000FEE0 */ b .L800EB0F4 -/* B62714 800EB574 A2CD0019 */ sb $t5, 0x19($s6) -.L800EB578: -/* B62718 800EB578 240100CC */ li $at, 204 -/* B6271C 800EB57C 56010004 */ bnel $s0, $at, .L800EB590 -/* B62720 800EB580 82CF0019 */ lb $t7, 0x19($s6) -/* B62724 800EB584 1000FEDB */ b .L800EB0F4 -/* B62728 800EB588 A2C20019 */ sb $v0, 0x19($s6) -/* B6272C 800EB58C 82CF0019 */ lb $t7, 0x19($s6) -.L800EB590: -/* B62730 800EB590 01E2C024 */ and $t8, $t7, $v0 -/* B62734 800EB594 1000FED7 */ b .L800EB0F4 -/* B62738 800EB598 A2D80019 */ sb $t8, 0x19($s6) -glabel L800EB59C -/* B6273C 800EB59C 93B20063 */ lbu $s2, 0x63($sp) -/* B62740 800EB5A0 00124080 */ sll $t0, $s2, 2 -/* B62744 800EB5A4 02E87021 */ addu $t6, $s7, $t0 -/* B62748 800EB5A8 0C03A632 */ jal Audio_SequenceChannelDisable -/* B6274C 800EB5AC 8DC40038 */ lw $a0, 0x38($t6) -/* B62750 800EB5B0 1000FED0 */ b .L800EB0F4 -/* B62754 800EB5B4 00000000 */ nop -glabel L800EB5B8 -/* B62758 800EB5B8 92990001 */ lbu $t9, 1($s4) -/* B6275C 800EB5BC 93B20063 */ lbu $s2, 0x63($sp) -/* B62760 800EB5C0 37290040 */ ori $t1, $t9, 0x40 -/* B62764 800EB5C4 A2890001 */ sb $t1, 1($s4) -/* B62768 800EB5C8 1000FECA */ b .L800EB0F4 -/* B6276C 800EB5CC A2920003 */ sb $s2, 3($s4) -glabel L800EB5D0 -/* B62770 800EB5D0 97B10062 */ lhu $s1, 0x62($sp) -/* B62774 800EB5D4 82CC0019 */ lb $t4, 0x19($s6) -/* B62778 800EB5D8 8EEB0018 */ lw $t3, 0x18($s7) -/* B6277C 800EB5DC 022C6821 */ addu $t5, $s1, $t4 -/* B62780 800EB5E0 016D7821 */ addu $t7, $t3, $t5 -/* B62784 800EB5E4 91F80000 */ lbu $t8, ($t7) -/* B62788 800EB5E8 1000FEC2 */ b .L800EB0F4 -/* B6278C 800EB5EC A2D80019 */ sb $t8, 0x19($s6) -glabel L800EB5F0 -/* B62790 800EB5F0 97B10062 */ lhu $s1, 0x62($sp) -/* B62794 800EB5F4 1000FEBF */ b .L800EB0F4 -/* B62798 800EB5F8 A6910022 */ sh $s1, 0x22($s4) -glabel L800EB5FC -/* B6279C 800EB5FC 97B10062 */ lhu $s1, 0x62($sp) -/* B627A0 800EB600 8EE80018 */ lw $t0, 0x18($s7) -/* B627A4 800EB604 968E0022 */ lhu $t6, 0x22($s4) -/* B627A8 800EB608 01111021 */ addu $v0, $t0, $s1 -/* B627AC 800EB60C 000ECA03 */ sra $t9, $t6, 8 -/* B627B0 800EB610 A0590000 */ sb $t9, ($v0) -/* B627B4 800EB614 968C0022 */ lhu $t4, 0x22($s4) -/* B627B8 800EB618 1000FEB6 */ b .L800EB0F4 -/* B627BC 800EB61C A04C0001 */ sb $t4, 1($v0) -glabel L800EB620 -/* B627C0 800EB620 93B00063 */ lbu $s0, 0x63($sp) -/* B627C4 800EB624 320B0080 */ andi $t3, $s0, 0x80 -/* B627C8 800EB628 11600005 */ beqz $t3, .L800EB640 -/* B627CC 800EB62C 320A007F */ andi $t2, $s0, 0x7f -/* B627D0 800EB630 928F0000 */ lbu $t7, ($s4) -/* B627D4 800EB634 35F80004 */ ori $t8, $t7, 4 -/* B627D8 800EB638 10000004 */ b .L800EB64C -/* B627DC 800EB63C A2980000 */ sb $t8, ($s4) -.L800EB640: -/* B627E0 800EB640 92880000 */ lbu $t0, ($s4) -/* B627E4 800EB644 310EFFFB */ andi $t6, $t0, 0xfffb -/* B627E8 800EB648 A28E0000 */ sb $t6, ($s4) -.L800EB64C: -/* B627EC 800EB64C 1000FEA9 */ b .L800EB0F4 -/* B627F0 800EB650 A28A00D0 */ sb $t2, 0xd0($s4) -glabel L800EB654 -/* B627F4 800EB654 93B20063 */ lbu $s2, 0x63($sp) -/* B627F8 800EB658 1000FEA6 */ b .L800EB0F4 -/* B627FC 800EB65C A2920002 */ sb $s2, 2($s4) -glabel L800EB660 -/* B62800 800EB660 93B20063 */ lbu $s2, 0x63($sp) -/* B62804 800EB664 1000FEA3 */ b .L800EB0F4 -/* B62808 800EB668 A292007D */ sb $s2, 0x7d($s4) -glabel L800EB66C -/* B6280C 800EB66C 93B20063 */ lbu $s2, 0x63($sp) -/* B62810 800EB670 1000FEA0 */ b .L800EB0F4 -/* B62814 800EB674 A2920008 */ sb $s2, 8($s4) -glabel L800EB678 -/* B62818 800EB678 82C20019 */ lb $v0, 0x19($s6) -/* B6281C 800EB67C 13C2FE9D */ beq $fp, $v0, .L800EB0F4 -/* B62820 800EB680 00000000 */ nop -/* B62824 800EB684 92CB0018 */ lbu $t3, 0x18($s6) -/* B62828 800EB688 8ECC0000 */ lw $t4, ($s6) -/* B6282C 800EB68C 8E99003C */ lw $t9, 0x3c($s4) -/* B62830 800EB690 000B6880 */ sll $t5, $t3, 2 -/* B62834 800EB694 02CD7821 */ addu $t7, $s6, $t5 -/* B62838 800EB698 ADEC0004 */ sw $t4, 4($t7) -/* B6283C 800EB69C 92D80018 */ lbu $t8, 0x18($s6) -/* B62840 800EB6A0 00024840 */ sll $t1, $v0, 1 -/* B62844 800EB6A4 03298021 */ addu $s0, $t9, $t1 -/* B62848 800EB6A8 27080001 */ addiu $t0, $t8, 1 -/* B6284C 800EB6AC A2C80018 */ sb $t0, 0x18($s6) -/* B62850 800EB6B0 920A0000 */ lbu $t2, ($s0) -/* B62854 800EB6B4 920E0001 */ lbu $t6, 1($s0) -/* B62858 800EB6B8 8EE90018 */ lw $t1, 0x18($s7) -/* B6285C 800EB6BC 000ACA00 */ sll $t9, $t2, 8 -/* B62860 800EB6C0 01D98821 */ addu $s1, $t6, $t9 -/* B62864 800EB6C4 3231FFFF */ andi $s1, $s1, 0xffff -/* B62868 800EB6C8 01315821 */ addu $t3, $t1, $s1 -/* B6286C 800EB6CC 1000FE89 */ b .L800EB0F4 -/* B62870 800EB6D0 AECB0000 */ sw $t3, ($s6) -glabel L800EB6D4 -/* B62874 800EB6D4 93B20063 */ lbu $s2, 0x63($sp) -/* B62878 800EB6D8 1000FE86 */ b .L800EB0F4 -/* B6287C 800EB6DC A2920009 */ sb $s2, 9($s4) -glabel L800EB6E0 -/* B62880 800EB6E0 97B10062 */ lhu $s1, 0x62($sp) -/* B62884 800EB6E4 8EED0018 */ lw $t5, 0x18($s7) -/* B62888 800EB6E8 02802025 */ move $a0, $s4 -/* B6288C 800EB6EC 01B18021 */ addu $s0, $t5, $s1 -/* B62890 800EB6F0 920C0000 */ lbu $t4, ($s0) -/* B62894 800EB6F4 26100003 */ addiu $s0, $s0, 3 -/* B62898 800EB6F8 A28C0003 */ sb $t4, 3($s4) -/* B6289C 800EB6FC 920FFFFE */ lbu $t7, -2($s0) -/* B628A0 800EB700 A28F0002 */ sb $t7, 2($s4) -/* B628A4 800EB704 0C03ABBD */ jal func_800EAEF4 -/* B628A8 800EB708 9205FFFF */ lbu $a1, -1($s0) -/* B628AC 800EB70C 82180000 */ lb $t8, ($s0) -/* B628B0 800EB710 928B0001 */ lbu $t3, 1($s4) -/* B628B4 800EB714 26100004 */ addiu $s0, $s0, 4 -/* B628B8 800EB718 A6980026 */ sh $t8, 0x26($s4) -/* B628BC 800EB71C 9208FFFD */ lbu $t0, -3($s0) -/* B628C0 800EB720 356D0020 */ ori $t5, $t3, 0x20 -/* B628C4 800EB724 A288000A */ sb $t0, 0xa($s4) -/* B628C8 800EB728 920AFFFE */ lbu $t2, -2($s0) -/* B628CC 800EB72C A28A000B */ sb $t2, 0xb($s4) -/* B628D0 800EB730 920EFFFF */ lbu $t6, -1($s0) -/* B628D4 800EB734 A28E0004 */ sb $t6, 4($s4) -/* B628D8 800EB738 92190000 */ lbu $t9, ($s0) -/* B628DC 800EB73C A28D0001 */ sb $t5, 1($s4) -/* B628E0 800EB740 1000FE6C */ b .L800EB0F4 -/* B628E4 800EB744 A2990008 */ sb $t9, 8($s4) -glabel L800EB748 -/* B628E8 800EB748 8FAC0060 */ lw $t4, 0x60($sp) -/* B628EC 800EB74C 02802025 */ move $a0, $s4 -/* B628F0 800EB750 A28C0003 */ sb $t4, 3($s4) -/* B628F4 800EB754 8FAF0064 */ lw $t7, 0x64($sp) -/* B628F8 800EB758 A28F0002 */ sb $t7, 2($s4) -/* B628FC 800EB75C 0C03ABBD */ jal func_800EAEF4 -/* B62900 800EB760 93A5006B */ lbu $a1, 0x6b($sp) -/* B62904 800EB764 0C03A752 */ jal Audio_M64ReadU8 -/* B62908 800EB768 02C02025 */ move $a0, $s6 -/* B6290C 800EB76C 0002C600 */ sll $t8, $v0, 0x18 -/* B62910 800EB770 00184603 */ sra $t0, $t8, 0x18 -/* B62914 800EB774 A6880026 */ sh $t0, 0x26($s4) -/* B62918 800EB778 0C03A752 */ jal Audio_M64ReadU8 -/* B6291C 800EB77C 02C02025 */ move $a0, $s6 -/* B62920 800EB780 A282000A */ sb $v0, 0xa($s4) -/* B62924 800EB784 0C03A752 */ jal Audio_M64ReadU8 -/* B62928 800EB788 02C02025 */ move $a0, $s6 -/* B6292C 800EB78C A282000B */ sb $v0, 0xb($s4) -/* B62930 800EB790 0C03A752 */ jal Audio_M64ReadU8 -/* B62934 800EB794 02C02025 */ move $a0, $s6 -/* B62938 800EB798 A2820004 */ sb $v0, 4($s4) -/* B6293C 800EB79C 0C03A752 */ jal Audio_M64ReadU8 -/* B62940 800EB7A0 02C02025 */ move $a0, $s6 -/* B62944 800EB7A4 928E0001 */ lbu $t6, 1($s4) -/* B62948 800EB7A8 A2820008 */ sb $v0, 8($s4) -/* B6294C 800EB7AC 35D90020 */ ori $t9, $t6, 0x20 -/* B62950 800EB7B0 1000FE50 */ b .L800EB0F4 -/* B62954 800EB7B4 A2990001 */ sb $t9, 1($s4) -glabel L800EB7B8 -/* B62958 800EB7B8 3C013F80 */ li $at, 0x3F800000 # 0.000000 -/* B6295C 800EB7BC 44818000 */ mtc1 $at, $f16 -/* B62960 800EB7C0 A6800016 */ sh $zero, 0x16($s4) -/* B62964 800EB7C4 A6800012 */ sh $zero, 0x12($s4) -/* B62968 800EB7C8 A680001A */ sh $zero, 0x1a($s4) -/* B6296C 800EB7CC A6800014 */ sh $zero, 0x14($s4) -/* B62970 800EB7D0 A6800010 */ sh $zero, 0x10($s4) -/* B62974 800EB7D4 A6800018 */ sh $zero, 0x18($s4) -/* B62978 800EB7D8 AE8000CC */ sw $zero, 0xcc($s4) -/* B6297C 800EB7DC A280000C */ sb $zero, 0xc($s4) -/* B62980 800EB7E0 A280007D */ sb $zero, 0x7d($s4) -/* B62984 800EB7E4 A280000D */ sb $zero, 0xd($s4) -/* B62988 800EB7E8 A280000E */ sb $zero, 0xe($s4) -/* B6298C 800EB7EC A280000F */ sb $zero, 0xf($s4) -/* B62990 800EB7F0 A6800020 */ sh $zero, 0x20($s4) -/* B62994 800EB7F4 A2800009 */ sb $zero, 9($s4) -/* B62998 800EB7F8 1000FE3E */ b .L800EB0F4 -/* B6299C 800EB7FC E6900038 */ swc1 $f16, 0x38($s4) -glabel L800EB800 -/* B629A0 800EB800 02802025 */ move $a0, $s4 -/* B629A4 800EB804 0C03ABBD */ jal func_800EAEF4 -/* B629A8 800EB808 93A50063 */ lbu $a1, 0x63($sp) -/* B629AC 800EB80C 1000FE39 */ b .L800EB0F4 -/* B629B0 800EB810 00000000 */ nop -glabel L800EB814 -/* B629B4 800EB814 93B20063 */ lbu $s2, 0x63($sp) -/* B629B8 800EB818 1000FE36 */ b .L800EB0F4 -/* B629BC 800EB81C A292000C */ sb $s2, 0xc($s4) -glabel L800EB820 -/* B629C0 800EB820 97B10062 */ lhu $s1, 0x62($sp) -/* B629C4 800EB824 8EE90018 */ lw $t1, 0x18($s7) -/* B629C8 800EB828 01318021 */ addu $s0, $t1, $s1 -/* B629CC 800EB82C 1000FE31 */ b .L800EB0F4 -/* B629D0 800EB830 AE9000CC */ sw $s0, 0xcc($s4) -glabel L800EB834 -/* B629D4 800EB834 1000FE2F */ b .L800EB0F4 -/* B629D8 800EB838 AE8000CC */ sw $zero, 0xcc($s4) -glabel L800EB83C -/* B629DC 800EB83C 8E8400CC */ lw $a0, 0xcc($s4) -/* B629E0 800EB840 93B20063 */ lbu $s2, 0x63($sp) -/* B629E4 800EB844 1080FE2B */ beqz $a0, .L800EB0F4 -/* B629E8 800EB848 0012A903 */ sra $s5, $s2, 4 -/* B629EC 800EB84C 02408025 */ move $s0, $s2 -/* B629F0 800EB850 32B5000F */ andi $s5, $s5, 0xf -/* B629F4 800EB854 3252000F */ andi $s2, $s2, 0xf -/* B629F8 800EB858 32A500FF */ andi $a1, $s5, 0xff -/* B629FC 800EB85C 0C037DA2 */ jal func_800DF688 -/* B62A00 800EB860 324600FF */ andi $a2, $s2, 0xff -/* B62A04 800EB864 1000FE23 */ b .L800EB0F4 -/* B62A08 800EB868 00000000 */ nop -glabel L800EB86C -/* B62A0C 800EB86C 82CD0019 */ lb $t5, 0x19($s6) -/* B62A10 800EB870 97B10062 */ lhu $s1, 0x62($sp) -/* B62A14 800EB874 8EEB0018 */ lw $t3, 0x18($s7) -/* B62A18 800EB878 000D6040 */ sll $t4, $t5, 1 -/* B62A1C 800EB87C 022C7821 */ addu $t7, $s1, $t4 -/* B62A20 800EB880 016FC021 */ addu $t8, $t3, $t7 -/* B62A24 800EB884 97080000 */ lhu $t0, ($t8) -/* B62A28 800EB888 1000FE1A */ b .L800EB0F4 -/* B62A2C 800EB88C A6880022 */ sh $t0, 0x22($s4) -glabel L800EB890 -/* B62A30 800EB890 8EEA0018 */ lw $t2, 0x18($s7) -/* B62A34 800EB894 968E0022 */ lhu $t6, 0x22($s4) -/* B62A38 800EB898 014EC821 */ addu $t9, $t2, $t6 -/* B62A3C 800EB89C 1000FE15 */ b .L800EB0F4 -/* B62A40 800EB8A0 AE99003C */ sw $t9, 0x3c($s4) -glabel L800EB8A4 -/* B62A44 800EB8A4 82CD0019 */ lb $t5, 0x19($s6) -/* B62A48 800EB8A8 8E89003C */ lw $t1, 0x3c($s4) -/* B62A4C 800EB8AC 000D6040 */ sll $t4, $t5, 1 -/* B62A50 800EB8B0 012C5821 */ addu $t3, $t1, $t4 -/* B62A54 800EB8B4 956F0000 */ lhu $t7, ($t3) -/* B62A58 800EB8B8 1000FE0E */ b .L800EB0F4 -/* B62A5C 800EB8BC A68F0022 */ sh $t7, 0x22($s4) -glabel L800EB8C0 -/* B62A60 800EB8C0 8E98003C */ lw $t8, 0x3c($s4) -/* B62A64 800EB8C4 82C80019 */ lb $t0, 0x19($s6) -/* B62A68 800EB8C8 03085021 */ addu $t2, $t8, $t0 -/* B62A6C 800EB8CC 914E0000 */ lbu $t6, ($t2) -/* B62A70 800EB8D0 1000FE08 */ b .L800EB0F4 -/* B62A74 800EB8D4 A2CE0019 */ sb $t6, 0x19($s6) -glabel L800EB8D8 -/* B62A78 800EB8D8 8FB90060 */ lw $t9, 0x60($sp) -/* B62A7C 800EB8DC 3C0C8017 */ lui $t4, %hi(gAudioContext+0x297c) # $t4, 0x8017 -/* B62A80 800EB8E0 8FAB0060 */ lw $t3, 0x60($sp) -/* B62A84 800EB8E4 17200005 */ bnez $t9, .L800EB8FC -/* B62A88 800EB8E8 00000000 */ nop -/* B62A8C 800EB8EC 3C0D8017 */ lui $t5, %hi(gAudioContext+0x297c) # $t5, 0x8017 -/* B62A90 800EB8F0 8DA91AFC */ lw $t1, %lo(gAudioContext+0x297c)($t5) -/* B62A94 800EB8F4 1000FDFF */ b .L800EB0F4 -/* B62A98 800EB8F8 A6890022 */ sh $t1, 0x22($s4) -.L800EB8FC: -/* B62A9C 800EB8FC 8D8C1AFC */ lw $t4, %lo(gAudioContext+0x297c)($t4) -/* B62AA0 800EB900 018B001B */ divu $zero, $t4, $t3 -/* B62AA4 800EB904 00007810 */ mfhi $t7 -/* B62AA8 800EB908 A68F0022 */ sh $t7, 0x22($s4) -/* B62AAC 800EB90C 15600002 */ bnez $t3, .L800EB918 -/* B62AB0 800EB910 00000000 */ nop -/* B62AB4 800EB914 0007000D */ break 7 -.L800EB918: -/* B62AB8 800EB918 1000FDF6 */ b .L800EB0F4 -/* B62ABC 800EB91C 00000000 */ nop -glabel L800EB920 -/* B62AC0 800EB920 8FB80060 */ lw $t8, 0x60($sp) -/* B62AC4 800EB924 3C0E8017 */ lui $t6, %hi(gAudioContext+0x297c) # $t6, 0x8017 -/* B62AC8 800EB928 8FB90060 */ lw $t9, 0x60($sp) -/* B62ACC 800EB92C 17000005 */ bnez $t8, .L800EB944 -/* B62AD0 800EB930 00000000 */ nop -/* B62AD4 800EB934 3C088017 */ lui $t0, %hi(gAudioContext+0x297c) # $t0, 0x8017 -/* B62AD8 800EB938 8D0A1AFC */ lw $t2, %lo(gAudioContext+0x297c)($t0) -/* B62ADC 800EB93C 1000FDED */ b .L800EB0F4 -/* B62AE0 800EB940 A2CA0019 */ sb $t2, 0x19($s6) -.L800EB944: -/* B62AE4 800EB944 8DCE1AFC */ lw $t6, %lo(gAudioContext+0x297c)($t6) -/* B62AE8 800EB948 01D9001B */ divu $zero, $t6, $t9 -/* B62AEC 800EB94C 00006810 */ mfhi $t5 -/* B62AF0 800EB950 A2CD0019 */ sb $t5, 0x19($s6) -/* B62AF4 800EB954 17200002 */ bnez $t9, .L800EB960 -/* B62AF8 800EB958 00000000 */ nop -/* B62AFC 800EB95C 0007000D */ break 7 -.L800EB960: -/* B62B00 800EB960 1000FDE4 */ b .L800EB0F4 -/* B62B04 800EB964 00000000 */ nop -glabel L800EB968 -/* B62B08 800EB968 0C0399F0 */ jal Audio_NextRandom -/* B62B0C 800EB96C 00000000 */ nop -/* B62B10 800EB970 8FA90060 */ lw $t1, 0x60($sp) -/* B62B14 800EB974 8FAB0060 */ lw $t3, 0x60($sp) -/* B62B18 800EB978 15200003 */ bnez $t1, .L800EB988 -/* B62B1C 800EB97C 00000000 */ nop -/* B62B20 800EB980 10000007 */ b .L800EB9A0 -/* B62B24 800EB984 A6820022 */ sh $v0, 0x22($s4) -.L800EB988: -/* B62B28 800EB988 004B001B */ divu $zero, $v0, $t3 -/* B62B2C 800EB98C 00007810 */ mfhi $t7 -/* B62B30 800EB990 A68F0022 */ sh $t7, 0x22($s4) -/* B62B34 800EB994 15600002 */ bnez $t3, .L800EB9A0 -/* B62B38 800EB998 00000000 */ nop -/* B62B3C 800EB99C 0007000D */ break 7 -.L800EB9A0: -/* B62B40 800EB9A0 96980022 */ lhu $t8, 0x22($s4) -/* B62B44 800EB9A4 8FA80064 */ lw $t0, 0x64($sp) -/* B62B48 800EB9A8 03085021 */ addu $t2, $t8, $t0 -/* B62B4C 800EB9AC 3142FFFF */ andi $v0, $t2, 0xffff -/* B62B50 800EB9B0 A68A0022 */ sh $t2, 0x22($s4) -/* B62B54 800EB9B4 04410003 */ bgez $v0, .L800EB9C4 -/* B62B58 800EB9B8 00021A03 */ sra $v1, $v0, 8 -/* B62B5C 800EB9BC 244100FF */ addiu $at, $v0, 0xff -/* B62B60 800EB9C0 00011A03 */ sra $v1, $at, 8 -.L800EB9C4: -/* B62B64 800EB9C4 24630080 */ addiu $v1, $v1, 0x80 -/* B62B68 800EB9C8 04410004 */ bgez $v0, .L800EB9DC -/* B62B6C 800EB9CC 304400FF */ andi $a0, $v0, 0xff -/* B62B70 800EB9D0 10800002 */ beqz $a0, .L800EB9DC -/* B62B74 800EB9D4 00000000 */ nop -/* B62B78 800EB9D8 2484FF00 */ addiu $a0, $a0, -0x100 -.L800EB9DC: -/* B62B7C 800EB9DC 00037200 */ sll $t6, $v1, 8 -/* B62B80 800EB9E0 01C4C825 */ or $t9, $t6, $a0 -/* B62B84 800EB9E4 1000FDC3 */ b .L800EB0F4 -/* B62B88 800EB9E8 A6990022 */ sh $t9, 0x22($s4) -glabel L800EB9EC -/* B62B8C 800EB9EC 8FAD0060 */ lw $t5, 0x60($sp) -/* B62B90 800EB9F0 1000FDC0 */ b .L800EB0F4 -/* B62B94 800EB9F4 A28D000D */ sb $t5, 0xd($s4) -glabel L800EB9F8 -/* B62B98 800EB9F8 8FA90060 */ lw $t1, 0x60($sp) -/* B62B9C 800EB9FC 1000FDBD */ b .L800EB0F4 -/* B62BA0 800EBA00 A289000E */ sb $t1, 0xe($s4) -glabel L800EBA04 -/* B62BA4 800EBA04 8FAC0060 */ lw $t4, 0x60($sp) -/* B62BA8 800EBA08 A28C000F */ sb $t4, 0xf($s4) -/* B62BAC 800EBA0C 8FAB0064 */ lw $t3, 0x64($sp) -/* B62BB0 800EBA10 1000FDB8 */ b .L800EB0F4 -/* B62BB4 800EBA14 A68B0020 */ sh $t3, 0x20($s4) -glabel L800EBA18 -/* B62BB8 800EBA18 968F0022 */ lhu $t7, 0x22($s4) -/* B62BBC 800EBA1C 8FB80060 */ lw $t8, 0x60($sp) -/* B62BC0 800EBA20 01F84021 */ addu $t0, $t7, $t8 -/* B62BC4 800EBA24 1000FDB3 */ b .L800EB0F4 -/* B62BC8 800EBA28 A6880022 */ sh $t0, 0x22($s4) -.L800EBA2C: -/* B62BCC 800EBA2C 28810070 */ slti $at, $a0, 0x70 -/* B62BD0 800EBA30 1420005D */ bnez $at, .L800EBBA8 -/* B62BD4 800EBA34 3085000F */ andi $a1, $a0, 0xf -/* B62BD8 800EBA38 30850007 */ andi $a1, $a0, 7 -/* B62BDC 800EBA3C 308300F8 */ andi $v1, $a0, 0xf8 -/* B62BE0 800EBA40 24010070 */ li $at, 112 -/* B62BE4 800EBA44 10610006 */ beq $v1, $at, .L800EBA60 -/* B62BE8 800EBA48 30B500FF */ andi $s5, $a1, 0xff -/* B62BEC 800EBA4C 30AA00FF */ andi $t2, $a1, 0xff -/* B62BF0 800EBA50 29410004 */ slti $at, $t2, 4 -/* B62BF4 800EBA54 54200003 */ bnezl $at, .L800EBA64 -/* B62BF8 800EBA58 246EFF90 */ addiu $t6, $v1, -0x70 -/* B62BFC 800EBA5C 0000A825 */ move $s5, $zero -.L800EBA60: -/* B62C00 800EBA60 246EFF90 */ addiu $t6, $v1, -0x70 -.L800EBA64: -/* B62C04 800EBA64 2DC10029 */ sltiu $at, $t6, 0x29 -/* B62C08 800EBA68 1020FDA2 */ beqz $at, .L800EB0F4 -/* B62C0C 800EBA6C 000E7080 */ sll $t6, $t6, 2 -/* B62C10 800EBA70 3C018015 */ lui $at, %hi(jtbl_801497BC) -/* B62C14 800EBA74 002E0821 */ addu $at, $at, $t6 -/* B62C18 800EBA78 8C2E97BC */ lw $t6, %lo(jtbl_801497BC)($at) -/* B62C1C 800EBA7C 01C00008 */ jr $t6 -/* B62C20 800EBA80 00000000 */ nop -glabel L800EBA84 -/* B62C24 800EBA84 0015C880 */ sll $t9, $s5, 2 -/* B62C28 800EBA88 02996821 */ addu $t5, $s4, $t9 -/* B62C2C 800EBA8C 8DA20050 */ lw $v0, 0x50($t5) -/* B62C30 800EBA90 10400006 */ beqz $v0, .L800EBAAC -/* B62C34 800EBA94 00000000 */ nop -/* B62C38 800EBA98 8C490000 */ lw $t1, ($v0) -/* B62C3C 800EBA9C 00096040 */ sll $t4, $t1, 1 -/* B62C40 800EBAA0 000C5FC2 */ srl $t3, $t4, 0x1f -/* B62C44 800EBAA4 1000FD93 */ b .L800EB0F4 -/* B62C48 800EBAA8 A2CB0019 */ sb $t3, 0x19($s6) -.L800EBAAC: -/* B62C4C 800EBAAC 1000FD91 */ b .L800EB0F4 -/* B62C50 800EBAB0 A2DE0019 */ sb $fp, 0x19($s6) -glabel L800EBAB4 -/* B62C54 800EBAB4 0C03A757 */ jal Audio_M64ReadS16 -/* B62C58 800EBAB8 02C02025 */ move $a0, $s6 -/* B62C5C 800EBABC 3051FFFF */ andi $s1, $v0, 0xffff -/* B62C60 800EBAC0 02802025 */ move $a0, $s4 -/* B62C64 800EBAC4 0C03A5B6 */ jal Audio_SeqChannelSetLayer -/* B62C68 800EBAC8 02A02825 */ move $a1, $s5 -/* B62C6C 800EBACC 1440FD89 */ bnez $v0, .L800EB0F4 -/* B62C70 800EBAD0 00154080 */ sll $t0, $s5, 2 -/* B62C74 800EBAD4 8EEF0018 */ lw $t7, 0x18($s7) -/* B62C78 800EBAD8 02885021 */ addu $t2, $s4, $t0 -/* B62C7C 800EBADC 8D4E0050 */ lw $t6, 0x50($t2) -/* B62C80 800EBAE0 01F1C021 */ addu $t8, $t7, $s1 -/* B62C84 800EBAE4 1000FD83 */ b .L800EB0F4 -/* B62C88 800EBAE8 ADD80054 */ sw $t8, 0x54($t6) -glabel L800EBAEC -/* B62C8C 800EBAEC 02802025 */ move $a0, $s4 -/* B62C90 800EBAF0 0C03A61E */ jal Audio_SeqChannelLayerFree -/* B62C94 800EBAF4 02A02825 */ move $a1, $s5 -/* B62C98 800EBAF8 1000FD7E */ b .L800EB0F4 -/* B62C9C 800EBAFC 00000000 */ nop -glabel L800EBB00 -/* B62CA0 800EBB00 82D90019 */ lb $t9, 0x19($s6) -/* B62CA4 800EBB04 02802025 */ move $a0, $s4 -/* B62CA8 800EBB08 13D9FD7A */ beq $fp, $t9, .L800EB0F4 -/* B62CAC 800EBB0C 00000000 */ nop -/* B62CB0 800EBB10 0C03A5B6 */ jal Audio_SeqChannelSetLayer -/* B62CB4 800EBB14 02A02825 */ move $a1, $s5 -/* B62CB8 800EBB18 105EFD76 */ beq $v0, $fp, .L800EB0F4 -/* B62CBC 800EBB1C 00157080 */ sll $t6, $s5, 2 -/* B62CC0 800EBB20 82C90019 */ lb $t1, 0x19($s6) -/* B62CC4 800EBB24 8E8D003C */ lw $t5, 0x3c($s4) -/* B62CC8 800EBB28 8EEA0018 */ lw $t2, 0x18($s7) -/* B62CCC 800EBB2C 00096040 */ sll $t4, $t1, 1 -/* B62CD0 800EBB30 01AC8021 */ addu $s0, $t5, $t4 -/* B62CD4 800EBB34 920F0000 */ lbu $t7, ($s0) -/* B62CD8 800EBB38 920B0001 */ lbu $t3, 1($s0) -/* B62CDC 800EBB3C 028EC821 */ addu $t9, $s4, $t6 -/* B62CE0 800EBB40 000F4200 */ sll $t0, $t7, 8 -/* B62CE4 800EBB44 01688821 */ addu $s1, $t3, $t0 -/* B62CE8 800EBB48 8F290050 */ lw $t1, 0x50($t9) -/* B62CEC 800EBB4C 3231FFFF */ andi $s1, $s1, 0xffff -/* B62CF0 800EBB50 0151C021 */ addu $t8, $t2, $s1 -/* B62CF4 800EBB54 1000FD67 */ b .L800EB0F4 -/* B62CF8 800EBB58 AD380054 */ sw $t8, 0x54($t1) -glabel L800EBB5C -/* B62CFC 800EBB5C 82CD0019 */ lb $t5, 0x19($s6) -/* B62D00 800EBB60 02956021 */ addu $t4, $s4, $s5 -/* B62D04 800EBB64 1000FD63 */ b .L800EB0F4 -/* B62D08 800EBB68 A18D00C4 */ sb $t5, 0xc4($t4) -glabel L800EBB6C -/* B62D0C 800EBB6C 0C03A757 */ jal Audio_M64ReadS16 -/* B62D10 800EBB70 02C02025 */ move $a0, $s6 -/* B62D14 800EBB74 00028400 */ sll $s0, $v0, 0x10 -/* B62D18 800EBB78 00108403 */ sra $s0, $s0, 0x10 -/* B62D1C 800EBB7C 02802025 */ move $a0, $s4 -/* B62D20 800EBB80 0C03A5B6 */ jal Audio_SeqChannelSetLayer -/* B62D24 800EBB84 02A02825 */ move $a1, $s5 -/* B62D28 800EBB88 1440FD5A */ bnez $v0, .L800EB0F4 -/* B62D2C 800EBB8C 00154080 */ sll $t0, $s5, 2 -/* B62D30 800EBB90 8ECF0000 */ lw $t7, ($s6) -/* B62D34 800EBB94 02885021 */ addu $t2, $s4, $t0 -/* B62D38 800EBB98 8D4E0050 */ lw $t6, 0x50($t2) -/* B62D3C 800EBB9C 01F05821 */ addu $t3, $t7, $s0 -/* B62D40 800EBBA0 1000FD54 */ b .L800EB0F4 -/* B62D44 800EBBA4 ADCB0054 */ sw $t3, 0x54($t6) -.L800EBBA8: -/* B62D48 800EBBA8 309900F0 */ andi $t9, $a0, 0xf0 -/* B62D4C 800EBBAC 2F210061 */ sltiu $at, $t9, 0x61 -/* B62D50 800EBBB0 1020FD50 */ beqz $at, .L800EB0F4 -/* B62D54 800EBBB4 30B500FF */ andi $s5, $a1, 0xff -/* B62D58 800EBBB8 0019C880 */ sll $t9, $t9, 2 -/* B62D5C 800EBBBC 3C018015 */ lui $at, %hi(jtbl_80149860) -/* B62D60 800EBBC0 00390821 */ addu $at, $at, $t9 -/* B62D64 800EBBC4 8C399860 */ lw $t9, %lo(jtbl_80149860)($at) -/* B62D68 800EBBC8 03200008 */ jr $t9 -/* B62D6C 800EBBCC 00000000 */ nop -glabel L800EBBD0 -/* B62D70 800EBBD0 30B800FF */ andi $t8, $a1, 0xff -/* B62D74 800EBBD4 10000049 */ b .L800EBCFC -/* B62D78 800EBBD8 A698001E */ sh $t8, 0x1e($s4) -glabel L800EBBDC -/* B62D7C 800EBBDC 30A900FF */ andi $t1, $a1, 0xff -/* B62D80 800EBBE0 29210008 */ slti $at, $t1, 8 -/* B62D84 800EBBE4 1020000C */ beqz $at, .L800EBC18 -/* B62D88 800EBBE8 3255000F */ andi $s5, $s2, 0xf -/* B62D8C 800EBBEC 324C000F */ andi $t4, $s2, 0xf -/* B62D90 800EBBF0 028C1021 */ addu $v0, $s4, $t4 -/* B62D94 800EBBF4 A05E00C4 */ sb $fp, 0xc4($v0) -/* B62D98 800EBBF8 82C50019 */ lb $a1, 0x19($s6) -/* B62D9C 800EBBFC 92840007 */ lbu $a0, 7($s4) -/* B62DA0 800EBC00 0C038D05 */ jal Audio_SyncLoadSample -/* B62DA4 800EBC04 244600C4 */ addiu $a2, $v0, 0xc4 -/* B62DA8 800EBC08 145EFD3A */ bne $v0, $fp, .L800EB0F4 -/* B62DAC 800EBC0C 00000000 */ nop -/* B62DB0 800EBC10 1000FD38 */ b .L800EB0F4 -/* B62DB4 800EBC14 00000000 */ nop -.L800EBC18: -/* B62DB8 800EBC18 26B5FFF8 */ addiu $s5, $s5, -8 -/* B62DBC 800EBC1C 32B500FF */ andi $s5, $s5, 0xff -/* B62DC0 800EBC20 02951021 */ addu $v0, $s4, $s5 -/* B62DC4 800EBC24 A05E00C4 */ sb $fp, 0xc4($v0) -/* B62DC8 800EBC28 96850022 */ lhu $a1, 0x22($s4) -/* B62DCC 800EBC2C 92840007 */ lbu $a0, 7($s4) -/* B62DD0 800EBC30 244600C4 */ addiu $a2, $v0, 0xc4 -/* B62DD4 800EBC34 0C038D05 */ jal Audio_SyncLoadSample -/* B62DD8 800EBC38 24A50100 */ addiu $a1, $a1, 0x100 -/* B62DDC 800EBC3C 145EFD2D */ bne $v0, $fp, .L800EB0F4 -/* B62DE0 800EBC40 00000000 */ nop -/* B62DE4 800EBC44 1000FD2B */ b .L800EB0F4 -/* B62DE8 800EBC48 00000000 */ nop -glabel L800EBC4C -/* B62DEC 800EBC4C 30A300FF */ andi $v1, $a1, 0xff -/* B62DF0 800EBC50 02832021 */ addu $a0, $s4, $v1 -/* B62DF4 800EBC54 808F00C4 */ lb $t7, 0xc4($a0) -/* B62DF8 800EBC58 28610002 */ slti $at, $v1, 2 -/* B62DFC 800EBC5C 1020FD25 */ beqz $at, .L800EB0F4 -/* B62E00 800EBC60 A2CF0019 */ sb $t7, 0x19($s6) -/* B62E04 800EBC64 1000FD23 */ b .L800EB0F4 -/* B62E08 800EBC68 A09E00C4 */ sb $fp, 0xc4($a0) -glabel L800EBC6C -/* B62E0C 800EBC6C 30AA00FF */ andi $t2, $a1, 0xff -/* B62E10 800EBC70 028A5821 */ addu $t3, $s4, $t2 -/* B62E14 800EBC74 816E00C4 */ lb $t6, 0xc4($t3) -/* B62E18 800EBC78 82C80019 */ lb $t0, 0x19($s6) -/* B62E1C 800EBC7C 010EC823 */ subu $t9, $t0, $t6 -/* B62E20 800EBC80 1000FD1C */ b .L800EB0F4 -/* B62E24 800EBC84 A2D90019 */ sb $t9, 0x19($s6) -glabel L800EBC88 -/* B62E28 800EBC88 0C03A757 */ jal Audio_M64ReadS16 -/* B62E2C 800EBC8C 02C02025 */ move $a0, $s6 -/* B62E30 800EBC90 8EF80018 */ lw $t8, 0x18($s7) -/* B62E34 800EBC94 02402825 */ move $a1, $s2 -/* B62E38 800EBC98 3049FFFF */ andi $t1, $v0, 0xffff -/* B62E3C 800EBC9C 30A5000F */ andi $a1, $a1, 0xf -/* B62E40 800EBCA0 02E02025 */ move $a0, $s7 -/* B62E44 800EBCA4 0C03A6AB */ jal Audio_SequenceChannelEnable -/* B62E48 800EBCA8 03093021 */ addu $a2, $t8, $t1 -/* B62E4C 800EBCAC 1000FD11 */ b .L800EB0F4 -/* B62E50 800EBCB0 00000000 */ nop -glabel L800EBCB4 -/* B62E54 800EBCB4 0C03A752 */ jal Audio_M64ReadU8 -/* B62E58 800EBCB8 02C02025 */ move $a0, $s6 -/* B62E5C 800EBCBC 00156080 */ sll $t4, $s5, 2 -/* B62E60 800EBCC0 02EC7821 */ addu $t7, $s7, $t4 -/* B62E64 800EBCC4 8DEA0038 */ lw $t2, 0x38($t7) -/* B62E68 800EBCC8 82CD0019 */ lb $t5, 0x19($s6) -/* B62E6C 800EBCCC 01425821 */ addu $t3, $t2, $v0 -/* B62E70 800EBCD0 1000FD08 */ b .L800EB0F4 -/* B62E74 800EBCD4 A16D00C4 */ sb $t5, 0xc4($t3) -glabel L800EBCD8 -/* B62E78 800EBCD8 0C03A752 */ jal Audio_M64ReadU8 -/* B62E7C 800EBCDC 02C02025 */ move $a0, $s6 -/* B62E80 800EBCE0 00154080 */ sll $t0, $s5, 2 -/* B62E84 800EBCE4 02E87021 */ addu $t6, $s7, $t0 -/* B62E88 800EBCE8 8DD90038 */ lw $t9, 0x38($t6) -/* B62E8C 800EBCEC 0322C021 */ addu $t8, $t9, $v0 -/* B62E90 800EBCF0 830900C4 */ lb $t1, 0xc4($t8) -/* B62E94 800EBCF4 1000FCFF */ b .L800EB0F4 -/* B62E98 800EBCF8 A2C90019 */ sb $t1, 0x19($s6) -.L800EBCFC: -/* B62E9C 800EBCFC 00008025 */ move $s0, $zero -.L800EBD00: -/* B62EA0 800EBD00 02808825 */ move $s1, $s4 -/* B62EA4 800EBD04 24120010 */ li $s2, 16 -.L800EBD08: -/* B62EA8 800EBD08 8E240050 */ lw $a0, 0x50($s1) -/* B62EAC 800EBD0C 50800004 */ beql $a0, $zero, .L800EBD20 -/* B62EB0 800EBD10 26100004 */ addiu $s0, $s0, 4 -/* B62EB4 800EBD14 0C03A775 */ jal Audio_SeqChannelLayerProcessScript -/* B62EB8 800EBD18 00000000 */ nop -/* B62EBC 800EBD1C 26100004 */ addiu $s0, $s0, 4 -.L800EBD20: -/* B62EC0 800EBD20 1612FFF9 */ bne $s0, $s2, .L800EBD08 -/* B62EC4 800EBD24 26310004 */ addiu $s1, $s1, 4 -/* B62EC8 800EBD28 8FBF003C */ lw $ra, 0x3c($sp) -.L800EBD2C: -/* B62ECC 800EBD2C 8FB00018 */ lw $s0, 0x18($sp) -/* B62ED0 800EBD30 8FB1001C */ lw $s1, 0x1c($sp) -/* B62ED4 800EBD34 8FB20020 */ lw $s2, 0x20($sp) -/* B62ED8 800EBD38 8FB30024 */ lw $s3, 0x24($sp) -/* B62EDC 800EBD3C 8FB40028 */ lw $s4, 0x28($sp) -/* B62EE0 800EBD40 8FB5002C */ lw $s5, 0x2c($sp) -/* B62EE4 800EBD44 8FB60030 */ lw $s6, 0x30($sp) -/* B62EE8 800EBD48 8FB70034 */ lw $s7, 0x34($sp) -/* B62EEC 800EBD4C 8FBE0038 */ lw $fp, 0x38($sp) -/* B62EF0 800EBD50 03E00008 */ jr $ra -/* B62EF4 800EBD54 27BD0088 */ addiu $sp, $sp, 0x88 - diff --git a/asm/non_matchings/code/audio_seqplayer/Audio_SequencePlayerProcessSequence.s b/asm/non_matchings/code/audio_seqplayer/Audio_SequencePlayerProcessSequence.s deleted file mode 100644 index 9152ca2cd7..0000000000 --- a/asm/non_matchings/code/audio_seqplayer/Audio_SequencePlayerProcessSequence.s +++ /dev/null @@ -1,743 +0,0 @@ -.late_rodata -glabel jtbl_801499E4 - .word L800EC340 - .word L800EC314 - .word L800EC304 - .word L800EC2D4 - .word L800EC2BC - .word L800EC2A4 - .word L800EBE68 - .word L800EBE68 - .word L800EC294 - .word L800EC21C - .word L800EC1CC - .word L800EBE68 - .word L800EC1BC - .word L800EC190 - .word L800EC190 - .word L800EC180 - .word L800EC170 - .word L800EC144 - .word L800EC134 - .word L800EC118 - .word L800EBE68 - .word L800EC0EC - .word L800EBFD8 - .word L800EC054 - .word L800EBFB4 - .word L800EBF60 - .word L800EBF40 - .word L800EBF3C - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EC328 - .word L800EBF2C - .word L800EBEFC - -glabel jtbl_80149A9C - .word L800EC438 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EC3E4 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EC4E4 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EC400 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EC414 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EC454 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EC480 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EBE68 - .word L800EC4A8 - -.text -glabel Audio_SequencePlayerProcessSequence -/* B62EF8 800EBD58 27BDFF98 */ addiu $sp, $sp, -0x68 -/* B62EFC 800EBD5C AFBF0024 */ sw $ra, 0x24($sp) -/* B62F00 800EBD60 AFB20020 */ sw $s2, 0x20($sp) -/* B62F04 800EBD64 AFB1001C */ sw $s1, 0x1c($sp) -/* B62F08 800EBD68 AFB00018 */ sw $s0, 0x18($sp) -/* B62F0C 800EBD6C 8C8E0000 */ lw $t6, ($a0) -/* B62F10 800EBD70 00809025 */ move $s2, $a0 -/* B62F14 800EBD74 000E7FC2 */ srl $t7, $t6, 0x1f -/* B62F18 800EBD78 51E001F5 */ beql $t7, $zero, .L800EC550 -/* B62F1C 800EBD7C 8FBF0024 */ lw $ra, 0x24($sp) -/* B62F20 800EBD80 0C03864A */ jal Audio_IsSeqLoadComplete -/* B62F24 800EBD84 90840004 */ lbu $a0, 4($a0) -/* B62F28 800EBD88 10400005 */ beqz $v0, .L800EBDA0 -/* B62F2C 800EBD8C 00000000 */ nop -/* B62F30 800EBD90 0C03862C */ jal Audio_IsBankLoadComplete -/* B62F34 800EBD94 92440005 */ lbu $a0, 5($s2) -/* B62F38 800EBD98 14400005 */ bnez $v0, .L800EBDB0 -/* B62F3C 800EBD9C 24050002 */ li $a1, 2 -.L800EBDA0: -/* B62F40 800EBDA0 0C03A6DB */ jal Audio_SequencePlayerDisable -/* B62F44 800EBDA4 02402025 */ move $a0, $s2 -/* B62F48 800EBDA8 100001E9 */ b .L800EC550 -/* B62F4C 800EBDAC 8FBF0024 */ lw $ra, 0x24($sp) -.L800EBDB0: -/* B62F50 800EBDB0 0C038692 */ jal Audio_SetSeqLoadStatus -/* B62F54 800EBDB4 92440004 */ lbu $a0, 4($s2) -/* B62F58 800EBDB8 92440005 */ lbu $a0, 5($s2) -/* B62F5C 800EBDBC 0C038686 */ jal Audio_SetBankLoadStatus -/* B62F60 800EBDC0 24050002 */ li $a1, 2 -/* B62F64 800EBDC4 8E580000 */ lw $t8, ($s2) -/* B62F68 800EBDC8 3C048017 */ lui $a0, %hi(gAudioContext+0x2898) -/* B62F6C 800EBDCC 00184080 */ sll $t0, $t8, 2 -/* B62F70 800EBDD0 05030006 */ bgezl $t0, .L800EBDEC -/* B62F74 800EBDD4 964D000A */ lhu $t5, 0xa($s2) -/* B62F78 800EBDD8 92490003 */ lbu $t1, 3($s2) -/* B62F7C 800EBDDC 312A0080 */ andi $t2, $t1, 0x80 -/* B62F80 800EBDE0 554001DB */ bnezl $t2, .L800EC550 -/* B62F84 800EBDE4 8FBF0024 */ lw $ra, 0x24($sp) -/* B62F88 800EBDE8 964D000A */ lhu $t5, 0xa($s2) -.L800EBDEC: -/* B62F8C 800EBDEC 964E0008 */ lhu $t6, 8($s2) -/* B62F90 800EBDF0 8E4B00E0 */ lw $t3, 0xe0($s2) -/* B62F94 800EBDF4 8659000C */ lh $t9, 0xc($s2) -/* B62F98 800EBDF8 01AEC021 */ addu $t8, $t5, $t6 -/* B62F9C 800EBDFC A658000A */ sh $t8, 0xa($s2) -/* B62FA0 800EBE00 256C0001 */ addiu $t4, $t3, 1 -/* B62FA4 800EBE04 03194021 */ addu $t0, $t8, $t9 -/* B62FA8 800EBE08 AE4C00E0 */ sw $t4, 0xe0($s2) -/* B62FAC 800EBE0C A648000A */ sh $t0, 0xa($s2) -/* B62FB0 800EBE10 84841A18 */ lh $a0, %lo(gAudioContext+0x2898)($a0) -/* B62FB4 800EBE14 3102FFFF */ andi $v0, $t0, 0xffff -/* B62FB8 800EBE18 0044082A */ slt $at, $v0, $a0 -/* B62FBC 800EBE1C 542001CC */ bnezl $at, .L800EC550 -/* B62FC0 800EBE20 8FBF0024 */ lw $ra, 0x24($sp) -/* B62FC4 800EBE24 8E4B0000 */ lw $t3, ($s2) -/* B62FC8 800EBE28 00445023 */ subu $t2, $v0, $a0 -/* B62FCC 800EBE2C 24010001 */ li $at, 1 -/* B62FD0 800EBE30 000B6180 */ sll $t4, $t3, 6 -/* B62FD4 800EBE34 000C6FC2 */ srl $t5, $t4, 0x1f -/* B62FD8 800EBE38 11A101C4 */ beq $t5, $at, .L800EC54C -/* B62FDC 800EBE3C A64A000A */ sh $t2, 0xa($s2) -/* B62FE0 800EBE40 96420010 */ lhu $v0, 0x10($s2) -/* B62FE4 800EBE44 28410002 */ slti $at, $v0, 2 -/* B62FE8 800EBE48 14200003 */ bnez $at, .L800EBE58 -/* B62FEC 800EBE4C 244EFFFF */ addiu $t6, $v0, -1 -/* B62FF0 800EBE50 100001B1 */ b .L800EC518 -/* B62FF4 800EBE54 A64E0010 */ sh $t6, 0x10($s2) -.L800EBE58: -/* B62FF8 800EBE58 92580000 */ lbu $t8, ($s2) -/* B62FFC 800EBE5C 26510078 */ addiu $s1, $s2, 0x78 -/* B63000 800EBE60 37190004 */ ori $t9, $t8, 4 -/* B63004 800EBE64 A2590000 */ sb $t9, ($s2) -.L800EBE68: -glabel L800EBE68 -/* B63008 800EBE68 0C03A752 */ jal Audio_M64ReadU8 -/* B6300C 800EBE6C 02202025 */ move $a0, $s1 -/* B63010 800EBE70 284100F2 */ slti $at, $v0, 0xf2 -/* B63014 800EBE74 14200014 */ bnez $at, .L800EBEC8 -/* B63018 800EBE78 305000FF */ andi $s0, $v0, 0xff -/* B6301C 800EBE7C 02202025 */ move $a0, $s1 -/* B63020 800EBE80 0C03A4D0 */ jal Audio_GetScriptControlFlowArgument -/* B63024 800EBE84 320500FF */ andi $a1, $s0, 0xff -/* B63028 800EBE88 02402025 */ move $a0, $s2 -/* B6302C 800EBE8C 02202825 */ move $a1, $s1 -/* B63030 800EBE90 02003025 */ move $a2, $s0 -/* B63034 800EBE94 0C03A4EA */ jal Audio_HandleScriptFlowControl -/* B63038 800EBE98 00403825 */ move $a3, $v0 -/* B6303C 800EBE9C 1040FFF2 */ beqz $v0, .L800EBE68 -/* B63040 800EBEA0 00000000 */ nop -/* B63044 800EBEA4 2401FFFF */ li $at, -1 -/* B63048 800EBEA8 14410005 */ bne $v0, $at, .L800EBEC0 -/* B6304C 800EBEAC 00000000 */ nop -/* B63050 800EBEB0 0C03A6DB */ jal Audio_SequencePlayerDisable -/* B63054 800EBEB4 02402025 */ move $a0, $s2 -/* B63058 800EBEB8 10000198 */ b .L800EC51C -/* B6305C 800EBEBC 02408825 */ move $s1, $s2 -.L800EBEC0: -/* B63060 800EBEC0 10000195 */ b .L800EC518 -/* B63064 800EBEC4 A6420010 */ sh $v0, 0x10($s2) -.L800EBEC8: -/* B63068 800EBEC8 304300FF */ andi $v1, $v0, 0xff -/* B6306C 800EBECC 286100C0 */ slti $at, $v1, 0xc0 -/* B63070 800EBED0 1420012E */ bnez $at, .L800EC38C -/* B63074 800EBED4 306200F0 */ andi $v0, $v1, 0xf0 -/* B63078 800EBED8 2468FF3C */ addiu $t0, $v1, -0xc4 -/* B6307C 800EBEDC 2D01002E */ sltiu $at, $t0, 0x2e -/* B63080 800EBEE0 1020FFE1 */ beqz $at, .L800EBE68 -/* B63084 800EBEE4 00084080 */ sll $t0, $t0, 2 -/* B63088 800EBEE8 3C018015 */ lui $at, %hi(jtbl_801499E4) -/* B6308C 800EBEEC 00280821 */ addu $at, $at, $t0 -/* B63090 800EBEF0 8C2899E4 */ lw $t0, %lo(jtbl_801499E4)($at) -/* B63094 800EBEF4 01000008 */ jr $t0 -/* B63098 800EBEF8 00000000 */ nop -glabel L800EBEFC -/* B6309C 800EBEFC 2650009C */ addiu $s0, $s2, 0x9c -/* B630A0 800EBF00 0C039F80 */ jal Audio_NotePoolClear -/* B630A4 800EBF04 02002025 */ move $a0, $s0 -/* B630A8 800EBF08 0C03A752 */ jal Audio_M64ReadU8 -/* B630AC 800EBF0C 02202025 */ move $a0, $s1 -/* B630B0 800EBF10 02002025 */ move $a0, $s0 -/* B630B4 800EBF14 0C039FD8 */ jal Audio_NotePoolFill -/* B630B8 800EBF18 00402825 */ move $a1, $v0 -/* B630BC 800EBF1C 1000FFD2 */ b .L800EBE68 -/* B630C0 800EBF20 00000000 */ nop -/* B630C4 800EBF24 1000FFD0 */ b .L800EBE68 -/* B630C8 800EBF28 00000000 */ nop -glabel L800EBF2C -/* B630CC 800EBF2C 0C039F80 */ jal Audio_NotePoolClear -/* B630D0 800EBF30 2644009C */ addiu $a0, $s2, 0x9c -/* B630D4 800EBF34 1000FFCC */ b .L800EBE68 -/* B630D8 800EBF38 00000000 */ nop -glabel L800EBF3C -/* B630DC 800EBF3C A640000E */ sh $zero, 0xe($s2) -glabel L800EBF40 -/* B630E0 800EBF40 0C03A752 */ jal Audio_M64ReadU8 -/* B630E4 800EBF44 02202025 */ move $a0, $s1 -/* B630E8 800EBF48 8649000E */ lh $t1, 0xe($s2) -/* B630EC 800EBF4C 00025600 */ sll $t2, $v0, 0x18 -/* B630F0 800EBF50 000A5E03 */ sra $t3, $t2, 0x18 -/* B630F4 800EBF54 012B6021 */ addu $t4, $t1, $t3 -/* B630F8 800EBF58 1000FFC3 */ b .L800EBE68 -/* B630FC 800EBF5C A64C000E */ sh $t4, 0xe($s2) -glabel L800EBF60 -/* B63100 800EBF60 0C03A752 */ jal Audio_M64ReadU8 -/* B63104 800EBF64 02202025 */ move $a0, $s1 -/* B63108 800EBF68 00026880 */ sll $t5, $v0, 2 -/* B6310C 800EBF6C 01A26823 */ subu $t5, $t5, $v0 -/* B63110 800EBF70 000D6900 */ sll $t5, $t5, 4 -/* B63114 800EBF74 A64D0008 */ sh $t5, 8($s2) -/* B63118 800EBF78 3C048017 */ lui $a0, %hi(gAudioContext+0x2898) -/* B6311C 800EBF7C 84841A18 */ lh $a0, %lo(gAudioContext+0x2898)($a0) -/* B63120 800EBF80 31A3FFFF */ andi $v1, $t5, 0xffff -/* B63124 800EBF84 24180001 */ li $t8, 1 -/* B63128 800EBF88 0083082A */ slt $at, $a0, $v1 -/* B6312C 800EBF8C 50200004 */ beql $at, $zero, .L800EBFA0 -/* B63130 800EBF90 00037400 */ sll $t6, $v1, 0x10 -/* B63134 800EBF94 A6440008 */ sh $a0, 8($s2) -/* B63138 800EBF98 3083FFFF */ andi $v1, $a0, 0xffff -/* B6313C 800EBF9C 00037400 */ sll $t6, $v1, 0x10 -.L800EBFA0: -/* B63140 800EBFA0 000E7C03 */ sra $t7, $t6, 0x10 -/* B63144 800EBFA4 1DE0FFB0 */ bgtz $t7, .L800EBE68 -/* B63148 800EBFA8 00000000 */ nop -/* B6314C 800EBFAC 1000FFAE */ b .L800EBE68 -/* B63150 800EBFB0 A6580008 */ sh $t8, 8($s2) -glabel L800EBFB4 -/* B63154 800EBFB4 0C03A752 */ jal Audio_M64ReadU8 -/* B63158 800EBFB8 02202025 */ move $a0, $s1 -/* B6315C 800EBFBC 0002CE00 */ sll $t9, $v0, 0x18 -/* B63160 800EBFC0 00194603 */ sra $t0, $t9, 0x18 -/* B63164 800EBFC4 00085080 */ sll $t2, $t0, 2 -/* B63168 800EBFC8 01485023 */ subu $t2, $t2, $t0 -/* B6316C 800EBFCC 000A5100 */ sll $t2, $t2, 4 -/* B63170 800EBFD0 1000FFA5 */ b .L800EBE68 -/* B63174 800EBFD4 A64A000C */ sh $t2, 0xc($s2) -glabel L800EBFD8 -/* B63178 800EBFD8 0C03A752 */ jal Audio_M64ReadU8 -/* B6317C 800EBFDC 02202025 */ move $a0, $s1 -/* B63180 800EBFE0 305000FF */ andi $s0, $v0, 0xff -/* B63184 800EBFE4 0C03A757 */ jal Audio_M64ReadS16 -/* B63188 800EBFE8 02202025 */ move $a0, $s1 -/* B6318C 800EBFEC 12000008 */ beqz $s0, .L800EC010 -/* B63190 800EBFF0 02002025 */ move $a0, $s0 -/* B63194 800EBFF4 24010001 */ li $at, 1 -/* B63198 800EBFF8 10810005 */ beq $a0, $at, .L800EC010 -/* B6319C 800EBFFC 24010002 */ li $at, 2 -/* B631A0 800EC000 1081000A */ beq $a0, $at, .L800EC02C -/* B631A4 800EC004 304BFFFF */ andi $t3, $v0, 0xffff -/* B631A8 800EC008 1000FF97 */ b .L800EBE68 -/* B631AC 800EC00C 00000000 */ nop -.L800EC010: -/* B631B0 800EC010 92490001 */ lbu $t1, 1($s2) -/* B631B4 800EC014 24010002 */ li $at, 2 -/* B631B8 800EC018 1121FF93 */ beq $t1, $at, .L800EBE68 -/* B631BC 800EC01C 00000000 */ nop -/* B631C0 800EC020 A6420014 */ sh $v0, 0x14($s2) -/* B631C4 800EC024 1000FF90 */ b .L800EBE68 -/* B631C8 800EC028 A2500001 */ sb $s0, 1($s2) -.L800EC02C: -/* B631CC 800EC02C 448B5000 */ mtc1 $t3, $f10 -/* B631D0 800EC030 44802000 */ mtc1 $zero, $f4 -/* B631D4 800EC034 C646001C */ lwc1 $f6, 0x1c($s2) -/* B631D8 800EC038 46805420 */ cvt.s.w $f16, $f10 -/* B631DC 800EC03C A6420012 */ sh $v0, 0x12($s2) -/* B631E0 800EC040 A2500001 */ sb $s0, 1($s2) -/* B631E4 800EC044 46062201 */ sub.s $f8, $f4, $f6 -/* B631E8 800EC048 46104483 */ div.s $f18, $f8, $f16 -/* B631EC 800EC04C 1000FF86 */ b .L800EBE68 -/* B631F0 800EC050 E6520020 */ swc1 $f18, 0x20($s2) -glabel L800EC054 -/* B631F4 800EC054 0C03A752 */ jal Audio_M64ReadU8 -/* B631F8 800EC058 02202025 */ move $a0, $s1 -/* B631FC 800EC05C 92430001 */ lbu $v1, 1($s2) -/* B63200 800EC060 24010001 */ li $at, 1 -/* B63204 800EC064 5060000B */ beql $v1, $zero, .L800EC094 -/* B63208 800EC068 96430014 */ lhu $v1, 0x14($s2) -/* B6320C 800EC06C 10610005 */ beq $v1, $at, .L800EC084 -/* B63210 800EC070 24010002 */ li $at, 2 -/* B63214 800EC074 1061FF7C */ beq $v1, $at, .L800EBE68 -/* B63218 800EC078 00000000 */ nop -/* B6321C 800EC07C 1000FF7A */ b .L800EBE68 -/* B63220 800EC080 00000000 */ nop -.L800EC084: -/* B63224 800EC084 44802000 */ mtc1 $zero, $f4 -/* B63228 800EC088 A2400001 */ sb $zero, 1($s2) -/* B6322C 800EC08C E644001C */ swc1 $f4, 0x1c($s2) -/* B63230 800EC090 96430014 */ lhu $v1, 0x14($s2) -.L800EC094: -/* B63234 800EC094 1060000E */ beqz $v1, .L800EC0D0 -/* B63238 800EC098 A6430012 */ sh $v1, 0x12($s2) -/* B6323C 800EC09C 44823000 */ mtc1 $v0, $f6 -/* B63240 800EC0A0 3C0142FE */ li $at, 0x42FE0000 # 0.000000 -/* B63244 800EC0A4 44814000 */ mtc1 $at, $f8 -/* B63248 800EC0A8 468032A0 */ cvt.s.w $f10, $f6 -/* B6324C 800EC0AC 306CFFFF */ andi $t4, $v1, 0xffff -/* B63250 800EC0B0 448C3000 */ mtc1 $t4, $f6 -/* B63254 800EC0B4 C652001C */ lwc1 $f18, 0x1c($s2) -/* B63258 800EC0B8 46085403 */ div.s $f16, $f10, $f8 -/* B6325C 800EC0BC 468032A0 */ cvt.s.w $f10, $f6 -/* B63260 800EC0C0 46128101 */ sub.s $f4, $f16, $f18 -/* B63264 800EC0C4 460A2203 */ div.s $f8, $f4, $f10 -/* B63268 800EC0C8 1000FF67 */ b .L800EBE68 -/* B6326C 800EC0CC E6480020 */ swc1 $f8, 0x20($s2) -.L800EC0D0: -/* B63270 800EC0D0 44828000 */ mtc1 $v0, $f16 -/* B63274 800EC0D4 3C0142FE */ li $at, 0x42FE0000 # 0.000000 -/* B63278 800EC0D8 44813000 */ mtc1 $at, $f6 -/* B6327C 800EC0DC 468084A0 */ cvt.s.w $f18, $f16 -/* B63280 800EC0E0 46069103 */ div.s $f4, $f18, $f6 -/* B63284 800EC0E4 1000FF60 */ b .L800EBE68 -/* B63288 800EC0E8 E644001C */ swc1 $f4, 0x1c($s2) -glabel L800EC0EC -/* B6328C 800EC0EC 0C03A752 */ jal Audio_M64ReadU8 -/* B63290 800EC0F0 02202025 */ move $a0, $s1 -/* B63294 800EC0F4 00026E00 */ sll $t5, $v0, 0x18 -/* B63298 800EC0F8 000D7603 */ sra $t6, $t5, 0x18 -/* B6329C 800EC0FC 448E5000 */ mtc1 $t6, $f10 -/* B632A0 800EC100 3C0142FE */ li $at, 0x42FE0000 # 0.000000 -/* B632A4 800EC104 44818000 */ mtc1 $at, $f16 -/* B632A8 800EC108 46805220 */ cvt.s.w $f8, $f10 -/* B632AC 800EC10C 46104483 */ div.s $f18, $f8, $f16 -/* B632B0 800EC110 1000FF55 */ b .L800EBE68 -/* B632B4 800EC114 E652002C */ swc1 $f18, 0x2c($s2) -glabel L800EC118 -/* B632B8 800EC118 0C03A757 */ jal Audio_M64ReadS16 -/* B632BC 800EC11C 02202025 */ move $a0, $s1 -/* B632C0 800EC120 02402025 */ move $a0, $s2 -/* B632C4 800EC124 0C03A64D */ jal Audio_SequencePlayerInitChannels -/* B632C8 800EC128 3045FFFF */ andi $a1, $v0, 0xffff -/* B632CC 800EC12C 1000FF4E */ b .L800EBE68 -/* B632D0 800EC130 00000000 */ nop -glabel L800EC134 -/* B632D4 800EC134 0C03A757 */ jal Audio_M64ReadS16 -/* B632D8 800EC138 02202025 */ move $a0, $s1 -/* B632DC 800EC13C 1000FF4A */ b .L800EBE68 -/* B632E0 800EC140 00000000 */ nop -glabel L800EC144 -/* B632E4 800EC144 0C03A752 */ jal Audio_M64ReadU8 -/* B632E8 800EC148 02202025 */ move $a0, $s1 -/* B632EC 800EC14C 00027E00 */ sll $t7, $v0, 0x18 -/* B632F0 800EC150 000FC603 */ sra $t8, $t7, 0x18 -/* B632F4 800EC154 44983000 */ mtc1 $t8, $f6 -/* B632F8 800EC158 3C0142FE */ li $at, 0x42FE0000 # 0.000000 -/* B632FC 800EC15C 44815000 */ mtc1 $at, $f10 -/* B63300 800EC160 46803120 */ cvt.s.w $f4, $f6 -/* B63304 800EC164 460A2203 */ div.s $f8, $f4, $f10 -/* B63308 800EC168 1000FF3F */ b .L800EBE68 -/* B6330C 800EC16C E6480028 */ swc1 $f8, 0x28($s2) -glabel L800EC170 -/* B63310 800EC170 92480000 */ lbu $t0, ($s2) -/* B63314 800EC174 350A0020 */ ori $t2, $t0, 0x20 -/* B63318 800EC178 1000FF3B */ b .L800EBE68 -/* B6331C 800EC17C A24A0000 */ sb $t2, ($s2) -glabel L800EC180 -/* B63320 800EC180 0C03A752 */ jal Audio_M64ReadU8 -/* B63324 800EC184 02202025 */ move $a0, $s1 -/* B63328 800EC188 1000FF37 */ b .L800EBE68 -/* B6332C 800EC18C A2420003 */ sb $v0, 3($s2) -glabel L800EC190 -/* B63330 800EC190 0C03A757 */ jal Audio_M64ReadS16 -/* B63334 800EC194 02202025 */ move $a0, $s1 -/* B63338 800EC198 8E490018 */ lw $t1, 0x18($s2) -/* B6333C 800EC19C 304BFFFF */ andi $t3, $v0, 0xffff -/* B63340 800EC1A0 240100D2 */ li $at, 210 -/* B63344 800EC1A4 16010003 */ bne $s0, $at, .L800EC1B4 -/* B63348 800EC1A8 012B1821 */ addu $v1, $t1, $t3 -/* B6334C 800EC1AC 1000FF2E */ b .L800EBE68 -/* B63350 800EC1B0 AE430094 */ sw $v1, 0x94($s2) -.L800EC1B4: -/* B63354 800EC1B4 1000FF2C */ b .L800EBE68 -/* B63358 800EC1B8 AE430098 */ sw $v1, 0x98($s2) -glabel L800EC1BC -/* B6335C 800EC1BC 0C03A752 */ jal Audio_M64ReadU8 -/* B63360 800EC1C0 02202025 */ move $a0, $s1 -/* B63364 800EC1C4 1000FF28 */ b .L800EBE68 -/* B63368 800EC1C8 A2420002 */ sb $v0, 2($s2) -glabel L800EC1CC -/* B6336C 800EC1CC 0C03A752 */ jal Audio_M64ReadU8 -/* B63370 800EC1D0 02202025 */ move $a0, $s1 -/* B63374 800EC1D4 14400006 */ bnez $v0, .L800EC1F0 -/* B63378 800EC1D8 3C0F8017 */ lui $t7, %hi(gAudioContext+0x297c) # $t7, 0x8017 -/* B6337C 800EC1DC 3C0C8017 */ lui $t4, %hi(gAudioContext+0x297c) # $t4, 0x8017 -/* B63380 800EC1E0 8D8C1AFC */ lw $t4, %lo(gAudioContext+0x297c)($t4) -/* B63384 800EC1E4 000C7082 */ srl $t6, $t4, 2 -/* B63388 800EC1E8 1000FF1F */ b .L800EBE68 -/* B6338C 800EC1EC A22E0019 */ sb $t6, 0x19($s1) -.L800EC1F0: -/* B63390 800EC1F0 8DEF1AFC */ lw $t7, %lo(gAudioContext+0x297c)($t7) -/* B63394 800EC1F4 305900FF */ andi $t9, $v0, 0xff -/* B63398 800EC1F8 000FC082 */ srl $t8, $t7, 2 -/* B6339C 800EC1FC 0319001B */ divu $zero, $t8, $t9 -/* B633A0 800EC200 00004010 */ mfhi $t0 -/* B633A4 800EC204 A2280019 */ sb $t0, 0x19($s1) -/* B633A8 800EC208 17200002 */ bnez $t9, .L800EC214 -/* B633AC 800EC20C 00000000 */ nop -/* B633B0 800EC210 0007000D */ break 7 -.L800EC214: -/* B633B4 800EC214 1000FF14 */ b .L800EBE68 -/* B633B8 800EC218 00000000 */ nop -glabel L800EC21C -/* B633BC 800EC21C 0C03A757 */ jal Audio_M64ReadS16 -/* B633C0 800EC220 02202025 */ move $a0, $s1 -/* B633C4 800EC224 82250019 */ lb $a1, 0x19($s1) -/* B633C8 800EC228 2401FFFF */ li $at, -1 -/* B633CC 800EC22C 10A1FF0E */ beq $a1, $at, .L800EBE68 -/* B633D0 800EC230 00000000 */ nop -/* B633D4 800EC234 92260018 */ lbu $a2, 0x18($s1) -/* B633D8 800EC238 24010003 */ li $at, 3 -/* B633DC 800EC23C 304AFFFF */ andi $t2, $v0, 0xffff -/* B633E0 800EC240 10C1FF09 */ beq $a2, $at, .L800EBE68 -/* B633E4 800EC244 00054840 */ sll $t1, $a1, 1 -/* B633E8 800EC248 8E2D0000 */ lw $t5, ($s1) -/* B633EC 800EC24C 00067080 */ sll $t6, $a2, 2 -/* B633F0 800EC250 8E4C0018 */ lw $t4, 0x18($s2) -/* B633F4 800EC254 022E7821 */ addu $t7, $s1, $t6 -/* B633F8 800EC258 ADED0004 */ sw $t5, 4($t7) -/* B633FC 800EC25C 92380018 */ lbu $t8, 0x18($s1) -/* B63400 800EC260 01495821 */ addu $t3, $t2, $t1 -/* B63404 800EC264 018B1021 */ addu $v0, $t4, $t3 -/* B63408 800EC268 27190001 */ addiu $t9, $t8, 1 -/* B6340C 800EC26C A2390018 */ sb $t9, 0x18($s1) -/* B63410 800EC270 904A0000 */ lbu $t2, ($v0) -/* B63414 800EC274 90480001 */ lbu $t0, 1($v0) -/* B63418 800EC278 8E4C0018 */ lw $t4, 0x18($s2) -/* B6341C 800EC27C 000A4A00 */ sll $t1, $t2, 8 -/* B63420 800EC280 01091821 */ addu $v1, $t0, $t1 -/* B63424 800EC284 3063FFFF */ andi $v1, $v1, 0xffff -/* B63428 800EC288 01835821 */ addu $t3, $t4, $v1 -/* B6342C 800EC28C 1000FEF6 */ b .L800EBE68 -/* B63430 800EC290 AE2B0000 */ sw $t3, ($s1) -glabel L800EC294 -/* B63434 800EC294 0C03A752 */ jal Audio_M64ReadU8 -/* B63438 800EC298 02202025 */ move $a0, $s1 -/* B6343C 800EC29C 1000FEF2 */ b .L800EBE68 -/* B63440 800EC2A0 A2220019 */ sb $v0, 0x19($s1) -glabel L800EC2A4 -/* B63444 800EC2A4 0C03A752 */ jal Audio_M64ReadU8 -/* B63448 800EC2A8 02202025 */ move $a0, $s1 -/* B6344C 800EC2AC 822E0019 */ lb $t6, 0x19($s1) -/* B63450 800EC2B0 01C26824 */ and $t5, $t6, $v0 -/* B63454 800EC2B4 1000FEEC */ b .L800EBE68 -/* B63458 800EC2B8 A22D0019 */ sb $t5, 0x19($s1) -glabel L800EC2BC -/* B6345C 800EC2BC 0C03A752 */ jal Audio_M64ReadU8 -/* B63460 800EC2C0 02202025 */ move $a0, $s1 -/* B63464 800EC2C4 822F0019 */ lb $t7, 0x19($s1) -/* B63468 800EC2C8 01E2C023 */ subu $t8, $t7, $v0 -/* B6346C 800EC2CC 1000FEE6 */ b .L800EBE68 -/* B63470 800EC2D0 A2380019 */ sb $t8, 0x19($s1) -glabel L800EC2D4 -/* B63474 800EC2D4 0C03A752 */ jal Audio_M64ReadU8 -/* B63478 800EC2D8 02202025 */ move $a0, $s1 -/* B6347C 800EC2DC 305000FF */ andi $s0, $v0, 0xff -/* B63480 800EC2E0 0C03A757 */ jal Audio_M64ReadS16 -/* B63484 800EC2E4 02202025 */ move $a0, $s1 -/* B63488 800EC2E8 8E590018 */ lw $t9, 0x18($s2) -/* B6348C 800EC2EC 92280019 */ lbu $t0, 0x19($s1) -/* B63490 800EC2F0 304AFFFF */ andi $t2, $v0, 0xffff -/* B63494 800EC2F4 032A2821 */ addu $a1, $t9, $t2 -/* B63498 800EC2F8 01104821 */ addu $t1, $t0, $s0 -/* B6349C 800EC2FC 1000FEDA */ b .L800EBE68 -/* B634A0 800EC300 A0A90000 */ sb $t1, ($a1) -glabel L800EC304 -/* B634A4 800EC304 924B0000 */ lbu $t3, ($s2) -/* B634A8 800EC308 356E0002 */ ori $t6, $t3, 2 -/* B634AC 800EC30C 1000008F */ b .L800EC54C -/* B634B0 800EC310 A24E0000 */ sb $t6, ($s2) -glabel L800EC314 -/* B634B4 800EC314 0C03A757 */ jal Audio_M64ReadS16 -/* B634B8 800EC318 02202025 */ move $a0, $s1 -/* B634BC 800EC31C 304DFFFF */ andi $t5, $v0, 0xffff -/* B634C0 800EC320 1000FED1 */ b .L800EBE68 -/* B634C4 800EC324 AE4D00E0 */ sw $t5, 0xe0($s2) -glabel L800EC328 -/* B634C8 800EC328 0C03A757 */ jal Audio_M64ReadS16 -/* B634CC 800EC32C 02202025 */ move $a0, $s1 -/* B634D0 800EC330 0C03A752 */ jal Audio_M64ReadU8 -/* B634D4 800EC334 02202025 */ move $a0, $s1 -/* B634D8 800EC338 1000FECB */ b .L800EBE68 -/* B634DC 800EC33C 00000000 */ nop -glabel L800EC340 -/* B634E0 800EC340 0C03A752 */ jal Audio_M64ReadU8 -/* B634E4 800EC344 02202025 */ move $a0, $s1 -/* B634E8 800EC348 240100FF */ li $at, 255 -/* B634EC 800EC34C 14410002 */ bne $v0, $at, .L800EC358 -/* B634F0 800EC350 305000FF */ andi $s0, $v0, 0xff -/* B634F4 800EC354 92500007 */ lbu $s0, 7($s2) -.L800EC358: -/* B634F8 800EC358 0C03A752 */ jal Audio_M64ReadU8 -/* B634FC 800EC35C 02202025 */ move $a0, $s1 -/* B63500 800EC360 02002025 */ move $a0, $s0 -/* B63504 800EC364 00402825 */ move $a1, $v0 -/* B63508 800EC368 00003025 */ move $a2, $zero -/* B6350C 800EC36C 0C038835 */ jal func_800E20D4 -/* B63510 800EC370 AFB0002C */ sw $s0, 0x2c($sp) -/* B63514 800EC374 8FA4002C */ lw $a0, 0x2c($sp) -/* B63518 800EC378 924F0007 */ lbu $t7, 7($s2) -/* B6351C 800EC37C 15E4FEBA */ bne $t7, $a0, .L800EBE68 -/* B63520 800EC380 00000000 */ nop -/* B63524 800EC384 10000072 */ b .L800EC550 -/* B63528 800EC388 8FBF0024 */ lw $ra, 0x24($sp) -.L800EC38C: -/* B6352C 800EC38C 3064000F */ andi $a0, $v1, 0xf -/* B63530 800EC390 1840000A */ blez $v0, .L800EC3BC -/* B63534 800EC394 A3A40066 */ sb $a0, 0x66($sp) -/* B63538 800EC398 2458FFC0 */ addiu $t8, $v0, -0x40 -/* B6353C 800EC39C 2F010071 */ sltiu $at, $t8, 0x71 -/* B63540 800EC3A0 1020FEB1 */ beqz $at, .L800EBE68 -/* B63544 800EC3A4 0018C080 */ sll $t8, $t8, 2 -/* B63548 800EC3A8 3C018015 */ lui $at, %hi(jtbl_80149A9C) -/* B6354C 800EC3AC 00380821 */ addu $at, $at, $t8 -/* B63550 800EC3B0 8C389A9C */ lw $t8, %lo(jtbl_80149A9C)($at) -/* B63554 800EC3B4 03000008 */ jr $t8 -/* B63558 800EC3B8 00000000 */ nop -.L800EC3BC: -/* B6355C 800EC3BC 1440FEAA */ bnez $v0, .L800EBE68 -/* B63560 800EC3C0 309900FF */ andi $t9, $a0, 0xff -/* B63564 800EC3C4 00195080 */ sll $t2, $t9, 2 -/* B63568 800EC3C8 024A4021 */ addu $t0, $s2, $t2 -/* B6356C 800EC3CC 8D090038 */ lw $t1, 0x38($t0) -/* B63570 800EC3D0 8D2C0000 */ lw $t4, ($t1) -/* B63574 800EC3D4 000C5FC2 */ srl $t3, $t4, 0x1f -/* B63578 800EC3D8 396E0001 */ xori $t6, $t3, 1 -/* B6357C 800EC3DC 1000FEA2 */ b .L800EBE68 -/* B63580 800EC3E0 A22E0019 */ sb $t6, 0x19($s1) -glabel L800EC3E4 -/* B63584 800EC3E4 308F00FF */ andi $t7, $a0, 0xff -/* B63588 800EC3E8 024FC021 */ addu $t8, $s2, $t7 -/* B6358C 800EC3EC 83190158 */ lb $t9, 0x158($t8) -/* B63590 800EC3F0 822D0019 */ lb $t5, 0x19($s1) -/* B63594 800EC3F4 01B95023 */ subu $t2, $t5, $t9 -/* B63598 800EC3F8 1000FE9B */ b .L800EBE68 -/* B6359C 800EC3FC A22A0019 */ sb $t2, 0x19($s1) -glabel L800EC400 -/* B635A0 800EC400 82280019 */ lb $t0, 0x19($s1) -/* B635A4 800EC404 308900FF */ andi $t1, $a0, 0xff -/* B635A8 800EC408 02496021 */ addu $t4, $s2, $t1 -/* B635AC 800EC40C 1000FE96 */ b .L800EBE68 -glabel L800EC410 -/* B635B0 800EC410 A1880158 */ sb $t0, 0x158($t4) -glabel L800EC414 -/* B635B4 800EC414 308200FF */ andi $v0, $a0, 0xff -/* B635B8 800EC418 02421821 */ addu $v1, $s2, $v0 -/* B635BC 800EC41C 806B0158 */ lb $t3, 0x158($v1) -/* B635C0 800EC420 28410002 */ slti $at, $v0, 2 -/* B635C4 800EC424 1020FE90 */ beqz $at, .L800EBE68 -/* B635C8 800EC428 A22B0019 */ sb $t3, 0x19($s1) -/* B635CC 800EC42C 240EFFFF */ li $t6, -1 -/* B635D0 800EC430 1000FE8D */ b .L800EBE68 -/* B635D4 800EC434 A06E0158 */ sb $t6, 0x158($v1) -glabel L800EC438 -/* B635D8 800EC438 3218000F */ andi $t8, $s0, 0xf -/* B635DC 800EC43C 00186880 */ sll $t5, $t8, 2 -/* B635E0 800EC440 024DC821 */ addu $t9, $s2, $t5 -/* B635E4 800EC444 0C03A632 */ jal Audio_SequenceChannelDisable -/* B635E8 800EC448 8F240038 */ lw $a0, 0x38($t9) -/* B635EC 800EC44C 1000FE86 */ b .L800EBE68 -/* B635F0 800EC450 00000000 */ nop -glabel L800EC454 -/* B635F4 800EC454 0C03A757 */ jal Audio_M64ReadS16 -/* B635F8 800EC458 02202025 */ move $a0, $s1 -/* B635FC 800EC45C 8E4A0018 */ lw $t2, 0x18($s2) -/* B63600 800EC460 02002825 */ move $a1, $s0 -/* B63604 800EC464 3049FFFF */ andi $t1, $v0, 0xffff -/* B63608 800EC468 30A5000F */ andi $a1, $a1, 0xf -/* B6360C 800EC46C 02402025 */ move $a0, $s2 -/* B63610 800EC470 0C03A6AB */ jal Audio_SequenceChannelEnable -/* B63614 800EC474 01493021 */ addu $a2, $t2, $t1 -/* B63618 800EC478 1000FE7B */ b .L800EBE68 -/* B6361C 800EC47C 00000000 */ nop -glabel L800EC480 -/* B63620 800EC480 0C03A757 */ jal Audio_M64ReadS16 -/* B63624 800EC484 02202025 */ move $a0, $s1 -/* B63628 800EC488 8E280000 */ lw $t0, ($s1) -/* B6362C 800EC48C 02002825 */ move $a1, $s0 -/* B63630 800EC490 30A5000F */ andi $a1, $a1, 0xf -/* B63634 800EC494 02402025 */ move $a0, $s2 -/* B63638 800EC498 0C03A6AB */ jal Audio_SequenceChannelEnable -/* B6363C 800EC49C 01023021 */ addu $a2, $t0, $v0 -/* B63640 800EC4A0 1000FE71 */ b .L800EBE68 -/* B63644 800EC4A4 00000000 */ nop -glabel L800EC4A8 -/* B63648 800EC4A8 0C03A752 */ jal Audio_M64ReadU8 -/* B6364C 800EC4AC 02202025 */ move $a0, $s1 -/* B63650 800EC4B0 305000FF */ andi $s0, $v0, 0xff -/* B63654 800EC4B4 0C03A757 */ jal Audio_M64ReadS16 -/* B63658 800EC4B8 02202025 */ move $a0, $s1 -/* B6365C 800EC4BC 93AE0066 */ lbu $t6, 0x66($sp) -/* B63660 800EC4C0 8E4C0018 */ lw $t4, 0x18($s2) -/* B63664 800EC4C4 304BFFFF */ andi $t3, $v0, 0xffff -/* B63668 800EC4C8 024E3021 */ addu $a2, $s2, $t6 -/* B6366C 800EC4CC 24C60158 */ addiu $a2, $a2, 0x158 -/* B63670 800EC4D0 02002025 */ move $a0, $s0 -/* B63674 800EC4D4 0C038E43 */ jal Audio_SyncLoadSeq -/* B63678 800EC4D8 018B2821 */ addu $a1, $t4, $t3 -/* B6367C 800EC4DC 1000FE62 */ b .L800EBE68 -/* B63680 800EC4E0 00000000 */ nop -glabel L800EC4E4 -/* B63684 800EC4E4 0C03A752 */ jal Audio_M64ReadU8 -/* B63688 800EC4E8 02202025 */ move $a0, $s1 -/* B6368C 800EC4EC 00408025 */ move $s0, $v0 -/* B63690 800EC4F0 0C03A752 */ jal Audio_M64ReadU8 -/* B63694 800EC4F4 02202025 */ move $a0, $s1 -/* B63698 800EC4F8 93AF0066 */ lbu $t7, 0x66($sp) -/* B6369C 800EC4FC 02002025 */ move $a0, $s0 -/* B636A0 800EC500 00402825 */ move $a1, $v0 -/* B636A4 800EC504 024F3021 */ addu $a2, $s2, $t7 -/* B636A8 800EC508 0C0393BB */ jal func_800E4EEC -/* B636AC 800EC50C 24C60158 */ addiu $a2, $a2, 0x158 -/* B636B0 800EC510 1000FE55 */ b .L800EBE68 -/* B636B4 800EC514 00000000 */ nop -.L800EC518: -/* B636B8 800EC518 02408825 */ move $s1, $s2 -.L800EC51C: -/* B636BC 800EC51C 24120040 */ li $s2, 64 -/* B636C0 800EC520 00008025 */ move $s0, $zero -.L800EC524: -/* B636C4 800EC524 8E240038 */ lw $a0, 0x38($s1) -/* B636C8 800EC528 8C980000 */ lw $t8, ($a0) -/* B636CC 800EC52C 00186FC2 */ srl $t5, $t8, 0x1f -/* B636D0 800EC530 51A00004 */ beql $t5, $zero, .L800EC544 -/* B636D4 800EC534 26100004 */ addiu $s0, $s0, 4 -/* B636D8 800EC538 0C03AC1A */ jal Audio_SequenceChannelProcessScript -/* B636DC 800EC53C 00000000 */ nop -/* B636E0 800EC540 26100004 */ addiu $s0, $s0, 4 -.L800EC544: -/* B636E4 800EC544 1612FFF7 */ bne $s0, $s2, .L800EC524 -/* B636E8 800EC548 26310004 */ addiu $s1, $s1, 4 -.L800EC54C: -/* B636EC 800EC54C 8FBF0024 */ lw $ra, 0x24($sp) -.L800EC550: -/* B636F0 800EC550 8FB00018 */ lw $s0, 0x18($sp) -/* B636F4 800EC554 8FB1001C */ lw $s1, 0x1c($sp) -/* B636F8 800EC558 8FB20020 */ lw $s2, 0x20($sp) -/* B636FC 800EC55C 03E00008 */ jr $ra -/* B63700 800EC560 27BD0068 */ addiu $sp, $sp, 0x68 - diff --git a/src/code/audio_seqplayer.c b/src/code/audio_seqplayer.c index d7b09e5f54..c4940a6b6a 100644 --- a/src/code/audio_seqplayer.c +++ b/src/code/audio_seqplayer.c @@ -956,19 +956,17 @@ void Audio_SequenceChannelSetVolume(SequenceChannel* seqChannel, u8 volume) { seqChannel->volume = (f32)(s32)volume / 127.0f; } -#ifdef NON_MATCHING -// Two reg category errors and lots of t register shifting. void Audio_SequenceChannelProcessScript(SequenceChannel* channel) { s32 i; u8* data; u8* test; - SequencePlayer* player; + SequencePlayer* seqPlayer; if (channel->stopScript) { goto exit_loop; } - player = channel->seqPlayer; - if (player->muted && (channel->muteBehavior & 0x80)) { + seqPlayer = channel->seqPlayer; + if (seqPlayer->muted && (channel->muteBehavior & 0x80)) { return; } @@ -982,7 +980,7 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) { s32 param; s16 pad1; u16 offset; - s32 parameters[3]; + u32 parameters[3]; s8 signedParam; u8 command = Audio_M64ReadU8(scriptState); u8 lowBits; @@ -1002,7 +1000,7 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) { } } if (command >= 0xF2) { - result = Audio_HandleScriptFlowControl(player, scriptState, command, parameters[0]); + result = Audio_HandleScriptFlowControl(seqPlayer, scriptState, command, parameters[0]); if (result != 0) { if (result == -1) { @@ -1027,7 +1025,7 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) { break; case 0xC2: offset = (u16)parameters[0]; - channel->dynTable = (void*)&player->seqData[offset]; + channel->dynTable = (void*)&seqPlayer->seqData[offset]; break; case 0xC5: if (scriptState->value != -1) { @@ -1035,15 +1033,15 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) { data = (*channel->dynTable)[scriptState->value]; offset = (u16)((data[0] << 8) + data[1]); - channel->dynTable = (void*)&player->seqData[offset]; + channel->dynTable = (void*)&seqPlayer->seqData[offset]; } break; case 0xEB: - result = (u8)parameters[0]; // category error: should be t not v - command = result; + result = (u8)parameters[0]; + command = (u8)parameters[0]; - if (player->defaultBank != 0xFF) { - offset = ((u16*)gAudioContext.unk_283C)[player->seqId]; + if (seqPlayer->defaultBank != 0xFF) { + offset = ((u16*)gAudioContext.unk_283C)[seqPlayer->seqId]; lowBits = gAudioContext.unk_283Cb[offset]; command = gAudioContext.unk_283Cb[offset + lowBits - result]; } @@ -1107,7 +1105,7 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) { break; case 0xDA: offset = (u16)parameters[0]; - channel->adsr.envelope = (AdsrEnvelope*)&player->seqData[offset]; + channel->adsr.envelope = (AdsrEnvelope*)&seqPlayer->seqData[offset]; break; case 0xD9: command = (u8)parameters[0]; @@ -1150,11 +1148,11 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) { channel->reverb = command; break; case 0xC6: - result = (u8)parameters[0]; // category error: should be t not v - command = result; + result = (u8)parameters[0]; + command = (u8)parameters[0]; - if (player->defaultBank != 0xFF) { - offset = ((u16*)gAudioContext.unk_283C)[player->seqId]; + if (seqPlayer->defaultBank != 0xFF) { + offset = ((u16*)gAudioContext.unk_283C)[seqPlayer->seqId]; lowBits = gAudioContext.unk_283Cb[offset]; command = gAudioContext.unk_283Cb[offset + lowBits - result]; } @@ -1167,7 +1165,7 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) { case 0xC7: command = (u8)parameters[0]; offset = (u16)parameters[1]; - test = &player->seqData[offset]; + test = &seqPlayer->seqData[offset]; test[0] = (u8)scriptState->value + command; break; case 0xC8: @@ -1185,7 +1183,7 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) { break; case 0xCD: command = (u8)parameters[0]; - Audio_SequenceChannelDisable(player->channels[command]); + Audio_SequenceChannelDisable(seqPlayer->channels[command]); break; case 0xCA: command = (u8)parameters[0]; @@ -1195,7 +1193,7 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) { case 0xCB: offset = (u16)parameters[0]; - scriptState->value = *(offset + scriptState->value + player->seqData); + scriptState->value = *(seqPlayer->seqData + (u32)(offset + scriptState->value)); break; case 0xCE: offset = (u16)parameters[0]; @@ -1203,7 +1201,7 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) { break; case 0xCF: offset = (u16)parameters[0]; - test = &player->seqData[offset]; + test = &seqPlayer->seqData[offset]; test[0] = (channel->unk_22 >> 8) & 0xFF; test[1] = channel->unk_22 & 0xFF; break; @@ -1234,7 +1232,7 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) { //! @bug: Missing a stack depth check here scriptState->stack[scriptState->depth++] = scriptState->pc; offset = (u16)((data[0] << 8) + data[1]); - scriptState->pc = player->seqData + offset; + scriptState->pc = seqPlayer->seqData + offset; } break; case 0xE6: @@ -1243,7 +1241,7 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) { break; case 0xE7: offset = (u16)parameters[0]; - data = &player->seqData[offset]; + data = &seqPlayer->seqData[offset]; channel->muteBehavior = data[0]; data += 3; channel->noteAllocPolicy = data[-2]; @@ -1296,7 +1294,7 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) { break; case 0xB0: offset = (u16)parameters[0]; - data = player->seqData + offset; + data = seqPlayer->seqData + offset; channel->unk_CC = (s16*)data; break; case 0xB1: @@ -1313,29 +1311,28 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) { break; case 0xB2: offset = (u16)parameters[0]; - channel->unk_22 = *(u16*)(offset + scriptState->value * 2 + player->seqData); + channel->unk_22 = *(u16*)(seqPlayer->seqData + (u32)(offset + scriptState->value * 2)); break; case 0xB4: - channel->dynTable = (void*)&player->seqData[channel->unk_22]; + channel->dynTable = (void*)&seqPlayer->seqData[channel->unk_22]; break; case 0xB5: channel->unk_22 = ((u16*)(channel->dynTable))[scriptState->value]; break; case 0xB6: - data = (*channel->dynTable)[0]; scriptState->value = (*channel->dynTable)[0][scriptState->value]; break; case 0xB7: - channel->unk_22 = (parameters[0] == 0) ? gAudioContext.audioRandom // odd load here + channel->unk_22 = (parameters[0] == 0) ? gAudioContext.audioRandom & 0xFFFF : gAudioContext.audioRandom % parameters[0]; break; case 0xB8: - scriptState->value = (parameters[0] == 0) ? gAudioContext.audioRandom + scriptState->value = (parameters[0] == 0) ? gAudioContext.audioRandom & 0xFFFF : gAudioContext.audioRandom % parameters[0]; break; case 0xBD: { result = Audio_NextRandom(); - channel->unk_22 = (parameters[0] == 0) ? (u32)result : (u32)result % parameters[0]; + channel->unk_22 = (parameters[0] == 0) ? (u32)result & 0xFFFF : (u32)result % parameters[0]; channel->unk_22 += parameters[1]; pad2 = (channel->unk_22 / 0x100) + 0x80; // i is wrong here param = channel->unk_22 % 0x100; @@ -1374,7 +1371,7 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) { case 0x88: offset = Audio_M64ReadS16(scriptState); if (!Audio_SeqChannelSetLayer(channel, lowBits)) { - channel->layers[lowBits]->scriptState.pc = &player->seqData[offset]; + channel->layers[lowBits]->scriptState.pc = &seqPlayer->seqData[offset]; } break; case 0x90: @@ -1387,7 +1384,7 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) { data = (*channel->dynTable)[scriptState->value]; offset = (data[0] << 8) + data[1]; - channel->layers[lowBits]->scriptState.pc = &player->seqData[offset]; + channel->layers[lowBits]->scriptState.pc = &seqPlayer->seqData[offset]; break; case 0x70: channel->soundScriptIO[lowBits] = scriptState->value; @@ -1434,15 +1431,15 @@ void Audio_SequenceChannelProcessScript(SequenceChannel* channel) { break; case 0x20: offset = Audio_M64ReadS16(scriptState); - Audio_SequenceChannelEnable(player, lowBits, &player->seqData[offset]); + Audio_SequenceChannelEnable(seqPlayer, lowBits, &seqPlayer->seqData[offset]); break; case 0x30: command = Audio_M64ReadU8(scriptState); - player->channels[lowBits]->soundScriptIO[command] = scriptState->value; + seqPlayer->channels[lowBits]->soundScriptIO[command] = scriptState->value; break; case 0x40: command = Audio_M64ReadU8(scriptState); - scriptState->value = player->channels[lowBits]->soundScriptIO[command]; + scriptState->value = seqPlayer->channels[lowBits]->soundScriptIO[command]; break; } } @@ -1455,25 +1452,18 @@ exit_loop: } } } -#else -void Audio_SequenceChannelProcessScript(SequenceChannel* seqChannel); -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/Audio_SequenceChannelProcessScript.s") -#endif -#ifdef NON_MATCHING -// Regalloc. The large number of pads suggests cases may have their own temp variables. void Audio_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) { u8 command; u8 commandLow; - u16 offset; M64ScriptState* seqScript = &seqPlayer->scriptState; s16 tempS; u16 temp; s32 i; s32 value; u8* data; - s32 pad1; - s32 pad2; + u8* data2; + u8* data3; s32 pad3; s32 dummy; @@ -1627,11 +1617,11 @@ void Audio_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) { case 0xD1: case 0xD2: temp = Audio_M64ReadS16(seqScript); - data = &seqPlayer->seqData[temp]; + data3 = &seqPlayer->seqData[temp]; if (command == 0xD2) { - seqPlayer->shortNoteVelocityTable = data; + seqPlayer->shortNoteVelocityTable = data3; } else { - seqPlayer->shortNoteDurationTable = data; + seqPlayer->shortNoteDurationTable = data3; } break; case 0xD0: @@ -1646,11 +1636,10 @@ void Audio_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) { } break; case 0xCD: { - offset = Audio_M64ReadS16(seqScript); + temp = Audio_M64ReadS16(seqScript); if ((seqScript->value != -1) && (seqScript->depth != 3)) { - // a/v registers are wrong here. may need to mess with temps - data = seqPlayer->seqData + (u32)(offset + seqScript->value * 2); + data = seqPlayer->seqData + (u32)(temp + (seqScript->value << 1)); seqScript->stack[seqScript->depth] = seqScript->pc; seqScript->depth++; @@ -1671,8 +1660,8 @@ void Audio_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) { case 0xC7: command = Audio_M64ReadU8(seqScript); temp = Audio_M64ReadS16(seqScript); - data = &seqPlayer->seqData[temp]; - *data = (u8)seqScript->value + command; + data2 = &seqPlayer->seqData[temp]; + *data2 = (u8)seqScript->value + command; break; case 0xC6: seqPlayer->unk_0b2 = true; @@ -1729,7 +1718,8 @@ void Audio_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) { case 0xB0: command = Audio_M64ReadU8(seqScript); temp = Audio_M64ReadS16(seqScript); - Audio_SyncLoadSeq(command, &seqPlayer->seqData[temp], &seqPlayer->unk_158[commandLow]); + data2 = &seqPlayer->seqData[temp]; + Audio_SyncLoadSeq(command, data2, &seqPlayer->unk_158[commandLow]); break; case 0x60: { command = Audio_M64ReadU8(seqScript); @@ -1750,10 +1740,6 @@ void Audio_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) { } } } -#else -void Audio_SequencePlayerProcessSequence(SequencePlayer* seqPlayer); -#pragma GLOBAL_ASM("asm/non_matchings/code/audio_seqplayer/Audio_SequencePlayerProcessSequence.s") -#endif void Audio_ProcessSequences(s32 arg0) { SequencePlayer* seqPlayer;