### RAW ASSEMBLY INSTRUCTIONS:

glabel shimmer_burst_appendGfx
/* 3747F0 E0070740 27BDFF10 */  addiu     $sp, $sp, -0xF0
/* 3747F4 E0070744 3C06DB06 */  lui       $a2, (0xDB060024 >> 16)
/* 3747F8 E0070748 34C60024 */  ori       $a2, $a2, (0xDB060024 & 0xFFFF)
/* 3747FC E007074C AFA400F0 */  sw        $a0, 0xF0($sp)
/* 374800 E0070750 27A40020 */  addiu     $a0, $sp, 0x20
/* 374804 E0070754 AFB100B4 */  sw        $s1, 0xB4($sp)
/* 374808 E0070758 3C110001 */  lui       $s1, (0x11630 >> 16)
/* 37480C E007075C 36311630 */  ori       $s1, $s1, (0x11630 & 0xFFFF)
/* 374810 E0070760 AFB500C4 */  sw        $s5, 0xC4($sp)
/* 374814 E0070764 3C15800A */  lui       $s5, %hi(gMainGfxPos)
/* 374818 E0070768 26B5A66C */  addiu     $s5, $s5, %lo(gMainGfxPos)
/* 37481C E007076C AFBF00D4 */  sw        $ra, 0xD4($sp)
/* 374820 E0070770 AFBE00D0 */  sw        $fp, 0xD0($sp)
/* 374824 E0070774 AFB700CC */  sw        $s7, 0xCC($sp)
/* 374828 E0070778 AFB600C8 */  sw        $s6, 0xC8($sp)
/* 37482C E007077C AFB400C0 */  sw        $s4, 0xC0($sp)
/* 374830 E0070780 AFB300BC */  sw        $s3, 0xBC($sp)
/* 374834 E0070784 AFB200B8 */  sw        $s2, 0xB8($sp)
/* 374838 E0070788 AFB000B0 */  sw        $s0, 0xB0($sp)
/* 37483C E007078C F7B800E8 */  sdc1      $f24, 0xE8($sp)
/* 374840 E0070790 F7B600E0 */  sdc1      $f22, 0xE0($sp)
/* 374844 E0070794 F7B400D8 */  sdc1      $f20, 0xD8($sp)
/* 374848 E0070798 8EA50000 */  lw        $a1, 0x0($s5)
/* 37484C E007079C 8FAA00F0 */  lw        $t2, 0xF0($sp)
/* 374850 E00707A0 00A0182D */  daddu     $v1, $a1, $zero
/* 374854 E00707A4 8D52000C */  lw        $s2, 0xC($t2)
/* 374858 E00707A8 24A50008 */  addiu     $a1, $a1, 0x8
/* 37485C E00707AC AEA50000 */  sw        $a1, 0x0($s5)
/* 374860 E00707B0 8E4A0050 */  lw        $t2, 0x50($s2)
/* 374864 E00707B4 C642004C */  lwc1      $f2, 0x4C($s2)
/* 374868 E00707B8 468010A0 */  cvt.s.w   $f2, $f2
/* 37486C E00707BC AFAA00A0 */  sw        $t2, 0xA0($sp)
/* 374870 E00707C0 8E4A0054 */  lw        $t2, 0x54($s2)
/* 374874 E00707C4 24130001 */  addiu     $s3, $zero, 0x1
/* 374878 E00707C8 AFAA00A4 */  sw        $t2, 0xA4($sp)
/* 37487C E00707CC 8E4A0058 */  lw        $t2, 0x58($s2)
/* 374880 E00707D0 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 374884 E00707D4 AFAA00A8 */  sw        $t2, 0xA8($sp)
/* 374888 E00707D8 AC620000 */  sw        $v0, 0x0($v1)
/* 37488C E00707DC AC600004 */  sw        $zero, 0x4($v1)
/* 374890 E00707E0 ACA60000 */  sw        $a2, 0x0($a1)
/* 374894 E00707E4 8FAA00F0 */  lw        $t2, 0xF0($sp)
/* 374898 E00707E8 3C01437F */  lui       $at, (0x437F0000 >> 16)
/* 37489C E00707EC 44810000 */  mtc1      $at, $f0
/* 3748A0 E00707F0 8D430010 */  lw        $v1, 0x10($t2)
/* 3748A4 E00707F4 24A20008 */  addiu     $v0, $a1, 0x8
/* 3748A8 E00707F8 AEA20000 */  sw        $v0, 0x0($s5)
/* 3748AC E00707FC 8C62001C */  lw        $v0, 0x1C($v1)
/* 3748B0 E0070800 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 3748B4 E0070804 00431021 */  addu      $v0, $v0, $v1
/* 3748B8 E0070808 ACA20004 */  sw        $v0, 0x4($a1)
/* 3748BC E007080C 8E450004 */  lw        $a1, 0x4($s2)
/* 3748C0 E0070810 8E460008 */  lw        $a2, 0x8($s2)
/* 3748C4 E0070814 8E47000C */  lw        $a3, 0xC($s2)
/* 3748C8 E0070818 0C080108 */  jal       shim_guTranslateF
/* 3748CC E007081C 46001503 */   div.s    $f20, $f2, $f0
/* 3748D0 E0070820 27B00060 */  addiu     $s0, $sp, 0x60
/* 3748D4 E0070824 8E450060 */  lw        $a1, 0x60($s2)
/* 3748D8 E0070828 0200202D */  daddu     $a0, $s0, $zero
/* 3748DC E007082C 00A0302D */  daddu     $a2, $a1, $zero
/* 3748E0 E0070830 0C080110 */  jal       shim_guScaleF
/* 3748E4 E0070834 00A0382D */   daddu    $a3, $a1, $zero
/* 3748E8 E0070838 0200202D */  daddu     $a0, $s0, $zero
/* 3748EC E007083C 27A50020 */  addiu     $a1, $sp, 0x20
/* 3748F0 E0070840 0C080114 */  jal       shim_guMtxCatF
/* 3748F4 E0070844 00A0302D */   daddu    $a2, $a1, $zero
/* 3748F8 E0070848 27A40020 */  addiu     $a0, $sp, 0x20
/* 3748FC E007084C 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 374900 E0070850 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 374904 E0070854 3C16800A */  lui       $s6, %hi(gDisplayContext)
/* 374908 E0070858 26D6A674 */  addiu     $s6, $s6, %lo(gDisplayContext)
/* 37490C E007085C 96050000 */  lhu       $a1, 0x0($s0)
/* 374910 E0070860 8EC20000 */  lw        $v0, 0x0($s6)
/* 374914 E0070864 00052980 */  sll       $a1, $a1, 6
/* 374918 E0070868 00B12821 */  addu      $a1, $a1, $s1
/* 37491C E007086C 0C080118 */  jal       shim_guMtxF2L
/* 374920 E0070870 00452821 */   addu     $a1, $v0, $a1
/* 374924 E0070874 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 374928 E0070878 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 37492C E007087C 8EA40000 */  lw        $a0, 0x0($s5)
/* 374930 E0070880 96020000 */  lhu       $v0, 0x0($s0)
/* 374934 E0070884 0080282D */  daddu     $a1, $a0, $zero
/* 374938 E0070888 24840008 */  addiu     $a0, $a0, 0x8
/* 37493C E007088C AEA40000 */  sw        $a0, 0x0($s5)
/* 374940 E0070890 ACA30000 */  sw        $v1, 0x0($a1)
/* 374944 E0070894 00531821 */  addu      $v1, $v0, $s3
/* 374948 E0070898 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 37494C E007089C 00021180 */  sll       $v0, $v0, 6
/* 374950 E00708A0 00511021 */  addu      $v0, $v0, $s1
/* 374954 E00708A4 A6030000 */  sh        $v1, 0x0($s0)
/* 374958 E00708A8 8EC30000 */  lw        $v1, 0x0($s6)
/* 37495C E00708AC 24870010 */  addiu     $a3, $a0, 0x10
/* 374960 E00708B0 00621821 */  addu      $v1, $v1, $v0
/* 374964 E00708B4 24820008 */  addiu     $v0, $a0, 0x8
/* 374968 E00708B8 ACA30004 */  sw        $v1, 0x4($a1)
/* 37496C E00708BC AEA20000 */  sw        $v0, 0x0($s5)
/* 374970 E00708C0 3C02FB00 */  lui       $v0, (0xFB000000 >> 16)
/* 374974 E00708C4 AC820000 */  sw        $v0, 0x0($a0)
/* 374978 E00708C8 92430043 */  lbu       $v1, 0x43($s2)
/* 37497C E00708CC 92450047 */  lbu       $a1, 0x47($s2)
/* 374980 E00708D0 9246004B */  lbu       $a2, 0x4B($s2)
/* 374984 E00708D4 9248005F */  lbu       $t0, 0x5F($s2)
/* 374988 E00708D8 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 37498C E00708DC AEA70000 */  sw        $a3, 0x0($s5)
/* 374990 E00708E0 AC820008 */  sw        $v0, 0x8($a0)
/* 374994 E00708E4 3C020900 */  lui       $v0, %hi(D_09000F20_327330)
/* 374998 E00708E8 24420F20 */  addiu     $v0, $v0, %lo(D_09000F20_327330)
/* 37499C E00708EC AC82000C */  sw        $v0, 0xC($a0)
/* 3749A0 E00708F0 24820018 */  addiu     $v0, $a0, 0x18
/* 3749A4 E00708F4 AEA20000 */  sw        $v0, 0x0($s5)
/* 3749A8 E00708F8 00031E00 */  sll       $v1, $v1, 24
/* 3749AC E00708FC 00052C00 */  sll       $a1, $a1, 16
/* 3749B0 E0070900 00651825 */  or        $v1, $v1, $a1
/* 3749B4 E0070904 00063200 */  sll       $a2, $a2, 8
/* 3749B8 E0070908 00661825 */  or        $v1, $v1, $a2
/* 3749BC E007090C 00681825 */  or        $v1, $v1, $t0
/* 3749C0 E0070910 AC830004 */  sw        $v1, 0x4($a0)
/* 3749C4 E0070914 8FAA00F0 */  lw        $t2, 0xF0($sp)
/* 3749C8 E0070918 00E0A02D */  daddu     $s4, $a3, $zero
/* 3749CC E007091C 8D420008 */  lw        $v0, 0x8($t2)
/* 3749D0 E0070920 0262102A */  slt       $v0, $s3, $v0
/* 3749D4 E0070924 1040006E */  beqz      $v0, .LE0070AE0
/* 3749D8 E0070928 2652006C */   addiu    $s2, $s2, 0x6C
/* 3749DC E007092C 02C0F02D */  daddu     $fp, $s6, $zero
/* 3749E0 E0070930 0200B82D */  daddu     $s7, $s0, $zero
/* 3749E4 E0070934 3C160001 */  lui       $s6, (0x11630 >> 16)
/* 3749E8 E0070938 36D61630 */  ori       $s6, $s6, (0x11630 & 0xFFFF)
/* 3749EC E007093C 02A0882D */  daddu     $s1, $s5, $zero
/* 3749F0 E0070940 2650004C */  addiu     $s0, $s2, 0x4C
/* 3749F4 E0070944 8FAA00A0 */  lw        $t2, 0xA0($sp)
/* 3749F8 E0070948 4480C000 */  mtc1      $zero, $f24
/* 3749FC E007094C 000A1600 */  sll       $v0, $t2, 24
/* 374A00 E0070950 8FAA00A4 */  lw        $t2, 0xA4($sp)
/* 374A04 E0070954 3C014F00 */  lui       $at, (0x4F000000 >> 16)
/* 374A08 E0070958 4481B000 */  mtc1      $at, $f22
/* 374A0C E007095C 314300FF */  andi      $v1, $t2, 0xFF
/* 374A10 E0070960 00031C00 */  sll       $v1, $v1, 16
/* 374A14 E0070964 8FAA00A8 */  lw        $t2, 0xA8($sp)
/* 374A18 E0070968 00431025 */  or        $v0, $v0, $v1
/* 374A1C E007096C 314300FF */  andi      $v1, $t2, 0xFF
/* 374A20 E0070970 00031A00 */  sll       $v1, $v1, 8
/* 374A24 E0070974 0043A825 */  or        $s5, $v0, $v1
.LE0070978:
/* 374A28 E0070978 8E02FFE4 */  lw        $v0, -0x1C($s0)
/* 374A2C E007097C 04400052 */  bltz      $v0, .LE0070AC8
/* 374A30 E0070980 00000000 */   nop
/* 374A34 E0070984 C6000014 */  lwc1      $f0, 0x14($s0)
/* 374A38 E0070988 46140002 */  mul.s     $f0, $f0, $f20
/* 374A3C E007098C 00000000 */  nop
/* 374A40 E0070990 4405C000 */  mfc1      $a1, $f24
/* 374A44 E0070994 4406C000 */  mfc1      $a2, $f24
/* 374A48 E0070998 E7A00010 */  swc1      $f0, 0x10($sp)
/* 374A4C E007099C C600FFB8 */  lwc1      $f0, -0x48($s0)
/* 374A50 E00709A0 E7A00014 */  swc1      $f0, 0x14($sp)
/* 374A54 E00709A4 C600FFBC */  lwc1      $f0, -0x44($s0)
/* 374A58 E00709A8 E7A00018 */  swc1      $f0, 0x18($sp)
/* 374A5C E00709AC C600FFC0 */  lwc1      $f0, -0x40($s0)
/* 374A60 E00709B0 E7A0001C */  swc1      $f0, 0x1C($sp)
/* 374A64 E00709B4 8E07FFE8 */  lw        $a3, -0x18($s0)
/* 374A68 E00709B8 0C080180 */  jal       shim_guPositionF
/* 374A6C E00709BC 27A40020 */   addiu    $a0, $sp, 0x20
/* 374A70 E00709C0 27A40020 */  addiu     $a0, $sp, 0x20
/* 374A74 E00709C4 96E50000 */  lhu       $a1, 0x0($s7)
/* 374A78 E00709C8 8FC20000 */  lw        $v0, 0x0($fp)
/* 374A7C E00709CC 00052980 */  sll       $a1, $a1, 6
/* 374A80 E00709D0 00B62821 */  addu      $a1, $a1, $s6
/* 374A84 E00709D4 0C080118 */  jal       shim_guMtxF2L
/* 374A88 E00709D8 00452821 */   addu     $a1, $v0, $a1
/* 374A8C E00709DC 8E240000 */  lw        $a0, 0x0($s1)
/* 374A90 E00709E0 0080302D */  daddu     $a2, $a0, $zero
/* 374A94 E00709E4 24840008 */  addiu     $a0, $a0, 0x8
/* 374A98 E00709E8 AE240000 */  sw        $a0, 0x0($s1)
/* 374A9C E00709EC 96E50000 */  lhu       $a1, 0x0($s7)
/* 374AA0 E00709F0 3C02DA38 */  lui       $v0, (0xDA380000 >> 16)
/* 374AA4 E00709F4 ACC20000 */  sw        $v0, 0x0($a2)
/* 374AA8 E00709F8 8FC30000 */  lw        $v1, 0x0($fp)
/* 374AAC E00709FC 30A2FFFF */  andi      $v0, $a1, 0xFFFF
/* 374AB0 E0070A00 00021180 */  sll       $v0, $v0, 6
/* 374AB4 E0070A04 00561021 */  addu      $v0, $v0, $s6
/* 374AB8 E0070A08 00621821 */  addu      $v1, $v1, $v0
/* 374ABC E0070A0C 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 374AC0 E0070A10 24A50001 */  addiu     $a1, $a1, 0x1
/* 374AC4 E0070A14 ACC30004 */  sw        $v1, 0x4($a2)
/* 374AC8 E0070A18 AC820000 */  sw        $v0, 0x0($a0)
/* 374ACC E0070A1C C6000000 */  lwc1      $f0, 0x0($s0)
/* 374AD0 E0070A20 46800020 */  cvt.s.w   $f0, $f0
/* 374AD4 E0070A24 46140002 */  mul.s     $f0, $f0, $f20
/* 374AD8 E0070A28 00000000 */  nop
/* 374ADC E0070A2C 24820008 */  addiu     $v0, $a0, 0x8
/* 374AE0 E0070A30 24840004 */  addiu     $a0, $a0, 0x4
/* 374AE4 E0070A34 A6E50000 */  sh        $a1, 0x0($s7)
/* 374AE8 E0070A38 4600B03E */  c.le.s    $f22, $f0
/* 374AEC E0070A3C 00000000 */  nop
/* 374AF0 E0070A40 45010005 */  bc1t      .LE0070A58
/* 374AF4 E0070A44 AE220000 */   sw       $v0, 0x0($s1)
/* 374AF8 E0070A48 4600010D */  trunc.w.s $f4, $f0
/* 374AFC E0070A4C 44052000 */  mfc1      $a1, $f4
/* 374B00 E0070A50 0801C29D */  j         .LE0070A74
/* 374B04 E0070A54 3C06D838 */   lui      $a2, (0xD8380002 >> 16)
.LE0070A58:
/* 374B08 E0070A58 46160001 */  sub.s     $f0, $f0, $f22
/* 374B0C E0070A5C 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* 374B10 E0070A60 4600010D */  trunc.w.s $f4, $f0
/* 374B14 E0070A64 44052000 */  mfc1      $a1, $f4
/* 374B18 E0070A68 00000000 */  nop
/* 374B1C E0070A6C 00A22825 */  or        $a1, $a1, $v0
/* 374B20 E0070A70 3C06D838 */  lui       $a2, (0xD8380002 >> 16)
.LE0070A74:
/* 374B24 E0070A74 34C60002 */  ori       $a2, $a2, (0xD8380002 & 0xFFFF)
/* 374B28 E0070A78 30A200FF */  andi      $v0, $a1, 0xFF
/* 374B2C E0070A7C 8E230000 */  lw        $v1, 0x0($s1)
/* 374B30 E0070A80 02A21025 */  or        $v0, $s5, $v0
/* 374B34 E0070A84 AC820000 */  sw        $v0, 0x0($a0)
/* 374B38 E0070A88 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 374B3C E0070A8C 0060282D */  daddu     $a1, $v1, $zero
/* 374B40 E0070A90 24630008 */  addiu     $v1, $v1, 0x8
/* 374B44 E0070A94 AE230000 */  sw        $v1, 0x0($s1)
/* 374B48 E0070A98 ACA20000 */  sw        $v0, 0x0($a1)
/* 374B4C E0070A9C 32620007 */  andi      $v0, $s3, 0x7
/* 374B50 E0070AA0 00021080 */  sll       $v0, $v0, 2
/* 374B54 E0070AA4 3C04E007 */  lui       $a0, (0xE0070CD0 >> 16)
/* 374B58 E0070AA8 00822021 */  addu      $a0, $a0, $v0
/* 374B5C E0070AAC 8C840CD0 */  lw        $a0, (0xE0070CD0 & 0xFFFF)($a0)
/* 374B60 E0070AB0 24620008 */  addiu     $v0, $v1, 0x8
/* 374B64 E0070AB4 AE220000 */  sw        $v0, 0x0($s1)
/* 374B68 E0070AB8 24020040 */  addiu     $v0, $zero, 0x40
/* 374B6C E0070ABC ACA40004 */  sw        $a0, 0x4($a1)
/* 374B70 E0070AC0 AC660000 */  sw        $a2, 0x0($v1)
/* 374B74 E0070AC4 AC620004 */  sw        $v0, 0x4($v1)
.LE0070AC8:
/* 374B78 E0070AC8 8FAA00F0 */  lw        $t2, 0xF0($sp)
/* 374B7C E0070ACC 26730001 */  addiu     $s3, $s3, 0x1
/* 374B80 E0070AD0 8D420008 */  lw        $v0, 0x8($t2)
/* 374B84 E0070AD4 0262102A */  slt       $v0, $s3, $v0
/* 374B88 E0070AD8 1440FFA7 */  bnez      $v0, .LE0070978
/* 374B8C E0070ADC 2610006C */   addiu    $s0, $s0, 0x6C
.LE0070AE0:
/* 374B90 E0070AE0 27A40020 */  addiu     $a0, $sp, 0x20
/* 374B94 E0070AE4 3C150001 */  lui       $s5, (0x11630 >> 16)
/* 374B98 E0070AE8 36B51630 */  ori       $s5, $s5, (0x11630 & 0xFFFF)
/* 374B9C E0070AEC 3C1ED838 */  lui       $fp, (0xD8380002 >> 16)
/* 374BA0 E0070AF0 37DE0002 */  ori       $fp, $fp, (0xD8380002 & 0xFFFF)
/* 374BA4 E0070AF4 3C10800A */  lui       $s0, %hi(gMainGfxPos)
/* 374BA8 E0070AF8 2610A66C */  addiu     $s0, $s0, %lo(gMainGfxPos)
/* 374BAC E0070AFC 3C02DF00 */  lui       $v0, (0xDF000000 >> 16)
/* 374BB0 E0070B00 3C16DE00 */  lui       $s6, (0xDE000000 >> 16)
/* 374BB4 E0070B04 8E030000 */  lw        $v1, 0x0($s0)
/* 374BB8 E0070B08 3C0542F0 */  lui       $a1, (0x42F00000 >> 16)
/* 374BBC E0070B0C 3C013ECC */  lui       $at, (0x3ECCCCCD >> 16)
/* 374BC0 E0070B10 3421CCCD */  ori       $at, $at, (0x3ECCCCCD & 0xFFFF)
/* 374BC4 E0070B14 4481A000 */  mtc1      $at, $f20
/* 374BC8 E0070B18 4480B000 */  mtc1      $zero, $f22
/* 374BCC E0070B1C 3C013F4C */  lui       $at, (0x3F4CCCCD >> 16)
/* 374BD0 E0070B20 3421CCCD */  ori       $at, $at, (0x3F4CCCCD & 0xFFFF)
/* 374BD4 E0070B24 4481C000 */  mtc1      $at, $f24
/* 374BD8 E0070B28 0060402D */  daddu     $t0, $v1, $zero
/* 374BDC E0070B2C 4406A000 */  mfc1      $a2, $f20
/* 374BE0 E0070B30 4407B000 */  mfc1      $a3, $f22
/* 374BE4 E0070B34 24630008 */  addiu     $v1, $v1, 0x8
/* 374BE8 E0070B38 AE030000 */  sw        $v1, 0x0($s0)
/* 374BEC E0070B3C AD020000 */  sw        $v0, 0x0($t0)
/* 374BF0 E0070B40 3C02DE01 */  lui       $v0, (0xDE010000 >> 16)
/* 374BF4 E0070B44 AD000004 */  sw        $zero, 0x4($t0)
/* 374BF8 E0070B48 AE820000 */  sw        $v0, 0x0($s4)
/* 374BFC E0070B4C 24620008 */  addiu     $v0, $v1, 0x8
/* 374C00 E0070B50 AE830004 */  sw        $v1, 0x4($s4)
/* 374C04 E0070B54 26940008 */  addiu     $s4, $s4, 0x8
/* 374C08 E0070B58 AE020000 */  sw        $v0, 0x0($s0)
/* 374C0C E0070B5C AC760000 */  sw        $s6, 0x0($v1)
/* 374C10 E0070B60 AC740004 */  sw        $s4, 0x4($v1)
/* 374C14 E0070B64 0C080104 */  jal       shim_guRotateF
/* 374C18 E0070B68 E7B80010 */   swc1     $f24, 0x10($sp)
/* 374C1C E0070B6C 27A40020 */  addiu     $a0, $sp, 0x20
/* 374C20 E0070B70 3C118007 */  lui       $s1, %hi(gMatrixListPos)
/* 374C24 E0070B74 263141F0 */  addiu     $s1, $s1, %lo(gMatrixListPos)
/* 374C28 E0070B78 3C13800A */  lui       $s3, %hi(gDisplayContext)
/* 374C2C E0070B7C 2673A674 */  addiu     $s3, $s3, %lo(gDisplayContext)
/* 374C30 E0070B80 96250000 */  lhu       $a1, 0x0($s1)
/* 374C34 E0070B84 8E620000 */  lw        $v0, 0x0($s3)
/* 374C38 E0070B88 00052980 */  sll       $a1, $a1, 6
/* 374C3C E0070B8C 00B52821 */  addu      $a1, $a1, $s5
/* 374C40 E0070B90 0C080118 */  jal       shim_guMtxF2L
/* 374C44 E0070B94 00452821 */   addu     $a1, $v0, $a1
/* 374C48 E0070B98 27A40020 */  addiu     $a0, $sp, 0x20
/* 374C4C E0070B9C 3C17DA38 */  lui       $s7, (0xDA380000 >> 16)
/* 374C50 E0070BA0 8E080000 */  lw        $t0, 0x0($s0)
/* 374C54 E0070BA4 3C05C2F0 */  lui       $a1, (0xC2F00000 >> 16)
/* 374C58 E0070BA8 4406A000 */  mfc1      $a2, $f20
/* 374C5C E0070BAC 4407B000 */  mfc1      $a3, $f22
/* 374C60 E0070BB0 0100482D */  daddu     $t1, $t0, $zero
/* 374C64 E0070BB4 25080008 */  addiu     $t0, $t0, 0x8
/* 374C68 E0070BB8 AE080000 */  sw        $t0, 0x0($s0)
/* 374C6C E0070BBC 96220000 */  lhu       $v0, 0x0($s1)
/* 374C70 E0070BC0 24120040 */  addiu     $s2, $zero, 0x40
/* 374C74 E0070BC4 AD370000 */  sw        $s7, 0x0($t1)
/* 374C78 E0070BC8 24430001 */  addiu     $v1, $v0, 0x1
/* 374C7C E0070BCC 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 374C80 E0070BD0 00021180 */  sll       $v0, $v0, 6
/* 374C84 E0070BD4 A6230000 */  sh        $v1, 0x0($s1)
/* 374C88 E0070BD8 8E630000 */  lw        $v1, 0x0($s3)
/* 374C8C E0070BDC 00551021 */  addu      $v0, $v0, $s5
/* 374C90 E0070BE0 00621821 */  addu      $v1, $v1, $v0
/* 374C94 E0070BE4 25020008 */  addiu     $v0, $t0, 0x8
/* 374C98 E0070BE8 AD230004 */  sw        $v1, 0x4($t1)
/* 374C9C E0070BEC AE020000 */  sw        $v0, 0x0($s0)
/* 374CA0 E0070BF0 25020010 */  addiu     $v0, $t0, 0x10
/* 374CA4 E0070BF4 AD160000 */  sw        $s6, 0x0($t0)
/* 374CA8 E0070BF8 AD140004 */  sw        $s4, 0x4($t0)
/* 374CAC E0070BFC AE020000 */  sw        $v0, 0x0($s0)
/* 374CB0 E0070C00 AD1E0008 */  sw        $fp, 0x8($t0)
/* 374CB4 E0070C04 AD12000C */  sw        $s2, 0xC($t0)
/* 374CB8 E0070C08 0C080104 */  jal       shim_guRotateF
/* 374CBC E0070C0C E7B80010 */   swc1     $f24, 0x10($sp)
/* 374CC0 E0070C10 27A40020 */  addiu     $a0, $sp, 0x20
/* 374CC4 E0070C14 96250000 */  lhu       $a1, 0x0($s1)
/* 374CC8 E0070C18 8E620000 */  lw        $v0, 0x0($s3)
/* 374CCC E0070C1C 00052980 */  sll       $a1, $a1, 6
/* 374CD0 E0070C20 00B52821 */  addu      $a1, $a1, $s5
/* 374CD4 E0070C24 0C080118 */  jal       shim_guMtxF2L
/* 374CD8 E0070C28 00452821 */   addu     $a1, $v0, $a1
/* 374CDC E0070C2C 8E040000 */  lw        $a0, 0x0($s0)
/* 374CE0 E0070C30 96220000 */  lhu       $v0, 0x0($s1)
/* 374CE4 E0070C34 0080282D */  daddu     $a1, $a0, $zero
/* 374CE8 E0070C38 24840008 */  addiu     $a0, $a0, 0x8
/* 374CEC E0070C3C 24430001 */  addiu     $v1, $v0, 0x1
/* 374CF0 E0070C40 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 374CF4 E0070C44 00021180 */  sll       $v0, $v0, 6
/* 374CF8 E0070C48 AE040000 */  sw        $a0, 0x0($s0)
/* 374CFC E0070C4C ACB70000 */  sw        $s7, 0x0($a1)
/* 374D00 E0070C50 A6230000 */  sh        $v1, 0x0($s1)
/* 374D04 E0070C54 8E630000 */  lw        $v1, 0x0($s3)
/* 374D08 E0070C58 00551021 */  addu      $v0, $v0, $s5
/* 374D0C E0070C5C 00621821 */  addu      $v1, $v1, $v0
/* 374D10 E0070C60 24820008 */  addiu     $v0, $a0, 0x8
/* 374D14 E0070C64 ACA30004 */  sw        $v1, 0x4($a1)
/* 374D18 E0070C68 AE020000 */  sw        $v0, 0x0($s0)
/* 374D1C E0070C6C 24820010 */  addiu     $v0, $a0, 0x10
/* 374D20 E0070C70 AC960000 */  sw        $s6, 0x0($a0)
/* 374D24 E0070C74 AC940004 */  sw        $s4, 0x4($a0)
/* 374D28 E0070C78 AE020000 */  sw        $v0, 0x0($s0)
/* 374D2C E0070C7C 24820018 */  addiu     $v0, $a0, 0x18
/* 374D30 E0070C80 AC9E0008 */  sw        $fp, 0x8($a0)
/* 374D34 E0070C84 AC92000C */  sw        $s2, 0xC($a0)
/* 374D38 E0070C88 AE020000 */  sw        $v0, 0x0($s0)
/* 374D3C E0070C8C AC9E0010 */  sw        $fp, 0x10($a0)
/* 374D40 E0070C90 AC920014 */  sw        $s2, 0x14($a0)
/* 374D44 E0070C94 8FBF00D4 */  lw        $ra, 0xD4($sp)
/* 374D48 E0070C98 8FBE00D0 */  lw        $fp, 0xD0($sp)
/* 374D4C E0070C9C 8FB700CC */  lw        $s7, 0xCC($sp)
/* 374D50 E0070CA0 8FB600C8 */  lw        $s6, 0xC8($sp)
/* 374D54 E0070CA4 8FB500C4 */  lw        $s5, 0xC4($sp)
/* 374D58 E0070CA8 8FB400C0 */  lw        $s4, 0xC0($sp)
/* 374D5C E0070CAC 8FB300BC */  lw        $s3, 0xBC($sp)
/* 374D60 E0070CB0 8FB200B8 */  lw        $s2, 0xB8($sp)
/* 374D64 E0070CB4 8FB100B4 */  lw        $s1, 0xB4($sp)
/* 374D68 E0070CB8 8FB000B0 */  lw        $s0, 0xB0($sp)
/* 374D6C E0070CBC D7B800E8 */  ldc1      $f24, 0xE8($sp)
/* 374D70 E0070CC0 D7B600E0 */  ldc1      $f22, 0xE0($sp)
/* 374D74 E0070CC4 D7B400D8 */  ldc1      $f20, 0xD8($sp)
/* 374D78 E0070CC8 03E00008 */  jr        $ra
/* 374D7C E0070CCC 27BD00F0 */   addiu    $sp, $sp, 0xF0

