.set noat # allow manual use of $at .set noreorder # don't insert nops after branches glabel func_80218058_6607A8 /* 6607A8 80218058 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 6607AC 8021805C AFB20018 */ sw $s2, 0x18($sp) /* 6607B0 80218060 0080902D */ daddu $s2, $a0, $zero /* 6607B4 80218064 AFBF0028 */ sw $ra, 0x28($sp) /* 6607B8 80218068 AFB50024 */ sw $s5, 0x24($sp) /* 6607BC 8021806C AFB40020 */ sw $s4, 0x20($sp) /* 6607C0 80218070 AFB3001C */ sw $s3, 0x1c($sp) /* 6607C4 80218074 AFB10014 */ sw $s1, 0x14($sp) /* 6607C8 80218078 AFB00010 */ sw $s0, 0x10($sp) /* 6607CC 8021807C F7B80040 */ sdc1 $f24, 0x40($sp) /* 6607D0 80218080 F7B60038 */ sdc1 $f22, 0x38($sp) /* 6607D4 80218084 F7B40030 */ sdc1 $f20, 0x30($sp) /* 6607D8 80218088 8E50000C */ lw $s0, 0xc($s2) /* 6607DC 8021808C 8E140000 */ lw $s4, ($s0) /* 6607E0 80218090 26100004 */ addiu $s0, $s0, 4 /* 6607E4 80218094 0C0B1EAF */ jal get_variable /* 6607E8 80218098 0280282D */ daddu $a1, $s4, $zero /* 6607EC 8021809C 0040982D */ daddu $s3, $v0, $zero /* 6607F0 802180A0 8E150000 */ lw $s5, ($s0) /* 6607F4 802180A4 26100004 */ addiu $s0, $s0, 4 /* 6607F8 802180A8 8E050000 */ lw $a1, ($s0) /* 6607FC 802180AC 26100004 */ addiu $s0, $s0, 4 /* 660800 802180B0 0C0B210B */ jal get_float_variable /* 660804 802180B4 0240202D */ daddu $a0, $s2, $zero /* 660808 802180B8 8E050000 */ lw $a1, ($s0) /* 66080C 802180BC 26100004 */ addiu $s0, $s0, 4 /* 660810 802180C0 0240202D */ daddu $a0, $s2, $zero /* 660814 802180C4 0C0B210B */ jal get_float_variable /* 660818 802180C8 46000606 */ mov.s $f24, $f0 /* 66081C 802180CC 8E050000 */ lw $a1, ($s0) /* 660820 802180D0 26100004 */ addiu $s0, $s0, 4 /* 660824 802180D4 0240202D */ daddu $a0, $s2, $zero /* 660828 802180D8 0C0B1EAF */ jal get_variable /* 66082C 802180DC 46000506 */ mov.s $f20, $f0 /* 660830 802180E0 8E050000 */ lw $a1, ($s0) /* 660834 802180E4 26100004 */ addiu $s0, $s0, 4 /* 660838 802180E8 0240202D */ daddu $a0, $s2, $zero /* 66083C 802180EC 0C0B1EAF */ jal get_variable /* 660840 802180F0 0040882D */ daddu $s1, $v0, $zero /* 660844 802180F4 0240202D */ daddu $a0, $s2, $zero /* 660848 802180F8 8E050000 */ lw $a1, ($s0) /* 66084C 802180FC 0C0B210B */ jal get_float_variable /* 660850 80218100 0040802D */ daddu $s0, $v0, $zero /* 660854 80218104 3C014334 */ lui $at, 0x4334 /* 660858 80218108 44811000 */ mtc1 $at, $f2 /* 66085C 8021810C 3C014049 */ lui $at, 0x4049 /* 660860 80218110 34210FD8 */ ori $at, $at, 0xfd8 /* 660864 80218114 44812000 */ mtc1 $at, $f4 /* 660868 80218118 46020003 */ div.s $f0, $f0, $f2 /* 66086C 8021811C 46040582 */ mul.s $f22, $f0, $f4 /* 660870 80218120 00000000 */ nop /* 660874 80218124 4618A501 */ sub.s $f20, $f20, $f24 /* 660878 80218128 3C013F00 */ lui $at, 0x3f00 /* 66087C 8021812C 44810000 */ mtc1 $at, $f0 /* 660880 80218130 00000000 */ nop /* 660884 80218134 4600A502 */ mul.s $f20, $f20, $f0 /* 660888 80218138 00000000 */ nop /* 66088C 8021813C 12000007 */ beqz $s0, .L8021815C /* 660890 80218140 0233102A */ slt $v0, $s1, $s3 /* 660894 80218144 10400005 */ beqz $v0, .L8021815C /* 660898 80218148 0240202D */ daddu $a0, $s2, $zero /* 66089C 8021814C 0220982D */ daddu $s3, $s1, $zero /* 6608A0 80218150 0280282D */ daddu $a1, $s4, $zero /* 6608A4 80218154 0C0B2026 */ jal set_variable /* 6608A8 80218158 0220302D */ daddu $a2, $s1, $zero .L8021815C: /* 6608AC 8021815C 3C014049 */ lui $at, 0x4049 /* 6608B0 80218160 34210FD8 */ ori $at, $at, 0xfd8 /* 6608B4 80218164 44810000 */ mtc1 $at, $f0 /* 6608B8 80218168 44936000 */ mtc1 $s3, $f12 /* 6608BC 8021816C 00000000 */ nop /* 6608C0 80218170 46806320 */ cvt.s.w $f12, $f12 /* 6608C4 80218174 46006302 */ mul.s $f12, $f12, $f0 /* 6608C8 80218178 00000000 */ nop /* 6608CC 8021817C 44910000 */ mtc1 $s1, $f0 /* 6608D0 80218180 00000000 */ nop /* 6608D4 80218184 46800020 */ cvt.s.w $f0, $f0 /* 6608D8 80218188 46006303 */ div.s $f12, $f12, $f0 /* 6608DC 8021818C 0C00A874 */ jal cos_rad /* 6608E0 80218190 46166300 */ add.s $f12, $f12, $f22 /* 6608E4 80218194 4600A002 */ mul.s $f0, $f20, $f0 /* 6608E8 80218198 00000000 */ nop /* 6608EC 8021819C 4614C080 */ add.s $f2, $f24, $f20 /* 6608F0 802181A0 46001081 */ sub.s $f2, $f2, $f0 /* 6608F4 802181A4 0240202D */ daddu $a0, $s2, $zero /* 6608F8 802181A8 44061000 */ mfc1 $a2, $f2 /* 6608FC 802181AC 0C0B2190 */ jal set_float_variable /* 660900 802181B0 02A0282D */ daddu $a1, $s5, $zero /* 660904 802181B4 8FBF0028 */ lw $ra, 0x28($sp) /* 660908 802181B8 8FB50024 */ lw $s5, 0x24($sp) /* 66090C 802181BC 8FB40020 */ lw $s4, 0x20($sp) /* 660910 802181C0 8FB3001C */ lw $s3, 0x1c($sp) /* 660914 802181C4 8FB20018 */ lw $s2, 0x18($sp) /* 660918 802181C8 8FB10014 */ lw $s1, 0x14($sp) /* 66091C 802181CC 8FB00010 */ lw $s0, 0x10($sp) /* 660920 802181D0 D7B80040 */ ldc1 $f24, 0x40($sp) /* 660924 802181D4 D7B60038 */ ldc1 $f22, 0x38($sp) /* 660928 802181D8 D7B40030 */ ldc1 $f20, 0x30($sp) /* 66092C 802181DC 24020002 */ addiu $v0, $zero, 2 /* 660930 802181E0 03E00008 */ jr $ra /* 660934 802181E4 27BD0048 */ addiu $sp, $sp, 0x48