papermario/asm/nonmatchings/code_3812C0/func_E00801D0.s
Ethan Roseman a8e550dd9a yee
2020-10-17 22:27:25 -04:00

163 lines
8.2 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_E00801D0
/* 381490 E00801D0 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 381494 E00801D4 AFB50024 */ sw $s5, 0x24($sp)
/* 381498 E00801D8 0080A82D */ daddu $s5, $a0, $zero
/* 38149C E00801DC AFBF0030 */ sw $ra, 0x30($sp)
/* 3814A0 E00801E0 AFB7002C */ sw $s7, 0x2c($sp)
/* 3814A4 E00801E4 AFB60028 */ sw $s6, 0x28($sp)
/* 3814A8 E00801E8 AFB40020 */ sw $s4, 0x20($sp)
/* 3814AC E00801EC AFB3001C */ sw $s3, 0x1c($sp)
/* 3814B0 E00801F0 AFB20018 */ sw $s2, 0x18($sp)
/* 3814B4 E00801F4 AFB10014 */ sw $s1, 0x14($sp)
/* 3814B8 E00801F8 AFB00010 */ sw $s0, 0x10($sp)
/* 3814BC E00801FC F7B60040 */ sdc1 $f22, 0x40($sp)
/* 3814C0 E0080200 F7B40038 */ sdc1 $f20, 0x38($sp)
/* 3814C4 E0080204 8EA3000C */ lw $v1, 0xc($s5)
/* 3814C8 E0080208 8C62002C */ lw $v0, 0x2c($v1)
/* 3814CC E008020C 2442FFFF */ addiu $v0, $v0, -1
/* 3814D0 E0080210 AC62002C */ sw $v0, 0x2c($v1)
/* 3814D4 E0080214 8C620030 */ lw $v0, 0x30($v1)
/* 3814D8 E0080218 8C64002C */ lw $a0, 0x2c($v1)
/* 3814DC E008021C 24420001 */ addiu $v0, $v0, 1
/* 3814E0 E0080220 04810005 */ bgez $a0, .LE0080238
/* 3814E4 E0080224 AC620030 */ sw $v0, 0x30($v1)
/* 3814E8 E0080228 0C080128 */ jal func_E02004A0
/* 3814EC E008022C 02A0202D */ daddu $a0, $s5, $zero
/* 3814F0 E0080230 080200FC */ j .LE00803F0
/* 3814F4 E0080234 00000000 */ nop
.LE0080238:
/* 3814F8 E0080238 24630048 */ addiu $v1, $v1, 0x48
/* 3814FC E008023C 24120001 */ addiu $s2, $zero, 1
/* 381500 E0080240 8EA20008 */ lw $v0, 8($s5)
/* 381504 E0080244 0242102A */ slt $v0, $s2, $v0
/* 381508 E0080248 10400069 */ beqz $v0, .LE00803F0
/* 38150C E008024C 0080882D */ daddu $s1, $a0, $zero
/* 381510 E0080250 3C013F80 */ lui $at, 0x3f80
/* 381514 E0080254 4481B000 */ mtc1 $at, $f22
/* 381518 E0080258 3C17E008 */ lui $s7, 0xe008
/* 38151C E008025C 26F70AF0 */ addiu $s7, $s7, 0xaf0
/* 381520 E0080260 02511004 */ sllv $v0, $s1, $s2
/* 381524 E0080264 0051A021 */ addu $s4, $v0, $s1
/* 381528 E0080268 001410C0 */ sll $v0, $s4, 3
/* 38152C E008026C 0051B021 */ addu $s6, $v0, $s1
/* 381530 E0080270 2470002C */ addiu $s0, $v1, 0x2c
/* 381534 E0080274 24130026 */ addiu $s3, $zero, 0x26
.LE0080278:
/* 381538 E0080278 8E020008 */ lw $v0, 8($s0)
/* 38153C E008027C 8E030000 */ lw $v1, ($s0)
/* 381540 E0080280 18400003 */ blez $v0, .LE0080290
/* 381544 E0080284 2442FFFF */ addiu $v0, $v0, -1
/* 381548 E0080288 1C400053 */ bgtz $v0, .LE00803D8
/* 38154C E008028C AE020008 */ sw $v0, 8($s0)
.LE0080290:
/* 381550 E0080290 28620007 */ slti $v0, $v1, 7
/* 381554 E0080294 14400004 */ bnez $v0, .LE00802A8
/* 381558 E0080298 00031880 */ sll $v1, $v1, 2
/* 38155C E008029C E6160010 */ swc1 $f22, 0x10($s0)
/* 381560 E00802A0 080200B1 */ j .LE00802C4
/* 381564 E00802A4 E616000C */ swc1 $f22, 0xc($s0)
.LE00802A8:
/* 381568 E00802A8 00771021 */ addu $v0, $v1, $s7
/* 38156C E00802AC C4400000 */ lwc1 $f0, ($v0)
/* 381570 E00802B0 E600000C */ swc1 $f0, 0xc($s0)
/* 381574 E00802B4 3C01E008 */ lui $at, 0xe008
/* 381578 E00802B8 00230821 */ addu $at, $at, $v1
/* 38157C E00802BC C4200B0C */ lwc1 $f0, 0xb0c($at)
/* 381580 E00802C0 E6000010 */ swc1 $f0, 0x10($s0)
.LE00802C4:
/* 381584 E00802C4 00141080 */ sll $v0, $s4, 2
/* 381588 E00802C8 02621021 */ addu $v0, $s3, $v0
/* 38158C E00802CC 4482A000 */ mtc1 $v0, $f20
/* 381590 E00802D0 00000000 */ nop
/* 381594 E00802D4 4680A520 */ cvt.s.w $f20, $f20
/* 381598 E00802D8 C606FFD8 */ lwc1 $f6, -0x28($s0)
/* 38159C E00802DC C600FFE4 */ lwc1 $f0, -0x1c($s0)
/* 3815A0 E00802E0 C604FFDC */ lwc1 $f4, -0x24($s0)
/* 3815A4 E00802E4 46003180 */ add.s $f6, $f6, $f0
/* 3815A8 E00802E8 C600FFE8 */ lwc1 $f0, -0x18($s0)
/* 3815AC E00802EC C602FFEC */ lwc1 $f2, -0x14($s0)
/* 3815B0 E00802F0 46002100 */ add.s $f4, $f4, $f0
/* 3815B4 E00802F4 C600FFE0 */ lwc1 $f0, -0x20($s0)
/* 3815B8 E00802F8 4600A306 */ mov.s $f12, $f20
/* 3815BC E00802FC 46020000 */ add.s $f0, $f0, $f2
/* 3815C0 E0080300 E606FFD8 */ swc1 $f6, -0x28($s0)
/* 3815C4 E0080304 E604FFDC */ swc1 $f4, -0x24($s0)
/* 3815C8 E0080308 0C080140 */ jal func_E0200500
/* 3815CC E008030C E600FFE0 */ swc1 $f0, -0x20($s0)
/* 3815D0 E0080310 3C01C1F0 */ lui $at, 0xc1f0
/* 3815D4 E0080314 44811000 */ mtc1 $at, $f2
/* 3815D8 E0080318 00000000 */ nop
/* 3815DC E008031C 46020002 */ mul.s $f0, $f0, $f2
/* 3815E0 E0080320 00000000 */ nop
/* 3815E4 E0080324 4600A306 */ mov.s $f12, $f20
/* 3815E8 E0080328 0C080144 */ jal func_E0200510
/* 3815EC E008032C E600FFF0 */ swc1 $f0, -0x10($s0)
/* 3815F0 E0080330 3C014100 */ lui $at, 0x4100
/* 3815F4 E0080334 44811000 */ mtc1 $at, $f2
/* 3815F8 E0080338 00000000 */ nop
/* 3815FC E008033C 46020082 */ mul.s $f2, $f0, $f2
/* 381600 E0080340 00000000 */ nop
/* 381604 E0080344 2A220014 */ slti $v0, $s1, 0x14
/* 381608 E0080348 10400014 */ beqz $v0, .LE008039C
/* 38160C E008034C E602FFF8 */ swc1 $f2, -8($s0)
/* 381610 E0080350 44912000 */ mtc1 $s1, $f4
/* 381614 E0080354 00000000 */ nop
/* 381618 E0080358 46802120 */ cvt.s.w $f4, $f4
/* 38161C E008035C 3C01E008 */ lui $at, 0xe008
/* 381620 E0080360 D4200B30 */ ldc1 $f0, 0xb30($at)
/* 381624 E0080364 46002121 */ cvt.d.s $f4, $f4
/* 381628 E0080368 46202102 */ mul.d $f4, $f4, $f0
/* 38162C E008036C 00000000 */ nop
/* 381630 E0080370 460010A1 */ cvt.d.s $f2, $f2
/* 381634 E0080374 46241082 */ mul.d $f2, $f2, $f4
/* 381638 E0080378 00000000 */ nop
/* 38163C E008037C C600FFF0 */ lwc1 $f0, -0x10($s0)
/* 381640 E0080380 46000021 */ cvt.d.s $f0, $f0
/* 381644 E0080384 46240002 */ mul.d $f0, $f0, $f4
/* 381648 E0080388 00000000 */ nop
/* 38164C E008038C 462010A0 */ cvt.s.d $f2, $f2
/* 381650 E0080390 46200020 */ cvt.s.d $f0, $f0
/* 381654 E0080394 E602FFF8 */ swc1 $f2, -8($s0)
/* 381658 E0080398 E600FFF0 */ swc1 $f0, -0x10($s0)
.LE008039C:
/* 38165C E008039C 2A22000A */ slti $v0, $s1, 0xa
/* 381660 E00803A0 1040000A */ beqz $v0, .LE00803CC
/* 381664 E00803A4 00000000 */ nop
/* 381668 E00803A8 C600FFE8 */ lwc1 $f0, -0x18($s0)
/* 38166C E00803AC 3C01E008 */ lui $at, 0xe008
/* 381670 E00803B0 D4220B38 */ ldc1 $f2, 0xb38($at)
/* 381674 E00803B4 46000021 */ cvt.d.s $f0, $f0
/* 381678 E00803B8 46220002 */ mul.d $f0, $f0, $f2
/* 38167C E00803BC 00000000 */ nop
/* 381680 E00803C0 AE16FFFC */ sw $s6, -4($s0)
/* 381684 E00803C4 46200020 */ cvt.s.d $f0, $f0
/* 381688 E00803C8 E600FFE8 */ swc1 $f0, -0x18($s0)
.LE00803CC:
/* 38168C E00803CC 8E020000 */ lw $v0, ($s0)
/* 381690 E00803D0 24420001 */ addiu $v0, $v0, 1
/* 381694 E00803D4 AE020000 */ sw $v0, ($s0)
.LE00803D8:
/* 381698 E00803D8 26730026 */ addiu $s3, $s3, 0x26
/* 38169C E00803DC 26520001 */ addiu $s2, $s2, 1
/* 3816A0 E00803E0 8EA20008 */ lw $v0, 8($s5)
/* 3816A4 E00803E4 0242102A */ slt $v0, $s2, $v0
/* 3816A8 E00803E8 1440FFA3 */ bnez $v0, .LE0080278
/* 3816AC E00803EC 26100048 */ addiu $s0, $s0, 0x48
.LE00803F0:
/* 3816B0 E00803F0 8FBF0030 */ lw $ra, 0x30($sp)
/* 3816B4 E00803F4 8FB7002C */ lw $s7, 0x2c($sp)
/* 3816B8 E00803F8 8FB60028 */ lw $s6, 0x28($sp)
/* 3816BC E00803FC 8FB50024 */ lw $s5, 0x24($sp)
/* 3816C0 E0080400 8FB40020 */ lw $s4, 0x20($sp)
/* 3816C4 E0080404 8FB3001C */ lw $s3, 0x1c($sp)
/* 3816C8 E0080408 8FB20018 */ lw $s2, 0x18($sp)
/* 3816CC E008040C 8FB10014 */ lw $s1, 0x14($sp)
/* 3816D0 E0080410 8FB00010 */ lw $s0, 0x10($sp)
/* 3816D4 E0080414 D7B60040 */ ldc1 $f22, 0x40($sp)
/* 3816D8 E0080418 D7B40038 */ ldc1 $f20, 0x38($sp)
/* 3816DC E008041C 03E00008 */ jr $ra
/* 3816E0 E0080420 27BD0048 */ addiu $sp, $sp, 0x48