### DECOMPILED C INSTRUCTIONS:

void shimmer_burst_appendGfx(void* effect) {
    ShimmerBurstFXData* part = ((EffectInstance*)effect)->data.shimmerBurst;
    s32 unk_50 = part->unk_50;
    s32 unk_54 = part->unk_54;
    s32 unk_58 = part->unk_58;
    f32 temp_f20 = part->unk_4C / 255.0f;
    Gfx* savedGfxPos;
    Matrix4f sp20;
    Matrix4f sp60;
    s32 i;

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

    shim_guTranslateF(sp20, part->unk_04, part->unk_08, part->unk_0C);
    shim_guScaleF(sp60, part->unk_60, part->unk_60, part->unk_60);
    shim_guMtxCatF(sp60, sp20, sp20);
    shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
    gDPSetEnvColor(gMainGfxPos++, part->unk_40, part->unk_44, part->unk_48, part->unk_5C);
    gSPDisplayList(gMainGfxPos++, D_09000F20_338EE0);

    savedGfxPos = gMainGfxPos;
    gMainGfxPos++;

    part++;
    for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
        if (part->unk_30 >= 0) {
            shim_guPositionF(sp20, 0.0f, 0.0f, part->unk_34, part->unk_60 * temp_f20, part->unk_04, part->unk_08, part->unk_0C);
            shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

            gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
            gDPSetPrimColor(gMainGfxPos++, 0, 0, unk_50, unk_54, unk_58, part->unk_4C * temp_f20);
            gSPDisplayList(gMainGfxPos++, D_E0070CD0[i & 7]);
            gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
        }
    }

    gSPEndDisplayList(gMainGfxPos++);
    gSPBranchList(savedGfxPos, gMainGfxPos);
    gSPDisplayList(gMainGfxPos++, savedGfxPos + 1);

    shim_guRotateF(sp20, 120.0f, 0.4f, 0.0f, 0.8f);
    shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

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

    shim_guRotateF(sp20, -120.0f, 0.4f, 0.0f, 0.8f);
    shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

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


