papermario/ver/us/asm/nonmatchings/1776B0/func_80248DE4.s
Ethan Roseman 3315d6010f
Splat refactor (#257)
* all non-world rodata migrated

* data disasm

* kinda working

* updated yaml

* bloop

* linker header

* configure 2.0

* bin

* mass rename to remove code_

* pause rename

* battle partner stuff

* whew

* more renames

* more renames

* more renaming

* it builds!

* updates

* remove main prefix

* one more thing

* crc, yay0

* .data, .rodata, .bss

* img

* dead_atan2

* it buildsgit add -A

* split battle/partner/6FAD10

* rm &s on sleepy_sheep syms

* sha1sum ninja rule description

* OK but commented out PaperMarioMapFS and PaperMarioNpcSprites

* uncomment

* fix mapfs

* match func_8003CFB4

* .

* clean up and name npc_iter_no_op

* npc.c

* enable cc warnings

* name npc_find_near

* use singular options.asset_path

* smores

* cc_dsl only when needed

* kinda fix configure for splat refactor2

* ok!

* new msg format

* remove old msg format docs

* slight bug fixes, splat adjustment

* git subrepo pull (merge) --force tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "cfc140bb76"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "cfc140bb76"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* git subrepo pull (merge) --force tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "85349befcd"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "85349befcd"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* Update symbol addrs

* git subrepo pull tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "a44631e194"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "a44631e194"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

Co-authored-by: Alex Bates <hi@imalex.xyz>
2021-04-13 16:47:52 +09:00

683 lines
34 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
glabel D_8029CC00
.double 0.4
.section .text
glabel func_80248DE4
/* 1776C4 80248DE4 27BDFF88 */ addiu $sp, $sp, -0x78
/* 1776C8 80248DE8 AFB1003C */ sw $s1, 0x3c($sp)
/* 1776CC 80248DEC 00A0882D */ daddu $s1, $a1, $zero
/* 1776D0 80248DF0 AFB00038 */ sw $s0, 0x38($sp)
/* 1776D4 80248DF4 3C10800B */ lui $s0, %hi(gCameras+0x558)
/* 1776D8 80248DF8 261022D8 */ addiu $s0, $s0, %lo(gCameras+0x558)
/* 1776DC 80248DFC 3C02802A */ lui $v0, %hi(D_8029F27C)
/* 1776E0 80248E00 9442F27C */ lhu $v0, %lo(D_8029F27C)($v0)
/* 1776E4 80248E04 3C04800E */ lui $a0, %hi(gBattleStatus)
/* 1776E8 80248E08 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus)
/* 1776EC 80248E0C AFBF0040 */ sw $ra, 0x40($sp)
/* 1776F0 80248E10 F7BE0070 */ sdc1 $f30, 0x70($sp)
/* 1776F4 80248E14 F7BC0068 */ sdc1 $f28, 0x68($sp)
/* 1776F8 80248E18 F7BA0060 */ sdc1 $f26, 0x60($sp)
/* 1776FC 80248E1C F7B80058 */ sdc1 $f24, 0x58($sp)
/* 177700 80248E20 F7B60050 */ sdc1 $f22, 0x50($sp)
/* 177704 80248E24 F7B40048 */ sdc1 $f20, 0x48($sp)
/* 177708 80248E28 30430700 */ andi $v1, $v0, 0x700
/* 17770C 80248E2C 304500FF */ andi $a1, $v0, 0xff
/* 177710 80248E30 24020100 */ addiu $v0, $zero, 0x100
/* 177714 80248E34 10620065 */ beq $v1, $v0, .L80248FCC
/* 177718 80248E38 28620101 */ slti $v0, $v1, 0x101
/* 17771C 80248E3C 10400005 */ beqz $v0, .L80248E54
/* 177720 80248E40 24020200 */ addiu $v0, $zero, 0x200
/* 177724 80248E44 10600007 */ beqz $v1, .L80248E64
/* 177728 80248E48 0000102D */ daddu $v0, $zero, $zero
/* 17772C 80248E4C 080925F6 */ j .L802497D8
/* 177730 80248E50 00000000 */ nop
.L80248E54:
/* 177734 80248E54 106200B8 */ beq $v1, $v0, .L80249138
/* 177738 80248E58 0000102D */ daddu $v0, $zero, $zero
/* 17773C 80248E5C 080925F6 */ j .L802497D8
/* 177740 80248E60 00000000 */ nop
.L80248E64:
/* 177744 80248E64 8C8400D8 */ lw $a0, 0xd8($a0)
/* 177748 80248E68 1080025B */ beqz $a0, .L802497D8
/* 17774C 80248E6C 00000000 */ nop
/* 177750 80248E70 C4980144 */ lwc1 $f24, 0x144($a0)
/* 177754 80248E74 90830191 */ lbu $v1, 0x191($a0)
/* 177758 80248E78 C490014C */ lwc1 $f16, 0x14c($a0)
/* 17775C 80248E7C 00031042 */ srl $v0, $v1, 1
/* 177760 80248E80 44820000 */ mtc1 $v0, $f0
/* 177764 80248E84 00000000 */ nop
/* 177768 80248E88 46800020 */ cvt.s.w $f0, $f0
/* 17776C 80248E8C E7B00018 */ swc1 $f16, 0x18($sp)
/* 177770 80248E90 C4820148 */ lwc1 $f2, 0x148($a0)
/* 177774 80248E94 00031082 */ srl $v0, $v1, 2
/* 177778 80248E98 46001080 */ add.s $f2, $f2, $f0
/* 17777C 80248E9C 44820000 */ mtc1 $v0, $f0
/* 177780 80248EA0 00000000 */ nop
/* 177784 80248EA4 46800020 */ cvt.s.w $f0, $f0
/* 177788 80248EA8 90820190 */ lbu $v0, 0x190($a0)
/* 17778C 80248EAC 46001500 */ add.s $f20, $f2, $f0
/* 177790 80248EB0 4483D000 */ mtc1 $v1, $f26
/* 177794 80248EB4 00000000 */ nop
/* 177798 80248EB8 4680D6A0 */ cvt.s.w $f26, $f26
/* 17779C 80248EBC 4482B000 */ mtc1 $v0, $f22
/* 1777A0 80248EC0 00000000 */ nop
/* 1777A4 80248EC4 4680B5A0 */ cvt.s.w $f22, $f22
/* 1777A8 80248EC8 4616D000 */ add.s $f0, $f26, $f22
/* 1777AC 80248ECC 3C013F00 */ lui $at, 0x3f00
/* 1777B0 80248ED0 4481E000 */ mtc1 $at, $f28
/* 1777B4 80248ED4 00000000 */ nop
/* 1777B8 80248ED8 461C0002 */ mul.s $f0, $f0, $f28
/* 1777BC 80248EDC 00000000 */ nop
/* 1777C0 80248EE0 84840428 */ lh $a0, 0x428($a0)
/* 1777C4 80248EE4 0C09A75B */ jal get_actor
/* 1777C8 80248EE8 E7A0002C */ swc1 $f0, 0x2c($sp)
/* 1777CC 80248EEC 0040202D */ daddu $a0, $v0, $zero
/* 1777D0 80248EF0 10800239 */ beqz $a0, .L802497D8
/* 1777D4 80248EF4 0000102D */ daddu $v0, $zero, $zero
/* 1777D8 80248EF8 90830191 */ lbu $v1, 0x191($a0)
/* 1777DC 80248EFC C4820148 */ lwc1 $f2, 0x148($a0)
/* 1777E0 80248F00 00031042 */ srl $v0, $v1, 1
/* 1777E4 80248F04 44820000 */ mtc1 $v0, $f0
/* 1777E8 80248F08 00000000 */ nop
/* 1777EC 80248F0C 46800020 */ cvt.s.w $f0, $f0
/* 1777F0 80248F10 46001080 */ add.s $f2, $f2, $f0
/* 1777F4 80248F14 00031082 */ srl $v0, $v1, 2
/* 1777F8 80248F18 44820000 */ mtc1 $v0, $f0
/* 1777FC 80248F1C 00000000 */ nop
/* 177800 80248F20 46800020 */ cvt.s.w $f0, $f0
/* 177804 80248F24 46001080 */ add.s $f2, $f2, $f0
/* 177808 80248F28 E7A20024 */ swc1 $f2, 0x24($sp)
/* 17780C 80248F2C C4920144 */ lwc1 $f18, 0x144($a0)
/* 177810 80248F30 E7B20020 */ swc1 $f18, 0x20($sp)
/* 177814 80248F34 C490014C */ lwc1 $f16, 0x14c($a0)
/* 177818 80248F38 E7B00028 */ swc1 $f16, 0x28($sp)
/* 17781C 80248F3C 90820190 */ lbu $v0, 0x190($a0)
/* 177820 80248F40 46189001 */ sub.s $f0, $f18, $f24
/* 177824 80248F44 00621821 */ addu $v1, $v1, $v0
/* 177828 80248F48 00031843 */ sra $v1, $v1, 1
/* 17782C 80248F4C 461C0002 */ mul.s $f0, $f0, $f28
/* 177830 80248F50 00000000 */ nop
/* 177834 80248F54 44839000 */ mtc1 $v1, $f18
/* 177838 80248F58 00000000 */ nop
/* 17783C 80248F5C 468094A0 */ cvt.s.w $f18, $f18
/* 177840 80248F60 3C03802A */ lui $v1, %hi(D_8029F2A2)
/* 177844 80248F64 8063F2A2 */ lb $v1, %lo(D_8029F2A2)($v1)
/* 177848 80248F68 E7B20030 */ swc1 $f18, 0x30($sp)
/* 17784C 80248F6C 0460000B */ bltz $v1, .L80248F9C
/* 177850 80248F70 4600C780 */ add.s $f30, $f24, $f0
/* 177854 80248F74 506000C6 */ beql $v1, $zero, .L80249290
/* 177858 80248F78 4600A706 */ mov.s $f28, $f20
/* 17785C 80248F7C 4602A001 */ sub.s $f0, $f20, $f2
/* 177860 80248F80 461C0082 */ mul.s $f2, $f0, $f28
/* 177864 80248F84 00000000 */ nop
/* 177868 80248F88 C7B00024 */ lwc1 $f16, 0x24($sp)
/* 17786C 80248F8C 3C0140C0 */ lui $at, 0x40c0
/* 177870 80248F90 44812000 */ mtc1 $at, $f4
/* 177874 80248F94 0809249D */ j .L80249274
/* 177878 80248F98 46028080 */ add.s $f2, $f16, $f2
.L80248F9C:
/* 17787C 80248F9C 2402FFFF */ addiu $v0, $zero, -1
/* 177880 80248FA0 106200BA */ beq $v1, $v0, .L8024928C
/* 177884 80248FA4 00000000 */ nop
/* 177888 80248FA8 C7B20024 */ lwc1 $f18, 0x24($sp)
/* 17788C 80248FAC 46149001 */ sub.s $f0, $f18, $f20
/* 177890 80248FB0 3C013E80 */ lui $at, 0x3e80
/* 177894 80248FB4 44811000 */ mtc1 $at, $f2
/* 177898 80248FB8 00000000 */ nop
/* 17789C 80248FBC 46020002 */ mul.s $f0, $f0, $f2
/* 1778A0 80248FC0 00000000 */ nop
/* 1778A4 80248FC4 080924A4 */ j .L80249290
/* 1778A8 80248FC8 4600A700 */ add.s $f28, $f20, $f0
.L80248FCC:
/* 1778AC 80248FCC 8C8400DC */ lw $a0, 0xdc($a0)
/* 1778B0 80248FD0 10800201 */ beqz $a0, .L802497D8
/* 1778B4 80248FD4 0000102D */ daddu $v0, $zero, $zero
/* 1778B8 80248FD8 C4980144 */ lwc1 $f24, 0x144($a0)
/* 1778BC 80248FDC 90830191 */ lbu $v1, 0x191($a0)
/* 1778C0 80248FE0 C490014C */ lwc1 $f16, 0x14c($a0)
/* 1778C4 80248FE4 00031042 */ srl $v0, $v1, 1
/* 1778C8 80248FE8 44820000 */ mtc1 $v0, $f0
/* 1778CC 80248FEC 00000000 */ nop
/* 1778D0 80248FF0 46800020 */ cvt.s.w $f0, $f0
/* 1778D4 80248FF4 E7B00018 */ swc1 $f16, 0x18($sp)
/* 1778D8 80248FF8 C4820148 */ lwc1 $f2, 0x148($a0)
/* 1778DC 80248FFC 00031082 */ srl $v0, $v1, 2
/* 1778E0 80249000 46001080 */ add.s $f2, $f2, $f0
/* 1778E4 80249004 44820000 */ mtc1 $v0, $f0
/* 1778E8 80249008 00000000 */ nop
/* 1778EC 8024900C 46800020 */ cvt.s.w $f0, $f0
/* 1778F0 80249010 90820190 */ lbu $v0, 0x190($a0)
/* 1778F4 80249014 46001500 */ add.s $f20, $f2, $f0
/* 1778F8 80249018 4483D000 */ mtc1 $v1, $f26
/* 1778FC 8024901C 00000000 */ nop
/* 177900 80249020 4680D6A0 */ cvt.s.w $f26, $f26
/* 177904 80249024 4482B000 */ mtc1 $v0, $f22
/* 177908 80249028 00000000 */ nop
/* 17790C 8024902C 4680B5A0 */ cvt.s.w $f22, $f22
/* 177910 80249030 4616D000 */ add.s $f0, $f26, $f22
/* 177914 80249034 3C013F00 */ lui $at, 0x3f00
/* 177918 80249038 4481E000 */ mtc1 $at, $f28
/* 17791C 8024903C 00000000 */ nop
/* 177920 80249040 461C0002 */ mul.s $f0, $f0, $f28
/* 177924 80249044 00000000 */ nop
/* 177928 80249048 84840428 */ lh $a0, 0x428($a0)
/* 17792C 8024904C 0C09A75B */ jal get_actor
/* 177930 80249050 E7A0002C */ swc1 $f0, 0x2c($sp)
/* 177934 80249054 0040202D */ daddu $a0, $v0, $zero
/* 177938 80249058 108001DF */ beqz $a0, .L802497D8
/* 17793C 8024905C 0000102D */ daddu $v0, $zero, $zero
/* 177940 80249060 90830191 */ lbu $v1, 0x191($a0)
/* 177944 80249064 C4820148 */ lwc1 $f2, 0x148($a0)
/* 177948 80249068 00031042 */ srl $v0, $v1, 1
/* 17794C 8024906C 44820000 */ mtc1 $v0, $f0
/* 177950 80249070 00000000 */ nop
/* 177954 80249074 46800020 */ cvt.s.w $f0, $f0
/* 177958 80249078 46001080 */ add.s $f2, $f2, $f0
/* 17795C 8024907C 00031082 */ srl $v0, $v1, 2
/* 177960 80249080 44820000 */ mtc1 $v0, $f0
/* 177964 80249084 00000000 */ nop
/* 177968 80249088 46800020 */ cvt.s.w $f0, $f0
/* 17796C 8024908C 46001080 */ add.s $f2, $f2, $f0
/* 177970 80249090 E7A20024 */ swc1 $f2, 0x24($sp)
/* 177974 80249094 C4920144 */ lwc1 $f18, 0x144($a0)
/* 177978 80249098 E7B20020 */ swc1 $f18, 0x20($sp)
/* 17797C 8024909C C490014C */ lwc1 $f16, 0x14c($a0)
/* 177980 802490A0 46189001 */ sub.s $f0, $f18, $f24
/* 177984 802490A4 E7B00028 */ swc1 $f16, 0x28($sp)
/* 177988 802490A8 90820190 */ lbu $v0, 0x190($a0)
/* 17798C 802490AC 00621821 */ addu $v1, $v1, $v0
/* 177990 802490B0 461C0002 */ mul.s $f0, $f0, $f28
/* 177994 802490B4 00000000 */ nop
/* 177998 802490B8 00031843 */ sra $v1, $v1, 1
/* 17799C 802490BC 3C02802A */ lui $v0, %hi(D_8029F2A2)
/* 1779A0 802490C0 8042F2A2 */ lb $v0, %lo(D_8029F2A2)($v0)
/* 1779A4 802490C4 44839000 */ mtc1 $v1, $f18
/* 1779A8 802490C8 00000000 */ nop
/* 1779AC 802490CC 468094A0 */ cvt.s.w $f18, $f18
/* 1779B0 802490D0 E7B20030 */ swc1 $f18, 0x30($sp)
/* 1779B4 802490D4 0440000D */ bltz $v0, .L8024910C
/* 1779B8 802490D8 4600C780 */ add.s $f30, $f24, $f0
/* 1779BC 802490DC 5040000C */ beql $v0, $zero, .L80249110
/* 1779C0 802490E0 4600A706 */ mov.s $f28, $f20
/* 1779C4 802490E4 4602A001 */ sub.s $f0, $f20, $f2
/* 1779C8 802490E8 461C0082 */ mul.s $f2, $f0, $f28
/* 1779CC 802490EC 00000000 */ nop
/* 1779D0 802490F0 C7B00024 */ lwc1 $f16, 0x24($sp)
/* 1779D4 802490F4 3C0140C0 */ lui $at, 0x40c0
/* 1779D8 802490F8 44812000 */ mtc1 $at, $f4
/* 1779DC 802490FC 46028080 */ add.s $f2, $f16, $f2
/* 1779E0 80249100 46040003 */ div.s $f0, $f0, $f4
/* 1779E4 80249104 08092444 */ j .L80249110
/* 1779E8 80249108 46001700 */ add.s $f28, $f2, $f0
.L8024910C:
/* 1779EC 8024910C C7BC0024 */ lwc1 $f28, 0x24($sp)
.L80249110:
/* 1779F0 80249110 C7B20028 */ lwc1 $f18, 0x28($sp)
/* 1779F4 80249114 C7B00018 */ lwc1 $f16, 0x18($sp)
/* 1779F8 80249118 46109001 */ sub.s $f0, $f18, $f16
/* 1779FC 8024911C 3C013F00 */ lui $at, 0x3f00
/* 177A00 80249120 44811000 */ mtc1 $at, $f2
/* 177A04 80249124 00000000 */ nop
/* 177A08 80249128 46020002 */ mul.s $f0, $f0, $f2
/* 177A0C 8024912C 00000000 */ nop
/* 177A10 80249130 080924AD */ j .L802492B4
/* 177A14 80249134 46008000 */ add.s $f0, $f16, $f0
.L80249138:
/* 177A18 80249138 00051080 */ sll $v0, $a1, 2
/* 177A1C 8024913C 00441021 */ addu $v0, $v0, $a0
/* 177A20 80249140 8C4400E0 */ lw $a0, 0xe0($v0)
/* 177A24 80249144 108001A4 */ beqz $a0, .L802497D8
/* 177A28 80249148 0000102D */ daddu $v0, $zero, $zero
/* 177A2C 8024914C C4980144 */ lwc1 $f24, 0x144($a0)
/* 177A30 80249150 90830191 */ lbu $v1, 0x191($a0)
/* 177A34 80249154 C492014C */ lwc1 $f18, 0x14c($a0)
/* 177A38 80249158 00031042 */ srl $v0, $v1, 1
/* 177A3C 8024915C 44820000 */ mtc1 $v0, $f0
/* 177A40 80249160 00000000 */ nop
/* 177A44 80249164 46800020 */ cvt.s.w $f0, $f0
/* 177A48 80249168 E7B20018 */ swc1 $f18, 0x18($sp)
/* 177A4C 8024916C C4820148 */ lwc1 $f2, 0x148($a0)
/* 177A50 80249170 00031082 */ srl $v0, $v1, 2
/* 177A54 80249174 46001080 */ add.s $f2, $f2, $f0
/* 177A58 80249178 44820000 */ mtc1 $v0, $f0
/* 177A5C 8024917C 00000000 */ nop
/* 177A60 80249180 46800020 */ cvt.s.w $f0, $f0
/* 177A64 80249184 90820190 */ lbu $v0, 0x190($a0)
/* 177A68 80249188 46001500 */ add.s $f20, $f2, $f0
/* 177A6C 8024918C 4483D000 */ mtc1 $v1, $f26
/* 177A70 80249190 00000000 */ nop
/* 177A74 80249194 4680D6A0 */ cvt.s.w $f26, $f26
/* 177A78 80249198 4482B000 */ mtc1 $v0, $f22
/* 177A7C 8024919C 00000000 */ nop
/* 177A80 802491A0 4680B5A0 */ cvt.s.w $f22, $f22
/* 177A84 802491A4 4616D000 */ add.s $f0, $f26, $f22
/* 177A88 802491A8 3C013F00 */ lui $at, 0x3f00
/* 177A8C 802491AC 4481E000 */ mtc1 $at, $f28
/* 177A90 802491B0 00000000 */ nop
/* 177A94 802491B4 461C0002 */ mul.s $f0, $f0, $f28
/* 177A98 802491B8 00000000 */ nop
/* 177A9C 802491BC 84840428 */ lh $a0, 0x428($a0)
/* 177AA0 802491C0 0C09A75B */ jal get_actor
/* 177AA4 802491C4 E7A0002C */ swc1 $f0, 0x2c($sp)
/* 177AA8 802491C8 0040202D */ daddu $a0, $v0, $zero
/* 177AAC 802491CC 10800182 */ beqz $a0, .L802497D8
/* 177AB0 802491D0 0000102D */ daddu $v0, $zero, $zero
/* 177AB4 802491D4 90830191 */ lbu $v1, 0x191($a0)
/* 177AB8 802491D8 C4820148 */ lwc1 $f2, 0x148($a0)
/* 177ABC 802491DC 00031042 */ srl $v0, $v1, 1
/* 177AC0 802491E0 44820000 */ mtc1 $v0, $f0
/* 177AC4 802491E4 00000000 */ nop
/* 177AC8 802491E8 46800020 */ cvt.s.w $f0, $f0
/* 177ACC 802491EC 46001080 */ add.s $f2, $f2, $f0
/* 177AD0 802491F0 00031082 */ srl $v0, $v1, 2
/* 177AD4 802491F4 44820000 */ mtc1 $v0, $f0
/* 177AD8 802491F8 00000000 */ nop
/* 177ADC 802491FC 46800020 */ cvt.s.w $f0, $f0
/* 177AE0 80249200 46001080 */ add.s $f2, $f2, $f0
/* 177AE4 80249204 E7A20024 */ swc1 $f2, 0x24($sp)
/* 177AE8 80249208 C4900144 */ lwc1 $f16, 0x144($a0)
/* 177AEC 8024920C E7B00020 */ swc1 $f16, 0x20($sp)
/* 177AF0 80249210 C492014C */ lwc1 $f18, 0x14c($a0)
/* 177AF4 80249214 E7B20028 */ swc1 $f18, 0x28($sp)
/* 177AF8 80249218 90820190 */ lbu $v0, 0x190($a0)
/* 177AFC 8024921C 46188001 */ sub.s $f0, $f16, $f24
/* 177B00 80249220 00621821 */ addu $v1, $v1, $v0
/* 177B04 80249224 00031843 */ sra $v1, $v1, 1
/* 177B08 80249228 461C0002 */ mul.s $f0, $f0, $f28
/* 177B0C 8024922C 00000000 */ nop
/* 177B10 80249230 44838000 */ mtc1 $v1, $f16
/* 177B14 80249234 00000000 */ nop
/* 177B18 80249238 46808420 */ cvt.s.w $f16, $f16
/* 177B1C 8024923C 3C03802A */ lui $v1, %hi(D_8029F2A2)
/* 177B20 80249240 8063F2A2 */ lb $v1, %lo(D_8029F2A2)($v1)
/* 177B24 80249244 E7B00030 */ swc1 $f16, 0x30($sp)
/* 177B28 80249248 0460000D */ bltz $v1, .L80249280
/* 177B2C 8024924C 4600C780 */ add.s $f30, $f24, $f0
/* 177B30 80249250 5060000F */ beql $v1, $zero, .L80249290
/* 177B34 80249254 4600A706 */ mov.s $f28, $f20
/* 177B38 80249258 4602A001 */ sub.s $f0, $f20, $f2
/* 177B3C 8024925C 461C0082 */ mul.s $f2, $f0, $f28
/* 177B40 80249260 00000000 */ nop
/* 177B44 80249264 C7B20024 */ lwc1 $f18, 0x24($sp)
/* 177B48 80249268 3C0140C0 */ lui $at, 0x40c0
/* 177B4C 8024926C 44812000 */ mtc1 $at, $f4
/* 177B50 80249270 46029080 */ add.s $f2, $f18, $f2
.L80249274:
/* 177B54 80249274 46040003 */ div.s $f0, $f0, $f4
/* 177B58 80249278 080924A4 */ j .L80249290
/* 177B5C 8024927C 46001700 */ add.s $f28, $f2, $f0
.L80249280:
/* 177B60 80249280 2402FFFF */ addiu $v0, $zero, -1
/* 177B64 80249284 14620002 */ bne $v1, $v0, .L80249290
/* 177B68 80249288 4600A706 */ mov.s $f28, $f20
.L8024928C:
/* 177B6C 8024928C C7BC0024 */ lwc1 $f28, 0x24($sp)
.L80249290:
/* 177B70 80249290 C7B00028 */ lwc1 $f16, 0x28($sp)
/* 177B74 80249294 C7B20018 */ lwc1 $f18, 0x18($sp)
/* 177B78 80249298 46128001 */ sub.s $f0, $f16, $f18
/* 177B7C 8024929C 3C013F00 */ lui $at, 0x3f00
/* 177B80 802492A0 44811000 */ mtc1 $at, $f2
/* 177B84 802492A4 00000000 */ nop
/* 177B88 802492A8 46020002 */ mul.s $f0, $f0, $f2
/* 177B8C 802492AC 00000000 */ nop
/* 177B90 802492B0 46009000 */ add.s $f0, $f18, $f0
.L802492B4:
/* 177B94 802492B4 E7A0001C */ swc1 $f0, 0x1c($sp)
/* 177B98 802492B8 3C02802A */ lui $v0, %hi(D_8029F2A6)
/* 177B9C 802492BC 8042F2A6 */ lb $v0, %lo(D_8029F2A6)($v0)
/* 177BA0 802492C0 10400029 */ beqz $v0, .L80249368
/* 177BA4 802492C4 00000000 */ nop
/* 177BA8 802492C8 3C01802A */ lui $at, %hi(D_8029F28C)
/* 177BAC 802492CC C422F28C */ lwc1 $f2, %lo(D_8029F28C)($at)
/* 177BB0 802492D0 3C0143FA */ lui $at, 0x43fa
/* 177BB4 802492D4 44810000 */ mtc1 $at, $f0
/* 177BB8 802492D8 00000000 */ nop
/* 177BBC 802492DC 46020001 */ sub.s $f0, $f0, $f2
/* 177BC0 802492E0 3C01802A */ lui $at, %hi(D_8029CC00)
/* 177BC4 802492E4 D422CC00 */ ldc1 $f2, %lo(D_8029CC00)($at)
/* 177BC8 802492E8 46000021 */ cvt.d.s $f0, $f0
/* 177BCC 802492EC 46220002 */ mul.d $f0, $f0, $f2
/* 177BD0 802492F0 00000000 */ nop
/* 177BD4 802492F4 3C01403E */ lui $at, 0x403e
/* 177BD8 802492F8 44811800 */ mtc1 $at, $f3
/* 177BDC 802492FC 44801000 */ mtc1 $zero, $f2
/* 177BE0 80249300 00000000 */ nop
/* 177BE4 80249304 46220000 */ add.d $f0, $f0, $f2
/* 177BE8 80249308 46200120 */ cvt.s.d $f4, $f0
/* 177BEC 8024930C 46002007 */ neg.s $f0, $f4
/* 177BF0 80249310 4600F03C */ c.lt.s $f30, $f0
/* 177BF4 80249314 00000000 */ nop
/* 177BF8 80249318 45000008 */ bc1f .L8024933C
/* 177BFC 8024931C 00000000 */ nop
/* 177C00 80249320 461E0001 */ sub.s $f0, $f0, $f30
/* 177C04 80249324 3C013F00 */ lui $at, 0x3f00
/* 177C08 80249328 44811000 */ mtc1 $at, $f2
/* 177C0C 8024932C 00000000 */ nop
/* 177C10 80249330 46020002 */ mul.s $f0, $f0, $f2
/* 177C14 80249334 00000000 */ nop
/* 177C18 80249338 4600F780 */ add.s $f30, $f30, $f0
.L8024933C:
/* 177C1C 8024933C 461E203C */ c.lt.s $f4, $f30
/* 177C20 80249340 00000000 */ nop
/* 177C24 80249344 45000008 */ bc1f .L80249368
/* 177C28 80249348 00000000 */ nop
/* 177C2C 8024934C 461E2001 */ sub.s $f0, $f4, $f30
/* 177C30 80249350 3C013F00 */ lui $at, 0x3f00
/* 177C34 80249354 44811000 */ mtc1 $at, $f2
/* 177C38 80249358 00000000 */ nop
/* 177C3C 8024935C 46020002 */ mul.s $f0, $f0, $f2
/* 177C40 80249360 00000000 */ nop
/* 177C44 80249364 4600F780 */ add.s $f30, $f30, $f0
.L80249368:
/* 177C48 80249368 12200055 */ beqz $s1, .L802494C0
/* 177C4C 8024936C 00000000 */ nop
/* 177C50 80249370 3C0141C0 */ lui $at, 0x41c0
/* 177C54 80249374 44810000 */ mtc1 $at, $f0
/* 177C58 80249378 00000000 */ nop
/* 177C5C 8024937C 4600B581 */ sub.s $f22, $f22, $f0
/* 177C60 80249380 4600D681 */ sub.s $f26, $f26, $f0
/* 177C64 80249384 44800000 */ mtc1 $zero, $f0
/* 177C68 80249388 00000000 */ nop
/* 177C6C 8024938C 4600B03C */ c.lt.s $f22, $f0
/* 177C70 80249390 00000000 */ nop
/* 177C74 80249394 45030001 */ bc1tl .L8024939C
/* 177C78 80249398 46000586 */ mov.s $f22, $f0
.L8024939C:
/* 177C7C 8024939C 4600D03C */ c.lt.s $f26, $f0
/* 177C80 802493A0 00000000 */ nop
/* 177C84 802493A4 45030001 */ bc1tl .L802493AC
/* 177C88 802493A8 46000686 */ mov.s $f26, $f0
.L802493AC:
/* 177C8C 802493AC 3C03802A */ lui $v1, %hi(D_8029F280)
/* 177C90 802493B0 2463F280 */ addiu $v1, $v1, %lo(D_8029F280)
/* 177C94 802493B4 84620000 */ lh $v0, ($v1)
/* 177C98 802493B8 461AB080 */ add.s $f2, $f22, $f26
/* 177C9C 802493BC 44820000 */ mtc1 $v0, $f0
/* 177CA0 802493C0 00000000 */ nop
/* 177CA4 802493C4 46800020 */ cvt.s.w $f0, $f0
/* 177CA8 802493C8 46020000 */ add.s $f0, $f0, $f2
/* 177CAC 802493CC 3C02802A */ lui $v0, %hi(D_8029F2A4)
/* 177CB0 802493D0 8042F2A4 */ lb $v0, %lo(D_8029F2A4)($v0)
/* 177CB4 802493D4 4600040D */ trunc.w.s $f16, $f0
/* 177CB8 802493D8 44048000 */ mfc1 $a0, $f16
/* 177CBC 802493DC 10400010 */ beqz $v0, .L80249420
/* 177CC0 802493E0 A4640000 */ sh $a0, ($v1)
/* 177CC4 802493E4 E61E0054 */ swc1 $f30, 0x54($s0)
/* 177CC8 802493E8 E61C0058 */ swc1 $f28, 0x58($s0)
/* 177CCC 802493EC C7B0001C */ lwc1 $f16, 0x1c($sp)
/* 177CD0 802493F0 3C02802A */ lui $v0, %hi(D_8029F286)
/* 177CD4 802493F4 8442F286 */ lh $v0, %lo(D_8029F286)($v0)
/* 177CD8 802493F8 3C03802A */ lui $v1, %hi(D_8029F282)
/* 177CDC 802493FC 9463F282 */ lhu $v1, %lo(D_8029F282)($v1)
/* 177CE0 80249400 A604001E */ sh $a0, 0x1e($s0)
/* 177CE4 80249404 3C04802A */ lui $a0, %hi(D_8029F284)
/* 177CE8 80249408 9484F284 */ lhu $a0, %lo(D_8029F284)($a0)
/* 177CEC 8024940C 00021200 */ sll $v0, $v0, 8
/* 177CF0 80249410 E610005C */ swc1 $f16, 0x5c($s0)
/* 177CF4 80249414 A6020026 */ sh $v0, 0x26($s0)
/* 177CF8 80249418 A6030024 */ sh $v1, 0x24($s0)
/* 177CFC 8024941C A6040022 */ sh $a0, 0x22($s0)
.L80249420:
/* 177D00 80249420 8602001E */ lh $v0, 0x1e($s0)
/* 177D04 80249424 86040026 */ lh $a0, 0x26($s0)
/* 177D08 80249428 86030024 */ lh $v1, 0x24($s0)
/* 177D0C 8024942C 44820000 */ mtc1 $v0, $f0
/* 177D10 80249430 00000000 */ nop
/* 177D14 80249434 46800020 */ cvt.s.w $f0, $f0
/* 177D18 80249438 86020022 */ lh $v0, 0x22($s0)
/* 177D1C 8024943C 3C01802A */ lui $at, %hi(D_8029F28C)
/* 177D20 80249440 E420F28C */ swc1 $f0, %lo(D_8029F28C)($at)
/* 177D24 80249444 44820000 */ mtc1 $v0, $f0
/* 177D28 80249448 00000000 */ nop
/* 177D2C 8024944C 46800020 */ cvt.s.w $f0, $f0
/* 177D30 80249450 3C01802A */ lui $at, %hi(D_8029F294)
/* 177D34 80249454 E420F294 */ swc1 $f0, %lo(D_8029F294)($at)
/* 177D38 80249458 44830000 */ mtc1 $v1, $f0
/* 177D3C 8024945C 00000000 */ nop
/* 177D40 80249460 46800020 */ cvt.s.w $f0, $f0
/* 177D44 80249464 3C01802A */ lui $at, %hi(D_8029F290)
/* 177D48 80249468 E420F290 */ swc1 $f0, %lo(D_8029F290)($at)
/* 177D4C 8024946C 04820001 */ bltzl $a0, .L80249474
/* 177D50 80249470 248400FF */ addiu $a0, $a0, 0xff
.L80249474:
/* 177D54 80249474 00041203 */ sra $v0, $a0, 8
/* 177D58 80249478 C6020054 */ lwc1 $f2, 0x54($s0)
/* 177D5C 8024947C C6040058 */ lwc1 $f4, 0x58($s0)
/* 177D60 80249480 C606005C */ lwc1 $f6, 0x5c($s0)
/* 177D64 80249484 3C03802A */ lui $v1, %hi(D_8029F29E)
/* 177D68 80249488 9463F29E */ lhu $v1, %lo(D_8029F29E)($v1)
/* 177D6C 8024948C 44820000 */ mtc1 $v0, $f0
/* 177D70 80249490 00000000 */ nop
/* 177D74 80249494 46800020 */ cvt.s.w $f0, $f0
/* 177D78 80249498 3C01802A */ lui $at, %hi(D_8029F298)
/* 177D7C 8024949C E420F298 */ swc1 $f0, %lo(D_8029F298)($at)
/* 177D80 802494A0 3C01802A */ lui $at, %hi(D_8029F2A8)
/* 177D84 802494A4 E422F2A8 */ swc1 $f2, %lo(D_8029F2A8)($at)
/* 177D88 802494A8 3C01802A */ lui $at, %hi(D_8029F2AC)
/* 177D8C 802494AC E424F2AC */ swc1 $f4, %lo(D_8029F2AC)($at)
/* 177D90 802494B0 3C01802A */ lui $at, %hi(D_8029F2B0)
/* 177D94 802494B4 E426F2B0 */ swc1 $f6, %lo(D_8029F2B0)($at)
/* 177D98 802494B8 3C01802A */ lui $at, %hi(D_8029F2A0)
/* 177D9C 802494BC A423F2A0 */ sh $v1, %lo(D_8029F2A0)($at)
.L802494C0:
/* 177DA0 802494C0 3C02802A */ lui $v0, %hi(D_8029F2A5)
/* 177DA4 802494C4 8042F2A5 */ lb $v0, %lo(D_8029F2A5)($v0)
/* 177DA8 802494C8 14400027 */ bnez $v0, .L80249568
/* 177DAC 802494CC 00000000 */ nop
/* 177DB0 802494D0 3C02802A */ lui $v0, %hi(D_8029F29E)
/* 177DB4 802494D4 8442F29E */ lh $v0, %lo(D_8029F29E)($v0)
/* 177DB8 802494D8 3C03802A */ lui $v1, %hi(D_8029F2A0)
/* 177DBC 802494DC 8463F2A0 */ lh $v1, %lo(D_8029F2A0)($v1)
/* 177DC0 802494E0 3C013F80 */ lui $at, 0x3f80
/* 177DC4 802494E4 4481C000 */ mtc1 $at, $f24
/* 177DC8 802494E8 4482D000 */ mtc1 $v0, $f26
/* 177DCC 802494EC 00000000 */ nop
/* 177DD0 802494F0 4680D6A0 */ cvt.s.w $f26, $f26
/* 177DD4 802494F4 44830000 */ mtc1 $v1, $f0
/* 177DD8 802494F8 00000000 */ nop
/* 177DDC 802494FC 46800020 */ cvt.s.w $f0, $f0
/* 177DE0 80249500 4600D683 */ div.s $f26, $f26, $f0
/* 177DE4 80249504 461AC301 */ sub.s $f12, $f24, $f26
/* 177DE8 80249508 3C014049 */ lui $at, 0x4049
/* 177DEC 8024950C 34210FD0 */ ori $at, $at, 0xfd0
/* 177DF0 80249510 4481B000 */ mtc1 $at, $f22
/* 177DF4 80249514 00000000 */ nop
/* 177DF8 80249518 46166302 */ mul.s $f12, $f12, $f22
/* 177DFC 8024951C 00000000 */ nop
/* 177E00 80249520 3C013F00 */ lui $at, 0x3f00
/* 177E04 80249524 4481A000 */ mtc1 $at, $f20
/* 177E08 80249528 00000000 */ nop
/* 177E0C 8024952C 46146302 */ mul.s $f12, $f12, $f20
/* 177E10 80249530 0C00A85B */ jal sin_rad
/* 177E14 80249534 00000000 */ nop
/* 177E18 80249538 46160002 */ mul.s $f0, $f0, $f22
/* 177E1C 8024953C 00000000 */ nop
/* 177E20 80249540 46140302 */ mul.s $f12, $f0, $f20
/* 177E24 80249544 0C00A85B */ jal sin_rad
/* 177E28 80249548 00000000 */ nop
/* 177E2C 8024954C 46160002 */ mul.s $f0, $f0, $f22
/* 177E30 80249550 00000000 */ nop
/* 177E34 80249554 46140302 */ mul.s $f12, $f0, $f20
/* 177E38 80249558 0C00A85B */ jal sin_rad
/* 177E3C 8024955C 00000000 */ nop
/* 177E40 80249560 08092565 */ j .L80249594
/* 177E44 80249564 4600C681 */ sub.s $f26, $f24, $f0
.L80249568:
/* 177E48 80249568 3C02802A */ lui $v0, %hi(D_8029F29E)
/* 177E4C 8024956C 8442F29E */ lh $v0, %lo(D_8029F29E)($v0)
/* 177E50 80249570 3C03802A */ lui $v1, %hi(D_8029F2A0)
/* 177E54 80249574 8463F2A0 */ lh $v1, %lo(D_8029F2A0)($v1)
/* 177E58 80249578 4482D000 */ mtc1 $v0, $f26
/* 177E5C 8024957C 00000000 */ nop
/* 177E60 80249580 4680D6A0 */ cvt.s.w $f26, $f26
/* 177E64 80249584 44830000 */ mtc1 $v1, $f0
/* 177E68 80249588 00000000 */ nop
/* 177E6C 8024958C 46800020 */ cvt.s.w $f0, $f0
/* 177E70 80249590 4600D683 */ div.s $f26, $f26, $f0
.L80249594:
/* 177E74 80249594 3C01802A */ lui $at, %hi(D_8029F2A8)
/* 177E78 80249598 C426F2A8 */ lwc1 $f6, %lo(D_8029F2A8)($at)
/* 177E7C 8024959C 461A3182 */ mul.s $f6, $f6, $f26
/* 177E80 802495A0 00000000 */ nop
/* 177E84 802495A4 3C01802A */ lui $at, %hi(D_8029F2AC)
/* 177E88 802495A8 C428F2AC */ lwc1 $f8, %lo(D_8029F2AC)($at)
/* 177E8C 802495AC 461A4202 */ mul.s $f8, $f8, $f26
/* 177E90 802495B0 00000000 */ nop
/* 177E94 802495B4 3C01802A */ lui $at, %hi(D_8029F2B0)
/* 177E98 802495B8 C424F2B0 */ lwc1 $f4, %lo(D_8029F2B0)($at)
/* 177E9C 802495BC 461A2102 */ mul.s $f4, $f4, $f26
/* 177EA0 802495C0 00000000 */ nop
/* 177EA4 802495C4 3C01802A */ lui $at, %hi(D_8029F298)
/* 177EA8 802495C8 C422F298 */ lwc1 $f2, %lo(D_8029F298)($at)
/* 177EAC 802495CC 461A1082 */ mul.s $f2, $f2, $f26
/* 177EB0 802495D0 00000000 */ nop
/* 177EB4 802495D4 3C013F80 */ lui $at, 0x3f80
/* 177EB8 802495D8 4481B000 */ mtc1 $at, $f22
/* 177EBC 802495DC 00000000 */ nop
/* 177EC0 802495E0 461AB581 */ sub.s $f22, $f22, $f26
/* 177EC4 802495E4 4616F302 */ mul.s $f12, $f30, $f22
/* 177EC8 802495E8 00000000 */ nop
/* 177ECC 802495EC 4616E382 */ mul.s $f14, $f28, $f22
/* 177ED0 802495F0 00000000 */ nop
/* 177ED4 802495F4 3C02802A */ lui $v0, %hi(D_8029F286)
/* 177ED8 802495F8 8442F286 */ lh $v0, %lo(D_8029F286)($v0)
/* 177EDC 802495FC 44820000 */ mtc1 $v0, $f0
/* 177EE0 80249600 00000000 */ nop
/* 177EE4 80249604 46800020 */ cvt.s.w $f0, $f0
/* 177EE8 80249608 46160002 */ mul.s $f0, $f0, $f22
/* 177EEC 8024960C 00000000 */ nop
/* 177EF0 80249610 C7B2001C */ lwc1 $f18, 0x1c($sp)
/* 177EF4 80249614 46169282 */ mul.s $f10, $f18, $f22
/* 177EF8 80249618 00000000 */ nop
/* 177EFC 8024961C 46001080 */ add.s $f2, $f2, $f0
/* 177F00 80249620 C6180054 */ lwc1 $f24, 0x54($s0)
/* 177F04 80249624 C6140058 */ lwc1 $f20, 0x58($s0)
/* 177F08 80249628 460C3180 */ add.s $f6, $f6, $f12
/* 177F0C 8024962C C610005C */ lwc1 $f16, 0x5c($s0)
/* 177F10 80249630 4406F000 */ mfc1 $a2, $f30
/* 177F14 80249634 460A2100 */ add.s $f4, $f4, $f10
/* 177F18 80249638 44079000 */ mfc1 $a3, $f18
/* 177F1C 8024963C 3C014380 */ lui $at, 0x4380
/* 177F20 80249640 44810000 */ mtc1 $at, $f0
/* 177F24 80249644 460E4200 */ add.s $f8, $f8, $f14
/* 177F28 80249648 E7B00018 */ swc1 $f16, 0x18($sp)
/* 177F2C 8024964C E6060054 */ swc1 $f6, 0x54($s0)
/* 177F30 80249650 46001082 */ mul.s $f2, $f2, $f0
/* 177F34 80249654 00000000 */ nop
/* 177F38 80249658 46003306 */ mov.s $f12, $f6
/* 177F3C 8024965C E604005C */ swc1 $f4, 0x5c($s0)
/* 177F40 80249660 46002386 */ mov.s $f14, $f4
/* 177F44 80249664 E6080058 */ swc1 $f8, 0x58($s0)
/* 177F48 80249668 4600148D */ trunc.w.s $f18, $f2
/* 177F4C 8024966C 44029000 */ mfc1 $v0, $f18
/* 177F50 80249670 0C00A7B5 */ jal dist2D
/* 177F54 80249674 A6020026 */ sh $v0, 0x26($s0)
/* 177F58 80249678 4600C306 */ mov.s $f12, $f24
/* 177F5C 8024967C C7B0002C */ lwc1 $f16, 0x2c($sp)
/* 177F60 80249680 C7B20030 */ lwc1 $f18, 0x30($sp)
/* 177F64 80249684 4600A386 */ mov.s $f14, $f20
/* 177F68 80249688 46128080 */ add.s $f2, $f16, $f18
/* 177F6C 8024968C 3C013E00 */ lui $at, 0x3e00
/* 177F70 80249690 44812000 */ mtc1 $at, $f4
/* 177F74 80249694 8FA60018 */ lw $a2, 0x18($sp)
/* 177F78 80249698 46041082 */ mul.s $f2, $f2, $f4
/* 177F7C 8024969C 00000000 */ nop
/* 177F80 802496A0 8FA70020 */ lw $a3, 0x20($sp)
/* 177F84 802496A4 C7B00024 */ lwc1 $f16, 0x24($sp)
/* 177F88 802496A8 C7B20028 */ lwc1 $f18, 0x28($sp)
/* 177F8C 802496AC 3C014280 */ lui $at, 0x4280
/* 177F90 802496B0 44812000 */ mtc1 $at, $f4
/* 177F94 802496B4 46020500 */ add.s $f20, $f0, $f2
/* 177F98 802496B8 E7B00010 */ swc1 $f16, 0x10($sp)
/* 177F9C 802496BC E7B20014 */ swc1 $f18, 0x14($sp)
/* 177FA0 802496C0 0C00A7CB */ jal dist3D
/* 177FA4 802496C4 4604A501 */ sub.s $f20, $f20, $f4
/* 177FA8 802496C8 3C013F00 */ lui $at, 0x3f00
/* 177FAC 802496CC 44811000 */ mtc1 $at, $f2
/* 177FB0 802496D0 00000000 */ nop
/* 177FB4 802496D4 46020002 */ mul.s $f0, $f0, $f2
/* 177FB8 802496D8 00000000 */ nop
/* 177FBC 802496DC 3C01802A */ lui $at, %hi(D_8029F28C)
/* 177FC0 802496E0 C42AF28C */ lwc1 $f10, %lo(D_8029F28C)($at)
/* 177FC4 802496E4 461A5282 */ mul.s $f10, $f10, $f26
/* 177FC8 802496E8 00000000 */ nop
/* 177FCC 802496EC 3C01802A */ lui $at, %hi(D_8029F290)
/* 177FD0 802496F0 C428F290 */ lwc1 $f8, %lo(D_8029F290)($at)
/* 177FD4 802496F4 461A4202 */ mul.s $f8, $f8, $f26
/* 177FD8 802496F8 00000000 */ nop
/* 177FDC 802496FC 3C01802A */ lui $at, %hi(D_8029F294)
/* 177FE0 80249700 C424F294 */ lwc1 $f4, %lo(D_8029F294)($at)
/* 177FE4 80249704 3C02802A */ lui $v0, %hi(D_8029F280)
/* 177FE8 80249708 8442F280 */ lh $v0, %lo(D_8029F280)($v0)
/* 177FEC 8024970C 461A2102 */ mul.s $f4, $f4, $f26
/* 177FF0 80249710 00000000 */ nop
/* 177FF4 80249714 44821000 */ mtc1 $v0, $f2
/* 177FF8 80249718 00000000 */ nop
/* 177FFC 8024971C 468010A0 */ cvt.s.w $f2, $f2
/* 178000 80249720 3C02802A */ lui $v0, %hi(D_8029F282)
/* 178004 80249724 8442F282 */ lh $v0, %lo(D_8029F282)($v0)
/* 178008 80249728 44823000 */ mtc1 $v0, $f6
/* 17800C 8024972C 00000000 */ nop
/* 178010 80249730 468031A0 */ cvt.s.w $f6, $f6
/* 178014 80249734 46163182 */ mul.s $f6, $f6, $f22
/* 178018 80249738 00000000 */ nop
/* 17801C 8024973C 46141080 */ add.s $f2, $f2, $f20
/* 178020 80249740 3C02802A */ lui $v0, %hi(D_8029F284)
/* 178024 80249744 8442F284 */ lh $v0, %lo(D_8029F284)($v0)
/* 178028 80249748 46001080 */ add.s $f2, $f2, $f0
/* 17802C 8024974C 44820000 */ mtc1 $v0, $f0
/* 178030 80249750 00000000 */ nop
/* 178034 80249754 46800020 */ cvt.s.w $f0, $f0
/* 178038 80249758 46160002 */ mul.s $f0, $f0, $f22
/* 17803C 8024975C 00000000 */ nop
/* 178040 80249760 46161082 */ mul.s $f2, $f2, $f22
/* 178044 80249764 00000000 */ nop
/* 178048 80249768 46064200 */ add.s $f8, $f8, $f6
/* 17804C 8024976C 3C04802A */ lui $a0, %hi(D_8029F29E)
/* 178050 80249770 2484F29E */ addiu $a0, $a0, %lo(D_8029F29E)
/* 178054 80249774 46002100 */ add.s $f4, $f4, $f0
/* 178058 80249778 4600440D */ trunc.w.s $f16, $f8
/* 17805C 8024977C 44028000 */ mfc1 $v0, $f16
/* 178060 80249780 00000000 */ nop
/* 178064 80249784 A6020024 */ sh $v0, 0x24($s0)
/* 178068 80249788 46025280 */ add.s $f10, $f10, $f2
/* 17806C 8024978C 4600240D */ trunc.w.s $f16, $f4
/* 178070 80249790 44028000 */ mfc1 $v0, $f16
/* 178074 80249794 00000000 */ nop
/* 178078 80249798 A6020022 */ sh $v0, 0x22($s0)
/* 17807C 8024979C 4600540D */ trunc.w.s $f16, $f10
/* 178080 802497A0 44028000 */ mfc1 $v0, $f16
/* 178084 802497A4 00000000 */ nop
/* 178088 802497A8 A602001E */ sh $v0, 0x1e($s0)
/* 17808C 802497AC 84820000 */ lh $v0, ($a0)
/* 178090 802497B0 94830000 */ lhu $v1, ($a0)
/* 178094 802497B4 14400006 */ bnez $v0, .L802497D0
/* 178098 802497B8 2462FFFF */ addiu $v0, $v1, -1
/* 17809C 802497BC 24020001 */ addiu $v0, $zero, 1
/* 1780A0 802497C0 3C01802A */ lui $at, %hi(D_8029F29C)
/* 1780A4 802497C4 A022F29C */ sb $v0, %lo(D_8029F29C)($at)
/* 1780A8 802497C8 080925F6 */ j .L802497D8
/* 1780AC 802497CC 0000102D */ daddu $v0, $zero, $zero
.L802497D0:
/* 1780B0 802497D0 A4820000 */ sh $v0, ($a0)
/* 1780B4 802497D4 0000102D */ daddu $v0, $zero, $zero
.L802497D8:
/* 1780B8 802497D8 8FBF0040 */ lw $ra, 0x40($sp)
/* 1780BC 802497DC 8FB1003C */ lw $s1, 0x3c($sp)
/* 1780C0 802497E0 8FB00038 */ lw $s0, 0x38($sp)
/* 1780C4 802497E4 D7BE0070 */ ldc1 $f30, 0x70($sp)
/* 1780C8 802497E8 D7BC0068 */ ldc1 $f28, 0x68($sp)
/* 1780CC 802497EC D7BA0060 */ ldc1 $f26, 0x60($sp)
/* 1780D0 802497F0 D7B80058 */ ldc1 $f24, 0x58($sp)
/* 1780D4 802497F4 D7B60050 */ ldc1 $f22, 0x50($sp)
/* 1780D8 802497F8 D7B40048 */ ldc1 $f20, 0x48($sp)
/* 1780DC 802497FC 03E00008 */ jr $ra
/* 1780E0 80249800 27BD0078 */ addiu $sp, $sp, 0x78