.late_rodata glabel D_8013A3F8 .float 0.01 glabel D_8013A3FC .float -0.01 glabel D_8013A400 .float 0.6 glabel D_8013A404 .float 0.2 glabel D_8013A408 .float -0.3 glabel D_8013A40C .float 0.3 glabel D_8013A410 .float 0.09 glabel D_8013A414 .float 0.01 glabel D_8013A418 .float 359.2 glabel D_8013A41C .float 0.08 glabel D_8013A420 .float 0.45 glabel D_8013A424 .float 0.01 glabel D_8013A428 .float -0.01 glabel D_8013A42C .float 0.6 glabel D_8013A430 .float 182.041672 # 32768 / PI .text glabel func_80058E8C /* AD002C 80058E8C 27BDFF98 */ addiu $sp, $sp, -0x68 /* AD0030 80058E90 AFBF0024 */ sw $ra, 0x24($sp) /* AD0034 80058E94 AFB00020 */ sw $s0, 0x20($sp) /* AD0038 80058E98 F7B40018 */ sdc1 $f20, 0x18($sp) /* AD003C 80058E9C 84820152 */ lh $v0, 0x152($a0) /* AD0040 80058EA0 00808025 */ move $s0, $a0 /* AD0044 80058EA4 104000C2 */ beqz $v0, .L800591B0 /* AD0048 80058EA8 304E0004 */ andi $t6, $v0, 4 /* AD004C 80058EAC 11C00019 */ beqz $t6, .L80058F14 /* AD0050 80058EB0 30580008 */ andi $t8, $v0, 8 /* AD0054 80058EB4 3C018014 */ lui $at, %hi(D_8013A3F8) /* AD0058 80058EB8 C430A3F8 */ lwc1 $f16, %lo(D_8013A3F8)($at) /* AD005C 80058EBC 3C01432A */ li $at, 0x432A0000 # 0.000000 /* AD0060 80058EC0 44811000 */ mtc1 $at, $f2 /* AD0064 80058EC4 3C018014 */ lui $at, %hi(D_8013A3FC) /* AD0068 80058EC8 C424A3FC */ lwc1 $f4, %lo(D_8013A3FC)($at) /* AD006C 80058ECC 3C018014 */ lui $at, %hi(D_8013A400) /* AD0070 80058ED0 44803000 */ mtc1 $zero, $f6 /* AD0074 80058ED4 C428A400 */ lwc1 $f8, %lo(D_8013A400)($at) /* AD0078 80058ED8 E7B0003C */ swc1 $f16, 0x3c($sp) /* AD007C 80058EDC E7A40040 */ swc1 $f4, 0x40($sp) /* AD0080 80058EE0 E7A60038 */ swc1 $f6, 0x38($sp) /* AD0084 80058EE4 E7A80034 */ swc1 $f8, 0x34($sp) /* AD0088 80058EE8 848F0150 */ lh $t7, 0x150($a0) /* AD008C 80058EEC 3C014270 */ li $at, 0x42700000 # 0.000000 /* AD0090 80058EF0 44813000 */ mtc1 $at, $f6 /* AD0094 80058EF4 448F5000 */ mtc1 $t7, $f10 /* AD0098 80058EF8 3C013F80 */ li $at, 0x3F800000 # 0.000000 /* AD009C 80058EFC 44814000 */ mtc1 $at, $f8 /* AD00A0 80058F00 46805120 */ cvt.s.w $f4, $f10 /* AD00A4 80058F04 44800000 */ mtc1 $zero, $f0 /* AD00A8 80058F08 E7A80060 */ swc1 $f8, 0x60($sp) /* AD00AC 80058F0C 10000054 */ b .L80059060 /* AD00B0 80058F10 46062503 */ div.s $f20, $f4, $f6 .L80058F14: /* AD00B4 80058F14 13000019 */ beqz $t8, .L80058F7C /* AD00B8 80058F18 30480002 */ andi $t0, $v0, 2 /* AD00BC 80058F1C 3C018014 */ lui $at, %hi(D_8013A404) /* AD00C0 80058F20 C42CA404 */ lwc1 $f12, %lo(D_8013A404)($at) /* AD00C4 80058F24 3C014378 */ li $at, 0x43780000 # 0.000000 /* AD00C8 80058F28 44810000 */ mtc1 $at, $f0 /* AD00CC 80058F2C 3C01C2B4 */ li $at, 0xC2B40000 # 0.000000 /* AD00D0 80058F30 44811000 */ mtc1 $at, $f2 /* AD00D4 80058F34 3C018014 */ lui $at, %hi(D_8013A408) /* AD00D8 80058F38 C42AA408 */ lwc1 $f10, %lo(D_8013A408)($at) /* AD00DC 80058F3C 3C018014 */ lui $at, %hi(D_8013A40C) /* AD00E0 80058F40 C424A40C */ lwc1 $f4, %lo(D_8013A40C)($at) /* AD00E4 80058F44 E7AC0038 */ swc1 $f12, 0x38($sp) /* AD00E8 80058F48 E7AC0034 */ swc1 $f12, 0x34($sp) /* AD00EC 80058F4C E7AA0040 */ swc1 $f10, 0x40($sp) /* AD00F0 80058F50 E7A4003C */ swc1 $f4, 0x3c($sp) /* AD00F4 80058F54 86190150 */ lh $t9, 0x150($s0) /* AD00F8 80058F58 3C0142A0 */ li $at, 0x42A00000 # 0.000000 /* AD00FC 80058F5C 44815000 */ mtc1 $at, $f10 /* AD0100 80058F60 44993000 */ mtc1 $t9, $f6 /* AD0104 80058F64 3C013F80 */ li $at, 0x3F800000 # 0.000000 /* AD0108 80058F68 44812000 */ mtc1 $at, $f4 /* AD010C 80058F6C 46803220 */ cvt.s.w $f8, $f6 /* AD0110 80058F70 E7A40060 */ swc1 $f4, 0x60($sp) /* AD0114 80058F74 1000003A */ b .L80059060 /* AD0118 80058F78 460A4503 */ div.s $f20, $f8, $f10 .L80058F7C: /* AD011C 80058F7C 11000026 */ beqz $t0, .L80059018 /* AD0120 80058F80 30490001 */ andi $t1, $v0, 1 /* AD0124 80058F84 3C018014 */ lui $at, %hi(D_8013A410) /* AD0128 80058F88 C42EA410 */ lwc1 $f14, %lo(D_8013A410)($at) /* AD012C 80058F8C 3C018014 */ lui $at, %hi(D_8013A414) /* AD0130 80058F90 C430A414 */ lwc1 $f16, %lo(D_8013A414)($at) /* AD0134 80058F94 3C014316 */ li $at, 0x43160000 # 0.000000 /* AD0138 80058F98 44819000 */ mtc1 $at, $f18 /* AD013C 80058F9C 3C018014 */ lui $at, %hi(D_8013A418) /* AD0140 80058FA0 C420A418 */ lwc1 $f0, %lo(D_8013A418)($at) /* AD0144 80058FA4 3C01C194 */ li $at, 0xC1940000 # 0.000000 /* AD0148 80058FA8 44811000 */ mtc1 $at, $f2 /* AD014C 80058FAC 3C018014 */ lui $at, %hi(D_8013A41C) /* AD0150 80058FB0 C426A41C */ lwc1 $f6, %lo(D_8013A41C)($at) /* AD0154 80058FB4 E7AE0040 */ swc1 $f14, 0x40($sp) /* AD0158 80058FB8 E7AE003C */ swc1 $f14, 0x3c($sp) /* AD015C 80058FBC E7B00038 */ swc1 $f16, 0x38($sp) /* AD0160 80058FC0 E7A60034 */ swc1 $f6, 0x34($sp) /* AD0164 80058FC4 C60A0060 */ lwc1 $f10, 0x60($s0) /* AD0168 80058FC8 C6080114 */ lwc1 $f8, 0x114($s0) /* AD016C 80058FCC 3C013F80 */ li $at, 0x3F800000 # 0.000000 /* AD0170 80058FD0 460A4301 */ sub.s $f12, $f8, $f10 /* AD0174 80058FD4 460C903C */ c.lt.s $f18, $f12 /* AD0178 80058FD8 00000000 */ nop /* AD017C 80058FDC 45020005 */ bc1fl .L80058FF4 /* AD0180 80058FE0 46126383 */ div.s $f14, $f12, $f18 /* AD0184 80058FE4 44817000 */ mtc1 $at, $f14 /* AD0188 80058FE8 10000002 */ b .L80058FF4 /* AD018C 80058FEC 00000000 */ nop /* AD0190 80058FF0 46126383 */ div.s $f14, $f12, $f18 .L80058FF4: /* AD0194 80058FF4 3C018014 */ lui $at, %hi(D_8013A420) /* AD0198 80058FF8 C42CA420 */ lwc1 $f12, %lo(D_8013A420)($at) /* AD019C 80058FFC C60600E0 */ lwc1 $f6, 0xe0($s0) /* AD01A0 80059000 460C7102 */ mul.s $f4, $f14, $f12 /* AD01A4 80059004 00000000 */ nop /* AD01A8 80059008 460C3202 */ mul.s $f8, $f6, $f12 /* AD01AC 8005900C 46082500 */ add.s $f20, $f4, $f8 /* AD01B0 80059010 10000013 */ b .L80059060 /* AD01B4 80059014 E7B40060 */ swc1 $f20, 0x60($sp) .L80059018: /* AD01B8 80059018 1120006F */ beqz $t1, .L800591D8 /* AD01BC 8005901C 3C018014 */ lui $at, %hi(D_8013A424) /* AD01C0 80059020 C430A424 */ lwc1 $f16, %lo(D_8013A424)($at) /* AD01C4 80059024 3C014316 */ li $at, 0x43160000 # 0.000000 /* AD01C8 80059028 44811000 */ mtc1 $at, $f2 /* AD01CC 8005902C 3C018014 */ lui $at, %hi(D_8013A428) /* AD01D0 80059030 C42AA428 */ lwc1 $f10, %lo(D_8013A428)($at) /* AD01D4 80059034 3C018014 */ lui $at, %hi(D_8013A42C) /* AD01D8 80059038 C426A42C */ lwc1 $f6, %lo(D_8013A42C)($at) /* AD01DC 8005903C 3C013F80 */ li $at, 0x3F800000 # 0.000000 /* AD01E0 80059040 44812000 */ mtc1 $at, $f4 /* AD01E4 80059044 44800000 */ mtc1 $zero, $f0 /* AD01E8 80059048 4481A000 */ mtc1 $at, $f20 /* AD01EC 8005904C E7B0003C */ swc1 $f16, 0x3c($sp) /* AD01F0 80059050 E7B00038 */ swc1 $f16, 0x38($sp) /* AD01F4 80059054 E7AA0040 */ swc1 $f10, 0x40($sp) /* AD01F8 80059058 E7A60034 */ swc1 $f6, 0x34($sp) /* AD01FC 8005905C E7A40060 */ swc1 $f4, 0x60($sp) .L80059060: /* AD0200 80059060 3C018014 */ lui $at, %hi(D_8013A430) /* AD0204 80059064 C42CA430 */ lwc1 $f12, %lo(D_8013A430)($at) /* AD0208 80059068 3C013F00 */ li $at, 0x3F000000 # 0.000000 /* AD020C 8005906C 44817000 */ mtc1 $at, $f14 /* AD0210 80059070 460C0202 */ mul.s $f8, $f0, $f12 /* AD0214 80059074 3C048012 */ lui $a0, %hi(D_8011DB08) # $a0, 0x8012 /* AD0218 80059078 3C0E8012 */ lui $t6, %hi(D_8011DB0C) # $t6, 0x8012 /* AD021C 8005907C 460C1102 */ mul.s $f4, $f2, $f12 /* AD0220 80059080 8484DB08 */ lh $a0, %lo(D_8011DB08)($a0) /* AD0224 80059084 85CEDB0C */ lh $t6, %lo(D_8011DB0C)($t6) /* AD0228 80059088 3C018012 */ lui $at, %hi(D_8011DB0C) # $at, 0x8012 /* AD022C 8005908C 460E4280 */ add.s $f10, $f8, $f14 /* AD0230 80059090 460E2200 */ add.s $f8, $f4, $f14 /* AD0234 80059094 4600518D */ trunc.w.s $f6, $f10 /* AD0238 80059098 4600428D */ trunc.w.s $f10, $f8 /* AD023C 8005909C 440D3000 */ mfc1 $t5, $f6 /* AD0240 800590A0 44085000 */ mfc1 $t0, $f10 /* AD0244 800590A4 008D2021 */ addu $a0, $a0, $t5 /* AD0248 800590A8 00042400 */ sll $a0, $a0, 0x10 /* AD024C 800590AC 01C84821 */ addu $t1, $t6, $t0 /* AD0250 800590B0 A429DB0C */ sh $t1, %lo(D_8011DB0C)($at) /* AD0254 800590B4 00042403 */ sra $a0, $a0, 0x10 /* AD0258 800590B8 3C018012 */ lui $at, %hi(D_8011DB08) # $at, 0x8012 /* AD025C 800590BC 0C01DE0D */ jal Math_Coss /* AD0260 800590C0 A424DB08 */ sh $a0, %lo(D_8011DB08)($at) /* AD0264 800590C4 3C048012 */ lui $a0, %hi(D_8011DB08) # $a0, 0x8012 /* AD0268 800590C8 0C01DE1C */ jal Math_Sins /* AD026C 800590CC 8484DB08 */ lh $a0, %lo(D_8011DB08)($a0) /* AD0270 800590D0 3C048012 */ lui $a0, %hi(D_8011DB0C) /* AD0274 800590D4 0C01DE1C */ jal Math_Sins /* AD0278 800590D8 8484DB0C */ lh $a0, %lo(D_8011DB0C)($a0) /* AD027C 800590DC 44801000 */ mtc1 $zero, $f2 /* AD0280 800590E0 8E04008C */ lw $a0, 0x8c($s0) /* AD0284 800590E4 44051000 */ mfc1 $a1, $f2 /* AD0288 800590E8 44061000 */ mfc1 $a2, $f2 /* AD028C 800590EC 44071000 */ mfc1 $a3, $f2 /* AD0290 800590F0 0C02A9DB */ jal func_800AA76C /* AD0294 800590F4 248400B8 */ addiu $a0, $a0, 0xb8 /* AD0298 800590F8 3C048012 */ lui $a0, %hi(D_8011DB0C) # $a0, 0x8012 /* AD029C 800590FC 0C01DE1C */ jal Math_Sins /* AD02A0 80059100 8484DB0C */ lh $a0, %lo(D_8011DB0C)($a0) /* AD02A4 80059104 3C048012 */ lui $a0, %hi(D_8011DB0C) # $a0, 0x8012 /* AD02A8 80059108 8484DB0C */ lh $a0, %lo(D_8011DB0C)($a0) /* AD02AC 8005910C 0C01DE0D */ jal Math_Coss /* AD02B0 80059110 E7A00028 */ swc1 $f0, 0x28($sp) /* AD02B4 80059114 3C048012 */ lui $a0, %hi(D_8011DB08) # $a0, 0x8012 /* AD02B8 80059118 8484DB08 */ lh $a0, %lo(D_8011DB08)($a0) /* AD02BC 8005911C 0C01DE0D */ jal Math_Coss /* AD02C0 80059120 E7A0002C */ swc1 $f0, 0x2c($sp) /* AD02C4 80059124 C7A40040 */ lwc1 $f4, 0x40($sp) /* AD02C8 80059128 C7A60028 */ lwc1 $f6, 0x28($sp) /* AD02CC 8005912C 3C013F80 */ li $at, 0x3F800000 # 0.000000 /* AD02D0 80059130 46142202 */ mul.s $f8, $f4, $f20 /* AD02D4 80059134 44811000 */ mtc1 $at, $f2 /* AD02D8 80059138 8E04008C */ lw $a0, 0x8c($s0) /* AD02DC 8005913C 248400B8 */ addiu $a0, $a0, 0xb8 /* AD02E0 80059140 46083282 */ mul.s $f10, $f6, $f8 /* AD02E4 80059144 C7A8003C */ lwc1 $f8, 0x3c($sp) /* AD02E8 80059148 C7A6002C */ lwc1 $f6, 0x2c($sp) /* AD02EC 8005914C 46025100 */ add.s $f4, $f10, $f2 /* AD02F0 80059150 46144282 */ mul.s $f10, $f8, $f20 /* AD02F4 80059154 44052000 */ mfc1 $a1, $f4 /* AD02F8 80059158 460A3102 */ mul.s $f4, $f6, $f10 /* AD02FC 8005915C C7A60038 */ lwc1 $f6, 0x38($sp) /* AD0300 80059160 46143282 */ mul.s $f10, $f6, $f20 /* AD0304 80059164 46022200 */ add.s $f8, $f4, $f2 /* AD0308 80059168 460A0102 */ mul.s $f4, $f0, $f10 /* AD030C 8005916C 44064000 */ mfc1 $a2, $f8 /* AD0310 80059170 46022200 */ add.s $f8, $f4, $f2 /* AD0314 80059174 44074000 */ mfc1 $a3, $f8 /* AD0318 80059178 0C02A9E3 */ jal func_800AA78C /* AD031C 8005917C 00000000 */ nop /* AD0320 80059180 C7A60034 */ lwc1 $f6, 0x34($sp) /* AD0324 80059184 C7AA0060 */ lwc1 $f10, 0x60($sp) /* AD0328 80059188 8E04008C */ lw $a0, 0x8c($s0) /* AD032C 8005918C 460A3102 */ mul.s $f4, $f6, $f10 /* AD0330 80059190 248400B8 */ addiu $a0, $a0, 0xb8 /* AD0334 80059194 44052000 */ mfc1 $a1, $f4 /* AD0338 80059198 0C02A9EB */ jal func_800AA7AC /* AD033C 8005919C 00000000 */ nop /* AD0340 800591A0 860A014C */ lh $t2, 0x14c($s0) /* AD0344 800591A4 354B0040 */ ori $t3, $t2, 0x40 /* AD0348 800591A8 1000000B */ b .L800591D8 /* AD034C 800591AC A60B014C */ sh $t3, 0x14c($s0) .L800591B0: /* AD0350 800591B0 860C014C */ lh $t4, 0x14c($s0) /* AD0354 800591B4 318D0040 */ andi $t5, $t4, 0x40 /* AD0358 800591B8 51A00008 */ beql $t5, $zero, .L800591DC /* AD035C 800591BC 8FBF0024 */ lw $ra, 0x24($sp) /* AD0360 800591C0 8E04008C */ lw $a0, 0x8c($s0) /* AD0364 800591C4 0C02AA05 */ jal func_800AA814 /* AD0368 800591C8 248400B8 */ addiu $a0, $a0, 0xb8 /* AD036C 800591CC 860F014C */ lh $t7, 0x14c($s0) /* AD0370 800591D0 31F8FFBF */ andi $t8, $t7, 0xffbf /* AD0374 800591D4 A618014C */ sh $t8, 0x14c($s0) .L800591D8: /* AD0378 800591D8 8FBF0024 */ lw $ra, 0x24($sp) .L800591DC: /* AD037C 800591DC D7B40018 */ ldc1 $f20, 0x18($sp) /* AD0380 800591E0 8FB00020 */ lw $s0, 0x20($sp) /* AD0384 800591E4 03E00008 */ jr $ra /* AD0388 800591E8 27BD0068 */ addiu $sp, $sp, 0x68