### RAW ASSEMBLY INSTRUCTIONS:

glabel npc_update_decoration_charged
/* 180B0 8003CCB0 27BDFF60 */  addiu     $sp, $sp, -0xA0
/* 180B4 8003CCB4 AFB60080 */  sw        $s6, 0x80($sp)
/* 180B8 8003CCB8 0080B02D */  daddu     $s6, $a0, $zero
/* 180BC 8003CCBC AFB1006C */  sw        $s1, 0x6C($sp)
/* 180C0 8003CCC0 00A0882D */  daddu     $s1, $a1, $zero
/* 180C4 8003CCC4 AFB00068 */  sw        $s0, 0x68($sp)
/* 180C8 8003CCC8 02D18021 */  addu      $s0, $s6, $s1
/* 180CC 8003CCCC AFBF0084 */  sw        $ra, 0x84($sp)
/* 180D0 8003CCD0 AFB5007C */  sw        $s5, 0x7C($sp)
/* 180D4 8003CCD4 AFB40078 */  sw        $s4, 0x78($sp)
/* 180D8 8003CCD8 AFB30074 */  sw        $s3, 0x74($sp)
/* 180DC 8003CCDC AFB20070 */  sw        $s2, 0x70($sp)
/* 180E0 8003CCE0 F7B80098 */  sdc1      $f24, 0x98($sp)
/* 180E4 8003CCE4 F7B60090 */  sdc1      $f22, 0x90($sp)
/* 180E8 8003CCE8 F7B40088 */  sdc1      $f20, 0x88($sp)
/* 180EC 8003CCEC 82020330 */  lb        $v0, 0x330($s0)
/* 180F0 8003CCF0 1440000B */  bnez      $v0, .L8003CD20
/* 180F4 8003CCF4 24050011 */   addiu    $a1, $zero, 0x11
/* 180F8 8003CCF8 24060014 */  addiu     $a2, $zero, 0x14
/* 180FC 8003CCFC 240200FF */  addiu     $v0, $zero, 0xFF
/* 18100 8003CD00 AFA00010 */  sw        $zero, 0x10($sp)
/* 18104 8003CD04 AFA20014 */  sw        $v0, 0x14($sp)
/* 18108 8003CD08 AFA00018 */  sw        $zero, 0x18($sp)
/* 1810C 8003CD0C 8EC40024 */  lw        $a0, 0x24($s6)
/* 18110 8003CD10 0C0B7A25 */  jal       set_npc_imgfx_all
/* 18114 8003CD14 0000382D */   daddu    $a3, $zero, $zero
/* 18118 8003CD18 24020001 */  addiu     $v0, $zero, 0x1
/* 1811C 8003CD1C A2020330 */  sb        $v0, 0x330($s0)
.L8003CD20:
/* 18120 8003CD20 82030330 */  lb        $v1, 0x330($s0)
/* 18124 8003CD24 24020001 */  addiu     $v0, $zero, 0x1
/* 18128 8003CD28 14620090 */  bne       $v1, $v0, .L8003CF6C
/* 1812C 8003CD2C 00511004 */   sllv     $v0, $s1, $v0
/* 18130 8003CD30 02C22821 */  addu      $a1, $s6, $v0
/* 18134 8003CD34 94A20332 */  lhu       $v0, 0x332($a1)
/* 18138 8003CD38 24420007 */  addiu     $v0, $v0, 0x7
/* 1813C 8003CD3C 00021C00 */  sll       $v1, $v0, 16
/* 18140 8003CD40 00032403 */  sra       $a0, $v1, 16
/* 18144 8003CD44 A4A20332 */  sh        $v0, 0x332($a1)
/* 18148 8003CD48 28820168 */  slti      $v0, $a0, 0x168
/* 1814C 8003CD4C 14400010 */  bnez      $v0, .L8003CD90
/* 18150 8003CD50 0000802D */   daddu    $s0, $zero, $zero
/* 18154 8003CD54 3C02B60B */  lui       $v0, (0xB60B60B7 >> 16)
/* 18158 8003CD58 344260B7 */  ori       $v0, $v0, (0xB60B60B7 & 0xFFFF)
/* 1815C 8003CD5C 00820018 */  mult      $a0, $v0
/* 18160 8003CD60 00031FC3 */  sra       $v1, $v1, 31
/* 18164 8003CD64 00004010 */  mfhi      $t0
/* 18168 8003CD68 01041021 */  addu      $v0, $t0, $a0
/* 1816C 8003CD6C 00021203 */  sra       $v0, $v0, 8
/* 18170 8003CD70 00431023 */  subu      $v0, $v0, $v1
/* 18174 8003CD74 00021840 */  sll       $v1, $v0, 1
/* 18178 8003CD78 00621821 */  addu      $v1, $v1, $v0
/* 1817C 8003CD7C 00031100 */  sll       $v0, $v1, 4
/* 18180 8003CD80 00431023 */  subu      $v0, $v0, $v1
/* 18184 8003CD84 000210C0 */  sll       $v0, $v0, 3
/* 18188 8003CD88 00821023 */  subu      $v0, $a0, $v0
/* 1818C 8003CD8C A4A20332 */  sh        $v0, 0x332($a1)
.L8003CD90:
/* 18190 8003CD90 00A0902D */  daddu     $s2, $a1, $zero
/* 18194 8003CD94 3C138000 */  lui       $s3, (0x80000000 >> 16)
/* 18198 8003CD98 0200882D */  daddu     $s1, $s0, $zero
/* 1819C 8003CD9C 3C013FF0 */  lui       $at, (0x3FF00000 >> 16)
/* 181A0 8003CDA0 4481C800 */  mtc1      $at, $f25
/* 181A4 8003CDA4 4480C000 */  mtc1      $zero, $f24
/* 181A8 8003CDA8 3C014054 */  lui       $at, (0x40540000 >> 16)
/* 181AC 8003CDAC 4481B800 */  mtc1      $at, $f23
/* 181B0 8003CDB0 4480B000 */  mtc1      $zero, $f22
/* 181B4 8003CDB4 3C0141E0 */  lui       $at, (0x41E00000 >> 16)
/* 181B8 8003CDB8 4481A800 */  mtc1      $at, $f21
/* 181BC 8003CDBC 4480A000 */  mtc1      $zero, $f20
.L8003CDC0:
/* 181C0 8003CDC0 96440332 */  lhu       $a0, 0x332($s2)
/* 181C4 8003CDC4 00912021 */  addu      $a0, $a0, $s1
/* 181C8 8003CDC8 00042400 */  sll       $a0, $a0, 16
/* 181CC 8003CDCC 0C00A4F5 */  jal       cosine
/* 181D0 8003CDD0 00042403 */   sra      $a0, $a0, 16
/* 181D4 8003CDD4 46000021 */  cvt.d.s   $f0, $f0
/* 181D8 8003CDD8 46380000 */  add.d     $f0, $f0, $f24
/* 181DC 8003CDDC 46360002 */  mul.d     $f0, $f0, $f22
/* 181E0 8003CDE0 00000000 */  nop
/* 181E4 8003CDE4 27A20020 */  addiu     $v0, $sp, 0x20
/* 181E8 8003CDE8 4620A03E */  c.le.d    $f20, $f0
/* 181EC 8003CDEC 00000000 */  nop
/* 181F0 8003CDF0 45010005 */  bc1t      .L8003CE08
/* 181F4 8003CDF4 00501021 */   addu     $v0, $v0, $s0
/* 181F8 8003CDF8 4620008D */  trunc.w.d $f2, $f0
/* 181FC 8003CDFC 44031000 */  mfc1      $v1, $f2
/* 18200 8003CE00 0800F388 */  j         .L8003CE20
/* 18204 8003CE04 A0430000 */   sb       $v1, 0x0($v0)
.L8003CE08:
/* 18208 8003CE08 46340001 */  sub.d     $f0, $f0, $f20
/* 1820C 8003CE0C 4620008D */  trunc.w.d $f2, $f0
/* 18210 8003CE10 44031000 */  mfc1      $v1, $f2
/* 18214 8003CE14 00000000 */  nop
/* 18218 8003CE18 00731825 */  or        $v1, $v1, $s3
/* 1821C 8003CE1C A0430000 */  sb        $v1, 0x0($v0)
.L8003CE20:
/* 18220 8003CE20 96440332 */  lhu       $a0, 0x332($s2)
/* 18224 8003CE24 00912021 */  addu      $a0, $a0, $s1
/* 18228 8003CE28 2484002D */  addiu     $a0, $a0, 0x2D
/* 1822C 8003CE2C 00042400 */  sll       $a0, $a0, 16
/* 18230 8003CE30 0C00A4F5 */  jal       cosine
/* 18234 8003CE34 00042403 */   sra      $a0, $a0, 16
/* 18238 8003CE38 46000021 */  cvt.d.s   $f0, $f0
/* 1823C 8003CE3C 46380000 */  add.d     $f0, $f0, $f24
/* 18240 8003CE40 46360002 */  mul.d     $f0, $f0, $f22
/* 18244 8003CE44 00000000 */  nop
/* 18248 8003CE48 27A20038 */  addiu     $v0, $sp, 0x38
/* 1824C 8003CE4C 4620A03E */  c.le.d    $f20, $f0
/* 18250 8003CE50 00000000 */  nop
/* 18254 8003CE54 45010005 */  bc1t      .L8003CE6C
/* 18258 8003CE58 00501021 */   addu     $v0, $v0, $s0
/* 1825C 8003CE5C 4620008D */  trunc.w.d $f2, $f0
/* 18260 8003CE60 44031000 */  mfc1      $v1, $f2
/* 18264 8003CE64 0800F3A1 */  j         .L8003CE84
/* 18268 8003CE68 A0430000 */   sb       $v1, 0x0($v0)
.L8003CE6C:
/* 1826C 8003CE6C 46340001 */  sub.d     $f0, $f0, $f20
/* 18270 8003CE70 4620008D */  trunc.w.d $f2, $f0
/* 18274 8003CE74 44031000 */  mfc1      $v1, $f2
/* 18278 8003CE78 00000000 */  nop
/* 1827C 8003CE7C 00731825 */  or        $v1, $v1, $s3
/* 18280 8003CE80 A0430000 */  sb        $v1, 0x0($v0)
.L8003CE84:
/* 18284 8003CE84 96440332 */  lhu       $a0, 0x332($s2)
/* 18288 8003CE88 00912021 */  addu      $a0, $a0, $s1
/* 1828C 8003CE8C 2484005A */  addiu     $a0, $a0, 0x5A
/* 18290 8003CE90 00042400 */  sll       $a0, $a0, 16
/* 18294 8003CE94 0C00A4F5 */  jal       cosine
/* 18298 8003CE98 00042403 */   sra      $a0, $a0, 16
/* 1829C 8003CE9C 46000021 */  cvt.d.s   $f0, $f0
/* 182A0 8003CEA0 46380000 */  add.d     $f0, $f0, $f24
/* 182A4 8003CEA4 46360002 */  mul.d     $f0, $f0, $f22
/* 182A8 8003CEA8 00000000 */  nop
/* 182AC 8003CEAC 27A20050 */  addiu     $v0, $sp, 0x50
/* 182B0 8003CEB0 4620A03E */  c.le.d    $f20, $f0
/* 182B4 8003CEB4 00000000 */  nop
/* 182B8 8003CEB8 45010005 */  bc1t      .L8003CED0
/* 182BC 8003CEBC 00501021 */   addu     $v0, $v0, $s0
/* 182C0 8003CEC0 4620008D */  trunc.w.d $f2, $f0
/* 182C4 8003CEC4 44031000 */  mfc1      $v1, $f2
/* 182C8 8003CEC8 0800F3BA */  j         .L8003CEE8
/* 182CC 8003CECC A0430000 */   sb       $v1, 0x0($v0)
.L8003CED0:
/* 182D0 8003CED0 46340001 */  sub.d     $f0, $f0, $f20
/* 182D4 8003CED4 4620008D */  trunc.w.d $f2, $f0
/* 182D8 8003CED8 44031000 */  mfc1      $v1, $f2
/* 182DC 8003CEDC 00000000 */  nop
/* 182E0 8003CEE0 00731825 */  or        $v1, $v1, $s3
/* 182E4 8003CEE4 A0430000 */  sb        $v1, 0x0($v0)
.L8003CEE8:
/* 182E8 8003CEE8 26100001 */  addiu     $s0, $s0, 0x1
/* 182EC 8003CEEC 2A020014 */  slti      $v0, $s0, 0x14
/* 182F0 8003CEF0 1440FFB3 */  bnez      $v0, .L8003CDC0
/* 182F4 8003CEF4 26310019 */   addiu    $s1, $s1, 0x19
/* 182F8 8003CEF8 241500FF */  addiu     $s5, $zero, 0xFF
/* 182FC 8003CEFC 0000802D */  daddu     $s0, $zero, $zero
/* 18300 8003CF00 27B30020 */  addiu     $s3, $sp, 0x20
/* 18304 8003CF04 27B20038 */  addiu     $s2, $sp, 0x38
/* 18308 8003CF08 27B10050 */  addiu     $s1, $sp, 0x50
/* 1830C 8003CF0C 02A0A02D */  daddu     $s4, $s5, $zero
/* 18310 8003CF10 2405000C */  addiu     $a1, $zero, 0xC
.L8003CF14:
/* 18314 8003CF14 0200302D */  daddu     $a2, $s0, $zero
/* 18318 8003CF18 02701021 */  addu      $v0, $s3, $s0
/* 1831C 8003CF1C 02501821 */  addu      $v1, $s2, $s0
/* 18320 8003CF20 02302021 */  addu      $a0, $s1, $s0
/* 18324 8003CF24 90470000 */  lbu       $a3, 0x0($v0)
/* 18328 8003CF28 90620000 */  lbu       $v0, 0x0($v1)
/* 1832C 8003CF2C 90830000 */  lbu       $v1, 0x0($a0)
/* 18330 8003CF30 26100001 */  addiu     $s0, $s0, 0x1
/* 18334 8003CF34 AFA00010 */  sw        $zero, 0x10($sp)
/* 18338 8003CF38 AFB40014 */  sw        $s4, 0x14($sp)
/* 1833C 8003CF3C AFA00018 */  sw        $zero, 0x18($sp)
/* 18340 8003CF40 8EC40024 */  lw        $a0, 0x24($s6)
/* 18344 8003CF44 00073E00 */  sll       $a3, $a3, 24
/* 18348 8003CF48 00021400 */  sll       $v0, $v0, 16
/* 1834C 8003CF4C 00E23825 */  or        $a3, $a3, $v0
/* 18350 8003CF50 00031A00 */  sll       $v1, $v1, 8
/* 18354 8003CF54 00E33825 */  or        $a3, $a3, $v1
/* 18358 8003CF58 0C0B7A25 */  jal       set_npc_imgfx_all
/* 1835C 8003CF5C 00F53825 */   or       $a3, $a3, $s5
/* 18360 8003CF60 2A020014 */  slti      $v0, $s0, 0x14
/* 18364 8003CF64 1440FFEB */  bnez      $v0, .L8003CF14
/* 18368 8003CF68 2405000C */   addiu    $a1, $zero, 0xC
.L8003CF6C:
/* 1836C 8003CF6C 8FBF0084 */  lw        $ra, 0x84($sp)
/* 18370 8003CF70 8FB60080 */  lw        $s6, 0x80($sp)
/* 18374 8003CF74 8FB5007C */  lw        $s5, 0x7C($sp)
/* 18378 8003CF78 8FB40078 */  lw        $s4, 0x78($sp)
/* 1837C 8003CF7C 8FB30074 */  lw        $s3, 0x74($sp)
/* 18380 8003CF80 8FB20070 */  lw        $s2, 0x70($sp)
/* 18384 8003CF84 8FB1006C */  lw        $s1, 0x6C($sp)
/* 18388 8003CF88 8FB00068 */  lw        $s0, 0x68($sp)
/* 1838C 8003CF8C D7B80098 */  ldc1      $f24, 0x98($sp)
/* 18390 8003CF90 D7B60090 */  ldc1      $f22, 0x90($sp)
/* 18394 8003CF94 D7B40088 */  ldc1      $f20, 0x88($sp)
/* 18398 8003CF98 03E00008 */  jr        $ra
/* 1839C 8003CF9C 27BD00A0 */   addiu    $sp, $sp, 0xA0

### DECOMPILED C INSTRUCTIONS:

void npc_update_decoration_charged(Npc* npc, s32 idx) {
    u8 sp50[20];
    u8 sp38[20];
    u8 sp20[20];
    s32 i;
    s32 temp3;

    if (!npc->decorationInitialised[idx]) {
        set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_ALLOC_COLOR_BUF, 20, 0, 0, 255, 0);
        npc->decorationInitialised[idx] = TRUE;
    }
    if (npc->decorationInitialised[idx] == TRUE) {
        npc->decorationUnk[idx] += 7;
        if (npc->decorationUnk[idx] >= 360) {
            npc->decorationUnk[idx] = npc->decorationUnk[idx] % 360;
        }

        for (i = 0; i < 20; i++) {
            sp50[i] = (cosine(npc->decorationUnk[idx] + i * 25) + 1.0) * 80.0f;
            sp38[i] = (cosine(npc->decorationUnk[idx] + i * 25 + 45) + 1.0) * 80.0f;
            sp20[i] = (cosine(npc->decorationUnk[idx] + i * 25 + 90) + 1.0) * 80.0f;
        }

        for (temp3 = 255, i = 0; i < 20; i++) {
            set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_COLOR_BUF_SET_MODULATE, i, (sp50[i] << 24) | (sp38[i] << 16) | (sp20[i] << 8) | temp3, 0, 255, 0);
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel falling_leaves_appendGfx
/* 35EDF4 E00584D4 27BDFEF0 */  addiu     $sp, $sp, -0x110
/* 35EDF8 E00584D8 AFB700F4 */  sw        $s7, 0xF4($sp)
/* 35EDFC E00584DC 0080B82D */  daddu     $s7, $a0, $zero
/* 35EE00 E00584E0 3C02DB06 */  lui       $v0, (0xDB060024 >> 16)
/* 35EE04 E00584E4 34420024 */  ori       $v0, $v0, (0xDB060024 & 0xFFFF)
/* 35EE08 E00584E8 3C061464 */  lui       $a2, (0x14641400 >> 16)
/* 35EE0C E00584EC 34C61400 */  ori       $a2, $a2, (0x14641400 & 0xFFFF)
/* 35EE10 E00584F0 AFB300E4 */  sw        $s3, 0xE4($sp)
/* 35EE14 E00584F4 3C13800A */  lui       $s3, %hi(gMainGfxPos)
/* 35EE18 E00584F8 2673A66C */  addiu     $s3, $s3, %lo(gMainGfxPos)
/* 35EE1C E00584FC AFBF00F8 */  sw        $ra, 0xF8($sp)
/* 35EE20 E0058500 AFB600F0 */  sw        $s6, 0xF0($sp)
/* 35EE24 E0058504 AFB500EC */  sw        $s5, 0xEC($sp)
/* 35EE28 E0058508 AFB400E8 */  sw        $s4, 0xE8($sp)
/* 35EE2C E005850C AFB200E0 */  sw        $s2, 0xE0($sp)
/* 35EE30 E0058510 AFB100DC */  sw        $s1, 0xDC($sp)
/* 35EE34 E0058514 AFB000D8 */  sw        $s0, 0xD8($sp)
/* 35EE38 E0058518 F7B60108 */  sdc1      $f22, 0x108($sp)
/* 35EE3C E005851C F7B40100 */  sdc1      $f20, 0x100($sp)
/* 35EE40 E0058520 8E650000 */  lw        $a1, 0x0($s3)
/* 35EE44 E0058524 8EF0000C */  lw        $s0, 0xC($s7)
/* 35EE48 E0058528 00A0202D */  daddu     $a0, $a1, $zero
/* 35EE4C E005852C 24A50008 */  addiu     $a1, $a1, 0x8
/* 35EE50 E0058530 AE650000 */  sw        $a1, 0x0($s3)
/* 35EE54 E0058534 AC820000 */  sw        $v0, 0x0($a0)
/* 35EE58 E0058538 24A20008 */  addiu     $v0, $a1, 0x8
/* 35EE5C E005853C AE620000 */  sw        $v0, 0x0($s3)
/* 35EE60 E0058540 8EE30010 */  lw        $v1, 0x10($s7)
/* 35EE64 E0058544 24A20010 */  addiu     $v0, $a1, 0x10
/* 35EE68 E0058548 AE620000 */  sw        $v0, 0x0($s3)
/* 35EE6C E005854C 8C62001C */  lw        $v0, 0x1C($v1)
/* 35EE70 E0058550 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 35EE74 E0058554 00431021 */  addu      $v0, $v0, $v1
/* 35EE78 E0058558 AC820004 */  sw        $v0, 0x4($a0)
/* 35EE7C E005855C 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 35EE80 E0058560 ACA20000 */  sw        $v0, 0x0($a1)
/* 35EE84 E0058564 3C020900 */  lui       $v0, %hi(D_09001100_40E390)
/* 35EE88 E0058568 24421100 */  addiu     $v0, $v0, %lo(D_09001100_40E390)
/* 35EE8C E005856C ACA20004 */  sw        $v0, 0x4($a1)
/* 35EE90 E0058570 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 35EE94 E0058574 ACA20008 */  sw        $v0, 0x8($a1)
/* 35EE98 E0058578 92020027 */  lbu       $v0, 0x27($s0)
/* 35EE9C E005857C 24120001 */  addiu     $s2, $zero, 0x1
/* 35EEA0 E0058580 00461025 */  or        $v0, $v0, $a2
/* 35EEA4 E0058584 ACA2000C */  sw        $v0, 0xC($a1)
/* 35EEA8 E0058588 8E050004 */  lw        $a1, 0x4($s0)
/* 35EEAC E005858C 8E060008 */  lw        $a2, 0x8($s0)
/* 35EEB0 E0058590 8E07000C */  lw        $a3, 0xC($s0)
/* 35EEB4 E0058594 0C080108 */  jal       shim_guTranslateF
/* 35EEB8 E0058598 27A40018 */   addiu    $a0, $sp, 0x18
/* 35EEBC E005859C 27B10058 */  addiu     $s1, $sp, 0x58
/* 35EEC0 E00585A0 4480A000 */  mtc1      $zero, $f20
/* 35EEC4 E00585A4 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 35EEC8 E00585A8 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 35EECC E00585AC 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 35EED0 E00585B0 4481B000 */  mtc1      $at, $f22
/* 35EED4 E00585B4 00031080 */  sll       $v0, $v1, 2
/* 35EED8 E00585B8 00431021 */  addu      $v0, $v0, $v1
/* 35EEDC E00585BC 00021080 */  sll       $v0, $v0, 2
/* 35EEE0 E00585C0 00431023 */  subu      $v0, $v0, $v1
/* 35EEE4 E00585C4 000218C0 */  sll       $v1, $v0, 3
/* 35EEE8 E00585C8 00431021 */  addu      $v0, $v0, $v1
/* 35EEEC E00585CC 000210C0 */  sll       $v0, $v0, 3
/* 35EEF0 E00585D0 4406A000 */  mfc1      $a2, $f20
/* 35EEF4 E00585D4 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 35EEF8 E00585D8 00220821 */  addu      $at, $at, $v0
/* 35EEFC E00585DC C4201DEC */  lwc1      $f0, %lo(gCameras + 0x6C)($at)
/* 35EF00 E00585E0 4407B000 */  mfc1      $a3, $f22
/* 35EF04 E00585E4 46000007 */  neg.s     $f0, $f0
/* 35EF08 E00585E8 44050000 */  mfc1      $a1, $f0
/* 35EF0C E00585EC 0220202D */  daddu     $a0, $s1, $zero
/* 35EF10 E00585F0 0C080104 */  jal       shim_guRotateF
/* 35EF14 E00585F4 E7B40010 */   swc1     $f20, 0x10($sp)
/* 35EF18 E00585F8 0220202D */  daddu     $a0, $s1, $zero
/* 35EF1C E00585FC 27A50018 */  addiu     $a1, $sp, 0x18
/* 35EF20 E0058600 0C080114 */  jal       shim_guMtxCatF
/* 35EF24 E0058604 27A60098 */   addiu    $a2, $sp, 0x98
/* 35EF28 E0058608 8EE20008 */  lw        $v0, 0x8($s7)
/* 35EF2C E005860C 0242102A */  slt       $v0, $s2, $v0
/* 35EF30 E0058610 1040004E */  beqz      $v0, .LE005874C
/* 35EF34 E0058614 26100034 */   addiu    $s0, $s0, 0x34
/* 35EF38 E0058618 3C16800A */  lui       $s6, %hi(gDisplayContext)
/* 35EF3C E005861C 26D6A674 */  addiu     $s6, $s6, %lo(gDisplayContext)
/* 35EF40 E0058620 3C158007 */  lui       $s5, %hi(gMatrixListPos)
/* 35EF44 E0058624 26B541F0 */  addiu     $s5, $s5, %lo(gMatrixListPos)
/* 35EF48 E0058628 3C140001 */  lui       $s4, (0x11630 >> 16)
/* 35EF4C E005862C 36941630 */  ori       $s4, $s4, (0x11630 & 0xFFFF)
/* 35EF50 E0058630 26100020 */  addiu     $s0, $s0, 0x20
.LE0058634:
/* 35EF54 E0058634 0220202D */  daddu     $a0, $s1, $zero
/* 35EF58 E0058638 8E05FFE4 */  lw        $a1, -0x1C($s0)
/* 35EF5C E005863C 8E06FFE8 */  lw        $a2, -0x18($s0)
/* 35EF60 E0058640 8E07FFEC */  lw        $a3, -0x14($s0)
/* 35EF64 E0058644 0C080108 */  jal       shim_guTranslateF
/* 35EF68 E0058648 26520001 */   addiu    $s2, $s2, 0x1
/* 35EF6C E005864C 0220202D */  daddu     $a0, $s1, $zero
/* 35EF70 E0058650 27A50098 */  addiu     $a1, $sp, 0x98
/* 35EF74 E0058654 0C080114 */  jal       shim_guMtxCatF
/* 35EF78 E0058658 27A60018 */   addiu    $a2, $sp, 0x18
/* 35EF7C E005865C E7B60010 */  swc1      $f22, 0x10($sp)
/* 35EF80 E0058660 8E05FFF8 */  lw        $a1, -0x8($s0)
/* 35EF84 E0058664 4406A000 */  mfc1      $a2, $f20
/* 35EF88 E0058668 4407A000 */  mfc1      $a3, $f20
/* 35EF8C E005866C 0C080104 */  jal       shim_guRotateF
/* 35EF90 E0058670 0220202D */   daddu    $a0, $s1, $zero
/* 35EF94 E0058674 0220202D */  daddu     $a0, $s1, $zero
/* 35EF98 E0058678 27A50018 */  addiu     $a1, $sp, 0x18
/* 35EF9C E005867C 0C080114 */  jal       shim_guMtxCatF
/* 35EFA0 E0058680 00A0302D */   daddu    $a2, $a1, $zero
/* 35EFA4 E0058684 0220202D */  daddu     $a0, $s1, $zero
/* 35EFA8 E0058688 E7B40010 */  swc1      $f20, 0x10($sp)
/* 35EFAC E005868C 8E050000 */  lw        $a1, 0x0($s0)
/* 35EFB0 E0058690 4406A000 */  mfc1      $a2, $f20
/* 35EFB4 E0058694 4407B000 */  mfc1      $a3, $f22
/* 35EFB8 E0058698 0C080104 */  jal       shim_guRotateF
/* 35EFBC E005869C 26100034 */   addiu    $s0, $s0, 0x34
/* 35EFC0 E00586A0 0220202D */  daddu     $a0, $s1, $zero
/* 35EFC4 E00586A4 27A50018 */  addiu     $a1, $sp, 0x18
/* 35EFC8 E00586A8 0C080114 */  jal       shim_guMtxCatF
/* 35EFCC E00586AC 00A0302D */   daddu    $a2, $a1, $zero
/* 35EFD0 E00586B0 27A40018 */  addiu     $a0, $sp, 0x18
/* 35EFD4 E00586B4 96A50000 */  lhu       $a1, 0x0($s5)
/* 35EFD8 E00586B8 8EC20000 */  lw        $v0, 0x0($s6)
/* 35EFDC E00586BC 00052980 */  sll       $a1, $a1, 6
/* 35EFE0 E00586C0 00B42821 */  addu      $a1, $a1, $s4
/* 35EFE4 E00586C4 0C080118 */  jal       shim_guMtxF2L
/* 35EFE8 E00586C8 00452821 */   addu     $a1, $v0, $a1
/* 35EFEC E00586CC 3C06D838 */  lui       $a2, (0xD8380002 >> 16)
/* 35EFF0 E00586D0 8E640000 */  lw        $a0, 0x0($s3)
/* 35EFF4 E00586D4 34C60002 */  ori       $a2, $a2, (0xD8380002 & 0xFFFF)
/* 35EFF8 E00586D8 0080282D */  daddu     $a1, $a0, $zero
/* 35EFFC E00586DC 24840008 */  addiu     $a0, $a0, 0x8
/* 35F000 E00586E0 AE640000 */  sw        $a0, 0x0($s3)
/* 35F004 E00586E4 96A20000 */  lhu       $v0, 0x0($s5)
/* 35F008 E00586E8 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 35F00C E00586EC ACA30000 */  sw        $v1, 0x0($a1)
/* 35F010 E00586F0 24430001 */  addiu     $v1, $v0, 0x1
/* 35F014 E00586F4 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 35F018 E00586F8 00021180 */  sll       $v0, $v0, 6
/* 35F01C E00586FC A6A30000 */  sh        $v1, 0x0($s5)
/* 35F020 E0058700 8EC30000 */  lw        $v1, 0x0($s6)
/* 35F024 E0058704 00541021 */  addu      $v0, $v0, $s4
/* 35F028 E0058708 00621821 */  addu      $v1, $v1, $v0
/* 35F02C E005870C 24820008 */  addiu     $v0, $a0, 0x8
/* 35F030 E0058710 ACA30004 */  sw        $v1, 0x4($a1)
/* 35F034 E0058714 AE620000 */  sw        $v0, 0x0($s3)
/* 35F038 E0058718 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 35F03C E005871C AC820000 */  sw        $v0, 0x0($a0)
/* 35F040 E0058720 3C020900 */  lui       $v0, %hi(D_090011B0_40E440)
/* 35F044 E0058724 244211B0 */  addiu     $v0, $v0, %lo(D_090011B0_40E440)
/* 35F048 E0058728 AC820004 */  sw        $v0, 0x4($a0)
/* 35F04C E005872C 24020040 */  addiu     $v0, $zero, 0x40
/* 35F050 E0058730 AC860008 */  sw        $a2, 0x8($a0)
/* 35F054 E0058734 AC82000C */  sw        $v0, 0xC($a0)
/* 35F058 E0058738 8EE20008 */  lw        $v0, 0x8($s7)
/* 35F05C E005873C 24840010 */  addiu     $a0, $a0, 0x10
/* 35F060 E0058740 0242102A */  slt       $v0, $s2, $v0
/* 35F064 E0058744 1440FFBB */  bnez      $v0, .LE0058634
/* 35F068 E0058748 AE640000 */   sw       $a0, 0x0($s3)
.LE005874C:
/* 35F06C E005874C 8FBF00F8 */  lw        $ra, 0xF8($sp)
/* 35F070 E0058750 8FB700F4 */  lw        $s7, 0xF4($sp)
/* 35F074 E0058754 8FB600F0 */  lw        $s6, 0xF0($sp)
/* 35F078 E0058758 8FB500EC */  lw        $s5, 0xEC($sp)
/* 35F07C E005875C 8FB400E8 */  lw        $s4, 0xE8($sp)
/* 35F080 E0058760 8FB300E4 */  lw        $s3, 0xE4($sp)
/* 35F084 E0058764 8FB200E0 */  lw        $s2, 0xE0($sp)
/* 35F088 E0058768 8FB100DC */  lw        $s1, 0xDC($sp)
/* 35F08C E005876C 8FB000D8 */  lw        $s0, 0xD8($sp)
/* 35F090 E0058770 D7B60108 */  ldc1      $f22, 0x108($sp)
/* 35F094 E0058774 D7B40100 */  ldc1      $f20, 0x100($sp)
/* 35F098 E0058778 03E00008 */  jr        $ra
/* 35F09C E005877C 27BD0110 */   addiu    $sp, $sp, 0x110

### DECOMPILED C INSTRUCTIONS:

void falling_leaves_appendGfx(void* effect) {
    FallingLeavesFXData* part = ((EffectInstance*)effect)->data.fallingLeaves;
    Matrix4f sp18;
    Matrix4f sp58;
    Matrix4f sp98;
    s32 i;

    gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
    gSPDisplayList(gMainGfxPos++, D_09001100_3601E0);
    gDPSetPrimColor(gMainGfxPos++, 0, 0, 20, 100, 20, part->unk_24);

    shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
    shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
    shim_guMtxCatF(sp58, sp18, sp98);

    part++;
    for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
        shim_guTranslateF(sp58, part->unk_04, part->unk_08, part->unk_0C);
        shim_guMtxCatF(sp58, sp98, sp18);
        shim_guRotateF(sp58, part->unk_18, 0.0f, 0.0f, 1.0f);
        shim_guMtxCatF(sp58, sp18, sp18);
        shim_guRotateF(sp58, part->unk_20, 0.0f, 1.0f, 0.0f);
        shim_guMtxCatF(sp58, sp18, sp18);
        shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

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


### RAW ASSEMBLY INSTRUCTIONS:

glabel PlayerPowerBounceEnemy
/* 1A2D80 802744A0 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* 1A2D84 802744A4 AFB20018 */  sw        $s2, 0x18($sp)
/* 1A2D88 802744A8 0080902D */  daddu     $s2, $a0, $zero
/* 1A2D8C 802744AC AFBF0020 */  sw        $ra, 0x20($sp)
/* 1A2D90 802744B0 AFB3001C */  sw        $s3, 0x1C($sp)
/* 1A2D94 802744B4 AFB10014 */  sw        $s1, 0x14($sp)
/* 1A2D98 802744B8 AFB00010 */  sw        $s0, 0x10($sp)
/* 1A2D9C 802744BC 8E50000C */  lw        $s0, 0xC($s2)
/* 1A2DA0 802744C0 3C11800E */  lui       $s1, %hi(gBattleStatus)
/* 1A2DA4 802744C4 2631C070 */  addiu     $s1, $s1, %lo(gBattleStatus)
/* 1A2DA8 802744C8 8E130000 */  lw        $s3, 0x0($s0)
/* 1A2DAC 802744CC 26100004 */  addiu     $s0, $s0, 0x4
/* 1A2DB0 802744D0 8E020000 */  lw        $v0, 0x0($s0)
/* 1A2DB4 802744D4 26100004 */  addiu     $s0, $s0, 0x4
/* 1A2DB8 802744D8 AE220188 */  sw        $v0, 0x188($s1)
/* 1A2DBC 802744DC 8E020000 */  lw        $v0, 0x0($s0)
/* 1A2DC0 802744E0 26100004 */  addiu     $s0, $s0, 0x4
/* 1A2DC4 802744E4 AE22018C */  sw        $v0, 0x18C($s1)
/* 1A2DC8 802744E8 8E020000 */  lw        $v0, 0x0($s0)
/* 1A2DCC 802744EC 26100004 */  addiu     $s0, $s0, 0x4
/* 1A2DD0 802744F0 AE220190 */  sw        $v0, 0x190($s1)
/* 1A2DD4 802744F4 8E050000 */  lw        $a1, 0x0($s0)
/* 1A2DD8 802744F8 0C0B1EAF */  jal       evt_get_variable
/* 1A2DDC 802744FC 26100004 */   addiu    $s0, $s0, 0x4
/* 1A2DE0 80274500 A622017E */  sh        $v0, 0x17E($s1)
/* 1A2DE4 80274504 8E050000 */  lw        $a1, 0x0($s0)
/* 1A2DE8 80274508 26100004 */  addiu     $s0, $s0, 0x4
/* 1A2DEC 8027450C 0C0B1EAF */  jal       evt_get_variable
/* 1A2DF0 80274510 0240202D */   daddu    $a0, $s2, $zero
/* 1A2DF4 80274514 A2220198 */  sb        $v0, 0x198($s1)
/* 1A2DF8 80274518 8E100000 */  lw        $s0, 0x0($s0)
/* 1A2DFC 8027451C 24020030 */  addiu     $v0, $zero, 0x30
/* 1A2E00 80274520 32030030 */  andi      $v1, $s0, 0x30
/* 1A2E04 80274524 54620004 */  bnel      $v1, $v0, .L80274538
/* 1A2E08 80274528 32020010 */   andi     $v0, $s0, 0x10
/* 1A2E0C 8027452C 8E220000 */  lw        $v0, 0x0($s1)
/* 1A2E10 80274530 0809D15E */  j         .L80274578
/* 1A2E14 80274534 34420030 */   ori      $v0, $v0, 0x30
.L80274538:
/* 1A2E18 80274538 10400004 */  beqz      $v0, .L8027454C
/* 1A2E1C 8027453C 2403FFDF */   addiu    $v1, $zero, -0x21
/* 1A2E20 80274540 8E220000 */  lw        $v0, 0x0($s1)
/* 1A2E24 80274544 0809D15D */  j         .L80274574
/* 1A2E28 80274548 34420010 */   ori      $v0, $v0, 0x10
.L8027454C:
/* 1A2E2C 8027454C 32020020 */  andi      $v0, $s0, 0x20
/* 1A2E30 80274550 10400005 */  beqz      $v0, .L80274568
/* 1A2E34 80274554 2403FFEF */   addiu    $v1, $zero, -0x11
/* 1A2E38 80274558 8E220000 */  lw        $v0, 0x0($s1)
/* 1A2E3C 8027455C 00431024 */  and       $v0, $v0, $v1
/* 1A2E40 80274560 0809D15E */  j         .L80274578
/* 1A2E44 80274564 34420020 */   ori      $v0, $v0, 0x20
.L80274568:
/* 1A2E48 80274568 8E220000 */  lw        $v0, 0x0($s1)
/* 1A2E4C 8027456C 00431024 */  and       $v0, $v0, $v1
/* 1A2E50 80274570 2403FFDF */  addiu     $v1, $zero, -0x21
.L80274574:
/* 1A2E54 80274574 00431024 */  and       $v0, $v0, $v1
.L80274578:
/* 1A2E58 80274578 AE220000 */  sw        $v0, 0x0($s1)
/* 1A2E5C 8027457C 32020040 */  andi      $v0, $s0, 0x40
/* 1A2E60 80274580 10400007 */  beqz      $v0, .L802745A0
/* 1A2E64 80274584 2404FFBF */   addiu    $a0, $zero, -0x41
/* 1A2E68 80274588 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 1A2E6C 8027458C 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 1A2E70 80274590 8C620000 */  lw        $v0, 0x0($v1)
/* 1A2E74 80274594 34420040 */  ori       $v0, $v0, 0x40
/* 1A2E78 80274598 0809D16D */  j         .L802745B4
/* 1A2E7C 8027459C AC620000 */   sw       $v0, 0x0($v1)
.L802745A0:
/* 1A2E80 802745A0 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A2E84 802745A4 2442C070 */  addiu     $v0, $v0, %lo(gBattleStatus)
/* 1A2E88 802745A8 8C430000 */  lw        $v1, 0x0($v0)
/* 1A2E8C 802745AC 00641824 */  and       $v1, $v1, $a0
/* 1A2E90 802745B0 AC430000 */  sw        $v1, 0x0($v0)
.L802745B4:
/* 1A2E94 802745B4 32020200 */  andi      $v0, $s0, 0x200
/* 1A2E98 802745B8 10400007 */  beqz      $v0, .L802745D8
/* 1A2E9C 802745BC 2404FDFF */   addiu    $a0, $zero, -0x201
/* 1A2EA0 802745C0 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 1A2EA4 802745C4 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 1A2EA8 802745C8 8C620000 */  lw        $v0, 0x0($v1)
/* 1A2EAC 802745CC 34420200 */  ori       $v0, $v0, 0x200
/* 1A2EB0 802745D0 0809D17B */  j         .L802745EC
/* 1A2EB4 802745D4 AC620000 */   sw       $v0, 0x0($v1)
.L802745D8:
/* 1A2EB8 802745D8 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A2EBC 802745DC 2442C070 */  addiu     $v0, $v0, %lo(gBattleStatus)
/* 1A2EC0 802745E0 8C430000 */  lw        $v1, 0x0($v0)
/* 1A2EC4 802745E4 00641824 */  and       $v1, $v1, $a0
/* 1A2EC8 802745E8 AC430000 */  sw        $v1, 0x0($v0)
.L802745EC:
/* 1A2ECC 802745EC 32020080 */  andi      $v0, $s0, 0x80
/* 1A2ED0 802745F0 10400007 */  beqz      $v0, .L80274610
/* 1A2ED4 802745F4 2404FF7F */   addiu    $a0, $zero, -0x81
/* 1A2ED8 802745F8 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 1A2EDC 802745FC 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 1A2EE0 80274600 8C620000 */  lw        $v0, 0x0($v1)
/* 1A2EE4 80274604 34420080 */  ori       $v0, $v0, 0x80
/* 1A2EE8 80274608 0809D189 */  j         .L80274624
/* 1A2EEC 8027460C AC620000 */   sw       $v0, 0x0($v1)
.L80274610:
/* 1A2EF0 80274610 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A2EF4 80274614 2442C070 */  addiu     $v0, $v0, %lo(gBattleStatus)
/* 1A2EF8 80274618 8C430000 */  lw        $v1, 0x0($v0)
/* 1A2EFC 8027461C 00641824 */  and       $v1, $v1, $a0
/* 1A2F00 80274620 AC430000 */  sw        $v1, 0x0($v0)
.L80274624:
/* 1A2F04 80274624 32020800 */  andi      $v0, $s0, 0x800
/* 1A2F08 80274628 10400007 */  beqz      $v0, .L80274648
/* 1A2F0C 8027462C 2404F7FF */   addiu    $a0, $zero, -0x801
/* 1A2F10 80274630 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 1A2F14 80274634 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 1A2F18 80274638 8C620000 */  lw        $v0, 0x0($v1)
/* 1A2F1C 8027463C 34420800 */  ori       $v0, $v0, 0x800
/* 1A2F20 80274640 0809D197 */  j         .L8027465C
/* 1A2F24 80274644 AC620000 */   sw       $v0, 0x0($v1)
.L80274648:
/* 1A2F28 80274648 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A2F2C 8027464C 2442C070 */  addiu     $v0, $v0, %lo(gBattleStatus)
/* 1A2F30 80274650 8C430000 */  lw        $v1, 0x0($v0)
/* 1A2F34 80274654 00641824 */  and       $v1, $v1, $a0
/* 1A2F38 80274658 AC430000 */  sw        $v1, 0x0($v0)
.L8027465C:
/* 1A2F3C 8027465C 0C09A75B */  jal       get_actor
/* 1A2F40 80274660 8E440148 */   lw       $a0, 0x148($s2)
/* 1A2F44 80274664 94430428 */  lhu       $v1, 0x428($v0)
/* 1A2F48 80274668 A62301A0 */  sh        $v1, 0x1A0($s1)
/* 1A2F4C 8027466C 92230193 */  lbu       $v1, 0x193($s1)
/* 1A2F50 80274670 90420426 */  lbu       $v0, 0x426($v0)
/* 1A2F54 80274674 A2230194 */  sb        $v1, 0x194($s1)
/* 1A2F58 80274678 306300FF */  andi      $v1, $v1, 0xFF
/* 1A2F5C 8027467C A22201A2 */  sb        $v0, 0x1A2($s1)
/* 1A2F60 80274680 240200FF */  addiu     $v0, $zero, 0xFF
/* 1A2F64 80274684 50620001 */  beql      $v1, $v0, .L8027468C
/* 1A2F68 80274688 A2200194 */   sb       $zero, 0x194($s1)
.L8027468C:
/* 1A2F6C 8027468C 8E220190 */  lw        $v0, 0x190($s1)
/* 1A2F70 80274690 30420F00 */  andi      $v0, $v0, 0xF00
/* 1A2F74 80274694 00021203 */  sra       $v0, $v0, 8
/* 1A2F78 80274698 0C09C651 */  jal       calc_player_damage_enemy
/* 1A2F7C 8027469C A2220195 */   sb       $v0, 0x195($s1)
/* 1A2F80 802746A0 0440000B */  bltz      $v0, .L802746D0
/* 1A2F84 802746A4 0240202D */   daddu    $a0, $s2, $zero
/* 1A2F88 802746A8 0260282D */  daddu     $a1, $s3, $zero
/* 1A2F8C 802746AC 0C0B2026 */  jal       evt_set_variable
/* 1A2F90 802746B0 0040302D */   daddu    $a2, $v0, $zero
/* 1A2F94 802746B4 0C0B1069 */  jal       does_script_exist_by_ref
/* 1A2F98 802746B8 0240202D */   daddu    $a0, $s2, $zero
/* 1A2F9C 802746BC 0040182D */  daddu     $v1, $v0, $zero
/* 1A2FA0 802746C0 10600004 */  beqz      $v1, .L802746D4
/* 1A2FA4 802746C4 240200FF */   addiu    $v0, $zero, 0xFF
/* 1A2FA8 802746C8 0809D1B5 */  j         .L802746D4
/* 1A2FAC 802746CC 24020002 */   addiu    $v0, $zero, 0x2
.L802746D0:
/* 1A2FB0 802746D0 240200FF */  addiu     $v0, $zero, 0xFF
.L802746D4:
/* 1A2FB4 802746D4 8FBF0020 */  lw        $ra, 0x20($sp)
/* 1A2FB8 802746D8 8FB3001C */  lw        $s3, 0x1C($sp)
/* 1A2FBC 802746DC 8FB20018 */  lw        $s2, 0x18($sp)
/* 1A2FC0 802746E0 8FB10014 */  lw        $s1, 0x14($sp)
/* 1A2FC4 802746E4 8FB00010 */  lw        $s0, 0x10($sp)
/* 1A2FC8 802746E8 03E00008 */  jr        $ra
/* 1A2FCC 802746EC 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

ApiStatus PlayerPowerBounceEnemy(Evt* script, s32 isInitialCall) {
    BattleStatus* battleStatus = &gBattleStatus;
    Bytecode* args = script->ptrReadPos;
    s32 hitResultOutVar = *args++;
    s32 flags;
    Actor* target;
    HitResult hitResult;

    battleStatus->currentAttackElement = *args++;
    battleStatus->currentAttackEventSuppression = *args++;
    battleStatus->currentAttackStatus = *args++;
    battleStatus->currentAttackDamage = evt_get_variable(script, *args++);
    battleStatus->powerBounceCounter = evt_get_variable(script, *args++);
    flags = *args++;

    if ((flags & (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) == (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) {
        gBattleStatus.flags1 |= BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE;
    } else if (flags & BS_FLAGS1_10) {
        gBattleStatus.flags1 |= BS_FLAGS1_10;
        gBattleStatus.flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE;
    } else if (flags & BS_FLAGS1_SP_EVT_ACTIVE) {
        gBattleStatus.flags1 &= ~BS_FLAGS1_10;
        gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
    } else {
        gBattleStatus.flags1 &= ~BS_FLAGS1_10;
        gBattleStatus.flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE;
    }

    if (flags & BS_FLAGS1_40) {
        gBattleStatus.flags1 |= BS_FLAGS1_40;
    } else {
        gBattleStatus.flags1 &= ~BS_FLAGS1_40;
    }
    if (flags & BS_FLAGS1_200) {
        gBattleStatus.flags1 |= BS_FLAGS1_200;
    } else {
        gBattleStatus.flags1 &= ~BS_FLAGS1_200;
    }
    if (flags & BS_FLAGS1_80) {
        gBattleStatus.flags1 |= BS_FLAGS1_80;
    } else {
        gBattleStatus.flags1 &= ~BS_FLAGS1_80;
    }
    if (flags & BS_FLAGS1_FORCE_HIT_IMMUNE) {
        gBattleStatus.flags1 |= BS_FLAGS1_FORCE_HIT_IMMUNE;
    } else {
        gBattleStatus.flags1 &= ~BS_FLAGS1_FORCE_HIT_IMMUNE;
    }

    target = get_actor(script->owner1.actorID);
    battleStatus->currentTargetID = target->targetActorID;
    battleStatus->currentTargetPart = target->targetPartIndex;
    battleStatus->statusChance = battleStatus->currentAttackStatus;
    if (battleStatus->statusChance == STATUS_KEY_NEVER) {
        battleStatus->statusChance = 0;
    }
    battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8;

    hitResult = calc_player_damage_enemy();
    if (hitResult < 0) {
        return ApiStatus_FINISH;
    }
    evt_set_variable(script, hitResultOutVar, hitResult);

    if (!does_script_exist_by_ref(script)) {
        return ApiStatus_FINISH;
    }

    return ApiStatus_DONE2;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel basic_ai_chase
/* 25524 8004A124 27BDFFA8 */  addiu     $sp, $sp, -0x58
/* 25528 8004A128 AFB30044 */  sw        $s3, 0x44($sp)
/* 2552C 8004A12C 0080982D */  daddu     $s3, $a0, $zero
/* 25530 8004A130 AFBF0048 */  sw        $ra, 0x48($sp)
/* 25534 8004A134 AFB20040 */  sw        $s2, 0x40($sp)
/* 25538 8004A138 AFB1003C */  sw        $s1, 0x3C($sp)
/* 2553C 8004A13C AFB00038 */  sw        $s0, 0x38($sp)
/* 25540 8004A140 F7B40050 */  sdc1      $f20, 0x50($sp)
/* 25544 8004A144 8E720148 */  lw        $s2, 0x148($s3)
/* 25548 8004A148 00A0882D */  daddu     $s1, $a1, $zero
/* 2554C 8004A14C 86440008 */  lh        $a0, 0x8($s2)
/* 25550 8004A150 0C00EABB */  jal       get_npc_unsafe
/* 25554 8004A154 00C0802D */   daddu    $s0, $a2, $zero
/* 25558 8004A158 0200202D */  daddu     $a0, $s0, $zero
/* 2555C 8004A15C 0240282D */  daddu     $a1, $s2, $zero
/* 25560 8004A160 24030001 */  addiu     $v1, $zero, 0x1
/* 25564 8004A164 AFA30010 */  sw        $v1, 0x10($sp)
/* 25568 8004A168 8E260024 */  lw        $a2, 0x24($s1)
/* 2556C 8004A16C 8E270028 */  lw        $a3, 0x28($s1)
/* 25570 8004A170 0C01242D */  jal       basic_ai_check_player_dist
/* 25574 8004A174 0040802D */   daddu    $s0, $v0, $zero
/* 25578 8004A178 1440001D */  bnez      $v0, .L8004A1F0
/* 2557C 8004A17C 24040002 */   addiu    $a0, $zero, 0x2
/* 25580 8004A180 0200282D */  daddu     $a1, $s0, $zero
/* 25584 8004A184 0000302D */  daddu     $a2, $zero, $zero
/* 25588 8004A188 860300A8 */  lh        $v1, 0xA8($s0)
/* 2558C 8004A18C 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 25590 8004A190 44810000 */  mtc1      $at, $f0
/* 25594 8004A194 3C014000 */  lui       $at, (0x40000000 >> 16)
/* 25598 8004A198 44811000 */  mtc1      $at, $f2
/* 2559C 8004A19C 3C01C1A0 */  lui       $at, (0xC1A00000 >> 16)
/* 255A0 8004A1A0 44812000 */  mtc1      $at, $f4
/* 255A4 8004A1A4 2402000F */  addiu     $v0, $zero, 0xF
/* 255A8 8004A1A8 AFA2001C */  sw        $v0, 0x1C($sp)
/* 255AC 8004A1AC 44833000 */  mtc1      $v1, $f6
/* 255B0 8004A1B0 00000000 */  nop
/* 255B4 8004A1B4 468031A0 */  cvt.s.w   $f6, $f6
/* 255B8 8004A1B8 44073000 */  mfc1      $a3, $f6
/* 255BC 8004A1BC 27A20028 */  addiu     $v0, $sp, 0x28
/* 255C0 8004A1C0 AFA20020 */  sw        $v0, 0x20($sp)
/* 255C4 8004A1C4 E7A00010 */  swc1      $f0, 0x10($sp)
/* 255C8 8004A1C8 E7A20014 */  swc1      $f2, 0x14($sp)
/* 255CC 8004A1CC 0C01BFA4 */  jal       fx_emote
/* 255D0 8004A1D0 E7A40018 */   swc1     $f4, 0x18($sp)
/* 255D4 8004A1D4 8E4200CC */  lw        $v0, 0xCC($s2)
/* 255D8 8004A1D8 8C430000 */  lw        $v1, 0x0($v0)
/* 255DC 8004A1DC 24020014 */  addiu     $v0, $zero, 0x14
/* 255E0 8004A1E0 A602008E */  sh        $v0, 0x8E($s0)
/* 255E4 8004A1E4 2402000E */  addiu     $v0, $zero, 0xE
/* 255E8 8004A1E8 080128F1 */  j         .L8004A3C4
/* 255EC 8004A1EC AE030028 */   sw       $v1, 0x28($s0)
.L8004A1F0:
/* 255F0 8004A1F0 8E420018 */  lw        $v0, 0x18($s2)
/* 255F4 8004A1F4 9442002A */  lhu       $v0, 0x2A($v0)
/* 255F8 8004A1F8 30420004 */  andi      $v0, $v0, 0x4
/* 255FC 8004A1FC 1040004A */  beqz      $v0, .L8004A328
/* 25600 8004A200 0200202D */   daddu    $a0, $s0, $zero
/* 25604 8004A204 3C02800F */  lui       $v0, %hi(gPlayerStatusPtr)
/* 25608 8004A208 8C427B30 */  lw        $v0, %lo(gPlayerStatusPtr)($v0)
/* 2560C 8004A20C C60C0038 */  lwc1      $f12, 0x38($s0)
/* 25610 8004A210 C60E0040 */  lwc1      $f14, 0x40($s0)
/* 25614 8004A214 8C460028 */  lw        $a2, 0x28($v0)
/* 25618 8004A218 0C00A7B5 */  jal       dist2D
/* 2561C 8004A21C 8C470030 */   lw       $a3, 0x30($v0)
/* 25620 8004A220 C6020018 */  lwc1      $f2, 0x18($s0)
/* 25624 8004A224 3C014014 */  lui       $at, (0x40140000 >> 16)
/* 25628 8004A228 44812800 */  mtc1      $at, $f5
/* 2562C 8004A22C 44802000 */  mtc1      $zero, $f4
/* 25630 8004A230 460010A1 */  cvt.d.s   $f2, $f2
/* 25634 8004A234 46241082 */  mul.d     $f2, $f2, $f4
/* 25638 8004A238 00000000 */  nop
/* 2563C 8004A23C 46000021 */  cvt.d.s   $f0, $f0
/* 25640 8004A240 4620103C */  c.lt.d    $f2, $f0
/* 25644 8004A244 00000000 */  nop
/* 25648 8004A248 45000036 */  bc1f      .L8004A324
/* 2564C 8004A24C 27A5002C */   addiu    $a1, $sp, 0x2C
/* 25650 8004A250 C6000038 */  lwc1      $f0, 0x38($s0)
/* 25654 8004A254 C602003C */  lwc1      $f2, 0x3C($s0)
/* 25658 8004A258 C6040040 */  lwc1      $f4, 0x40($s0)
/* 2565C 8004A25C 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 25660 8004A260 4481A000 */  mtc1      $at, $f20
/* 25664 8004A264 E7A0002C */  swc1      $f0, 0x2C($sp)
/* 25668 8004A268 E7A20030 */  swc1      $f2, 0x30($sp)
/* 2566C 8004A26C E7A40034 */  swc1      $f4, 0x34($sp)
/* 25670 8004A270 E7B40010 */  swc1      $f20, 0x10($sp)
/* 25674 8004A274 C600000C */  lwc1      $f0, 0xC($s0)
/* 25678 8004A278 E7A00014 */  swc1      $f0, 0x14($sp)
/* 2567C 8004A27C 860200A8 */  lh        $v0, 0xA8($s0)
/* 25680 8004A280 44820000 */  mtc1      $v0, $f0
/* 25684 8004A284 00000000 */  nop
/* 25688 8004A288 46800020 */  cvt.s.w   $f0, $f0
/* 2568C 8004A28C E7A00018 */  swc1      $f0, 0x18($sp)
/* 25690 8004A290 860200A6 */  lh        $v0, 0xA6($s0)
/* 25694 8004A294 27A60030 */  addiu     $a2, $sp, 0x30
/* 25698 8004A298 44820000 */  mtc1      $v0, $f0
/* 2569C 8004A29C 00000000 */  nop
/* 256A0 8004A2A0 46800020 */  cvt.s.w   $f0, $f0
/* 256A4 8004A2A4 E7A0001C */  swc1      $f0, 0x1C($sp)
/* 256A8 8004A2A8 8E040080 */  lw        $a0, 0x80($s0)
/* 256AC 8004A2AC 0C037711 */  jal       npc_test_move_simple_with_slipping
/* 256B0 8004A2B0 27A70034 */   addiu    $a3, $sp, 0x34
/* 256B4 8004A2B4 1040001B */  beqz      $v0, .L8004A324
/* 256B8 8004A2B8 0200282D */   daddu    $a1, $s0, $zero
/* 256BC 8004A2BC 24040002 */  addiu     $a0, $zero, 0x2
/* 256C0 8004A2C0 0000302D */  daddu     $a2, $zero, $zero
/* 256C4 8004A2C4 860300A8 */  lh        $v1, 0xA8($s0)
/* 256C8 8004A2C8 3C014000 */  lui       $at, (0x40000000 >> 16)
/* 256CC 8004A2CC 44810000 */  mtc1      $at, $f0
/* 256D0 8004A2D0 3C01C1A0 */  lui       $at, (0xC1A00000 >> 16)
/* 256D4 8004A2D4 44811000 */  mtc1      $at, $f2
/* 256D8 8004A2D8 2402000C */  addiu     $v0, $zero, 0xC
/* 256DC 8004A2DC AFA2001C */  sw        $v0, 0x1C($sp)
/* 256E0 8004A2E0 44833000 */  mtc1      $v1, $f6
/* 256E4 8004A2E4 00000000 */  nop
/* 256E8 8004A2E8 468031A0 */  cvt.s.w   $f6, $f6
/* 256EC 8004A2EC 44073000 */  mfc1      $a3, $f6
/* 256F0 8004A2F0 27A20028 */  addiu     $v0, $sp, 0x28
/* 256F4 8004A2F4 E7B40010 */  swc1      $f20, 0x10($sp)
/* 256F8 8004A2F8 AFA20020 */  sw        $v0, 0x20($sp)
/* 256FC 8004A2FC E7A00014 */  swc1      $f0, 0x14($sp)
/* 25700 8004A300 0C01BFA4 */  jal       fx_emote
/* 25704 8004A304 E7A20018 */   swc1     $f2, 0x18($sp)
/* 25708 8004A308 8E4200CC */  lw        $v0, 0xCC($s2)
/* 2570C 8004A30C 8C430000 */  lw        $v1, 0x0($v0)
/* 25710 8004A310 2402000F */  addiu     $v0, $zero, 0xF
/* 25714 8004A314 A602008E */  sh        $v0, 0x8E($s0)
/* 25718 8004A318 2402000E */  addiu     $v0, $zero, 0xE
/* 2571C 8004A31C 080128F1 */  j         .L8004A3C4
/* 25720 8004A320 AE030028 */   sw       $v1, 0x28($s0)
.L8004A324:
/* 25724 8004A324 0200202D */  daddu     $a0, $s0, $zero
.L8004A328:
/* 25728 8004A328 0C00F598 */  jal       spawn_surface_effects
/* 2572C 8004A32C 24050001 */   addiu    $a1, $zero, 0x1
/* 25730 8004A330 8E050018 */  lw        $a1, 0x18($s0)
/* 25734 8004A334 8E06000C */  lw        $a2, 0xC($s0)
/* 25738 8004A338 0C00EA95 */  jal       npc_move_heading
/* 2573C 8004A33C 0200202D */   daddu    $a0, $s0, $zero
/* 25740 8004A340 C6000018 */  lwc1      $f0, 0x18($s0)
/* 25744 8004A344 3C014020 */  lui       $at, (0x40200000 >> 16)
/* 25748 8004A348 44811800 */  mtc1      $at, $f3
/* 2574C 8004A34C 44801000 */  mtc1      $zero, $f2
/* 25750 8004A350 46000021 */  cvt.d.s   $f0, $f0
/* 25754 8004A354 4620103C */  c.lt.d    $f2, $f0
/* 25758 8004A358 00000000 */  nop
/* 2575C 8004A35C 45000012 */  bc1f      .L8004A3A8
/* 25760 8004A360 00000000 */   nop
/* 25764 8004A364 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* 25768 8004A368 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* 2576C 8004A36C 94430134 */  lhu       $v1, 0x134($v0)
/* 25770 8004A370 3C02CCCC */  lui       $v0, (0xCCCCCCCD >> 16)
/* 25774 8004A374 3442CCCD */  ori       $v0, $v0, (0xCCCCCCCD & 0xFFFF)
/* 25778 8004A378 00620019 */  multu     $v1, $v0
/* 2577C 8004A37C 00004010 */  mfhi      $t0
/* 25780 8004A380 00082082 */  srl       $a0, $t0, 2
/* 25784 8004A384 00041080 */  sll       $v0, $a0, 2
/* 25788 8004A388 00441021 */  addu      $v0, $v0, $a0
/* 2578C 8004A38C 00621823 */  subu      $v1, $v1, $v0
/* 25790 8004A390 3063FFFF */  andi      $v1, $v1, 0xFFFF
/* 25794 8004A394 14600004 */  bnez      $v1, .L8004A3A8
/* 25798 8004A398 0200202D */   daddu    $a0, $s0, $zero
/* 2579C 8004A39C 240520C1 */  addiu     $a1, $zero, 0x20C1
/* 257A0 8004A3A0 0C012530 */  jal       ai_enemy_play_sound
/* 257A4 8004A3A4 0000302D */   daddu    $a2, $zero, $zero
.L8004A3A8:
/* 257A8 8004A3A8 8602008E */  lh        $v0, 0x8E($s0)
/* 257AC 8004A3AC 9603008E */  lhu       $v1, 0x8E($s0)
/* 257B0 8004A3B0 18400003 */  blez      $v0, .L8004A3C0
/* 257B4 8004A3B4 2462FFFF */   addiu    $v0, $v1, -0x1
/* 257B8 8004A3B8 080128F2 */  j         .L8004A3C8
/* 257BC 8004A3BC A602008E */   sh       $v0, 0x8E($s0)
.L8004A3C0:
/* 257C0 8004A3C0 2402000C */  addiu     $v0, $zero, 0xC
.L8004A3C4:
/* 257C4 8004A3C4 AE620070 */  sw        $v0, 0x70($s3)
.L8004A3C8:
/* 257C8 8004A3C8 8FBF0048 */  lw        $ra, 0x48($sp)
/* 257CC 8004A3CC 8FB30044 */  lw        $s3, 0x44($sp)
/* 257D0 8004A3D0 8FB20040 */  lw        $s2, 0x40($sp)
/* 257D4 8004A3D4 8FB1003C */  lw        $s1, 0x3C($sp)
/* 257D8 8004A3D8 8FB00038 */  lw        $s0, 0x38($sp)
/* 257DC 8004A3DC D7B40050 */  ldc1      $f20, 0x50($sp)
/* 257E0 8004A3E0 03E00008 */  jr        $ra
/* 257E4 8004A3E4 27BD0058 */   addiu    $sp, $sp, 0x58

### DECOMPILED C INSTRUCTIONS:

void basic_ai_chase_init(Evt* script, MobileAISettings* npcAISettings, EnemyDetectVolume* territory) {
    Enemy* enemy = script->owner1.enemy;
    Npc* npc = get_npc_unsafe(enemy->npcID);
    s32 skipTurnAround = FALSE;

    if ((gPlayerStatusPtr->actionState == ACTION_STATE_JUMP || gPlayerStatusPtr->actionState == ACTION_STATE_BOUNCE ||
        gPlayerStatusPtr->actionState == ACTION_STATE_HOP || gPlayerStatusPtr->actionState == ACTION_STATE_FALLING) &&
        (f64)dist2D(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z) < npc->collisionDiameter)
    {
        skipTurnAround = TRUE;
    }

    if (!skipTurnAround) {
        f32 angle = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z);
        f32 deltaAngleToPlayer = get_clamped_angle_diff(npc->yaw, angle);

        if (npcAISettings->chaseTurnRate < fabsf(deltaAngleToPlayer)) {
            angle = npc->yaw;
            if (deltaAngleToPlayer < 0.0f) {
                angle += -npcAISettings->chaseTurnRate;
            } else {
                angle += npcAISettings->chaseTurnRate;
            }
        }
        npc->yaw = clamp_angle(angle);
        npc->duration = (npcAISettings->chaseUpdateInterval / 2) + rand_int((npcAISettings->chaseUpdateInterval / 2) + 1);
    } else {
        npc->duration = 0;
    }

    npc->currentAnim = enemy->animList[ENEMY_ANIM_INDEX_CHASE];
    npc->moveSpeed = npcAISettings->chaseSpeed;
    script->AI_TEMP_STATE = AI_STATE_CHASE;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel render_entities
/* A65B4 8010FEB4 27BDFFE0 */  addiu     $sp, $sp, -0x20
/* A65B8 8010FEB8 AFB10014 */  sw        $s1, 0x14($sp)
/* A65BC 8010FEBC 0000882D */  daddu     $s1, $zero, $zero
/* A65C0 8010FEC0 AFB20018 */  sw        $s2, 0x18($sp)
/* A65C4 8010FEC4 241200FF */  addiu     $s2, $zero, 0xFF
/* A65C8 8010FEC8 AFBF001C */  sw        $ra, 0x1C($sp)
/* A65CC 8010FECC AFB00010 */  sw        $s0, 0x10($sp)
.L8010FED0:
/* A65D0 8010FED0 0C04417A */  jal       get_entity_by_index
/* A65D4 8010FED4 0220202D */   daddu    $a0, $s1, $zero
/* A65D8 8010FED8 0040802D */  daddu     $s0, $v0, $zero
/* A65DC 8010FEDC 52000070 */  beql      $s0, $zero, .L801100A0
/* A65E0 8010FEE0 26310001 */   addiu    $s1, $s1, 0x1
/* A65E4 8010FEE4 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* A65E8 8010FEE8 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* A65EC 8010FEEC 80420070 */  lb        $v0, 0x70($v0)
/* A65F0 8010FEF0 14400025 */  bnez      $v0, .L8010FF88
/* A65F4 8010FEF4 00000000 */   nop
/* A65F8 8010FEF8 3C028015 */  lui       $v0, %hi(gEntityHideMode)
/* A65FC 8010FEFC 8C421310 */  lw        $v0, %lo(gEntityHideMode)($v0)
/* A6600 8010FF00 10400013 */  beqz      $v0, .L8010FF50
/* A6604 8010FF04 3C030008 */   lui      $v1, (0x80000 >> 16)
/* A6608 8010FF08 8E020000 */  lw        $v0, 0x0($s0)
/* A660C 8010FF0C 00431024 */  and       $v0, $v0, $v1
/* A6610 8010FF10 1440000F */  bnez      $v0, .L8010FF50
/* A6614 8010FF14 00000000 */   nop
/* A6618 8010FF18 8E060048 */  lw        $a2, 0x48($s0)
/* A661C 8010FF1C 3C02800F */  lui       $v0, %hi(gPlayerStatusPtr)
/* A6620 8010FF20 8C427B30 */  lw        $v0, %lo(gPlayerStatusPtr)($v0)
/* A6624 8010FF24 8E070050 */  lw        $a3, 0x50($s0)
/* A6628 8010FF28 C44C0028 */  lwc1      $f12, 0x28($v0)
/* A662C 8010FF2C 0C00A7B5 */  jal       dist2D
/* A6630 8010FF30 C44E0030 */   lwc1     $f14, 0x30($v0)
/* A6634 8010FF34 3C014348 */  lui       $at, (0x43480000 >> 16)
/* A6638 8010FF38 44811000 */  mtc1      $at, $f2
/* A663C 8010FF3C 00000000 */  nop
/* A6640 8010FF40 4600103C */  c.lt.s    $f2, $f0
/* A6644 8010FF44 00000000 */  nop
/* A6648 8010FF48 45030055 */  bc1tl     .L801100A0
/* A664C 8010FF4C 26310001 */   addiu    $s1, $s1, 0x1
.L8010FF50:
/* A6650 8010FF50 3C038015 */  lui       $v1, %hi(gEntityHideMode)
/* A6654 8010FF54 8C631310 */  lw        $v1, %lo(gEntityHideMode)($v1)
/* A6658 8010FF58 24020001 */  addiu     $v0, $zero, 0x1
/* A665C 8010FF5C 54620004 */  bnel      $v1, $v0, .L8010FF70
/* A6660 8010FF60 24020002 */   addiu    $v0, $zero, 0x2
/* A6664 8010FF64 8E020000 */  lw        $v0, 0x0($s0)
/* A6668 8010FF68 08043FE0 */  j         .L8010FF80
/* A666C 8010FF6C 30420002 */   andi     $v0, $v0, 0x2
.L8010FF70:
/* A6670 8010FF70 14620005 */  bne       $v1, $v0, .L8010FF88
/* A6674 8010FF74 3C030004 */   lui      $v1, (0x40000 >> 16)
/* A6678 8010FF78 8E020000 */  lw        $v0, 0x0($s0)
/* A667C 8010FF7C 00431024 */  and       $v0, $v0, $v1
.L8010FF80:
/* A6680 8010FF80 50400047 */  beql      $v0, $zero, .L801100A0
/* A6684 8010FF84 26310001 */   addiu    $s1, $s1, 0x1
.L8010FF88:
/* A6688 8010FF88 8E030000 */  lw        $v1, 0x0($s0)
/* A668C 8010FF8C 30620001 */  andi      $v0, $v1, 0x1
/* A6690 8010FF90 54400043 */  bnel      $v0, $zero, .L801100A0
/* A6694 8010FF94 26310001 */   addiu    $s1, $s1, 0x1
/* A6698 8010FF98 30620008 */  andi      $v0, $v1, 0x8
/* A669C 8010FF9C 1040001F */  beqz      $v0, .L8011001C
/* A66A0 8010FFA0 00000000 */   nop
/* A66A4 8010FFA4 3C028015 */  lui       $v0, %hi(D_8014AFB0)
/* A66A8 8010FFA8 8C42AFB0 */  lw        $v0, %lo(D_8014AFB0)($v0)
/* A66AC 8010FFAC 14520007 */  bne       $v0, $s2, .L8010FFCC
/* A66B0 8010FFB0 00000000 */   nop
/* A66B4 8010FFB4 8E06003C */  lw        $a2, 0x3C($s0)
/* A66B8 8010FFB8 10C0000A */  beqz      $a2, .L8010FFE4
/* A66BC 8010FFBC 00000000 */   nop
/* A66C0 8010FFC0 86040014 */  lh        $a0, 0x14($s0)
/* A66C4 8010FFC4 08043FF7 */  j         .L8010FFDC
/* A66C8 8010FFC8 92050004 */   lbu      $a1, 0x4($s0)
.L8010FFCC:
/* A66CC 8010FFCC 86040014 */  lh        $a0, 0x14($s0)
/* A66D0 8010FFD0 92050004 */  lbu       $a1, 0x4($s0)
/* A66D4 8010FFD4 3C068011 */  lui       $a2, %hi(func_8010FE44)
/* A66D8 8010FFD8 24C6FE44 */  addiu     $a2, $a2, %lo(func_8010FE44)
.L8010FFDC:
/* A66DC 8010FFDC 0C048000 */  jal       set_animator_render_callback
/* A66E0 8010FFE0 00000000 */   nop
.L8010FFE4:
/* A66E4 8010FFE4 8E070044 */  lw        $a3, 0x44($s0)
/* A66E8 8010FFE8 14E00006 */  bnez      $a3, .L80110004
/* A66EC 8010FFEC 00000000 */   nop
/* A66F0 8010FFF0 86040014 */  lh        $a0, 0x14($s0)
/* A66F4 8010FFF4 0C047CC1 */  jal       render_animated_model
/* A66F8 8010FFF8 260500B8 */   addiu    $a1, $s0, 0xB8
/* A66FC 8010FFFC 08044028 */  j         .L801100A0
/* A6700 80110000 26310001 */   addiu    $s1, $s1, 0x1
.L80110004:
/* A6704 80110004 86040014 */  lh        $a0, 0x14($s0)
/* A6708 80110008 86060012 */  lh        $a2, 0x12($s0)
/* A670C 8011000C 0C047CFA */  jal       render_animated_model_with_vertices
/* A6710 80110010 260500B8 */   addiu    $a1, $s0, 0xB8
/* A6714 80110014 08044028 */  j         .L801100A0
/* A6718 80110018 26310001 */   addiu    $s1, $s1, 0x1
.L8011001C:
/* A671C 8011001C 3C028015 */  lui       $v0, %hi(D_8014AFB0)
/* A6720 80110020 8C42AFB0 */  lw        $v0, %lo(D_8014AFB0)($v0)
/* A6724 80110024 1452000B */  bne       $v0, $s2, .L80110054
/* A6728 80110028 00000000 */   nop
/* A672C 8011002C 8E06003C */  lw        $a2, 0x3C($s0)
/* A6730 80110030 10C00004 */  beqz      $a2, .L80110044
/* A6734 80110034 00000000 */   nop
/* A6738 80110038 86040014 */  lh        $a0, 0x14($s0)
/* A673C 8011003C 08044019 */  j         .L80110064
/* A6740 80110040 92050004 */   lbu      $a1, 0x4($s0)
.L80110044:
/* A6744 80110044 0C048B77 */  jal       get_entity_model
/* A6748 80110048 86040014 */   lh       $a0, 0x14($s0)
/* A674C 8011004C 0804401B */  j         .L8011006C
/* A6750 80110050 AC400060 */   sw       $zero, 0x60($v0)
.L80110054:
/* A6754 80110054 86040014 */  lh        $a0, 0x14($s0)
/* A6758 80110058 92050004 */  lbu       $a1, 0x4($s0)
/* A675C 8011005C 3C068011 */  lui       $a2, %hi(func_8010FE44)
/* A6760 80110060 24C6FE44 */  addiu     $a2, $a2, %lo(func_8010FE44)
.L80110064:
/* A6764 80110064 0C048BD9 */  jal       bind_entity_model_setupGfx
/* A6768 80110068 00000000 */   nop
.L8011006C:
/* A676C 8011006C 8E070044 */  lw        $a3, 0x44($s0)
/* A6770 80110070 14E00006 */  bnez      $a3, .L8011008C
/* A6774 80110074 00000000 */   nop
/* A6778 80110078 86040014 */  lh        $a0, 0x14($s0)
/* A677C 8011007C 0C04873A */  jal       draw_entity_model_A
/* A6780 80110080 260500B8 */   addiu    $a1, $s0, 0xB8
/* A6784 80110084 08044028 */  j         .L801100A0
/* A6788 80110088 26310001 */   addiu    $s1, $s1, 0x1
.L8011008C:
/* A678C 8011008C 86040014 */  lh        $a0, 0x14($s0)
/* A6790 80110090 86060012 */  lh        $a2, 0x12($s0)
/* A6794 80110094 0C0487AE */  jal       draw_entity_model_B
/* A6798 80110098 260500B8 */   addiu    $a1, $s0, 0xB8
/* A679C 8011009C 26310001 */  addiu     $s1, $s1, 0x1
.L801100A0:
/* A67A0 801100A0 2A22001E */  slti      $v0, $s1, 0x1E
/* A67A4 801100A4 1440FF8A */  bnez      $v0, .L8010FED0
/* A67A8 801100A8 00000000 */   nop
/* A67AC 801100AC 0C044033 */  jal       render_shadows
/* A67B0 801100B0 00000000 */   nop
/* A67B4 801100B4 8FBF001C */  lw        $ra, 0x1C($sp)
/* A67B8 801100B8 8FB20018 */  lw        $s2, 0x18($sp)
/* A67BC 801100BC 8FB10014 */  lw        $s1, 0x14($sp)
/* A67C0 801100C0 8FB00010 */  lw        $s0, 0x10($sp)
/* A67C4 801100C4 03E00008 */  jr        $ra
/* A67C8 801100C8 27BD0020 */   addiu    $sp, $sp, 0x20

### DECOMPILED C INSTRUCTIONS:

void render_entities(void) {
    s32 i;

    for (i = 0; i < MAX_ENTITIES; i++) {
        Entity* entity = get_entity_by_index(i);

        if (entity != NULL) {
            if (!gGameStatusPtr->isBattle) {
                if (gEntityHideMode != ENTITY_HIDE_MODE_0 &&
                    !(entity->flags & ENTITY_FLAG_IGNORE_DISTANCE_CULLING) &&
                    dist2D(gPlayerStatusPtr->position.x,
                           gPlayerStatusPtr->position.z,
                           entity->position.x,
                           entity->position.z) > 200.0f
                ) {
                    continue;
                }

                if (gEntityHideMode == ENTITY_HIDE_MODE_1) {
                    if (!(entity->flags & ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE1)) {
                        continue;
                    }
                } else if (gEntityHideMode == ENTITY_HIDE_MODE_2) {
                    if (!(entity->flags & ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE2)) {
                        continue;
                    }
                }
            }

            if (!(entity->flags & ENTITY_FLAG_HIDDEN)) {
                if (entity->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) {
                    if (D_8014AFB0 == 0xFF) {
                        if (entity->renderSetupFunc != NULL) {
                            set_animator_render_callback(
                                entity->virtualModelIndex,
                                (void*)(u32) entity->listIndex,
                                (void (*)(void*)) entity->renderSetupFunc
                            );
                        }
                    } else {
                        set_animator_render_callback(
                            entity->virtualModelIndex,
                            (void*)(u32) entity->listIndex,
                            func_8010FE44
                        );
                    }

                    if (entity->gfxBaseAddr == NULL) {
                        render_animated_model(entity->virtualModelIndex, &entity->transformMatrix);
                    } else {
                        render_animated_model_with_vertices(entity->virtualModelIndex,
                                      &entity->transformMatrix,
                                      entity->vertexSegment,
                                      entity->gfxBaseAddr);
                    }
                } else {
                    if (D_8014AFB0 == 0xFF) {
                        if (entity->renderSetupFunc != NULL) {
                            bind_entity_model_setupGfx(
                                entity->virtualModelIndex,
                                (void*)(u32) entity->listIndex,
                                (void (*)(void*)) entity->renderSetupFunc
                            );
                        } else {
                            get_entity_model(entity->virtualModelIndex)->fpSetupGfxCallback = NULL;
                        }
                    } else {
                        bind_entity_model_setupGfx(entity->virtualModelIndex, (void*)(u32)entity->listIndex, func_8010FE44);
                    }

                    if (entity->gfxBaseAddr == NULL) {
                        draw_entity_model_A(entity->virtualModelIndex, &entity->transformMatrix);
                    } else {
                        draw_entity_model_B(entity->virtualModelIndex,
                                               &entity->transformMatrix,
                                               entity->vertexSegment,
                                               entity->gfxBaseAddr);
                    }
                }
            }
        }
    }

    render_shadows();
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel throw_spiny_appendGfx
/* 3CF7F4 E00C8454 27BDFF38 */  addiu     $sp, $sp, -0xC8
/* 3CF7F8 E00C8458 0080302D */  daddu     $a2, $a0, $zero
/* 3CF7FC E00C845C 3C07DB06 */  lui       $a3, (0xDB060024 >> 16)
/* 3CF800 E00C8460 34E70024 */  ori       $a3, $a3, (0xDB060024 & 0xFFFF)
/* 3CF804 E00C8464 AFB300A4 */  sw        $s3, 0xA4($sp)
/* 3CF808 E00C8468 3C13800A */  lui       $s3, %hi(gMainGfxPos)
/* 3CF80C E00C846C 2673A66C */  addiu     $s3, $s3, %lo(gMainGfxPos)
/* 3CF810 E00C8470 27A40018 */  addiu     $a0, $sp, 0x18
/* 3CF814 E00C8474 AFBF00B8 */  sw        $ra, 0xB8($sp)
/* 3CF818 E00C8478 AFB700B4 */  sw        $s7, 0xB4($sp)
/* 3CF81C E00C847C AFB600B0 */  sw        $s6, 0xB0($sp)
/* 3CF820 E00C8480 AFB500AC */  sw        $s5, 0xAC($sp)
/* 3CF824 E00C8484 AFB400A8 */  sw        $s4, 0xA8($sp)
/* 3CF828 E00C8488 AFB200A0 */  sw        $s2, 0xA0($sp)
/* 3CF82C E00C848C AFB1009C */  sw        $s1, 0x9C($sp)
/* 3CF830 E00C8490 AFB00098 */  sw        $s0, 0x98($sp)
/* 3CF834 E00C8494 F7B400C0 */  sdc1      $f20, 0xC0($sp)
/* 3CF838 E00C8498 8E650000 */  lw        $a1, 0x0($s3)
/* 3CF83C E00C849C 8CD2000C */  lw        $s2, 0xC($a2)
/* 3CF840 E00C84A0 3C01E00D */  lui       $at, (0xE00D0000 >> 16)
/* 3CF844 E00C84A4 D4208740 */  ldc1      $f0, -0x78C0($at)
/* 3CF848 E00C84A8 00A0182D */  daddu     $v1, $a1, $zero
/* 3CF84C E00C84AC 24A50008 */  addiu     $a1, $a1, 0x8
/* 3CF850 E00C84B0 AE650000 */  sw        $a1, 0x0($s3)
/* 3CF854 E00C84B4 8E55003C */  lw        $s5, 0x3C($s2)
/* 3CF858 E00C84B8 8E560000 */  lw        $s6, 0x0($s2)
/* 3CF85C E00C84BC C6540040 */  lwc1      $f20, 0x40($s2)
/* 3CF860 E00C84C0 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 3CF864 E00C84C4 AC620000 */  sw        $v0, 0x0($v1)
/* 3CF868 E00C84C8 AC600004 */  sw        $zero, 0x4($v1)
/* 3CF86C E00C84CC ACA70000 */  sw        $a3, 0x0($a1)
/* 3CF870 E00C84D0 8CC30010 */  lw        $v1, 0x10($a2)
/* 3CF874 E00C84D4 24A20008 */  addiu     $v0, $a1, 0x8
/* 3CF878 E00C84D8 AE620000 */  sw        $v0, 0x0($s3)
/* 3CF87C E00C84DC 8C62001C */  lw        $v0, 0x1C($v1)
/* 3CF880 E00C84E0 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 3CF884 E00C84E4 4600A521 */  cvt.d.s   $f20, $f20
/* 3CF888 E00C84E8 4620A502 */  mul.d     $f20, $f20, $f0
/* 3CF88C E00C84EC 00000000 */  nop
/* 3CF890 E00C84F0 00431021 */  addu      $v0, $v0, $v1
/* 3CF894 E00C84F4 3C03800B */  lui       $v1, %hi(gCameras)
/* 3CF898 E00C84F8 24631D80 */  addiu     $v1, $v1, %lo(gCameras)
/* 3CF89C E00C84FC ACA20004 */  sw        $v0, 0x4($a1)
/* 3CF8A0 E00C8500 8E450004 */  lw        $a1, 0x4($s2)
/* 3CF8A4 E00C8504 8E460008 */  lw        $a2, 0x8($s2)
/* 3CF8A8 E00C8508 3C028007 */  lui       $v0, %hi(gCurrentCameraID)
/* 3CF8AC E00C850C 8C427410 */  lw        $v0, %lo(gCurrentCameraID)($v0)
/* 3CF8B0 E00C8510 8E47000C */  lw        $a3, 0xC($s2)
/* 3CF8B4 E00C8514 00028880 */  sll       $s1, $v0, 2
/* 3CF8B8 E00C8518 02228821 */  addu      $s1, $s1, $v0
/* 3CF8BC E00C851C 00118880 */  sll       $s1, $s1, 2
/* 3CF8C0 E00C8520 02228823 */  subu      $s1, $s1, $v0
/* 3CF8C4 E00C8524 001110C0 */  sll       $v0, $s1, 3
/* 3CF8C8 E00C8528 02228821 */  addu      $s1, $s1, $v0
/* 3CF8CC E00C852C 001188C0 */  sll       $s1, $s1, 3
/* 3CF8D0 E00C8530 02238821 */  addu      $s1, $s1, $v1
/* 3CF8D4 E00C8534 0C080108 */  jal       shim_guTranslateF
/* 3CF8D8 E00C8538 4620A520 */   cvt.s.d  $f20, $f20
/* 3CF8DC E00C853C C6400058 */  lwc1      $f0, 0x58($s2)
/* 3CF8E0 E00C8540 4600A002 */  mul.s     $f0, $f20, $f0
/* 3CF8E4 E00C8544 00000000 */  nop
/* 3CF8E8 E00C8548 44050000 */  mfc1      $a1, $f0
/* 3CF8EC E00C854C C640005C */  lwc1      $f0, 0x5C($s2)
/* 3CF8F0 E00C8550 4600A002 */  mul.s     $f0, $f20, $f0
/* 3CF8F4 E00C8554 00000000 */  nop
/* 3CF8F8 E00C8558 3C170001 */  lui       $s7, (0x11630 >> 16)
/* 3CF8FC E00C855C 27B00058 */  addiu     $s0, $sp, 0x58
/* 3CF900 E00C8560 4407A000 */  mfc1      $a3, $f20
/* 3CF904 E00C8564 44060000 */  mfc1      $a2, $f0
/* 3CF908 E00C8568 0C080110 */  jal       shim_guScaleF
/* 3CF90C E00C856C 0200202D */   daddu    $a0, $s0, $zero
/* 3CF910 E00C8570 0200202D */  daddu     $a0, $s0, $zero
/* 3CF914 E00C8574 27A50018 */  addiu     $a1, $sp, 0x18
/* 3CF918 E00C8578 0C080114 */  jal       shim_guMtxCatF
/* 3CF91C E00C857C 00A0302D */   daddu    $a2, $a1, $zero
/* 3CF920 E00C8580 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 3CF924 E00C8584 44810000 */  mtc1      $at, $f0
/* 3CF928 E00C8588 36F71630 */  ori       $s7, $s7, (0x11630 & 0xFFFF)
/* 3CF92C E00C858C E7A00010 */  swc1      $f0, 0x10($sp)
/* 3CF930 E00C8590 44800000 */  mtc1      $zero, $f0
/* 3CF934 E00C8594 0200202D */  daddu     $a0, $s0, $zero
/* 3CF938 E00C8598 44060000 */  mfc1      $a2, $f0
/* 3CF93C E00C859C 8E450050 */  lw        $a1, 0x50($s2)
/* 3CF940 E00C85A0 0C080104 */  jal       shim_guRotateF
/* 3CF944 E00C85A4 00C0382D */   daddu    $a3, $a2, $zero
/* 3CF948 E00C85A8 0200202D */  daddu     $a0, $s0, $zero
/* 3CF94C E00C85AC 27A50018 */  addiu     $a1, $sp, 0x18
/* 3CF950 E00C85B0 0C080114 */  jal       shim_guMtxCatF
/* 3CF954 E00C85B4 00A0302D */   daddu    $a2, $a1, $zero
/* 3CF958 E00C85B8 27A40018 */  addiu     $a0, $sp, 0x18
/* 3CF95C E00C85BC 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 3CF960 E00C85C0 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 3CF964 E00C85C4 3C14800A */  lui       $s4, %hi(gDisplayContext)
/* 3CF968 E00C85C8 2694A674 */  addiu     $s4, $s4, %lo(gDisplayContext)
/* 3CF96C E00C85CC 96050000 */  lhu       $a1, 0x0($s0)
/* 3CF970 E00C85D0 8E820000 */  lw        $v0, 0x0($s4)
/* 3CF974 E00C85D4 00052980 */  sll       $a1, $a1, 6
/* 3CF978 E00C85D8 00B72821 */  addu      $a1, $a1, $s7
/* 3CF97C E00C85DC 0C080118 */  jal       shim_guMtxF2L
/* 3CF980 E00C85E0 00452821 */   addu     $a1, $v0, $a1
/* 3CF984 E00C85E4 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 3CF988 E00C85E8 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 3CF98C E00C85EC 3C06DA38 */  lui       $a2, (0xDA380001 >> 16)
/* 3CF990 E00C85F0 34C60001 */  ori       $a2, $a2, (0xDA380001 & 0xFFFF)
/* 3CF994 E00C85F4 3C08D838 */  lui       $t0, (0xD8380002 >> 16)
/* 3CF998 E00C85F8 35080002 */  ori       $t0, $t0, (0xD8380002 & 0xFFFF)
/* 3CF99C E00C85FC 3C07DE00 */  lui       $a3, (0xDE000000 >> 16)
/* 3CF9A0 E00C8600 32B500FF */  andi      $s5, $s5, 0xFF
/* 3CF9A4 E00C8604 0016B080 */  sll       $s6, $s6, 2
/* 3CF9A8 E00C8608 8E640000 */  lw        $a0, 0x0($s3)
/* 3CF9AC E00C860C 96020000 */  lhu       $v0, 0x0($s0)
/* 3CF9B0 E00C8610 0080282D */  daddu     $a1, $a0, $zero
/* 3CF9B4 E00C8614 24840008 */  addiu     $a0, $a0, 0x8
/* 3CF9B8 E00C8618 AE640000 */  sw        $a0, 0x0($s3)
/* 3CF9BC E00C861C ACA30000 */  sw        $v1, 0x0($a1)
/* 3CF9C0 E00C8620 24430001 */  addiu     $v1, $v0, 0x1
/* 3CF9C4 E00C8624 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3CF9C8 E00C8628 00021180 */  sll       $v0, $v0, 6
/* 3CF9CC E00C862C A6030000 */  sh        $v1, 0x0($s0)
/* 3CF9D0 E00C8630 8E830000 */  lw        $v1, 0x0($s4)
/* 3CF9D4 E00C8634 00571021 */  addu      $v0, $v0, $s7
/* 3CF9D8 E00C8638 00621821 */  addu      $v1, $v1, $v0
/* 3CF9DC E00C863C 24820008 */  addiu     $v0, $a0, 0x8
/* 3CF9E0 E00C8640 ACA30004 */  sw        $v1, 0x4($a1)
/* 3CF9E4 E00C8644 AE620000 */  sw        $v0, 0x0($s3)
/* 3CF9E8 E00C8648 24820010 */  addiu     $v0, $a0, 0x10
/* 3CF9EC E00C864C AC860000 */  sw        $a2, 0x0($a0)
/* 3CF9F0 E00C8650 AE620000 */  sw        $v0, 0x0($s3)
/* 3CF9F4 E00C8654 8E230204 */  lw        $v1, 0x204($s1)
/* 3CF9F8 E00C8658 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3CF9FC E00C865C AC820008 */  sw        $v0, 0x8($a0)
/* 3CFA00 E00C8660 AC830004 */  sw        $v1, 0x4($a0)
/* 3CFA04 E00C8664 92430033 */  lbu       $v1, 0x33($s2)
/* 3CFA08 E00C8668 92450037 */  lbu       $a1, 0x37($s2)
/* 3CFA0C E00C866C 9246003B */  lbu       $a2, 0x3B($s2)
/* 3CFA10 E00C8670 24820018 */  addiu     $v0, $a0, 0x18
/* 3CFA14 E00C8674 AE620000 */  sw        $v0, 0x0($s3)
/* 3CFA18 E00C8678 24820020 */  addiu     $v0, $a0, 0x20
/* 3CFA1C E00C867C AC870010 */  sw        $a3, 0x10($a0)
/* 3CFA20 E00C8680 AE620000 */  sw        $v0, 0x0($s3)
/* 3CFA24 E00C8684 00031E00 */  sll       $v1, $v1, 24
/* 3CFA28 E00C8688 00052C00 */  sll       $a1, $a1, 16
/* 3CFA2C E00C868C 00651825 */  or        $v1, $v1, $a1
/* 3CFA30 E00C8690 00063200 */  sll       $a2, $a2, 8
/* 3CFA34 E00C8694 00661825 */  or        $v1, $v1, $a2
/* 3CFA38 E00C8698 00751825 */  or        $v1, $v1, $s5
/* 3CFA3C E00C869C AC83000C */  sw        $v1, 0xC($a0)
/* 3CFA40 E00C86A0 3C03E00D */  lui       $v1, (0xE00D0000 >> 16)
/* 3CFA44 E00C86A4 00761821 */  addu      $v1, $v1, $s6
/* 3CFA48 E00C86A8 8C638710 */  lw        $v1, -0x78F0($v1)
/* 3CFA4C E00C86AC 24820028 */  addiu     $v0, $a0, 0x28
/* 3CFA50 E00C86B0 AE620000 */  sw        $v0, 0x0($s3)
/* 3CFA54 E00C86B4 3C020900 */  lui       $v0, %hi(D_090009F0_415A50)
/* 3CFA58 E00C86B8 244209F0 */  addiu     $v0, $v0, %lo(D_090009F0_415A50)
/* 3CFA5C E00C86BC AC82001C */  sw        $v0, 0x1C($a0)
/* 3CFA60 E00C86C0 24020040 */  addiu     $v0, $zero, 0x40
/* 3CFA64 E00C86C4 AC870018 */  sw        $a3, 0x18($a0)
/* 3CFA68 E00C86C8 AC880020 */  sw        $t0, 0x20($a0)
/* 3CFA6C E00C86CC AC820024 */  sw        $v0, 0x24($a0)
/* 3CFA70 E00C86D0 AC830014 */  sw        $v1, 0x14($a0)
/* 3CFA74 E00C86D4 8FBF00B8 */  lw        $ra, 0xB8($sp)
/* 3CFA78 E00C86D8 8FB700B4 */  lw        $s7, 0xB4($sp)
/* 3CFA7C E00C86DC 8FB600B0 */  lw        $s6, 0xB0($sp)
/* 3CFA80 E00C86E0 8FB500AC */  lw        $s5, 0xAC($sp)
/* 3CFA84 E00C86E4 8FB400A8 */  lw        $s4, 0xA8($sp)
/* 3CFA88 E00C86E8 8FB300A4 */  lw        $s3, 0xA4($sp)
/* 3CFA8C E00C86EC 8FB200A0 */  lw        $s2, 0xA0($sp)
/* 3CFA90 E00C86F0 8FB1009C */  lw        $s1, 0x9C($sp)
/* 3CFA94 E00C86F4 8FB00098 */  lw        $s0, 0x98($sp)
/* 3CFA98 E00C86F8 D7B400C0 */  ldc1      $f20, 0xC0($sp)
/* 3CFA9C E00C86FC 03E00008 */  jr        $ra
/* 3CFAA0 E00C8700 27BD00C8 */   addiu    $sp, $sp, 0xC8
/* 3CFAA4 E00C8704 00000000 */  nop
/* 3CFAA8 E00C8708 00000000 */  nop
/* 3CFAAC E00C870C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void throw_spiny_appendGfx(void* effect) {
    Matrix4f sp18;
    Matrix4f sp58;
    Camera* camera = &gCameras[gCurrentCameraID];
    ThrowSpinyFXData* data = ((EffectInstance*)effect)->data.throwSpiny;
    s32 temp_s5 = data->rgba;
    s32 temp_s6 = data->unk_00;
    f32 scale = data->unk_40 * SPRITE_WORLD_SCALE_D;

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

    shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z);
    shim_guScaleF(sp58, scale * data->xScale, scale * data->yScale, scale);
    shim_guMtxCatF(sp58, sp18, sp18);
    shim_guRotateF(sp58, data->yaw, 0.0f, 0.0f, 1.0f);
    shim_guMtxCatF(sp58, sp18, sp18);
    shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
    gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
    gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_30, data->unk_34, data->unk_38, temp_s5);
    gSPDisplayList(gMainGfxPos++, D_E00C8710[temp_s6]);
    gSPDisplayList(gMainGfxPos++, D_090009F0_3D04E0);
    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel evt_get_variable
/* EC46C 802C7ABC 27BDFFE8 */  addiu     $sp, $sp, -0x18
/* EC470 802C7AC0 3C07EFE8 */  lui       $a3, (0xEFE82080 >> 16)
/* EC474 802C7AC4 34E72080 */  ori       $a3, $a3, (0xEFE82080 & 0xFFFF)
/* EC478 802C7AC8 00E5102A */  slt       $v0, $a3, $a1
/* EC47C 802C7ACC 104000B2 */  beqz      $v0, .L802C7D98
/* EC480 802C7AD0 AFBF0010 */   sw       $ra, 0x10($sp)
/* EC484 802C7AD4 3C02F119 */  lui       $v0, (0xF1194D80 >> 16)
/* EC488 802C7AD8 34424D80 */  ori       $v0, $v0, (0xF1194D80 & 0xFFFF)
/* EC48C 802C7ADC 0045102A */  slt       $v0, $v0, $a1
/* EC490 802C7AE0 104000AD */  beqz      $v0, .L802C7D98
/* EC494 802C7AE4 3C06F2E3 */   lui      $a2, (0xF2E31100 >> 16)
/* EC498 802C7AE8 34C61100 */  ori       $a2, $a2, (0xF2E31100 & 0xFFFF)
/* EC49C 802C7AEC 00C5102A */  slt       $v0, $a2, $a1
/* EC4A0 802C7AF0 14400007 */  bnez      $v0, .L802C7B10
/* EC4A4 802C7AF4 3C02F414 */   lui      $v0, (0xF4143E00 >> 16)
/* EC4A8 802C7AF8 0C0B1248 */  jal       evt_fixed_var_to_float
/* EC4AC 802C7AFC 00A0202D */   daddu    $a0, $a1, $zero
/* EC4B0 802C7B00 4600008D */  trunc.w.s $f2, $f0
/* EC4B4 802C7B04 44021000 */  mfc1      $v0, $f2
/* EC4B8 802C7B08 080B1F67 */  j         .L802C7D9C
/* EC4BC 802C7B0C 00000000 */   nop
.L802C7B10:
/* EC4C0 802C7B10 34423E00 */  ori       $v0, $v0, (0xF4143E00 & 0xFFFF)
/* EC4C4 802C7B14 0045102A */  slt       $v0, $v0, $a1
/* EC4C8 802C7B18 14400011 */  bnez      $v0, .L802C7B60
/* EC4CC 802C7B1C 3C02F545 */   lui      $v0, (0xF5456B00 >> 16)
/* EC4D0 802C7B20 3C020C84 */  lui       $v0, (0xC845880 >> 16)
/* EC4D4 802C7B24 34425880 */  ori       $v0, $v0, (0xC845880 & 0xFFFF)
/* EC4D8 802C7B28 00A22821 */  addu      $a1, $a1, $v0
/* EC4DC 802C7B2C 04A10002 */  bgez      $a1, .L802C7B38
/* EC4E0 802C7B30 00A0182D */   daddu    $v1, $a1, $zero
/* EC4E4 802C7B34 24A3001F */  addiu     $v1, $a1, 0x1F
.L802C7B38:
/* EC4E8 802C7B38 00033143 */  sra       $a2, $v1, 5
/* EC4EC 802C7B3C 00C0182D */  daddu     $v1, $a2, $zero
/* EC4F0 802C7B40 00031140 */  sll       $v0, $v1, 5
/* EC4F4 802C7B44 00A23023 */  subu      $a2, $a1, $v0
/* EC4F8 802C7B48 8C820140 */  lw        $v0, 0x140($a0)
/* EC4FC 802C7B4C 00031880 */  sll       $v1, $v1, 2
/* EC500 802C7B50 00621821 */  addu      $v1, $v1, $v0
/* EC504 802C7B54 8C630000 */  lw        $v1, 0x0($v1)
/* EC508 802C7B58 080B1F37 */  j         .L802C7CDC
/* EC50C 802C7B5C 24020001 */   addiu    $v0, $zero, 0x1
.L802C7B60:
/* EC510 802C7B60 34426B00 */  ori       $v0, $v0, (0xF5456B00 & 0xFFFF)
/* EC514 802C7B64 0045102A */  slt       $v0, $v0, $a1
/* EC518 802C7B68 1440000D */  bnez      $v0, .L802C7BA0
/* EC51C 802C7B6C 3C02F676 */   lui      $v0, (0xF6769800 >> 16)
/* EC520 802C7B70 3C020B53 */  lui       $v0, (0xB532B80 >> 16)
/* EC524 802C7B74 34422B80 */  ori       $v0, $v0, (0xB532B80 & 0xFFFF)
/* EC528 802C7B78 00A22821 */  addu      $a1, $a1, $v0
/* EC52C 802C7B7C 8C83013C */  lw        $v1, 0x13C($a0)
/* EC530 802C7B80 00051080 */  sll       $v0, $a1, 2
/* EC534 802C7B84 00431021 */  addu      $v0, $v0, $v1
/* EC538 802C7B88 8C450000 */  lw        $a1, 0x0($v0)
/* EC53C 802C7B8C 00E5102A */  slt       $v0, $a3, $a1
/* EC540 802C7B90 10400081 */  beqz      $v0, .L802C7D98
/* EC544 802C7B94 00C5102A */   slt      $v0, $a2, $a1
/* EC548 802C7B98 080B1F5F */  j         .L802C7D7C
/* EC54C 802C7B9C 00000000 */   nop
.L802C7BA0:
/* EC550 802C7BA0 34429800 */  ori       $v0, $v0, (0xF6769800 & 0xFFFF)
/* EC554 802C7BA4 0045102A */  slt       $v0, $v0, $a1
/* EC558 802C7BA8 14400007 */  bnez      $v0, .L802C7BC8
/* EC55C 802C7BAC 3C02F7A7 */   lui      $v0, (0xF7A7C500 >> 16)
/* EC560 802C7BB0 3C040A21 */  lui       $a0, (0xA21FE80 >> 16)
/* EC564 802C7BB4 3484FE80 */  ori       $a0, $a0, (0xA21FE80 & 0xFFFF)
/* EC568 802C7BB8 0C05154E */  jal       get_global_byte
/* EC56C 802C7BBC 00A42021 */   addu     $a0, $a1, $a0
/* EC570 802C7BC0 080B1F67 */  j         .L802C7D9C
/* EC574 802C7BC4 00000000 */   nop
.L802C7BC8:
/* EC578 802C7BC8 3442C500 */  ori       $v0, $v0, (0xF7A7C500 & 0xFFFF)
/* EC57C 802C7BCC 0045102A */  slt       $v0, $v0, $a1
/* EC580 802C7BD0 14400007 */  bnez      $v0, .L802C7BF0
/* EC584 802C7BD4 3C02F8D8 */   lui      $v0, (0xF8D8F200 >> 16)
/* EC588 802C7BD8 3C0408F0 */  lui       $a0, (0x8F0D180 >> 16)
/* EC58C 802C7BDC 3484D180 */  ori       $a0, $a0, (0x8F0D180 & 0xFFFF)
/* EC590 802C7BE0 0C051594 */  jal       get_area_byte
/* EC594 802C7BE4 00A42021 */   addu     $a0, $a1, $a0
/* EC598 802C7BE8 080B1F67 */  j         .L802C7D9C
/* EC59C 802C7BEC 00000000 */   nop
.L802C7BF0:
/* EC5A0 802C7BF0 3442F200 */  ori       $v0, $v0, (0xF8D8F200 & 0xFFFF)
/* EC5A4 802C7BF4 0045102A */  slt       $v0, $v0, $a1
/* EC5A8 802C7BF8 14400007 */  bnez      $v0, .L802C7C18
/* EC5AC 802C7BFC 3C02FA0A */   lui      $v0, (0xFA0A1F00 >> 16)
/* EC5B0 802C7C00 3C0407BF */  lui       $a0, (0x7BFA480 >> 16)
/* EC5B4 802C7C04 3484A480 */  ori       $a0, $a0, (0x7BFA480 & 0xFFFF)
/* EC5B8 802C7C08 0C05152F */  jal       get_global_flag
/* EC5BC 802C7C0C 00A42021 */   addu     $a0, $a1, $a0
/* EC5C0 802C7C10 080B1F67 */  j         .L802C7D9C
/* EC5C4 802C7C14 00000000 */   nop
.L802C7C18:
/* EC5C8 802C7C18 34421F00 */  ori       $v0, $v0, (0xFA0A1F00 & 0xFFFF)
/* EC5CC 802C7C1C 0045102A */  slt       $v0, $v0, $a1
/* EC5D0 802C7C20 14400007 */  bnez      $v0, .L802C7C40
/* EC5D4 802C7C24 3C02FB3B */   lui      $v0, (0xFB3B4C00 >> 16)
/* EC5D8 802C7C28 3C04068E */  lui       $a0, (0x68E7780 >> 16)
/* EC5DC 802C7C2C 34847780 */  ori       $a0, $a0, (0x68E7780 & 0xFFFF)
/* EC5E0 802C7C30 0C05157C */  jal       get_area_flag
/* EC5E4 802C7C34 00A42021 */   addu     $a0, $a1, $a0
/* EC5E8 802C7C38 080B1F67 */  j         .L802C7D9C
/* EC5EC 802C7C3C 00000000 */   nop
.L802C7C40:
/* EC5F0 802C7C40 34424C00 */  ori       $v0, $v0, (0xFB3B4C00 & 0xFFFF)
/* EC5F4 802C7C44 0045102A */  slt       $v0, $v0, $a1
/* EC5F8 802C7C48 14400012 */  bnez      $v0, .L802C7C94
/* EC5FC 802C7C4C 3C02FC6C */   lui      $v0, (0xFC6C7900 >> 16)
/* EC600 802C7C50 3C02055D */  lui       $v0, (0x55D4A80 >> 16)
/* EC604 802C7C54 34424A80 */  ori       $v0, $v0, (0x55D4A80 & 0xFFFF)
/* EC608 802C7C58 00A22821 */  addu      $a1, $a1, $v0
/* EC60C 802C7C5C 04A10002 */  bgez      $a1, .L802C7C68
/* EC610 802C7C60 00A0182D */   daddu    $v1, $a1, $zero
/* EC614 802C7C64 24A3001F */  addiu     $v1, $a1, 0x1F
.L802C7C68:
/* EC618 802C7C68 00033143 */  sra       $a2, $v1, 5
/* EC61C 802C7C6C 00C0182D */  daddu     $v1, $a2, $zero
/* EC620 802C7C70 00031140 */  sll       $v0, $v1, 5
/* EC624 802C7C74 00A23023 */  subu      $a2, $a1, $v0
/* EC628 802C7C78 3C02802E */  lui       $v0, %hi(gMapFlags)
/* EC62C 802C7C7C 8C42A480 */  lw        $v0, %lo(gMapFlags)($v0)
/* EC630 802C7C80 00031880 */  sll       $v1, $v1, 2
/* EC634 802C7C84 00621821 */  addu      $v1, $v1, $v0
/* EC638 802C7C88 8C630000 */  lw        $v1, 0x0($v1)
/* EC63C 802C7C8C 080B1F37 */  j         .L802C7CDC
/* EC640 802C7C90 24020001 */   addiu    $v0, $zero, 0x1
.L802C7C94:
/* EC644 802C7C94 34427900 */  ori       $v0, $v0, (0xFC6C7900 & 0xFFFF)
/* EC648 802C7C98 0045102A */  slt       $v0, $v0, $a1
/* EC64C 802C7C9C 14400013 */  bnez      $v0, .L802C7CEC
/* EC650 802C7CA0 3C02FD9D */   lui      $v0, (0xFD9DA600 >> 16)
/* EC654 802C7CA4 3C02042C */  lui       $v0, (0x42C1D80 >> 16)
/* EC658 802C7CA8 34421D80 */  ori       $v0, $v0, (0x42C1D80 & 0xFFFF)
/* EC65C 802C7CAC 00A22821 */  addu      $a1, $a1, $v0
/* EC660 802C7CB0 04A10002 */  bgez      $a1, .L802C7CBC
/* EC664 802C7CB4 00A0182D */   daddu    $v1, $a1, $zero
/* EC668 802C7CB8 24A3001F */  addiu     $v1, $a1, 0x1F
.L802C7CBC:
/* EC66C 802C7CBC 00033143 */  sra       $a2, $v1, 5
/* EC670 802C7CC0 00C0182D */  daddu     $v1, $a2, $zero
/* EC674 802C7CC4 00031140 */  sll       $v0, $v1, 5
/* EC678 802C7CC8 00A23023 */  subu      $a2, $a1, $v0
/* EC67C 802C7CCC 00031880 */  sll       $v1, $v1, 2
/* EC680 802C7CD0 00831821 */  addu      $v1, $a0, $v1
/* EC684 802C7CD4 24020001 */  addiu     $v0, $zero, 0x1
/* EC688 802C7CD8 8C6300C4 */  lw        $v1, 0xC4($v1)
.L802C7CDC:
/* EC68C 802C7CDC 00C21004 */  sllv      $v0, $v0, $a2
/* EC690 802C7CE0 00622824 */  and       $a1, $v1, $v0
/* EC694 802C7CE4 080B1F67 */  j         .L802C7D9C
/* EC698 802C7CE8 0005102B */   sltu     $v0, $zero, $a1
.L802C7CEC:
/* EC69C 802C7CEC 3442A600 */  ori       $v0, $v0, (0xFD9DA600 & 0xFFFF)
/* EC6A0 802C7CF0 0045102A */  slt       $v0, $v0, $a1
/* EC6A4 802C7CF4 14400010 */  bnez      $v0, .L802C7D38
/* EC6A8 802C7CF8 3C02FECE */   lui      $v0, (0xFECED300 >> 16)
/* EC6AC 802C7CFC 3C0202FA */  lui       $v0, (0x2FAF080 >> 16)
/* EC6B0 802C7D00 3442F080 */  ori       $v0, $v0, (0x2FAF080 & 0xFFFF)
/* EC6B4 802C7D04 00A22821 */  addu      $a1, $a1, $v0
/* EC6B8 802C7D08 3C03EFE8 */  lui       $v1, (0xEFE82080 >> 16)
/* EC6BC 802C7D0C 3C04802E */  lui       $a0, %hi(gMapVars)
/* EC6C0 802C7D10 8C84A484 */  lw        $a0, %lo(gMapVars)($a0)
/* EC6C4 802C7D14 00051080 */  sll       $v0, $a1, 2
/* EC6C8 802C7D18 00441021 */  addu      $v0, $v0, $a0
/* EC6CC 802C7D1C 8C450000 */  lw        $a1, 0x0($v0)
/* EC6D0 802C7D20 34632080 */  ori       $v1, $v1, (0xEFE82080 & 0xFFFF)
/* EC6D4 802C7D24 0065182A */  slt       $v1, $v1, $a1
/* EC6D8 802C7D28 1060001B */  beqz      $v1, .L802C7D98
/* EC6DC 802C7D2C 3C02F2E3 */   lui      $v0, (0xF2E3D300 >> 16)
/* EC6E0 802C7D30 080B1F5E */  j         .L802C7D78
/* EC6E4 802C7D34 34421100 */   ori      $v0, $v0, (0xF2E31100 & 0xFFFF)
.L802C7D38:
/* EC6E8 802C7D38 3442D300 */  ori       $v0, $v0, (0xF2E3D300 & 0xFFFF)
/* EC6EC 802C7D3C 0045102A */  slt       $v0, $v0, $a1
/* EC6F0 802C7D40 14400016 */  bnez      $v0, .L802C7D9C
/* EC6F4 802C7D44 00A0102D */   daddu    $v0, $a1, $zero
/* EC6F8 802C7D48 3C0201C9 */  lui       $v0, (0x1C9C380 >> 16)
/* EC6FC 802C7D4C 3442C380 */  ori       $v0, $v0, (0x1C9C380 & 0xFFFF)
/* EC700 802C7D50 00A22821 */  addu      $a1, $a1, $v0
/* EC704 802C7D54 00051080 */  sll       $v0, $a1, 2
/* EC708 802C7D58 00821021 */  addu      $v0, $a0, $v0
/* EC70C 802C7D5C 8C450084 */  lw        $a1, 0x84($v0)
/* EC710 802C7D60 3C02EFE8 */  lui       $v0, (0xEFE82080 >> 16)
/* EC714 802C7D64 34422080 */  ori       $v0, $v0, (0xEFE82080 & 0xFFFF)
/* EC718 802C7D68 0045102A */  slt       $v0, $v0, $a1
/* EC71C 802C7D6C 1040000A */  beqz      $v0, .L802C7D98
/* EC720 802C7D70 3C02F2E3 */   lui      $v0, (0xF2E31100 >> 16)
/* EC724 802C7D74 34421100 */  ori       $v0, $v0, (0xF2E31100 & 0xFFFF)
.L802C7D78:
/* EC728 802C7D78 0045102A */  slt       $v0, $v0, $a1
.L802C7D7C:
/* EC72C 802C7D7C 14400007 */  bnez      $v0, .L802C7D9C
/* EC730 802C7D80 00A0102D */   daddu    $v0, $a1, $zero
/* EC734 802C7D84 0C0B1248 */  jal       evt_fixed_var_to_float
/* EC738 802C7D88 00A0202D */   daddu    $a0, $a1, $zero
/* EC73C 802C7D8C 4600008D */  trunc.w.s $f2, $f0
/* EC740 802C7D90 44051000 */  mfc1      $a1, $f2
/* EC744 802C7D94 00000000 */  nop
.L802C7D98:
/* EC748 802C7D98 00A0102D */  daddu     $v0, $a1, $zero
.L802C7D9C:
/* EC74C 802C7D9C 8FBF0010 */  lw        $ra, 0x10($sp)
/* EC750 802C7DA0 03E00008 */  jr        $ra
/* EC754 802C7DA4 27BD0018 */   addiu    $sp, $sp, 0x18

### DECOMPILED C INSTRUCTIONS:

    if ((evt_get_variable(script, var) & *args++) == 0) {
        script->ptrNextLine = evt_skip_if(script);
        return ApiStatus_DONE2;
    }
    return ApiStatus_DONE2;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel parasol_get_npc
/* E287F0 802B6000 27BDFFD0 */  addiu     $sp, $sp, -0x30
/* E287F4 802B6004 AFB00020 */  sw        $s0, 0x20($sp)
/* E287F8 802B6008 3C108011 */  lui       $s0, %hi(gPlayerStatus)
/* E287FC 802B600C 2610EFC8 */  addiu     $s0, $s0, %lo(gPlayerStatus)
/* E28800 802B6010 AFBF0028 */  sw        $ra, 0x28($sp)
/* E28804 802B6014 AFB10024 */  sw        $s1, 0x24($sp)
.L802B6018:
/* E28808 802B6018 8E030000 */  lw        $v1, 0x0($s0)
/* E2880C 802B601C 0461003E */  bgez      $v1, .L802B6118
/* E28810 802B6020 0200882D */   daddu    $s1, $s0, $zero
/* E28814 802B6024 3C027FFF */  lui       $v0, (0x7FFFFFFF >> 16)
/* E28818 802B6028 3442FFFF */  ori       $v0, $v0, (0x7FFFFFFF & 0xFFFF)
/* E2881C 802B602C 3C040001 */  lui       $a0, (0x10017 >> 16)
/* E28820 802B6030 34840017 */  ori       $a0, $a0, (0x10017 & 0xFFFF)
/* E28824 802B6034 00621024 */  and       $v0, $v1, $v0
/* E28828 802B6038 0C037FDE */  jal       suggest_player_anim_always_forward
/* E2882C 802B603C AE020000 */   sw       $v0, 0x0($s0)
.L802B6040:
/* E28830 802B6040 C60C0028 */  lwc1      $f12, 0x28($s0)
.L802B6044:
/* E28834 802B6044 C60E0030 */  lwc1      $f14, 0x30($s0)
glabel action_hammer_play_hit_fx
/* E28838 802B6048 86020016 */  lh        $v0, 0x16($s0)
.L802B604C:
/* E2883C 802B604C 3C014192 */  lui       $at, (0x4192C745 >> 16)
.L802B6050:
/* E28840 802B6050 3421C745 */  ori       $at, $at, (0x4192C745 & 0xFFFF)
/* E28844 802B6054 44810000 */  mtc1      $at, $f0
.L802B6058:
/* E28848 802B6058 3C01C06F */  lui       $at, (0xC06F3B64 >> 16)
/* E2884C 802B605C 34213B64 */  ori       $at, $at, (0xC06F3B64 & 0xFFFF)
glabel action_update_sliding
/* E28850 802B6060 44811000 */  mtc1      $at, $f2
/* E28854 802B6064 3C013F4E */  lui       $at, (0x3F4E4F76 >> 16)
.L802B6068:
/* E28858 802B6068 34214F76 */  ori       $at, $at, (0x3F4E4F76 & 0xFFFF)
/* E2885C 802B606C 44812000 */  mtc1      $at, $f4
/* E28860 802B6070 3C01BDCA */  lui       $at, (0xBDCA233A >> 16)
.L802B6074:
/* E28864 802B6074 3421233A */  ori       $at, $at, (0xBDCA233A & 0xFFFF)
/* E28868 802B6078 44813000 */  mtc1      $at, $f6
glabel .L802B607C
/* E2886C 802B607C 8604001A */  lh        $a0, 0x1A($s0)
.L802B6080:
/* E28870 802B6080 3C03800B */  lui       $v1, %hi(gCameras)
/* E28874 802B6084 24631D80 */  addiu     $v1, $v1, %lo(gCameras)
/* E28878 802B6088 A20000B6 */  sb        $zero, 0xB6($s0)
.L802B608C:
/* E2887C 802B608C 44824000 */  mtc1      $v0, $f8
.L802B6090:
/* E28880 802B6090 00000000 */  nop
.L802B6094:
/* E28884 802B6094 46804220 */  cvt.s.w   $f8, $f8
/* E28888 802B6098 44064000 */  mfc1      $a2, $f8
glabel action_update_state_23
/* E2888C 802B609C 8E020000 */  lw        $v0, 0x0($s0)
/* E28890 802B60A0 44844000 */  mtc1      $a0, $f8
glabel action_update_use_spinning_flower
/* E28894 802B60A4 00000000 */  nop
.L802B60A8:
/* E28898 802B60A8 46804220 */  cvt.s.w   $f8, $f8
.L802B60AC:
/* E2889C 802B60AC E6000070 */  swc1      $f0, 0x70($s0)
/* E288A0 802B60B0 E6020074 */  swc1      $f2, 0x74($s0)
glabel action_update_jump
/* E288A4 802B60B4 E6040078 */  swc1      $f4, 0x78($s0)
/* E288A8 802B60B8 E606007C */  swc1      $f6, 0x7C($s0)
/* E288AC 802B60BC 34420008 */  ori       $v0, $v0, 0x8
/* E288B0 802B60C0 AE020000 */  sw        $v0, 0x0($s0)
/* E288B4 802B60C4 94620002 */  lhu       $v0, 0x2($v1)
.L802B60C8:
/* E288B8 802B60C8 44074000 */  mfc1      $a3, $f8
/* E288BC 802B60CC 34420001 */  ori       $v0, $v0, 0x1
glabel .L802B60D0
/* E288C0 802B60D0 0C00A720 */  jal       atan2
.L802B60D4:
/* E288C4 802B60D4 A4620002 */   sh       $v0, 0x2($v1)
/* E288C8 802B60D8 86020016 */  lh        $v0, 0x16($s0)
/* E288CC 802B60DC 8603001A */  lh        $v1, 0x1A($s0)
/* E288D0 802B60E0 3C01802B */  lui       $at, %hi(.L802B6240)
/* E288D4 802B60E4 E4206240 */  swc1      $f0, %lo(.L802B6240)($at)
.L802B60E8:
/* E288D8 802B60E8 44826000 */  mtc1      $v0, $f12
.L802B60EC:
/* E288DC 802B60EC 00000000 */  nop
.L802B60F0:
/* E288E0 802B60F0 46806320 */  cvt.s.w   $f12, $f12
glabel .L802B60F4
/* E288E4 802B60F4 44837000 */  mtc1      $v1, $f14
/* E288E8 802B60F8 00000000 */  nop
/* E288EC 802B60FC 0C038022 */  jal       get_xz_dist_to_player
.L802B6100:
/* E288F0 802B6100 468073A0 */   cvt.s.w  $f14, $f14
.L802B6104:
/* E288F4 802B6104 3C014190 */  lui       $at, (0x41900000 >> 16)
.L802B6108:
/* E288F8 802B6108 44811000 */  mtc1      $at, $f2
glabel .L802B610C
/* E288FC 802B610C 00000000 */  nop
.L802B6110:
/* E28900 802B6110 46020003 */  div.s     $f0, $f0, $f2
/* E28904 802B6114 E6000054 */  swc1      $f0, 0x54($s0)
.L802B6118:
/* E28908 802B6118 3C01802B */  lui       $at, %hi(.L802B6240)
/* E2890C 802B611C C42C6240 */  lwc1      $f12, %lo(.L802B6240)($at)
glabel action_update_parasol
/* E28910 802B6120 3C0140C9 */  lui       $at, (0x40C90FD0 >> 16)
.L802B6124:
/* E28914 802B6124 34210FD0 */  ori       $at, $at, (0x40C90FD0 & 0xFFFF)
.L802B6128:
/* E28918 802B6128 44810000 */  mtc1      $at, $f0
/* E2891C 802B612C 00000000 */  nop
/* E28920 802B6130 46006302 */  mul.s     $f12, $f12, $f0
glabel .L802B6134
/* E28924 802B6134 00000000 */  nop
/* E28928 802B6138 27A50010 */  addiu     $a1, $sp, 0x10
.L802B613C:
/* E2892C 802B613C 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
.L802B6140:
/* E28930 802B6140 44810000 */  mtc1      $at, $f0
.L802B6144:
/* E28934 802B6144 27A60014 */  addiu     $a2, $sp, 0x14
/* E28938 802B6148 0C00A82D */  jal       sin_cos_rad
.L802B614C:
/* E2893C 802B614C 46006303 */   div.s    $f12, $f12, $f0
.L802B6150:
/* E28940 802B6150 3C030004 */  lui       $v1, (0x40000 >> 16)
.L802B6154:
/* E28944 802B6154 8E020000 */  lw        $v0, 0x0($s0)
.L802B6158:
/* E28948 802B6158 C6020054 */  lwc1      $f2, 0x54($s0)
.L802B615C:
/* E2894C 802B615C 00431024 */  and       $v0, $v0, $v1
/* E28950 802B6160 10400006 */  beqz      $v0, .L802B617C
.L802B6164:
/* E28954 802B6164 00000000 */   nop
.L802B6168:
/* E28958 802B6168 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* E2895C 802B616C 44810000 */  mtc1      $at, $f0
glabel .L802B6170
/* E28960 802B6170 00000000 */  nop
glabel .L802B6174
/* E28964 802B6174 46001082 */  mul.s     $f2, $f2, $f0
/* E28968 802B6178 00000000 */  nop
.L802B617C:
/* E2896C 802B617C C7A00010 */  lwc1      $f0, 0x10($sp)
.L802B6180:
/* E28970 802B6180 46001002 */  mul.s     $f0, $f2, $f0
glabel .L802B6184
/* E28974 802B6184 00000000 */  nop
.L802B6188:
/* E28978 802B6188 C7A40014 */  lwc1      $f4, 0x14($sp)
.L802B618C:
/* E2897C 802B618C 46041102 */  mul.s     $f4, $f2, $f4
.L802B6190:
/* E28980 802B6190 00000000 */  nop
.L802B6194:
/* E28984 802B6194 C6020028 */  lwc1      $f2, 0x28($s0)
glabel func_802B6198
/* E28988 802B6198 46001080 */  add.s     $f2, $f2, $f0
/* E2898C 802B619C C6000030 */  lwc1      $f0, 0x30($s0)
.L802B61A0:
/* E28990 802B61A0 820200B6 */  lb        $v0, 0xB6($s0)
.L802B61A4:
/* E28994 802B61A4 46040001 */  sub.s     $f0, $f0, $f4
.L802B61A8:
/* E28998 802B61A8 E6020028 */  swc1      $f2, 0x28($s0)
.L802B61AC:
/* E2899C 802B61AC 14400012 */  bnez      $v0, .L802B61F8
.L802B61B0:
/* E289A0 802B61B0 E6000030 */   swc1     $f0, 0x30($s0)
.L802B61B4:
/* E289A4 802B61B4 0C038D12 */  jal       integrate_gravity
/* E289A8 802B61B8 00000000 */   nop
/* E289AC 802B61BC C600002C */  lwc1      $f0, 0x2C($s0)
glabel func_802B61C0
/* E289B0 802B61C0 C6040070 */  lwc1      $f4, 0x70($s0)
/* E289B4 802B61C4 46040000 */  add.s     $f0, $f0, $f4
.L802B61C8:
/* E289B8 802B61C8 44801000 */  mtc1      $zero, $f2
.L802B61CC:
/* E289BC 802B61CC 00000000 */  nop
/* E289C0 802B61D0 4602203C */  c.lt.s    $f4, $f2
.L802B61D4:
/* E289C4 802B61D4 00000000 */  nop
.L802B61D8:
/* E289C8 802B61D8 45000014 */  bc1f      .L802B622C
.L802B61DC:
/* E289CC 802B61DC E600002C */   swc1     $f0, 0x2C($s0)
/* E289D0 802B61E0 8E020000 */  lw        $v0, 0x0($s0)
glabel func_802B61E4
/* E289D4 802B61E4 24030001 */  addiu     $v1, $zero, 0x1
.L802B61E8:
/* E289D8 802B61E8 A20300B6 */  sb        $v1, 0xB6($s0)
.L802B61EC:
/* E289DC 802B61EC 34420004 */  ori       $v0, $v0, 0x4
.L802B61F0:
/* E289E0 802B61F0 080AD88B */  j         .L802B622C
.L802B61F4:
/* E289E4 802B61F4 AE020000 */   sw       $v0, 0x0($s0)
.L802B61F8:
/* E289E8 802B61F8 0C038D36 */  jal       func_800E34D8
.L802B61FC:
/* E289EC 802B61FC 00000000 */   nop
.L802B6200:
/* E289F0 802B6200 46000306 */  mov.s     $f12, $f0
.L802B6204:
/* E289F4 802B6204 0C038D45 */  jal       player_check_collision_below
glabel .L802B6208
/* E289F8 802B6208 27A50018 */   addiu    $a1, $sp, 0x18
/* E289FC 802B620C 8FA40018 */  lw        $a0, 0x18($sp)
.L802B6210:
/* E28A00 802B6210 04800006 */  bltz      $a0, .L802B622C
.L802B6214:
/* E28A04 802B6214 E620002C */   swc1     $f0, 0x2C($s1)
glabel .L802B6218
/* E28A08 802B6218 0C016F6A */  jal       get_collider_flags
/* E28A0C 802B621C 00000000 */   nop
.L802B6220:
/* E28A10 802B6220 AFA20018 */  sw        $v0, 0x18($sp)
.L802B6224:
/* E28A14 802B6224 0C039769 */  jal       set_action_state
glabel .L802B6228
/* E28A18 802B6228 2404000A */   addiu    $a0, $zero, 0xA
.L802B622C:
/* E28A1C 802B622C 8FBF0028 */  lw        $ra, 0x28($sp)
glabel action_update_step_up_peach
/* E28A20 802B6230 8FB10024 */  lw        $s1, 0x24($sp)
/* E28A24 802B6234 8FB00020 */  lw        $s0, 0x20($sp)
glabel .L802B6238
/* E28A28 802B6238 03E00008 */  jr        $ra
glabel .L802B623C
/* E28A2C 802B623C 27BD0030 */   addiu    $sp, $sp, 0x30

### DECOMPILED C INSTRUCTIONS:

void action_update_knockback(void) {
    PlayerStatus* playerStatus = &gPlayerStatus;
    f32 dx, dy;
    f32 speed;

    static f32 ReturnAngle;

    if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) {
        playerStatus->flags &= ~PS_FLAG_ACTION_STATE_CHANGED;

        suggest_player_anim_always_forward(ANIM_Mario1_Hurt);

        playerStatus->flags |= PS_FLAG_FLYING;

        playerStatus->actionSubstate = SUBSTATE_FLYING;
        playerStatus->gravityIntegrator[0] = 18.3473f;
        playerStatus->gravityIntegrator[1] = -3.738f;
        playerStatus->gravityIntegrator[2] = 0.8059f;
        playerStatus->gravityIntegrator[3] = -0.0987f;

        gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;

        ReturnAngle = atan2(playerStatus->position.x, playerStatus->position.z, playerStatus->lastGoodPosition.x,
                           playerStatus->lastGoodPosition.z);
        playerStatus->currentSpeed = get_xz_dist_to_player(playerStatus->lastGoodPosition.x, playerStatus->lastGoodPosition.z) / 18.0f;
    }

    sin_cos_rad(DEG_TO_RAD(ReturnAngle), &dx, &dy);

    speed = playerStatus->currentSpeed;

    if (playerStatus->flags & PS_FLAG_ENTERING_BATTLE) {
        speed *= 0.5f;
    }

    playerStatus->position.x += speed * dx;
    playerStatus->position.z -= speed * dy;

    if (playerStatus->actionSubstate == SUBSTATE_FLYING) {
        integrate_gravity();

        playerStatus->position.y += playerStatus->gravityIntegrator[0];

        if (playerStatus->gravityIntegrator[0] < 0.0f) {
            playerStatus->actionSubstate = SUBSTATE_FALLING;
            playerStatus->flags |= PS_FLAG_FALLING;
        }
    } else {
        s32 colliderID;

        playerStatus->position.y = player_check_collision_below(player_fall_distance(), &colliderID);

        if (colliderID >= 0) {
            colliderID = get_collider_flags(colliderID); //TODO surfaceType
            set_action_state(ACTION_STATE_LAND);
        }
    }
}