papermario/asm/nonmatchings/code_364F10/func_E00641A4.s
2021-01-13 00:42:27 +09:00

153 lines
7.8 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_E00641A4
/* 3650B4 E00641A4 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 3650B8 E00641A8 AFB20018 */ sw $s2, 0x18($sp)
/* 3650BC E00641AC 0080902D */ daddu $s2, $a0, $zero
/* 3650C0 E00641B0 AFBF001C */ sw $ra, 0x1c($sp)
/* 3650C4 E00641B4 AFB10014 */ sw $s1, 0x14($sp)
/* 3650C8 E00641B8 AFB00010 */ sw $s0, 0x10($sp)
/* 3650CC E00641BC F7BC0040 */ sdc1 $f28, 0x40($sp)
/* 3650D0 E00641C0 F7BA0038 */ sdc1 $f26, 0x38($sp)
/* 3650D4 E00641C4 F7B80030 */ sdc1 $f24, 0x30($sp)
/* 3650D8 E00641C8 F7B60028 */ sdc1 $f22, 0x28($sp)
/* 3650DC E00641CC F7B40020 */ sdc1 $f20, 0x20($sp)
/* 3650E0 E00641D0 8E44000C */ lw $a0, 0xc($s2)
/* 3650E4 E00641D4 8C82002C */ lw $v0, 0x2c($a0)
/* 3650E8 E00641D8 8C830028 */ lw $v1, 0x28($a0)
/* 3650EC E00641DC 24420001 */ addiu $v0, $v0, 1
/* 3650F0 E00641E0 2463FFFF */ addiu $v1, $v1, -1
/* 3650F4 E00641E4 AC82002C */ sw $v0, 0x2c($a0)
/* 3650F8 E00641E8 04610005 */ bgez $v1, .LE0064200
/* 3650FC E00641EC AC830028 */ sw $v1, 0x28($a0)
/* 365100 E00641F0 0C080128 */ jal func_E02004A0
/* 365104 E00641F4 0240202D */ daddu $a0, $s2, $zero
/* 365108 E00641F8 080190EC */ j .LE00643B0
/* 36510C E00641FC 00000000 */ nop
.LE0064200:
/* 365110 E0064200 8C82002C */ lw $v0, 0x2c($a0)
/* 365114 E0064204 28420008 */ slti $v0, $v0, 8
/* 365118 E0064208 14400009 */ bnez $v0, .LE0064230
/* 36511C E006420C 00000000 */ nop
/* 365120 E0064210 3C01E006 */ lui $at, %hi(D_E0064A70)
/* 365124 E0064214 D4224A70 */ ldc1 $f2, %lo(D_E0064A70)($at)
/* 365128 E0064218 C4800038 */ lwc1 $f0, 0x38($a0)
/* 36512C E006421C 46800021 */ cvt.d.w $f0, $f0
/* 365130 E0064220 46220002 */ mul.d $f0, $f0, $f2
/* 365134 E0064224 00000000 */ nop
/* 365138 E0064228 4620038D */ trunc.w.d $f14, $f0
/* 36513C E006422C E48E0038 */ swc1 $f14, 0x38($a0)
.LE0064230:
/* 365140 E0064230 8E420008 */ lw $v0, 8($s2)
/* 365144 E0064234 24110001 */ addiu $s1, $zero, 1
/* 365148 E0064238 0222102A */ slt $v0, $s1, $v0
/* 36514C E006423C 1040005C */ beqz $v0, .LE00643B0
/* 365150 E0064240 24840058 */ addiu $a0, $a0, 0x58
/* 365154 E0064244 2490003C */ addiu $s0, $a0, 0x3c
/* 365158 E0064248 3C013FE0 */ lui $at, 0x3fe0
/* 36515C E006424C 4481C800 */ mtc1 $at, $f25
/* 365160 E0064250 4480C000 */ mtc1 $zero, $f24
/* 365164 E0064254 3C014200 */ lui $at, 0x4200
/* 365168 E0064258 4481B000 */ mtc1 $at, $f22
/* 36516C E006425C 3C013F00 */ lui $at, 0x3f00
/* 365170 E0064260 4481E000 */ mtc1 $at, $f28
/* 365174 E0064264 3C01E006 */ lui $at, %hi(D_E0064A78)
/* 365178 E0064268 D4344A78 */ ldc1 $f20, %lo(D_E0064A78)($at)
/* 36517C E006426C 3C014300 */ lui $at, 0x4300
/* 365180 E0064270 4481D000 */ mtc1 $at, $f26
.LE0064274:
/* 365184 E0064274 8E020010 */ lw $v0, 0x10($s0)
/* 365188 E0064278 24420001 */ addiu $v0, $v0, 1
/* 36518C E006427C 04400047 */ bltz $v0, .LE006439C
/* 365190 E0064280 AE020010 */ sw $v0, 0x10($s0)
/* 365194 E0064284 1440001D */ bnez $v0, .LE00642FC
/* 365198 E0064288 00000000 */ nop
/* 36519C E006428C C60CFFF8 */ lwc1 $f12, -8($s0)
/* 3651A0 E0064290 AE00FFC8 */ sw $zero, -0x38($s0)
/* 3651A4 E0064294 AE00FFCC */ sw $zero, -0x34($s0)
/* 3651A8 E0064298 0C080140 */ jal func_E0200500
/* 3651AC E006429C AE00FFD0 */ sw $zero, -0x30($s0)
/* 3651B0 E00642A0 46000007 */ neg.s $f0, $f0
/* 3651B4 E00642A4 46000021 */ cvt.d.s $f0, $f0
/* 3651B8 E00642A8 46380002 */ mul.d $f0, $f0, $f24
/* 3651BC E00642AC 00000000 */ nop
/* 3651C0 E00642B0 C60CFFF8 */ lwc1 $f12, -8($s0)
/* 3651C4 E00642B4 46200020 */ cvt.s.d $f0, $f0
/* 3651C8 E00642B8 0C080144 */ jal func_E0200510
/* 3651CC E00642BC E600FFD4 */ swc1 $f0, -0x2c($s0)
/* 3651D0 E00642C0 46000021 */ cvt.d.s $f0, $f0
/* 3651D4 E00642C4 3C014120 */ lui $at, 0x4120
/* 3651D8 E00642C8 44811000 */ mtc1 $at, $f2
/* 3651DC E00642CC 46380002 */ mul.d $f0, $f0, $f24
/* 3651E0 E00642D0 00000000 */ nop
/* 3651E4 E00642D4 AE00FFDC */ sw $zero, -0x24($s0)
/* 3651E8 E00642D8 E6160000 */ swc1 $f22, ($s0)
/* 3651EC E00642DC E6160004 */ swc1 $f22, 4($s0)
/* 3651F0 E00642E0 E616000C */ swc1 $f22, 0xc($s0)
/* 3651F4 E00642E4 E61CFFE0 */ swc1 $f28, -0x20($s0)
/* 3651F8 E00642E8 E61CFFE8 */ swc1 $f28, -0x18($s0)
/* 3651FC E00642EC E6160008 */ swc1 $f22, 8($s0)
/* 365200 E00642F0 E602FFE4 */ swc1 $f2, -0x1c($s0)
/* 365204 E00642F4 46200020 */ cvt.s.d $f0, $f0
/* 365208 E00642F8 E600FFD8 */ swc1 $f0, -0x28($s0)
.LE00642FC:
/* 36520C E00642FC C6060004 */ lwc1 $f6, 4($s0)
/* 365210 E0064300 3C01E006 */ lui $at, %hi(D_E0064A80)
/* 365214 E0064304 D4204A80 */ ldc1 $f0, %lo(D_E0064A80)($at)
/* 365218 E0064308 460031A1 */ cvt.d.s $f6, $f6
/* 36521C E006430C 46203182 */ mul.d $f6, $f6, $f0
/* 365220 E0064310 00000000 */ nop
/* 365224 E0064314 C604FFE4 */ lwc1 $f4, -0x1c($s0)
/* 365228 E0064318 3C01E006 */ lui $at, %hi(D_E0064A88)
/* 36522C E006431C D42A4A88 */ ldc1 $f10, %lo(D_E0064A88)($at)
/* 365230 E0064320 46002121 */ cvt.d.s $f4, $f4
/* 365234 E0064324 46245281 */ sub.d $f10, $f10, $f4
/* 365238 E0064328 46345282 */ mul.d $f10, $f10, $f20
/* 36523C E006432C 00000000 */ nop
/* 365240 E0064330 C6020004 */ lwc1 $f2, 4($s0)
/* 365244 E0064334 C6000000 */ lwc1 $f0, ($s0)
/* 365248 E0064338 46020000 */ add.s $f0, $f0, $f2
/* 36524C E006433C C602FFE0 */ lwc1 $f2, -0x20($s0)
/* 365250 E0064340 C6080008 */ lwc1 $f8, 8($s0)
/* 365254 E0064344 460010A1 */ cvt.d.s $f2, $f2
/* 365258 E0064348 46341080 */ add.d $f2, $f2, $f20
/* 36525C E006434C E6000000 */ swc1 $f0, ($s0)
/* 365260 E0064350 C600000C */ lwc1 $f0, 0xc($s0)
/* 365264 E0064354 46004200 */ add.s $f8, $f8, $f0
/* 365268 E0064358 C600FFE8 */ lwc1 $f0, -0x18($s0)
/* 36526C E006435C 462010A0 */ cvt.s.d $f2, $f2
/* 365270 E0064360 46000021 */ cvt.d.s $f0, $f0
/* 365274 E0064364 46340000 */ add.d $f0, $f0, $f20
/* 365278 E0064368 E602FFE0 */ swc1 $f2, -0x20($s0)
/* 36527C E006436C E6080008 */ swc1 $f8, 8($s0)
/* 365280 E0064370 46200020 */ cvt.s.d $f0, $f0
/* 365284 E0064374 E600FFE8 */ swc1 $f0, -0x18($s0)
/* 365288 E0064378 C6000000 */ lwc1 $f0, ($s0)
/* 36528C E006437C 462A2100 */ add.d $f4, $f4, $f10
/* 365290 E0064380 462031A0 */ cvt.s.d $f6, $f6
/* 365294 E0064384 E6060004 */ swc1 $f6, 4($s0)
/* 365298 E0064388 4600D03C */ c.lt.s $f26, $f0
/* 36529C E006438C 46202120 */ cvt.s.d $f4, $f4
/* 3652A0 E0064390 45000002 */ bc1f .LE006439C
/* 3652A4 E0064394 E604FFE4 */ swc1 $f4, -0x1c($s0)
/* 3652A8 E0064398 E61A0000 */ swc1 $f26, ($s0)
.LE006439C:
/* 3652AC E006439C 26310001 */ addiu $s1, $s1, 1
/* 3652B0 E00643A0 8E420008 */ lw $v0, 8($s2)
/* 3652B4 E00643A4 0222102A */ slt $v0, $s1, $v0
/* 3652B8 E00643A8 1440FFB2 */ bnez $v0, .LE0064274
/* 3652BC E00643AC 26100058 */ addiu $s0, $s0, 0x58
.LE00643B0:
/* 3652C0 E00643B0 8FBF001C */ lw $ra, 0x1c($sp)
/* 3652C4 E00643B4 8FB20018 */ lw $s2, 0x18($sp)
/* 3652C8 E00643B8 8FB10014 */ lw $s1, 0x14($sp)
/* 3652CC E00643BC 8FB00010 */ lw $s0, 0x10($sp)
/* 3652D0 E00643C0 D7BC0040 */ ldc1 $f28, 0x40($sp)
/* 3652D4 E00643C4 D7BA0038 */ ldc1 $f26, 0x38($sp)
/* 3652D8 E00643C8 D7B80030 */ ldc1 $f24, 0x30($sp)
/* 3652DC E00643CC D7B60028 */ ldc1 $f22, 0x28($sp)
/* 3652E0 E00643D0 D7B40020 */ ldc1 $f20, 0x20($sp)
/* 3652E4 E00643D4 03E00008 */ jr $ra
/* 3652E8 E00643D8 27BD0048 */ addiu $sp, $sp, 0x48