.set noat # allow manual use of $at .set noreorder # don't insert nops after branches glabel func_800E657C /* 07FA2C 800E657C 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 07FA30 800E6580 0080282D */ daddu $a1, $a0, $zero /* 07FA34 800E6584 AFB10024 */ sw $s1, 0x24($sp) /* 07FA38 800E6588 3C118011 */ lui $s1, 0x8011 /* 07FA3C 800E658C 2631EFC8 */ addiu $s1, $s1, -0x1038 /* 07FA40 800E6590 27A60010 */ addiu $a2, $sp, 0x10 /* 07FA44 800E6594 AFBF0028 */ sw $ra, 0x28($sp) /* 07FA48 800E6598 14A00003 */ bnez $a1, .L800E65A8 /* 07FA4C 800E659C AFB00020 */ sw $s0, 0x20($sp) /* 07FA50 800E65A0 080399AC */ j .L800E66B0 /* 07FA54 800E65A4 0000102D */ daddu $v0, $zero, $zero .L800E65A8: /* 07FA58 800E65A8 3C040004 */ lui $a0, 4 /* 07FA5C 800E65AC 3C038007 */ lui $v1, 0x8007 /* 07FA60 800E65B0 8C63419C */ lw $v1, 0x419c($v1) /* 07FA64 800E65B4 24020025 */ addiu $v0, $zero, 0x25 /* 07FA68 800E65B8 A62200B0 */ sh $v0, 0xb0($s1) /* 07FA6C 800E65BC 24020026 */ addiu $v0, $zero, 0x26 /* 07FA70 800E65C0 A62200B2 */ sh $v0, 0xb2($s1) /* 07FA74 800E65C4 A225000C */ sb $a1, 0xc($s1) /* 07FA78 800E65C8 A065007F */ sb $a1, 0x7f($v1) /* 07FA7C 800E65CC 8223000C */ lb $v1, 0xc($s1) /* 07FA80 800E65D0 34840148 */ ori $a0, $a0, 0x148 /* 07FA84 800E65D4 AFA40010 */ sw $a0, 0x10($sp) /* 07FA88 800E65D8 00031040 */ sll $v0, $v1, 1 /* 07FA8C 800E65DC 00431021 */ addu $v0, $v0, $v1 /* 07FA90 800E65E0 000210C0 */ sll $v0, $v0, 3 /* 07FA94 800E65E4 3C01800F */ lui $at, 0x800f /* 07FA98 800E65E8 00220821 */ addu $at, $at, $v0 /* 07FA9C 800E65EC 8C227C1C */ lw $v0, 0x7c1c($at) /* 07FAA0 800E65F0 00031880 */ sll $v1, $v1, 2 /* 07FAA4 800E65F4 AFA00018 */ sw $zero, 0x18($sp) /* 07FAA8 800E65F8 AFA0001C */ sw $zero, 0x1c($sp) /* 07FAAC 800E65FC AFA20014 */ sw $v0, 0x14($sp) /* 07FAB0 800E6600 3C05800F */ lui $a1, 0x800f /* 07FAB4 800E6604 00A32821 */ addu $a1, $a1, $v1 /* 07FAB8 800E6608 8CA57C7C */ lw $a1, 0x7c7c($a1) /* 07FABC 800E660C 0C00E219 */ jal func_80038864 /* 07FAC0 800E6610 00C0202D */ daddu $a0, $a2, $zero /* 07FAC4 800E6614 0040202D */ daddu $a0, $v0, $zero /* 07FAC8 800E6618 3C018011 */ lui $at, 0x8011 /* 07FACC 800E661C AC24C96C */ sw $a0, -0x3694($at) /* 07FAD0 800E6620 0C00E2B7 */ jal get_npc_by_index /* 07FAD4 800E6624 00000000 */ nop /* 07FAD8 800E6628 0040802D */ daddu $s0, $v0, $zero /* 07FADC 800E662C 0C00EAFF */ jal disable_npc_shadow /* 07FAE0 800E6630 0200202D */ daddu $a0, $s0, $zero /* 07FAE4 800E6634 C62200A8 */ lwc1 $f2, 0xa8($s1) /* 07FAE8 800E6638 3C0142B4 */ lui $at, 0x42b4 /* 07FAEC 800E663C 44810000 */ mtc1 $at, $f0 /* 07FAF0 800E6640 00000000 */ nop /* 07FAF4 800E6644 4602003E */ c.le.s $f0, $f2 /* 07FAF8 800E6648 00000000 */ nop /* 07FAFC 800E664C 45000008 */ bc1f .L800E6670 /* 07FB00 800E6650 00000000 */ nop /* 07FB04 800E6654 3C014387 */ lui $at, 0x4387 /* 07FB08 800E6658 44810000 */ mtc1 $at, $f0 /* 07FB0C 800E665C 00000000 */ nop /* 07FB10 800E6660 4600103C */ c.lt.s $f2, $f0 /* 07FB14 800E6664 00000000 */ nop /* 07FB18 800E6668 45010005 */ bc1t .L800E6680 /* 07FB1C 800E666C 00000000 */ nop .L800E6670: /* 07FB20 800E6670 3C014334 */ lui $at, 0x4334 /* 07FB24 800E6674 44810000 */ mtc1 $at, $f0 /* 07FB28 800E6678 080399A2 */ j .L800E6688 /* 07FB2C 800E667C 00000000 */ nop .L800E6680: /* 07FB30 800E6680 44800000 */ mtc1 $zero, $f0 /* 07FB34 800E6684 00000000 */ nop .L800E6688: /* 07FB38 800E6688 44050000 */ mfc1 $a1, $f0 /* 07FB3C 800E668C 0C00ECD0 */ jal set_npc_yaw /* 07FB40 800E6690 0200202D */ daddu $a0, $s0, $zero /* 07FB44 800E6694 C6200028 */ lwc1 $f0, 0x28($s1) /* 07FB48 800E6698 E6000038 */ swc1 $f0, 0x38($s0) /* 07FB4C 800E669C C620002C */ lwc1 $f0, 0x2c($s1) /* 07FB50 800E66A0 E600003C */ swc1 $f0, 0x3c($s0) /* 07FB54 800E66A4 C6200030 */ lwc1 $f0, 0x30($s1) /* 07FB58 800E66A8 0200102D */ daddu $v0, $s0, $zero /* 07FB5C 800E66AC E4400040 */ swc1 $f0, 0x40($v0) .L800E66B0: /* 07FB60 800E66B0 8FBF0028 */ lw $ra, 0x28($sp) /* 07FB64 800E66B4 8FB10024 */ lw $s1, 0x24($sp) /* 07FB68 800E66B8 8FB00020 */ lw $s0, 0x20($sp) /* 07FB6C 800E66BC 03E00008 */ jr $ra /* 07FB70 800E66C0 27BD0030 */ addiu $sp, $sp, 0x30 /* 07FB74 800E66C4 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 07FB78 800E66C8 AFB20040 */ sw $s2, 0x40($sp) /* 07FB7C 800E66CC 3C128011 */ lui $s2, 0x8011 /* 07FB80 800E66D0 2652EFC8 */ addiu $s2, $s2, -0x1038 /* 07FB84 800E66D4 3C04800B */ lui $a0, 0x800b /* 07FB88 800E66D8 24841D80 */ addiu $a0, $a0, 0x1d80 /* 07FB8C 800E66DC AFBF0048 */ sw $ra, 0x48($sp) /* 07FB90 800E66E0 AFB30044 */ sw $s3, 0x44($sp) /* 07FB94 800E66E4 AFB1003C */ sw $s1, 0x3c($sp) /* 07FB98 800E66E8 AFB00038 */ sw $s0, 0x38($sp) /* 07FB9C 800E66EC F7B60058 */ sdc1 $f22, 0x58($sp) /* 07FBA0 800E66F0 F7B40050 */ sdc1 $f20, 0x50($sp) /* 07FBA4 800E66F4 C64400A8 */ lwc1 $f4, 0xa8($s2) /* 07FBA8 800E66F8 3C038007 */ lui $v1, 0x8007 /* 07FBAC 800E66FC 8C637410 */ lw $v1, 0x7410($v1) /* 07FBB0 800E6700 3C0142B4 */ lui $at, 0x42b4 /* 07FBB4 800E6704 44810000 */ mtc1 $at, $f0 /* 07FBB8 800E6708 00031080 */ sll $v0, $v1, 2 /* 07FBBC 800E670C 00431021 */ addu $v0, $v0, $v1 /* 07FBC0 800E6710 00021080 */ sll $v0, $v0, 2 /* 07FBC4 800E6714 00431023 */ subu $v0, $v0, $v1 /* 07FBC8 800E6718 000218C0 */ sll $v1, $v0, 3 /* 07FBCC 800E671C 00431021 */ addu $v0, $v0, $v1 /* 07FBD0 800E6720 000210C0 */ sll $v0, $v0, 3 /* 07FBD4 800E6724 4604003E */ c.le.s $f0, $f4 /* 07FBD8 800E6728 00000000 */ nop /* 07FBDC 800E672C 4500000B */ bc1f .L800E675C /* 07FBE0 800E6730 00441021 */ addu $v0, $v0, $a0 /* 07FBE4 800E6734 3C014387 */ lui $at, 0x4387 /* 07FBE8 800E6738 44811000 */ mtc1 $at, $f2 /* 07FBEC 800E673C 00000000 */ nop /* 07FBF0 800E6740 4602203C */ c.lt.s $f4, $f2 /* 07FBF4 800E6744 00000000 */ nop /* 07FBF8 800E6748 45000004 */ bc1f .L800E675C /* 07FBFC 800E674C 00000000 */ nop /* 07FC00 800E6750 C440006C */ lwc1 $f0, 0x6c($v0) /* 07FC04 800E6754 080399DC */ j .L800E6770 /* 07FC08 800E6758 46020501 */ sub.s $f20, $f0, $f2 .L800E675C: /* 07FC0C 800E675C C442006C */ lwc1 $f2, 0x6c($v0) /* 07FC10 800E6760 3C0142B4 */ lui $at, 0x42b4 /* 07FC14 800E6764 44810000 */ mtc1 $at, $f0 /* 07FC18 800E6768 00000000 */ nop /* 07FC1C 800E676C 46001501 */ sub.s $f20, $f2, $f0 .L800E6770: /* 07FC20 800E6770 0C00A6C9 */ jal clamp_angle /* 07FC24 800E6774 4600A306 */ mov.s $f12, $f20 /* 07FC28 800E6778 27A50020 */ addiu $a1, $sp, 0x20 /* 07FC2C 800E677C 27A60024 */ addiu $a2, $sp, 0x24 /* 07FC30 800E6780 3C0140C9 */ lui $at, 0x40c9 /* 07FC34 800E6784 34210FD0 */ ori $at, $at, 0xfd0 /* 07FC38 800E6788 44811000 */ mtc1 $at, $f2 /* 07FC3C 800E678C 24110002 */ addiu $s1, $zero, 2 /* 07FC40 800E6790 46020002 */ mul.s $f0, $f0, $f2 /* 07FC44 800E6794 00000000 */ nop /* 07FC48 800E6798 0220802D */ daddu $s0, $s1, $zero /* 07FC4C 800E679C 27B30030 */ addiu $s3, $sp, 0x30 /* 07FC50 800E67A0 3C0143B4 */ lui $at, 0x43b4 /* 07FC54 800E67A4 44816000 */ mtc1 $at, $f12 /* 07FC58 800E67A8 3C014080 */ lui $at, 0x4080 /* 07FC5C 800E67AC 4481B000 */ mtc1 $at, $f22 /* 07FC60 800E67B0 0C00A82D */ jal sin_cos_rad /* 07FC64 800E67B4 460C0303 */ div.s $f12, $f0, $f12 .L800E67B8: /* 07FC68 800E67B8 C7A00020 */ lwc1 $f0, 0x20($sp) /* 07FC6C 800E67BC 44911000 */ mtc1 $s1, $f2 /* 07FC70 800E67C0 00000000 */ nop /* 07FC74 800E67C4 468010A0 */ cvt.s.w $f2, $f2 /* 07FC78 800E67C8 46020002 */ mul.s $f0, $f0, $f2 /* 07FC7C 800E67CC 00000000 */ nop /* 07FC80 800E67D0 C7A40024 */ lwc1 $f4, 0x24($sp) /* 07FC84 800E67D4 46022102 */ mul.s $f4, $f4, $f2 /* 07FC88 800E67D8 00000000 */ nop /* 07FC8C 800E67DC 0240282D */ daddu $a1, $s2, $zero /* 07FC90 800E67E0 C642002C */ lwc1 $f2, 0x2c($s2) /* 07FC94 800E67E4 27A60028 */ addiu $a2, $sp, 0x28 /* 07FC98 800E67E8 46161080 */ add.s $f2, $f2, $f22 /* 07FC9C 800E67EC C6460028 */ lwc1 $f6, 0x28($s2) /* 07FCA0 800E67F0 24040003 */ addiu $a0, $zero, 3 /* 07FCA4 800E67F4 46003180 */ add.s $f6, $f6, $f0 /* 07FCA8 800E67F8 C6400030 */ lwc1 $f0, 0x30($s2) /* 07FCAC 800E67FC 27A7002C */ addiu $a3, $sp, 0x2c /* 07FCB0 800E6800 46040001 */ sub.s $f0, $f0, $f4 /* 07FCB4 800E6804 E7A2002C */ swc1 $f2, 0x2c($sp) /* 07FCB8 800E6808 E7A60028 */ swc1 $f6, 0x28($sp) /* 07FCBC 800E680C E7A00030 */ swc1 $f0, 0x30($sp) /* 07FCC0 800E6810 AFB30010 */ sw $s3, 0x10($sp) /* 07FCC4 800E6814 E7B60014 */ swc1 $f22, 0x14($sp) /* 07FCC8 800E6818 0C037B01 */ jal func_800DEC04 /* 07FCCC 800E681C E7B40018 */ swc1 $f20, 0x18($sp) /* 07FCD0 800E6820 04410003 */ bgez $v0, .L800E6830 /* 07FCD4 800E6824 2610FFFF */ addiu $s0, $s0, -1 /* 07FCD8 800E6828 1E00FFE3 */ bgtz $s0, .L800E67B8 /* 07FCDC 800E682C 26310012 */ addiu $s1, $s1, 0x12 .L800E6830: /* 07FCE0 800E6830 8FBF0048 */ lw $ra, 0x48($sp) /* 07FCE4 800E6834 8FB30044 */ lw $s3, 0x44($sp) /* 07FCE8 800E6838 8FB20040 */ lw $s2, 0x40($sp) /* 07FCEC 800E683C 8FB1003C */ lw $s1, 0x3c($sp) /* 07FCF0 800E6840 8FB00038 */ lw $s0, 0x38($sp) /* 07FCF4 800E6844 D7B60058 */ ldc1 $f22, 0x58($sp) /* 07FCF8 800E6848 D7B40050 */ ldc1 $f20, 0x50($sp) /* 07FCFC 800E684C 03E00008 */ jr $ra /* 07FD00 800E6850 27BD0060 */ addiu $sp, $sp, 0x60 /* 07FD04 800E6854 00000000 */ nop /* 07FD08 800E6858 00000000 */ nop /* 07FD0C 800E685C 00000000 */ nop