### RAW ASSEMBLY INSTRUCTIONS:

dlabel D_80254C50
/* 183530 80254C50 27BDFCE8 */  addiu     $sp, $sp, -0x318
/* 183534 80254C54 AFBF02E4 */  sw        $ra, 0x2E4($sp)
/* 183538 80254C58 AFBE02E0 */  sw        $fp, 0x2E0($sp)
/* 18353C 80254C5C AFB702DC */  sw        $s7, 0x2DC($sp)
/* 183540 80254C60 AFB602D8 */  sw        $s6, 0x2D8($sp)
/* 183544 80254C64 AFB502D4 */  sw        $s5, 0x2D4($sp)
/* 183548 80254C68 AFB402D0 */  sw        $s4, 0x2D0($sp)
/* 18354C 80254C6C AFB302CC */  sw        $s3, 0x2CC($sp)
/* 183550 80254C70 AFB202C8 */  sw        $s2, 0x2C8($sp)
/* 183554 80254C74 AFB102C4 */  sw        $s1, 0x2C4($sp)
/* 183558 80254C78 AFB002C0 */  sw        $s0, 0x2C0($sp)
/* 18355C 80254C7C F7BE0310 */  sdc1      $f30, 0x310($sp)
/* 183560 80254C80 F7BC0308 */  sdc1      $f28, 0x308($sp)
/* 183564 80254C84 F7BA0300 */  sdc1      $f26, 0x300($sp)
/* 183568 80254C88 F7B802F8 */  sdc1      $f24, 0x2F8($sp)
/* 18356C 80254C8C F7B602F0 */  sdc1      $f22, 0x2F0($sp)
/* 183570 80254C90 F7B402E8 */  sdc1      $f20, 0x2E8($sp)
/* 183574 80254C94 AFA40318 */  sw        $a0, 0x318($sp)
/* 183578 80254C98 8C9201F4 */  lw        $s2, 0x1F4($a0)
/* 18357C 80254C9C 8E5700C0 */  lw        $s7, 0xC0($s2)
/* 183580 80254CA0 82E208AC */  lb        $v0, 0x8AC($s7)
/* 183584 80254CA4 92E308AC */  lbu       $v1, 0x8AC($s7)
/* 183588 80254CA8 1040000B */  beqz      $v0, .L80254CD8
/* 18358C 80254CAC 2462FFFF */   addiu    $v0, $v1, -0x1
/* 183590 80254CB0 A2E208AC */  sb        $v0, 0x8AC($s7)
/* 183594 80254CB4 00021600 */  sll       $v0, $v0, 24
/* 183598 80254CB8 14400007 */  bnez      $v0, .L80254CD8
/* 18359C 80254CBC 3C03EFFF */   lui      $v1, (0xEFFFFFFF >> 16)
/* 1835A0 80254CC0 8FA80318 */  lw        $t0, 0x318($sp)
/* 1835A4 80254CC4 8D020000 */  lw        $v0, 0x0($t0)
/* 1835A8 80254CC8 3463FFFF */  ori       $v1, $v1, (0xEFFFFFFF & 0xFFFF)
/* 1835AC 80254CCC 00431024 */  and       $v0, $v0, $v1
/* 1835B0 80254CD0 0809541D */  j         .L80255074
/* 1835B4 80254CD4 AD020000 */   sw       $v0, 0x0($t0)
.L80254CD8:
/* 1835B8 80254CD8 8E420000 */  lw        $v0, 0x0($s2)
/* 1835BC 80254CDC 30420001 */  andi      $v0, $v0, 0x1
/* 1835C0 80254CE0 144000E4 */  bnez      $v0, .L80255074
/* 1835C4 80254CE4 00000000 */   nop
/* 1835C8 80254CE8 8E420094 */  lw        $v0, 0x94($s2)
/* 1835CC 80254CEC 104000E1 */  beqz      $v0, .L80255074
/* 1835D0 80254CF0 27A801D8 */   addiu    $t0, $sp, 0x1D8
/* 1835D4 80254CF4 AFA802A4 */  sw        $t0, 0x2A4($sp)
/* 1835D8 80254CF8 27A80158 */  addiu     $t0, $sp, 0x158
/* 1835DC 80254CFC AFA802A8 */  sw        $t0, 0x2A8($sp)
/* 1835E0 80254D00 27A80198 */  addiu     $t0, $sp, 0x198
/* 1835E4 80254D04 AFA802AC */  sw        $t0, 0x2AC($sp)
/* 1835E8 80254D08 27A80058 */  addiu     $t0, $sp, 0x58
/* 1835EC 80254D0C AFA802B0 */  sw        $t0, 0x2B0($sp)
/* 1835F0 80254D10 27A80098 */  addiu     $t0, $sp, 0x98
/* 1835F4 80254D14 27B50218 */  addiu     $s5, $sp, 0x218
/* 1835F8 80254D18 AFA802B4 */  sw        $t0, 0x2B4($sp)
/* 1835FC 80254D1C 27A800D8 */  addiu     $t0, $sp, 0xD8
/* 183600 80254D20 AFA802B8 */  sw        $t0, 0x2B8($sp)
/* 183604 80254D24 27A80118 */  addiu     $t0, $sp, 0x118
/* 183608 80254D28 27BE0258 */  addiu     $fp, $sp, 0x258
/* 18360C 80254D2C AFA00298 */  sw        $zero, 0x298($sp)
/* 183610 80254D30 AFA0029C */  sw        $zero, 0x29C($sp)
/* 183614 80254D34 AFA802BC */  sw        $t0, 0x2BC($sp)
/* 183618 80254D38 82F307D9 */  lb        $s3, 0x7D9($s7)
/* 18361C 80254D3C 4480A000 */  mtc1      $zero, $f20
/* 183620 80254D40 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 183624 80254D44 4481F000 */  mtc1      $at, $f30
/* 183628 80254D48 3C01802A */  lui       $at, %hi(D_8029D350)
/* 18362C 80254D4C D43CD350 */  ldc1      $f28, %lo(D_8029D350)($at)
.L80254D50:
/* 183630 80254D50 8FA80298 */  lw        $t0, 0x298($sp)
/* 183634 80254D54 2673FFFF */  addiu     $s3, $s3, -0x1
.L80254D58:
/* 183638 80254D58 25080001 */  addiu     $t0, $t0, 0x1
/* 18363C 80254D5C 06610002 */  bgez      $s3, nok_02_D_80254D68
/* 183640 80254D60 AFA80298 */   sw       $t0, 0x298($sp)
/* 183644 80254D64 2413000F */  addiu     $s3, $zero, 0xF
nok_02_D_80254D68:
/* 183648 80254D68 82E207D9 */  lb        $v0, 0x7D9($s7)
/* 18364C 80254D6C 126200C1 */  beq       $s3, $v0, .L80255074
/* 183650 80254D70 00000000 */   nop
/* 183654 80254D74 8FA80298 */  lw        $t0, 0x298($sp)
/* 183658 80254D78 29020003 */  slti      $v0, $t0, 0x3
/* 18365C 80254D7C 5440FFF6 */  bnel      $v0, $zero, .L80254D58
/* 183660 80254D80 2673FFFF */   addiu    $s3, $s3, -0x1
/* 183664 80254D84 8FA8029C */  lw        $t0, 0x29C($sp)
/* 183668 80254D88 AFA00298 */  sw        $zero, 0x298($sp)
/* 18366C 80254D8C 82E207DA */  lb        $v0, 0x7DA($s7)
/* 183670 80254D90 25080001 */  addiu     $t0, $t0, 0x1
/* 183674 80254D94 0048102A */  slt       $v0, $v0, $t0
/* 183678 80254D98 144000B6 */  bnez      $v0, .L80255074
/* 18367C 80254D9C AFA8029C */   sw       $t0, 0x29C($sp)
/* 183680 80254DA0 24160078 */  addiu     $s6, $zero, 0x78
/* 183684 80254DA4 00132840 */  sll       $a1, $s3, 1
/* 183688 80254DA8 02E52821 */  addu      $a1, $s7, $a1
/* 18368C 80254DAC 02F32021 */  addu      $a0, $s7, $s3
/* 183690 80254DB0 84A207FC */  lh        $v0, 0x7FC($a1)
/* 183694 80254DB4 84A3081C */  lh        $v1, 0x81C($a1)
/* 183698 80254DB8 44821000 */  mtc1      $v0, $f2
/* 18369C 80254DBC 00000000 */  nop
/* 1836A0 80254DC0 468010A0 */  cvt.s.w   $f2, $f2
/* 1836A4 80254DC4 44832000 */  mtc1      $v1, $f4
/* 1836A8 80254DC8 00000000 */  nop
/* 1836AC 80254DCC 46802120 */  cvt.s.w   $f4, $f4
/* 1836B0 80254DD0 84A3083C */  lh        $v1, 0x83C($a1)
/* 1836B4 80254DD4 9082087C */  lbu       $v0, 0x87C($a0)
/* 1836B8 80254DD8 84A507DC */  lh        $a1, 0x7DC($a1)
/* 1836BC 80254DDC 44830000 */  mtc1      $v1, $f0
/* 1836C0 80254DE0 00000000 */  nop
/* 1836C4 80254DE4 46800020 */  cvt.s.w   $f0, $f0
/* 1836C8 80254DE8 00021040 */  sll       $v0, $v0, 1
/* 1836CC 80254DEC 4482B000 */  mtc1      $v0, $f22
/* 1836D0 80254DF0 00000000 */  nop
/* 1836D4 80254DF4 4680B5A0 */  cvt.s.w   $f22, $f22
/* 1836D8 80254DF8 9083088C */  lbu       $v1, 0x88C($a0)
/* 1836DC 80254DFC 9082089C */  lbu       $v0, 0x89C($a0)
/* 1836E0 80254E00 00031840 */  sll       $v1, $v1, 1
/* 1836E4 80254E04 4483C000 */  mtc1      $v1, $f24
/* 1836E8 80254E08 00000000 */  nop
/* 1836EC 80254E0C 4680C620 */  cvt.s.w   $f24, $f24
/* 1836F0 80254E10 00021040 */  sll       $v0, $v0, 1
/* 1836F4 80254E14 86430098 */  lh        $v1, 0x98($s2)
/* 1836F8 80254E18 4482D000 */  mtc1      $v0, $f26
/* 1836FC 80254E1C 00000000 */  nop
/* 183700 80254E20 4680D6A0 */  cvt.s.w   $f26, $f26
/* 183704 80254E24 AFA502A0 */  sw        $a1, 0x2A0($sp)
/* 183708 80254E28 8090085C */  lb        $s0, 0x85C($a0)
/* 18370C 80254E2C 8091086C */  lb        $s1, 0x86C($a0)
/* 183710 80254E30 28620032 */  slti      $v0, $v1, 0x32
/* 183714 80254E34 10400004 */  beqz      $v0, .L80254E48
/* 183718 80254E38 24140014 */   addiu    $s4, $zero, 0x14
/* 18371C 80254E3C 24160032 */  addiu     $s6, $zero, 0x32
/* 183720 80254E40 0809539C */  j         .L80254E70
/* 183724 80254E44 24140008 */   addiu    $s4, $zero, 0x8
.L80254E48:
/* 183728 80254E48 28620064 */  slti      $v0, $v1, 0x64
/* 18372C 80254E4C 10400004 */  beqz      $v0, .L80254E60
/* 183730 80254E50 28620096 */   slti     $v0, $v1, 0x96
/* 183734 80254E54 24160046 */  addiu     $s6, $zero, 0x46
/* 183738 80254E58 0809539C */  j         .L80254E70
/* 18373C 80254E5C 2414000A */   addiu    $s4, $zero, 0xA
.L80254E60:
/* 183740 80254E60 10400003 */  beqz      $v0, .L80254E70
/* 183744 80254E64 00000000 */   nop
/* 183748 80254E68 24160064 */  addiu     $s6, $zero, 0x64
/* 18374C 80254E6C 2414000F */  addiu     $s4, $zero, 0xF
.L80254E70:
/* 183750 80254E70 44051000 */  mfc1      $a1, $f2
/* 183754 80254E74 44062000 */  mfc1      $a2, $f4
/* 183758 80254E78 44070000 */  mfc1      $a3, $f0
/* 18375C 80254E7C 0C019E40 */  jal       guTranslateF
/* 183760 80254E80 8FA402A4 */   lw       $a0, 0x2A4($sp)
/* 183764 80254E84 00101023 */  negu      $v0, $s0
/* 183768 80254E88 44824000 */  mtc1      $v0, $f8
/* 18376C 80254E8C 00000000 */  nop
/* 183770 80254E90 46804220 */  cvt.s.w   $f8, $f8
/* 183774 80254E94 00111023 */  negu      $v0, $s1
/* 183778 80254E98 44054000 */  mfc1      $a1, $f8
/* 18377C 80254E9C 44824000 */  mtc1      $v0, $f8
/* 183780 80254EA0 00000000 */  nop
/* 183784 80254EA4 46804220 */  cvt.s.w   $f8, $f8
/* 183788 80254EA8 8FA402A8 */  lw        $a0, 0x2A8($sp)
/* 18378C 80254EAC 4407A000 */  mfc1      $a3, $f20
/* 183790 80254EB0 44064000 */  mfc1      $a2, $f8
/* 183794 80254EB4 0C019E40 */  jal       guTranslateF
/* 183798 80254EB8 00000000 */   nop
/* 18379C 80254EBC 44904000 */  mtc1      $s0, $f8
/* 1837A0 80254EC0 00000000 */  nop
/* 1837A4 80254EC4 46804220 */  cvt.s.w   $f8, $f8
/* 1837A8 80254EC8 44054000 */  mfc1      $a1, $f8
/* 1837AC 80254ECC 44914000 */  mtc1      $s1, $f8
/* 1837B0 80254ED0 00000000 */  nop
/* 1837B4 80254ED4 46804220 */  cvt.s.w   $f8, $f8
/* 1837B8 80254ED8 8FA402AC */  lw        $a0, 0x2AC($sp)
/* 1837BC 80254EDC 4407A000 */  mfc1      $a3, $f20
/* 1837C0 80254EE0 44064000 */  mfc1      $a2, $f8
/* 1837C4 80254EE4 0C019E40 */  jal       guTranslateF
/* 1837C8 80254EE8 00000000 */   nop
/* 1837CC 80254EEC 4405B000 */  mfc1      $a1, $f22
/* 1837D0 80254EF0 4406F000 */  mfc1      $a2, $f30
/* 1837D4 80254EF4 4407A000 */  mfc1      $a3, $f20
/* 1837D8 80254EF8 27A40018 */  addiu     $a0, $sp, 0x18
/* 1837DC 80254EFC 0C019EC8 */  jal       guRotateF
/* 1837E0 80254F00 E7B40010 */   swc1     $f20, 0x10($sp)
/* 1837E4 80254F04 4405C000 */  mfc1      $a1, $f24
/* 1837E8 80254F08 4406A000 */  mfc1      $a2, $f20
/* 1837EC 80254F0C 4407F000 */  mfc1      $a3, $f30
/* 1837F0 80254F10 8FA402B0 */  lw        $a0, 0x2B0($sp)
/* 1837F4 80254F14 0C019EC8 */  jal       guRotateF
/* 1837F8 80254F18 E7B40010 */   swc1     $f20, 0x10($sp)
/* 1837FC 80254F1C 4405D000 */  mfc1      $a1, $f26
/* 183800 80254F20 4406A000 */  mfc1      $a2, $f20
/* 183804 80254F24 4407A000 */  mfc1      $a3, $f20
/* 183808 80254F28 8FA402B4 */  lw        $a0, 0x2B4($sp)
/* 18380C 80254F2C 0C019EC8 */  jal       guRotateF
/* 183810 80254F30 E7BE0010 */   swc1     $f30, 0x10($sp)
/* 183814 80254F34 27A40018 */  addiu     $a0, $sp, 0x18
/* 183818 80254F38 8FA502B0 */  lw        $a1, 0x2B0($sp)
/* 18381C 80254F3C 0C019D80 */  jal       guMtxCatF
/* 183820 80254F40 02A0302D */   daddu    $a2, $s5, $zero
/* 183824 80254F44 8FA502B4 */  lw        $a1, 0x2B4($sp)
/* 183828 80254F48 8FA602B8 */  lw        $a2, 0x2B8($sp)
/* 18382C 80254F4C 0C019D80 */  jal       guMtxCatF
/* 183830 80254F50 02A0202D */   daddu    $a0, $s5, $zero
/* 183834 80254F54 8FA80318 */  lw        $t0, 0x318($sp)
/* 183838 80254F58 C5060170 */  lwc1      $f6, 0x170($t0)
/* 18383C 80254F5C 460031A1 */  cvt.d.s   $f6, $f6
/* 183840 80254F60 463C3182 */  mul.d     $f6, $f6, $f28
/* 183844 80254F64 00000000 */  nop
/* 183848 80254F68 C5040174 */  lwc1      $f4, 0x174($t0)
/* 18384C 80254F6C 46002121 */  cvt.d.s   $f4, $f4
/* 183850 80254F70 463C2102 */  mul.d     $f4, $f4, $f28
/* 183854 80254F74 00000000 */  nop
/* 183858 80254F78 C5020178 */  lwc1      $f2, 0x178($t0)
/* 18385C 80254F7C 460010A1 */  cvt.d.s   $f2, $f2
/* 183860 80254F80 463C1082 */  mul.d     $f2, $f2, $f28
/* 183864 80254F84 00000000 */  nop
/* 183868 80254F88 C5000188 */  lwc1      $f0, 0x188($t0)
/* 18386C 80254F8C 46000021 */  cvt.d.s   $f0, $f0
/* 183870 80254F90 46203182 */  mul.d     $f6, $f6, $f0
/* 183874 80254F94 00000000 */  nop
/* 183878 80254F98 46202102 */  mul.d     $f4, $f4, $f0
/* 18387C 80254F9C 00000000 */  nop
/* 183880 80254FA0 82420074 */  lb        $v0, 0x74($s2)
/* 183884 80254FA4 44820000 */  mtc1      $v0, $f0
/* 183888 80254FA8 00000000 */  nop
/* 18388C 80254FAC 46800021 */  cvt.d.w   $f0, $f0
/* 183890 80254FB0 46202102 */  mul.d     $f4, $f4, $f0
/* 183894 80254FB4 00000000 */  nop
/* 183898 80254FB8 8FA402BC */  lw        $a0, 0x2BC($sp)
/* 18389C 80254FBC 462010A0 */  cvt.s.d   $f2, $f2
/* 1838A0 80254FC0 44071000 */  mfc1      $a3, $f2
/* 1838A4 80254FC4 462031A0 */  cvt.s.d   $f6, $f6
/* 1838A8 80254FC8 44053000 */  mfc1      $a1, $f6
/* 1838AC 80254FCC 46202120 */  cvt.s.d   $f4, $f4
D_80254FD0:
/* 1838B0 80254FD0 44062000 */  mfc1      $a2, $f4
/* 1838B4 80254FD4 0C019DF0 */  jal       guScaleF
/* 1838B8 80254FD8 00000000 */   nop
/* 1838BC 80254FDC 8FA402BC */  lw        $a0, 0x2BC($sp)
/* 1838C0 80254FE0 8FA502A8 */  lw        $a1, 0x2A8($sp)
/* 1838C4 80254FE4 0C019D80 */  jal       guMtxCatF
/* 1838C8 80254FE8 03C0302D */   daddu    $a2, $fp, $zero
/* 1838CC 80254FEC 03C0202D */  daddu     $a0, $fp, $zero
/* 1838D0 80254FF0 8FA502B8 */  lw        $a1, 0x2B8($sp)
/* 1838D4 80254FF4 0C019D80 */  jal       guMtxCatF
/* 1838D8 80254FF8 02A0302D */   daddu    $a2, $s5, $zero
/* 1838DC 80254FFC 02A0202D */  daddu     $a0, $s5, $zero
/* 1838E0 80255000 8FA502AC */  lw        $a1, 0x2AC($sp)
/* 1838E4 80255004 0C019D80 */  jal       guMtxCatF
/* 1838E8 80255008 03C0302D */   daddu    $a2, $fp, $zero
/* 1838EC 8025500C 03C0202D */  daddu     $a0, $fp, $zero
/* 1838F0 80255010 8FA502A4 */  lw        $a1, 0x2A4($sp)
/* 1838F4 80255014 0C019D80 */  jal       guMtxCatF
/* 1838F8 80255018 02A0302D */   daddu    $a2, $s5, $zero
/* 1838FC 8025501C 8FA8029C */  lw        $t0, 0x29C($sp)
/* 183900 80255020 01140018 */  mult      $t0, $s4
/* 183904 80255024 86500098 */  lh        $s0, 0x98($s2)
/* 183908 80255028 00004012 */  mflo      $t0
/* 18390C 8025502C 02C81023 */  subu      $v0, $s6, $t0
/* 183910 80255030 A6420098 */  sh        $v0, 0x98($s2)
/* 183914 80255034 8FA802A0 */  lw        $t0, 0x2A0($sp)
/* 183918 80255038 250200B4 */  addiu     $v0, $t0, 0xB4
/* 18391C 8025503C 44826000 */  mtc1      $v0, $f12
/* 183920 80255040 00000000 */  nop
/* 183924 80255044 0C00A6C9 */  jal       clamp_angle
/* 183928 80255048 46806320 */   cvt.s.w  $f12, $f12
/* 18392C 8025504C 0000202D */  daddu     $a0, $zero, $zero
/* 183930 80255050 0240282D */  daddu     $a1, $s2, $zero
/* 183934 80255054 4600020D */  trunc.w.s $f8, $f0
/* 183938 80255058 44064000 */  mfc1      $a2, $f8
/* 18393C 8025505C 02A0382D */  daddu     $a3, $s5, $zero
/* 183940 80255060 24020001 */  addiu     $v0, $zero, 0x1
/* 183944 80255064 0C09647B */  jal       func_802591EC
/* 183948 80255068 AFA20010 */   sw       $v0, 0x10($sp)
/* 18394C 8025506C 08095354 */  j         .L80254D50
/* 183950 80255070 A6500098 */   sh       $s0, 0x98($s2)
.L80255074:
/* 183954 80255074 8FBF02E4 */  lw        $ra, 0x2E4($sp)
/* 183958 80255078 8FBE02E0 */  lw        $fp, 0x2E0($sp)
/* 18395C 8025507C 8FB702DC */  lw        $s7, 0x2DC($sp)
/* 183960 80255080 8FB602D8 */  lw        $s6, 0x2D8($sp)
/* 183964 80255084 8FB502D4 */  lw        $s5, 0x2D4($sp)
/* 183968 80255088 8FB402D0 */  lw        $s4, 0x2D0($sp)
/* 18396C 8025508C 8FB302CC */  lw        $s3, 0x2CC($sp)
/* 183970 80255090 8FB202C8 */  lw        $s2, 0x2C8($sp)
/* 183974 80255094 8FB102C4 */  lw        $s1, 0x2C4($sp)
/* 183978 80255098 8FB002C0 */  lw        $s0, 0x2C0($sp)
/* 18397C 8025509C D7BE0310 */  ldc1      $f30, 0x310($sp)
/* 183980 802550A0 D7BC0308 */  ldc1      $f28, 0x308($sp)
/* 183984 802550A4 D7BA0300 */  ldc1      $f26, 0x300($sp)
/* 183988 802550A8 D7B802F8 */  ldc1      $f24, 0x2F8($sp)
/* 18398C 802550AC D7B602F0 */  ldc1      $f22, 0x2F0($sp)
/* 183990 802550B0 D7B402E8 */  ldc1      $f20, 0x2E8($sp)
/* 183994 802550B4 03E00008 */  jr        $ra
/* 183998 802550B8 27BD0318 */   addiu    $sp, $sp, 0x318

