papermario/ver/jp/asm/nonmatchings/main_23330/func_80049DD4.s

189 lines
9.5 KiB
ArmAsm
Raw Normal View History

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80049DD4
/* 251D4 80049DD4 27BDFFA8 */ addiu $sp, $sp, -0x58
/* 251D8 80049DD8 AFB30044 */ sw $s3, 0x44($sp)
/* 251DC 80049DDC 0080982D */ daddu $s3, $a0, $zero
/* 251E0 80049DE0 AFBF0048 */ sw $ra, 0x48($sp)
/* 251E4 80049DE4 AFB20040 */ sw $s2, 0x40($sp)
/* 251E8 80049DE8 AFB1003C */ sw $s1, 0x3c($sp)
/* 251EC 80049DEC AFB00038 */ sw $s0, 0x38($sp)
/* 251F0 80049DF0 F7B40050 */ sdc1 $f20, 0x50($sp)
/* 251F4 80049DF4 8E720148 */ lw $s2, 0x148($s3)
/* 251F8 80049DF8 00A0882D */ daddu $s1, $a1, $zero
/* 251FC 80049DFC 86440008 */ lh $a0, 8($s2)
/* 25200 80049E00 0C00E9EB */ jal func_8003A7AC
/* 25204 80049E04 00C0802D */ daddu $s0, $a2, $zero
/* 25208 80049E08 0200202D */ daddu $a0, $s0, $zero
/* 2520C 80049E0C 0240282D */ daddu $a1, $s2, $zero
/* 25210 80049E10 24030001 */ addiu $v1, $zero, 1
/* 25214 80049E14 AFA30010 */ sw $v1, 0x10($sp)
/* 25218 80049E18 8E260024 */ lw $a2, 0x24($s1)
/* 2521C 80049E1C 8E270028 */ lw $a3, 0x28($s1)
/* 25220 80049E20 0C012359 */ jal func_80048D64
/* 25224 80049E24 0040802D */ daddu $s0, $v0, $zero
/* 25228 80049E28 1440001D */ bnez $v0, .L80049EA0
/* 2522C 80049E2C 24040002 */ addiu $a0, $zero, 2
/* 25230 80049E30 0200282D */ daddu $a1, $s0, $zero
/* 25234 80049E34 0000302D */ daddu $a2, $zero, $zero
/* 25238 80049E38 860300A8 */ lh $v1, 0xa8($s0)
/* 2523C 80049E3C 3C013F80 */ lui $at, 0x3f80
/* 25240 80049E40 44810000 */ mtc1 $at, $f0
/* 25244 80049E44 3C014000 */ lui $at, 0x4000
/* 25248 80049E48 44811000 */ mtc1 $at, $f2
/* 2524C 80049E4C 3C01C1A0 */ lui $at, 0xc1a0
/* 25250 80049E50 44812000 */ mtc1 $at, $f4
/* 25254 80049E54 2402000F */ addiu $v0, $zero, 0xf
/* 25258 80049E58 AFA2001C */ sw $v0, 0x1c($sp)
/* 2525C 80049E5C 44833000 */ mtc1 $v1, $f6
/* 25260 80049E60 00000000 */ nop
/* 25264 80049E64 468031A0 */ cvt.s.w $f6, $f6
/* 25268 80049E68 44073000 */ mfc1 $a3, $f6
/* 2526C 80049E6C 27A20028 */ addiu $v0, $sp, 0x28
/* 25270 80049E70 AFA20020 */ sw $v0, 0x20($sp)
/* 25274 80049E74 E7A00010 */ swc1 $f0, 0x10($sp)
/* 25278 80049E78 E7A20014 */ swc1 $f2, 0x14($sp)
/* 2527C 80049E7C 0C01BF9C */ jal func_8006FE70
/* 25280 80049E80 E7A40018 */ swc1 $f4, 0x18($sp)
/* 25284 80049E84 8E4200CC */ lw $v0, 0xcc($s2)
/* 25288 80049E88 8C430000 */ lw $v1, ($v0)
/* 2528C 80049E8C 24020014 */ addiu $v0, $zero, 0x14
/* 25290 80049E90 A602008E */ sh $v0, 0x8e($s0)
/* 25294 80049E94 2402000E */ addiu $v0, $zero, 0xe
/* 25298 80049E98 0801281D */ j .L8004A074
/* 2529C 80049E9C AE030028 */ sw $v1, 0x28($s0)
.L80049EA0:
/* 252A0 80049EA0 8E420018 */ lw $v0, 0x18($s2)
/* 252A4 80049EA4 9442002A */ lhu $v0, 0x2a($v0)
/* 252A8 80049EA8 30420004 */ andi $v0, $v0, 4
/* 252AC 80049EAC 1040004A */ beqz $v0, .L80049FD8
/* 252B0 80049EB0 0200202D */ daddu $a0, $s0, $zero
/* 252B4 80049EB4 3C02800F */ lui $v0, %hi(D_800F7CC0)
/* 252B8 80049EB8 8C427CC0 */ lw $v0, %lo(D_800F7CC0)($v0)
/* 252BC 80049EBC C60C0038 */ lwc1 $f12, 0x38($s0)
/* 252C0 80049EC0 C60E0040 */ lwc1 $f14, 0x40($s0)
/* 252C4 80049EC4 8C460028 */ lw $a2, 0x28($v0)
/* 252C8 80049EC8 0C00A7A5 */ jal func_80029E94
/* 252CC 80049ECC 8C470030 */ lw $a3, 0x30($v0)
/* 252D0 80049ED0 C6020018 */ lwc1 $f2, 0x18($s0)
/* 252D4 80049ED4 3C014014 */ lui $at, 0x4014
/* 252D8 80049ED8 44812800 */ mtc1 $at, $f5
/* 252DC 80049EDC 44802000 */ mtc1 $zero, $f4
/* 252E0 80049EE0 460010A1 */ cvt.d.s $f2, $f2
/* 252E4 80049EE4 46241082 */ mul.d $f2, $f2, $f4
/* 252E8 80049EE8 00000000 */ nop
/* 252EC 80049EEC 46000021 */ cvt.d.s $f0, $f0
/* 252F0 80049EF0 4620103C */ c.lt.d $f2, $f0
/* 252F4 80049EF4 00000000 */ nop
/* 252F8 80049EF8 45000036 */ bc1f .L80049FD4
/* 252FC 80049EFC 27A5002C */ addiu $a1, $sp, 0x2c
/* 25300 80049F00 C6000038 */ lwc1 $f0, 0x38($s0)
/* 25304 80049F04 C602003C */ lwc1 $f2, 0x3c($s0)
/* 25308 80049F08 C6040040 */ lwc1 $f4, 0x40($s0)
/* 2530C 80049F0C 3C013F80 */ lui $at, 0x3f80
/* 25310 80049F10 4481A000 */ mtc1 $at, $f20
/* 25314 80049F14 E7A0002C */ swc1 $f0, 0x2c($sp)
/* 25318 80049F18 E7A20030 */ swc1 $f2, 0x30($sp)
/* 2531C 80049F1C E7A40034 */ swc1 $f4, 0x34($sp)
/* 25320 80049F20 E7B40010 */ swc1 $f20, 0x10($sp)
/* 25324 80049F24 C600000C */ lwc1 $f0, 0xc($s0)
/* 25328 80049F28 E7A00014 */ swc1 $f0, 0x14($sp)
/* 2532C 80049F2C 860200A8 */ lh $v0, 0xa8($s0)
/* 25330 80049F30 44820000 */ mtc1 $v0, $f0
/* 25334 80049F34 00000000 */ nop
/* 25338 80049F38 46800020 */ cvt.s.w $f0, $f0
/* 2533C 80049F3C E7A00018 */ swc1 $f0, 0x18($sp)
/* 25340 80049F40 860200A6 */ lh $v0, 0xa6($s0)
/* 25344 80049F44 27A60030 */ addiu $a2, $sp, 0x30
/* 25348 80049F48 44820000 */ mtc1 $v0, $f0
/* 2534C 80049F4C 00000000 */ nop
/* 25350 80049F50 46800020 */ cvt.s.w $f0, $f0
/* 25354 80049F54 E7A0001C */ swc1 $f0, 0x1c($sp)
/* 25358 80049F58 8E040080 */ lw $a0, 0x80($s0)
/* 2535C 80049F5C 0C037709 */ jal func_800DDC24
/* 25360 80049F60 27A70034 */ addiu $a3, $sp, 0x34
/* 25364 80049F64 1040001B */ beqz $v0, .L80049FD4
/* 25368 80049F68 0200282D */ daddu $a1, $s0, $zero
/* 2536C 80049F6C 24040002 */ addiu $a0, $zero, 2
/* 25370 80049F70 0000302D */ daddu $a2, $zero, $zero
/* 25374 80049F74 860300A8 */ lh $v1, 0xa8($s0)
/* 25378 80049F78 3C014000 */ lui $at, 0x4000
/* 2537C 80049F7C 44810000 */ mtc1 $at, $f0
/* 25380 80049F80 3C01C1A0 */ lui $at, 0xc1a0
/* 25384 80049F84 44811000 */ mtc1 $at, $f2
/* 25388 80049F88 2402000C */ addiu $v0, $zero, 0xc
/* 2538C 80049F8C AFA2001C */ sw $v0, 0x1c($sp)
/* 25390 80049F90 44833000 */ mtc1 $v1, $f6
/* 25394 80049F94 00000000 */ nop
/* 25398 80049F98 468031A0 */ cvt.s.w $f6, $f6
/* 2539C 80049F9C 44073000 */ mfc1 $a3, $f6
/* 253A0 80049FA0 27A20028 */ addiu $v0, $sp, 0x28
/* 253A4 80049FA4 E7B40010 */ swc1 $f20, 0x10($sp)
/* 253A8 80049FA8 AFA20020 */ sw $v0, 0x20($sp)
/* 253AC 80049FAC E7A00014 */ swc1 $f0, 0x14($sp)
/* 253B0 80049FB0 0C01BF9C */ jal func_8006FE70
/* 253B4 80049FB4 E7A20018 */ swc1 $f2, 0x18($sp)
/* 253B8 80049FB8 8E4200CC */ lw $v0, 0xcc($s2)
/* 253BC 80049FBC 8C430000 */ lw $v1, ($v0)
/* 253C0 80049FC0 2402000F */ addiu $v0, $zero, 0xf
/* 253C4 80049FC4 A602008E */ sh $v0, 0x8e($s0)
/* 253C8 80049FC8 2402000E */ addiu $v0, $zero, 0xe
/* 253CC 80049FCC 0801281D */ j .L8004A074
/* 253D0 80049FD0 AE030028 */ sw $v1, 0x28($s0)
.L80049FD4:
/* 253D4 80049FD4 0200202D */ daddu $a0, $s0, $zero
.L80049FD8:
/* 253D8 80049FD8 0C00F4C8 */ jal func_8003D320
/* 253DC 80049FDC 24050001 */ addiu $a1, $zero, 1
/* 253E0 80049FE0 8E050018 */ lw $a1, 0x18($s0)
/* 253E4 80049FE4 8E06000C */ lw $a2, 0xc($s0)
/* 253E8 80049FE8 0C00E9C5 */ jal func_8003A714
/* 253EC 80049FEC 0200202D */ daddu $a0, $s0, $zero
/* 253F0 80049FF0 C6000018 */ lwc1 $f0, 0x18($s0)
/* 253F4 80049FF4 3C014020 */ lui $at, 0x4020
/* 253F8 80049FF8 44811800 */ mtc1 $at, $f3
/* 253FC 80049FFC 44801000 */ mtc1 $zero, $f2
/* 25400 8004A000 46000021 */ cvt.d.s $f0, $f0
/* 25404 8004A004 4620103C */ c.lt.d $f2, $f0
/* 25408 8004A008 00000000 */ nop
/* 2540C 8004A00C 45000012 */ bc1f .L8004A058
/* 25410 8004A010 00000000 */ nop
/* 25414 8004A014 3C028007 */ lui $v0, %hi(D_8007417C)
/* 25418 8004A018 8C42417C */ lw $v0, %lo(D_8007417C)($v0)
/* 2541C 8004A01C 94430134 */ lhu $v1, 0x134($v0)
/* 25420 8004A020 3C02CCCC */ lui $v0, 0xcccc
/* 25424 8004A024 3442CCCD */ ori $v0, $v0, 0xcccd
/* 25428 8004A028 00620019 */ multu $v1, $v0
/* 2542C 8004A02C 00004010 */ mfhi $t0
/* 25430 8004A030 00082082 */ srl $a0, $t0, 2
/* 25434 8004A034 00041080 */ sll $v0, $a0, 2
/* 25438 8004A038 00441021 */ addu $v0, $v0, $a0
/* 2543C 8004A03C 00621823 */ subu $v1, $v1, $v0
/* 25440 8004A040 3063FFFF */ andi $v1, $v1, 0xffff
/* 25444 8004A044 14600004 */ bnez $v1, .L8004A058
/* 25448 8004A048 0200202D */ daddu $a0, $s0, $zero
/* 2544C 8004A04C 240520C1 */ addiu $a1, $zero, 0x20c1
/* 25450 8004A050 0C01245C */ jal func_80049170
/* 25454 8004A054 0000302D */ daddu $a2, $zero, $zero
.L8004A058:
/* 25458 8004A058 8602008E */ lh $v0, 0x8e($s0)
/* 2545C 8004A05C 9603008E */ lhu $v1, 0x8e($s0)
/* 25460 8004A060 18400003 */ blez $v0, .L8004A070
/* 25464 8004A064 2462FFFF */ addiu $v0, $v1, -1
/* 25468 8004A068 0801281E */ j .L8004A078
/* 2546C 8004A06C A602008E */ sh $v0, 0x8e($s0)
.L8004A070:
/* 25470 8004A070 2402000C */ addiu $v0, $zero, 0xc
.L8004A074:
/* 25474 8004A074 AE620070 */ sw $v0, 0x70($s3)
.L8004A078:
/* 25478 8004A078 8FBF0048 */ lw $ra, 0x48($sp)
/* 2547C 8004A07C 8FB30044 */ lw $s3, 0x44($sp)
/* 25480 8004A080 8FB20040 */ lw $s2, 0x40($sp)
/* 25484 8004A084 8FB1003C */ lw $s1, 0x3c($sp)
/* 25488 8004A088 8FB00038 */ lw $s0, 0x38($sp)
/* 2548C 8004A08C D7B40050 */ ldc1 $f20, 0x50($sp)
/* 25490 8004A090 03E00008 */ jr $ra
/* 25494 8004A094 27BD0058 */ addiu $sp, $sp, 0x58