.set noat # allow manual use of $at .set noreorder # don't insert nops after branches glabel func_80218000_63D1E0 /* 63D1E0 80218000 27BDFF48 */ addiu $sp, $sp, -0xb8 /* 63D1E4 80218004 AFB20088 */ sw $s2, 0x88($sp) /* 63D1E8 80218008 0080902D */ daddu $s2, $a0, $zero /* 63D1EC 8021800C AFBF0098 */ sw $ra, 0x98($sp) /* 63D1F0 80218010 AFB50094 */ sw $s5, 0x94($sp) /* 63D1F4 80218014 AFB40090 */ sw $s4, 0x90($sp) /* 63D1F8 80218018 AFB3008C */ sw $s3, 0x8c($sp) /* 63D1FC 8021801C AFB10084 */ sw $s1, 0x84($sp) /* 63D200 80218020 AFB00080 */ sw $s0, 0x80($sp) /* 63D204 80218024 F7B800B0 */ sdc1 $f24, 0xb0($sp) /* 63D208 80218028 F7B600A8 */ sdc1 $f22, 0xa8($sp) /* 63D20C 8021802C F7B400A0 */ sdc1 $f20, 0xa0($sp) /* 63D210 80218030 8E440148 */ lw $a0, 0x148($s2) /* 63D214 80218034 0C09A75B */ jal get_actor /* 63D218 80218038 00A0802D */ daddu $s0, $a1, $zero /* 63D21C 8021803C 0040202D */ daddu $a0, $v0, $zero /* 63D220 80218040 0C099117 */ jal get_actor_part /* 63D224 80218044 24050001 */ addiu $a1, $zero, 1 /* 63D228 80218048 1200000E */ beqz $s0, .L80218084 /* 63D22C 8021804C 0040A02D */ daddu $s4, $v0, $zero /* 63D230 80218050 0000282D */ daddu $a1, $zero, $zero /* 63D234 80218054 24060011 */ addiu $a2, $zero, 0x11 /* 63D238 80218058 240200FF */ addiu $v0, $zero, 0xff /* 63D23C 8021805C AE400074 */ sw $zero, 0x74($s2) /* 63D240 80218060 AE400078 */ sw $zero, 0x78($s2) /* 63D244 80218064 AE400070 */ sw $zero, 0x70($s2) /* 63D248 80218068 AFA00010 */ sw $zero, 0x10($sp) /* 63D24C 8021806C AFA00014 */ sw $zero, 0x14($sp) /* 63D250 80218070 AFA20018 */ sw $v0, 0x18($sp) /* 63D254 80218074 AFA0001C */ sw $zero, 0x1c($sp) /* 63D258 80218078 8E840084 */ lw $a0, 0x84($s4) /* 63D25C 8021807C 0C0B79E0 */ jal func_802DE780 /* 63D260 80218080 24070014 */ addiu $a3, $zero, 0x14 .L80218084: /* 63D264 80218084 24050001 */ addiu $a1, $zero, 1 /* 63D268 80218088 240200FF */ addiu $v0, $zero, 0xff /* 63D26C 8021808C AFA20010 */ sw $v0, 0x10($sp) /* 63D270 80218090 AFA00014 */ sw $zero, 0x14($sp) /* 63D274 80218094 AFA20018 */ sw $v0, 0x18($sp) /* 63D278 80218098 AFA0001C */ sw $zero, 0x1c($sp) /* 63D27C 8021809C 8E840084 */ lw $a0, 0x84($s4) /* 63D280 802180A0 3C078022 */ lui $a3, %hi(D_8021A2B8) /* 63D284 802180A4 24E7A2B8 */ addiu $a3, $a3, %lo(D_8021A2B8) /* 63D288 802180A8 0C0B79E0 */ jal func_802DE780 /* 63D28C 802180AC 2406000F */ addiu $a2, $zero, 0xf /* 63D290 802180B0 8E420074 */ lw $v0, 0x74($s2) /* 63D294 802180B4 2444000A */ addiu $a0, $v0, 0xa /* 63D298 802180B8 28820168 */ slti $v0, $a0, 0x168 /* 63D29C 802180BC 14400010 */ bnez $v0, .L80218100 /* 63D2A0 802180C0 AE440074 */ sw $a0, 0x74($s2) /* 63D2A4 802180C4 3C02B60B */ lui $v0, 0xb60b /* 63D2A8 802180C8 344260B7 */ ori $v0, $v0, 0x60b7 /* 63D2AC 802180CC 00820018 */ mult $a0, $v0 /* 63D2B0 802180D0 00041FC3 */ sra $v1, $a0, 0x1f /* 63D2B4 802180D4 00004010 */ mfhi $t0 /* 63D2B8 802180D8 01041021 */ addu $v0, $t0, $a0 /* 63D2BC 802180DC 00021203 */ sra $v0, $v0, 8 /* 63D2C0 802180E0 00431023 */ subu $v0, $v0, $v1 /* 63D2C4 802180E4 00021840 */ sll $v1, $v0, 1 /* 63D2C8 802180E8 00621821 */ addu $v1, $v1, $v0 /* 63D2CC 802180EC 00031100 */ sll $v0, $v1, 4 /* 63D2D0 802180F0 00431023 */ subu $v0, $v0, $v1 /* 63D2D4 802180F4 000210C0 */ sll $v0, $v0, 3 /* 63D2D8 802180F8 00821023 */ subu $v0, $a0, $v0 /* 63D2DC 802180FC AE420074 */ sw $v0, 0x74($s2) .L80218100: /* 63D2E0 80218100 0000802D */ daddu $s0, $zero, $zero /* 63D2E4 80218104 3C138000 */ lui $s3, 0x8000 /* 63D2E8 80218108 0200882D */ daddu $s1, $s0, $zero /* 63D2EC 8021810C 3C013FF0 */ lui $at, 0x3ff0 /* 63D2F0 80218110 4481C800 */ mtc1 $at, $f25 /* 63D2F4 80218114 4480C000 */ mtc1 $zero, $f24 /* 63D2F8 80218118 3C01404C */ lui $at, 0x404c /* 63D2FC 8021811C 4481B800 */ mtc1 $at, $f23 /* 63D300 80218120 4480B000 */ mtc1 $zero, $f22 /* 63D304 80218124 3C0141E0 */ lui $at, 0x41e0 /* 63D308 80218128 4481A800 */ mtc1 $at, $f21 /* 63D30C 8021812C 4480A000 */ mtc1 $zero, $f20 .L80218130: /* 63D310 80218130 96440076 */ lhu $a0, 0x76($s2) /* 63D314 80218134 00912021 */ addu $a0, $a0, $s1 /* 63D318 80218138 00042400 */ sll $a0, $a0, 0x10 /* 63D31C 8021813C 0C00A4F5 */ jal cosine /* 63D320 80218140 00042403 */ sra $a0, $a0, 0x10 /* 63D324 80218144 46000021 */ cvt.d.s $f0, $f0 /* 63D328 80218148 46380000 */ add.d $f0, $f0, $f24 /* 63D32C 8021814C 46360002 */ mul.d $f0, $f0, $f22 /* 63D330 80218150 00000000 */ nop /* 63D334 80218154 27A20020 */ addiu $v0, $sp, 0x20 /* 63D338 80218158 4620A03E */ c.le.d $f20, $f0 /* 63D33C 8021815C 00000000 */ nop /* 63D340 80218160 45010005 */ bc1t .L80218178 /* 63D344 80218164 00501021 */ addu $v0, $v0, $s0 /* 63D348 80218168 4620008D */ trunc.w.d $f2, $f0 /* 63D34C 8021816C 44031000 */ mfc1 $v1, $f2 /* 63D350 80218170 08086064 */ j .L80218190 /* 63D354 80218174 A0430000 */ sb $v1, ($v0) .L80218178: /* 63D358 80218178 46340001 */ sub.d $f0, $f0, $f20 /* 63D35C 8021817C 4620008D */ trunc.w.d $f2, $f0 /* 63D360 80218180 44031000 */ mfc1 $v1, $f2 /* 63D364 80218184 00000000 */ nop /* 63D368 80218188 00731825 */ or $v1, $v1, $s3 /* 63D36C 8021818C A0430000 */ sb $v1, ($v0) .L80218190: /* 63D370 80218190 96440076 */ lhu $a0, 0x76($s2) /* 63D374 80218194 00912021 */ addu $a0, $a0, $s1 /* 63D378 80218198 2484002D */ addiu $a0, $a0, 0x2d /* 63D37C 8021819C 00042400 */ sll $a0, $a0, 0x10 /* 63D380 802181A0 0C00A4F5 */ jal cosine /* 63D384 802181A4 00042403 */ sra $a0, $a0, 0x10 /* 63D388 802181A8 46000021 */ cvt.d.s $f0, $f0 /* 63D38C 802181AC 46380000 */ add.d $f0, $f0, $f24 /* 63D390 802181B0 46360002 */ mul.d $f0, $f0, $f22 /* 63D394 802181B4 00000000 */ nop /* 63D398 802181B8 27A20038 */ addiu $v0, $sp, 0x38 /* 63D39C 802181BC 4620A03E */ c.le.d $f20, $f0 /* 63D3A0 802181C0 00000000 */ nop /* 63D3A4 802181C4 45010005 */ bc1t .L802181DC /* 63D3A8 802181C8 00501021 */ addu $v0, $v0, $s0 /* 63D3AC 802181CC 4620008D */ trunc.w.d $f2, $f0 /* 63D3B0 802181D0 44031000 */ mfc1 $v1, $f2 /* 63D3B4 802181D4 0808607D */ j .L802181F4 /* 63D3B8 802181D8 A0430000 */ sb $v1, ($v0) .L802181DC: /* 63D3BC 802181DC 46340001 */ sub.d $f0, $f0, $f20 /* 63D3C0 802181E0 4620008D */ trunc.w.d $f2, $f0 /* 63D3C4 802181E4 44031000 */ mfc1 $v1, $f2 /* 63D3C8 802181E8 00000000 */ nop /* 63D3CC 802181EC 00731825 */ or $v1, $v1, $s3 /* 63D3D0 802181F0 A0430000 */ sb $v1, ($v0) .L802181F4: /* 63D3D4 802181F4 96440076 */ lhu $a0, 0x76($s2) /* 63D3D8 802181F8 00912021 */ addu $a0, $a0, $s1 /* 63D3DC 802181FC 2484005A */ addiu $a0, $a0, 0x5a /* 63D3E0 80218200 00042400 */ sll $a0, $a0, 0x10 /* 63D3E4 80218204 0C00A4F5 */ jal cosine /* 63D3E8 80218208 00042403 */ sra $a0, $a0, 0x10 /* 63D3EC 8021820C 46000021 */ cvt.d.s $f0, $f0 /* 63D3F0 80218210 46380000 */ add.d $f0, $f0, $f24 /* 63D3F4 80218214 46360002 */ mul.d $f0, $f0, $f22 /* 63D3F8 80218218 00000000 */ nop /* 63D3FC 8021821C 27A20050 */ addiu $v0, $sp, 0x50 /* 63D400 80218220 4620A03E */ c.le.d $f20, $f0 /* 63D404 80218224 00000000 */ nop /* 63D408 80218228 45010005 */ bc1t .L80218240 /* 63D40C 8021822C 00501021 */ addu $v0, $v0, $s0 /* 63D410 80218230 4620008D */ trunc.w.d $f2, $f0 /* 63D414 80218234 44031000 */ mfc1 $v1, $f2 /* 63D418 80218238 08086096 */ j .L80218258 /* 63D41C 8021823C A0430000 */ sb $v1, ($v0) .L80218240: /* 63D420 80218240 46340001 */ sub.d $f0, $f0, $f20 /* 63D424 80218244 4620008D */ trunc.w.d $f2, $f0 /* 63D428 80218248 44031000 */ mfc1 $v1, $f2 /* 63D42C 8021824C 00000000 */ nop /* 63D430 80218250 00731825 */ or $v1, $v1, $s3 /* 63D434 80218254 A0430000 */ sb $v1, ($v0) .L80218258: /* 63D438 80218258 26100001 */ addiu $s0, $s0, 1 /* 63D43C 8021825C 2A020014 */ slti $v0, $s0, 0x14 /* 63D440 80218260 1440FFB3 */ bnez $v0, .L80218130 /* 63D444 80218264 26310019 */ addiu $s1, $s1, 0x19 /* 63D448 80218268 0000802D */ daddu $s0, $zero, $zero /* 63D44C 8021826C 27B30020 */ addiu $s3, $sp, 0x20 /* 63D450 80218270 27B20038 */ addiu $s2, $sp, 0x38 /* 63D454 80218274 27B10050 */ addiu $s1, $sp, 0x50 /* 63D458 80218278 241500FF */ addiu $s5, $zero, 0xff /* 63D45C 8021827C 0000282D */ daddu $a1, $zero, $zero .L80218280: /* 63D460 80218280 2406000C */ addiu $a2, $zero, 0xc /* 63D464 80218284 02701021 */ addu $v0, $s3, $s0 /* 63D468 80218288 02501821 */ addu $v1, $s2, $s0 /* 63D46C 8021828C 02302021 */ addu $a0, $s1, $s0 /* 63D470 80218290 90420000 */ lbu $v0, ($v0) /* 63D474 80218294 90630000 */ lbu $v1, ($v1) /* 63D478 80218298 90840000 */ lbu $a0, ($a0) /* 63D47C 8021829C 0200382D */ daddu $a3, $s0, $zero /* 63D480 802182A0 AFA00014 */ sw $zero, 0x14($sp) /* 63D484 802182A4 AFB50018 */ sw $s5, 0x18($sp) /* 63D488 802182A8 AFA0001C */ sw $zero, 0x1c($sp) /* 63D48C 802182AC 00021600 */ sll $v0, $v0, 0x18 /* 63D490 802182B0 00031C00 */ sll $v1, $v1, 0x10 /* 63D494 802182B4 00431025 */ or $v0, $v0, $v1 /* 63D498 802182B8 00042200 */ sll $a0, $a0, 8 /* 63D49C 802182BC 00441025 */ or $v0, $v0, $a0 /* 63D4A0 802182C0 344200FF */ ori $v0, $v0, 0xff /* 63D4A4 802182C4 AFA20010 */ sw $v0, 0x10($sp) /* 63D4A8 802182C8 8E840084 */ lw $a0, 0x84($s4) /* 63D4AC 802182CC 0C0B79E0 */ jal func_802DE780 /* 63D4B0 802182D0 26100001 */ addiu $s0, $s0, 1 /* 63D4B4 802182D4 2A020014 */ slti $v0, $s0, 0x14 /* 63D4B8 802182D8 1440FFE9 */ bnez $v0, .L80218280 /* 63D4BC 802182DC 0000282D */ daddu $a1, $zero, $zero /* 63D4C0 802182E0 8FBF0098 */ lw $ra, 0x98($sp) /* 63D4C4 802182E4 8FB50094 */ lw $s5, 0x94($sp) /* 63D4C8 802182E8 8FB40090 */ lw $s4, 0x90($sp) /* 63D4CC 802182EC 8FB3008C */ lw $s3, 0x8c($sp) /* 63D4D0 802182F0 8FB20088 */ lw $s2, 0x88($sp) /* 63D4D4 802182F4 8FB10084 */ lw $s1, 0x84($sp) /* 63D4D8 802182F8 8FB00080 */ lw $s0, 0x80($sp) /* 63D4DC 802182FC D7B800B0 */ ldc1 $f24, 0xb0($sp) /* 63D4E0 80218300 D7B600A8 */ ldc1 $f22, 0xa8($sp) /* 63D4E4 80218304 D7B400A0 */ ldc1 $f20, 0xa0($sp) /* 63D4E8 80218308 0000102D */ daddu $v0, $zero, $zero /* 63D4EC 8021830C 03E00008 */ jr $ra /* 63D4F0 80218310 27BD00B8 */ addiu $sp, $sp, 0xb8