### RAW ASSEMBLY INSTRUCTIONS:

glabel test_ray_triangle_horizontal
/* 37BA4 8005C7A4 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* 37BA8 8005C7A8 F7BC0020 */  sdc1      $f28, 0x20($sp)
/* 37BAC 8005C7AC F7BA0018 */  sdc1      $f26, 0x18($sp)
/* 37BB0 8005C7B0 F7B80010 */  sdc1      $f24, 0x10($sp)
/* 37BB4 8005C7B4 F7B60008 */  sdc1      $f22, 0x8($sp)
/* 37BB8 8005C7B8 F7B40000 */  sdc1      $f20, 0x0($sp)
/* 37BBC 8005C7BC C4800030 */  lwc1      $f0, 0x30($a0)
/* 37BC0 8005C7C0 44801000 */  mtc1      $zero, $f2
/* 37BC4 8005C7C4 00000000 */  nop
/* 37BC8 8005C7C8 46020032 */  c.eq.s    $f0, $f2
/* 37BCC 8005C7CC 00000000 */  nop
/* 37BD0 8005C7D0 4500000B */  bc1f      .L8005C800
/* 37BD4 8005C7D4 00000000 */   nop
/* 37BD8 8005C7D8 C4800034 */  lwc1      $f0, 0x34($a0)
/* 37BDC 8005C7DC 46020032 */  c.eq.s    $f0, $f2
/* 37BE0 8005C7E0 00000000 */  nop
/* 37BE4 8005C7E4 45000006 */  bc1f      .L8005C800
/* 37BE8 8005C7E8 00000000 */   nop
/* 37BEC 8005C7EC C4800038 */  lwc1      $f0, 0x38($a0)
/* 37BF0 8005C7F0 46020032 */  c.eq.s    $f0, $f2
/* 37BF4 8005C7F4 00000000 */  nop
/* 37BF8 8005C7F8 4501012E */  bc1t      .L8005CCB4
/* 37BFC 8005C7FC 0000102D */   daddu    $v0, $zero, $zero
.L8005C800:
/* 37C00 8005C800 8C820000 */  lw        $v0, 0x0($a0)
/* 37C04 8005C804 3C01800A */  lui       $at, %hi(gCollisionRayStartX)
/* 37C08 8005C808 C4364230 */  lwc1      $f22, %lo(gCollisionRayStartX)($at)
/* 37C0C 8005C80C C4400000 */  lwc1      $f0, 0x0($v0)
/* 37C10 8005C810 4600B381 */  sub.s     $f14, $f22, $f0
/* 37C14 8005C814 C4880030 */  lwc1      $f8, 0x30($a0)
/* 37C18 8005C818 460E4102 */  mul.s     $f4, $f8, $f14
/* 37C1C 8005C81C 00000000 */  nop
/* 37C20 8005C820 3C01800A */  lui       $at, %hi(gCollisionRayStartY)
/* 37C24 8005C824 C4384234 */  lwc1      $f24, %lo(gCollisionRayStartY)($at)
/* 37C28 8005C828 C4400004 */  lwc1      $f0, 0x4($v0)
/* 37C2C 8005C82C 4600C501 */  sub.s     $f20, $f24, $f0
/* 37C30 8005C830 C4820034 */  lwc1      $f2, 0x34($a0)
/* 37C34 8005C834 46141082 */  mul.s     $f2, $f2, $f20
/* 37C38 8005C838 00000000 */  nop
/* 37C3C 8005C83C 3C01800A */  lui       $at, %hi(gCollisionRayStartZ)
/* 37C40 8005C840 C43C4238 */  lwc1      $f28, %lo(gCollisionRayStartZ)($at)
/* 37C44 8005C844 C4400008 */  lwc1      $f0, 0x8($v0)
/* 37C48 8005C848 4600E401 */  sub.s     $f16, $f28, $f0
/* 37C4C 8005C84C C4860038 */  lwc1      $f6, 0x38($a0)
/* 37C50 8005C850 46103002 */  mul.s     $f0, $f6, $f16
/* 37C54 8005C854 00000000 */  nop
/* 37C58 8005C858 8C830004 */  lw        $v1, 0x4($a0)
/* 37C5C 8005C85C 46022100 */  add.s     $f4, $f4, $f2
/* 37C60 8005C860 8C850008 */  lw        $a1, 0x8($a0)
/* 37C64 8005C864 8482003C */  lh        $v0, 0x3C($a0)
/* 37C68 8005C868 10400068 */  beqz      $v0, .L8005CA0C
/* 37C6C 8005C86C 46002480 */   add.s    $f18, $f4, $f0
/* 37C70 8005C870 4480D000 */  mtc1      $zero, $f26
/* 37C74 8005C874 00000000 */  nop
/* 37C78 8005C878 461A903C */  c.lt.s    $f18, $f26
/* 37C7C 8005C87C 00000000 */  nop
/* 37C80 8005C880 4503010C */  bc1tl     .L8005CCB4
/* 37C84 8005C884 0000102D */   daddu    $v0, $zero, $zero
/* 37C88 8005C888 3C01800A */  lui       $at, %hi(gCollisionRayDirX)
/* 37C8C 8005C88C C42C423C */  lwc1      $f12, %lo(gCollisionRayDirX)($at)
/* 37C90 8005C890 460C4002 */  mul.s     $f0, $f8, $f12
/* 37C94 8005C894 00000000 */  nop
/* 37C98 8005C898 3C01800A */  lui       $at, %hi(gCollisionRayDirZ)
/* 37C9C 8005C89C C42A4244 */  lwc1      $f10, %lo(gCollisionRayDirZ)($at)
/* 37CA0 8005C8A0 460A3082 */  mul.s     $f2, $f6, $f10
/* 37CA4 8005C8A4 00000000 */  nop
/* 37CA8 8005C8A8 46020000 */  add.s     $f0, $f0, $f2
/* 37CAC 8005C8AC 4600D03E */  c.le.s    $f26, $f0
/* 37CB0 8005C8B0 00000000 */  nop
/* 37CB4 8005C8B4 450100FF */  bc1t      .L8005CCB4
/* 37CB8 8005C8B8 0000102D */   daddu    $v0, $zero, $zero
/* 37CBC 8005C8BC C4860010 */  lwc1      $f6, 0x10($a0)
/* 37CC0 8005C8C0 46003107 */  neg.s     $f4, $f6
/* 37CC4 8005C8C4 460A2102 */  mul.s     $f4, $f4, $f10
/* 37CC8 8005C8C8 00000000 */  nop
/* 37CCC 8005C8CC C480000C */  lwc1      $f0, 0xC($a0)
/* 37CD0 8005C8D0 460A0002 */  mul.s     $f0, $f0, $f10
/* 37CD4 8005C8D4 00000000 */  nop
/* 37CD8 8005C8D8 C4820014 */  lwc1      $f2, 0x14($a0)
/* 37CDC 8005C8DC 460C1082 */  mul.s     $f2, $f2, $f12
/* 37CE0 8005C8E0 00000000 */  nop
/* 37CE4 8005C8E4 460C3182 */  mul.s     $f6, $f6, $f12
/* 37CE8 8005C8E8 00000000 */  nop
/* 37CEC 8005C8EC 46047102 */  mul.s     $f4, $f14, $f4
/* 37CF0 8005C8F0 00000000 */  nop
/* 37CF4 8005C8F4 46068182 */  mul.s     $f6, $f16, $f6
/* 37CF8 8005C8F8 00000000 */  nop
/* 37CFC 8005C8FC 46020001 */  sub.s     $f0, $f0, $f2
/* 37D00 8005C900 4600A002 */  mul.s     $f0, $f20, $f0
/* 37D04 8005C904 00000000 */  nop
/* 37D08 8005C908 46002100 */  add.s     $f4, $f4, $f0
/* 37D0C 8005C90C 46062100 */  add.s     $f4, $f4, $f6
/* 37D10 8005C910 461A203C */  c.lt.s    $f4, $f26
/* 37D14 8005C914 00000000 */  nop
/* 37D18 8005C918 450100E6 */  bc1t      .L8005CCB4
/* 37D1C 8005C91C 00000000 */   nop
/* 37D20 8005C920 C488001C */  lwc1      $f8, 0x1C($a0)
/* 37D24 8005C924 46004007 */  neg.s     $f0, $f8
/* 37D28 8005C928 460A0002 */  mul.s     $f0, $f0, $f10
/* 37D2C 8005C92C 00000000 */  nop
/* 37D30 8005C930 C4840018 */  lwc1      $f4, 0x18($a0)
/* 37D34 8005C934 460A2102 */  mul.s     $f4, $f4, $f10
/* 37D38 8005C938 00000000 */  nop
/* 37D3C 8005C93C 460C4202 */  mul.s     $f8, $f8, $f12
/* 37D40 8005C940 00000000 */  nop
/* 37D44 8005C944 C4620000 */  lwc1      $f2, 0x0($v1)
/* 37D48 8005C948 4602B081 */  sub.s     $f2, $f22, $f2
/* 37D4C 8005C94C 46001082 */  mul.s     $f2, $f2, $f0
/* 37D50 8005C950 00000000 */  nop
/* 37D54 8005C954 C4800020 */  lwc1      $f0, 0x20($a0)
/* 37D58 8005C958 460C0002 */  mul.s     $f0, $f0, $f12
/* 37D5C 8005C95C 00000000 */  nop
/* 37D60 8005C960 C4660004 */  lwc1      $f6, 0x4($v1)
/* 37D64 8005C964 4606C181 */  sub.s     $f6, $f24, $f6
/* 37D68 8005C968 46002101 */  sub.s     $f4, $f4, $f0
/* 37D6C 8005C96C 46043182 */  mul.s     $f6, $f6, $f4
/* 37D70 8005C970 00000000 */  nop
/* 37D74 8005C974 C4600008 */  lwc1      $f0, 0x8($v1)
/* 37D78 8005C978 4600E001 */  sub.s     $f0, $f28, $f0
/* 37D7C 8005C97C 46080002 */  mul.s     $f0, $f0, $f8
/* 37D80 8005C980 00000000 */  nop
/* 37D84 8005C984 46061080 */  add.s     $f2, $f2, $f6
/* 37D88 8005C988 46001080 */  add.s     $f2, $f2, $f0
/* 37D8C 8005C98C 461A103C */  c.lt.s    $f2, $f26
/* 37D90 8005C990 00000000 */  nop
/* 37D94 8005C994 450100C7 */  bc1t      .L8005CCB4
/* 37D98 8005C998 00000000 */   nop
/* 37D9C 8005C99C C4880028 */  lwc1      $f8, 0x28($a0)
/* 37DA0 8005C9A0 46004007 */  neg.s     $f0, $f8
/* 37DA4 8005C9A4 460A0002 */  mul.s     $f0, $f0, $f10
/* 37DA8 8005C9A8 00000000 */  nop
/* 37DAC 8005C9AC C4840024 */  lwc1      $f4, 0x24($a0)
/* 37DB0 8005C9B0 460A2102 */  mul.s     $f4, $f4, $f10
/* 37DB4 8005C9B4 00000000 */  nop
/* 37DB8 8005C9B8 460C4202 */  mul.s     $f8, $f8, $f12
/* 37DBC 8005C9BC 00000000 */  nop
/* 37DC0 8005C9C0 C4A20000 */  lwc1      $f2, 0x0($a1)
/* 37DC4 8005C9C4 4602B081 */  sub.s     $f2, $f22, $f2
/* 37DC8 8005C9C8 46001082 */  mul.s     $f2, $f2, $f0
/* 37DCC 8005C9CC 00000000 */  nop
/* 37DD0 8005C9D0 C480002C */  lwc1      $f0, 0x2C($a0)
/* 37DD4 8005C9D4 460C0002 */  mul.s     $f0, $f0, $f12
/* 37DD8 8005C9D8 00000000 */  nop
/* 37DDC 8005C9DC C4A60004 */  lwc1      $f6, 0x4($a1)
/* 37DE0 8005C9E0 4606C181 */  sub.s     $f6, $f24, $f6
/* 37DE4 8005C9E4 46002101 */  sub.s     $f4, $f4, $f0
/* 37DE8 8005C9E8 46043182 */  mul.s     $f6, $f6, $f4
/* 37DEC 8005C9EC 00000000 */  nop
/* 37DF0 8005C9F0 C4A00008 */  lwc1      $f0, 0x8($a1)
/* 37DF4 8005C9F4 4600E001 */  sub.s     $f0, $f28, $f0
/* 37DF8 8005C9F8 46080002 */  mul.s     $f0, $f0, $f8
/* 37DFC 8005C9FC 00000000 */  nop
/* 37E00 8005CA00 46061080 */  add.s     $f2, $f2, $f6
/* 37E04 8005CA04 080172ED */  j         .L8005CBB4
/* 37E08 8005CA08 46001080 */   add.s    $f2, $f2, $f0
.L8005CA0C:
/* 37E0C 8005CA0C 3C01800A */  lui       $at, %hi(gCollisionRayDirX)
/* 37E10 8005CA10 C42C423C */  lwc1      $f12, %lo(gCollisionRayDirX)($at)
/* 37E14 8005CA14 460C4002 */  mul.s     $f0, $f8, $f12
/* 37E18 8005CA18 00000000 */  nop
/* 37E1C 8005CA1C 3C01800A */  lui       $at, %hi(gCollisionRayDirZ)
/* 37E20 8005CA20 C42A4244 */  lwc1      $f10, %lo(gCollisionRayDirZ)($at)
/* 37E24 8005CA24 460A3082 */  mul.s     $f2, $f6, $f10
/* 37E28 8005CA28 00000000 */  nop
/* 37E2C 8005CA2C 46020000 */  add.s     $f0, $f0, $f2
/* 37E30 8005CA30 46120002 */  mul.s     $f0, $f0, $f18
/* 37E34 8005CA34 00000000 */  nop
/* 37E38 8005CA38 4480D000 */  mtc1      $zero, $f26
/* 37E3C 8005CA3C 00000000 */  nop
/* 37E40 8005CA40 4600D03E */  c.le.s    $f26, $f0
/* 37E44 8005CA44 00000000 */  nop
/* 37E48 8005CA48 4501009A */  bc1t      .L8005CCB4
/* 37E4C 8005CA4C 0000102D */   daddu    $v0, $zero, $zero
/* 37E50 8005CA50 C4860010 */  lwc1      $f6, 0x10($a0)
/* 37E54 8005CA54 46003107 */  neg.s     $f4, $f6
/* 37E58 8005CA58 460A2102 */  mul.s     $f4, $f4, $f10
/* 37E5C 8005CA5C 00000000 */  nop
/* 37E60 8005CA60 C480000C */  lwc1      $f0, 0xC($a0)
/* 37E64 8005CA64 460A0002 */  mul.s     $f0, $f0, $f10
/* 37E68 8005CA68 00000000 */  nop
/* 37E6C 8005CA6C C4820014 */  lwc1      $f2, 0x14($a0)
/* 37E70 8005CA70 460C1082 */  mul.s     $f2, $f2, $f12
/* 37E74 8005CA74 00000000 */  nop
/* 37E78 8005CA78 460C3182 */  mul.s     $f6, $f6, $f12
/* 37E7C 8005CA7C 00000000 */  nop
/* 37E80 8005CA80 46047102 */  mul.s     $f4, $f14, $f4
/* 37E84 8005CA84 00000000 */  nop
/* 37E88 8005CA88 46068182 */  mul.s     $f6, $f16, $f6
/* 37E8C 8005CA8C 00000000 */  nop
/* 37E90 8005CA90 46020001 */  sub.s     $f0, $f0, $f2
/* 37E94 8005CA94 4600A002 */  mul.s     $f0, $f20, $f0
/* 37E98 8005CA98 00000000 */  nop
/* 37E9C 8005CA9C 46002100 */  add.s     $f4, $f4, $f0
/* 37EA0 8005CAA0 46062100 */  add.s     $f4, $f4, $f6
/* 37EA4 8005CAA4 46122102 */  mul.s     $f4, $f4, $f18
/* 37EA8 8005CAA8 00000000 */  nop
/* 37EAC 8005CAAC 461A203C */  c.lt.s    $f4, $f26
/* 37EB0 8005CAB0 00000000 */  nop
/* 37EB4 8005CAB4 4501007F */  bc1t      .L8005CCB4
/* 37EB8 8005CAB8 00000000 */   nop
/* 37EBC 8005CABC C488001C */  lwc1      $f8, 0x1C($a0)
/* 37EC0 8005CAC0 46004007 */  neg.s     $f0, $f8
/* 37EC4 8005CAC4 460A0002 */  mul.s     $f0, $f0, $f10
/* 37EC8 8005CAC8 00000000 */  nop
/* 37ECC 8005CACC C4840018 */  lwc1      $f4, 0x18($a0)
/* 37ED0 8005CAD0 460A2102 */  mul.s     $f4, $f4, $f10
/* 37ED4 8005CAD4 00000000 */  nop
/* 37ED8 8005CAD8 460C4202 */  mul.s     $f8, $f8, $f12
/* 37EDC 8005CADC 00000000 */  nop
/* 37EE0 8005CAE0 C4620000 */  lwc1      $f2, 0x0($v1)
/* 37EE4 8005CAE4 4602B081 */  sub.s     $f2, $f22, $f2
/* 37EE8 8005CAE8 46001082 */  mul.s     $f2, $f2, $f0
/* 37EEC 8005CAEC 00000000 */  nop
/* 37EF0 8005CAF0 C4800020 */  lwc1      $f0, 0x20($a0)
/* 37EF4 8005CAF4 460C0002 */  mul.s     $f0, $f0, $f12
/* 37EF8 8005CAF8 00000000 */  nop
/* 37EFC 8005CAFC C4660004 */  lwc1      $f6, 0x4($v1)
/* 37F00 8005CB00 4606C181 */  sub.s     $f6, $f24, $f6
/* 37F04 8005CB04 46002101 */  sub.s     $f4, $f4, $f0
/* 37F08 8005CB08 46043182 */  mul.s     $f6, $f6, $f4
/* 37F0C 8005CB0C 00000000 */  nop
/* 37F10 8005CB10 C4600008 */  lwc1      $f0, 0x8($v1)
/* 37F14 8005CB14 4600E001 */  sub.s     $f0, $f28, $f0
/* 37F18 8005CB18 46080002 */  mul.s     $f0, $f0, $f8
/* 37F1C 8005CB1C 00000000 */  nop
/* 37F20 8005CB20 46061080 */  add.s     $f2, $f2, $f6
/* 37F24 8005CB24 46001080 */  add.s     $f2, $f2, $f0
/* 37F28 8005CB28 46121082 */  mul.s     $f2, $f2, $f18
/* 37F2C 8005CB2C 00000000 */  nop
/* 37F30 8005CB30 461A103C */  c.lt.s    $f2, $f26
/* 37F34 8005CB34 00000000 */  nop
/* 37F38 8005CB38 4501005E */  bc1t      .L8005CCB4
/* 37F3C 8005CB3C 00000000 */   nop
/* 37F40 8005CB40 C4880028 */  lwc1      $f8, 0x28($a0)
/* 37F44 8005CB44 46004007 */  neg.s     $f0, $f8
/* 37F48 8005CB48 460A0002 */  mul.s     $f0, $f0, $f10
/* 37F4C 8005CB4C 00000000 */  nop
/* 37F50 8005CB50 C4840024 */  lwc1      $f4, 0x24($a0)
/* 37F54 8005CB54 460A2102 */  mul.s     $f4, $f4, $f10
/* 37F58 8005CB58 00000000 */  nop
/* 37F5C 8005CB5C 460C4202 */  mul.s     $f8, $f8, $f12
/* 37F60 8005CB60 00000000 */  nop
/* 37F64 8005CB64 C4A20000 */  lwc1      $f2, 0x0($a1)
/* 37F68 8005CB68 4602B081 */  sub.s     $f2, $f22, $f2
/* 37F6C 8005CB6C 46001082 */  mul.s     $f2, $f2, $f0
/* 37F70 8005CB70 00000000 */  nop
/* 37F74 8005CB74 C480002C */  lwc1      $f0, 0x2C($a0)
/* 37F78 8005CB78 460C0002 */  mul.s     $f0, $f0, $f12
/* 37F7C 8005CB7C 00000000 */  nop
/* 37F80 8005CB80 C4A60004 */  lwc1      $f6, 0x4($a1)
/* 37F84 8005CB84 4606C181 */  sub.s     $f6, $f24, $f6
/* 37F88 8005CB88 46002101 */  sub.s     $f4, $f4, $f0
/* 37F8C 8005CB8C 46043182 */  mul.s     $f6, $f6, $f4
/* 37F90 8005CB90 00000000 */  nop
/* 37F94 8005CB94 C4A00008 */  lwc1      $f0, 0x8($a1)
/* 37F98 8005CB98 4600E001 */  sub.s     $f0, $f28, $f0
/* 37F9C 8005CB9C 46080002 */  mul.s     $f0, $f0, $f8
/* 37FA0 8005CBA0 00000000 */  nop
/* 37FA4 8005CBA4 46061080 */  add.s     $f2, $f2, $f6
/* 37FA8 8005CBA8 46001080 */  add.s     $f2, $f2, $f0
/* 37FAC 8005CBAC 46121082 */  mul.s     $f2, $f2, $f18
/* 37FB0 8005CBB0 00000000 */  nop
.L8005CBB4:
/* 37FB4 8005CBB4 461A103C */  c.lt.s    $f2, $f26
/* 37FB8 8005CBB8 00000000 */  nop
/* 37FBC 8005CBBC 4503003D */  bc1tl     .L8005CCB4
/* 37FC0 8005CBC0 0000102D */   daddu    $v0, $zero, $zero
/* 37FC4 8005CBC4 C4840030 */  lwc1      $f4, 0x30($a0)
/* 37FC8 8005CBC8 3C01800A */  lui       $at, %hi(gCollisionRayDirX)
/* 37FCC 8005CBCC C420423C */  lwc1      $f0, %lo(gCollisionRayDirX)($at)
/* 37FD0 8005CBD0 46002102 */  mul.s     $f4, $f4, $f0
/* 37FD4 8005CBD4 00000000 */  nop
/* 37FD8 8005CBD8 C4820038 */  lwc1      $f2, 0x38($a0)
/* 37FDC 8005CBDC 3C01800A */  lui       $at, %hi(gCollisionRayDirZ)
/* 37FE0 8005CBE0 C4204244 */  lwc1      $f0, %lo(gCollisionRayDirZ)($at)
/* 37FE4 8005CBE4 46001082 */  mul.s     $f2, $f2, $f0
/* 37FE8 8005CBE8 00000000 */  nop
/* 37FEC 8005CBEC 3C01800A */  lui       $at, %hi(gCollisionRayLength)
/* 37FF0 8005CBF0 C4264254 */  lwc1      $f6, %lo(gCollisionRayLength)($at)
/* 37FF4 8005CBF4 44800000 */  mtc1      $zero, $f0
/* 37FF8 8005CBF8 00000000 */  nop
/* 37FFC 8005CBFC 4606003E */  c.le.s    $f0, $f6
/* 38000 8005CC00 00000000 */  nop
/* 38004 8005CC04 45000007 */  bc1f      .L8005CC24
/* 38008 8005CC08 46022100 */   add.s    $f4, $f4, $f2
/* 3800C 8005CC0C 46009007 */  neg.s     $f0, $f18
/* 38010 8005CC10 46040003 */  div.s     $f0, $f0, $f4
/* 38014 8005CC14 4600303E */  c.le.s    $f6, $f0
/* 38018 8005CC18 00000000 */  nop
/* 3801C 8005CC1C 45010025 */  bc1t      .L8005CCB4
/* 38020 8005CC20 0000102D */   daddu    $v0, $zero, $zero
.L8005CC24:
/* 38024 8005CC24 46009007 */  neg.s     $f0, $f18
/* 38028 8005CC28 46040003 */  div.s     $f0, $f0, $f4
/* 3802C 8005CC2C 3C01800A */  lui       $at, %hi(gCollisionRayDirX)
/* 38030 8005CC30 C422423C */  lwc1      $f2, %lo(gCollisionRayDirX)($at)
/* 38034 8005CC34 3C01800A */  lui       $at, %hi(gCollisionRayStartX)
/* 38038 8005CC38 C4264230 */  lwc1      $f6, %lo(gCollisionRayStartX)($at)
/* 3803C 8005CC3C 3C01800A */  lui       $at, %hi(gCollisionRayStartY)
/* 38040 8005CC40 C42C4234 */  lwc1      $f12, %lo(gCollisionRayStartY)($at)
/* 38044 8005CC44 3C01800A */  lui       $at, %hi(gCollisionRayDirZ)
/* 38048 8005CC48 C4244244 */  lwc1      $f4, %lo(gCollisionRayDirZ)($at)
/* 3804C 8005CC4C 46001082 */  mul.s     $f2, $f2, $f0
/* 38050 8005CC50 00000000 */  nop
/* 38054 8005CC54 C4880030 */  lwc1      $f8, 0x30($a0)
/* 38058 8005CC58 C48A0034 */  lwc1      $f10, 0x34($a0)
/* 3805C 8005CC5C 3C01800A */  lui       $at, %hi(gCollisionRayLength)
/* 38060 8005CC60 E4204254 */  swc1      $f0, %lo(gCollisionRayLength)($at)
/* 38064 8005CC64 46002102 */  mul.s     $f4, $f4, $f0
/* 38068 8005CC68 00000000 */  nop
/* 3806C 8005CC6C 3C01800A */  lui       $at, %hi(gCollisionRayStartZ)
/* 38070 8005CC70 C4204238 */  lwc1      $f0, %lo(gCollisionRayStartZ)($at)
/* 38074 8005CC74 24020001 */  addiu     $v0, $zero, 0x1
/* 38078 8005CC78 3C01800A */  lui       $at, %hi(gCollisionPointY)
/* 3807C 8005CC7C E42C424C */  swc1      $f12, %lo(gCollisionPointY)($at)
/* 38080 8005CC80 3C01800A */  lui       $at, %hi(gCollisionNormalX)
/* 38084 8005CC84 E4284258 */  swc1      $f8, %lo(gCollisionNormalX)($at)
/* 38088 8005CC88 46023180 */  add.s     $f6, $f6, $f2
/* 3808C 8005CC8C 3C01800A */  lui       $at, %hi(gCollisionNormalY)
/* 38090 8005CC90 E42A425C */  swc1      $f10, %lo(gCollisionNormalY)($at)
/* 38094 8005CC94 C4820038 */  lwc1      $f2, 0x38($a0)
/* 38098 8005CC98 46040000 */  add.s     $f0, $f0, $f4
/* 3809C 8005CC9C 3C01800A */  lui       $at, %hi(gCollisionNormalZ)
/* 380A0 8005CCA0 E4224260 */  swc1      $f2, %lo(gCollisionNormalZ)($at)
/* 380A4 8005CCA4 3C01800A */  lui       $at, %hi(gCollisionPointX)
/* 380A8 8005CCA8 E4264248 */  swc1      $f6, %lo(gCollisionPointX)($at)
/* 380AC 8005CCAC 3C01800A */  lui       $at, %hi(gCollisionPointZ)
/* 380B0 8005CCB0 E4204250 */  swc1      $f0, %lo(gCollisionPointZ)($at)
.L8005CCB4:
/* 380B4 8005CCB4 D7BC0020 */  ldc1      $f28, 0x20($sp)
/* 380B8 8005CCB8 D7BA0018 */  ldc1      $f26, 0x18($sp)
/* 380BC 8005CCBC D7B80010 */  ldc1      $f24, 0x10($sp)
/* 380C0 8005CCC0 D7B60008 */  ldc1      $f22, 0x8($sp)
/* 380C4 8005CCC4 D7B40000 */  ldc1      $f20, 0x0($sp)
/* 380C8 8005CCC8 03E00008 */  jr        $ra
/* 380CC 8005CCCC 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

s32 test_ray_triangle_horizontal(ColliderTriangle* triangle, Vec3f *vertices) {
    f32 distToTrianglePlane, cosAngle;
    Vec3f* v1;
    Vec3f* v2;
    Vec3f* v3;

    if (triangle->normal.x == 0 && triangle->normal.y == 0 && triangle->normal.z == 0) {
        return FALSE;
    }

    v1 = triangle->v1;
    v2 = triangle->v2;
    v3 = triangle->v3;

    distToTrianglePlane = triangle->normal.x * (gCollisionRayStartX - v1->x) +
                          triangle->normal.y * (gCollisionRayStartY - v1->y) +
                          triangle->normal.z * (gCollisionRayStartZ - v1->z);

    if (triangle->oneSided) {
        if (distToTrianglePlane < 0) {
            return FALSE;
        }

        if (triangle->normal.x * gCollisionRayDirX + triangle->normal.z * gCollisionRayDirZ >= 0) {
            return FALSE;
        }

        if ((gCollisionRayStartX - v1->x) * (-triangle->e13.y * gCollisionRayDirZ) +
            (gCollisionRayStartY - v1->y) * (triangle->e13.x * gCollisionRayDirZ - triangle->e13.z * gCollisionRayDirX) +
            (gCollisionRayStartZ - v1->z) * (triangle->e13.y * gCollisionRayDirX) < 0)
        {
            return FALSE;
        }

        if ((gCollisionRayStartX - v2->x) * (-triangle->e21.y * gCollisionRayDirZ) +
            (gCollisionRayStartY - v2->y) * (triangle->e21.x * gCollisionRayDirZ - triangle->e21.z * gCollisionRayDirX) +
            (gCollisionRayStartZ - v2->z) * (triangle->e21.y * gCollisionRayDirX) < 0)
        {
            return FALSE;
        }

        if ((gCollisionRayStartX - v3->x) * (-triangle->e32.y * gCollisionRayDirZ) +
            (gCollisionRayStartY - v3->y) * (triangle->e32.x * gCollisionRayDirZ - triangle->e32.z * gCollisionRayDirX) +
            (gCollisionRayStartZ - v3->z) * (triangle->e32.y * gCollisionRayDirX) < 0)
        {
            return FALSE;
        }
    } else {
        if ((triangle->normal.x * gCollisionRayDirX + triangle->normal.z * gCollisionRayDirZ) * distToTrianglePlane >= 0)
        {
            return FALSE;
        }

        if (((gCollisionRayStartX - v1->x) * (-triangle->e13.y * gCollisionRayDirZ) +
            (gCollisionRayStartY - v1->y) * (triangle->e13.x * gCollisionRayDirZ - triangle->e13.z * gCollisionRayDirX) +
            (gCollisionRayStartZ - v1->z) * (triangle->e13.y * gCollisionRayDirX)) * distToTrianglePlane < 0)
        {
            return FALSE;
        }

        if (((gCollisionRayStartX - v2->x) * (-triangle->e21.y * gCollisionRayDirZ) +
            (gCollisionRayStartY - v2->y) * (triangle->e21.x * gCollisionRayDirZ - triangle->e21.z * gCollisionRayDirX) +
            (gCollisionRayStartZ - v2->z) * (triangle->e21.y * gCollisionRayDirX)) * distToTrianglePlane < 0)
        {
            return FALSE;
        }

        if (((gCollisionRayStartX - v3->x) * (-triangle->e32.y * gCollisionRayDirZ) +
            (gCollisionRayStartY - v3->y) * (triangle->e32.x * gCollisionRayDirZ - triangle->e32.z * gCollisionRayDirX) +
            (gCollisionRayStartZ - v3->z) * (triangle->e32.y * gCollisionRayDirX)) * distToTrianglePlane < 0)
        {
            return FALSE;
        }
    }

    cosAngle = triangle->normal.x * gCollisionRayDirX + triangle->normal.z * gCollisionRayDirZ;
    if (gCollisionRayLength >= 0 && gCollisionRayLength <= -distToTrianglePlane / cosAngle) {
        return FALSE;
    }

    gCollisionRayLength = -distToTrianglePlane  / cosAngle;

    gCollisionPointX = gCollisionRayStartX + gCollisionRayDirX * gCollisionRayLength;
    gCollisionPointY = gCollisionRayStartY;
    gCollisionPointZ = gCollisionRayStartZ + gCollisionRayDirZ * gCollisionRayLength;

    gCollisionNormalX = triangle->normal.x;
    gCollisionNormalY = triangle->normal.y;
    gCollisionNormalZ = triangle->normal.z;

    return TRUE;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel gather_energy_pink_appendGfx
/* 33B674 E00264F4 27BDFEE8 */  addiu     $sp, $sp, -0x118
/* 33B678 E00264F8 AFB70104 */  sw        $s7, 0x104($sp)
/* 33B67C E00264FC 0080B82D */  daddu     $s7, $a0, $zero
/* 33B680 E0026500 3C07DB06 */  lui       $a3, (0xDB060024 >> 16)
/* 33B684 E0026504 34E70024 */  ori       $a3, $a3, (0xDB060024 & 0xFFFF)
/* 33B688 E0026508 AFB500FC */  sw        $s5, 0xFC($sp)
/* 33B68C E002650C 3C15800A */  lui       $s5, %hi(gMainGfxPos)
/* 33B690 E0026510 26B5A66C */  addiu     $s5, $s5, %lo(gMainGfxPos)
/* 33B694 E0026514 27A40020 */  addiu     $a0, $sp, 0x20
/* 33B698 E0026518 3C08800B */  lui       $t0, %hi(gCameras)
/* 33B69C E002651C 25081D80 */  addiu     $t0, $t0, %lo(gCameras)
/* 33B6A0 E0026520 AFBF010C */  sw        $ra, 0x10C($sp)
/* 33B6A4 E0026524 AFBE0108 */  sw        $fp, 0x108($sp)
/* 33B6A8 E0026528 AFB60100 */  sw        $s6, 0x100($sp)
/* 33B6AC E002652C AFB400F8 */  sw        $s4, 0xF8($sp)
/* 33B6B0 E0026530 AFB300F4 */  sw        $s3, 0xF4($sp)
/* 33B6B4 E0026534 AFB200F0 */  sw        $s2, 0xF0($sp)
/* 33B6B8 E0026538 AFB100EC */  sw        $s1, 0xEC($sp)
/* 33B6BC E002653C AFB000E8 */  sw        $s0, 0xE8($sp)
/* 33B6C0 E0026540 F7B40110 */  sdc1      $f20, 0x110($sp)
/* 33B6C4 E0026544 8EA50000 */  lw        $a1, 0x0($s5)
/* 33B6C8 E0026548 8EF3000C */  lw        $s3, 0xC($s7)
/* 33B6CC E002654C 00A0182D */  daddu     $v1, $a1, $zero
/* 33B6D0 E0026550 24A50008 */  addiu     $a1, $a1, 0x8
/* 33B6D4 E0026554 AEA50000 */  sw        $a1, 0x0($s5)
/* 33B6D8 E0026558 8E740000 */  lw        $s4, 0x0($s3)
/* 33B6DC E002655C 24A20008 */  addiu     $v0, $a1, 0x8
/* 33B6E0 E0026560 AEA20000 */  sw        $v0, 0x0($s5)
/* 33B6E4 E0026564 00141080 */  sll       $v0, $s4, 2
/* 33B6E8 E0026568 3C06E002 */  lui       $a2, (0xE00269F8 >> 16)
/* 33B6EC E002656C 00C23021 */  addu      $a2, $a2, $v0
/* 33B6F0 E0026570 8CC669F8 */  lw        $a2, (0xE00269F8 & 0xFFFF)($a2)
/* 33B6F4 E0026574 3C1EE002 */  lui       $fp, (0xE00269F0 >> 16)
/* 33B6F8 E0026578 03C2F021 */  addu      $fp, $fp, $v0
/* 33B6FC E002657C 8FDE69F0 */  lw        $fp, (0xE00269F0 & 0xFFFF)($fp)
/* 33B700 E0026580 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 33B704 E0026584 AC620000 */  sw        $v0, 0x0($v1)
/* 33B708 E0026588 AC600004 */  sw        $zero, 0x4($v1)
/* 33B70C E002658C ACA70000 */  sw        $a3, 0x0($a1)
/* 33B710 E0026590 8EE30010 */  lw        $v1, 0x10($s7)
/* 33B714 E0026594 24A20010 */  addiu     $v0, $a1, 0x10
/* 33B718 E0026598 AEA20000 */  sw        $v0, 0x0($s5)
/* 33B71C E002659C 8C63001C */  lw        $v1, 0x1C($v1)
/* 33B720 E00265A0 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 33B724 E00265A4 ACA20008 */  sw        $v0, 0x8($a1)
/* 33B728 E00265A8 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* 33B72C E00265AC ACA6000C */  sw        $a2, 0xC($a1)
/* 33B730 E00265B0 00621821 */  addu      $v1, $v1, $v0
/* 33B734 E00265B4 ACA30004 */  sw        $v1, 0x4($a1)
/* 33B738 E00265B8 8E650010 */  lw        $a1, 0x10($s3)
/* 33B73C E00265BC 8E660014 */  lw        $a2, 0x14($s3)
/* 33B740 E00265C0 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 33B744 E00265C4 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 33B748 E00265C8 8E670018 */  lw        $a3, 0x18($s3)
/* 33B74C E00265CC 00031080 */  sll       $v0, $v1, 2
/* 33B750 E00265D0 00431021 */  addu      $v0, $v0, $v1
/* 33B754 E00265D4 00021080 */  sll       $v0, $v0, 2
/* 33B758 E00265D8 00431023 */  subu      $v0, $v0, $v1
/* 33B75C E00265DC 000218C0 */  sll       $v1, $v0, 3
/* 33B760 E00265E0 00431021 */  addu      $v0, $v0, $v1
/* 33B764 E00265E4 000210C0 */  sll       $v0, $v0, 3
/* 33B768 E00265E8 0C080108 */  jal       shim_guTranslateF
/* 33B76C E00265EC 00488821 */   addu     $s1, $v0, $t0
/* 33B770 E00265F0 27B00060 */  addiu     $s0, $sp, 0x60
/* 33B774 E00265F4 0200202D */  daddu     $a0, $s0, $zero
/* 33B778 E00265F8 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 33B77C E00265FC 4481A000 */  mtc1      $at, $f20
/* 33B780 E0026600 8E65001C */  lw        $a1, 0x1C($s3)
/* 33B784 E0026604 4407A000 */  mfc1      $a3, $f20
/* 33B788 E0026608 0C080110 */  jal       shim_guScaleF
/* 33B78C E002660C 00A0302D */   daddu    $a2, $a1, $zero
/* 33B790 E0026610 0200202D */  daddu     $a0, $s0, $zero
/* 33B794 E0026614 27A50020 */  addiu     $a1, $sp, 0x20
/* 33B798 E0026618 0C080114 */  jal       shim_guMtxCatF
/* 33B79C E002661C 00A0302D */   daddu    $a2, $a1, $zero
/* 33B7A0 E0026620 24160001 */  addiu     $s6, $zero, 0x1
/* 33B7A4 E0026624 3C0141F0 */  lui       $at, (0x41F00000 >> 16)
/* 33B7A8 E0026628 44810000 */  mtc1      $at, $f0
/* 33B7AC E002662C 16960003 */  bne       $s4, $s6, .LE002663C
/* 33B7B0 E0026630 27A500E0 */   addiu    $a1, $sp, 0xE0
/* 33B7B4 E0026634 3C014302 */  lui       $at, (0x43020000 >> 16)
/* 33B7B8 E0026638 44810000 */  mtc1      $at, $f0
.LE002663C:
/* 33B7BC E002663C 0200202D */  daddu     $a0, $s0, $zero
/* 33B7C0 E0026640 3C120001 */  lui       $s2, (0x11630 >> 16)
/* 33B7C4 E0026644 44060000 */  mfc1      $a2, $f0
/* 33B7C8 E0026648 8622000A */  lh        $v0, 0xA($s1)
/* 33B7CC E002664C 8623000C */  lh        $v1, 0xC($s1)
/* 33B7D0 E0026650 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 33B7D4 E0026654 44811000 */  mtc1      $at, $f2
/* 33B7D8 E0026658 3C014680 */  lui       $at, (0x46800000 >> 16)
/* 33B7DC E002665C 44812000 */  mtc1      $at, $f4
/* 33B7E0 E0026660 44823000 */  mtc1      $v0, $f6
/* 33B7E4 E0026664 00000000 */  nop
/* 33B7E8 E0026668 468031A0 */  cvt.s.w   $f6, $f6
/* 33B7EC E002666C 44830000 */  mtc1      $v1, $f0
/* 33B7F0 E0026670 00000000 */  nop
/* 33B7F4 E0026674 46800020 */  cvt.s.w   $f0, $f0
/* 33B7F8 E0026678 46003183 */  div.s     $f6, $f6, $f0
/* 33B7FC E002667C 44073000 */  mfc1      $a3, $f6
/* 33B800 E0026680 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* 33B804 E0026684 E7B40018 */  swc1      $f20, 0x18($sp)
/* 33B808 E0026688 E7A20010 */  swc1      $f2, 0x10($sp)
/* 33B80C E002668C 0C080160 */  jal       shim_guPerspectiveF
/* 33B810 E0026690 E7A40014 */   swc1     $f4, 0x14($sp)
/* 33B814 E0026694 0200202D */  daddu     $a0, $s0, $zero
/* 33B818 E0026698 27A50020 */  addiu     $a1, $sp, 0x20
/* 33B81C E002669C 0C080114 */  jal       shim_guMtxCatF
/* 33B820 E00266A0 00A0302D */   daddu    $a2, $a1, $zero
/* 33B824 E00266A4 27A40020 */  addiu     $a0, $sp, 0x20
/* 33B828 E00266A8 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 33B82C E00266AC 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 33B830 E00266B0 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* 33B834 E00266B4 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* 33B838 E00266B8 96050000 */  lhu       $a1, 0x0($s0)
/* 33B83C E00266BC 8E220000 */  lw        $v0, 0x0($s1)
/* 33B840 E00266C0 00052980 */  sll       $a1, $a1, 6
/* 33B844 E00266C4 00B22821 */  addu      $a1, $a1, $s2
/* 33B848 E00266C8 0C080118 */  jal       shim_guMtxF2L
/* 33B84C E00266CC 00452821 */   addu     $a1, $v0, $a1
/* 33B850 E00266D0 3C04DA38 */  lui       $a0, (0xDA380007 >> 16)
/* 33B854 E00266D4 34840007 */  ori       $a0, $a0, (0xDA380007 & 0xFFFF)
/* 33B858 E00266D8 8EA30000 */  lw        $v1, 0x0($s5)
/* 33B85C E00266DC 96020000 */  lhu       $v0, 0x0($s0)
/* 33B860 E00266E0 0060282D */  daddu     $a1, $v1, $zero
/* 33B864 E00266E4 24630008 */  addiu     $v1, $v1, 0x8
/* 33B868 E00266E8 AEA30000 */  sw        $v1, 0x0($s5)
/* 33B86C E00266EC 24430001 */  addiu     $v1, $v0, 0x1
/* 33B870 E00266F0 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 33B874 E00266F4 00021180 */  sll       $v0, $v0, 6
/* 33B878 E00266F8 ACA40000 */  sw        $a0, 0x0($a1)
/* 33B87C E00266FC A6030000 */  sh        $v1, 0x0($s0)
/* 33B880 E0026700 8E230000 */  lw        $v1, 0x0($s1)
/* 33B884 E0026704 00521021 */  addu      $v0, $v0, $s2
/* 33B888 E0026708 00621821 */  addu      $v1, $v1, $v0
/* 33B88C E002670C 12800009 */  beqz      $s4, .LE0026734
/* 33B890 E0026710 ACA30004 */   sw       $v1, 0x4($a1)
/* 33B894 E0026714 1696000E */  bne       $s4, $s6, .LE0026750
/* 33B898 E0026718 3C120001 */   lui      $s2, (0x11630 >> 16)
/* 33B89C E002671C 44800000 */  mtc1      $zero, $f0
/* 33B8A0 E0026720 00000000 */  nop
/* 33B8A4 E0026724 44050000 */  mfc1      $a1, $f0
/* 33B8A8 E0026728 3C07C28C */  lui       $a3, (0xC28C0000 >> 16)
/* 33B8AC E002672C 080099D1 */  j         .LE0026744
/* 33B8B0 E0026730 27A40020 */   addiu    $a0, $sp, 0x20
.LE0026734:
/* 33B8B4 E0026734 44800000 */  mtc1      $zero, $f0
/* 33B8B8 E0026738 27A40020 */  addiu     $a0, $sp, 0x20
/* 33B8BC E002673C 44050000 */  mfc1      $a1, $f0
/* 33B8C0 E0026740 3C07C2A0 */  lui       $a3, (0xC2A00000 >> 16)
.LE0026744:
/* 33B8C4 E0026744 0C080108 */  jal       shim_guTranslateF
/* 33B8C8 E0026748 00A0302D */   daddu    $a2, $a1, $zero
/* 33B8CC E002674C 3C120001 */  lui       $s2, (0x11630 >> 16)
.LE0026750:
/* 33B8D0 E0026750 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* 33B8D4 E0026754 27A40020 */  addiu     $a0, $sp, 0x20
/* 33B8D8 E0026758 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 33B8DC E002675C 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 33B8E0 E0026760 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* 33B8E4 E0026764 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* 33B8E8 E0026768 96050000 */  lhu       $a1, 0x0($s0)
/* 33B8EC E002676C 8E220000 */  lw        $v0, 0x0($s1)
/* 33B8F0 E0026770 00052980 */  sll       $a1, $a1, 6
/* 33B8F4 E0026774 00B22821 */  addu      $a1, $a1, $s2
/* 33B8F8 E0026778 0C080118 */  jal       shim_guMtxF2L
/* 33B8FC E002677C 00452821 */   addu     $a1, $v0, $a1
/* 33B900 E0026780 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 33B904 E0026784 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 33B908 E0026788 3C06800A */  lui       $a2, %hi(gMainGfxPos)
/* 33B90C E002678C 24C6A66C */  addiu     $a2, $a2, %lo(gMainGfxPos)
/* 33B910 E0026790 8CC20000 */  lw        $v0, 0x0($a2)
/* 33B914 E0026794 96040000 */  lhu       $a0, 0x0($s0)
/* 33B918 E0026798 0040282D */  daddu     $a1, $v0, $zero
/* 33B91C E002679C 24420008 */  addiu     $v0, $v0, 0x8
/* 33B920 E00267A0 ACC20000 */  sw        $v0, 0x0($a2)
/* 33B924 E00267A4 3082FFFF */  andi      $v0, $a0, 0xFFFF
/* 33B928 E00267A8 00021180 */  sll       $v0, $v0, 6
/* 33B92C E00267AC ACA30000 */  sw        $v1, 0x0($a1)
/* 33B930 E00267B0 8E230000 */  lw        $v1, 0x0($s1)
/* 33B934 E00267B4 00521021 */  addu      $v0, $v0, $s2
/* 33B938 E00267B8 00621821 */  addu      $v1, $v1, $v0
/* 33B93C E00267BC ACA30004 */  sw        $v1, 0x4($a1)
/* 33B940 E00267C0 8E63002C */  lw        $v1, 0x2C($s3)
/* 33B944 E00267C4 24840001 */  addiu     $a0, $a0, 0x1
/* 33B948 E00267C8 A6040000 */  sh        $a0, 0x0($s0)
/* 33B94C E00267CC 00031040 */  sll       $v0, $v1, 1
/* 33B950 E00267D0 00434821 */  addu      $t1, $v0, $v1
/* 33B954 E00267D4 8EE20008 */  lw        $v0, 0x8($s7)
/* 33B958 E00267D8 8E630024 */  lw        $v1, 0x24($s3)
/* 33B95C E00267DC 18400059 */  blez      $v0, .LE0026944
/* 33B960 E00267E0 0000602D */   daddu    $t4, $zero, $zero
/* 33B964 E00267E4 3C112AAA */  lui       $s1, (0x2AAAAAAB >> 16)
/* 33B968 E00267E8 3631AAAB */  ori       $s1, $s1, (0x2AAAAAAB & 0xFFFF)
/* 33B96C E00267EC 00C0582D */  daddu     $t3, $a2, $zero
/* 33B970 E00267F0 3C14FB00 */  lui       $s4, (0xFB000000 >> 16)
/* 33B974 E00267F4 000317C2 */  srl       $v0, $v1, 31
/* 33B978 E00267F8 00621021 */  addu      $v0, $v1, $v0
/* 33B97C E00267FC 00021043 */  sra       $v0, $v0, 1
/* 33B980 E0026800 305000FF */  andi      $s0, $v0, 0xFF
/* 33B984 E0026804 3C12FA00 */  lui       $s2, (0xFA000000 >> 16)
/* 33B988 E0026808 3C0EE002 */  lui       $t6, %hi(D_E0026A00)
/* 33B98C E002680C 25CE6A00 */  addiu     $t6, $t6, %lo(D_E0026A00)
/* 33B990 E0026810 306F00FF */  andi      $t7, $v1, 0xFF
/* 33B994 E0026814 3C0DF200 */  lui       $t5, (0xF2000000 >> 16)
/* 33B998 E0026818 266A0048 */  addiu     $t2, $s3, 0x48
.LE002681C:
/* 33B99C E002681C 2529001E */  addiu     $t1, $t1, 0x1E
/* 33B9A0 E0026820 258C0001 */  addiu     $t4, $t4, 0x1
/* 33B9A4 E0026824 8D660000 */  lw        $a2, 0x0($t3)
/* 33B9A8 E0026828 01310018 */  mult      $t1, $s1
/* 33B9AC E002682C 00C0102D */  daddu     $v0, $a2, $zero
/* 33B9B0 E0026830 24C60008 */  addiu     $a2, $a2, 0x8
/* 33B9B4 E0026834 AD660000 */  sw        $a2, 0x0($t3)
/* 33B9B8 E0026838 AC540000 */  sw        $s4, 0x0($v0)
/* 33B9BC E002683C AC500004 */  sw        $s0, 0x4($v0)
/* 33B9C0 E0026840 24C20008 */  addiu     $v0, $a2, 0x8
/* 33B9C4 E0026844 AD620000 */  sw        $v0, 0x0($t3)
/* 33B9C8 E0026848 000917C3 */  sra       $v0, $t1, 31
/* 33B9CC E002684C ACD20000 */  sw        $s2, 0x0($a2)
/* 33B9D0 E0026850 0000C010 */  mfhi      $t8
/* 33B9D4 E0026854 00181883 */  sra       $v1, $t8, 2
/* 33B9D8 E0026858 00621823 */  subu      $v1, $v1, $v0
/* 33B9DC E002685C 00031040 */  sll       $v0, $v1, 1
/* 33B9E0 E0026860 00431021 */  addu      $v0, $v0, $v1
/* 33B9E4 E0026864 000210C0 */  sll       $v0, $v0, 3
/* 33B9E8 E0026868 01224823 */  subu      $t1, $t1, $v0
/* 33B9EC E002686C 012E1021 */  addu      $v0, $t1, $t6
/* 33B9F0 E0026870 0040202D */  daddu     $a0, $v0, $zero
/* 33B9F4 E0026874 90430000 */  lbu       $v1, 0x0($v0)
/* 33B9F8 E0026878 90840002 */  lbu       $a0, 0x2($a0)
/* 33B9FC E002687C 24C20010 */  addiu     $v0, $a2, 0x10
/* 33BA00 E0026880 AD620000 */  sw        $v0, 0x0($t3)
/* 33BA04 E0026884 24C20018 */  addiu     $v0, $a2, 0x18
/* 33BA08 E0026888 AD620000 */  sw        $v0, 0x0($t3)
/* 33BA0C E002688C 24C20020 */  addiu     $v0, $a2, 0x20
/* 33BA10 E0026890 AD620000 */  sw        $v0, 0x0($t3)
/* 33BA14 E0026894 00031E00 */  sll       $v1, $v1, 24
/* 33BA18 E0026898 00042200 */  sll       $a0, $a0, 8
/* 33BA1C E002689C 00641825 */  or        $v1, $v1, $a0
/* 33BA20 E00268A0 006F1825 */  or        $v1, $v1, $t7
/* 33BA24 E00268A4 ACC30004 */  sw        $v1, 0x4($a2)
/* 33BA28 E00268A8 8D44FFE8 */  lw        $a0, -0x18($t2)
/* 33BA2C E00268AC 8D47FFF8 */  lw        $a3, -0x8($t2)
/* 33BA30 E00268B0 8D45FFF0 */  lw        $a1, -0x10($t2)
/* 33BA34 E00268B4 8D480000 */  lw        $t0, 0x0($t2)
/* 33BA38 E00268B8 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 33BA3C E00268BC ACC20018 */  sw        $v0, 0x18($a2)
/* 33BA40 E00268C0 ACDE001C */  sw        $fp, 0x1C($a2)
/* 33BA44 E00268C4 30830FFF */  andi      $v1, $a0, 0xFFF
/* 33BA48 E00268C8 00031B00 */  sll       $v1, $v1, 12
/* 33BA4C E00268CC 30E20FFF */  andi      $v0, $a3, 0xFFF
/* 33BA50 E00268D0 004D1025 */  or        $v0, $v0, $t5
/* 33BA54 E00268D4 00621825 */  or        $v1, $v1, $v0
/* 33BA58 E00268D8 24840100 */  addiu     $a0, $a0, 0x100
/* 33BA5C E00268DC 30840FFF */  andi      $a0, $a0, 0xFFF
/* 33BA60 E00268E0 00042300 */  sll       $a0, $a0, 12
/* 33BA64 E00268E4 24E70100 */  addiu     $a3, $a3, 0x100
/* 33BA68 E00268E8 30E70FFF */  andi      $a3, $a3, 0xFFF
/* 33BA6C E00268EC 00872025 */  or        $a0, $a0, $a3
/* 33BA70 E00268F0 ACC30008 */  sw        $v1, 0x8($a2)
/* 33BA74 E00268F4 30A30FFF */  andi      $v1, $a1, 0xFFF
/* 33BA78 E00268F8 00031B00 */  sll       $v1, $v1, 12
/* 33BA7C E00268FC 31020FFF */  andi      $v0, $t0, 0xFFF
/* 33BA80 E0026900 004D1025 */  or        $v0, $v0, $t5
/* 33BA84 E0026904 00621825 */  or        $v1, $v1, $v0
/* 33BA88 E0026908 24A50100 */  addiu     $a1, $a1, 0x100
/* 33BA8C E002690C 30A50FFF */  andi      $a1, $a1, 0xFFF
/* 33BA90 E0026910 00052B00 */  sll       $a1, $a1, 12
/* 33BA94 E0026914 25080100 */  addiu     $t0, $t0, 0x100
/* 33BA98 E0026918 31080FFF */  andi      $t0, $t0, 0xFFF
/* 33BA9C E002691C 3C020100 */  lui       $v0, (0x1000000 >> 16)
/* 33BAA0 E0026920 01024025 */  or        $t0, $t0, $v0
/* 33BAA4 E0026924 00A82825 */  or        $a1, $a1, $t0
/* 33BAA8 E0026928 ACC4000C */  sw        $a0, 0xC($a2)
/* 33BAAC E002692C ACC30010 */  sw        $v1, 0x10($a2)
/* 33BAB0 E0026930 ACC50014 */  sw        $a1, 0x14($a2)
/* 33BAB4 E0026934 8EE20008 */  lw        $v0, 0x8($s7)
/* 33BAB8 E0026938 0182102A */  slt       $v0, $t4, $v0
/* 33BABC E002693C 1440FFB7 */  bnez      $v0, .LE002681C
/* 33BAC0 E0026940 254A0060 */   addiu    $t2, $t2, 0x60
.LE0026944:
/* 33BAC4 E0026944 3C02D838 */  lui       $v0, (0xD8380002 >> 16)
/* 33BAC8 E0026948 34420002 */  ori       $v0, $v0, (0xD8380002 & 0xFFFF)
/* 33BACC E002694C 3C05800A */  lui       $a1, %hi(gMainGfxPos)
/* 33BAD0 E0026950 24A5A66C */  addiu     $a1, $a1, %lo(gMainGfxPos)
/* 33BAD4 E0026954 8CA40000 */  lw        $a0, 0x0($a1)
/* 33BAD8 E0026958 3C06DA38 */  lui       $a2, (0xDA380007 >> 16)
/* 33BADC E002695C 0080182D */  daddu     $v1, $a0, $zero
/* 33BAE0 E0026960 24840008 */  addiu     $a0, $a0, 0x8
/* 33BAE4 E0026964 ACA40000 */  sw        $a0, 0x0($a1)
/* 33BAE8 E0026968 AC620000 */  sw        $v0, 0x0($v1)
/* 33BAEC E002696C 24020040 */  addiu     $v0, $zero, 0x40
/* 33BAF0 E0026970 AC620004 */  sw        $v0, 0x4($v1)
/* 33BAF4 E0026974 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 33BAF8 E0026978 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 33BAFC E002697C 24820008 */  addiu     $v0, $a0, 0x8
/* 33BB00 E0026980 ACA20000 */  sw        $v0, 0x0($a1)
/* 33BB04 E0026984 3C02800A */  lui       $v0, %hi(gDisplayContext)
/* 33BB08 E0026988 8C42A674 */  lw        $v0, %lo(gDisplayContext)($v0)
/* 33BB0C E002698C 34C60007 */  ori       $a2, $a2, (0xDA380007 & 0xFFFF)
/* 33BB10 E0026990 AC860000 */  sw        $a2, 0x0($a0)
/* 33BB14 E0026994 00031980 */  sll       $v1, $v1, 6
/* 33BB18 E0026998 24630030 */  addiu     $v1, $v1, 0x30
/* 33BB1C E002699C 00431021 */  addu      $v0, $v0, $v1
/* 33BB20 E00269A0 AC820004 */  sw        $v0, 0x4($a0)
/* 33BB24 E00269A4 24820010 */  addiu     $v0, $a0, 0x10
/* 33BB28 E00269A8 ACA20000 */  sw        $v0, 0x0($a1)
/* 33BB2C E00269AC 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 33BB30 E00269B0 AC820008 */  sw        $v0, 0x8($a0)
/* 33BB34 E00269B4 AC80000C */  sw        $zero, 0xC($a0)
/* 33BB38 E00269B8 8FBF010C */  lw        $ra, 0x10C($sp)
/* 33BB3C E00269BC 8FBE0108 */  lw        $fp, 0x108($sp)
/* 33BB40 E00269C0 8FB70104 */  lw        $s7, 0x104($sp)
/* 33BB44 E00269C4 8FB60100 */  lw        $s6, 0x100($sp)
/* 33BB48 E00269C8 8FB500FC */  lw        $s5, 0xFC($sp)
/* 33BB4C E00269CC 8FB400F8 */  lw        $s4, 0xF8($sp)
/* 33BB50 E00269D0 8FB300F4 */  lw        $s3, 0xF4($sp)
/* 33BB54 E00269D4 8FB200F0 */  lw        $s2, 0xF0($sp)
/* 33BB58 E00269D8 8FB100EC */  lw        $s1, 0xEC($sp)
/* 33BB5C E00269DC 8FB000E8 */  lw        $s0, 0xE8($sp)
/* 33BB60 E00269E0 D7B40110 */  ldc1      $f20, 0x110($sp)
/* 33BB64 E00269E4 03E00008 */  jr        $ra
/* 33BB68 E00269E8 27BD0118 */   addiu    $sp, $sp, 0x118
/* 33BB6C E00269EC 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void gather_energy_pink_appendGfx(void* effect) {
    GatherEnergyPinkFXData* part = ((EffectInstance*)effect)->data.gatherEnergyPink;
    s32 unk_00 = part->unk_00;
    Gfx* dlist = D_E00269F8[unk_00];
    Gfx* dlist2 = D_E00269F0[unk_00];
    Camera* camera = &gCameras[gCurrentCameraID];
    Matrix4f sp20;
    Matrix4f sp60;
    Matrix4f unused;
    u16 perspNorm;
    s32 alpha;
    s32 idx;
    s32 i;

    gDPPipeSync(gMainGfxPos++);
    gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
    gSPDisplayList(gMainGfxPos++, dlist);

    shim_guTranslateF(sp20, part->posB.x, part->posB.y, part->posB.z);
    shim_guScaleF(sp60, part->unk_1C, part->unk_1C, 1.0f);
    shim_guMtxCatF(sp60, sp20, sp20);
    shim_guPerspectiveF(sp60, &perspNorm, unk_00 == 1 ? 130.0f : 30.0f, (f32) camera->viewportW / camera->viewportH, 4.0f, 16384.0f, 1.0f);
    shim_guMtxCatF(sp60, sp20, sp20);
    shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);

    switch (unk_00) {
        case 1:
            shim_guTranslateF(sp20, 0.0f, 0.0f, -70.0f);
            break;
        case 0:
            shim_guTranslateF(sp20, 0.0f, 0.0f, -80.0f);
            break;
    }

    shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

    idx = part->unk_2C * 3;
    alpha = part->unk_24;

    for (i = 0; i < ((EffectInstance*)effect)->numParts; i++, part++) {
        s32 tempX;
        s32 tempY;
        s32 tempX2;
        s32 tempY2;

        idx += 30;
        idx %= 24;

        gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, alpha / 2);
        gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E0026A00[idx], 0, D_E0026A00[idx + 2], alpha);

        tempX = part->unk_30;
        tempY = part->unk_40;
        tempX2 = part->unk_38;
        tempY2 = part->unk_48;

        gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, tempX, tempY, tempX + 256, tempY + 256);
        gDPSetTileSize(gMainGfxPos++, 1, tempX2, tempY2, tempX2 + 256, tempY2 + 256);
        gSPDisplayList(gMainGfxPos++, dlist2);
    }

    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
    gDPPipeSync(gMainGfxPos++);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel test_item_player_collision
/* CA20C 80133B0C 27BDFF90 */  addiu     $sp, $sp, -0x70
/* CA210 80133B10 AFB30034 */  sw        $s3, 0x34($sp)
/* CA214 80133B14 0080982D */  daddu     $s3, $a0, $zero
/* CA218 80133B18 AFB1002C */  sw        $s1, 0x2C($sp)
/* CA21C 80133B1C 3C118011 */  lui       $s1, %hi(gPlayerStatus)
/* CA220 80133B20 2631EFC8 */  addiu     $s1, $s1, %lo(gPlayerStatus)
/* CA224 80133B24 AFB40038 */  sw        $s4, 0x38($sp)
/* CA228 80133B28 3C148011 */  lui       $s4, %hi(gPartnerStatus)
/* CA22C 80133B2C 2694EBB0 */  addiu     $s4, $s4, %lo(gPartnerStatus)
/* CA230 80133B30 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* CA234 80133B34 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* CA238 80133B38 3C04800B */  lui       $a0, %hi(gCameras)
/* CA23C 80133B3C 24841D80 */  addiu     $a0, $a0, %lo(gCameras)
/* CA240 80133B40 AFBF003C */  sw        $ra, 0x3C($sp)
/* CA244 80133B44 AFB20030 */  sw        $s2, 0x30($sp)
/* CA248 80133B48 AFB00028 */  sw        $s0, 0x28($sp)
/* CA24C 80133B4C F7BE0068 */  sdc1      $f30, 0x68($sp)
/* CA250 80133B50 F7BC0060 */  sdc1      $f28, 0x60($sp)
/* CA254 80133B54 F7BA0058 */  sdc1      $f26, 0x58($sp)
/* CA258 80133B58 F7B80050 */  sdc1      $f24, 0x50($sp)
/* CA25C 80133B5C F7B60048 */  sdc1      $f22, 0x48($sp)
/* CA260 80133B60 F7B40040 */  sdc1      $f20, 0x40($sp)
/* CA264 80133B64 823200B4 */  lb        $s2, 0xB4($s1)
/* CA268 80133B68 00031080 */  sll       $v0, $v1, 2
/* CA26C 80133B6C 00431021 */  addu      $v0, $v0, $v1
/* CA270 80133B70 00021080 */  sll       $v0, $v0, 2
/* CA274 80133B74 00431023 */  subu      $v0, $v0, $v1
/* CA278 80133B78 000218C0 */  sll       $v1, $v0, 3
/* CA27C 80133B7C 00431021 */  addu      $v0, $v0, $v1
/* CA280 80133B80 000210C0 */  sll       $v0, $v0, 3
/* CA284 80133B84 8E630000 */  lw        $v1, 0x0($s3)
/* CA288 80133B88 00448021 */  addu      $s0, $v0, $a0
/* CA28C 80133B8C 30620100 */  andi      $v0, $v1, 0x100
/* CA290 80133B90 10400003 */  beqz      $v0, .L80133BA0
/* CA294 80133B94 2402FEFF */   addiu    $v0, $zero, -0x101
/* CA298 80133B98 0804CFDA */  j         .L80133F68
/* CA29C 80133B9C 00621024 */   and      $v0, $v1, $v0
.L80133BA0:
/* CA2A0 80133BA0 3C03800A */  lui       $v1, %hi(gEncounterState)
/* CA2A4 80133BA4 8C63A600 */  lw        $v1, %lo(gEncounterState)($v1)
/* CA2A8 80133BA8 24020002 */  addiu     $v0, $zero, 0x2
/* CA2AC 80133BAC 10620003 */  beq       $v1, $v0, .L80133BBC
/* CA2B0 80133BB0 00000000 */   nop
/* CA2B4 80133BB4 146000F6 */  bnez      $v1, .L80133F90
/* CA2B8 80133BB8 0000102D */   daddu    $v0, $zero, $zero
.L80133BBC:
/* CA2BC 80133BBC 3C02800B */  lui       $v0, %hi(gCurrentEncounter)
/* CA2C0 80133BC0 24420F10 */  addiu     $v0, $v0, %lo(gCurrentEncounter)
/* CA2C4 80133BC4 80430005 */  lb        $v1, 0x5($v0)
/* CA2C8 80133BC8 24020005 */  addiu     $v0, $zero, 0x5
/* CA2CC 80133BCC 106200EF */  beq       $v1, $v0, .L80133F8C
/* CA2D0 80133BD0 3C020020 */   lui      $v0, (0x200000 >> 16)
/* CA2D4 80133BD4 8E630000 */  lw        $v1, 0x0($s3)
/* CA2D8 80133BD8 00621024 */  and       $v0, $v1, $v0
/* CA2DC 80133BDC 144000EC */  bnez      $v0, .L80133F90
/* CA2E0 80133BE0 0000102D */   daddu    $v0, $zero, $zero
/* CA2E4 80133BE4 3C028015 */  lui       $v0, %hi(isPickingUpItem)
/* CA2E8 80133BE8 844265A4 */  lh        $v0, %lo(isPickingUpItem)($v0)
/* CA2EC 80133BEC 144000E8 */  bnez      $v0, .L80133F90
/* CA2F0 80133BF0 0000102D */   daddu    $v0, $zero, $zero
/* CA2F4 80133BF4 30620040 */  andi      $v0, $v1, 0x40
/* CA2F8 80133BF8 144000E5 */  bnez      $v0, .L80133F90
/* CA2FC 80133BFC 0000102D */   daddu    $v0, $zero, $zero
/* CA300 80133C00 0C009C64 */  jal       get_time_freeze_mode
/* CA304 80133C04 00000000 */   nop
/* CA308 80133C08 144000E1 */  bnez      $v0, .L80133F90
/* CA30C 80133C0C 0000102D */   daddu    $v0, $zero, $zero
/* CA310 80133C10 82820000 */  lb        $v0, 0x0($s4)
/* CA314 80133C14 10400004 */  beqz      $v0, .L80133C28
/* CA318 80133C18 24020009 */   addiu    $v0, $zero, 0x9
/* CA31C 80133C1C 82830003 */  lb        $v1, 0x3($s4)
/* CA320 80133C20 106200DB */  beq       $v1, $v0, .L80133F90
/* CA324 80133C24 0000102D */   daddu    $v0, $zero, $zero
.L80133C28:
/* CA328 80133C28 2642FFE3 */  addiu     $v0, $s2, -0x1D
/* CA32C 80133C2C 2C420003 */  sltiu     $v0, $v0, 0x3
/* CA330 80133C30 10400004 */  beqz      $v0, .L80133C44
/* CA334 80133C34 24020157 */   addiu    $v0, $zero, 0x157
/* CA338 80133C38 86630018 */  lh        $v1, 0x18($s3)
/* CA33C 80133C3C 146200D4 */  bne       $v1, $v0, .L80133F90
/* CA340 80133C40 0000102D */   daddu    $v0, $zero, $zero
.L80133C44:
/* CA344 80133C44 3C02800A */  lui       $v0, %hi(gOverrideFlags)
/* CA348 80133C48 8C42A650 */  lw        $v0, %lo(gOverrideFlags)($v0)
/* CA34C 80133C4C 3C030020 */  lui       $v1, (0x200000 >> 16)
/* CA350 80133C50 00431024 */  and       $v0, $v0, $v1
/* CA354 80133C54 144000CE */  bnez      $v0, .L80133F90
/* CA358 80133C58 0000102D */   daddu    $v0, $zero, $zero
/* CA35C 80133C5C 962300B0 */  lhu       $v1, 0xB0($s1)
/* CA360 80133C60 862400B2 */  lh        $a0, 0xB2($s1)
/* CA364 80133C64 00031C00 */  sll       $v1, $v1, 16
/* CA368 80133C68 00031403 */  sra       $v0, $v1, 16
/* CA36C 80133C6C 00031FC2 */  srl       $v1, $v1, 31
/* CA370 80133C70 00431021 */  addu      $v0, $v0, $v1
/* CA374 80133C74 00021043 */  sra       $v0, $v0, 1
/* CA378 80133C78 44823000 */  mtc1      $v0, $f6
/* CA37C 80133C7C 00000000 */  nop
/* CA380 80133C80 468031A0 */  cvt.s.w   $f6, $f6
/* CA384 80133C84 E7A6001C */  swc1      $f6, 0x1C($sp)
/* CA388 80133C88 C63E0028 */  lwc1      $f30, 0x28($s1)
/* CA38C 80133C8C C63A002C */  lwc1      $f26, 0x2C($s1)
/* CA390 80133C90 C6280030 */  lwc1      $f8, 0x30($s1)
/* CA394 80133C94 0000902D */  daddu     $s2, $zero, $zero
/* CA398 80133C98 04810002 */  bgez      $a0, .L80133CA4
/* CA39C 80133C9C E7A80018 */   swc1     $f8, 0x18($sp)
/* CA3A0 80133CA0 24840003 */  addiu     $a0, $a0, 0x3
.L80133CA4:
/* CA3A4 80133CA4 00041083 */  sra       $v0, $a0, 2
/* CA3A8 80133CA8 C62E00A8 */  lwc1      $f14, 0xA8($s1)
/* CA3AC 80133CAC 3C014334 */  lui       $at, (0x43340000 >> 16)
/* CA3B0 80133CB0 44810000 */  mtc1      $at, $f0
/* CA3B4 80133CB4 44823000 */  mtc1      $v0, $f6
/* CA3B8 80133CB8 00000000 */  nop
/* CA3BC 80133CBC 468031A0 */  cvt.s.w   $f6, $f6
/* CA3C0 80133CC0 4600703C */  c.lt.s    $f14, $f0
/* CA3C4 80133CC4 00000000 */  nop
/* CA3C8 80133CC8 45000006 */  bc1f      .L80133CE4
/* CA3CC 80133CCC E7A60020 */   swc1     $f6, 0x20($sp)
/* CA3D0 80133CD0 C600006C */  lwc1      $f0, 0x6C($s0)
/* CA3D4 80133CD4 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* CA3D8 80133CD8 44816000 */  mtc1      $at, $f12
/* CA3DC 80133CDC 0804CF3E */  j         .L80133CF8
/* CA3E0 80133CE0 460C0301 */   sub.s    $f12, $f0, $f12
.L80133CE4:
/* CA3E4 80133CE4 C600006C */  lwc1      $f0, 0x6C($s0)
/* CA3E8 80133CE8 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* CA3EC 80133CEC 44816000 */  mtc1      $at, $f12
/* CA3F0 80133CF0 00000000 */  nop
/* CA3F4 80133CF4 460C0300 */  add.s     $f12, $f0, $f12
.L80133CF8:
/* CA3F8 80133CF8 0C00A6C9 */  jal       clamp_angle
/* CA3FC 80133CFC 00000000 */   nop
/* CA400 80133D00 46000386 */  mov.s     $f14, $f0
/* CA404 80133D04 C60C006C */  lwc1      $f12, 0x6C($s0)
/* CA408 80133D08 C7A80018 */  lwc1      $f8, 0x18($sp)
/* CA40C 80133D0C E7BE0010 */  swc1      $f30, 0x10($sp)
/* CA410 80133D10 0C00A70A */  jal       get_clamped_angle_diff
/* CA414 80133D14 E7A80014 */   swc1     $f8, 0x14($sp)
/* CA418 80133D18 44801000 */  mtc1      $zero, $f2
/* CA41C 80133D1C 00000000 */  nop
/* CA420 80133D20 4602003C */  c.lt.s    $f0, $f2
/* CA424 80133D24 00000000 */  nop
/* CA428 80133D28 4500000F */  bc1f      .L80133D68
/* CA42C 80133D2C E7BA0024 */   swc1     $f26, 0x24($sp)
/* CA430 80133D30 C600006C */  lwc1      $f0, 0x6C($s0)
/* CA434 80133D34 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* CA438 80133D38 44816000 */  mtc1      $at, $f12
/* CA43C 80133D3C 0C00A6C9 */  jal       clamp_angle
/* CA440 80133D40 460C0301 */   sub.s    $f12, $f0, $f12
/* CA444 80133D44 8E2200A4 */  lw        $v0, 0xA4($s1)
/* CA448 80133D48 3C030100 */  lui       $v1, (0x1000000 >> 16)
/* CA44C 80133D4C 00431024 */  and       $v0, $v0, $v1
/* CA450 80133D50 10400016 */  beqz      $v0, .L80133DAC
/* CA454 80133D54 27A40010 */   addiu    $a0, $sp, 0x10
/* CA458 80133D58 3C0141F0 */  lui       $at, (0x41F00000 >> 16)
/* CA45C 80133D5C 44816000 */  mtc1      $at, $f12
/* CA460 80133D60 0804CF68 */  j         .L80133DA0
/* CA464 80133D64 460C0300 */   add.s    $f12, $f0, $f12
.L80133D68:
/* CA468 80133D68 C600006C */  lwc1      $f0, 0x6C($s0)
/* CA46C 80133D6C 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* CA470 80133D70 44816000 */  mtc1      $at, $f12
/* CA474 80133D74 0C00A6C9 */  jal       clamp_angle
/* CA478 80133D78 460C0300 */   add.s    $f12, $f0, $f12
/* CA47C 80133D7C 8E2200A4 */  lw        $v0, 0xA4($s1)
/* CA480 80133D80 3C030100 */  lui       $v1, (0x1000000 >> 16)
/* CA484 80133D84 00431024 */  and       $v0, $v0, $v1
/* CA488 80133D88 10400008 */  beqz      $v0, .L80133DAC
/* CA48C 80133D8C 27A40010 */   addiu    $a0, $sp, 0x10
/* CA490 80133D90 3C0141F0 */  lui       $at, (0x41F00000 >> 16)
/* CA494 80133D94 44816000 */  mtc1      $at, $f12
/* CA498 80133D98 00000000 */  nop
/* CA49C 80133D9C 460C0301 */  sub.s     $f12, $f0, $f12
.L80133DA0:
/* CA4A0 80133DA0 0C00A6C9 */  jal       clamp_angle
/* CA4A4 80133DA4 00000000 */   nop
/* CA4A8 80133DA8 27A40010 */  addiu     $a0, $sp, 0x10
.L80133DAC:
/* CA4AC 80133DAC 3C0641C0 */  lui       $a2, (0x41C00000 >> 16)
/* CA4B0 80133DB0 44070000 */  mfc1      $a3, $f0
/* CA4B4 80133DB4 0C00A7E7 */  jal       add_vec2D_polar
/* CA4B8 80133DB8 27A50014 */   addiu    $a1, $sp, 0x14
/* CA4BC 80133DBC C6760008 */  lwc1      $f22, 0x8($s3)
/* CA4C0 80133DC0 C674000C */  lwc1      $f20, 0xC($s3)
/* CA4C4 80133DC4 C6780010 */  lwc1      $f24, 0x10($s3)
/* CA4C8 80133DC8 3C014158 */  lui       $at, (0x41580000 >> 16)
/* CA4CC 80133DCC 4481E000 */  mtc1      $at, $f28
/* CA4D0 80133DD0 461EB081 */  sub.s     $f2, $f22, $f30
/* CA4D4 80133DD4 46021082 */  mul.s     $f2, $f2, $f2
/* CA4D8 80133DD8 00000000 */  nop
/* CA4DC 80133DDC C7A60018 */  lwc1      $f6, 0x18($sp)
/* CA4E0 80133DE0 4606C001 */  sub.s     $f0, $f24, $f6
/* CA4E4 80133DE4 46000002 */  mul.s     $f0, $f0, $f0
/* CA4E8 80133DE8 00000000 */  nop
/* CA4EC 80133DEC 46001300 */  add.s     $f12, $f2, $f0
/* CA4F0 80133DF0 46006104 */  sqrt.s    $f4, $f12
/* CA4F4 80133DF4 46042032 */  c.eq.s    $f4, $f4
/* CA4F8 80133DF8 00000000 */  nop
/* CA4FC 80133DFC 45010004 */  bc1t      .L80133E10
/* CA500 80133E00 00000000 */   nop
/* CA504 80133E04 0C0187BC */  jal       sqrtf
/* CA508 80133E08 00000000 */   nop
/* CA50C 80133E0C 46000106 */  mov.s     $f4, $f0
.L80133E10:
/* CA510 80133E10 C7A80020 */  lwc1      $f8, 0x20($sp)
/* CA514 80133E14 461C4000 */  add.s     $f0, $f8, $f28
/* CA518 80133E18 4604003E */  c.le.s    $f0, $f4
/* CA51C 80133E1C 00000000 */  nop
/* CA520 80133E20 4501000F */  bc1t      .L80133E60
/* CA524 80133E24 00000000 */   nop
/* CA528 80133E28 3C0141D8 */  lui       $at, (0x41D80000 >> 16)
/* CA52C 80133E2C 44813000 */  mtc1      $at, $f6
/* CA530 80133E30 00000000 */  nop
/* CA534 80133E34 4606A000 */  add.s     $f0, $f20, $f6
/* CA538 80133E38 461A003C */  c.lt.s    $f0, $f26
/* CA53C 80133E3C 00000000 */  nop
/* CA540 80133E40 45010007 */  bc1t      .L80133E60
/* CA544 80133E44 00000000 */   nop
/* CA548 80133E48 C7A8001C */  lwc1      $f8, 0x1C($sp)
/* CA54C 80133E4C 4608D000 */  add.s     $f0, $f26, $f8
/* CA550 80133E50 4614003C */  c.lt.s    $f0, $f20
/* CA554 80133E54 00000000 */  nop
/* CA558 80133E58 45020001 */  bc1fl     .L80133E60
/* CA55C 80133E5C 24120001 */   addiu    $s2, $zero, 0x1
.L80133E60:
/* CA560 80133E60 822300B4 */  lb        $v1, 0xB4($s1)
/* CA564 80133E64 24020012 */  addiu     $v0, $zero, 0x12
/* CA568 80133E68 1462002F */  bne       $v1, $v0, .L80133F28
/* CA56C 80133E6C 3C030100 */   lui      $v1, (0x1000000 >> 16)
/* CA570 80133E70 8E220000 */  lw        $v0, 0x0($s1)
/* CA574 80133E74 00431024 */  and       $v0, $v0, $v1
/* CA578 80133E78 1040002B */  beqz      $v0, .L80133F28
/* CA57C 80133E7C 00000000 */   nop
/* CA580 80133E80 C7A00010 */  lwc1      $f0, 0x10($sp)
/* CA584 80133E84 4600B081 */  sub.s     $f2, $f22, $f0
/* CA588 80133E88 46021082 */  mul.s     $f2, $f2, $f2
/* CA58C 80133E8C 00000000 */  nop
/* CA590 80133E90 C7A00014 */  lwc1      $f0, 0x14($sp)
/* CA594 80133E94 4600C001 */  sub.s     $f0, $f24, $f0
/* CA598 80133E98 46000002 */  mul.s     $f0, $f0, $f0
/* CA59C 80133E9C 00000000 */  nop
/* CA5A0 80133EA0 46001300 */  add.s     $f12, $f2, $f0
/* CA5A4 80133EA4 46006104 */  sqrt.s    $f4, $f12
/* CA5A8 80133EA8 46042032 */  c.eq.s    $f4, $f4
/* CA5AC 80133EAC 00000000 */  nop
/* CA5B0 80133EB0 45010004 */  bc1t      .L80133EC4
/* CA5B4 80133EB4 00000000 */   nop
/* CA5B8 80133EB8 0C0187BC */  jal       sqrtf
/* CA5BC 80133EBC 00000000 */   nop
/* CA5C0 80133EC0 46000106 */  mov.s     $f4, $f0
.L80133EC4:
/* CA5C4 80133EC4 3C014160 */  lui       $at, (0x41600000 >> 16)
/* CA5C8 80133EC8 44813000 */  mtc1      $at, $f6
/* CA5CC 80133ECC 00000000 */  nop
/* CA5D0 80133ED0 461C3000 */  add.s     $f0, $f6, $f28
/* CA5D4 80133ED4 4604003E */  c.le.s    $f0, $f4
/* CA5D8 80133ED8 00000000 */  nop
/* CA5DC 80133EDC 45010012 */  bc1t      .L80133F28
/* CA5E0 80133EE0 00000000 */   nop
/* CA5E4 80133EE4 3C0141D8 */  lui       $at, (0x41D80000 >> 16)
/* CA5E8 80133EE8 44814000 */  mtc1      $at, $f8
/* CA5EC 80133EEC 00000000 */  nop
/* CA5F0 80133EF0 4608A000 */  add.s     $f0, $f20, $f8
/* CA5F4 80133EF4 C7A60024 */  lwc1      $f6, 0x24($sp)
/* CA5F8 80133EF8 4606003C */  c.lt.s    $f0, $f6
/* CA5FC 80133EFC 00000000 */  nop
/* CA600 80133F00 45010009 */  bc1t      .L80133F28
/* CA604 80133F04 00000000 */   nop
/* CA608 80133F08 3C014190 */  lui       $at, (0x41900000 >> 16)
/* CA60C 80133F0C 44814000 */  mtc1      $at, $f8
/* CA610 80133F10 00000000 */  nop
/* CA614 80133F14 46083000 */  add.s     $f0, $f6, $f8
/* CA618 80133F18 4614003C */  c.lt.s    $f0, $f20
/* CA61C 80133F1C 00000000 */  nop
/* CA620 80133F20 45020001 */  bc1fl     .L80133F28
/* CA624 80133F24 24120001 */   addiu    $s2, $zero, 0x1
.L80133F28:
/* CA628 80133F28 12400012 */  beqz      $s2, .L80133F74
/* CA62C 80133F2C 00000000 */   nop
/* CA630 80133F30 8E640000 */  lw        $a0, 0x0($s3)
/* CA634 80133F34 30820080 */  andi      $v0, $a0, 0x80
/* CA638 80133F38 10400015 */  beqz      $v0, .L80133F90
/* CA63C 80133F3C 24020001 */   addiu    $v0, $zero, 0x1
/* CA640 80133F40 3C058015 */  lui       $a1, %hi(D_801565A6)
/* CA644 80133F44 24A565A6 */  addiu     $a1, $a1, %lo(D_801565A6)
/* CA648 80133F48 84A20000 */  lh        $v0, 0x0($a1)
/* CA64C 80133F4C 94A30000 */  lhu       $v1, 0x0($a1)
/* CA650 80133F50 10400004 */  beqz      $v0, .L80133F64
/* CA654 80133F54 2402FF7F */   addiu    $v0, $zero, -0x81
/* CA658 80133F58 2462FFFF */  addiu     $v0, $v1, -0x1
/* CA65C 80133F5C 0804CFE3 */  j         .L80133F8C
/* CA660 80133F60 A4A20000 */   sh       $v0, 0x0($a1)
.L80133F64:
/* CA664 80133F64 00821024 */  and       $v0, $a0, $v0
.L80133F68:
/* CA668 80133F68 AE620000 */  sw        $v0, 0x0($s3)
/* CA66C 80133F6C 0804CFE4 */  j         .L80133F90
/* CA670 80133F70 24020001 */   addiu    $v0, $zero, 0x1
.L80133F74:
/* CA674 80133F74 8E630000 */  lw        $v1, 0x0($s3)
/* CA678 80133F78 30620080 */  andi      $v0, $v1, 0x80
/* CA67C 80133F7C 10400003 */  beqz      $v0, .L80133F8C
/* CA680 80133F80 2402FF7F */   addiu    $v0, $zero, -0x81
/* CA684 80133F84 00621024 */  and       $v0, $v1, $v0
/* CA688 80133F88 AE620000 */  sw        $v0, 0x0($s3)
.L80133F8C:
/* CA68C 80133F8C 0000102D */  daddu     $v0, $zero, $zero
.L80133F90:
/* CA690 80133F90 8FBF003C */  lw        $ra, 0x3C($sp)
/* CA694 80133F94 8FB40038 */  lw        $s4, 0x38($sp)
/* CA698 80133F98 8FB30034 */  lw        $s3, 0x34($sp)
/* CA69C 80133F9C 8FB20030 */  lw        $s2, 0x30($sp)
/* CA6A0 80133FA0 8FB1002C */  lw        $s1, 0x2C($sp)
/* CA6A4 80133FA4 8FB00028 */  lw        $s0, 0x28($sp)
/* CA6A8 80133FA8 D7BE0068 */  ldc1      $f30, 0x68($sp)
/* CA6AC 80133FAC D7BC0060 */  ldc1      $f28, 0x60($sp)
/* CA6B0 80133FB0 D7BA0058 */  ldc1      $f26, 0x58($sp)
/* CA6B4 80133FB4 D7B80050 */  ldc1      $f24, 0x50($sp)
/* CA6B8 80133FB8 D7B60048 */  ldc1      $f22, 0x48($sp)
/* CA6BC 80133FBC D7B40040 */  ldc1      $f20, 0x40($sp)
/* CA6C0 80133FC0 03E00008 */  jr        $ra
/* CA6C4 80133FC4 27BD0070 */   addiu    $sp, $sp, 0x70

