### RAW ASSEMBLY INSTRUCTIONS:

glabel npc_raycast_down_around
/* 75C28 800DC778 27BDFF78 */  addiu     $sp, $sp, -0x88
/* 75C2C 800DC77C F7B80068 */  sdc1      $f24, 0x68($sp)
/* 75C30 800DC780 C7B800A0 */  lwc1      $f24, 0xA0($sp)
/* 75C34 800DC784 AFB40050 */  sw        $s4, 0x50($sp)
/* 75C38 800DC788 8FB40098 */  lw        $s4, 0x98($sp)
/* 75C3C 800DC78C AFBF0054 */  sw        $ra, 0x54($sp)
/* 75C40 800DC790 AFB3004C */  sw        $s3, 0x4C($sp)
/* 75C44 800DC794 AFB20048 */  sw        $s2, 0x48($sp)
/* 75C48 800DC798 AFB10044 */  sw        $s1, 0x44($sp)
/* 75C4C 800DC79C AFB00040 */  sw        $s0, 0x40($sp)
/* 75C50 800DC7A0 F7BE0080 */  sdc1      $f30, 0x80($sp)
/* 75C54 800DC7A4 F7BC0078 */  sdc1      $f28, 0x78($sp)
/* 75C58 800DC7A8 F7BA0070 */  sdc1      $f26, 0x70($sp)
/* 75C5C 800DC7AC F7B60060 */  sdc1      $f22, 0x60($sp)
/* 75C60 800DC7B0 F7B40058 */  sdc1      $f20, 0x58($sp)
/* 75C64 800DC7B4 C4A60000 */  lwc1      $f6, 0x0($a1)
/* 75C68 800DC7B8 00C0882D */  daddu     $s1, $a2, $zero
/* 75C6C 800DC7BC E7A60028 */  swc1      $f6, 0x28($sp)
/* 75C70 800DC7C0 C6260000 */  lwc1      $f6, 0x0($s1)
/* 75C74 800DC7C4 0080902D */  daddu     $s2, $a0, $zero
/* 75C78 800DC7C8 E7A6002C */  swc1      $f6, 0x2C($sp)
/* 75C7C 800DC7CC C4E60000 */  lwc1      $f6, 0x0($a3)
/* 75C80 800DC7D0 3C138011 */  lui       $s3, %hi(D_8010C970)
/* 75C84 800DC7D4 2673C970 */  addiu     $s3, $s3, %lo(D_8010C970)
/* 75C88 800DC7D8 E7A60030 */  swc1      $f6, 0x30($sp)
/* 75C8C 800DC7DC C7A6002C */  lwc1      $f6, 0x2C($sp)
/* 75C90 800DC7E0 44806000 */  mtc1      $zero, $f12
/* 75C94 800DC7E4 4600318D */  trunc.w.s $f6, $f6
/* 75C98 800DC7E8 E6660000 */  swc1      $f6, 0x0($s3)
/* 75C9C 800DC7EC C6200000 */  lwc1      $f0, 0x0($s1)
/* 75CA0 800DC7F0 3C014004 */  lui       $at, (0x40040000 >> 16)
/* 75CA4 800DC7F4 44811800 */  mtc1      $at, $f3
/* 75CA8 800DC7F8 44801000 */  mtc1      $zero, $f2
/* 75CAC 800DC7FC 4600018D */  trunc.w.s $f6, $f0
/* 75CB0 800DC800 3C018011 */  lui       $at, %hi(D_8010C94C)
/* 75CB4 800DC804 E426C94C */  swc1      $f6, %lo(D_8010C94C)($at)
/* 75CB8 800DC808 C7A6009C */  lwc1      $f6, 0x9C($sp)
/* 75CBC 800DC80C C6200000 */  lwc1      $f0, 0x0($s1)
/* 75CC0 800DC810 460C3300 */  add.s     $f12, $f6, $f12
/* 75CC4 800DC814 4600018D */  trunc.w.s $f6, $f0
/* 75CC8 800DC818 3C018011 */  lui       $at, %hi(D_8010C974)
/* 75CCC 800DC81C E426C974 */  swc1      $f6, %lo(D_8010C974)($at)
/* 75CD0 800DC820 4600C021 */  cvt.d.s   $f0, $f24
/* 75CD4 800DC824 46220003 */  div.d     $f0, $f0, $f2
/* 75CD8 800DC828 C6820000 */  lwc1      $f2, 0x0($s4)
/* 75CDC 800DC82C 46200620 */  cvt.s.d   $f24, $f0
/* 75CE0 800DC830 0C00A6C9 */  jal       clamp_angle
/* 75CE4 800DC834 46001685 */   abs.s    $f26, $f2
/* 75CE8 800DC838 3C0140C9 */  lui       $at, (0x40C90FD0 >> 16)
/* 75CEC 800DC83C 34210FD0 */  ori       $at, $at, (0x40C90FD0 & 0xFFFF)
/* 75CF0 800DC840 44811000 */  mtc1      $at, $f2
/* 75CF4 800DC844 00000000 */  nop
/* 75CF8 800DC848 46020002 */  mul.s     $f0, $f0, $f2
/* 75CFC 800DC84C 00000000 */  nop
/* 75D00 800DC850 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
/* 75D04 800DC854 44811000 */  mtc1      $at, $f2
/* 75D08 800DC858 00000000 */  nop
/* 75D0C 800DC85C 46020503 */  div.s     $f20, $f0, $f2
/* 75D10 800DC860 0C00A85B */  jal       sin_rad
/* 75D14 800DC864 4600A306 */   mov.s    $f12, $f20
/* 75D18 800DC868 46000586 */  mov.s     $f22, $f0
/* 75D1C 800DC86C 0C00A874 */  jal       cos_rad
/* 75D20 800DC870 4600A306 */   mov.s    $f12, $f20
/* 75D24 800DC874 4616C102 */  mul.s     $f4, $f24, $f22
/* 75D28 800DC878 00000000 */  nop
/* 75D2C 800DC87C 0000802D */  daddu     $s0, $zero, $zero
/* 75D30 800DC880 0240202D */  daddu     $a0, $s2, $zero
/* 75D34 800DC884 27A50018 */  addiu     $a1, $sp, 0x18
/* 75D38 800DC888 4600C087 */  neg.s     $f2, $f24
/* 75D3C 800DC88C 46001002 */  mul.s     $f0, $f2, $f0
/* 75D40 800DC890 00000000 */  nop
/* 75D44 800DC894 27A6001C */  addiu     $a2, $sp, 0x1C
/* 75D48 800DC898 27A70020 */  addiu     $a3, $sp, 0x20
/* 75D4C 800DC89C C7A60028 */  lwc1      $f6, 0x28($sp)
/* 75D50 800DC8A0 3C01C6FF */  lui       $at, (0xC6FFFE00 >> 16)
/* 75D54 800DC8A4 3421FE00 */  ori       $at, $at, (0xC6FFFE00 & 0xFFFF)
/* 75D58 800DC8A8 4481E000 */  mtc1      $at, $f28
/* 75D5C 800DC8AC 46043080 */  add.s     $f2, $f6, $f4
/* 75D60 800DC8B0 C7A6002C */  lwc1      $f6, 0x2C($sp)
/* 75D64 800DC8B4 27A20024 */  addiu     $v0, $sp, 0x24
/* 75D68 800DC8B8 E7BA0024 */  swc1      $f26, 0x24($sp)
/* 75D6C 800DC8BC E7A6001C */  swc1      $f6, 0x1C($sp)
/* 75D70 800DC8C0 C7A60030 */  lwc1      $f6, 0x30($sp)
/* 75D74 800DC8C4 4600E786 */  mov.s     $f30, $f28
/* 75D78 800DC8C8 46003000 */  add.s     $f0, $f6, $f0
/* 75D7C 800DC8CC E7BC0038 */  swc1      $f28, 0x38($sp)
/* 75D80 800DC8D0 E7A20018 */  swc1      $f2, 0x18($sp)
/* 75D84 800DC8D4 E7A00020 */  swc1      $f0, 0x20($sp)
/* 75D88 800DC8D8 0C037140 */  jal       npc_raycast_down
/* 75D8C 800DC8DC AFA20010 */   sw       $v0, 0x10($sp)
/* 75D90 800DC8E0 0440000F */  bltz      $v0, .L800DC920
/* 75D94 800DC8E4 E7BA0034 */   swc1     $f26, 0x34($sp)
/* 75D98 800DC8E8 C7A00024 */  lwc1      $f0, 0x24($sp)
/* 75D9C 800DC8EC 461A003E */  c.le.s    $f0, $f26
/* 75DA0 800DC8F0 00000000 */  nop
/* 75DA4 800DC8F4 4500000A */  bc1f      .L800DC920
/* 75DA8 800DC8F8 00000000 */   nop
/* 75DAC 800DC8FC 46000686 */  mov.s     $f26, $f0
/* 75DB0 800DC900 C7BC001C */  lwc1      $f28, 0x1C($sp)
/* 75DB4 800DC904 24100001 */  addiu     $s0, $zero, 0x1
/* 75DB8 800DC908 3C018011 */  lui       $at, %hi(NpcHitQueryColliderID)
/* 75DBC 800DC90C AC22C978 */  sw        $v0, %lo(NpcHitQueryColliderID)($at)
/* 75DC0 800DC910 3C018011 */  lui       $at, %hi(D_8010C98C)
/* 75DC4 800DC914 AC22C98C */  sw        $v0, %lo(D_8010C98C)($at)
/* 75DC8 800DC918 4600E18D */  trunc.w.s $f6, $f28
/* 75DCC 800DC91C E6660000 */  swc1      $f6, 0x0($s3)
.L800DC920:
/* 75DD0 800DC920 3C0142F0 */  lui       $at, (0x42F00000 >> 16)
/* 75DD4 800DC924 44816000 */  mtc1      $at, $f12
/* 75DD8 800DC928 C7A6009C */  lwc1      $f6, 0x9C($sp)
/* 75DDC 800DC92C 0C00A6C9 */  jal       clamp_angle
/* 75DE0 800DC930 460C3300 */   add.s    $f12, $f6, $f12
/* 75DE4 800DC934 3C0140C9 */  lui       $at, (0x40C90FD0 >> 16)
/* 75DE8 800DC938 34210FD0 */  ori       $at, $at, (0x40C90FD0 & 0xFFFF)
/* 75DEC 800DC93C 44811000 */  mtc1      $at, $f2
/* 75DF0 800DC940 00000000 */  nop
/* 75DF4 800DC944 46020002 */  mul.s     $f0, $f0, $f2
/* 75DF8 800DC948 00000000 */  nop
/* 75DFC 800DC94C 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
/* 75E00 800DC950 44811000 */  mtc1      $at, $f2
/* 75E04 800DC954 00000000 */  nop
/* 75E08 800DC958 46020503 */  div.s     $f20, $f0, $f2
/* 75E0C 800DC95C 0C00A85B */  jal       sin_rad
/* 75E10 800DC960 4600A306 */   mov.s    $f12, $f20
/* 75E14 800DC964 46000586 */  mov.s     $f22, $f0
/* 75E18 800DC968 0C00A874 */  jal       cos_rad
/* 75E1C 800DC96C 4600A306 */   mov.s    $f12, $f20
/* 75E20 800DC970 4616C102 */  mul.s     $f4, $f24, $f22
/* 75E24 800DC974 00000000 */  nop
/* 75E28 800DC978 4600C087 */  neg.s     $f2, $f24
/* 75E2C 800DC97C 46001002 */  mul.s     $f0, $f2, $f0
/* 75E30 800DC980 00000000 */  nop
/* 75E34 800DC984 0240202D */  daddu     $a0, $s2, $zero
/* 75E38 800DC988 C7A60028 */  lwc1      $f6, 0x28($sp)
/* 75E3C 800DC98C 27A50018 */  addiu     $a1, $sp, 0x18
/* 75E40 800DC990 46043080 */  add.s     $f2, $f6, $f4
/* 75E44 800DC994 C7A6002C */  lwc1      $f6, 0x2C($sp)
/* 75E48 800DC998 27A6001C */  addiu     $a2, $sp, 0x1C
/* 75E4C 800DC99C E7A6001C */  swc1      $f6, 0x1C($sp)
/* 75E50 800DC9A0 C7A60030 */  lwc1      $f6, 0x30($sp)
/* 75E54 800DC9A4 27A70020 */  addiu     $a3, $sp, 0x20
/* 75E58 800DC9A8 46003000 */  add.s     $f0, $f6, $f0
/* 75E5C 800DC9AC C7A60034 */  lwc1      $f6, 0x34($sp)
/* 75E60 800DC9B0 27A20024 */  addiu     $v0, $sp, 0x24
/* 75E64 800DC9B4 E7A20018 */  swc1      $f2, 0x18($sp)
/* 75E68 800DC9B8 E7A60024 */  swc1      $f6, 0x24($sp)
/* 75E6C 800DC9BC E7A00020 */  swc1      $f0, 0x20($sp)
/* 75E70 800DC9C0 0C037140 */  jal       npc_raycast_down
/* 75E74 800DC9C4 AFA20010 */   sw       $v0, 0x10($sp)
/* 75E78 800DC9C8 04400010 */  bltz      $v0, .L800DCA0C
/* 75E7C 800DC9CC 00000000 */   nop
/* 75E80 800DC9D0 C7A00024 */  lwc1      $f0, 0x24($sp)
/* 75E84 800DC9D4 461A003E */  c.le.s    $f0, $f26
/* 75E88 800DC9D8 00000000 */  nop
/* 75E8C 800DC9DC 4500000B */  bc1f      .L800DCA0C
/* 75E90 800DC9E0 00000000 */   nop
/* 75E94 800DC9E4 46000686 */  mov.s     $f26, $f0
/* 75E98 800DC9E8 C7BE001C */  lwc1      $f30, 0x1C($sp)
/* 75E9C 800DC9EC 24100001 */  addiu     $s0, $zero, 0x1
/* 75EA0 800DC9F0 3C018011 */  lui       $at, %hi(NpcHitQueryColliderID)
/* 75EA4 800DC9F4 AC22C978 */  sw        $v0, %lo(NpcHitQueryColliderID)($at)
/* 75EA8 800DC9F8 3C018011 */  lui       $at, %hi(D_8010C968)
/* 75EAC 800DC9FC AC22C968 */  sw        $v0, %lo(D_8010C968)($at)
/* 75EB0 800DCA00 4600F18D */  trunc.w.s $f6, $f30
/* 75EB4 800DCA04 3C018011 */  lui       $at, %hi(D_8010C94C)
/* 75EB8 800DCA08 E426C94C */  swc1      $f6, %lo(D_8010C94C)($at)
.L800DCA0C:
/* 75EBC 800DCA0C 3C0142F0 */  lui       $at, (0x42F00000 >> 16)
/* 75EC0 800DCA10 44816000 */  mtc1      $at, $f12
/* 75EC4 800DCA14 C7A6009C */  lwc1      $f6, 0x9C($sp)
/* 75EC8 800DCA18 0C00A6C9 */  jal       clamp_angle
/* 75ECC 800DCA1C 460C3301 */   sub.s    $f12, $f6, $f12
/* 75ED0 800DCA20 3C0140C9 */  lui       $at, (0x40C90FD0 >> 16)
/* 75ED4 800DCA24 34210FD0 */  ori       $at, $at, (0x40C90FD0 & 0xFFFF)
/* 75ED8 800DCA28 44811000 */  mtc1      $at, $f2
/* 75EDC 800DCA2C 00000000 */  nop
/* 75EE0 800DCA30 46020002 */  mul.s     $f0, $f0, $f2
/* 75EE4 800DCA34 00000000 */  nop
/* 75EE8 800DCA38 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
/* 75EEC 800DCA3C 44811000 */  mtc1      $at, $f2
/* 75EF0 800DCA40 00000000 */  nop
/* 75EF4 800DCA44 46020503 */  div.s     $f20, $f0, $f2
/* 75EF8 800DCA48 0C00A85B */  jal       sin_rad
/* 75EFC 800DCA4C 4600A306 */   mov.s    $f12, $f20
/* 75F00 800DCA50 46000586 */  mov.s     $f22, $f0
/* 75F04 800DCA54 0C00A874 */  jal       cos_rad
/* 75F08 800DCA58 4600A306 */   mov.s    $f12, $f20
/* 75F0C 800DCA5C 4616C102 */  mul.s     $f4, $f24, $f22
/* 75F10 800DCA60 00000000 */  nop
/* 75F14 800DCA64 4600C087 */  neg.s     $f2, $f24
/* 75F18 800DCA68 46001002 */  mul.s     $f0, $f2, $f0
/* 75F1C 800DCA6C 00000000 */  nop
/* 75F20 800DCA70 0240202D */  daddu     $a0, $s2, $zero
/* 75F24 800DCA74 C7A60028 */  lwc1      $f6, 0x28($sp)
/* 75F28 800DCA78 27A50018 */  addiu     $a1, $sp, 0x18
/* 75F2C 800DCA7C 46043080 */  add.s     $f2, $f6, $f4
/* 75F30 800DCA80 C7A6002C */  lwc1      $f6, 0x2C($sp)
/* 75F34 800DCA84 27A6001C */  addiu     $a2, $sp, 0x1C
/* 75F38 800DCA88 E7A6001C */  swc1      $f6, 0x1C($sp)
/* 75F3C 800DCA8C C7A60030 */  lwc1      $f6, 0x30($sp)
/* 75F40 800DCA90 27A70020 */  addiu     $a3, $sp, 0x20
/* 75F44 800DCA94 46003000 */  add.s     $f0, $f6, $f0
/* 75F48 800DCA98 C7A60034 */  lwc1      $f6, 0x34($sp)
/* 75F4C 800DCA9C 27A20024 */  addiu     $v0, $sp, 0x24
/* 75F50 800DCAA0 E7A20018 */  swc1      $f2, 0x18($sp)
/* 75F54 800DCAA4 E7A60024 */  swc1      $f6, 0x24($sp)
/* 75F58 800DCAA8 E7A00020 */  swc1      $f0, 0x20($sp)
/* 75F5C 800DCAAC 0C037140 */  jal       npc_raycast_down
/* 75F60 800DCAB0 AFA20010 */   sw       $v0, 0x10($sp)
/* 75F64 800DCAB4 04400011 */  bltz      $v0, .L800DCAFC
/* 75F68 800DCAB8 00000000 */   nop
/* 75F6C 800DCABC C7A00024 */  lwc1      $f0, 0x24($sp)
/* 75F70 800DCAC0 461A003E */  c.le.s    $f0, $f26
/* 75F74 800DCAC4 00000000 */  nop
/* 75F78 800DCAC8 4500000C */  bc1f      .L800DCAFC
/* 75F7C 800DCACC 00000000 */   nop
/* 75F80 800DCAD0 46000686 */  mov.s     $f26, $f0
/* 75F84 800DCAD4 C7A6001C */  lwc1      $f6, 0x1C($sp)
/* 75F88 800DCAD8 24100001 */  addiu     $s0, $zero, 0x1
/* 75F8C 800DCADC 3C018011 */  lui       $at, %hi(NpcHitQueryColliderID)
/* 75F90 800DCAE0 AC22C978 */  sw        $v0, %lo(NpcHitQueryColliderID)($at)
/* 75F94 800DCAE4 3C018011 */  lui       $at, %hi(D_8010C968)
/* 75F98 800DCAE8 AC22C968 */  sw        $v0, %lo(D_8010C968)($at)
/* 75F9C 800DCAEC E7A60038 */  swc1      $f6, 0x38($sp)
/* 75FA0 800DCAF0 4600318D */  trunc.w.s $f6, $f6
/* 75FA4 800DCAF4 3C018011 */  lui       $at, %hi(D_8010C974)
/* 75FA8 800DCAF8 E426C974 */  swc1      $f6, %lo(D_8010C974)($at)
.L800DCAFC:
/* 75FAC 800DCAFC 1200000F */  beqz      $s0, .L800DCB3C
/* 75FB0 800DCB00 0000102D */   daddu    $v0, $zero, $zero
/* 75FB4 800DCB04 461EE03C */  c.lt.s    $f28, $f30
/* 75FB8 800DCB08 00000000 */  nop
/* 75FBC 800DCB0C 45020002 */  bc1fl     .L800DCB18
/* 75FC0 800DCB10 E63C0000 */   swc1     $f28, 0x0($s1)
/* 75FC4 800DCB14 E63E0000 */  swc1      $f30, 0x0($s1)
.L800DCB18:
/* 75FC8 800DCB18 C6200000 */  lwc1      $f0, 0x0($s1)
/* 75FCC 800DCB1C C7A60038 */  lwc1      $f6, 0x38($sp)
/* 75FD0 800DCB20 4606003C */  c.lt.s    $f0, $f6
/* 75FD4 800DCB24 00000000 */  nop
/* 75FD8 800DCB28 45030001 */  bc1tl     .L800DCB30
/* 75FDC 800DCB2C E6260000 */   swc1     $f6, 0x0($s1)
.L800DCB30:
/* 75FE0 800DCB30 E69A0000 */  swc1      $f26, 0x0($s4)
/* 75FE4 800DCB34 080372D1 */  j         .L800DCB44
/* 75FE8 800DCB38 24020001 */   addiu    $v0, $zero, 0x1
.L800DCB3C:
/* 75FEC 800DCB3C C7A0001C */  lwc1      $f0, 0x1C($sp)
/* 75FF0 800DCB40 E6200000 */  swc1      $f0, 0x0($s1)
.L800DCB44:
/* 75FF4 800DCB44 8FBF0054 */  lw        $ra, 0x54($sp)
/* 75FF8 800DCB48 8FB40050 */  lw        $s4, 0x50($sp)
/* 75FFC 800DCB4C 8FB3004C */  lw        $s3, 0x4C($sp)
/* 76000 800DCB50 8FB20048 */  lw        $s2, 0x48($sp)
/* 76004 800DCB54 8FB10044 */  lw        $s1, 0x44($sp)
/* 76008 800DCB58 8FB00040 */  lw        $s0, 0x40($sp)
/* 7600C 800DCB5C D7BE0080 */  ldc1      $f30, 0x80($sp)
/* 76010 800DCB60 D7BC0078 */  ldc1      $f28, 0x78($sp)
/* 76014 800DCB64 D7BA0070 */  ldc1      $f26, 0x70($sp)
/* 76018 800DCB68 D7B80068 */  ldc1      $f24, 0x68($sp)
/* 7601C 800DCB6C D7B60060 */  ldc1      $f22, 0x60($sp)
/* 76020 800DCB70 D7B40058 */  ldc1      $f20, 0x58($sp)
/* 76024 800DCB74 03E00008 */  jr        $ra
/* 76028 800DCB78 27BD0088 */   addiu    $sp, $sp, 0x88