### RAW ASSEMBLY INSTRUCTIONS:

glabel state_step_title_screen
/* 124B4 800370B4 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* 124B8 800370B8 AFB00018 */  sw        $s0, 0x18($sp)
/* 124BC 800370BC 3C108007 */  lui       $s0, %hi(gGameStatusPtr)
/* 124C0 800370C0 2610419C */  addiu     $s0, $s0, %lo(gGameStatusPtr)
/* 124C4 800370C4 AFBF0020 */  sw        $ra, 0x20($sp)
/* 124C8 800370C8 AFB1001C */  sw        $s1, 0x1C($sp)
/* 124CC 800370CC 8E020000 */  lw        $v0, 0x0($s0)
/* 124D0 800370D0 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 124D4 800370D4 44816000 */  mtc1      $at, $f12
/* 124D8 800370D8 0C00AFBB */  jal       set_curtain_scale
/* 124DC 800370DC 8C510010 */   lw       $s1, 0x10($v0)
/* 124E0 800370E0 44806000 */  mtc1      $zero, $f12
/* 124E4 800370E4 0C00AFC9 */  jal       set_curtain_fade
/* 124E8 800370E8 00000000 */   nop
/* 124EC 800370EC 3C04800A */  lui       $a0, %hi(D_800A0988)
/* 124F0 800370F0 24840988 */  addiu     $a0, $a0, %lo(D_800A0988)
/* 124F4 800370F4 84820000 */  lh        $v0, 0x0($a0)
/* 124F8 800370F8 94830000 */  lhu       $v1, 0x0($a0)
/* 124FC 800370FC 18400002 */  blez      $v0, .L80037108
/* 12500 80037100 2462FFFF */   addiu    $v0, $v1, -0x1
/* 12504 80037104 A4820000 */  sh        $v0, 0x0($a0)
.L80037108:
/* 12508 80037108 8E020000 */  lw        $v0, 0x0($s0)
/* 1250C 8003710C 804300AC */  lb        $v1, 0xAC($v0)
/* 12510 80037110 2C620007 */  sltiu     $v0, $v1, 0x7
/* 12514 80037114 10400115 */  beqz      $v0, .L8003756C
/* 12518 80037118 00031080 */   sll      $v0, $v1, 2
/* 1251C 8003711C 3C01800A */  lui       $at, %hi(jtbl_800983A8)
/* 12520 80037120 00220821 */  addu      $at, $at, $v0
/* 12524 80037124 8C2283A8 */  lw        $v0, %lo(jtbl_800983A8)($at)
/* 12528 80037128 00400008 */  jr        $v0
/* 1252C 8003712C 00000000 */   nop
glabel .L80037130
/* 12530 80037130 3C04800A */  lui       $a0, %hi(gOverrideFlags)
/* 12534 80037134 2484A650 */  addiu     $a0, $a0, %lo(gOverrideFlags)
/* 12538 80037138 8C820000 */  lw        $v0, 0x0($a0)
/* 1253C 8003713C 24030003 */  addiu     $v1, $zero, 0x3
/* 12540 80037140 3C01800A */  lui       $at, %hi(D_800A0970)
/* 12544 80037144 A4230970 */  sh        $v1, %lo(D_800A0970)($at)
/* 12548 80037148 34420008 */  ori       $v0, $v0, 0x8
/* 1254C 8003714C AC820000 */  sw        $v0, 0x0($a0)
/* 12550 80037150 3C048007 */  lui       $a0, %hi(gGameStatusPtr)
/* 12554 80037154 2484419C */  addiu     $a0, $a0, %lo(gGameStatusPtr)
/* 12558 80037158 8C830000 */  lw        $v1, 0x0($a0)
/* 1255C 8003715C 24020014 */  addiu     $v0, $zero, 0x14
/* 12560 80037160 A06200B0 */  sb        $v0, 0xB0($v1)
/* 12564 80037164 8C830000 */  lw        $v1, 0x0($a0)
/* 12568 80037168 906200B0 */  lbu       $v0, 0xB0($v1)
/* 1256C 8003716C A06200AF */  sb        $v0, 0xAF($v1)
/* 12570 80037170 8C830000 */  lw        $v1, 0x0($a0)
/* 12574 80037174 906200AC */  lbu       $v0, 0xAC($v1)
/* 12578 80037178 24420001 */  addiu     $v0, $v0, 0x1
/* 1257C 8003717C 0800DD5B */  j         .L8003756C
/* 12580 80037180 A06200AC */   sb       $v0, 0xAC($v1)
glabel .L80037184
/* 12584 80037184 3C04800A */  lui       $a0, %hi(D_800A0970)
/* 12588 80037188 24840970 */  addiu     $a0, $a0, %lo(D_800A0970)
/* 1258C 8003718C 84820000 */  lh        $v0, 0x0($a0)
/* 12590 80037190 94830000 */  lhu       $v1, 0x0($a0)
/* 12594 80037194 10400003 */  beqz      $v0, .L800371A4
/* 12598 80037198 2462FFFF */   addiu    $v0, $v1, -0x1
/* 1259C 8003719C 0800DD5B */  j         .L8003756C
/* 125A0 800371A0 A4820000 */   sh       $v0, 0x0($a0)
.L800371A4:
/* 125A4 800371A4 3C108007 */  lui       $s0, %hi(gGameStatusPtr)
/* 125A8 800371A8 2610419C */  addiu     $s0, $s0, %lo(gGameStatusPtr)
/* 125AC 800371AC 8E040000 */  lw        $a0, 0x0($s0)
/* 125B0 800371B0 808200AF */  lb        $v0, 0xAF($a0)
/* 125B4 800371B4 908300AF */  lbu       $v1, 0xAF($a0)
/* 125B8 800371B8 10400002 */  beqz      $v0, .L800371C4
/* 125BC 800371BC 2462FFFF */   addiu    $v0, $v1, -0x1
/* 125C0 800371C0 A08200AF */  sb        $v0, 0xAF($a0)
.L800371C4:
/* 125C4 800371C4 24040006 */  addiu     $a0, $zero, 0x6
/* 125C8 800371C8 3C02800A */  lui       $v0, %hi(gOverrideFlags)
/* 125CC 800371CC 2442A650 */  addiu     $v0, $v0, %lo(gOverrideFlags)
/* 125D0 800371D0 8C430000 */  lw        $v1, 0x0($v0)
/* 125D4 800371D4 2405FFF7 */  addiu     $a1, $zero, -0x9
/* 125D8 800371D8 00651824 */  and       $v1, $v1, $a1
/* 125DC 800371DC 0C00CDFE */  jal       intro_logos_fade_in
/* 125E0 800371E0 AC430000 */   sw       $v1, 0x0($v0)
/* 125E4 800371E4 10400074 */  beqz      $v0, .L800373B8
/* 125E8 800371E8 00000000 */   nop
/* 125EC 800371EC 8E030000 */  lw        $v1, 0x0($s0)
/* 125F0 800371F0 806200AF */  lb        $v0, 0xAF($v1)
/* 125F4 800371F4 14400070 */  bnez      $v0, .L800373B8
/* 125F8 800371F8 24020002 */   addiu    $v0, $zero, 0x2
/* 125FC 800371FC 0800DCEE */  j         .L800373B8
/* 12600 80037200 A06200AC */   sb       $v0, 0xAC($v1)
glabel .L80037204
/* 12604 80037204 3C028007 */  lui       $v0, %hi(D_80077A34)
/* 12608 80037208 8C427A34 */  lw        $v0, %lo(D_80077A34)($v0)
/* 1260C 8003720C 1040000B */  beqz      $v0, .L8003723C
/* 12610 80037210 24020078 */   addiu    $v0, $zero, 0x78
/* 12614 80037214 3C03800A */  lui       $v1, %hi(D_800A0988)
/* 12618 80037218 84630988 */  lh        $v1, %lo(D_800A0988)($v1)
/* 1261C 8003721C 14620007 */  bne       $v1, $v0, .L8003723C
/* 12620 80037220 24020008 */   addiu    $v0, $zero, 0x8
/* 12624 80037224 AFA20010 */  sw        $v0, 0x10($sp)
/* 12628 80037228 0000202D */  daddu     $a0, $zero, $zero
/* 1262C 8003722C 2405FFFF */  addiu     $a1, $zero, -0x1
/* 12630 80037230 0080302D */  daddu     $a2, $a0, $zero
/* 12634 80037234 0C052A46 */  jal       bgm_set_song
/* 12638 80037238 24070F3C */   addiu    $a3, $zero, 0xF3C
.L8003723C:
/* 1263C 8003723C 3C02800A */  lui       $v0, %hi(D_800A0988)
/* 12640 80037240 84420988 */  lh        $v0, %lo(D_800A0988)($v0)
/* 12644 80037244 14400012 */  bnez      $v0, .L80037290
/* 12648 80037248 32229000 */   andi     $v0, $s1, 0x9000
/* 1264C 8003724C 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* 12650 80037250 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* 12654 80037254 24030004 */  addiu     $v1, $zero, 0x4
/* 12658 80037258 A04300AC */  sb        $v1, 0xAC($v0)
/* 1265C 8003725C 3C028007 */  lui       $v0, %hi(D_80077A34)
/* 12660 80037260 8C427A34 */  lw        $v0, %lo(D_80077A34)($v0)
/* 12664 80037264 14400002 */  bnez      $v0, .L80037270
/* 12668 80037268 24020009 */   addiu    $v0, $zero, 0x9
/* 1266C 8003726C 2402000A */  addiu     $v0, $zero, 0xA
.L80037270:
/* 12670 80037270 3C018007 */  lui       $at, %hi(D_800779C0)
/* 12674 80037274 A42279C0 */  sh        $v0, %lo(D_800779C0)($at)
/* 12678 80037278 3C038007 */  lui       $v1, %hi(D_80077A34)
/* 1267C 8003727C 24637A34 */  addiu     $v1, $v1, %lo(D_80077A34)
/* 12680 80037280 8C620000 */  lw        $v0, 0x0($v1)
/* 12684 80037284 38420001 */  xori      $v0, $v0, 0x1
/* 12688 80037288 0800DD64 */  j         .L80037590
/* 1268C 8003728C AC620000 */   sw       $v0, 0x0($v1)
.L80037290:
/* 12690 80037290 104000B6 */  beqz      $v0, .L8003756C
/* 12694 80037294 24020004 */   addiu    $v0, $zero, 0x4
/* 12698 80037298 3C038007 */  lui       $v1, %hi(gGameStatusPtr)
/* 1269C 8003729C 8C63419C */  lw        $v1, %lo(gGameStatusPtr)($v1)
/* 126A0 800372A0 A06200AC */  sb        $v0, 0xAC($v1)
/* 126A4 800372A4 24020005 */  addiu     $v0, $zero, 0x5
/* 126A8 800372A8 3C018007 */  lui       $at, %hi(D_800779C0)
/* 126AC 800372AC A42279C0 */  sh        $v0, %lo(D_800779C0)($at)
/* 126B0 800372B0 0C05272D */  jal       sfx_play_sound
/* 126B4 800372B4 240400D5 */   addiu    $a0, $zero, 0xD5
/* 126B8 800372B8 0000202D */  daddu     $a0, $zero, $zero
/* 126BC 800372BC 24050069 */  addiu     $a1, $zero, 0x69
/* 126C0 800372C0 0080302D */  daddu     $a2, $a0, $zero
/* 126C4 800372C4 240701F4 */  addiu     $a3, $zero, 0x1F4
/* 126C8 800372C8 24020008 */  addiu     $v0, $zero, 0x8
/* 126CC 800372CC 0C052A46 */  jal       bgm_set_song
/* 126D0 800372D0 AFA20010 */   sw       $v0, 0x10($sp)
/* 126D4 800372D4 0800DD64 */  j         .L80037590
/* 126D8 800372D8 00000000 */   nop
glabel .L800372DC
/* 126DC 800372DC 240400D0 */  addiu     $a0, $zero, 0xD0
/* 126E0 800372E0 3C108007 */  lui       $s0, %hi(gGameStatusPtr)
/* 126E4 800372E4 2610419C */  addiu     $s0, $s0, %lo(gGameStatusPtr)
/* 126E8 800372E8 8E030000 */  lw        $v1, 0x0($s0)
/* 126EC 800372EC 24020005 */  addiu     $v0, $zero, 0x5
/* 126F0 800372F0 0C00CDF8 */  jal       intro_logos_set_fade_color
/* 126F4 800372F4 A06200AC */   sb       $v0, 0xAC($v1)
/* 126F8 800372F8 3C028007 */  lui       $v0, %hi(D_800779C0)
/* 126FC 800372FC 944279C0 */  lhu       $v0, %lo(D_800779C0)($v0)
/* 12700 80037300 2442FFF7 */  addiu     $v0, $v0, -0x9
/* 12704 80037304 2C420002 */  sltiu     $v0, $v0, 0x2
/* 12708 80037308 10400004 */  beqz      $v0, .L8003731C
/* 1270C 8003730C 24020014 */   addiu    $v0, $zero, 0x14
/* 12710 80037310 8E030000 */  lw        $v1, 0x0($s0)
/* 12714 80037314 0800DCCA */  j         .L80037328
/* 12718 80037318 A06200B0 */   sb       $v0, 0xB0($v1)
.L8003731C:
/* 1271C 8003731C 8E030000 */  lw        $v1, 0x0($s0)
/* 12720 80037320 2402000A */  addiu     $v0, $zero, 0xA
/* 12724 80037324 A06200B0 */  sb        $v0, 0xB0($v1)
.L80037328:
/* 12728 80037328 3C038007 */  lui       $v1, %hi(gGameStatusPtr)
/* 1272C 8003732C 8C63419C */  lw        $v1, %lo(gGameStatusPtr)($v1)
/* 12730 80037330 906200B0 */  lbu       $v0, 0xB0($v1)
/* 12734 80037334 0800DD5B */  j         .L8003756C
/* 12738 80037338 A06200AF */   sb       $v0, 0xAF($v1)
glabel .L8003733C
/* 1273C 8003733C 3C038007 */  lui       $v1, %hi(D_800779C0)
/* 12740 80037340 946379C0 */  lhu       $v1, %lo(D_800779C0)($v1)
/* 12744 80037344 2462FFF7 */  addiu     $v0, $v1, -0x9
/* 12748 80037348 2C420002 */  sltiu     $v0, $v0, 0x2
/* 1274C 8003734C 1040001E */  beqz      $v0, .L800373C8
/* 12750 80037350 00031400 */   sll      $v0, $v1, 16
/* 12754 80037354 3C108007 */  lui       $s0, %hi(gGameStatusPtr)
/* 12758 80037358 2610419C */  addiu     $s0, $s0, %lo(gGameStatusPtr)
/* 1275C 8003735C 8E040000 */  lw        $a0, 0x0($s0)
/* 12760 80037360 808200AF */  lb        $v0, 0xAF($a0)
/* 12764 80037364 908300AF */  lbu       $v1, 0xAF($a0)
/* 12768 80037368 10400002 */  beqz      $v0, .L80037374
/* 1276C 8003736C 2462FFFF */   addiu    $v0, $v1, -0x1
/* 12770 80037370 A08200AF */  sb        $v0, 0xAF($a0)
.L80037374:
/* 12774 80037374 0C00CE0C */  jal       intro_logos_fade_out
/* 12778 80037378 2404000A */   addiu    $a0, $zero, 0xA
/* 1277C 8003737C 1040000E */  beqz      $v0, .L800373B8
/* 12780 80037380 00000000 */   nop
/* 12784 80037384 8E030000 */  lw        $v1, 0x0($s0)
/* 12788 80037388 806200AF */  lb        $v0, 0xAF($v1)
/* 1278C 8003738C 1440000A */  bnez      $v0, .L800373B8
/* 12790 80037390 24020003 */   addiu    $v0, $zero, 0x3
/* 12794 80037394 A06200AF */  sb        $v0, 0xAF($v1)
/* 12798 80037398 3C03800A */  lui       $v1, %hi(gOverrideFlags)
/* 1279C 8003739C 2463A650 */  addiu     $v1, $v1, %lo(gOverrideFlags)
/* 127A0 800373A0 8C620000 */  lw        $v0, 0x0($v1)
/* 127A4 800373A4 34420008 */  ori       $v0, $v0, 0x8
/* 127A8 800373A8 AC620000 */  sw        $v0, 0x0($v1)
/* 127AC 800373AC 8E030000 */  lw        $v1, 0x0($s0)
/* 127B0 800373B0 24020006 */  addiu     $v0, $zero, 0x6
/* 127B4 800373B4 A06200AC */  sb        $v0, 0xAC($v1)
.L800373B8:
/* 127B8 800373B8 0C00CE1D */  jal       intro_logos_update_fade
/* 127BC 800373BC 00000000 */   nop
/* 127C0 800373C0 0800DD5B */  j         .L8003756C
/* 127C4 800373C4 00000000 */   nop
.L800373C8:
/* 127C8 800373C8 00021403 */  sra       $v0, $v0, 16
/* 127CC 800373CC 24030005 */  addiu     $v1, $zero, 0x5
/* 127D0 800373D0 14430012 */  bne       $v0, $v1, .L8003741C
/* 127D4 800373D4 24020003 */   addiu    $v0, $zero, 0x3
/* 127D8 800373D8 3C058007 */  lui       $a1, %hi(gGameStatusPtr)
/* 127DC 800373DC 24A5419C */  addiu     $a1, $a1, %lo(gGameStatusPtr)
/* 127E0 800373E0 8CA40000 */  lw        $a0, 0x0($a1)
/* 127E4 800373E4 808200AF */  lb        $v0, 0xAF($a0)
/* 127E8 800373E8 908300AF */  lbu       $v1, 0xAF($a0)
/* 127EC 800373EC 1440001F */  bnez      $v0, .L8003746C
/* 127F0 800373F0 2462FFFF */   addiu    $v0, $v1, -0x1
/* 127F4 800373F4 24020003 */  addiu     $v0, $zero, 0x3
/* 127F8 800373F8 3C03800A */  lui       $v1, %hi(gOverrideFlags)
/* 127FC 800373FC 2463A650 */  addiu     $v1, $v1, %lo(gOverrideFlags)
/* 12800 80037400 A08200AF */  sb        $v0, 0xAF($a0)
/* 12804 80037404 8C620000 */  lw        $v0, 0x0($v1)
/* 12808 80037408 34420008 */  ori       $v0, $v0, 0x8
/* 1280C 8003740C AC620000 */  sw        $v0, 0x0($v1)
/* 12810 80037410 8CA30000 */  lw        $v1, 0x0($a1)
/* 12814 80037414 0800DD12 */  j         .L80037448
/* 12818 80037418 24020006 */   addiu    $v0, $zero, 0x6
.L8003741C:
/* 1281C 8003741C 3C048007 */  lui       $a0, %hi(gGameStatusPtr)
/* 12820 80037420 2484419C */  addiu     $a0, $a0, %lo(gGameStatusPtr)
/* 12824 80037424 8C830000 */  lw        $v1, 0x0($a0)
/* 12828 80037428 A06200AF */  sb        $v0, 0xAF($v1)
/* 1282C 8003742C 3C03800A */  lui       $v1, %hi(gOverrideFlags)
/* 12830 80037430 2463A650 */  addiu     $v1, $v1, %lo(gOverrideFlags)
/* 12834 80037434 8C620000 */  lw        $v0, 0x0($v1)
/* 12838 80037438 34420008 */  ori       $v0, $v0, 0x8
/* 1283C 8003743C AC620000 */  sw        $v0, 0x0($v1)
/* 12840 80037440 8C830000 */  lw        $v1, 0x0($a0)
/* 12844 80037444 24020006 */  addiu     $v0, $zero, 0x6
.L80037448:
/* 12848 80037448 0800DD5B */  j         .L8003756C
/* 1284C 8003744C A06200AC */   sb       $v0, 0xAC($v1)
glabel .L80037450
/* 12850 80037450 3C108007 */  lui       $s0, %hi(gGameStatusPtr)
/* 12854 80037454 2610419C */  addiu     $s0, $s0, %lo(gGameStatusPtr)
/* 12858 80037458 8E040000 */  lw        $a0, 0x0($s0)
/* 1285C 8003745C 808200AF */  lb        $v0, 0xAF($a0)
/* 12860 80037460 908300AF */  lbu       $v1, 0xAF($a0)
/* 12864 80037464 10400003 */  beqz      $v0, .L80037474
/* 12868 80037468 2462FFFF */   addiu    $v0, $v1, -0x1
.L8003746C:
/* 1286C 8003746C 0800DD5B */  j         .L8003756C
/* 12870 80037470 A08200AF */   sb       $v0, 0xAF($a0)
.L80037474:
/* 12874 80037474 0C00AB00 */  jal       general_heap_create
/* 12878 80037478 00000000 */   nop
/* 1287C 8003747C 0C047624 */  jal       clear_render_tasks
/* 12880 80037480 00000000 */   nop
/* 12884 80037484 0C00B7BD */  jal       create_cameras_a
/* 12888 80037488 00000000 */   nop
/* 1288C 8003748C 0C0482EC */  jal       clear_entity_models
/* 12890 80037490 00000000 */   nop
/* 12894 80037494 0C047889 */  jal       clear_animator_list
/* 12898 80037498 00000000 */   nop
/* 1289C 8003749C 0C00E12F */  jal       clear_npcs
/* 128A0 800374A0 00000000 */   nop
/* 128A4 800374A4 0C050440 */  jal       hud_element_clear_cache
/* 128A8 800374A8 00000000 */   nop
/* 128AC 800374AC 0C0B763E */  jal       spr_init_sprites
/* 128B0 800374B0 0000202D */   daddu    $a0, $zero, $zero
/* 128B4 800374B4 0C04432E */  jal       clear_entity_data
/* 128B8 800374B8 24040001 */   addiu    $a0, $zero, 0x1
/* 128BC 800374BC 0C051CFC */  jal       clear_windows
/* 128C0 800374C0 00000000 */   nop
/* 128C4 800374C4 3C04800A */  lui       $a0, %hi(gOverrideFlags)
/* 128C8 800374C8 2484A650 */  addiu     $a0, $a0, %lo(gOverrideFlags)
/* 128CC 800374CC 2403FFF7 */  addiu     $v1, $zero, -0x9
/* 128D0 800374D0 8C820000 */  lw        $v0, 0x0($a0)
/* 128D4 800374D4 8E050000 */  lw        $a1, 0x0($s0)
/* 128D8 800374D8 00431024 */  and       $v0, $v0, $v1
/* 128DC 800374DC 2403FFFD */  addiu     $v1, $zero, -0x3
/* 128E0 800374E0 00431024 */  and       $v0, $v0, $v1
/* 128E4 800374E4 AC820000 */  sw        $v0, 0x0($a0)
/* 128E8 800374E8 3C038007 */  lui       $v1, %hi(D_800779C0)
/* 128EC 800374EC 846379C0 */  lh        $v1, %lo(D_800779C0)($v1)
/* 128F0 800374F0 24020009 */  addiu     $v0, $zero, 0x9
/* 128F4 800374F4 1062000D */  beq       $v1, $v0, .L8003752C
/* 128F8 800374F8 A4A0008E */   sh       $zero, 0x8E($a1)
/* 128FC 800374FC 2862000A */  slti      $v0, $v1, 0xA
/* 12900 80037500 10400005 */  beqz      $v0, .L80037518
/* 12904 80037504 24020005 */   addiu    $v0, $zero, 0x5
/* 12908 80037508 10620011 */  beq       $v1, $v0, .L80037550
/* 1290C 8003750C 2404000E */   addiu    $a0, $zero, 0xE
/* 12910 80037510 0800DD64 */  j         .L80037590
/* 12914 80037514 00000000 */   nop
.L80037518:
/* 12918 80037518 2402000A */  addiu     $v0, $zero, 0xA
/* 1291C 8003751C 10620008 */  beq       $v1, $v0, .L80037540
/* 12920 80037520 00000000 */   nop
/* 12924 80037524 0800DD64 */  j         .L80037590
/* 12928 80037528 00000000 */   nop
.L8003752C:
/* 1292C 8003752C A0A000A8 */  sb        $zero, 0xA8($a1)
/* 12930 80037530 0C00CD3C */  jal       set_game_mode
/* 12934 80037534 24040010 */   addiu    $a0, $zero, 0x10
/* 12938 80037538 0800DD64 */  j         .L80037590
/* 1293C 8003753C 00000000 */   nop
.L80037540:
/* 12940 80037540 0C00CD3C */  jal       set_game_mode
/* 12944 80037544 24040011 */   addiu    $a0, $zero, 0x11
/* 12948 80037548 0800DD64 */  j         .L80037590
/* 1294C 8003754C 00000000 */   nop
.L80037550:
/* 12950 80037550 2402000B */  addiu     $v0, $zero, 0xB
/* 12954 80037554 A4A00086 */  sh        $zero, 0x86($a1)
/* 12958 80037558 A4A2008C */  sh        $v0, 0x8C($a1)
/* 1295C 8003755C 0C00CD3C */  jal       set_game_mode
/* 12960 80037560 A4A0008E */   sh       $zero, 0x8E($a1)
/* 12964 80037564 0800DD64 */  j         .L80037590
/* 12968 80037568 00000000 */   nop
glabel .L8003756C
/* 1296C 8003756C 3C02800A */  lui       $v0, %hi(gOverrideFlags)
/* 12970 80037570 8C42A650 */  lw        $v0, %lo(gOverrideFlags)($v0)
/* 12974 80037574 30420008 */  andi      $v0, $v0, 0x8
/* 12978 80037578 14400005 */  bnez      $v0, .L80037590
/* 1297C 8003757C 00000000 */   nop
/* 12980 80037580 0C00E64C */  jal       update_npcs
/* 12984 80037584 00000000 */   nop
/* 12988 80037588 0C00B500 */  jal       update_cameras
/* 1298C 8003758C 00000000 */   nop
.L80037590:
/* 12990 80037590 8FBF0020 */  lw        $ra, 0x20($sp)
/* 12994 80037594 8FB1001C */  lw        $s1, 0x1C($sp)
/* 12998 80037598 8FB00018 */  lw        $s0, 0x18($sp)
/* 1299C 8003759C 03E00008 */  jr        $ra
/* 129A0 800375A0 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

void state_step_title_screen(void) {
    s16* temp;
    u32 pressedButtons = gGameStatusPtr->pressedButtons[0];

    set_curtain_scale(1.0f);
    set_curtain_fade(0.0f);

    if (D_800A0988 > 0) {
        D_800A0988--;
    }

    switch (gGameStatusPtr->introState) {
        case INTRO_STATE_0:
            D_800A0970 = 3;
            gOverrideFlags |= GLOBAL_OVERRIDES_8;
            gGameStatusPtr->unk_B0 = 20;
            gGameStatusPtr->unk_AF = gGameStatusPtr->unk_B0;
            gGameStatusPtr->introState++;
            break;
        case INTRO_STATE_1:
            if (D_800A0970 != 0) {
                D_800A0970--;
            } else {
                if (gGameStatusPtr->unk_AF != 0) {
                    gGameStatusPtr->unk_AF--;
                }
                gOverrideFlags &= ~GLOBAL_OVERRIDES_8;
                if (intro_logos_fade_in(6) != 0) {
                    if (gGameStatusPtr->unk_AF == 0) {
                        gGameStatusPtr->introState = INTRO_STATE_2;
                    }
                }
                intro_logos_update_fade();
            }
            break;
        case INTRO_STATE_2:
            if (D_80077A34[0] != NULL && D_800A0988 == 120) {
                bgm_set_song(0, -1, 0, 3900, 8);
            }
            if (D_800A0988 == 0) {
                gGameStatusPtr->introState = INTRO_STATE_4;
                if (D_80077A34[0] == NULL) {
                    *D_800779C0 = 10;
                } else {
                    *D_800779C0 = 9;
                }
                D_80077A34[0] ^= 1;
                return;
            }
            if (pressedButtons & (BUTTON_A | BUTTON_START)) {
                gGameStatusPtr->introState = INTRO_STATE_4;
                *D_800779C0 = 5;
                sfx_play_sound(SOUND_D5);
                bgm_set_song(0, SONG_FILE_SELECT, 0, 500, 8);
                return;
            }
            break;
        case INTRO_STATE_4:
            gGameStatusPtr->introState = INTRO_STATE_5;
            intro_logos_set_fade_color(0xD0);
            if (*D_800779C0 == 9 || *D_800779C0 == 10) {
                gGameStatusPtr->unk_B0 = 20;
            } else {
                gGameStatusPtr->unk_B0 = 10;
            }
            gGameStatusPtr->unk_AF = gGameStatusPtr->unk_B0;
            break;
        case INTRO_STATE_5:
            if (*D_800779C0 == 9 || *D_800779C0 == 10) {
                if (gGameStatusPtr->unk_AF != 0) {
                    gGameStatusPtr->unk_AF--;
                }
                if (intro_logos_fade_out(0xA) != 0) {
                    if (gGameStatusPtr->unk_AF == 0) {
                        gGameStatusPtr->unk_AF = 3;
                        gOverrideFlags |= GLOBAL_OVERRIDES_8;
                        gGameStatusPtr->introState = INTRO_STATE_6;
                    }
                }
                intro_logos_update_fade();
            } else if (*D_800779C0 == 5) {
                if (gGameStatusPtr->unk_AF == 0) {
                    gGameStatusPtr->unk_AF = 3;
                    gOverrideFlags |= GLOBAL_OVERRIDES_8;
                    gGameStatusPtr->introState = INTRO_STATE_6;
                } else {
                    gGameStatusPtr->unk_AF--;
                }
            } else {
                gGameStatusPtr->unk_AF = 3;
                gOverrideFlags |= GLOBAL_OVERRIDES_8;
                gGameStatusPtr->introState = INTRO_STATE_6;
            }
            break;
        case INTRO_STATE_6:
            if (gGameStatusPtr->unk_AF != 0) {
                gGameStatusPtr->unk_AF--;
                break;
            }
            general_heap_create();
            clear_render_tasks();
            create_cameras_a();
            clear_entity_models();
            clear_animator_list();
            clear_npcs();
            hud_element_clear_cache();
            spr_init_sprites(PLAYER_SPRITES_MARIO_WORLD);
            clear_entity_data(1);
            clear_windows();
            gOverrideFlags &= ~GLOBAL_OVERRIDES_8;
            gOverrideFlags &= ~GLOBAL_OVERRIDES_DISABLE_RENDER_WORLD;
            temp = D_800779C0;
            gGameStatusPtr->entryID = 0;

            switch (temp[0]) {
                case 9:
                    gGameStatusPtr->creditsViewportMode = 0;
                    set_game_mode(GAME_MODE_INTRO);
                    break;
                case 10:
                    set_game_mode(GAME_MODE_DEMO);
                    break;
                case 5:
                    gGameStatusPtr->areaID = 0;
                    gGameStatusPtr->mapID = 0xB;
                    gGameStatusPtr->entryID = 0;
                    set_game_mode(GAME_MODE_FILE_SELECT);
                    break;
            }
            return;
    }

    if (!(gOverrideFlags & GLOBAL_OVERRIDES_8)) {
        update_npcs();
        update_cameras();
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel is_ability_active
/* 831F8 800E9D48 27BDFFD0 */  addiu     $sp, $sp, -0x30
/* 831FC 800E9D4C AFBF0028 */  sw        $ra, 0x28($sp)
/* 83200 800E9D50 0080482D */  daddu     $t1, $a0, $zero
/* 83204 800E9D54 3C088011 */  lui       $t0, %hi(gPlayerData)
/* 83208 800E9D58 2508F290 */  addiu     $t0, $t0, %lo(gPlayerData)
/* 8320C 800E9D5C 0000282D */  daddu     $a1, $zero, $zero
/* 83210 800E9D60 00A0202D */  daddu     $a0, $a1, $zero
/* 83214 800E9D64 24070005 */  addiu     $a3, $zero, 0x5
/* 83218 800E9D68 27A20024 */  addiu     $v0, $sp, 0x24
.L800E9D6C:
/* 8321C 800E9D6C AC400000 */  sw        $zero, 0x0($v0)
/* 83220 800E9D70 24E7FFFF */  addiu     $a3, $a3, -0x1
/* 83224 800E9D74 04E1FFFD */  bgez      $a3, .L800E9D6C
/* 83228 800E9D78 2442FFFC */   addiu    $v0, $v0, -0x4
/* 8322C 800E9D7C 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* 83230 800E9D80 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* 83234 800E9D84 9042007E */  lbu       $v0, 0x7E($v0)
/* 83238 800E9D88 30420001 */  andi      $v0, $v0, 0x1
/* 8323C 800E9D8C 144000C7 */  bnez      $v0, .L800EA0AC
/* 83240 800E9D90 0000102D */   daddu    $v0, $zero, $zero
/* 83244 800E9D94 0000382D */  daddu     $a3, $zero, $zero
/* 83248 800E9D98 3C038011 */  lui       $v1, %hi(D_8010BF60)
/* 8324C 800E9D9C 2463BF60 */  addiu     $v1, $v1, %lo(D_8010BF60)
/* 83250 800E9DA0 00091080 */  sll       $v0, $t1, 2
/* 83254 800E9DA4 00435021 */  addu      $t2, $v0, $v1
/* 83258 800E9DA8 27A30010 */  addiu     $v1, $sp, 0x10
/* 8325C 800E9DAC 00041080 */  sll       $v0, $a0, 2
/* 83260 800E9DB0 00433021 */  addu      $a2, $v0, $v1
/* 83264 800E9DB4 00071040 */  sll       $v0, $a3, 1
.L800E9DB8:
/* 83268 800E9DB8 01021021 */  addu      $v0, $t0, $v0
/* 8326C 800E9DBC 84430208 */  lh        $v1, 0x208($v0)
/* 83270 800E9DC0 10600004 */  beqz      $v1, .L800E9DD4
/* 83274 800E9DC4 00031140 */   sll      $v0, $v1, 5
/* 83278 800E9DC8 3C038008 */  lui       $v1, %hi(gItemTable + 0x1A)
/* 8327C 800E9DCC 00621821 */  addu      $v1, $v1, $v0
/* 83280 800E9DD0 906378FA */  lbu       $v1, %lo(gItemTable + 0x1A)($v1)
.L800E9DD4:
/* 83284 800E9DD4 2D220038 */  sltiu     $v0, $t1, 0x38
/* 83288 800E9DD8 504000A9 */  beql      $v0, $zero, .L800EA080
/* 8328C 800E9DDC 24E70001 */   addiu    $a3, $a3, 0x1
/* 83290 800E9DE0 8D420000 */  lw        $v0, 0x0($t2)
/* 83294 800E9DE4 00400008 */  jr        $v0
/* 83298 800E9DE8 00000000 */   nop
/* 8329C 800E9DEC 0803A81D */  j         .L800EA074
/* 832A0 800E9DF0 2402004C */   addiu    $v0, $zero, 0x4C
/* 832A4 800E9DF4 0803A81D */  j         .L800EA074
/* 832A8 800E9DF8 24020040 */   addiu    $v0, $zero, 0x40
/* 832AC 800E9DFC 0803A81D */  j         .L800EA074
/* 832B0 800E9E00 2402004D */   addiu    $v0, $zero, 0x4D
/* 832B4 800E9E04 0803A81D */  j         .L800EA074
/* 832B8 800E9E08 24020052 */   addiu    $v0, $zero, 0x52
/* 832BC 800E9E0C 0803A81D */  j         .L800EA074
/* 832C0 800E9E10 24020035 */   addiu    $v0, $zero, 0x35
/* 832C4 800E9E14 24020053 */  addiu     $v0, $zero, 0x53
/* 832C8 800E9E18 50620001 */  beql      $v1, $v0, .L800E9E20
/* 832CC 800E9E1C 24A50001 */   addiu    $a1, $a1, 0x1
.L800E9E20:
/* 832D0 800E9E20 8102000A */  lb        $v0, 0xA($t0)
/* 832D4 800E9E24 50400096 */  beql      $v0, $zero, .L800EA080
/* 832D8 800E9E28 24E70001 */   addiu    $a3, $a3, 0x1
/* 832DC 800E9E2C 0803A81F */  j         .L800EA07C
/* 832E0 800E9E30 24A50001 */   addiu    $a1, $a1, 0x1
/* 832E4 800E9E34 0803A81D */  j         .L800EA074
/* 832E8 800E9E38 24020041 */   addiu    $v0, $zero, 0x41
/* 832EC 800E9E3C 0803A81D */  j         .L800EA074
/* 832F0 800E9E40 24020042 */   addiu    $v0, $zero, 0x42
/* 832F4 800E9E44 0803A81D */  j         .L800EA074
/* 832F8 800E9E48 2402005A */   addiu    $v0, $zero, 0x5A
/* 832FC 800E9E4C 0803A81D */  j         .L800EA074
/* 83300 800E9E50 2402003C */   addiu    $v0, $zero, 0x3C
/* 83304 800E9E54 0803A81D */  j         .L800EA074
/* 83308 800E9E58 2402004E */   addiu    $v0, $zero, 0x4E
/* 8330C 800E9E5C 0803A81D */  j         .L800EA074
/* 83310 800E9E60 2402005B */   addiu    $v0, $zero, 0x5B
/* 83314 800E9E64 0803A81D */  j         .L800EA074
/* 83318 800E9E68 2402003D */   addiu    $v0, $zero, 0x3D
/* 8331C 800E9E6C 0803A81D */  j         .L800EA074
/* 83320 800E9E70 24020043 */   addiu    $v0, $zero, 0x43
/* 83324 800E9E74 24020054 */  addiu     $v0, $zero, 0x54
/* 83328 800E9E78 14620007 */  bne       $v1, $v0, .L800E9E98
/* 8332C 800E9E7C 24020055 */   addiu    $v0, $zero, 0x55
/* 83330 800E9E80 24020001 */  addiu     $v0, $zero, 0x1
/* 83334 800E9E84 ACC20000 */  sw        $v0, 0x0($a2)
/* 83338 800E9E88 24C60004 */  addiu     $a2, $a2, 0x4
/* 8333C 800E9E8C 00822021 */  addu      $a0, $a0, $v0
/* 83340 800E9E90 2405FFFF */  addiu     $a1, $zero, -0x1
/* 83344 800E9E94 24020055 */  addiu     $v0, $zero, 0x55
.L800E9E98:
/* 83348 800E9E98 14620007 */  bne       $v1, $v0, .L800E9EB8
/* 8334C 800E9E9C 24020056 */   addiu    $v0, $zero, 0x56
/* 83350 800E9EA0 24020002 */  addiu     $v0, $zero, 0x2
/* 83354 800E9EA4 ACC20000 */  sw        $v0, 0x0($a2)
/* 83358 800E9EA8 24C60004 */  addiu     $a2, $a2, 0x4
/* 8335C 800E9EAC 24840001 */  addiu     $a0, $a0, 0x1
/* 83360 800E9EB0 2405FFFF */  addiu     $a1, $zero, -0x1
/* 83364 800E9EB4 24020056 */  addiu     $v0, $zero, 0x56
.L800E9EB8:
/* 83368 800E9EB8 14620007 */  bne       $v1, $v0, .L800E9ED8
/* 8336C 800E9EBC 24020057 */   addiu    $v0, $zero, 0x57
/* 83370 800E9EC0 24020003 */  addiu     $v0, $zero, 0x3
/* 83374 800E9EC4 ACC20000 */  sw        $v0, 0x0($a2)
/* 83378 800E9EC8 24C60004 */  addiu     $a2, $a2, 0x4
/* 8337C 800E9ECC 24840001 */  addiu     $a0, $a0, 0x1
/* 83380 800E9ED0 2405FFFF */  addiu     $a1, $zero, -0x1
/* 83384 800E9ED4 24020057 */  addiu     $v0, $zero, 0x57
.L800E9ED8:
/* 83388 800E9ED8 14620007 */  bne       $v1, $v0, .L800E9EF8
/* 8338C 800E9EDC 24020058 */   addiu    $v0, $zero, 0x58
/* 83390 800E9EE0 24020004 */  addiu     $v0, $zero, 0x4
/* 83394 800E9EE4 ACC20000 */  sw        $v0, 0x0($a2)
/* 83398 800E9EE8 00C23021 */  addu      $a2, $a2, $v0
/* 8339C 800E9EEC 24840001 */  addiu     $a0, $a0, 0x1
/* 833A0 800E9EF0 2405FFFF */  addiu     $a1, $zero, -0x1
/* 833A4 800E9EF4 24020058 */  addiu     $v0, $zero, 0x58
.L800E9EF8:
/* 833A8 800E9EF8 14620007 */  bne       $v1, $v0, .L800E9F18
/* 833AC 800E9EFC 24020059 */   addiu    $v0, $zero, 0x59
/* 833B0 800E9F00 24020005 */  addiu     $v0, $zero, 0x5
/* 833B4 800E9F04 ACC20000 */  sw        $v0, 0x0($a2)
/* 833B8 800E9F08 24C60004 */  addiu     $a2, $a2, 0x4
/* 833BC 800E9F0C 24840001 */  addiu     $a0, $a0, 0x1
/* 833C0 800E9F10 2405FFFF */  addiu     $a1, $zero, -0x1
/* 833C4 800E9F14 24020059 */  addiu     $v0, $zero, 0x59
.L800E9F18:
/* 833C8 800E9F18 54620059 */  bnel      $v1, $v0, .L800EA080
/* 833CC 800E9F1C 24E70001 */   addiu    $a3, $a3, 0x1
/* 833D0 800E9F20 24020006 */  addiu     $v0, $zero, 0x6
/* 833D4 800E9F24 ACC20000 */  sw        $v0, 0x0($a2)
/* 833D8 800E9F28 24C60004 */  addiu     $a2, $a2, 0x4
/* 833DC 800E9F2C 24840001 */  addiu     $a0, $a0, 0x1
/* 833E0 800E9F30 0803A81F */  j         .L800EA07C
/* 833E4 800E9F34 2405FFFF */   addiu    $a1, $zero, -0x1
/* 833E8 800E9F38 0803A81D */  j         .L800EA074
/* 833EC 800E9F3C 2402005C */   addiu    $v0, $zero, 0x5C
/* 833F0 800E9F40 0803A81D */  j         .L800EA074
/* 833F4 800E9F44 2402005D */   addiu    $v0, $zero, 0x5D
/* 833F8 800E9F48 0803A81D */  j         .L800EA074
/* 833FC 800E9F4C 2402005E */   addiu    $v0, $zero, 0x5E
/* 83400 800E9F50 0803A81D */  j         .L800EA074
/* 83404 800E9F54 24020044 */   addiu    $v0, $zero, 0x44
/* 83408 800E9F58 0803A81D */  j         .L800EA074
/* 8340C 800E9F5C 2402005F */   addiu    $v0, $zero, 0x5F
/* 83410 800E9F60 0803A81D */  j         .L800EA074
/* 83414 800E9F64 24020060 */   addiu    $v0, $zero, 0x60
/* 83418 800E9F68 0803A81D */  j         .L800EA074
/* 8341C 800E9F6C 2402004F */   addiu    $v0, $zero, 0x4F
/* 83420 800E9F70 0803A81D */  j         .L800EA074
/* 83424 800E9F74 24020061 */   addiu    $v0, $zero, 0x61
/* 83428 800E9F78 0803A81D */  j         .L800EA074
/* 8342C 800E9F7C 24020062 */   addiu    $v0, $zero, 0x62
/* 83430 800E9F80 0803A81D */  j         .L800EA074
/* 83434 800E9F84 24020063 */   addiu    $v0, $zero, 0x63
/* 83438 800E9F88 0803A81D */  j         .L800EA074
/* 8343C 800E9F8C 24020045 */   addiu    $v0, $zero, 0x45
/* 83440 800E9F90 0803A81D */  j         .L800EA074
/* 83444 800E9F94 2402003B */   addiu    $v0, $zero, 0x3B
/* 83448 800E9F98 0803A81D */  j         .L800EA074
/* 8344C 800E9F9C 2402006E */   addiu    $v0, $zero, 0x6E
/* 83450 800E9FA0 0803A81D */  j         .L800EA074
/* 83454 800E9FA4 24020064 */   addiu    $v0, $zero, 0x64
/* 83458 800E9FA8 0803A81D */  j         .L800EA074
/* 8345C 800E9FAC 24020065 */   addiu    $v0, $zero, 0x65
/* 83460 800E9FB0 0803A81D */  j         .L800EA074
/* 83464 800E9FB4 24020046 */   addiu    $v0, $zero, 0x46
/* 83468 800E9FB8 0803A81D */  j         .L800EA074
/* 8346C 800E9FBC 24020047 */   addiu    $v0, $zero, 0x47
/* 83470 800E9FC0 0803A81D */  j         .L800EA074
/* 83474 800E9FC4 2402003E */   addiu    $v0, $zero, 0x3E
/* 83478 800E9FC8 0803A81D */  j         .L800EA074
/* 8347C 800E9FCC 24020048 */   addiu    $v0, $zero, 0x48
/* 83480 800E9FD0 0803A81D */  j         .L800EA074
/* 83484 800E9FD4 24020066 */   addiu    $v0, $zero, 0x66
/* 83488 800E9FD8 0803A81D */  j         .L800EA074
/* 8348C 800E9FDC 24020049 */   addiu    $v0, $zero, 0x49
/* 83490 800E9FE0 0803A81D */  j         .L800EA074
/* 83494 800E9FE4 24020067 */   addiu    $v0, $zero, 0x67
/* 83498 800E9FE8 0803A81D */  j         .L800EA074
/* 8349C 800E9FEC 2402006D */   addiu    $v0, $zero, 0x6D
/* 834A0 800E9FF0 0803A81D */  j         .L800EA074
/* 834A4 800E9FF4 2402006A */   addiu    $v0, $zero, 0x6A
/* 834A8 800E9FF8 0803A81D */  j         .L800EA074
/* 834AC 800E9FFC 2402006C */   addiu    $v0, $zero, 0x6C
/* 834B0 800EA000 0803A81D */  j         .L800EA074
/* 834B4 800EA004 24020050 */   addiu    $v0, $zero, 0x50
/* 834B8 800EA008 0803A81D */  j         .L800EA074
/* 834BC 800EA00C 24020038 */   addiu    $v0, $zero, 0x38
/* 834C0 800EA010 0803A81D */  j         .L800EA074
/* 834C4 800EA014 24020068 */   addiu    $v0, $zero, 0x68
/* 834C8 800EA018 0803A81D */  j         .L800EA074
/* 834CC 800EA01C 24020069 */   addiu    $v0, $zero, 0x69
/* 834D0 800EA020 0803A81D */  j         .L800EA074
/* 834D4 800EA024 2402006B */   addiu    $v0, $zero, 0x6B
/* 834D8 800EA028 0803A81D */  j         .L800EA074
/* 834DC 800EA02C 2402006F */   addiu    $v0, $zero, 0x6F
/* 834E0 800EA030 0803A81D */  j         .L800EA074
/* 834E4 800EA034 24020070 */   addiu    $v0, $zero, 0x70
/* 834E8 800EA038 0803A81D */  j         .L800EA074
/* 834EC 800EA03C 24020071 */   addiu    $v0, $zero, 0x71
/* 834F0 800EA040 0803A81D */  j         .L800EA074
/* 834F4 800EA044 24020072 */   addiu    $v0, $zero, 0x72
/* 834F8 800EA048 0803A81D */  j         .L800EA074
/* 834FC 800EA04C 24020073 */   addiu    $v0, $zero, 0x73
/* 83500 800EA050 0803A81D */  j         .L800EA074
/* 83504 800EA054 24020033 */   addiu    $v0, $zero, 0x33
/* 83508 800EA058 0803A81D */  j         .L800EA074
/* 8350C 800EA05C 24020074 */   addiu    $v0, $zero, 0x74
/* 83510 800EA060 0803A81D */  j         .L800EA074
/* 83514 800EA064 24020075 */   addiu    $v0, $zero, 0x75
/* 83518 800EA068 0803A81D */  j         .L800EA074
/* 8351C 800EA06C 24020076 */   addiu    $v0, $zero, 0x76
/* 83520 800EA070 2402004A */  addiu     $v0, $zero, 0x4A
.L800EA074:
/* 83524 800EA074 50620001 */  beql      $v1, $v0, .L800EA07C
/* 83528 800EA078 24A50001 */   addiu    $a1, $a1, 0x1
.L800EA07C:
/* 8352C 800EA07C 24E70001 */  addiu     $a3, $a3, 0x1
.L800EA080:
/* 83530 800EA080 28E20040 */  slti      $v0, $a3, 0x40
/* 83534 800EA084 1440FF4C */  bnez      $v0, .L800E9DB8
/* 83538 800EA088 00071040 */   sll      $v0, $a3, 1
/* 8353C 800EA08C 04A10007 */  bgez      $a1, .L800EA0AC
/* 83540 800EA090 00A0102D */   daddu    $v0, $a1, $zero
/* 83544 800EA094 0C00A67F */  jal       rand_int
/* 83548 800EA098 2484FFFF */   addiu    $a0, $a0, -0x1
/* 8354C 800EA09C 00021080 */  sll       $v0, $v0, 2
/* 83550 800EA0A0 03A21021 */  addu      $v0, $sp, $v0
/* 83554 800EA0A4 8C450010 */  lw        $a1, 0x10($v0)
/* 83558 800EA0A8 00A0102D */  daddu     $v0, $a1, $zero
.L800EA0AC:
/* 8355C 800EA0AC 8FBF0028 */  lw        $ra, 0x28($sp)
/* 83560 800EA0B0 03E00008 */  jr        $ra
/* 83564 800EA0B4 27BD0030 */   addiu    $sp, $sp, 0x30

