papermario/ver/jp/asm/nonmatchings/main_33100/func_80057D00.s
Ethan Roseman 698cf99458
jp cod (Created the first segment's c files for jp) (#194)
* jp cod

* just have less code and it works

* oops

* removing splat cause subrepo is being dumb

* git subrepo clone https://github.com/ethteck/splat.git tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "d7281bae6a"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "d7281bae6a"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* move jp stuff + revert configure

* git subrepo pull tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "c56195a9c5"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "c56195a9c5"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"
2021-02-27 00:36:33 +09:00

746 lines
38 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80057D00
/* 33100 80057D00 27BDFFA0 */ addiu $sp, $sp, -0x60
/* 33104 80057D04 AFB60050 */ sw $s6, 0x50($sp)
/* 33108 80057D08 00A0B02D */ daddu $s6, $a1, $zero
/* 3310C 80057D0C AFB1003C */ sw $s1, 0x3c($sp)
/* 33110 80057D10 02C0882D */ daddu $s1, $s6, $zero
/* 33114 80057D14 AFB70054 */ sw $s7, 0x54($sp)
/* 33118 80057D18 AFA40060 */ sw $a0, 0x60($sp)
/* 3311C 80057D1C 24970048 */ addiu $s7, $a0, 0x48
/* 33120 80057D20 24880038 */ addiu $t0, $a0, 0x38
/* 33124 80057D24 AFB20040 */ sw $s2, 0x40($sp)
/* 33128 80057D28 AFBF005C */ sw $ra, 0x5c($sp)
/* 3312C 80057D2C AFBE0058 */ sw $fp, 0x58($sp)
/* 33130 80057D30 AFB5004C */ sw $s5, 0x4c($sp)
/* 33134 80057D34 AFB40048 */ sw $s4, 0x48($sp)
/* 33138 80057D38 AFB30044 */ sw $s3, 0x44($sp)
/* 3313C 80057D3C AFB00038 */ sw $s0, 0x38($sp)
/* 33140 80057D40 AFA80020 */ sw $t0, 0x20($sp)
/* 33144 80057D44 8C830070 */ lw $v1, 0x70($a0)
/* 33148 80057D48 24020001 */ addiu $v0, $zero, 1
/* 3314C 80057D4C 14620293 */ bne $v1, $v0, .L8005879C
/* 33150 80057D50 24920004 */ addiu $s2, $a0, 4
/* 33154 80057D54 8FA80060 */ lw $t0, 0x60($sp)
/* 33158 80057D58 C500003C */ lwc1 $f0, 0x3c($t0)
/* 3315C 80057D5C 3C01800A */ lui $at, %hi(D_80098910)
/* 33160 80057D60 D4228910 */ ldc1 $f2, %lo(D_80098910)($at)
/* 33164 80057D64 46000021 */ cvt.d.s $f0, $f0
/* 33168 80057D68 4620103C */ c.lt.d $f2, $f0
/* 3316C 80057D6C 00000000 */ nop
/* 33170 80057D70 45000007 */ bc1f .L80057D90
/* 33174 80057D74 241E0170 */ addiu $fp, $zero, 0x170
/* 33178 80057D78 3C013FFF */ lui $at, 0x3fff
/* 3317C 80057D7C 3421FEB0 */ ori $at, $at, 0xfeb0
/* 33180 80057D80 44810000 */ mtc1 $at, $f0
/* 33184 80057D84 00000000 */ nop
/* 33188 80057D88 E500003C */ swc1 $f0, 0x3c($t0)
/* 3318C 80057D8C 8FA80060 */ lw $t0, 0x60($sp)
.L80057D90:
/* 33190 80057D90 3C014700 */ lui $at, 0x4700
/* 33194 80057D94 44811000 */ mtc1 $at, $f2
/* 33198 80057D98 C500003C */ lwc1 $f0, 0x3c($t0)
/* 3319C 80057D9C 46020002 */ mul.s $f0, $f0, $f2
/* 331A0 80057DA0 00000000 */ nop
/* 331A4 80057DA4 4600018D */ trunc.w.s $f6, $f0
/* 331A8 80057DA8 44023000 */ mfc1 $v0, $f6
/* 331AC 80057DAC 3C013800 */ lui $at, 0x3800
/* 331B0 80057DB0 44810000 */ mtc1 $at, $f0
/* 331B4 80057DB4 44822000 */ mtc1 $v0, $f4
/* 331B8 80057DB8 00000000 */ nop
/* 331BC 80057DBC 46802120 */ cvt.s.w $f4, $f4
/* 331C0 80057DC0 46002102 */ mul.s $f4, $f4, $f0
/* 331C4 80057DC4 00000000 */ nop
/* 331C8 80057DC8 3C014338 */ lui $at, 0x4338
/* 331CC 80057DCC 44810000 */ mtc1 $at, $f0
/* 331D0 80057DD0 00000000 */ nop
/* 331D4 80057DD4 46002002 */ mul.s $f0, $f4, $f0
/* 331D8 80057DD8 00000000 */ nop
/* 331DC 80057DDC 8FA80060 */ lw $t0, 0x60($sp)
/* 331E0 80057DE0 C5020040 */ lwc1 $f2, 0x40($t0)
/* 331E4 80057DE4 46001080 */ add.s $f2, $f2, $f0
/* 331E8 80057DE8 4600118D */ trunc.w.s $f6, $f2
/* 331EC 80057DEC 44143000 */ mfc1 $s4, $f6
/* 331F0 80057DF0 00000000 */ nop
/* 331F4 80057DF4 44940000 */ mtc1 $s4, $f0
/* 331F8 80057DF8 00000000 */ nop
/* 331FC 80057DFC 46800020 */ cvt.s.w $f0, $f0
/* 33200 80057E00 46001081 */ sub.s $f2, $f2, $f0
/* 33204 80057E04 8FA80060 */ lw $t0, 0x60($sp)
/* 33208 80057E08 E504003C */ swc1 $f4, 0x3c($t0)
/* 3320C 80057E0C 128001BA */ beqz $s4, .L800584F8
/* 33210 80057E10 E5020040 */ swc1 $f2, 0x40($t0)
/* 33214 80057E14 8E470014 */ lw $a3, 0x14($s2)
/* 33218 80057E18 90E20024 */ lbu $v0, 0x24($a3)
/* 3321C 80057E1C 144000F2 */ bnez $v0, .L800581E8
/* 33220 80057E20 3C0300FF */ lui $v1, 0xff
/* 33224 80057E24 3463FFFF */ ori $v1, $v1, 0xffff
/* 33228 80057E28 AFA00024 */ sw $zero, 0x24($sp)
/* 3322C 80057E2C 8D02001C */ lw $v0, 0x1c($t0)
/* 33230 80057E30 3C041FFF */ lui $a0, 0x1fff
/* 33234 80057E34 00431024 */ and $v0, $v0, $v1
/* 33238 80057E38 3C030B00 */ lui $v1, 0xb00
/* 3323C 80057E3C 00431025 */ or $v0, $v0, $v1
/* 33240 80057E40 AE220000 */ sw $v0, ($s1)
/* 33244 80057E44 8E420014 */ lw $v0, 0x14($s2)
/* 33248 80057E48 3484FFFF */ ori $a0, $a0, 0xffff
/* 3324C 80057E4C 8C420018 */ lw $v0, 0x18($v0)
/* 33250 80057E50 8FA50024 */ lw $a1, 0x24($sp)
/* 33254 80057E54 00441024 */ and $v0, $v0, $a0
/* 33258 80057E58 AE220004 */ sw $v0, 4($s1)
/* 3325C 80057E5C 8D040028 */ lw $a0, 0x28($t0)
/* 33260 80057E60 8D030010 */ lw $v1, 0x10($t0)
/* 33264 80057E64 02841021 */ addu $v0, $s4, $a0
/* 33268 80057E68 0062102B */ sltu $v0, $v1, $v0
/* 3326C 80057E6C 10400003 */ beqz $v0, .L80057E7C
/* 33270 80057E70 26D60008 */ addiu $s6, $s6, 8
/* 33274 80057E74 8D020014 */ lw $v0, 0x14($t0)
/* 33278 80057E78 0002282B */ sltu $a1, $zero, $v0
.L80057E7C:
/* 3327C 80057E7C 10A00002 */ beqz $a1, .L80057E88
/* 33280 80057E80 0280802D */ daddu $s0, $s4, $zero
/* 33284 80057E84 00648023 */ subu $s0, $v1, $a0
.L80057E88:
/* 33288 80057E88 8E430028 */ lw $v1, 0x28($s2)
/* 3328C 80057E8C 10600003 */ beqz $v1, .L80057E9C
/* 33290 80057E90 24020010 */ addiu $v0, $zero, 0x10
/* 33294 80057E94 08015FA8 */ j .L80057EA0
/* 33298 80057E98 0043A823 */ subu $s5, $v0, $v1
.L80057E9C:
/* 3329C 80057E9C 0000A82D */ daddu $s5, $zero, $zero
.L80057EA0:
/* 332A0 80057EA0 02153023 */ subu $a2, $s0, $s5
/* 332A4 80057EA4 04C20001 */ bltzl $a2, .L80057EAC
/* 332A8 80057EA8 0000302D */ daddu $a2, $zero, $zero
.L80057EAC:
/* 332AC 80057EAC 24C2000F */ addiu $v0, $a2, 0xf
/* 332B0 80057EB0 00028903 */ sra $s1, $v0, 4
/* 332B4 80057EB4 001110C0 */ sll $v0, $s1, 3
/* 332B8 80057EB8 10A00072 */ beqz $a1, .L80058084
/* 332BC 80057EBC 00513821 */ addu $a3, $v0, $s1
/* 332C0 80057EC0 02C0202D */ daddu $a0, $s6, $zero
/* 332C4 80057EC4 001E1400 */ sll $v0, $fp, 0x10
/* 332C8 80057EC8 00021403 */ sra $v0, $v0, 0x10
/* 332CC 80057ECC AFA20010 */ sw $v0, 0x10($sp)
/* 332D0 80057ED0 AFA00014 */ sw $zero, 0x14($sp)
/* 332D4 80057ED4 8E42002C */ lw $v0, 0x2c($s2)
/* 332D8 80057ED8 0240282D */ daddu $a1, $s2, $zero
/* 332DC 80057EDC 0C0161F4 */ jal func_800587D0
/* 332E0 80057EE0 AFA20018 */ sw $v0, 0x18($sp)
/* 332E4 80057EE4 8E430028 */ lw $v1, 0x28($s2)
/* 332E8 80057EE8 10600005 */ beqz $v1, .L80057F00
/* 332EC 80057EEC 0040B02D */ daddu $s6, $v0, $zero
/* 332F0 80057EF0 9642002A */ lhu $v0, 0x2a($s2)
/* 332F4 80057EF4 00021040 */ sll $v0, $v0, 1
/* 332F8 80057EF8 08015FC1 */ j .L80057F04
/* 332FC 80057EFC 03C2F021 */ addu $fp, $fp, $v0
.L80057F00:
/* 33300 80057F00 27DE0020 */ addiu $fp, $fp, 0x20
.L80057F04:
/* 33304 80057F04 001E2C00 */ sll $a1, $fp, 0x10
/* 33308 80057F08 8E420008 */ lw $v0, 8($s2)
/* 3330C 80057F0C 00059C03 */ sra $s3, $a1, 0x10
/* 33310 80057F10 3042000F */ andi $v0, $v0, 0xf
/* 33314 80057F14 AE420028 */ sw $v0, 0x28($s2)
/* 33318 80057F18 8E420014 */ lw $v0, 0x14($s2)
/* 3331C 80057F1C 8E430008 */ lw $v1, 8($s2)
/* 33320 80057F20 8C440000 */ lw $a0, ($v0)
/* 33324 80057F24 0060102D */ daddu $v0, $v1, $zero
/* 33328 80057F28 00031902 */ srl $v1, $v1, 4
/* 3332C 80057F2C 24630001 */ addiu $v1, $v1, 1
/* 33330 80057F30 AE420024 */ sw $v0, 0x24($s2)
/* 33334 80057F34 000310C0 */ sll $v0, $v1, 3
/* 33338 80057F38 00431021 */ addu $v0, $v0, $v1
/* 3333C 80057F3C 00822021 */ addu $a0, $a0, $v0
/* 33340 80057F40 0214102A */ slt $v0, $s0, $s4
/* 33344 80057F44 10400042 */ beqz $v0, .L80058050
/* 33348 80057F48 AE440030 */ sw $a0, 0x30($s2)
/* 3334C 80057F4C 0000402D */ daddu $t0, $zero, $zero
/* 33350 80057F50 00081400 */ sll $v0, $t0, 0x10
/* 33354 80057F54 00021403 */ sra $v0, $v0, 0x10
/* 33358 80057F58 AFA2002C */ sw $v0, 0x2c($sp)
.L80057F5C:
/* 3335C 80057F5C 26220001 */ addiu $v0, $s1, 1
/* 33360 80057F60 00021140 */ sll $v0, $v0, 5
/* 33364 80057F64 02621021 */ addu $v0, $s3, $v0
/* 33368 80057F68 00101840 */ sll $v1, $s0, 1
/* 3336C 80057F6C 02639821 */ addu $s3, $s3, $v1
/* 33370 80057F70 24420010 */ addiu $v0, $v0, 0x10
/* 33374 80057F74 2403FFE0 */ addiu $v1, $zero, -0x20
/* 33378 80057F78 0043A824 */ and $s5, $v0, $v1
/* 3337C 80057F7C 8E430010 */ lw $v1, 0x10($s2)
/* 33380 80057F80 2402FFFF */ addiu $v0, $zero, -1
/* 33384 80057F84 10620004 */ beq $v1, $v0, .L80057F98
/* 33388 80057F88 0290A023 */ subu $s4, $s4, $s0
/* 3338C 80057F8C 10600002 */ beqz $v1, .L80057F98
/* 33390 80057F90 00621021 */ addu $v0, $v1, $v0
/* 33394 80057F94 AE420010 */ sw $v0, 0x10($s2)
.L80057F98:
/* 33398 80057F98 8E43000C */ lw $v1, 0xc($s2)
/* 3339C 80057F9C 8E420008 */ lw $v0, 8($s2)
/* 333A0 80057FA0 00621823 */ subu $v1, $v1, $v0
/* 333A4 80057FA4 0283102B */ sltu $v0, $s4, $v1
/* 333A8 80057FA8 14400002 */ bnez $v0, .L80057FB4
/* 333AC 80057FAC 0280802D */ daddu $s0, $s4, $zero
/* 333B0 80057FB0 0060802D */ daddu $s0, $v1, $zero
.L80057FB4:
/* 333B4 80057FB4 8E420028 */ lw $v0, 0x28($s2)
/* 333B8 80057FB8 2442FFF0 */ addiu $v0, $v0, -0x10
/* 333BC 80057FBC 02023021 */ addu $a2, $s0, $v0
/* 333C0 80057FC0 04C20001 */ bltzl $a2, .L80057FC8
/* 333C4 80057FC4 0000302D */ daddu $a2, $zero, $zero
.L80057FC8:
/* 333C8 80057FC8 24C2000F */ addiu $v0, $a2, 0xf
/* 333CC 80057FCC 00028903 */ sra $s1, $v0, 4
/* 333D0 80057FD0 02C0202D */ daddu $a0, $s6, $zero
/* 333D4 80057FD4 0240282D */ daddu $a1, $s2, $zero
/* 333D8 80057FD8 00151400 */ sll $v0, $s5, 0x10
/* 333DC 80057FDC 00021403 */ sra $v0, $v0, 0x10
/* 333E0 80057FE0 8FA8002C */ lw $t0, 0x2c($sp)
/* 333E4 80057FE4 001138C0 */ sll $a3, $s1, 3
/* 333E8 80057FE8 AFA20010 */ sw $v0, 0x10($sp)
/* 333EC 80057FEC AFA80014 */ sw $t0, 0x14($sp)
/* 333F0 80057FF0 8E42002C */ lw $v0, 0x2c($s2)
/* 333F4 80057FF4 00F13821 */ addu $a3, $a3, $s1
/* 333F8 80057FF8 34420002 */ ori $v0, $v0, 2
/* 333FC 80057FFC 0C0161F4 */ jal func_800587D0
/* 33400 80058000 AFA20018 */ sw $v0, 0x18($sp)
/* 33404 80058004 0040B02D */ daddu $s6, $v0, $zero
/* 33408 80058008 02C0282D */ daddu $a1, $s6, $zero
/* 3340C 8005800C 3C0600FF */ lui $a2, 0xff
/* 33410 80058010 34C6FFFF */ ori $a2, $a2, 0xffff
/* 33414 80058014 00132400 */ sll $a0, $s3, 0x10
/* 33418 80058018 00101840 */ sll $v1, $s0, 1
/* 3341C 8005801C 3063FFFF */ andi $v1, $v1, 0xffff
/* 33420 80058020 00832025 */ or $a0, $a0, $v1
/* 33424 80058024 8E420028 */ lw $v0, 0x28($s2)
/* 33428 80058028 3C030A00 */ lui $v1, 0xa00
/* 3342C 8005802C ACA40004 */ sw $a0, 4($a1)
/* 33430 80058030 00021040 */ sll $v0, $v0, 1
/* 33434 80058034 02A21021 */ addu $v0, $s5, $v0
/* 33438 80058038 00461024 */ and $v0, $v0, $a2
/* 3343C 8005803C 00431025 */ or $v0, $v0, $v1
/* 33440 80058040 ACA20000 */ sw $v0, ($a1)
/* 33444 80058044 0214102A */ slt $v0, $s0, $s4
/* 33448 80058048 1440FFC4 */ bnez $v0, .L80057F5C
/* 3344C 8005804C 26D60008 */ addiu $s6, $s6, 8
.L80058050:
/* 33450 80058050 8E420028 */ lw $v0, 0x28($s2)
/* 33454 80058054 8E430024 */ lw $v1, 0x24($s2)
/* 33458 80058058 02821021 */ addu $v0, $s4, $v0
/* 3345C 8005805C 3042000F */ andi $v0, $v0, 0xf
/* 33460 80058060 00741821 */ addu $v1, $v1, $s4
/* 33464 80058064 AE420028 */ sw $v0, 0x28($s2)
/* 33468 80058068 001110C0 */ sll $v0, $s1, 3
/* 3346C 8005806C AE430024 */ sw $v1, 0x24($s2)
/* 33470 80058070 8E430030 */ lw $v1, 0x30($s2)
/* 33474 80058074 00511021 */ addu $v0, $v0, $s1
/* 33478 80058078 00621821 */ addu $v1, $v1, $v0
/* 3347C 8005807C 0801613E */ j .L800584F8
/* 33480 80058080 AE430030 */ sw $v1, 0x30($s2)
.L80058084:
/* 33484 80058084 8E440014 */ lw $a0, 0x14($s2)
/* 33488 80058088 8E430030 */ lw $v1, 0x30($s2)
/* 3348C 8005808C 8C820000 */ lw $v0, ($a0)
/* 33490 80058090 8C840004 */ lw $a0, 4($a0)
/* 33494 80058094 00671821 */ addu $v1, $v1, $a3
/* 33498 80058098 00441021 */ addu $v0, $v0, $a0
/* 3349C 8005809C 00622023 */ subu $a0, $v1, $v0
/* 334A0 800580A0 1C800003 */ bgtz $a0, .L800580B0
/* 334A4 800580A4 00118100 */ sll $s0, $s1, 4
/* 334A8 800580A8 0801602D */ j .L800580B4
/* 334AC 800580AC 0000202D */ daddu $a0, $zero, $zero
.L800580B0:
/* 334B0 800580B0 AEE00028 */ sw $zero, 0x28($s7)
.L800580B4:
/* 334B4 800580B4 3C0238E3 */ lui $v0, 0x38e3
/* 334B8 800580B8 34428E39 */ ori $v0, $v0, 0x8e39
/* 334BC 800580BC 00820018 */ mult $a0, $v0
/* 334C0 800580C0 00041FC3 */ sra $v1, $a0, 0x1f
/* 334C4 800580C4 00004010 */ mfhi $t0
/* 334C8 800580C8 00081043 */ sra $v0, $t0, 1
/* 334CC 800580CC 00431023 */ subu $v0, $v0, $v1
/* 334D0 800580D0 00029900 */ sll $s3, $v0, 4
/* 334D4 800580D4 02151821 */ addu $v1, $s0, $s5
/* 334D8 800580D8 0073102A */ slt $v0, $v1, $s3
/* 334DC 800580DC 54400001 */ bnel $v0, $zero, .L800580E4
/* 334E0 800580E0 0060982D */ daddu $s3, $v1, $zero
.L800580E4:
/* 334E4 800580E4 3262000F */ andi $v0, $s3, 0xf
/* 334E8 800580E8 02621023 */ subu $v0, $s3, $v0
/* 334EC 800580EC 0054102A */ slt $v0, $v0, $s4
/* 334F0 800580F0 10400020 */ beqz $v0, .L80058174
/* 334F4 800580F4 00E43823 */ subu $a3, $a3, $a0
/* 334F8 800580F8 24080001 */ addiu $t0, $zero, 1
/* 334FC 800580FC 02C0202D */ daddu $a0, $s6, $zero
/* 33500 80058100 0240282D */ daddu $a1, $s2, $zero
/* 33504 80058104 001E1400 */ sll $v0, $fp, 0x10
/* 33508 80058108 00021403 */ sra $v0, $v0, 0x10
/* 3350C 8005810C AFA80024 */ sw $t0, 0x24($sp)
/* 33510 80058110 AFA20010 */ sw $v0, 0x10($sp)
/* 33514 80058114 AFA00014 */ sw $zero, 0x14($sp)
/* 33518 80058118 8E42002C */ lw $v0, 0x2c($s2)
/* 3351C 8005811C 02133023 */ subu $a2, $s0, $s3
/* 33520 80058120 0C0161F4 */ jal func_800587D0
/* 33524 80058124 AFA20018 */ sw $v0, 0x18($sp)
/* 33528 80058128 8E430028 */ lw $v1, 0x28($s2)
/* 3352C 8005812C 10600005 */ beqz $v1, .L80058144
/* 33530 80058130 0040B02D */ daddu $s6, $v0, $zero
/* 33534 80058134 9642002A */ lhu $v0, 0x2a($s2)
/* 33538 80058138 00021040 */ sll $v0, $v0, 1
/* 3353C 8005813C 08016052 */ j .L80058148
/* 33540 80058140 03C2F021 */ addu $fp, $fp, $v0
.L80058144:
/* 33544 80058144 27DE0020 */ addiu $fp, $fp, 0x20
.L80058148:
/* 33548 80058148 8E420028 */ lw $v0, 0x28($s2)
/* 3354C 8005814C 8E430024 */ lw $v1, 0x24($s2)
/* 33550 80058150 02821021 */ addu $v0, $s4, $v0
/* 33554 80058154 3042000F */ andi $v0, $v0, 0xf
/* 33558 80058158 00741821 */ addu $v1, $v1, $s4
/* 3355C 8005815C AE420028 */ sw $v0, 0x28($s2)
/* 33560 80058160 001110C0 */ sll $v0, $s1, 3
/* 33564 80058164 AE430024 */ sw $v1, 0x24($s2)
/* 33568 80058168 8E430030 */ lw $v1, 0x30($s2)
/* 3356C 8005816C 08016061 */ j .L80058184
/* 33570 80058170 00511021 */ addu $v0, $v0, $s1
.L80058174:
/* 33574 80058174 001110C0 */ sll $v0, $s1, 3
/* 33578 80058178 8E430030 */ lw $v1, 0x30($s2)
/* 3357C 8005817C 00511021 */ addu $v0, $v0, $s1
/* 33580 80058180 AE400028 */ sw $zero, 0x28($s2)
.L80058184:
/* 33584 80058184 00621821 */ addu $v1, $v1, $v0
/* 33588 80058188 126000DB */ beqz $s3, .L800584F8
/* 3358C 8005818C AE430030 */ sw $v1, 0x30($s2)
/* 33590 80058190 AE400028 */ sw $zero, 0x28($s2)
/* 33594 80058194 8FA80024 */ lw $t0, 0x24($sp)
/* 33598 80058198 11000004 */ beqz $t0, .L800581AC
/* 3359C 8005819C 02B01021 */ addu $v0, $s5, $s0
/* 335A0 800581A0 00531023 */ subu $v0, $v0, $s3
/* 335A4 800581A4 0801606C */ j .L800581B0
/* 335A8 800581A8 00022840 */ sll $a1, $v0, 1
.L800581AC:
/* 335AC 800581AC 0000282D */ daddu $a1, $zero, $zero
.L800581B0:
/* 335B0 800581B0 02C0202D */ daddu $a0, $s6, $zero
/* 335B4 800581B4 26D60008 */ addiu $s6, $s6, 8
/* 335B8 800581B8 3C0300FF */ lui $v1, 0xff
/* 335BC 800581BC 3463FFFF */ ori $v1, $v1, 0xffff
/* 335C0 800581C0 001E1400 */ sll $v0, $fp, 0x10
/* 335C4 800581C4 00021403 */ sra $v0, $v0, 0x10
/* 335C8 800581C8 00A21021 */ addu $v0, $a1, $v0
/* 335CC 800581CC 00431024 */ and $v0, $v0, $v1
/* 335D0 800581D0 3C030200 */ lui $v1, 0x200
/* 335D4 800581D4 00431025 */ or $v0, $v0, $v1
/* 335D8 800581D8 AC820000 */ sw $v0, ($a0)
/* 335DC 800581DC 00131040 */ sll $v0, $s3, 1
/* 335E0 800581E0 0801613E */ j .L800584F8
/* 335E4 800581E4 AC820004 */ sw $v0, 4($a0)
.L800581E8:
/* 335E8 800581E8 8FA80060 */ lw $t0, 0x60($sp)
/* 335EC 800581EC 8D040028 */ lw $a0, 0x28($t0)
/* 335F0 800581F0 8D030010 */ lw $v1, 0x10($t0)
/* 335F4 800581F4 02841021 */ addu $v0, $s4, $a0
/* 335F8 800581F8 0062102B */ sltu $v0, $v1, $v0
/* 335FC 800581FC 10400079 */ beqz $v0, .L800583E4
/* 33600 80058200 00148040 */ sll $s0, $s4, 1
/* 33604 80058204 8D020014 */ lw $v0, 0x14($t0)
/* 33608 80058208 10400076 */ beqz $v0, .L800583E4
/* 3360C 8005820C 00649823 */ subu $s3, $v1, $a0
/* 33610 80058210 1A600017 */ blez $s3, .L80058270
/* 33614 80058214 00138040 */ sll $s0, $s3, 1
/* 33618 80058218 0200282D */ daddu $a1, $s0, $zero
/* 3361C 8005821C 8D040034 */ lw $a0, 0x34($t0)
/* 33620 80058220 8D060024 */ lw $a2, 0x24($t0)
/* 33624 80058224 90E70025 */ lbu $a3, 0x25($a3)
/* 33628 80058228 8D020020 */ lw $v0, 0x20($t0)
/* 3362C 8005822C 0040F809 */ jalr $v0
/* 33630 80058230 26D60008 */ addiu $s6, $s6, 8
/* 33634 80058234 0040382D */ daddu $a3, $v0, $zero
/* 33638 80058238 30E60007 */ andi $a2, $a3, 7
/* 3363C 8005823C 02068021 */ addu $s0, $s0, $a2
/* 33640 80058240 3C030400 */ lui $v1, 0x400
/* 33644 80058244 34630170 */ ori $v1, $v1, 0x170
/* 33648 80058248 32020007 */ andi $v0, $s0, 7
/* 3364C 8005824C 2442FFF8 */ addiu $v0, $v0, -8
/* 33650 80058250 02021023 */ subu $v0, $s0, $v0
/* 33654 80058254 30420FFF */ andi $v0, $v0, 0xfff
/* 33658 80058258 00021300 */ sll $v0, $v0, 0xc
/* 3365C 8005825C 00431025 */ or $v0, $v0, $v1
/* 33660 80058260 AE220000 */ sw $v0, ($s1)
/* 33664 80058264 00E61023 */ subu $v0, $a3, $a2
/* 33668 80058268 0801609D */ j .L80058274
/* 3366C 8005826C AE220004 */ sw $v0, 4($s1)
.L80058270:
/* 33670 80058270 0000302D */ daddu $a2, $zero, $zero
.L80058274:
/* 33674 80058274 03C61021 */ addu $v0, $fp, $a2
/* 33678 80058278 0040F02D */ daddu $fp, $v0, $zero
/* 3367C 8005827C 00021400 */ sll $v0, $v0, 0x10
/* 33680 80058280 0002AC03 */ sra $s5, $v0, 0x10
/* 33684 80058284 0274102A */ slt $v0, $s3, $s4
/* 33688 80058288 8E430008 */ lw $v1, 8($s2)
/* 3368C 8005828C 8E440014 */ lw $a0, 0x14($s2)
/* 33690 80058290 0060282D */ daddu $a1, $v1, $zero
/* 33694 80058294 8C840000 */ lw $a0, ($a0)
/* 33698 80058298 00031840 */ sll $v1, $v1, 1
/* 3369C 8005829C AE450024 */ sw $a1, 0x24($s2)
/* 336A0 800582A0 00832021 */ addu $a0, $a0, $v1
/* 336A4 800582A4 10400047 */ beqz $v0, .L800583C4
/* 336A8 800582A8 AE440030 */ sw $a0, 0x30($s2)
/* 336AC 800582AC 26D1FFFC */ addiu $s1, $s6, -4
/* 336B0 800582B0 00131040 */ sll $v0, $s3, 1
.L800582B4:
/* 336B4 800582B4 02A2A821 */ addu $s5, $s5, $v0
/* 336B8 800582B8 8E430010 */ lw $v1, 0x10($s2)
/* 336BC 800582BC 2402FFFF */ addiu $v0, $zero, -1
/* 336C0 800582C0 10620004 */ beq $v1, $v0, .L800582D4
/* 336C4 800582C4 0293A023 */ subu $s4, $s4, $s3
/* 336C8 800582C8 10600002 */ beqz $v1, .L800582D4
/* 336CC 800582CC 00621021 */ addu $v0, $v1, $v0
/* 336D0 800582D0 AE420010 */ sw $v0, 0x10($s2)
.L800582D4:
/* 336D4 800582D4 8E43000C */ lw $v1, 0xc($s2)
/* 336D8 800582D8 8E420008 */ lw $v0, 8($s2)
/* 336DC 800582DC 00621823 */ subu $v1, $v1, $v0
/* 336E0 800582E0 0283102B */ sltu $v0, $s4, $v1
/* 336E4 800582E4 14400002 */ bnez $v0, .L800582F0
/* 336E8 800582E8 0280982D */ daddu $s3, $s4, $zero
/* 336EC 800582EC 0060982D */ daddu $s3, $v1, $zero
.L800582F0:
/* 336F0 800582F0 00138040 */ sll $s0, $s3, 1
/* 336F4 800582F4 8E440030 */ lw $a0, 0x30($s2)
/* 336F8 800582F8 8E420014 */ lw $v0, 0x14($s2)
/* 336FC 800582FC 8E460020 */ lw $a2, 0x20($s2)
/* 33700 80058300 90470025 */ lbu $a3, 0x25($v0)
/* 33704 80058304 8E42001C */ lw $v0, 0x1c($s2)
/* 33708 80058308 0040F809 */ jalr $v0
/* 3370C 8005830C 0200282D */ daddu $a1, $s0, $zero
/* 33710 80058310 0040382D */ daddu $a3, $v0, $zero
/* 33714 80058314 30E60007 */ andi $a2, $a3, 7
/* 33718 80058318 32A30007 */ andi $v1, $s5, 7
/* 3371C 8005831C 10600004 */ beqz $v1, .L80058330
/* 33720 80058320 02068021 */ addu $s0, $s0, $a2
/* 33724 80058324 24020008 */ addiu $v0, $zero, 8
/* 33728 80058328 080160CD */ j .L80058334
/* 3372C 8005832C 00432823 */ subu $a1, $v0, $v1
.L80058330:
/* 33730 80058330 0000282D */ daddu $a1, $zero, $zero
.L80058334:
/* 33734 80058334 26310008 */ addiu $s1, $s1, 8
/* 33738 80058338 26D60008 */ addiu $s6, $s6, 8
/* 3373C 8005833C 32020007 */ andi $v0, $s0, 7
/* 33740 80058340 2442FFF8 */ addiu $v0, $v0, -8
/* 33744 80058344 02021023 */ subu $v0, $s0, $v0
/* 33748 80058348 30420FFF */ andi $v0, $v0, 0xfff
/* 3374C 8005834C 00021300 */ sll $v0, $v0, 0xc
/* 33750 80058350 02A51821 */ addu $v1, $s5, $a1
/* 33754 80058354 30630FFF */ andi $v1, $v1, 0xfff
/* 33758 80058358 3C040400 */ lui $a0, 0x400
/* 3375C 8005835C 00641825 */ or $v1, $v1, $a0
/* 33760 80058360 00431025 */ or $v0, $v0, $v1
/* 33764 80058364 AE22FFFC */ sw $v0, -4($s1)
/* 33768 80058368 00E61023 */ subu $v0, $a3, $a2
/* 3376C 8005836C 14C00003 */ bnez $a2, .L8005837C
/* 33770 80058370 AE220000 */ sw $v0, ($s1)
/* 33774 80058374 10A00011 */ beqz $a1, .L800583BC
/* 33778 80058378 0274102A */ slt $v0, $s3, $s4
.L8005837C:
/* 3377C 8005837C 26310008 */ addiu $s1, $s1, 8
/* 33780 80058380 26D60008 */ addiu $s6, $s6, 8
/* 33784 80058384 3C0300FF */ lui $v1, 0xff
/* 33788 80058388 3463FFFF */ ori $v1, $v1, 0xffff
/* 3378C 8005838C 02A61021 */ addu $v0, $s5, $a2
/* 33790 80058390 00451021 */ addu $v0, $v0, $a1
/* 33794 80058394 00431024 */ and $v0, $v0, $v1
/* 33798 80058398 3C030A00 */ lui $v1, 0xa00
/* 3379C 8005839C 00431025 */ or $v0, $v0, $v1
/* 337A0 800583A0 00151C00 */ sll $v1, $s5, 0x10
/* 337A4 800583A4 AE22FFFC */ sw $v0, -4($s1)
/* 337A8 800583A8 00131040 */ sll $v0, $s3, 1
/* 337AC 800583AC 3042FFFF */ andi $v0, $v0, 0xffff
/* 337B0 800583B0 00621825 */ or $v1, $v1, $v0
/* 337B4 800583B4 AE230000 */ sw $v1, ($s1)
/* 337B8 800583B8 0274102A */ slt $v0, $s3, $s4
.L800583BC:
/* 337BC 800583BC 1440FFBD */ bnez $v0, .L800582B4
/* 337C0 800583C0 00131040 */ sll $v0, $s3, 1
.L800583C4:
/* 337C4 800583C4 8E420024 */ lw $v0, 0x24($s2)
/* 337C8 800583C8 00541021 */ addu $v0, $v0, $s4
/* 337CC 800583CC AE420024 */ sw $v0, 0x24($s2)
/* 337D0 800583D0 8E420030 */ lw $v0, 0x30($s2)
/* 337D4 800583D4 00141840 */ sll $v1, $s4, 1
/* 337D8 800583D8 00431021 */ addu $v0, $v0, $v1
/* 337DC 800583DC 0801613E */ j .L800584F8
/* 337E0 800583E0 AE420030 */ sw $v0, 0x30($s2)
.L800583E4:
/* 337E4 800583E4 8E440014 */ lw $a0, 0x14($s2)
/* 337E8 800583E8 8E430030 */ lw $v1, 0x30($s2)
/* 337EC 800583EC 8C820000 */ lw $v0, ($a0)
/* 337F0 800583F0 8C840004 */ lw $a0, 4($a0)
/* 337F4 800583F4 00701821 */ addu $v1, $v1, $s0
/* 337F8 800583F8 00441021 */ addu $v0, $v0, $a0
/* 337FC 800583FC 00628823 */ subu $s1, $v1, $v0
/* 33800 80058400 5E200002 */ bgtzl $s1, .L8005840C
/* 33804 80058404 AEE00028 */ sw $zero, 0x28($s7)
/* 33808 80058408 0000882D */ daddu $s1, $zero, $zero
.L8005840C:
/* 3380C 8005840C 0211102A */ slt $v0, $s0, $s1
/* 33810 80058410 54400001 */ bnel $v0, $zero, .L80058418
/* 33814 80058414 0200882D */ daddu $s1, $s0, $zero
.L80058418:
/* 33818 80058418 0230102A */ slt $v0, $s1, $s0
/* 3381C 8005841C 10400021 */ beqz $v0, .L800584A4
/* 33820 80058420 00000000 */ nop
/* 33824 80058424 1A80001A */ blez $s4, .L80058490
/* 33828 80058428 02118023 */ subu $s0, $s0, $s1
/* 3382C 8005842C 8E440030 */ lw $a0, 0x30($s2)
/* 33830 80058430 8E420014 */ lw $v0, 0x14($s2)
/* 33834 80058434 8E460020 */ lw $a2, 0x20($s2)
/* 33838 80058438 90470025 */ lbu $a3, 0x25($v0)
/* 3383C 8005843C 8E42001C */ lw $v0, 0x1c($s2)
/* 33840 80058440 0040F809 */ jalr $v0
/* 33844 80058444 0200282D */ daddu $a1, $s0, $zero
/* 33848 80058448 0040382D */ daddu $a3, $v0, $zero
/* 3384C 8005844C 30E60007 */ andi $a2, $a3, 7
/* 33850 80058450 02068021 */ addu $s0, $s0, $a2
/* 33854 80058454 02C0282D */ daddu $a1, $s6, $zero
/* 33858 80058458 26D60008 */ addiu $s6, $s6, 8
/* 3385C 8005845C 32020007 */ andi $v0, $s0, 7
/* 33860 80058460 2442FFF8 */ addiu $v0, $v0, -8
/* 33864 80058464 02021023 */ subu $v0, $s0, $v0
/* 33868 80058468 30420FFF */ andi $v0, $v0, 0xfff
/* 3386C 8005846C 00021300 */ sll $v0, $v0, 0xc
/* 33870 80058470 33C30FFF */ andi $v1, $fp, 0xfff
/* 33874 80058474 3C040400 */ lui $a0, 0x400
/* 33878 80058478 00641825 */ or $v1, $v1, $a0
/* 3387C 8005847C 00431025 */ or $v0, $v0, $v1
/* 33880 80058480 ACA20000 */ sw $v0, ($a1)
/* 33884 80058484 00E61023 */ subu $v0, $a3, $a2
/* 33888 80058488 08016125 */ j .L80058494
/* 3388C 8005848C ACA20004 */ sw $v0, 4($a1)
.L80058490:
/* 33890 80058490 0000302D */ daddu $a2, $zero, $zero
.L80058494:
/* 33894 80058494 8E420024 */ lw $v0, 0x24($s2)
/* 33898 80058498 03C6F021 */ addu $fp, $fp, $a2
/* 3389C 8005849C 00541021 */ addu $v0, $v0, $s4
/* 338A0 800584A0 AE420024 */ sw $v0, 0x24($s2)
.L800584A4:
/* 338A4 800584A4 8E420030 */ lw $v0, 0x30($s2)
/* 338A8 800584A8 00141840 */ sll $v1, $s4, 1
/* 338AC 800584AC 00431021 */ addu $v0, $v0, $v1
/* 338B0 800584B0 12200011 */ beqz $s1, .L800584F8
/* 338B4 800584B4 AE420030 */ sw $v0, 0x30($s2)
/* 338B8 800584B8 00141040 */ sll $v0, $s4, 1
/* 338BC 800584BC 00512823 */ subu $a1, $v0, $s1
/* 338C0 800584C0 04A20001 */ bltzl $a1, .L800584C8
/* 338C4 800584C4 0000282D */ daddu $a1, $zero, $zero
.L800584C8:
/* 338C8 800584C8 02C0202D */ daddu $a0, $s6, $zero
/* 338CC 800584CC 26D60008 */ addiu $s6, $s6, 8
/* 338D0 800584D0 3C0300FF */ lui $v1, 0xff
/* 338D4 800584D4 3463FFFF */ ori $v1, $v1, 0xffff
/* 338D8 800584D8 001E1400 */ sll $v0, $fp, 0x10
/* 338DC 800584DC 00021403 */ sra $v0, $v0, 0x10
/* 338E0 800584E0 00A21021 */ addu $v0, $a1, $v0
/* 338E4 800584E4 00431024 */ and $v0, $v0, $v1
/* 338E8 800584E8 3C030200 */ lui $v1, 0x200
/* 338EC 800584EC 00431025 */ or $v0, $v0, $v1
/* 338F0 800584F0 AC820000 */ sw $v0, ($a0)
/* 338F4 800584F4 AC910004 */ sw $s1, 4($a0)
.L800584F8:
/* 338F8 800584F8 8FA80020 */ lw $t0, 0x20($sp)
/* 338FC 800584FC 3C014700 */ lui $at, 0x4700
/* 33900 80058500 44811000 */ mtc1 $at, $f2
/* 33904 80058504 C5000004 */ lwc1 $f0, 4($t0)
/* 33908 80058508 46020002 */ mul.s $f0, $f0, $f2
/* 3390C 8005850C 00000000 */ nop
/* 33910 80058510 8D040000 */ lw $a0, ($t0)
/* 33914 80058514 4600018D */ trunc.w.s $f6, $f0
/* 33918 80058518 44103000 */ mfc1 $s0, $f6
/* 3391C 8005851C 0C018798 */ jal func_80061E60
/* 33920 80058520 3210FFFF */ andi $s0, $s0, 0xffff
/* 33924 80058524 3C0300FF */ lui $v1, 0xff
/* 33928 80058528 3463FFFF */ ori $v1, $v1, 0xffff
/* 3392C 8005852C 02C0202D */ daddu $a0, $s6, $zero
/* 33930 80058530 00431024 */ and $v0, $v0, $v1
/* 33934 80058534 3C030500 */ lui $v1, 0x500
/* 33938 80058538 00431025 */ or $v0, $v0, $v1
/* 3393C 8005853C 00108380 */ sll $s0, $s0, 0xe
/* 33940 80058540 AC820000 */ sw $v0, ($a0)
/* 33944 80058544 8FA80020 */ lw $t0, 0x20($sp)
/* 33948 80058548 33C20FFF */ andi $v0, $fp, 0xfff
/* 3394C 8005854C 8D03000C */ lw $v1, 0xc($t0)
/* 33950 80058550 00021080 */ sll $v0, $v0, 2
/* 33954 80058554 00031F80 */ sll $v1, $v1, 0x1e
/* 33958 80058558 00701825 */ or $v1, $v1, $s0
/* 3395C 8005855C 00621825 */ or $v1, $v1, $v0
/* 33960 80058560 AC830004 */ sw $v1, 4($a0)
/* 33964 80058564 AD00000C */ sw $zero, 0xc($t0)
/* 33968 80058568 8EE20024 */ lw $v0, 0x24($s7)
/* 3396C 8005856C 10400069 */ beqz $v0, .L80058714
/* 33970 80058570 26D60008 */ addiu $s6, $s6, 8
/* 33974 80058574 3C028008 */ lui $v0, %hi(D_80078151)
/* 33978 80058578 24428151 */ addiu $v0, $v0, %lo(D_80078151)
/* 3397C 8005857C 90420000 */ lbu $v0, ($v0)
/* 33980 80058580 1440000C */ bnez $v0, .L800585B4
/* 33984 80058584 AEE00024 */ sw $zero, 0x24($s7)
/* 33988 80058588 3C048008 */ lui $a0, %hi(D_80078E30)
/* 3398C 8005858C 24848E30 */ addiu $a0, $a0, %lo(D_80078E30)
/* 33990 80058590 86E30006 */ lh $v1, 6($s7)
/* 33994 80058594 84820080 */ lh $v0, 0x80($a0)
/* 33998 80058598 00620018 */ mult $v1, $v0
/* 3399C 8005859C 00004012 */ mflo $t0
/* 339A0 800585A0 000813C3 */ sra $v0, $t0, 0xf
/* 339A4 800585A4 A6E20014 */ sh $v0, 0x14($s7)
/* 339A8 800585A8 84820080 */ lh $v0, 0x80($a0)
/* 339AC 800585AC 08016180 */ j .L80058600
/* 339B0 800585B0 00620018 */ mult $v1, $v0
.L800585B4:
/* 339B4 800585B4 86E20004 */ lh $v0, 4($s7)
/* 339B8 800585B8 86E30006 */ lh $v1, 6($s7)
/* 339BC 800585BC 00021040 */ sll $v0, $v0, 1
/* 339C0 800585C0 3C018008 */ lui $at, %hi(D_80078E30)
/* 339C4 800585C4 00220821 */ addu $at, $at, $v0
/* 339C8 800585C8 84228E30 */ lh $v0, %lo(D_80078E30)($at)
/* 339CC 800585CC 00620018 */ mult $v1, $v0
/* 339D0 800585D0 86E30004 */ lh $v1, 4($s7)
/* 339D4 800585D4 00004012 */ mflo $t0
/* 339D8 800585D8 000813C3 */ sra $v0, $t0, 0xf
/* 339DC 800585DC A6E20014 */ sh $v0, 0x14($s7)
/* 339E0 800585E0 2402007F */ addiu $v0, $zero, 0x7f
/* 339E4 800585E4 00431023 */ subu $v0, $v0, $v1
/* 339E8 800585E8 00021040 */ sll $v0, $v0, 1
/* 339EC 800585EC 86E30006 */ lh $v1, 6($s7)
/* 339F0 800585F0 3C018008 */ lui $at, %hi(D_80078E30)
/* 339F4 800585F4 00220821 */ addu $at, $at, $v0
/* 339F8 800585F8 84228E30 */ lh $v0, %lo(D_80078E30)($at)
/* 339FC 800585FC 00620018 */ mult $v1, $v0
.L80058600:
/* 33A00 80058600 00004012 */ mflo $t0
/* 33A04 80058604 000813C3 */ sra $v0, $t0, 0xf
/* 33A08 80058608 A6E2001A */ sh $v0, 0x1a($s7)
/* 33A0C 8005860C 86E30008 */ lh $v1, 8($s7)
/* 33A10 80058610 86E40014 */ lh $a0, 0x14($s7)
/* 33A14 80058614 8EE50020 */ lw $a1, 0x20($s7)
/* 33A18 80058618 26E20010 */ addiu $v0, $s7, 0x10
/* 33A1C 8005861C AFA20014 */ sw $v0, 0x14($sp)
/* 33A20 80058620 44836000 */ mtc1 $v1, $f12
/* 33A24 80058624 00000000 */ nop
/* 33A28 80058628 46806321 */ cvt.d.w $f12, $f12
/* 33A2C 8005862C 44847000 */ mtc1 $a0, $f14
/* 33A30 80058630 00000000 */ nop
/* 33A34 80058634 468073A1 */ cvt.d.w $f14, $f14
/* 33A38 80058638 0C016247 */ jal func_8005891C
/* 33A3C 8005863C AFA50010 */ sw $a1, 0x10($sp)
/* 33A40 80058640 86E3000A */ lh $v1, 0xa($s7)
/* 33A44 80058644 86E4001A */ lh $a0, 0x1a($s7)
/* 33A48 80058648 8EE50020 */ lw $a1, 0x20($s7)
/* 33A4C 8005864C A6E20012 */ sh $v0, 0x12($s7)
/* 33A50 80058650 26E20016 */ addiu $v0, $s7, 0x16
/* 33A54 80058654 AFA20014 */ sw $v0, 0x14($sp)
/* 33A58 80058658 44836000 */ mtc1 $v1, $f12
/* 33A5C 8005865C 00000000 */ nop
/* 33A60 80058660 46806321 */ cvt.d.w $f12, $f12
/* 33A64 80058664 44847000 */ mtc1 $a0, $f14
/* 33A68 80058668 00000000 */ nop
/* 33A6C 8005866C 468073A1 */ cvt.d.w $f14, $f14
/* 33A70 80058670 0C016247 */ jal func_8005891C
/* 33A74 80058674 AFA50010 */ sw $a1, 0x10($sp)
/* 33A78 80058678 02C0202D */ daddu $a0, $s6, $zero
/* 33A7C 8005867C 26D60008 */ addiu $s6, $s6, 8
/* 33A80 80058680 02C0282D */ daddu $a1, $s6, $zero
/* 33A84 80058684 26D60008 */ addiu $s6, $s6, 8
/* 33A88 80058688 02C0302D */ daddu $a2, $s6, $zero
/* 33A8C 8005868C 26D60008 */ addiu $s6, $s6, 8
/* 33A90 80058690 3C030900 */ lui $v1, 0x900
/* 33A94 80058694 A6E20018 */ sh $v0, 0x18($s7)
/* 33A98 80058698 96E20014 */ lhu $v0, 0x14($s7)
/* 33A9C 8005869C 02C0802D */ daddu $s0, $s6, $zero
/* 33AA0 800586A0 00431025 */ or $v0, $v0, $v1
/* 33AA4 800586A4 AC820000 */ sw $v0, ($a0)
/* 33AA8 800586A8 96E20012 */ lhu $v0, 0x12($s7)
/* 33AAC 800586AC 96E30010 */ lhu $v1, 0x10($s7)
/* 33AB0 800586B0 00021400 */ sll $v0, $v0, 0x10
/* 33AB4 800586B4 00431025 */ or $v0, $v0, $v1
/* 33AB8 800586B8 AC820004 */ sw $v0, 4($a0)
/* 33ABC 800586BC 96E20008 */ lhu $v0, 8($s7)
/* 33AC0 800586C0 3C030906 */ lui $v1, 0x906
/* 33AC4 800586C4 00431025 */ or $v0, $v0, $v1
/* 33AC8 800586C8 ACA20000 */ sw $v0, ($a1)
/* 33ACC 800586CC 96E2000C */ lhu $v0, 0xc($s7)
/* 33AD0 800586D0 96E3000E */ lhu $v1, 0xe($s7)
/* 33AD4 800586D4 00021400 */ sll $v0, $v0, 0x10
/* 33AD8 800586D8 00431025 */ or $v0, $v0, $v1
/* 33ADC 800586DC ACA20004 */ sw $v0, 4($a1)
/* 33AE0 800586E0 96E2001A */ lhu $v0, 0x1a($s7)
/* 33AE4 800586E4 3C030904 */ lui $v1, 0x904
/* 33AE8 800586E8 00431025 */ or $v0, $v0, $v1
/* 33AEC 800586EC ACC20000 */ sw $v0, ($a2)
/* 33AF0 800586F0 96E20018 */ lhu $v0, 0x18($s7)
/* 33AF4 800586F4 96E30016 */ lhu $v1, 0x16($s7)
/* 33AF8 800586F8 00021400 */ sll $v0, $v0, 0x10
/* 33AFC 800586FC 00431025 */ or $v0, $v0, $v1
/* 33B00 80058700 ACC20004 */ sw $v0, 4($a2)
/* 33B04 80058704 96E2000A */ lhu $v0, 0xa($s7)
/* 33B08 80058708 3C030301 */ lui $v1, 0x301
/* 33B0C 8005870C 080161C7 */ j .L8005871C
/* 33B10 80058710 00431025 */ or $v0, $v0, $v1
.L80058714:
/* 33B14 80058714 02C0802D */ daddu $s0, $s6, $zero
/* 33B18 80058718 3C020300 */ lui $v0, 0x300
.L8005871C:
/* 33B1C 8005871C AE020000 */ sw $v0, ($s0)
/* 33B20 80058720 8EE40000 */ lw $a0, ($s7)
/* 33B24 80058724 0C018798 */ jal func_80061E60
/* 33B28 80058728 26D60008 */ addiu $s6, $s6, 8
/* 33B2C 8005872C AE020004 */ sw $v0, 4($s0)
/* 33B30 80058730 8EE2001C */ lw $v0, 0x1c($s7)
/* 33B34 80058734 8EE30020 */ lw $v1, 0x20($s7)
/* 33B38 80058738 244200B8 */ addiu $v0, $v0, 0xb8
/* 33B3C 8005873C AEE2001C */ sw $v0, 0x1c($s7)
/* 33B40 80058740 0062102A */ slt $v0, $v1, $v0
/* 33B44 80058744 54400001 */ bnel $v0, $zero, .L8005874C
/* 33B48 80058748 AEE3001C */ sw $v1, 0x1c($s7)
.L8005874C:
/* 33B4C 8005874C 8EE20028 */ lw $v0, 0x28($s7)
/* 33B50 80058750 14400013 */ bnez $v0, .L800587A0
/* 33B54 80058754 02C0102D */ daddu $v0, $s6, $zero
/* 33B58 80058758 24020001 */ addiu $v0, $zero, 1
/* 33B5C 8005875C AEE20024 */ sw $v0, 0x24($s7)
/* 33B60 80058760 A6E20006 */ sh $v0, 6($s7)
/* 33B64 80058764 8FA80020 */ lw $t0, 0x20($sp)
/* 33B68 80058768 AD000008 */ sw $zero, 8($t0)
/* 33B6C 8005876C AD02000C */ sw $v0, 0xc($t0)
/* 33B70 80058770 8E430014 */ lw $v1, 0x14($s2)
/* 33B74 80058774 AE400028 */ sw $zero, 0x28($s2)
/* 33B78 80058778 AE42002C */ sw $v0, 0x2c($s2)
/* 33B7C 8005877C AE400024 */ sw $zero, 0x24($s2)
/* 33B80 80058780 8C620000 */ lw $v0, ($v1)
/* 33B84 80058784 AE420030 */ sw $v0, 0x30($s2)
/* 33B88 80058788 8C620014 */ lw $v0, 0x14($v1)
/* 33B8C 8005878C AE420010 */ sw $v0, 0x10($s2)
/* 33B90 80058790 8FA80060 */ lw $t0, 0x60($sp)
/* 33B94 80058794 0C014AB8 */ jal func_80052AE0
/* 33B98 80058798 91040079 */ lbu $a0, 0x79($t0)
.L8005879C:
/* 33B9C 8005879C 02C0102D */ daddu $v0, $s6, $zero
.L800587A0:
/* 33BA0 800587A0 8FBF005C */ lw $ra, 0x5c($sp)
/* 33BA4 800587A4 8FBE0058 */ lw $fp, 0x58($sp)
/* 33BA8 800587A8 8FB70054 */ lw $s7, 0x54($sp)
/* 33BAC 800587AC 8FB60050 */ lw $s6, 0x50($sp)
/* 33BB0 800587B0 8FB5004C */ lw $s5, 0x4c($sp)
/* 33BB4 800587B4 8FB40048 */ lw $s4, 0x48($sp)
/* 33BB8 800587B8 8FB30044 */ lw $s3, 0x44($sp)
/* 33BBC 800587BC 8FB20040 */ lw $s2, 0x40($sp)
/* 33BC0 800587C0 8FB1003C */ lw $s1, 0x3c($sp)
/* 33BC4 800587C4 8FB00038 */ lw $s0, 0x38($sp)
/* 33BC8 800587C8 03E00008 */ jr $ra
/* 33BCC 800587CC 27BD0060 */ addiu $sp, $sp, 0x60