### DECOMPILED C INSTRUCTIONS:

void appendGfx_player_actor_blur(Actor* actor) {
    Matrix4f mtxRotX, mtxRotY, mtxRotZ, mtxRotation;
    Matrix4f mtxScale;
    Matrix4f mtxPivotOn, mtxPivotOff, mtxTranslate;
    Matrix4f mtxTransform, mtxTemp;
    s32 delay;
    s32 num;
    s32 yaw;
    ActorPart* partTable;
    DecorationTable* decorationTable;
    f32 rotX, rotY, rotZ;
    s32 prevOpacity;
    s32 temp_v1;
    s32 pivotOffsetX;
    s32 pivotOffsetY;
    s32 bufPos;
    s32 newOpacityBase;
    s32 newOpacityModulus;
    f32 x, y, z;

    partTable = actor->partsTable;
    decorationTable = partTable->decorationTable;
    if (decorationTable->effectType != 0) {
        decorationTable->effectType--;
        if (decorationTable->effectType == 0) {
            actor->flags &= ~ACTOR_FLAG_BLUR_ENABLED;
            return;
        }
    }

    if (!(partTable->flags & ACTOR_PART_FLAG_INVISIBLE) && partTable->idleAnimations != NULL) {
        delay = 0;
        num = 0;
        bufPos = decorationTable->unk_7D9;

        while (1) {
            bufPos--;
            delay++;
            if (bufPos < 0) {
                bufPos = ARRAY_COUNT(decorationTable->posX) - 1;
            }
            if (bufPos == decorationTable->unk_7D9) {
                break;
            }

            if (delay >= 3) {
                delay = 0;
                num++;

                if (decorationTable->unk_7DA < num) {
                    break;
                }
                temp_v1 = partTable->opacity;
                x = decorationTable->posX[bufPos];
                y = decorationTable->posY[bufPos];
                z = decorationTable->posZ[bufPos];

                yaw = decorationTable->yaw[bufPos];

                pivotOffsetX = decorationTable->rotationPivotOffsetX[bufPos];
                pivotOffsetY = decorationTable->rotationPivotOffsetY[bufPos];

                rotX = decorationTable->rotX[bufPos] * 2;
                rotY = decorationTable->rotY[bufPos] * 2;
                rotZ = decorationTable->rotZ[bufPos] * 2;

                newOpacityBase = 120;
                newOpacityModulus = 20;
                if (temp_v1 < 50) {
                    newOpacityBase = 50;
                    newOpacityModulus = 8;
                } else if (temp_v1 < 100) {
                    newOpacityBase = 70;
                    newOpacityModulus = 10;
                } else if (temp_v1 < 150) {
                    newOpacityBase = 100;
                    newOpacityModulus = 15;
                }

                guTranslateF(mtxTranslate, x, y, z);
                guTranslateF(mtxPivotOn, -pivotOffsetX, -pivotOffsetY, 0.0f);
                guTranslateF(mtxPivotOff, pivotOffsetX, pivotOffsetY, 0.0f);
                guRotateF(mtxRotX, rotX, 1.0f, 0.0f, 0.0f);
                guRotateF(mtxRotY, rotY, 0.0f, 1.0f, 0.0f);
                guRotateF(mtxRotZ, rotZ, 0.0f, 0.0f, 1.0f);
                guMtxCatF(mtxRotX, mtxRotY, mtxTransform);
                guMtxCatF(mtxTransform, mtxRotZ, mtxRotation);
                guScaleF(mtxScale, actor->scale.x * SPRITE_WORLD_SCALE_D * actor->scalingFactor,
                                actor->scale.y * SPRITE_WORLD_SCALE_D * actor->scalingFactor * partTable->verticalStretch,
                                actor->scale.z * SPRITE_WORLD_SCALE_D);
                guMtxCatF(mtxScale, mtxPivotOn, mtxTemp);
                guMtxCatF(mtxTemp, mtxRotation, mtxTransform);
                guMtxCatF(mtxTransform, mtxPivotOff, mtxTemp);
                guMtxCatF(mtxTemp, mtxTranslate, mtxTransform);
                prevOpacity = partTable->opacity;
                partTable->opacity = newOpacityBase - (num * newOpacityModulus);
                render_with_adjusted_palettes(SPRITE_MODE_PLAYER, partTable, clamp_angle(yaw + 180), mtxTransform, 1);
                partTable->opacity = prevOpacity;
            }
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel hud_element_load_script
/* D5A50 8013F350 27BDFFD0 */  addiu     $sp, $sp, -0x30
/* D5A54 8013F354 AFB50024 */  sw        $s5, 0x24($sp)
/* D5A58 8013F358 0080A82D */  daddu     $s5, $a0, $zero
/* D5A5C 8013F35C AFB00010 */  sw        $s0, 0x10($sp)
/* D5A60 8013F360 00A0802D */  daddu     $s0, $a1, $zero
/* D5A64 8013F364 AFBF002C */  sw        $ra, 0x2C($sp)
/* D5A68 8013F368 AFB60028 */  sw        $s6, 0x28($sp)
/* D5A6C 8013F36C AFB40020 */  sw        $s4, 0x20($sp)
/* D5A70 8013F370 AFB3001C */  sw        $s3, 0x1C($sp)
/* D5A74 8013F374 AFB20018 */  sw        $s2, 0x18($sp)
/* D5A78 8013F378 120000D8 */  beqz      $s0, .L8013F6DC
/* D5A7C 8013F37C AFB10014 */   sw       $s1, 0x14($sp)
/* D5A80 8013F380 0000982D */  daddu     $s3, $zero, $zero
/* D5A84 8013F384 3C168015 */  lui       $s6, %hi(gHudElementSizes)
/* D5A88 8013F388 26D6EFCC */  addiu     $s6, $s6, %lo(gHudElementSizes)
glabel .L8013F38C
/* D5A8C 8013F38C 8E030000 */  lw        $v1, 0x0($s0)
/* D5A90 8013F390 2C62001C */  sltiu     $v0, $v1, 0x1C
/* D5A94 8013F394 1040FFFD */  beqz      $v0, .L8013F38C
/* D5A98 8013F398 26100004 */   addiu    $s0, $s0, 0x4
/* D5A9C 8013F39C 00031080 */  sll       $v0, $v1, 2
/* D5AA0 8013F3A0 3C018015 */  lui       $at, %hi(jtbl_80151140)
/* D5AA4 8013F3A4 00220821 */  addu      $at, $at, $v0
/* D5AA8 8013F3A8 8C221140 */  lw        $v0, %lo(jtbl_80151140)($at)
/* D5AAC 8013F3AC 00400008 */  jr        $v0
/* D5AB0 8013F3B0 00000000 */   nop
glabel .L8013F3B4
/* D5AB4 8013F3B4 0804FCE3 */  j         .L8013F38C
/* D5AB8 8013F3B8 2610000C */   addiu    $s0, $s0, 0xC
glabel .L8013F3BC
/* D5ABC 8013F3BC 8E130000 */  lw        $s3, 0x0($s0)
/* D5AC0 8013F3C0 0804FCF4 */  j         .L8013F3D0
/* D5AC4 8013F3C4 26100004 */   addiu    $s0, $s0, 0x4
glabel .L8013F3C8
/* D5AC8 8013F3C8 8E130000 */  lw        $s3, 0x0($s0)
/* D5ACC 8013F3CC 26100008 */  addiu     $s0, $s0, 0x8
.L8013F3D0:
/* D5AD0 8013F3D0 A2B30046 */  sb        $s3, 0x46($s5)
/* D5AD4 8013F3D4 0804FCE3 */  j         .L8013F38C
/* D5AD8 8013F3D8 A2B30045 */   sb       $s3, 0x45($s5)
glabel .L8013F3DC
/* D5ADC 8013F3DC 92020003 */  lbu       $v0, 0x3($s0)
/* D5AE0 8013F3E0 26100004 */  addiu     $s0, $s0, 0x4
/* D5AE4 8013F3E4 3C030010 */  lui       $v1, (0x100000 >> 16)
/* D5AE8 8013F3E8 A2A2004E */  sb        $v0, 0x4E($s5)
/* D5AEC 8013F3EC A2A20050 */  sb        $v0, 0x50($s5)
/* D5AF0 8013F3F0 92040003 */  lbu       $a0, 0x3($s0)
/* D5AF4 8013F3F4 8EA20000 */  lw        $v0, 0x0($s5)
/* D5AF8 8013F3F8 26100004 */  addiu     $s0, $s0, 0x4
/* D5AFC 8013F3FC 00431025 */  or        $v0, $v0, $v1
/* D5B00 8013F400 AEA20000 */  sw        $v0, 0x0($s5)
/* D5B04 8013F404 A2A4004F */  sb        $a0, 0x4F($s5)
/* D5B08 8013F408 0804FCE3 */  j         .L8013F38C
/* D5B0C 8013F40C A2A40051 */   sb       $a0, 0x51($s5)
glabel .L8013F410
/* D5B10 8013F410 0804FCE3 */  j         .L8013F38C
/* D5B14 8013F414 26100004 */   addiu    $s0, $s0, 0x4
glabel .L8013F418
/* D5B18 8013F418 0804FCE3 */  j         .L8013F38C
/* D5B1C 8013F41C 26100008 */   addiu    $s0, $s0, 0x8
.L8013F420:
/* D5B20 8013F420 0804FD62 */  j         .L8013F588
/* D5B24 8013F424 AE110000 */   sw       $s1, 0x0($s0)
.L8013F428:
/* D5B28 8013F428 0804FDB2 */  j         .L8013F6C8
/* D5B2C 8013F42C AE110000 */   sw       $s1, 0x0($s0)
glabel .L8013F430
/* D5B30 8013F430 26100004 */  addiu     $s0, $s0, 0x4
/* D5B34 8013F434 8E070000 */  lw        $a3, 0x0($s0)
/* D5B38 8013F438 26100004 */  addiu     $s0, $s0, 0x4
/* D5B3C 8013F43C 8E140000 */  lw        $s4, 0x0($s0)
/* D5B40 8013F440 26100004 */  addiu     $s0, $s0, 0x4
/* D5B44 8013F444 0000882D */  daddu     $s1, $zero, $zero
/* D5B48 8013F448 00131040 */  sll       $v0, $s3, 1
/* D5B4C 8013F44C 00531021 */  addu      $v0, $v0, $s3
/* D5B50 8013F450 00021040 */  sll       $v0, $v0, 1
/* D5B54 8013F454 3C048015 */  lui       $a0, %hi(gHudElementCacheTableRaster)
/* D5B58 8013F458 8C8412C8 */  lw        $a0, %lo(gHudElementCacheTableRaster)($a0)
/* D5B5C 8013F45C 00569021 */  addu      $s2, $v0, $s6
/* D5B60 8013F460 24850004 */  addiu     $a1, $a0, 0x4
.L8013F464:
/* D5B64 8013F464 8C830000 */  lw        $v1, 0x0($a0)
/* D5B68 8013F468 2402FFFF */  addiu     $v0, $zero, -0x1
/* D5B6C 8013F46C 14620038 */  bne       $v1, $v0, .L8013F550
/* D5B70 8013F470 00000000 */   nop
/* D5B74 8013F474 3C038015 */  lui       $v1, %hi(gHudElementCacheSize)
/* D5B78 8013F478 8C63133C */  lw        $v1, %lo(gHudElementCacheSize)($v1)
/* D5B7C 8013F47C 3C028015 */  lui       $v0, %hi(gHudElementCacheBuffer)
/* D5B80 8013F480 8C421314 */  lw        $v0, %lo(gHudElementCacheBuffer)($v0)
/* D5B84 8013F484 AC870000 */  sw        $a3, 0x0($a0)
/* D5B88 8013F488 8C630000 */  lw        $v1, 0x0($v1)
/* D5B8C 8013F48C 3C048007 */  lui       $a0, %hi(gGameStatusPtr)
/* D5B90 8013F490 8C84419C */  lw        $a0, %lo(gGameStatusPtr)($a0)
/* D5B94 8013F494 00431021 */  addu      $v0, $v0, $v1
/* D5B98 8013F498 ACA20000 */  sw        $v0, 0x0($a1)
/* D5B9C 8013F49C 80820070 */  lb        $v0, 0x70($a0)
/* D5BA0 8013F4A0 14400004 */  bnez      $v0, .L8013F4B4
/* D5BA4 8013F4A4 00000000 */   nop
/* D5BA8 8013F4A8 3C048015 */  lui       $a0, %hi(gHudElementCacheCapacity)
/* D5BAC 8013F4AC 0804FD32 */  j         .L8013F4C8
/* D5BB0 8013F4B0 8C84EFC4 */   lw       $a0, %lo(gHudElementCacheCapacity)($a0)
.L8013F4B4:
/* D5BB4 8013F4B4 3C028015 */  lui       $v0, %hi(gHudElementCacheCapacity)
/* D5BB8 8013F4B8 8C42EFC4 */  lw        $v0, %lo(gHudElementCacheCapacity)($v0)
/* D5BBC 8013F4BC 00021FC2 */  srl       $v1, $v0, 31
/* D5BC0 8013F4C0 00431021 */  addu      $v0, $v0, $v1
/* D5BC4 8013F4C4 00022043 */  sra       $a0, $v0, 1
.L8013F4C8:
/* D5BC8 8013F4C8 3C028015 */  lui       $v0, %hi(gHudElementCacheSize)
/* D5BCC 8013F4CC 8C42133C */  lw        $v0, %lo(gHudElementCacheSize)($v0)
/* D5BD0 8013F4D0 86430004 */  lh        $v1, 0x4($s2)
/* D5BD4 8013F4D4 8C420000 */  lw        $v0, 0x0($v0)
/* D5BD8 8013F4D8 00431021 */  addu      $v0, $v0, $v1
/* D5BDC 8013F4DC 0044102A */  slt       $v0, $v0, $a0
/* D5BE0 8013F4E0 14400003 */  bnez      $v0, .L8013F4F0
/* D5BE4 8013F4E4 00000000 */   nop
.L8013F4E8:
/* D5BE8 8013F4E8 0804FD3A */  j         .L8013F4E8
/* D5BEC 8013F4EC 00000000 */   nop
.L8013F4F0:
/* D5BF0 8013F4F0 3C04001D */  lui       $a0, %hi(D_1CC310)
/* D5BF4 8013F4F4 2484C310 */  addiu     $a0, $a0, %lo(D_1CC310)
/* D5BF8 8013F4F8 8CA50000 */  lw        $a1, 0x0($a1)
/* D5BFC 8013F4FC 86460004 */  lh        $a2, 0x4($s2)
/* D5C00 8013F500 0C017D24 */  jal       nuPiReadRom
/* D5C04 8013F504 00E42021 */   addu     $a0, $a3, $a0
/* D5C08 8013F508 3C038015 */  lui       $v1, %hi(gHudElementCacheSize)
/* D5C0C 8013F50C 8C63133C */  lw        $v1, %lo(gHudElementCacheSize)($v1)
/* D5C10 8013F510 86440004 */  lh        $a0, 0x4($s2)
/* D5C14 8013F514 8C620000 */  lw        $v0, 0x0($v1)
/* D5C18 8013F518 00441021 */  addu      $v0, $v0, $a0
/* D5C1C 8013F51C AC620000 */  sw        $v0, 0x0($v1)
/* D5C20 8013F520 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* D5C24 8013F524 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* D5C28 8013F528 80420070 */  lb        $v0, 0x70($v0)
/* D5C2C 8013F52C 14400003 */  bnez      $v0, .L8013F53C
/* D5C30 8013F530 00111C00 */   sll      $v1, $s1, 16
/* D5C34 8013F534 0804FD52 */  j         .L8013F548
/* D5C38 8013F538 AE110000 */   sw       $s1, 0x0($s0)
.L8013F53C:
/* D5C3C 8013F53C 96020002 */  lhu       $v0, 0x2($s0)
/* D5C40 8013F540 00431025 */  or        $v0, $v0, $v1
/* D5C44 8013F544 AE020000 */  sw        $v0, 0x0($s0)
.L8013F548:
/* D5C48 8013F548 0804FD62 */  j         .L8013F588
/* D5C4C 8013F54C 26310001 */   addiu    $s1, $s1, 0x1
.L8013F550:
/* D5C50 8013F550 5467000A */  bnel      $v1, $a3, .L8013F57C
/* D5C54 8013F554 24A50008 */   addiu    $a1, $a1, 0x8
/* D5C58 8013F558 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* D5C5C 8013F55C 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* D5C60 8013F560 80420070 */  lb        $v0, 0x70($v0)
/* D5C64 8013F564 1040FFAE */  beqz      $v0, .L8013F420
/* D5C68 8013F568 00111C00 */   sll      $v1, $s1, 16
/* D5C6C 8013F56C 96020002 */  lhu       $v0, 0x2($s0)
/* D5C70 8013F570 00431025 */  or        $v0, $v0, $v1
/* D5C74 8013F574 0804FD62 */  j         .L8013F588
/* D5C78 8013F578 AE020000 */   sw       $v0, 0x0($s0)
.L8013F57C:
/* D5C7C 8013F57C 24840008 */  addiu     $a0, $a0, 0x8
/* D5C80 8013F580 0804FD19 */  j         .L8013F464
/* D5C84 8013F584 26310001 */   addiu    $s1, $s1, 0x1
.L8013F588:
/* D5C88 8013F588 2A2200C0 */  slti      $v0, $s1, 0xC0
/* D5C8C 8013F58C 14400003 */  bnez      $v0, .L8013F59C
/* D5C90 8013F590 26100004 */   addiu    $s0, $s0, 0x4
.L8013F594:
/* D5C94 8013F594 0804FD65 */  j         .L8013F594
/* D5C98 8013F598 00000000 */   nop
.L8013F59C:
/* D5C9C 8013F59C 3C048015 */  lui       $a0, %hi(gHudElementCacheTablePalette)
/* D5CA0 8013F5A0 8C8412D0 */  lw        $a0, %lo(gHudElementCacheTablePalette)($a0)
/* D5CA4 8013F5A4 0000882D */  daddu     $s1, $zero, $zero
/* D5CA8 8013F5A8 24850004 */  addiu     $a1, $a0, 0x4
.L8013F5AC:
/* D5CAC 8013F5AC 8C830000 */  lw        $v1, 0x0($a0)
/* D5CB0 8013F5B0 2402FFFF */  addiu     $v0, $zero, -0x1
/* D5CB4 8013F5B4 14620036 */  bne       $v1, $v0, .L8013F690
/* D5CB8 8013F5B8 00000000 */   nop
/* D5CBC 8013F5BC 3C038015 */  lui       $v1, %hi(gHudElementCacheSize)
/* D5CC0 8013F5C0 8C63133C */  lw        $v1, %lo(gHudElementCacheSize)($v1)
/* D5CC4 8013F5C4 3C028015 */  lui       $v0, %hi(gHudElementCacheBuffer)
/* D5CC8 8013F5C8 8C421314 */  lw        $v0, %lo(gHudElementCacheBuffer)($v0)
/* D5CCC 8013F5CC AC940000 */  sw        $s4, 0x0($a0)
/* D5CD0 8013F5D0 8C630000 */  lw        $v1, 0x0($v1)
/* D5CD4 8013F5D4 3C048007 */  lui       $a0, %hi(gGameStatusPtr)
/* D5CD8 8013F5D8 8C84419C */  lw        $a0, %lo(gGameStatusPtr)($a0)
/* D5CDC 8013F5DC 00431021 */  addu      $v0, $v0, $v1
/* D5CE0 8013F5E0 ACA20000 */  sw        $v0, 0x0($a1)
/* D5CE4 8013F5E4 80820070 */  lb        $v0, 0x70($a0)
/* D5CE8 8013F5E8 14400004 */  bnez      $v0, .L8013F5FC
/* D5CEC 8013F5EC 00000000 */   nop
/* D5CF0 8013F5F0 3C048015 */  lui       $a0, %hi(gHudElementCacheCapacity)
/* D5CF4 8013F5F4 0804FD84 */  j         .L8013F610
/* D5CF8 8013F5F8 8C84EFC4 */   lw       $a0, %lo(gHudElementCacheCapacity)($a0)
.L8013F5FC:
/* D5CFC 8013F5FC 3C028015 */  lui       $v0, %hi(gHudElementCacheCapacity)
/* D5D00 8013F600 8C42EFC4 */  lw        $v0, %lo(gHudElementCacheCapacity)($v0)
/* D5D04 8013F604 00021FC2 */  srl       $v1, $v0, 31
/* D5D08 8013F608 00431021 */  addu      $v0, $v0, $v1
/* D5D0C 8013F60C 00022043 */  sra       $a0, $v0, 1
.L8013F610:
/* D5D10 8013F610 3C028015 */  lui       $v0, %hi(gHudElementCacheSize)
/* D5D14 8013F614 8C42133C */  lw        $v0, %lo(gHudElementCacheSize)($v0)
/* D5D18 8013F618 8C420000 */  lw        $v0, 0x0($v0)
/* D5D1C 8013F61C 24420020 */  addiu     $v0, $v0, 0x20
/* D5D20 8013F620 0044102A */  slt       $v0, $v0, $a0
/* D5D24 8013F624 14400003 */  bnez      $v0, .L8013F634
/* D5D28 8013F628 00000000 */   nop
.L8013F62C:
/* D5D2C 8013F62C 0804FD8B */  j         .L8013F62C
/* D5D30 8013F630 00000000 */   nop
.L8013F634:
/* D5D34 8013F634 3C04001D */  lui       $a0, %hi(D_1CC310)
/* D5D38 8013F638 2484C310 */  addiu     $a0, $a0, %lo(D_1CC310)
/* D5D3C 8013F63C 02842021 */  addu      $a0, $s4, $a0
/* D5D40 8013F640 8CA50000 */  lw        $a1, 0x0($a1)
/* D5D44 8013F644 0C017D24 */  jal       nuPiReadRom
/* D5D48 8013F648 24060020 */   addiu    $a2, $zero, 0x20
/* D5D4C 8013F64C 3C038015 */  lui       $v1, %hi(gHudElementCacheSize)
/* D5D50 8013F650 8C63133C */  lw        $v1, %lo(gHudElementCacheSize)($v1)
/* D5D54 8013F654 8C620000 */  lw        $v0, 0x0($v1)
/* D5D58 8013F658 24420020 */  addiu     $v0, $v0, 0x20
/* D5D5C 8013F65C AC620000 */  sw        $v0, 0x0($v1)
/* D5D60 8013F660 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* D5D64 8013F664 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* D5D68 8013F668 80420070 */  lb        $v0, 0x70($v0)
/* D5D6C 8013F66C 14400003 */  bnez      $v0, .L8013F67C
/* D5D70 8013F670 00111C00 */   sll      $v1, $s1, 16
/* D5D74 8013F674 0804FDA2 */  j         .L8013F688
/* D5D78 8013F678 AE110000 */   sw       $s1, 0x0($s0)
.L8013F67C:
/* D5D7C 8013F67C 96020002 */  lhu       $v0, 0x2($s0)
/* D5D80 8013F680 00431025 */  or        $v0, $v0, $v1
/* D5D84 8013F684 AE020000 */  sw        $v0, 0x0($s0)
.L8013F688:
/* D5D88 8013F688 0804FDB2 */  j         .L8013F6C8
/* D5D8C 8013F68C 26310001 */   addiu    $s1, $s1, 0x1
.L8013F690:
/* D5D90 8013F690 5474000A */  bnel      $v1, $s4, .L8013F6BC
/* D5D94 8013F694 24A50008 */   addiu    $a1, $a1, 0x8
/* D5D98 8013F698 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* D5D9C 8013F69C 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* D5DA0 8013F6A0 80420070 */  lb        $v0, 0x70($v0)
/* D5DA4 8013F6A4 1040FF60 */  beqz      $v0, .L8013F428
/* D5DA8 8013F6A8 00111C00 */   sll      $v1, $s1, 16
/* D5DAC 8013F6AC 96020002 */  lhu       $v0, 0x2($s0)
/* D5DB0 8013F6B0 00431025 */  or        $v0, $v0, $v1
/* D5DB4 8013F6B4 0804FDB2 */  j         .L8013F6C8
/* D5DB8 8013F6B8 AE020000 */   sw       $v0, 0x0($s0)
.L8013F6BC:
/* D5DBC 8013F6BC 24840008 */  addiu     $a0, $a0, 0x8
/* D5DC0 8013F6C0 0804FD6B */  j         .L8013F5AC
/* D5DC4 8013F6C4 26310001 */   addiu    $s1, $s1, 0x1
.L8013F6C8:
/* D5DC8 8013F6C8 2A2200C0 */  slti      $v0, $s1, 0xC0
/* D5DCC 8013F6CC 1440FF2F */  bnez      $v0, .L8013F38C
/* D5DD0 8013F6D0 26100004 */   addiu    $s0, $s0, 0x4
.L8013F6D4:
/* D5DD4 8013F6D4 0804FDB5 */  j         .L8013F6D4
/* D5DD8 8013F6D8 00000000 */   nop
glabel .L8013F6DC
/* D5DDC 8013F6DC 8FBF002C */  lw        $ra, 0x2C($sp)
/* D5DE0 8013F6E0 8FB60028 */  lw        $s6, 0x28($sp)
/* D5DE4 8013F6E4 8FB50024 */  lw        $s5, 0x24($sp)
/* D5DE8 8013F6E8 8FB40020 */  lw        $s4, 0x20($sp)
/* D5DEC 8013F6EC 8FB3001C */  lw        $s3, 0x1C($sp)
/* D5DF0 8013F6F0 8FB20018 */  lw        $s2, 0x18($sp)
/* D5DF4 8013F6F4 8FB10014 */  lw        $s1, 0x14($sp)
/* D5DF8 8013F6F8 8FB00010 */  lw        $s0, 0x10($sp)
/* D5DFC 8013F6FC 03E00008 */  jr        $ra
/* D5E00 8013F700 27BD0030 */   addiu    $sp, $sp, 0x30

### DECOMPILED C INSTRUCTIONS:

void hud_element_load_script(HudElement* hudElement, HudScript* anim) {
    s32* pos = (s32*)anim;
    s32 raster;
    s32 palette;
    s32 preset;
    Vec3s* size;
    HudCacheEntry* entry;
    s32 i;
    s32 capacity;

    if (pos == NULL) {
        return;
    }

    preset = 0;

    while (TRUE) {
        switch (*pos++) {
            case HUD_ELEMENT_OP_End:
                return;
            case HUD_ELEMENT_OP_SetCI:
                pos += 3;
                break;
            case HUD_ELEMENT_OP_SetTileSize:
                preset = *pos++;
                hudElement->drawSizePreset = hudElement->tileSizePreset = preset;
                break;
            case HUD_ELEMENT_OP_SetSizesAutoScale:
            case HUD_ELEMENT_OP_SetSizesFixedScale:
                preset = *pos;
                pos += 2;
                hudElement->drawSizePreset = hudElement->tileSizePreset = preset;
                break;
            case HUD_ELEMENT_OP_SetCustomSize:
                hudElement->customDrawSize.x = hudElement->customImageSize.x = *pos++;
                hudElement->customDrawSize.y = hudElement->customImageSize.y = *pos++;
                hudElement->flags |= HUD_ELEMENT_FLAG_CUSTOM_SIZE;
                break;
            case HUD_ELEMENT_OP_AddTexelOffsetX:
            case HUD_ELEMENT_OP_AddTexelOffsetY:
            case HUD_ELEMENT_OP_SetScale:
            case HUD_ELEMENT_OP_SetAlpha:
            case HUD_ELEMENT_OP_op_15:
            case HUD_ELEMENT_OP_RandomBranch:
            case HUD_ELEMENT_OP_SetFlags:
            case HUD_ELEMENT_OP_ClearFlags:
            case HUD_ELEMENT_OP_PlaySound:
                pos++;
                break;
            case HUD_ELEMENT_OP_SetRGBA:
            case HUD_ELEMENT_OP_SetTexelOffset:
            case HUD_ELEMENT_OP_RandomDelay:
            case HUD_ELEMENT_OP_RandomRestart:
            case HUD_ELEMENT_OP_SetPivot:
                pos += 2;
                break;
            case HUD_ELEMENT_OP_SetImage:
                pos++;
                raster = *pos++;
                palette = *pos++;

                i = 0;
                entry = gHudElementCacheTableRaster;
                while (TRUE) {
                    if (entry->id == -1) {
                        entry->id = raster;
                        entry->data = &gHudElementCacheBuffer[*gHudElementCacheSize];
                        if (!gGameStatusPtr->isBattle) {
                            capacity = gHudElementCacheCapacity;
                        } else {
                            capacity = gHudElementCacheCapacity / 2;
                        }
                        ASSERT(capacity > *gHudElementCacheSize + gHudElementSizes[preset].size);
                        nuPiReadRom((s32)icon_present_ROM_START + raster, entry->data, gHudElementSizes[preset].size);
                        *gHudElementCacheSize += gHudElementSizes[preset].size;
                        if (!gGameStatusPtr->isBattle) {
                            *pos = i;
                        } else {
                            *pos = (u16)(*pos) | (i << 16);
                        }
                        i++;
                        break;
                    } else if (entry->id == raster) {
                        if (!gGameStatusPtr->isBattle) {
                            *pos = i;
                        } else {
                            *pos = (u16)(*pos) | (i << 16);
                        }
                        break;
                    }
                    entry++;
                    i++;
                }

                pos++;
                ASSERT(i < MAX_HUD_CACHE_ENTRIES);

                entry = gHudElementCacheTablePalette;
                i = 0;
                while (TRUE) {
                    if (entry->id == -1) {
                        entry->id = palette;
                        entry->data = &gHudElementCacheBuffer[*gHudElementCacheSize];
                        if (!gGameStatusPtr->isBattle) {
                            capacity = gHudElementCacheCapacity;
                        } else {
                            capacity = gHudElementCacheCapacity / 2;
                        }
                        ASSERT(capacity > *gHudElementCacheSize + 32);
                        nuPiReadRom((s32)icon_present_ROM_START + palette, entry->data, 32);
                        *gHudElementCacheSize += 32;
                        if (!gGameStatusPtr->isBattle) {
                            *pos = i;
                        } else {
                            *pos = (u16)(*pos) | (i << 16);
                        }
                        i++;
                        break;
                    } else if (entry->id == palette) {
                        if (!gGameStatusPtr->isBattle) {
                            *pos = i;
                        } else {
                            *pos = (u16)(*pos) | (i << 16);
                        }
                        break;
                    }
                    entry++;
                    i++;
                }

                pos++;
                ASSERT(i < MAX_HUD_CACHE_ENTRIES);
                break;
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel landing_dust_appendGfx
/* 3288A8 E000C798 27BDFEF8 */  addiu     $sp, $sp, -0x108
/* 3288AC E000C79C AFBE0100 */  sw        $fp, 0x100($sp)
/* 3288B0 E000C7A0 0080F02D */  daddu     $fp, $a0, $zero
/* 3288B4 E000C7A4 3C07DB06 */  lui       $a3, (0xDB060024 >> 16)
/* 3288B8 E000C7A8 34E70024 */  ori       $a3, $a3, (0xDB060024 & 0xFFFF)
/* 3288BC E000C7AC 27A40018 */  addiu     $a0, $sp, 0x18
/* 3288C0 E000C7B0 AFB200E8 */  sw        $s2, 0xE8($sp)
/* 3288C4 E000C7B4 3C120001 */  lui       $s2, (0x11630 >> 16)
/* 3288C8 E000C7B8 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* 3288CC E000C7BC AFB300EC */  sw        $s3, 0xEC($sp)
/* 3288D0 E000C7C0 3C13800A */  lui       $s3, %hi(gMainGfxPos)
/* 3288D4 E000C7C4 2673A66C */  addiu     $s3, $s3, %lo(gMainGfxPos)
/* 3288D8 E000C7C8 AFBF0104 */  sw        $ra, 0x104($sp)
/* 3288DC E000C7CC AFB700FC */  sw        $s7, 0xFC($sp)
/* 3288E0 E000C7D0 AFB600F8 */  sw        $s6, 0xF8($sp)
/* 3288E4 E000C7D4 AFB500F4 */  sw        $s5, 0xF4($sp)
/* 3288E8 E000C7D8 AFB400F0 */  sw        $s4, 0xF0($sp)
/* 3288EC E000C7DC AFB100E4 */  sw        $s1, 0xE4($sp)
/* 3288F0 E000C7E0 AFB000E0 */  sw        $s0, 0xE0($sp)
/* 3288F4 E000C7E4 8E650000 */  lw        $a1, 0x0($s3)
/* 3288F8 E000C7E8 8FD4000C */  lw        $s4, 0xC($fp)
/* 3288FC E000C7EC 00A0182D */  daddu     $v1, $a1, $zero
/* 328900 E000C7F0 24A50008 */  addiu     $a1, $a1, 0x8
/* 328904 E000C7F4 AE650000 */  sw        $a1, 0x0($s3)
/* 328908 E000C7F8 96950000 */  lhu       $s5, 0x0($s4)
/* 32890C E000C7FC 24A20008 */  addiu     $v0, $a1, 0x8
/* 328910 E000C800 AE620000 */  sw        $v0, 0x0($s3)
/* 328914 E000C804 8E880040 */  lw        $t0, 0x40($s4)
/* 328918 E000C808 00151080 */  sll       $v0, $s5, 2
/* 32891C E000C80C 3C17E001 */  lui       $s7, (0xE0010000 >> 16)
/* 328920 E000C810 02E2B821 */  addu      $s7, $s7, $v0
/* 328924 E000C814 8EF7CC10 */  lw        $s7, -0x33F0($s7)
/* 328928 E000C818 3C06E001 */  lui       $a2, (0xE0010000 >> 16)
/* 32892C E000C81C 00C23021 */  addu      $a2, $a2, $v0
/* 328930 E000C820 8CC6CC24 */  lw        $a2, -0x33DC($a2)
/* 328934 E000C824 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 328938 E000C828 AC620000 */  sw        $v0, 0x0($v1)
/* 32893C E000C82C AC600004 */  sw        $zero, 0x4($v1)
/* 328940 E000C830 ACA70000 */  sw        $a3, 0x0($a1)
/* 328944 E000C834 8FC30010 */  lw        $v1, 0x10($fp)
/* 328948 E000C838 24A20010 */  addiu     $v0, $a1, 0x10
/* 32894C E000C83C AE620000 */  sw        $v0, 0x0($s3)
/* 328950 E000C840 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 328954 E000C844 8C63001C */  lw        $v1, 0x1C($v1)
/* 328958 E000C848 310B0007 */  andi      $t3, $t0, 0x7
/* 32895C E000C84C ACA20008 */  sw        $v0, 0x8($a1)
/* 328960 E000C850 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* 328964 E000C854 ACA6000C */  sw        $a2, 0xC($a1)
/* 328968 E000C858 00621821 */  addu      $v1, $v1, $v0
/* 32896C E000C85C 31020038 */  andi      $v0, $t0, 0x38
/* 328970 E000C860 0002B080 */  sll       $s6, $v0, 2
/* 328974 E000C864 ACA30004 */  sw        $v1, 0x4($a1)
/* 328978 E000C868 8E850004 */  lw        $a1, 0x4($s4)
/* 32897C E000C86C 8E860008 */  lw        $a2, 0x8($s4)
/* 328980 E000C870 8E87000C */  lw        $a3, 0xC($s4)
/* 328984 E000C874 31080040 */  andi      $t0, $t0, 0x40
/* 328988 E000C878 AFAB00D8 */  sw        $t3, 0xD8($sp)
/* 32898C E000C87C 0C080108 */  jal       shim_guTranslateF
/* 328990 E000C880 AFA800DC */   sw       $t0, 0xDC($sp)
/* 328994 E000C884 27B00058 */  addiu     $s0, $sp, 0x58
/* 328998 E000C888 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 32899C E000C88C 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 3289A0 E000C890 44800000 */  mtc1      $zero, $f0
/* 3289A4 E000C894 00031080 */  sll       $v0, $v1, 2
/* 3289A8 E000C898 00431021 */  addu      $v0, $v0, $v1
/* 3289AC E000C89C 00021080 */  sll       $v0, $v0, 2
/* 3289B0 E000C8A0 00431023 */  subu      $v0, $v0, $v1
/* 3289B4 E000C8A4 000218C0 */  sll       $v1, $v0, 3
/* 3289B8 E000C8A8 00431021 */  addu      $v0, $v0, $v1
/* 3289BC E000C8AC 000210C0 */  sll       $v0, $v0, 3
/* 3289C0 E000C8B0 44060000 */  mfc1      $a2, $f0
/* 3289C4 E000C8B4 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 3289C8 E000C8B8 00220821 */  addu      $at, $at, $v0
/* 3289CC E000C8BC C4201DEC */  lwc1      $f0, %lo(gCameras + 0x6C)($at)
/* 3289D0 E000C8C0 3C073F80 */  lui       $a3, (0x3F800000 >> 16)
/* 3289D4 E000C8C4 46000007 */  neg.s     $f0, $f0
/* 3289D8 E000C8C8 44050000 */  mfc1      $a1, $f0
/* 3289DC E000C8CC 0200202D */  daddu     $a0, $s0, $zero
/* 3289E0 E000C8D0 0C080104 */  jal       shim_guRotateF
/* 3289E4 E000C8D4 AFA60010 */   sw       $a2, 0x10($sp)
/* 3289E8 E000C8D8 0200202D */  daddu     $a0, $s0, $zero
/* 3289EC E000C8DC 27A50018 */  addiu     $a1, $sp, 0x18
/* 3289F0 E000C8E0 27B00098 */  addiu     $s0, $sp, 0x98
/* 3289F4 E000C8E4 0C080114 */  jal       shim_guMtxCatF
/* 3289F8 E000C8E8 0200302D */   daddu    $a2, $s0, $zero
/* 3289FC E000C8EC 0200202D */  daddu     $a0, $s0, $zero
/* 328A00 E000C8F0 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 328A04 E000C8F4 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 328A08 E000C8F8 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* 328A0C E000C8FC 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* 328A10 E000C900 96050000 */  lhu       $a1, 0x0($s0)
/* 328A14 E000C904 8E220000 */  lw        $v0, 0x0($s1)
/* 328A18 E000C908 00052980 */  sll       $a1, $a1, 6
/* 328A1C E000C90C 00B22821 */  addu      $a1, $a1, $s2
/* 328A20 E000C910 0C080118 */  jal       shim_guMtxF2L
/* 328A24 E000C914 00452821 */   addu     $a1, $v0, $a1
/* 328A28 E000C918 8E650000 */  lw        $a1, 0x0($s3)
/* 328A2C E000C91C 00A0202D */  daddu     $a0, $a1, $zero
/* 328A30 E000C920 24A50008 */  addiu     $a1, $a1, 0x8
/* 328A34 E000C924 AE650000 */  sw        $a1, 0x0($s3)
/* 328A38 E000C928 96020000 */  lhu       $v0, 0x0($s0)
/* 328A3C E000C92C 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 328A40 E000C930 AC830000 */  sw        $v1, 0x0($a0)
/* 328A44 E000C934 24430001 */  addiu     $v1, $v0, 0x1
/* 328A48 E000C938 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 328A4C E000C93C 00021180 */  sll       $v0, $v0, 6
/* 328A50 E000C940 00521021 */  addu      $v0, $v0, $s2
/* 328A54 E000C944 A6030000 */  sh        $v1, 0x0($s0)
/* 328A58 E000C948 8E230000 */  lw        $v1, 0x0($s1)
/* 328A5C E000C94C 02C0802D */  daddu     $s0, $s6, $zero
/* 328A60 E000C950 00621821 */  addu      $v1, $v1, $v0
/* 328A64 E000C954 06A0001D */  bltz      $s5, .LE000C9CC
/* 328A68 E000C958 AC830004 */   sw       $v1, 0x4($a0)
/* 328A6C E000C95C 2AA20002 */  slti      $v0, $s5, 0x2
/* 328A70 E000C960 1040000D */  beqz      $v0, .LE000C998
/* 328A74 E000C964 3C03E6DE */   lui      $v1, (0xE6DEDE6E >> 16)
/* 328A78 E000C968 3463DE6E */  ori       $v1, $v1, (0xE6DEDE6E & 0xFFFF)
/* 328A7C E000C96C 24A20008 */  addiu     $v0, $a1, 0x8
/* 328A80 E000C970 AE620000 */  sw        $v0, 0x0($s3)
/* 328A84 E000C974 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 328A88 E000C978 ACA20000 */  sw        $v0, 0x0($a1)
/* 328A8C E000C97C 24A20010 */  addiu     $v0, $a1, 0x10
/* 328A90 E000C980 ACA30004 */  sw        $v1, 0x4($a1)
/* 328A94 E000C984 AE620000 */  sw        $v0, 0x0($s3)
/* 328A98 E000C988 3C02FB00 */  lui       $v0, (0xFB000000 >> 16)
/* 328A9C E000C98C ACA20008 */  sw        $v0, 0x8($a1)
/* 328AA0 E000C990 08003273 */  j         .LE000C9CC
/* 328AA4 E000C994 ACB6000C */   sw       $s6, 0xC($a1)
.LE000C998:
/* 328AA8 E000C998 2AA20005 */  slti      $v0, $s5, 0x5
/* 328AAC E000C99C 1040000B */  beqz      $v0, .LE000C9CC
/* 328AB0 E000C9A0 3463DE82 */   ori      $v1, $v1, (0xE6DEDE82 & 0xFFFF)
/* 328AB4 E000C9A4 24A20008 */  addiu     $v0, $a1, 0x8
/* 328AB8 E000C9A8 AE620000 */  sw        $v0, 0x0($s3)
/* 328ABC E000C9AC 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 328AC0 E000C9B0 ACA20000 */  sw        $v0, 0x0($a1)
/* 328AC4 E000C9B4 24A20010 */  addiu     $v0, $a1, 0x10
/* 328AC8 E000C9B8 ACA30004 */  sw        $v1, 0x4($a1)
/* 328ACC E000C9BC AE620000 */  sw        $v0, 0x0($s3)
/* 328AD0 E000C9C0 3C02FB00 */  lui       $v0, (0xFB000000 >> 16)
/* 328AD4 E000C9C4 ACA20008 */  sw        $v0, 0x8($a1)
/* 328AD8 E000C9C8 ACB0000C */  sw        $s0, 0xC($a1)
.LE000C9CC:
/* 328ADC E000C9CC 16A00002 */  bnez      $s5, .LE000C9D8
/* 328AE0 E000C9D0 24040020 */   addiu    $a0, $zero, 0x20
/* 328AE4 E000C9D4 24040018 */  addiu     $a0, $zero, 0x18
.LE000C9D8:
/* 328AE8 E000C9D8 3C0A800A */  lui       $t2, %hi(gMainGfxPos)
/* 328AEC E000C9DC 254AA66C */  addiu     $t2, $t2, %lo(gMainGfxPos)
/* 328AF0 E000C9E0 3C09F200 */  lui       $t1, (0xF2000000 >> 16)
/* 328AF4 E000C9E4 8FAB00D8 */  lw        $t3, 0xD8($sp)
/* 328AF8 E000C9E8 8D450000 */  lw        $a1, 0x0($t2)
/* 328AFC E000C9EC 01640018 */  mult      $t3, $a0
/* 328B00 E000C9F0 00043880 */  sll       $a3, $a0, 2
/* 328B04 E000C9F4 00A0182D */  daddu     $v1, $a1, $zero
/* 328B08 E000C9F8 24A50008 */  addiu     $a1, $a1, 0x8
/* 328B0C E000C9FC AD450000 */  sw        $a1, 0x0($t2)
/* 328B10 E000CA00 00004012 */  mflo      $t0
/* 328B14 E000CA04 00081380 */  sll       $v0, $t0, 14
/* 328B18 E000CA08 00491025 */  or        $v0, $v0, $t1
/* 328B1C E000CA0C AC620000 */  sw        $v0, 0x0($v1)
/* 328B20 E000CA10 01041021 */  addu      $v0, $t0, $a0
/* 328B24 E000CA14 00023380 */  sll       $a2, $v0, 14
/* 328B28 E000CA18 00C71025 */  or        $v0, $a2, $a3
/* 328B2C E000CA1C AC620004 */  sw        $v0, 0x4($v1)
/* 328B30 E000CA20 8FAB00DC */  lw        $t3, 0xDC($sp)
/* 328B34 E000CA24 1160000C */  beqz      $t3, .LE000CA58
/* 328B38 E000CA28 24A20008 */   addiu    $v0, $a1, 0x8
/* 328B3C E000CA2C AD420000 */  sw        $v0, 0x0($t2)
/* 328B40 E000CA30 00E91025 */  or        $v0, $a3, $t1
/* 328B44 E000CA34 00C21025 */  or        $v0, $a2, $v0
/* 328B48 E000CA38 ACA20000 */  sw        $v0, 0x0($a1)
/* 328B4C E000CA3C 00041040 */  sll       $v0, $a0, 1
/* 328B50 E000CA40 01021021 */  addu      $v0, $t0, $v0
/* 328B54 E000CA44 00021380 */  sll       $v0, $v0, 14
/* 328B58 E000CA48 000418C0 */  sll       $v1, $a0, 3
/* 328B5C E000CA4C 3C040100 */  lui       $a0, (0x1000000 >> 16)
/* 328B60 E000CA50 0800329E */  j         .LE000CA78
/* 328B64 E000CA54 00641825 */   or       $v1, $v1, $a0
.LE000CA58:
/* 328B68 E000CA58 AD420000 */  sw        $v0, 0x0($t2)
/* 328B6C E000CA5C 00C91025 */  or        $v0, $a2, $t1
/* 328B70 E000CA60 ACA20000 */  sw        $v0, 0x0($a1)
/* 328B74 E000CA64 00041040 */  sll       $v0, $a0, 1
/* 328B78 E000CA68 01021021 */  addu      $v0, $t0, $v0
/* 328B7C E000CA6C 00021380 */  sll       $v0, $v0, 14
/* 328B80 E000CA70 3C030100 */  lui       $v1, (0x1000000 >> 16)
/* 328B84 E000CA74 00E31825 */  or        $v1, $a3, $v1
.LE000CA78:
/* 328B88 E000CA78 00431025 */  or        $v0, $v0, $v1
/* 328B8C E000CA7C ACA20004 */  sw        $v0, 0x4($a1)
/* 328B90 E000CA80 24020002 */  addiu     $v0, $zero, 0x2
/* 328B94 E000CA84 16A2000A */  bne       $s5, $v0, .LE000CAB0
/* 328B98 E000CA88 00000000 */   nop
/* 328B9C E000CA8C 3C03800A */  lui       $v1, %hi(gMainGfxPos)
/* 328BA0 E000CA90 2463A66C */  addiu     $v1, $v1, %lo(gMainGfxPos)
/* 328BA4 E000CA94 8C620000 */  lw        $v0, 0x0($v1)
/* 328BA8 E000CA98 0040202D */  daddu     $a0, $v0, $zero
/* 328BAC E000CA9C 24420008 */  addiu     $v0, $v0, 0x8
/* 328BB0 E000CAA0 AC620000 */  sw        $v0, 0x0($v1)
/* 328BB4 E000CAA4 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 328BB8 E000CAA8 AC820000 */  sw        $v0, 0x0($a0)
/* 328BBC E000CAAC AC970004 */  sw        $s7, 0x4($a0)
.LE000CAB0:
/* 328BC0 E000CAB0 8FC20008 */  lw        $v0, 0x8($fp)
/* 328BC4 E000CAB4 24110001 */  addiu     $s1, $zero, 0x1
/* 328BC8 E000CAB8 0222102A */  slt       $v0, $s1, $v0
/* 328BCC E000CABC 10400036 */  beqz      $v0, .LE000CB98
/* 328BD0 E000CAC0 26940044 */   addiu    $s4, $s4, 0x44
/* 328BD4 E000CAC4 3C16800A */  lui       $s6, %hi(gDisplayContext)
/* 328BD8 E000CAC8 26D6A674 */  addiu     $s6, $s6, %lo(gDisplayContext)
/* 328BDC E000CACC 3C158007 */  lui       $s5, %hi(gMatrixListPos)
/* 328BE0 E000CAD0 26B541F0 */  addiu     $s5, $s5, %lo(gMatrixListPos)
/* 328BE4 E000CAD4 3C130001 */  lui       $s3, (0x11630 >> 16)
/* 328BE8 E000CAD8 36731630 */  ori       $s3, $s3, (0x11630 & 0xFFFF)
/* 328BEC E000CADC 3C12800A */  lui       $s2, %hi(gMainGfxPos)
/* 328BF0 E000CAE0 2652A66C */  addiu     $s2, $s2, %lo(gMainGfxPos)
/* 328BF4 E000CAE4 2690000C */  addiu     $s0, $s4, 0xC
.LE000CAE8:
/* 328BF8 E000CAE8 27A40018 */  addiu     $a0, $sp, 0x18
/* 328BFC E000CAEC 26310001 */  addiu     $s1, $s1, 0x1
/* 328C00 E000CAF0 8E05FFF8 */  lw        $a1, -0x8($s0)
/* 328C04 E000CAF4 8E06FFFC */  lw        $a2, -0x4($s0)
/* 328C08 E000CAF8 8E070000 */  lw        $a3, 0x0($s0)
/* 328C0C E000CAFC 0C080108 */  jal       shim_guTranslateF
/* 328C10 E000CB00 26100044 */   addiu    $s0, $s0, 0x44
/* 328C14 E000CB04 27A40018 */  addiu     $a0, $sp, 0x18
/* 328C18 E000CB08 96A50000 */  lhu       $a1, 0x0($s5)
/* 328C1C E000CB0C 8EC20000 */  lw        $v0, 0x0($s6)
/* 328C20 E000CB10 00052980 */  sll       $a1, $a1, 6
/* 328C24 E000CB14 00B32821 */  addu      $a1, $a1, $s3
/* 328C28 E000CB18 0C080118 */  jal       shim_guMtxF2L
/* 328C2C E000CB1C 00452821 */   addu     $a1, $v0, $a1
/* 328C30 E000CB20 3C06D838 */  lui       $a2, (0xD8380002 >> 16)
/* 328C34 E000CB24 8E440000 */  lw        $a0, 0x0($s2)
/* 328C38 E000CB28 34C60002 */  ori       $a2, $a2, (0xD8380002 & 0xFFFF)
/* 328C3C E000CB2C 0080282D */  daddu     $a1, $a0, $zero
/* 328C40 E000CB30 24840008 */  addiu     $a0, $a0, 0x8
/* 328C44 E000CB34 AE440000 */  sw        $a0, 0x0($s2)
/* 328C48 E000CB38 96A20000 */  lhu       $v0, 0x0($s5)
/* 328C4C E000CB3C 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 328C50 E000CB40 ACA30000 */  sw        $v1, 0x0($a1)
/* 328C54 E000CB44 24430001 */  addiu     $v1, $v0, 0x1
/* 328C58 E000CB48 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 328C5C E000CB4C 00021180 */  sll       $v0, $v0, 6
/* 328C60 E000CB50 A6A30000 */  sh        $v1, 0x0($s5)
/* 328C64 E000CB54 8EC30000 */  lw        $v1, 0x0($s6)
/* 328C68 E000CB58 00531021 */  addu      $v0, $v0, $s3
/* 328C6C E000CB5C 00621821 */  addu      $v1, $v1, $v0
/* 328C70 E000CB60 24820008 */  addiu     $v0, $a0, 0x8
/* 328C74 E000CB64 ACA30004 */  sw        $v1, 0x4($a1)
/* 328C78 E000CB68 AE420000 */  sw        $v0, 0x0($s2)
/* 328C7C E000CB6C 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 328C80 E000CB70 AC820000 */  sw        $v0, 0x0($a0)
/* 328C84 E000CB74 24020040 */  addiu     $v0, $zero, 0x40
/* 328C88 E000CB78 AC970004 */  sw        $s7, 0x4($a0)
/* 328C8C E000CB7C AC860008 */  sw        $a2, 0x8($a0)
/* 328C90 E000CB80 AC82000C */  sw        $v0, 0xC($a0)
/* 328C94 E000CB84 8FC20008 */  lw        $v0, 0x8($fp)
/* 328C98 E000CB88 24840010 */  addiu     $a0, $a0, 0x10
/* 328C9C E000CB8C 0222102A */  slt       $v0, $s1, $v0
/* 328CA0 E000CB90 1440FFD5 */  bnez      $v0, .LE000CAE8
/* 328CA4 E000CB94 AE440000 */   sw       $a0, 0x0($s2)
.LE000CB98:
/* 328CA8 E000CB98 3C03D838 */  lui       $v1, (0xD8380002 >> 16)
/* 328CAC E000CB9C 3C04800A */  lui       $a0, %hi(gMainGfxPos)
/* 328CB0 E000CBA0 2484A66C */  addiu     $a0, $a0, %lo(gMainGfxPos)
/* 328CB4 E000CBA4 8C820000 */  lw        $v0, 0x0($a0)
/* 328CB8 E000CBA8 34630002 */  ori       $v1, $v1, (0xD8380002 & 0xFFFF)
/* 328CBC E000CBAC 0040282D */  daddu     $a1, $v0, $zero
/* 328CC0 E000CBB0 24420008 */  addiu     $v0, $v0, 0x8
/* 328CC4 E000CBB4 AC820000 */  sw        $v0, 0x0($a0)
/* 328CC8 E000CBB8 ACA30000 */  sw        $v1, 0x0($a1)
/* 328CCC E000CBBC 24030040 */  addiu     $v1, $zero, 0x40
/* 328CD0 E000CBC0 ACA30004 */  sw        $v1, 0x4($a1)
/* 328CD4 E000CBC4 24430008 */  addiu     $v1, $v0, 0x8
/* 328CD8 E000CBC8 AC830000 */  sw        $v1, 0x0($a0)
/* 328CDC E000CBCC 3C03E700 */  lui       $v1, (0xE7000000 >> 16)
/* 328CE0 E000CBD0 AC430000 */  sw        $v1, 0x0($v0)
/* 328CE4 E000CBD4 AC400004 */  sw        $zero, 0x4($v0)
/* 328CE8 E000CBD8 8FBF0104 */  lw        $ra, 0x104($sp)
/* 328CEC E000CBDC 8FBE0100 */  lw        $fp, 0x100($sp)
/* 328CF0 E000CBE0 8FB700FC */  lw        $s7, 0xFC($sp)
/* 328CF4 E000CBE4 8FB600F8 */  lw        $s6, 0xF8($sp)
/* 328CF8 E000CBE8 8FB500F4 */  lw        $s5, 0xF4($sp)
/* 328CFC E000CBEC 8FB400F0 */  lw        $s4, 0xF0($sp)
/* 328D00 E000CBF0 8FB300EC */  lw        $s3, 0xEC($sp)
/* 328D04 E000CBF4 8FB200E8 */  lw        $s2, 0xE8($sp)
/* 328D08 E000CBF8 8FB100E4 */  lw        $s1, 0xE4($sp)
/* 328D0C E000CBFC 8FB000E0 */  lw        $s0, 0xE0($sp)
/* 328D10 E000CC00 03E00008 */  jr        $ra
/* 328D14 E000CC04 27BD0108 */   addiu    $sp, $sp, 0x108
/* 328D18 E000CC08 00000000 */  nop
/* 328D1C E000CC0C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void landing_dust_appendGfx(void* effect) {
    LandingDustFXData* part = ((EffectInstance*)effect)->data.landingDust;
    s32 type = part->type;
    s32 temp_t0 = part->unk_40;
    Matrix4f mtx1;
    Matrix4f mtx2;
    Matrix4f mtx3;
    s32 spD8;
    s32 spDC;
    s32 temp_lo;
    s32 envAlpha;
    Gfx* dlist1;
    Gfx* dlist2;
    s32 phi_a0;
    s32 temp;
    s32 i;

    envAlpha = (temp_t0 & 0x38) * 4;

    dlist1 = sDlists[type];
    dlist2 = sDlists2[type];

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

    spD8 = temp_t0 & 7;
    spDC = temp_t0 & 0x40;

    shim_guTranslateF(mtx1, part->x, part->y, part->z);
    shim_guRotateF(mtx2, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
    shim_guMtxCatF(mtx2, mtx1, mtx3);
    shim_guMtxF2L(mtx3, &gDisplayContext->matrixStack[gMatrixListPos]);

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

    switch (type) {
        case 0:
        case 1:
            gDPSetPrimColor(gMainGfxPos++, 0, 0, 230, 222, 222, 110);
            gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, envAlpha);
            break;
        case 2:
        case 3:
        case 4:
            gDPSetPrimColor(gMainGfxPos++, 0, 0, 230, 222, 222, 130);
            gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, envAlpha);
            break;
    }

    if (type == 0) {
        phi_a0 = 24;
    } else {
        phi_a0 = 32;
    }

    temp_lo = spD8 * phi_a0;
    temp = temp_lo + phi_a0;

    gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, temp_lo * 4, 0, temp * 4, phi_a0 * 4);

    if (spDC) {
        gDPSetTileSize(gMainGfxPos++, 1, temp * 4, phi_a0 * 4, (temp_lo + (phi_a0 * 2)) * 4, phi_a0 * 8);
    } else {
        gDPSetTileSize(gMainGfxPos++, 1, temp * 4, 0,          (temp_lo + (phi_a0 * 2)) * 4, phi_a0 * 4);
    }

    if (type == 2) {
        gSPDisplayList(gMainGfxPos++, dlist1);
    }

    part++;

    for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
        shim_guTranslateF(mtx1, part->x, part->y, part->z);
        shim_guMtxF2L(mtx1, &gDisplayContext->matrixStack[gMatrixListPos]);
        gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
                  G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
        gSPDisplayList(gMainGfxPos++, dlist1);
        gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    }

    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    gDPPipeSync(gMainGfxPos++);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel __moddi3
/* 491C0 8006DDC0 27BDFFE8 */  addiu     $sp, $sp, -0x18
/* 491C4 8006DDC4 AFB20010 */  sw        $s2, 0x10($sp)
/* 491C8 8006DDC8 0000902D */  daddu     $s2, $zero, $zero
/* 491CC 8006DDCC AFB1000C */  sw        $s1, 0xC($sp)
/* 491D0 8006DDD0 04810008 */  bgez      $a0, .L8006DDF4
/* 491D4 8006DDD4 AFB00008 */   sw       $s0, 0x8($sp)
/* 491D8 8006DDD8 2412FFFF */  addiu     $s2, $zero, -0x1
/* 491DC 8006DDDC 00054823 */  negu      $t1, $a1
/* 491E0 8006DDE0 00041823 */  negu      $v1, $a0
/* 491E4 8006DDE4 0009102B */  sltu      $v0, $zero, $t1
/* 491E8 8006DDE8 00624023 */  subu      $t0, $v1, $v0
/* 491EC 8006DDEC 0100202D */  daddu     $a0, $t0, $zero
/* 491F0 8006DDF0 0120282D */  daddu     $a1, $t1, $zero
.L8006DDF4:
/* 491F4 8006DDF4 04C10008 */  bgez      $a2, .L8006DE18
/* 491F8 8006DDF8 00E0402D */   daddu    $t0, $a3, $zero
/* 491FC 8006DDFC 00075823 */  negu      $t3, $a3
/* 49200 8006DE00 00061823 */  negu      $v1, $a2
/* 49204 8006DE04 000B102B */  sltu      $v0, $zero, $t3
/* 49208 8006DE08 00625023 */  subu      $t2, $v1, $v0
/* 4920C 8006DE0C 0140302D */  daddu     $a2, $t2, $zero
/* 49210 8006DE10 0160382D */  daddu     $a3, $t3, $zero
/* 49214 8006DE14 00E0402D */  daddu     $t0, $a3, $zero
.L8006DE18:
/* 49218 8006DE18 00C0482D */  daddu     $t1, $a2, $zero
/* 4921C 8006DE1C 00A0582D */  daddu     $t3, $a1, $zero
/* 49220 8006DE20 0080502D */  daddu     $t2, $a0, $zero
/* 49224 8006DE24 152000A6 */  bnez      $t1, .L8006E0C0
/* 49228 8006DE28 03A0C82D */   daddu    $t9, $sp, $zero
/* 4922C 8006DE2C 0148102B */  sltu      $v0, $t2, $t0
/* 49230 8006DE30 1040001D */  beqz      $v0, .L8006DEA8
/* 49234 8006DE34 3402FFFF */   ori      $v0, $zero, 0xFFFF
/* 49238 8006DE38 0048102B */  sltu      $v0, $v0, $t0
/* 4923C 8006DE3C 14400005 */  bnez      $v0, .L8006DE54
/* 49240 8006DE40 00E0182D */   daddu    $v1, $a3, $zero
/* 49244 8006DE44 2D020100 */  sltiu     $v0, $t0, 0x100
/* 49248 8006DE48 38420001 */  xori      $v0, $v0, 0x1
/* 4924C 8006DE4C 0801B79B */  j         .L8006DE6C
/* 49250 8006DE50 000220C0 */   sll      $a0, $v0, 3
.L8006DE54:
/* 49254 8006DE54 3C0200FF */  lui       $v0, (0xFFFFFF >> 16)
/* 49258 8006DE58 3442FFFF */  ori       $v0, $v0, (0xFFFFFF & 0xFFFF)
/* 4925C 8006DE5C 0048102B */  sltu      $v0, $v0, $t0
/* 49260 8006DE60 14400002 */  bnez      $v0, .L8006DE6C
/* 49264 8006DE64 24040018 */   addiu    $a0, $zero, 0x18
/* 49268 8006DE68 24040010 */  addiu     $a0, $zero, 0x10
.L8006DE6C:
/* 4926C 8006DE6C 00831006 */  srlv      $v0, $v1, $a0
/* 49270 8006DE70 3C01800A */  lui       $at, %hi(D_80099F40)
/* 49274 8006DE74 00220821 */  addu      $at, $at, $v0
/* 49278 8006DE78 90229F40 */  lbu       $v0, %lo(D_80099F40)($at)
/* 4927C 8006DE7C 00441021 */  addu      $v0, $v0, $a0
/* 49280 8006DE80 24040020 */  addiu     $a0, $zero, 0x20
/* 49284 8006DE84 00826823 */  subu      $t5, $a0, $v0
/* 49288 8006DE88 11A0005B */  beqz      $t5, .L8006DFF8
/* 4928C 8006DE8C 01AA1804 */   sllv     $v1, $t2, $t5
/* 49290 8006DE90 01A84004 */  sllv      $t0, $t0, $t5
/* 49294 8006DE94 008D1023 */  subu      $v0, $a0, $t5
/* 49298 8006DE98 004B1006 */  srlv      $v0, $t3, $v0
/* 4929C 8006DE9C 00625025 */  or        $t2, $v1, $v0
/* 492A0 8006DEA0 0801B7FE */  j         .L8006DFF8
/* 492A4 8006DEA4 01AB5804 */   sllv     $t3, $t3, $t5
.L8006DEA8:
/* 492A8 8006DEA8 15000008 */  bnez      $t0, .L8006DECC
/* 492AC 8006DEAC 0048102B */   sltu     $v0, $v0, $t0
/* 492B0 8006DEB0 24020001 */  addiu     $v0, $zero, 0x1
/* 492B4 8006DEB4 15200002 */  bnez      $t1, .L8006DEC0
/* 492B8 8006DEB8 0049001B */   divu     $zero, $v0, $t1
/* 492BC 8006DEBC 0007000D */  break     7
.L8006DEC0:
/* 492C0 8006DEC0 00004012 */  mflo      $t0
/* 492C4 8006DEC4 3402FFFF */  ori       $v0, $zero, 0xFFFF
/* 492C8 8006DEC8 0048102B */  sltu      $v0, $v0, $t0
.L8006DECC:
/* 492CC 8006DECC 14400005 */  bnez      $v0, .L8006DEE4
/* 492D0 8006DED0 0100202D */   daddu    $a0, $t0, $zero
/* 492D4 8006DED4 2D020100 */  sltiu     $v0, $t0, 0x100
/* 492D8 8006DED8 38420001 */  xori      $v0, $v0, 0x1
/* 492DC 8006DEDC 0801B7BF */  j         .L8006DEFC
/* 492E0 8006DEE0 000218C0 */   sll      $v1, $v0, 3
.L8006DEE4:
/* 492E4 8006DEE4 3C0200FF */  lui       $v0, (0xFFFFFF >> 16)
/* 492E8 8006DEE8 3442FFFF */  ori       $v0, $v0, (0xFFFFFF & 0xFFFF)
/* 492EC 8006DEEC 0048102B */  sltu      $v0, $v0, $t0
/* 492F0 8006DEF0 14400002 */  bnez      $v0, .L8006DEFC
/* 492F4 8006DEF4 24030018 */   addiu    $v1, $zero, 0x18
/* 492F8 8006DEF8 24030010 */  addiu     $v1, $zero, 0x10
.L8006DEFC:
/* 492FC 8006DEFC 00641006 */  srlv      $v0, $a0, $v1
/* 49300 8006DF00 3C01800A */  lui       $at, %hi(D_80099F40)
/* 49304 8006DF04 00220821 */  addu      $at, $at, $v0
/* 49308 8006DF08 90229F40 */  lbu       $v0, %lo(D_80099F40)($at)
/* 4930C 8006DF0C 00431021 */  addu      $v0, $v0, $v1
/* 49310 8006DF10 24030020 */  addiu     $v1, $zero, 0x20
/* 49314 8006DF14 00626823 */  subu      $t5, $v1, $v0
/* 49318 8006DF18 15A00003 */  bnez      $t5, .L8006DF28
/* 4931C 8006DF1C 006DC023 */   subu     $t8, $v1, $t5
/* 49320 8006DF20 0801B7FE */  j         .L8006DFF8
/* 49324 8006DF24 01485023 */   subu     $t2, $t2, $t0
.L8006DF28:
/* 49328 8006DF28 01A84004 */  sllv      $t0, $t0, $t5
/* 4932C 8006DF2C 030A2006 */  srlv      $a0, $t2, $t8
/* 49330 8006DF30 01AA1804 */  sllv      $v1, $t2, $t5
/* 49334 8006DF34 030B1006 */  srlv      $v0, $t3, $t8
/* 49338 8006DF38 00625025 */  or        $t2, $v1, $v0
/* 4933C 8006DF3C 00082C02 */  srl       $a1, $t0, 16
/* 49340 8006DF40 14A00002 */  bnez      $a1, .L8006DF4C
/* 49344 8006DF44 0085001B */   divu     $zero, $a0, $a1
/* 49348 8006DF48 0007000D */  break     7
.L8006DF4C:
/* 4934C 8006DF4C 00001012 */  mflo      $v0
/* 49350 8006DF50 00001810 */  mfhi      $v1
/* 49354 8006DF54 3106FFFF */  andi      $a2, $t0, 0xFFFF
/* 49358 8006DF58 00000000 */  nop
/* 4935C 8006DF5C 00460018 */  mult      $v0, $a2
/* 49360 8006DF60 00031C00 */  sll       $v1, $v1, 16
/* 49364 8006DF64 000A1402 */  srl       $v0, $t2, 16
/* 49368 8006DF68 00621825 */  or        $v1, $v1, $v0
/* 4936C 8006DF6C 00002012 */  mflo      $a0
/* 49370 8006DF70 0064102B */  sltu      $v0, $v1, $a0
/* 49374 8006DF74 10400008 */  beqz      $v0, .L8006DF98
/* 49378 8006DF78 01AB5804 */   sllv     $t3, $t3, $t5
/* 4937C 8006DF7C 00681821 */  addu      $v1, $v1, $t0
/* 49380 8006DF80 0068102B */  sltu      $v0, $v1, $t0
/* 49384 8006DF84 54400005 */  bnel      $v0, $zero, .L8006DF9C
/* 49388 8006DF88 00641823 */   subu     $v1, $v1, $a0
/* 4938C 8006DF8C 0064102B */  sltu      $v0, $v1, $a0
/* 49390 8006DF90 54400001 */  bnel      $v0, $zero, .L8006DF98
/* 49394 8006DF94 00681821 */   addu     $v1, $v1, $t0
.L8006DF98:
/* 49398 8006DF98 00641823 */  subu      $v1, $v1, $a0
.L8006DF9C:
/* 4939C 8006DF9C 14A00002 */  bnez      $a1, .L8006DFA8
/* 493A0 8006DFA0 0065001B */   divu     $zero, $v1, $a1
/* 493A4 8006DFA4 0007000D */  break     7
.L8006DFA8:
/* 493A8 8006DFA8 00001012 */  mflo      $v0
/* 493AC 8006DFAC 00001810 */  mfhi      $v1
/* 493B0 8006DFB0 00000000 */  nop
/* 493B4 8006DFB4 00000000 */  nop
/* 493B8 8006DFB8 00460018 */  mult      $v0, $a2
/* 493BC 8006DFBC 00031C00 */  sll       $v1, $v1, 16
/* 493C0 8006DFC0 3142FFFF */  andi      $v0, $t2, 0xFFFF
/* 493C4 8006DFC4 00621825 */  or        $v1, $v1, $v0
/* 493C8 8006DFC8 00002012 */  mflo      $a0
/* 493CC 8006DFCC 0064102B */  sltu      $v0, $v1, $a0
/* 493D0 8006DFD0 50400009 */  beql      $v0, $zero, .L8006DFF8
/* 493D4 8006DFD4 00645023 */   subu     $t2, $v1, $a0
/* 493D8 8006DFD8 00681821 */  addu      $v1, $v1, $t0
/* 493DC 8006DFDC 0068102B */  sltu      $v0, $v1, $t0
/* 493E0 8006DFE0 14400005 */  bnez      $v0, .L8006DFF8
/* 493E4 8006DFE4 00645023 */   subu     $t2, $v1, $a0
/* 493E8 8006DFE8 0064102B */  sltu      $v0, $v1, $a0
/* 493EC 8006DFEC 54400001 */  bnel      $v0, $zero, .L8006DFF4
/* 493F0 8006DFF0 00681821 */   addu     $v1, $v1, $t0
.L8006DFF4:
/* 493F4 8006DFF4 00645023 */  subu      $t2, $v1, $a0
.L8006DFF8:
/* 493F8 8006DFF8 00082C02 */  srl       $a1, $t0, 16
/* 493FC 8006DFFC 14A00002 */  bnez      $a1, .L8006E008
/* 49400 8006E000 0145001B */   divu     $zero, $t2, $a1
/* 49404 8006E004 0007000D */  break     7
.L8006E008:
/* 49408 8006E008 00001012 */  mflo      $v0
/* 4940C 8006E00C 00001810 */  mfhi      $v1
/* 49410 8006E010 3106FFFF */  andi      $a2, $t0, 0xFFFF
/* 49414 8006E014 00000000 */  nop
/* 49418 8006E018 00460018 */  mult      $v0, $a2
/* 4941C 8006E01C 00031C00 */  sll       $v1, $v1, 16
/* 49420 8006E020 000B1402 */  srl       $v0, $t3, 16
/* 49424 8006E024 00621825 */  or        $v1, $v1, $v0
/* 49428 8006E028 00002012 */  mflo      $a0
/* 4942C 8006E02C 0064102B */  sltu      $v0, $v1, $a0
/* 49430 8006E030 50400009 */  beql      $v0, $zero, .L8006E058
/* 49434 8006E034 00641823 */   subu     $v1, $v1, $a0
/* 49438 8006E038 00681821 */  addu      $v1, $v1, $t0
/* 4943C 8006E03C 0068102B */  sltu      $v0, $v1, $t0
/* 49440 8006E040 54400005 */  bnel      $v0, $zero, .L8006E058
/* 49444 8006E044 00641823 */   subu     $v1, $v1, $a0
/* 49448 8006E048 0064102B */  sltu      $v0, $v1, $a0
/* 4944C 8006E04C 54400001 */  bnel      $v0, $zero, .L8006E054
/* 49450 8006E050 00681821 */   addu     $v1, $v1, $t0
.L8006E054:
/* 49454 8006E054 00641823 */  subu      $v1, $v1, $a0
.L8006E058:
/* 49458 8006E058 14A00002 */  bnez      $a1, .L8006E064
/* 4945C 8006E05C 0065001B */   divu     $zero, $v1, $a1
/* 49460 8006E060 0007000D */  break     7
.L8006E064:
/* 49464 8006E064 00001012 */  mflo      $v0
/* 49468 8006E068 00001810 */  mfhi      $v1
/* 4946C 8006E06C 00000000 */  nop
/* 49470 8006E070 00000000 */  nop
/* 49474 8006E074 00460018 */  mult      $v0, $a2
/* 49478 8006E078 00031C00 */  sll       $v1, $v1, 16
/* 4947C 8006E07C 3162FFFF */  andi      $v0, $t3, 0xFFFF
/* 49480 8006E080 00621825 */  or        $v1, $v1, $v0
/* 49484 8006E084 00002012 */  mflo      $a0
/* 49488 8006E088 0064102B */  sltu      $v0, $v1, $a0
/* 4948C 8006E08C 10400007 */  beqz      $v0, .L8006E0AC
/* 49490 8006E090 00000000 */   nop
/* 49494 8006E094 00681821 */  addu      $v1, $v1, $t0
/* 49498 8006E098 0068102B */  sltu      $v0, $v1, $t0
/* 4949C 8006E09C 14400003 */  bnez      $v0, .L8006E0AC
/* 494A0 8006E0A0 0064102B */   sltu     $v0, $v1, $a0
/* 494A4 8006E0A4 54400001 */  bnel      $v0, $zero, .L8006E0AC
/* 494A8 8006E0A8 00681821 */   addu     $v1, $v1, $t0
.L8006E0AC:
/* 494AC 8006E0AC 13200087 */  beqz      $t9, .L8006E2CC
/* 494B0 8006E0B0 00645823 */   subu     $t3, $v1, $a0
/* 494B4 8006E0B4 01AB7806 */  srlv      $t7, $t3, $t5
/* 494B8 8006E0B8 0801B8B1 */  j         .L8006E2C4
/* 494BC 8006E0BC 0000702D */   daddu    $t6, $zero, $zero
.L8006E0C0:
/* 494C0 8006E0C0 0149102B */  sltu      $v0, $t2, $t1
/* 494C4 8006E0C4 10400007 */  beqz      $v0, .L8006E0E4
/* 494C8 8006E0C8 3402FFFF */   ori      $v0, $zero, 0xFFFF
/* 494CC 8006E0CC 00A0782D */  daddu     $t7, $a1, $zero
/* 494D0 8006E0D0 0140702D */  daddu     $t6, $t2, $zero
/* 494D4 8006E0D4 AFAE0000 */  sw        $t6, 0x0($sp)
/* 494D8 8006E0D8 AFAF0004 */  sw        $t7, 0x4($sp)
/* 494DC 8006E0DC 0801B8B3 */  j         .L8006E2CC
/* 494E0 8006E0E0 00000000 */   nop
.L8006E0E4:
/* 494E4 8006E0E4 0049102B */  sltu      $v0, $v0, $t1
/* 494E8 8006E0E8 14400005 */  bnez      $v0, .L8006E100
/* 494EC 8006E0EC 0120202D */   daddu    $a0, $t1, $zero
/* 494F0 8006E0F0 2D220100 */  sltiu     $v0, $t1, 0x100
/* 494F4 8006E0F4 38420001 */  xori      $v0, $v0, 0x1
/* 494F8 8006E0F8 0801B846 */  j         .L8006E118
/* 494FC 8006E0FC 000218C0 */   sll      $v1, $v0, 3
.L8006E100:
/* 49500 8006E100 3C0200FF */  lui       $v0, (0xFFFFFF >> 16)
/* 49504 8006E104 3442FFFF */  ori       $v0, $v0, (0xFFFFFF & 0xFFFF)
/* 49508 8006E108 0049102B */  sltu      $v0, $v0, $t1
/* 4950C 8006E10C 14400002 */  bnez      $v0, .L8006E118
/* 49510 8006E110 24030018 */   addiu    $v1, $zero, 0x18
/* 49514 8006E114 24030010 */  addiu     $v1, $zero, 0x10
.L8006E118:
/* 49518 8006E118 00641006 */  srlv      $v0, $a0, $v1
/* 4951C 8006E11C 3C01800A */  lui       $at, %hi(D_80099F40)
/* 49520 8006E120 00220821 */  addu      $at, $at, $v0
/* 49524 8006E124 90229F40 */  lbu       $v0, %lo(D_80099F40)($at)
/* 49528 8006E128 00431021 */  addu      $v0, $v0, $v1
/* 4952C 8006E12C 24030020 */  addiu     $v1, $zero, 0x20
/* 49530 8006E130 00626823 */  subu      $t5, $v1, $v0
/* 49534 8006E134 15A0000F */  bnez      $t5, .L8006E174
/* 49538 8006E138 006DC023 */   subu     $t8, $v1, $t5
/* 4953C 8006E13C 012A102B */  sltu      $v0, $t1, $t2
/* 49540 8006E140 14400004 */  bnez      $v0, .L8006E154
/* 49544 8006E144 01682023 */   subu     $a0, $t3, $t0
/* 49548 8006E148 0168102B */  sltu      $v0, $t3, $t0
/* 4954C 8006E14C 14400005 */  bnez      $v0, .L8006E164
/* 49550 8006E150 00000000 */   nop
.L8006E154:
/* 49554 8006E154 01491823 */  subu      $v1, $t2, $t1
/* 49558 8006E158 0164102B */  sltu      $v0, $t3, $a0
/* 4955C 8006E15C 00625023 */  subu      $t2, $v1, $v0
/* 49560 8006E160 0080582D */  daddu     $t3, $a0, $zero
.L8006E164:
/* 49564 8006E164 13200059 */  beqz      $t9, .L8006E2CC
/* 49568 8006E168 0160782D */   daddu    $t7, $t3, $zero
/* 4956C 8006E16C 0801B8B1 */  j         .L8006E2C4
/* 49570 8006E170 0140702D */   daddu    $t6, $t2, $zero
.L8006E174:
/* 49574 8006E174 01A91804 */  sllv      $v1, $t1, $t5
/* 49578 8006E178 03081006 */  srlv      $v0, $t0, $t8
/* 4957C 8006E17C 00624825 */  or        $t1, $v1, $v0
/* 49580 8006E180 01A84004 */  sllv      $t0, $t0, $t5
/* 49584 8006E184 030A2006 */  srlv      $a0, $t2, $t8
/* 49588 8006E188 01AA1804 */  sllv      $v1, $t2, $t5
/* 4958C 8006E18C 030B1006 */  srlv      $v0, $t3, $t8
/* 49590 8006E190 00625025 */  or        $t2, $v1, $v0
/* 49594 8006E194 00093402 */  srl       $a2, $t1, 16
/* 49598 8006E198 14C00002 */  bnez      $a2, .L8006E1A4
/* 4959C 8006E19C 0086001B */   divu     $zero, $a0, $a2
/* 495A0 8006E1A0 0007000D */  break     7
.L8006E1A4:
/* 495A4 8006E1A4 00003812 */  mflo      $a3
/* 495A8 8006E1A8 00001810 */  mfhi      $v1
/* 495AC 8006E1AC 312CFFFF */  andi      $t4, $t1, 0xFFFF
/* 495B0 8006E1B0 00000000 */  nop
/* 495B4 8006E1B4 00EC0018 */  mult      $a3, $t4
/* 495B8 8006E1B8 000A1402 */  srl       $v0, $t2, 16
/* 495BC 8006E1BC 00031C00 */  sll       $v1, $v1, 16
/* 495C0 8006E1C0 00621825 */  or        $v1, $v1, $v0
/* 495C4 8006E1C4 00002812 */  mflo      $a1
/* 495C8 8006E1C8 0065102B */  sltu      $v0, $v1, $a1
/* 495CC 8006E1CC 1040000A */  beqz      $v0, .L8006E1F8
/* 495D0 8006E1D0 01AB5804 */   sllv     $t3, $t3, $t5
/* 495D4 8006E1D4 00691821 */  addu      $v1, $v1, $t1
/* 495D8 8006E1D8 0069102B */  sltu      $v0, $v1, $t1
/* 495DC 8006E1DC 14400006 */  bnez      $v0, .L8006E1F8
/* 495E0 8006E1E0 24E7FFFF */   addiu    $a3, $a3, -0x1
/* 495E4 8006E1E4 0065102B */  sltu      $v0, $v1, $a1
/* 495E8 8006E1E8 50400004 */  beql      $v0, $zero, .L8006E1FC
/* 495EC 8006E1EC 00651823 */   subu     $v1, $v1, $a1
/* 495F0 8006E1F0 24E7FFFF */  addiu     $a3, $a3, -0x1
/* 495F4 8006E1F4 00691821 */  addu      $v1, $v1, $t1
.L8006E1F8:
/* 495F8 8006E1F8 00651823 */  subu      $v1, $v1, $a1
.L8006E1FC:
/* 495FC 8006E1FC 14C00002 */  bnez      $a2, .L8006E208
/* 49600 8006E200 0066001B */   divu     $zero, $v1, $a2
/* 49604 8006E204 0007000D */  break     7
.L8006E208:
/* 49608 8006E208 00002012 */  mflo      $a0
/* 4960C 8006E20C 00001810 */  mfhi      $v1
/* 49610 8006E210 00000000 */  nop
/* 49614 8006E214 00000000 */  nop
/* 49618 8006E218 008C0018 */  mult      $a0, $t4
/* 4961C 8006E21C 3142FFFF */  andi      $v0, $t2, 0xFFFF
/* 49620 8006E220 00031C00 */  sll       $v1, $v1, 16
/* 49624 8006E224 00621825 */  or        $v1, $v1, $v0
/* 49628 8006E228 00002812 */  mflo      $a1
/* 4962C 8006E22C 0065102B */  sltu      $v0, $v1, $a1
/* 49630 8006E230 5040000B */  beql      $v0, $zero, .L8006E260
/* 49634 8006E234 00655023 */   subu     $t2, $v1, $a1
/* 49638 8006E238 00691821 */  addu      $v1, $v1, $t1
/* 4963C 8006E23C 0069102B */  sltu      $v0, $v1, $t1
/* 49640 8006E240 14400006 */  bnez      $v0, .L8006E25C
/* 49644 8006E244 2484FFFF */   addiu    $a0, $a0, -0x1
/* 49648 8006E248 0065102B */  sltu      $v0, $v1, $a1
/* 4964C 8006E24C 10400004 */  beqz      $v0, .L8006E260
/* 49650 8006E250 00655023 */   subu     $t2, $v1, $a1
/* 49654 8006E254 2484FFFF */  addiu     $a0, $a0, -0x1
/* 49658 8006E258 00691821 */  addu      $v1, $v1, $t1
.L8006E25C:
/* 4965C 8006E25C 00655023 */  subu      $t2, $v1, $a1
.L8006E260:
/* 49660 8006E260 00071400 */  sll       $v0, $a3, 16
/* 49664 8006E264 00441025 */  or        $v0, $v0, $a0
/* 49668 8006E268 00480019 */  multu     $v0, $t0
/* 4966C 8006E26C 00003010 */  mfhi      $a2
/* 49670 8006E270 0146102B */  sltu      $v0, $t2, $a2
/* 49674 8006E274 00002812 */  mflo      $a1
/* 49678 8006E278 54400005 */  bnel      $v0, $zero, .L8006E290
/* 4967C 8006E27C 00A82023 */   subu     $a0, $a1, $t0
/* 49680 8006E280 14CA0007 */  bne       $a2, $t2, .L8006E2A0
/* 49684 8006E284 0165102B */   sltu     $v0, $t3, $a1
/* 49688 8006E288 10400005 */  beqz      $v0, .L8006E2A0
/* 4968C 8006E28C 00A82023 */   subu     $a0, $a1, $t0
.L8006E290:
/* 49690 8006E290 00C91823 */  subu      $v1, $a2, $t1
/* 49694 8006E294 00A4102B */  sltu      $v0, $a1, $a0
/* 49698 8006E298 00623023 */  subu      $a2, $v1, $v0
/* 4969C 8006E29C 0080282D */  daddu     $a1, $a0, $zero
.L8006E2A0:
/* 496A0 8006E2A0 1320000A */  beqz      $t9, .L8006E2CC
/* 496A4 8006E2A4 01651823 */   subu     $v1, $t3, $a1
/* 496A8 8006E2A8 01462023 */  subu      $a0, $t2, $a2
/* 496AC 8006E2AC 0163102B */  sltu      $v0, $t3, $v1
/* 496B0 8006E2B0 00825023 */  subu      $t2, $a0, $v0
/* 496B4 8006E2B4 030A1004 */  sllv      $v0, $t2, $t8
/* 496B8 8006E2B8 01A31806 */  srlv      $v1, $v1, $t5
/* 496BC 8006E2BC 00437825 */  or        $t7, $v0, $v1
/* 496C0 8006E2C0 01AA7006 */  srlv      $t6, $t2, $t5
.L8006E2C4:
/* 496C4 8006E2C4 AF2E0000 */  sw        $t6, 0x0($t9)
/* 496C8 8006E2C8 AF2F0004 */  sw        $t7, 0x4($t9)
.L8006E2CC:
/* 496CC 8006E2CC 12400009 */  beqz      $s2, .L8006E2F4
/* 496D0 8006E2D0 00000000 */   nop
/* 496D4 8006E2D4 8FA20000 */  lw        $v0, 0x0($sp)
/* 496D8 8006E2D8 8FA30004 */  lw        $v1, 0x4($sp)
/* 496DC 8006E2DC 00038823 */  negu      $s1, $v1
/* 496E0 8006E2E0 00021023 */  negu      $v0, $v0
/* 496E4 8006E2E4 0011202B */  sltu      $a0, $zero, $s1
/* 496E8 8006E2E8 00448023 */  subu      $s0, $v0, $a0
/* 496EC 8006E2EC AFB00000 */  sw        $s0, 0x0($sp)
/* 496F0 8006E2F0 AFB10004 */  sw        $s1, 0x4($sp)
.L8006E2F4:
/* 496F4 8006E2F4 8FA20000 */  lw        $v0, 0x0($sp)
/* 496F8 8006E2F8 8FA30004 */  lw        $v1, 0x4($sp)
/* 496FC 8006E2FC 8FB20010 */  lw        $s2, 0x10($sp)
/* 49700 8006E300 8FB1000C */  lw        $s1, 0xC($sp)
/* 49704 8006E304 8FB00008 */  lw        $s0, 0x8($sp)
/* 49708 8006E308 03E00008 */  jr        $ra
/* 4970C 8006E30C 27BD0018 */   addiu    $sp, $sp, 0x18

### DECOMPILED C INSTRUCTIONS:

DItype __moddi3(DItype u, DItype v) {
    word_type c = 0;
    DIunion uu, vv;
    DItype w;

    uu.ll = u;
    vv.ll = v;

    if (uu.s.high < 0) {
        c = ~c;
        uu.ll = __negdi2(uu.ll);
    }

    if (vv.s.high < 0) {
        vv.ll = __negdi2(vv.ll);
    }

    __udivmoddi4 (uu.ll, vv.ll, &w);
    if (c) {
        w = __negdi2(w);
    }

    return w;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_80273444
/* 1A1D24 80273444 27BDFFA0 */  addiu     $sp, $sp, -0x60
/* 1A1D28 80273448 AFB20020 */  sw        $s2, 0x20($sp)
/* 1A1D2C 8027344C 3C12800E */  lui       $s2, %hi(gBattleStatus + 0xD8)
/* 1A1D30 80273450 8E52C148 */  lw        $s2, %lo(gBattleStatus + 0xD8)($s2)
/* 1A1D34 80273454 AFB30024 */  sw        $s3, 0x24($sp)
/* 1A1D38 80273458 0080982D */  daddu     $s3, $a0, $zero
/* 1A1D3C 8027345C AFBF0028 */  sw        $ra, 0x28($sp)
/* 1A1D40 80273460 AFB1001C */  sw        $s1, 0x1C($sp)
/* 1A1D44 80273464 AFB00018 */  sw        $s0, 0x18($sp)
/* 1A1D48 80273468 F7BE0058 */  sdc1      $f30, 0x58($sp)
/* 1A1D4C 8027346C F7BC0050 */  sdc1      $f28, 0x50($sp)
/* 1A1D50 80273470 F7BA0048 */  sdc1      $f26, 0x48($sp)
/* 1A1D54 80273474 F7B80040 */  sdc1      $f24, 0x40($sp)
/* 1A1D58 80273478 F7B60038 */  sdc1      $f22, 0x38($sp)
/* 1A1D5C 8027347C F7B40030 */  sdc1      $f20, 0x30($sp)
/* 1A1D60 80273480 8E70000C */  lw        $s0, 0xC($s3)
/* 1A1D64 80273484 10A00002 */  beqz      $a1, .L80273490
/* 1A1D68 80273488 2651000C */   addiu    $s1, $s2, 0xC
/* 1A1D6C 8027348C AE600070 */  sw        $zero, 0x70($s3)
.L80273490:
/* 1A1D70 80273490 8E620070 */  lw        $v0, 0x70($s3)
/* 1A1D74 80273494 14400081 */  bnez      $v0, .L8027369C
/* 1A1D78 80273498 00000000 */   nop
/* 1A1D7C 8027349C 8E050000 */  lw        $a1, 0x0($s0)
/* 1A1D80 802734A0 26100004 */  addiu     $s0, $s0, 0x4
/* 1A1D84 802734A4 0C0B1EAF */  jal       evt_get_variable
/* 1A1D88 802734A8 0260202D */   daddu    $a0, $s3, $zero
/* 1A1D8C 802734AC A6420070 */  sh        $v0, 0x70($s2)
/* 1A1D90 802734B0 8E050000 */  lw        $a1, 0x0($s0)
/* 1A1D94 802734B4 26100004 */  addiu     $s0, $s0, 0x4
/* 1A1D98 802734B8 0C0B1EAF */  jal       evt_get_variable
/* 1A1D9C 802734BC 0260202D */   daddu    $a0, $s3, $zero
/* 1A1DA0 802734C0 A6420072 */  sh        $v0, 0x72($s2)
/* 1A1DA4 802734C4 8E050000 */  lw        $a1, 0x0($s0)
/* 1A1DA8 802734C8 0C0B1EAF */  jal       evt_get_variable
/* 1A1DAC 802734CC 0260202D */   daddu    $a0, $s3, $zero
/* 1A1DB0 802734D0 AE620074 */  sw        $v0, 0x74($s3)
/* 1A1DB4 802734D4 C6400148 */  lwc1      $f0, 0x148($s2)
/* 1A1DB8 802734D8 C65A0018 */  lwc1      $f26, 0x18($s2)
/* 1A1DBC 802734DC C65C0020 */  lwc1      $f28, 0x20($s2)
/* 1A1DC0 802734E0 C654014C */  lwc1      $f20, 0x14C($s2)
/* 1A1DC4 802734E4 C658001C */  lwc1      $f24, 0x1C($s2)
/* 1A1DC8 802734E8 E6400010 */  swc1      $f0, 0x10($s2)
/* 1A1DCC 802734EC 46000786 */  mov.s     $f30, $f0
/* 1A1DD0 802734F0 4406D000 */  mfc1      $a2, $f26
/* 1A1DD4 802734F4 4407E000 */  mfc1      $a3, $f28
/* 1A1DD8 802734F8 C6400144 */  lwc1      $f0, 0x144($s2)
/* 1A1DDC 802734FC 4600A386 */  mov.s     $f14, $f20
/* 1A1DE0 80273500 E6540014 */  swc1      $f20, 0x14($s2)
/* 1A1DE4 80273504 E640000C */  swc1      $f0, 0xC($s2)
/* 1A1DE8 80273508 46000586 */  mov.s     $f22, $f0
/* 1A1DEC 8027350C 0C00A720 */  jal       atan2
/* 1A1DF0 80273510 4600B306 */   mov.s    $f12, $f22
/* 1A1DF4 80273514 4600B306 */  mov.s     $f12, $f22
/* 1A1DF8 80273518 4600A386 */  mov.s     $f14, $f20
/* 1A1DFC 8027351C 4406D000 */  mfc1      $a2, $f26
/* 1A1E00 80273520 4407E000 */  mfc1      $a3, $f28
/* 1A1E04 80273524 461EC781 */  sub.s     $f30, $f24, $f30
/* 1A1E08 80273528 0C00A7B5 */  jal       dist2D
/* 1A1E0C 8027352C E6400054 */   swc1     $f0, 0x54($s2)
/* 1A1E10 80273530 86420070 */  lh        $v0, 0x70($s2)
/* 1A1E14 80273534 46000106 */  mov.s     $f4, $f0
/* 1A1E18 80273538 14400012 */  bnez      $v0, .L80273584
/* 1A1E1C 8027353C E6440058 */   swc1     $f4, 0x58($s2)
/* 1A1E20 80273540 C640004C */  lwc1      $f0, 0x4C($s2)
/* 1A1E24 80273544 C642004C */  lwc1      $f2, 0x4C($s2)
/* 1A1E28 80273548 46002003 */  div.s     $f0, $f4, $f0
/* 1A1E2C 8027354C 4600028D */  trunc.w.s $f10, $f0
/* 1A1E30 80273550 44035000 */  mfc1      $v1, $f10
/* 1A1E34 80273554 00000000 */  nop
/* 1A1E38 80273558 00031400 */  sll       $v0, $v1, 16
/* 1A1E3C 8027355C 00021403 */  sra       $v0, $v0, 16
/* 1A1E40 80273560 44820000 */  mtc1      $v0, $f0
/* 1A1E44 80273564 00000000 */  nop
/* 1A1E48 80273568 46800020 */  cvt.s.w   $f0, $f0
/* 1A1E4C 8027356C 46020002 */  mul.s     $f0, $f0, $f2
/* 1A1E50 80273570 00000000 */  nop
/* 1A1E54 80273574 46002086 */  mov.s     $f2, $f4
/* 1A1E58 80273578 A6430070 */  sh        $v1, 0x70($s2)
/* 1A1E5C 8027357C 0809CD6E */  j         .L802735B8
/* 1A1E60 80273580 46001201 */   sub.s    $f8, $f2, $f0
.L80273584:
/* 1A1E64 80273584 44821000 */  mtc1      $v0, $f2
/* 1A1E68 80273588 00000000 */  nop
/* 1A1E6C 8027358C 468010A0 */  cvt.s.w   $f2, $f2
/* 1A1E70 80273590 86420070 */  lh        $v0, 0x70($s2)
/* 1A1E74 80273594 46022083 */  div.s     $f2, $f4, $f2
/* 1A1E78 80273598 44820000 */  mtc1      $v0, $f0
/* 1A1E7C 8027359C 00000000 */  nop
/* 1A1E80 802735A0 46800020 */  cvt.s.w   $f0, $f0
/* 1A1E84 802735A4 46020002 */  mul.s     $f0, $f0, $f2
/* 1A1E88 802735A8 00000000 */  nop
/* 1A1E8C 802735AC C6440058 */  lwc1      $f4, 0x58($s2)
/* 1A1E90 802735B0 E642004C */  swc1      $f2, 0x4C($s2)
/* 1A1E94 802735B4 46002201 */  sub.s     $f8, $f4, $f0
.L802735B8:
/* 1A1E98 802735B8 86220064 */  lh        $v0, 0x64($s1)
/* 1A1E9C 802735BC C622003C */  lwc1      $f2, 0x3C($s1)
/* 1A1EA0 802735C0 44823000 */  mtc1      $v0, $f6
/* 1A1EA4 802735C4 00000000 */  nop
/* 1A1EA8 802735C8 468031A0 */  cvt.s.w   $f6, $f6
/* 1A1EAC 802735CC 46061082 */  mul.s     $f2, $f2, $f6
/* 1A1EB0 802735D0 00000000 */  nop
/* 1A1EB4 802735D4 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 1A1EB8 802735D8 44810000 */  mtc1      $at, $f0
/* 1A1EBC 802735DC 00000000 */  nop
/* 1A1EC0 802735E0 46001082 */  mul.s     $f2, $f2, $f0
/* 1A1EC4 802735E4 00000000 */  nop
/* 1A1EC8 802735E8 0000202D */  daddu     $a0, $zero, $zero
/* 1A1ECC 802735EC C6240040 */  lwc1      $f4, 0x40($s1)
/* 1A1ED0 802735F0 46003006 */  mov.s     $f0, $f6
/* 1A1ED4 802735F4 46004003 */  div.s     $f0, $f8, $f0
/* 1A1ED8 802735F8 46002100 */  add.s     $f4, $f4, $f0
/* 1A1EDC 802735FC 8E260058 */  lw        $a2, 0x58($s1)
/* 1A1EE0 80273600 4606F183 */  div.s     $f6, $f30, $f6
/* 1A1EE4 80273604 46061080 */  add.s     $f2, $f2, $f6
/* 1A1EE8 80273608 0080282D */  daddu     $a1, $a0, $zero
/* 1A1EEC 8027360C E6240040 */  swc1      $f4, 0x40($s1)
/* 1A1EF0 80273610 0C098F3F */  jal       set_animation
/* 1A1EF4 80273614 E6220044 */   swc1     $f2, 0x44($s1)
/* 1A1EF8 80273618 86230064 */  lh        $v1, 0x64($s1)
/* 1A1EFC 8027361C 240200B4 */  addiu     $v0, $zero, 0xB4
/* 1A1F00 80273620 14600002 */  bnez      $v1, .L8027362C
/* 1A1F04 80273624 0043001A */   div      $zero, $v0, $v1
/* 1A1F08 80273628 0007000D */  break     7
.L8027362C:
/* 1A1F0C 8027362C 2401FFFF */  addiu     $at, $zero, -0x1
/* 1A1F10 80273630 14610004 */  bne       $v1, $at, .L80273644
/* 1A1F14 80273634 3C018000 */   lui      $at, (0x80000000 >> 16)
/* 1A1F18 80273638 14410002 */  bne       $v0, $at, .L80273644
/* 1A1F1C 8027363C 00000000 */   nop
/* 1A1F20 80273640 0006000D */  break     6
.L80273644:
/* 1A1F24 80273644 00001012 */  mflo      $v0
/* 1A1F28 80273648 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 1A1F2C 8027364C 44810000 */  mtc1      $at, $f0
/* 1A1F30 80273650 C6220010 */  lwc1      $f2, 0x10($s1)
/* 1A1F34 80273654 E6200024 */  swc1      $f0, 0x24($s1)
/* 1A1F38 80273658 E622002C */  swc1      $f2, 0x2C($s1)
/* 1A1F3C 8027365C 44820000 */  mtc1      $v0, $f0
/* 1A1F40 80273660 00000000 */  nop
/* 1A1F44 80273664 46800020 */  cvt.s.w   $f0, $f0
/* 1A1F48 80273668 E6200028 */  swc1      $f0, 0x28($s1)
/* 1A1F4C 8027366C 8E630074 */  lw        $v1, 0x74($s3)
/* 1A1F50 80273670 24020002 */  addiu     $v0, $zero, 0x2
/* 1A1F54 80273674 10620007 */  beq       $v1, $v0, .L80273694
/* 1A1F58 80273678 24040160 */   addiu    $a0, $zero, 0x160
/* 1A1F5C 8027367C C640014C */  lwc1      $f0, 0x14C($s2)
/* 1A1F60 80273680 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A1F64 80273684 8E460144 */  lw        $a2, 0x144($s2)
/* 1A1F68 80273688 8E470148 */  lw        $a3, 0x148($s2)
/* 1A1F6C 8027368C 0C052757 */  jal       sfx_play_sound_at_position
/* 1A1F70 80273690 0000282D */   daddu    $a1, $zero, $zero
.L80273694:
/* 1A1F74 80273694 24020001 */  addiu     $v0, $zero, 0x1
/* 1A1F78 80273698 AE620070 */  sw        $v0, 0x70($s3)
.L8027369C:
/* 1A1F7C 8027369C C6220044 */  lwc1      $f2, 0x44($s1)
/* 1A1F80 802736A0 44800000 */  mtc1      $zero, $f0
/* 1A1F84 802736A4 00000000 */  nop
/* 1A1F88 802736A8 4600103C */  c.lt.s    $f2, $f0
/* 1A1F8C 802736AC 00000000 */  nop
/* 1A1F90 802736B0 45000004 */  bc1f      .L802736C4
/* 1A1F94 802736B4 0000202D */   daddu    $a0, $zero, $zero
/* 1A1F98 802736B8 8E26005C */  lw        $a2, 0x5C($s1)
/* 1A1F9C 802736BC 0C098F3F */  jal       set_animation
/* 1A1FA0 802736C0 0080282D */   daddu    $a1, $a0, $zero
.L802736C4:
/* 1A1FA4 802736C4 24020001 */  addiu     $v0, $zero, 0x1
/* 1A1FA8 802736C8 86230066 */  lh        $v1, 0x66($s1)
/* 1A1FAC 802736CC C6260044 */  lwc1      $f6, 0x44($s1)
/* 1A1FB0 802736D0 10620007 */  beq       $v1, $v0, .L802736F0
/* 1A1FB4 802736D4 28620002 */   slti     $v0, $v1, 0x2
/* 1A1FB8 802736D8 1440001D */  bnez      $v0, .L80273750
/* 1A1FBC 802736DC 24020002 */   addiu    $v0, $zero, 0x2
/* 1A1FC0 802736E0 1062000C */  beq       $v1, $v0, .L80273714
/* 1A1FC4 802736E4 00000000 */   nop
/* 1A1FC8 802736E8 0809CDD4 */  j         .L80273750
/* 1A1FCC 802736EC 00000000 */   nop
.L802736F0:
/* 1A1FD0 802736F0 C6200004 */  lwc1      $f0, 0x4($s1)
/* 1A1FD4 802736F4 C622002C */  lwc1      $f2, 0x2C($s1)
/* 1A1FD8 802736F8 46020001 */  sub.s     $f0, $f0, $f2
/* 1A1FDC 802736FC 3C014234 */  lui       $at, (0x42340000 >> 16)
/* 1A1FE0 80273700 44811000 */  mtc1      $at, $f2
/* 1A1FE4 80273704 00000000 */  nop
/* 1A1FE8 80273708 4600103C */  c.lt.s    $f2, $f0
/* 1A1FEC 8027370C 0809CDCD */  j         .L80273734
/* 1A1FF0 80273710 00000000 */   nop
.L80273714:
/* 1A1FF4 80273714 C6200004 */  lwc1      $f0, 0x4($s1)
/* 1A1FF8 80273718 C622002C */  lwc1      $f2, 0x2C($s1)
/* 1A1FFC 8027371C 46020001 */  sub.s     $f0, $f0, $f2
/* 1A2000 80273720 3C01802A */  lui       $at, %hi(D_8029D898)
/* 1A2004 80273724 D422D898 */  ldc1      $f2, %lo(D_8029D898)($at)
/* 1A2008 80273728 46000021 */  cvt.d.s   $f0, $f0
/* 1A200C 8027372C 4620103C */  c.lt.d    $f2, $f0
/* 1A2010 80273730 00000000 */  nop
.L80273734:
/* 1A2014 80273734 45000006 */  bc1f      .L80273750
/* 1A2018 80273738 00000000 */   nop
/* 1A201C 8027373C 3C013E80 */  lui       $at, (0x3E800000 >> 16)
/* 1A2020 80273740 44810000 */  mtc1      $at, $f0
/* 1A2024 80273744 00000000 */  nop
/* 1A2028 80273748 46003182 */  mul.s     $f6, $f6, $f0
/* 1A202C 8027374C 00000000 */  nop
.L80273750:
/* 1A2030 80273750 C6240004 */  lwc1      $f4, 0x4($s1)
/* 1A2034 80273754 C6220044 */  lwc1      $f2, 0x44($s1)
/* 1A2038 80273758 46062100 */  add.s     $f4, $f4, $f6
/* 1A203C 8027375C C620003C */  lwc1      $f0, 0x3C($s1)
/* 1A2040 80273760 C62C0024 */  lwc1      $f12, 0x24($s1)
/* 1A2044 80273764 46001081 */  sub.s     $f2, $f2, $f0
/* 1A2048 80273768 3C0140C9 */  lui       $at, (0x40C90FD0 >> 16)
/* 1A204C 8027376C 34210FD0 */  ori       $at, $at, (0x40C90FD0 & 0xFFFF)
/* 1A2050 80273770 44810000 */  mtc1      $at, $f0
/* 1A2054 80273774 C6340040 */  lwc1      $f20, 0x40($s1)
/* 1A2058 80273778 46006302 */  mul.s     $f12, $f12, $f0
/* 1A205C 8027377C 00000000 */  nop
/* 1A2060 80273780 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
/* 1A2064 80273784 44810000 */  mtc1      $at, $f0
/* 1A2068 80273788 4600A521 */  cvt.d.s   $f20, $f20
/* 1A206C 8027378C E6240004 */  swc1      $f4, 0x4($s1)
/* 1A2070 80273790 E6220044 */  swc1      $f2, 0x44($s1)
/* 1A2074 80273794 0C00A85B */  jal       sin_rad
/* 1A2078 80273798 46006303 */   div.s    $f12, $f12, $f0
/* 1A207C 8027379C 46000021 */  cvt.d.s   $f0, $f0
/* 1A2080 802737A0 4620A500 */  add.d     $f20, $f20, $f0
/* 1A2084 802737A4 8E260048 */  lw        $a2, 0x48($s1)
/* 1A2088 802737A8 4620A520 */  cvt.s.d   $f20, $f20
/* 1A208C 802737AC 4405A000 */  mfc1      $a1, $f20
/* 1A2090 802737B0 0C09904A */  jal       add_xz_vec3f
/* 1A2094 802737B4 0220202D */   daddu    $a0, $s1, $zero
/* 1A2098 802737B8 C62C0024 */  lwc1      $f12, 0x24($s1)
/* 1A209C 802737BC C6200028 */  lwc1      $f0, 0x28($s1)
/* 1A20A0 802737C0 46006300 */  add.s     $f12, $f12, $f0
/* 1A20A4 802737C4 0C00A6C9 */  jal       clamp_angle
/* 1A20A8 802737C8 E62C0024 */   swc1     $f12, 0x24($s1)
/* 1A20AC 802737CC C6220000 */  lwc1      $f2, 0x0($s1)
/* 1A20B0 802737D0 E6200024 */  swc1      $f0, 0x24($s1)
/* 1A20B4 802737D4 E6420144 */  swc1      $f2, 0x144($s2)
/* 1A20B8 802737D8 C6200004 */  lwc1      $f0, 0x4($s1)
/* 1A20BC 802737DC E6400148 */  swc1      $f0, 0x148($s2)
/* 1A20C0 802737E0 C6200008 */  lwc1      $f0, 0x8($s1)
/* 1A20C4 802737E4 E640014C */  swc1      $f0, 0x14C($s2)
/* 1A20C8 802737E8 96220064 */  lhu       $v0, 0x64($s1)
/* 1A20CC 802737EC 2442FFFF */  addiu     $v0, $v0, -0x1
/* 1A20D0 802737F0 A6220064 */  sh        $v0, 0x64($s1)
/* 1A20D4 802737F4 00021400 */  sll       $v0, $v0, 16
/* 1A20D8 802737F8 04410019 */  bgez      $v0, .L80273860
/* 1A20DC 802737FC 0000102D */   daddu    $v0, $zero, $zero
/* 1A20E0 80273800 C6200010 */  lwc1      $f0, 0x10($s1)
/* 1A20E4 80273804 E6400148 */  swc1      $f0, 0x148($s2)
/* 1A20E8 80273808 8E630074 */  lw        $v1, 0x74($s3)
/* 1A20EC 8027380C 24020001 */  addiu     $v0, $zero, 0x1
/* 1A20F0 80273810 1062000A */  beq       $v1, $v0, .L8027383C
/* 1A20F4 80273814 24020002 */   addiu    $v0, $zero, 0x2
/* 1A20F8 80273818 C640018C */  lwc1      $f0, 0x18C($s2)
/* 1A20FC 8027381C E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A2100 80273820 8E450144 */  lw        $a1, 0x144($s2)
/* 1A2104 80273824 8E460148 */  lw        $a2, 0x148($s2)
/* 1A2108 80273828 8E47014C */  lw        $a3, 0x14C($s2)
/* 1A210C 8027382C 0C0990BC */  jal       play_movement_dust_effects
/* 1A2110 80273830 24040002 */   addiu    $a0, $zero, 0x2
/* 1A2114 80273834 8E630074 */  lw        $v1, 0x74($s3)
/* 1A2118 80273838 24020002 */  addiu     $v0, $zero, 0x2
.L8027383C:
/* 1A211C 8027383C 10620007 */  beq       $v1, $v0, .L8027385C
/* 1A2120 80273840 24040148 */   addiu    $a0, $zero, 0x148
/* 1A2124 80273844 C640014C */  lwc1      $f0, 0x14C($s2)
/* 1A2128 80273848 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A212C 8027384C 8E460144 */  lw        $a2, 0x144($s2)
/* 1A2130 80273850 8E470148 */  lw        $a3, 0x148($s2)
/* 1A2134 80273854 0C052757 */  jal       sfx_play_sound_at_position
/* 1A2138 80273858 0000282D */   daddu    $a1, $zero, $zero
.L8027385C:
/* 1A213C 8027385C 24020001 */  addiu     $v0, $zero, 0x1
.L80273860:
/* 1A2140 80273860 8FBF0028 */  lw        $ra, 0x28($sp)
/* 1A2144 80273864 8FB30024 */  lw        $s3, 0x24($sp)
/* 1A2148 80273868 8FB20020 */  lw        $s2, 0x20($sp)
/* 1A214C 8027386C 8FB1001C */  lw        $s1, 0x1C($sp)
/* 1A2150 80273870 8FB00018 */  lw        $s0, 0x18($sp)
/* 1A2154 80273874 D7BE0058 */  ldc1      $f30, 0x58($sp)
/* 1A2158 80273878 D7BC0050 */  ldc1      $f28, 0x50($sp)
/* 1A215C 8027387C D7BA0048 */  ldc1      $f26, 0x48($sp)
/* 1A2160 80273880 D7B80040 */  ldc1      $f24, 0x40($sp)
/* 1A2164 80273884 D7B60038 */  ldc1      $f22, 0x38($sp)
/* 1A2168 80273888 D7B40030 */  ldc1      $f20, 0x30($sp)
/* 1A216C 8027388C 03E00008 */  jr        $ra
/* 1A2170 80273890 27BD0060 */   addiu    $sp, $sp, 0x60

### DECOMPILED C INSTRUCTIONS:

ApiStatus func_80273444(Evt* script, s32 isInitialCall) {
    BattleStatus* battleStatus = &gBattleStatus;
    Bytecode* args = script->ptrReadPos;
    Actor* player = battleStatus->playerActor;
    ActorState* playerState = &player->state;
    f32 playerVel;
    f32 x, y, z;
    f32 goalX, goalY, goalZ;
    f32 var_f8;
    f64 playerSpeed;

    if (isInitialCall) {
        script->functionTemp[0] = FALSE;
    }

    if (script->functionTemp[0] == 0) {
        player->state.moveTime = evt_get_variable(script, *args++);
        player->state.moveArcAmplitude = evt_get_variable(script, *args++);
        script->functionTemp[1] = evt_get_variable(script, *args++);

        player->state.currentPos.x = player->currentPos.x;
        player->state.currentPos.y = player->currentPos.y;
        player->state.currentPos.z = player->currentPos.z;

        x = player->state.currentPos.x;
        y = player->state.currentPos.y;
        z = player->state.currentPos.z;
        goalX = player->state.goalPos.x;
        goalY = player->state.goalPos.y;
        goalZ = player->state.goalPos.z;

        player->state.angle = atan2(x, z, goalX, goalZ);
        player->state.distance = dist2D(x, z, goalX, goalZ);

        y = goalY - y;

        if (player->state.moveTime == 0) {
            player->state.moveTime = player->state.distance / player->state.speed;
            var_f8 = player->state.distance - (player->state.moveTime * player->state.speed);
        } else {
            player->state.speed = player->state.distance / player->state.moveTime;
            var_f8 = player->state.distance - (player->state.moveTime * player->state.speed);
        }

        playerState->speed += var_f8 / playerState->moveTime;
        playerState->velocity = (playerState->acceleration * playerState->moveTime * 0.5f) + (y / playerState->moveTime);
        set_animation(0, 0, playerState->animJumpRise);
        playerState->unk_24 = 90.0f;
        playerState->unk_28 = 180 / playerState->moveTime;
        playerState->unk_2C = playerState->goalPos.y;
        if (script->functionTemp[1] != 2) {
            sfx_play_sound_at_position(SOUND_160, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
        }
        script->functionTemp[0] = TRUE;
    }

    if (playerState->velocity < 0.0f) {
        set_animation(0, 0, playerState->animJumpFall);
    }

    playerVel = playerState->velocity;
    switch (playerState->moveArcAmplitude) {
        case 0:
            break;
        case 1:
            if (playerState->currentPos.y - playerState->unk_2C > 45.0f) {
                playerVel *= 0.25f;
            }
            break;
        case 2:
            if (playerState->currentPos.y - playerState->unk_2C > 54.9) {
                playerVel *= 0.25f;
            }
            break;
    }

    playerState->currentPos.y += playerVel;
    playerState->velocity -= playerState->acceleration;
    playerSpeed = playerState->speed;
    add_xz_vec3f(&playerState->currentPos, playerSpeed + sin_rad(DEG_TO_RAD(playerState->unk_24)), playerState->angle);
    playerState->unk_24 += playerState->unk_28;
    playerState->unk_24 = clamp_angle(playerState->unk_24);
    player->currentPos.x = playerState->currentPos.x;
    player->currentPos.y = playerState->currentPos.y;
    player->currentPos.z = playerState->currentPos.z;
    playerState->moveTime--;

    if (playerState->moveTime >= 0) {
        return ApiStatus_BLOCK;
    }

    player->currentPos.y = playerState->goalPos.y;
    if (script->functionTemp[1] != 1) {
        play_movement_dust_effects(2, player->currentPos.x, player->currentPos.y, player->currentPos.z, player->yaw);
    }
    if (script->functionTemp[1] != 2) {
        sfx_play_sound_at_position(SOUND_SOFT_LAND, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
    }

    return ApiStatus_DONE1;
}