.set noat # allow manual use of $at .set noreorder # don't insert nops after branches glabel func_80055F00 /* 31300 80055F00 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 31304 80055F04 AFB50024 */ sw $s5, 0x24($sp) /* 31308 80055F08 00A0A82D */ daddu $s5, $a1, $zero /* 3130C 80055F0C 3C038008 */ lui $v1, %hi(D_80078E20) /* 31310 80055F10 24638E20 */ addiu $v1, $v1, %lo(D_80078E20) /* 31314 80055F14 AFBF002C */ sw $ra, 0x2c($sp) /* 31318 80055F18 AFB60028 */ sw $s6, 0x28($sp) /* 3131C 80055F1C AFB40020 */ sw $s4, 0x20($sp) /* 31320 80055F20 AFB3001C */ sw $s3, 0x1c($sp) /* 31324 80055F24 AFB20018 */ sw $s2, 0x18($sp) /* 31328 80055F28 AFB10014 */ sw $s1, 0x14($sp) /* 3132C 80055F2C AFB00010 */ sw $s0, 0x10($sp) /* 31330 80055F30 8C620000 */ lw $v0, ($v1) /* 31334 80055F34 8EB30014 */ lw $s3, 0x14($s5) /* 31338 80055F38 144000BC */ bnez $v0, .L8005622C /* 3133C 80055F3C 0080382D */ daddu $a3, $a0, $zero /* 31340 80055F40 8EA20000 */ lw $v0, ($s5) /* 31344 80055F44 0260202D */ daddu $a0, $s3, $zero /* 31348 80055F48 ACE2000C */ sw $v0, 0xc($a3) /* 3134C 80055F4C 8EA20004 */ lw $v0, 4($s5) /* 31350 80055F50 AC670000 */ sw $a3, ($v1) /* 31354 80055F54 ACE00000 */ sw $zero, ($a3) /* 31358 80055F58 ACE00004 */ sw $zero, 4($a3) /* 3135C 80055F5C ACE20010 */ sw $v0, 0x10($a3) /* 31360 80055F60 8EA20008 */ lw $v0, 8($s5) /* 31364 80055F64 3C108008 */ lui $s0, %hi(D_80078E24) /* 31368 80055F68 26108E24 */ addiu $s0, $s0, %lo(D_80078E24) /* 3136C 80055F6C AE070000 */ sw $a3, ($s0) /* 31370 80055F70 3C018008 */ lui $at, %hi(D_80078E28) /* 31374 80055F74 A0208E28 */ sb $zero, %lo(D_80078E28)($at) /* 31378 80055F78 ACE20008 */ sw $v0, 8($a3) /* 3137C 80055F7C 8EA30010 */ lw $v1, 0x10($s5) /* 31380 80055F80 24027FFF */ addiu $v0, $zero, 0x7fff /* 31384 80055F84 3C018008 */ lui $at, %hi(D_80078E2A) /* 31388 80055F88 A4228E2A */ sh $v0, %lo(D_80078E2A)($at) /* 3138C 80055F8C ACE30014 */ sw $v1, 0x14($a3) /* 31390 80055F90 8EA50000 */ lw $a1, ($s5) /* 31394 80055F94 24020001 */ addiu $v0, $zero, 1 /* 31398 80055F98 3C018008 */ lui $at, %hi(D_80078E2C) /* 3139C 80055F9C A0228E2C */ sb $v0, %lo(D_80078E2C)($at) /* 313A0 80055FA0 0C015F10 */ jal func_80057C40 /* 313A4 80055FA4 2406007C */ addiu $a2, $zero, 0x7c /* 313A8 80055FA8 8E030000 */ lw $v1, ($s0) /* 313AC 80055FAC AC62001C */ sw $v0, 0x1c($v1) /* 313B0 80055FB0 8EA20000 */ lw $v0, ($s5) /* 313B4 80055FB4 18400043 */ blez $v0, .L800560C4 /* 313B8 80055FB8 0000882D */ daddu $s1, $zero, $zero /* 313BC 80055FBC 0200B02D */ daddu $s6, $s0, $zero /* 313C0 80055FC0 24120001 */ addiu $s2, $zero, 1 /* 313C4 80055FC4 0220A02D */ daddu $s4, $s1, $zero /* 313C8 80055FC8 0260202D */ daddu $a0, $s3, $zero .L80055FCC: /* 313CC 80055FCC 8EC20000 */ lw $v0, ($s6) /* 313D0 80055FD0 24050001 */ addiu $a1, $zero, 1 /* 313D4 80055FD4 8C50001C */ lw $s0, 0x1c($v0) /* 313D8 80055FD8 24060020 */ addiu $a2, $zero, 0x20 /* 313DC 80055FDC 0C015F10 */ jal func_80057C40 /* 313E0 80055FE0 02148021 */ addu $s0, $s0, $s4 /* 313E4 80055FE4 0260202D */ daddu $a0, $s3, $zero /* 313E8 80055FE8 24050001 */ addiu $a1, $zero, 1 /* 313EC 80055FEC 24060020 */ addiu $a2, $zero, 0x20 /* 313F0 80055FF0 0C015F10 */ jal func_80057C40 /* 313F4 80055FF4 AE020004 */ sw $v0, 4($s0) /* 313F8 80055FF8 8EC30000 */ lw $v1, ($s6) /* 313FC 80055FFC 26040024 */ addiu $a0, $s0, 0x24 /* 31400 80056000 AE020008 */ sw $v0, 8($s0) /* 31404 80056004 8C620014 */ lw $v0, 0x14($v1) /* 31408 80056008 0040F809 */ jalr $v0 /* 3140C 8005600C 2694007C */ addiu $s4, $s4, 0x7c /* 31410 80056010 0260202D */ daddu $a0, $s3, $zero /* 31414 80056014 24050001 */ addiu $a1, $zero, 1 /* 31418 80056018 24060020 */ addiu $a2, $zero, 0x20 /* 3141C 8005601C AE020020 */ sw $v0, 0x20($s0) /* 31420 80056020 AE00002C */ sw $zero, 0x2c($s0) /* 31424 80056024 AE120030 */ sw $s2, 0x30($s0) /* 31428 80056028 0C015F10 */ jal func_80057C40 /* 3142C 8005602C AE000034 */ sw $zero, 0x34($s0) /* 31430 80056030 0260202D */ daddu $a0, $s3, $zero /* 31434 80056034 24050001 */ addiu $a1, $zero, 1 /* 31438 80056038 3C013F80 */ lui $at, 0x3f80 /* 3143C 8005603C 44810000 */ mtc1 $at, $f0 /* 31440 80056040 24060050 */ addiu $a2, $zero, 0x50 /* 31444 80056044 AE020038 */ sw $v0, 0x38($s0) /* 31448 80056048 AE000040 */ sw $zero, 0x40($s0) /* 3144C 8005604C AE120044 */ sw $s2, 0x44($s0) /* 31450 80056050 0C015F10 */ jal func_80057C40 /* 31454 80056054 E600003C */ swc1 $f0, 0x3c($s0) /* 31458 80056058 AE020048 */ sw $v0, 0x48($s0) /* 3145C 8005605C 24020040 */ addiu $v0, $zero, 0x40 /* 31460 80056060 AE12006C */ sw $s2, 0x6c($s0) /* 31464 80056064 AE000070 */ sw $zero, 0x70($s0) /* 31468 80056068 A612004E */ sh $s2, 0x4e($s0) /* 3146C 8005606C A612005C */ sh $s2, 0x5c($s0) /* 31470 80056070 A6120062 */ sh $s2, 0x62($s0) /* 31474 80056074 A6120050 */ sh $s2, 0x50($s0) /* 31478 80056078 A6120052 */ sh $s2, 0x52($s0) /* 3147C 8005607C A6000054 */ sh $zero, 0x54($s0) /* 31480 80056080 A6000056 */ sh $zero, 0x56($s0) /* 31484 80056084 A612005A */ sh $s2, 0x5a($s0) /* 31488 80056088 A6000058 */ sh $zero, 0x58($s0) /* 3148C 8005608C A6120060 */ sh $s2, 0x60($s0) /* 31490 80056090 A600005E */ sh $zero, 0x5e($s0) /* 31494 80056094 AE000064 */ sw $zero, 0x64($s0) /* 31498 80056098 AE000068 */ sw $zero, 0x68($s0) /* 3149C 8005609C A602004C */ sh $v0, 0x4c($s0) /* 314A0 800560A0 A6000074 */ sh $zero, 0x74($s0) /* 314A4 800560A4 AE000000 */ sw $zero, ($s0) /* 314A8 800560A8 A2000078 */ sb $zero, 0x78($s0) /* 314AC 800560AC A2110079 */ sb $s1, 0x79($s0) /* 314B0 800560B0 8EA20000 */ lw $v0, ($s5) /* 314B4 800560B4 26310001 */ addiu $s1, $s1, 1 /* 314B8 800560B8 0222102A */ slt $v0, $s1, $v0 /* 314BC 800560BC 1440FFC3 */ bnez $v0, .L80055FCC /* 314C0 800560C0 0260202D */ daddu $a0, $s3, $zero .L800560C4: /* 314C4 800560C4 0260202D */ daddu $a0, $s3, $zero /* 314C8 800560C8 8EA50004 */ lw $a1, 4($s5) /* 314CC 800560CC 0C015F10 */ jal func_80057C40 /* 314D0 800560D0 24060018 */ addiu $a2, $zero, 0x18 /* 314D4 800560D4 3C038008 */ lui $v1, %hi(D_80078E24) /* 314D8 800560D8 8C638E24 */ lw $v1, %lo(D_80078E24)($v1) /* 314DC 800560DC AC620020 */ sw $v0, 0x20($v1) /* 314E0 800560E0 8EA20004 */ lw $v0, 4($s5) /* 314E4 800560E4 18400022 */ blez $v0, .L80056170 /* 314E8 800560E8 0000882D */ daddu $s1, $zero, $zero /* 314EC 800560EC 24147FFF */ addiu $s4, $zero, 0x7fff /* 314F0 800560F0 0220902D */ daddu $s2, $s1, $zero .L800560F4: /* 314F4 800560F4 0260202D */ daddu $a0, $s3, $zero /* 314F8 800560F8 24050001 */ addiu $a1, $zero, 1 /* 314FC 800560FC 3C028008 */ lui $v0, %hi(D_80078E24) /* 31500 80056100 8C428E24 */ lw $v0, %lo(D_80078E24)($v0) /* 31504 80056104 24060014 */ addiu $a2, $zero, 0x14 /* 31508 80056108 8C500020 */ lw $s0, 0x20($v0) /* 3150C 8005610C 02258821 */ addu $s1, $s1, $a1 /* 31510 80056110 02128021 */ addu $s0, $s0, $s2 /* 31514 80056114 AE000010 */ sw $zero, 0x10($s0) /* 31518 80056118 AE000014 */ sw $zero, 0x14($s0) /* 3151C 8005611C A6140000 */ sh $s4, ($s0) /* 31520 80056120 0C015F10 */ jal func_80057C40 /* 31524 80056124 A200000C */ sb $zero, 0xc($s0) /* 31528 80056128 0260202D */ daddu $a0, $s3, $zero /* 3152C 8005612C 24050001 */ addiu $a1, $zero, 1 /* 31530 80056130 24060014 */ addiu $a2, $zero, 0x14 /* 31534 80056134 0C015F10 */ jal func_80057C40 /* 31538 80056138 AE020004 */ sw $v0, 4($s0) /* 3153C 8005613C 8E040004 */ lw $a0, 4($s0) /* 31540 80056140 9205000C */ lbu $a1, 0xc($s0) /* 31544 80056144 0260302D */ daddu $a2, $s3, $zero /* 31548 80056148 0C0162CD */ jal func_80058B34 /* 3154C 8005614C AE020008 */ sw $v0, 8($s0) /* 31550 80056150 8E040008 */ lw $a0, 8($s0) /* 31554 80056154 9205000C */ lbu $a1, 0xc($s0) /* 31558 80056158 0C0162CD */ jal func_80058B34 /* 3155C 8005615C 0260302D */ daddu $a2, $s3, $zero /* 31560 80056160 8EA20004 */ lw $v0, 4($s5) /* 31564 80056164 0222102A */ slt $v0, $s1, $v0 /* 31568 80056168 1440FFE2 */ bnez $v0, .L800560F4 /* 3156C 8005616C 26520018 */ addiu $s2, $s2, 0x18 .L80056170: /* 31570 80056170 0260202D */ daddu $a0, $s3, $zero /* 31574 80056174 24050170 */ addiu $a1, $zero, 0x170 /* 31578 80056178 0C015F10 */ jal func_80057C40 /* 3157C 8005617C 24060002 */ addiu $a2, $zero, 2 /* 31580 80056180 0260202D */ daddu $a0, $s3, $zero /* 31584 80056184 24050170 */ addiu $a1, $zero, 0x170 /* 31588 80056188 24060002 */ addiu $a2, $zero, 2 /* 3158C 8005618C 3C108008 */ lui $s0, %hi(D_80078E24) /* 31590 80056190 26108E24 */ addiu $s0, $s0, %lo(D_80078E24) /* 31594 80056194 8E030000 */ lw $v1, ($s0) /* 31598 80056198 0000882D */ daddu $s1, $zero, $zero /* 3159C 8005619C 0C015F10 */ jal func_80057C40 /* 315A0 800561A0 AC620024 */ sw $v0, 0x24($v1) /* 315A4 800561A4 0260202D */ daddu $a0, $s3, $zero /* 315A8 800561A8 240502E0 */ addiu $a1, $zero, 0x2e0 /* 315AC 800561AC 24060002 */ addiu $a2, $zero, 2 /* 315B0 800561B0 3C01800A */ lui $at, %hi(D_800A1DFC) /* 315B4 800561B4 A0201DFC */ sb $zero, %lo(D_800A1DFC)($at) /* 315B8 800561B8 3C01800A */ lui $at, %hi(D_800A1DFE) /* 315BC 800561BC A4201DFE */ sh $zero, %lo(D_800A1DFE)($at) /* 315C0 800561C0 8E070000 */ lw $a3, ($s0) /* 315C4 800561C4 24030004 */ addiu $v1, $zero, 4 /* 315C8 800561C8 3C01800A */ lui $at, %hi(D_800A1E00) /* 315CC 800561CC AC231E00 */ sw $v1, %lo(D_800A1E00)($at) /* 315D0 800561D0 0C015F10 */ jal func_80057C40 /* 315D4 800561D4 ACE20028 */ sw $v0, 0x28($a3) /* 315D8 800561D8 0260202D */ daddu $a0, $s3, $zero /* 315DC 800561DC 240502E0 */ addiu $a1, $zero, 0x2e0 /* 315E0 800561E0 24060002 */ addiu $a2, $zero, 2 /* 315E4 800561E4 3C10800A */ lui $s0, %hi(D_800A1DF0) /* 315E8 800561E8 26101DF0 */ addiu $s0, $s0, %lo(D_800A1DF0) /* 315EC 800561EC 0C015F10 */ jal func_80057C40 /* 315F0 800561F0 AE020000 */ sw $v0, ($s0) /* 315F4 800561F4 8E100000 */ lw $s0, ($s0) /* 315F8 800561F8 0040182D */ daddu $v1, $v0, $zero /* 315FC 800561FC 3C01800A */ lui $at, %hi(D_800A1DF4) /* 31600 80056200 AC231DF4 */ sw $v1, %lo(D_800A1DF4)($at) .L80056204: /* 31604 80056204 A6000000 */ sh $zero, ($s0) /* 31608 80056208 A4600000 */ sh $zero, ($v1) /* 3160C 8005620C 24630002 */ addiu $v1, $v1, 2 /* 31610 80056210 26310001 */ addiu $s1, $s1, 1 /* 31614 80056214 2A2202E0 */ slti $v0, $s1, 0x2e0 /* 31618 80056218 1440FFFA */ bnez $v0, .L80056204 /* 3161C 8005621C 26100002 */ addiu $s0, $s0, 2 /* 31620 80056220 3C028008 */ lui $v0, %hi(D_80078E24) /* 31624 80056224 8C428E24 */ lw $v0, %lo(D_80078E24)($v0) /* 31628 80056228 AC530018 */ sw $s3, 0x18($v0) .L8005622C: /* 3162C 8005622C 8FBF002C */ lw $ra, 0x2c($sp) /* 31630 80056230 8FB60028 */ lw $s6, 0x28($sp) /* 31634 80056234 8FB50024 */ lw $s5, 0x24($sp) /* 31638 80056238 8FB40020 */ lw $s4, 0x20($sp) /* 3163C 8005623C 8FB3001C */ lw $s3, 0x1c($sp) /* 31640 80056240 8FB20018 */ lw $s2, 0x18($sp) /* 31644 80056244 8FB10014 */ lw $s1, 0x14($sp) /* 31648 80056248 8FB00010 */ lw $s0, 0x10($sp) /* 3164C 8005624C 03E00008 */ jr $ra /* 31650 80056250 27BD0030 */ addiu $sp, $sp, 0x30