### DECOMPILED C INSTRUCTIONS:

s32 is_ability_active(s32 ability) {
    PlayerData* playerData = &gPlayerData;
    s32 attackFXArray[6];
    s32 ret;
    s32 attackFXIndex;
    s32 badgeMoveID;
    u8* moveID;
    s32 i;

    ret = 0;
    attackFXIndex = 0;

    for (i = 0; i < ARRAY_COUNT(attackFXArray); i++) {
        attackFXArray[i] = 0;
    }

    if (gGameStatusPtr->peachFlags & PEACH_STATUS_FLAG_IS_PEACH) {
        return 0;
    }

    for (i = 0; i < ARRAY_COUNT(playerData->equippedBadges); i++) {
        badgeMoveID = playerData->equippedBadges[i];

        if (badgeMoveID != 0) {
            moveID = &gItemTable[badgeMoveID].moveID;
            badgeMoveID = *moveID;
        }

        switch (ability) {
            case ABILITY_DODGE_MASTER:
                if (badgeMoveID == MOVE_DODGE_MASTER) {
                    ret++;
                }
                break;
            case ABILITY_SPIKE_SHIELD:
                if (badgeMoveID == MOVE_SPIKE_SHIELD) {
                    ret++;
                }
                break;
            case ABILITY_FIRST_ATTACK:
                if (badgeMoveID == MOVE_FIRST_ATTACK) {
                    ret++;
                }
                break;
            case ABILITY_HP_PLUS:
                if (badgeMoveID == MOVE_HP_PLUS) {
                    ret++;
                }
                break;
            case ABILITY_DOUBLE_DIP:
                if (badgeMoveID == MOVE_DOUBLE_DIP) {
                    ret++;
                }
                break;
            case ABILITY_MYSTERY_SCROLL:
                if (badgeMoveID == MOVE_MYSTERY_SCROLL) {
                    ret++;
                }
                if (playerData->hasActionCommands) {
                    ret++;
                }
                break;
            case ABILITY_FIRE_SHIELD:
                if (badgeMoveID == MOVE_FIRE_SHIELD) {
                    ret++;
                }
                break;
            case ABILITY_PRETTY_LUCKY:
                if (badgeMoveID == MOVE_PRETTY_LUCKY) {
                    ret++;
                }
                break;
            case ABILITY_HP_DRAIN:
                if (badgeMoveID == MOVE_HP_DRAIN) {
                    ret++;
                }
                break;
            case ABILITY_ALL_OR_NOTHING:
                if (badgeMoveID == MOVE_ALLOR_NOTHING) {
                    ret++;
                }
                break;
            case ABILITY_SLOW_GO:
                if (badgeMoveID == MOVE_SLOW_GO) {
                    ret++;
                }
                break;
            case ABILITY_FP_PLUS:
                if (badgeMoveID == MOVE_FP_PLUS) {
                    ret++;
                }
                break;
            case ABILITY_ICE_POWER:
                if (badgeMoveID == MOVE_ICE_POWER) {
                    ret++;
                }
                break;
            case ABILITY_FEELING_FINE:
                if (badgeMoveID == MOVE_FEELING_FINE) {
                    ret++;
                }
                break;
            case ABILITY_ATTACK_FX:
                if (badgeMoveID == MOVE_ATTACK_FX_A) {
                    attackFXArray[attackFXIndex++] = 1;
                    ret = -1;
                }
                if (badgeMoveID == MOVE_ATTACK_FX_D) {
                    attackFXArray[attackFXIndex++] = 2;
                    ret = -1;
                }
                if (badgeMoveID == MOVE_ATTACK_FX_B) {
                    attackFXArray[attackFXIndex++] = 3;
                    ret = -1;
                }
                if (badgeMoveID == MOVE_ATTACK_FX_E) {
                    attackFXArray[attackFXIndex++] = 4;
                    ret = -1;
                }
                if (badgeMoveID == MOVE_ATTACK_FX_C) {
                    attackFXArray[attackFXIndex++] = 5;
                    ret = -1;
                }
                if (badgeMoveID == MOVE_ATTACK_FX_F) {
                    attackFXArray[attackFXIndex++] = 6;
                    ret = -1;
                }
                break;
            case ABILITY_MONEY_MONEY:
                if (badgeMoveID == MOVE_MONEY_MONEY) {
                    ret++;
                }
                break;
            case ABILITY_CHILL_OUT:
                if (badgeMoveID == MOVE_CHILL_OUT_BADGE) {
                    ret++;
                }
                break;
            case ABILITY_HAPPY_HEART:
                if (badgeMoveID == MOVE_HAPPY_HEART) {
                    ret++;
                }
                break;
            case ABILITY_ZAP_TAP:
                if (badgeMoveID == MOVE_ZAP_TAP) {
                    ret++;
                }
                break;
            case ABILITY_MEGA_RUSH:
                if (badgeMoveID == MOVE_MEGA_RUSH) {
                    ret++;
                }
                break;
            case ABILITY_BERSERKER:
                if (badgeMoveID == MOVE_BERSERKER) {
                    ret++;
                }
                break;
            case ABILITY_RIGHT_ON:
                if (badgeMoveID == MOVE_RIGHT_ON) {
                    ret++;
                }
                break;
            case ABILITY_RUNAWAY_PAY:
                if (badgeMoveID == MOVE_RUNAWAY_PAY) {
                    ret++;
                }
                break;
            case ABILITY_FLOWER_SAVER:
                if (badgeMoveID == MOVE_FLOWER_SAVER) {
                    ret++;
                }
                break;
            case ABILITY_PAY_OFF:
                if (badgeMoveID == MOVE_PAY_OFF) {
                    ret++;
                }
                break;
            case ABILITY_DEFEND_PLUS:
                if (badgeMoveID == MOVE_DEFEND_PLUS) {
                    ret++;
                }
                break;
            case ABILITY_POWER_PLUS:
                if (badgeMoveID == MOVE_POWER_PLUS) {
                    ret++;
                }
                break;
            case ABILITY_REFUND:
                if (badgeMoveID == MOVE_REFUND) {
                    ret++;
                }
                break;
            case ABILITY_POWER_RUSH:
                if (badgeMoveID == MOVE_POWER_RUSH) {
                    ret++;
                }
                break;
            case ABILITY_CRAZY_HEART:
                if (badgeMoveID == MOVE_CRAZY_HEART) {
                    ret++;
                }
                break;
            case ABILITY_LAST_STAND:
                if (badgeMoveID == MOVE_LAST_STAND) {
                    ret++;
                }
                break;
            case ABILITY_CLOSE_CALL:
                if (badgeMoveID == MOVE_CLOSE_CALL) {
                    ret++;
                }
                break;
            case ABILITY_P_UP_D_DOWN:
                if (badgeMoveID == MOVE_P_UP_D_DOWN) {
                    ret++;
                }
                break;
            case ABILITY_LUCKY_DAY:
                if (badgeMoveID == MOVE_LUCKY_DAY) {
                    ret++;
                }
                break;
            case ABILITY_MEGA_HP_DRAIN:
                if (badgeMoveID == MOVE_MEGA_HP_DRAIN) {
                    ret++;
                }
                break;
            case ABILITY_P_DOWN_D_UP:
                if (badgeMoveID == MOVE_P_DOWN_D_UP) {
                    ret++;
                }
                break;
            case ABILITY_FLOWER_FANATIC:
                if (badgeMoveID == MOVE_FLOWER_FANATIC) {
                    ret++;
                }
                break;
            case ABILITY_SPEEDY_SPIN:
                if (badgeMoveID == MOVE_SPEEDY_SPIN) {
                    ret++;
                }
                break;
            case ABILITY_SPIN_ATTACK:
                if (badgeMoveID == MOVE_SPIN_ATTACK) {
                    ret++;
                }
                break;
            case ABILITY_I_SPY:
                if (badgeMoveID == MOVE_I_SPY) {
                    ret++;
                }
                break;
            case ABILITY_BUMP_ATTACK:
                if (badgeMoveID == MOVE_BUMP_ATTACK) {
                    ret++;
                }
                break;
            case ABILITY_QUICK_CHANGE:
                if (badgeMoveID == MOVE_QUICK_CHANGE) {
                    ret++;
                }
                break;
            case ABILITY_HEART_FINDER:
                if (badgeMoveID == MOVE_HEART_FINDER) {
                    ret++;
                }
                break;
            case ABILITY_FLOWER_FINDER:
                if (badgeMoveID == MOVE_FLOWER_FINDER) {
                    ret++;
                }
                break;
            case ABILITY_DIZZY_ATTACK:
                if (badgeMoveID == MOVE_DIZZY_ATTACK) {
                    ret++;
                }
                break;
            case ABILITY_FINAL_GOOMPA:
                if (badgeMoveID == MOVE_UNUSED_FINAL_GOOMPA) {
                    ret++;
                }
                break;
            case ABILITY_FINAL_BOBOMB:
                if (badgeMoveID == MOVE_UNUSED_FINAL_BOBOMB) {
                    ret++;
                }
                break;
            case ABILITY_DEEP_FOCUS:
                if (badgeMoveID == MOVE_DEEP_FOCUS) {
                    ret++;
                }
                break;
            case ABILITY_SUPER_FOCUS:
                if (badgeMoveID == MOVE_SUPER_FOCUS) {
                    ret++;
                }
                break;
            case ABILITY_KAIDEN:
                if (badgeMoveID == MOVE_KAIDEN) {
                    ret++;
                }
                break;
            case ABILITY_DAMAGE_DODGE:
                if (badgeMoveID == MOVE_DAMAGE_DODGE) {
                    ret++;
                }
                break;
            case ABILITY_HAPPY_FLOWER:
                if (badgeMoveID == MOVE_HAPPY_FLOWER) {
                    ret++;
                }
                break;
            case ABILITY_GROUP_FOCUS:
                if (badgeMoveID == MOVE_GROUP_FOCUS) {
                    ret++;
                }
                break;
            case ABILITY_PEEKABOO:
                if (badgeMoveID == MOVE_PEEKABOO) {
                    ret++;
                }
                break;
            case ABILITY_HEALTHY_HEALTHY:
                if (badgeMoveID == MOVE_HEALTHY_HEALTHY) {
                    ret++;
                }
                break;
        }
    }

    if (ret < 0) {
        ret = attackFXArray[rand_int(attackFXIndex - 1)];
    }
    return ret;
}


### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_8025B5C0
/* 189EA0 8025B5C0 27BDFFC0 */  addiu     $sp, $sp, -0x40
/* 189EA4 8025B5C4 AFB40028 */  sw        $s4, 0x28($sp)
/* 189EA8 8025B5C8 0080A02D */  daddu     $s4, $a0, $zero
/* 189EAC 8025B5CC AFB1001C */  sw        $s1, 0x1C($sp)
/* 189EB0 8025B5D0 00A0882D */  daddu     $s1, $a1, $zero
/* 189EB4 8025B5D4 AFB5002C */  sw        $s5, 0x2C($sp)
/* 189EB8 8025B5D8 00C0A82D */  daddu     $s5, $a2, $zero
/* 189EBC 8025B5DC AFB60030 */  sw        $s6, 0x30($sp)
/* 189EC0 8025B5E0 AFBF0038 */  sw        $ra, 0x38($sp)
/* 189EC4 8025B5E4 AFB70034 */  sw        $s7, 0x34($sp)
/* 189EC8 8025B5E8 AFB30024 */  sw        $s3, 0x24($sp)
/* 189ECC 8025B5EC AFB20020 */  sw        $s2, 0x20($sp)
/* 189ED0 8025B5F0 AFB00018 */  sw        $s0, 0x18($sp)
/* 189ED4 8025B5F4 8E3000C0 */  lw        $s0, 0xC0($s1)
/* 189ED8 8025B5F8 8FB30050 */  lw        $s3, 0x50($sp)
/* 189EDC 8025B5FC 820206C1 */  lb        $v0, 0x6C1($s0)
/* 189EE0 8025B600 8FB20054 */  lw        $s2, 0x54($sp)
/* 189EE4 8025B604 10400078 */  beqz      $v0, .L8025B7E8
/* 189EE8 8025B608 00E0B02D */   daddu    $s6, $a3, $zero
/* 189EEC 8025B60C 1680001B */  bnez      $s4, .L8025B67C
/* 189EF0 8025B610 00000000 */   nop
/* 189EF4 8025B614 0C0B7830 */  jal       spr_get_player_palettes
/* 189EF8 8025B618 96240088 */   lhu      $a0, 0x88($s1)
/* 189EFC 8025B61C AE0206D0 */  sw        $v0, 0x6D0($s0)
/* 189F00 8025B620 0040202D */  daddu     $a0, $v0, $zero
/* 189F04 8025B624 A20006CD */  sb        $zero, 0x6CD($s0)
/* 189F08 8025B628 8C830000 */  lw        $v1, 0x0($a0)
/* 189F0C 8025B62C 2402FFFF */  addiu     $v0, $zero, -0x1
/* 189F10 8025B630 1062000B */  beq       $v1, $v0, .L8025B660
/* 189F14 8025B634 0080182D */   daddu    $v1, $a0, $zero
/* 189F18 8025B638 0040202D */  daddu     $a0, $v0, $zero
.L8025B63C:
/* 189F1C 8025B63C 920206CD */  lbu       $v0, 0x6CD($s0)
/* 189F20 8025B640 24420001 */  addiu     $v0, $v0, 0x1
/* 189F24 8025B644 A20206CD */  sb        $v0, 0x6CD($s0)
/* 189F28 8025B648 00021600 */  sll       $v0, $v0, 24
/* 189F2C 8025B64C 00021583 */  sra       $v0, $v0, 22
/* 189F30 8025B650 00431021 */  addu      $v0, $v0, $v1
/* 189F34 8025B654 8C420000 */  lw        $v0, 0x0($v0)
/* 189F38 8025B658 1444FFF8 */  bne       $v0, $a0, .L8025B63C
/* 189F3C 8025B65C 00000000 */   nop
.L8025B660:
/* 189F40 8025B660 3C02800E */  lui       $v0, %hi(gBattleStatus + 0x4)
/* 189F44 8025B664 8C42C074 */  lw        $v0, %lo(gBattleStatus + 0x4)($v0)
/* 189F48 8025B668 30420040 */  andi      $v0, $v0, 0x40
/* 189F4C 8025B66C 14400019 */  bnez      $v0, .L8025B6D4
/* 189F50 8025B670 24020004 */   addiu    $v0, $zero, 0x4
/* 189F54 8025B674 08096DB5 */  j         .L8025B6D4
/* 189F58 8025B678 24020006 */   addiu    $v0, $zero, 0x6
.L8025B67C:
/* 189F5C 8025B67C 96240088 */  lhu       $a0, 0x88($s1)
/* 189F60 8025B680 0C0B7A90 */  jal       spr_get_npc_palettes
/* 189F64 8025B684 00000000 */   nop
/* 189F68 8025B688 AE0206D0 */  sw        $v0, 0x6D0($s0)
/* 189F6C 8025B68C 0040202D */  daddu     $a0, $v0, $zero
/* 189F70 8025B690 A20006CD */  sb        $zero, 0x6CD($s0)
/* 189F74 8025B694 8C830000 */  lw        $v1, 0x0($a0)
/* 189F78 8025B698 2402FFFF */  addiu     $v0, $zero, -0x1
/* 189F7C 8025B69C 1062000B */  beq       $v1, $v0, .L8025B6CC
/* 189F80 8025B6A0 0080182D */   daddu    $v1, $a0, $zero
/* 189F84 8025B6A4 0040202D */  daddu     $a0, $v0, $zero
.L8025B6A8:
/* 189F88 8025B6A8 920206CD */  lbu       $v0, 0x6CD($s0)
/* 189F8C 8025B6AC 24420001 */  addiu     $v0, $v0, 0x1
/* 189F90 8025B6B0 A20206CD */  sb        $v0, 0x6CD($s0)
/* 189F94 8025B6B4 00021600 */  sll       $v0, $v0, 24
/* 189F98 8025B6B8 00021583 */  sra       $v0, $v0, 22
/* 189F9C 8025B6BC 00431021 */  addu      $v0, $v0, $v1
/* 189FA0 8025B6C0 8C420000 */  lw        $v0, 0x0($v0)
/* 189FA4 8025B6C4 1444FFF8 */  bne       $v0, $a0, .L8025B6A8
/* 189FA8 8025B6C8 00000000 */   nop
.L8025B6CC:
/* 189FAC 8025B6CC 0C0B7A9B */  jal       spr_get_npc_color_variations
/* 189FB0 8025B6D0 96240088 */   lhu      $a0, 0x88($s1)
.L8025B6D4:
/* 189FB4 8025B6D4 A20206CC */  sb        $v0, 0x6CC($s0)
/* 189FB8 8025B6D8 820306C1 */  lb        $v1, 0x6C1($s0)
/* 189FBC 8025B6DC 24020001 */  addiu     $v0, $zero, 0x1
/* 189FC0 8025B6E0 14620004 */  bne       $v1, $v0, .L8025B6F4
/* 189FC4 8025B6E4 240200FF */   addiu    $v0, $zero, 0xFF
/* 189FC8 8025B6E8 A20006C2 */  sb        $zero, 0x6C2($s0)
/* 189FCC 8025B6EC 08096DBF */  j         .L8025B6FC
/* 189FD0 8025B6F0 A60006CA */   sh       $zero, 0x6CA($s0)
.L8025B6F4:
/* 189FD4 8025B6F4 A20006C2 */  sb        $zero, 0x6C2($s0)
/* 189FD8 8025B6F8 A60206CA */  sh        $v0, 0x6CA($s0)
.L8025B6FC:
/* 189FDC 8025B6FC 820206CD */  lb        $v0, 0x6CD($s0)
/* 189FE0 8025B700 18400017 */  blez      $v0, .L8025B760
/* 189FE4 8025B704 0000502D */   daddu    $t2, $zero, $zero
/* 189FE8 8025B708 0200202D */  daddu     $a0, $s0, $zero
.L8025B70C:
/* 189FEC 8025B70C 8E0206D0 */  lw        $v0, 0x6D0($s0)
/* 189FF0 8025B710 000A1880 */  sll       $v1, $t2, 2
/* 189FF4 8025B714 00621821 */  addu      $v1, $v1, $v0
/* 189FF8 8025B718 000A1140 */  sll       $v0, $t2, 5
/* 189FFC 8025B71C 8C670000 */  lw        $a3, 0x0($v1)
/* 18A000 8025B720 02024821 */  addu      $t1, $s0, $v0
/* 18A004 8025B724 10E00009 */  beqz      $a3, .L8025B74C
/* 18A008 8025B728 AC8906D4 */   sw       $t1, 0x6D4($a0)
/* 18A00C 8025B72C 0000402D */  daddu     $t0, $zero, $zero
.L8025B730:
/* 18A010 8025B730 94E20000 */  lhu       $v0, 0x0($a3)
/* 18A014 8025B734 24E70002 */  addiu     $a3, $a3, 0x2
/* 18A018 8025B738 25080001 */  addiu     $t0, $t0, 0x1
D_8025B73C:
/* 18A01C 8025B73C A5220000 */  sh        $v0, 0x0($t1)
/* 18A020 8025B740 29020010 */  slti      $v0, $t0, 0x10
/* 18A024 8025B744 1440FFFA */  bnez      $v0, .L8025B730
/* 18A028 8025B748 25290002 */   addiu    $t1, $t1, 0x2
.L8025B74C:
/* 18A02C 8025B74C 820206CD */  lb        $v0, 0x6CD($s0)
/* 18A030 8025B750 254A0001 */  addiu     $t2, $t2, 0x1
/* 18A034 8025B754 0142102A */  slt       $v0, $t2, $v0
/* 18A038 8025B758 1440FFEC */  bnez      $v0, .L8025B70C
/* 18A03C 8025B75C 24840004 */   addiu    $a0, $a0, 0x4
.L8025B760:
/* 18A040 8025B760 1240001D */  beqz      $s2, .L8025B7D8
/* 18A044 8025B764 2402000A */   addiu    $v0, $zero, 0xA
/* 18A048 8025B768 820206CC */  lb        $v0, 0x6CC($s0)
/* 18A04C 8025B76C 920306CC */  lbu       $v1, 0x6CC($s0)
/* 18A050 8025B770 18400018 */  blez      $v0, .L8025B7D4
/* 18A054 8025B774 0000502D */   daddu    $t2, $zero, $zero
/* 18A058 8025B778 000A1140 */  sll       $v0, $t2, 5
.L8025B77C:
/* 18A05C 8025B77C 02025821 */  addu      $t3, $s0, $v0
/* 18A060 8025B780 0000402D */  daddu     $t0, $zero, $zero
/* 18A064 8025B784 00031600 */  sll       $v0, $v1, 24
/* 18A068 8025B788 00021603 */  sra       $v0, $v0, 24
/* 18A06C 8025B78C 004A1021 */  addu      $v0, $v0, $t2
/* 18A070 8025B790 8E0306D0 */  lw        $v1, 0x6D0($s0)
/* 18A074 8025B794 00021080 */  sll       $v0, $v0, 2
/* 18A078 8025B798 00431021 */  addu      $v0, $v0, $v1
/* 18A07C 8025B79C 8C470000 */  lw        $a3, 0x0($v0)
.L8025B7A0:
/* 18A080 8025B7A0 94E20000 */  lhu       $v0, 0x0($a3)
/* 18A084 8025B7A4 24E70002 */  addiu     $a3, $a3, 0x2
/* 18A088 8025B7A8 25080001 */  addiu     $t0, $t0, 0x1
/* 18A08C 8025B7AC A5620000 */  sh        $v0, 0x0($t3)
/* 18A090 8025B7B0 29020010 */  slti      $v0, $t0, 0x10
/* 18A094 8025B7B4 1440FFFA */  bnez      $v0, .L8025B7A0
/* 18A098 8025B7B8 256B0002 */   addiu    $t3, $t3, 0x2
/* 18A09C 8025B7BC 254A0001 */  addiu     $t2, $t2, 0x1
/* 18A0A0 8025B7C0 820206CC */  lb        $v0, 0x6CC($s0)
/* 18A0A4 8025B7C4 920306CC */  lbu       $v1, 0x6CC($s0)
/* 18A0A8 8025B7C8 0142102A */  slt       $v0, $t2, $v0
/* 18A0AC 8025B7CC 1440FFEB */  bnez      $v0, .L8025B77C
/* 18A0B0 8025B7D0 000A1140 */   sll      $v0, $t2, 5
.L8025B7D4:
/* 18A0B4 8025B7D4 2402000A */  addiu     $v0, $zero, 0xA
.L8025B7D8:
/* 18A0B8 8025B7D8 A60206C8 */  sh        $v0, 0x6C8($s0)
/* 18A0BC 8025B7DC A60006CA */  sh        $zero, 0x6CA($s0)
/* 18A0C0 8025B7E0 A20006C2 */  sb        $zero, 0x6C2($s0)
/* 18A0C4 8025B7E4 A20006C1 */  sb        $zero, 0x6C1($s0)
.L8025B7E8:
/* 18A0C8 8025B7E8 820206C2 */  lb        $v0, 0x6C2($s0)
/* 18A0CC 8025B7EC 14400085 */  bnez      $v0, .L8025BA04
/* 18A0D0 8025B7F0 00000000 */   nop
/* 18A0D4 8025B7F4 56600011 */  bnel      $s3, $zero, .L8025B83C
/* 18A0D8 8025B7F8 3C0451EB */   lui      $a0, (0x51EB851F >> 16)
/* 18A0DC 8025B7FC 860206C8 */  lh        $v0, 0x6C8($s0)
/* 18A0E0 8025B800 960306C8 */  lhu       $v1, 0x6C8($s0)
/* 18A0E4 8025B804 10400003 */  beqz      $v0, .L8025B814
/* 18A0E8 8025B808 2462FFFF */   addiu    $v0, $v1, -0x1
/* 18A0EC 8025B80C 08096E81 */  j         .L8025BA04
/* 18A0F0 8025B810 A60206C8 */   sh       $v0, 0x6C8($s0)
.L8025B814:
/* 18A0F4 8025B814 960206CA */  lhu       $v0, 0x6CA($s0)
/* 18A0F8 8025B818 24420A00 */  addiu     $v0, $v0, 0xA00
/* 18A0FC 8025B81C A60206CA */  sh        $v0, 0x6CA($s0)
/* 18A100 8025B820 00021400 */  sll       $v0, $v0, 16
/* 18A104 8025B824 00021403 */  sra       $v0, $v0, 16
/* 18A108 8025B828 2842639D */  slti      $v0, $v0, 0x639D
/* 18A10C 8025B82C 14400003 */  bnez      $v0, .L8025B83C
/* 18A110 8025B830 3C0451EB */   lui      $a0, (0x51EB851F >> 16)
/* 18A114 8025B834 2402639C */  addiu     $v0, $zero, 0x639C
/* 18A118 8025B838 A60206CA */  sh        $v0, 0x6CA($s0)
.L8025B83C:
/* 18A11C 8025B83C 960306CA */  lhu       $v1, 0x6CA($s0)
/* 18A120 8025B840 3484851F */  ori       $a0, $a0, (0x51EB851F & 0xFFFF)
/* 18A124 8025B844 00031C00 */  sll       $v1, $v1, 16
/* 18A128 8025B848 00031403 */  sra       $v0, $v1, 16
/* 18A12C 8025B84C 00440018 */  mult      $v0, $a0
/* 18A130 8025B850 0000502D */  daddu     $t2, $zero, $zero
D_8025B854:
/* 18A134 8025B854 00031FC3 */  sra       $v1, $v1, 31
/* 18A138 8025B858 820206CC */  lb        $v0, 0x6CC($s0)
/* 18A13C 8025B85C 0000B810 */  mfhi      $s7
/* 18A140 8025B860 00172143 */  sra       $a0, $s7, 5
/* 18A144 8025B864 18400062 */  blez      $v0, .L8025B9F0
/* 18A148 8025B868 0083C823 */   subu     $t9, $a0, $v1
/* 18A14C 8025B86C 332E00FF */  andi      $t6, $t9, 0xFF
/* 18A150 8025B870 240200FF */  addiu     $v0, $zero, 0xFF
/* 18A154 8025B874 004EC023 */  subu      $t8, $v0, $t6
/* 18A158 8025B878 3C0F8080 */  lui       $t7, (0x80808081 >> 16)
/* 18A15C 8025B87C 35EF8081 */  ori       $t7, $t7, (0x80808081 & 0xFFFF)
.L8025B880:
/* 18A160 8025B880 16400004 */  bnez      $s2, .L8025B894
/* 18A164 8025B884 000A1080 */   sll      $v0, $t2, 2
/* 18A168 8025B888 8E0306D0 */  lw        $v1, 0x6D0($s0)
/* 18A16C 8025B88C 08096E2A */  j         .L8025B8A8
/* 18A170 8025B890 00431021 */   addu     $v0, $v0, $v1
.L8025B894:
/* 18A174 8025B894 820206CC */  lb        $v0, 0x6CC($s0)
/* 18A178 8025B898 8E0306D0 */  lw        $v1, 0x6D0($s0)
/* 18A17C 8025B89C 004A1021 */  addu      $v0, $v0, $t2
/* 18A180 8025B8A0 00021080 */  sll       $v0, $v0, 2
/* 18A184 8025B8A4 00431021 */  addu      $v0, $v0, $v1
.L8025B8A8:
/* 18A188 8025B8A8 8C470000 */  lw        $a3, 0x0($v0)
/* 18A18C 8025B8AC 000A1140 */  sll       $v0, $t2, 5
/* 18A190 8025B8B0 02025821 */  addu      $t3, $s0, $v0
/* 18A194 8025B8B4 0000402D */  daddu     $t0, $zero, $zero
/* 18A198 8025B8B8 820206CC */  lb        $v0, 0x6CC($s0)
/* 18A19C 8025B8BC 8E0306D0 */  lw        $v1, 0x6D0($s0)
/* 18A1A0 8025B8C0 00021040 */  sll       $v0, $v0, 1
/* 18A1A4 8025B8C4 004A1021 */  addu      $v0, $v0, $t2
/* 18A1A8 8025B8C8 00021080 */  sll       $v0, $v0, 2
/* 18A1AC 8025B8CC 00431021 */  addu      $v0, $v0, $v1
/* 18A1B0 8025B8D0 8C490000 */  lw        $t1, 0x0($v0)
.L8025B8D4:
/* 18A1B4 8025B8D4 94E30000 */  lhu       $v1, 0x0($a3)
/* 18A1B8 8025B8D8 000312C2 */  srl       $v0, $v1, 11
/* 18A1BC 8025B8DC 00580018 */  mult      $v0, $t8
/* 18A1C0 8025B8E0 95240000 */  lhu       $a0, 0x0($t1)
/* 18A1C4 8025B8E4 00002812 */  mflo      $a1
/* 18A1C8 8025B8E8 000412C2 */  srl       $v0, $a0, 11
/* 18A1CC 8025B8EC 00000000 */  nop
/* 18A1D0 8025B8F0 004E0018 */  mult      $v0, $t6
/* 18A1D4 8025B8F4 00006012 */  mflo      $t4
/* 18A1D8 8025B8F8 00AC2821 */  addu      $a1, $a1, $t4
/* 18A1DC 8025B8FC 00000000 */  nop
/* 18A1E0 8025B900 00AF0018 */  mult      $a1, $t7
/* 18A1E4 8025B904 00009810 */  mfhi      $s3
/* 18A1E8 8025B908 00031182 */  srl       $v0, $v1, 6
/* 18A1EC 8025B90C 3042001F */  andi      $v0, $v0, 0x1F
/* 18A1F0 8025B910 00580018 */  mult      $v0, $t8
/* 18A1F4 8025B914 00006812 */  mflo      $t5
/* 18A1F8 8025B918 00041182 */  srl       $v0, $a0, 6
/* 18A1FC 8025B91C 3042001F */  andi      $v0, $v0, 0x1F
/* 18A200 8025B920 004E0018 */  mult      $v0, $t6
/* 18A204 8025B924 00001012 */  mflo      $v0
/* 18A208 8025B928 00031842 */  srl       $v1, $v1, 1
/* 18A20C 8025B92C 3063001F */  andi      $v1, $v1, 0x1F
/* 18A210 8025B930 00780018 */  mult      $v1, $t8
/* 18A214 8025B934 24E70002 */  addiu     $a3, $a3, 0x2
/* 18A218 8025B938 91260001 */  lbu       $a2, 0x1($t1)
/* 18A21C 8025B93C 25290002 */  addiu     $t1, $t1, 0x2
/* 18A220 8025B940 25080001 */  addiu     $t0, $t0, 0x1
/* 18A224 8025B944 00006012 */  mflo      $t4
/* 18A228 8025B948 00042042 */  srl       $a0, $a0, 1
/* 18A22C 8025B94C 3084001F */  andi      $a0, $a0, 0x1F
/* 18A230 8025B950 008E0018 */  mult      $a0, $t6
/* 18A234 8025B954 30C60001 */  andi      $a2, $a2, 0x1
/* 18A238 8025B958 01A21021 */  addu      $v0, $t5, $v0
/* 18A23C 8025B95C 02652021 */  addu      $a0, $s3, $a1
/* 18A240 8025B960 000421C3 */  sra       $a0, $a0, 7
/* 18A244 8025B964 0000B812 */  mflo      $s7
/* 18A248 8025B968 00052FC3 */  sra       $a1, $a1, 31
/* 18A24C 8025B96C 00852023 */  subu      $a0, $a0, $a1
/* 18A250 8025B970 004F0018 */  mult      $v0, $t7
/* 18A254 8025B974 308400FF */  andi      $a0, $a0, 0xFF
/* 18A258 8025B978 000422C0 */  sll       $a0, $a0, 11
/* 18A25C 8025B97C AFB70010 */  sw        $s7, 0x10($sp)
/* 18A260 8025B980 01972821 */  addu      $a1, $t4, $s7
/* 18A264 8025B984 00001810 */  mfhi      $v1
/* 18A268 8025B988 00621821 */  addu      $v1, $v1, $v0
/* 18A26C 8025B98C 000319C3 */  sra       $v1, $v1, 7
/* 18A270 8025B990 000217C3 */  sra       $v0, $v0, 31
/* 18A274 8025B994 00AF0018 */  mult      $a1, $t7
/* 18A278 8025B998 00621823 */  subu      $v1, $v1, $v0
/* 18A27C 8025B99C 306300FF */  andi      $v1, $v1, 0xFF
/* 18A280 8025B9A0 00031980 */  sll       $v1, $v1, 6
/* 18A284 8025B9A4 00832025 */  or        $a0, $a0, $v1
/* 18A288 8025B9A8 00006010 */  mfhi      $t4
/* 18A28C 8025B9AC 01851021 */  addu      $v0, $t4, $a1
/* 18A290 8025B9B0 000211C3 */  sra       $v0, $v0, 7
/* 18A294 8025B9B4 00052FC3 */  sra       $a1, $a1, 31
/* 18A298 8025B9B8 00451023 */  subu      $v0, $v0, $a1
/* 18A29C 8025B9BC 304200FF */  andi      $v0, $v0, 0xFF
/* 18A2A0 8025B9C0 00021040 */  sll       $v0, $v0, 1
/* 18A2A4 8025B9C4 00822025 */  or        $a0, $a0, $v0
/* 18A2A8 8025B9C8 00C43025 */  or        $a2, $a2, $a0
/* 18A2AC 8025B9CC A5660000 */  sh        $a2, 0x0($t3)
/* 18A2B0 8025B9D0 29020010 */  slti      $v0, $t0, 0x10
/* 18A2B4 8025B9D4 1440FFBF */  bnez      $v0, .L8025B8D4
/* 18A2B8 8025B9D8 256B0002 */   addiu    $t3, $t3, 0x2
/* 18A2BC 8025B9DC 820206CC */  lb        $v0, 0x6CC($s0)
/* 18A2C0 8025B9E0 254A0001 */  addiu     $t2, $t2, 0x1
/* 18A2C4 8025B9E4 0142102A */  slt       $v0, $t2, $v0
/* 18A2C8 8025B9E8 1440FFA5 */  bnez      $v0, .L8025B880
/* 18A2CC 8025B9EC 00000000 */   nop
.L8025B9F0:
/* 18A2D0 8025B9F0 332300FF */  andi      $v1, $t9, 0xFF
D_8025B9F4:
/* 18A2D4 8025B9F4 240200FF */  addiu     $v0, $zero, 0xFF
/* 18A2D8 8025B9F8 14620002 */  bne       $v1, $v0, .L8025BA04
/* 18A2DC 8025B9FC 24020001 */   addiu    $v0, $zero, 0x1
/* 18A2E0 8025BA00 A20206C2 */  sb        $v0, 0x6C2($s0)
.L8025BA04:
/* 18A2E4 8025BA04 820206CD */  lb        $v0, 0x6CD($s0)
/* 18A2E8 8025BA08 1840000A */  blez      $v0, .L8025BA34
/* 18A2EC 8025BA0C 0000502D */   daddu    $t2, $zero, $zero
/* 18A2F0 8025BA10 0200202D */  daddu     $a0, $s0, $zero
/* 18A2F4 8025BA14 0200182D */  daddu     $v1, $s0, $zero
.L8025BA18:
/* 18A2F8 8025BA18 AC6406D4 */  sw        $a0, 0x6D4($v1)
/* 18A2FC 8025BA1C 24840020 */  addiu     $a0, $a0, 0x20
/* 18A300 8025BA20 820206CD */  lb        $v0, 0x6CD($s0)
/* 18A304 8025BA24 254A0001 */  addiu     $t2, $t2, 0x1
/* 18A308 8025BA28 0142102A */  slt       $v0, $t2, $v0
/* 18A30C 8025BA2C 1440FFFA */  bnez      $v0, .L8025BA18
/* 18A310 8025BA30 24630004 */   addiu    $v1, $v1, 0x4
.L8025BA34:
/* 18A314 8025BA34 820306C2 */  lb        $v1, 0x6C2($s0)
/* 18A318 8025BA38 28620002 */  slti      $v0, $v1, 0x2
/* 18A31C 8025BA3C 1040000D */  beqz      $v0, .L8025BA74
/* 18A320 8025BA40 00000000 */   nop
/* 18A324 8025BA44 0460000B */  bltz      $v1, .L8025BA74
/* 18A328 8025BA48 00000000 */   nop
/* 18A32C 8025BA4C 16800006 */  bnez      $s4, .L8025BA68
/* 18A330 8025BA50 0220202D */   daddu    $a0, $s1, $zero
/* 18A334 8025BA54 02A0282D */  daddu     $a1, $s5, $zero
/* 18A338 8025BA58 0C096657 */  jal       func_8025995C
/* 18A33C 8025BA5C 02C0302D */   daddu    $a2, $s6, $zero
/* 18A340 8025BA60 08096E9D */  j         .L8025BA74
/* 18A344 8025BA64 00000000 */   nop
.L8025BA68:
/* 18A348 8025BA68 02A0282D */  daddu     $a1, $s5, $zero
/* 18A34C 8025BA6C 0C0965B0 */  jal       func_802596C0
/* 18A350 8025BA70 02C0302D */   daddu    $a2, $s6, $zero
.L8025BA74:
/* 18A354 8025BA74 8FBF0038 */  lw        $ra, 0x38($sp)
/* 18A358 8025BA78 8FB70034 */  lw        $s7, 0x34($sp)
/* 18A35C 8025BA7C 8FB60030 */  lw        $s6, 0x30($sp)
D_8025BA80:
/* 18A360 8025BA80 8FB5002C */  lw        $s5, 0x2C($sp)
/* 18A364 8025BA84 8FB40028 */  lw        $s4, 0x28($sp)
/* 18A368 8025BA88 8FB30024 */  lw        $s3, 0x24($sp)
/* 18A36C 8025BA8C 8FB20020 */  lw        $s2, 0x20($sp)
/* 18A370 8025BA90 8FB1001C */  lw        $s1, 0x1C($sp)
/* 18A374 8025BA94 8FB00018 */  lw        $s0, 0x18($sp)
/* 18A378 8025BA98 03E00008 */  jr        $ra
/* 18A37C 8025BA9C 27BD0040 */   addiu    $sp, $sp, 0x40