### DECOMPILED C INSTRUCTIONS:

b32 npc_raycast_down_around(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32* hitDepth, f32 yaw, f32 radius) {
    f32 startX;
    f32 startY;
    f32 startZ;
    f32 depth;
    f32 x;
    f32 y;
    f32 z;
    f32 originalDepth;
    f32 hitYBehindLeft;
    s32 hasCollision;
    f32 cosTheta;
    s32 colliderID;
    f32 deltaX,deltaZ;
    f32 theta, sinTheta, minDepth, hitYAhead, hitYBehindRight;

    hasCollision = FALSE;
    x = *posX;
    y = *posY;
    z = *posZ;
    D_8010C970 = y;
    D_8010C94C = *posY;
    D_8010C974 = *posY;
    radius /= 2.5;
    hitYBehindLeft = hitYBehindRight = hitYAhead = -32767.0f;
    minDepth = fabsf(*hitDepth);

    theta = DEG_TO_RAD(clamp_angle(yaw + 0.0f));
    sinTheta = sin_rad(theta);
    cosTheta = cos_rad(theta);
    deltaX = radius * sinTheta;
    deltaZ = -radius * cosTheta;

    startX = x + deltaX;
    startY = y;
    startZ = z + deltaZ;
    originalDepth = depth = minDepth;

    colliderID = npc_raycast_down(ignoreFlags, &startX, &startY, &startZ, &depth);
    if (colliderID >= 0) {
        if (depth <= minDepth) {
            hitYAhead = startY;
            NpcHitQueryColliderID = colliderID;
            D_8010C98C = colliderID;
            D_8010C970 = hitYAhead;
            minDepth = depth;
            hasCollision = TRUE;
        }
    }

    theta = DEG_TO_RAD(clamp_angle(yaw + 120.0f));
    sinTheta = sin_rad(theta);
    cosTheta = cos_rad(theta);
    deltaX = radius * sinTheta;
    deltaZ = -radius * cosTheta;

    startX = x + deltaX;
    startY = y;
    startZ = z + deltaZ;
    depth = originalDepth;

    colliderID = npc_raycast_down(ignoreFlags, &startX, &startY, &startZ, &depth);
    if (colliderID >= 0) {
        if (depth <= minDepth) {
            hitYBehindRight = startY;
            NpcHitQueryColliderID = colliderID;
            D_8010C968 = colliderID;
            D_8010C94C = hitYBehindRight;
            minDepth = depth;
            hasCollision = TRUE;
        }
    }

    theta = DEG_TO_RAD(clamp_angle(yaw - 120.0f));
    sinTheta = sin_rad(theta);
    cosTheta = cos_rad(theta);
    deltaX = radius * sinTheta;
    deltaZ = -radius * cosTheta;

    startX = x + deltaX;
    startY = y;
    startZ = z + deltaZ;
    depth = originalDepth;

    colliderID = npc_raycast_down(ignoreFlags, &startX, &startY, &startZ, &depth);
    if (colliderID >= 0) {
        if (depth <= minDepth) {
            hitYBehindLeft = startY;
            NpcHitQueryColliderID = colliderID;
            D_8010C968 = colliderID;
            D_8010C974 = hitYBehindLeft;
            minDepth = depth;
            hasCollision = TRUE;
        }
    }

    if (hasCollision) {
        *posY = MAX(hitYBehindRight, hitYAhead);
        if (*posY < hitYBehindLeft) {
            *posY = hitYBehindLeft;
        }
        *hitDepth = minDepth;
        return TRUE;
    }

    *posY = startY;
    return FALSE;
}


### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_80252F30
/* 181810 80252F30 27BDFFB8 */  addiu     $sp, $sp, -0x48
/* 181814 80252F34 AFB3003C */  sw        $s3, 0x3C($sp)
/* 181818 80252F38 0080982D */  daddu     $s3, $a0, $zero
/* 18181C 80252F3C AFBF0044 */  sw        $ra, 0x44($sp)
/* 181820 80252F40 AFB40040 */  sw        $s4, 0x40($sp)
/* 181824 80252F44 AFB20038 */  sw        $s2, 0x38($sp)
/* 181828 80252F48 AFB10034 */  sw        $s1, 0x34($sp)
dgb_01_SmashBridgesSkeleton:
/* 18182C 80252F4C AFB00030 */  sw        $s0, 0x30($sp)
/* 181830 80252F50 10A00075 */  beqz      $a1, .L80253128
/* 181834 80252F54 8E71000C */   lw       $s1, 0xC($s3)
/* 181838 80252F58 8E250000 */  lw        $a1, 0x0($s1)
/* 18183C 80252F5C 0C0B1EAF */  jal       evt_get_variable
/* 181840 80252F60 26310004 */   addiu    $s1, $s1, 0x4
/* 181844 80252F64 8E250000 */  lw        $a1, 0x0($s1)
/* 181848 80252F68 26310004 */  addiu     $s1, $s1, 0x4
/* 18184C 80252F6C 0260202D */  daddu     $a0, $s3, $zero
/* 181850 80252F70 0C0B1EAF */  jal       evt_get_variable
/* 181854 80252F74 0040802D */   daddu    $s0, $v0, $zero
/* 181858 80252F78 0040902D */  daddu     $s2, $v0, $zero
/* 18185C 80252F7C 8E250000 */  lw        $a1, 0x0($s1)
/* 181860 80252F80 26310004 */  addiu     $s1, $s1, 0x4
/* 181864 80252F84 0C0B1EAF */  jal       evt_get_variable
/* 181868 80252F88 0260202D */   daddu    $a0, $s3, $zero
/* 18186C 80252F8C 8E250000 */  lw        $a1, 0x0($s1)
/* 181870 80252F90 26310004 */  addiu     $s1, $s1, 0x4
/* 181874 80252F94 0260202D */  daddu     $a0, $s3, $zero
/* 181878 80252F98 0C0B1EAF */  jal       evt_get_variable
/* 18187C 80252F9C 0040A02D */   daddu    $s4, $v0, $zero
/* 181880 80252FA0 3C01802A */  lui       $at, %hi(gSpeakingActorTalkAnim)
/* 181884 80252FA4 AC22FA6C */  sw        $v0, %lo(gSpeakingActorTalkAnim)($at)
/* 181888 80252FA8 8E250000 */  lw        $a1, 0x0($s1)
/* 18188C 80252FAC 0C0B1EAF */  jal       evt_get_variable
/* 181890 80252FB0 0260202D */   daddu    $a0, $s3, $zero
/* 181894 80252FB4 3C01802A */  lui       $at, %hi(gSpeakingActorIdleAnim)
/* 181898 80252FB8 AC22FA70 */  sw        $v0, %lo(gSpeakingActorIdleAnim)($at)
/* 18189C 80252FBC 2402FF81 */  addiu     $v0, $zero, -0x7F
/* 1818A0 80252FC0 16420002 */  bne       $s2, $v0, .L80252FCC
/* 1818A4 80252FC4 00000000 */   nop
/* 1818A8 80252FC8 8E720148 */  lw        $s2, 0x148($s3)
.L80252FCC:
/* 1818AC 80252FCC 0C09A75B */  jal       get_actor
/* 1818B0 80252FD0 0240202D */   daddu    $a0, $s2, $zero
/* 1818B4 80252FD4 0040882D */  daddu     $s1, $v0, $zero
/* 1818B8 80252FD8 0220202D */  daddu     $a0, $s1, $zero
/* 1818BC 80252FDC 0C099117 */  jal       get_actor_part
/* 1818C0 80252FE0 0280282D */   daddu    $a1, $s4, $zero
/* 1818C4 80252FE4 0040902D */  daddu     $s2, $v0, $zero
/* 1818C8 80252FE8 86230150 */  lh        $v1, 0x150($s1)
/* 1818CC 80252FEC C6200144 */  lwc1      $f0, 0x144($s1)
/* 1818D0 80252FF0 8E220000 */  lw        $v0, 0x0($s1)
/* 1818D4 80252FF4 3C01802A */  lui       $at, %hi(gSpeakingActor)
/* 1818D8 80252FF8 AC31FA74 */  sw        $s1, %lo(gSpeakingActor)($at)
/* 1818DC 80252FFC 3C01802A */  lui       $at, %hi(gSpeakingActorPart)
D_80253000:
/* 1818E0 80253000 AC32FA78 */  sw        $s2, %lo(gSpeakingActorPart)($at)
/* 1818E4 80253004 44831000 */  mtc1      $v1, $f2
D_80253008:
/* 1818E8 80253008 00000000 */  nop
/* 1818EC 8025300C 468010A0 */  cvt.s.w   $f2, $f2
D_80253010:
/* 1818F0 80253010 30428000 */  andi      $v0, $v0, 0x8000
/* 1818F4 80253014 1440000D */  bnez      $v0, .L8025304C
D_80253018:
/* 1818F8 80253018 46020100 */   add.s    $f4, $f0, $f2
/* 1818FC 8025301C 86220152 */  lh        $v0, 0x152($s1)
D_80253020:
/* 181900 80253020 C6200148 */  lwc1      $f0, 0x148($s1)
/* 181904 80253024 44821000 */  mtc1      $v0, $f2
/* 181908 80253028 00000000 */  nop
/* 18190C 8025302C 468010A0 */  cvt.s.w   $f2, $f2
D_80253030:
/* 181910 80253030 92220191 */  lbu       $v0, 0x191($s1)
/* 181914 80253034 46020000 */  add.s     $f0, $f0, $f2
D_80253038:
/* 181918 80253038 44821000 */  mtc1      $v0, $f2
/* 18191C 8025303C 00000000 */  nop
jtbl_80253040:
/* 181920 80253040 468010A0 */  cvt.s.w   $f2, $f2
/* 181924 80253044 08094C1F */  j         .L8025307C
/* 181928 80253048 46001000 */   add.s    $f0, $f2, $f0
.L8025304C:
/* 18192C 8025304C 86220152 */  lh        $v0, 0x152($s1)
/* 181930 80253050 C6220148 */  lwc1      $f2, 0x148($s1)
/* 181934 80253054 44820000 */  mtc1      $v0, $f0
/* 181938 80253058 00000000 */  nop
/* 18193C 8025305C 46800020 */  cvt.s.w   $f0, $f0
D_80253060:
/* 181940 80253060 92220191 */  lbu       $v0, 0x191($s1)
/* 181944 80253064 46001080 */  add.s     $f2, $f2, $f0
/* 181948 80253068 00021042 */  srl       $v0, $v0, 1
/* 18194C 8025306C 44820000 */  mtc1      $v0, $f0
/* 181950 80253070 00000000 */  nop
/* 181954 80253074 46800020 */  cvt.s.w   $f0, $f0
/* 181958 80253078 46001000 */  add.s     $f0, $f2, $f0
.L8025307C:
/* 18195C 8025307C 24040001 */  addiu     $a0, $zero, 0x1
/* 181960 80253080 44052000 */  mfc1      $a1, $f4
/* 181964 80253084 44060000 */  mfc1      $a2, $f0
/* 181968 80253088 86230154 */  lh        $v1, 0x154($s1)
/* 18196C 8025308C C622014C */  lwc1      $f2, 0x14C($s1)
/* 181970 80253090 27A20020 */  addiu     $v0, $sp, 0x20
/* 181974 80253094 AFA20010 */  sw        $v0, 0x10($sp)
/* 181978 80253098 44830000 */  mtc1      $v1, $f0
/* 18197C 8025309C 00000000 */  nop
/* 181980 802530A0 46800020 */  cvt.s.w   $f0, $f0
/* 181984 802530A4 46001080 */  add.s     $f2, $f2, $f0
/* 181988 802530A8 27A20024 */  addiu     $v0, $sp, 0x24
/* 18198C 802530AC AFA20014 */  sw        $v0, 0x14($sp)
/* 181990 802530B0 44071000 */  mfc1      $a3, $f2
/* 181994 802530B4 27A20028 */  addiu     $v0, $sp, 0x28
/* 181998 802530B8 0C00B94E */  jal       get_screen_coords
/* 18199C 802530BC AFA20018 */   sw       $v0, 0x18($sp)
/* 1819A0 802530C0 0200202D */  daddu     $a0, $s0, $zero
/* 1819A4 802530C4 3C05802A */  lui       $a1, %hi(gSpeakingActorPrintIsDone)
/* 1819A8 802530C8 24A5FA68 */  addiu     $a1, $a1, %lo(gSpeakingActorPrintIsDone)
/* 1819AC 802530CC 0C049640 */  jal       msg_get_printer_for_msg
/* 1819B0 802530D0 ACA00000 */   sw       $zero, 0x0($a1)
/* 1819B4 802530D4 8FA50020 */  lw        $a1, 0x20($sp)
/* 1819B8 802530D8 8FA60024 */  lw        $a2, 0x24($sp)
/* 1819BC 802530DC 0040202D */  daddu     $a0, $v0, $zero
/* 1819C0 802530E0 3C01802A */  lui       $at, %hi(gSpeakingActorPrintCtx)
/* 1819C4 802530E4 AC24FA60 */  sw        $a0, %lo(gSpeakingActorPrintCtx)($at)
/* 1819C8 802530E8 0C0496AE */  jal       msg_printer_set_origin_pos
/* 1819CC 802530EC 00000000 */   nop
/* 1819D0 802530F0 3C03800A */  lui       $v1, %hi(gOverrideFlags)
/* 1819D4 802530F4 2463A650 */  addiu     $v1, $v1, %lo(gOverrideFlags)
/* 1819D8 802530F8 AE600070 */  sw        $zero, 0x70($s3)
/* 1819DC 802530FC 8C620000 */  lw        $v0, 0x0($v1)
/* 1819E0 80253100 3C06802A */  lui       $a2, %hi(gSpeakingActorTalkAnim)
/* 1819E4 80253104 8CC6FA6C */  lw        $a2, %lo(gSpeakingActorTalkAnim)($a2)
/* 1819E8 80253108 34420010 */  ori       $v0, $v0, 0x10
/* 1819EC 8025310C 04C00004 */  bltz      $a2, .L80253120
/* 1819F0 80253110 AC620000 */   sw       $v0, 0x0($v1)
/* 1819F4 80253114 0220202D */  daddu     $a0, $s1, $zero
/* 1819F8 80253118 0C098F82 */  jal       func_80263E08
/* 1819FC 8025311C 0240282D */   daddu    $a1, $s2, $zero
.L80253120:
/* 181A00 80253120 0C03A6D5 */  jal       increment_status_bar_disabled
/* 181A04 80253124 00000000 */   nop
.L80253128:
/* 181A08 80253128 8E620070 */  lw        $v0, 0x70($s3)
/* 181A0C 8025312C 14400060 */  bnez      $v0, .L802532B0
/* 181A10 80253130 0000102D */   daddu    $v0, $zero, $zero
/* 181A14 80253134 3C11802A */  lui       $s1, %hi(gSpeakingActor)
/* 181A18 80253138 8E31FA74 */  lw        $s1, %lo(gSpeakingActor)($s1)
/* 181A1C 8025313C 3C12802A */  lui       $s2, %hi(gSpeakingActorPart)
dgb_01_D_80253140_C109C0:
/* 181A20 80253140 8E52FA78 */  lw        $s2, %lo(gSpeakingActorPart)($s2)
/* 181A24 80253144 86220150 */  lh        $v0, 0x150($s1)
dgb_01_D_80253148_C109C8:
/* 181A28 80253148 C6200144 */  lwc1      $f0, 0x144($s1)
/* 181A2C 8025314C 44821000 */  mtc1      $v0, $f2
/* 181A30 80253150 00000000 */  nop
/* 181A34 80253154 468010A0 */  cvt.s.w   $f2, $f2
dgb_01_pad_2:
/* 181A38 80253158 8E220000 */  lw        $v0, 0x0($s1)
/* 181A3C 8025315C 30428000 */  andi      $v0, $v0, 0x8000
dgb_01_D_80253160_C109E0:
/* 181A40 80253160 1440000D */  bnez      $v0, .L80253198
/* 181A44 80253164 46020100 */   add.s    $f4, $f0, $f2
/* 181A48 80253168 86220152 */  lh        $v0, 0x152($s1)
/* 181A4C 8025316C C6200148 */  lwc1      $f0, 0x148($s1)
/* 181A50 80253170 44821000 */  mtc1      $v0, $f2
/* 181A54 80253174 00000000 */  nop
/* 181A58 80253178 468010A0 */  cvt.s.w   $f2, $f2
/* 181A5C 8025317C 92220191 */  lbu       $v0, 0x191($s1)
/* 181A60 80253180 46020000 */  add.s     $f0, $f0, $f2
/* 181A64 80253184 44821000 */  mtc1      $v0, $f2
/* 181A68 80253188 00000000 */  nop
/* 181A6C 8025318C 468010A0 */  cvt.s.w   $f2, $f2
/* 181A70 80253190 08094C72 */  j         .L802531C8
/* 181A74 80253194 46001000 */   add.s    $f0, $f2, $f0
.L80253198:
/* 181A78 80253198 86220152 */  lh        $v0, 0x152($s1)
/* 181A7C 8025319C C6220148 */  lwc1      $f2, 0x148($s1)
dgb_01_D_802531A0_C10A20:
/* 181A80 802531A0 44820000 */  mtc1      $v0, $f0
/* 181A84 802531A4 00000000 */  nop
/* 181A88 802531A8 46800020 */  cvt.s.w   $f0, $f0
/* 181A8C 802531AC 92220191 */  lbu       $v0, 0x191($s1)
/* 181A90 802531B0 46001080 */  add.s     $f2, $f2, $f0
/* 181A94 802531B4 00021042 */  srl       $v0, $v0, 1
/* 181A98 802531B8 44820000 */  mtc1      $v0, $f0
/* 181A9C 802531BC 00000000 */  nop
/* 181AA0 802531C0 46800020 */  cvt.s.w   $f0, $f0
/* 181AA4 802531C4 46001000 */  add.s     $f0, $f2, $f0
.L802531C8:
/* 181AA8 802531C8 24040001 */  addiu     $a0, $zero, 0x1
/* 181AAC 802531CC 44052000 */  mfc1      $a1, $f4
/* 181AB0 802531D0 44060000 */  mfc1      $a2, $f0
/* 181AB4 802531D4 86230154 */  lh        $v1, 0x154($s1)
/* 181AB8 802531D8 C622014C */  lwc1      $f2, 0x14C($s1)
/* 181ABC 802531DC 27A20020 */  addiu     $v0, $sp, 0x20
dgb_01_D_802531E0_C10A60:
/* 181AC0 802531E0 AFA20010 */  sw        $v0, 0x10($sp)
/* 181AC4 802531E4 44830000 */  mtc1      $v1, $f0
/* 181AC8 802531E8 00000000 */  nop
/* 181ACC 802531EC 46800020 */  cvt.s.w   $f0, $f0
/* 181AD0 802531F0 46001080 */  add.s     $f2, $f2, $f0
/* 181AD4 802531F4 27A20024 */  addiu     $v0, $sp, 0x24
/* 181AD8 802531F8 AFA20014 */  sw        $v0, 0x14($sp)
/* 181ADC 802531FC 44071000 */  mfc1      $a3, $f2
/* 181AE0 80253200 27A20028 */  addiu     $v0, $sp, 0x28
/* 181AE4 80253204 0C00B94E */  jal       get_screen_coords
/* 181AE8 80253208 AFA20018 */   sw       $v0, 0x18($sp)
/* 181AEC 8025320C 3C10802A */  lui       $s0, %hi(gSpeakingActorPrintCtx)
/* 181AF0 80253210 2610FA60 */  addiu     $s0, $s0, %lo(gSpeakingActorPrintCtx)
/* 181AF4 80253214 8E040000 */  lw        $a0, 0x0($s0)
/* 181AF8 80253218 8FA50020 */  lw        $a1, 0x20($sp)
/* 181AFC 8025321C 0C0496AE */  jal       msg_printer_set_origin_pos
dgb_01_D_80253220_C10AA0:
/* 181B00 80253220 8FA60024 */   lw       $a2, 0x24($sp)
/* 181B04 80253224 8E020000 */  lw        $v0, 0x0($s0)
/* 181B08 80253228 8C4304FC */  lw        $v1, 0x4FC($v0)
/* 181B0C 8025322C 30620040 */  andi      $v0, $v1, 0x40
/* 181B10 80253230 10400005 */  beqz      $v0, .L80253248
/* 181B14 80253234 30620080 */   andi     $v0, $v1, 0x80
/* 181B18 80253238 0C03A6CC */  jal       decrement_status_bar_disabled
/* 181B1C 8025323C 00000000 */   nop
/* 181B20 80253240 08094CAC */  j         .L802532B0
/* 181B24 80253244 24020001 */   addiu    $v0, $zero, 0x1
.L80253248:
/* 181B28 80253248 10400005 */  beqz      $v0, dgb_01_D_80253260_C10AE0
/* 181B2C 8025324C 00000000 */   nop
/* 181B30 80253250 3C06802A */  lui       $a2, %hi(gSpeakingActorTalkAnim)
/* 181B34 80253254 8CC6FA6C */  lw        $a2, %lo(gSpeakingActorTalkAnim)($a2)
/* 181B38 80253258 08094C9A */  j         .L80253268
/* 181B3C 8025325C 00000000 */   nop
dgb_01_D_80253260_C10AE0:
/* 181B40 80253260 3C06802A */  lui       $a2, %hi(gSpeakingActorIdleAnim)
/* 181B44 80253264 8CC6FA70 */  lw        $a2, %lo(gSpeakingActorIdleAnim)($a2)
.L80253268:
/* 181B48 80253268 04C00003 */  bltz      $a2, .L80253278
D_8025326C:
/* 181B4C 8025326C 0220202D */   daddu    $a0, $s1, $zero
/* 181B50 80253270 0C098F82 */  jal       func_80263E08
/* 181B54 80253274 0240282D */   daddu    $a1, $s2, $zero
.L80253278:
/* 181B58 80253278 3C03802A */  lui       $v1, %hi(gSpeakingActorPrintIsDone)
/* 181B5C 8025327C 8C63FA68 */  lw        $v1, %lo(gSpeakingActorPrintIsDone)($v1)
/* 181B60 80253280 24020001 */  addiu     $v0, $zero, 0x1
/* 181B64 80253284 1462000A */  bne       $v1, $v0, .L802532B0
/* 181B68 80253288 0000102D */   daddu    $v0, $zero, $zero
/* 181B6C 8025328C 0C03A6CC */  jal       decrement_status_bar_disabled
/* 181B70 80253290 00000000 */   nop
/* 181B74 80253294 24020001 */  addiu     $v0, $zero, 0x1
D_80253298:
/* 181B78 80253298 3C03800A */  lui       $v1, %hi(gOverrideFlags)
/* 181B7C 8025329C 2463A650 */  addiu     $v1, $v1, %lo(gOverrideFlags)
dgb_01_D_802532A0_C10B20:
/* 181B80 802532A0 8C640000 */  lw        $a0, 0x0($v1)
/* 181B84 802532A4 2405FFEF */  addiu     $a1, $zero, -0x11
/* 181B88 802532A8 00852024 */  and       $a0, $a0, $a1
/* 181B8C 802532AC AC640000 */  sw        $a0, 0x0($v1)
.L802532B0:
/* 181B90 802532B0 8FBF0044 */  lw        $ra, 0x44($sp)
/* 181B94 802532B4 8FB40040 */  lw        $s4, 0x40($sp)
/* 181B98 802532B8 8FB3003C */  lw        $s3, 0x3C($sp)
/* 181B9C 802532BC 8FB20038 */  lw        $s2, 0x38($sp)
/* 181BA0 802532C0 8FB10034 */  lw        $s1, 0x34($sp)
/* 181BA4 802532C4 8FB00030 */  lw        $s0, 0x30($sp)
/* 181BA8 802532C8 03E00008 */  jr        $ra
/* 181BAC 802532CC 27BD0048 */   addiu    $sp, $sp, 0x48

