### RAW ASSEMBLY INSTRUCTIONS:

glabel FlyToGoal
/* 1A9F04 8027B624 27BDFFD0 */  addiu     $sp, $sp, -0x30
/* 1A9F08 8027B628 AFB20020 */  sw        $s2, 0x20($sp)
/* 1A9F0C 8027B62C 0080902D */  daddu     $s2, $a0, $zero
/* 1A9F10 8027B630 AFBF0024 */  sw        $ra, 0x24($sp)
/* 1A9F14 8027B634 AFB1001C */  sw        $s1, 0x1C($sp)
/* 1A9F18 8027B638 AFB00018 */  sw        $s0, 0x18($sp)
/* 1A9F1C 8027B63C F7B40028 */  sdc1      $f20, 0x28($sp)
/* 1A9F20 8027B640 10A0006C */  beqz      $a1, .L8027B7F4
/* 1A9F24 8027B644 8E51000C */   lw       $s1, 0xC($s2)
/* 1A9F28 8027B648 8E250000 */  lw        $a1, 0x0($s1)
/* 1A9F2C 8027B64C 0C0B1EAF */  jal       evt_get_variable
/* 1A9F30 8027B650 26310004 */   addiu    $s1, $s1, 0x4
/* 1A9F34 8027B654 0040202D */  daddu     $a0, $v0, $zero
/* 1A9F38 8027B658 2402FF81 */  addiu     $v0, $zero, -0x7F
/* 1A9F3C 8027B65C 14820002 */  bne       $a0, $v0, .L8027B668
/* 1A9F40 8027B660 00000000 */   nop
/* 1A9F44 8027B664 8E440148 */  lw        $a0, 0x148($s2)
.L8027B668:
/* 1A9F48 8027B668 0C09A75B */  jal       get_actor
/* 1A9F4C 8027B66C 00000000 */   nop
/* 1A9F50 8027B670 0040802D */  daddu     $s0, $v0, $zero
/* 1A9F54 8027B674 AE500074 */  sw        $s0, 0x74($s2)
/* 1A9F58 8027B678 8E250000 */  lw        $a1, 0x0($s1)
/* 1A9F5C 8027B67C 26310004 */  addiu     $s1, $s1, 0x4
/* 1A9F60 8027B680 0C0B1EAF */  jal       evt_get_variable
/* 1A9F64 8027B684 0240202D */   daddu    $a0, $s2, $zero
/* 1A9F68 8027B688 A6020070 */  sh        $v0, 0x70($s0)
/* 1A9F6C 8027B68C 8E250000 */  lw        $a1, 0x0($s1)
/* 1A9F70 8027B690 26310004 */  addiu     $s1, $s1, 0x4
/* 1A9F74 8027B694 0C0B1EAF */  jal       evt_get_variable
/* 1A9F78 8027B698 0240202D */   daddu    $a0, $s2, $zero
/* 1A9F7C 8027B69C A6020072 */  sh        $v0, 0x72($s0)
/* 1A9F80 8027B6A0 8E250000 */  lw        $a1, 0x0($s1)
/* 1A9F84 8027B6A4 0C0B1EAF */  jal       evt_get_variable
/* 1A9F88 8027B6A8 0240202D */   daddu    $a0, $s2, $zero
/* 1A9F8C 8027B6AC AE42007C */  sw        $v0, 0x7C($s2)
/* 1A9F90 8027B6B0 AE000078 */  sw        $zero, 0x78($s0)
/* 1A9F94 8027B6B4 8E43007C */  lw        $v1, 0x7C($s2)
/* 1A9F98 8027B6B8 28620064 */  slti      $v0, $v1, 0x64
/* 1A9F9C 8027B6BC 14400005 */  bnez      $v0, .L8027B6D4
/* 1A9FA0 8027B6C0 2611000C */   addiu    $s1, $s0, 0xC
/* 1A9FA4 8027B6C4 2462FF9C */  addiu     $v0, $v1, -0x64
/* 1A9FA8 8027B6C8 AE42007C */  sw        $v0, 0x7C($s2)
/* 1A9FAC 8027B6CC 24020001 */  addiu     $v0, $zero, 0x1
/* 1A9FB0 8027B6D0 AE020078 */  sw        $v0, 0x78($s0)
.L8027B6D4:
/* 1A9FB4 8027B6D4 C6000018 */  lwc1      $f0, 0x18($s0)
/* 1A9FB8 8027B6D8 C6060144 */  lwc1      $f6, 0x144($s0)
/* 1A9FBC 8027B6DC 46003081 */  sub.s     $f2, $f6, $f0
/* 1A9FC0 8027B6E0 46021202 */  mul.s     $f8, $f2, $f2
/* 1A9FC4 8027B6E4 00000000 */  nop
/* 1A9FC8 8027B6E8 C6040148 */  lwc1      $f4, 0x148($s0)
/* 1A9FCC 8027B6EC C600001C */  lwc1      $f0, 0x1C($s0)
/* 1A9FD0 8027B6F0 46002081 */  sub.s     $f2, $f4, $f0
/* 1A9FD4 8027B6F4 46021282 */  mul.s     $f10, $f2, $f2
/* 1A9FD8 8027B6F8 00000000 */  nop
/* 1A9FDC 8027B6FC C6000020 */  lwc1      $f0, 0x20($s0)
/* 1A9FE0 8027B700 C602014C */  lwc1      $f2, 0x14C($s0)
/* 1A9FE4 8027B704 46001001 */  sub.s     $f0, $f2, $f0
/* 1A9FE8 8027B708 46000002 */  mul.s     $f0, $f0, $f0
/* 1A9FEC 8027B70C 00000000 */  nop
/* 1A9FF0 8027B710 E606000C */  swc1      $f6, 0xC($s0)
/* 1A9FF4 8027B714 E6060024 */  swc1      $f6, 0x24($s0)
/* 1A9FF8 8027B718 460A4200 */  add.s     $f8, $f8, $f10
/* 1A9FFC 8027B71C E6040010 */  swc1      $f4, 0x10($s0)
/* 1AA000 8027B720 E6040028 */  swc1      $f4, 0x28($s0)
/* 1AA004 8027B724 46004300 */  add.s     $f12, $f8, $f0
/* 1AA008 8027B728 E6020014 */  swc1      $f2, 0x14($s0)
/* 1AA00C 8027B72C E602002C */  swc1      $f2, 0x2C($s0)
/* 1AA010 8027B730 46006084 */  sqrt.s    $f2, $f12
/* 1AA014 8027B734 46021032 */  c.eq.s    $f2, $f2
/* 1AA018 8027B738 00000000 */  nop
/* 1AA01C 8027B73C 45010004 */  bc1t      .L8027B750
/* 1AA020 8027B740 00000000 */   nop
/* 1AA024 8027B744 0C0187BC */  jal       sqrtf
/* 1AA028 8027B748 00000000 */   nop
/* 1AA02C 8027B74C 46000086 */  mov.s     $f2, $f0
.L8027B750:
/* 1AA030 8027B750 86020070 */  lh        $v0, 0x70($s0)
/* 1AA034 8027B754 14400007 */  bnez      $v0, .L8027B774
/* 1AA038 8027B758 E6020058 */   swc1     $f2, 0x58($s0)
/* 1AA03C 8027B75C C600004C */  lwc1      $f0, 0x4C($s0)
/* 1AA040 8027B760 46001003 */  div.s     $f0, $f2, $f0
/* 1AA044 8027B764 4600038D */  trunc.w.s $f14, $f0
/* 1AA048 8027B768 44027000 */  mfc1      $v0, $f14
/* 1AA04C 8027B76C 0809EDE2 */  j         .L8027B788
/* 1AA050 8027B770 A6020070 */   sh       $v0, 0x70($s0)
.L8027B774:
/* 1AA054 8027B774 44820000 */  mtc1      $v0, $f0
/* 1AA058 8027B778 00000000 */  nop
/* 1AA05C 8027B77C 46800020 */  cvt.s.w   $f0, $f0
/* 1AA060 8027B780 46001003 */  div.s     $f0, $f2, $f0
/* 1AA064 8027B784 E600004C */  swc1      $f0, 0x4C($s0)
.L8027B788:
/* 1AA068 8027B788 86220064 */  lh        $v0, 0x64($s1)
/* 1AA06C 8027B78C 54400003 */  bnel      $v0, $zero, .L8027B79C
/* 1AA070 8027B790 AE200050 */   sw       $zero, 0x50($s1)
.L8027B794:
/* 1AA074 8027B794 0809EEE7 */  j         .L8027BB9C
/* 1AA078 8027B798 24020002 */   addiu    $v0, $zero, 0x2
.L8027B79C:
/* 1AA07C 8027B79C AE200048 */  sw        $zero, 0x48($s1)
/* 1AA080 8027B7A0 860201B6 */  lh        $v0, 0x1B6($s0)
/* 1AA084 8027B7A4 04420002 */  bltzl     $v0, .L8027B7B0
/* 1AA088 8027B7A8 00021027 */   nor      $v0, $zero, $v0
/* 1AA08C 8027B7AC 24420001 */  addiu     $v0, $v0, 0x1
.L8027B7B0:
/* 1AA090 8027B7B0 44820000 */  mtc1      $v0, $f0
/* 1AA094 8027B7B4 00000000 */  nop
/* 1AA098 8027B7B8 46800020 */  cvt.s.w   $f0, $f0
/* 1AA09C 8027B7BC E6200044 */  swc1      $f0, 0x44($s1)
/* 1AA0A0 8027B7C0 8E0201A4 */  lw        $v0, 0x1A4($s0)
/* 1AA0A4 8027B7C4 1040000B */  beqz      $v0, .L8027B7F4
/* 1AA0A8 8027B7C8 00000000 */   nop
/* 1AA0AC 8027B7CC 8E0201A8 */  lw        $v0, 0x1A8($s0)
/* 1AA0B0 8027B7D0 14400008 */  bnez      $v0, .L8027B7F4
/* 1AA0B4 8027B7D4 00000000 */   nop
/* 1AA0B8 8027B7D8 C600014C */  lwc1      $f0, 0x14C($s0)
/* 1AA0BC 8027B7DC E7A00010 */  swc1      $f0, 0x10($sp)
/* 1AA0C0 8027B7E0 8E0401A4 */  lw        $a0, 0x1A4($s0)
/* 1AA0C4 8027B7E4 8E060144 */  lw        $a2, 0x144($s0)
/* 1AA0C8 8027B7E8 8E070148 */  lw        $a3, 0x148($s0)
/* 1AA0CC 8027B7EC 0C052757 */  jal       sfx_play_sound_at_position
/* 1AA0D0 8027B7F0 0000282D */   daddu    $a1, $zero, $zero
.L8027B7F4:
/* 1AA0D4 8027B7F4 8E500074 */  lw        $s0, 0x74($s2)
/* 1AA0D8 8027B7F8 86020070 */  lh        $v0, 0x70($s0)
/* 1AA0DC 8027B7FC C600005C */  lwc1      $f0, 0x5C($s0)
/* 1AA0E0 8027B800 AFA20010 */  sw        $v0, 0x10($sp)
/* 1AA0E4 8027B804 8E44007C */  lw        $a0, 0x7C($s2)
/* 1AA0E8 8027B808 8E050024 */  lw        $a1, 0x24($s0)
/* 1AA0EC 8027B80C 8E060018 */  lw        $a2, 0x18($s0)
/* 1AA0F0 8027B810 4600038D */  trunc.w.s $f14, $f0
/* 1AA0F4 8027B814 44077000 */  mfc1      $a3, $f14
/* 1AA0F8 8027B818 0C09EC37 */  jal       update_lerp_battle
/* 1AA0FC 8027B81C 2611000C */   addiu    $s1, $s0, 0xC
/* 1AA100 8027B820 C602005C */  lwc1      $f2, 0x5C($s0)
/* 1AA104 8027B824 86020070 */  lh        $v0, 0x70($s0)
/* 1AA108 8027B828 E600000C */  swc1      $f0, 0xC($s0)
/* 1AA10C 8027B82C AFA20010 */  sw        $v0, 0x10($sp)
/* 1AA110 8027B830 8E44007C */  lw        $a0, 0x7C($s2)
/* 1AA114 8027B834 8E050028 */  lw        $a1, 0x28($s0)
/* 1AA118 8027B838 8E06001C */  lw        $a2, 0x1C($s0)
/* 1AA11C 8027B83C 4600138D */  trunc.w.s $f14, $f2
/* 1AA120 8027B840 44077000 */  mfc1      $a3, $f14
/* 1AA124 8027B844 0C09EC37 */  jal       update_lerp_battle
/* 1AA128 8027B848 00000000 */   nop
/* 1AA12C 8027B84C C602005C */  lwc1      $f2, 0x5C($s0)
/* 1AA130 8027B850 86020070 */  lh        $v0, 0x70($s0)
/* 1AA134 8027B854 E6000010 */  swc1      $f0, 0x10($s0)
/* 1AA138 8027B858 AFA20010 */  sw        $v0, 0x10($sp)
/* 1AA13C 8027B85C 8E44007C */  lw        $a0, 0x7C($s2)
/* 1AA140 8027B860 8E05002C */  lw        $a1, 0x2C($s0)
/* 1AA144 8027B864 8E060020 */  lw        $a2, 0x20($s0)
/* 1AA148 8027B868 4600138D */  trunc.w.s $f14, $f2
/* 1AA14C 8027B86C 44077000 */  mfc1      $a3, $f14
/* 1AA150 8027B870 0C09EC37 */  jal       update_lerp_battle
/* 1AA154 8027B874 00000000 */   nop
/* 1AA158 8027B878 8E020078 */  lw        $v0, 0x78($s0)
/* 1AA15C 8027B87C 10400012 */  beqz      $v0, .L8027B8C8
/* 1AA160 8027B880 E6000014 */   swc1     $f0, 0x14($s0)
/* 1AA164 8027B884 C6000010 */  lwc1      $f0, 0x10($s0)
/* 1AA168 8027B888 44801000 */  mtc1      $zero, $f2
/* 1AA16C 8027B88C 00000000 */  nop
/* 1AA170 8027B890 4602003C */  c.lt.s    $f0, $f2
/* 1AA174 8027B894 00000000 */  nop
/* 1AA178 8027B898 4500000B */  bc1f      .L8027B8C8
/* 1AA17C 8027B89C 00000000 */   nop
/* 1AA180 8027B8A0 86020070 */  lh        $v0, 0x70($s0)
/* 1AA184 8027B8A4 E602001C */  swc1      $f2, 0x1C($s0)
/* 1AA188 8027B8A8 C602000C */  lwc1      $f2, 0xC($s0)
/* 1AA18C 8027B8AC C6040014 */  lwc1      $f4, 0x14($s0)
/* 1AA190 8027B8B0 44820000 */  mtc1      $v0, $f0
/* 1AA194 8027B8B4 00000000 */  nop
/* 1AA198 8027B8B8 46800020 */  cvt.s.w   $f0, $f0
/* 1AA19C 8027B8BC E600005C */  swc1      $f0, 0x5C($s0)
/* 1AA1A0 8027B8C0 E6020018 */  swc1      $f2, 0x18($s0)
/* 1AA1A4 8027B8C4 E6040020 */  swc1      $f4, 0x20($s0)
.L8027B8C8:
/* 1AA1A8 8027B8C8 C6200050 */  lwc1      $f0, 0x50($s1)
/* 1AA1AC 8027B8CC 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 1AA1B0 8027B8D0 44812000 */  mtc1      $at, $f4
/* 1AA1B4 8027B8D4 86220064 */  lh        $v0, 0x64($s1)
/* 1AA1B8 8027B8D8 46040000 */  add.s     $f0, $f0, $f4
/* 1AA1BC 8027B8DC 44821000 */  mtc1      $v0, $f2
/* 1AA1C0 8027B8E0 00000000 */  nop
/* 1AA1C4 8027B8E4 468010A0 */  cvt.s.w   $f2, $f2
/* 1AA1C8 8027B8E8 4600103C */  c.lt.s    $f2, $f0
/* 1AA1CC 8027B8EC 00000000 */  nop
/* 1AA1D0 8027B8F0 45000010 */  bc1f      .L8027B934
/* 1AA1D4 8027B8F4 E6200050 */   swc1     $f0, 0x50($s1)
/* 1AA1D8 8027B8F8 C620000C */  lwc1      $f0, 0xC($s1)
/* 1AA1DC 8027B8FC 8E0401A4 */  lw        $a0, 0x1A4($s0)
/* 1AA1E0 8027B900 E6000144 */  swc1      $f0, 0x144($s0)
/* 1AA1E4 8027B904 C6200010 */  lwc1      $f0, 0x10($s1)
/* 1AA1E8 8027B908 E6000148 */  swc1      $f0, 0x148($s0)
/* 1AA1EC 8027B90C C6200014 */  lwc1      $f0, 0x14($s1)
/* 1AA1F0 8027B910 1080FFA0 */  beqz      $a0, .L8027B794
/* 1AA1F4 8027B914 E600014C */   swc1     $f0, 0x14C($s0)
/* 1AA1F8 8027B918 8E0201A8 */  lw        $v0, 0x1A8($s0)
/* 1AA1FC 8027B91C 1440009F */  bnez      $v0, .L8027BB9C
/* 1AA200 8027B920 24020002 */   addiu    $v0, $zero, 0x2
/* 1AA204 8027B924 0C0154F0 */  jal       snd_stop_sound
/* 1AA208 8027B928 00000000 */   nop
/* 1AA20C 8027B92C 0809EEE7 */  j         .L8027BB9C
/* 1AA210 8027B930 24020002 */   addiu    $v0, $zero, 0x2
.L8027B934:
/* 1AA214 8027B934 8E0201A4 */  lw        $v0, 0x1A4($s0)
/* 1AA218 8027B938 10400047 */  beqz      $v0, .L8027BA58
/* 1AA21C 8027B93C 00000000 */   nop
/* 1AA220 8027B940 8E0201A8 */  lw        $v0, 0x1A8($s0)
/* 1AA224 8027B944 10400044 */  beqz      $v0, .L8027BA58
/* 1AA228 8027B948 00000000 */   nop
/* 1AA22C 8027B94C 860201B6 */  lh        $v0, 0x1B6($s0)
/* 1AA230 8027B950 0440001C */  bltz      $v0, .L8027B9C4
/* 1AA234 8027B954 00000000 */   nop
/* 1AA238 8027B958 C6220044 */  lwc1      $f2, 0x44($s1)
/* 1AA23C 8027B95C C6200040 */  lwc1      $f0, 0x40($s1)
/* 1AA240 8027B960 46001080 */  add.s     $f2, $f2, $f0
/* 1AA244 8027B964 E6220044 */  swc1      $f2, 0x44($s1)
/* 1AA248 8027B968 860201B6 */  lh        $v0, 0x1B6($s0)
/* 1AA24C 8027B96C 44820000 */  mtc1      $v0, $f0
/* 1AA250 8027B970 00000000 */  nop
/* 1AA254 8027B974 46800020 */  cvt.s.w   $f0, $f0
/* 1AA258 8027B978 4602003C */  c.lt.s    $f0, $f2
/* 1AA25C 8027B97C 00000000 */  nop
/* 1AA260 8027B980 45000035 */  bc1f      .L8027BA58
/* 1AA264 8027B984 00000000 */   nop
/* 1AA268 8027B988 92020135 */  lbu       $v0, 0x135($s0)
/* 1AA26C 8027B98C 24420001 */  addiu     $v0, $v0, 0x1
/* 1AA270 8027B990 A2020135 */  sb        $v0, 0x135($s0)
/* 1AA274 8027B994 AE200044 */  sw        $zero, 0x44($s1)
/* 1AA278 8027B998 92020135 */  lbu       $v0, 0x135($s0)
/* 1AA27C 8027B99C 30420001 */  andi      $v0, $v0, 0x1
/* 1AA280 8027B9A0 10400023 */  beqz      $v0, .L8027BA30
/* 1AA284 8027B9A4 00000000 */   nop
/* 1AA288 8027B9A8 8E0201A4 */  lw        $v0, 0x1A4($s0)
/* 1AA28C 8027B9AC 1040002A */  beqz      $v0, .L8027BA58
/* 1AA290 8027B9B0 00000000 */   nop
/* 1AA294 8027B9B4 C600014C */  lwc1      $f0, 0x14C($s0)
/* 1AA298 8027B9B8 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1AA29C 8027B9BC 0809EE92 */  j         .L8027BA48
/* 1AA2A0 8027B9C0 8E0401A4 */   lw       $a0, 0x1A4($s0)
.L8027B9C4:
/* 1AA2A4 8027B9C4 C6200044 */  lwc1      $f0, 0x44($s1)
/* 1AA2A8 8027B9C8 46040000 */  add.s     $f0, $f0, $f4
/* 1AA2AC 8027B9CC E6200044 */  swc1      $f0, 0x44($s1)
/* 1AA2B0 8027B9D0 860201B6 */  lh        $v0, 0x1B6($s0)
/* 1AA2B4 8027B9D4 00021023 */  negu      $v0, $v0
/* 1AA2B8 8027B9D8 44821000 */  mtc1      $v0, $f2
/* 1AA2BC 8027B9DC 00000000 */  nop
/* 1AA2C0 8027B9E0 468010A0 */  cvt.s.w   $f2, $f2
/* 1AA2C4 8027B9E4 4600103E */  c.le.s    $f2, $f0
/* 1AA2C8 8027B9E8 00000000 */  nop
/* 1AA2CC 8027B9EC 4500001A */  bc1f      .L8027BA58
/* 1AA2D0 8027B9F0 00000000 */   nop
/* 1AA2D4 8027B9F4 92020135 */  lbu       $v0, 0x135($s0)
/* 1AA2D8 8027B9F8 24420001 */  addiu     $v0, $v0, 0x1
/* 1AA2DC 8027B9FC A2020135 */  sb        $v0, 0x135($s0)
/* 1AA2E0 8027BA00 AE200044 */  sw        $zero, 0x44($s1)
/* 1AA2E4 8027BA04 92020135 */  lbu       $v0, 0x135($s0)
/* 1AA2E8 8027BA08 30420001 */  andi      $v0, $v0, 0x1
/* 1AA2EC 8027BA0C 10400008 */  beqz      $v0, .L8027BA30
/* 1AA2F0 8027BA10 00000000 */   nop
/* 1AA2F4 8027BA14 8E0201A4 */  lw        $v0, 0x1A4($s0)
/* 1AA2F8 8027BA18 1040000F */  beqz      $v0, .L8027BA58
/* 1AA2FC 8027BA1C 00000000 */   nop
/* 1AA300 8027BA20 C600014C */  lwc1      $f0, 0x14C($s0)
/* 1AA304 8027BA24 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1AA308 8027BA28 0809EE92 */  j         .L8027BA48
/* 1AA30C 8027BA2C 8E0401A4 */   lw       $a0, 0x1A4($s0)
.L8027BA30:
/* 1AA310 8027BA30 8E0201A8 */  lw        $v0, 0x1A8($s0)
/* 1AA314 8027BA34 10400008 */  beqz      $v0, .L8027BA58
/* 1AA318 8027BA38 00000000 */   nop
/* 1AA31C 8027BA3C C600014C */  lwc1      $f0, 0x14C($s0)
/* 1AA320 8027BA40 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1AA324 8027BA44 8E0401A8 */  lw        $a0, 0x1A8($s0)
.L8027BA48:
/* 1AA328 8027BA48 8E060144 */  lw        $a2, 0x144($s0)
/* 1AA32C 8027BA4C 8E070148 */  lw        $a3, 0x148($s0)
/* 1AA330 8027BA50 0C052757 */  jal       sfx_play_sound_at_position
/* 1AA334 8027BA54 0000282D */   daddu    $a1, $zero, $zero
.L8027BA58:
/* 1AA338 8027BA58 C622000C */  lwc1      $f2, 0xC($s1)
/* 1AA33C 8027BA5C C6200000 */  lwc1      $f0, 0x0($s1)
/* 1AA340 8027BA60 46001081 */  sub.s     $f2, $f2, $f0
/* 1AA344 8027BA64 46021102 */  mul.s     $f4, $f2, $f2
/* 1AA348 8027BA68 00000000 */  nop
/* 1AA34C 8027BA6C C6200004 */  lwc1      $f0, 0x4($s1)
/* 1AA350 8027BA70 C6220010 */  lwc1      $f2, 0x10($s1)
/* 1AA354 8027BA74 46001081 */  sub.s     $f2, $f2, $f0
/* 1AA358 8027BA78 46021182 */  mul.s     $f6, $f2, $f2
/* 1AA35C 8027BA7C 00000000 */  nop
/* 1AA360 8027BA80 C6200008 */  lwc1      $f0, 0x8($s1)
/* 1AA364 8027BA84 C6220014 */  lwc1      $f2, 0x14($s1)
/* 1AA368 8027BA88 46001001 */  sub.s     $f0, $f2, $f0
/* 1AA36C 8027BA8C 46000002 */  mul.s     $f0, $f0, $f0
/* 1AA370 8027BA90 00000000 */  nop
/* 1AA374 8027BA94 46062100 */  add.s     $f4, $f4, $f6
/* 1AA378 8027BA98 46002300 */  add.s     $f12, $f4, $f0
/* 1AA37C 8027BA9C 46006004 */  sqrt.s    $f0, $f12
/* 1AA380 8027BAA0 46000032 */  c.eq.s    $f0, $f0
/* 1AA384 8027BAA4 00000000 */  nop
/* 1AA388 8027BAA8 45010003 */  bc1t      .L8027BAB8
/* 1AA38C 8027BAAC 00000000 */   nop
/* 1AA390 8027BAB0 0C0187BC */  jal       sqrtf
/* 1AA394 8027BAB4 00000000 */   nop
.L8027BAB8:
/* 1AA398 8027BAB8 4480A000 */  mtc1      $zero, $f20
/* 1AA39C 8027BABC 46000086 */  mov.s     $f2, $f0
/* 1AA3A0 8027BAC0 46141032 */  c.eq.s    $f2, $f20
/* 1AA3A4 8027BAC4 00000000 */  nop
/* 1AA3A8 8027BAC8 45000003 */  bc1f      .L8027BAD8
/* 1AA3AC 8027BACC 00000000 */   nop
/* 1AA3B0 8027BAD0 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 1AA3B4 8027BAD4 44811000 */  mtc1      $at, $f2
.L8027BAD8:
/* 1AA3B8 8027BAD8 C620004C */  lwc1      $f0, 0x4C($s1)
/* 1AA3BC 8027BADC 46140032 */  c.eq.s    $f0, $f20
/* 1AA3C0 8027BAE0 00000000 */  nop
/* 1AA3C4 8027BAE4 45000006 */  bc1f      .L8027BB00
/* 1AA3C8 8027BAE8 00000000 */   nop
/* 1AA3CC 8027BAEC 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 1AA3D0 8027BAF0 44810000 */  mtc1      $at, $f0
/* 1AA3D4 8027BAF4 00000000 */  nop
/* 1AA3D8 8027BAF8 E620004C */  swc1      $f0, 0x4C($s1)
/* 1AA3DC 8027BAFC C620004C */  lwc1      $f0, 0x4C($s1)
.L8027BB00:
/* 1AA3E0 8027BB00 3C013FF0 */  lui       $at, (0x3FF00000 >> 16)
/* 1AA3E4 8027BB04 44816800 */  mtc1      $at, $f13
/* 1AA3E8 8027BB08 44806000 */  mtc1      $zero, $f12
/* 1AA3EC 8027BB0C 46001003 */  div.s     $f0, $f2, $f0
/* 1AA3F0 8027BB10 46000021 */  cvt.d.s   $f0, $f0
/* 1AA3F4 8027BB14 46206301 */  sub.d     $f12, $f12, $f0
/* 1AA3F8 8027BB18 3C01802A */  lui       $at, %hi(D_8029DA10)
/* 1AA3FC 8027BB1C D420DA10 */  ldc1      $f0, %lo(D_8029DA10)($at)
/* 1AA400 8027BB20 46206302 */  mul.d     $f12, $f12, $f0
/* 1AA404 8027BB24 00000000 */  nop
/* 1AA408 8027BB28 0C00A8BB */  jal       sin_deg
/* 1AA40C 8027BB2C 46206320 */   cvt.s.d  $f12, $f12
/* 1AA410 8027BB30 86230066 */  lh        $v1, 0x66($s1)
/* 1AA414 8027BB34 14600002 */  bnez      $v1, .L8027BB40
/* 1AA418 8027BB38 46000106 */   mov.s    $f4, $f0
/* 1AA41C 8027BB3C 4600A106 */  mov.s     $f4, $f20
.L8027BB40:
/* 1AA420 8027BB40 04610007 */  bgez      $v1, .L8027BB60
/* 1AA424 8027BB44 00031023 */   negu     $v0, $v1
/* 1AA428 8027BB48 44821000 */  mtc1      $v0, $f2
/* 1AA42C 8027BB4C 00000000 */  nop
/* 1AA430 8027BB50 468010A0 */  cvt.s.w   $f2, $f2
/* 1AA434 8027BB54 46002007 */  neg.s     $f0, $f4
/* 1AA438 8027BB58 46020102 */  mul.s     $f4, $f0, $f2
/* 1AA43C 8027BB5C 00000000 */  nop
.L8027BB60:
/* 1AA440 8027BB60 18600006 */  blez      $v1, .L8027BB7C
/* 1AA444 8027BB64 00000000 */   nop
/* 1AA448 8027BB68 44830000 */  mtc1      $v1, $f0
/* 1AA44C 8027BB6C 00000000 */  nop
/* 1AA450 8027BB70 46800020 */  cvt.s.w   $f0, $f0
/* 1AA454 8027BB74 46002102 */  mul.s     $f4, $f4, $f0
/* 1AA458 8027BB78 00000000 */  nop
.L8027BB7C:
/* 1AA45C 8027BB7C C6200000 */  lwc1      $f0, 0x0($s1)
/* 1AA460 8027BB80 E6000144 */  swc1      $f0, 0x144($s0)
/* 1AA464 8027BB84 C6200004 */  lwc1      $f0, 0x4($s1)
/* 1AA468 8027BB88 46040000 */  add.s     $f0, $f0, $f4
/* 1AA46C 8027BB8C E6000148 */  swc1      $f0, 0x148($s0)
/* 1AA470 8027BB90 C6200008 */  lwc1      $f0, 0x8($s1)
/* 1AA474 8027BB94 0000102D */  daddu     $v0, $zero, $zero
/* 1AA478 8027BB98 E600014C */  swc1      $f0, 0x14C($s0)
.L8027BB9C:
/* 1AA47C 8027BB9C 8FBF0024 */  lw        $ra, 0x24($sp)
/* 1AA480 8027BBA0 8FB20020 */  lw        $s2, 0x20($sp)
/* 1AA484 8027BBA4 8FB1001C */  lw        $s1, 0x1C($sp)
/* 1AA488 8027BBA8 8FB00018 */  lw        $s0, 0x18($sp)
/* 1AA48C 8027BBAC D7B40028 */  ldc1      $f20, 0x28($sp)
/* 1AA490 8027BBB0 03E00008 */  jr        $ra
/* 1AA494 8027BBB4 27BD0030 */   addiu    $sp, $sp, 0x30