### DECOMPILED C INSTRUCTIONS:

void render_with_player_debuff_palettes(b32 isNpcSprite, ActorPart* part, s32 yaw, Matrix4f mtx, b32 skipAnimation, b32 isPoison) {
    DecorationTable* decorationTable = part->decorationTable;
    PAL_PTR color2;
    PAL_PTR color1;
    PAL_PTR palOut;
    s32 i, j;
    u8 blendAlpha;

    if (decorationTable->resetPalAdjust) {
        if (isNpcSprite == SPRITE_MODE_PLAYER) {
            decorationTable->originalPalettesList = spr_get_player_palettes(part->currentAnimation >> 16);
            decorationTable->originalPalettesCount = 0;
            while ((s32)decorationTable->originalPalettesList[decorationTable->originalPalettesCount] != -1) {
                decorationTable->originalPalettesCount++;
            }

            if (gBattleStatus.flags2 & BS_FLAGS2_PEACH_BATTLE) {
                decorationTable->spriteColorVariations = SPR_PEACH_BTL_PAL_STRIDE;
            } else {
                decorationTable->spriteColorVariations = SPR_PLAYER_COLOR_VARIATIONS;
            }
        } else {
            decorationTable->originalPalettesList = spr_get_npc_palettes(part->currentAnimation >> 16);
            decorationTable->originalPalettesCount = 0;
            while ((s32)decorationTable->originalPalettesList[decorationTable->originalPalettesCount] != -1) {
                decorationTable->originalPalettesCount++;
            }
            decorationTable->spriteColorVariations = spr_get_npc_color_variations(part->currentAnimation >> 16);
        }

        if (decorationTable->resetPalAdjust == TRUE) {
            decorationTable->palAnimState = 0;
            decorationTable->palBlendAlpha = 0;
        } else {
            decorationTable->palAnimState = 0;
            decorationTable->palBlendAlpha = 255;
        }

        for (i = 0; i < decorationTable->originalPalettesCount; i++) {
            color2 = decorationTable->originalPalettesList[i];
            color1 = decorationTable->copiedPalettes[0][i];
            decorationTable->adjustedPalettes[i] = color1;
            if (color2 != NULL) {
                for (j = 0; j < SPR_PAL_SIZE; j++) {
                    *color1++ = *color2++;
                }
            }
        }

        if (isPoison) {
            for (i = 0; i < decorationTable->spriteColorVariations; i++) {
                color2 = decorationTable->originalPalettesList[decorationTable->spriteColorVariations + i];
                palOut = decorationTable->copiedPalettes[0][i];
                for (j = 0; j < SPR_PAL_SIZE; j++) {
                    *palOut++ = *color2++;
                }
            }
        }

        decorationTable->nextPalTime = 10;
        decorationTable->palBlendAlpha = 0;
        decorationTable->palAnimState = 0;
        decorationTable->resetPalAdjust = FALSE;
    }

    if (decorationTable->palAnimState == 0) {
        if (!skipAnimation && decorationTable->nextPalTime != 0) {
            decorationTable->nextPalTime--;
        } else {
            if (!skipAnimation) {
                decorationTable->palBlendAlpha += 2560;
                if (decorationTable->palBlendAlpha > 255 * 100) {
                    decorationTable->palBlendAlpha = 255 * 100;
                }
            }
            blendAlpha = decorationTable->palBlendAlpha / 100;
            for (i = 0; i < decorationTable->spriteColorVariations; i++) {
                if (!isPoison) {
                    color2 = decorationTable->originalPalettesList[i];
                } else {
                    color2 = decorationTable->originalPalettesList[decorationTable->spriteColorVariations * STANDARD_PAL_POISON + i];
                }
                color1 = decorationTable->originalPalettesList[decorationTable->spriteColorVariations * STANDARD_PAL_DIZZY + i];
                palOut = decorationTable->copiedPalettes[0][i];

                for (j = 0; j < SPR_PAL_SIZE; j++) {
                    u8 r2 = UNPACK_PAL_R(*color2);
                    u8 g2 = UNPACK_PAL_G(*color2);
                    u8 b2 = UNPACK_PAL_B(*color2);
                    u8 r1 = UNPACK_PAL_R(*color1);
                    u8 g1 = UNPACK_PAL_G(*color1);
                    u8 b1 = UNPACK_PAL_B(*color1);
                    u8 a1 = UNPACK_PAL_A(*color1);
                    color2++;
                    color1++;

                    r1 = LERP_COMPONENT(r2, r1, blendAlpha);
                    g1 = LERP_COMPONENT(g2, g1, blendAlpha);
                    b1 = LERP_COMPONENT(b2, b1, blendAlpha);

                    *palOut++ = PACK_PAL_RGBA(r1, g1, b1, a1);
                }
            }
            if (blendAlpha == 255) {
                decorationTable->palAnimState = 1;
            }
        }
    }

    for (i = 0; i < decorationTable->originalPalettesCount; i++) {
        decorationTable->adjustedPalettes[i] = decorationTable->copiedPalettes[0][i];
    }

    switch (decorationTable->palAnimState) {
        case 0:
        case 1:
            if (isNpcSprite == SPRITE_MODE_PLAYER) {
                func_8025995C(part, yaw, mtx);
            } else {
                func_802596C0(part, yaw, mtx);
            }
            break;
    }
}