### DECOMPILED C INSTRUCTIONS:

ApiStatus ActorSpeak(Evt* script, s32 isInitialCall) {
    Bytecode* args = script->ptrReadPos;
    Actor* actor;
    ActorPart* part;
    s32 msgID;
    s32 actorID;
    s32 partID;
    s32 anim;

    f32 headX, headY, headZ;
    s32 screenX, screenY, screenZ;
    s32 msgID2;

    if (isInitialCall) {
        msgID = evt_get_variable(script, *args++);
        actorID = evt_get_variable(script, *args++);
        partID = evt_get_variable(script, *args++);
        gSpeakingActorTalkAnim = evt_get_variable(script, *args++);
        gSpeakingActorIdleAnim = evt_get_variable(script, *args++);
        msgID2 = msgID;

        if (actorID == ACTOR_SELF) {
            actorID = script->owner1.actorID;
        }

        actor = get_actor(actorID);
        part = get_actor_part(actor, partID);
        gSpeakingActor = actor;
        gSpeakingActorPart = part;

        headX = actor->currentPos.x + actor->headOffset.x;
        if (!(actor->flags & ACTOR_FLAG_8000)) {
            headY = actor->size.y + (actor->currentPos.y + actor->headOffset.y);
        } else {
            headY = actor->currentPos.y + actor->headOffset.y + (actor->size.y / 2);
        }

        headZ = actor->currentPos.z + actor->headOffset.z;
        get_screen_coords(CAM_BATTLE, headX, headY, headZ, &screenX, &screenY, &screenZ);

        gSpeakingActorPrintIsDone = FALSE;
        gSpeakingActorPrintCtx = msg_get_printer_for_msg(msgID2, &gSpeakingActorPrintIsDone);
        msg_printer_set_origin_pos(gSpeakingActorPrintCtx, screenX, screenY);

        script->functionTemp[0] = 0;
        gOverrideFlags |= GLOBAL_OVERRIDES_10;
        if (gSpeakingActorTalkAnim >= 0) {
            func_80263E08(actor, part, gSpeakingActorTalkAnim);
        }
        increment_status_bar_disabled();
    }

    if (script->functionTemp[0] == 0) {
        actor = gSpeakingActor;
        part = gSpeakingActorPart;

        headX = actor->currentPos.x + actor->headOffset.x;
        if (!(actor->flags & ACTOR_FLAG_8000)) {
            headY = actor->size.y + (actor->currentPos.y + actor->headOffset.y);
        } else {
            headY = actor->headOffset.y;
            headY = actor->currentPos.y + actor->headOffset.y + (actor->size.y / 2);
        }

        headZ = actor->currentPos.z + actor->headOffset.z;
        get_screen_coords(CAM_BATTLE, headX, headY, headZ, &screenX, &screenY, &screenZ);

        msg_printer_set_origin_pos(gSpeakingActorPrintCtx, screenX, screenY);

        if (gSpeakingActorPrintCtx->stateFlags & MSG_STATE_FLAG_40) {
            decrement_status_bar_disabled();
            return ApiStatus_DONE1;
        }

        if (gSpeakingActorPrintCtx->stateFlags & MSG_STATE_FLAG_80) { // "is talking" flag
            anim = gSpeakingActorTalkAnim;
        } else {
            anim = gSpeakingActorIdleAnim;
        }

        if (anim >= 0) {
            func_80263E08(actor, part, anim);
        }

        if (gSpeakingActorPrintIsDone == TRUE) {
            decrement_status_bar_disabled();
            gOverrideFlags &= ~GLOBAL_OVERRIDES_10;
            return ApiStatus_DONE1;
        }
    }
    return ApiStatus_BLOCK;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel BringPartnerOut
/* F3F68 802CF5B8 27BDFF98 */  addiu     $sp, $sp, -0x68
/* F3F6C 802CF5BC AFB10024 */  sw        $s1, 0x24($sp)
/* F3F70 802CF5C0 AFB20028 */  sw        $s2, 0x28($sp)
/* F3F74 802CF5C4 3C128011 */  lui       $s2, %hi(gPlayerStatus)
/* F3F78 802CF5C8 2652EFC8 */  addiu     $s2, $s2, %lo(gPlayerStatus)
/* F3F7C 802CF5CC AFBF0034 */  sw        $ra, 0x34($sp)
/* F3F80 802CF5D0 AFB40030 */  sw        $s4, 0x30($sp)
/* F3F84 802CF5D4 AFB3002C */  sw        $s3, 0x2C($sp)
/* F3F88 802CF5D8 AFB00020 */  sw        $s0, 0x20($sp)
/* F3F8C 802CF5DC F7BE0060 */  sdc1      $f30, 0x60($sp)
/* F3F90 802CF5E0 F7BC0058 */  sdc1      $f28, 0x58($sp)
/* F3F94 802CF5E4 F7BA0050 */  sdc1      $f26, 0x50($sp)
/* F3F98 802CF5E8 F7B80048 */  sdc1      $f24, 0x48($sp)
/* F3F9C 802CF5EC F7B60040 */  sdc1      $f22, 0x40($sp)
/* F3FA0 802CF5F0 F7B40038 */  sdc1      $f20, 0x38($sp)
/* F3FA4 802CF5F4 8C82000C */  lw        $v0, 0xC($a0)
/* F3FA8 802CF5F8 10A00089 */  beqz      $a1, .L802CF820
/* F3FAC 802CF5FC 27B10010 */   addiu    $s1, $sp, 0x10
/* F3FB0 802CF600 8C450000 */  lw        $a1, 0x0($v0)
/* F3FB4 802CF604 0C0B1EAF */  jal       evt_get_variable
/* F3FB8 802CF608 00000000 */   nop
/* F3FBC 802CF60C 3C038011 */  lui       $v1, %hi(gPlayerData)
/* F3FC0 802CF610 2463F290 */  addiu     $v1, $v1, %lo(gPlayerData)
/* F3FC4 802CF614 80630012 */  lb        $v1, 0x12($v1)
/* F3FC8 802CF618 3C14802E */  lui       $s4, %hi(wExtraPartnerID)
/* F3FCC 802CF61C 2694AE40 */  addiu     $s4, $s4, %lo(wExtraPartnerID)
/* F3FD0 802CF620 14620004 */  bne       $v1, $v0, .L802CF634
/* F3FD4 802CF624 AE820000 */   sw       $v0, 0x0($s4)
/* F3FD8 802CF628 AE800000 */  sw        $zero, 0x0($s4)
/* F3FDC 802CF62C 080B3E54 */  j         .L802CF950
/* F3FE0 802CF630 24020002 */   addiu    $v0, $zero, 0x2
.L802CF634:
/* F3FE4 802CF634 0C00EABB */  jal       get_npc_unsafe
/* F3FE8 802CF638 2404FFFC */   addiu    $a0, $zero, -0x4
/* F3FEC 802CF63C 0040802D */  daddu     $s0, $v0, $zero
/* F3FF0 802CF640 2402FFFB */  addiu     $v0, $zero, -0x5
/* F3FF4 802CF644 A20200A4 */  sb        $v0, 0xA4($s0)
/* F3FF8 802CF648 8E830000 */  lw        $v1, 0x0($s4)
/* F3FFC 802CF64C 24020100 */  addiu     $v0, $zero, 0x100
/* F4000 802CF650 AFA20010 */  sw        $v0, 0x10($sp)
/* F4004 802CF654 000310C0 */  sll       $v0, $v1, 3
/* F4008 802CF658 00431021 */  addu      $v0, $v0, $v1
/* F400C 802CF65C 00021080 */  sll       $v0, $v0, 2
/* F4010 802CF660 3C018010 */  lui       $at, %hi(gPartnerAnimations + 0x10)
/* F4014 802CF664 00220821 */  addu      $at, $at, $v0
/* F4018 802CF668 8C228358 */  lw        $v0, %lo(gPartnerAnimations + 0x10)($at)
/* F401C 802CF66C 0220202D */  daddu     $a0, $s1, $zero
/* F4020 802CF670 AFA00018 */  sw        $zero, 0x18($sp)
/* F4024 802CF674 AFA0001C */  sw        $zero, 0x1C($sp)
/* F4028 802CF678 0C00E211 */  jal       create_basic_npc
/* F402C 802CF67C AFA20014 */   sw       $v0, 0x14($sp)
/* F4030 802CF680 0040202D */  daddu     $a0, $v0, $zero
/* F4034 802CF684 3C01802E */  lui       $at, %hi(wExtraPartnerNpcID)
/* F4038 802CF688 AC24AE44 */  sw        $a0, %lo(wExtraPartnerNpcID)($at)
/* F403C 802CF68C 0C00E2B7 */  jal       get_npc_by_index
/* F4040 802CF690 2413000A */   addiu    $s3, $zero, 0xA
/* F4044 802CF694 0040882D */  daddu     $s1, $v0, $zero
/* F4048 802CF698 2402FFFC */  addiu     $v0, $zero, -0x4
/* F404C 802CF69C A63300A6 */  sh        $s3, 0xA6($s1)
/* F4050 802CF6A0 A63300A8 */  sh        $s3, 0xA8($s1)
/* F4054 802CF6A4 A22200A4 */  sb        $v0, 0xA4($s1)
/* F4058 802CF6A8 AE200054 */  sw        $zero, 0x54($s1)
/* F405C 802CF6AC AE200058 */  sw        $zero, 0x58($s1)
/* F4060 802CF6B0 AE20005C */  sw        $zero, 0x5C($s1)
/* F4064 802CF6B4 C61A0038 */  lwc1      $f26, 0x38($s0)
/* F4068 802CF6B8 3C0141F0 */  lui       $at, (0x41F00000 >> 16)
/* F406C 802CF6BC 44810000 */  mtc1      $at, $f0
/* F4070 802CF6C0 E63A0060 */  swc1      $f26, 0x60($s1)
/* F4074 802CF6C4 C65E002C */  lwc1      $f30, 0x2C($s2)
/* F4078 802CF6C8 E63E0064 */  swc1      $f30, 0x64($s1)
/* F407C 802CF6CC C6160040 */  lwc1      $f22, 0x40($s0)
/* F4080 802CF6D0 4600B580 */  add.s     $f22, $f22, $f0
/* F4084 802CF6D4 4406D000 */  mfc1      $a2, $f26
/* F4088 802CF6D8 E6360068 */  swc1      $f22, 0x68($s1)
/* F408C 802CF6DC C6580028 */  lwc1      $f24, 0x28($s2)
/* F4090 802CF6E0 4407B000 */  mfc1      $a3, $f22
/* F4094 802CF6E4 E6380038 */  swc1      $f24, 0x38($s1)
/* F4098 802CF6E8 964200B0 */  lhu       $v0, 0xB0($s2)
/* F409C 802CF6EC C642002C */  lwc1      $f2, 0x2C($s2)
/* F40A0 802CF6F0 00021400 */  sll       $v0, $v0, 16
/* F40A4 802CF6F4 00021C03 */  sra       $v1, $v0, 16
/* F40A8 802CF6F8 000217C2 */  srl       $v0, $v0, 31
/* F40AC 802CF6FC 00621821 */  addu      $v1, $v1, $v0
/* F40B0 802CF700 00031843 */  sra       $v1, $v1, 1
/* F40B4 802CF704 44830000 */  mtc1      $v1, $f0
/* F40B8 802CF708 00000000 */  nop
/* F40BC 802CF70C 46800020 */  cvt.s.w   $f0, $f0
/* F40C0 802CF710 46001700 */  add.s     $f28, $f2, $f0
/* F40C4 802CF714 3C014080 */  lui       $at, (0x40800000 >> 16)
/* F40C8 802CF718 44810000 */  mtc1      $at, $f0
/* F40CC 802CF71C 3C013FCC */  lui       $at, (0x3FCCCCCD >> 16)
/* F40D0 802CF720 3421CCCD */  ori       $at, $at, (0x3FCCCCCD & 0xFFFF)
/* F40D4 802CF724 44811000 */  mtc1      $at, $f2
/* F40D8 802CF728 E63C003C */  swc1      $f28, 0x3C($s1)
/* F40DC 802CF72C C6540030 */  lwc1      $f20, 0x30($s2)
/* F40E0 802CF730 4600C306 */  mov.s     $f12, $f24
/* F40E4 802CF734 E6200018 */  swc1      $f0, 0x18($s1)
/* F40E8 802CF738 E6220014 */  swc1      $f2, 0x14($s1)
/* F40EC 802CF73C 4600A386 */  mov.s     $f14, $f20
/* F40F0 802CF740 0C00A7B5 */  jal       dist2D
/* F40F4 802CF744 E6340040 */   swc1     $f20, 0x40($s1)
/* F40F8 802CF748 4600C306 */  mov.s     $f12, $f24
/* F40FC 802CF74C 4406D000 */  mfc1      $a2, $f26
/* F4100 802CF750 4407B000 */  mfc1      $a3, $f22
/* F4104 802CF754 4600A386 */  mov.s     $f14, $f20
/* F4108 802CF758 0C00A720 */  jal       atan2
/* F410C 802CF75C E6200010 */   swc1     $f0, 0x10($s1)
/* F4110 802CF760 C6220010 */  lwc1      $f2, 0x10($s1)
/* F4114 802CF764 C6240018 */  lwc1      $f4, 0x18($s1)
/* F4118 802CF768 3C108010 */  lui       $s0, %hi(gPartnerAnimations)
/* F411C 802CF76C 26108348 */  addiu     $s0, $s0, %lo(gPartnerAnimations)
/* F4120 802CF770 E620000C */  swc1      $f0, 0xC($s1)
/* F4124 802CF774 46041083 */  div.s     $f2, $f2, $f4
/* F4128 802CF778 4600118D */  trunc.w.s $f6, $f2
/* F412C 802CF77C 44023000 */  mfc1      $v0, $f6
/* F4130 802CF780 00000000 */  nop
/* F4134 802CF784 A622008E */  sh        $v0, 0x8E($s1)
/* F4138 802CF788 00021400 */  sll       $v0, $v0, 16
/* F413C 802CF78C 00021403 */  sra       $v0, $v0, 16
/* F4140 802CF790 2842000A */  slti      $v0, $v0, 0xA
/* F4144 802CF794 10400007 */  beqz      $v0, .L802CF7B4
/* F4148 802CF798 00000000 */   nop
/* F414C 802CF79C 3C014120 */  lui       $at, (0x41200000 >> 16)
/* F4150 802CF7A0 44811000 */  mtc1      $at, $f2
/* F4154 802CF7A4 C6200010 */  lwc1      $f0, 0x10($s1)
/* F4158 802CF7A8 A633008E */  sh        $s3, 0x8E($s1)
/* F415C 802CF7AC 46020003 */  div.s     $f0, $f0, $f2
/* F4160 802CF7B0 E6200018 */  swc1      $f0, 0x18($s1)
.L802CF7B4:
/* F4164 802CF7B4 8622008E */  lh        $v0, 0x8E($s1)
/* F4168 802CF7B8 C6200014 */  lwc1      $f0, 0x14($s1)
/* F416C 802CF7BC 44822000 */  mtc1      $v0, $f4
/* F4170 802CF7C0 00000000 */  nop
/* F4174 802CF7C4 46802120 */  cvt.s.w   $f4, $f4
/* F4178 802CF7C8 46040002 */  mul.s     $f0, $f0, $f4
/* F417C 802CF7CC 00000000 */  nop
/* F4180 802CF7D0 46040002 */  mul.s     $f0, $f0, $f4
/* F4184 802CF7D4 00000000 */  nop
/* F4188 802CF7D8 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* F418C 802CF7DC 44811000 */  mtc1      $at, $f2
/* F4190 802CF7E0 00000000 */  nop
/* F4194 802CF7E4 46020002 */  mul.s     $f0, $f0, $f2
/* F4198 802CF7E8 00000000 */  nop
/* F419C 802CF7EC 8E830000 */  lw        $v1, 0x0($s4)
/* F41A0 802CF7F0 461CF081 */  sub.s     $f2, $f30, $f28
/* F41A4 802CF7F4 000310C0 */  sll       $v0, $v1, 3
/* F41A8 802CF7F8 00431021 */  addu      $v0, $v0, $v1
/* F41AC 802CF7FC 46001080 */  add.s     $f2, $f2, $f0
/* F41B0 802CF800 00021080 */  sll       $v0, $v0, 2
/* F41B4 802CF804 00501021 */  addu      $v0, $v0, $s0
/* F41B8 802CF808 46041083 */  div.s     $f2, $f2, $f4
/* F41BC 802CF80C E622001C */  swc1      $f2, 0x1C($s1)
/* F41C0 802CF810 8C430004 */  lw        $v1, 0x4($v0)
/* F41C4 802CF814 0000102D */  daddu     $v0, $zero, $zero
/* F41C8 802CF818 080B3E54 */  j         .L802CF950
/* F41CC 802CF81C AE230028 */   sw       $v1, 0x28($s1)
.L802CF820:
/* F41D0 802CF820 3C04802E */  lui       $a0, %hi(wExtraPartnerNpcID)
/* F41D4 802CF824 8C84AE44 */  lw        $a0, %lo(wExtraPartnerNpcID)($a0)
/* F41D8 802CF828 0C00E2B7 */  jal       get_npc_by_index
/* F41DC 802CF82C 00000000 */   nop
/* F41E0 802CF830 0040882D */  daddu     $s1, $v0, $zero
/* F41E4 802CF834 C620001C */  lwc1      $f0, 0x1C($s1)
/* F41E8 802CF838 C6220014 */  lwc1      $f2, 0x14($s1)
/* F41EC 802CF83C 46020001 */  sub.s     $f0, $f0, $f2
/* F41F0 802CF840 C622003C */  lwc1      $f2, 0x3C($s1)
/* F41F4 802CF844 46001080 */  add.s     $f2, $f2, $f0
/* F41F8 802CF848 4480A000 */  mtc1      $zero, $f20
/* F41FC 802CF84C 00000000 */  nop
/* F4200 802CF850 4614003E */  c.le.s    $f0, $f20
/* F4204 802CF854 E620001C */  swc1      $f0, 0x1C($s1)
/* F4208 802CF858 4500000A */  bc1f      .L802CF884
/* F420C 802CF85C E622003C */   swc1     $f2, 0x3C($s1)
/* F4210 802CF860 3C02802E */  lui       $v0, %hi(wExtraPartnerID)
/* F4214 802CF864 8C42AE40 */  lw        $v0, %lo(wExtraPartnerID)($v0)
/* F4218 802CF868 000218C0 */  sll       $v1, $v0, 3
/* F421C 802CF86C 00621821 */  addu      $v1, $v1, $v0
/* F4220 802CF870 00031880 */  sll       $v1, $v1, 2
/* F4224 802CF874 3C028010 */  lui       $v0, %hi(gPartnerAnimations + 0x8)
/* F4228 802CF878 00431021 */  addu      $v0, $v0, $v1
/* F422C 802CF87C 8C428350 */  lw        $v0, %lo(gPartnerAnimations + 0x8)($v0)
/* F4230 802CF880 AE220028 */  sw        $v0, 0x28($s1)
.L802CF884:
/* F4234 802CF884 8E250018 */  lw        $a1, 0x18($s1)
/* F4238 802CF888 8E26000C */  lw        $a2, 0xC($s1)
/* F423C 802CF88C 0C00EA95 */  jal       npc_move_heading
/* F4240 802CF890 0220202D */   daddu    $a0, $s1, $zero
/* F4244 802CF894 8622008E */  lh        $v0, 0x8E($s1)
/* F4248 802CF898 3C014120 */  lui       $at, (0x41200000 >> 16)
/* F424C 802CF89C 44811000 */  mtc1      $at, $f2
/* F4250 802CF8A0 44820000 */  mtc1      $v0, $f0
/* F4254 802CF8A4 00000000 */  nop
/* F4258 802CF8A8 46800020 */  cvt.s.w   $f0, $f0
/* F425C 802CF8AC 4600103C */  c.lt.s    $f2, $f0
/* F4260 802CF8B0 00000000 */  nop
/* F4264 802CF8B4 45030001 */  bc1tl     .L802CF8BC
/* F4268 802CF8B8 46001006 */   mov.s    $f0, $f2
.L802CF8BC:
/* F426C 802CF8BC 9622008E */  lhu       $v0, 0x8E($s1)
/* F4270 802CF8C0 46001001 */  sub.s     $f0, $f2, $f0
/* F4274 802CF8C4 2442FFFF */  addiu     $v0, $v0, -0x1
/* F4278 802CF8C8 A622008E */  sh        $v0, 0x8E($s1)
/* F427C 802CF8CC 00021400 */  sll       $v0, $v0, 16
/* F4280 802CF8D0 46020003 */  div.s     $f0, $f0, $f2
/* F4284 802CF8D4 E6200054 */  swc1      $f0, 0x54($s1)
/* F4288 802CF8D8 46000086 */  mov.s     $f2, $f0
/* F428C 802CF8DC E6200058 */  swc1      $f0, 0x58($s1)
/* F4290 802CF8E0 04400003 */  bltz      $v0, .L802CF8F0
/* F4294 802CF8E4 E622005C */   swc1     $f2, 0x5C($s1)
/* F4298 802CF8E8 080B3E54 */  j         .L802CF950
/* F429C 802CF8EC 0000102D */   daddu    $v0, $zero, $zero
.L802CF8F0:
/* F42A0 802CF8F0 3C03802E */  lui       $v1, %hi(wExtraPartnerID)
/* F42A4 802CF8F4 8C63AE40 */  lw        $v1, %lo(wExtraPartnerID)($v1)
/* F42A8 802CF8F8 C6240064 */  lwc1      $f4, 0x64($s1)
/* F42AC 802CF8FC C622000C */  lwc1      $f2, 0xC($s1)
/* F42B0 802CF900 3C014334 */  lui       $at, (0x43340000 >> 16)
/* F42B4 802CF904 44816000 */  mtc1      $at, $f12
/* F42B8 802CF908 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* F42BC 802CF90C 44810000 */  mtc1      $at, $f0
/* F42C0 802CF910 000310C0 */  sll       $v0, $v1, 3
/* F42C4 802CF914 00431021 */  addu      $v0, $v0, $v1
/* F42C8 802CF918 00021080 */  sll       $v0, $v0, 2
/* F42CC 802CF91C 3C018010 */  lui       $at, %hi(gPartnerAnimations + 0x14)
/* F42D0 802CF920 00220821 */  addu      $at, $at, $v0
/* F42D4 802CF924 8C22835C */  lw        $v0, %lo(gPartnerAnimations + 0x14)($at)
/* F42D8 802CF928 460C1300 */  add.s     $f12, $f2, $f12
/* F42DC 802CF92C E634001C */  swc1      $f20, 0x1C($s1)
/* F42E0 802CF930 E624003C */  swc1      $f4, 0x3C($s1)
/* F42E4 802CF934 E6200054 */  swc1      $f0, 0x54($s1)
/* F42E8 802CF938 E6200058 */  swc1      $f0, 0x58($s1)
/* F42EC 802CF93C E620005C */  swc1      $f0, 0x5C($s1)
/* F42F0 802CF940 0C00A6C9 */  jal       clamp_angle
/* F42F4 802CF944 AE220028 */   sw       $v0, 0x28($s1)
/* F42F8 802CF948 24020002 */  addiu     $v0, $zero, 0x2
/* F42FC 802CF94C E620000C */  swc1      $f0, 0xC($s1)
.L802CF950:
/* F4300 802CF950 8FBF0034 */  lw        $ra, 0x34($sp)
/* F4304 802CF954 8FB40030 */  lw        $s4, 0x30($sp)
/* F4308 802CF958 8FB3002C */  lw        $s3, 0x2C($sp)
/* F430C 802CF95C 8FB20028 */  lw        $s2, 0x28($sp)
/* F4310 802CF960 8FB10024 */  lw        $s1, 0x24($sp)
/* F4314 802CF964 8FB00020 */  lw        $s0, 0x20($sp)
/* F4318 802CF968 D7BE0060 */  ldc1      $f30, 0x60($sp)
/* F431C 802CF96C D7BC0058 */  ldc1      $f28, 0x58($sp)
/* F4320 802CF970 D7BA0050 */  ldc1      $f26, 0x50($sp)
/* F4324 802CF974 D7B80048 */  ldc1      $f24, 0x48($sp)
/* F4328 802CF978 D7B60040 */  ldc1      $f22, 0x40($sp)
/* F432C 802CF97C D7B40038 */  ldc1      $f20, 0x38($sp)
/* F4330 802CF980 03E00008 */  jr        $ra
/* F4334 802CF984 27BD0068 */   addiu    $sp, $sp, 0x68

### DECOMPILED C INSTRUCTIONS:

s32 BringPartnerOut(Evt* script, s32 isInitialCall) {
    Bytecode* args = script->ptrReadPos;
    NpcBlueprint bp;
    NpcBlueprint* bpPointer = &bp;
    PlayerData* playerData = &gPlayerData;
    PlayerStatus* playerStatus = &gPlayerStatus;
    Npc* partner;
    Npc* npc;
    f32 duration;
    f32 playerZ;
    f32 targetZ;
    f32 playerX;
    f32 targetX;
    f32 targetY;
    f32 playerY;

    if (isInitialCall) {
        wExtraPartnerID = evt_get_variable(script, *args++);
        if (playerData->currentPartner == wExtraPartnerID) {
            wExtraPartnerID = 0;
            return ApiStatus_DONE2;
        }

        partner = get_npc_unsafe(NPC_PARTNER);
        partner->npcID = -5;

        bpPointer->flags = NPC_FLAG_IGNORE_PLAYER_COLLISION;
        bpPointer->initialAnim = gPartnerAnimations[wExtraPartnerID].fly;
        bpPointer->onUpdate = NULL;
        bpPointer->onRender = NULL;

        wExtraPartnerNpcID = create_basic_npc(bpPointer);
        npc = get_npc_by_index(wExtraPartnerNpcID);
        npc->collisionDiameter = 10;
        npc->collisionHeight = 10;
        npc->npcID = NPC_PARTNER;
        npc->scale.x = 0.0f;
        npc->scale.y = 0.0f;
        npc->scale.z = 0.0f;

        npc->moveToPos.x = targetX = partner->pos.x;
        playerY = playerStatus->position.y;
        npc->moveToPos.y = playerStatus->position.y;
        npc->moveToPos.z = targetZ = partner->pos.z + 30.0f;
        npc->pos.x = playerX = playerStatus->position.x;
        npc->pos.y = targetY = playerStatus->position.y + (playerStatus->colliderHeight / 2);
        playerZ = playerStatus->position.z;
        npc->moveSpeed = 4.0f;
        npc->jumpScale = 1.6f;
        npc->pos.z = playerZ;

        npc->planarFlyDist = dist2D(playerX, npc->pos.z, targetX, targetZ);
        npc->yaw = atan2(playerX, playerZ, targetX, targetZ);
        npc->duration = npc->planarFlyDist / npc->moveSpeed;

        if (npc->duration < 10) {
            npc->duration = 10;
            npc->moveSpeed = npc->planarFlyDist / npc->duration;
        }

        npc->jumpVelocity = ((playerY - targetY) + (npc->jumpScale * npc->duration * npc->duration * 0.5f)) / npc->duration;
        npc->currentAnim = gPartnerAnimations[wExtraPartnerID].walk;
        return ApiStatus_BLOCK;
    }

    npc = get_npc_by_index(wExtraPartnerNpcID);
    npc->jumpVelocity -= npc->jumpScale;
    npc->pos.y += npc->jumpVelocity;
    if (npc->jumpVelocity <= 0.0f) {
        npc->currentAnim = gPartnerAnimations[wExtraPartnerID].jump;
    }
    npc_move_heading(npc, npc->moveSpeed, npc->yaw);
    duration = npc->duration;
    if (duration > 10.0f) {
        duration = 10.0f;
    }
    npc->scale.x = (10.0f - duration) / 10.0f;
    npc->scale.y = npc->scale.x;
    npc->scale.z = npc->scale.x;

    npc->duration--;
    if (npc->duration < 0) {
        npc->currentAnim = gPartnerAnimations[wExtraPartnerID].idle;
        npc->jumpVelocity = 0.0f;
        npc->pos.y = npc->moveToPos.y;
        npc->scale.x = 1.0f;
        npc->scale.y = 1.0f;
        npc->scale.z = 1.0f;
        npc->yaw = clamp_angle(npc->yaw + 180.0f);
        return ApiStatus_DONE2;
    }
    return ApiStatus_BLOCK;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_800F16CC
/* 8AB7C 800F16CC 3C028011 */  lui       $v0, %hi(PopupNotBattle)
/* 8AB80 800F16D0 8042D68E */  lb        $v0, %lo(PopupNotBattle)($v0)
/* 8AB84 800F16D4 27BDFFE0 */  addiu     $sp, $sp, -0x20
/* 8AB88 800F16D8 AFBF001C */  sw        $ra, 0x1C($sp)
/* 8AB8C 800F16DC AFB20018 */  sw        $s2, 0x18($sp)
/* 8AB90 800F16E0 AFB10014 */  sw        $s1, 0x14($sp)
/* 8AB94 800F16E4 1040002B */  beqz      $v0, .L800F1794
/* 8AB98 800F16E8 AFB00010 */   sw       $s0, 0x10($sp)
/* 8AB9C 800F16EC 3C028011 */  lui       $v0, %hi(gPopupMenu)
/* 8ABA0 800F16F0 8C42D69C */  lw        $v0, %lo(gPopupMenu)($v0)
glabel func_800F16F4
/* 8ABA4 800F16F4 8C430318 */  lw        $v1, 0x318($v0)
/* 8ABA8 800F16F8 2C62000E */  sltiu     $v0, $v1, 0xE
/* 8ABAC 800F16FC 10400020 */  beqz      $v0, .L800F1780
/* 8ABB0 800F1700 00031080 */   sll      $v0, $v1, 2
/* 8ABB4 800F1704 3C018011 */  lui       $at, %hi(jtbl_8010C3A0)
/* 8ABB8 800F1708 00220821 */  addu      $at, $at, $v0
/* 8ABBC 800F170C 8C22C3A0 */  lw        $v0, %lo(jtbl_8010C3A0)($at)
/* 8ABC0 800F1710 00400008 */  jr        $v0
/* 8ABC4 800F1714 00000000 */   nop
glabel .L800F1718
/* 8ABC8 800F1718 2404000E */  addiu     $a0, $zero, 0xE
/* 8ABCC 800F171C 3C108014 */  lui       $s0, %hi(basic_window_update)
/* 8ABD0 800F1720 26107474 */  addiu     $s0, $s0, %lo(basic_window_update)
/* 8ABD4 800F1724 0C051F9F */  jal       set_window_update
/* 8ABD8 800F1728 0200282D */   daddu    $a1, $s0, $zero
/* 8ABDC 800F172C 0803C5D3 */  j         .L800F174C
glabel func_800F1730
/* 8ABE0 800F1730 24040001 */   addiu    $a0, $zero, 0x1
glabel .L800F1734
/* 8ABE4 800F1734 2404000E */  addiu     $a0, $zero, 0xE
/* 8ABE8 800F1738 3C108014 */  lui       $s0, %hi(basic_window_update)
/* 8ABEC 800F173C 26107474 */  addiu     $s0, $s0, %lo(basic_window_update)
/* 8ABF0 800F1740 0C051F9F */  jal       set_window_update
/* 8ABF4 800F1744 0200282D */   daddu    $a1, $s0, $zero
/* 8ABF8 800F1748 24040002 */  addiu     $a0, $zero, 0x2
.L800F174C:
/* 8ABFC 800F174C 0C05272D */  jal       sfx_play_sound
/* 8AC00 800F1750 00000000 */   nop
/* 8AC04 800F1754 24040013 */  addiu     $a0, $zero, 0x13
/* 8AC08 800F1758 0C051F9F */  jal       set_window_update
/* 8AC0C 800F175C 0200282D */   daddu    $a1, $s0, $zero
/* 8AC10 800F1760 0803C5E1 */  j         .L800F1784
/* 8AC14 800F1764 24040015 */   addiu    $a0, $zero, 0x15
glabel .L800F1768
/* 8AC18 800F1768 3C058014 */  lui       $a1, %hi(basic_window_update)
/* 8AC1C 800F176C 24A57474 */  addiu     $a1, $a1, %lo(basic_window_update)
/* 8AC20 800F1770 0C051F9F */  jal       set_window_update
/* 8AC24 800F1774 2404000E */   addiu    $a0, $zero, 0xE
/* 8AC28 800F1778 0C05272D */  jal       sfx_play_sound
/* 8AC2C 800F177C 24040001 */   addiu    $a0, $zero, 0x1
.L800F1780:
/* 8AC30 800F1780 24040015 */  addiu     $a0, $zero, 0x15
.L800F1784:
/* 8AC34 800F1784 3C058014 */  lui       $a1, %hi(basic_window_update)
/* 8AC38 800F1788 24A57474 */  addiu     $a1, $a1, %lo(basic_window_update)
/* 8AC3C 800F178C 0803C5FC */  j         .L800F17F0
/* 8AC40 800F1790 00000000 */   nop
.L800F1794:
/* 8AC44 800F1794 3C028011 */  lui       $v0, %hi(gPopupMenu)
/* 8AC48 800F1798 8C42D69C */  lw        $v0, %lo(gPopupMenu)($v0)
/* 8AC4C 800F179C 8C430318 */  lw        $v1, 0x318($v0)
/* 8AC50 800F17A0 2C62000E */  sltiu     $v0, $v1, 0xE
/* 8AC54 800F17A4 10400014 */  beqz      $v0, .L800F17F8
/* 8AC58 800F17A8 00031080 */   sll      $v0, $v1, 2
/* 8AC5C 800F17AC 3C018011 */  lui       $at, %hi(jtbl_8010C3D8)
/* 8AC60 800F17B0 00220821 */  addu      $at, $at, $v0
/* 8AC64 800F17B4 8C22C3D8 */  lw        $v0, %lo(jtbl_8010C3D8)($at)
/* 8AC68 800F17B8 00400008 */  jr        $v0
/* 8AC6C 800F17BC 00000000 */   nop
glabel .L800F17C0
/* 8AC70 800F17C0 2404000E */  addiu     $a0, $zero, 0xE
/* 8AC74 800F17C4 0C051F9F */  jal       set_window_update
/* 8AC78 800F17C8 24050001 */   addiu    $a1, $zero, 0x1
/* 8AC7C 800F17CC 0803C5FB */  j         .L800F17EC
/* 8AC80 800F17D0 24040013 */   addiu    $a0, $zero, 0x13
glabel .L800F17D4
/* 8AC84 800F17D4 2404000E */  addiu     $a0, $zero, 0xE
/* 8AC88 800F17D8 0C051F9F */  jal       set_window_update
/* 8AC8C 800F17DC 24050001 */   addiu    $a1, $zero, 0x1
/* 8AC90 800F17E0 0803C5FB */  j         .L800F17EC
/* 8AC94 800F17E4 24040013 */   addiu    $a0, $zero, 0x13
glabel .L800F17E8
/* 8AC98 800F17E8 2404000E */  addiu     $a0, $zero, 0xE
.L800F17EC:
/* 8AC9C 800F17EC 24050001 */  addiu     $a1, $zero, 0x1
.L800F17F0:
/* 8ACA0 800F17F0 0C051F9F */  jal       set_window_update
/* 8ACA4 800F17F4 00000000 */   nop
.L800F17F8:
/* 8ACA8 800F17F8 3C118011 */  lui       $s1, %hi(gPopupMenu)
/* 8ACAC 800F17FC 2631D69C */  addiu     $s1, $s1, %lo(gPopupMenu)
/* 8ACB0 800F1800 8E220000 */  lw        $v0, 0x0($s1)
/* 8ACB4 800F1804 8C420318 */  lw        $v0, 0x318($v0)
/* 8ACB8 800F1808 24120003 */  addiu     $s2, $zero, 0x3
/* 8ACBC 800F180C 14520008 */  bne       $v0, $s2, .L800F1830
/* 8ACC0 800F1810 24040010 */   addiu    $a0, $zero, 0x10
/* 8ACC4 800F1814 3C108014 */  lui       $s0, %hi(basic_window_update)
/* 8ACC8 800F1818 26107474 */  addiu     $s0, $s0, %lo(basic_window_update)
/* 8ACCC 800F181C 0C051F9F */  jal       set_window_update
/* 8ACD0 800F1820 0200282D */   daddu    $a1, $s0, $zero
/* 8ACD4 800F1824 24040014 */  addiu     $a0, $zero, 0x14
/* 8ACD8 800F1828 0C051F9F */  jal       set_window_update
/* 8ACDC 800F182C 0200282D */   daddu    $a1, $s0, $zero
.L800F1830:
/* 8ACE0 800F1830 8E220000 */  lw        $v0, 0x0($s1)
/* 8ACE4 800F1834 8C420318 */  lw        $v0, 0x318($v0)
/* 8ACE8 800F1838 24100004 */  addiu     $s0, $zero, 0x4
/* 8ACEC 800F183C 14500005 */  bne       $v0, $s0, .L800F1854
/* 8ACF0 800F1840 00000000 */   nop
/* 8ACF4 800F1844 3C058014 */  lui       $a1, %hi(basic_window_update)
/* 8ACF8 800F1848 24A57474 */  addiu     $a1, $a1, %lo(basic_window_update)
/* 8ACFC 800F184C 0C051F9F */  jal       set_window_update
/* 8AD00 800F1850 24040012 */   addiu    $a0, $zero, 0x12
.L800F1854:
/* 8AD04 800F1854 8E220000 */  lw        $v0, 0x0($s1)
/* 8AD08 800F1858 8C430318 */  lw        $v1, 0x318($v0)
/* 8AD0C 800F185C 24020005 */  addiu     $v0, $zero, 0x5
/* 8AD10 800F1860 14620006 */  bne       $v1, $v0, .L800F187C
/* 8AD14 800F1864 240500FF */   addiu    $a1, $zero, 0xFF
/* 8AD18 800F1868 3C058014 */  lui       $a1, %hi(basic_window_update)
/* 8AD1C 800F186C 24A57474 */  addiu     $a1, $a1, %lo(basic_window_update)
/* 8AD20 800F1870 0C051F9F */  jal       set_window_update
/* 8AD24 800F1874 24040010 */   addiu    $a0, $zero, 0x10
/* 8AD28 800F1878 240500FF */  addiu     $a1, $zero, 0xFF
.L800F187C:
/* 8AD2C 800F187C 00A0302D */  daddu     $a2, $a1, $zero
/* 8AD30 800F1880 3C048011 */  lui       $a0, %hi(PopupMenu_EmptybarHEID)
/* 8AD34 800F1884 8C84D65C */  lw        $a0, %lo(PopupMenu_EmptybarHEID)($a0)
/* 8AD38 800F1888 0C0513BF */  jal       hud_element_set_tint
/* 8AD3C 800F188C 00A0382D */   daddu    $a3, $a1, $zero
/* 8AD40 800F1890 240500FF */  addiu     $a1, $zero, 0xFF
/* 8AD44 800F1894 00A0302D */  daddu     $a2, $a1, $zero
/* 8AD48 800F1898 3C048011 */  lui       $a0, %hi(D_8010D678)
/* 8AD4C 800F189C 8C84D678 */  lw        $a0, %lo(D_8010D678)($a0)
/* 8AD50 800F18A0 0C0513BF */  jal       hud_element_set_tint
/* 8AD54 800F18A4 00A0382D */   daddu    $a3, $a1, $zero
/* 8AD58 800F18A8 240500FF */  addiu     $a1, $zero, 0xFF
/* 8AD5C 800F18AC 00A0302D */  daddu     $a2, $a1, $zero
/* 8AD60 800F18B0 3C048011 */  lui       $a0, %hi(D_8010D66C)
/* 8AD64 800F18B4 8C84D66C */  lw        $a0, %lo(D_8010D66C)($a0)
/* 8AD68 800F18B8 0C0513BF */  jal       hud_element_set_tint
/* 8AD6C 800F18BC 00A0382D */   daddu    $a3, $a1, $zero
/* 8AD70 800F18C0 240500FF */  addiu     $a1, $zero, 0xFF
/* 8AD74 800F18C4 00A0302D */  daddu     $a2, $a1, $zero
/* 8AD78 800F18C8 3C048011 */  lui       $a0, %hi(D_8010D670)
/* 8AD7C 800F18CC 8C84D670 */  lw        $a0, %lo(D_8010D670)($a0)
/* 8AD80 800F18D0 0C0513BF */  jal       hud_element_set_tint
/* 8AD84 800F18D4 00A0382D */   daddu    $a3, $a1, $zero
/* 8AD88 800F18D8 240500FF */  addiu     $a1, $zero, 0xFF
/* 8AD8C 800F18DC 00A0302D */  daddu     $a2, $a1, $zero
/* 8AD90 800F18E0 3C048011 */  lui       $a0, %hi(D_8010D674)
/* 8AD94 800F18E4 8C84D674 */  lw        $a0, %lo(D_8010D674)($a0)
/* 8AD98 800F18E8 0C0513BF */  jal       hud_element_set_tint
/* 8AD9C 800F18EC 00A0382D */   daddu    $a3, $a1, $zero
/* 8ADA0 800F18F0 8E220000 */  lw        $v0, 0x0($s1)
/* 8ADA4 800F18F4 8C420318 */  lw        $v0, 0x318($v0)
/* 8ADA8 800F18F8 1452000C */  bne       $v0, $s2, .L800F192C
/* 8ADAC 800F18FC 240500FF */   addiu    $a1, $zero, 0xFF
/* 8ADB0 800F1900 00A0302D */  daddu     $a2, $a1, $zero
/* 8ADB4 800F1904 3C048011 */  lui       $a0, %hi(PopupTitleIconHEID)
/* 8ADB8 800F1908 8C84D660 */  lw        $a0, %lo(PopupTitleIconHEID)($a0)
/* 8ADBC 800F190C 0C0513BF */  jal       hud_element_set_tint
/* 8ADC0 800F1910 00A0382D */   daddu    $a3, $a1, $zero
/* 8ADC4 800F1914 240500FF */  addiu     $a1, $zero, 0xFF
/* 8ADC8 800F1918 00A0302D */  daddu     $a2, $a1, $zero
/* 8ADCC 800F191C 3C048011 */  lui       $a0, %hi(D_8010D664)
/* 8ADD0 800F1920 8C84D664 */  lw        $a0, %lo(D_8010D664)($a0)
/* 8ADD4 800F1924 0C0513BF */  jal       hud_element_set_tint
/* 8ADD8 800F1928 00A0382D */   daddu    $a3, $a1, $zero
.L800F192C:
/* 8ADDC 800F192C 8E220000 */  lw        $v0, 0x0($s1)
/* 8ADE0 800F1930 8C420318 */  lw        $v0, 0x318($v0)
/* 8ADE4 800F1934 1450000C */  bne       $v0, $s0, .L800F1968
/* 8ADE8 800F1938 240500FF */   addiu    $a1, $zero, 0xFF
/* 8ADEC 800F193C 00A0302D */  daddu     $a2, $a1, $zero
/* 8ADF0 800F1940 3C048011 */  lui       $a0, %hi(PopupTitleIconHEID)
/* 8ADF4 800F1944 8C84D660 */  lw        $a0, %lo(PopupTitleIconHEID)($a0)
/* 8ADF8 800F1948 0C0513BF */  jal       hud_element_set_tint
/* 8ADFC 800F194C 00A0382D */   daddu    $a3, $a1, $zero
/* 8AE00 800F1950 240500FF */  addiu     $a1, $zero, 0xFF
/* 8AE04 800F1954 00A0302D */  daddu     $a2, $a1, $zero
/* 8AE08 800F1958 3C048011 */  lui       $a0, %hi(D_8010D664)
/* 8AE0C 800F195C 8C84D664 */  lw        $a0, %lo(D_8010D664)($a0)
/* 8AE10 800F1960 0C0513BF */  jal       hud_element_set_tint
/* 8AE14 800F1964 00A0382D */   daddu    $a3, $a1, $zero
.L800F1968:
/* 8AE18 800F1968 8E220000 */  lw        $v0, 0x0($s1)
/* 8AE1C 800F196C 8C430318 */  lw        $v1, 0x318($v0)
/* 8AE20 800F1970 24020001 */  addiu     $v0, $zero, 0x1
/* 8AE24 800F1974 10620003 */  beq       $v1, $v0, .L800F1984
/* 8AE28 800F1978 00000000 */   nop
/* 8AE2C 800F197C 14700007 */  bne       $v1, $s0, .L800F199C
/* 8AE30 800F1980 00000000 */   nop
.L800F1984:
/* 8AE34 800F1984 3C048011 */  lui       $a0, %hi(D_8010D668)
/* 8AE38 800F1988 8C84D668 */  lw        $a0, %lo(D_8010D668)($a0)
/* 8AE3C 800F198C 240500FF */  addiu     $a1, $zero, 0xFF
/* 8AE40 800F1990 00A0302D */  daddu     $a2, $a1, $zero
/* 8AE44 800F1994 0C0513BF */  jal       hud_element_set_tint
/* 8AE48 800F1998 00A0382D */   daddu    $a3, $a1, $zero
.L800F199C:
/* 8AE4C 800F199C 3C028011 */  lui       $v0, %hi(gPopupMenu)
/* 8AE50 800F19A0 8C42D69C */  lw        $v0, %lo(gPopupMenu)($v0)
/* 8AE54 800F19A4 8C430318 */  lw        $v1, 0x318($v0)
/* 8AE58 800F19A8 24020005 */  addiu     $v0, $zero, 0x5
/* 8AE5C 800F19AC 14620006 */  bne       $v1, $v0, .L800F19C8
/* 8AE60 800F19B0 240500FF */   addiu    $a1, $zero, 0xFF
/* 8AE64 800F19B4 3C048011 */  lui       $a0, %hi(PopupTitleIconHEID)
/* 8AE68 800F19B8 8C84D660 */  lw        $a0, %lo(PopupTitleIconHEID)($a0)
/* 8AE6C 800F19BC 00A0302D */  daddu     $a2, $a1, $zero
/* 8AE70 800F19C0 0C0513BF */  jal       hud_element_set_tint
/* 8AE74 800F19C4 00A0382D */   daddu    $a3, $a1, $zero
.L800F19C8:
/* 8AE78 800F19C8 3C048011 */  lui       $a0, %hi(D_8010D66C)
/* 8AE7C 800F19CC 8C84D66C */  lw        $a0, %lo(D_8010D66C)($a0)
/* 8AE80 800F19D0 3C058010 */  lui       $a1, %hi(HES_AnimatedHandPointer)
/* 8AE84 800F19D4 24A54A28 */  addiu     $a1, $a1, %lo(HES_AnimatedHandPointer)
/* 8AE88 800F19D8 0C0511FF */  jal       hud_element_set_script
/* 8AE8C 800F19DC 00000000 */   nop
/* 8AE90 800F19E0 8FBF001C */  lw        $ra, 0x1C($sp)
/* 8AE94 800F19E4 8FB20018 */  lw        $s2, 0x18($sp)
/* 8AE98 800F19E8 8FB10014 */  lw        $s1, 0x14($sp)
/* 8AE9C 800F19EC 8FB00010 */  lw        $s0, 0x10($sp)
/* 8AEA0 800F19F0 2402000A */  addiu     $v0, $zero, 0xA
/* 8AEA4 800F19F4 3C018011 */  lui       $at, %hi(D_8010D690)
/* 8AEA8 800F19F8 A022D690 */  sb        $v0, %lo(D_8010D690)($at)
/* 8AEAC 800F19FC 24020014 */  addiu     $v0, $zero, 0x14
/* 8AEB0 800F1A00 3C018011 */  lui       $at, %hi(gPopupState)
/* 8AEB4 800F1A04 AC22D640 */  sw        $v0, %lo(gPopupState)($at)
/* 8AEB8 800F1A08 03E00008 */  jr        $ra
/* 8AEBC 800F1A0C 27BD0020 */   addiu    $sp, $sp, 0x20

### DECOMPILED C INSTRUCTIONS:

void func_800F16CC(void) {
    if (PopupNotBattle) {
        switch (gPopupMenu->popupType) {
            case POPUP_MENU_USE_ITEM:
            case POPUP_MENU_THROW_AWAY_ITEM:
            case POPUP_MENU_TRADE_FOR_BADGE:
            case POPUP_MENU_SELL_ITEM:
            case POPUP_MENU_CHECK_ITEM:
            case POPUP_MENU_CLAIM_ITEM:
            case POPUP_MENU_READ_LETTER:
            case POPUP_MENU_TAKE_FROM_CHEST:
            case POPUP_MENU_USEKEY:
                set_window_update(WINDOW_ID_14, (s32) basic_window_update);
                sfx_play_sound(SOUND_1);
                set_window_update(WINDOW_ID_19, (s32) basic_window_update);
                break;
            case POPUP_MENU_SWITCH_PARTNER:
            case POPUP_MENU_UPGRADE_PARTNER:
                set_window_update(WINDOW_ID_14, (s32) basic_window_update);
                sfx_play_sound(SOUND_2);
                set_window_update(WINDOW_ID_19, (s32) basic_window_update);
                break;
            case POPUP_MENU_READ_DIARY_PAGE:
            case POPUP_MENU_READ_POSTCARD:
            case POPUP_MENU_POST_OFFICE:
                set_window_update(WINDOW_ID_14, (s32) basic_window_update);
                sfx_play_sound(SOUND_1);
                break;
        }
        set_window_update(WINDOW_ID_21, (s32) basic_window_update);
    } else {
        switch (gPopupMenu->popupType) {
            case POPUP_MENU_USE_ITEM:
            case POPUP_MENU_THROW_AWAY_ITEM:
            case POPUP_MENU_TRADE_FOR_BADGE:
            case POPUP_MENU_SELL_ITEM:
            case POPUP_MENU_CHECK_ITEM:
            case POPUP_MENU_CLAIM_ITEM:
            case POPUP_MENU_READ_LETTER:
            case POPUP_MENU_TAKE_FROM_CHEST:
            case POPUP_MENU_USEKEY:
                set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW);
                set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW);
                break;
            case POPUP_MENU_SWITCH_PARTNER:
            case POPUP_MENU_UPGRADE_PARTNER:
                set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW);
                set_window_update(WINDOW_ID_19, WINDOW_UPDATE_SHOW);
                break;
            case POPUP_MENU_READ_DIARY_PAGE:
            case POPUP_MENU_READ_POSTCARD:
            case POPUP_MENU_POST_OFFICE:
                set_window_update(WINDOW_ID_14, WINDOW_UPDATE_SHOW);
                break;
        }
    }

    if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) {
        set_window_update(WINDOW_ID_16, (s32) basic_window_update);
        set_window_update(WINDOW_ID_CURRENCY_COUNTER, (s32) basic_window_update);
    }
    if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) {
        set_window_update(WINDOW_ID_18, (s32) basic_window_update);
    }
    if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) {
        set_window_update(WINDOW_ID_16, (s32) basic_window_update);
    }
    hud_element_set_tint(PopupMenu_EmptybarHEID, 255, 255, 255);
    hud_element_set_tint(PopupMenu_EntryIconHEID, 255, 255, 255);
    hud_element_set_tint(PopupMenu_CursorHEID, 255, 255, 255);
    hud_element_set_tint(PopupMenu_UpArrowHEID, 255, 255, 255);
    hud_element_set_tint(PopupMenu_DownArrowHEID, 255, 255, 255);

    if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) {
        hud_element_set_tint(PopupMenu_TitleIconHEID, 255, 255, 255);
        hud_element_set_tint(PopupMenu_TimesHEID, 255, 255, 255);
    }
    if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) {
        hud_element_set_tint(PopupMenu_TitleIconHEID, 255, 255, 255);
        hud_element_set_tint(PopupMenu_TimesHEID, 255, 255, 255);
    }
    if (gPopupMenu->popupType == POPUP_MENU_SWITCH_PARTNER || gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) {
        hud_element_set_tint(PopupMenu_PartnerLevelHEID, 255, 255, 255);
    }
    if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) {
        hud_element_set_tint(PopupMenu_TitleIconHEID, 255, 255, 255);
    }
    hud_element_set_script(PopupMenu_CursorHEID, &HES_AnimatedHandPointer);
    D_8010D690 = MSG_PAL_STANDARD;
    gPopupState = POPUP_STATE_20;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_8024C570
