papermario/asm/nonmatchings/battle/area_mac/464560/func_80218300_464790.s
Ethan Roseman 20a99f4037 OK
2021-02-03 15:40:16 +09:00

577 lines
30 KiB
ArmAsm
Generated

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80218300_464790
/* 464790 80218300 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 464794 80218304 AFB40020 */ sw $s4, 0x20($sp)
/* 464798 80218308 0080A02D */ daddu $s4, $a0, $zero
/* 46479C 8021830C AFB00010 */ sw $s0, 0x10($sp)
/* 4647A0 80218310 AFBF0024 */ sw $ra, 0x24($sp)
/* 4647A4 80218314 AFB3001C */ sw $s3, 0x1c($sp)
/* 4647A8 80218318 AFB20018 */ sw $s2, 0x18($sp)
/* 4647AC 8021831C AFB10014 */ sw $s1, 0x14($sp)
/* 4647B0 80218320 F7BA0040 */ sdc1 $f26, 0x40($sp)
/* 4647B4 80218324 F7B80038 */ sdc1 $f24, 0x38($sp)
/* 4647B8 80218328 F7B60030 */ sdc1 $f22, 0x30($sp)
/* 4647BC 8021832C F7B40028 */ sdc1 $f20, 0x28($sp)
/* 4647C0 80218330 8E840148 */ lw $a0, 0x148($s4)
/* 4647C4 80218334 8E92000C */ lw $s2, 0xc($s4)
/* 4647C8 80218338 0C09A75B */ jal get_actor
/* 4647CC 8021833C 00A0802D */ daddu $s0, $a1, $zero
/* 4647D0 80218340 0040982D */ daddu $s3, $v0, $zero
/* 4647D4 80218344 12000011 */ beqz $s0, .L8021838C
/* 4647D8 80218348 2671000C */ addiu $s1, $s3, 0xc
/* 4647DC 8021834C 8E450000 */ lw $a1, ($s2)
/* 4647E0 80218350 26520004 */ addiu $s2, $s2, 4
/* 4647E4 80218354 0C0B1EAF */ jal get_variable
/* 4647E8 80218358 0280202D */ daddu $a0, $s4, $zero
/* 4647EC 8021835C A6620070 */ sh $v0, 0x70($s3)
/* 4647F0 80218360 8E450000 */ lw $a1, ($s2)
/* 4647F4 80218364 0C0B1EAF */ jal get_variable
/* 4647F8 80218368 0280202D */ daddu $a0, $s4, $zero
/* 4647FC 8021836C A6620072 */ sh $v0, 0x72($s3)
/* 464800 80218370 AE800074 */ sw $zero, 0x74($s4)
/* 464804 80218374 AE800070 */ sw $zero, 0x70($s4)
/* 464808 80218378 86630072 */ lh $v1, 0x72($s3)
/* 46480C 8021837C 24020001 */ addiu $v0, $zero, 1
/* 464810 80218380 14620002 */ bne $v1, $v0, .L8021838C
/* 464814 80218384 24020002 */ addiu $v0, $zero, 2
/* 464818 80218388 AE820070 */ sw $v0, 0x70($s4)
.L8021838C:
/* 46481C 8021838C 8E820070 */ lw $v0, 0x70($s4)
/* 464820 80218390 144000F7 */ bnez $v0, .L80218770
/* 464824 80218394 00000000 */ nop
/* 464828 80218398 C6600144 */ lwc1 $f0, 0x144($s3)
/* 46482C 8021839C C638000C */ lwc1 $f24, 0xc($s1)
/* 464830 802183A0 C63A0014 */ lwc1 $f26, 0x14($s1)
/* 464834 802183A4 E6200000 */ swc1 $f0, ($s1)
/* 464838 802183A8 C6600148 */ lwc1 $f0, 0x148($s3)
/* 46483C 802183AC 4406C000 */ mfc1 $a2, $f24
/* 464840 802183B0 4407D000 */ mfc1 $a3, $f26
/* 464844 802183B4 C6360000 */ lwc1 $f22, ($s1)
/* 464848 802183B8 E6200004 */ swc1 $f0, 4($s1)
/* 46484C 802183BC C674014C */ lwc1 $f20, 0x14c($s3)
/* 464850 802183C0 4600B306 */ mov.s $f12, $f22
/* 464854 802183C4 4600A386 */ mov.s $f14, $f20
/* 464858 802183C8 0C00A720 */ jal atan2
/* 46485C 802183CC E6340008 */ swc1 $f20, 8($s1)
/* 464860 802183D0 4600B306 */ mov.s $f12, $f22
/* 464864 802183D4 4406C000 */ mfc1 $a2, $f24
/* 464868 802183D8 4407D000 */ mfc1 $a3, $f26
/* 46486C 802183DC 4600A386 */ mov.s $f14, $f20
/* 464870 802183E0 0C00A7B5 */ jal dist2D
/* 464874 802183E4 E6200048 */ swc1 $f0, 0x48($s1)
/* 464878 802183E8 86220064 */ lh $v0, 0x64($s1)
/* 46487C 802183EC 46000106 */ mov.s $f4, $f0
/* 464880 802183F0 14400012 */ bnez $v0, .L8021843C
/* 464884 802183F4 E624004C */ swc1 $f4, 0x4c($s1)
/* 464888 802183F8 C6200040 */ lwc1 $f0, 0x40($s1)
/* 46488C 802183FC C6220040 */ lwc1 $f2, 0x40($s1)
/* 464890 80218400 46002003 */ div.s $f0, $f4, $f0
/* 464894 80218404 4600028D */ trunc.w.s $f10, $f0
/* 464898 80218408 44035000 */ mfc1 $v1, $f10
/* 46489C 8021840C 00000000 */ nop
/* 4648A0 80218410 00031400 */ sll $v0, $v1, 0x10
/* 4648A4 80218414 00021403 */ sra $v0, $v0, 0x10
/* 4648A8 80218418 44820000 */ mtc1 $v0, $f0
/* 4648AC 8021841C 00000000 */ nop
/* 4648B0 80218420 46800020 */ cvt.s.w $f0, $f0
/* 4648B4 80218424 46020002 */ mul.s $f0, $f0, $f2
/* 4648B8 80218428 00000000 */ nop
/* 4648BC 8021842C 46002086 */ mov.s $f2, $f4
/* 4648C0 80218430 A6230064 */ sh $v1, 0x64($s1)
/* 4648C4 80218434 0808611C */ j .L80218470
/* 4648C8 80218438 46001201 */ sub.s $f8, $f2, $f0
.L8021843C:
/* 4648CC 8021843C 44821000 */ mtc1 $v0, $f2
/* 4648D0 80218440 00000000 */ nop
/* 4648D4 80218444 468010A0 */ cvt.s.w $f2, $f2
/* 4648D8 80218448 86220064 */ lh $v0, 0x64($s1)
/* 4648DC 8021844C 46022083 */ div.s $f2, $f4, $f2
/* 4648E0 80218450 44820000 */ mtc1 $v0, $f0
/* 4648E4 80218454 00000000 */ nop
/* 4648E8 80218458 46800020 */ cvt.s.w $f0, $f0
/* 4648EC 8021845C 46020002 */ mul.s $f0, $f0, $f2
/* 4648F0 80218460 00000000 */ nop
/* 4648F4 80218464 C624004C */ lwc1 $f4, 0x4c($s1)
/* 4648F8 80218468 E6220040 */ swc1 $f2, 0x40($s1)
/* 4648FC 8021846C 46002201 */ sub.s $f8, $f4, $f0
.L80218470:
/* 464900 80218470 86230064 */ lh $v1, 0x64($s1)
/* 464904 80218474 106001BA */ beqz $v1, .L80218B60
/* 464908 80218478 24020002 */ addiu $v0, $zero, 2
/* 46490C 8021847C 86220064 */ lh $v0, 0x64($s1)
/* 464910 80218480 C622000C */ lwc1 $f2, 0xc($s1)
/* 464914 80218484 3C014049 */ lui $at, 0x4049
/* 464918 80218488 34210FD0 */ ori $at, $at, 0xfd0
/* 46491C 8021848C 44810000 */ mtc1 $at, $f0
/* 464920 80218490 C6240000 */ lwc1 $f4, ($s1)
/* 464924 80218494 44823000 */ mtc1 $v0, $f6
/* 464928 80218498 00000000 */ nop
/* 46492C 8021849C 468031A0 */ cvt.s.w $f6, $f6
/* 464930 802184A0 46060003 */ div.s $f0, $f0, $f6
/* 464934 802184A4 46041081 */ sub.s $f2, $f2, $f4
/* 464938 802184A8 E620003C */ swc1 $f0, 0x3c($s1)
/* 46493C 802184AC 44830000 */ mtc1 $v1, $f0
/* 464940 802184B0 00000000 */ nop
/* 464944 802184B4 46800020 */ cvt.s.w $f0, $f0
/* 464948 802184B8 46001083 */ div.s $f2, $f2, $f0
/* 46494C 802184BC C6200010 */ lwc1 $f0, 0x10($s1)
/* 464950 802184C0 E6220030 */ swc1 $f2, 0x30($s1)
/* 464954 802184C4 C6220004 */ lwc1 $f2, 4($s1)
/* 464958 802184C8 AE200044 */ sw $zero, 0x44($s1)
/* 46495C 802184CC 46020001 */ sub.s $f0, $f0, $f2
/* 464960 802184D0 C6240014 */ lwc1 $f4, 0x14($s1)
/* 464964 802184D4 46003086 */ mov.s $f2, $f6
/* 464968 802184D8 46020003 */ div.s $f0, $f0, $f2
/* 46496C 802184DC E6200034 */ swc1 $f0, 0x34($s1)
/* 464970 802184E0 46003006 */ mov.s $f0, $f6
/* 464974 802184E4 46004003 */ div.s $f0, $f8, $f0
/* 464978 802184E8 C6220008 */ lwc1 $f2, 8($s1)
/* 46497C 802184EC 86220066 */ lh $v0, 0x66($s1)
/* 464980 802184F0 46022101 */ sub.s $f4, $f4, $f2
/* 464984 802184F4 C6220040 */ lwc1 $f2, 0x40($s1)
/* 464988 802184F8 28420003 */ slti $v0, $v0, 3
/* 46498C 802184FC 46001080 */ add.s $f2, $f2, $f0
/* 464990 80218500 46062103 */ div.s $f4, $f4, $f6
/* 464994 80218504 E6240038 */ swc1 $f4, 0x38($s1)
/* 464998 80218508 10400045 */ beqz $v0, .L80218620
/* 46499C 8021850C E6220040 */ swc1 $f2, 0x40($s1)
/* 4649A0 80218510 86220064 */ lh $v0, 0x64($s1)
/* 4649A4 80218514 24030168 */ addiu $v1, $zero, 0x168
/* 4649A8 80218518 14400002 */ bnez $v0, .L80218524
/* 4649AC 8021851C 0062001A */ div $zero, $v1, $v0
/* 4649B0 80218520 0007000D */ break 7
.L80218524:
/* 4649B4 80218524 2401FFFF */ addiu $at, $zero, -1
/* 4649B8 80218528 14410004 */ bne $v0, $at, .L8021853C
/* 4649BC 8021852C 3C018000 */ lui $at, 0x8000
/* 4649C0 80218530 14610002 */ bne $v1, $at, .L8021853C
/* 4649C4 80218534 00000000 */ nop
/* 4649C8 80218538 0006000D */ break 6
.L8021853C:
/* 4649CC 8021853C 00001812 */ mflo $v1
/* 4649D0 80218540 C628004C */ lwc1 $f8, 0x4c($s1)
/* 4649D4 80218544 3C014034 */ lui $at, 0x4034
/* 4649D8 80218548 44811800 */ mtc1 $at, $f3
/* 4649DC 8021854C 44801000 */ mtc1 $zero, $f2
/* 4649E0 80218550 46004021 */ cvt.d.s $f0, $f8
/* 4649E4 80218554 46220001 */ sub.d $f0, $f0, $f2
/* 4649E8 80218558 3C014018 */ lui $at, 0x4018
/* 4649EC 8021855C 44811800 */ mtc1 $at, $f3
/* 4649F0 80218560 44801000 */ mtc1 $zero, $f2
/* 4649F4 80218564 46200220 */ cvt.s.d $f8, $f0
/* 4649F8 80218568 46004021 */ cvt.d.s $f0, $f8
/* 4649FC 8021856C 46220003 */ div.d $f0, $f0, $f2
/* 464A00 80218570 46200220 */ cvt.s.d $f8, $f0
/* 464A04 80218574 3C018023 */ lui $at, %hi(D_80232AF0_47EF80)
/* 464A08 80218578 D4222AF0 */ ldc1 $f2, %lo(D_80232AF0_47EF80)($at)
/* 464A0C 8021857C 46004021 */ cvt.d.s $f0, $f8
/* 464A10 80218580 46220000 */ add.d $f0, $f0, $f2
/* 464A14 80218584 3C0142B4 */ lui $at, 0x42b4
/* 464A18 80218588 44811000 */ mtc1 $at, $f2
/* 464A1C 8021858C 46200220 */ cvt.s.d $f8, $f0
/* 464A20 80218590 44830000 */ mtc1 $v1, $f0
/* 464A24 80218594 00000000 */ nop
/* 464A28 80218598 46800020 */ cvt.s.w $f0, $f0
/* 464A2C 8021859C 86230066 */ lh $v1, 0x66($s1)
/* 464A30 802185A0 24020002 */ addiu $v0, $zero, 2
/* 464A34 802185A4 E6220024 */ swc1 $f2, 0x24($s1)
/* 464A38 802185A8 E6280050 */ swc1 $f8, 0x50($s1)
/* 464A3C 802185AC 14620008 */ bne $v1, $v0, .L802185D0
/* 464A40 802185B0 E6200028 */ swc1 $f0, 0x28($s1)
/* 464A44 802185B4 3C018023 */ lui $at, %hi(D_80232AF8_47EF88)
/* 464A48 802185B8 D4222AF8 */ ldc1 $f2, %lo(D_80232AF8_47EF88)($at)
/* 464A4C 802185BC 46004021 */ cvt.d.s $f0, $f8
/* 464A50 802185C0 46220002 */ mul.d $f0, $f0, $f2
/* 464A54 802185C4 00000000 */ nop
/* 464A58 802185C8 46200020 */ cvt.s.d $f0, $f0
/* 464A5C 802185CC E6200050 */ swc1 $f0, 0x50($s1)
.L802185D0:
/* 464A60 802185D0 C62C0024 */ lwc1 $f12, 0x24($s1)
/* 464A64 802185D4 3C0140C9 */ lui $at, 0x40c9
/* 464A68 802185D8 34210FD0 */ ori $at, $at, 0xfd0
/* 464A6C 802185DC 44810000 */ mtc1 $at, $f0
/* 464A70 802185E0 C6340044 */ lwc1 $f20, 0x44($s1)
/* 464A74 802185E4 C636003C */ lwc1 $f22, 0x3c($s1)
/* 464A78 802185E8 AE200018 */ sw $zero, 0x18($s1)
/* 464A7C 802185EC 46006302 */ mul.s $f12, $f12, $f0
/* 464A80 802185F0 00000000 */ nop
/* 464A84 802185F4 AE20001C */ sw $zero, 0x1c($s1)
/* 464A88 802185F8 4600A521 */ cvt.d.s $f20, $f20
/* 464A8C 802185FC 3C0143B4 */ lui $at, 0x43b4
/* 464A90 80218600 44810000 */ mtc1 $at, $f0
/* 464A94 80218604 4600B5A1 */ cvt.d.s $f22, $f22
/* 464A98 80218608 0C00A85B */ jal sin_rad
/* 464A9C 8021860C 46006303 */ div.s $f12, $f12, $f0
/* 464AA0 80218610 3C018023 */ lui $at, %hi(D_80232B00_47EF90)
/* 464AA4 80218614 D4222B00 */ ldc1 $f2, %lo(D_80232B00_47EF90)($at)
/* 464AA8 80218618 080861CC */ j .L80218730
/* 464AAC 8021861C 46000021 */ cvt.d.s $f0, $f0
.L80218620:
/* 464AB0 80218620 86220064 */ lh $v0, 0x64($s1)
/* 464AB4 80218624 24030168 */ addiu $v1, $zero, 0x168
/* 464AB8 80218628 14400002 */ bnez $v0, .L80218634
/* 464ABC 8021862C 0062001A */ div $zero, $v1, $v0
/* 464AC0 80218630 0007000D */ break 7
.L80218634:
/* 464AC4 80218634 2401FFFF */ addiu $at, $zero, -1
/* 464AC8 80218638 14410004 */ bne $v0, $at, .L8021864C
/* 464ACC 8021863C 3C018000 */ lui $at, 0x8000
/* 464AD0 80218640 14610002 */ bne $v1, $at, .L8021864C
/* 464AD4 80218644 00000000 */ nop
/* 464AD8 80218648 0006000D */ break 6
.L8021864C:
/* 464ADC 8021864C 00001812 */ mflo $v1
/* 464AE0 80218650 C628004C */ lwc1 $f8, 0x4c($s1)
/* 464AE4 80218654 3C014034 */ lui $at, 0x4034
/* 464AE8 80218658 44811800 */ mtc1 $at, $f3
/* 464AEC 8021865C 44801000 */ mtc1 $zero, $f2
/* 464AF0 80218660 46004021 */ cvt.d.s $f0, $f8
/* 464AF4 80218664 46220001 */ sub.d $f0, $f0, $f2
/* 464AF8 80218668 3C014018 */ lui $at, 0x4018
/* 464AFC 8021866C 44811800 */ mtc1 $at, $f3
/* 464B00 80218670 44801000 */ mtc1 $zero, $f2
/* 464B04 80218674 46200220 */ cvt.s.d $f8, $f0
/* 464B08 80218678 46004021 */ cvt.d.s $f0, $f8
/* 464B0C 8021867C 46220003 */ div.d $f0, $f0, $f2
/* 464B10 80218680 46200220 */ cvt.s.d $f8, $f0
/* 464B14 80218684 3C018023 */ lui $at, %hi(D_80232B08_47EF98)
/* 464B18 80218688 D4222B08 */ ldc1 $f2, %lo(D_80232B08_47EF98)($at)
/* 464B1C 8021868C 46004021 */ cvt.d.s $f0, $f8
/* 464B20 80218690 46220000 */ add.d $f0, $f0, $f2
/* 464B24 80218694 3C0142B4 */ lui $at, 0x42b4
/* 464B28 80218698 44811000 */ mtc1 $at, $f2
/* 464B2C 8021869C 46200220 */ cvt.s.d $f8, $f0
/* 464B30 802186A0 44830000 */ mtc1 $v1, $f0
/* 464B34 802186A4 00000000 */ nop
/* 464B38 802186A8 46800020 */ cvt.s.w $f0, $f0
/* 464B3C 802186AC 86230066 */ lh $v1, 0x66($s1)
/* 464B40 802186B0 24020004 */ addiu $v0, $zero, 4
/* 464B44 802186B4 E6220024 */ swc1 $f2, 0x24($s1)
/* 464B48 802186B8 E6280050 */ swc1 $f8, 0x50($s1)
/* 464B4C 802186BC 14620009 */ bne $v1, $v0, .L802186E4
/* 464B50 802186C0 E6200028 */ swc1 $f0, 0x28($s1)
/* 464B54 802186C4 3C013FF4 */ lui $at, 0x3ff4
/* 464B58 802186C8 44811800 */ mtc1 $at, $f3
/* 464B5C 802186CC 44801000 */ mtc1 $zero, $f2
/* 464B60 802186D0 46004021 */ cvt.d.s $f0, $f8
/* 464B64 802186D4 46220002 */ mul.d $f0, $f0, $f2
/* 464B68 802186D8 00000000 */ nop
/* 464B6C 802186DC 46200020 */ cvt.s.d $f0, $f0
/* 464B70 802186E0 E6200050 */ swc1 $f0, 0x50($s1)
.L802186E4:
/* 464B74 802186E4 C62C0024 */ lwc1 $f12, 0x24($s1)
/* 464B78 802186E8 3C0140C9 */ lui $at, 0x40c9
/* 464B7C 802186EC 34210FD0 */ ori $at, $at, 0xfd0
/* 464B80 802186F0 44810000 */ mtc1 $at, $f0
/* 464B84 802186F4 C6340044 */ lwc1 $f20, 0x44($s1)
/* 464B88 802186F8 C636003C */ lwc1 $f22, 0x3c($s1)
/* 464B8C 802186FC AE200018 */ sw $zero, 0x18($s1)
/* 464B90 80218700 46006302 */ mul.s $f12, $f12, $f0
/* 464B94 80218704 00000000 */ nop
/* 464B98 80218708 AE20001C */ sw $zero, 0x1c($s1)
/* 464B9C 8021870C 4600A521 */ cvt.d.s $f20, $f20
/* 464BA0 80218710 3C0143B4 */ lui $at, 0x43b4
/* 464BA4 80218714 44810000 */ mtc1 $at, $f0
/* 464BA8 80218718 4600B5A1 */ cvt.d.s $f22, $f22
/* 464BAC 8021871C 0C00A85B */ jal sin_rad
/* 464BB0 80218720 46006303 */ div.s $f12, $f12, $f0
/* 464BB4 80218724 3C018023 */ lui $at, %hi(D_80232B10_47EFA0)
/* 464BB8 80218728 D4222B10 */ ldc1 $f2, %lo(D_80232B10_47EFA0)($at)
/* 464BBC 8021872C 46000021 */ cvt.d.s $f0, $f0
.L80218730:
/* 464BC0 80218730 46220002 */ mul.d $f0, $f0, $f2
/* 464BC4 80218734 00000000 */ nop
/* 464BC8 80218738 46360002 */ mul.d $f0, $f0, $f22
/* 464BCC 8021873C 00000000 */ nop
/* 464BD0 80218740 46360000 */ add.d $f0, $f0, $f22
/* 464BD4 80218744 4620A500 */ add.d $f20, $f20, $f0
/* 464BD8 80218748 4620A520 */ cvt.s.d $f20, $f20
/* 464BDC 8021874C E6340044 */ swc1 $f20, 0x44($s1)
/* 464BE0 80218750 2404FF81 */ addiu $a0, $zero, -0x7f
/* 464BE4 80218754 8E260058 */ lw $a2, 0x58($s1)
/* 464BE8 80218758 0C098F3F */ jal set_animation
/* 464BEC 8021875C 24050001 */ addiu $a1, $zero, 1
/* 464BF0 80218760 0C05272D */ jal play_sound
/* 464BF4 80218764 24042081 */ addiu $a0, $zero, 0x2081
/* 464BF8 80218768 24020001 */ addiu $v0, $zero, 1
/* 464BFC 8021876C AE820070 */ sw $v0, 0x70($s4)
.L80218770:
/* 464C00 80218770 8E830070 */ lw $v1, 0x70($s4)
/* 464C04 80218774 24020002 */ addiu $v0, $zero, 2
/* 464C08 80218778 10620095 */ beq $v1, $v0, .L802189D0
/* 464C0C 8021877C 24020001 */ addiu $v0, $zero, 1
/* 464C10 80218780 28620003 */ slti $v0, $v1, 3
/* 464C14 80218784 10400005 */ beqz $v0, .L8021879C
/* 464C18 80218788 24020001 */ addiu $v0, $zero, 1
/* 464C1C 8021878C 10620008 */ beq $v1, $v0, .L802187B0
/* 464C20 80218790 0000102D */ daddu $v0, $zero, $zero
/* 464C24 80218794 080862D8 */ j .L80218B60
/* 464C28 80218798 00000000 */ nop
.L8021879C:
/* 464C2C 8021879C 24020003 */ addiu $v0, $zero, 3
/* 464C30 802187A0 106200BA */ beq $v1, $v0, .L80218A8C
/* 464C34 802187A4 0000102D */ daddu $v0, $zero, $zero
/* 464C38 802187A8 080862D8 */ j .L80218B60
/* 464C3C 802187AC 00000000 */ nop
.L802187B0:
/* 464C40 802187B0 C6220044 */ lwc1 $f2, 0x44($s1)
/* 464C44 802187B4 3C013FC9 */ lui $at, 0x3fc9
/* 464C48 802187B8 34210FD0 */ ori $at, $at, 0xfd0
/* 464C4C 802187BC 44810000 */ mtc1 $at, $f0
/* 464C50 802187C0 00000000 */ nop
/* 464C54 802187C4 4602003C */ c.lt.s $f0, $f2
/* 464C58 802187C8 00000000 */ nop
/* 464C5C 802187CC 45000004 */ bc1f .L802187E0
/* 464C60 802187D0 2404FF81 */ addiu $a0, $zero, -0x7f
/* 464C64 802187D4 8E26005C */ lw $a2, 0x5c($s1)
/* 464C68 802187D8 0C098F3F */ jal set_animation
/* 464C6C 802187DC 24050001 */ addiu $a1, $zero, 1
.L802187E0:
/* 464C70 802187E0 C6260000 */ lwc1 $f6, ($s1)
/* 464C74 802187E4 C6200030 */ lwc1 $f0, 0x30($s1)
/* 464C78 802187E8 C6240004 */ lwc1 $f4, 4($s1)
/* 464C7C 802187EC C6760144 */ lwc1 $f22, 0x144($s3)
/* 464C80 802187F0 46003180 */ add.s $f6, $f6, $f0
/* 464C84 802187F4 C6200034 */ lwc1 $f0, 0x34($s1)
/* 464C88 802187F8 C6220038 */ lwc1 $f2, 0x38($s1)
/* 464C8C 802187FC 46002100 */ add.s $f4, $f4, $f0
/* 464C90 80218800 C6200008 */ lwc1 $f0, 8($s1)
/* 464C94 80218804 C6740148 */ lwc1 $f20, 0x148($s3)
/* 464C98 80218808 46020000 */ add.s $f0, $f0, $f2
/* 464C9C 8021880C E6260000 */ swc1 $f6, ($s1)
/* 464CA0 80218810 E6240004 */ swc1 $f4, 4($s1)
/* 464CA4 80218814 E6200008 */ swc1 $f0, 8($s1)
/* 464CA8 80218818 C6600148 */ lwc1 $f0, 0x148($s3)
/* 464CAC 8021881C 46003086 */ mov.s $f2, $f6
/* 464CB0 80218820 E6200018 */ swc1 $f0, 0x18($s1)
/* 464CB4 80218824 E6620144 */ swc1 $f2, 0x144($s3)
/* 464CB8 80218828 0C00A85B */ jal sin_rad
/* 464CBC 8021882C C62C0044 */ lwc1 $f12, 0x44($s1)
/* 464CC0 80218830 C6220050 */ lwc1 $f2, 0x50($s1)
/* 464CC4 80218834 46001082 */ mul.s $f2, $f2, $f0
/* 464CC8 80218838 00000000 */ nop
/* 464CCC 8021883C C6200004 */ lwc1 $f0, 4($s1)
/* 464CD0 80218840 46020000 */ add.s $f0, $f0, $f2
/* 464CD4 80218844 E6600148 */ swc1 $f0, 0x148($s3)
/* 464CD8 80218848 C6200008 */ lwc1 $f0, 8($s1)
/* 464CDC 8021884C E660014C */ swc1 $f0, 0x14c($s3)
/* 464CE0 80218850 C6220010 */ lwc1 $f2, 0x10($s1)
/* 464CE4 80218854 C6600148 */ lwc1 $f0, 0x148($s3)
/* 464CE8 80218858 4602003C */ c.lt.s $f0, $f2
/* 464CEC 8021885C 00000000 */ nop
/* 464CF0 80218860 45000007 */ bc1f .L80218880
/* 464CF4 80218864 4600B306 */ mov.s $f12, $f22
/* 464CF8 80218868 86220064 */ lh $v0, 0x64($s1)
/* 464CFC 8021886C 28420003 */ slti $v0, $v0, 3
/* 464D00 80218870 54400002 */ bnel $v0, $zero, .L8021887C
/* 464D04 80218874 E6620148 */ swc1 $f2, 0x148($s3)
/* 464D08 80218878 4600B306 */ mov.s $f12, $f22
.L8021887C:
/* 464D0C 8021887C C6600148 */ lwc1 $f0, 0x148($s3)
.L80218880:
/* 464D10 80218880 8E660144 */ lw $a2, 0x144($s3)
/* 464D14 80218884 46000007 */ neg.s $f0, $f0
/* 464D18 80218888 44070000 */ mfc1 $a3, $f0
/* 464D1C 8021888C 0C00A720 */ jal atan2
/* 464D20 80218890 4600A387 */ neg.s $f14, $f20
/* 464D24 80218894 46000007 */ neg.s $f0, $f0
/* 464D28 80218898 E6600164 */ swc1 $f0, 0x164($s3)
/* 464D2C 8021889C 86220066 */ lh $v0, 0x66($s1)
/* 464D30 802188A0 C6600148 */ lwc1 $f0, 0x148($s3)
/* 464D34 802188A4 28420003 */ slti $v0, $v0, 3
/* 464D38 802188A8 10400013 */ beqz $v0, .L802188F8
/* 464D3C 802188AC E620001C */ swc1 $f0, 0x1c($s1)
/* 464D40 802188B0 C62C0024 */ lwc1 $f12, 0x24($s1)
/* 464D44 802188B4 3C0140C9 */ lui $at, 0x40c9
/* 464D48 802188B8 34210FD0 */ ori $at, $at, 0xfd0
/* 464D4C 802188BC 44810000 */ mtc1 $at, $f0
/* 464D50 802188C0 C6340044 */ lwc1 $f20, 0x44($s1)
/* 464D54 802188C4 46006302 */ mul.s $f12, $f12, $f0
/* 464D58 802188C8 00000000 */ nop
/* 464D5C 802188CC C636003C */ lwc1 $f22, 0x3c($s1)
/* 464D60 802188D0 4600A521 */ cvt.d.s $f20, $f20
/* 464D64 802188D4 3C0143B4 */ lui $at, 0x43b4
/* 464D68 802188D8 44810000 */ mtc1 $at, $f0
/* 464D6C 802188DC 4600B5A1 */ cvt.d.s $f22, $f22
/* 464D70 802188E0 0C00A85B */ jal sin_rad
/* 464D74 802188E4 46006303 */ div.s $f12, $f12, $f0
/* 464D78 802188E8 3C018023 */ lui $at, %hi(D_80232B18_47EFA8)
/* 464D7C 802188EC D4222B18 */ ldc1 $f2, %lo(D_80232B18_47EFA8)($at)
/* 464D80 802188F0 0808624F */ j .L8021893C
/* 464D84 802188F4 46000021 */ cvt.d.s $f0, $f0
.L802188F8:
/* 464D88 802188F8 C62C0024 */ lwc1 $f12, 0x24($s1)
/* 464D8C 802188FC 3C0140C9 */ lui $at, 0x40c9
/* 464D90 80218900 34210FD0 */ ori $at, $at, 0xfd0
/* 464D94 80218904 44810000 */ mtc1 $at, $f0
/* 464D98 80218908 C6340044 */ lwc1 $f20, 0x44($s1)
/* 464D9C 8021890C 46006302 */ mul.s $f12, $f12, $f0
/* 464DA0 80218910 00000000 */ nop
/* 464DA4 80218914 C636003C */ lwc1 $f22, 0x3c($s1)
/* 464DA8 80218918 4600A521 */ cvt.d.s $f20, $f20
/* 464DAC 8021891C 3C0143B4 */ lui $at, 0x43b4
/* 464DB0 80218920 44810000 */ mtc1 $at, $f0
/* 464DB4 80218924 4600B5A1 */ cvt.d.s $f22, $f22
/* 464DB8 80218928 0C00A85B */ jal sin_rad
/* 464DBC 8021892C 46006303 */ div.s $f12, $f12, $f0
/* 464DC0 80218930 3C018023 */ lui $at, %hi(D_80232B20_47EFB0)
/* 464DC4 80218934 D4222B20 */ ldc1 $f2, %lo(D_80232B20_47EFB0)($at)
/* 464DC8 80218938 46000021 */ cvt.d.s $f0, $f0
.L8021893C:
/* 464DCC 8021893C 46220002 */ mul.d $f0, $f0, $f2
/* 464DD0 80218940 00000000 */ nop
/* 464DD4 80218944 46360002 */ mul.d $f0, $f0, $f22
/* 464DD8 80218948 00000000 */ nop
/* 464DDC 8021894C 46360000 */ add.d $f0, $f0, $f22
/* 464DE0 80218950 4620A500 */ add.d $f20, $f20, $f0
/* 464DE4 80218954 4620A520 */ cvt.s.d $f20, $f20
/* 464DE8 80218958 E6340044 */ swc1 $f20, 0x44($s1)
/* 464DEC 8021895C C62C0024 */ lwc1 $f12, 0x24($s1)
/* 464DF0 80218960 C6200028 */ lwc1 $f0, 0x28($s1)
/* 464DF4 80218964 46006300 */ add.s $f12, $f12, $f0
/* 464DF8 80218968 0C00A6C9 */ jal clamp_angle
/* 464DFC 8021896C E62C0024 */ swc1 $f12, 0x24($s1)
/* 464E00 80218970 96220064 */ lhu $v0, 0x64($s1)
/* 464E04 80218974 E6200024 */ swc1 $f0, 0x24($s1)
/* 464E08 80218978 2442FFFF */ addiu $v0, $v0, -1
/* 464E0C 8021897C A6220064 */ sh $v0, 0x64($s1)
/* 464E10 80218980 00021400 */ sll $v0, $v0, 0x10
/* 464E14 80218984 14400076 */ bnez $v0, .L80218B60
/* 464E18 80218988 0000102D */ daddu $v0, $zero, $zero
/* 464E1C 8021898C C6200010 */ lwc1 $f0, 0x10($s1)
/* 464E20 80218990 2404FF81 */ addiu $a0, $zero, -0x7f
/* 464E24 80218994 E6600148 */ swc1 $f0, 0x148($s3)
/* 464E28 80218998 C6200018 */ lwc1 $f0, 0x18($s1)
/* 464E2C 8021899C C622001C */ lwc1 $f2, 0x1c($s1)
/* 464E30 802189A0 8E260060 */ lw $a2, 0x60($s1)
/* 464E34 802189A4 46020001 */ sub.s $f0, $f0, $f2
/* 464E38 802189A8 3C013FE6 */ lui $at, 0x3fe6
/* 464E3C 802189AC 34216666 */ ori $at, $at, 0x6666
/* 464E40 802189B0 44811000 */ mtc1 $at, $f2
/* 464E44 802189B4 24050001 */ addiu $a1, $zero, 1
/* 464E48 802189B8 E622003C */ swc1 $f2, 0x3c($s1)
/* 464E4C 802189BC 46000007 */ neg.s $f0, $f0
/* 464E50 802189C0 0C098F3F */ jal set_animation
/* 464E54 802189C4 E6200044 */ swc1 $f0, 0x44($s1)
/* 464E58 802189C8 080862D8 */ j .L80218B60
/* 464E5C 802189CC 24020001 */ addiu $v0, $zero, 1
.L802189D0:
/* 464E60 802189D0 A6220064 */ sh $v0, 0x64($s1)
/* 464E64 802189D4 86220064 */ lh $v0, 0x64($s1)
/* 464E68 802189D8 24030168 */ addiu $v1, $zero, 0x168
/* 464E6C 802189DC 14400002 */ bnez $v0, .L802189E8
/* 464E70 802189E0 0062001A */ div $zero, $v1, $v0
/* 464E74 802189E4 0007000D */ break 7
.L802189E8:
/* 464E78 802189E8 2401FFFF */ addiu $at, $zero, -1
/* 464E7C 802189EC 14410004 */ bne $v0, $at, .L80218A00
/* 464E80 802189F0 3C018000 */ lui $at, 0x8000
/* 464E84 802189F4 14610002 */ bne $v1, $at, .L80218A00
/* 464E88 802189F8 00000000 */ nop
/* 464E8C 802189FC 0006000D */ break 6
.L80218A00:
/* 464E90 80218A00 00001812 */ mflo $v1
/* 464E94 80218A04 C6220018 */ lwc1 $f2, 0x18($s1)
/* 464E98 80218A08 C620001C */ lwc1 $f0, 0x1c($s1)
/* 464E9C 80218A0C 3C013FE6 */ lui $at, 0x3fe6
/* 464EA0 80218A10 34216666 */ ori $at, $at, 0x6666
/* 464EA4 80218A14 44814000 */ mtc1 $at, $f8
/* 464EA8 80218A18 C624001C */ lwc1 $f4, 0x1c($s1)
/* 464EAC 80218A1C 46001081 */ sub.s $f2, $f2, $f0
/* 464EB0 80218A20 C6200018 */ lwc1 $f0, 0x18($s1)
/* 464EB4 80218A24 3C0142B4 */ lui $at, 0x42b4
/* 464EB8 80218A28 44813000 */ mtc1 $at, $f6
/* 464EBC 80218A2C 46040001 */ sub.s $f0, $f0, $f4
/* 464EC0 80218A30 E628003C */ swc1 $f8, 0x3c($s1)
/* 464EC4 80218A34 E6260024 */ swc1 $f6, 0x24($s1)
/* 464EC8 80218A38 46001087 */ neg.s $f2, $f2
/* 464ECC 80218A3C E6220044 */ swc1 $f2, 0x44($s1)
/* 464ED0 80218A40 3C018023 */ lui $at, %hi(D_80232B28_47EFB8)
/* 464ED4 80218A44 D4222B28 */ ldc1 $f2, %lo(D_80232B28_47EFB8)($at)
/* 464ED8 80218A48 46000005 */ abs.s $f0, $f0
/* 464EDC 80218A4C 46000021 */ cvt.d.s $f0, $f0
/* 464EE0 80218A50 46220003 */ div.d $f0, $f0, $f2
/* 464EE4 80218A54 46200020 */ cvt.s.d $f0, $f0
/* 464EE8 80218A58 E6200050 */ swc1 $f0, 0x50($s1)
/* 464EEC 80218A5C 44830000 */ mtc1 $v1, $f0
/* 464EF0 80218A60 00000000 */ nop
/* 464EF4 80218A64 46800020 */ cvt.s.w $f0, $f0
/* 464EF8 80218A68 E6200028 */ swc1 $f0, 0x28($s1)
/* 464EFC 80218A6C C6600144 */ lwc1 $f0, 0x144($s3)
/* 464F00 80218A70 E6200000 */ swc1 $f0, ($s1)
/* 464F04 80218A74 C6600148 */ lwc1 $f0, 0x148($s3)
/* 464F08 80218A78 E6200004 */ swc1 $f0, 4($s1)
/* 464F0C 80218A7C C660014C */ lwc1 $f0, 0x14c($s3)
/* 464F10 80218A80 24020003 */ addiu $v0, $zero, 3
/* 464F14 80218A84 E6200008 */ swc1 $f0, 8($s1)
/* 464F18 80218A88 AE820070 */ sw $v0, 0x70($s4)
.L80218A8C:
/* 464F1C 80218A8C C62C0024 */ lwc1 $f12, 0x24($s1)
/* 464F20 80218A90 3C0140C9 */ lui $at, 0x40c9
/* 464F24 80218A94 34210FD0 */ ori $at, $at, 0xfd0
/* 464F28 80218A98 4481B000 */ mtc1 $at, $f22
/* 464F2C 80218A9C 00000000 */ nop
/* 464F30 80218AA0 46166302 */ mul.s $f12, $f12, $f22
/* 464F34 80218AA4 00000000 */ nop
/* 464F38 80218AA8 C6340000 */ lwc1 $f20, ($s1)
/* 464F3C 80218AAC 3C0143B4 */ lui $at, 0x43b4
/* 464F40 80218AB0 4481C000 */ mtc1 $at, $f24
/* 464F44 80218AB4 4600A521 */ cvt.d.s $f20, $f20
/* 464F48 80218AB8 0C00A85B */ jal sin_rad
/* 464F4C 80218ABC 46186303 */ div.s $f12, $f12, $f24
/* 464F50 80218AC0 C6220050 */ lwc1 $f2, 0x50($s1)
/* 464F54 80218AC4 46001082 */ mul.s $f2, $f2, $f0
/* 464F58 80218AC8 00000000 */ nop
/* 464F5C 80218ACC C62C0024 */ lwc1 $f12, 0x24($s1)
/* 464F60 80218AD0 46166302 */ mul.s $f12, $f12, $f22
/* 464F64 80218AD4 00000000 */ nop
/* 464F68 80218AD8 3C018023 */ lui $at, %hi(D_80232B30_47EFC0)
/* 464F6C 80218ADC D4202B30 */ ldc1 $f0, %lo(D_80232B30_47EFC0)($at)
/* 464F70 80218AE0 460010A1 */ cvt.d.s $f2, $f2
/* 464F74 80218AE4 46201083 */ div.d $f2, $f2, $f0
/* 464F78 80218AE8 4622A500 */ add.d $f20, $f20, $f2
/* 464F7C 80218AEC 46186303 */ div.s $f12, $f12, $f24
/* 464F80 80218AF0 4620A520 */ cvt.s.d $f20, $f20
/* 464F84 80218AF4 0C00A85B */ jal sin_rad
/* 464F88 80218AF8 E6340000 */ swc1 $f20, ($s1)
/* 464F8C 80218AFC C6220050 */ lwc1 $f2, 0x50($s1)
/* 464F90 80218B00 46001082 */ mul.s $f2, $f2, $f0
/* 464F94 80218B04 00000000 */ nop
/* 464F98 80218B08 C62C0024 */ lwc1 $f12, 0x24($s1)
/* 464F9C 80218B0C C6200028 */ lwc1 $f0, 0x28($s1)
/* 464FA0 80218B10 46006300 */ add.s $f12, $f12, $f0
/* 464FA4 80218B14 C6200004 */ lwc1 $f0, 4($s1)
/* 464FA8 80218B18 46020001 */ sub.s $f0, $f0, $f2
/* 464FAC 80218B1C E62C0024 */ swc1 $f12, 0x24($s1)
/* 464FB0 80218B20 0C00A6C9 */ jal clamp_angle
/* 464FB4 80218B24 E6200004 */ swc1 $f0, 4($s1)
/* 464FB8 80218B28 C6220000 */ lwc1 $f2, ($s1)
/* 464FBC 80218B2C E6200024 */ swc1 $f0, 0x24($s1)
/* 464FC0 80218B30 E6620144 */ swc1 $f2, 0x144($s3)
/* 464FC4 80218B34 C6200004 */ lwc1 $f0, 4($s1)
/* 464FC8 80218B38 E6600148 */ swc1 $f0, 0x148($s3)
/* 464FCC 80218B3C C6200008 */ lwc1 $f0, 8($s1)
/* 464FD0 80218B40 E660014C */ swc1 $f0, 0x14c($s3)
/* 464FD4 80218B44 96230064 */ lhu $v1, 0x64($s1)
/* 464FD8 80218B48 2463FFFF */ addiu $v1, $v1, -1
/* 464FDC 80218B4C A6230064 */ sh $v1, 0x64($s1)
/* 464FE0 80218B50 00031C00 */ sll $v1, $v1, 0x10
/* 464FE4 80218B54 10600002 */ beqz $v1, .L80218B60
/* 464FE8 80218B58 24020001 */ addiu $v0, $zero, 1
/* 464FEC 80218B5C 0000102D */ daddu $v0, $zero, $zero
.L80218B60:
/* 464FF0 80218B60 8FBF0024 */ lw $ra, 0x24($sp)
/* 464FF4 80218B64 8FB40020 */ lw $s4, 0x20($sp)
/* 464FF8 80218B68 8FB3001C */ lw $s3, 0x1c($sp)
/* 464FFC 80218B6C 8FB20018 */ lw $s2, 0x18($sp)
/* 465000 80218B70 8FB10014 */ lw $s1, 0x14($sp)
/* 465004 80218B74 8FB00010 */ lw $s0, 0x10($sp)
/* 465008 80218B78 D7BA0040 */ ldc1 $f26, 0x40($sp)
/* 46500C 80218B7C D7B80038 */ ldc1 $f24, 0x38($sp)
/* 465010 80218B80 D7B60030 */ ldc1 $f22, 0x30($sp)
/* 465014 80218B84 D7B40028 */ ldc1 $f20, 0x28($sp)
/* 465018 80218B88 03E00008 */ jr $ra
/* 46501C 80218B8C 27BD0048 */ addiu $sp, $sp, 0x48