### DECOMPILED C INSTRUCTIONS:

b32 test_item_player_collision(ItemEntity* item) {
    PlayerStatus* playerStatus = &gPlayerStatus;
    PartnerStatus* partnerStatus = &gPartnerStatus;
    EncounterStatus* encounterStatus = &gCurrentEncounter;
    Camera* camera = &gCameras[gCurrentCameraID];
    s32 actionState = playerStatus->actionState;
    f32 distThreshold;
    f32 itemX, itemY, itemZ;
    f32 tmpX, tmpZ;
    f32 playerX, playerY, playerZ;
    f32 colliderHeightHalf;
    f32 colliderDiameterQuart;
    f32 spriteFacingAngle;
    f32 playerY2;
    f32 xDiff, zDiff;
    f32 dist;
    f32 angle;
    b32 cond;
    // below weird temps required to match
    f32 fourteen;
    f32 yTopThreshold;
    f32 yBottomThreshold;
    f32 tmpFourteen;
    f32 tmpYTopThreshold;

    if (item->flags & ITEM_ENTITY_FLAG_AUTO_COLLECT) {
        item->flags &= ~ITEM_ENTITY_FLAG_AUTO_COLLECT;
        return TRUE;
    }

    if (gEncounterState != ENCOUNTER_STATE_NEUTRAL && gEncounterState != ENCOUNTER_STATE_NONE) {
        return FALSE;
    }

    if (encounterStatus->hitType == ENCOUNTER_TRIGGER_CONVERSATION) {
        return FALSE;
    }

    if (item->flags & ITEM_ENTITY_FLAG_CANT_COLLECT) {
        return FALSE;
    }

    tmpFourteen = 14.0f;
    if (isPickingUpItem) {
        return FALSE;
    }

    fourteen = tmpFourteen;
    tmpYTopThreshold = 18.0f;
    yBottomThreshold = 27.0f;

    cond = item->flags; // required to match
    if (item->flags & ITEM_ENTITY_FLAG_HIDDEN) {
        return FALSE;
    }

    yTopThreshold = tmpYTopThreshold;
    if (get_time_freeze_mode() != TIME_FREEZE_NORMAL) {
        return FALSE;
    }

    if (partnerStatus->partnerActionState != PARTNER_ACTION_NONE && partnerStatus->actingPartner == PARTNER_BOW) {
        return FALSE;
    }

    if (
        (actionState == ACTION_STATE_USE_SPINNING_FLOWER
         || actionState == ACTION_STATE_USE_MUNCHLESIA
         || actionState == ACTION_STATE_USE_TWEESTER)
        && item->itemID != ITEM_COIN)
    {
        return FALSE;
    }

    if (gOverrideFlags & GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS) {
        return FALSE;
    }

    cond = FALSE;
    colliderHeightHalf = playerStatus->colliderHeight / 2;
    playerX = playerStatus->position.x;
    playerY = playerStatus->position.y;
    playerZ = playerStatus->position.z;

    colliderDiameterQuart = playerStatus->colliderDiameter / 4;
    spriteFacingAngle = playerStatus->spriteFacingAngle;
    if (spriteFacingAngle < 180.0f) {
        spriteFacingAngle = clamp_angle(camera->currentYaw - 90.0f);
    } else {
        spriteFacingAngle = clamp_angle(camera->currentYaw + 90.0f);
    }

    tmpX = playerX;
    playerY2 = playerY;
    tmpZ = playerZ;
    if (get_clamped_angle_diff(camera->currentYaw, spriteFacingAngle) < 0.0f) {
        angle = clamp_angle(camera->currentYaw - 90.0f);
        if (playerStatus->trueAnimation & 0x01000000) {
            angle = clamp_angle(angle + 30.0f);
        }
    } else {
        angle = clamp_angle(camera->currentYaw + 90.0f);
        if (playerStatus->trueAnimation & 0x01000000) {
            angle = clamp_angle(angle - 30.0f);
        }
    }

    add_vec2D_polar(&tmpX, &tmpZ, 24.0f, angle);

    itemX = item->position.x;
    itemY = item->position.y;
    itemZ = item->position.z;

    do {
        do {
            distThreshold = 13.5f;
        } while (0); // required to match

        xDiff = itemX - playerX;
        zDiff = itemZ - playerZ;

        dist = sqrtf(SQ(xDiff) + SQ(zDiff));
        if (!(colliderDiameterQuart + distThreshold <= dist) &&
            !(itemY + yBottomThreshold < playerY) &&
            !(playerY + colliderHeightHalf < itemY))
        {
            cond = TRUE;
        }
    } while (0); // required to match

    if (playerStatus->actionState == ACTION_STATE_HAMMER && (playerStatus->flags & PS_FLAG_HAMMER_CHECK)) {
        xDiff = itemX - tmpX;
        zDiff = itemZ - tmpZ;
        dist = sqrtf(SQ(xDiff) + SQ(zDiff));
        if (!(fourteen + distThreshold <= dist)
            && !(itemY + yBottomThreshold < playerY2)
            && !(playerY2 + yTopThreshold < itemY))
        {
            cond = TRUE;
        }
    }

    if (cond) {
        if (item->flags & ITEM_ENTITY_FLAG_80) {
            if (D_801565A6 != 0) {
                D_801565A6--;
                return FALSE;
            } else {
                item->flags &= ~ITEM_ENTITY_FLAG_80;
            }
        }
        return TRUE;
    }

    if (item->flags & ITEM_ENTITY_FLAG_80) {
        item->flags &= ~ITEM_ENTITY_FLAG_80;
    }
    return FALSE;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel stars_shimmer_update
/* 355384 E0044424 27BDFFA8 */  addiu     $sp, $sp, -0x58
/* 355388 E0044428 AFB40020 */  sw        $s4, 0x20($sp)
/* 35538C E004442C 0080A02D */  daddu     $s4, $a0, $zero
/* 355390 E0044430 AFBF0034 */  sw        $ra, 0x34($sp)
/* 355394 E0044434 AFBE0030 */  sw        $fp, 0x30($sp)
/* 355398 E0044438 AFB7002C */  sw        $s7, 0x2C($sp)
/* 35539C E004443C AFB60028 */  sw        $s6, 0x28($sp)
/* 3553A0 E0044440 AFB50024 */  sw        $s5, 0x24($sp)
/* 3553A4 E0044444 AFB3001C */  sw        $s3, 0x1C($sp)
/* 3553A8 E0044448 AFB20018 */  sw        $s2, 0x18($sp)
/* 3553AC E004444C AFB10014 */  sw        $s1, 0x14($sp)
/* 3553B0 E0044450 AFB00010 */  sw        $s0, 0x10($sp)
/* 3553B4 E0044454 F7BA0050 */  sdc1      $f26, 0x50($sp)
/* 3553B8 E0044458 F7B80048 */  sdc1      $f24, 0x48($sp)
/* 3553BC E004445C F7B60040 */  sdc1      $f22, 0x40($sp)
/* 3553C0 E0044460 F7B40038 */  sdc1      $f20, 0x38($sp)
/* 3553C4 E0044464 8E84000C */  lw        $a0, 0xC($s4)
/* 3553C8 E0044468 0000A82D */  daddu     $s5, $zero, $zero
/* 3553CC E004446C 0080B02D */  daddu     $s6, $a0, $zero
/* 3553D0 E0044470 8C820020 */  lw        $v0, 0x20($a0)
/* 3553D4 E0044474 8C830024 */  lw        $v1, 0x24($a0)
/* 3553D8 E0044478 84930002 */  lh        $s3, 0x2($a0)
/* 3553DC E004447C 24420001 */  addiu     $v0, $v0, 0x1
/* 3553E0 E0044480 0040902D */  daddu     $s2, $v0, $zero
/* 3553E4 E0044484 2463FFFF */  addiu     $v1, $v1, -0x1
/* 3553E8 E0044488 2E620002 */  sltiu     $v0, $s3, 0x2
/* 3553EC E004448C AC830024 */  sw        $v1, 0x24($a0)
/* 3553F0 E0044490 14400006 */  bnez      $v0, .LE00444AC
/* 3553F4 E0044494 AC920020 */   sw       $s2, 0x20($a0)
/* 3553F8 E0044498 24020003 */  addiu     $v0, $zero, 0x3
/* 3553FC E004449C 12620003 */  beq       $s3, $v0, .LE00444AC
/* 355400 E00444A0 2A62000A */   slti     $v0, $s3, 0xA
/* 355404 E00444A4 54400004 */  bnel      $v0, $zero, .LE00444B8
/* 355408 E00444A8 2484002C */   addiu    $a0, $a0, 0x2C
.LE00444AC:
/* 35540C E00444AC 8C820024 */  lw        $v0, 0x24($a0)
/* 355410 E00444B0 044000FA */  bltz      $v0, .LE004489C
/* 355414 E00444B4 2484002C */   addiu    $a0, $a0, 0x2C
.LE00444B8:
/* 355418 E00444B8 8E820008 */  lw        $v0, 0x8($s4)
/* 35541C E00444BC 2442FFFF */  addiu     $v0, $v0, -0x1
/* 355420 E00444C0 184000EA */  blez      $v0, .LE004486C
/* 355424 E00444C4 0000882D */   daddu    $s1, $zero, $zero
/* 355428 E00444C8 3C03E004 */  lui       $v1, %hi(jtbl_E0044E78)
/* 35542C E00444CC 24634E78 */  addiu     $v1, $v1, %lo(jtbl_E0044E78)
/* 355430 E00444D0 00131080 */  sll       $v0, $s3, 2
/* 355434 E00444D4 0043F021 */  addu      $fp, $v0, $v1
/* 355438 E00444D8 3C17E004 */  lui       $s7, %hi(D_E0044E04)
/* 35543C E00444DC 26F74E04 */  addiu     $s7, $s7, %lo(D_E0044E04)
/* 355440 E00444E0 24900014 */  addiu     $s0, $a0, 0x14
/* 355444 E00444E4 3C01E004 */  lui       $at, (0xE0044E60 >> 16)
/* 355448 E00444E8 D4384E60 */  ldc1      $f24, (0xE0044E60 & 0xFFFF)($at)
/* 35544C E00444EC 3C01E004 */  lui       $at, (0xE0044E68 >> 16)
/* 355450 E00444F0 D43A4E68 */  ldc1      $f26, (0xE0044E68 & 0xFFFF)($at)
/* 355454 E00444F4 3C01E004 */  lui       $at, (0xE0044E70 >> 16)
/* 355458 E00444F8 D4364E70 */  ldc1      $f22, (0xE0044E70 & 0xFFFF)($at)
.LE00444FC:
/* 35545C E00444FC 2E62001F */  sltiu     $v0, $s3, 0x1F
/* 355460 E0044500 10400081 */  beqz      $v0, .LE0044708
/* 355464 E0044504 02511021 */   addu     $v0, $s2, $s1
/* 355468 E0044508 8FC20000 */  lw        $v0, 0x0($fp)
/* 35546C E004450C 00400008 */  jr        $v0
/* 355470 E0044510 00000000 */   nop
glabel .LE0044514
/* 355474 E0044514 02511021 */  addu      $v0, $s2, $s1
/* 355478 E0044518 30420007 */  andi      $v0, $v0, 0x7
/* 35547C E004451C 2643FFFF */  addiu     $v1, $s2, -0x1
/* 355480 E0044520 C6000004 */  lwc1      $f0, 0x4($s0)
/* 355484 E0044524 3C01E004 */  lui       $at, (0xE0044EF8 >> 16)
/* 355488 E0044528 D4224EF8 */  ldc1      $f2, (0xE0044EF8 & 0xFFFF)($at)
/* 35548C E004452C 46000021 */  cvt.d.s   $f0, $f0
/* 355490 E0044530 46220000 */  add.d     $f0, $f0, $f2
/* 355494 E0044534 AE020014 */  sw        $v0, 0x14($s0)
/* 355498 E0044538 2862000E */  slti      $v0, $v1, 0xE
/* 35549C E004453C 46200020 */  cvt.s.d   $f0, $f0
/* 3554A0 E0044540 10400017 */  beqz      $v0, .LE00445A0
/* 3554A4 E0044544 E6000004 */   swc1     $f0, 0x4($s0)
/* 3554A8 E0044548 3C02E004 */  lui       $v0, (0xE0044DF4 >> 16)
/* 3554AC E004454C 00431021 */  addu      $v0, $v0, $v1
/* 3554B0 E0044550 90424DF4 */  lbu       $v0, (0xE0044DF4 & 0xFFFF)($v0)
/* 3554B4 E0044554 44820000 */  mtc1      $v0, $f0
/* 3554B8 E0044558 00000000 */  nop
/* 3554BC E004455C 46800020 */  cvt.s.w   $f0, $f0
/* 3554C0 E0044560 46000021 */  cvt.d.s   $f0, $f0
/* 3554C4 E0044564 46380002 */  mul.d     $f0, $f0, $f24
/* 3554C8 E0044568 00000000 */  nop
/* 3554CC E004456C C604FFFC */  lwc1      $f4, -0x4($s0)
/* 3554D0 E0044570 46200020 */  cvt.s.d   $f0, $f0
/* 3554D4 E0044574 46002102 */  mul.s     $f4, $f4, $f0
/* 3554D8 E0044578 00000000 */  nop
/* 3554DC E004457C C6020000 */  lwc1      $f2, 0x0($s0)
/* 3554E0 E0044580 46001082 */  mul.s     $f2, $f2, $f0
/* 3554E4 E0044584 00000000 */  nop
/* 3554E8 E0044588 C6000004 */  lwc1      $f0, 0x4($s0)
/* 3554EC E004458C 46001080 */  add.s     $f2, $f2, $f0
/* 3554F0 E0044590 00771021 */  addu      $v0, $v1, $s7
/* 3554F4 E0044594 E604FFF0 */  swc1      $f4, -0x10($s0)
/* 3554F8 E0044598 080111B4 */  j         .LE00446D0
/* 3554FC E004459C E602FFF4 */   swc1     $f2, -0xC($s0)
.LE00445A0:
/* 355500 E00445A0 8E820008 */  lw        $v0, 0x8($s4)
/* 355504 E00445A4 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
/* 355508 E00445A8 44811000 */  mtc1      $at, $f2
/* 35550C E00445AC 2442FFFF */  addiu     $v0, $v0, -0x1
/* 355510 E00445B0 44820000 */  mtc1      $v0, $f0
/* 355514 E00445B4 00000000 */  nop
/* 355518 E00445B8 46800020 */  cvt.s.w   $f0, $f0
/* 35551C E00445BC 46001083 */  div.s     $f2, $f2, $f0
/* 355520 E00445C0 44910000 */  mtc1      $s1, $f0
/* 355524 E00445C4 00000000 */  nop
/* 355528 E00445C8 46800020 */  cvt.s.w   $f0, $f0
/* 35552C E00445CC 46001082 */  mul.s     $f2, $f2, $f0
/* 355530 E00445D0 00000000 */  nop
/* 355534 E00445D4 3C014270 */  lui       $at, (0x42700000 >> 16)
/* 355538 E00445D8 44810000 */  mtc1      $at, $f0
/* 35553C E00445DC 32220001 */  andi      $v0, $s1, 0x1
/* 355540 E00445E0 10400005 */  beqz      $v0, .LE00445F8
/* 355544 E00445E4 46001500 */   add.s    $f20, $f2, $f0
/* 355548 E00445E8 3C0142F0 */  lui       $at, (0x42F00000 >> 16)
/* 35554C E00445EC 44810000 */  mtc1      $at, $f0
/* 355550 E00445F0 00000000 */  nop
/* 355554 E00445F4 4600A501 */  sub.s     $f20, $f20, $f0
.LE00445F8:
/* 355558 E00445F8 4600A306 */  mov.s     $f12, $f20
/* 35555C E00445FC 2402000A */  addiu     $v0, $zero, 0xA
/* 355560 E0044600 0C080140 */  jal       shim_sin_deg
/* 355564 E0044604 A6C20002 */   sh       $v0, 0x2($s6)
/* 355568 E0044608 4600A306 */  mov.s     $f12, $f20
/* 35556C E004460C 0C080144 */  jal       shim_cos_deg
/* 355570 E0044610 E600FFFC */   swc1     $f0, -0x4($s0)
/* 355574 E0044614 3C01BD4C */  lui       $at, (0xBD4CCCCD >> 16)
/* 355578 E0044618 3421CCCD */  ori       $at, $at, (0xBD4CCCCD & 0xFFFF)
/* 35557C E004461C 44811000 */  mtc1      $at, $f2
/* 355580 E0044620 E6000000 */  swc1      $f0, 0x0($s0)
/* 355584 E0044624 08011215 */  j         .LE0044854
/* 355588 E0044628 E6020004 */   swc1     $f2, 0x4($s0)
glabel .LE004462C
/* 35558C E004462C C6020000 */  lwc1      $f2, 0x0($s0)
/* 355590 E0044630 460010A1 */  cvt.d.s   $f2, $f2
/* 355594 E0044634 463A1082 */  mul.d     $f2, $f2, $f26
/* 355598 E0044638 00000000 */  nop
/* 35559C E004463C C600FFFC */  lwc1      $f0, -0x4($s0)
/* 3555A0 E0044640 46000021 */  cvt.d.s   $f0, $f0
/* 3555A4 E0044644 463A0002 */  mul.d     $f0, $f0, $f26
/* 3555A8 E0044648 00000000 */  nop
/* 3555AC E004464C C6040008 */  lwc1      $f4, 0x8($s0)
/* 3555B0 E0044650 46002121 */  cvt.d.s   $f4, $f4
/* 3555B4 E0044654 4624B181 */  sub.d     $f6, $f22, $f4
/* 3555B8 E0044658 46363182 */  mul.d     $f6, $f6, $f22
/* 3555BC E004465C 00000000 */  nop
/* 3555C0 E0044660 02511021 */  addu      $v0, $s2, $s1
/* 3555C4 E0044664 30420007 */  andi      $v0, $v0, 0x7
/* 3555C8 E0044668 C6080004 */  lwc1      $f8, 0x4($s0)
/* 3555CC E004466C 462010A0 */  cvt.s.d   $f2, $f2
/* 3555D0 E0044670 E6020000 */  swc1      $f2, 0x0($s0)
/* 3555D4 E0044674 46081200 */  add.s     $f8, $f2, $f8
/* 3555D8 E0044678 C602FFF0 */  lwc1      $f2, -0x10($s0)
/* 3555DC E004467C 46200020 */  cvt.s.d   $f0, $f0
/* 3555E0 E0044680 46001080 */  add.s     $f2, $f2, $f0
/* 3555E4 E0044684 E600FFFC */  swc1      $f0, -0x4($s0)
/* 3555E8 E0044688 C600FFF4 */  lwc1      $f0, -0xC($s0)
/* 3555EC E004468C 46262100 */  add.d     $f4, $f4, $f6
/* 3555F0 E0044690 AE020014 */  sw        $v0, 0x14($s0)
/* 3555F4 E0044694 E6080000 */  swc1      $f8, 0x0($s0)
/* 3555F8 E0044698 46080000 */  add.s     $f0, $f0, $f8
/* 3555FC E004469C E602FFF0 */  swc1      $f2, -0x10($s0)
/* 355600 E00446A0 46202120 */  cvt.s.d   $f4, $f4
/* 355604 E00446A4 E6040008 */  swc1      $f4, 0x8($s0)
/* 355608 E00446A8 08011215 */  j         .LE0044854
/* 35560C E00446AC E600FFF4 */   swc1     $f0, -0xC($s0)
glabel .LE00446B0
/* 355610 E00446B0 02511021 */  addu      $v0, $s2, $s1
/* 355614 E00446B4 00511021 */  addu      $v0, $v0, $s1
/* 355618 E00446B8 30420007 */  andi      $v0, $v0, 0x7
/* 35561C E00446BC AE020014 */  sw        $v0, 0x14($s0)
/* 355620 E00446C0 2643FFFF */  addiu     $v1, $s2, -0x1
/* 355624 E00446C4 2862000E */  slti      $v0, $v1, 0xE
/* 355628 E00446C8 1040000B */  beqz      $v0, .LE00446F8
/* 35562C E00446CC 00771021 */   addu     $v0, $v1, $s7
.LE00446D0:
/* 355630 E00446D0 90420000 */  lbu       $v0, 0x0($v0)
/* 355634 E00446D4 44820000 */  mtc1      $v0, $f0
/* 355638 E00446D8 00000000 */  nop
/* 35563C E00446DC 46800020 */  cvt.s.w   $f0, $f0
/* 355640 E00446E0 46000021 */  cvt.d.s   $f0, $f0
/* 355644 E00446E4 46380002 */  mul.d     $f0, $f0, $f24
/* 355648 E00446E8 00000000 */  nop
/* 35564C E00446EC 46200020 */  cvt.s.d   $f0, $f0
/* 355650 E00446F0 08011215 */  j         .LE0044854
/* 355654 E00446F4 E6000008 */   swc1     $f0, 0x8($s0)
.LE00446F8:
/* 355658 E00446F8 2402001E */  addiu     $v0, $zero, 0x1E
/* 35565C E00446FC 08011215 */  j         .LE0044854
/* 355660 E0044700 A6C20002 */   sh       $v0, 0x2($s6)
glabel .LE0044704
/* 355664 E0044704 02511021 */  addu      $v0, $s2, $s1
.LE0044708:
/* 355668 E0044708 00511021 */  addu      $v0, $v0, $s1
/* 35566C E004470C 8E030010 */  lw        $v1, 0x10($s0)
/* 355670 E0044710 30420007 */  andi      $v0, $v0, 0x7
/* 355674 E0044714 04610002 */  bgez      $v1, .LE0044720
/* 355678 E0044718 AE020014 */   sw       $v0, 0x14($s0)
/* 35567C E004471C 26B50001 */  addiu     $s5, $s5, 0x1
.LE0044720:
/* 355680 E0044720 2462FFFF */  addiu     $v0, $v1, -0x1
/* 355684 E0044724 AE020010 */  sw        $v0, 0x10($s0)
/* 355688 E0044728 2C42001F */  sltiu     $v0, $v0, 0x1F
/* 35568C E004472C 14400003 */  bnez      $v0, .LE004473C
/* 355690 E0044730 2402FFFF */   addiu    $v0, $zero, -0x1
/* 355694 E0044734 08011215 */  j         .LE0044854
/* 355698 E0044738 AE020014 */   sw       $v0, 0x14($s0)
.LE004473C:
/* 35569C E004473C 8E03000C */  lw        $v1, 0xC($s0)
/* 3556A0 E0044740 24620001 */  addiu     $v0, $v1, 0x1
/* 3556A4 E0044744 0040902D */  daddu     $s2, $v0, $zero
/* 3556A8 E0044748 2862000E */  slti      $v0, $v1, 0xE
/* 3556AC E004474C 10400015 */  beqz      $v0, .LE00447A4
/* 3556B0 E0044750 AE12000C */   sw       $s2, 0xC($s0)
/* 3556B4 E0044754 00771021 */  addu      $v0, $v1, $s7
/* 3556B8 E0044758 90420000 */  lbu       $v0, 0x0($v0)
/* 3556BC E004475C 44820000 */  mtc1      $v0, $f0
/* 3556C0 E0044760 00000000 */  nop
/* 3556C4 E0044764 46800020 */  cvt.s.w   $f0, $f0
/* 3556C8 E0044768 46000021 */  cvt.d.s   $f0, $f0
/* 3556CC E004476C 46380002 */  mul.d     $f0, $f0, $f24
/* 3556D0 E0044770 00000000 */  nop
/* 3556D4 E0044774 24020005 */  addiu     $v0, $zero, 0x5
/* 3556D8 E0044778 46200020 */  cvt.s.d   $f0, $f0
/* 3556DC E004477C 16620018 */  bne       $s3, $v0, .LE00447E0
/* 3556E0 E0044780 E6000008 */   swc1     $f0, 0x8($s0)
/* 3556E4 E0044784 C6000000 */  lwc1      $f0, 0x0($s0)
/* 3556E8 E0044788 C6020004 */  lwc1      $f2, 0x4($s0)
/* 3556EC E004478C 46020000 */  add.s     $f0, $f0, $f2
/* 3556F0 E0044790 C602FFF4 */  lwc1      $f2, -0xC($s0)
/* 3556F4 E0044794 46001080 */  add.s     $f2, $f2, $f0
/* 3556F8 E0044798 E6000000 */  swc1      $f0, 0x0($s0)
/* 3556FC E004479C 080111F8 */  j         .LE00447E0
/* 355700 E00447A0 E602FFF4 */   swc1     $f2, -0xC($s0)
.LE00447A4:
/* 355704 E00447A4 C6000008 */  lwc1      $f0, 0x8($s0)
/* 355708 E00447A8 46000021 */  cvt.d.s   $f0, $f0
/* 35570C E00447AC 4620B101 */  sub.d     $f4, $f22, $f0
/* 355710 E00447B0 46362102 */  mul.d     $f4, $f4, $f22
/* 355714 E00447B4 00000000 */  nop
/* 355718 E00447B8 C6060000 */  lwc1      $f6, 0x0($s0)
/* 35571C E00447BC C6020004 */  lwc1      $f2, 0x4($s0)
/* 355720 E00447C0 46023180 */  add.s     $f6, $f6, $f2
/* 355724 E00447C4 C602FFF4 */  lwc1      $f2, -0xC($s0)
/* 355728 E00447C8 46061080 */  add.s     $f2, $f2, $f6
/* 35572C E00447CC 46240000 */  add.d     $f0, $f0, $f4
/* 355730 E00447D0 E6060000 */  swc1      $f6, 0x0($s0)
/* 355734 E00447D4 E602FFF4 */  swc1      $f2, -0xC($s0)
/* 355738 E00447D8 46200020 */  cvt.s.d   $f0, $f0
/* 35573C E00447DC E6000008 */  swc1      $f0, 0x8($s0)
.LE00447E0:
/* 355740 E00447E0 24020004 */  addiu     $v0, $zero, 0x4
/* 355744 E00447E4 16620013 */  bne       $s3, $v0, .LE0044834
/* 355748 E00447E8 00121040 */   sll      $v0, $s2, 1
/* 35574C E00447EC 00521021 */  addu      $v0, $v0, $s2
/* 355750 E00447F0 00021080 */  sll       $v0, $v0, 2
/* 355754 E00447F4 4482A000 */  mtc1      $v0, $f20
/* 355758 E00447F8 00000000 */  nop
/* 35575C E00447FC 4680A520 */  cvt.s.w   $f20, $f20
/* 355760 E0044800 0C080140 */  jal       shim_sin_deg
/* 355764 E0044804 4600A306 */   mov.s    $f12, $f20
/* 355768 E0044808 C602FFFC */  lwc1      $f2, -0x4($s0)
/* 35576C E004480C 46001082 */  mul.s     $f2, $f2, $f0
/* 355770 E0044810 00000000 */  nop
/* 355774 E0044814 4600A306 */  mov.s     $f12, $f20
/* 355778 E0044818 0C080144 */  jal       shim_cos_deg
/* 35577C E004481C E602FFF0 */   swc1     $f2, -0x10($s0)
/* 355780 E0044820 C602FFFC */  lwc1      $f2, -0x4($s0)
/* 355784 E0044824 46001082 */  mul.s     $f2, $f2, $f0
/* 355788 E0044828 00000000 */  nop
/* 35578C E004482C 0801120F */  j         .LE004483C
/* 355790 E0044830 E602FFF8 */   swc1     $f2, -0x8($s0)
.LE0044834:
/* 355794 E0044834 C600FFFC */  lwc1      $f0, -0x4($s0)
/* 355798 E0044838 E600FFF0 */  swc1      $f0, -0x10($s0)
.LE004483C:
/* 35579C E004483C C6000000 */  lwc1      $f0, 0x0($s0)
/* 3557A0 E0044840 46000021 */  cvt.d.s   $f0, $f0
/* 3557A4 E0044844 463A0002 */  mul.d     $f0, $f0, $f26
/* 3557A8 E0044848 00000000 */  nop
/* 3557AC E004484C 46200020 */  cvt.s.d   $f0, $f0
/* 3557B0 E0044850 E6000000 */  swc1      $f0, 0x0($s0)
.LE0044854:
/* 3557B4 E0044854 26310001 */  addiu     $s1, $s1, 0x1
/* 3557B8 E0044858 8E820008 */  lw        $v0, 0x8($s4)
/* 3557BC E004485C 2442FFFF */  addiu     $v0, $v0, -0x1
/* 3557C0 E0044860 0222102A */  slt       $v0, $s1, $v0
/* 3557C4 E0044864 1440FF25 */  bnez      $v0, .LE00444FC
/* 3557C8 E0044868 2610002C */   addiu    $s0, $s0, 0x2C
.LE004486C:
/* 3557CC E004486C 2E620002 */  sltiu     $v0, $s3, 0x2
/* 3557D0 E0044870 1440000C */  bnez      $v0, .LE00448A4
/* 3557D4 E0044874 24020003 */   addiu    $v0, $zero, 0x3
/* 3557D8 E0044878 1262000A */  beq       $s3, $v0, .LE00448A4
/* 3557DC E004487C 2A62000A */   slti     $v0, $s3, 0xA
/* 3557E0 E0044880 10400008 */  beqz      $v0, .LE00448A4
/* 3557E4 E0044884 00000000 */   nop
/* 3557E8 E0044888 8E820008 */  lw        $v0, 0x8($s4)
/* 3557EC E004488C 2442FFFF */  addiu     $v0, $v0, -0x1
/* 3557F0 E0044890 02A2102A */  slt       $v0, $s5, $v0
/* 3557F4 E0044894 14400003 */  bnez      $v0, .LE00448A4
/* 3557F8 E0044898 00000000 */   nop
.LE004489C:
/* 3557FC E004489C 0C080128 */  jal       shim_remove_effect
/* 355800 E00448A0 0280202D */   daddu    $a0, $s4, $zero
.LE00448A4:
/* 355804 E00448A4 8FBF0034 */  lw        $ra, 0x34($sp)
/* 355808 E00448A8 8FBE0030 */  lw        $fp, 0x30($sp)
/* 35580C E00448AC 8FB7002C */  lw        $s7, 0x2C($sp)
/* 355810 E00448B0 8FB60028 */  lw        $s6, 0x28($sp)
/* 355814 E00448B4 8FB50024 */  lw        $s5, 0x24($sp)
/* 355818 E00448B8 8FB40020 */  lw        $s4, 0x20($sp)
/* 35581C E00448BC 8FB3001C */  lw        $s3, 0x1C($sp)
/* 355820 E00448C0 8FB20018 */  lw        $s2, 0x18($sp)
/* 355824 E00448C4 8FB10014 */  lw        $s1, 0x14($sp)
/* 355828 E00448C8 8FB00010 */  lw        $s0, 0x10($sp)
/* 35582C E00448CC D7BA0050 */  ldc1      $f26, 0x50($sp)
/* 355830 E00448D0 D7B80048 */  ldc1      $f24, 0x48($sp)
/* 355834 E00448D4 D7B60040 */  ldc1      $f22, 0x40($sp)
/* 355838 E00448D8 D7B40038 */  ldc1      $f20, 0x38($sp)
/* 35583C E00448DC 03E00008 */  jr        $ra
/* 355840 E00448E0 27BD0058 */   addiu    $sp, $sp, 0x58

### DECOMPILED C INSTRUCTIONS:

void stars_shimmer_update(EffectInstance* effect) {
    StarsShimmerFXData* data = effect->data.starsShimmer;
    StarsShimmerFXData* it = data;
    s32 deadParts = 0;
    s32 state = it->state;
    s32 lifeTime;
    s32 i;

    it->timeLeft--;
    it->lifeTime++;
    lifeTime = it->lifeTime;
    if (state == 0 || state == 1 || state == 3 || state >= 10) {
        if (it->timeLeft < 0) {
            shim_remove_effect(effect);
            return;
        }
    }

    it++;
    for (i = 0; i < effect->numParts - 1; i++, it++) {
        switch (state) {
            case 0:
            case 1:
                it->unk_28 = (lifeTime + i) & 7;
                it->unk_18 += -0.02;
                if (lifeTime - 1 < 14) {
                    f32 temp_f0 = (f32) D_E0044DF4[lifeTime - 1] * 0.01;

                    it->pos.x = it->unk_10 * temp_f0;
                    it->pos.y = (it->unk_14 * temp_f0) + it->unk_18;
                    it->unk_1C = (f32) D_E0044E04[lifeTime - 1] * 0.01;
                } else {
                    f32 var_f20 = ((360.0f / (effect->numParts - 1)) * i) + 60.0f;

                    if (i % 2 != 0) {
                        var_f20 -= 120.0f;
                    }
                    data->state = 10;
                    it->unk_10 = shim_sin_deg(var_f20);
                    it->unk_14 = shim_cos_deg(var_f20);
                    it->unk_18 = -0.05f;
                }
                break;
            case 10:
            case 30:
                it->unk_28 = (lifeTime + i) & 7;
                it->unk_10 *= 0.96;
                it->unk_14 *= 0.96;
                it->unk_14 += it->unk_18;
                it->unk_1C += (0.1 - it->unk_1C) * 0.1;
                it->pos.x += it->unk_10;
                it->pos.y += it->unk_14;
                break;
            case 3:
                it->unk_28 = (lifeTime + i + i) & 7;
                if (lifeTime - 1 < 14) {
                    it->unk_1C = (f32) D_E0044E04[lifeTime - 1] * 0.01;
                    break;
                }
                data->state = 30;
                break;
            case 2:
            case 4:
            case 5:
            case 6:
            case 7:
            case 8:
            case 9:
            case 11:
            case 12:
            case 13:
            case 14:
            case 15:
            case 16:
            case 17:
            case 18:
            case 19:
            case 20:
            case 21:
            case 22:
            case 23:
            case 24:
            case 25:
            case 26:
            case 27:
            case 28:
            case 29:
            default:
                it->unk_28 = (lifeTime + i + i) & 7;
                if (it->timeLeft < 0) {
                    deadParts++;
                }
                it->timeLeft--;
                if ((u32) it->timeLeft > 30) {
                    it->unk_28 = -1;
                } else {
                    it->lifeTime++;
                    lifeTime = it->lifeTime;
                    if (lifeTime - 1 < 14) {
                        it->unk_1C = (f32) D_E0044E04[lifeTime - 1] * 0.01;
                        if (state == 5) {
                            it->unk_14 += it->unk_18;
                            it->pos.y += it->unk_14;
                        }
                    } else {
                        it->unk_14 += it->unk_18;
                        it->pos.y += it->unk_14;
                        it->unk_1C += (0.1 - it->unk_1C) * 0.1;
                    }
                    if (state == 4) {
                        it->pos.x = (it->unk_10 * shim_sin_deg(lifeTime * 12));
                        it->pos.z = (it->unk_10 * shim_cos_deg(lifeTime * 12));
                    } else {
                        it->pos.x = it->unk_10;
                    }
                    it->unk_14 *= 0.96;
                }
        }
    }

    if (state != 0 && state != 1 && state != 3 && state < 10 && deadParts >= effect->numParts - 1) {
        shim_remove_effect(effect);
    }
}