papermario/asm/nonmatchings/code_1776B0/func_8024B5FC.s
2020-11-29 02:13:07 -05:00

244 lines
13 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8024B5FC
/* 179EDC 8024B5FC 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 179EE0 8024B600 F7BA0038 */ sdc1 $f26, 0x38($sp)
/* 179EE4 8024B604 3C01802A */ lui $at, %hi(D_8029F270)
/* 179EE8 8024B608 C43AF270 */ lwc1 $f26, %lo(D_8029F270)($at)
/* 179EEC 8024B60C F7BC0040 */ sdc1 $f28, 0x40($sp)
/* 179EF0 8024B610 3C01802A */ lui $at, %hi(D_8029F274)
/* 179EF4 8024B614 C43CF274 */ lwc1 $f28, %lo(D_8029F274)($at)
/* 179EF8 8024B618 F7BE0048 */ sdc1 $f30, 0x48($sp)
/* 179EFC 8024B61C 3C01802A */ lui $at, %hi(D_8029F278)
/* 179F00 8024B620 C43EF278 */ lwc1 $f30, %lo(D_8029F278)($at)
/* 179F04 8024B624 AFB00018 */ sw $s0, 0x18($sp)
/* 179F08 8024B628 3C10800B */ lui $s0, %hi(D_800B22D8)
/* 179F0C 8024B62C 261022D8 */ addiu $s0, $s0, %lo(D_800B22D8)
/* 179F10 8024B630 AFBF001C */ sw $ra, 0x1c($sp)
/* 179F14 8024B634 F7B80030 */ sdc1 $f24, 0x30($sp)
/* 179F18 8024B638 F7B60028 */ sdc1 $f22, 0x28($sp)
/* 179F1C 8024B63C F7B40020 */ sdc1 $f20, 0x20($sp)
/* 179F20 8024B640 10A00029 */ beqz $a1, .L8024B6E8
/* 179F24 8024B644 E7BC0010 */ swc1 $f28, 0x10($sp)
/* 179F28 8024B648 8602001E */ lh $v0, 0x1e($s0)
/* 179F2C 8024B64C 86040026 */ lh $a0, 0x26($s0)
/* 179F30 8024B650 86030024 */ lh $v1, 0x24($s0)
/* 179F34 8024B654 44820000 */ mtc1 $v0, $f0
/* 179F38 8024B658 00000000 */ nop
/* 179F3C 8024B65C 46800020 */ cvt.s.w $f0, $f0
/* 179F40 8024B660 86020022 */ lh $v0, 0x22($s0)
/* 179F44 8024B664 3C01802A */ lui $at, %hi(D_8029F28C)
/* 179F48 8024B668 E420F28C */ swc1 $f0, %lo(D_8029F28C)($at)
/* 179F4C 8024B66C 44820000 */ mtc1 $v0, $f0
/* 179F50 8024B670 00000000 */ nop
/* 179F54 8024B674 46800020 */ cvt.s.w $f0, $f0
/* 179F58 8024B678 3C01802A */ lui $at, %hi(D_8029F294)
/* 179F5C 8024B67C E420F294 */ swc1 $f0, %lo(D_8029F294)($at)
/* 179F60 8024B680 44830000 */ mtc1 $v1, $f0
/* 179F64 8024B684 00000000 */ nop
/* 179F68 8024B688 46800020 */ cvt.s.w $f0, $f0
/* 179F6C 8024B68C 3C01802A */ lui $at, %hi(D_8029F290)
/* 179F70 8024B690 E420F290 */ swc1 $f0, %lo(D_8029F290)($at)
/* 179F74 8024B694 04820001 */ bltzl $a0, .L8024B69C
/* 179F78 8024B698 248400FF */ addiu $a0, $a0, 0xff
.L8024B69C:
/* 179F7C 8024B69C 00041203 */ sra $v0, $a0, 8
/* 179F80 8024B6A0 C6020054 */ lwc1 $f2, 0x54($s0)
/* 179F84 8024B6A4 C6040058 */ lwc1 $f4, 0x58($s0)
/* 179F88 8024B6A8 C606005C */ lwc1 $f6, 0x5c($s0)
/* 179F8C 8024B6AC 3C03802A */ lui $v1, %hi(D_8029F29E)
/* 179F90 8024B6B0 9463F29E */ lhu $v1, %lo(D_8029F29E)($v1)
/* 179F94 8024B6B4 44820000 */ mtc1 $v0, $f0
/* 179F98 8024B6B8 00000000 */ nop
/* 179F9C 8024B6BC 46800020 */ cvt.s.w $f0, $f0
/* 179FA0 8024B6C0 3C01802A */ lui $at, %hi(D_8029F298)
/* 179FA4 8024B6C4 E420F298 */ swc1 $f0, %lo(D_8029F298)($at)
/* 179FA8 8024B6C8 3C01802A */ lui $at, %hi(D_8029F2A8)
/* 179FAC 8024B6CC E422F2A8 */ swc1 $f2, %lo(D_8029F2A8)($at)
/* 179FB0 8024B6D0 3C01802A */ lui $at, %hi(D_8029F2AC)
/* 179FB4 8024B6D4 E424F2AC */ swc1 $f4, %lo(D_8029F2AC)($at)
/* 179FB8 8024B6D8 3C01802A */ lui $at, %hi(D_8029F2B0)
/* 179FBC 8024B6DC E426F2B0 */ swc1 $f6, %lo(D_8029F2B0)($at)
/* 179FC0 8024B6E0 3C01802A */ lui $at, %hi(D_8029F2A0)
/* 179FC4 8024B6E4 A423F2A0 */ sh $v1, %lo(D_8029F2A0)($at)
.L8024B6E8:
/* 179FC8 8024B6E8 3C02802A */ lui $v0, %hi(D_8029F2A5)
/* 179FCC 8024B6EC 8042F2A5 */ lb $v0, %lo(D_8029F2A5)($v0)
/* 179FD0 8024B6F0 14400027 */ bnez $v0, .L8024B790
/* 179FD4 8024B6F4 00000000 */ nop
/* 179FD8 8024B6F8 3C02802A */ lui $v0, %hi(D_8029F29E)
/* 179FDC 8024B6FC 8442F29E */ lh $v0, %lo(D_8029F29E)($v0)
/* 179FE0 8024B700 3C03802A */ lui $v1, %hi(D_8029F2A0)
/* 179FE4 8024B704 8463F2A0 */ lh $v1, %lo(D_8029F2A0)($v1)
/* 179FE8 8024B708 3C013F80 */ lui $at, 0x3f80
/* 179FEC 8024B70C 4481C000 */ mtc1 $at, $f24
/* 179FF0 8024B710 44822000 */ mtc1 $v0, $f4
/* 179FF4 8024B714 00000000 */ nop
/* 179FF8 8024B718 46802120 */ cvt.s.w $f4, $f4
/* 179FFC 8024B71C 44830000 */ mtc1 $v1, $f0
/* 17A000 8024B720 00000000 */ nop
/* 17A004 8024B724 46800020 */ cvt.s.w $f0, $f0
/* 17A008 8024B728 46002103 */ div.s $f4, $f4, $f0
/* 17A00C 8024B72C 4604C301 */ sub.s $f12, $f24, $f4
/* 17A010 8024B730 3C014049 */ lui $at, 0x4049
/* 17A014 8024B734 34210FD0 */ ori $at, $at, 0xfd0
/* 17A018 8024B738 4481B000 */ mtc1 $at, $f22
/* 17A01C 8024B73C 00000000 */ nop
/* 17A020 8024B740 46166302 */ mul.s $f12, $f12, $f22
/* 17A024 8024B744 00000000 */ nop
/* 17A028 8024B748 3C013F00 */ lui $at, 0x3f00
/* 17A02C 8024B74C 4481A000 */ mtc1 $at, $f20
/* 17A030 8024B750 00000000 */ nop
/* 17A034 8024B754 46146302 */ mul.s $f12, $f12, $f20
/* 17A038 8024B758 0C00A85B */ jal sin_rad
/* 17A03C 8024B75C 00000000 */ nop
/* 17A040 8024B760 46160002 */ mul.s $f0, $f0, $f22
/* 17A044 8024B764 00000000 */ nop
/* 17A048 8024B768 46140302 */ mul.s $f12, $f0, $f20
/* 17A04C 8024B76C 0C00A85B */ jal sin_rad
/* 17A050 8024B770 00000000 */ nop
/* 17A054 8024B774 46160002 */ mul.s $f0, $f0, $f22
/* 17A058 8024B778 00000000 */ nop
/* 17A05C 8024B77C 46140302 */ mul.s $f12, $f0, $f20
/* 17A060 8024B780 0C00A85B */ jal sin_rad
/* 17A064 8024B784 00000000 */ nop
/* 17A068 8024B788 08092DEF */ j .L8024B7BC
/* 17A06C 8024B78C 4600C101 */ sub.s $f4, $f24, $f0
.L8024B790:
/* 17A070 8024B790 3C02802A */ lui $v0, %hi(D_8029F29E)
/* 17A074 8024B794 8442F29E */ lh $v0, %lo(D_8029F29E)($v0)
/* 17A078 8024B798 3C03802A */ lui $v1, %hi(D_8029F2A0)
/* 17A07C 8024B79C 8463F2A0 */ lh $v1, %lo(D_8029F2A0)($v1)
/* 17A080 8024B7A0 44822000 */ mtc1 $v0, $f4
/* 17A084 8024B7A4 00000000 */ nop
/* 17A088 8024B7A8 46802120 */ cvt.s.w $f4, $f4
/* 17A08C 8024B7AC 44830000 */ mtc1 $v1, $f0
/* 17A090 8024B7B0 00000000 */ nop
/* 17A094 8024B7B4 46800020 */ cvt.s.w $f0, $f0
/* 17A098 8024B7B8 46002103 */ div.s $f4, $f4, $f0
.L8024B7BC:
/* 17A09C 8024B7BC 3C01802A */ lui $at, %hi(D_8029F2A8)
/* 17A0A0 8024B7C0 C434F2A8 */ lwc1 $f20, %lo(D_8029F2A8)($at)
/* 17A0A4 8024B7C4 4604A502 */ mul.s $f20, $f20, $f4
/* 17A0A8 8024B7C8 00000000 */ nop
/* 17A0AC 8024B7CC 3C01802A */ lui $at, %hi(D_8029F2AC)
/* 17A0B0 8024B7D0 C432F2AC */ lwc1 $f18, %lo(D_8029F2AC)($at)
/* 17A0B4 8024B7D4 46049482 */ mul.s $f18, $f18, $f4
/* 17A0B8 8024B7D8 00000000 */ nop
/* 17A0BC 8024B7DC 3C01802A */ lui $at, %hi(D_8029F2B0)
/* 17A0C0 8024B7E0 C430F2B0 */ lwc1 $f16, %lo(D_8029F2B0)($at)
/* 17A0C4 8024B7E4 46048402 */ mul.s $f16, $f16, $f4
/* 17A0C8 8024B7E8 00000000 */ nop
/* 17A0CC 8024B7EC 3C01802A */ lui $at, %hi(D_8029F298)
/* 17A0D0 8024B7F0 C426F298 */ lwc1 $f6, %lo(D_8029F298)($at)
/* 17A0D4 8024B7F4 46043182 */ mul.s $f6, $f6, $f4
/* 17A0D8 8024B7F8 00000000 */ nop
/* 17A0DC 8024B7FC 3C01802A */ lui $at, %hi(D_8029F28C)
/* 17A0E0 8024B800 C42CF28C */ lwc1 $f12, %lo(D_8029F28C)($at)
/* 17A0E4 8024B804 46046302 */ mul.s $f12, $f12, $f4
/* 17A0E8 8024B808 00000000 */ nop
/* 17A0EC 8024B80C 3C01802A */ lui $at, %hi(D_8029F290)
/* 17A0F0 8024B810 C428F290 */ lwc1 $f8, %lo(D_8029F290)($at)
/* 17A0F4 8024B814 46044202 */ mul.s $f8, $f8, $f4
/* 17A0F8 8024B818 00000000 */ nop
/* 17A0FC 8024B81C 3C013F80 */ lui $at, 0x3f80
/* 17A100 8024B820 44811000 */ mtc1 $at, $f2
/* 17A104 8024B824 00000000 */ nop
/* 17A108 8024B828 46041081 */ sub.s $f2, $f2, $f4
/* 17A10C 8024B82C 4602D682 */ mul.s $f26, $f26, $f2
/* 17A110 8024B830 00000000 */ nop
/* 17A114 8024B834 C7BC0010 */ lwc1 $f28, 0x10($sp)
/* 17A118 8024B838 4602E602 */ mul.s $f24, $f28, $f2
/* 17A11C 8024B83C 00000000 */ nop
/* 17A120 8024B840 3C02802A */ lui $v0, %hi(D_8029F286)
/* 17A124 8024B844 8442F286 */ lh $v0, %lo(D_8029F286)($v0)
/* 17A128 8024B848 44820000 */ mtc1 $v0, $f0
/* 17A12C 8024B84C 00000000 */ nop
/* 17A130 8024B850 46800020 */ cvt.s.w $f0, $f0
/* 17A134 8024B854 46020002 */ mul.s $f0, $f0, $f2
/* 17A138 8024B858 00000000 */ nop
/* 17A13C 8024B85C 4602F582 */ mul.s $f22, $f30, $f2
/* 17A140 8024B860 00000000 */ nop
/* 17A144 8024B864 3C02802A */ lui $v0, %hi(D_8029F280)
/* 17A148 8024B868 8442F280 */ lh $v0, %lo(D_8029F280)($v0)
/* 17A14C 8024B86C 44827000 */ mtc1 $v0, $f14
/* 17A150 8024B870 00000000 */ nop
/* 17A154 8024B874 468073A0 */ cvt.s.w $f14, $f14
/* 17A158 8024B878 46027382 */ mul.s $f14, $f14, $f2
/* 17A15C 8024B87C 00000000 */ nop
/* 17A160 8024B880 3C02802A */ lui $v0, %hi(D_8029F282)
/* 17A164 8024B884 8442F282 */ lh $v0, %lo(D_8029F282)($v0)
/* 17A168 8024B888 44825000 */ mtc1 $v0, $f10
/* 17A16C 8024B88C 00000000 */ nop
/* 17A170 8024B890 468052A0 */ cvt.s.w $f10, $f10
/* 17A174 8024B894 46025282 */ mul.s $f10, $f10, $f2
/* 17A178 8024B898 00000000 */ nop
/* 17A17C 8024B89C 46003180 */ add.s $f6, $f6, $f0
/* 17A180 8024B8A0 3C014380 */ lui $at, 0x4380
/* 17A184 8024B8A4 44810000 */ mtc1 $at, $f0
/* 17A188 8024B8A8 00000000 */ nop
/* 17A18C 8024B8AC 46003182 */ mul.s $f6, $f6, $f0
/* 17A190 8024B8B0 00000000 */ nop
/* 17A194 8024B8B4 3C01802A */ lui $at, %hi(D_8029F294)
/* 17A198 8024B8B8 C420F294 */ lwc1 $f0, %lo(D_8029F294)($at)
/* 17A19C 8024B8BC 46040002 */ mul.s $f0, $f0, $f4
/* 17A1A0 8024B8C0 00000000 */ nop
/* 17A1A4 8024B8C4 461AA500 */ add.s $f20, $f20, $f26
/* 17A1A8 8024B8C8 46189480 */ add.s $f18, $f18, $f24
/* 17A1AC 8024B8CC 46168400 */ add.s $f16, $f16, $f22
/* 17A1B0 8024B8D0 460E6300 */ add.s $f12, $f12, $f14
/* 17A1B4 8024B8D4 3C04802A */ lui $a0, %hi(D_8029F29E)
/* 17A1B8 8024B8D8 2484F29E */ addiu $a0, $a0, %lo(D_8029F29E)
/* 17A1BC 8024B8DC 3C02802A */ lui $v0, %hi(D_8029F284)
/* 17A1C0 8024B8E0 8442F284 */ lh $v0, %lo(D_8029F284)($v0)
/* 17A1C4 8024B8E4 460A4200 */ add.s $f8, $f8, $f10
/* 17A1C8 8024B8E8 E6140054 */ swc1 $f20, 0x54($s0)
/* 17A1CC 8024B8EC 44822000 */ mtc1 $v0, $f4
/* 17A1D0 8024B8F0 00000000 */ nop
/* 17A1D4 8024B8F4 46802120 */ cvt.s.w $f4, $f4
/* 17A1D8 8024B8F8 46022102 */ mul.s $f4, $f4, $f2
/* 17A1DC 8024B8FC 00000000 */ nop
/* 17A1E0 8024B900 E6120058 */ swc1 $f18, 0x58($s0)
/* 17A1E4 8024B904 E610005C */ swc1 $f16, 0x5c($s0)
/* 17A1E8 8024B908 4600670D */ trunc.w.s $f28, $f12
/* 17A1EC 8024B90C 4402E000 */ mfc1 $v0, $f28
/* 17A1F0 8024B910 00000000 */ nop
/* 17A1F4 8024B914 A602001E */ sh $v0, 0x1e($s0)
/* 17A1F8 8024B918 46040000 */ add.s $f0, $f0, $f4
/* 17A1FC 8024B91C 4600470D */ trunc.w.s $f28, $f8
/* 17A200 8024B920 4402E000 */ mfc1 $v0, $f28
/* 17A204 8024B924 00000000 */ nop
/* 17A208 8024B928 A6020024 */ sh $v0, 0x24($s0)
/* 17A20C 8024B92C 4600070D */ trunc.w.s $f28, $f0
/* 17A210 8024B930 4402E000 */ mfc1 $v0, $f28
/* 17A214 8024B934 00000000 */ nop
/* 17A218 8024B938 A6020022 */ sh $v0, 0x22($s0)
/* 17A21C 8024B93C 4600370D */ trunc.w.s $f28, $f6
/* 17A220 8024B940 4402E000 */ mfc1 $v0, $f28
/* 17A224 8024B944 00000000 */ nop
/* 17A228 8024B948 A6020026 */ sh $v0, 0x26($s0)
/* 17A22C 8024B94C 84820000 */ lh $v0, ($a0)
/* 17A230 8024B950 94830000 */ lhu $v1, ($a0)
/* 17A234 8024B954 14400006 */ bnez $v0, .L8024B970
/* 17A238 8024B958 2462FFFF */ addiu $v0, $v1, -1
/* 17A23C 8024B95C 24020001 */ addiu $v0, $zero, 1
/* 17A240 8024B960 3C01802A */ lui $at, %hi(D_8029F29C)
/* 17A244 8024B964 A022F29C */ sb $v0, %lo(D_8029F29C)($at)
/* 17A248 8024B968 08092E5D */ j .L8024B974
/* 17A24C 8024B96C 00000000 */ nop
.L8024B970:
/* 17A250 8024B970 A4820000 */ sh $v0, ($a0)
.L8024B974:
/* 17A254 8024B974 8FBF001C */ lw $ra, 0x1c($sp)
/* 17A258 8024B978 8FB00018 */ lw $s0, 0x18($sp)
/* 17A25C 8024B97C D7BE0048 */ ldc1 $f30, 0x48($sp)
/* 17A260 8024B980 D7BC0040 */ ldc1 $f28, 0x40($sp)
/* 17A264 8024B984 D7BA0038 */ ldc1 $f26, 0x38($sp)
/* 17A268 8024B988 D7B80030 */ ldc1 $f24, 0x30($sp)
/* 17A26C 8024B98C D7B60028 */ ldc1 $f22, 0x28($sp)
/* 17A270 8024B990 D7B40020 */ ldc1 $f20, 0x20($sp)
/* 17A274 8024B994 0000102D */ daddu $v0, $zero, $zero
/* 17A278 8024B998 03E00008 */ jr $ra
/* 17A27C 8024B99C 27BD0050 */ addiu $sp, $sp, 0x50