/* 17AE50 8024C570 27BDFFB0 */  addiu     $sp, $sp, -0x50
D_8024C574:
/* 17AE54 8024C574 AFB00018 */  sw        $s0, 0x18($sp)
.L8024C578:
/* 17AE58 8024C578 3C10800B */  lui       $s0, %hi(gCameras + 0x558)
/* 17AE5C 8024C57C 261022D8 */  addiu     $s0, $s0, %lo(gCameras + 0x558)
D_8024C580:
/* 17AE60 8024C580 AFBF001C */  sw        $ra, 0x1C($sp)
/* 17AE64 8024C584 F7BE0048 */  sdc1      $f30, 0x48($sp)
/* 17AE68 8024C588 F7BC0040 */  sdc1      $f28, 0x40($sp)
/* 17AE6C 8024C58C F7BA0038 */  sdc1      $f26, 0x38($sp)
/* 17AE70 8024C590 F7B80030 */  sdc1      $f24, 0x30($sp)
/* 17AE74 8024C594 F7B60028 */  sdc1      $f22, 0x28($sp)
/* 17AE78 8024C598 10A00036 */  beqz      $a1, .L8024C674
/* 17AE7C 8024C59C F7B40020 */   sdc1     $f20, 0x20($sp)
/* 17AE80 8024C5A0 3C02802A */  lui       $v0, %hi(BattleCam_SetImmediately)
/* 17AE84 8024C5A4 8042F2A4 */  lb        $v0, %lo(BattleCam_SetImmediately)($v0)
/* 17AE88 8024C5A8 1040000A */  beqz      $v0, .L8024C5D4
/* 17AE8C 8024C5AC 00000000 */   nop
.L8024C5B0:
/* 17AE90 8024C5B0 C6000054 */  lwc1      $f0, 0x54($s0)
/* 17AE94 8024C5B4 C6020058 */  lwc1      $f2, 0x58($s0)
/* 17AE98 8024C5B8 C604005C */  lwc1      $f4, 0x5C($s0)
/* 17AE9C 8024C5BC 3C01802A */  lui       $at, %hi(BattleCam_PosX)
/* 17AEA0 8024C5C0 E420F270 */  swc1      $f0, %lo(BattleCam_PosX)($at)
/* 17AEA4 8024C5C4 3C01802A */  lui       $at, %hi(BattleCam_PosY)
/* 17AEA8 8024C5C8 E422F274 */  swc1      $f2, %lo(BattleCam_PosY)($at)
/* 17AEAC 8024C5CC 3C01802A */  lui       $at, %hi(BattleCam_PosZ)
/* 17AEB0 8024C5D0 E424F278 */  swc1      $f4, %lo(BattleCam_PosZ)($at)
.L8024C5D4:
/* 17AEB4 8024C5D4 8602001E */  lh        $v0, 0x1E($s0)
.L8024C5D8:
/* 17AEB8 8024C5D8 86040026 */  lh        $a0, 0x26($s0)
/* 17AEBC 8024C5DC 86030024 */  lh        $v1, 0x24($s0)
D_8024C5E0:
/* 17AEC0 8024C5E0 44820000 */  mtc1      $v0, $f0
/* 17AEC4 8024C5E4 00000000 */  nop
/* 17AEC8 8024C5E8 46800020 */  cvt.s.w   $f0, $f0
/* 17AECC 8024C5EC 86020022 */  lh        $v0, 0x22($s0)
/* 17AED0 8024C5F0 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomLength)
/* 17AED4 8024C5F4 E420F28C */  swc1      $f0, %lo(BattleCam_InitialBoomLength)($at)
.L8024C5F8:
/* 17AED8 8024C5F8 44820000 */  mtc1      $v0, $f0
/* 17AEDC 8024C5FC 00000000 */  nop
D_8024C600_C09E80:
/* 17AEE0 8024C600 46800020 */  cvt.s.w   $f0, $f0
/* 17AEE4 8024C604 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomPitch)
/* 17AEE8 8024C608 E420F294 */  swc1      $f0, %lo(BattleCam_InitialBoomPitch)($at)
/* 17AEEC 8024C60C 44830000 */  mtc1      $v1, $f0
/* 17AEF0 8024C610 00000000 */  nop
/* 17AEF4 8024C614 46800020 */  cvt.s.w   $f0, $f0
.L8024C618:
/* 17AEF8 8024C618 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomYaw)
/* 17AEFC 8024C61C E420F290 */  swc1      $f0, %lo(BattleCam_InitialBoomYaw)($at)
/* 17AF00 8024C620 04820001 */  bltzl     $a0, .L8024C628
/* 17AF04 8024C624 248400FF */   addiu    $a0, $a0, 0xFF
.L8024C628:
/* 17AF08 8024C628 00041203 */  sra       $v0, $a0, 8
/* 17AF0C 8024C62C C6020054 */  lwc1      $f2, 0x54($s0)
/* 17AF10 8024C630 C6040058 */  lwc1      $f4, 0x58($s0)
/* 17AF14 8024C634 C606005C */  lwc1      $f6, 0x5C($s0)
D_8024C638_C09EB8:
/* 17AF18 8024C638 3C03802A */  lui       $v1, %hi(BattleCam_MoveTimeLeft)
/* 17AF1C 8024C63C 9463F29E */  lhu       $v1, %lo(BattleCam_MoveTimeLeft)($v1)
/* 17AF20 8024C640 44820000 */  mtc1      $v0, $f0
D_8024C644:
/* 17AF24 8024C644 00000000 */  nop
/* 17AF28 8024C648 46800020 */  cvt.s.w   $f0, $f0
/* 17AF2C 8024C64C 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomZOffset)
/* 17AF30 8024C650 E420F298 */  swc1      $f0, %lo(BattleCam_InitialBoomZOffset)($at)
/* 17AF34 8024C654 3C01802A */  lui       $at, %hi(BattleCam_InitialPosX)
/* 17AF38 8024C658 E422F2A8 */  swc1      $f2, %lo(BattleCam_InitialPosX)($at)
/* 17AF3C 8024C65C 3C01802A */  lui       $at, %hi(BattleCam_InitialPosY)
.L8024C660:
/* 17AF40 8024C660 E424F2AC */  swc1      $f4, %lo(BattleCam_InitialPosY)($at)
/* 17AF44 8024C664 3C01802A */  lui       $at, %hi(BattleCam_InitialPosZ)
/* 17AF48 8024C668 E426F2B0 */  swc1      $f6, %lo(BattleCam_InitialPosZ)($at)
/* 17AF4C 8024C66C 3C01802A */  lui       $at, %hi(BattleCam_MoveTimeTotal)
D_8024C670_C09EF0:
/* 17AF50 8024C670 A423F2A0 */  sh        $v1, %lo(BattleCam_MoveTimeTotal)($at)
.L8024C674:
/* 17AF54 8024C674 3C01802A */  lui       $at, %hi(BattleCam_PosY)
/* 17AF58 8024C678 C43CF274 */  lwc1      $f28, %lo(BattleCam_PosY)($at)
/* 17AF5C 8024C67C 3C01802A */  lui       $at, %hi(BattleCam_PosX)
/* 17AF60 8024C680 C43AF270 */  lwc1      $f26, %lo(BattleCam_PosX)($at)
/* 17AF64 8024C684 3C02802A */  lui       $v0, %hi(BattleCam_UseLinearInterp)
/* 17AF68 8024C688 8042F2A5 */  lb        $v0, %lo(BattleCam_UseLinearInterp)($v0)
/* 17AF6C 8024C68C 3C01802A */  lui       $at, %hi(BattleCam_PosZ)
/* 17AF70 8024C690 C43EF278 */  lwc1      $f30, %lo(BattleCam_PosZ)($at)
/* 17AF74 8024C694 14400027 */  bnez      $v0, .L8024C734
/* 17AF78 8024C698 E7BC0010 */   swc1     $f28, 0x10($sp)
/* 17AF7C 8024C69C 3C02802A */  lui       $v0, %hi(BattleCam_MoveTimeLeft)
.L8024C6A0:
/* 17AF80 8024C6A0 8442F29E */  lh        $v0, %lo(BattleCam_MoveTimeLeft)($v0)
/* 17AF84 8024C6A4 3C03802A */  lui       $v1, %hi(BattleCam_MoveTimeTotal)
/* 17AF88 8024C6A8 8463F2A0 */  lh        $v1, %lo(BattleCam_MoveTimeTotal)($v1)
/* 17AF8C 8024C6AC 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 17AF90 8024C6B0 4481C000 */  mtc1      $at, $f24
/* 17AF94 8024C6B4 44822000 */  mtc1      $v0, $f4
/* 17AF98 8024C6B8 00000000 */  nop
.L8024C6BC:
/* 17AF9C 8024C6BC 46802120 */  cvt.s.w   $f4, $f4
/* 17AFA0 8024C6C0 44830000 */  mtc1      $v1, $f0
/* 17AFA4 8024C6C4 00000000 */  nop
/* 17AFA8 8024C6C8 46800020 */  cvt.s.w   $f0, $f0
/* 17AFAC 8024C6CC 46002103 */  div.s     $f4, $f4, $f0
/* 17AFB0 8024C6D0 4604C301 */  sub.s     $f12, $f24, $f4
/* 17AFB4 8024C6D4 3C014049 */  lui       $at, (0x40490FD0 >> 16)
/* 17AFB8 8024C6D8 34210FD0 */  ori       $at, $at, (0x40490FD0 & 0xFFFF)
/* 17AFBC 8024C6DC 4481B000 */  mtc1      $at, $f22
/* 17AFC0 8024C6E0 00000000 */  nop
/* 17AFC4 8024C6E4 46166302 */  mul.s     $f12, $f12, $f22
/* 17AFC8 8024C6E8 00000000 */  nop
/* 17AFCC 8024C6EC 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 17AFD0 8024C6F0 4481A000 */  mtc1      $at, $f20
/* 17AFD4 8024C6F4 00000000 */  nop
/* 17AFD8 8024C6F8 46146302 */  mul.s     $f12, $f12, $f20
/* 17AFDC 8024C6FC 0C00A85B */  jal       sin_rad
.L8024C700:
/* 17AFE0 8024C700 00000000 */   nop
/* 17AFE4 8024C704 46160002 */  mul.s     $f0, $f0, $f22
/* 17AFE8 8024C708 00000000 */  nop
/* 17AFEC 8024C70C 46140302 */  mul.s     $f12, $f0, $f20
/* 17AFF0 8024C710 0C00A85B */  jal       sin_rad
/* 17AFF4 8024C714 00000000 */   nop
/* 17AFF8 8024C718 46160002 */  mul.s     $f0, $f0, $f22
/* 17AFFC 8024C71C 00000000 */  nop
/* 17B000 8024C720 46140302 */  mul.s     $f12, $f0, $f20
/* 17B004 8024C724 0C00A85B */  jal       sin_rad
/* 17B008 8024C728 00000000 */   nop
/* 17B00C 8024C72C 080931D8 */  j         .L8024C760
/* 17B010 8024C730 4600C101 */   sub.s    $f4, $f24, $f0
.L8024C734:
/* 17B014 8024C734 3C02802A */  lui       $v0, %hi(BattleCam_MoveTimeLeft)
/* 17B018 8024C738 8442F29E */  lh        $v0, %lo(BattleCam_MoveTimeLeft)($v0)
/* 17B01C 8024C73C 3C03802A */  lui       $v1, %hi(BattleCam_MoveTimeTotal)
.L8024C740:
/* 17B020 8024C740 8463F2A0 */  lh        $v1, %lo(BattleCam_MoveTimeTotal)($v1)
/* 17B024 8024C744 44822000 */  mtc1      $v0, $f4
/* 17B028 8024C748 00000000 */  nop
/* 17B02C 8024C74C 46802120 */  cvt.s.w   $f4, $f4
/* 17B030 8024C750 44830000 */  mtc1      $v1, $f0
/* 17B034 8024C754 00000000 */  nop
/* 17B038 8024C758 46800020 */  cvt.s.w   $f0, $f0
/* 17B03C 8024C75C 46002103 */  div.s     $f4, $f4, $f0
.L8024C760:
/* 17B040 8024C760 3C01802A */  lui       $at, %hi(BattleCam_InitialPosX)
/* 17B044 8024C764 C434F2A8 */  lwc1      $f20, %lo(BattleCam_InitialPosX)($at)
/* 17B048 8024C768 4604A502 */  mul.s     $f20, $f20, $f4
/* 17B04C 8024C76C 00000000 */  nop
/* 17B050 8024C770 3C01802A */  lui       $at, %hi(BattleCam_InitialPosY)
.L8024C774:
/* 17B054 8024C774 C432F2AC */  lwc1      $f18, %lo(BattleCam_InitialPosY)($at)
D_8024C778:
/* 17B058 8024C778 46049482 */  mul.s     $f18, $f18, $f4
/* 17B05C 8024C77C 00000000 */  nop
/* 17B060 8024C780 3C01802A */  lui       $at, %hi(BattleCam_InitialPosZ)
D_8024C784:
/* 17B064 8024C784 C430F2B0 */  lwc1      $f16, %lo(BattleCam_InitialPosZ)($at)
.L8024C788:
/* 17B068 8024C788 46048402 */  mul.s     $f16, $f16, $f4
/* 17B06C 8024C78C 00000000 */  nop
.L8024C790:
/* 17B070 8024C790 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomZOffset)
/* 17B074 8024C794 C426F298 */  lwc1      $f6, %lo(BattleCam_InitialBoomZOffset)($at)
/* 17B078 8024C798 46043182 */  mul.s     $f6, $f6, $f4
/* 17B07C 8024C79C 00000000 */  nop
/* 17B080 8024C7A0 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomLength)
glabel func_8024C7A4
/* 17B084 8024C7A4 C42CF28C */  lwc1      $f12, %lo(BattleCam_InitialBoomLength)($at)
/* 17B088 8024C7A8 46046302 */  mul.s     $f12, $f12, $f4
/* 17B08C 8024C7AC 00000000 */  nop
/* 17B090 8024C7B0 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomYaw)
/* 17B094 8024C7B4 C428F290 */  lwc1      $f8, %lo(BattleCam_InitialBoomYaw)($at)
/* 17B098 8024C7B8 46044202 */  mul.s     $f8, $f8, $f4
/* 17B09C 8024C7BC 00000000 */  nop
/* 17B0A0 8024C7C0 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 17B0A4 8024C7C4 44811000 */  mtc1      $at, $f2
/* 17B0A8 8024C7C8 00000000 */  nop
/* 17B0AC 8024C7CC 46041081 */  sub.s     $f2, $f2, $f4
D_8024C7D0_C0A050:
/* 17B0B0 8024C7D0 4602D682 */  mul.s     $f26, $f26, $f2
.L8024C7D4:
/* 17B0B4 8024C7D4 00000000 */  nop
/* 17B0B8 8024C7D8 C7BC0010 */  lwc1      $f28, 0x10($sp)
/* 17B0BC 8024C7DC 4602E602 */  mul.s     $f24, $f28, $f2
/* 17B0C0 8024C7E0 00000000 */  nop
/* 17B0C4 8024C7E4 3C02802A */  lui       $v0, %hi(BattleCam_BoomZOffset)
/* 17B0C8 8024C7E8 8442F286 */  lh        $v0, %lo(BattleCam_BoomZOffset)($v0)
.L8024C7EC:
/* 17B0CC 8024C7EC 44820000 */  mtc1      $v0, $f0
/* 17B0D0 8024C7F0 00000000 */  nop
/* 17B0D4 8024C7F4 46800020 */  cvt.s.w   $f0, $f0
/* 17B0D8 8024C7F8 46020002 */  mul.s     $f0, $f0, $f2
/* 17B0DC 8024C7FC 00000000 */  nop
/* 17B0E0 8024C800 4602F582 */  mul.s     $f22, $f30, $f2
/* 17B0E4 8024C804 00000000 */  nop
D_8024C808_C0A088:
/* 17B0E8 8024C808 3C02802A */  lui       $v0, %hi(BattleCam_BoomLength)
/* 17B0EC 8024C80C 8442F280 */  lh        $v0, %lo(BattleCam_BoomLength)($v0)
/* 17B0F0 8024C810 44827000 */  mtc1      $v0, $f14
/* 17B0F4 8024C814 00000000 */  nop
/* 17B0F8 8024C818 468073A0 */  cvt.s.w   $f14, $f14
/* 17B0FC 8024C81C 46027382 */  mul.s     $f14, $f14, $f2
/* 17B100 8024C820 00000000 */  nop
/* 17B104 8024C824 3C02802A */  lui       $v0, %hi(BattleCam_BoomYaw)
/* 17B108 8024C828 8442F282 */  lh        $v0, %lo(BattleCam_BoomYaw)($v0)
/* 17B10C 8024C82C 44825000 */  mtc1      $v0, $f10
/* 17B110 8024C830 00000000 */  nop
/* 17B114 8024C834 468052A0 */  cvt.s.w   $f10, $f10
/* 17B118 8024C838 46025282 */  mul.s     $f10, $f10, $f2
/* 17B11C 8024C83C 00000000 */  nop
.L8024C840:
/* 17B120 8024C840 46003180 */  add.s     $f6, $f6, $f0
/* 17B124 8024C844 3C014380 */  lui       $at, (0x43800000 >> 16)
/* 17B128 8024C848 44810000 */  mtc1      $at, $f0
/* 17B12C 8024C84C 00000000 */  nop
/* 17B130 8024C850 46003182 */  mul.s     $f6, $f6, $f0
/* 17B134 8024C854 00000000 */  nop
/* 17B138 8024C858 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomPitch)
/* 17B13C 8024C85C C420F294 */  lwc1      $f0, %lo(BattleCam_InitialBoomPitch)($at)
/* 17B140 8024C860 46040002 */  mul.s     $f0, $f0, $f4
/* 17B144 8024C864 00000000 */  nop
/* 17B148 8024C868 461AA500 */  add.s     $f20, $f20, $f26
/* 17B14C 8024C86C 46189480 */  add.s     $f18, $f18, $f24
/* 17B150 8024C870 46168400 */  add.s     $f16, $f16, $f22
.L8024C874:
/* 17B154 8024C874 460E6300 */  add.s     $f12, $f12, $f14
/* 17B158 8024C878 3C04802A */  lui       $a0, %hi(BattleCam_MoveTimeLeft)
/* 17B15C 8024C87C 2484F29E */  addiu     $a0, $a0, %lo(BattleCam_MoveTimeLeft)
/* 17B160 8024C880 3C02802A */  lui       $v0, %hi(BattleCam_BoomPitch)
/* 17B164 8024C884 8442F284 */  lh        $v0, %lo(BattleCam_BoomPitch)($v0)
/* 17B168 8024C888 460A4200 */  add.s     $f8, $f8, $f10
/* 17B16C 8024C88C E6140054 */  swc1      $f20, 0x54($s0)
/* 17B170 8024C890 44822000 */  mtc1      $v0, $f4
/* 17B174 8024C894 00000000 */  nop
/* 17B178 8024C898 46802120 */  cvt.s.w   $f4, $f4
/* 17B17C 8024C89C 46022102 */  mul.s     $f4, $f4, $f2
/* 17B180 8024C8A0 00000000 */  nop
/* 17B184 8024C8A4 E6120058 */  swc1      $f18, 0x58($s0)
/* 17B188 8024C8A8 E610005C */  swc1      $f16, 0x5C($s0)
/* 17B18C 8024C8AC 4600670D */  trunc.w.s $f28, $f12
/* 17B190 8024C8B0 4402E000 */  mfc1      $v0, $f28
.L8024C8B4:
/* 17B194 8024C8B4 00000000 */  nop
/* 17B198 8024C8B8 A602001E */  sh        $v0, 0x1E($s0)
/* 17B19C 8024C8BC 46040000 */  add.s     $f0, $f0, $f4
/* 17B1A0 8024C8C0 4600470D */  trunc.w.s $f28, $f8
/* 17B1A4 8024C8C4 4402E000 */  mfc1      $v0, $f28
/* 17B1A8 8024C8C8 00000000 */  nop
/* 17B1AC 8024C8CC A6020024 */  sh        $v0, 0x24($s0)
/* 17B1B0 8024C8D0 4600070D */  trunc.w.s $f28, $f0
D_8024C8D4:
/* 17B1B4 8024C8D4 4402E000 */  mfc1      $v0, $f28
/* 17B1B8 8024C8D8 00000000 */  nop
/* 17B1BC 8024C8DC A6020022 */  sh        $v0, 0x22($s0)
D_8024C8E0_C0A160:
/* 17B1C0 8024C8E0 4600370D */  trunc.w.s $f28, $f6
/* 17B1C4 8024C8E4 4402E000 */  mfc1      $v0, $f28
/* 17B1C8 8024C8E8 00000000 */  nop
/* 17B1CC 8024C8EC A6020026 */  sh        $v0, 0x26($s0)
.L8024C8F0:
/* 17B1D0 8024C8F0 84820000 */  lh        $v0, 0x0($a0)
/* 17B1D4 8024C8F4 94830000 */  lhu       $v1, 0x0($a0)
/* 17B1D8 8024C8F8 14400006 */  bnez      $v0, .L8024C914
/* 17B1DC 8024C8FC 2462FFFF */   addiu    $v0, $v1, -0x1
/* 17B1E0 8024C900 24020001 */  addiu     $v0, $zero, 0x1
/* 17B1E4 8024C904 3C01802A */  lui       $at, %hi(BattleCam_DoneMoving)
/* 17B1E8 8024C908 A022F29C */  sb        $v0, %lo(BattleCam_DoneMoving)($at)
/* 17B1EC 8024C90C 08093246 */  j         D_8024C918_C0A198
/* 17B1F0 8024C910 00000000 */   nop
.L8024C914:
/* 17B1F4 8024C914 A4820000 */  sh        $v0, 0x0($a0)
D_8024C918_C0A198:
/* 17B1F8 8024C918 8FBF001C */  lw        $ra, 0x1C($sp)
/* 17B1FC 8024C91C 8FB00018 */  lw        $s0, 0x18($sp)
/* 17B200 8024C920 D7BE0048 */  ldc1      $f30, 0x48($sp)
.L8024C924:
/* 17B204 8024C924 D7BC0040 */  ldc1      $f28, 0x40($sp)
/* 17B208 8024C928 D7BA0038 */  ldc1      $f26, 0x38($sp)
/* 17B20C 8024C92C D7B80030 */  ldc1      $f24, 0x30($sp)
/* 17B210 8024C930 D7B60028 */  ldc1      $f22, 0x28($sp)
/* 17B214 8024C934 D7B40020 */  ldc1      $f20, 0x20($sp)
/* 17B218 8024C938 0000102D */  daddu     $v0, $zero, $zero
/* 17B21C 8024C93C 03E00008 */  jr        $ra
/* 17B220 8024C940 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

ApiStatus CamPresetUpdate_J(Evt* script, s32 isInitialCall) {
    Camera* camera = &gCameras[CAM_BATTLE];
    f32 alpha;
    f32 x, y, z;

    if (isInitialCall) {
        if (BattleCam_SetImmediately) {
            BattleCam_PosX = camera->lookAt_obj_target.x;
            BattleCam_PosY = camera->lookAt_obj_target.y;
            BattleCam_PosZ = camera->lookAt_obj_target.z;
        }
        BattleCam_InitialBoomLength = camera->auxBoomLength;
        BattleCam_InitialBoomPitch = camera->auxBoomPitch;
        BattleCam_InitialBoomYaw = camera->auxBoomYaw;
        BattleCam_InitialBoomZOffset = camera->auxBoomZOffset / 256;
        BattleCam_InitialPosX = camera->lookAt_obj_target.x;
        BattleCam_InitialPosY = camera->lookAt_obj_target.y;
        BattleCam_InitialPosZ = camera->lookAt_obj_target.z;
        BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
    }

    x = BattleCam_PosX;
    y = BattleCam_PosY;
    z = BattleCam_PosZ;

    if (!BattleCam_UseLinearInterp) {
        alpha = BattleCam_MoveTimeLeft;
        alpha /= BattleCam_MoveTimeTotal;
        alpha = 1.0f - sin_rad(sin_rad(sin_rad((1.0f - alpha) * PI_S / 2) * PI_S / 2) * PI_S / 2);
    } else {
        alpha = BattleCam_MoveTimeLeft;
        alpha /= BattleCam_MoveTimeTotal;
    }

    camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, x, alpha);
    camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, y, alpha);
    camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, z, alpha);
    camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f;
    camera->auxBoomLength = LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength, alpha);
    camera->auxBoomYaw = LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
    camera->auxBoomPitch = LERP(BattleCam_InitialBoomPitch, BattleCam_BoomPitch, alpha);

    if (BattleCam_MoveTimeLeft == 0) {
        BattleCam_DoneMoving = TRUE;
    } else {
        BattleCam_MoveTimeLeft--;
    }

    return ApiStatus_BLOCK;
}