.set noat # allow manual use of $at .set noreorder # don't insert nops after branches glabel func_8005904C /* 3444C 8005904C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 34450 80059050 AFB3001C */ sw $s3, 0x1c($sp) /* 34454 80059054 0080982D */ daddu $s3, $a0, $zero /* 34458 80059058 30A500FF */ andi $a1, $a1, 0xff /* 3445C 8005905C 24A5FFFF */ addiu $a1, $a1, -1 /* 34460 80059060 2CA2000A */ sltiu $v0, $a1, 0xa /* 34464 80059064 AFBF0020 */ sw $ra, 0x20($sp) /* 34468 80059068 AFB20018 */ sw $s2, 0x18($sp) /* 3446C 8005906C AFB10014 */ sw $s1, 0x14($sp) /* 34470 80059070 AFB00010 */ sw $s0, 0x10($sp) /* 34474 80059074 8E660000 */ lw $a2, ($s3) /* 34478 80059078 10400021 */ beqz $v0, .L80059100 /* 3447C 8005907C 00051080 */ sll $v0, $a1, 2 /* 34480 80059080 3C01800A */ lui $at, %hi(jtbl_80098940) /* 34484 80059084 00220821 */ addu $at, $at, $v0 /* 34488 80059088 8C228940 */ lw $v0, %lo(jtbl_80098940)($at) /* 3448C 8005908C 00400008 */ jr $v0 /* 34490 80059090 00000000 */ nop glabel L80059094_34494 /* 34494 80059094 3C048008 */ lui $a0, %hi(D_8007EFE0) /* 34498 80059098 08016442 */ j .L80059108 /* 3449C 8005909C 2484EFE0 */ addiu $a0, $a0, %lo(D_8007EFE0) glabel L800590A0_344A0 /* 344A0 800590A0 3C048008 */ lui $a0, %hi(D_8007F158) /* 344A4 800590A4 08016442 */ j .L80059108 /* 344A8 800590A8 2484F158 */ addiu $a0, $a0, %lo(D_8007F158) glabel L800590AC_344AC /* 344AC 800590AC 3C048008 */ lui $a0, %hi(D_8007F180) /* 344B0 800590B0 08016442 */ j .L80059108 /* 344B4 800590B4 2484F180 */ addiu $a0, $a0, %lo(D_8007F180) glabel L800590B8_344B8 /* 344B8 800590B8 3C048008 */ lui $a0, %hi(D_8007F1A8) /* 344BC 800590BC 08016442 */ j .L80059108 /* 344C0 800590C0 2484F1A8 */ addiu $a0, $a0, %lo(D_8007F1A8) glabel L800590C4_344C4 /* 344C4 800590C4 3C048008 */ lui $a0, %hi(D_8007F1F8) /* 344C8 800590C8 08016442 */ j .L80059108 /* 344CC 800590CC 8C84F1F8 */ lw $a0, %lo(D_8007F1F8)($a0) glabel L800590D0_344D0 /* 344D0 800590D0 3C048008 */ lui $a0, %hi(D_8007F1FC) /* 344D4 800590D4 08016442 */ j .L80059108 /* 344D8 800590D8 8C84F1FC */ lw $a0, %lo(D_8007F1FC)($a0) glabel L800590DC_344DC /* 344DC 800590DC 3C048008 */ lui $a0, %hi(D_8007F200) /* 344E0 800590E0 08016442 */ j .L80059108 /* 344E4 800590E4 8C84F200 */ lw $a0, %lo(D_8007F200)($a0) glabel L800590E8_344E8 /* 344E8 800590E8 3C048008 */ lui $a0, %hi(D_8007F204) /* 344EC 800590EC 08016442 */ j .L80059108 /* 344F0 800590F0 8C84F204 */ lw $a0, %lo(D_8007F204)($a0) glabel L800590F4_344F4 /* 344F4 800590F4 3C048008 */ lui $a0, %hi(D_8007F048) /* 344F8 800590F8 08016442 */ j .L80059108 /* 344FC 800590FC 2484F048 */ addiu $a0, $a0, %lo(D_8007F048) .L80059100: /* 34500 80059100 3C048008 */ lui $a0, %hi(D_8007F1D0) /* 34504 80059104 2484F1D0 */ addiu $a0, $a0, %lo(D_8007F1D0) .L80059108: /* 34508 80059108 90820003 */ lbu $v0, 3($a0) /* 3450C 8005910C A2620010 */ sb $v0, 0x10($s3) /* 34510 80059110 8C830004 */ lw $v1, 4($a0) /* 34514 80059114 8E620000 */ lw $v0, ($s3) /* 34518 80059118 24110507 */ addiu $s1, $zero, 0x507 /* 3451C 8005911C AE620004 */ sw $v0, 4($s3) /* 34520 80059120 00031040 */ sll $v0, $v1, 1 /* 34524 80059124 00431021 */ addu $v0, $v0, $v1 /* 34528 80059128 000210C0 */ sll $v0, $v0, 3 /* 3452C 8005912C 00431023 */ subu $v0, $v0, $v1 /* 34530 80059130 000210C0 */ sll $v0, $v0, 3 /* 34534 80059134 AE620008 */ sw $v0, 8($s3) .L80059138: /* 34538 80059138 ACC00000 */ sw $zero, ($a2) /* 3453C 8005913C 2631FFFF */ addiu $s1, $s1, -1 /* 34540 80059140 0621FFFD */ bgez $s1, .L80059138 /* 34544 80059144 24C60004 */ addiu $a2, $a2, 4 /* 34548 80059148 92620010 */ lbu $v0, 0x10($s3) /* 3454C 8005914C 10400069 */ beqz $v0, .L800592F4 /* 34550 80059150 0000882D */ daddu $s1, $zero, $zero /* 34554 80059154 0220902D */ daddu $s2, $s1, $zero /* 34558 80059158 24020002 */ addiu $v0, $zero, 2 /* 3455C 8005915C 00421004 */ sllv $v0, $v0, $v0 /* 34560 80059160 00448021 */ addu $s0, $v0, $a0 .L80059164: /* 34564 80059164 8E62000C */ lw $v0, 0xc($s3) /* 34568 80059168 8E030000 */ lw $v1, ($s0) /* 3456C 8005916C 26100004 */ addiu $s0, $s0, 4 /* 34570 80059170 00522021 */ addu $a0, $v0, $s2 /* 34574 80059174 00031040 */ sll $v0, $v1, 1 /* 34578 80059178 00431021 */ addu $v0, $v0, $v1 /* 3457C 8005917C 000210C0 */ sll $v0, $v0, 3 /* 34580 80059180 00431023 */ subu $v0, $v0, $v1 /* 34584 80059184 000210C0 */ sll $v0, $v0, 3 /* 34588 80059188 AC820000 */ sw $v0, ($a0) /* 3458C 8005918C 8E030000 */ lw $v1, ($s0) /* 34590 80059190 26100004 */ addiu $s0, $s0, 4 /* 34594 80059194 00031040 */ sll $v0, $v1, 1 /* 34598 80059198 00431021 */ addu $v0, $v0, $v1 /* 3459C 8005919C 000210C0 */ sll $v0, $v0, 3 /* 345A0 800591A0 00431023 */ subu $v0, $v0, $v1 /* 345A4 800591A4 000210C0 */ sll $v0, $v0, 3 /* 345A8 800591A8 AC820004 */ sw $v0, 4($a0) /* 345AC 800591AC 96020002 */ lhu $v0, 2($s0) /* 345B0 800591B0 26100004 */ addiu $s0, $s0, 4 /* 345B4 800591B4 A482000A */ sh $v0, 0xa($a0) /* 345B8 800591B8 96020002 */ lhu $v0, 2($s0) /* 345BC 800591BC 26100004 */ addiu $s0, $s0, 4 /* 345C0 800591C0 A4820008 */ sh $v0, 8($a0) /* 345C4 800591C4 96020002 */ lhu $v0, 2($s0) /* 345C8 800591C8 26100004 */ addiu $s0, $s0, 4 /* 345CC 800591CC A482000C */ sh $v0, 0xc($a0) /* 345D0 800591D0 8E020000 */ lw $v0, ($s0) /* 345D4 800591D4 50400033 */ beql $v0, $zero, .L800592A4 /* 345D8 800591D8 AC800028 */ sw $zero, 0x28($a0) /* 345DC 800591DC 26100004 */ addiu $s0, $s0, 4 /* 345E0 800591E0 44820000 */ mtc1 $v0, $f0 /* 345E4 800591E4 00000000 */ nop /* 345E8 800591E8 46800020 */ cvt.s.w $f0, $f0 /* 345EC 800591EC 3C01447A */ lui $at, 0x447a /* 345F0 800591F0 44811000 */ mtc1 $at, $f2 /* 345F4 800591F4 8C830004 */ lw $v1, 4($a0) /* 345F8 800591F8 8C820000 */ lw $v0, ($a0) /* 345FC 800591FC 46020003 */ div.s $f0, $f0, $f2 /* 34600 80059200 46000021 */ cvt.d.s $f0, $f0 /* 34604 80059204 00621823 */ subu $v1, $v1, $v0 /* 34608 80059208 46200000 */ add.d $f0, $f0, $f0 /* 3460C 8005920C 3C028008 */ lui $v0, %hi(D_80078E50) /* 34610 80059210 8C428E50 */ lw $v0, %lo(D_80078E50)($v0) /* 34614 80059214 44832000 */ mtc1 $v1, $f4 /* 34618 80059218 00000000 */ nop /* 3461C 8005921C 46802121 */ cvt.d.w $f4, $f4 /* 34620 80059220 C4420008 */ lwc1 $f2, 8($v0) /* 34624 80059224 468010A1 */ cvt.d.w $f2, $f2 /* 34628 80059228 46220003 */ div.d $f0, $f0, $f2 /* 3462C 8005922C 46200020 */ cvt.s.d $f0, $f0 /* 34630 80059230 E4800010 */ swc1 $f0, 0x10($a0) /* 34634 80059234 C6000000 */ lwc1 $f0, ($s0) /* 34638 80059238 46800020 */ cvt.s.w $f0, $f0 /* 3463C 8005923C 26100004 */ addiu $s0, $s0, 4 /* 34640 80059240 3C01800A */ lui $at, %hi(D_80098968) /* 34644 80059244 D4228968 */ ldc1 $f2, %lo(D_80098968)($at) /* 34648 80059248 46000021 */ cvt.d.s $f0, $f0 /* 3464C 8005924C 04610006 */ bgez $v1, .L80059268 /* 34650 80059250 46220083 */ div.d $f2, $f0, $f2 /* 34654 80059254 3C0141F0 */ lui $at, 0x41f0 /* 34658 80059258 44810800 */ mtc1 $at, $f1 /* 3465C 8005925C 44800000 */ mtc1 $zero, $f0 /* 34660 80059260 00000000 */ nop /* 34664 80059264 46202100 */ add.d $f4, $f4, $f0 .L80059268: /* 34668 80059268 46241002 */ mul.d $f0, $f2, $f4 /* 3466C 8005926C 00000000 */ nop /* 34670 80059270 3C013F80 */ lui $at, 0x3f80 /* 34674 80059274 44811000 */ mtc1 $at, $f2 /* 34678 80059278 8C82002C */ lw $v0, 0x2c($a0) /* 3467C 8005927C AC800018 */ sw $zero, 0x18($a0) /* 34680 80059280 E4820014 */ swc1 $f2, 0x14($a0) /* 34684 80059284 AC820028 */ sw $v0, 0x28($a0) /* 34688 80059288 46200020 */ cvt.s.d $f0, $f0 /* 3468C 8005928C E480001C */ swc1 $f0, 0x1c($a0) /* 34690 80059290 AC400008 */ sw $zero, 8($v0) /* 34694 80059294 8C830028 */ lw $v1, 0x28($a0) /* 34698 80059298 24020001 */ addiu $v0, $zero, 1 /* 3469C 8005929C 080164AA */ j .L800592A8 /* 346A0 800592A0 AC62000C */ sw $v0, 0xc($v1) .L800592A4: /* 346A4 800592A4 26100008 */ addiu $s0, $s0, 8 .L800592A8: /* 346A8 800592A8 8E020000 */ lw $v0, ($s0) /* 346AC 800592AC 5040000A */ beql $v0, $zero, .L800592D8 /* 346B0 800592B0 AC800020 */ sw $zero, 0x20($a0) /* 346B4 800592B4 8C830024 */ lw $v1, 0x24($a0) /* 346B8 800592B8 AC830020 */ sw $v1, 0x20($a0) /* 346BC 800592BC 96020002 */ lhu $v0, 2($s0) /* 346C0 800592C0 A4620000 */ sh $v0, ($v1) /* 346C4 800592C4 8C840020 */ lw $a0, 0x20($a0) /* 346C8 800592C8 0C016374 */ jal func_80058DD0 /* 346CC 800592CC 26100004 */ addiu $s0, $s0, 4 /* 346D0 800592D0 080164B8 */ j .L800592E0 /* 346D4 800592D4 26520030 */ addiu $s2, $s2, 0x30 .L800592D8: /* 346D8 800592D8 26100004 */ addiu $s0, $s0, 4 /* 346DC 800592DC 26520030 */ addiu $s2, $s2, 0x30 .L800592E0: /* 346E0 800592E0 92620010 */ lbu $v0, 0x10($s3) /* 346E4 800592E4 26310001 */ addiu $s1, $s1, 1 /* 346E8 800592E8 0222102A */ slt $v0, $s1, $v0 /* 346EC 800592EC 1440FF9D */ bnez $v0, .L80059164 /* 346F0 800592F0 00000000 */ nop .L800592F4: /* 346F4 800592F4 8FBF0020 */ lw $ra, 0x20($sp) /* 346F8 800592F8 8FB3001C */ lw $s3, 0x1c($sp) /* 346FC 800592FC 8FB20018 */ lw $s2, 0x18($sp) /* 34700 80059300 8FB10014 */ lw $s1, 0x14($sp) /* 34704 80059304 8FB00010 */ lw $s0, 0x10($sp) /* 34708 80059308 03E00008 */ jr $ra /* 3470C 8005930C 27BD0028 */ addiu $sp, $sp, 0x28