papermario/asm/nonmatchings/battle/area_kpa3/6BBC60/func_802180D0_6BBC60.s
2021-01-13 00:42:27 +09:00

577 lines
30 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_802180D0_6BBC60
/* 6BBC60 802180D0 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 6BBC64 802180D4 AFB40020 */ sw $s4, 0x20($sp)
/* 6BBC68 802180D8 0080A02D */ daddu $s4, $a0, $zero
/* 6BBC6C 802180DC AFB00010 */ sw $s0, 0x10($sp)
/* 6BBC70 802180E0 AFBF0024 */ sw $ra, 0x24($sp)
/* 6BBC74 802180E4 AFB3001C */ sw $s3, 0x1c($sp)
/* 6BBC78 802180E8 AFB20018 */ sw $s2, 0x18($sp)
/* 6BBC7C 802180EC AFB10014 */ sw $s1, 0x14($sp)
/* 6BBC80 802180F0 F7BA0040 */ sdc1 $f26, 0x40($sp)
/* 6BBC84 802180F4 F7B80038 */ sdc1 $f24, 0x38($sp)
/* 6BBC88 802180F8 F7B60030 */ sdc1 $f22, 0x30($sp)
/* 6BBC8C 802180FC F7B40028 */ sdc1 $f20, 0x28($sp)
/* 6BBC90 80218100 8E840148 */ lw $a0, 0x148($s4)
/* 6BBC94 80218104 8E92000C */ lw $s2, 0xc($s4)
/* 6BBC98 80218108 0C09A75B */ jal get_actor
/* 6BBC9C 8021810C 00A0802D */ daddu $s0, $a1, $zero
/* 6BBCA0 80218110 0040982D */ daddu $s3, $v0, $zero
/* 6BBCA4 80218114 12000011 */ beqz $s0, .L8021815C
/* 6BBCA8 80218118 2671000C */ addiu $s1, $s3, 0xc
/* 6BBCAC 8021811C 8E450000 */ lw $a1, ($s2)
/* 6BBCB0 80218120 26520004 */ addiu $s2, $s2, 4
/* 6BBCB4 80218124 0C0B1EAF */ jal get_variable
/* 6BBCB8 80218128 0280202D */ daddu $a0, $s4, $zero
/* 6BBCBC 8021812C A6620070 */ sh $v0, 0x70($s3)
/* 6BBCC0 80218130 8E450000 */ lw $a1, ($s2)
/* 6BBCC4 80218134 0C0B1EAF */ jal get_variable
/* 6BBCC8 80218138 0280202D */ daddu $a0, $s4, $zero
/* 6BBCCC 8021813C A6620072 */ sh $v0, 0x72($s3)
/* 6BBCD0 80218140 AE800074 */ sw $zero, 0x74($s4)
/* 6BBCD4 80218144 AE800070 */ sw $zero, 0x70($s4)
/* 6BBCD8 80218148 86630072 */ lh $v1, 0x72($s3)
/* 6BBCDC 8021814C 24020001 */ addiu $v0, $zero, 1
/* 6BBCE0 80218150 14620002 */ bne $v1, $v0, .L8021815C
/* 6BBCE4 80218154 24020002 */ addiu $v0, $zero, 2
/* 6BBCE8 80218158 AE820070 */ sw $v0, 0x70($s4)
.L8021815C:
/* 6BBCEC 8021815C 8E820070 */ lw $v0, 0x70($s4)
/* 6BBCF0 80218160 144000F7 */ bnez $v0, .L80218540
/* 6BBCF4 80218164 00000000 */ nop
/* 6BBCF8 80218168 C6600144 */ lwc1 $f0, 0x144($s3)
/* 6BBCFC 8021816C C638000C */ lwc1 $f24, 0xc($s1)
/* 6BBD00 80218170 C63A0014 */ lwc1 $f26, 0x14($s1)
/* 6BBD04 80218174 E6200000 */ swc1 $f0, ($s1)
/* 6BBD08 80218178 C6600148 */ lwc1 $f0, 0x148($s3)
/* 6BBD0C 8021817C 4406C000 */ mfc1 $a2, $f24
/* 6BBD10 80218180 4407D000 */ mfc1 $a3, $f26
/* 6BBD14 80218184 C6360000 */ lwc1 $f22, ($s1)
/* 6BBD18 80218188 E6200004 */ swc1 $f0, 4($s1)
/* 6BBD1C 8021818C C674014C */ lwc1 $f20, 0x14c($s3)
/* 6BBD20 80218190 4600B306 */ mov.s $f12, $f22
/* 6BBD24 80218194 4600A386 */ mov.s $f14, $f20
/* 6BBD28 80218198 0C00A720 */ jal atan2
/* 6BBD2C 8021819C E6340008 */ swc1 $f20, 8($s1)
/* 6BBD30 802181A0 4600B306 */ mov.s $f12, $f22
/* 6BBD34 802181A4 4406C000 */ mfc1 $a2, $f24
/* 6BBD38 802181A8 4407D000 */ mfc1 $a3, $f26
/* 6BBD3C 802181AC 4600A386 */ mov.s $f14, $f20
/* 6BBD40 802181B0 0C00A7B5 */ jal dist2D
/* 6BBD44 802181B4 E6200048 */ swc1 $f0, 0x48($s1)
/* 6BBD48 802181B8 86220064 */ lh $v0, 0x64($s1)
/* 6BBD4C 802181BC 46000106 */ mov.s $f4, $f0
/* 6BBD50 802181C0 14400012 */ bnez $v0, .L8021820C
/* 6BBD54 802181C4 E624004C */ swc1 $f4, 0x4c($s1)
/* 6BBD58 802181C8 C6200040 */ lwc1 $f0, 0x40($s1)
/* 6BBD5C 802181CC C6220040 */ lwc1 $f2, 0x40($s1)
/* 6BBD60 802181D0 46002003 */ div.s $f0, $f4, $f0
/* 6BBD64 802181D4 4600028D */ trunc.w.s $f10, $f0
/* 6BBD68 802181D8 44035000 */ mfc1 $v1, $f10
/* 6BBD6C 802181DC 00000000 */ nop
/* 6BBD70 802181E0 00031400 */ sll $v0, $v1, 0x10
/* 6BBD74 802181E4 00021403 */ sra $v0, $v0, 0x10
/* 6BBD78 802181E8 44820000 */ mtc1 $v0, $f0
/* 6BBD7C 802181EC 00000000 */ nop
/* 6BBD80 802181F0 46800020 */ cvt.s.w $f0, $f0
/* 6BBD84 802181F4 46020002 */ mul.s $f0, $f0, $f2
/* 6BBD88 802181F8 00000000 */ nop
/* 6BBD8C 802181FC 46002086 */ mov.s $f2, $f4
/* 6BBD90 80218200 A6230064 */ sh $v1, 0x64($s1)
/* 6BBD94 80218204 08086090 */ j .L80218240
/* 6BBD98 80218208 46001201 */ sub.s $f8, $f2, $f0
.L8021820C:
/* 6BBD9C 8021820C 44821000 */ mtc1 $v0, $f2
/* 6BBDA0 80218210 00000000 */ nop
/* 6BBDA4 80218214 468010A0 */ cvt.s.w $f2, $f2
/* 6BBDA8 80218218 86220064 */ lh $v0, 0x64($s1)
/* 6BBDAC 8021821C 46022083 */ div.s $f2, $f4, $f2
/* 6BBDB0 80218220 44820000 */ mtc1 $v0, $f0
/* 6BBDB4 80218224 00000000 */ nop
/* 6BBDB8 80218228 46800020 */ cvt.s.w $f0, $f0
/* 6BBDBC 8021822C 46020002 */ mul.s $f0, $f0, $f2
/* 6BBDC0 80218230 00000000 */ nop
/* 6BBDC4 80218234 C624004C */ lwc1 $f4, 0x4c($s1)
/* 6BBDC8 80218238 E6220040 */ swc1 $f2, 0x40($s1)
/* 6BBDCC 8021823C 46002201 */ sub.s $f8, $f4, $f0
.L80218240:
/* 6BBDD0 80218240 86230064 */ lh $v1, 0x64($s1)
/* 6BBDD4 80218244 106001BA */ beqz $v1, .L80218930
/* 6BBDD8 80218248 24020002 */ addiu $v0, $zero, 2
/* 6BBDDC 8021824C 86220064 */ lh $v0, 0x64($s1)
/* 6BBDE0 80218250 C622000C */ lwc1 $f2, 0xc($s1)
/* 6BBDE4 80218254 3C014049 */ lui $at, 0x4049
/* 6BBDE8 80218258 34210FD0 */ ori $at, $at, 0xfd0
/* 6BBDEC 8021825C 44810000 */ mtc1 $at, $f0
/* 6BBDF0 80218260 C6240000 */ lwc1 $f4, ($s1)
/* 6BBDF4 80218264 44823000 */ mtc1 $v0, $f6
/* 6BBDF8 80218268 00000000 */ nop
/* 6BBDFC 8021826C 468031A0 */ cvt.s.w $f6, $f6
/* 6BBE00 80218270 46060003 */ div.s $f0, $f0, $f6
/* 6BBE04 80218274 46041081 */ sub.s $f2, $f2, $f4
/* 6BBE08 80218278 E620003C */ swc1 $f0, 0x3c($s1)
/* 6BBE0C 8021827C 44830000 */ mtc1 $v1, $f0
/* 6BBE10 80218280 00000000 */ nop
/* 6BBE14 80218284 46800020 */ cvt.s.w $f0, $f0
/* 6BBE18 80218288 46001083 */ div.s $f2, $f2, $f0
/* 6BBE1C 8021828C C6200010 */ lwc1 $f0, 0x10($s1)
/* 6BBE20 80218290 E6220030 */ swc1 $f2, 0x30($s1)
/* 6BBE24 80218294 C6220004 */ lwc1 $f2, 4($s1)
/* 6BBE28 80218298 AE200044 */ sw $zero, 0x44($s1)
/* 6BBE2C 8021829C 46020001 */ sub.s $f0, $f0, $f2
/* 6BBE30 802182A0 C6240014 */ lwc1 $f4, 0x14($s1)
/* 6BBE34 802182A4 46003086 */ mov.s $f2, $f6
/* 6BBE38 802182A8 46020003 */ div.s $f0, $f0, $f2
/* 6BBE3C 802182AC E6200034 */ swc1 $f0, 0x34($s1)
/* 6BBE40 802182B0 46003006 */ mov.s $f0, $f6
/* 6BBE44 802182B4 46004003 */ div.s $f0, $f8, $f0
/* 6BBE48 802182B8 C6220008 */ lwc1 $f2, 8($s1)
/* 6BBE4C 802182BC 86220066 */ lh $v0, 0x66($s1)
/* 6BBE50 802182C0 46022101 */ sub.s $f4, $f4, $f2
/* 6BBE54 802182C4 C6220040 */ lwc1 $f2, 0x40($s1)
/* 6BBE58 802182C8 28420003 */ slti $v0, $v0, 3
/* 6BBE5C 802182CC 46001080 */ add.s $f2, $f2, $f0
/* 6BBE60 802182D0 46062103 */ div.s $f4, $f4, $f6
/* 6BBE64 802182D4 E6240038 */ swc1 $f4, 0x38($s1)
/* 6BBE68 802182D8 10400045 */ beqz $v0, .L802183F0
/* 6BBE6C 802182DC E6220040 */ swc1 $f2, 0x40($s1)
/* 6BBE70 802182E0 86220064 */ lh $v0, 0x64($s1)
/* 6BBE74 802182E4 24030168 */ addiu $v1, $zero, 0x168
/* 6BBE78 802182E8 14400002 */ bnez $v0, .L802182F4
/* 6BBE7C 802182EC 0062001A */ div $zero, $v1, $v0
/* 6BBE80 802182F0 0007000D */ break 7
.L802182F4:
/* 6BBE84 802182F4 2401FFFF */ addiu $at, $zero, -1
/* 6BBE88 802182F8 14410004 */ bne $v0, $at, .L8021830C
/* 6BBE8C 802182FC 3C018000 */ lui $at, 0x8000
/* 6BBE90 80218300 14610002 */ bne $v1, $at, .L8021830C
/* 6BBE94 80218304 00000000 */ nop
/* 6BBE98 80218308 0006000D */ break 6
.L8021830C:
/* 6BBE9C 8021830C 00001812 */ mflo $v1
/* 6BBEA0 80218310 C628004C */ lwc1 $f8, 0x4c($s1)
/* 6BBEA4 80218314 3C014034 */ lui $at, 0x4034
/* 6BBEA8 80218318 44811800 */ mtc1 $at, $f3
/* 6BBEAC 8021831C 44801000 */ mtc1 $zero, $f2
/* 6BBEB0 80218320 46004021 */ cvt.d.s $f0, $f8
/* 6BBEB4 80218324 46220001 */ sub.d $f0, $f0, $f2
/* 6BBEB8 80218328 3C014018 */ lui $at, 0x4018
/* 6BBEBC 8021832C 44811800 */ mtc1 $at, $f3
/* 6BBEC0 80218330 44801000 */ mtc1 $zero, $f2
/* 6BBEC4 80218334 46200220 */ cvt.s.d $f8, $f0
/* 6BBEC8 80218338 46004021 */ cvt.d.s $f0, $f8
/* 6BBECC 8021833C 46220003 */ div.d $f0, $f0, $f2
/* 6BBED0 80218340 46200220 */ cvt.s.d $f8, $f0
/* 6BBED4 80218344 3C018023 */ lui $at, %hi(D_80228400)
/* 6BBED8 80218348 D4228400 */ ldc1 $f2, %lo(D_80228400)($at)
/* 6BBEDC 8021834C 46004021 */ cvt.d.s $f0, $f8
/* 6BBEE0 80218350 46220000 */ add.d $f0, $f0, $f2
/* 6BBEE4 80218354 3C0142B4 */ lui $at, 0x42b4
/* 6BBEE8 80218358 44811000 */ mtc1 $at, $f2
/* 6BBEEC 8021835C 46200220 */ cvt.s.d $f8, $f0
/* 6BBEF0 80218360 44830000 */ mtc1 $v1, $f0
/* 6BBEF4 80218364 00000000 */ nop
/* 6BBEF8 80218368 46800020 */ cvt.s.w $f0, $f0
/* 6BBEFC 8021836C 86230066 */ lh $v1, 0x66($s1)
/* 6BBF00 80218370 24020002 */ addiu $v0, $zero, 2
/* 6BBF04 80218374 E6220024 */ swc1 $f2, 0x24($s1)
/* 6BBF08 80218378 E6280050 */ swc1 $f8, 0x50($s1)
/* 6BBF0C 8021837C 14620008 */ bne $v1, $v0, .L802183A0
/* 6BBF10 80218380 E6200028 */ swc1 $f0, 0x28($s1)
/* 6BBF14 80218384 3C018023 */ lui $at, %hi(D_80228408)
/* 6BBF18 80218388 D4228408 */ ldc1 $f2, %lo(D_80228408)($at)
/* 6BBF1C 8021838C 46004021 */ cvt.d.s $f0, $f8
/* 6BBF20 80218390 46220002 */ mul.d $f0, $f0, $f2
/* 6BBF24 80218394 00000000 */ nop
/* 6BBF28 80218398 46200020 */ cvt.s.d $f0, $f0
/* 6BBF2C 8021839C E6200050 */ swc1 $f0, 0x50($s1)
.L802183A0:
/* 6BBF30 802183A0 C62C0024 */ lwc1 $f12, 0x24($s1)
/* 6BBF34 802183A4 3C0140C9 */ lui $at, 0x40c9
/* 6BBF38 802183A8 34210FD0 */ ori $at, $at, 0xfd0
/* 6BBF3C 802183AC 44810000 */ mtc1 $at, $f0
/* 6BBF40 802183B0 C6340044 */ lwc1 $f20, 0x44($s1)
/* 6BBF44 802183B4 C636003C */ lwc1 $f22, 0x3c($s1)
/* 6BBF48 802183B8 AE200018 */ sw $zero, 0x18($s1)
/* 6BBF4C 802183BC 46006302 */ mul.s $f12, $f12, $f0
/* 6BBF50 802183C0 00000000 */ nop
/* 6BBF54 802183C4 AE20001C */ sw $zero, 0x1c($s1)
/* 6BBF58 802183C8 4600A521 */ cvt.d.s $f20, $f20
/* 6BBF5C 802183CC 3C0143B4 */ lui $at, 0x43b4
/* 6BBF60 802183D0 44810000 */ mtc1 $at, $f0
/* 6BBF64 802183D4 4600B5A1 */ cvt.d.s $f22, $f22
/* 6BBF68 802183D8 0C00A85B */ jal sin_rad
/* 6BBF6C 802183DC 46006303 */ div.s $f12, $f12, $f0
/* 6BBF70 802183E0 3C018023 */ lui $at, %hi(D_80228410)
/* 6BBF74 802183E4 D4228410 */ ldc1 $f2, %lo(D_80228410)($at)
/* 6BBF78 802183E8 08086140 */ j .L80218500
/* 6BBF7C 802183EC 46000021 */ cvt.d.s $f0, $f0
.L802183F0:
/* 6BBF80 802183F0 86220064 */ lh $v0, 0x64($s1)
/* 6BBF84 802183F4 24030168 */ addiu $v1, $zero, 0x168
/* 6BBF88 802183F8 14400002 */ bnez $v0, .L80218404
/* 6BBF8C 802183FC 0062001A */ div $zero, $v1, $v0
/* 6BBF90 80218400 0007000D */ break 7
.L80218404:
/* 6BBF94 80218404 2401FFFF */ addiu $at, $zero, -1
/* 6BBF98 80218408 14410004 */ bne $v0, $at, .L8021841C
/* 6BBF9C 8021840C 3C018000 */ lui $at, 0x8000
/* 6BBFA0 80218410 14610002 */ bne $v1, $at, .L8021841C
/* 6BBFA4 80218414 00000000 */ nop
/* 6BBFA8 80218418 0006000D */ break 6
.L8021841C:
/* 6BBFAC 8021841C 00001812 */ mflo $v1
/* 6BBFB0 80218420 C628004C */ lwc1 $f8, 0x4c($s1)
/* 6BBFB4 80218424 3C014034 */ lui $at, 0x4034
/* 6BBFB8 80218428 44811800 */ mtc1 $at, $f3
/* 6BBFBC 8021842C 44801000 */ mtc1 $zero, $f2
/* 6BBFC0 80218430 46004021 */ cvt.d.s $f0, $f8
/* 6BBFC4 80218434 46220001 */ sub.d $f0, $f0, $f2
/* 6BBFC8 80218438 3C014018 */ lui $at, 0x4018
/* 6BBFCC 8021843C 44811800 */ mtc1 $at, $f3
/* 6BBFD0 80218440 44801000 */ mtc1 $zero, $f2
/* 6BBFD4 80218444 46200220 */ cvt.s.d $f8, $f0
/* 6BBFD8 80218448 46004021 */ cvt.d.s $f0, $f8
/* 6BBFDC 8021844C 46220003 */ div.d $f0, $f0, $f2
/* 6BBFE0 80218450 46200220 */ cvt.s.d $f8, $f0
/* 6BBFE4 80218454 3C018023 */ lui $at, %hi(D_80228418)
/* 6BBFE8 80218458 D4228418 */ ldc1 $f2, %lo(D_80228418)($at)
/* 6BBFEC 8021845C 46004021 */ cvt.d.s $f0, $f8
/* 6BBFF0 80218460 46220000 */ add.d $f0, $f0, $f2
/* 6BBFF4 80218464 3C0142B4 */ lui $at, 0x42b4
/* 6BBFF8 80218468 44811000 */ mtc1 $at, $f2
/* 6BBFFC 8021846C 46200220 */ cvt.s.d $f8, $f0
/* 6BC000 80218470 44830000 */ mtc1 $v1, $f0
/* 6BC004 80218474 00000000 */ nop
/* 6BC008 80218478 46800020 */ cvt.s.w $f0, $f0
/* 6BC00C 8021847C 86230066 */ lh $v1, 0x66($s1)
/* 6BC010 80218480 24020004 */ addiu $v0, $zero, 4
/* 6BC014 80218484 E6220024 */ swc1 $f2, 0x24($s1)
/* 6BC018 80218488 E6280050 */ swc1 $f8, 0x50($s1)
/* 6BC01C 8021848C 14620009 */ bne $v1, $v0, .L802184B4
/* 6BC020 80218490 E6200028 */ swc1 $f0, 0x28($s1)
/* 6BC024 80218494 3C013FF4 */ lui $at, 0x3ff4
/* 6BC028 80218498 44811800 */ mtc1 $at, $f3
/* 6BC02C 8021849C 44801000 */ mtc1 $zero, $f2
/* 6BC030 802184A0 46004021 */ cvt.d.s $f0, $f8
/* 6BC034 802184A4 46220002 */ mul.d $f0, $f0, $f2
/* 6BC038 802184A8 00000000 */ nop
/* 6BC03C 802184AC 46200020 */ cvt.s.d $f0, $f0
/* 6BC040 802184B0 E6200050 */ swc1 $f0, 0x50($s1)
.L802184B4:
/* 6BC044 802184B4 C62C0024 */ lwc1 $f12, 0x24($s1)
/* 6BC048 802184B8 3C0140C9 */ lui $at, 0x40c9
/* 6BC04C 802184BC 34210FD0 */ ori $at, $at, 0xfd0
/* 6BC050 802184C0 44810000 */ mtc1 $at, $f0
/* 6BC054 802184C4 C6340044 */ lwc1 $f20, 0x44($s1)
/* 6BC058 802184C8 C636003C */ lwc1 $f22, 0x3c($s1)
/* 6BC05C 802184CC AE200018 */ sw $zero, 0x18($s1)
/* 6BC060 802184D0 46006302 */ mul.s $f12, $f12, $f0
/* 6BC064 802184D4 00000000 */ nop
/* 6BC068 802184D8 AE20001C */ sw $zero, 0x1c($s1)
/* 6BC06C 802184DC 4600A521 */ cvt.d.s $f20, $f20
/* 6BC070 802184E0 3C0143B4 */ lui $at, 0x43b4
/* 6BC074 802184E4 44810000 */ mtc1 $at, $f0
/* 6BC078 802184E8 4600B5A1 */ cvt.d.s $f22, $f22
/* 6BC07C 802184EC 0C00A85B */ jal sin_rad
/* 6BC080 802184F0 46006303 */ div.s $f12, $f12, $f0
/* 6BC084 802184F4 3C018023 */ lui $at, %hi(D_80228420)
/* 6BC088 802184F8 D4228420 */ ldc1 $f2, %lo(D_80228420)($at)
/* 6BC08C 802184FC 46000021 */ cvt.d.s $f0, $f0
.L80218500:
/* 6BC090 80218500 46220002 */ mul.d $f0, $f0, $f2
/* 6BC094 80218504 00000000 */ nop
/* 6BC098 80218508 46360002 */ mul.d $f0, $f0, $f22
/* 6BC09C 8021850C 00000000 */ nop
/* 6BC0A0 80218510 46360000 */ add.d $f0, $f0, $f22
/* 6BC0A4 80218514 4620A500 */ add.d $f20, $f20, $f0
/* 6BC0A8 80218518 4620A520 */ cvt.s.d $f20, $f20
/* 6BC0AC 8021851C E6340044 */ swc1 $f20, 0x44($s1)
/* 6BC0B0 80218520 2404FF81 */ addiu $a0, $zero, -0x7f
/* 6BC0B4 80218524 8E260058 */ lw $a2, 0x58($s1)
/* 6BC0B8 80218528 0C098F3F */ jal set_animation
/* 6BC0BC 8021852C 24050001 */ addiu $a1, $zero, 1
/* 6BC0C0 80218530 0C05272D */ jal play_sound
/* 6BC0C4 80218534 24042081 */ addiu $a0, $zero, 0x2081
/* 6BC0C8 80218538 24020001 */ addiu $v0, $zero, 1
/* 6BC0CC 8021853C AE820070 */ sw $v0, 0x70($s4)
.L80218540:
/* 6BC0D0 80218540 8E830070 */ lw $v1, 0x70($s4)
/* 6BC0D4 80218544 24020002 */ addiu $v0, $zero, 2
/* 6BC0D8 80218548 10620095 */ beq $v1, $v0, .L802187A0
/* 6BC0DC 8021854C 24020001 */ addiu $v0, $zero, 1
/* 6BC0E0 80218550 28620003 */ slti $v0, $v1, 3
/* 6BC0E4 80218554 10400005 */ beqz $v0, .L8021856C
/* 6BC0E8 80218558 24020001 */ addiu $v0, $zero, 1
/* 6BC0EC 8021855C 10620008 */ beq $v1, $v0, .L80218580
/* 6BC0F0 80218560 0000102D */ daddu $v0, $zero, $zero
/* 6BC0F4 80218564 0808624C */ j .L80218930
/* 6BC0F8 80218568 00000000 */ nop
.L8021856C:
/* 6BC0FC 8021856C 24020003 */ addiu $v0, $zero, 3
/* 6BC100 80218570 106200BA */ beq $v1, $v0, .L8021885C
/* 6BC104 80218574 0000102D */ daddu $v0, $zero, $zero
/* 6BC108 80218578 0808624C */ j .L80218930
/* 6BC10C 8021857C 00000000 */ nop
.L80218580:
/* 6BC110 80218580 C6220044 */ lwc1 $f2, 0x44($s1)
/* 6BC114 80218584 3C013FC9 */ lui $at, 0x3fc9
/* 6BC118 80218588 34210FD0 */ ori $at, $at, 0xfd0
/* 6BC11C 8021858C 44810000 */ mtc1 $at, $f0
/* 6BC120 80218590 00000000 */ nop
/* 6BC124 80218594 4602003C */ c.lt.s $f0, $f2
/* 6BC128 80218598 00000000 */ nop
/* 6BC12C 8021859C 45000004 */ bc1f .L802185B0
/* 6BC130 802185A0 2404FF81 */ addiu $a0, $zero, -0x7f
/* 6BC134 802185A4 8E26005C */ lw $a2, 0x5c($s1)
/* 6BC138 802185A8 0C098F3F */ jal set_animation
/* 6BC13C 802185AC 24050001 */ addiu $a1, $zero, 1
.L802185B0:
/* 6BC140 802185B0 C6260000 */ lwc1 $f6, ($s1)
/* 6BC144 802185B4 C6200030 */ lwc1 $f0, 0x30($s1)
/* 6BC148 802185B8 C6240004 */ lwc1 $f4, 4($s1)
/* 6BC14C 802185BC C6760144 */ lwc1 $f22, 0x144($s3)
/* 6BC150 802185C0 46003180 */ add.s $f6, $f6, $f0
/* 6BC154 802185C4 C6200034 */ lwc1 $f0, 0x34($s1)
/* 6BC158 802185C8 C6220038 */ lwc1 $f2, 0x38($s1)
/* 6BC15C 802185CC 46002100 */ add.s $f4, $f4, $f0
/* 6BC160 802185D0 C6200008 */ lwc1 $f0, 8($s1)
/* 6BC164 802185D4 C6740148 */ lwc1 $f20, 0x148($s3)
/* 6BC168 802185D8 46020000 */ add.s $f0, $f0, $f2
/* 6BC16C 802185DC E6260000 */ swc1 $f6, ($s1)
/* 6BC170 802185E0 E6240004 */ swc1 $f4, 4($s1)
/* 6BC174 802185E4 E6200008 */ swc1 $f0, 8($s1)
/* 6BC178 802185E8 C6600148 */ lwc1 $f0, 0x148($s3)
/* 6BC17C 802185EC 46003086 */ mov.s $f2, $f6
/* 6BC180 802185F0 E6200018 */ swc1 $f0, 0x18($s1)
/* 6BC184 802185F4 E6620144 */ swc1 $f2, 0x144($s3)
/* 6BC188 802185F8 0C00A85B */ jal sin_rad
/* 6BC18C 802185FC C62C0044 */ lwc1 $f12, 0x44($s1)
/* 6BC190 80218600 C6220050 */ lwc1 $f2, 0x50($s1)
/* 6BC194 80218604 46001082 */ mul.s $f2, $f2, $f0
/* 6BC198 80218608 00000000 */ nop
/* 6BC19C 8021860C C6200004 */ lwc1 $f0, 4($s1)
/* 6BC1A0 80218610 46020000 */ add.s $f0, $f0, $f2
/* 6BC1A4 80218614 E6600148 */ swc1 $f0, 0x148($s3)
/* 6BC1A8 80218618 C6200008 */ lwc1 $f0, 8($s1)
/* 6BC1AC 8021861C E660014C */ swc1 $f0, 0x14c($s3)
/* 6BC1B0 80218620 C6220010 */ lwc1 $f2, 0x10($s1)
/* 6BC1B4 80218624 C6600148 */ lwc1 $f0, 0x148($s3)
/* 6BC1B8 80218628 4602003C */ c.lt.s $f0, $f2
/* 6BC1BC 8021862C 00000000 */ nop
/* 6BC1C0 80218630 45000007 */ bc1f .L80218650
/* 6BC1C4 80218634 4600B306 */ mov.s $f12, $f22
/* 6BC1C8 80218638 86220064 */ lh $v0, 0x64($s1)
/* 6BC1CC 8021863C 28420003 */ slti $v0, $v0, 3
/* 6BC1D0 80218640 54400002 */ bnel $v0, $zero, .L8021864C
/* 6BC1D4 80218644 E6620148 */ swc1 $f2, 0x148($s3)
/* 6BC1D8 80218648 4600B306 */ mov.s $f12, $f22
.L8021864C:
/* 6BC1DC 8021864C C6600148 */ lwc1 $f0, 0x148($s3)
.L80218650:
/* 6BC1E0 80218650 8E660144 */ lw $a2, 0x144($s3)
/* 6BC1E4 80218654 46000007 */ neg.s $f0, $f0
/* 6BC1E8 80218658 44070000 */ mfc1 $a3, $f0
/* 6BC1EC 8021865C 0C00A720 */ jal atan2
/* 6BC1F0 80218660 4600A387 */ neg.s $f14, $f20
/* 6BC1F4 80218664 46000007 */ neg.s $f0, $f0
/* 6BC1F8 80218668 E6600164 */ swc1 $f0, 0x164($s3)
/* 6BC1FC 8021866C 86220066 */ lh $v0, 0x66($s1)
/* 6BC200 80218670 C6600148 */ lwc1 $f0, 0x148($s3)
/* 6BC204 80218674 28420003 */ slti $v0, $v0, 3
/* 6BC208 80218678 10400013 */ beqz $v0, .L802186C8
/* 6BC20C 8021867C E620001C */ swc1 $f0, 0x1c($s1)
/* 6BC210 80218680 C62C0024 */ lwc1 $f12, 0x24($s1)
/* 6BC214 80218684 3C0140C9 */ lui $at, 0x40c9
/* 6BC218 80218688 34210FD0 */ ori $at, $at, 0xfd0
/* 6BC21C 8021868C 44810000 */ mtc1 $at, $f0
/* 6BC220 80218690 C6340044 */ lwc1 $f20, 0x44($s1)
/* 6BC224 80218694 46006302 */ mul.s $f12, $f12, $f0
/* 6BC228 80218698 00000000 */ nop
/* 6BC22C 8021869C C636003C */ lwc1 $f22, 0x3c($s1)
/* 6BC230 802186A0 4600A521 */ cvt.d.s $f20, $f20
/* 6BC234 802186A4 3C0143B4 */ lui $at, 0x43b4
/* 6BC238 802186A8 44810000 */ mtc1 $at, $f0
/* 6BC23C 802186AC 4600B5A1 */ cvt.d.s $f22, $f22
/* 6BC240 802186B0 0C00A85B */ jal sin_rad
/* 6BC244 802186B4 46006303 */ div.s $f12, $f12, $f0
/* 6BC248 802186B8 3C018023 */ lui $at, %hi(D_80228428)
/* 6BC24C 802186BC D4228428 */ ldc1 $f2, %lo(D_80228428)($at)
/* 6BC250 802186C0 080861C3 */ j .L8021870C
/* 6BC254 802186C4 46000021 */ cvt.d.s $f0, $f0
.L802186C8:
/* 6BC258 802186C8 C62C0024 */ lwc1 $f12, 0x24($s1)
/* 6BC25C 802186CC 3C0140C9 */ lui $at, 0x40c9
/* 6BC260 802186D0 34210FD0 */ ori $at, $at, 0xfd0
/* 6BC264 802186D4 44810000 */ mtc1 $at, $f0
/* 6BC268 802186D8 C6340044 */ lwc1 $f20, 0x44($s1)
/* 6BC26C 802186DC 46006302 */ mul.s $f12, $f12, $f0
/* 6BC270 802186E0 00000000 */ nop
/* 6BC274 802186E4 C636003C */ lwc1 $f22, 0x3c($s1)
/* 6BC278 802186E8 4600A521 */ cvt.d.s $f20, $f20
/* 6BC27C 802186EC 3C0143B4 */ lui $at, 0x43b4
/* 6BC280 802186F0 44810000 */ mtc1 $at, $f0
/* 6BC284 802186F4 4600B5A1 */ cvt.d.s $f22, $f22
/* 6BC288 802186F8 0C00A85B */ jal sin_rad
/* 6BC28C 802186FC 46006303 */ div.s $f12, $f12, $f0
/* 6BC290 80218700 3C018023 */ lui $at, %hi(D_80228430)
/* 6BC294 80218704 D4228430 */ ldc1 $f2, %lo(D_80228430)($at)
/* 6BC298 80218708 46000021 */ cvt.d.s $f0, $f0
.L8021870C:
/* 6BC29C 8021870C 46220002 */ mul.d $f0, $f0, $f2
/* 6BC2A0 80218710 00000000 */ nop
/* 6BC2A4 80218714 46360002 */ mul.d $f0, $f0, $f22
/* 6BC2A8 80218718 00000000 */ nop
/* 6BC2AC 8021871C 46360000 */ add.d $f0, $f0, $f22
/* 6BC2B0 80218720 4620A500 */ add.d $f20, $f20, $f0
/* 6BC2B4 80218724 4620A520 */ cvt.s.d $f20, $f20
/* 6BC2B8 80218728 E6340044 */ swc1 $f20, 0x44($s1)
/* 6BC2BC 8021872C C62C0024 */ lwc1 $f12, 0x24($s1)
/* 6BC2C0 80218730 C6200028 */ lwc1 $f0, 0x28($s1)
/* 6BC2C4 80218734 46006300 */ add.s $f12, $f12, $f0
/* 6BC2C8 80218738 0C00A6C9 */ jal clamp_angle
/* 6BC2CC 8021873C E62C0024 */ swc1 $f12, 0x24($s1)
/* 6BC2D0 80218740 96220064 */ lhu $v0, 0x64($s1)
/* 6BC2D4 80218744 E6200024 */ swc1 $f0, 0x24($s1)
/* 6BC2D8 80218748 2442FFFF */ addiu $v0, $v0, -1
/* 6BC2DC 8021874C A6220064 */ sh $v0, 0x64($s1)
/* 6BC2E0 80218750 00021400 */ sll $v0, $v0, 0x10
/* 6BC2E4 80218754 14400076 */ bnez $v0, .L80218930
/* 6BC2E8 80218758 0000102D */ daddu $v0, $zero, $zero
/* 6BC2EC 8021875C C6200010 */ lwc1 $f0, 0x10($s1)
/* 6BC2F0 80218760 2404FF81 */ addiu $a0, $zero, -0x7f
/* 6BC2F4 80218764 E6600148 */ swc1 $f0, 0x148($s3)
/* 6BC2F8 80218768 C6200018 */ lwc1 $f0, 0x18($s1)
/* 6BC2FC 8021876C C622001C */ lwc1 $f2, 0x1c($s1)
/* 6BC300 80218770 8E260060 */ lw $a2, 0x60($s1)
/* 6BC304 80218774 46020001 */ sub.s $f0, $f0, $f2
/* 6BC308 80218778 3C013FE6 */ lui $at, 0x3fe6
/* 6BC30C 8021877C 34216666 */ ori $at, $at, 0x6666
/* 6BC310 80218780 44811000 */ mtc1 $at, $f2
/* 6BC314 80218784 24050001 */ addiu $a1, $zero, 1
/* 6BC318 80218788 E622003C */ swc1 $f2, 0x3c($s1)
/* 6BC31C 8021878C 46000007 */ neg.s $f0, $f0
/* 6BC320 80218790 0C098F3F */ jal set_animation
/* 6BC324 80218794 E6200044 */ swc1 $f0, 0x44($s1)
/* 6BC328 80218798 0808624C */ j .L80218930
/* 6BC32C 8021879C 24020001 */ addiu $v0, $zero, 1
.L802187A0:
/* 6BC330 802187A0 A6220064 */ sh $v0, 0x64($s1)
/* 6BC334 802187A4 86220064 */ lh $v0, 0x64($s1)
/* 6BC338 802187A8 24030168 */ addiu $v1, $zero, 0x168
/* 6BC33C 802187AC 14400002 */ bnez $v0, .L802187B8
/* 6BC340 802187B0 0062001A */ div $zero, $v1, $v0
/* 6BC344 802187B4 0007000D */ break 7
.L802187B8:
/* 6BC348 802187B8 2401FFFF */ addiu $at, $zero, -1
/* 6BC34C 802187BC 14410004 */ bne $v0, $at, .L802187D0
/* 6BC350 802187C0 3C018000 */ lui $at, 0x8000
/* 6BC354 802187C4 14610002 */ bne $v1, $at, .L802187D0
/* 6BC358 802187C8 00000000 */ nop
/* 6BC35C 802187CC 0006000D */ break 6
.L802187D0:
/* 6BC360 802187D0 00001812 */ mflo $v1
/* 6BC364 802187D4 C6220018 */ lwc1 $f2, 0x18($s1)
/* 6BC368 802187D8 C620001C */ lwc1 $f0, 0x1c($s1)
/* 6BC36C 802187DC 3C013FE6 */ lui $at, 0x3fe6
/* 6BC370 802187E0 34216666 */ ori $at, $at, 0x6666
/* 6BC374 802187E4 44814000 */ mtc1 $at, $f8
/* 6BC378 802187E8 C624001C */ lwc1 $f4, 0x1c($s1)
/* 6BC37C 802187EC 46001081 */ sub.s $f2, $f2, $f0
/* 6BC380 802187F0 C6200018 */ lwc1 $f0, 0x18($s1)
/* 6BC384 802187F4 3C0142B4 */ lui $at, 0x42b4
/* 6BC388 802187F8 44813000 */ mtc1 $at, $f6
/* 6BC38C 802187FC 46040001 */ sub.s $f0, $f0, $f4
/* 6BC390 80218800 E628003C */ swc1 $f8, 0x3c($s1)
/* 6BC394 80218804 E6260024 */ swc1 $f6, 0x24($s1)
/* 6BC398 80218808 46001087 */ neg.s $f2, $f2
/* 6BC39C 8021880C E6220044 */ swc1 $f2, 0x44($s1)
/* 6BC3A0 80218810 3C018023 */ lui $at, %hi(D_80228438)
/* 6BC3A4 80218814 D4228438 */ ldc1 $f2, %lo(D_80228438)($at)
/* 6BC3A8 80218818 46000005 */ abs.s $f0, $f0
/* 6BC3AC 8021881C 46000021 */ cvt.d.s $f0, $f0
/* 6BC3B0 80218820 46220003 */ div.d $f0, $f0, $f2
/* 6BC3B4 80218824 46200020 */ cvt.s.d $f0, $f0
/* 6BC3B8 80218828 E6200050 */ swc1 $f0, 0x50($s1)
/* 6BC3BC 8021882C 44830000 */ mtc1 $v1, $f0
/* 6BC3C0 80218830 00000000 */ nop
/* 6BC3C4 80218834 46800020 */ cvt.s.w $f0, $f0
/* 6BC3C8 80218838 E6200028 */ swc1 $f0, 0x28($s1)
/* 6BC3CC 8021883C C6600144 */ lwc1 $f0, 0x144($s3)
/* 6BC3D0 80218840 E6200000 */ swc1 $f0, ($s1)
/* 6BC3D4 80218844 C6600148 */ lwc1 $f0, 0x148($s3)
/* 6BC3D8 80218848 E6200004 */ swc1 $f0, 4($s1)
/* 6BC3DC 8021884C C660014C */ lwc1 $f0, 0x14c($s3)
/* 6BC3E0 80218850 24020003 */ addiu $v0, $zero, 3
/* 6BC3E4 80218854 E6200008 */ swc1 $f0, 8($s1)
/* 6BC3E8 80218858 AE820070 */ sw $v0, 0x70($s4)
.L8021885C:
/* 6BC3EC 8021885C C62C0024 */ lwc1 $f12, 0x24($s1)
/* 6BC3F0 80218860 3C0140C9 */ lui $at, 0x40c9
/* 6BC3F4 80218864 34210FD0 */ ori $at, $at, 0xfd0
/* 6BC3F8 80218868 4481B000 */ mtc1 $at, $f22
/* 6BC3FC 8021886C 00000000 */ nop
/* 6BC400 80218870 46166302 */ mul.s $f12, $f12, $f22
/* 6BC404 80218874 00000000 */ nop
/* 6BC408 80218878 C6340000 */ lwc1 $f20, ($s1)
/* 6BC40C 8021887C 3C0143B4 */ lui $at, 0x43b4
/* 6BC410 80218880 4481C000 */ mtc1 $at, $f24
/* 6BC414 80218884 4600A521 */ cvt.d.s $f20, $f20
/* 6BC418 80218888 0C00A85B */ jal sin_rad
/* 6BC41C 8021888C 46186303 */ div.s $f12, $f12, $f24
/* 6BC420 80218890 C6220050 */ lwc1 $f2, 0x50($s1)
/* 6BC424 80218894 46001082 */ mul.s $f2, $f2, $f0
/* 6BC428 80218898 00000000 */ nop
/* 6BC42C 8021889C C62C0024 */ lwc1 $f12, 0x24($s1)
/* 6BC430 802188A0 46166302 */ mul.s $f12, $f12, $f22
/* 6BC434 802188A4 00000000 */ nop
/* 6BC438 802188A8 3C018023 */ lui $at, %hi(D_80228440)
/* 6BC43C 802188AC D4208440 */ ldc1 $f0, %lo(D_80228440)($at)
/* 6BC440 802188B0 460010A1 */ cvt.d.s $f2, $f2
/* 6BC444 802188B4 46201083 */ div.d $f2, $f2, $f0
/* 6BC448 802188B8 4622A500 */ add.d $f20, $f20, $f2
/* 6BC44C 802188BC 46186303 */ div.s $f12, $f12, $f24
/* 6BC450 802188C0 4620A520 */ cvt.s.d $f20, $f20
/* 6BC454 802188C4 0C00A85B */ jal sin_rad
/* 6BC458 802188C8 E6340000 */ swc1 $f20, ($s1)
/* 6BC45C 802188CC C6220050 */ lwc1 $f2, 0x50($s1)
/* 6BC460 802188D0 46001082 */ mul.s $f2, $f2, $f0
/* 6BC464 802188D4 00000000 */ nop
/* 6BC468 802188D8 C62C0024 */ lwc1 $f12, 0x24($s1)
/* 6BC46C 802188DC C6200028 */ lwc1 $f0, 0x28($s1)
/* 6BC470 802188E0 46006300 */ add.s $f12, $f12, $f0
/* 6BC474 802188E4 C6200004 */ lwc1 $f0, 4($s1)
/* 6BC478 802188E8 46020001 */ sub.s $f0, $f0, $f2
/* 6BC47C 802188EC E62C0024 */ swc1 $f12, 0x24($s1)
/* 6BC480 802188F0 0C00A6C9 */ jal clamp_angle
/* 6BC484 802188F4 E6200004 */ swc1 $f0, 4($s1)
/* 6BC488 802188F8 C6220000 */ lwc1 $f2, ($s1)
/* 6BC48C 802188FC E6200024 */ swc1 $f0, 0x24($s1)
/* 6BC490 80218900 E6620144 */ swc1 $f2, 0x144($s3)
/* 6BC494 80218904 C6200004 */ lwc1 $f0, 4($s1)
/* 6BC498 80218908 E6600148 */ swc1 $f0, 0x148($s3)
/* 6BC49C 8021890C C6200008 */ lwc1 $f0, 8($s1)
/* 6BC4A0 80218910 E660014C */ swc1 $f0, 0x14c($s3)
/* 6BC4A4 80218914 96230064 */ lhu $v1, 0x64($s1)
/* 6BC4A8 80218918 2463FFFF */ addiu $v1, $v1, -1
/* 6BC4AC 8021891C A6230064 */ sh $v1, 0x64($s1)
/* 6BC4B0 80218920 00031C00 */ sll $v1, $v1, 0x10
/* 6BC4B4 80218924 10600002 */ beqz $v1, .L80218930
/* 6BC4B8 80218928 24020001 */ addiu $v0, $zero, 1
/* 6BC4BC 8021892C 0000102D */ daddu $v0, $zero, $zero
.L80218930:
/* 6BC4C0 80218930 8FBF0024 */ lw $ra, 0x24($sp)
/* 6BC4C4 80218934 8FB40020 */ lw $s4, 0x20($sp)
/* 6BC4C8 80218938 8FB3001C */ lw $s3, 0x1c($sp)
/* 6BC4CC 8021893C 8FB20018 */ lw $s2, 0x18($sp)
/* 6BC4D0 80218940 8FB10014 */ lw $s1, 0x14($sp)
/* 6BC4D4 80218944 8FB00010 */ lw $s0, 0x10($sp)
/* 6BC4D8 80218948 D7BA0040 */ ldc1 $f26, 0x40($sp)
/* 6BC4DC 8021894C D7B80038 */ ldc1 $f24, 0x38($sp)
/* 6BC4E0 80218950 D7B60030 */ ldc1 $f22, 0x30($sp)
/* 6BC4E4 80218954 D7B40028 */ ldc1 $f20, 0x28($sp)
/* 6BC4E8 80218958 03E00008 */ jr $ra
/* 6BC4EC 8021895C 27BD0048 */ addiu $sp, $sp, 0x48