.set noat # allow manual use of $at .set noreorder # don't insert nops after branches glabel func_80218F58_6A0158 /* 6A0158 80218F58 27BDFF58 */ addiu $sp, $sp, -0xa8 /* 6A015C 80218F5C AFB30074 */ sw $s3, 0x74($sp) /* 6A0160 80218F60 0080982D */ daddu $s3, $a0, $zero /* 6A0164 80218F64 AFBF0088 */ sw $ra, 0x88($sp) /* 6A0168 80218F68 AFB70084 */ sw $s7, 0x84($sp) /* 6A016C 80218F6C AFB60080 */ sw $s6, 0x80($sp) /* 6A0170 80218F70 AFB5007C */ sw $s5, 0x7c($sp) /* 6A0174 80218F74 AFB40078 */ sw $s4, 0x78($sp) /* 6A0178 80218F78 AFB20070 */ sw $s2, 0x70($sp) /* 6A017C 80218F7C AFB1006C */ sw $s1, 0x6c($sp) /* 6A0180 80218F80 AFB00068 */ sw $s0, 0x68($sp) /* 6A0184 80218F84 F7B800A0 */ sdc1 $f24, 0xa0($sp) /* 6A0188 80218F88 F7B60098 */ sdc1 $f22, 0x98($sp) /* 6A018C 80218F8C F7B40090 */ sdc1 $f20, 0x90($sp) /* 6A0190 80218F90 8E640148 */ lw $a0, 0x148($s3) /* 6A0194 80218F94 0C09A75B */ jal get_actor /* 6A0198 80218F98 00A0802D */ daddu $s0, $a1, $zero /* 6A019C 80218F9C 14400003 */ bnez $v0, .L80218FAC /* 6A01A0 80218FA0 0040202D */ daddu $a0, $v0, $zero /* 6A01A4 80218FA4 080864B1 */ j .L802192C4 /* 6A01A8 80218FA8 24020002 */ addiu $v0, $zero, 2 .L80218FAC: /* 6A01AC 80218FAC 0C099117 */ jal get_actor_part /* 6A01B0 80218FB0 24050001 */ addiu $a1, $zero, 1 /* 6A01B4 80218FB4 12000013 */ beqz $s0, .L80219004 /* 6A01B8 80218FB8 0040A82D */ daddu $s5, $v0, $zero /* 6A01BC 80218FBC 0000802D */ daddu $s0, $zero, $zero /* 6A01C0 80218FC0 241100FF */ addiu $s1, $zero, 0xff /* 6A01C4 80218FC4 AE600074 */ sw $zero, 0x74($s3) /* 6A01C8 80218FC8 AE600078 */ sw $zero, 0x78($s3) /* 6A01CC 80218FCC AE600070 */ sw $zero, 0x70($s3) /* 6A01D0 80218FD0 0200282D */ daddu $a1, $s0, $zero .L80218FD4: /* 6A01D4 80218FD4 24060011 */ addiu $a2, $zero, 0x11 /* 6A01D8 80218FD8 24070014 */ addiu $a3, $zero, 0x14 /* 6A01DC 80218FDC AFA00010 */ sw $zero, 0x10($sp) /* 6A01E0 80218FE0 AFA00014 */ sw $zero, 0x14($sp) /* 6A01E4 80218FE4 AFB10018 */ sw $s1, 0x18($sp) /* 6A01E8 80218FE8 AFA0001C */ sw $zero, 0x1c($sp) /* 6A01EC 80218FEC 8EA40084 */ lw $a0, 0x84($s5) /* 6A01F0 80218FF0 0C0B79E0 */ jal func_802DE780 /* 6A01F4 80218FF4 26100001 */ addiu $s0, $s0, 1 /* 6A01F8 80218FF8 2A02000A */ slti $v0, $s0, 0xa /* 6A01FC 80218FFC 1440FFF5 */ bnez $v0, .L80218FD4 /* 6A0200 80219000 0200282D */ daddu $a1, $s0, $zero .L80219004: /* 6A0204 80219004 8E620074 */ lw $v0, 0x74($s3) /* 6A0208 80219008 2444000A */ addiu $a0, $v0, 0xa /* 6A020C 8021900C 28820168 */ slti $v0, $a0, 0x168 /* 6A0210 80219010 14400010 */ bnez $v0, .L80219054 /* 6A0214 80219014 AE640074 */ sw $a0, 0x74($s3) /* 6A0218 80219018 3C02B60B */ lui $v0, 0xb60b /* 6A021C 8021901C 344260B7 */ ori $v0, $v0, 0x60b7 /* 6A0220 80219020 00820018 */ mult $a0, $v0 /* 6A0224 80219024 00041FC3 */ sra $v1, $a0, 0x1f /* 6A0228 80219028 00004010 */ mfhi $t0 /* 6A022C 8021902C 01041021 */ addu $v0, $t0, $a0 /* 6A0230 80219030 00021203 */ sra $v0, $v0, 8 /* 6A0234 80219034 00431023 */ subu $v0, $v0, $v1 /* 6A0238 80219038 00021840 */ sll $v1, $v0, 1 /* 6A023C 8021903C 00621821 */ addu $v1, $v1, $v0 /* 6A0240 80219040 00031100 */ sll $v0, $v1, 4 /* 6A0244 80219044 00431023 */ subu $v0, $v0, $v1 /* 6A0248 80219048 000210C0 */ sll $v0, $v0, 3 /* 6A024C 8021904C 00821023 */ subu $v0, $a0, $v0 /* 6A0250 80219050 AE620074 */ sw $v0, 0x74($s3) .L80219054: /* 6A0254 80219054 0000882D */ daddu $s1, $zero, $zero /* 6A0258 80219058 3C128000 */ lui $s2, 0x8000 /* 6A025C 8021905C 0220802D */ daddu $s0, $s1, $zero /* 6A0260 80219060 3C013FF0 */ lui $at, 0x3ff0 /* 6A0264 80219064 4481C800 */ mtc1 $at, $f25 /* 6A0268 80219068 4480C000 */ mtc1 $zero, $f24 /* 6A026C 8021906C 3C01404C */ lui $at, 0x404c /* 6A0270 80219070 4481B800 */ mtc1 $at, $f23 /* 6A0274 80219074 4480B000 */ mtc1 $zero, $f22 /* 6A0278 80219078 3C0141E0 */ lui $at, 0x41e0 /* 6A027C 8021907C 4481A800 */ mtc1 $at, $f21 /* 6A0280 80219080 4480A000 */ mtc1 $zero, $f20 .L80219084: /* 6A0284 80219084 96640076 */ lhu $a0, 0x76($s3) /* 6A0288 80219088 00902021 */ addu $a0, $a0, $s0 /* 6A028C 8021908C 24840078 */ addiu $a0, $a0, 0x78 /* 6A0290 80219090 00042400 */ sll $a0, $a0, 0x10 /* 6A0294 80219094 0C00A4F5 */ jal cosine /* 6A0298 80219098 00042403 */ sra $a0, $a0, 0x10 /* 6A029C 8021909C 46000021 */ cvt.d.s $f0, $f0 /* 6A02A0 802190A0 46380000 */ add.d $f0, $f0, $f24 /* 6A02A4 802190A4 46360002 */ mul.d $f0, $f0, $f22 /* 6A02A8 802190A8 00000000 */ nop /* 6A02AC 802190AC 27A20020 */ addiu $v0, $sp, 0x20 /* 6A02B0 802190B0 4620A03E */ c.le.d $f20, $f0 /* 6A02B4 802190B4 00000000 */ nop /* 6A02B8 802190B8 45010005 */ bc1t .L802190D0 /* 6A02BC 802190BC 00511021 */ addu $v0, $v0, $s1 /* 6A02C0 802190C0 4620008D */ trunc.w.d $f2, $f0 /* 6A02C4 802190C4 44031000 */ mfc1 $v1, $f2 /* 6A02C8 802190C8 0808643A */ j .L802190E8 /* 6A02CC 802190CC A0430000 */ sb $v1, ($v0) .L802190D0: /* 6A02D0 802190D0 46340001 */ sub.d $f0, $f0, $f20 /* 6A02D4 802190D4 4620008D */ trunc.w.d $f2, $f0 /* 6A02D8 802190D8 44031000 */ mfc1 $v1, $f2 /* 6A02DC 802190DC 00000000 */ nop /* 6A02E0 802190E0 00721825 */ or $v1, $v1, $s2 /* 6A02E4 802190E4 A0430000 */ sb $v1, ($v0) .L802190E8: /* 6A02E8 802190E8 96640076 */ lhu $a0, 0x76($s3) /* 6A02EC 802190EC 00902021 */ addu $a0, $a0, $s0 /* 6A02F0 802190F0 2484003C */ addiu $a0, $a0, 0x3c /* 6A02F4 802190F4 00042400 */ sll $a0, $a0, 0x10 /* 6A02F8 802190F8 0C00A4F5 */ jal cosine /* 6A02FC 802190FC 00042403 */ sra $a0, $a0, 0x10 /* 6A0300 80219100 46000021 */ cvt.d.s $f0, $f0 /* 6A0304 80219104 46380000 */ add.d $f0, $f0, $f24 /* 6A0308 80219108 46360002 */ mul.d $f0, $f0, $f22 /* 6A030C 8021910C 00000000 */ nop /* 6A0310 80219110 27A20038 */ addiu $v0, $sp, 0x38 /* 6A0314 80219114 4620A03E */ c.le.d $f20, $f0 /* 6A0318 80219118 00000000 */ nop /* 6A031C 8021911C 45010005 */ bc1t .L80219134 /* 6A0320 80219120 00511021 */ addu $v0, $v0, $s1 /* 6A0324 80219124 4620008D */ trunc.w.d $f2, $f0 /* 6A0328 80219128 44031000 */ mfc1 $v1, $f2 /* 6A032C 8021912C 08086453 */ j .L8021914C /* 6A0330 80219130 A0430000 */ sb $v1, ($v0) .L80219134: /* 6A0334 80219134 46340001 */ sub.d $f0, $f0, $f20 /* 6A0338 80219138 4620008D */ trunc.w.d $f2, $f0 /* 6A033C 8021913C 44031000 */ mfc1 $v1, $f2 /* 6A0340 80219140 00000000 */ nop /* 6A0344 80219144 00721825 */ or $v1, $v1, $s2 /* 6A0348 80219148 A0430000 */ sb $v1, ($v0) .L8021914C: /* 6A034C 8021914C 96640076 */ lhu $a0, 0x76($s3) /* 6A0350 80219150 00902021 */ addu $a0, $a0, $s0 /* 6A0354 80219154 248400B4 */ addiu $a0, $a0, 0xb4 /* 6A0358 80219158 00042400 */ sll $a0, $a0, 0x10 /* 6A035C 8021915C 0C00A4F5 */ jal cosine /* 6A0360 80219160 00042403 */ sra $a0, $a0, 0x10 /* 6A0364 80219164 46000021 */ cvt.d.s $f0, $f0 /* 6A0368 80219168 46380000 */ add.d $f0, $f0, $f24 /* 6A036C 8021916C 46360002 */ mul.d $f0, $f0, $f22 /* 6A0370 80219170 00000000 */ nop /* 6A0374 80219174 27A20050 */ addiu $v0, $sp, 0x50 /* 6A0378 80219178 4620A03E */ c.le.d $f20, $f0 /* 6A037C 8021917C 00000000 */ nop /* 6A0380 80219180 45010005 */ bc1t .L80219198 /* 6A0384 80219184 00511021 */ addu $v0, $v0, $s1 /* 6A0388 80219188 4620008D */ trunc.w.d $f2, $f0 /* 6A038C 8021918C 44031000 */ mfc1 $v1, $f2 /* 6A0390 80219190 0808646C */ j .L802191B0 /* 6A0394 80219194 A0430000 */ sb $v1, ($v0) .L80219198: /* 6A0398 80219198 46340001 */ sub.d $f0, $f0, $f20 /* 6A039C 8021919C 4620008D */ trunc.w.d $f2, $f0 /* 6A03A0 802191A0 44031000 */ mfc1 $v1, $f2 /* 6A03A4 802191A4 00000000 */ nop /* 6A03A8 802191A8 00721825 */ or $v1, $v1, $s2 /* 6A03AC 802191AC A0430000 */ sb $v1, ($v0) .L802191B0: /* 6A03B0 802191B0 26310001 */ addiu $s1, $s1, 1 /* 6A03B4 802191B4 2A220014 */ slti $v0, $s1, 0x14 /* 6A03B8 802191B8 1440FFB2 */ bnez $v0, .L80219084 /* 6A03BC 802191BC 26100019 */ addiu $s0, $s0, 0x19 /* 6A03C0 802191C0 8EA2007C */ lw $v0, 0x7c($s5) /* 6A03C4 802191C4 3C030004 */ lui $v1, 4 /* 6A03C8 802191C8 00431024 */ and $v0, $v0, $v1 /* 6A03CC 802191CC 10400025 */ beqz $v0, .L80219264 /* 6A03D0 802191D0 0000882D */ daddu $s1, $zero, $zero /* 6A03D4 802191D4 27B70020 */ addiu $s7, $sp, 0x20 /* 6A03D8 802191D8 27B60038 */ addiu $s6, $sp, 0x38 /* 6A03DC 802191DC 27B40050 */ addiu $s4, $sp, 0x50 /* 6A03E0 802191E0 241300FF */ addiu $s3, $zero, 0xff /* 6A03E4 802191E4 0000802D */ daddu $s0, $zero, $zero .L802191E8: /* 6A03E8 802191E8 02F11021 */ addu $v0, $s7, $s1 /* 6A03EC 802191EC 02D12021 */ addu $a0, $s6, $s1 /* 6A03F0 802191F0 90430000 */ lbu $v1, ($v0) /* 6A03F4 802191F4 02911021 */ addu $v0, $s4, $s1 /* 6A03F8 802191F8 90840000 */ lbu $a0, ($a0) /* 6A03FC 802191FC 90420000 */ lbu $v0, ($v0) /* 6A0400 80219200 00031E00 */ sll $v1, $v1, 0x18 /* 6A0404 80219204 00042400 */ sll $a0, $a0, 0x10 /* 6A0408 80219208 00641825 */ or $v1, $v1, $a0 /* 6A040C 8021920C 00021200 */ sll $v0, $v0, 8 /* 6A0410 80219210 00621825 */ or $v1, $v1, $v0 /* 6A0414 80219214 347200FF */ ori $s2, $v1, 0xff /* 6A0418 80219218 0200282D */ daddu $a1, $s0, $zero .L8021921C: /* 6A041C 8021921C 2406000C */ addiu $a2, $zero, 0xc /* 6A0420 80219220 0220382D */ daddu $a3, $s1, $zero /* 6A0424 80219224 AFB20010 */ sw $s2, 0x10($sp) /* 6A0428 80219228 AFA00014 */ sw $zero, 0x14($sp) /* 6A042C 8021922C AFB30018 */ sw $s3, 0x18($sp) /* 6A0430 80219230 AFA0001C */ sw $zero, 0x1c($sp) /* 6A0434 80219234 8EA40084 */ lw $a0, 0x84($s5) /* 6A0438 80219238 0C0B79E0 */ jal func_802DE780 /* 6A043C 8021923C 26100001 */ addiu $s0, $s0, 1 /* 6A0440 80219240 2A02000A */ slti $v0, $s0, 0xa /* 6A0444 80219244 1440FFF5 */ bnez $v0, .L8021921C /* 6A0448 80219248 0200282D */ daddu $a1, $s0, $zero /* 6A044C 8021924C 26310001 */ addiu $s1, $s1, 1 /* 6A0450 80219250 2A220014 */ slti $v0, $s1, 0x14 /* 6A0454 80219254 1440FFE4 */ bnez $v0, .L802191E8 /* 6A0458 80219258 0000802D */ daddu $s0, $zero, $zero /* 6A045C 8021925C 080864B1 */ j .L802192C4 /* 6A0460 80219260 0000102D */ daddu $v0, $zero, $zero .L80219264: /* 6A0464 80219264 241200FF */ addiu $s2, $zero, 0xff /* 6A0468 80219268 0240A02D */ daddu $s4, $s2, $zero /* 6A046C 8021926C 0000802D */ daddu $s0, $zero, $zero .L80219270: /* 6A0470 80219270 0200282D */ daddu $a1, $s0, $zero .L80219274: /* 6A0474 80219274 2406000C */ addiu $a2, $zero, 0xc /* 6A0478 80219278 0220382D */ daddu $a3, $s1, $zero /* 6A047C 8021927C AFB20010 */ sw $s2, 0x10($sp) /* 6A0480 80219280 AFA00014 */ sw $zero, 0x14($sp) /* 6A0484 80219284 AFB40018 */ sw $s4, 0x18($sp) /* 6A0488 80219288 AFA0001C */ sw $zero, 0x1c($sp) /* 6A048C 8021928C 8EA40084 */ lw $a0, 0x84($s5) /* 6A0490 80219290 0C0B79E0 */ jal func_802DE780 /* 6A0494 80219294 26100001 */ addiu $s0, $s0, 1 /* 6A0498 80219298 2A02000A */ slti $v0, $s0, 0xa /* 6A049C 8021929C 1440FFF5 */ bnez $v0, .L80219274 /* 6A04A0 802192A0 0200282D */ daddu $a1, $s0, $zero /* 6A04A4 802192A4 26310001 */ addiu $s1, $s1, 1 /* 6A04A8 802192A8 2A220014 */ slti $v0, $s1, 0x14 /* 6A04AC 802192AC 1440FFF0 */ bnez $v0, .L80219270 /* 6A04B0 802192B0 0000802D */ daddu $s0, $zero, $zero /* 6A04B4 802192B4 0000102D */ daddu $v0, $zero, $zero /* 6A04B8 802192B8 AE600074 */ sw $zero, 0x74($s3) /* 6A04BC 802192BC AE600078 */ sw $zero, 0x78($s3) /* 6A04C0 802192C0 AE600070 */ sw $zero, 0x70($s3) .L802192C4: /* 6A04C4 802192C4 8FBF0088 */ lw $ra, 0x88($sp) /* 6A04C8 802192C8 8FB70084 */ lw $s7, 0x84($sp) /* 6A04CC 802192CC 8FB60080 */ lw $s6, 0x80($sp) /* 6A04D0 802192D0 8FB5007C */ lw $s5, 0x7c($sp) /* 6A04D4 802192D4 8FB40078 */ lw $s4, 0x78($sp) /* 6A04D8 802192D8 8FB30074 */ lw $s3, 0x74($sp) /* 6A04DC 802192DC 8FB20070 */ lw $s2, 0x70($sp) /* 6A04E0 802192E0 8FB1006C */ lw $s1, 0x6c($sp) /* 6A04E4 802192E4 8FB00068 */ lw $s0, 0x68($sp) /* 6A04E8 802192E8 D7B800A0 */ ldc1 $f24, 0xa0($sp) /* 6A04EC 802192EC D7B60098 */ ldc1 $f22, 0x98($sp) /* 6A04F0 802192F0 D7B40090 */ ldc1 $f20, 0x90($sp) /* 6A04F4 802192F4 03E00008 */ jr $ra /* 6A04F8 802192F8 27BD00A8 */ addiu $sp, $sp, 0xa8