### DECOMPILED C INSTRUCTIONS:

ApiStatus FlyToGoal(Evt* script, s32 isInitialCall) {
    Bytecode* args = script->ptrReadPos;
    Actor* actor;
    ActorState* actorState;
    s32 actorID;
    f32 posX, posY, posZ;
    f32 goalX, goalY, goalZ;
    f32 deltaX, deltaY, deltaZ;
    f32 dist3D;
    f32 offsetY;

    if (isInitialCall) {
        actorID = evt_get_variable(script, *args++);
        if (actorID == ACTOR_SELF) {
            actorID = script->owner1.enemyID;
        }
        script->functionTempPtr[1] = actor = get_actor(actorID);
        actorState = &actor->state;

        actorState->moveTime = evt_get_variable(script, *args++);
        actorState->moveArcAmplitude = evt_get_variable(script, *args++);
        script->functionTemp[3] = evt_get_variable(script, *args++);
        actorState->functionTemp[0] = FALSE;

        if (script->functionTemp[3] >= 100) {
            script->functionTemp[3] -= 100;
            actorState->functionTemp[0] = TRUE;
        }

        goalX = actorState->goalPos.x;
        goalY = actorState->goalPos.y;
        goalZ = actorState->goalPos.z;

        posX = actor->currentPos.x;
        posY = actor->currentPos.y;
        posZ = actor->currentPos.z;

        deltaX = posX - goalX;
        deltaY = posY - goalY;
        deltaZ = posZ - goalZ;

        actorState->currentPos.x = posX;
        actorState->unk_18.x = posX;
        actorState->currentPos.y = posY;
        actorState->unk_18.y = posY;
        actorState->currentPos.z = posZ;
        actorState->unk_18.z = posZ;

        actorState->distance = sqrtf(SQ(deltaX) + SQ(deltaY) + SQ(deltaZ));

        if (actorState->moveTime == 0) {
            actorState->moveTime = actorState->distance / actorState->speed;
        } else {
            actorState->speed = actorState->distance / actorState->moveTime;
        }
        if (actorState->moveTime == 0) {
            return ApiStatus_DONE2;
        }

        actorState->bounceDivisor = 0.0f;
        actorState->angle = 0.0f;
        if (actor->actorTypeData1b[1] >= 0) {
            actorState->velocity = actor->actorTypeData1b[1] + 1;
        } else {
            actorState->velocity = ~actor->actorTypeData1b[1];
        }
        if ((actor->actorTypeData1[2] != 0) && (actor->actorTypeData1[3] == 0)) {
            sfx_play_sound_at_position(actor->actorTypeData1[2], SOUND_SPACE_MODE_0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z);
        }
    }

    actor = script->functionTempPtr[1];
    actorState = &actor->state;

    actorState->currentPos.x = update_lerp_battle(script->functionTemp[3], actorState->unk_18.x, actorState->goalPos.x, actorState->bounceDivisor, actorState->moveTime);
    actorState->currentPos.y = update_lerp_battle(script->functionTemp[3], actorState->unk_18.y, actorState->goalPos.y, actorState->bounceDivisor, actorState->moveTime);
    actorState->currentPos.z = update_lerp_battle(script->functionTemp[3], actorState->unk_18.z, actorState->goalPos.z, actorState->bounceDivisor, actorState->moveTime);
    if ((actorState->functionTemp[0]) && (actorState->currentPos.y < 0.0f)) {
        actorState->bounceDivisor = actorState->moveTime;
        actorState->goalPos.x = actorState->currentPos.x;
        actorState->goalPos.y = 0.0f;
        actorState->goalPos.z = actorState->currentPos.z;
    }
    actorState->bounceDivisor += 1.0f;
    if (actorState->moveTime < actorState->bounceDivisor) {
        actor->currentPos.x = actorState->goalPos.x;
        actor->currentPos.y = actorState->goalPos.y;
        actor->currentPos.z = actorState->goalPos.z;
        if (actor->actorTypeData1[2] != 0) {
            if (actor->actorTypeData1[3] == 0) {
                snd_stop_sound(actor->actorTypeData1[2]);
            }
        }
        return ApiStatus_DONE2;
    }
    if ((actor->actorTypeData1[2] != 0) && (actor->actorTypeData1[3] != 0)) {
        if (actor->actorTypeData1b[1] >= 0) {
            actorState->velocity += actorState->speed;
            if (actor->actorTypeData1b[1] < actorState->velocity) {
                actor->footStepCounter++;
                actorState->velocity = 0.0f;
                if (actor->footStepCounter & 1) {
                    if (actor->actorTypeData1[2] != 0) {
                        sfx_play_sound_at_position(actor->actorTypeData1[2], SOUND_SPACE_MODE_0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z);
                    }
                } else {
                    if (actor->actorTypeData1[3] != 0) {
                        sfx_play_sound_at_position(actor->actorTypeData1[3], SOUND_SPACE_MODE_0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z);
                    }
                }
            }
        } else {
            actorState->velocity += 1.0f;
            if (-actor->actorTypeData1b[1] <= actorState->velocity) {
                actor->footStepCounter++;
                actorState->velocity = 0.0f;
                if (actor->footStepCounter & 1) {
                    if (actor->actorTypeData1[2] != 0) {
                        sfx_play_sound_at_position(actor->actorTypeData1[2], SOUND_SPACE_MODE_0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z);
                    }
                } else {
                    if (actor->actorTypeData1[3] != 0) {
                        sfx_play_sound_at_position(actor->actorTypeData1[3], SOUND_SPACE_MODE_0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z);
                    }
                }
            }
        }
    }

    deltaX = actorState->goalPos.x - actorState->currentPos.x;
    deltaY = actorState->goalPos.y - actorState->currentPos.y;
    deltaZ = actorState->goalPos.z - actorState->currentPos.z;
    dist3D = sqrtf(SQ(deltaX) + SQ(deltaY) + SQ(deltaZ));
    if (dist3D == 0.0f) {
        dist3D = 1.0f;
    }
    if (actorState->distance == 0.0f) {
        actorState->distance = 1.0f;
    }
    offsetY = sin_deg((1.0 - (dist3D / actorState->distance)) * 180.0);
    if (actorState->moveArcAmplitude == 0) {
        offsetY = 0.0f;
    }
    if (actorState->moveArcAmplitude < 0) {
        offsetY = -offsetY * -actorState->moveArcAmplitude;
    }
    if (actorState->moveArcAmplitude > 0) {
        offsetY = offsetY * actorState->moveArcAmplitude;
    }
    actor->currentPos.x = actorState->currentPos.x;
    actor->currentPos.y = actorState->currentPos.y + offsetY;
    actor->currentPos.z = actorState->currentPos.z;
    return ApiStatus_BLOCK;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel evt_handle_print_debug_var
/* EB7CC 802C6E1C 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* EB7D0 802C6E20 0080382D */  daddu     $a3, $a0, $zero
/* EB7D4 802C6E24 AFBF0024 */  sw        $ra, 0x24($sp)
/* EB7D8 802C6E28 AFB20020 */  sw        $s2, 0x20($sp)
/* EB7DC 802C6E2C AFB1001C */  sw        $s1, 0x1C($sp)
/* EB7E0 802C6E30 AFB00018 */  sw        $s0, 0x18($sp)
/* EB7E4 802C6E34 8CE2000C */  lw        $v0, 0xC($a3)
/* EB7E8 802C6E38 8C500000 */  lw        $s0, 0x0($v0)
/* EB7EC 802C6E3C 3C11EFE8 */  lui       $s1, (0xEFE82080 >> 16)
/* EB7F0 802C6E40 36312080 */  ori       $s1, $s1, (0xEFE82080 & 0xFFFF)
/* EB7F4 802C6E44 0230102A */  slt       $v0, $s1, $s0
/* EB7F8 802C6E48 14400007 */  bnez      $v0, .L802C6E68
/* EB7FC 802C6E4C 3C12F2E3 */   lui      $s2, (0xF2E31100 >> 16)
/* EB800 802C6E50 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EB804 802C6E54 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EB808 802C6E58 3C05802E */  lui       $a1, %hi(D_802D9D98)
/* EB80C 802C6E5C 24A59D98 */  addiu     $a1, $a1, %lo(D_802D9D98)
/* EB810 802C6E60 080B1CDE */  j         .L802C7378
/* EB814 802C6E64 0200302D */   daddu    $a2, $s0, $zero
.L802C6E68:
/* EB818 802C6E68 36521100 */  ori       $s2, $s2, (0xF2E31100 & 0xFFFF)
/* EB81C 802C6E6C 0250102A */  slt       $v0, $s2, $s0
/* EB820 802C6E70 1440000D */  bnez      $v0, .L802C6EA8
/* EB824 802C6E74 3C02F414 */   lui      $v0, (0xF4143E00 >> 16)
/* EB828 802C6E78 0C0B1248 */  jal       evt_fixed_var_to_float
/* EB82C 802C6E7C 0200202D */   daddu    $a0, $s0, $zero
/* EB830 802C6E80 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EB834 802C6E84 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EB838 802C6E88 460000A1 */  cvt.d.s   $f2, $f0
/* EB83C 802C6E8C 44071000 */  mfc1      $a3, $f2
/* EB840 802C6E90 44061800 */  mfc1      $a2, $f3
/* EB844 802C6E94 3C05802E */  lui       $a1, %hi(D_802D9DA8)
/* EB848 802C6E98 0C01953C */  jal       sprintf
/* EB84C 802C6E9C 24A59DA8 */   addiu    $a1, $a1, %lo(D_802D9DA8)
/* EB850 802C6EA0 080B1CE0 */  j         .L802C7380
/* EB854 802C6EA4 00000000 */   nop
.L802C6EA8:
/* EB858 802C6EA8 34423E00 */  ori       $v0, $v0, (0xF4143E00 & 0xFFFF)
/* EB85C 802C6EAC 0050102A */  slt       $v0, $v0, $s0
/* EB860 802C6EB0 14400016 */  bnez      $v0, .L802C6F0C
/* EB864 802C6EB4 3C02F545 */   lui      $v0, (0xF5456B00 >> 16)
/* EB868 802C6EB8 3C020C84 */  lui       $v0, (0xC845880 >> 16)
/* EB86C 802C6EBC 34425880 */  ori       $v0, $v0, (0xC845880 & 0xFFFF)
/* EB870 802C6EC0 02028021 */  addu      $s0, $s0, $v0
/* EB874 802C6EC4 06010002 */  bgez      $s0, .L802C6ED0
/* EB878 802C6EC8 0200182D */   daddu    $v1, $s0, $zero
/* EB87C 802C6ECC 2603001F */  addiu     $v1, $s0, 0x1F
.L802C6ED0:
/* EB880 802C6ED0 00034143 */  sra       $t0, $v1, 5
/* EB884 802C6ED4 0100182D */  daddu     $v1, $t0, $zero
/* EB888 802C6ED8 00031140 */  sll       $v0, $v1, 5
/* EB88C 802C6EDC 02024023 */  subu      $t0, $s0, $v0
/* EB890 802C6EE0 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EB894 802C6EE4 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EB898 802C6EE8 3C05802E */  lui       $a1, %hi(D_802D9DBC)
/* EB89C 802C6EEC 24A59DBC */  addiu     $a1, $a1, %lo(D_802D9DBC)
/* EB8A0 802C6EF0 0200302D */  daddu     $a2, $s0, $zero
/* EB8A4 802C6EF4 00031880 */  sll       $v1, $v1, 2
/* EB8A8 802C6EF8 8CE20140 */  lw        $v0, 0x140($a3)
/* EB8AC 802C6EFC 00621821 */  addu      $v1, $v1, $v0
/* EB8B0 802C6F00 8C620000 */  lw        $v0, 0x0($v1)
/* EB8B4 802C6F04 080B1C7F */  j         .L802C71FC
/* EB8B8 802C6F08 24070001 */   addiu    $a3, $zero, 0x1
.L802C6F0C:
/* EB8BC 802C6F0C 34426B00 */  ori       $v0, $v0, (0xF5456B00 & 0xFFFF)
/* EB8C0 802C6F10 0050102A */  slt       $v0, $v0, $s0
/* EB8C4 802C6F14 14400021 */  bnez      $v0, .L802C6F9C
/* EB8C8 802C6F18 3C02F676 */   lui      $v0, (0xF6769800 >> 16)
/* EB8CC 802C6F1C 3C020B53 */  lui       $v0, (0xB532B80 >> 16)
/* EB8D0 802C6F20 34422B80 */  ori       $v0, $v0, (0xB532B80 & 0xFFFF)
/* EB8D4 802C6F24 02028021 */  addu      $s0, $s0, $v0
/* EB8D8 802C6F28 8CE3013C */  lw        $v1, 0x13C($a3)
/* EB8DC 802C6F2C 00101080 */  sll       $v0, $s0, 2
/* EB8E0 802C6F30 00431021 */  addu      $v0, $v0, $v1
/* EB8E4 802C6F34 8C470000 */  lw        $a3, 0x0($v0)
/* EB8E8 802C6F38 0227102A */  slt       $v0, $s1, $a3
/* EB8EC 802C6F3C 14400007 */  bnez      $v0, .L802C6F5C
/* EB8F0 802C6F40 0247102A */   slt      $v0, $s2, $a3
/* EB8F4 802C6F44 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EB8F8 802C6F48 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EB8FC 802C6F4C 3C05802E */  lui       $a1, %hi(D_802D9DCC)
/* EB900 802C6F50 24A59DCC */  addiu     $a1, $a1, %lo(D_802D9DCC)
/* EB904 802C6F54 080B1CDE */  j         .L802C7378
/* EB908 802C6F58 00E0302D */   daddu    $a2, $a3, $zero
.L802C6F5C:
/* EB90C 802C6F5C 1440000A */  bnez      $v0, .L802C6F88
/* EB910 802C6F60 00000000 */   nop
/* EB914 802C6F64 0C0B1248 */  jal       evt_fixed_var_to_float
/* EB918 802C6F68 00E0202D */   daddu    $a0, $a3, $zero
/* EB91C 802C6F6C 46000021 */  cvt.d.s   $f0, $f0
/* EB920 802C6F70 F7A00010 */  sdc1      $f0, 0x10($sp)
/* EB924 802C6F74 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EB928 802C6F78 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EB92C 802C6F7C 3C05802E */  lui       $a1, %hi(D_802D9DDC)
/* EB930 802C6F80 080B1CCE */  j         .L802C7338
/* EB934 802C6F84 24A59DDC */   addiu    $a1, $a1, %lo(D_802D9DDC)
.L802C6F88:
/* EB938 802C6F88 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EB93C 802C6F8C 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EB940 802C6F90 3C05802E */  lui       $a1, %hi(D_802D9DF0)
/* EB944 802C6F94 080B1CD6 */  j         .L802C7358
/* EB948 802C6F98 24A59DF0 */   addiu    $a1, $a1, %lo(D_802D9DF0)
.L802C6F9C:
/* EB94C 802C6F9C 34429800 */  ori       $v0, $v0, (0xF6769800 & 0xFFFF)
/* EB950 802C6FA0 0050102A */  slt       $v0, $v0, $s0
/* EB954 802C6FA4 14400020 */  bnez      $v0, .L802C7028
/* EB958 802C6FA8 3C02F7A7 */   lui      $v0, (0xF7A7C500 >> 16)
/* EB95C 802C6FAC 3C020A21 */  lui       $v0, (0xA21FE80 >> 16)
/* EB960 802C6FB0 3442FE80 */  ori       $v0, $v0, (0xA21FE80 & 0xFFFF)
/* EB964 802C6FB4 02028021 */  addu      $s0, $s0, $v0
/* EB968 802C6FB8 0C05154E */  jal       get_global_byte
/* EB96C 802C6FBC 0200202D */   daddu    $a0, $s0, $zero
/* EB970 802C6FC0 0040382D */  daddu     $a3, $v0, $zero
/* EB974 802C6FC4 0227102A */  slt       $v0, $s1, $a3
/* EB978 802C6FC8 14400007 */  bnez      $v0, .L802C6FE8
/* EB97C 802C6FCC 0247102A */   slt      $v0, $s2, $a3
/* EB980 802C6FD0 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EB984 802C6FD4 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EB988 802C6FD8 3C05802E */  lui       $a1, %hi(D_802D9E00)
/* EB98C 802C6FDC 24A59E00 */  addiu     $a1, $a1, %lo(D_802D9E00)
/* EB990 802C6FE0 080B1CDE */  j         .L802C7378
/* EB994 802C6FE4 00E0302D */   daddu    $a2, $a3, $zero
.L802C6FE8:
/* EB998 802C6FE8 1440000A */  bnez      $v0, .L802C7014
/* EB99C 802C6FEC 00000000 */   nop
/* EB9A0 802C6FF0 0C0B1248 */  jal       evt_fixed_var_to_float
/* EB9A4 802C6FF4 00E0202D */   daddu    $a0, $a3, $zero
/* EB9A8 802C6FF8 46000021 */  cvt.d.s   $f0, $f0
/* EB9AC 802C6FFC F7A00010 */  sdc1      $f0, 0x10($sp)
/* EB9B0 802C7000 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EB9B4 802C7004 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EB9B8 802C7008 3C05802E */  lui       $a1, %hi(D_802D9E10)
/* EB9BC 802C700C 080B1CCE */  j         .L802C7338
/* EB9C0 802C7010 24A59E10 */   addiu    $a1, $a1, %lo(D_802D9E10)
.L802C7014:
/* EB9C4 802C7014 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EB9C8 802C7018 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EB9CC 802C701C 3C05802E */  lui       $a1, %hi(D_802D9E24)
/* EB9D0 802C7020 080B1CD6 */  j         .L802C7358
/* EB9D4 802C7024 24A59E24 */   addiu    $a1, $a1, %lo(D_802D9E24)
.L802C7028:
/* EB9D8 802C7028 3442C500 */  ori       $v0, $v0, (0xF7A7C500 & 0xFFFF)
/* EB9DC 802C702C 0050102A */  slt       $v0, $v0, $s0
/* EB9E0 802C7030 14400020 */  bnez      $v0, .L802C70B4
/* EB9E4 802C7034 3C02F8D8 */   lui      $v0, (0xF8D8F200 >> 16)
/* EB9E8 802C7038 3C0208F0 */  lui       $v0, (0x8F0D180 >> 16)
/* EB9EC 802C703C 3442D180 */  ori       $v0, $v0, (0x8F0D180 & 0xFFFF)
/* EB9F0 802C7040 02028021 */  addu      $s0, $s0, $v0
/* EB9F4 802C7044 0C051594 */  jal       get_area_byte
/* EB9F8 802C7048 0200202D */   daddu    $a0, $s0, $zero
/* EB9FC 802C704C 0040382D */  daddu     $a3, $v0, $zero
/* EBA00 802C7050 0227102A */  slt       $v0, $s1, $a3
/* EBA04 802C7054 14400007 */  bnez      $v0, .L802C7074
/* EBA08 802C7058 0247102A */   slt      $v0, $s2, $a3
/* EBA0C 802C705C 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EBA10 802C7060 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EBA14 802C7064 3C05802E */  lui       $a1, %hi(D_802D9E34)
/* EBA18 802C7068 24A59E34 */  addiu     $a1, $a1, %lo(D_802D9E34)
/* EBA1C 802C706C 080B1CDE */  j         .L802C7378
/* EBA20 802C7070 00E0302D */   daddu    $a2, $a3, $zero
.L802C7074:
/* EBA24 802C7074 1440000A */  bnez      $v0, .L802C70A0
/* EBA28 802C7078 00000000 */   nop
/* EBA2C 802C707C 0C0B1248 */  jal       evt_fixed_var_to_float
/* EBA30 802C7080 00E0202D */   daddu    $a0, $a3, $zero
/* EBA34 802C7084 46000021 */  cvt.d.s   $f0, $f0
/* EBA38 802C7088 F7A00010 */  sdc1      $f0, 0x10($sp)
/* EBA3C 802C708C 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EBA40 802C7090 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EBA44 802C7094 3C05802E */  lui       $a1, %hi(D_802D9E44)
/* EBA48 802C7098 080B1CCE */  j         .L802C7338
/* EBA4C 802C709C 24A59E44 */   addiu    $a1, $a1, %lo(D_802D9E44)
.L802C70A0:
/* EBA50 802C70A0 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EBA54 802C70A4 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EBA58 802C70A8 3C05802E */  lui       $a1, %hi(D_802D9E58)
/* EBA5C 802C70AC 080B1CD6 */  j         .L802C7358
/* EBA60 802C70B0 24A59E58 */   addiu    $a1, $a1, %lo(D_802D9E58)
.L802C70B4:
/* EBA64 802C70B4 3442F200 */  ori       $v0, $v0, (0xF8D8F200 & 0xFFFF)
/* EBA68 802C70B8 0050102A */  slt       $v0, $v0, $s0
/* EBA6C 802C70BC 1440000C */  bnez      $v0, .L802C70F0
/* EBA70 802C70C0 3C02FA0A */   lui      $v0, (0xFA0A1F00 >> 16)
/* EBA74 802C70C4 3C0207BF */  lui       $v0, (0x7BFA480 >> 16)
/* EBA78 802C70C8 3442A480 */  ori       $v0, $v0, (0x7BFA480 & 0xFFFF)
/* EBA7C 802C70CC 02028021 */  addu      $s0, $s0, $v0
/* EBA80 802C70D0 0C05152F */  jal       get_global_flag
/* EBA84 802C70D4 0200202D */   daddu    $a0, $s0, $zero
/* EBA88 802C70D8 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EBA8C 802C70DC 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EBA90 802C70E0 3C05802E */  lui       $a1, %hi(D_802D9E68)
/* EBA94 802C70E4 24A59E68 */  addiu     $a1, $a1, %lo(D_802D9E68)
/* EBA98 802C70E8 080B1C4A */  j         .L802C7128
/* EBA9C 802C70EC 0200302D */   daddu    $a2, $s0, $zero
.L802C70F0:
/* EBAA0 802C70F0 34421F00 */  ori       $v0, $v0, (0xFA0A1F00 & 0xFFFF)
/* EBAA4 802C70F4 0050102A */  slt       $v0, $v0, $s0
/* EBAA8 802C70F8 1440000F */  bnez      $v0, .L802C7138
/* EBAAC 802C70FC 3C02FB3B */   lui      $v0, (0xFB3B4C00 >> 16)
/* EBAB0 802C7100 3C02068E */  lui       $v0, (0x68E7780 >> 16)
/* EBAB4 802C7104 34427780 */  ori       $v0, $v0, (0x68E7780 & 0xFFFF)
/* EBAB8 802C7108 02028021 */  addu      $s0, $s0, $v0
/* EBABC 802C710C 0C05157C */  jal       get_area_flag
/* EBAC0 802C7110 0200202D */   daddu    $a0, $s0, $zero
/* EBAC4 802C7114 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EBAC8 802C7118 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EBACC 802C711C 3C05802E */  lui       $a1, %hi(D_802D9E78)
/* EBAD0 802C7120 24A59E78 */  addiu     $a1, $a1, %lo(D_802D9E78)
/* EBAD4 802C7124 0200302D */  daddu     $a2, $s0, $zero
.L802C7128:
/* EBAD8 802C7128 0C01953C */  jal       sprintf
/* EBADC 802C712C 0040382D */   daddu    $a3, $v0, $zero
/* EBAE0 802C7130 080B1CE0 */  j         .L802C7380
/* EBAE4 802C7134 00000000 */   nop
.L802C7138:
/* EBAE8 802C7138 34424C00 */  ori       $v0, $v0, (0xFB3B4C00 & 0xFFFF)
/* EBAEC 802C713C 0050102A */  slt       $v0, $v0, $s0
/* EBAF0 802C7140 14400017 */  bnez      $v0, .L802C71A0
/* EBAF4 802C7144 3C02FC6C */   lui      $v0, (0xFC6C7900 >> 16)
/* EBAF8 802C7148 3C02055D */  lui       $v0, (0x55D4A80 >> 16)
/* EBAFC 802C714C 34424A80 */  ori       $v0, $v0, (0x55D4A80 & 0xFFFF)
/* EBB00 802C7150 02028021 */  addu      $s0, $s0, $v0
/* EBB04 802C7154 06010002 */  bgez      $s0, .L802C7160
/* EBB08 802C7158 0200182D */   daddu    $v1, $s0, $zero
/* EBB0C 802C715C 2603001F */  addiu     $v1, $s0, 0x1F
.L802C7160:
/* EBB10 802C7160 00034143 */  sra       $t0, $v1, 5
/* EBB14 802C7164 0100182D */  daddu     $v1, $t0, $zero
/* EBB18 802C7168 00031140 */  sll       $v0, $v1, 5
/* EBB1C 802C716C 02024023 */  subu      $t0, $s0, $v0
/* EBB20 802C7170 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EBB24 802C7174 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EBB28 802C7178 3C05802E */  lui       $a1, %hi(D_802D9E88)
/* EBB2C 802C717C 24A59E88 */  addiu     $a1, $a1, %lo(D_802D9E88)
/* EBB30 802C7180 0200302D */  daddu     $a2, $s0, $zero
/* EBB34 802C7184 00031880 */  sll       $v1, $v1, 2
/* EBB38 802C7188 3C02802E */  lui       $v0, %hi(gMapFlags)
/* EBB3C 802C718C 8C42A480 */  lw        $v0, %lo(gMapFlags)($v0)
/* EBB40 802C7190 00621821 */  addu      $v1, $v1, $v0
/* EBB44 802C7194 8C620000 */  lw        $v0, 0x0($v1)
/* EBB48 802C7198 080B1C7F */  j         .L802C71FC
/* EBB4C 802C719C 24070001 */   addiu    $a3, $zero, 0x1
.L802C71A0:
/* EBB50 802C71A0 34427900 */  ori       $v0, $v0, (0xFC6C7900 & 0xFFFF)
/* EBB54 802C71A4 0050102A */  slt       $v0, $v0, $s0
/* EBB58 802C71A8 14400019 */  bnez      $v0, .L802C7210
/* EBB5C 802C71AC 3C02FD9D */   lui      $v0, (0xFD9DA600 >> 16)
/* EBB60 802C71B0 3C02042C */  lui       $v0, (0x42C1D80 >> 16)
/* EBB64 802C71B4 34421D80 */  ori       $v0, $v0, (0x42C1D80 & 0xFFFF)
/* EBB68 802C71B8 02028021 */  addu      $s0, $s0, $v0
/* EBB6C 802C71BC 06010002 */  bgez      $s0, .L802C71C8
/* EBB70 802C71C0 0200182D */   daddu    $v1, $s0, $zero
/* EBB74 802C71C4 2603001F */  addiu     $v1, $s0, 0x1F
.L802C71C8:
/* EBB78 802C71C8 00034143 */  sra       $t0, $v1, 5
/* EBB7C 802C71CC 0100182D */  daddu     $v1, $t0, $zero
/* EBB80 802C71D0 00031140 */  sll       $v0, $v1, 5
/* EBB84 802C71D4 02024023 */  subu      $t0, $s0, $v0
/* EBB88 802C71D8 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EBB8C 802C71DC 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EBB90 802C71E0 3C05802E */  lui       $a1, %hi(D_802D9E98)
/* EBB94 802C71E4 24A59E98 */  addiu     $a1, $a1, %lo(D_802D9E98)
/* EBB98 802C71E8 0200302D */  daddu     $a2, $s0, $zero
/* EBB9C 802C71EC 00031880 */  sll       $v1, $v1, 2
/* EBBA0 802C71F0 00E31821 */  addu      $v1, $a3, $v1
/* EBBA4 802C71F4 24070001 */  addiu     $a3, $zero, 0x1
/* EBBA8 802C71F8 8C6200C4 */  lw        $v0, 0xC4($v1)
.L802C71FC:
/* EBBAC 802C71FC 01073804 */  sllv      $a3, $a3, $t0
/* EBBB0 802C7200 0C01953C */  jal       sprintf
/* EBBB4 802C7204 00473824 */   and      $a3, $v0, $a3
/* EBBB8 802C7208 080B1CE0 */  j         .L802C7380
/* EBBBC 802C720C 00000000 */   nop
.L802C7210:
/* EBBC0 802C7210 3442A600 */  ori       $v0, $v0, (0xFD9DA600 & 0xFFFF)
/* EBBC4 802C7214 0050102A */  slt       $v0, $v0, $s0
/* EBBC8 802C7218 14400026 */  bnez      $v0, .L802C72B4
/* EBBCC 802C721C 3C02FECE */   lui      $v0, (0xFECED300 >> 16)
/* EBBD0 802C7220 3C0202FA */  lui       $v0, (0x2FAF080 >> 16)
/* EBBD4 802C7224 3442F080 */  ori       $v0, $v0, (0x2FAF080 & 0xFFFF)
/* EBBD8 802C7228 02028021 */  addu      $s0, $s0, $v0
/* EBBDC 802C722C 3C04EFE8 */  lui       $a0, (0xEFE82080 >> 16)
/* EBBE0 802C7230 3C03802E */  lui       $v1, %hi(gMapVars)
/* EBBE4 802C7234 8C63A484 */  lw        $v1, %lo(gMapVars)($v1)
/* EBBE8 802C7238 00101080 */  sll       $v0, $s0, 2
/* EBBEC 802C723C 00431021 */  addu      $v0, $v0, $v1
/* EBBF0 802C7240 8C470000 */  lw        $a3, 0x0($v0)
/* EBBF4 802C7244 34842080 */  ori       $a0, $a0, (0xEFE82080 & 0xFFFF)
/* EBBF8 802C7248 0087202A */  slt       $a0, $a0, $a3
/* EBBFC 802C724C 14800007 */  bnez      $a0, .L802C726C
/* EBC00 802C7250 3C02F2E3 */   lui      $v0, (0xF2E31100 >> 16)
/* EBC04 802C7254 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EBC08 802C7258 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EBC0C 802C725C 3C05802E */  lui       $a1, %hi(D_802D9EA8)
/* EBC10 802C7260 24A59EA8 */  addiu     $a1, $a1, %lo(D_802D9EA8)
/* EBC14 802C7264 080B1CDE */  j         .L802C7378
/* EBC18 802C7268 00E0302D */   daddu    $a2, $a3, $zero
.L802C726C:
/* EBC1C 802C726C 34421100 */  ori       $v0, $v0, (0xF2E31100 & 0xFFFF)
/* EBC20 802C7270 0047102A */  slt       $v0, $v0, $a3
/* EBC24 802C7274 1440000A */  bnez      $v0, .L802C72A0
/* EBC28 802C7278 00000000 */   nop
/* EBC2C 802C727C 0C0B1248 */  jal       evt_fixed_var_to_float
/* EBC30 802C7280 00E0202D */   daddu    $a0, $a3, $zero
/* EBC34 802C7284 46000021 */  cvt.d.s   $f0, $f0
/* EBC38 802C7288 F7A00010 */  sdc1      $f0, 0x10($sp)
/* EBC3C 802C728C 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EBC40 802C7290 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EBC44 802C7294 3C05802E */  lui       $a1, %hi(D_802D9EB8)
/* EBC48 802C7298 080B1CCE */  j         .L802C7338
/* EBC4C 802C729C 24A59EB8 */   addiu    $a1, $a1, %lo(D_802D9EB8)
.L802C72A0:
/* EBC50 802C72A0 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EBC54 802C72A4 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EBC58 802C72A8 3C05802E */  lui       $a1, %hi(D_802D9ECC)
/* EBC5C 802C72AC 080B1CD6 */  j         .L802C7358
/* EBC60 802C72B0 24A59ECC */   addiu    $a1, $a1, %lo(D_802D9ECC)
.L802C72B4:
/* EBC64 802C72B4 3442D300 */  ori       $v0, $v0, (0xFECED300 & 0xFFFF)
/* EBC68 802C72B8 0050102A */  slt       $v0, $v0, $s0
/* EBC6C 802C72BC 1440002A */  bnez      $v0, .L802C7368
/* EBC70 802C72C0 0200302D */   daddu    $a2, $s0, $zero
/* EBC74 802C72C4 3C0201C9 */  lui       $v0, (0x1C9C380 >> 16)
/* EBC78 802C72C8 3442C380 */  ori       $v0, $v0, (0x1C9C380 & 0xFFFF)
/* EBC7C 802C72CC 02028021 */  addu      $s0, $s0, $v0
/* EBC80 802C72D0 00101080 */  sll       $v0, $s0, 2
/* EBC84 802C72D4 00E21021 */  addu      $v0, $a3, $v0
/* EBC88 802C72D8 8C470084 */  lw        $a3, 0x84($v0)
/* EBC8C 802C72DC 3C02EFE8 */  lui       $v0, (0xEFE82080 >> 16)
/* EBC90 802C72E0 34422080 */  ori       $v0, $v0, (0xEFE82080 & 0xFFFF)
/* EBC94 802C72E4 0047102A */  slt       $v0, $v0, $a3
/* EBC98 802C72E8 14400007 */  bnez      $v0, .L802C7308
/* EBC9C 802C72EC 3C02F2E3 */   lui      $v0, (0xF2E31100 >> 16)
/* EBCA0 802C72F0 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EBCA4 802C72F4 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EBCA8 802C72F8 3C05802E */  lui       $a1, %hi(D_802D9EDC)
/* EBCAC 802C72FC 24A59EDC */  addiu     $a1, $a1, %lo(D_802D9EDC)
/* EBCB0 802C7300 080B1CDE */  j         .L802C7378
/* EBCB4 802C7304 00E0302D */   daddu    $a2, $a3, $zero
.L802C7308:
/* EBCB8 802C7308 34421100 */  ori       $v0, $v0, (0xF2E31100 & 0xFFFF)
/* EBCBC 802C730C 0047102A */  slt       $v0, $v0, $a3
/* EBCC0 802C7310 1440000D */  bnez      $v0, .L802C7348
/* EBCC4 802C7314 00000000 */   nop
/* EBCC8 802C7318 0C0B1248 */  jal       evt_fixed_var_to_float
/* EBCCC 802C731C 00E0202D */   daddu    $a0, $a3, $zero
/* EBCD0 802C7320 46000021 */  cvt.d.s   $f0, $f0
/* EBCD4 802C7324 F7A00010 */  sdc1      $f0, 0x10($sp)
/* EBCD8 802C7328 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EBCDC 802C732C 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EBCE0 802C7330 3C05802E */  lui       $a1, %hi(D_802D9EEC)
/* EBCE4 802C7334 24A59EEC */  addiu     $a1, $a1, %lo(D_802D9EEC)
.L802C7338:
/* EBCE8 802C7338 0C01953C */  jal       sprintf
/* EBCEC 802C733C 0200302D */   daddu    $a2, $s0, $zero
/* EBCF0 802C7340 080B1CE0 */  j         .L802C7380
/* EBCF4 802C7344 00000000 */   nop
.L802C7348:
/* EBCF8 802C7348 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EBCFC 802C734C 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EBD00 802C7350 3C05802E */  lui       $a1, %hi(D_802D9F00)
/* EBD04 802C7354 24A59F00 */  addiu     $a1, $a1, %lo(D_802D9F00)
.L802C7358:
/* EBD08 802C7358 0C01953C */  jal       sprintf
/* EBD0C 802C735C 0200302D */   daddu    $a2, $s0, $zero
/* EBD10 802C7360 080B1CE0 */  j         .L802C7380
/* EBD14 802C7364 00000000 */   nop
.L802C7368:
/* EBD18 802C7368 3C04802E */  lui       $a0, %hi(evtDebugPrintBuffer)
/* EBD1C 802C736C 2484ACA0 */  addiu     $a0, $a0, %lo(evtDebugPrintBuffer)
/* EBD20 802C7370 3C05802E */  lui       $a1, %hi(D_802D9F10)
/* EBD24 802C7374 24A59F10 */  addiu     $a1, $a1, %lo(D_802D9F10)
.L802C7378:
/* EBD28 802C7378 0C01953C */  jal       sprintf
/* EBD2C 802C737C 00000000 */   nop
.L802C7380:
/* EBD30 802C7380 8FBF0024 */  lw        $ra, 0x24($sp)
/* EBD34 802C7384 8FB20020 */  lw        $s2, 0x20($sp)
/* EBD38 802C7388 8FB1001C */  lw        $s1, 0x1C($sp)
/* EBD3C 802C738C 8FB00018 */  lw        $s0, 0x18($sp)
/* EBD40 802C7390 24020002 */  addiu     $v0, $zero, 0x2
/* EBD44 802C7394 03E00008 */  jr        $ra
/* EBD48 802C7398 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

s32 evt_handle_print_debug_var(Evt* script) {
    Bytecode* args = script->ptrReadPos;
    s32 var = *args++;
    s32 flagBitPos;

    do {} while (0);

    if (var <= EVT_LIMIT) {
        sprintf(evtDebugPrintBuffer, "ADDR     [%08X]", var);
    } else if (var <= EVT_FIXED_CUTOFF) {
        sprintf(evtDebugPrintBuffer, "FLOAT    [%4.2f]", evt_fixed_var_to_float(var));
    } else if (var <= EVT_ARRAY_FLAG_CUTOFF) {
        var = EVT_INDEX_OF_ARRAY_FLAG(var);
        flagBitPos = var % 32;
        sprintf(evtDebugPrintBuffer, "UF(%3d)  [%d]", var, script->flagArray[var / 32] & (1 << flagBitPos));
    } else if (var <= EVT_ARRAY_VAR_CUTOFF) {
        s32 arrayVal;

        var = EVT_INDEX_OF_ARRAY_VAR(var);
        arrayVal = script->array[var];

        if (script->array[var] <= EVT_LIMIT) {
            sprintf(evtDebugPrintBuffer, "UW(%3d)  [%08X]", arrayVal);
        } else if (arrayVal <= EVT_FIXED_CUTOFF) {
            sprintf(evtDebugPrintBuffer, "UW(%3d)  [%4.2f]", var, evt_fixed_var_to_float(arrayVal));
        } else {
            sprintf(evtDebugPrintBuffer, "UW(%3d)  [%d]", var, arrayVal);
        }
    } else if (var <= EVT_GAME_BYTE_CUTOFF) {
        s32 globalByte;

        var = EVT_INDEX_OF_GAME_BYTE(var);
        globalByte = get_global_byte(var);

        if (globalByte <= EVT_LIMIT) {
            sprintf(evtDebugPrintBuffer, "GSW(%3d) [%08X]", globalByte);
        } else if (globalByte <= EVT_FIXED_CUTOFF) {
            sprintf(evtDebugPrintBuffer, "GSW(%3d) [%4.2f]", var, evt_fixed_var_to_float(globalByte));
        } else {
            sprintf(evtDebugPrintBuffer, "GSW(%3d) [%d]", var, globalByte);
        }
    } else if (var <= EVT_AREA_BYTE_CUTOFF) {
        s32 areaByte;

        var = EVT_INDEX_OF_AREA_BYTE(var);
        areaByte = get_area_byte(var);

        if (areaByte <= EVT_LIMIT) {
            sprintf(evtDebugPrintBuffer, "LSW(%3d) [%08X]", areaByte);
        } else if (areaByte <= EVT_FIXED_CUTOFF) {
            sprintf(evtDebugPrintBuffer, "LSW(%3d)  [%4.2f]", var, evt_fixed_var_to_float(areaByte));
        } else {
            sprintf(evtDebugPrintBuffer, "LSW(%3d) [%d]", var, areaByte);
        }
    } else if (var <= EVT_GAME_FLAG_CUTOFF) {
        var = EVT_INDEX_OF_GAME_FLAG(var);
        sprintf(evtDebugPrintBuffer, "GSWF(%3d)[%d]", var, get_global_flag(var));
    } else if (var <= EVT_AREA_FLAG_CUTOFF) {
        var = EVT_INDEX_OF_AREA_FLAG(var);
        sprintf(evtDebugPrintBuffer, "LSWF(%3d)[%d]", var, get_area_flag(var));
    } else if (var <= EVT_MAP_FLAG_CUTOFF) {
        var = EVT_INDEX_OF_MAP_FLAG(var);
        flagBitPos = var % 32;
        sprintf(evtDebugPrintBuffer, "GF(%3d)  [%d]", var, gMapFlags[var / 32] & (1 << flagBitPos));
    } else if (var <= EVT_LOCAL_FLAG_CUTOFF) {
        var = EVT_INDEX_OF_LOCAL_FLAG(var);
        flagBitPos = var % 32;
        sprintf(evtDebugPrintBuffer, "LF(%3d)  [%d]", var, script->varFlags[var / 32] & (1 << flagBitPos));
    } else if (var <= EVT_MAP_VAR_CUTOFF) {
        s32 mapVar;
        s32 temp;

        do {
            var = EVT_INDEX_OF_MAP_VAR(var);
            mapVar = gMapVars[var];
            temp = EVT_LIMIT;
        } while (0);

        if (mapVar <= temp) {
            sprintf(evtDebugPrintBuffer, "GW(%3d)  [%08X]", mapVar);
        } else if (mapVar <= EVT_FIXED_CUTOFF) {
            sprintf(evtDebugPrintBuffer, "GW(%3d)  [%4.2f]", var, evt_fixed_var_to_float(mapVar));
        } else {
            sprintf(evtDebugPrintBuffer, "GW(%3d)  [%d]", var, mapVar);
        }
    } else if (var <= EVT_LOCAL_VAR_CUTOFF) {
        s32 tableVar;

        var = EVT_INDEX_OF_LOCAL_VAR(var);
        tableVar = script->varTable[var];

        do {} while (0);

        if (tableVar <= EVT_LIMIT) {
            sprintf(evtDebugPrintBuffer, "LW(%3d)  [%08X]", tableVar);
        } else if (tableVar <= EVT_FIXED_CUTOFF) {
            sprintf(evtDebugPrintBuffer, "LW(%3d)  [%4.2f]", var, evt_fixed_var_to_float(tableVar));
        } else {
            sprintf(evtDebugPrintBuffer, "LW(%3d)  [%d]", var, tableVar);
        }
    } else {
        sprintf(evtDebugPrintBuffer, "         [%d]", var);
    }

    return ApiStatus_DONE2;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel render_models
/* AD290 80116B90 27BDFF10 */  addiu     $sp, $sp, -0xF0
/* AD294 80116B94 F7BE00E8 */  sdc1      $f30, 0xE8($sp)
/* AD298 80116B98 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* AD29C 80116B9C 4481F000 */  mtc1      $at, $f30
/* AD2A0 80116BA0 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* AD2A4 80116BA4 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* AD2A8 80116BA8 3C04800B */  lui       $a0, %hi(gCameras)
/* AD2AC 80116BAC 24841D80 */  addiu     $a0, $a0, %lo(gCameras)
/* AD2B0 80116BB0 AFBF00BC */  sw        $ra, 0xBC($sp)
/* AD2B4 80116BB4 AFB400B8 */  sw        $s4, 0xB8($sp)
/* AD2B8 80116BB8 AFB300B4 */  sw        $s3, 0xB4($sp)
/* AD2BC 80116BBC AFB200B0 */  sw        $s2, 0xB0($sp)
/* AD2C0 80116BC0 AFB100AC */  sw        $s1, 0xAC($sp)
/* AD2C4 80116BC4 AFB000A8 */  sw        $s0, 0xA8($sp)
/* AD2C8 80116BC8 F7BC00E0 */  sdc1      $f28, 0xE0($sp)
/* AD2CC 80116BCC F7BA00D8 */  sdc1      $f26, 0xD8($sp)
/* AD2D0 80116BD0 F7B800D0 */  sdc1      $f24, 0xD0($sp)
/* AD2D4 80116BD4 F7B600C8 */  sdc1      $f22, 0xC8($sp)
/* AD2D8 80116BD8 F7B400C0 */  sdc1      $f20, 0xC0($sp)
/* AD2DC 80116BDC 00031080 */  sll       $v0, $v1, 2
/* AD2E0 80116BE0 00431021 */  addu      $v0, $v0, $v1
/* AD2E4 80116BE4 00021080 */  sll       $v0, $v0, 2
/* AD2E8 80116BE8 00431023 */  subu      $v0, $v0, $v1
/* AD2EC 80116BEC 000218C0 */  sll       $v1, $v0, 3
/* AD2F0 80116BF0 00431021 */  addu      $v0, $v0, $v1
/* AD2F4 80116BF4 000210C0 */  sll       $v0, $v0, 3
/* AD2F8 80116BF8 00449021 */  addu      $s2, $v0, $a0
/* AD2FC 80116BFC C65800D4 */  lwc1      $f24, 0xD4($s2)
/* AD300 80116C00 E7B80048 */  swc1      $f24, 0x48($sp)
/* AD304 80116C04 C65A00D8 */  lwc1      $f26, 0xD8($s2)
/* AD308 80116C08 E7BA004C */  swc1      $f26, 0x4C($sp)
/* AD30C 80116C0C C65800DC */  lwc1      $f24, 0xDC($s2)
/* AD310 80116C10 E7B80050 */  swc1      $f24, 0x50($sp)
/* AD314 80116C14 C65A00E0 */  lwc1      $f26, 0xE0($s2)
/* AD318 80116C18 E7BA0054 */  swc1      $f26, 0x54($sp)
/* AD31C 80116C1C C65800E4 */  lwc1      $f24, 0xE4($s2)
/* AD320 80116C20 E7B80058 */  swc1      $f24, 0x58($sp)
/* AD324 80116C24 C65A00E8 */  lwc1      $f26, 0xE8($s2)
/* AD328 80116C28 E7BA005C */  swc1      $f26, 0x5C($sp)
/* AD32C 80116C2C C65800EC */  lwc1      $f24, 0xEC($s2)
/* AD330 80116C30 E7B80060 */  swc1      $f24, 0x60($sp)
/* AD334 80116C34 C65A00F0 */  lwc1      $f26, 0xF0($s2)
/* AD338 80116C38 E7BA0064 */  swc1      $f26, 0x64($sp)
/* AD33C 80116C3C C65800F4 */  lwc1      $f24, 0xF4($s2)
/* AD340 80116C40 E7B80068 */  swc1      $f24, 0x68($sp)
/* AD344 80116C44 C65A00F8 */  lwc1      $f26, 0xF8($s2)
/* AD348 80116C48 E7BA006C */  swc1      $f26, 0x6C($sp)
/* AD34C 80116C4C C65800FC */  lwc1      $f24, 0xFC($s2)
/* AD350 80116C50 E7B80070 */  swc1      $f24, 0x70($sp)
/* AD354 80116C54 C65A0100 */  lwc1      $f26, 0x100($s2)
/* AD358 80116C58 E7BA0074 */  swc1      $f26, 0x74($sp)
/* AD35C 80116C5C C6580104 */  lwc1      $f24, 0x104($s2)
/* AD360 80116C60 E7B80078 */  swc1      $f24, 0x78($sp)
/* AD364 80116C64 C65A0108 */  lwc1      $f26, 0x108($s2)
/* AD368 80116C68 27B10028 */  addiu     $s1, $sp, 0x28
/* AD36C 80116C6C E7BA007C */  swc1      $f26, 0x7C($sp)
/* AD370 80116C70 C658010C */  lwc1      $f24, 0x10C($s2)
/* AD374 80116C74 0000982D */  daddu     $s3, $zero, $zero
/* AD378 80116C78 E7B80080 */  swc1      $f24, 0x80($sp)
/* AD37C 80116C7C C65A0110 */  lwc1      $f26, 0x110($s2)
/* AD380 80116C80 E7BA0084 */  swc1      $f26, 0x84($sp)
.L80116C84:
/* AD384 80116C84 3C038015 */  lui       $v1, %hi(gCurrentModels)
/* AD388 80116C88 8C6312CC */  lw        $v1, %lo(gCurrentModels)($v1)
/* AD38C 80116C8C 00131080 */  sll       $v0, $s3, 2
/* AD390 80116C90 00431021 */  addu      $v0, $v0, $v1
/* AD394 80116C94 8C500000 */  lw        $s0, 0x0($v0)
/* AD398 80116C98 520003AA */  beql      $s0, $zero, .L80117B44
/* AD39C 80116C9C 26730001 */   addiu    $s3, $s3, 0x1
/* AD3A0 80116CA0 96030000 */  lhu       $v1, 0x0($s0)
/* AD3A4 80116CA4 506003A7 */  beql      $v1, $zero, .L80117B44
/* AD3A8 80116CA8 26730001 */   addiu    $s3, $s3, 0x1
/* AD3AC 80116CAC 30620004 */  andi      $v0, $v1, 0x4
/* AD3B0 80116CB0 544003A4 */  bnel      $v0, $zero, .L80117B44
/* AD3B4 80116CB4 26730001 */   addiu    $s3, $s3, 0x1
/* AD3B8 80116CB8 30620002 */  andi      $v0, $v1, 0x2
/* AD3BC 80116CBC 544003A1 */  bnel      $v0, $zero, .L80117B44
/* AD3C0 80116CC0 26730001 */   addiu    $s3, $s3, 0x1
/* AD3C4 80116CC4 30620020 */  andi      $v0, $v1, 0x20
/* AD3C8 80116CC8 5440039E */  bnel      $v0, $zero, .L80117B44
/* AD3CC 80116CCC 26730001 */   addiu    $s3, $s3, 0x1
/* AD3D0 80116CD0 30620008 */  andi      $v0, $v1, 0x8
/* AD3D4 80116CD4 5440039B */  bnel      $v0, $zero, .L80117B44
/* AD3D8 80116CD8 26730001 */   addiu    $s3, $s3, 0x1
/* AD3DC 80116CDC C6180098 */  lwc1      $f24, 0x98($s0)
/* AD3E0 80116CE0 E7B80088 */  swc1      $f24, 0x88($sp)
/* AD3E4 80116CE4 C61A009C */  lwc1      $f26, 0x9C($s0)
/* AD3E8 80116CE8 E7BA008C */  swc1      $f26, 0x8C($sp)
/* AD3EC 80116CEC C61800A0 */  lwc1      $f24, 0xA0($s0)
/* AD3F0 80116CF0 30620200 */  andi      $v0, $v1, 0x200
/* AD3F4 80116CF4 10400362 */  beqz      $v0, .L80117A80
/* AD3F8 80116CF8 E7B80090 */   swc1     $f24, 0x90($sp)
/* AD3FC 80116CFC 8E020008 */  lw        $v0, 0x8($s0)
/* AD400 80116D00 8C42000C */  lw        $v0, 0xC($v0)
/* AD404 80116D04 0000182D */  daddu     $v1, $zero, $zero
/* AD408 80116D08 C45A0004 */  lwc1      $f26, 0x4($v0)
/* AD40C 80116D0C 4680D6A0 */  cvt.s.w   $f26, $f26
/* AD410 80116D10 E7BA0098 */  swc1      $f26, 0x98($sp)
/* AD414 80116D14 C4580010 */  lwc1      $f24, 0x10($v0)
/* AD418 80116D18 4680C620 */  cvt.s.w   $f24, $f24
/* AD41C 80116D1C E7B800A0 */  swc1      $f24, 0xA0($sp)
/* AD420 80116D20 C45C001C */  lwc1      $f28, 0x1C($v0)
/* AD424 80116D24 4680E720 */  cvt.s.w   $f28, $f28
/* AD428 80116D28 C7B80088 */  lwc1      $f24, 0x88($sp)
/* AD42C 80116D2C 461AC101 */  sub.s     $f4, $f24, $f26
/* AD430 80116D30 C7BA0048 */  lwc1      $f26, 0x48($sp)
/* AD434 80116D34 4604D182 */  mul.s     $f6, $f26, $f4
/* AD438 80116D38 00000000 */  nop
/* AD43C 80116D3C C7B8008C */  lwc1      $f24, 0x8C($sp)
/* AD440 80116D40 C7BA00A0 */  lwc1      $f26, 0xA0($sp)
/* AD444 80116D44 461AC301 */  sub.s     $f12, $f24, $f26
/* AD448 80116D48 C7B80058 */  lwc1      $f24, 0x58($sp)
/* AD44C 80116D4C 460CC582 */  mul.s     $f22, $f24, $f12
/* AD450 80116D50 00000000 */  nop
/* AD454 80116D54 C7BA0090 */  lwc1      $f26, 0x90($sp)
/* AD458 80116D58 461CD501 */  sub.s     $f20, $f26, $f28
/* AD45C 80116D5C C7BA004C */  lwc1      $f26, 0x4C($sp)
/* AD460 80116D60 4604D002 */  mul.s     $f0, $f26, $f4
/* AD464 80116D64 00000000 */  nop
/* AD468 80116D68 C7B80068 */  lwc1      $f24, 0x68($sp)
/* AD46C 80116D6C 4614C382 */  mul.s     $f14, $f24, $f20
/* AD470 80116D70 00000000 */  nop
/* AD474 80116D74 C7BA006C */  lwc1      $f26, 0x6C($sp)
/* AD478 80116D78 4614D402 */  mul.s     $f16, $f26, $f20
/* AD47C 80116D7C 00000000 */  nop
/* AD480 80116D80 C7B8005C */  lwc1      $f24, 0x5C($sp)
/* AD484 80116D84 460CC202 */  mul.s     $f8, $f24, $f12
/* AD488 80116D88 00000000 */  nop
/* AD48C 80116D8C C7BA0060 */  lwc1      $f26, 0x60($sp)
/* AD490 80116D90 460CD282 */  mul.s     $f10, $f26, $f12
/* AD494 80116D94 00000000 */  nop
/* AD498 80116D98 C7B80050 */  lwc1      $f24, 0x50($sp)
/* AD49C 80116D9C 4604C082 */  mul.s     $f2, $f24, $f4
/* AD4A0 80116DA0 00000000 */  nop
/* AD4A4 80116DA4 C7BA0054 */  lwc1      $f26, 0x54($sp)
/* AD4A8 80116DA8 4604D102 */  mul.s     $f4, $f26, $f4
/* AD4AC 80116DAC 00000000 */  nop
/* AD4B0 80116DB0 C7B80070 */  lwc1      $f24, 0x70($sp)
/* AD4B4 80116DB4 4614C482 */  mul.s     $f18, $f24, $f20
/* AD4B8 80116DB8 00000000 */  nop
/* AD4BC 80116DBC C7BA0074 */  lwc1      $f26, 0x74($sp)
/* AD4C0 80116DC0 4614D502 */  mul.s     $f20, $f26, $f20
/* AD4C4 80116DC4 00000000 */  nop
/* AD4C8 80116DC8 C7B80064 */  lwc1      $f24, 0x64($sp)
/* AD4CC 80116DCC 460CC302 */  mul.s     $f12, $f24, $f12
/* AD4D0 80116DD0 00000000 */  nop
/* AD4D4 80116DD4 46163180 */  add.s     $f6, $f6, $f22
/* AD4D8 80116DD8 460E3180 */  add.s     $f6, $f6, $f14
/* AD4DC 80116DDC 46080000 */  add.s     $f0, $f0, $f8
/* AD4E0 80116DE0 460A1080 */  add.s     $f2, $f2, $f10
/* AD4E4 80116DE4 C7B80078 */  lwc1      $f24, 0x78($sp)
/* AD4E8 80116DE8 46183180 */  add.s     $f6, $f6, $f24
/* AD4EC 80116DEC 46100000 */  add.s     $f0, $f0, $f16
/* AD4F0 80116DF0 46121080 */  add.s     $f2, $f2, $f18
/* AD4F4 80116DF4 460C2100 */  add.s     $f4, $f4, $f12
/* AD4F8 80116DF8 C7BA007C */  lwc1      $f26, 0x7C($sp)
/* AD4FC 80116DFC 461A0200 */  add.s     $f8, $f0, $f26
/* AD500 80116E00 C7B80080 */  lwc1      $f24, 0x80($sp)
/* AD504 80116E04 46181080 */  add.s     $f2, $f2, $f24
/* AD508 80116E08 C7BA0084 */  lwc1      $f26, 0x84($sp)
/* AD50C 80116E0C 46142100 */  add.s     $f4, $f4, $f20
/* AD510 80116E10 E7A60038 */  swc1      $f6, 0x38($sp)
/* AD514 80116E14 4480C000 */  mtc1      $zero, $f24
/* AD518 80116E18 461A2100 */  add.s     $f4, $f4, $f26
/* AD51C 80116E1C E7A8003C */  swc1      $f8, 0x3C($sp)
/* AD520 80116E20 E7A20040 */  swc1      $f2, 0x40($sp)
/* AD524 80116E24 46182032 */  c.eq.s    $f4, $f24
/* AD528 80116E28 00000000 */  nop
/* AD52C 80116E2C 45010312 */  bc1t      .L80117A78
/* AD530 80116E30 E7A40044 */   swc1     $f4, 0x44($sp)
/* AD534 80116E34 4604F003 */  div.s     $f0, $f30, $f4
/* AD538 80116E38 46003102 */  mul.s     $f4, $f6, $f0
/* AD53C 80116E3C 00000000 */  nop
/* AD540 80116E40 46004302 */  mul.s     $f12, $f8, $f0
/* AD544 80116E44 00000000 */  nop
/* AD548 80116E48 46001502 */  mul.s     $f20, $f2, $f0
/* AD54C 80116E4C 00000000 */  nop
/* AD550 80116E50 3C01BF80 */  lui       $at, (0xBF800000 >> 16)
/* AD554 80116E54 4481D000 */  mtc1      $at, $f26
/* AD558 80116E58 00000000 */  nop
/* AD55C 80116E5C 4614D03C */  c.lt.s    $f26, $f20
/* AD560 80116E60 00000000 */  nop
/* AD564 80116E64 45000011 */  bc1f      .L80116EAC
/* AD568 80116E68 E7A00044 */   swc1     $f0, 0x44($sp)
/* AD56C 80116E6C 4604D03E */  c.le.s    $f26, $f4
/* AD570 80116E70 00000000 */  nop
/* AD574 80116E74 4500000D */  bc1f      .L80116EAC
/* AD578 80116E78 00000000 */   nop
/* AD57C 80116E7C 461E203E */  c.le.s    $f4, $f30
/* AD580 80116E80 00000000 */  nop
/* AD584 80116E84 45000009 */  bc1f      .L80116EAC
/* AD588 80116E88 00000000 */   nop
/* AD58C 80116E8C 460CD03E */  c.le.s    $f26, $f12
/* AD590 80116E90 00000000 */  nop
/* AD594 80116E94 45000005 */  bc1f      .L80116EAC
/* AD598 80116E98 00000000 */   nop
/* AD59C 80116E9C 461E603E */  c.le.s    $f12, $f30
/* AD5A0 80116EA0 00000000 */  nop
/* AD5A4 80116EA4 450102F4 */  bc1t      .L80117A78
/* AD5A8 80116EA8 00000000 */   nop
.L80116EAC:
/* AD5AC 80116EAC C7B80098 */  lwc1      $f24, 0x98($sp)
/* AD5B0 80116EB0 4480D000 */  mtc1      $zero, $f26
/* AD5B4 80116EB4 00000000 */  nop
/* AD5B8 80116EB8 461AC032 */  c.eq.s    $f24, $f26
/* AD5BC 80116EBC 00000000 */  nop
/* AD5C0 80116EC0 45010062 */  bc1t      .L8011704C
/* AD5C4 80116EC4 00000000 */   nop
/* AD5C8 80116EC8 C7BA0088 */  lwc1      $f26, 0x88($sp)
/* AD5CC 80116ECC 4618D100 */  add.s     $f4, $f26, $f24
/* AD5D0 80116ED0 C7B80048 */  lwc1      $f24, 0x48($sp)
/* AD5D4 80116ED4 4604C182 */  mul.s     $f6, $f24, $f4
/* AD5D8 80116ED8 00000000 */  nop
/* AD5DC 80116EDC C7BA008C */  lwc1      $f26, 0x8C($sp)
/* AD5E0 80116EE0 C7B800A0 */  lwc1      $f24, 0xA0($sp)
/* AD5E4 80116EE4 4618D301 */  sub.s     $f12, $f26, $f24
/* AD5E8 80116EE8 C7BA0058 */  lwc1      $f26, 0x58($sp)
/* AD5EC 80116EEC 460CD582 */  mul.s     $f22, $f26, $f12
/* AD5F0 80116EF0 00000000 */  nop
/* AD5F4 80116EF4 C7B80090 */  lwc1      $f24, 0x90($sp)
/* AD5F8 80116EF8 461CC501 */  sub.s     $f20, $f24, $f28
/* AD5FC 80116EFC C7B8004C */  lwc1      $f24, 0x4C($sp)
/* AD600 80116F00 4604C002 */  mul.s     $f0, $f24, $f4
/* AD604 80116F04 00000000 */  nop
/* AD608 80116F08 C7BA0068 */  lwc1      $f26, 0x68($sp)
/* AD60C 80116F0C 4614D382 */  mul.s     $f14, $f26, $f20
/* AD610 80116F10 00000000 */  nop
/* AD614 80116F14 C7B8006C */  lwc1      $f24, 0x6C($sp)
/* AD618 80116F18 4614C402 */  mul.s     $f16, $f24, $f20
/* AD61C 80116F1C 00000000 */  nop
/* AD620 80116F20 C7BA005C */  lwc1      $f26, 0x5C($sp)
/* AD624 80116F24 460CD202 */  mul.s     $f8, $f26, $f12
/* AD628 80116F28 00000000 */  nop
/* AD62C 80116F2C C7B80060 */  lwc1      $f24, 0x60($sp)
/* AD630 80116F30 460CC282 */  mul.s     $f10, $f24, $f12
/* AD634 80116F34 00000000 */  nop
/* AD638 80116F38 C7BA0050 */  lwc1      $f26, 0x50($sp)
/* AD63C 80116F3C 4604D082 */  mul.s     $f2, $f26, $f4
/* AD640 80116F40 00000000 */  nop
/* AD644 80116F44 C7B80054 */  lwc1      $f24, 0x54($sp)
/* AD648 80116F48 4604C102 */  mul.s     $f4, $f24, $f4
/* AD64C 80116F4C 00000000 */  nop
/* AD650 80116F50 C7BA0070 */  lwc1      $f26, 0x70($sp)
/* AD654 80116F54 4614D482 */  mul.s     $f18, $f26, $f20
/* AD658 80116F58 00000000 */  nop
/* AD65C 80116F5C C7B80074 */  lwc1      $f24, 0x74($sp)
/* AD660 80116F60 4614C502 */  mul.s     $f20, $f24, $f20
/* AD664 80116F64 00000000 */  nop
/* AD668 80116F68 C7BA0064 */  lwc1      $f26, 0x64($sp)
/* AD66C 80116F6C 460CD302 */  mul.s     $f12, $f26, $f12
/* AD670 80116F70 00000000 */  nop
/* AD674 80116F74 46163180 */  add.s     $f6, $f6, $f22
/* AD678 80116F78 460E3180 */  add.s     $f6, $f6, $f14
/* AD67C 80116F7C 46080000 */  add.s     $f0, $f0, $f8
/* AD680 80116F80 460A1080 */  add.s     $f2, $f2, $f10
/* AD684 80116F84 C7BA0078 */  lwc1      $f26, 0x78($sp)
/* AD688 80116F88 461A3180 */  add.s     $f6, $f6, $f26
/* AD68C 80116F8C 46100000 */  add.s     $f0, $f0, $f16
/* AD690 80116F90 46121080 */  add.s     $f2, $f2, $f18
/* AD694 80116F94 460C2100 */  add.s     $f4, $f4, $f12
/* AD698 80116F98 C7B8007C */  lwc1      $f24, 0x7C($sp)
/* AD69C 80116F9C 46180200 */  add.s     $f8, $f0, $f24
/* AD6A0 80116FA0 C7BA0080 */  lwc1      $f26, 0x80($sp)
/* AD6A4 80116FA4 461A1080 */  add.s     $f2, $f2, $f26
/* AD6A8 80116FA8 C7B80084 */  lwc1      $f24, 0x84($sp)
/* AD6AC 80116FAC 46142100 */  add.s     $f4, $f4, $f20
/* AD6B0 80116FB0 E7A60038 */  swc1      $f6, 0x38($sp)
/* AD6B4 80116FB4 4480D000 */  mtc1      $zero, $f26
/* AD6B8 80116FB8 46182100 */  add.s     $f4, $f4, $f24
/* AD6BC 80116FBC E7A8003C */  swc1      $f8, 0x3C($sp)
/* AD6C0 80116FC0 E7A20040 */  swc1      $f2, 0x40($sp)
/* AD6C4 80116FC4 461A2032 */  c.eq.s    $f4, $f26
/* AD6C8 80116FC8 00000000 */  nop
/* AD6CC 80116FCC 450102AA */  bc1t      .L80117A78
/* AD6D0 80116FD0 E7A40044 */   swc1     $f4, 0x44($sp)
/* AD6D4 80116FD4 4604F003 */  div.s     $f0, $f30, $f4
/* AD6D8 80116FD8 46003102 */  mul.s     $f4, $f6, $f0
/* AD6DC 80116FDC 00000000 */  nop
/* AD6E0 80116FE0 46004302 */  mul.s     $f12, $f8, $f0
/* AD6E4 80116FE4 00000000 */  nop
/* AD6E8 80116FE8 46001502 */  mul.s     $f20, $f2, $f0
/* AD6EC 80116FEC 00000000 */  nop
/* AD6F0 80116FF0 3C01BF80 */  lui       $at, (0xBF800000 >> 16)
/* AD6F4 80116FF4 4481C000 */  mtc1      $at, $f24
/* AD6F8 80116FF8 00000000 */  nop
/* AD6FC 80116FFC 4614C03C */  c.lt.s    $f24, $f20
/* AD700 80117000 00000000 */  nop
/* AD704 80117004 45000011 */  bc1f      .L8011704C
/* AD708 80117008 E7A00044 */   swc1     $f0, 0x44($sp)
/* AD70C 8011700C 4604C03E */  c.le.s    $f24, $f4
/* AD710 80117010 00000000 */  nop
/* AD714 80117014 4500000D */  bc1f      .L8011704C
/* AD718 80117018 00000000 */   nop
/* AD71C 8011701C 461E203E */  c.le.s    $f4, $f30
/* AD720 80117020 00000000 */  nop
/* AD724 80117024 45000009 */  bc1f      .L8011704C
/* AD728 80117028 00000000 */   nop
/* AD72C 8011702C 460CC03E */  c.le.s    $f24, $f12
/* AD730 80117030 00000000 */  nop
/* AD734 80117034 45000005 */  bc1f      .L8011704C
/* AD738 80117038 00000000 */   nop
/* AD73C 8011703C 461E603E */  c.le.s    $f12, $f30
/* AD740 80117040 00000000 */  nop
/* AD744 80117044 4501028C */  bc1t      .L80117A78
/* AD748 80117048 00000000 */   nop
.L8011704C:
/* AD74C 8011704C C7BA00A0 */  lwc1      $f26, 0xA0($sp)
/* AD750 80117050 4480C000 */  mtc1      $zero, $f24
/* AD754 80117054 00000000 */  nop
/* AD758 80117058 4618D032 */  c.eq.s    $f26, $f24
/* AD75C 8011705C 00000000 */  nop
/* AD760 80117060 45010063 */  bc1t      .L801171F0
/* AD764 80117064 00000000 */   nop
/* AD768 80117068 C7BA0088 */  lwc1      $f26, 0x88($sp)
/* AD76C 8011706C C7B80098 */  lwc1      $f24, 0x98($sp)
/* AD770 80117070 4618D101 */  sub.s     $f4, $f26, $f24
/* AD774 80117074 C7BA0048 */  lwc1      $f26, 0x48($sp)
/* AD778 80117078 4604D182 */  mul.s     $f6, $f26, $f4
/* AD77C 8011707C 00000000 */  nop
/* AD780 80117080 C7B8008C */  lwc1      $f24, 0x8C($sp)
/* AD784 80117084 C7BA00A0 */  lwc1      $f26, 0xA0($sp)
/* AD788 80117088 461AC300 */  add.s     $f12, $f24, $f26
/* AD78C 8011708C C7B80058 */  lwc1      $f24, 0x58($sp)
/* AD790 80117090 460CC582 */  mul.s     $f22, $f24, $f12
/* AD794 80117094 00000000 */  nop
/* AD798 80117098 C7BA0090 */  lwc1      $f26, 0x90($sp)
/* AD79C 8011709C 461CD501 */  sub.s     $f20, $f26, $f28
/* AD7A0 801170A0 C7BA004C */  lwc1      $f26, 0x4C($sp)
/* AD7A4 801170A4 4604D002 */  mul.s     $f0, $f26, $f4
/* AD7A8 801170A8 00000000 */  nop
/* AD7AC 801170AC C7B80068 */  lwc1      $f24, 0x68($sp)
/* AD7B0 801170B0 4614C382 */  mul.s     $f14, $f24, $f20
/* AD7B4 801170B4 00000000 */  nop
/* AD7B8 801170B8 C7BA006C */  lwc1      $f26, 0x6C($sp)
/* AD7BC 801170BC 4614D402 */  mul.s     $f16, $f26, $f20
/* AD7C0 801170C0 00000000 */  nop
/* AD7C4 801170C4 C7B8005C */  lwc1      $f24, 0x5C($sp)
/* AD7C8 801170C8 460CC202 */  mul.s     $f8, $f24, $f12
/* AD7CC 801170CC 00000000 */  nop
/* AD7D0 801170D0 C7BA0060 */  lwc1      $f26, 0x60($sp)
/* AD7D4 801170D4 460CD282 */  mul.s     $f10, $f26, $f12
/* AD7D8 801170D8 00000000 */  nop
/* AD7DC 801170DC C7B80050 */  lwc1      $f24, 0x50($sp)
/* AD7E0 801170E0 4604C082 */  mul.s     $f2, $f24, $f4
/* AD7E4 801170E4 00000000 */  nop
/* AD7E8 801170E8 C7BA0054 */  lwc1      $f26, 0x54($sp)
/* AD7EC 801170EC 4604D102 */  mul.s     $f4, $f26, $f4
/* AD7F0 801170F0 00000000 */  nop
/* AD7F4 801170F4 C7B80070 */  lwc1      $f24, 0x70($sp)
/* AD7F8 801170F8 4614C482 */  mul.s     $f18, $f24, $f20
/* AD7FC 801170FC 00000000 */  nop
/* AD800 80117100 C7BA0074 */  lwc1      $f26, 0x74($sp)
/* AD804 80117104 4614D502 */  mul.s     $f20, $f26, $f20
/* AD808 80117108 00000000 */  nop
/* AD80C 8011710C C7B80064 */  lwc1      $f24, 0x64($sp)
/* AD810 80117110 460CC302 */  mul.s     $f12, $f24, $f12
/* AD814 80117114 00000000 */  nop
/* AD818 80117118 46163180 */  add.s     $f6, $f6, $f22
/* AD81C 8011711C 460E3180 */  add.s     $f6, $f6, $f14
/* AD820 80117120 46080000 */  add.s     $f0, $f0, $f8
/* AD824 80117124 460A1080 */  add.s     $f2, $f2, $f10
/* AD828 80117128 C7B80078 */  lwc1      $f24, 0x78($sp)
/* AD82C 8011712C 46183180 */  add.s     $f6, $f6, $f24
/* AD830 80117130 46100000 */  add.s     $f0, $f0, $f16
/* AD834 80117134 46121080 */  add.s     $f2, $f2, $f18
/* AD838 80117138 460C2100 */  add.s     $f4, $f4, $f12
/* AD83C 8011713C C7BA007C */  lwc1      $f26, 0x7C($sp)
/* AD840 80117140 461A0200 */  add.s     $f8, $f0, $f26
/* AD844 80117144 C7B80080 */  lwc1      $f24, 0x80($sp)
/* AD848 80117148 46181080 */  add.s     $f2, $f2, $f24
/* AD84C 8011714C C7BA0084 */  lwc1      $f26, 0x84($sp)
/* AD850 80117150 46142100 */  add.s     $f4, $f4, $f20
/* AD854 80117154 E7A60038 */  swc1      $f6, 0x38($sp)
/* AD858 80117158 4480C000 */  mtc1      $zero, $f24
/* AD85C 8011715C 461A2100 */  add.s     $f4, $f4, $f26

### DECOMPILED C INSTRUCTIONS:

void render_models(void) {
    RenderTask rt;
    RenderTask* rtPtr = &rt;
    f32 outX, outY, outZ, outW;
    f32 m00, m01, m02, m03;
    f32 m10, m11, m12, m13;
    f32 m20, m21, m22, m23;
    f32 m30, m31, m32, m33;
    f32 x, y, z;
    f32 bbx, bby, bbz;

    Camera* camera = &gCameras[gCurrentCameraID];
    Model* model;
    ModelBoundingBox* boundingBox;
    ModelTransformGroup* transformGroup;
    f32 xComp, yComp, zComp;

    s32 distance;
    s32 cond;
    s32 i;

#define COMMON_RENDER_MODELS \
    outX = (m00 * xComp) + (m10 * yComp) + (m20 * zComp) + m30; \
    outY = (m01 * xComp) + (m11 * yComp) + (m21 * zComp) + m31; \
    outZ = (m02 * xComp) + (m12 * yComp) + (m22 * zComp) + m32; \
    outW = (m03 * xComp) + (m13 * yComp) + (m23 * zComp) + m33; \
    if (outW == 0.0f) { \
        break; \
    } \
    /* Perspective divide */ \
    outW = 1.0f / outW; \
    xComp = outX * outW; \
    yComp = outY * outW; \
    zComp = outZ * outW; \
    if (zComp > -1.0f && xComp >= -1.0f && xComp <= 1.0f && yComp >= -1.0f && yComp <= 1.0f) { \
        break; \
    }

    m00 = camera->perspectiveMatrix[0][0];
    m01 = camera->perspectiveMatrix[0][1];
    m02 = camera->perspectiveMatrix[0][2];
    m03 = camera->perspectiveMatrix[0][3];
    m10 = camera->perspectiveMatrix[1][0];
    m11 = camera->perspectiveMatrix[1][1];
    m12 = camera->perspectiveMatrix[1][2];
    m13 = camera->perspectiveMatrix[1][3];
    m20 = camera->perspectiveMatrix[2][0];
    m21 = camera->perspectiveMatrix[2][1];
    m22 = camera->perspectiveMatrix[2][2];
    m23 = camera->perspectiveMatrix[2][3];
    m30 = camera->perspectiveMatrix[3][0];
    m31 = camera->perspectiveMatrix[3][1];
    m32 = camera->perspectiveMatrix[3][2];
    m33 = camera->perspectiveMatrix[3][3];

    for (i = 0; i < ARRAY_COUNT(*gCurrentModels); i++) {
        model = (*gCurrentModels)[i];
        if (model == NULL) {
            continue;
        }
        if (model->flags == 0) {
            continue;
        }
        if (model->flags & MODEL_FLAG_FLAG_4) {
            continue;
        }
        if (model->flags & MODEL_FLAG_HIDDEN) {
            continue;
        }
        if (model->flags & MODEL_FLAG_FLAG_20) {
            continue;
        }
        if (model->flags & MODEL_FLAG_TRANSFORM_GROUP_MEMBER) {
            continue;
        }

        x = model->center.x;
        y = model->center.y;
        z = model->center.z;

        if (model->flags & MODEL_FLAG_FLAG_200) {
            cond = FALSE;
            boundingBox = (ModelBoundingBox*) model->modelNode->propertyList;
            bbx = boundingBox->halfSizeX;
            bby = boundingBox->halfSizeY;
            bbz = boundingBox->halfSizeZ;

            while (TRUE) {
                if (TRUE) {
                    xComp = x - bbx;
                    yComp = y - bby;
                    zComp = z - bbz;
                    COMMON_RENDER_MODELS;
                }

                if (bbx != 0.0f) {
                    xComp = x + bbx;
                    yComp = y - bby;
                    zComp = z - bbz;
                    COMMON_RENDER_MODELS;
                }

                if (bby != 0.0f) {
                    xComp = x - bbx;
                    yComp = y + bby;
                    zComp = z - bbz;
                    COMMON_RENDER_MODELS;
                }

                if (bbx != 0.0f && bby != 0.0f) {
                    xComp = x + bbx;
                    yComp = y + bby;
                    zComp = z - bbz;
                    COMMON_RENDER_MODELS;
                }

                if (bbz != 0.0f) {
                    xComp = x - bbx;
                    yComp = y - bby;
                    zComp = z + bbz;
                    COMMON_RENDER_MODELS;
                }

                if (bbx != 0.0f && bbz != 0.0f) {
                    xComp = x + bbx;
                    yComp = y - bby;
                    zComp = z + bbz;
                    COMMON_RENDER_MODELS;
                }

                if (bby != 0.0f && bbz != 0.0f) {
                    xComp = x - bbx;
                    yComp = y + bby;
                    zComp = z + bbz;
                    COMMON_RENDER_MODELS;
                }

                if (bbx != 0.0f && bby != 0.0f && bbz != 0.0f) {
                    xComp = x + bbx;
                    yComp = y + bby;
                    zComp = z + bbz;
                    COMMON_RENDER_MODELS;
                }
                cond = TRUE;
                break;
            }
            if (cond) {
                continue;
            }
        }

        transform_point(camera->perspectiveMatrix, x, y, z, 1.0f, &outX, &outY, &outZ, &outW);
        distance = outZ + 5000.0f;
        if (distance < 0) {
            distance = 0;
        } else if (distance > 10000) {
            distance = 10000;
        }
        rtPtr->appendGfxArg = model;
        if (model->modelNode->type == SHAPE_TYPE_GROUP) {
            rtPtr->appendGfx = appendGfx_model_group;
        } else {
            rtPtr->appendGfx = appendGfx_model;
        }
        rtPtr->distance = -distance;
        rtPtr->renderMode = model->renderMode;
        queue_render_task(rtPtr);
    }

    for (i = 0; i < ARRAY_COUNT(*gCurrentTransformGroups); i++) {
        transformGroup = (*gCurrentTransformGroups)[i];
        if (transformGroup == NULL) {
            continue;
        }

        if (transformGroup->flags == 0) {
            continue;
        }

        if (transformGroup->flags & 4) {
            continue;
        }

        xComp = transformGroup->center.x;
        yComp = transformGroup->center.y;
        zComp = transformGroup->center.z;

        transform_point(
            camera->perspectiveMatrix,
            xComp, yComp, zComp, 1.0f,
            &outX, &outY, &outZ, &outW
        );
        if (outW == 0.0f) {
            outW = 1.0f;
        }

        distance = ((outZ / outW) * 10000.0f);

        if (!(transformGroup->flags & 2)) {
            rtPtr->appendGfx = render_transform_group;
            rtPtr->appendGfxArg = transformGroup;
            rtPtr->distance = -distance;
            rtPtr->renderMode = transformGroup->renderMode;
            queue_render_task(rtPtr);
        }
    }
}