From 6711e4183520001378d5b18058c95f8804e529bf Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Fri, 19 Nov 2021 18:42:01 +1000 Subject: [PATCH] Decompile func00041600 --- src/include/lib/lib_3e8c0.h | 2 +- src/include/types.h | 10 +- src/lib/lib_3f8a0.c | 1083 ++++++----------------------------- 3 files changed, 181 insertions(+), 914 deletions(-) diff --git a/src/include/lib/lib_3e8c0.h b/src/include/lib/lib_3e8c0.h index 759d7766e..8e4e0570f 100644 --- a/src/include/lib/lib_3e8c0.h +++ b/src/include/lib/lib_3e8c0.h @@ -41,7 +41,7 @@ extern const u32 var70057750[]; bool func0003f8a0(void); bool func00040164(struct asistream *stream, u32 gr, u32 ch); bool mp3decUnpackScaleFac(struct asistream *stream, u32 gr, u32 ch); -void func00041600(struct asistream *stream, u32 gr, u32 ch); +bool func00041600(struct asistream *stream, u32 gr, u32 ch); bool func00042238(struct asistream *stream, u32 gr, u32 ch); bool func000427d8(struct asistream *stream, u32 gr); bool mp3decReduceAliases(struct asistream *stream, u32 gr, u32 ch); diff --git a/src/include/types.h b/src/include/types.h index 3339672c4..a4e276269 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -7408,8 +7408,14 @@ struct asistream { /*0x3d60*/ u8 unk3d60[4]; /*0x3d64*/ u8 scalefac_s[4]; /*0x3d68*/ u8 unk3d68[0x2c]; - /*0x3d94*/ u8 unk3d94[0x6c]; - /*0x3e00*/ u8 unk3e00[0x17c]; + /*0x3d94*/ u8 unk3d94[4]; + /*0x3d98*/ u8 unk3d98[0x34]; + /*0x3dcc*/ u8 unk3dcc[0x34]; + /*0x3e00*/ u8 unk3e00[0xf8]; + /*0x3ef8*/ u32 unk3ef8; + /*0x3efc*/ u32 unk3efc[6]; + /*0x3f14*/ u32 unk3f14[1]; + /*0x3f18*/ u8 unk3f18[0x64]; /*0x3f7c*/ s32 unk3f7c; /*0x3f80*/ s32 unk3f80; /*0x3f84*/ s32 unk3f84; diff --git a/src/lib/lib_3f8a0.c b/src/lib/lib_3f8a0.c index 828f37389..56b1981bf 100644 --- a/src/lib/lib_3f8a0.c +++ b/src/lib/lib_3f8a0.c @@ -3844,918 +3844,179 @@ bool mp3decUnpackScaleFac(struct asistream *stream, u32 gr, u32 ch) return true; } -const u32 var70059b34[] = {0x00000006}; -const u32 var70059b38[] = {0x00000005}; -const u32 var70059b3c[] = {0x00000005}; -const u32 var70059b40[] = {0x00000005}; -const u32 var70059b44[] = {0x00000009}; -const u32 var70059b48[] = {0x00000009}; -const u32 var70059b4c[] = {0x00000009}; -const u32 var70059b50[] = {0x00000009}; -const u32 var70059b54[] = {0x00000006}; -const u32 var70059b58[] = {0x00000009}; -const u32 var70059b5c[] = {0x00000009}; -const u32 var70059b60[] = {0x00000009}; -const u32 var70059b64[] = {0x00000006}; -const u32 var70059b68[] = {0x00000005}; -const u32 var70059b6c[] = {0x00000007}; -const u32 var70059b70[] = {0x00000003}; -const u32 var70059b74[] = {0x00000009}; -const u32 var70059b78[] = {0x00000009}; -const u32 var70059b7c[] = {0x0000000c}; -const u32 var70059b80[] = {0x00000006}; -const u32 var70059b84[] = {0x00000006}; -const u32 var70059b88[] = {0x00000009}; -const u32 var70059b8c[] = {0x0000000c}; -const u32 var70059b90[] = {0x00000006}; -const u32 var70059b94[] = {0x0000000b}; -const u32 var70059b98[] = {0x0000000a}; -const u32 var70059b9c[] = {0x00000000}; -const u32 var70059ba0[] = {0x00000000}; -const u32 var70059ba4[] = {0x00000012}; -const u32 var70059ba8[] = {0x00000012}; -const u32 var70059bac[] = {0x00000000}; -const u32 var70059bb0[] = {0x00000000}; -const u32 var70059bb4[] = {0x0000000f}; -const u32 var70059bb8[] = {0x00000012}; -const u32 var70059bbc[] = {0x00000000}; -const u32 var70059bc0[] = {0x00000000}; -const u32 var70059bc4[] = {0x00000007}; -const u32 var70059bc8[] = {0x00000007}; -const u32 var70059bcc[] = {0x00000007}; -const u32 var70059bd0[] = {0x00000000}; -const u32 var70059bd4[] = {0x0000000c}; -const u32 var70059bd8[] = {0x0000000c}; -const u32 var70059bdc[] = {0x0000000c}; -const u32 var70059be0[] = {0x00000000}; -const u32 var70059be4[] = {0x00000006}; -const u32 var70059be8[] = {0x0000000f}; -const u32 var70059bec[] = {0x0000000c}; -const u32 var70059bf0[] = {0x00000000}; -const u32 var70059bf4[] = {0x00000006}; -const u32 var70059bf8[] = {0x00000006}; -const u32 var70059bfc[] = {0x00000006}; -const u32 var70059c00[] = {0x00000003}; -const u32 var70059c04[] = {0x0000000c}; -const u32 var70059c08[] = {0x00000009}; -const u32 var70059c0c[] = {0x00000009}; -const u32 var70059c10[] = {0x00000006}; -const u32 var70059c14[] = {0x00000006}; -const u32 var70059c18[] = {0x0000000c}; -const u32 var70059c1c[] = {0x00000009}; -const u32 var70059c20[] = {0x00000006}; -const u32 var70059c24[] = {0x00000008}; -const u32 var70059c28[] = {0x00000008}; -const u32 var70059c2c[] = {0x00000005}; -const u32 var70059c30[] = {0x00000000}; -const u32 var70059c34[] = {0x0000000f}; -const u32 var70059c38[] = {0x0000000c}; -const u32 var70059c3c[] = {0x00000009}; -const u32 var70059c40[] = {0x00000000}; -const u32 var70059c44[] = {0x00000006}; -const u32 var70059c48[] = {0x00000012}; -const u32 var70059c4c[] = {0x00000009}; -const u32 var70059c50[] = {0x00000000}; +bool func00041600(struct asistream *stream, u32 gr, u32 ch) +{ + const s32 sp70[2][3][3][4] = { + { + { { 6, 5, 5, 5 }, { 9, 9, 9, 9 }, { 6, 9, 9, 9 } }, + { { 6, 5, 7, 3 }, { 9, 9, 12, 6 }, { 6, 9, 12, 6 } }, + { { 11, 10, 0, 0 }, { 18, 18, 0, 0 }, { 15, 18, 0, 0 } }, + }, { + { { 7, 7, 7, 0 }, { 12, 12, 12, 0 }, { 6, 15, 12, 0 } }, + { { 6, 6, 6, 3 }, { 12, 9, 9, 6 }, { 6, 12, 9, 6 } }, + { { 8, 8, 5, 0 }, { 15, 12, 9, 0 }, { 6, 18, 9, 0 } }, + }, + }; -GLOBAL_ASM( -glabel func00041600 -/* 41600: 27bdfe70 */ addiu $sp,$sp,-400 -/* 41604: afbf0014 */ sw $ra,0x14($sp) -/* 41608: afa40190 */ sw $a0,0x190($sp) -/* 4160c: afa50194 */ sw $a1,0x194($sp) -/* 41610: afa60198 */ sw $a2,0x198($sp) -/* 41614: 3c0f7006 */ lui $t7,%hi(var70059b34) -/* 41618: 25ef9b34 */ addiu $t7,$t7,%lo(var70059b34) -/* 4161c: 25e80120 */ addiu $t0,$t7,0x120 -/* 41620: 27ae0070 */ addiu $t6,$sp,0x70 -.L00041624: -/* 41624: 8df90000 */ lw $t9,0x0($t7) -/* 41628: 25ef000c */ addiu $t7,$t7,0xc -/* 4162c: 25ce000c */ addiu $t6,$t6,0xc -/* 41630: add9fff4 */ sw $t9,-0xc($t6) -/* 41634: 8df8fff8 */ lw $t8,-0x8($t7) -/* 41638: add8fff8 */ sw $t8,-0x8($t6) -/* 4163c: 8df9fffc */ lw $t9,-0x4($t7) -/* 41640: 15e8fff8 */ bne $t7,$t0,.L00041624 -/* 41644: add9fffc */ sw $t9,-0x4($t6) -/* 41648: 8faa0198 */ lw $t2,0x198($sp) -/* 4164c: 8fa90190 */ lw $t1,0x190($sp) -/* 41650: 000a5880 */ sll $t3,$t2,0x2 -/* 41654: 012b6021 */ addu $t4,$t1,$t3 -/* 41658: 8d8d3c90 */ lw $t5,0x3c90($t4) -/* 4165c: afad005c */ sw $t5,0x5c($sp) -/* 41660: 8faf0198 */ lw $t7,0x198($sp) -/* 41664: 8fa80190 */ lw $t0,0x190($sp) -/* 41668: 000f7080 */ sll $t6,$t7,0x2 -/* 4166c: 010ec021 */ addu $t8,$t0,$t6 -/* 41670: 27193cf0 */ addiu $t9,$t8,0x3cf0 -/* 41674: afb90058 */ sw $t9,0x58($sp) -/* 41678: 8fa90198 */ lw $t1,0x198($sp) -/* 4167c: 8faa0190 */ lw $t2,0x190($sp) -/* 41680: 00095880 */ sll $t3,$t1,0x2 -/* 41684: 014b6021 */ addu $t4,$t2,$t3 -/* 41688: 8d8d3ca8 */ lw $t5,0x3ca8($t4) -/* 4168c: afad0054 */ sw $t5,0x54($sp) -/* 41690: 8fa80198 */ lw $t0,0x198($sp) -/* 41694: 8faf0190 */ lw $t7,0x190($sp) -/* 41698: 00087080 */ sll $t6,$t0,0x2 -/* 4169c: 01eec021 */ addu $t8,$t7,$t6 -/* 416a0: 8f193ca0 */ lw $t9,0x3ca0($t8) -/* 416a4: afb90050 */ sw $t9,0x50($sp) -/* 416a8: 8faa0198 */ lw $t2,0x198($sp) -/* 416ac: 8fa90190 */ lw $t1,0x190($sp) -/* 416b0: 000a5880 */ sll $t3,$t2,0x2 -/* 416b4: 012b6021 */ addu $t4,$t1,$t3 -/* 416b8: 8d8d3c98 */ lw $t5,0x3c98($t4) -/* 416bc: afad004c */ sw $t5,0x4c($sp) -/* 416c0: 8fa80190 */ lw $t0,0x190($sp) -/* 416c4: 24010001 */ addiu $at,$zero,0x1 -/* 416c8: 8d0f3bc4 */ lw $t7,0x3bc4($t0) -/* 416cc: 11e10004 */ beq $t7,$at,.L000416e0 -/* 416d0: 00000000 */ nop -/* 416d4: 24010003 */ addiu $at,$zero,0x3 -/* 416d8: 15e10005 */ bne $t7,$at,.L000416f0 -/* 416dc: 00000000 */ nop -.L000416e0: -/* 416e0: 8fae0198 */ lw $t6,0x198($sp) -/* 416e4: 24010001 */ addiu $at,$zero,0x1 -/* 416e8: 11c10074 */ beq $t6,$at,.L000418bc -/* 416ec: 00000000 */ nop -.L000416f0: -/* 416f0: afa00048 */ sw $zero,0x48($sp) -/* 416f4: 8fb8005c */ lw $t8,0x5c($sp) -/* 416f8: 2b010190 */ slti $at,$t8,0x190 -/* 416fc: 10200026 */ beqz $at,.L00041798 -/* 41700: 00000000 */ nop -/* 41704: 8fb9005c */ lw $t9,0x5c($sp) -/* 41708: 24010005 */ addiu $at,$zero,0x5 -/* 4170c: 27ab0060 */ addiu $t3,$sp,0x60 -/* 41710: 00195103 */ sra $t2,$t9,0x4 -/* 41714: 0141001a */ div $zero,$t2,$at -/* 41718: 00004812 */ mflo $t1 -/* 4171c: ad690000 */ sw $t1,0x0($t3) -/* 41720: 00000000 */ nop -/* 41724: 8fac005c */ lw $t4,0x5c($sp) -/* 41728: 24010005 */ addiu $at,$zero,0x5 -/* 4172c: 27af0060 */ addiu $t7,$sp,0x60 -/* 41730: 000c6903 */ sra $t5,$t4,0x4 -/* 41734: 01a1001a */ div $zero,$t5,$at -/* 41738: 00004010 */ mfhi $t0 -/* 4173c: ade80004 */ sw $t0,0x4($t7) -/* 41740: 00000000 */ nop -/* 41744: 8fae005c */ lw $t6,0x5c($sp) -/* 41748: 27aa0060 */ addiu $t2,$sp,0x60 -/* 4174c: 05c10004 */ bgez $t6,.L00041760 -/* 41750: 31d8000f */ andi $t8,$t6,0xf -/* 41754: 13000002 */ beqz $t8,.L00041760 -/* 41758: 00000000 */ nop -/* 4175c: 2718fff0 */ addiu $t8,$t8,-16 -.L00041760: -/* 41760: 0018c883 */ sra $t9,$t8,0x2 -/* 41764: ad590008 */ sw $t9,0x8($t2) -/* 41768: 8fa9005c */ lw $t1,0x5c($sp) -/* 4176c: 27ac0060 */ addiu $t4,$sp,0x60 -/* 41770: 05210004 */ bgez $t1,.L00041784 -/* 41774: 312b0003 */ andi $t3,$t1,0x3 -/* 41778: 11600002 */ beqz $t3,.L00041784 -/* 4177c: 00000000 */ nop -/* 41780: 256bfffc */ addiu $t3,$t3,-4 -.L00041784: -/* 41784: ad8b000c */ sw $t3,0xc($t4) -/* 41788: 8fad0058 */ lw $t5,0x58($sp) -/* 4178c: ada00000 */ sw $zero,0x0($t5) -/* 41790: 1000004a */ b .L000418bc -/* 41794: afa00044 */ sw $zero,0x44($sp) -.L00041798: -/* 41798: 8fa8005c */ lw $t0,0x5c($sp) -/* 4179c: 29010190 */ slti $at,$t0,0x190 -/* 417a0: 14200026 */ bnez $at,.L0004183c -/* 417a4: 00000000 */ nop -/* 417a8: 290101f4 */ slti $at,$t0,0x1f4 -/* 417ac: 10200023 */ beqz $at,.L0004183c -/* 417b0: 00000000 */ nop -/* 417b4: 8faf005c */ lw $t7,0x5c($sp) -/* 417b8: 24010005 */ addiu $at,$zero,0x5 -/* 417bc: 27aa0060 */ addiu $t2,$sp,0x60 -/* 417c0: 25eefe70 */ addiu $t6,$t7,-400 -/* 417c4: 000ec083 */ sra $t8,$t6,0x2 -/* 417c8: 0301001a */ div $zero,$t8,$at -/* 417cc: 0000c812 */ mflo $t9 -/* 417d0: ad590000 */ sw $t9,0x0($t2) -/* 417d4: 00000000 */ nop -/* 417d8: 8fa9005c */ lw $t1,0x5c($sp) -/* 417dc: 24010005 */ addiu $at,$zero,0x5 -/* 417e0: 27a80060 */ addiu $t0,$sp,0x60 -/* 417e4: 252bfe70 */ addiu $t3,$t1,-400 -/* 417e8: 000b6083 */ sra $t4,$t3,0x2 -/* 417ec: 0181001a */ div $zero,$t4,$at -/* 417f0: 00006810 */ mfhi $t5 -/* 417f4: ad0d0004 */ sw $t5,0x4($t0) -/* 417f8: 00000000 */ nop -/* 417fc: 8faf005c */ lw $t7,0x5c($sp) -/* 41800: 27b90060 */ addiu $t9,$sp,0x60 -/* 41804: 25eefe70 */ addiu $t6,$t7,-400 -/* 41808: 05c10004 */ bgez $t6,.L0004181c -/* 4180c: 31d80003 */ andi $t8,$t6,0x3 -/* 41810: 13000002 */ beqz $t8,.L0004181c -/* 41814: 00000000 */ nop -/* 41818: 2718fffc */ addiu $t8,$t8,-4 -.L0004181c: -/* 4181c: af380008 */ sw $t8,0x8($t9) -/* 41820: 27aa0060 */ addiu $t2,$sp,0x60 -/* 41824: ad40000c */ sw $zero,0xc($t2) -/* 41828: 8fa90058 */ lw $t1,0x58($sp) -/* 4182c: ad200000 */ sw $zero,0x0($t1) -/* 41830: 240b0001 */ addiu $t3,$zero,0x1 -/* 41834: 10000021 */ b .L000418bc -/* 41838: afab0044 */ sw $t3,0x44($sp) -.L0004183c: -/* 4183c: 8fac005c */ lw $t4,0x5c($sp) -/* 41840: 298101f4 */ slti $at,$t4,0x1f4 -/* 41844: 1420001d */ bnez $at,.L000418bc -/* 41848: 00000000 */ nop -/* 4184c: 29810200 */ slti $at,$t4,0x200 -/* 41850: 1020001a */ beqz $at,.L000418bc -/* 41854: 00000000 */ nop -/* 41858: 8fad005c */ lw $t5,0x5c($sp) -/* 4185c: 24010003 */ addiu $at,$zero,0x3 -/* 41860: 27ae0060 */ addiu $t6,$sp,0x60 -/* 41864: 25a8fe0c */ addiu $t0,$t5,-500 -/* 41868: 0101001a */ div $zero,$t0,$at -/* 4186c: 00007812 */ mflo $t7 -/* 41870: adcf0000 */ sw $t7,0x0($t6) -/* 41874: 00000000 */ nop -/* 41878: 8fb8005c */ lw $t8,0x5c($sp) -/* 4187c: 24010003 */ addiu $at,$zero,0x3 -/* 41880: 27a90060 */ addiu $t1,$sp,0x60 -/* 41884: 2719fe0c */ addiu $t9,$t8,-500 -/* 41888: 0321001a */ div $zero,$t9,$at -/* 4188c: 00005010 */ mfhi $t2 -/* 41890: ad2a0004 */ sw $t2,0x4($t1) -/* 41894: 00000000 */ nop -/* 41898: 27ab0060 */ addiu $t3,$sp,0x60 -/* 4189c: ad600008 */ sw $zero,0x8($t3) -/* 418a0: 27ac0060 */ addiu $t4,$sp,0x60 -/* 418a4: ad80000c */ sw $zero,0xc($t4) -/* 418a8: 8fa80058 */ lw $t0,0x58($sp) -/* 418ac: 240d0001 */ addiu $t5,$zero,0x1 -/* 418b0: ad0d0000 */ sw $t5,0x0($t0) -/* 418b4: 240f0002 */ addiu $t7,$zero,0x2 -/* 418b8: afaf0044 */ sw $t7,0x44($sp) -.L000418bc: -/* 418bc: 8fae0190 */ lw $t6,0x190($sp) -/* 418c0: 24010001 */ addiu $at,$zero,0x1 -/* 418c4: 8dd83bc4 */ lw $t8,0x3bc4($t6) -/* 418c8: 13010004 */ beq $t8,$at,.L000418dc -/* 418cc: 00000000 */ nop -/* 418d0: 24010003 */ addiu $at,$zero,0x3 -/* 418d4: 17010083 */ bne $t8,$at,.L00041ae4 -/* 418d8: 00000000 */ nop -.L000418dc: -/* 418dc: 8fb90198 */ lw $t9,0x198($sp) -/* 418e0: 24010001 */ addiu $at,$zero,0x1 -/* 418e4: 1721007f */ bne $t9,$at,.L00041ae4 -/* 418e8: 00000000 */ nop -/* 418ec: 8faa005c */ lw $t2,0x5c($sp) -/* 418f0: 8fab0190 */ lw $t3,0x190($sp) -/* 418f4: 05410004 */ bgez $t2,.L00041908 -/* 418f8: 31490001 */ andi $t1,$t2,0x1 -/* 418fc: 11200002 */ beqz $t1,.L00041908 -/* 41900: 00000000 */ nop -/* 41904: 2529fffe */ addiu $t1,$t1,-2 -.L00041908: -/* 41908: ad693ef8 */ sw $t1,0x3ef8($t3) -/* 4190c: 8fac005c */ lw $t4,0x5c($sp) -/* 41910: 000c6843 */ sra $t5,$t4,0x1 -/* 41914: afad0038 */ sw $t5,0x38($sp) -/* 41918: 24080001 */ addiu $t0,$zero,0x1 -/* 4191c: afa80048 */ sw $t0,0x48($sp) -/* 41920: 8faf0038 */ lw $t7,0x38($sp) -/* 41924: 29e100b4 */ slti $at,$t7,0xb4 -/* 41928: 10200024 */ beqz $at,.L000419bc -/* 4192c: 00000000 */ nop -/* 41930: 8fae0038 */ lw $t6,0x38($sp) -/* 41934: 24010024 */ addiu $at,$zero,0x24 -/* 41938: 27b90060 */ addiu $t9,$sp,0x60 -/* 4193c: 01c1001a */ div $zero,$t6,$at -/* 41940: 0000c012 */ mflo $t8 -/* 41944: af380000 */ sw $t8,0x0($t9) -/* 41948: 00000000 */ nop -/* 4194c: 8faa0038 */ lw $t2,0x38($sp) -/* 41950: 24010024 */ addiu $at,$zero,0x24 -/* 41954: 27ac0060 */ addiu $t4,$sp,0x60 -/* 41958: 0141001a */ div $zero,$t2,$at -/* 4195c: 00004810 */ mfhi $t1 -/* 41960: 24010006 */ addiu $at,$zero,0x6 -/* 41964: 00000000 */ nop -/* 41968: 0121001a */ div $zero,$t1,$at -/* 4196c: 00005812 */ mflo $t3 -/* 41970: ad8b0004 */ sw $t3,0x4($t4) -/* 41974: 00000000 */ nop -/* 41978: 8fad0038 */ lw $t5,0x38($sp) -/* 4197c: 24010024 */ addiu $at,$zero,0x24 -/* 41980: 27ae0060 */ addiu $t6,$sp,0x60 -/* 41984: 01a1001a */ div $zero,$t5,$at -/* 41988: 00004010 */ mfhi $t0 -/* 4198c: 24010006 */ addiu $at,$zero,0x6 -/* 41990: 00000000 */ nop -/* 41994: 0101001a */ div $zero,$t0,$at -/* 41998: 00007810 */ mfhi $t7 -/* 4199c: adcf0008 */ sw $t7,0x8($t6) -/* 419a0: 00000000 */ nop -/* 419a4: 27b80060 */ addiu $t8,$sp,0x60 -/* 419a8: af00000c */ sw $zero,0xc($t8) -/* 419ac: 8fb90058 */ lw $t9,0x58($sp) -/* 419b0: af200000 */ sw $zero,0x0($t9) -/* 419b4: 1000004b */ b .L00041ae4 -/* 419b8: afa00044 */ sw $zero,0x44($sp) -.L000419bc: -/* 419bc: 8faa0038 */ lw $t2,0x38($sp) -/* 419c0: 294100b4 */ slti $at,$t2,0xb4 -/* 419c4: 14200028 */ bnez $at,.L00041a68 -/* 419c8: 00000000 */ nop -/* 419cc: 294100f4 */ slti $at,$t2,0xf4 -/* 419d0: 10200025 */ beqz $at,.L00041a68 -/* 419d4: 00000000 */ nop -/* 419d8: 8fa90038 */ lw $t1,0x38($sp) -/* 419dc: 27a80060 */ addiu $t0,$sp,0x60 -/* 419e0: 252bff4c */ addiu $t3,$t1,-180 -/* 419e4: 05610004 */ bgez $t3,.L000419f8 -/* 419e8: 316c003f */ andi $t4,$t3,0x3f -/* 419ec: 11800002 */ beqz $t4,.L000419f8 -/* 419f0: 00000000 */ nop -/* 419f4: 258cffc0 */ addiu $t4,$t4,-64 -.L000419f8: -/* 419f8: 000c6903 */ sra $t5,$t4,0x4 -/* 419fc: ad0d0000 */ sw $t5,0x0($t0) -/* 41a00: 8faf0038 */ lw $t7,0x38($sp) -/* 41a04: 27aa0060 */ addiu $t2,$sp,0x60 -/* 41a08: 25eeff4c */ addiu $t6,$t7,-180 -/* 41a0c: 05c10004 */ bgez $t6,.L00041a20 -/* 41a10: 31d8000f */ andi $t8,$t6,0xf -/* 41a14: 13000002 */ beqz $t8,.L00041a20 -/* 41a18: 00000000 */ nop -/* 41a1c: 2718fff0 */ addiu $t8,$t8,-16 -.L00041a20: -/* 41a20: 0018c883 */ sra $t9,$t8,0x2 -/* 41a24: ad590004 */ sw $t9,0x4($t2) -/* 41a28: 8fa90038 */ lw $t1,0x38($sp) -/* 41a2c: 27ad0060 */ addiu $t5,$sp,0x60 -/* 41a30: 252bff4c */ addiu $t3,$t1,-180 -/* 41a34: 05610004 */ bgez $t3,.L00041a48 -/* 41a38: 316c0003 */ andi $t4,$t3,0x3 -/* 41a3c: 11800002 */ beqz $t4,.L00041a48 -/* 41a40: 00000000 */ nop -/* 41a44: 258cfffc */ addiu $t4,$t4,-4 -.L00041a48: -/* 41a48: adac0008 */ sw $t4,0x8($t5) -/* 41a4c: 27a80060 */ addiu $t0,$sp,0x60 -/* 41a50: ad00000c */ sw $zero,0xc($t0) -/* 41a54: 8faf0058 */ lw $t7,0x58($sp) -/* 41a58: ade00000 */ sw $zero,0x0($t7) -/* 41a5c: 240e0001 */ addiu $t6,$zero,0x1 -/* 41a60: 10000020 */ b .L00041ae4 -/* 41a64: afae0044 */ sw $t6,0x44($sp) -.L00041a68: -/* 41a68: 8fb80038 */ lw $t8,0x38($sp) -/* 41a6c: 2b0100f4 */ slti $at,$t8,0xf4 -/* 41a70: 1420001c */ bnez $at,.L00041ae4 -/* 41a74: 00000000 */ nop -/* 41a78: 2b0100ff */ slti $at,$t8,0xff -/* 41a7c: 10200019 */ beqz $at,.L00041ae4 -/* 41a80: 00000000 */ nop -/* 41a84: 8fb90038 */ lw $t9,0x38($sp) -/* 41a88: 24010003 */ addiu $at,$zero,0x3 -/* 41a8c: 27ab0060 */ addiu $t3,$sp,0x60 -/* 41a90: 272aff0c */ addiu $t2,$t9,-244 -/* 41a94: 0141001a */ div $zero,$t2,$at -/* 41a98: 00004812 */ mflo $t1 -/* 41a9c: ad690000 */ sw $t1,0x0($t3) -/* 41aa0: 00000000 */ nop -/* 41aa4: 8fac0038 */ lw $t4,0x38($sp) -/* 41aa8: 24010003 */ addiu $at,$zero,0x3 -/* 41aac: 27af0060 */ addiu $t7,$sp,0x60 -/* 41ab0: 258dff0c */ addiu $t5,$t4,-244 -/* 41ab4: 01a1001a */ div $zero,$t5,$at -/* 41ab8: 00004010 */ mfhi $t0 -/* 41abc: ade80004 */ sw $t0,0x4($t7) -/* 41ac0: 00000000 */ nop -/* 41ac4: 27ae0060 */ addiu $t6,$sp,0x60 -/* 41ac8: adc00008 */ sw $zero,0x8($t6) -/* 41acc: 27b80060 */ addiu $t8,$sp,0x60 -/* 41ad0: af00000c */ sw $zero,0xc($t8) -/* 41ad4: 8fb90058 */ lw $t9,0x58($sp) -/* 41ad8: af200000 */ sw $zero,0x0($t9) -/* 41adc: 240a0002 */ addiu $t2,$zero,0x2 -/* 41ae0: afaa0044 */ sw $t2,0x44($sp) -.L00041ae4: -/* 41ae4: 8fa9004c */ lw $t1,0x4c($sp) -/* 41ae8: 11200019 */ beqz $t1,.L00041b50 -/* 41aec: 00000000 */ nop -/* 41af0: 8fab0050 */ lw $t3,0x50($sp) -/* 41af4: 24010002 */ addiu $at,$zero,0x2 -/* 41af8: 15610015 */ bne $t3,$at,.L00041b50 -/* 41afc: 00000000 */ nop -/* 41b00: 8fac0048 */ lw $t4,0x48($sp) -/* 41b04: 8fa80044 */ lw $t0,0x44($sp) -/* 41b08: 8fb80054 */ lw $t8,0x54($sp) -/* 41b0c: 000c68c0 */ sll $t5,$t4,0x3 -/* 41b10: 00087880 */ sll $t7,$t0,0x2 -/* 41b14: 01ac6821 */ addu $t5,$t5,$t4 -/* 41b18: 01e87823 */ subu $t7,$t7,$t0 -/* 41b1c: 000f7900 */ sll $t7,$t7,0x4 -/* 41b20: 000d6900 */ sll $t5,$t5,0x4 -/* 41b24: 01af7021 */ addu $t6,$t5,$t7 -/* 41b28: 0018c900 */ sll $t9,$t8,0x4 -/* 41b2c: 01d95021 */ addu $t2,$t6,$t9 -/* 41b30: 25490010 */ addiu $t1,$t2,0x10 -/* 41b34: 27ab0070 */ addiu $t3,$sp,0x70 -/* 41b38: 012b2021 */ addu $a0,$t1,$t3 -/* 41b3c: 27a50028 */ addiu $a1,$sp,0x28 -/* 41b40: 0c012c5c */ jal bcopy -/* 41b44: 24060010 */ addiu $a2,$zero,0x10 -/* 41b48: 1000000f */ b .L00041b88 -/* 41b4c: 00000000 */ nop -.L00041b50: -/* 41b50: 8fac0048 */ lw $t4,0x48($sp) -/* 41b54: 8fad0044 */ lw $t5,0x44($sp) -/* 41b58: 27ae0070 */ addiu $t6,$sp,0x70 -/* 41b5c: 000c40c0 */ sll $t0,$t4,0x3 -/* 41b60: 000d7880 */ sll $t7,$t5,0x2 -/* 41b64: 010c4021 */ addu $t0,$t0,$t4 -/* 41b68: 01ed7823 */ subu $t7,$t7,$t5 -/* 41b6c: 000f7900 */ sll $t7,$t7,0x4 -/* 41b70: 00084100 */ sll $t0,$t0,0x4 -/* 41b74: 010fc021 */ addu $t8,$t0,$t7 -/* 41b78: 030e2021 */ addu $a0,$t8,$t6 -/* 41b7c: 27a50028 */ addiu $a1,$sp,0x28 -/* 41b80: 0c012c5c */ jal bcopy -/* 41b84: 24060010 */ addiu $a2,$zero,0x10 -.L00041b88: -/* 41b88: afa00024 */ sw $zero,0x24($sp) -/* 41b8c: 8fb9004c */ lw $t9,0x4c($sp) -/* 41b90: 13200007 */ beqz $t9,.L00041bb0 -/* 41b94: 00000000 */ nop -/* 41b98: 13200051 */ beqz $t9,.L00041ce0 -/* 41b9c: 00000000 */ nop -/* 41ba0: 8faa0050 */ lw $t2,0x50($sp) -/* 41ba4: 24010002 */ addiu $at,$zero,0x2 -/* 41ba8: 1141004d */ beq $t2,$at,.L00041ce0 -/* 41bac: 00000000 */ nop -.L00041bb0: -/* 41bb0: afa00040 */ sw $zero,0x40($sp) -.L00041bb4: -/* 41bb4: 8fa90040 */ lw $t1,0x40($sp) -/* 41bb8: 00095880 */ sll $t3,$t1,0x2 -/* 41bbc: 03ab6021 */ addu $t4,$sp,$t3 -/* 41bc0: 8d8c0060 */ lw $t4,0x60($t4) -/* 41bc4: afac0020 */ sw $t4,0x20($sp) -/* 41bc8: 8fad0020 */ lw $t5,0x20($sp) -/* 41bcc: 24080001 */ addiu $t0,$zero,0x1 -/* 41bd0: 01a87804 */ sllv $t7,$t0,$t5 -/* 41bd4: 25f8ffff */ addiu $t8,$t7,-1 -/* 41bd8: afb8001c */ sw $t8,0x1c($sp) -/* 41bdc: 8fae0040 */ lw $t6,0x40($sp) -/* 41be0: afa0003c */ sw $zero,0x3c($sp) -/* 41be4: 000ec880 */ sll $t9,$t6,0x2 -/* 41be8: 03b95021 */ addu $t2,$sp,$t9 -/* 41bec: 8d4a0028 */ lw $t2,0x28($t2) -/* 41bf0: 19400034 */ blez $t2,.L00041cc4 -/* 41bf4: 00000000 */ nop -.L00041bf8: -/* 41bf8: 8fa90020 */ lw $t1,0x20($sp) -/* 41bfc: 11200011 */ beqz $t1,.L00041c44 -/* 41c00: 00000000 */ nop -/* 41c04: 8fab0190 */ lw $t3,0x190($sp) -/* 41c08: 01203025 */ or $a2,$t1,$zero -/* 41c0c: 2564001c */ addiu $a0,$t3,0x1c -/* 41c10: 0c0118b1 */ jal mp3decGetBits -/* 41c14: 25652020 */ addiu $a1,$t3,0x2020 -/* 41c18: 8fa80198 */ lw $t0,0x198($sp) -/* 41c1c: 8fac0190 */ lw $t4,0x190($sp) -/* 41c20: 8fb80024 */ lw $t8,0x24($sp) -/* 41c24: 00086940 */ sll $t5,$t0,0x5 -/* 41c28: 01a86823 */ subu $t5,$t5,$t0 -/* 41c2c: 000d68c0 */ sll $t5,$t5,0x3 -/* 41c30: 018d7821 */ addu $t7,$t4,$t5 -/* 41c34: 00187080 */ sll $t6,$t8,0x2 -/* 41c38: 01eec821 */ addu $t9,$t7,$t6 -/* 41c3c: 1000000b */ b .L00041c6c -/* 41c40: af223d08 */ sw $v0,0x3d08($t9) -.L00041c44: -/* 41c44: 8fab0198 */ lw $t3,0x198($sp) -/* 41c48: 8faa0190 */ lw $t2,0x190($sp) -/* 41c4c: 8fac0024 */ lw $t4,0x24($sp) -/* 41c50: 000b4940 */ sll $t1,$t3,0x5 -/* 41c54: 012b4823 */ subu $t1,$t1,$t3 -/* 41c58: 000948c0 */ sll $t1,$t1,0x3 -/* 41c5c: 01494021 */ addu $t0,$t2,$t1 -/* 41c60: 000c6880 */ sll $t5,$t4,0x2 -/* 41c64: 010dc021 */ addu $t8,$t0,$t5 -/* 41c68: af003d08 */ sw $zero,0x3d08($t8) -.L00041c6c: -/* 41c6c: 8faf0198 */ lw $t7,0x198($sp) -/* 41c70: 11e00007 */ beqz $t7,.L00041c90 -/* 41c74: 00000000 */ nop -/* 41c78: 8fab0024 */ lw $t3,0x24($sp) -/* 41c7c: 8fb90190 */ lw $t9,0x190($sp) -/* 41c80: 8fae001c */ lw $t6,0x1c($sp) -/* 41c84: 000b5080 */ sll $t2,$t3,0x2 -/* 41c88: 032a4821 */ addu $t1,$t9,$t2 -/* 41c8c: ad2e3efc */ sw $t6,0x3efc($t1) -.L00041c90: -/* 41c90: 8fac0024 */ lw $t4,0x24($sp) -/* 41c94: 25880001 */ addiu $t0,$t4,0x1 -/* 41c98: afa80024 */ sw $t0,0x24($sp) -/* 41c9c: 8fad003c */ lw $t5,0x3c($sp) -/* 41ca0: 8faf0040 */ lw $t7,0x40($sp) -/* 41ca4: 25b80001 */ addiu $t8,$t5,0x1 -/* 41ca8: 000f5880 */ sll $t3,$t7,0x2 -/* 41cac: 03abc821 */ addu $t9,$sp,$t3 -/* 41cb0: afb8003c */ sw $t8,0x3c($sp) -/* 41cb4: 8f390028 */ lw $t9,0x28($t9) -/* 41cb8: 0319082a */ slt $at,$t8,$t9 -/* 41cbc: 1420ffce */ bnez $at,.L00041bf8 -/* 41cc0: 00000000 */ nop -.L00041cc4: -/* 41cc4: 8faa0040 */ lw $t2,0x40($sp) -/* 41cc8: 254e0001 */ addiu $t6,$t2,0x1 -/* 41ccc: 29c10004 */ slti $at,$t6,0x4 -/* 41cd0: 1420ffb8 */ bnez $at,.L00041bb4 -/* 41cd4: afae0040 */ sw $t6,0x40($sp) -/* 41cd8: 1000014f */ b .L00042218 -/* 41cdc: 00000000 */ nop -.L00041ce0: -/* 41ce0: 8fa90050 */ lw $t1,0x50($sp) -/* 41ce4: 24010002 */ addiu $at,$zero,0x2 -/* 41ce8: 1521014b */ bne $t1,$at,.L00042218 -/* 41cec: 00000000 */ nop -/* 41cf0: 8fac0054 */ lw $t4,0x54($sp) -/* 41cf4: 15800087 */ bnez $t4,.L00041f14 -/* 41cf8: 00000000 */ nop -/* 41cfc: afa00040 */ sw $zero,0x40($sp) -.L00041d00: -/* 41d00: 8fa80040 */ lw $t0,0x40($sp) -/* 41d04: 00086880 */ sll $t5,$t0,0x2 -/* 41d08: 03ad7821 */ addu $t7,$sp,$t5 -/* 41d0c: 8def0060 */ lw $t7,0x60($t7) -/* 41d10: afaf0020 */ sw $t7,0x20($sp) -/* 41d14: 8fab0020 */ lw $t3,0x20($sp) -/* 41d18: 24180001 */ addiu $t8,$zero,0x1 -/* 41d1c: 0178c804 */ sllv $t9,$t8,$t3 -/* 41d20: 272affff */ addiu $t2,$t9,-1 -/* 41d24: afaa001c */ sw $t2,0x1c($sp) -/* 41d28: 8fae0040 */ lw $t6,0x40($sp) -/* 41d2c: afa0003c */ sw $zero,0x3c($sp) -/* 41d30: 000e4880 */ sll $t1,$t6,0x2 -/* 41d34: 03a96021 */ addu $t4,$sp,$t1 -/* 41d38: 8d8c0028 */ lw $t4,0x28($t4) -/* 41d3c: 1980006e */ blez $t4,.L00041ef8 -/* 41d40: 00000000 */ nop -.L00041d44: -/* 41d44: 8fa80020 */ lw $t0,0x20($sp) -/* 41d48: 11000011 */ beqz $t0,.L00041d90 -/* 41d4c: 00000000 */ nop -/* 41d50: 8fad0190 */ lw $t5,0x190($sp) -/* 41d54: 01003025 */ or $a2,$t0,$zero -/* 41d58: 25a4001c */ addiu $a0,$t5,0x1c -/* 41d5c: 0c0118b1 */ jal mp3decGetBits -/* 41d60: 25a52020 */ addiu $a1,$t5,0x2020 -/* 41d64: 8fb80198 */ lw $t8,0x198($sp) -/* 41d68: 8faf0190 */ lw $t7,0x190($sp) -/* 41d6c: 8faa0024 */ lw $t2,0x24($sp) -/* 41d70: 00185940 */ sll $t3,$t8,0x5 -/* 41d74: 01785823 */ subu $t3,$t3,$t8 -/* 41d78: 000b58c0 */ sll $t3,$t3,0x3 -/* 41d7c: 01ebc821 */ addu $t9,$t7,$t3 -/* 41d80: 000a7080 */ sll $t6,$t2,0x2 -/* 41d84: 032e4821 */ addu $t1,$t9,$t6 -/* 41d88: 1000000b */ b .L00041db8 -/* 41d8c: ad223d64 */ sw $v0,0x3d64($t1) -.L00041d90: -/* 41d90: 8fad0198 */ lw $t5,0x198($sp) -/* 41d94: 8fac0190 */ lw $t4,0x190($sp) -/* 41d98: 8faf0024 */ lw $t7,0x24($sp) -/* 41d9c: 000d4140 */ sll $t0,$t5,0x5 -/* 41da0: 010d4023 */ subu $t0,$t0,$t5 -/* 41da4: 000840c0 */ sll $t0,$t0,0x3 -/* 41da8: 0188c021 */ addu $t8,$t4,$t0 -/* 41dac: 000f5880 */ sll $t3,$t7,0x2 -/* 41db0: 030b5021 */ addu $t2,$t8,$t3 -/* 41db4: ad403d64 */ sw $zero,0x3d64($t2) -.L00041db8: -/* 41db8: 8fb90020 */ lw $t9,0x20($sp) -/* 41dbc: 13200011 */ beqz $t9,.L00041e04 -/* 41dc0: 00000000 */ nop -/* 41dc4: 8fae0190 */ lw $t6,0x190($sp) -/* 41dc8: 03203025 */ or $a2,$t9,$zero -/* 41dcc: 25c4001c */ addiu $a0,$t6,0x1c -/* 41dd0: 0c0118b1 */ jal mp3decGetBits -/* 41dd4: 25c52020 */ addiu $a1,$t6,0x2020 -/* 41dd8: 8fad0198 */ lw $t5,0x198($sp) -/* 41ddc: 8fa90190 */ lw $t1,0x190($sp) -/* 41de0: 8faf0024 */ lw $t7,0x24($sp) -/* 41de4: 000d6140 */ sll $t4,$t5,0x5 -/* 41de8: 018d6023 */ subu $t4,$t4,$t5 -/* 41dec: 000c60c0 */ sll $t4,$t4,0x3 -/* 41df0: 012c4021 */ addu $t0,$t1,$t4 -/* 41df4: 000fc080 */ sll $t8,$t7,0x2 -/* 41df8: 01185821 */ addu $t3,$t0,$t8 -/* 41dfc: 1000000b */ b .L00041e2c -/* 41e00: ad623d98 */ sw $v0,0x3d98($t3) -.L00041e04: -/* 41e04: 8fae0198 */ lw $t6,0x198($sp) -/* 41e08: 8faa0190 */ lw $t2,0x190($sp) -/* 41e0c: 8fa90024 */ lw $t1,0x24($sp) -/* 41e10: 000ec940 */ sll $t9,$t6,0x5 -/* 41e14: 032ec823 */ subu $t9,$t9,$t6 -/* 41e18: 0019c8c0 */ sll $t9,$t9,0x3 -/* 41e1c: 01596821 */ addu $t5,$t2,$t9 -/* 41e20: 00096080 */ sll $t4,$t1,0x2 -/* 41e24: 01ac7821 */ addu $t7,$t5,$t4 -/* 41e28: ade03d98 */ sw $zero,0x3d98($t7) -.L00041e2c: -/* 41e2c: 8fa80020 */ lw $t0,0x20($sp) -/* 41e30: 11000011 */ beqz $t0,.L00041e78 -/* 41e34: 00000000 */ nop -/* 41e38: 8fb80190 */ lw $t8,0x190($sp) -/* 41e3c: 01003025 */ or $a2,$t0,$zero -/* 41e40: 2704001c */ addiu $a0,$t8,0x1c -/* 41e44: 0c0118b1 */ jal mp3decGetBits -/* 41e48: 27052020 */ addiu $a1,$t8,0x2020 -/* 41e4c: 8fae0198 */ lw $t6,0x198($sp) -/* 41e50: 8fab0190 */ lw $t3,0x190($sp) -/* 41e54: 8fa90024 */ lw $t1,0x24($sp) -/* 41e58: 000e5140 */ sll $t2,$t6,0x5 -/* 41e5c: 014e5023 */ subu $t2,$t2,$t6 -/* 41e60: 000a50c0 */ sll $t2,$t2,0x3 -/* 41e64: 016ac821 */ addu $t9,$t3,$t2 -/* 41e68: 00096880 */ sll $t5,$t1,0x2 -/* 41e6c: 032d6021 */ addu $t4,$t9,$t5 -/* 41e70: 1000000b */ b .L00041ea0 -/* 41e74: ad823dcc */ sw $v0,0x3dcc($t4) -.L00041e78: -/* 41e78: 8fb80198 */ lw $t8,0x198($sp) -/* 41e7c: 8faf0190 */ lw $t7,0x190($sp) -/* 41e80: 8fab0024 */ lw $t3,0x24($sp) -/* 41e84: 00184140 */ sll $t0,$t8,0x5 -/* 41e88: 01184023 */ subu $t0,$t0,$t8 -/* 41e8c: 000840c0 */ sll $t0,$t0,0x3 -/* 41e90: 01e87021 */ addu $t6,$t7,$t0 -/* 41e94: 000b5080 */ sll $t2,$t3,0x2 -/* 41e98: 01ca4821 */ addu $t1,$t6,$t2 -/* 41e9c: ad203dcc */ sw $zero,0x3dcc($t1) -.L00041ea0: -/* 41ea0: 8fb90198 */ lw $t9,0x198($sp) -/* 41ea4: 13200007 */ beqz $t9,.L00041ec4 -/* 41ea8: 00000000 */ nop -/* 41eac: 8fb80024 */ lw $t8,0x24($sp) -/* 41eb0: 8fac0190 */ lw $t4,0x190($sp) -/* 41eb4: 8fad001c */ lw $t5,0x1c($sp) -/* 41eb8: 00187880 */ sll $t7,$t8,0x2 -/* 41ebc: 018f4021 */ addu $t0,$t4,$t7 -/* 41ec0: ad0d3f14 */ sw $t5,0x3f14($t0) -.L00041ec4: -/* 41ec4: 8fab0024 */ lw $t3,0x24($sp) -/* 41ec8: 256e0001 */ addiu $t6,$t3,0x1 -/* 41ecc: afae0024 */ sw $t6,0x24($sp) -/* 41ed0: 8faa003c */ lw $t2,0x3c($sp) -/* 41ed4: 8fb90040 */ lw $t9,0x40($sp) -/* 41ed8: 25490003 */ addiu $t1,$t2,0x3 -/* 41edc: 0019c080 */ sll $t8,$t9,0x2 -/* 41ee0: 03b86021 */ addu $t4,$sp,$t8 -/* 41ee4: afa9003c */ sw $t1,0x3c($sp) -/* 41ee8: 8d8c0028 */ lw $t4,0x28($t4) -/* 41eec: 012c082a */ slt $at,$t1,$t4 -/* 41ef0: 1420ff94 */ bnez $at,.L00041d44 -/* 41ef4: 00000000 */ nop -.L00041ef8: -/* 41ef8: 8faf0040 */ lw $t7,0x40($sp) -/* 41efc: 25ed0001 */ addiu $t5,$t7,0x1 -/* 41f00: 29a10004 */ slti $at,$t5,0x4 -/* 41f04: 1420ff7e */ bnez $at,.L00041d00 -/* 41f08: afad0040 */ sw $t5,0x40($sp) -/* 41f0c: 100000c2 */ b .L00042218 -/* 41f10: 00000000 */ nop -.L00041f14: -/* 41f14: 27a80060 */ addiu $t0,$sp,0x60 -/* 41f18: 8d0b0000 */ lw $t3,0x0($t0) -/* 41f1c: afab0020 */ sw $t3,0x20($sp) -/* 41f20: 8fae0020 */ lw $t6,0x20($sp) -/* 41f24: 240a0001 */ addiu $t2,$zero,0x1 -/* 41f28: 01cac804 */ sllv $t9,$t2,$t6 -/* 41f2c: 2738ffff */ addiu $t8,$t9,-1 -/* 41f30: afb8001c */ sw $t8,0x1c($sp) -/* 41f34: afa0003c */ sw $zero,0x3c($sp) -.L00041f38: -/* 41f38: 8fa90020 */ lw $t1,0x20($sp) -/* 41f3c: 11200011 */ beqz $t1,.L00041f84 -/* 41f40: 00000000 */ nop -/* 41f44: 8fac0190 */ lw $t4,0x190($sp) -/* 41f48: 01203025 */ or $a2,$t1,$zero -/* 41f4c: 2584001c */ addiu $a0,$t4,0x1c -/* 41f50: 0c0118b1 */ jal mp3decGetBits -/* 41f54: 25852020 */ addiu $a1,$t4,0x2020 -/* 41f58: 8fad0198 */ lw $t5,0x198($sp) -/* 41f5c: 8faf0190 */ lw $t7,0x190($sp) -/* 41f60: 8faa0024 */ lw $t2,0x24($sp) -/* 41f64: 000d4140 */ sll $t0,$t5,0x5 -/* 41f68: 010d4023 */ subu $t0,$t0,$t5 -/* 41f6c: 000840c0 */ sll $t0,$t0,0x3 -/* 41f70: 01e85821 */ addu $t3,$t7,$t0 -/* 41f74: 000a7080 */ sll $t6,$t2,0x2 -/* 41f78: 016ec821 */ addu $t9,$t3,$t6 -/* 41f7c: 1000000b */ b .L00041fac -/* 41f80: af223d08 */ sw $v0,0x3d08($t9) -.L00041f84: -/* 41f84: 8fac0198 */ lw $t4,0x198($sp) -/* 41f88: 8fb80190 */ lw $t8,0x190($sp) -/* 41f8c: 8faf0024 */ lw $t7,0x24($sp) -/* 41f90: 000c4940 */ sll $t1,$t4,0x5 -/* 41f94: 012c4823 */ subu $t1,$t1,$t4 -/* 41f98: 000948c0 */ sll $t1,$t1,0x3 -/* 41f9c: 03096821 */ addu $t5,$t8,$t1 -/* 41fa0: 000f4080 */ sll $t0,$t7,0x2 -/* 41fa4: 01a85021 */ addu $t2,$t5,$t0 -/* 41fa8: ad403d08 */ sw $zero,0x3d08($t2) -.L00041fac: -/* 41fac: 8fab0198 */ lw $t3,0x198($sp) -/* 41fb0: 11600007 */ beqz $t3,.L00041fd0 -/* 41fb4: 00000000 */ nop -/* 41fb8: 8fac0024 */ lw $t4,0x24($sp) -/* 41fbc: 8fb90190 */ lw $t9,0x190($sp) -/* 41fc0: 8fae001c */ lw $t6,0x1c($sp) -/* 41fc4: 000cc080 */ sll $t8,$t4,0x2 -/* 41fc8: 03384821 */ addu $t1,$t9,$t8 -/* 41fcc: ad2e3efc */ sw $t6,0x3efc($t1) -.L00041fd0: -/* 41fd0: 8faf0024 */ lw $t7,0x24($sp) -/* 41fd4: 25ed0001 */ addiu $t5,$t7,0x1 -/* 41fd8: afad0024 */ sw $t5,0x24($sp) -/* 41fdc: 8fa8003c */ lw $t0,0x3c($sp) -/* 41fe0: 250a0001 */ addiu $t2,$t0,0x1 -/* 41fe4: 29410006 */ slti $at,$t2,0x6 -/* 41fe8: 1420ffd3 */ bnez $at,.L00041f38 -/* 41fec: afaa003c */ sw $t2,0x3c($sp) -/* 41ff0: 27ab0028 */ addiu $t3,$sp,0x28 -/* 41ff4: 8d6c0000 */ lw $t4,0x0($t3) -/* 41ff8: 2599fffa */ addiu $t9,$t4,-6 -/* 41ffc: ad790000 */ sw $t9,0x0($t3) -/* 42000: 24180003 */ addiu $t8,$zero,0x3 -/* 42004: afb80024 */ sw $t8,0x24($sp) -/* 42008: afa00040 */ sw $zero,0x40($sp) -.L0004200c: -/* 4200c: 8fae0040 */ lw $t6,0x40($sp) -/* 42010: 000e4880 */ sll $t1,$t6,0x2 -/* 42014: 03a97821 */ addu $t7,$sp,$t1 -/* 42018: 8def0060 */ lw $t7,0x60($t7) -/* 4201c: afaf0020 */ sw $t7,0x20($sp) -/* 42020: 8fad0020 */ lw $t5,0x20($sp) -/* 42024: 24080001 */ addiu $t0,$zero,0x1 -/* 42028: 01a85004 */ sllv $t2,$t0,$t5 -/* 4202c: 254cffff */ addiu $t4,$t2,-1 -/* 42030: afac001c */ sw $t4,0x1c($sp) -/* 42034: 8fb90040 */ lw $t9,0x40($sp) -/* 42038: afa0003c */ sw $zero,0x3c($sp) -/* 4203c: 00195880 */ sll $t3,$t9,0x2 -/* 42040: 03abc021 */ addu $t8,$sp,$t3 -/* 42044: 8f180028 */ lw $t8,0x28($t8) -/* 42048: 1b00006e */ blez $t8,.L00042204 -/* 4204c: 00000000 */ nop -.L00042050: -/* 42050: 8fae0020 */ lw $t6,0x20($sp) -/* 42054: 11c00011 */ beqz $t6,.L0004209c -/* 42058: 00000000 */ nop -/* 4205c: 8fa90190 */ lw $t1,0x190($sp) -/* 42060: 01c03025 */ or $a2,$t6,$zero -/* 42064: 2524001c */ addiu $a0,$t1,0x1c -/* 42068: 0c0118b1 */ jal mp3decGetBits -/* 4206c: 25252020 */ addiu $a1,$t1,0x2020 -/* 42070: 8fa80198 */ lw $t0,0x198($sp) -/* 42074: 8faf0190 */ lw $t7,0x190($sp) -/* 42078: 8fac0024 */ lw $t4,0x24($sp) -/* 4207c: 00086940 */ sll $t5,$t0,0x5 -/* 42080: 01a86823 */ subu $t5,$t5,$t0 -/* 42084: 000d68c0 */ sll $t5,$t5,0x3 -/* 42088: 01ed5021 */ addu $t2,$t7,$t5 -/* 4208c: 000cc880 */ sll $t9,$t4,0x2 -/* 42090: 01595821 */ addu $t3,$t2,$t9 -/* 42094: 1000000b */ b .L000420c4 -/* 42098: ad623d64 */ sw $v0,0x3d64($t3) -.L0004209c: -/* 4209c: 8fa90198 */ lw $t1,0x198($sp) -/* 420a0: 8fb80190 */ lw $t8,0x190($sp) -/* 420a4: 8faf0024 */ lw $t7,0x24($sp) -/* 420a8: 00097140 */ sll $t6,$t1,0x5 -/* 420ac: 01c97023 */ subu $t6,$t6,$t1 -/* 420b0: 000e70c0 */ sll $t6,$t6,0x3 -/* 420b4: 030e4021 */ addu $t0,$t8,$t6 -/* 420b8: 000f6880 */ sll $t5,$t7,0x2 -/* 420bc: 010d6021 */ addu $t4,$t0,$t5 -/* 420c0: ad803d64 */ sw $zero,0x3d64($t4) -.L000420c4: -/* 420c4: 8faa0020 */ lw $t2,0x20($sp) -/* 420c8: 11400011 */ beqz $t2,.L00042110 -/* 420cc: 00000000 */ nop -/* 420d0: 8fb90190 */ lw $t9,0x190($sp) -/* 420d4: 01403025 */ or $a2,$t2,$zero -/* 420d8: 2724001c */ addiu $a0,$t9,0x1c -/* 420dc: 0c0118b1 */ jal mp3decGetBits -/* 420e0: 27252020 */ addiu $a1,$t9,0x2020 -/* 420e4: 8fa90198 */ lw $t1,0x198($sp) -/* 420e8: 8fab0190 */ lw $t3,0x190($sp) -/* 420ec: 8faf0024 */ lw $t7,0x24($sp) -/* 420f0: 0009c140 */ sll $t8,$t1,0x5 -/* 420f4: 0309c023 */ subu $t8,$t8,$t1 -/* 420f8: 0018c0c0 */ sll $t8,$t8,0x3 -/* 420fc: 01787021 */ addu $t6,$t3,$t8 -/* 42100: 000f4080 */ sll $t0,$t7,0x2 -/* 42104: 01c86821 */ addu $t5,$t6,$t0 -/* 42108: 1000000b */ b .L00042138 -/* 4210c: ada23d98 */ sw $v0,0x3d98($t5) -.L00042110: -/* 42110: 8fb90198 */ lw $t9,0x198($sp) -/* 42114: 8fac0190 */ lw $t4,0x190($sp) -/* 42118: 8fab0024 */ lw $t3,0x24($sp) -/* 4211c: 00195140 */ sll $t2,$t9,0x5 -/* 42120: 01595023 */ subu $t2,$t2,$t9 -/* 42124: 000a50c0 */ sll $t2,$t2,0x3 -/* 42128: 018a4821 */ addu $t1,$t4,$t2 -/* 4212c: 000bc080 */ sll $t8,$t3,0x2 -/* 42130: 01387821 */ addu $t7,$t1,$t8 -/* 42134: ade03d98 */ sw $zero,0x3d98($t7) -.L00042138: -/* 42138: 8fae0020 */ lw $t6,0x20($sp) -/* 4213c: 11c00011 */ beqz $t6,.L00042184 -/* 42140: 00000000 */ nop -/* 42144: 8fa80190 */ lw $t0,0x190($sp) -/* 42148: 01c03025 */ or $a2,$t6,$zero -/* 4214c: 2504001c */ addiu $a0,$t0,0x1c -/* 42150: 0c0118b1 */ jal mp3decGetBits -/* 42154: 25052020 */ addiu $a1,$t0,0x2020 -/* 42158: 8fb90198 */ lw $t9,0x198($sp) -/* 4215c: 8fad0190 */ lw $t5,0x190($sp) -/* 42160: 8fab0024 */ lw $t3,0x24($sp) -/* 42164: 00196140 */ sll $t4,$t9,0x5 -/* 42168: 01996023 */ subu $t4,$t4,$t9 -/* 4216c: 000c60c0 */ sll $t4,$t4,0x3 -/* 42170: 01ac5021 */ addu $t2,$t5,$t4 -/* 42174: 000b4880 */ sll $t1,$t3,0x2 -/* 42178: 0149c021 */ addu $t8,$t2,$t1 -/* 4217c: 1000000b */ b .L000421ac -/* 42180: af023dcc */ sw $v0,0x3dcc($t8) -.L00042184: -/* 42184: 8fa80198 */ lw $t0,0x198($sp) -/* 42188: 8faf0190 */ lw $t7,0x190($sp) -/* 4218c: 8fad0024 */ lw $t5,0x24($sp) -/* 42190: 00087140 */ sll $t6,$t0,0x5 -/* 42194: 01c87023 */ subu $t6,$t6,$t0 -/* 42198: 000e70c0 */ sll $t6,$t6,0x3 -/* 4219c: 01eec821 */ addu $t9,$t7,$t6 -/* 421a0: 000d6080 */ sll $t4,$t5,0x2 -/* 421a4: 032c5821 */ addu $t3,$t9,$t4 -/* 421a8: ad603dcc */ sw $zero,0x3dcc($t3) -.L000421ac: -/* 421ac: 8faa0198 */ lw $t2,0x198($sp) -/* 421b0: 11400007 */ beqz $t2,.L000421d0 -/* 421b4: 00000000 */ nop -/* 421b8: 8fa80024 */ lw $t0,0x24($sp) -/* 421bc: 8fb80190 */ lw $t8,0x190($sp) -/* 421c0: 8fa9001c */ lw $t1,0x1c($sp) -/* 421c4: 00087880 */ sll $t7,$t0,0x2 -/* 421c8: 030f7021 */ addu $t6,$t8,$t7 -/* 421cc: adc93f14 */ sw $t1,0x3f14($t6) -.L000421d0: -/* 421d0: 8fad0024 */ lw $t5,0x24($sp) -/* 421d4: 25b90001 */ addiu $t9,$t5,0x1 -/* 421d8: afb90024 */ sw $t9,0x24($sp) -/* 421dc: 8fac003c */ lw $t4,0x3c($sp) -/* 421e0: 8faa0040 */ lw $t2,0x40($sp) -/* 421e4: 258b0003 */ addiu $t3,$t4,0x3 -/* 421e8: 000a4080 */ sll $t0,$t2,0x2 -/* 421ec: 03a8c021 */ addu $t8,$sp,$t0 -/* 421f0: afab003c */ sw $t3,0x3c($sp) -/* 421f4: 8f180028 */ lw $t8,0x28($t8) -/* 421f8: 0178082a */ slt $at,$t3,$t8 -/* 421fc: 1420ff94 */ bnez $at,.L00042050 -/* 42200: 00000000 */ nop -.L00042204: -/* 42204: 8faf0040 */ lw $t7,0x40($sp) -/* 42208: 25e90001 */ addiu $t1,$t7,0x1 -/* 4220c: 29210004 */ slti $at,$t1,0x4 -/* 42210: 1420ff7e */ bnez $at,.L0004200c -/* 42214: afa90040 */ sw $t1,0x40($sp) -.L00042218: -/* 42218: 10000003 */ b .L00042228 -/* 4221c: 24020001 */ addiu $v0,$zero,0x1 -/* 42220: 10000001 */ b .L00042228 -/* 42224: 00000000 */ nop -.L00042228: -/* 42228: 8fbf0014 */ lw $ra,0x14($sp) -/* 4222c: 27bd0190 */ addiu $sp,$sp,0x190 -/* 42230: 03e00008 */ jr $ra -/* 42234: 00000000 */ nop -); + s32 sp60[4]; + s32 sp5c; + u32 *sp58; + s32 sp54; + s32 sp50; + s32 sp4c; + s32 sp48; + s32 sp44; + s32 i; + s32 j; + s32 sp38; + s32 sp28[4]; + s32 sp24; + s32 sp20; + s32 sp1c; + + sp5c = stream->scalefac_compress[0][ch]; + sp58 = &stream->preflag[0][ch]; + sp54 = stream->mixed_block_flag[0][ch]; + sp50 = stream->block_type[0][ch]; + sp4c = stream->window_switching[0][ch]; + + if ((stream->unk3bc4 != 1 && stream->unk3bc4 != 3) || ch != 1) { + sp48 = 0; + + if (sp5c < 400) { + sp60[0] = (sp5c >> 4) / 5; + sp60[1] = (sp5c >> 4) % 5; + sp60[2] = (sp5c % 16) >> 2; + sp60[3] = sp5c % 4; + *sp58 = 0; + sp44 = 0; + } else if (sp5c >= 400 && sp5c < 500) { + sp60[0] = ((sp5c - 400) >> 2) / 5; + sp60[1] = ((sp5c - 400) >> 2) % 5; + sp60[2] = (sp5c - 400) % 4; + sp60[3] = 0; + *sp58 = 0; + sp44 = 1; + } else if (sp5c >= 500 && sp5c < 512) { + sp60[0] = (sp5c - 500) / 3; + sp60[1] = (sp5c - 500) % 3; + sp60[2] = 0; + sp60[3] = 0; + *sp58 = 1; + sp44 = 2; + } + } + + if (stream->unk3bc4 == 1 || stream->unk3bc4 == 3) { + if (ch == 1) { + stream->unk3ef8 = sp5c % 2; + sp38 = sp5c >> 1; + sp48 = 1; + + if (sp38 < 180) { + sp60[0] = sp38 / 36; + sp60[1] = (sp38 % 36) / 6; + sp60[2] = (sp38 % 36) % 6; + sp60[3] = 0; + *sp58 = 0; + sp44 = 0; + } else if (sp38 >= 180 && sp38 < 244) { + sp60[0] = ((sp38 - 180) % 64) >> 4; + sp60[1] = ((sp38 - 180) % 16) >> 2; + sp60[2] = (sp38 - 180) % 4; + sp60[3] = 0; + *sp58 = 0; + sp44 = 1; + } else if (sp38 >= 244 && sp38 < 255) { + sp60[0] = (sp38 - 244) / 3; + sp60[1] = (sp38 - 244) % 3; + sp60[2] = 0; + sp60[3] = 0; + *sp58 = 0; + sp44 = 2; + } + } + } + + if (sp4c && sp50 == 2) { + bcopy(sp70[sp48][sp44][sp54 + 1], sp28, 0x10); + } else { + bcopy(sp70[sp48][sp44][0], sp28, 0x10); + } + + sp24 = 0; + + if (!sp4c || (sp4c && sp50 != 2)) { + for (i = 0; i < 4; i++) { + sp20 = sp60[i]; + sp1c = (1 << sp20) - 1; + + for (j = 0; j < sp28[i]; j++) { + *(u32 *)(stream->scalefac_l + ch * 0xf8 + sp24 * 4) = sp20 ? mp3decGetBits(stream->unk1c, &stream->unk2020, sp20) : 0; + + if (ch != 0) { + stream->unk3efc[sp24] = sp1c; + } + + sp24++; + } + } + } else if (sp50 == 2) { + if (sp54 == 0) { + for (i = 0; i < 4; i++) { + sp20 = sp60[i]; + sp1c = (1 << sp20) - 1; + + for (j = 0; j < sp28[i]; j += 3) { + *(u32 *)(stream->scalefac_s + ch * 0xf8 + sp24 * 4) = sp20 ? mp3decGetBits(stream->unk1c, &stream->unk2020, sp20) : 0; + *(u32 *)(stream->unk3d98 + ch * 0xf8 + sp24 * 4) = sp20 ? mp3decGetBits(stream->unk1c, &stream->unk2020, sp20) : 0; + *(u32 *)(stream->unk3dcc + ch * 0xf8 + sp24 * 4) = sp20 ? mp3decGetBits(stream->unk1c, &stream->unk2020, sp20) : 0; + + if (ch != 0) { + stream->unk3f14[sp24] = sp1c; + } + + sp24++; + } + } + } else { + sp20 = sp60[0]; + sp1c = (1 << sp20) - 1; + + for (j = 0; j < 6; j++) { + *(u32 *)(stream->scalefac_l + ch * 0xf8 + sp24 * 4) = sp20 ? mp3decGetBits(stream->unk1c, &stream->unk2020, sp20) : 0; + + if (ch != 0) { + stream->unk3efc[sp24] = sp1c; + } + + sp24++; + } + + sp28[0] -= 6; + sp24 = 3; + + for (i = 0; i < 4; i++) { + sp20 = sp60[i]; + sp1c = (1 << sp20) - 1; + + for (j = 0; j < sp28[i]; j += 3) { + *(u32 *)(stream->scalefac_s + ch * 0xf8 + sp24 * 4) = sp20 ? mp3decGetBits(stream->unk1c, &stream->unk2020, sp20) : 0; + *(u32 *)(stream->unk3d98 + ch * 0xf8 + sp24 * 4) = sp20 ? mp3decGetBits(stream->unk1c, &stream->unk2020, sp20) : 0; + *(u32 *)(stream->unk3dcc + ch * 0xf8 + sp24 * 4) = sp20 ? mp3decGetBits(stream->unk1c, &stream->unk2020, sp20) : 0; + + if (ch != 0) { + stream->unk3f14[sp24] = sp1c; + } + + sp24++; + } + } + } + } + + return true; +} bool func00042238(struct asistream *stream, u32 gr, u32 ch) {