mk64/src/audio/seqplayer.c

2052 lines
75 KiB
C

#include <ultra64.h>
#include <macros.h>
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_800BD318(void *, void *, s32); // extern
void func_800BE8F0(void *arg0) {
s32 temp_a0;
u8 temp_t0;
u8 temp_t2;
u8 temp_t4;
u8 temp_t6;
u8 temp_t8;
u8 temp_t8_2;
void *temp_v1;
void *phi_v1;
s32 phi_a0;
temp_t8 = arg0->unk0 & 0xFF7F;
temp_t0 = temp_t8 & 0xBF;
arg0->unk0 = temp_t8;
temp_t2 = temp_t0 & 0xDF;
arg0->unk0 = temp_t0;
temp_t4 = temp_t2 & 0xEF;
arg0->unk0 = temp_t2;
temp_t6 = temp_t4 & 0xF7;
arg0->unk0 = temp_t4;
temp_t8_2 = temp_t6 & 0xFB;
arg0->unk0 = temp_t6;
arg0->unk0 = temp_t8_2;
arg0->unk10 = 0x800;
arg0->unkC = 0x800;
arg0->unk1E = 0;
arg0->unk0 = temp_t8_2 & 0xFD;
arg0->unk8 = 0;
arg0->unk1 = 0xFF;
arg0->unk78 = 0;
arg0->unk9 = 0x40;
arg0->unkA = 0x80;
arg0->unk38 = 0;
arg0->unk7 = 0;
arg0->unk4 = 0;
arg0->unk5 = 3;
arg0->unk1A = 0;
arg0->unk80 = gDefaultEnvelope;
arg0->unk7C = 0x20;
arg0->unk7D = 0;
arg0->unk12 = 0;
arg0->unkE = 0;
arg0->unk14 = 0;
arg0->unk16 = 0;
arg0->unk18 = 0;
arg0->unk24 = 1.0f;
arg0->unk20 = 1.0f;
arg0->unk30 = 1.0f;
phi_v1 = arg0;
phi_a0 = 0;
do {
temp_a0 = phi_a0 + 4;
phi_v1->unk59 = -1;
phi_v1->unk5A = -1;
phi_v1->unk5B = -1;
temp_v1 = phi_v1 + 4;
temp_v1->unk54 = -1;
phi_v1 = temp_v1;
phi_a0 = temp_a0;
} while (temp_a0 != 8);
arg0->unk0 = arg0->unk0 & 0xFFFE;
func_800BD318(arg0 + 0x84, arg0, 8);
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BE8F0.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_800BD120(s32, void *, s32); // extern
s32 func_800BF044(? *, void *, s32); // extern
extern ? D_803B5FB8;
? func_800BEA10(void *arg0, s32 arg1) {
void *sp1C;
s32 temp_a3;
s32 temp_t7;
s32 temp_v0;
u8 temp_t0;
u8 temp_t1;
u8 temp_t5;
u8 temp_t7_2;
void *temp_a2;
void *temp_v1;
temp_t7 = arg1 * 4;
temp_a2 = arg0 + temp_t7;
temp_a3 = temp_a2->unk48;
if (temp_a3 == 0) {
sp1C = temp_a2;
temp_v0 = func_800BF044(&D_803B5FB8, temp_a2, temp_a3);
temp_a2->unk48 = temp_v0;
if (temp_v0 == 0) {
temp_a2->unk48 = 0;
return -1;
}
goto block_4;
}
sp1C = temp_a2;
func_800BD120(temp_a3, temp_a2, temp_a3);
block_4:
temp_v1 = (arg0 + temp_t7)->unk48;
temp_v1->unk4C = arg0;
temp_t5 = temp_v1->unk0 | 0x80;
temp_t7_2 = temp_t5 & 0xDF;
temp_t0 = temp_t7_2 & 0xEF;
temp_v1->unk18 = arg0->unk7C;
temp_v1->unk0 = temp_t5;
temp_v1->unk1C = arg0->unk80;
temp_t1 = temp_t0 & 0xBF;
temp_v1->unk0 = temp_t7_2;
temp_v1->unk0 = temp_t0;
temp_v1->unk0 = temp_t1;
temp_v1->unk18 = 0;
temp_v1->unk0 = temp_t1 & 0xFD;
temp_v1->unk8 = 0;
temp_v1->unk68 = 0;
temp_v1->unk2 = 0;
temp_v1->unk3 = 0x80;
temp_v1->unk5 = 0x40;
temp_v1->unk22 = 0;
temp_v1->unk38 = 0;
temp_v1->unk3A = 0;
temp_v1->unk3C = 0;
temp_v1->unk40 = 0;
temp_v1->unk44 = 0;
temp_v1->unk1 = 0xFF;
temp_v1->unk28 = 0.0f;
temp_v1->unk24 = 1.0f;
return 0;
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BEA10.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_800BD120(); // extern
void func_800BEB18(u8 *arg0) {
u8 temp_t0;
u8 temp_t9;
if (arg0 != 0) {
func_800BD120();
temp_t9 = *arg0 & 0xFF7F;
temp_t0 = temp_t9 | 0x40;
*arg0 = temp_t9;
*arg0 = temp_t0;
}
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BEB18.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_800BEB18(s32); // extern
void func_800BF004(? *, s32, s32); // extern
extern ? D_803B5FB8;
void func_800BEB54(s32 arg0, s32 arg1) {
s32 sp1C;
void *sp18;
s32 temp_a2;
void *temp_v0;
temp_v0 = arg0 + (arg1 * 4);
temp_a2 = temp_v0->unk48;
if (temp_a2 != 0) {
sp18 = temp_v0;
sp1C = temp_a2;
func_800BF004(&D_803B5FB8, temp_a2 + 0x6C, temp_a2);
func_800BEB18(sp1C);
temp_v0->unk48 = 0;
}
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BEB54.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_800BD418(s32); // extern
void func_800BEB54(u8 *, s32); // extern
void func_800BEBA4(u8 *arg0) {
s32 temp_s0;
u8 temp_t9;
s32 phi_s0;
phi_s0 = 0;
do {
func_800BEB54(arg0, phi_s0);
temp_s0 = phi_s0 + 1;
phi_s0 = temp_s0;
} while (temp_s0 != 4);
func_800BD418(arg0 + 0x84);
temp_t9 = *arg0 & 0xFF7F;
*arg0 = temp_t9;
*arg0 = temp_t9 | 0x40;
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BEBA4.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
extern ? D_803B1A30;
extern u8 D_803B3EF0;
extern ? D_803B5EF0;
? *func_800BEC10(void) {
? *temp_v1;
? *phi_v1;
phi_v1 = &D_803B1A30;
loop_1:
if (phi_v1->unk44 == 0) {
return phi_v1;
}
if (phi_v1->unk108 == 0) {
return phi_v1 + 0xC4;
}
if (phi_v1->unk1CC == 0) {
return phi_v1 + 0x188;
}
if (phi_v1->unk290 == 0) {
return phi_v1 + 0x24C;
}
temp_v1 = phi_v1 + 0x310;
phi_v1 = temp_v1;
if (temp_v1 == &D_803B3EF0) {
return &D_803B5EF0;
}
goto loop_1;
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BEC10.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_800BE8F0(s32); // extern
void func_800BEBA4(s32, s32); // extern
s32 func_800BEC10(); // extern
extern ? D_803B5EF0;
extern s32 D_803B7198;
void func_800BEC8C(void *arg0, s32 arg1) {
s32 temp_s0;
s32 temp_s3;
s32 temp_v0;
void *temp_s2;
s32 phi_a1;
s32 phi_s3;
phi_a1 = arg1 & 0xFFFF;
phi_s3 = 0;
do {
if ((phi_a1 & 1) != 0) {
temp_s2 = arg0 + (phi_s3 * 4);
temp_s0 = temp_s2->unk30;
if (((temp_s0 != &D_803B5EF0) == 1) && (arg0 == temp_s0->unk44)) {
func_800BEBA4(temp_s0, phi_a1);
temp_s0->unk44 = 0;
}
temp_v0 = func_800BEC10();
if (temp_v0 == &D_803B5EF0) {
D_803B7198 = phi_s3 + 0x10000;
temp_s2->unk30 = temp_v0;
} else {
func_800BE8F0(temp_v0);
temp_s2->unk30 = temp_v0;
temp_v0->unk44 = arg0;
temp_v0->unk6 = arg0->unk5;
temp_v0->unk3 = arg0->unk3;
temp_v0->unk2 = arg0->unk2;
}
}
temp_s3 = phi_s3 + 1;
phi_a1 = (phi_a1 >> 1) & 0xFFFF;
phi_s3 = temp_s3;
} while (temp_s3 != 0x10);
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BEC8C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_800BEBA4(s32, s32); // extern
extern ? D_803B5EF0;
void func_800BEDB8(s32 arg0, s32 arg1) {
s32 temp_s0;
s32 temp_s1;
void *temp_s3;
s32 phi_a1;
s32 phi_s1;
phi_a1 = arg1 & 0xFFFF;
phi_s1 = 0;
do {
if ((phi_a1 & 1) != 0) {
temp_s3 = arg0 + (phi_s1 * 4);
temp_s0 = temp_s3->unk30;
if ((temp_s0 != &D_803B5EF0) == 1) {
if (arg0 == temp_s0->unk44) {
func_800BEBA4(temp_s0, phi_a1);
temp_s0->unk44 = 0;
}
temp_s3->unk30 = &D_803B5EF0;
}
}
temp_s1 = phi_s1 + 1;
phi_a1 = (phi_a1 >> 1) & 0xFFFF;
phi_s1 = temp_s1;
} while (temp_s1 != 0x10);
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BEDB8.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_800BEB54(void *, s32); // extern
extern ? D_803B5EF0;
void func_800BEE88(s32 arg0, s32 arg1, s32 arg2) {
s32 temp_s0;
u8 temp_t4;
void *temp_s2;
void *phi_s1;
s32 phi_s0;
temp_s2 = (arg0 + ((arg1 & 0xFF) * 4))->unk30;
phi_s0 = 0;
if (temp_s2 != &D_803B5EF0) {
temp_s2->unk78 = 0;
temp_s2->unk60 = arg2;
temp_t4 = temp_s2->unk0 | 0x80;
temp_s2->unk0 = temp_t4;
temp_s2->unk0 = temp_t4 & 0xBF;
temp_s2->unk1A = 0;
phi_s1 = temp_s2;
do {
if (phi_s1->unk48 != 0) {
func_800BEB54(temp_s2, phi_s0);
}
temp_s0 = phi_s0 + 1;
phi_s1 += 4;
phi_s0 = temp_s0;
} while (temp_s0 != 4);
}
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BEE88.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_800BD418(s32); // extern
void func_800BEDB8(?); // extern
extern u32 D_803AFE18;
extern u8 D_803B03C0;
extern ? D_803B0400;
void func_800BEF2C(void *arg0) {
u8 *temp_v0;
u8 *temp_v1_2;
u8 temp_a0;
u8 temp_t0;
u8 temp_t9;
u8 temp_v1;
func_800BEDB8(0xFFFF);
func_800BD418(arg0 + 0x94);
temp_t9 = arg0->unk0 | 0x40;
temp_t0 = temp_t9 & 0x7F;
arg0->unk0 = temp_t9;
arg0->unk0 = temp_t0;
temp_v0 = arg0->unk4 + &D_803B0400;
temp_v1 = *temp_v0;
if ((temp_v1 >= 2) && (temp_v1 != 5)) {
*temp_v0 = 3;
}
temp_v1_2 = arg0->unk5 + &D_803B03C0;
temp_a0 = *temp_v1_2;
if ((temp_a0 >= 2) && (temp_a0 != 5)) {
*temp_v1_2 = 4;
}
if (arg0->unk5 == D_803AFE18.unk1B2) {
D_803AFE18.unk194 = 1;
return;
}
if (arg0->unk5 == D_803AFE18.unk1BE) {
D_803AFE18.unk194 = 0;
}
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BEF2C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_800BF004(void *arg0, void *arg1) {
if (arg1->unk0 == 0) {
arg0->unk0->unk4 = arg1;
arg1->unk4 = arg0;
arg1->unk0 = arg0->unk0;
arg0->unk0 = arg1;
arg0->unk8 = arg0->unk8 + 1;
arg1->unkC = arg0->unkC;
}
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BF004.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
s32 func_800BF044(void *arg0) {
void *temp_v1;
temp_v1 = arg0->unk0;
if (temp_v1 == arg0) {
return 0;
}
temp_v1->unk0->unk4 = arg0;
arg0->unk0 = temp_v1->unk0;
temp_v1->unk0 = NULL;
arg0->unk8 = arg0->unk8 - 1;
return temp_v1->unk8;
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BF044.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_800BF004(? *, ? *); // extern
extern u8 D_803B3EF0;
extern ? D_803B3F5C;
extern ? D_803B5F5C;
extern ? D_803B5FB8;
void func_800BF084(void) {
? *temp_s1;
? *phi_s0;
? *phi_s1;
D_803B5FB8.unk0 = &D_803B5FB8;
D_803B5FB8.unk4 = &D_803B5FB8;
D_803B5FB8.unk8 = 0;
D_803B5FB8.unkC = 0;
phi_s0 = &D_803B3EF0;
phi_s1 = &D_803B3F5C;
do {
phi_s0->unk74 = phi_s0;
phi_s0->unk6C = 0;
func_800BF004(&D_803B5FB8, phi_s1);
temp_s1 = phi_s1 + 0x80;
phi_s0 += 0x80;
phi_s1 = temp_s1;
} while (temp_s1 != &D_803B5F5C);
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BF084.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
u8 func_800BF108(u8 **arg0) {
u8 *temp_a1;
u8 temp_v0;
temp_a1 = *arg0;
temp_v0 = *temp_a1;
*arg0 = temp_a1 + 1;
return temp_v0;
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BF108.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
s16 func_800BF11C(u8 **arg0) {
u8 *temp_a1;
u8 *temp_t9;
u8 temp_v1;
temp_a1 = *arg0;
temp_v1 = *temp_a1;
temp_t9 = temp_a1 + 1;
*arg0 = temp_t9;
*arg0 = temp_t9 + 1;
return *temp_t9 | (temp_v1 << 8);
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BF11C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
u8 func_800BF14C(u8 **arg0) {
u8 *temp_t6;
u8 *temp_v0;
u8 temp_v1;
u8 phi_v1;
temp_v0 = *arg0;
temp_v1 = *temp_v0;
temp_t6 = temp_v0 + 1;
*arg0 = temp_t6;
phi_v1 = temp_v1;
if ((temp_v1 & 0x80) != 0) {
*arg0 = temp_t6 + 1;
phi_v1 = (*temp_t6 | ((temp_v1 << 8) & 0x7F00)) & 0xFFFF;
}
return phi_v1;
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BF14C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
void func_800BD120(void *, s32); /* extern */
void func_800BD264(void *, void *); /* extern */
void func_800BE4D4(void *); /* extern */
void func_800BEB18(void *, s32); /* extern */
void func_800BF190(void *arg0) {
void *sp68;
s32 sp44;
f32 temp_f0;
f32 temp_f2;
s16 temp_a0_3;
s16 temp_a0_4;
s16 temp_s3;
s16 temp_s3_2;
s16 temp_s3_3;
s16 temp_s3_4;
s16 temp_s3_6;
s16 temp_v0_10;
s16 temp_v0_12;
s16 temp_v0_13;
s16 temp_v0_7;
s16 temp_v1;
s32 temp_a1;
s32 temp_s2;
s32 temp_t4_2;
s32 temp_t5;
s32 temp_t6;
s32 temp_t8;
s32 temp_v0_11;
s32 temp_v0_17;
s32 temp_v0_19;
s32 temp_v0_3;
s32 temp_v0_4;
s32 temp_v0_6;
s32 temp_v0_8;
s32 temp_v1_12;
s32 temp_v1_6;
s32 temp_v1_7;
s32 temp_v1_8;
u16 temp_v0_14;
u32 temp_v0;
u32 temp_v0_20;
u8 *temp_t2;
u8 *temp_t6_2;
u8 *temp_v1_10;
u8 *temp_v1_11;
u8 *temp_v1_4;
u8 *temp_v1_5;
u8 *temp_v1_9;
u8 temp_a0;
u8 temp_a0_2;
u8 temp_a0_5;
u8 temp_a2;
u8 temp_a2_2;
u8 temp_a2_3;
u8 temp_s3_5;
u8 temp_t4;
u8 temp_v0_16;
u8 temp_v0_9;
u8 temp_v1_2;
u8 temp_v1_3;
void *temp_a0_6;
void *temp_a0_7;
void *temp_s0;
void *temp_s4;
void *temp_v0_15;
void *temp_v0_18;
void *temp_v0_2;
void *temp_v0_5;
void *temp_v1_13;
u8 phi_s2;
s32 phi_a2;
s32 phi_a2_2;
s16 phi_a0;
u8 phi_v0;
s32 phi_s2_2;
s32 phi_a0_2;
s32 phi_a2_3;
f32 phi_f0;
f32 phi_f0_2;
f32 phi_f4;
s32 phi_s2_3;
s16 phi_s3;
s16 phi_s3_2;
sp44 = 1;
temp_v0 = arg0->unk0;
if ((temp_v0 >> 0x1F) != 0) {
temp_v1 = arg0->unk38;
if (temp_v1 >= 2) {
arg0->unk38 = temp_v1 - 1;
if (((temp_v0 * 4) >= 0) && (arg0->unk3A >= arg0->unk38)) {
func_800BD120();
arg0->unk0 = arg0->unk0 | 0x20;
return;
}
/* Duplicate return node #139. Try simplifying control flow for better match */
return;
}
if ((temp_v0 * 8) >= 0) {
func_800BD120(arg0);
}
temp_t8 = arg0->unk8 & ~0x80;
if ((temp_t8 == 1) || (temp_t8 == 2)) {
arg0->unk8 = 0;
}
temp_v0_2 = arg0->unk4C;
temp_s0 = arg0 + 0x50;
temp_s4 = temp_v0_2->unk44;
arg0->unk0 = arg0->unk0 | 4;
sp68 = temp_v0_2;
phi_s3_2 = sp4A;
loop_11:
temp_v0_3 = func_800BF108(temp_s0, MIPS2C_ERROR(Read from unset register $a1));
temp_s2 = temp_v0_3 & 0xFF;
phi_s3 = phi_s3_2;
if (temp_v0_3 >= 0xC1) {
if (temp_v0_3 >= 0xCD) {
switch (temp_v0_3) { /* switch 1 */
case 0xFF: /* switch 1 */
temp_v1_2 = temp_s0->unk18;
if (temp_v1_2 == 0) {
func_800BEB18(arg0, temp_v0_3);
return;
}
temp_t4 = (temp_v1_2 - 1) & 0xFF;
temp_s0->unk18 = temp_t4;
temp_s0->unk0 = (temp_s0 + (temp_t4 * 4))->unk4;
goto loop_11;
case 0xFC: /* switch 1 */
temp_v0_4 = func_800BF11C(temp_s0, temp_v0_3);
temp_t5 = temp_v0_4 & 0xFFFF;
(temp_s0 + (temp_s0->unk18 * 4))->unk4 = temp_s0->unk0;
temp_s0->unk18 = temp_s0->unk18 + 1;
temp_s0->unk0 = temp_s4->unk14 + temp_t5;
phi_s3_2 = temp_v0_4 & 0xFFFF;
goto loop_11;
case 0xF8: /* switch 1 */
(temp_s0 + temp_s0->unk18)->unk14 = func_800BF108(temp_s0, temp_v0_3);
(temp_s0 + (temp_s0->unk18 * 4))->unk4 = temp_s0->unk0;
temp_s0->unk18 = temp_s0->unk18 + 1;
goto loop_11;
case 0xF7: /* switch 1 */
temp_v0_5 = temp_s0 + temp_s0->unk18;
temp_v0_5->unk13 = temp_v0_5->unk13 - 1;
temp_v1_3 = temp_s0->unk18;
if ((temp_s0 + temp_v1_3)->unk13 != 0) {
temp_s0->unk0 = *(temp_s0 + (temp_v1_3 * 4));
} else {
temp_s0->unk18 = temp_v1_3 - 1;
}
goto loop_11;
case 0xFB: /* switch 1 */
temp_v0_6 = func_800BF11C(temp_s0, temp_v0_3);
temp_s3 = temp_v0_6 & 0xFFFF;
temp_s0->unk0 = temp_s4->unk14 + (temp_v0_6 & 0xFFFF);
phi_s3_2 = temp_s3;
goto loop_11;
case 0xF4: /* switch 1 */
temp_s0->unk0 = temp_s0->unk0 + func_800BF108(temp_s0, temp_v0_3);
goto loop_11;
}
} else {
switch (temp_v0_3) { /* switch 2 */
case 0xC1: /* switch 2 */
case 0xCA: /* switch 2 */
temp_v1_4 = temp_s0->unk0;
temp_a0 = *temp_v1_4;
temp_s0->unk0 = temp_v1_4 + 1;
if (temp_v0_3 == 0xC1) {
arg0->unk28 = (temp_a0 * temp_a0) / 16129.0f;
} else {
arg0->unk5 = temp_a0;
}
break;
case 0xC2: /* switch 2 */
case 0xC9: /* switch 2 */
temp_v1_5 = temp_s0->unk0;
temp_a0_2 = *temp_v1_5;
temp_s0->unk0 = temp_v1_5 + 1;
if (temp_v0_3 == 0xC9) {
arg0->unk3 = temp_a0_2;
} else {
arg0->unk22 = temp_a0_2;
}
break;
case 0xC4: /* switch 2 */
case 0xC5: /* switch 2 */
if (temp_v0_3 == 0xC4) {
arg0->unk0 = arg0->unk0 | 0x10;
} else {
arg0->unk0 = arg0->unk0 & 0xFFEF;
}
func_800BD120(arg0, temp_v0_3);
break;
case 0xC3: /* switch 2 */
temp_v0_7 = func_800BF14C(temp_s0, temp_v0_3);
temp_s3_2 = temp_v0_7 & 0xFFFF;
arg0->unk34 = temp_v0_7;
phi_s3_2 = temp_s3_2;
break;
case 0xC6: /* switch 2 */
temp_v0_8 = func_800BF108(temp_s0, temp_v0_3);
if (temp_v0_8 >= 0x7F) {
if (temp_v0_8 == 0x7F) {
arg0->unk1 = 0;
} else {
arg0->unk1 = temp_v0_8;
arg0->unk44 = 0;
}
if (temp_v0_8 == 0xFF) {
arg0->unk18 = 0;
}
} else {
temp_v0_9 = func_800BFC68(sp68, temp_v0_8 & 0xFF & 0xFF, arg0 + 0x44, arg0 + 0x18);
arg0->unk1 = temp_v0_9;
if (temp_v0_9 == 0) {
arg0->unk1 = 0xFF;
}
}
break;
case 0xC7: /* switch 2 */
arg0->unk8 = func_800BF108(temp_s0, temp_v0_3);
temp_t6 = (func_800BF108(temp_s0, MIPS2C_ERROR(Read from unset register $a1)) + sp68->unk1E + arg0->unk22 + temp_s4->unkC) & 0xFF;
phi_s2 = temp_t6;
if (temp_t6 >= 0x80) {
phi_s2 = 0;
}
arg0->unk4 = phi_s2;
if ((arg0->unk8 & 0x80) != 0) {
arg0->unk20 = *temp_s0->unk0;
temp_s0->unk0 = temp_s0->unk0 + 1;
} else {
temp_v0_10 = func_800BF14C(temp_s0, MIPS2C_ERROR(Read from unset register $a1));
temp_s3_3 = temp_v0_10 & 0xFFFF;
arg0->unk20 = temp_v0_10;
phi_s3_2 = temp_s3_3;
}
break;
case 0xC8: /* switch 2 */
arg0->unk8 = 0;
break;
case 0xCB: /* switch 2 */
temp_v0_11 = func_800BF11C(temp_s0, temp_v0_3);
temp_s3_4 = temp_v0_11 & 0xFFFF;
arg0->unk1C = temp_s4->unk14 + (temp_v0_11 & 0xFFFF);
arg0->unk18 = func_800BF108(temp_s0, MIPS2C_ERROR(Read from unset register $a1));
phi_s3_2 = temp_s3_4;
break;
case 0xCC: /* switch 2 */
arg0->unk0 = arg0->unk0 | 2;
break;
default: /* switch 2 */
default: /* switch 1 */
temp_v1_6 = temp_v0_3 & 0xF0;
if (temp_v1_6 != 0xD0) {
if (temp_v1_6 != 0xE0) {
} else {
arg0->unk3 = *(temp_s4->unk90 + (temp_v0_3 & 0xF));
}
} else {
temp_s3_5 = *(temp_s4->unk8C + (temp_v0_3 & 0xF));
arg0->unk28 = (temp_s3_5 * temp_s3_5) / 16129.0f;
phi_s3_2 = temp_s3_5;
}
break;
}
goto loop_11;
}
} else {
temp_v1_7 = temp_v0_3 & 0xC0;
if (temp_v0_3 == 0xC0) {
arg0->unk38 = func_800BF14C(temp_s0, temp_v0_3);
arg0->unk0 = arg0->unk0 | 0x20;
goto block_119;
}
arg0->unk0 = arg0->unk0 & 0xFFDF;
if (((sp68->unk0 << 6) >> 0x1F) == 1) {
temp_v1_8 = temp_v0_3 & 0xC0;
if (temp_v1_8 != 0) {
if (temp_v1_8 != 0x40) {
phi_a0 = phi_s3_2;
if (temp_v1_8 != 0x80) {
phi_a2 = sp34;
} else {
temp_v1_9 = temp_s0->unk0;
temp_a2 = *temp_v1_9;
temp_t2 = temp_v1_9 + 1;
temp_s0->unk0 = temp_t2;
arg0->unk3 = *temp_t2;
temp_s0->unk0 = temp_s0->unk0 + 1;
phi_a2 = temp_a2;
phi_a0 = arg0->unk36;
}
} else {
temp_v0_12 = func_800BF14C(temp_s0, temp_v0_3);
temp_v1_10 = temp_s0->unk0;
temp_a0_3 = temp_v0_12 & 0xFFFF;
temp_a2_2 = *temp_v1_10;
temp_s0->unk0 = temp_v1_10 + 1;
arg0->unk3 = 0;
arg0->unk36 = temp_v0_12;
phi_a2 = temp_a2_2;
phi_a0 = temp_a0_3;
}
} else {
temp_v0_13 = func_800BF14C(temp_s0, temp_v0_3);
temp_v1_11 = temp_s0->unk0;
temp_a0_4 = temp_v0_13 & 0xFFFF;
temp_a2_3 = *temp_v1_11;
temp_t6_2 = temp_v1_11 + 1;
temp_s0->unk0 = temp_t6_2;
arg0->unk3 = *temp_t6_2;
temp_s0->unk0 = temp_s0->unk0 + 1;
arg0->unk36 = temp_v0_13;
phi_a2 = temp_a2_3;
phi_a0 = temp_a0_4;
}
phi_a2_2 = phi_a2;
if ((phi_a2 >= 0x80) || (phi_a2 < 0)) {
phi_a2_2 = 0x7F;
}
temp_f0 = phi_a2_2;
arg0->unk28 = (temp_f0 * temp_f0) / 16129.0f;
phi_s2_2 = (temp_s2 - (temp_s2 & 0xC0)) & 0xFF;
} else {
if (temp_v1_7 != 0) {
if (temp_v1_7 != 0x40) {
if (temp_v1_7 != 0x80) {
} else {
phi_s3 = arg0->unk36;
}
} else {
phi_s3 = arg0->unk34;
}
} else {
temp_v0_14 = func_800BF14C(temp_s0, temp_v0_3);
temp_s3_6 = temp_v0_14 & 0xFFFF;
arg0->unk36 = temp_v0_14;
phi_s3 = temp_s3_6;
}
phi_a0 = phi_s3;
phi_s2_2 = (temp_s2 - (temp_s2 & 0xC0)) & 0xFF;
}
arg0->unk38 = phi_a0;
arg0->unk3A = (arg0->unk3 * phi_a0) >> 8;
if ((((temp_s4->unk0 * 4) < 0) && ((sp68->unk3 & 0x40) != 0)) || (temp_v1_12 = sp68->unk0, ((temp_v1_12 * 8) < 0))) {
arg0->unk0 = arg0->unk0 | 0x20;
goto block_119;
}
temp_a0_5 = arg0->unk1;
phi_v0 = temp_a0_5;
if (temp_a0_5 == 0xFF) {
if ((temp_v1_12 * 0x10) < 0) {
phi_v0 = sp68->unk1C;
goto block_88;
}
/* Duplicate return node #139. Try simplifying control flow for better match */
return;
}
block_88:
if (phi_v0 == 0) {
temp_v0_15 = func_800BC9F8(sp68->unk6, (phi_s2_2 + sp68->unk1E + arg0->unk22) & 0xFF);
temp_v1_13 = temp_v0_15 + 4;
if (temp_v0_15 == 0) {
arg0->unk0 = arg0->unk0 | 0x20;
arg0->unk3C = arg0->unk38;
return;
}
arg0->unk1C = temp_v0_15->unkC;
arg0->unk18 = temp_v0_15->unk0;
if ((arg0->unk0 << 6) >= 0) {
arg0->unk5 = temp_v0_15->unk1;
}
arg0->unk48 = temp_v1_13;
phi_f4 = temp_v1_13->unk4;
goto block_117;
}
temp_a1 = (phi_s2_2 + temp_s4->unkC + sp68->unk1E + arg0->unk22) & 0xFF;
if (temp_a1 >= 0x80) {
arg0->unk0 = arg0->unk0 | 0x20;
} else {
if (temp_a0_5 == 0xFF) {
phi_a0_2 = sp68->unk40;
} else {
phi_a0_2 = arg0->unk44;
}
if (arg0->unk8 != 0) {
temp_v0_16 = arg0->unk4;
phi_a2_3 = temp_v0_16;
if (temp_v0_16 < temp_a1) {
phi_a2_3 = temp_a1;
}
if (phi_a0_2 != 0) {
temp_v0_17 = func_800BC90C(phi_a0_2, phi_a2_3, phi_a2_3);
sp44 = temp_v0_17 == arg0->unk48;
arg0->unk48 = temp_v0_17;
phi_f0 = temp_v0_17->unk4;
} else {
arg0->unk48 = NULL;
phi_f0 = 1.0f;
}
temp_f2 = gNoteFrequencies[temp_a1] * phi_f0;
temp_t4_2 = arg0->unk8 & ~0x80;
switch (temp_t4_2) { /* switch 3 */
case 1: /* switch 3 */
case 3: /* switch 3 */
case 5: /* switch 3 */
phi_f0_2 = gNoteFrequencies[arg0->unk4] * phi_f0;
break;
default: /* switch 3 */
phi_f0_2 = temp_f2;
break;
}
temp_v0_18 = arg0 + 8;
temp_v0_18->unkC = (temp_f2 / phi_f0_2) - 1.0f;
if ((arg0->unk8 & 0x80) != 0) {
temp_v0_18->unk8 = (temp_s4->unk8 * 32512.0f) / (arg0->unk38 * D_803B70B4 * arg0->unk20);
} else {
temp_v0_18->unk8 = 127.0f / arg0->unk20;
}
temp_v0_18->unk4 = 0.0f;
arg0->unk24 = phi_f0_2;
if ((arg0->unk8 & ~0x80) == 5) {
arg0->unk4 = temp_a1;
}
} else if (phi_a0_2 != 0) {
temp_v0_19 = func_800BC90C(phi_a0_2, temp_a1, MIPS2C_ERROR(Read from unset register $a2));
sp44 = temp_v0_19 == arg0->unk48;
arg0->unk48 = temp_v0_19;
arg0->unk24 = gNoteFrequencies[temp_a1] * temp_v0_19->unk4;
} else {
arg0->unk48 = NULL;
phi_f4 = gNoteFrequencies[temp_a1];
block_117:
arg0->unk24 = phi_f4;
}
}
arg0->unk3C = arg0->unk38;
block_119:
temp_v0_20 = arg0->unk0;
if (((temp_v0_20 * 4) >> 0x1F) == 1) {
if ((arg0->unk40 != 0) || ((temp_v0_20 * 8) < 0)) {
func_800BD120(arg0);
return;
}
/* Duplicate return node #139. Try simplifying control flow for better match */
return;
}
phi_s2_3 = 0;
if ((temp_v0_20 * 8) >= 0) {
phi_s2_3 = 1;
} else {
temp_a0_6 = arg0->unk40;
if ((temp_a0_6 == 0) || (arg0->unk2 == 0)) {
phi_s2_3 = 1;
} else if (sp44 == 0) {
func_800BD120(arg0);
phi_s2_3 = 1;
} else if (arg0 != temp_a0_6->unk44) {
phi_s2_3 = 1;
} else if (arg0->unk48 == 0) {
func_800BD264(temp_a0_6, arg0);
}
}
if (phi_s2_3 != 0) {
arg0->unk40 = func_800BDA44(arg0);
}
temp_a0_7 = arg0->unk40;
if ((temp_a0_7 != 0) && (arg0 == temp_a0_7->unk44)) {
func_800BE4D4(temp_a0_7);
}
/* Duplicate return node #139. Try simplifying control flow for better match */
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BF190.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void *func_800BC948(u8, u8); // extern
s32 func_800BFC68(void *arg0, u8 arg1, void **arg2, void *arg3) {
void *temp_v0;
temp_v0 = func_800BC948(arg0->unk6, arg1);
if (temp_v0 == 0) {
*arg2 = NULL;
return 0;
}
arg3->unk4 = temp_v0->unk4;
arg3->unk0 = temp_v0->unk3;
*arg2 = temp_v0;
return (arg1 + 1) & 0xFF;
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BFC68.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
s16 func_800BFC68(s32, void *, void *); // extern
void func_800BFCD8(u8 *arg0, s32 arg1) {
s16 temp_v0;
s32 temp_t6;
temp_t6 = arg1 & 0xFF;
if (temp_t6 >= 0x80) {
arg0->unk1C = temp_t6;
arg0->unk40 = 0;
goto block_6;
}
if (temp_t6 == 0x7F) {
arg0->unk1C = 0;
arg0->unk40 = 1;
goto block_6;
}
temp_v0 = func_800BFC68(temp_t6, arg0 + 0x40, arg0 + 0x7C);
arg0->unk1C = temp_v0;
if (temp_v0 == 0) {
arg0->unk0 = arg0->unk0 & 0xFFF7;
return;
}
block_6:
arg0->unk0 = arg0->unk0 | 8;
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BFCD8.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_800BFD6C(void *arg0, s32 arg1) {
arg0->unk24 = (arg1 & 0xFF) / 127.0f;
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BFD6C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
s32 func_800B9A90(?, ?, u8, u16); /* extern */
void func_800BD418(void *); /* extern */
void func_800BD578(void *, s32); /* extern */
void func_800BEB54(void *, s32); /* extern */
void func_800BEBA4(void *); /* extern */
void func_800BEE88(s32 *, s32, s32); /* extern */
void func_800BF190(s32); /* extern */
void func_800BFCD8(void *, s32); /* extern */
void func_800BFD6C(void *, s32); /* extern */
void func_800BFD90(void *arg0) {
u8 sp55;
u16 sp52;
s32 sp34;
f32 temp_f18;
f32 temp_f6;
f32 temp_f8;
s16 temp_v1_5;
s32 *temp_s4;
s32 *temp_v1_10;
s32 temp_a0;
s32 temp_a0_4;
s32 temp_a0_5;
s32 temp_a1_2;
s32 temp_a1_3;
s32 temp_s0;
s32 temp_s0_2;
s32 temp_s0_6;
s32 temp_s0_7;
s32 temp_t3;
s32 temp_v0_2;
s32 temp_v1_11;
s32 temp_v1_3;
s32 temp_v1_6;
s8 *temp_v0_4;
s8 temp_s3;
s8 temp_v0_5;
s8 temp_v1_4;
u16 temp_a3;
u16 temp_a3_2;
u16 temp_t5;
u16 temp_v0_6;
u16 temp_v1;
u32 temp_t6;
u32 temp_v0;
u8 *temp_v1_8;
u8 temp_a0_2;
u8 temp_a0_3;
u8 temp_s0_4;
u8 temp_s0_5;
u8 temp_t0;
u8 temp_t7;
void *temp_a1;
void *temp_s0_3;
void *temp_s1;
void *temp_v0_3;
void *temp_v1_12;
void *temp_v1_2;
void *temp_v1_7;
void *temp_v1_9;
void *phi_s1;
s32 phi_s0;
u16 phi_v0;
s32 phi_s3;
void *phi_s1_2;
s32 phi_s0_2;
temp_v0 = arg0->unk0;
if ((temp_v0 >> 0x1F) != 0) {
phi_s0 = 0;
phi_s0_2 = 0;
if ((temp_v0 * 4) < 0) {
phi_s1 = arg0;
do {
temp_a0 = phi_s1->unk48;
if (temp_a0 != 0) {
func_800BF190(temp_a0);
}
temp_s0 = phi_s0 + 4;
phi_s1 += 4;
phi_s0 = temp_s0;
} while (temp_s0 != 0x10);
return;
}
temp_s4 = arg0->unk44;
if (((temp_s4->unk0 * 4) >= 0) || ((arg0->unk3 & 0x80) == 0)) {
temp_v1 = arg0->unk1A;
temp_s1 = arg0 + 0x60;
phi_v0 = temp_v1;
if (temp_v1 != 0) {
temp_t5 = temp_v1 - 1;
arg0->unk1A = temp_t5;
phi_v0 = temp_t5 & 0xFFFF;
}
phi_s3 = sp4B;
if (phi_v0 == 0) {
default: /* switch 2 */
default: /* switch 1 */
loop_12:
temp_v0_2 = func_800BF108(temp_s1);
temp_s0_2 = temp_v0_2 & 0xFF;
if (temp_v0_2 >= 0xC1) {
switch (temp_v0_2) { /* switch 1 */
case 0xFF: /* switch 1 */
temp_a0_2 = temp_s1->unk18;
if (temp_a0_2 == 0) {
func_800BEBA4(arg0);
} else {
temp_t7 = (temp_a0_2 - 1) & 0xFF;
temp_s1->unk18 = temp_t7;
temp_s1->unk0 = (temp_s1 + (temp_t7 * 4))->unk4;
goto loop_12;
}
break;
case 0xFD: /* switch 1 */
arg0->unk1A = func_800BF14C(temp_s1);
break;
case 0xEA: /* switch 1 */
arg0->unk0 = arg0->unk0 | 0x20;
break;
case 0xFC: /* switch 1 */
temp_t3 = func_800BF11C(temp_s1) & 0xFFFF;
(temp_s1 + (temp_s1->unk18 * 4))->unk4 = temp_s1->unk0;
temp_s1->unk18 = temp_s1->unk18 + 1;
temp_s1->unk0 = temp_s4->unk14 + temp_t3;
goto loop_12;
case 0xF8: /* switch 1 */
(temp_s1 + temp_s1->unk18)->unk14 = func_800BF108(temp_s1);
(temp_s1 + (temp_s1->unk18 * 4))->unk4 = temp_s1->unk0;
temp_s1->unk18 = temp_s1->unk18 + 1;
goto loop_12;
case 0xF7: /* switch 1 */
temp_v0_3 = temp_s1 + temp_s1->unk18;
temp_v0_3->unk13 = temp_v0_3->unk13 - 1;
temp_a0_3 = temp_s1->unk18;
if ((temp_s1 + temp_a0_3)->unk13 != 0) {
temp_s1->unk0 = *(temp_s1 + (temp_a0_3 * 4));
} else {
temp_s1->unk18 = temp_a0_3 - 1;
}
goto loop_12;
case 0xF6: /* switch 1 */
temp_s1->unk18 = temp_s1->unk18 - 1;
goto loop_12;
case 0xF5: /* switch 1 */
case 0xF9: /* switch 1 */
case 0xFA: /* switch 1 */
case 0xFB: /* switch 1 */
if (((temp_s0_2 != 0xFA) || (phi_s3 == 0)) && ((temp_s0_2 != 0xF9) || (phi_s3 < 0)) && ((temp_s0_2 != 0xF5) || (phi_s3 >= 0))) {
temp_s1->unk0 = temp_s4->unk14 + (func_800BF11C(temp_s1) & 0xFFFF);
}
goto loop_12;
case 0xF2: /* switch 1 */
case 0xF3: /* switch 1 */
case 0xF4: /* switch 1 */
if (((temp_s0_2 != 0xF3) || (phi_s3 == 0)) && ((temp_s0_2 != 0xF2) || (phi_s3 < 0))) {
temp_s1->unk0 = temp_s1->unk0 + func_800BF108(temp_s1);
}
goto loop_12;
case 0xF1: /* switch 1 */
temp_s0_3 = arg0 + 0x84;
func_800BD418(temp_s0_3);
func_800BD578(temp_s0_3, func_800BF108(temp_s1));
goto loop_12;
case 0xF0: /* switch 1 */
func_800BD418(arg0 + 0x84);
goto loop_12;
case 0xC2: /* switch 1 */
arg0->unk34 = temp_s4->unk14 + (func_800BF11C(temp_s1) & 0xFFFF);
goto loop_12;
case 0xC5: /* switch 1 */
if (phi_s3 != -1) {
temp_v1_2 = arg0->unk34 + (phi_s3 * 2);
arg0->unk34 = temp_s4->unk14 + ((temp_v1_2->unk1 + (temp_v1_2->unk0 << 8)) & 0xFFFF);
}
goto loop_12;
case 0xEB: /* switch 1 */
temp_v1_3 = D_803B7078;
temp_a3 = *(temp_v1_3 + (temp_s4->unk4 * 2));
temp_s0_4 = *(((temp_a3 + *(temp_a3 + temp_v1_3)) - func_800BF108(temp_s1)) + temp_v1_3);
if (func_800B9A90(1, 2, temp_s0_4, temp_a3) != 0) {
arg0->unk6 = temp_s0_4;
}
/* fallthrough */
case 0xC1: /* switch 1 */
func_800BFCD8(arg0, func_800BF108(temp_s1) & 0xFF);
goto loop_12;
case 0xC3: /* switch 1 */
arg0->unk0 = arg0->unk0 & 0xFFFD;
goto loop_12;
case 0xC4: /* switch 1 */
arg0->unk0 = arg0->unk0 | 2;
goto loop_12;
case 0xDF: /* switch 1 */
func_800BFD6C(arg0, func_800BF108(temp_s1) & 0xFF);
arg0->unk1 = arg0->unk1 | 0x40;
goto loop_12;
case 0xE0: /* switch 1 */
temp_f6 = func_800BF108(temp_s1);
arg0->unk1 = arg0->unk1 | 0x40;
arg0->unk20 = temp_f6 * 0.0078125f;
goto loop_12;
case 0xDE: /* switch 1 */
temp_f18 = func_800BF11C(temp_s1) & 0xFFFF;
arg0->unk1 = arg0->unk1 | 0x80;
arg0->unk30 = temp_f18 / 32768.0f;
goto loop_12;
case 0xD3: /* switch 1 */
temp_f8 = gPitchBendFrequencyScale[(func_800BF108(temp_s1) + 0x7F) & 0xFF];
arg0->unk1 = arg0->unk1 | 0x80;
arg0->unk30 = temp_f8;
goto loop_12;
case 0xDD: /* switch 1 */
arg0->unk9 = func_800BF108(temp_s1);
arg0->unk1 = arg0->unk1 | 0x20;
goto loop_12;
case 0xDC: /* switch 1 */
arg0->unkA = func_800BF108(temp_s1);
arg0->unk1 = arg0->unk1 | 0x20;
goto loop_12;
case 0xDB: /* switch 1 */
temp_v0_4 = temp_s1->unk0;
temp_v1_4 = *temp_v0_4;
temp_s1->unk0 = temp_v0_4 + 1;
arg0->unk1E = temp_v1_4;
goto loop_12;
case 0xDA: /* switch 1 */
arg0->unk80 = temp_s4->unk14 + (func_800BF11C(temp_s1) & 0xFFFF);
goto loop_12;
case 0xD9: /* switch 1 */
arg0->unk7C = func_800BF108(temp_s1);
goto loop_12;
case 0xD8: /* switch 1 */
arg0->unk12 = func_800BF108(temp_s1) * 8;
arg0->unkE = 0;
arg0->unk16 = 0;
goto loop_12;
case 0xD7: /* switch 1 */
temp_v1_5 = func_800BF108(temp_s1) << 5;
arg0->unk10 = temp_v1_5;
arg0->unkC = temp_v1_5;
arg0->unk14 = 0;
goto loop_12;
case 0xE2: /* switch 1 */
arg0->unkE = func_800BF108(temp_s1) * 8;
arg0->unk12 = func_800BF108(temp_s1) * 8;
arg0->unk16 = func_800BF108(temp_s1) * 0x10;
goto loop_12;
case 0xE1: /* switch 1 */
arg0->unkC = func_800BF108(temp_s1) << 5;
arg0->unk10 = func_800BF108(temp_s1) << 5;
arg0->unk14 = func_800BF108(temp_s1) * 0x10;
goto loop_12;
case 0xE3: /* switch 1 */
arg0->unk18 = func_800BF108(temp_s1) * 0x10;
goto loop_12;
case 0xD4: /* switch 1 */
arg0->unk4 = func_800BF108(temp_s1);
goto loop_12;
case 0xC6: /* switch 1 */
temp_v1_6 = D_803B7078;
temp_a3_2 = *(temp_v1_6 + (temp_s4->unk4 * 2));
temp_s0_5 = *(((temp_a3_2 + *(temp_a3_2 + temp_v1_6)) - func_800BF108(temp_s1)) + temp_v1_6);
if (func_800B9A90(1, 2, temp_s0_5, temp_a3_2) != 0) {
arg0->unk6 = temp_s0_5;
}
goto loop_12;
case 0xC7: /* switch 1 */
sp34 = phi_s3 & 0xFF;
temp_s0_6 = func_800BF108(temp_s1) & 0xFF;
*(temp_s4->unk14 + (func_800BF11C(temp_s1) & 0xFFFF)) = sp34 + temp_s0_6;
goto loop_12;
case 0xC8: /* switch 1 */
case 0xC9: /* switch 1 */
case 0xCC: /* switch 1 */
temp_v0_5 = func_800BF108(temp_s1);
if (temp_s0_2 == 0xC8) {
phi_s3 = phi_s3 - temp_v0_5;
} else if (temp_s0_2 == 0xCC) {
phi_s3 = temp_v0_5;
} else {
phi_s3 = phi_s3 & temp_v0_5;
}
goto loop_12;
case 0xCA: /* switch 1 */
arg0->unk3 = func_800BF108(temp_s1);
goto loop_12;
case 0xCB: /* switch 1 */
phi_s3 = *(temp_s4->unk14 + ((func_800BF11C(temp_s1) & 0xFFFF) + phi_s3));
goto loop_12;
case 0xD0: /* switch 1 */
arg0->unk0 = ((func_800BF108(temp_s1) * 4) & 4) | (arg0->unk0 & 0xFFFB);
goto loop_12;
case 0xD1: /* switch 1 */
arg0->unk2 = func_800BF108(temp_s1);
goto loop_12;
case 0xD2: /* switch 1 */
arg0->unk7D = func_800BF108(temp_s1);
goto loop_12;
case 0xE5: /* switch 1 */
arg0->unk7 = func_800BF108(temp_s1);
goto loop_12;
case 0xE4: /* switch 1 */
if (phi_s3 != -1) {
(temp_s1 + (temp_s1->unk18 * 4))->unk4 = temp_s1->unk0;
temp_v1_7 = arg0->unk34 + (phi_s3 * 2);
temp_s1->unk18 = temp_s1->unk18 + 1;
temp_s1->unk0 = temp_s4->unk14 + ((temp_v1_7->unk1 + (temp_v1_7->unk0 << 8)) & 0xFFFF);
}
goto loop_12;
case 0xE6: /* switch 1 */
arg0->unk8 = func_800BF108(temp_s1);
goto loop_12;
case 0xE7: /* switch 1 */
temp_v1_8 = temp_s4->unk14 + (func_800BF11C(temp_s1) & 0xFFFF);
temp_v1_9 = temp_v1_8 + 7;
arg0->unk3 = *temp_v1_8;
arg0->unk2 = temp_v1_9->unk-6;
arg0->unk5 = temp_v1_9->unk-5;
arg0->unk1E = temp_v1_9->unk-4;
arg0->unk9 = temp_v1_9->unk-3;
arg0->unkA = temp_v1_9->unk-2;
arg0->unk4 = temp_v1_9->unk-1;
arg0->unk1 = arg0->unk1 | 0x20;
arg0->unk7 = temp_v1_9->unk0;
goto loop_12;
case 0xE8: /* switch 1 */
arg0->unk3 = func_800BF108(temp_s1);
arg0->unk2 = func_800BF108(temp_s1);
arg0->unk5 = func_800BF108(temp_s1);
arg0->unk1E = func_800BF108(temp_s1);
arg0->unk9 = func_800BF108(temp_s1);
arg0->unkA = func_800BF108(temp_s1);
arg0->unk4 = func_800BF108(temp_s1);
arg0->unk7 = func_800BF108(temp_s1);
arg0->unk1 = arg0->unk1 | 0x20;
goto loop_12;
case 0xEC: /* switch 1 */
arg0->unk12 = 0;
arg0->unkE = 0;
arg0->unk16 = 0;
arg0->unk10 = 0;
arg0->unkC = 0;
arg0->unk14 = 0;
arg0->unk30 = 1.0f;
goto loop_12;
case 0xE9: /* switch 1 */
arg0->unk5 = func_800BF108(temp_s1);
goto loop_12;
case 0xEF: /* switch 1 */
func_800BF11C(temp_s1);
func_800BF108(temp_s1);
goto loop_12;
}
} else {
temp_t6 = temp_v0_2 & 0xF0;
temp_a0_4 = temp_v0_2 & 0xF;
temp_t0 = temp_a0_4 & 0xFF;
switch (temp_t6) { /* switch 2 */
case 0x0: /* switch 2 */
temp_v1_10 = (arg0 + ((temp_a0_4 & 0xFF) * 4))->unk48;
if (temp_v1_10 != 0) {
phi_s3 = (*temp_v1_10 * 2) >> 0x1F;
} else {
phi_s3 = -1;
}
goto loop_12;
case 0x70: /* switch 2 */
(arg0 + (temp_a0_4 & 0xFF))->unk58 = phi_s3;
goto loop_12;
case 0x80: /* switch 2 */
temp_v1_11 = temp_a0_4 & 0xFF;
temp_a1 = arg0 + temp_v1_11;
temp_s3 = temp_a1->unk58;
phi_s3 = temp_s3;
if (temp_v1_11 < 4) {
temp_a1->unk58 = -1;
}
goto loop_12;
case 0x50: /* switch 2 */
phi_s3 = phi_s3 - (arg0 + (temp_a0_4 & 0xFF))->unk58;
goto loop_12;
case 0x60: /* switch 2 */
arg0->unk1A = temp_a0_4 & 0xFF;
break;
case 0x90: /* switch 2 */
temp_v0_6 = func_800BF11C(temp_s1);
temp_a1_2 = temp_s0_2 & 0xF;
sp34 = temp_a1_2;
sp52 = temp_v0_6;
if (func_800BEA10(arg0, temp_a1_2, temp_a1_2) == 0) {
(arg0 + (sp34 * 4))->unk48->unk50 = temp_s4->unk14 + sp52;
}
goto loop_12;
case 0xA0: /* switch 2 */
func_800BEB54(arg0, temp_s0_2 & 0xF);
goto loop_12;
case 0xB0: /* switch 2 */
if (phi_s3 != -1) {
temp_a1_3 = temp_s0_2 & 0xF;
sp34 = temp_a1_3;
if (func_800BEA10(arg0, temp_a1_3, temp_a1_3) != -1) {
temp_v1_12 = arg0->unk34 + (phi_s3 * 2);
(arg0 + (sp34 * 4))->unk48->unk50 = temp_s4->unk14 + ((temp_v1_12->unk1 + (temp_v1_12->unk0 << 8)) & 0xFFFF);
}
}
goto loop_12;
case 0x10: /* switch 2 */
func_800BEE88(temp_s4, temp_s0_2 & 0xF, temp_s4->unk14 + (func_800BF11C(temp_s1) & 0xFFFF));
goto loop_12;
case 0x20: /* switch 2 */
func_800BEBA4(temp_s4[temp_s0_2 & 0xF].unk30);
goto loop_12;
case 0x30: /* switch 2 */
sp55 = temp_t0;
(temp_s4[temp_t0].unk30 + func_800BF108(temp_s1))->unk58 = phi_s3;
goto loop_12;
case 0x40: /* switch 2 */
sp55 = temp_t0;
phi_s3 = (temp_s4[temp_t0].unk30 + func_800BF108(temp_s1))->unk58;
goto loop_12;
}
}
}
phi_s1_2 = arg0;
do {
temp_a0_5 = phi_s1_2->unk48;
if (temp_a0_5 != 0) {
func_800BF190(temp_a0_5);
}
temp_s0_7 = phi_s0_2 + 4;
phi_s1_2 += 4;
phi_s0_2 = temp_s0_7;
} while (temp_s0_7 != 0x10);
}
/* Duplicate return node #109. Try simplifying control flow for better match */
}
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BFD90.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
void func_800BAB58(void *, void *, void *, void *, void *); /* extern */
void func_800BB584(u8, void *, void *); /* extern */
void func_800BD418(void *); /* extern */
void func_800BD578(void *, s8); /* extern */
void func_800BEC8C(void *, s32); /* extern */
void func_800BEDB8(void *, s32); /* extern */
void func_800BEE88(void *, s32, s32); /* extern */
void func_800BEF2C(void *, u8, s32); /* extern */
void func_800BFD90(s32); /* extern */
s32 osRecvMesg(void *, ?, ?); /* extern */
extern u8 D_803B03C0;
extern ? D_803B0400;
extern ? D_803B5EF0;
void func_800C08CC(void *arg0) {
void *sp38;
s32 sp34;
void *sp30;
f32 temp_f16;
s16 temp_v1_3;
s16 temp_v1_5;
s32 temp_a0_6;
s32 temp_s2;
s32 temp_t2_2;
s32 temp_v0_13;
s32 temp_v0_5;
s32 temp_v0_7;
s32 temp_v1_4;
s32 temp_v1_8;
s8 temp_v0_12;
s8 temp_v0_6;
s8 temp_v0_9;
u16 temp_a0_2;
u16 temp_t2;
u16 temp_v0_10;
u16 temp_v0_11;
u16 temp_v1_7;
u32 temp_v0;
u8 *temp_v0_2;
u8 *temp_v0_3;
u8 *temp_v0_4;
u8 *temp_v1;
u8 *temp_v1_2;
u8 temp_a0;
u8 temp_a0_3;
u8 temp_a0_4;
u8 temp_a1_2;
u8 temp_s2_2;
u8 temp_t9;
u8 temp_v1_6;
void *temp_a0_5;
void *temp_a1;
void *temp_a2;
void *temp_s0;
void *temp_s0_2;
void *temp_v0_8;
u8 phi_a0;
u8 *phi_v0;
s32 phi_s3;
s16 phi_v0_2;
void *phi_v1;
s32 phi_v0_3;
temp_v0 = arg0->unk0;
if ((temp_v0 >> 0x1F) != 0) {
if (((temp_v0 * 0x10) >> 0x1F) == 1) {
temp_s0 = arg0 + 0x108;
if (osRecvMesg(temp_s0, 0, 0) != -1) {
temp_a1 = arg0 + 0x13C;
temp_a2 = arg0 + 0x144;
if (arg0->unk144 == 0) {
arg0->unk0 = arg0->unk0 & 0xFFF7;
func_800BB584(arg0->unk6, temp_a1, temp_a2);
temp_v0_2 = arg0->unk6 + &D_803B03C0;
if (*temp_v0_2 != 5) {
*temp_v0_2 = 2;
return;
}
/* Duplicate return node #110. Try simplifying control flow for better match */
return;
}
func_800BAB58(arg0 + 0x140, temp_a1, temp_a2, temp_s0, arg0 + 0x124);
return;
}
/* Duplicate return node #110. Try simplifying control flow for better match */
return;
}
if (((temp_v0 * 8) >> 0x1F) == 1) {
if (osRecvMesg(arg0 + 0xD4, 0, 0) != -1) {
arg0->unk0 = arg0->unk0 & 0xFFEF;
temp_v1 = arg0->unk4 + &D_803B0400;
if (*temp_v1 != 5) {
*temp_v1 = 2;
}
goto block_11;
}
/* Duplicate return node #110. Try simplifying control flow for better match */
return;
}
block_11:
temp_v1_2 = arg0->unk4 + &D_803B0400;
temp_a1_2 = *temp_v1_2;
if ((temp_a1_2 < 2) || (temp_v0_3 = arg0->unk5 + &D_803B03C0, temp_a0 = *temp_v0_3, phi_a0 = temp_a0, phi_v0 = temp_v0_3, ((temp_a0 < 2) != 0))) {
func_800BEF2C(arg0, temp_a1_2, 5);
return;
}
if (temp_a1_2 != 5) {
*temp_v1_2 = 2;
temp_v0_4 = arg0->unk5 + &D_803B03C0;
phi_a0 = *temp_v0_4;
phi_v0 = temp_v0_4;
}
if (phi_a0 != 5) {
*phi_v0 = 2;
}
if (((arg0->unk0 * 4) >= 0) || ((arg0->unk3 & 0x80) == 0)) {
temp_t2 = arg0->unkA + arg0->unk8;
arg0->unkA = temp_t2;
temp_v1_3 = D_803B70B4;
temp_v0_5 = temp_t2 & 0xFFFF;
if (temp_v0_5 >= temp_v1_3) {
temp_a0_2 = arg0->unkE;
arg0->unkA = temp_v0_5 - temp_v1_3;
if (temp_a0_2 >= 2) {
arg0->unkE = temp_a0_2 - 1;
} else {
temp_s0_2 = arg0 + 0x70;
arg0->unk0 = arg0->unk0 | 4;
phi_s3 = sp58;
loop_24:
temp_v0_6 = func_800BF108(temp_s0_2);
temp_s2 = temp_v0_6 & 0xFF;
if (temp_v0_6 == 0xFF) {
temp_a0_3 = temp_s0_2->unk18;
if (temp_a0_3 == 0) {
func_800BEF2C(arg0);
} else {
temp_t9 = (temp_a0_3 - 1) & 0xFF;
temp_s0_2->unk18 = temp_t9;
temp_s0_2->unk0 = (temp_s0_2 + (temp_t9 * 4))->unk4;
goto block_28;
}
} else {
block_28:
temp_v1_4 = temp_v0_6 & 0xFF;
temp_v0_7 = temp_v1_4 & 0xF0;
if (temp_v1_4 == 0xFD) {
arg0->unkE = func_800BF14C(temp_s0_2);
} else if (temp_v1_4 == 0xFE) {
arg0->unkE = 1;
} else {
if (temp_v1_4 >= 0xC0) {
switch (temp_v1_4) { /* switch 1 */
case 0xFC: /* switch 1 */
temp_t2_2 = func_800BF11C(temp_s0_2) & 0xFFFF;
(temp_s0_2 + (temp_s0_2->unk18 * 4))->unk4 = temp_s0_2->unk0;
temp_s0_2->unk18 = temp_s0_2->unk18 + 1;
temp_s0_2->unk0 = arg0->unk14 + temp_t2_2;
break;
case 0xF8: /* switch 1 */
(temp_s0_2 + temp_s0_2->unk18)->unk14 = func_800BF108(temp_s0_2);
(temp_s0_2 + (temp_s0_2->unk18 * 4))->unk4 = temp_s0_2->unk0;
temp_s0_2->unk18 = temp_s0_2->unk18 + 1;
break;
case 0xF7: /* switch 1 */
temp_v0_8 = temp_s0_2 + temp_s0_2->unk18;
temp_v0_8->unk13 = temp_v0_8->unk13 - 1;
temp_a0_4 = temp_s0_2->unk18;
if ((temp_s0_2 + temp_a0_4)->unk13 != 0) {
temp_s0_2->unk0 = *(temp_s0_2 + (temp_a0_4 * 4));
} else {
temp_s0_2->unk18 = temp_a0_4 - 1;
}
break;
case 0xF5: /* switch 1 */
case 0xF9: /* switch 1 */
case 0xFA: /* switch 1 */
case 0xFB: /* switch 1 */
if (((temp_s2 != 0xFA) || (phi_s3 == 0)) && ((temp_s2 != 0xF9) || (phi_s3 < 0)) && ((temp_s2 != 0xF5) || (phi_s3 >= 0))) {
temp_s0_2->unk0 = arg0->unk14 + (func_800BF11C(temp_s0_2) & 0xFFFF);
}
break;
case 0xF2: /* switch 1 */
case 0xF3: /* switch 1 */
case 0xF4: /* switch 1 */
if (((temp_s2 != 0xF3) || (phi_s3 == 0)) && ((temp_s2 != 0xF2) || (phi_s3 < 0))) {
temp_s0_2->unk0 = temp_s0_2->unk0 + func_800BF108(temp_s0_2);
}
break;
case 0xF1: /* switch 1 */
temp_a0_5 = arg0 + 0x94;
sp38 = temp_a0_5;
func_800BD418(temp_a0_5);
func_800BD578(temp_a0_5, func_800BF108(temp_s0_2));
break;
case 0xF0: /* switch 1 */
func_800BD418(arg0 + 0x94);
break;
case 0xDF: /* switch 1 */
arg0->unkC = 0;
/* fallthrough */
case 0xDE: /* switch 1 */
arg0->unkC = arg0->unkC + func_800BF108(temp_s0_2);
break;
case 0xDC: /* switch 1 */
case 0xDD: /* switch 1 */
temp_v0_9 = func_800BF108(temp_s0_2);
if (temp_s2 == 0xDD) {
arg0->unk8 = (temp_v0_9 & 0xFF) * 0x30;
} else {
arg0->unk8 = arg0->unk8 + (temp_v0_9 * 0x30);
}
temp_v1_5 = D_803B70B4;
temp_v0_10 = arg0->unk8;
phi_v0_2 = temp_v0_10;
if (temp_v1_5 < temp_v0_10) {
arg0->unk8 = temp_v1_5;
phi_v0_2 = temp_v1_5 & 0xFFFF;
}
if (phi_v0_2 <= 0) {
arg0->unk8 = 1;
}
break;
case 0xDA: /* switch 1 */
temp_s2_2 = func_800BF108(temp_s0_2) & 0xFF;
temp_v0_11 = func_800BF11C(temp_s0_2);
if ((temp_s2_2 != 0) && (temp_s2_2 != 1)) {
if (temp_s2_2 != 2) {
} else {
temp_f16 = temp_v0_11 & 0xFFFF;
arg0->unk10 = temp_v0_11;
arg0->unk1 = temp_s2_2;
arg0->unk1C = (0.0f - arg0->unk18) / temp_f16;
}
} else if (arg0->unk1 != 2) {
arg0->unk12 = temp_v0_11;
arg0->unk1 = temp_s2_2;
}
break;
case 0xDB: /* switch 1 */
temp_v0_12 = func_800BF108(temp_s0_2);
temp_v1_6 = arg0->unk1;
if (temp_v1_6 != 0) {
if (temp_v1_6 != 1) {
if (temp_v1_6 != 2) {
}
} else {
arg0->unk1 = 0;
arg0->unk18 = 0.0f;
goto block_76;
}
} else {
block_76:
temp_v1_7 = arg0->unk12;
arg0->unk10 = temp_v1_7;
if (temp_v1_7 != 0) {
arg0->unk1C = ((temp_v0_12 / 127.0f) - arg0->unk18) / (temp_v1_7 & 0xFFFF);
} else {
arg0->unk18 = temp_v0_12 / 127.0f;
}
}
break;
case 0xD9: /* switch 1 */
arg0->unk28 = func_800BF108(temp_s0_2) / 127.0f;
break;
case 0xD7: /* switch 1 */
func_800BEC8C(arg0, func_800BF11C(temp_s0_2) & 0xFFFF);
break;
case 0xD6: /* switch 1 */
func_800BEDB8(arg0, func_800BF11C(temp_s0_2) & 0xFFFF);
break;
case 0xD5: /* switch 1 */
arg0->unk24 = func_800BF108(temp_s0_2) / 127.0f;
break;
case 0xD4: /* switch 1 */
arg0->unk0 = arg0->unk0 | 0x20;
break;
case 0xD3: /* switch 1 */
arg0->unk3 = func_800BF108(temp_s0_2);
break;
case 0xD1: /* switch 1 */
case 0xD2: /* switch 1 */
temp_v1_8 = arg0->unk14 + (func_800BF11C(temp_s0_2) & 0xFFFF);
if (temp_s2 == 0xD2) {
arg0->unk8C = temp_v1_8;
} else {
arg0->unk90 = temp_v1_8;
}
break;
case 0xD0: /* switch 1 */
arg0->unk2 = func_800BF108(temp_s0_2);
break;
case 0xCC: /* switch 1 */
phi_s3 = func_800BF108(temp_s0_2);
break;
case 0xC9: /* switch 1 */
phi_s3 &= func_800BF108(temp_s0_2);
break;
case 0xC8: /* switch 1 */
phi_s3 -= func_800BF108(temp_s0_2);
break;
}
} else if (temp_v0_7 >= 0x11) {
if (temp_v0_7 >= 0x21) {
switch (temp_v0_7) { /* switch 2 */
case 0x50: /* switch 2 */
phi_s3 -= arg0->unk7;
break;
case 0x70: /* switch 2 */
arg0->unk7 = phi_s3;
break;
case 0x80: /* switch 2 */
phi_s3 = arg0->unk7;
break;
case 0x90: /* switch 2 */
func_800BEE88(arg0, temp_s2 & 0xF, arg0->unk14 + (func_800BF11C(temp_s0_2) & 0xFFFF));
break;
}
} else if (temp_v0_7 != 0x20) {
}
} else if (temp_v0_7 != 0) {
if (temp_v0_7 != 0x10) {
}
} else {
phi_s3 = (*(arg0 + ((temp_v1_4 & 0xF) * 4))->unk30 * 2) >> 0x1F;
}
goto loop_24;
}
}
}
phi_v1 = arg0;
phi_v0_3 = 0;
do {
temp_a0_6 = phi_v1->unk30;
if ((&D_803B5EF0 != temp_a0_6) == 1) {
sp34 = phi_v0_3;
sp30 = phi_v1;
func_800BFD90(temp_a0_6);
}
temp_v0_13 = phi_v0_3 + 4;
phi_v1 += 4;
phi_v0_3 = temp_v0_13;
} while (temp_v0_13 != 0x40);
}
}
/* Duplicate return node #110. Try simplifying control flow for better match */
}
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800C08CC.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_800BCBC4(); // extern
void func_800BDFF8(u32 *); // extern
void func_800C08CC(u32 *); // extern
extern u32 D_803B1510;
extern ? D_803B1A30;
void func_800C1138(s32 arg0) {
u32 *temp_s0;
u32 *phi_s0;
phi_s0 = &D_803B1510;
do {
if ((*phi_s0 >> 0x1F) == 1) {
func_800C08CC(phi_s0);
func_800BDFF8(phi_s0);
}
temp_s0 = phi_s0 + 0x148;
phi_s0 = temp_s0;
} while (temp_s0 != &D_803B1A30);
func_800BCBC4();
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800C1138.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_800BEF2C(void *); // extern
extern u32 D_803B1510;
extern u8 gDefaultShortNoteDurationTable;
extern u8 gDefaultShortNoteVelocityTable;
void func_800C11B0(s32 arg0) {
void *sp18;
void *temp_a0;
temp_a0 = (arg0 * 0x148) + &D_803B1510;
sp18 = temp_a0;
func_800BEF2C(temp_a0);
temp_a0->unkE = 0;
temp_a0->unk1 = 1;
temp_a0->unk10 = 0;
temp_a0->unk12 = 0;
temp_a0->unkA = 0;
temp_a0->unk8 = 0x1680;
temp_a0->unkC = 0;
temp_a0->unk2 = 0;
temp_a0->unk8C = &gDefaultShortNoteVelocityTable;
temp_a0->unk90 = &gDefaultShortNoteDurationTable;
temp_a0->unk18 = 1.0f;
temp_a0->unk28 = 1.0f;
temp_a0->unk1C = 0.0f;
temp_a0->unk20 = 0.0f;
temp_a0->unk24 = 0.5f;
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800C11B0.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_800BD318(? *); // extern
void func_800BF084(s32, ? *, u32, u8 *); // extern
void func_800C11B0(s32); // extern
extern u32 D_803B1510;
extern ? D_803B15A4;
extern ? D_803B1A30;
extern u8 D_803B3EF0;
extern ? D_803B5EF0;
void func_800C125C(void) {
? *temp_a1;
? *temp_v1;
? *temp_v1_2;
s32 temp_s3;
s32 temp_v0;
s32 temp_v0_3;
u32 temp_a2;
u8 *temp_v0_2;
u8 temp_t4;
u8 temp_t6;
u8 temp_t8;
? *phi_a1;
? *phi_v1;
s32 phi_v0;
? *phi_a2;
u8 *phi_v0_2;
? *phi_v1_2;
s32 phi_v0_3;
? *phi_s1;
? *phi_s5;
s32 phi_s3;
? *phi_s4;
phi_a1 = &D_803B1A30;
phi_a2 = &D_803B1A30;
do {
phi_a1->unk44 = 0;
phi_a1->unk0 = phi_a1->unk0 & 0xFF7F;
phi_v1 = phi_a2;
phi_v0 = 0;
phi_v0_3 = 0;
loop_2:
temp_v0 = phi_v0 + 4;
phi_v1->unk4C = 0;
phi_v1->unk50 = 0;
phi_v1->unk54 = 0;
temp_v1 = phi_v1 + 0x10;
temp_v1->unk38 = 0;
phi_v1 = temp_v1;
phi_v0 = temp_v0;
if (temp_v0 != 0x40) {
goto loop_2;
}
temp_a2 = phi_a2 + 0xC4;
temp_a1 = phi_a1 + 0xC4;
phi_a1 = temp_a1;
phi_a2 = temp_a2;
} while (temp_a2 < &D_803B3EF0);
func_800BF084(0x40, temp_a1, temp_a2, &D_803B3EF0);
phi_v0_2 = &D_803B3EF0;
do {
temp_v0_2 = phi_v0_2 + 0x80;
temp_v0_2->unk-34 = 0;
temp_v0_2->unk-80 = *phi_v0_2 & 0xFF7F;
phi_v0_2 = temp_v0_2;
} while (temp_v0_2 < &D_803B5EF0);
phi_s1 = &D_803B1510;
phi_s5 = &D_803B15A4;
phi_s3 = 0;
phi_s4 = &D_803B1510;
do {
phi_v1_2 = phi_s4;
loop_8:
temp_v0_3 = phi_v0_3 + 4;
phi_v1_2->unk34 = &D_803B5EF0;
phi_v1_2->unk38 = &D_803B5EF0;
phi_v1_2->unk3C = &D_803B5EF0;
temp_v1_2 = phi_v1_2 + 0x10;
temp_v1_2->unk20 = &D_803B5EF0;
phi_v1_2 = temp_v1_2;
phi_v0_3 = temp_v0_3;
if (temp_v0_3 != 0x10) {
goto loop_8;
}
phi_s1->unk7 = -1;
phi_s1->unk3 = 0xE0;
temp_t4 = phi_s1->unk0 & 0xFF7F;
temp_t6 = temp_t4 & 0xDF;
phi_s1->unk0 = temp_t4;
temp_t8 = temp_t6 & 0xF7;
phi_s1->unk0 = temp_t6;
phi_s1->unk0 = temp_t8;
phi_s1->unk0 = temp_t8 & 0xEF;
func_800BD318(phi_s5);
func_800C11B0(phi_s3);
temp_s3 = phi_s3 + 1;
phi_s1 += 0x148;
phi_s5 += 0x148;
phi_s3 = temp_s3;
phi_s4 += 0x148;
} while (temp_s3 != 4);
}
#else
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800C125C.s")
#endif