### RAW ASSEMBLY INSTRUCTIONS:

glabel osPfsIsPlug
/* 48740 8006D340 27BDFFA0 */  addiu     $sp, $sp, -0x60
/* 48744 8006D344 AFB20040 */  sw        $s2, 0x40($sp)
/* 48748 8006D348 00809021 */  addu      $s2, $a0, $zero
/* 4874C 8006D34C AFB70054 */  sw        $s7, 0x54($sp)
/* 48750 8006D350 00A0B821 */  addu      $s7, $a1, $zero
/* 48754 8006D354 AFB30044 */  sw        $s3, 0x44($sp)
/* 48758 8006D358 00009821 */  addu      $s3, $zero, $zero
/* 4875C 8006D35C AFB00038 */  sw        $s0, 0x38($sp)
/* 48760 8006D360 24100003 */  addiu     $s0, $zero, 0x3
/* 48764 8006D364 AFBF0058 */  sw        $ra, 0x58($sp)
/* 48768 8006D368 AFB60050 */  sw        $s6, 0x50($sp)
/* 4876C 8006D36C AFB5004C */  sw        $s5, 0x4C($sp)
/* 48770 8006D370 AFB40048 */  sw        $s4, 0x48($sp)
/* 48774 8006D374 0C019771 */  jal       __osSiGetAccess
/* 48778 8006D378 AFB1003C */   sw       $s1, 0x3C($sp)
/* 4877C 8006D37C 3C14800E */  lui       $s4, %hi(__osPfsPifRam)
/* 48780 8006D380 2694A000 */  addiu     $s4, $s4, %lo(__osPfsPifRam)
/* 48784 8006D384 27B10020 */  addiu     $s1, $sp, 0x20
/* 48788 8006D388 27B50010 */  addiu     $s5, $sp, 0x10
.L8006D38C:
/* 4878C 8006D38C 0C01B52F */  jal       osPfsRequestData
/* 48790 8006D390 00002021 */   addu     $a0, $zero, $zero
/* 48794 8006D394 24040001 */  addiu     $a0, $zero, 0x1
/* 48798 8006D398 0C019730 */  jal       __osSiRawStartDma
/* 4879C 8006D39C 02802821 */   addu     $a1, $s4, $zero
/* 487A0 8006D3A0 02402021 */  addu      $a0, $s2, $zero
/* 487A4 8006D3A4 02202821 */  addu      $a1, $s1, $zero
/* 487A8 8006D3A8 0C0195BC */  jal       osRecvMesg
/* 487AC 8006D3AC 24060001 */   addiu    $a2, $zero, 0x1
/* 487B0 8006D3B0 00002021 */  addu      $a0, $zero, $zero
/* 487B4 8006D3B4 0C019730 */  jal       __osSiRawStartDma
/* 487B8 8006D3B8 02802821 */   addu     $a1, $s4, $zero
/* 487BC 8006D3BC 02402021 */  addu      $a0, $s2, $zero
/* 487C0 8006D3C0 02202821 */  addu      $a1, $s1, $zero
/* 487C4 8006D3C4 24060001 */  addiu     $a2, $zero, 0x1
/* 487C8 8006D3C8 0C0195BC */  jal       osRecvMesg
/* 487CC 8006D3CC 0040B021 */   addu     $s6, $v0, $zero
/* 487D0 8006D3D0 27A40024 */  addiu     $a0, $sp, 0x24
/* 487D4 8006D3D4 0C01B558 */  jal       osPfsGetInitData
/* 487D8 8006D3D8 27A50010 */   addiu    $a1, $sp, 0x10
/* 487DC 8006D3DC 3C02800A */  lui       $v0, %hi(__osMaxControllers)
/* 487E0 8006D3E0 9042A606 */  lbu       $v0, %lo(__osMaxControllers)($v0)
/* 487E4 8006D3E4 1840000C */  blez      $v0, .L8006D418
/* 487E8 8006D3E8 00002021 */   addu     $a0, $zero, $zero
/* 487EC 8006D3EC 00402821 */  addu      $a1, $v0, $zero
/* 487F0 8006D3F0 02A01821 */  addu      $v1, $s5, $zero
.L8006D3F4:
/* 487F4 8006D3F4 90620002 */  lbu       $v0, 0x2($v1)
/* 487F8 8006D3F8 30420004 */  andi      $v0, $v0, 0x4
/* 487FC 8006D3FC 54400003 */  bnel      $v0, $zero, .L8006D40C
/* 48800 8006D400 24840001 */   addiu    $a0, $a0, 0x1
/* 48804 8006D404 0801B506 */  j         .L8006D418
/* 48808 8006D408 2610FFFF */   addiu    $s0, $s0, -0x1
.L8006D40C:
/* 4880C 8006D40C 0085102A */  slt       $v0, $a0, $a1
/* 48810 8006D410 1440FFF8 */  bnez      $v0, .L8006D3F4
/* 48814 8006D414 24630004 */   addiu    $v1, $v1, 0x4
.L8006D418:
/* 48818 8006D418 3C03800A */  lui       $v1, %hi(__osMaxControllers)
/* 4881C 8006D41C 9063A606 */  lbu       $v1, %lo(__osMaxControllers)($v1)
/* 48820 8006D420 00831026 */  xor       $v0, $a0, $v1
/* 48824 8006D424 0002102B */  sltu      $v0, $zero, $v0
/* 48828 8006D428 00021023 */  negu      $v0, $v0
/* 4882C 8006D42C 02028024 */  and       $s0, $s0, $v0
/* 48830 8006D430 1E00FFD6 */  bgtz      $s0, .L8006D38C
/* 48834 8006D434 00000000 */   nop
/* 48838 8006D438 10600011 */  beqz      $v1, .L8006D480
/* 4883C 8006D43C 00002021 */   addu     $a0, $zero, $zero
/* 48840 8006D440 24060001 */  addiu     $a2, $zero, 0x1
/* 48844 8006D444 00602821 */  addu      $a1, $v1, $zero
/* 48848 8006D448 27A30010 */  addiu     $v1, $sp, 0x10
.L8006D44C:
/* 4884C 8006D44C 90620003 */  lbu       $v0, 0x3($v1)
/* 48850 8006D450 54400008 */  bnel      $v0, $zero, .L8006D474
/* 48854 8006D454 24840001 */   addiu    $a0, $a0, 0x1
/* 48858 8006D458 90620002 */  lbu       $v0, 0x2($v1)
/* 4885C 8006D45C 30420001 */  andi      $v0, $v0, 0x1
/* 48860 8006D460 50400004 */  beql      $v0, $zero, .L8006D474
/* 48864 8006D464 24840001 */   addiu    $a0, $a0, 0x1
/* 48868 8006D468 00861004 */  sllv      $v0, $a2, $a0
/* 4886C 8006D46C 02629825 */  or        $s3, $s3, $v0
/* 48870 8006D470 24840001 */  addiu     $a0, $a0, 0x1
.L8006D474:
/* 48874 8006D474 0085102A */  slt       $v0, $a0, $a1
/* 48878 8006D478 1440FFF4 */  bnez      $v0, .L8006D44C
/* 4887C 8006D47C 24630004 */   addiu    $v1, $v1, 0x4
.L8006D480:
/* 48880 8006D480 0C01978C */  jal       __osSiRelAccess
/* 48884 8006D484 00000000 */   nop
/* 48888 8006D488 A2F30000 */  sb        $s3, 0x0($s7)
/* 4888C 8006D48C 02C01021 */  addu      $v0, $s6, $zero
/* 48890 8006D490 8FBF0058 */  lw        $ra, 0x58($sp)
/* 48894 8006D494 8FB70054 */  lw        $s7, 0x54($sp)
/* 48898 8006D498 8FB60050 */  lw        $s6, 0x50($sp)
/* 4889C 8006D49C 8FB5004C */  lw        $s5, 0x4C($sp)
/* 488A0 8006D4A0 8FB40048 */  lw        $s4, 0x48($sp)
/* 488A4 8006D4A4 8FB30044 */  lw        $s3, 0x44($sp)
/* 488A8 8006D4A8 8FB20040 */  lw        $s2, 0x40($sp)
/* 488AC 8006D4AC 8FB1003C */  lw        $s1, 0x3C($sp)
/* 488B0 8006D4B0 8FB00038 */  lw        $s0, 0x38($sp)
/* 488B4 8006D4B4 03E00008 */  jr        $ra
/* 488B8 8006D4B8 27BD0060 */   addiu    $sp, $sp, 0x60

### DECOMPILED C INSTRUCTIONS:

s32 osPfsIsPlug(OSMesgQueue* mq, u8* pattern) {
    s32 ret = 0;
    OSMesg msg;
    u8 bitpattern;
    OSContStatus contData[MAXCONTROLLERS];
    s32 channel;
    u8 bits = 0;
    s32 crcErrorCount = 3;

    __osSiGetAccess();

    do {
        __osPfsRequestData(CONT_CMD_REQUEST_STATUS);

        ret = __osSiRawStartDma(OS_WRITE, &__osPfsPifRam);
        osRecvMesg(mq, &msg, OS_MESG_BLOCK);

        ret = __osSiRawStartDma(OS_READ, &__osPfsPifRam);
        osRecvMesg(mq, &msg, OS_MESG_BLOCK);

        __osPfsGetInitData(&bitpattern, &contData[0]);

        for (channel = 0; channel < __osMaxControllers; channel++) {
            if ((contData[channel].status & CONT_ADDR_CRC_ER) == 0) {
                crcErrorCount--;
                break;
            }
        }
        if (channel == __osMaxControllers) {
            crcErrorCount = 0;
        }
    } while (crcErrorCount > 0);

    for (channel = 0; channel < __osMaxControllers; channel++) {
        if ((contData[channel].errno == 0) && ((contData[channel].status & CONT_CARD_ON) != 0)) {
            bits |= (1 << channel);
        }
    }
    __osSiRelAccess();
    *pattern = bits;
    return ret;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel pink_sparkles_update
/* 412A34 E0124304 27BDFFE8 */  addiu     $sp, $sp, -0x18
/* 412A38 E0124308 0000302D */  daddu     $a2, $zero, $zero
/* 412A3C E012430C AFBF0010 */  sw        $ra, 0x10($sp)
/* 412A40 E0124310 8C85000C */  lw        $a1, 0xC($a0)
/* 412A44 E0124314 00C0402D */  daddu     $t0, $a2, $zero
/* 412A48 E0124318 8CA20020 */  lw        $v0, 0x20($a1)
/* 412A4C E012431C 8CA3001C */  lw        $v1, 0x1C($a1)
/* 412A50 E0124320 24420001 */  addiu     $v0, $v0, 0x1
/* 412A54 E0124324 0040382D */  daddu     $a3, $v0, $zero
/* 412A58 E0124328 2463FFFF */  addiu     $v1, $v1, -0x1
/* 412A5C E012432C ACA3001C */  sw        $v1, 0x1C($a1)
/* 412A60 E0124330 ACA70020 */  sw        $a3, 0x20($a1)
/* 412A64 E0124334 8C820008 */  lw        $v0, 0x8($a0)
/* 412A68 E0124338 2442FFFF */  addiu     $v0, $v0, -0x1
/* 412A6C E012433C 1840004E */  blez      $v0, .LE0124478
/* 412A70 E0124340 24A5002C */   addiu    $a1, $a1, 0x2C
/* 412A74 E0124344 240AFFFF */  addiu     $t2, $zero, -0x1
/* 412A78 E0124348 3C09E012 */  lui       $t1, %hi(D_E0124BE4)
/* 412A7C E012434C 25294BE4 */  addiu     $t1, $t1, %lo(D_E0124BE4)
/* 412A80 E0124350 24A3000C */  addiu     $v1, $a1, 0xC
/* 412A84 E0124354 3C01E012 */  lui       $at, (0xE0124C18 >> 16)
/* 412A88 E0124358 D42E4C18 */  ldc1      $f14, (0xE0124C18 & 0xFFFF)($at)
/* 412A8C E012435C 3C01E012 */  lui       $at, (0xE0124C20 >> 16)
/* 412A90 E0124360 D42C4C20 */  ldc1      $f12, (0xE0124C20 & 0xFFFF)($at)
/* 412A94 E0124364 3C01E012 */  lui       $at, (0xE0124C28 >> 16)
/* 412A98 E0124368 D42A4C28 */  ldc1      $f10, (0xE0124C28 & 0xFFFF)($at)
.LE012436C:
/* 412A9C E012436C 00E61021 */  addu      $v0, $a3, $a2
/* 412AA0 E0124370 00461021 */  addu      $v0, $v0, $a2
/* 412AA4 E0124374 8C650010 */  lw        $a1, 0x10($v1)
/* 412AA8 E0124378 30420007 */  andi      $v0, $v0, 0x7
/* 412AAC E012437C 04A10002 */  bgez      $a1, .LE0124388
/* 412AB0 E0124380 AC62001C */   sw       $v0, 0x1C($v1)
/* 412AB4 E0124384 25080001 */  addiu     $t0, $t0, 0x1
.LE0124388:
/* 412AB8 E0124388 24A2FFFF */  addiu     $v0, $a1, -0x1
/* 412ABC E012438C AC620010 */  sw        $v0, 0x10($v1)
/* 412AC0 E0124390 2C42001F */  sltiu     $v0, $v0, 0x1F
/* 412AC4 E0124394 14400003 */  bnez      $v0, .LE01243A4
/* 412AC8 E0124398 00000000 */   nop
/* 412ACC E012439C 08049113 */  j         .LE012444C
/* 412AD0 E01243A0 AC6A001C */   sw       $t2, 0x1C($v1)
.LE01243A4:
/* 412AD4 E01243A4 8C650014 */  lw        $a1, 0x14($v1)
/* 412AD8 E01243A8 24A20001 */  addiu     $v0, $a1, 0x1
/* 412ADC E01243AC 0040382D */  daddu     $a3, $v0, $zero
/* 412AE0 E01243B0 28A20019 */  slti      $v0, $a1, 0x19
/* 412AE4 E01243B4 1040000D */  beqz      $v0, .LE01243EC
/* 412AE8 E01243B8 AC670014 */   sw       $a3, 0x14($v1)
/* 412AEC E01243BC 00A91021 */  addu      $v0, $a1, $t1
/* 412AF0 E01243C0 90420000 */  lbu       $v0, 0x0($v0)
/* 412AF4 E01243C4 44820000 */  mtc1      $v0, $f0
/* 412AF8 E01243C8 00000000 */  nop
/* 412AFC E01243CC 46800020 */  cvt.s.w   $f0, $f0
/* 412B00 E01243D0 46000021 */  cvt.d.s   $f0, $f0
/* 412B04 E01243D4 462E0002 */  mul.d     $f0, $f0, $f14
/* 412B08 E01243D8 00000000 */  nop
/* 412B0C E01243DC 462C0002 */  mul.d     $f0, $f0, $f12
/* 412B10 E01243E0 00000000 */  nop
/* 412B14 E01243E4 08049102 */  j         .LE0124408
/* 412B18 E01243E8 46200020 */   cvt.s.d  $f0, $f0
.LE01243EC:
/* 412B1C E01243EC C4600018 */  lwc1      $f0, 0x18($v1)
/* 412B20 E01243F0 46000021 */  cvt.d.s   $f0, $f0
/* 412B24 E01243F4 46205081 */  sub.d     $f2, $f10, $f0
/* 412B28 E01243F8 462A1082 */  mul.d     $f2, $f2, $f10
/* 412B2C E01243FC 00000000 */  nop
/* 412B30 E0124400 46220000 */  add.d     $f0, $f0, $f2
/* 412B34 E0124404 46200020 */  cvt.s.d   $f0, $f0
.LE0124408:
/* 412B38 E0124408 E4600018 */  swc1      $f0, 0x18($v1)
/* 412B3C E012440C C468FFF8 */  lwc1      $f8, -0x8($v1)
/* 412B40 E0124410 C4600004 */  lwc1      $f0, 0x4($v1)
/* 412B44 E0124414 46004200 */  add.s     $f8, $f8, $f0
/* 412B48 E0124418 C4600008 */  lwc1      $f0, 0x8($v1)
/* 412B4C E012441C C466FFFC */  lwc1      $f6, -0x4($v1)
/* 412B50 E0124420 46000106 */  mov.s     $f4, $f0
/* 412B54 E0124424 46003180 */  add.s     $f6, $f6, $f0
/* 412B58 E0124428 C460000C */  lwc1      $f0, 0xC($v1)
/* 412B5C E012442C C4620004 */  lwc1      $f2, 0x4($v1)
/* 412B60 E0124430 46002100 */  add.s     $f4, $f4, $f0
/* 412B64 E0124434 C4600000 */  lwc1      $f0, 0x0($v1)
/* 412B68 E0124438 E468FFF8 */  swc1      $f8, -0x8($v1)
/* 412B6C E012443C 46020000 */  add.s     $f0, $f0, $f2
/* 412B70 E0124440 E466FFFC */  swc1      $f6, -0x4($v1)
/* 412B74 E0124444 E4640008 */  swc1      $f4, 0x8($v1)
/* 412B78 E0124448 E4600000 */  swc1      $f0, 0x0($v1)
.LE012444C:
/* 412B7C E012444C 24C60001 */  addiu     $a2, $a2, 0x1
/* 412B80 E0124450 8C820008 */  lw        $v0, 0x8($a0)
/* 412B84 E0124454 2442FFFF */  addiu     $v0, $v0, -0x1
/* 412B88 E0124458 00C2102A */  slt       $v0, $a2, $v0
/* 412B8C E012445C 1440FFC3 */  bnez      $v0, .LE012436C
/* 412B90 E0124460 2463002C */   addiu    $v1, $v1, 0x2C
/* 412B94 E0124464 8C820008 */  lw        $v0, 0x8($a0)
/* 412B98 E0124468 2442FFFF */  addiu     $v0, $v0, -0x1
/* 412B9C E012446C 0102102A */  slt       $v0, $t0, $v0
/* 412BA0 E0124470 14400003 */  bnez      $v0, .LE0124480
/* 412BA4 E0124474 00000000 */   nop
.LE0124478:
/* 412BA8 E0124478 0C080128 */  jal       shim_remove_effect
/* 412BAC E012447C 00000000 */   nop
.LE0124480:
/* 412BB0 E0124480 8FBF0010 */  lw        $ra, 0x10($sp)
/* 412BB4 E0124484 03E00008 */  jr        $ra
/* 412BB8 E0124488 27BD0018 */   addiu    $sp, $sp, 0x18

### DECOMPILED C INSTRUCTIONS:

void pink_sparkles_update(EffectInstance* effect) {
    PinkSparklesFXData* part = effect->data.pinkSparkles;
    s32 unk_20;
    s32 count = 0;
    s32 i;

    part->unk_1C--;
    part->unk_20++;
    unk_20 = part->unk_20;

    part++;
    for (i = 0; i < effect->numParts - 1; i++, part++) {
        part->unk_28 = (unk_20 + i + i) & 7;

        if (part->unk_1C < 0) {
            count += 1;
        }

        part->unk_1C--;
        if (part->unk_1C < 0 || part->unk_1C >= 31) {
            part->unk_28 = -1;
        } else {
            part->unk_20++;
            unk_20 = part->unk_20;

            if (unk_20 - 1 < 25) {
                part->unk_24 = (f32) D_E0124BE4[unk_20 - 1] * 0.01 * 0.4;
            } else {
                part->unk_24 += (0.1 - part->unk_24) * 0.1;
            }

            part->unk_04 += part->unk_10;
            part->unk_08 += part->unk_14;
            part->unk_14 += part->unk_18;
            part->unk_0C += part->unk_10;
        }
    }

    if (count >= effect->numParts - 1) {
        shim_remove_effect(effect);
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel spr_free_sprite
/* 1016D8 802DE5E8 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* 1016DC 802DE5EC AFB20018 */  sw        $s2, 0x18($sp)
/* 1016E0 802DE5F0 0080902D */  daddu     $s2, $a0, $zero
/* 1016E4 802DE5F4 3C03802E */  lui       $v1, %hi(SpriteInstances)
/* 1016E8 802DE5F8 2463FA48 */  addiu     $v1, $v1, %lo(SpriteInstances)
/* 1016EC 802DE5FC 00121080 */  sll       $v0, $s2, 2
/* 1016F0 802DE600 00521021 */  addu      $v0, $v0, $s2
/* 1016F4 802DE604 00021080 */  sll       $v0, $v0, 2
/* 1016F8 802DE608 00432821 */  addu      $a1, $v0, $v1
/* 1016FC 802DE60C AFBF0024 */  sw        $ra, 0x24($sp)
/* 101700 802DE610 AFB40020 */  sw        $s4, 0x20($sp)
/* 101704 802DE614 AFB3001C */  sw        $s3, 0x1C($sp)
/* 101708 802DE618 AFB10014 */  sw        $s1, 0x14($sp)
/* 10170C 802DE61C AFB00010 */  sw        $s0, 0x10($sp)
/* 101710 802DE620 8CB10000 */  lw        $s1, 0x0($a1)
/* 101714 802DE624 12200003 */  beqz      $s1, .L802DE634
/* 101718 802DE628 2A2200EA */   slti     $v0, $s1, 0xEA
/* 10171C 802DE62C 14400003 */  bnez      $v0, .L802DE63C
/* 101720 802DE630 00000000 */   nop
.L802DE634:
/* 101724 802DE634 080B79CA */  j         .L802DE728
/* 101728 802DE638 0240102D */   daddu    $v0, $s2, $zero
.L802DE63C:
/* 10172C 802DE63C 3C03802E */  lui       $v1, %hi(NpcSpriteInstanceCount)
/* 101730 802DE640 2463F958 */  addiu     $v1, $v1, %lo(NpcSpriteInstanceCount)
/* 101734 802DE644 02231821 */  addu      $v1, $s1, $v1
/* 101738 802DE648 90620000 */  lbu       $v0, 0x0($v1)
/* 10173C 802DE64C 2442FFFF */  addiu     $v0, $v0, -0x1
/* 101740 802DE650 A0620000 */  sb        $v0, 0x0($v1)
/* 101744 802DE654 8CB00004 */  lw        $s0, 0x4($a1)
/* 101748 802DE658 2403FFFF */  addiu     $v1, $zero, -0x1
/* 10174C 802DE65C 8E020000 */  lw        $v0, 0x0($s0)
/* 101750 802DE660 8CB40008 */  lw        $s4, 0x8($a1)
/* 101754 802DE664 10430009 */  beq       $v0, $v1, .L802DE68C
/* 101758 802DE668 00121080 */   sll      $v0, $s2, 2
/* 10175C 802DE66C 0060982D */  daddu     $s3, $v1, $zero
.L802DE670:
/* 101760 802DE670 8E020000 */  lw        $v0, 0x0($s0)
/* 101764 802DE674 9044004F */  lbu       $a0, 0x4F($v0)
/* 101768 802DE678 0C04EA15 */  jal       imgfx_release_instance
/* 10176C 802DE67C 26100004 */   addiu    $s0, $s0, 0x4
/* 101770 802DE680 8E020000 */  lw        $v0, 0x0($s0)
/* 101774 802DE684 1453FFFA */  bne       $v0, $s3, .L802DE670
/* 101778 802DE688 00121080 */   sll      $v0, $s2, 2
.L802DE68C:
/* 10177C 802DE68C 00521021 */  addu      $v0, $v0, $s2
/* 101780 802DE690 00021080 */  sll       $v0, $v0, 2
/* 101784 802DE694 3C03802E */  lui       $v1, %hi(NpcSpriteInstanceCount)
/* 101788 802DE698 00711821 */  addu      $v1, $v1, $s1
/* 10178C 802DE69C 9063F958 */  lbu       $v1, %lo(NpcSpriteInstanceCount)($v1)
/* 101790 802DE6A0 3C10802E */  lui       $s0, %hi(D_802DFA4C)
/* 101794 802DE6A4 02028021 */  addu      $s0, $s0, $v0
/* 101798 802DE6A8 8E10FA4C */  lw        $s0, %lo(D_802DFA4C)($s0)
/* 10179C 802DE6AC 14600008 */  bnez      $v1, .L802DE6D0
/* 1017A0 802DE6B0 00111080 */   sll      $v0, $s1, 2
/* 1017A4 802DE6B4 3C01802E */  lui       $at, %hi(NpcSpriteData)
/* 1017A8 802DE6B8 00220821 */  addu      $at, $at, $v0
/* 1017AC 802DE6BC AC20F5B0 */  sw        $zero, %lo(NpcSpriteData)($at)
/* 1017B0 802DE6C0 3C048035 */  lui       $a0, %hi(heap_spriteHead)
/* 1017B4 802DE6C4 2484F800 */  addiu     $a0, $a0, %lo(heap_spriteHead)
/* 1017B8 802DE6C8 0C00A487 */  jal       _heap_free
/* 1017BC 802DE6CC 0280282D */   daddu    $a1, $s4, $zero
.L802DE6D0:
/* 1017C0 802DE6D0 3C02802E */  lui       $v0, %hi(spr_allocateBtlComponentsOnWorldHeap)
/* 1017C4 802DE6D4 8C42F524 */  lw        $v0, %lo(spr_allocateBtlComponentsOnWorldHeap)($v0)
/* 1017C8 802DE6D8 3C048035 */  lui       $a0, %hi(heap_spriteHead)
/* 1017CC 802DE6DC 2484F800 */  addiu     $a0, $a0, %lo(heap_spriteHead)
/* 1017D0 802DE6E0 10400003 */  beqz      $v0, .L802DE6F0
/* 1017D4 802DE6E4 00000000 */   nop
/* 1017D8 802DE6E8 3C048030 */  lui       $a0, %hi(heap_generalHead)
/* 1017DC 802DE6EC 2484B800 */  addiu     $a0, $a0, %lo(heap_generalHead)
.L802DE6F0:
/* 1017E0 802DE6F0 0C00A487 */  jal       _heap_free
/* 1017E4 802DE6F4 0200282D */   daddu    $a1, $s0, $zero
/* 1017E8 802DE6F8 0000102D */  daddu     $v0, $zero, $zero
/* 1017EC 802DE6FC 3C03802E */  lui       $v1, %hi(SpriteInstances)
/* 1017F0 802DE700 2463FA48 */  addiu     $v1, $v1, %lo(SpriteInstances)
/* 1017F4 802DE704 00122080 */  sll       $a0, $s2, 2
/* 1017F8 802DE708 00922021 */  addu      $a0, $a0, $s2
/* 1017FC 802DE70C 00042080 */  sll       $a0, $a0, 2
/* 101800 802DE710 00832021 */  addu      $a0, $a0, $v1
/* 101804 802DE714 2403FFFF */  addiu     $v1, $zero, -0x1
/* 101808 802DE718 AC800000 */  sw        $zero, 0x0($a0)
/* 10180C 802DE71C AC800004 */  sw        $zero, 0x4($a0)
/* 101810 802DE720 AC800008 */  sw        $zero, 0x8($a0)
/* 101814 802DE724 AC83000C */  sw        $v1, 0xC($a0)
.L802DE728:
/* 101818 802DE728 8FBF0024 */  lw        $ra, 0x24($sp)
/* 10181C 802DE72C 8FB40020 */  lw        $s4, 0x20($sp)
/* 101820 802DE730 8FB3001C */  lw        $s3, 0x1C($sp)
/* 101824 802DE734 8FB20018 */  lw        $s2, 0x18($sp)
/* 101828 802DE738 8FB10014 */  lw        $s1, 0x14($sp)
/* 10182C 802DE73C 8FB00010 */  lw        $s0, 0x10($sp)
/* 101830 802DE740 03E00008 */  jr        $ra
/* 101834 802DE744 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

s32 spr_free_sprite(s32 spriteInstanceID) {
    SpriteInstance* sprite = &SpriteInstances[spriteInstanceID];
    SpriteAnimData* spriteData;
    SpriteComponent** compList;
    s32 spriteIndex = sprite->spriteIndex;

    if (spriteIndex == 0 || spriteIndex >= ARRAY_COUNT(NpcSpriteData)) {
        return spriteInstanceID;
    }

    NpcSpriteInstanceCount[spriteIndex]--;
    spriteData = sprite->spriteData;

    compList = sprite->componentList;
    while (*compList != PTR_LIST_END) {
        SpriteComponent* comp = *compList;
        imgfx_release_instance(comp->imgfxIdx & 0xFF);
        compList++;
    }

    compList = SpriteInstances[spriteInstanceID].componentList;

    if (NpcSpriteInstanceCount[spriteIndex] == 0) {
        NpcSpriteData[spriteIndex] = NULL;
        _heap_free(&heap_spriteHead, spriteData);
    }

    if (spr_allocateBtlComponentsOnWorldHeap) {
        _heap_free(&heap_generalHead, compList);
    } else {
        _heap_free(&heap_spriteHead, compList);
    }

    SpriteInstances[spriteInstanceID].spriteIndex = 0;
    SpriteInstances[spriteInstanceID].componentList = NULL;
    SpriteInstances[spriteInstanceID].spriteData = NULL;
    SpriteInstances[spriteInstanceID].currentAnimID = -1;
    return 0;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel shattering_stones_update
/* 3400BC E002C23C 27BDFFE8 */  addiu     $sp, $sp, -0x18
/* 3400C0 E002C240 AFBF0010 */  sw        $ra, 0x10($sp)
/* 3400C4 E002C244 8C85000C */  lw        $a1, 0xC($a0)
/* 3400C8 E002C248 8CA20024 */  lw        $v0, 0x24($a1)
/* 3400CC E002C24C 1440001A */  bnez      $v0, .LE002C2B8
/* 3400D0 E002C250 00000000 */   nop
/* 3400D4 E002C254 C4A00014 */  lwc1      $f0, 0x14($a1)
/* 3400D8 E002C258 3C01E003 */  lui       $at, (0xE0030000 >> 16)
/* 3400DC E002C25C D422C9D8 */  ldc1      $f2, -0x3628($at)
/* 3400E0 E002C260 C4A6002C */  lwc1      $f6, 0x2C($a1)
/* 3400E4 E002C264 46000021 */  cvt.d.s   $f0, $f0
/* 3400E8 E002C268 46220000 */  add.d     $f0, $f0, $f2
/* 3400EC E002C26C C4A40038 */  lwc1      $f4, 0x38($a1)
/* 3400F0 E002C270 C4A8000C */  lwc1      $f8, 0xC($a1)
/* 3400F4 E002C274 46043180 */  add.s     $f6, $f6, $f4
/* 3400F8 E002C278 C4A20004 */  lwc1      $f2, 0x4($a1)
/* 3400FC E002C27C 46200020 */  cvt.s.d   $f0, $f0
/* 340100 E002C280 46001080 */  add.s     $f2, $f2, $f0
/* 340104 E002C284 C4A4003C */  lwc1      $f4, 0x3C($a1)
/* 340108 E002C288 E4A20004 */  swc1      $f2, 0x4($a1)
/* 34010C E002C28C C4A20030 */  lwc1      $f2, 0x30($a1)
/* 340110 E002C290 C4AA0004 */  lwc1      $f10, 0x4($a1)
/* 340114 E002C294 46041080 */  add.s     $f2, $f2, $f4
/* 340118 E002C298 E4A00014 */  swc1      $f0, 0x14($a1)
/* 34011C E002C29C E4A6002C */  swc1      $f6, 0x2C($a1)
/* 340120 E002C2A0 4608503E */  c.le.s    $f10, $f8
/* 340124 E002C2A4 00000000 */  nop
/* 340128 E002C2A8 45000003 */  bc1f      .LE002C2B8
/* 34012C E002C2AC E4A20030 */   swc1     $f2, 0x30($a1)
/* 340130 E002C2B0 24020001 */  addiu     $v0, $zero, 0x1
/* 340134 E002C2B4 ACA20024 */  sw        $v0, 0x24($a1)
.LE002C2B8:
/* 340138 E002C2B8 8CA30024 */  lw        $v1, 0x24($a1)
/* 34013C E002C2BC 24020001 */  addiu     $v0, $zero, 0x1
/* 340140 E002C2C0 14620040 */  bne       $v1, $v0, .LE002C3C4
/* 340144 E002C2C4 00000000 */   nop
/* 340148 E002C2C8 8CA20020 */  lw        $v0, 0x20($a1)
/* 34014C E002C2CC 2442FFFF */  addiu     $v0, $v0, -0x1
/* 340150 E002C2D0 04410005 */  bgez      $v0, .LE002C2E8
/* 340154 E002C2D4 ACA20020 */   sw       $v0, 0x20($a1)
/* 340158 E002C2D8 0C080128 */  jal       shim_remove_effect
/* 34015C E002C2DC 00000000 */   nop
/* 340160 E002C2E0 0800B0F1 */  j         .LE002C3C4
/* 340164 E002C2E4 00000000 */   nop
.LE002C2E8:
/* 340168 E002C2E8 2842000A */  slti      $v0, $v0, 0xA
/* 34016C E002C2EC 10400009 */  beqz      $v0, .LE002C314
/* 340170 E002C2F0 00000000 */   nop
/* 340174 E002C2F4 3C01E003 */  lui       $at, (0xE0030000 >> 16)
/* 340178 E002C2F8 D422C9E0 */  ldc1      $f2, -0x3620($at)
/* 34017C E002C2FC C4A00028 */  lwc1      $f0, 0x28($a1)
/* 340180 E002C300 46800021 */  cvt.d.w   $f0, $f0
/* 340184 E002C304 46220002 */  mul.d     $f0, $f0, $f2
/* 340188 E002C308 00000000 */  nop
/* 34018C E002C30C 4620038D */  trunc.w.d $f14, $f0
/* 340190 E002C310 E4AE0028 */  swc1      $f14, 0x28($a1)
.LE002C314:
/* 340194 E002C314 8C820008 */  lw        $v0, 0x8($a0)
/* 340198 E002C318 24060001 */  addiu     $a2, $zero, 0x1
/* 34019C E002C31C 00C2102A */  slt       $v0, $a2, $v0
/* 3401A0 E002C320 10400028 */  beqz      $v0, .LE002C3C4
/* 3401A4 E002C324 24A50040 */   addiu    $a1, $a1, 0x40
/* 3401A8 E002C328 24A30034 */  addiu     $v1, $a1, 0x34
/* 3401AC E002C32C 3C01E003 */  lui       $at, (0xE0030000 >> 16)
/* 3401B0 E002C330 D428C9E8 */  ldc1      $f8, -0x3618($at)
/* 3401B4 E002C334 3C01E003 */  lui       $at, (0xE0030000 >> 16)
/* 3401B8 E002C338 D426C9F0 */  ldc1      $f6, -0x3610($at)
/* 3401BC E002C33C 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 3401C0 E002C340 44816000 */  mtc1      $at, $f12
/* 3401C4 E002C344 3C0141A0 */  lui       $at, (0x41A00000 >> 16)
/* 3401C8 E002C348 44815000 */  mtc1      $at, $f10
.LE002C34C:
/* 3401CC E002C34C C462FFDC */  lwc1      $f2, -0x24($v1)
/* 3401D0 E002C350 460010A1 */  cvt.d.s   $f2, $f2
/* 3401D4 E002C354 46261082 */  mul.d     $f2, $f2, $f6
/* 3401D8 E002C358 00000000 */  nop
/* 3401DC E002C35C C460FFE0 */  lwc1      $f0, -0x20($v1)
/* 3401E0 E002C360 46000021 */  cvt.d.s   $f0, $f0
/* 3401E4 E002C364 46280000 */  add.d     $f0, $f0, $f8
/* 3401E8 E002C368 46200020 */  cvt.s.d   $f0, $f0
/* 3401EC E002C36C E460FFE0 */  swc1      $f0, -0x20($v1)
/* 3401F0 E002C370 462010A0 */  cvt.s.d   $f2, $f2
/* 3401F4 E002C374 E462FFDC */  swc1      $f2, -0x24($v1)
/* 3401F8 E002C378 C4A00000 */  lwc1      $f0, 0x0($a1)
/* 3401FC E002C37C 46020000 */  add.s     $f0, $f0, $f2
/* 340200 E002C380 E4A00000 */  swc1      $f0, 0x0($a1)
/* 340204 E002C384 C464FFD0 */  lwc1      $f4, -0x30($v1)
/* 340208 E002C388 C460FFE0 */  lwc1      $f0, -0x20($v1)
/* 34020C E002C38C 46002100 */  add.s     $f4, $f4, $f0
/* 340210 E002C390 C462FFF8 */  lwc1      $f2, -0x8($v1)
/* 340214 E002C394 24C60001 */  addiu     $a2, $a2, 0x1
/* 340218 E002C398 460C1080 */  add.s     $f2, $f2, $f12
/* 34021C E002C39C C4600000 */  lwc1      $f0, 0x0($v1)
/* 340220 E002C3A0 24A50040 */  addiu     $a1, $a1, 0x40
/* 340224 E002C3A4 460A0000 */  add.s     $f0, $f0, $f10
/* 340228 E002C3A8 E464FFD0 */  swc1      $f4, -0x30($v1)
/* 34022C E002C3AC E462FFF8 */  swc1      $f2, -0x8($v1)
/* 340230 E002C3B0 E4600000 */  swc1      $f0, 0x0($v1)
/* 340234 E002C3B4 8C820008 */  lw        $v0, 0x8($a0)
/* 340238 E002C3B8 00C2102A */  slt       $v0, $a2, $v0
/* 34023C E002C3BC 1440FFE3 */  bnez      $v0, .LE002C34C
/* 340240 E002C3C0 24630040 */   addiu    $v1, $v1, 0x40
.LE002C3C4:
/* 340244 E002C3C4 8FBF0010 */  lw        $ra, 0x10($sp)
/* 340248 E002C3C8 03E00008 */  jr        $ra
/* 34024C E002C3CC 27BD0018 */   addiu    $sp, $sp, 0x18

### DECOMPILED C INSTRUCTIONS:

void shattering_stones_update(EffectInstance* effect) {
    ShatteringStonesFXData* part = effect->data.shatteringStones;
    s32 i;

    if (part->unk_24 == 0) {
        part->unk_14 += -0.1;
        part->unk_04 += part->unk_14;
        part->unk_2C += part->unk_38;
        part->unk_30 += part->unk_3C;
        if (part->unk_04 <= part->unk_0C) {
            part->unk_24 = 1;
        }
    }

    if (part->unk_24 == 1) {
        part->unk_20--;
        if (part->unk_20 < 0) {
            shim_remove_effect(effect);
            return;
        }

        if (part->unk_20 < 10) {
            part->unk_28 *= 0.8;
        }

        part++;
        for (i = 1; i < effect->numParts; i++, part++) {
            part->unk_14 += -0.2;
            part->unk_10 *= 0.9;
            part->unk_00 += part->unk_10;
            part->unk_04 += part->unk_14;
            part->unk_2C += 10.0f;
            part->unk_34 += 20.0f;
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel crash_screen_draw_glyph
/* 7454 8002C054 3C026666 */  lui       $v0, (0x66666667 >> 16)
/* 7458 8002C058 34426667 */  ori       $v0, $v0, (0x66666667 & 0xFFFF)
/* 745C 8002C05C 00C20018 */  mult      $a2, $v0
/* 7460 8002C060 0080382D */  daddu     $a3, $a0, $zero
/* 7464 8002C064 000617C3 */  sra       $v0, $a2, 31
/* 7468 8002C068 3C048007 */  lui       $a0, %hi(gCrashScreenFont)
/* 746C 8002C06C 24847290 */  addiu     $a0, $a0, %lo(gCrashScreenFont)
/* 7470 8002C070 00007010 */  mfhi      $t6
/* 7474 8002C074 000E1843 */  sra       $v1, $t6, 1
/* 7478 8002C078 00621823 */  subu      $v1, $v1, $v0
/* 747C 8002C07C 000310C0 */  sll       $v0, $v1, 3
/* 7480 8002C080 00431023 */  subu      $v0, $v0, $v1
/* 7484 8002C084 00021080 */  sll       $v0, $v0, 2
/* 7488 8002C088 00445021 */  addu      $t2, $v0, $a0
/* 748C 8002C08C 00031080 */  sll       $v0, $v1, 2
/* 7490 8002C090 00431021 */  addu      $v0, $v0, $v1
/* 7494 8002C094 00C23023 */  subu      $a2, $a2, $v0
/* 7498 8002C098 00061040 */  sll       $v0, $a2, 1
/* 749C 8002C09C 00461021 */  addu      $v0, $v0, $a2
/* 74A0 8002C0A0 00026040 */  sll       $t4, $v0, 1
/* 74A4 8002C0A4 3C04800A */  lui       $a0, %hi(gCrashScreen)
/* 74A8 8002C0A8 2484BB30 */  addiu     $a0, $a0, %lo(gCrashScreen)
/* 74AC 8002C0AC 948309D0 */  lhu       $v1, 0x9D0($a0)
/* 74B0 8002C0B0 24020140 */  addiu     $v0, $zero, 0x140
/* 74B4 8002C0B4 14620024 */  bne       $v1, $v0, .L8002C148
/* 74B8 8002C0B8 24020280 */   addiu    $v0, $zero, 0x280
/* 74BC 8002C0BC 0060102D */  daddu     $v0, $v1, $zero
/* 74C0 8002C0C0 00450018 */  mult      $v0, $a1
/* 74C4 8002C0C4 0000482D */  daddu     $t1, $zero, $zero
/* 74C8 8002C0C8 3C0D8000 */  lui       $t5, (0x80000000 >> 16)
/* 74CC 8002C0CC 0080582D */  daddu     $t3, $a0, $zero
/* 74D0 8002C0D0 8D6209CC */  lw        $v0, 0x9CC($t3)
/* 74D4 8002C0D4 00007012 */  mflo      $t6
/* 74D8 8002C0D8 000E1840 */  sll       $v1, $t6, 1
/* 74DC 8002C0DC 00431021 */  addu      $v0, $v0, $v1
/* 74E0 8002C0E0 00071840 */  sll       $v1, $a3, 1
/* 74E4 8002C0E4 00432821 */  addu      $a1, $v0, $v1
/* 74E8 8002C0E8 018D2006 */  srlv      $a0, $t5, $t4
.L8002C0EC:
/* 74EC 8002C0EC 8D480000 */  lw        $t0, 0x0($t2)
/* 74F0 8002C0F0 254A0004 */  addiu     $t2, $t2, 0x4
/* 74F4 8002C0F4 24060005 */  addiu     $a2, $zero, 0x5
.L8002C0F8:
/* 74F8 8002C0F8 00A0382D */  daddu     $a3, $a1, $zero
/* 74FC 8002C0FC 24A50002 */  addiu     $a1, $a1, 0x2
/* 7500 8002C100 00881024 */  and       $v0, $a0, $t0
/* 7504 8002C104 10400002 */  beqz      $v0, .L8002C110
/* 7508 8002C108 24030001 */   addiu    $v1, $zero, 0x1
/* 750C 8002C10C 3403FFFF */  ori       $v1, $zero, 0xFFFF
.L8002C110:
/* 7510 8002C110 A4E30000 */  sh        $v1, 0x0($a3)
/* 7514 8002C114 24C6FFFF */  addiu     $a2, $a2, -0x1
/* 7518 8002C118 04C1FFF7 */  bgez      $a2, .L8002C0F8
/* 751C 8002C11C 00042042 */   srl      $a0, $a0, 1
/* 7520 8002C120 956209D0 */  lhu       $v0, 0x9D0($t3)
/* 7524 8002C124 25290001 */  addiu     $t1, $t1, 0x1
/* 7528 8002C128 00021040 */  sll       $v0, $v0, 1
/* 752C 8002C12C 2442FFF4 */  addiu     $v0, $v0, -0xC
/* 7530 8002C130 00A22821 */  addu      $a1, $a1, $v0
/* 7534 8002C134 29220007 */  slti      $v0, $t1, 0x7
/* 7538 8002C138 1440FFEC */  bnez      $v0, .L8002C0EC
/* 753C 8002C13C 018D2006 */   srlv     $a0, $t5, $t4
.L8002C140:
/* 7540 8002C140 03E00008 */  jr        $ra
/* 7544 8002C144 00000000 */   nop
.L8002C148:
/* 7548 8002C148 1462FFFD */  bne       $v1, $v0, .L8002C140
/* 754C 8002C14C 0000482D */   daddu    $t1, $zero, $zero
/* 7550 8002C150 3C0B8000 */  lui       $t3, (0x80000000 >> 16)
/* 7554 8002C154 00051080 */  sll       $v0, $a1, 2
/* 7558 8002C158 00451021 */  addu      $v0, $v0, $a1
/* 755C 8002C15C 8C8309CC */  lw        $v1, 0x9CC($a0)
/* 7560 8002C160 00021240 */  sll       $v0, $v0, 9
/* 7564 8002C164 00621821 */  addu      $v1, $v1, $v0
/* 7568 8002C168 00071080 */  sll       $v0, $a3, 2
/* 756C 8002C16C 00621821 */  addu      $v1, $v1, $v0
.L8002C170:
/* 7570 8002C170 018B3806 */  srlv      $a3, $t3, $t4
/* 7574 8002C174 8D480000 */  lw        $t0, 0x0($t2)
/* 7578 8002C178 254A0004 */  addiu     $t2, $t2, 0x4
/* 757C 8002C17C 0000302D */  daddu     $a2, $zero, $zero
/* 7580 8002C180 24650502 */  addiu     $a1, $v1, 0x502
.L8002C184:
/* 7584 8002C184 00E81024 */  and       $v0, $a3, $t0
/* 7588 8002C188 10400002 */  beqz      $v0, .L8002C194
/* 758C 8002C18C 24040001 */   addiu    $a0, $zero, 0x1
/* 7590 8002C190 3404FFFF */  ori       $a0, $zero, 0xFFFF
.L8002C194:
/* 7594 8002C194 A4640000 */  sh        $a0, 0x0($v1)
/* 7598 8002C198 A4A4FB00 */  sh        $a0, -0x500($a1)
/* 759C 8002C19C A4A4FFFE */  sh        $a0, -0x2($a1)
/* 75A0 8002C1A0 A4A40000 */  sh        $a0, 0x0($a1)
/* 75A4 8002C1A4 24A50004 */  addiu     $a1, $a1, 0x4
/* 75A8 8002C1A8 24630004 */  addiu     $v1, $v1, 0x4
/* 75AC 8002C1AC 24C60001 */  addiu     $a2, $a2, 0x1
/* 75B0 8002C1B0 28C20006 */  slti      $v0, $a2, 0x6
/* 75B4 8002C1B4 1440FFF3 */  bnez      $v0, .L8002C184
/* 75B8 8002C1B8 00073842 */   srl      $a3, $a3, 1
/* 75BC 8002C1BC 25290001 */  addiu     $t1, $t1, 0x1
/* 75C0 8002C1C0 29220007 */  slti      $v0, $t1, 0x7
/* 75C4 8002C1C4 1440FFEA */  bnez      $v0, .L8002C170
/* 75C8 8002C1C8 246309E8 */   addiu    $v1, $v1, 0x9E8
/* 75CC 8002C1CC 03E00008 */  jr        $ra
/* 75D0 8002C1D0 00000000 */   nop

### DECOMPILED C INSTRUCTIONS:

void crash_screen_draw_glyph(s32 x, s32 y, s32 glyph) {
    s32 shift = ((glyph % 5) * 6);
    u16 width = gCrashScreen.width;
    const u32* data = &gCrashScreenFont[glyph / 5 * 7];
    s32 i;
    s32 j;

    if (width == SCREEN_WIDTH) {
        u16* ptr = gCrashScreen.frameBuf + (gCrashScreen.width) * y + x;

        for (i = 0; i < 7; i++) {
            u32 bit = 0x80000000U >> shift;
            u32 rowMask = *data++;

            for (j = 0; j < 6; j++) {
                *ptr++ = (bit & rowMask) ? 0xFFFF : 1;
                bit >>= 1;
            }

            ptr += gCrashScreen.width - 6;
        }
    } else if (width == (SCREEN_WIDTH * 2)) {
        u16* ptr = gCrashScreen.frameBuf + (y * 0x500) + (x * 2);

        for (i = 0; i < 7; i++) {
            u32 bit = 0x80000000U >> shift;
            u32 rowMask = *data++;

            for (j = 0; j < 6; j++) {
                u16 temp = (bit & rowMask) ? 0xFFFF : 1;

                ptr[0] = temp;
                ptr[1] = temp;
                ptr[(SCREEN_WIDTH * 2)] = temp;
                ptr[(SCREEN_WIDTH * 2) + 1] = temp;
                ptr += 2;
                bit >>= 1;
            }

            ptr += (0x9E8 / 2);
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_802A2684_7AA024
/* 417414 802A2684 3C03802B */  lui       $v1, %hi(D_802AD4A8)
/* 417418 802A2688 2463D4A8 */  addiu     $v1, $v1, %lo(D_802AD4A8)
/* 41741C 802A268C 3C05802B */  lui       $a1, %hi(BattleMenu_Moves_OptionCount)
/* 417420 802A2690 24A5D4A4 */  addiu     $a1, $a1, %lo(BattleMenu_Moves_OptionCount)
/* 417424 802A2694 8C620000 */  lw        $v0, 0x0($v1)
/* 417428 802A2698 8CA70000 */  lw        $a3, 0x0($a1)
/* 41742C 802A269C 0047102A */  slt       $v0, $v0, $a3
/* 417430 802A26A0 14400002 */  bnez      $v0, .L802A26AC_7AA04C
/* 417434 802A26A4 24E2FFFF */   addiu    $v0, $a3, -0x1
D_802A26A8_7AA048:
/* 417438 802A26A8 AC620000 */  sw        $v0, 0x0($v1)
.L802A26AC_7AA04C:
/* 41743C 802A26AC 3C01802B */  lui       $at, %hi(battle_menu_moveState)
D_802A26B0_7AA050:
/* 417440 802A26B0 A020D108 */  sb        $zero, %lo(battle_menu_moveState)($at)
/* 417444 802A26B4 90640003 */  lbu       $a0, 0x3($v1)
/* 417448 802A26B8 3C03802B */  lui       $v1, %hi(battle_menu_moveScrollLine)
D_802A26BC_7AA05C:
/* 41744C 802A26BC 2463D10C */  addiu     $v1, $v1, %lo(battle_menu_moveScrollLine)
/* 417450 802A26C0 A0600000 */  sb        $zero, 0x0($v1)
/* 417454 802A26C4 3C01802B */  lui       $at, %hi(battle_menu_moveCursorPos)
/* 417458 802A26C8 A024D109 */  sb        $a0, %lo(battle_menu_moveCursorPos)($at)
/* 41745C 802A26CC 3C01802B */  lui       $at, %hi(D_802AD10A)
D_802A26D0_7AA070:
/* 417460 802A26D0 A024D10A */  sb        $a0, %lo(D_802AD10A)($at)
/* 417464 802A26D4 90A60003 */  lbu       $a2, 0x3($a1)
/* 417468 802A26D8 3C09802B */  lui       $t1, %hi(D_802AD10E)
/* 41746C 802A26DC 2529D10E */  addiu     $t1, $t1, %lo(D_802AD10E)
D_802A26E0_7AA080:
/* 417470 802A26E0 00061600 */  sll       $v0, $a2, 24
/* 417474 802A26E4 00021603 */  sra       $v0, $v0, 24
/* 417478 802A26E8 28420007 */  slti      $v0, $v0, 0x7
/* 41747C 802A26EC 14400003 */  bnez      $v0, .L802A26FC_7AA09C
/* 417480 802A26F0 A1260000 */   sb       $a2, 0x0($t1)
/* 417484 802A26F4 24020006 */  addiu     $v0, $zero, 0x6
/* 417488 802A26F8 A1220000 */  sb        $v0, 0x0($t1)
.L802A26FC_7AA09C:
/* 41748C 802A26FC 3C08802B */  lui       $t0, %hi(D_802AD10D)
/* 417490 802A2700 2508D10D */  addiu     $t0, $t0, %lo(D_802AD10D)
/* 417494 802A2704 24020006 */  addiu     $v0, $zero, 0x6
/* 417498 802A2708 A1020000 */  sb        $v0, 0x0($t0)
/* 41749C 802A270C 28E20006 */  slti      $v0, $a3, 0x6
/* 4174A0 802A2710 54400001 */  bnel      $v0, $zero, .L802A2718_7AA0B8
/* 4174A4 802A2714 A1060000 */   sb       $a2, 0x0($t0)
.L802A2718_7AA0B8:
/* 4174A8 802A2718 240200FF */  addiu     $v0, $zero, 0xFF
/* 4174AC 802A271C 3C01802B */  lui       $at, %hi(BattleMenu_Moves_TextAlpha)
D_802A2720_7AA0C0:
/* 4174B0 802A2720 A422D116 */  sh        $v0, %lo(BattleMenu_Moves_TextAlpha)($at)
/* 4174B4 802A2724 24020001 */  addiu     $v0, $zero, 0x1
/* 4174B8 802A2728 3C01802B */  lui       $at, %hi(D_802AD10F)
/* 4174BC 802A272C A022D10F */  sb        $v0, %lo(D_802AD10F)($at)
D_802A2730_7AA0D0:
/* 4174C0 802A2730 00041600 */  sll       $v0, $a0, 24
D_802A2734_7AA0D4:
/* 4174C4 802A2734 00022E03 */  sra       $a1, $v0, 24
/* 4174C8 802A2738 04A20001 */  bltzl     $a1, .L802A2740_7AA0E0
/* 4174CC 802A273C A0640000 */   sb       $a0, 0x0($v1)
.L802A2740_7AA0E0:
/* 4174D0 802A2740 81020000 */  lb        $v0, 0x0($t0)
/* 4174D4 802A2744 00A2102A */  slt       $v0, $a1, $v0
/* 4174D8 802A2748 14400005 */  bnez      $v0, .L802A2760_7AA100
/* 4174DC 802A274C 00000000 */   nop
/* 4174E0 802A2750 91220000 */  lbu       $v0, 0x0($t1)
/* 4174E4 802A2754 2442FFFF */  addiu     $v0, $v0, -0x1
/* 4174E8 802A2758 00821023 */  subu      $v0, $a0, $v0
/* 4174EC 802A275C A0620000 */  sb        $v0, 0x0($v1)
.L802A2760_7AA100:
/* 4174F0 802A2760 90630000 */  lbu       $v1, 0x0($v1)
/* 4174F4 802A2764 24620006 */  addiu     $v0, $v1, 0x6
/* 4174F8 802A2768 A1020000 */  sb        $v0, 0x0($t0)
/* 4174FC 802A276C 00021600 */  sll       $v0, $v0, 24
/* 417500 802A2770 00021603 */  sra       $v0, $v0, 24
/* 417504 802A2774 00E2102A */  slt       $v0, $a3, $v0
/* 417508 802A2778 54400001 */  bnel      $v0, $zero, .L802A2780_7AA120
/* 41750C 802A277C A1060000 */   sb       $a2, 0x0($t0)
.L802A2780_7AA120:
/* 417510 802A2780 00031E00 */  sll       $v1, $v1, 24
/* 417514 802A2784 00031E03 */  sra       $v1, $v1, 24
/* 417518 802A2788 00032023 */  negu      $a0, $v1
/* 41751C 802A278C 00041040 */  sll       $v0, $a0, 1
/* 417520 802A2790 00441021 */  addu      $v0, $v0, $a0
/* 417524 802A2794 00021080 */  sll       $v0, $v0, 2
/* 417528 802A2798 00441021 */  addu      $v0, $v0, $a0
/* 41752C 802A279C 00A31823 */  subu      $v1, $a1, $v1
/* 417530 802A27A0 3C01802B */  lui       $at, %hi(battle_menu_moveScrollOffset)
/* 417534 802A27A4 A422D110 */  sh        $v0, %lo(battle_menu_moveScrollOffset)($at)
D_802A27A8_7AA148:
/* 417538 802A27A8 00031040 */  sll       $v0, $v1, 1
/* 41753C 802A27AC 00431021 */  addu      $v0, $v0, $v1
D_802A27B0_7AA150:
/* 417540 802A27B0 00021080 */  sll       $v0, $v0, 2
/* 417544 802A27B4 00431021 */  addu      $v0, $v0, $v1
/* 417548 802A27B8 3C01802B */  lui       $at, %hi(D_802AD112)
/* 41754C 802A27BC A422D112 */  sh        $v0, %lo(D_802AD112)($at)
/* 417550 802A27C0 3C01802B */  lui       $at, %hi(battle_menu_moveOptionActive)
/* 417554 802A27C4 AC20D600 */  sw        $zero, %lo(battle_menu_moveOptionActive)($at)
/* 417558 802A27C8 03E00008 */  jr        $ra
/* 41755C 802A27CC 00000000 */   nop

### DECOMPILED C INSTRUCTIONS:

void func_802A2684(void) {
    if (D_802AD4A8 >= BattleMenu_Moves_OptionCount) {
        D_802AD4A8 = BattleMenu_Moves_OptionCount - 1;
    }

    battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_0;
    battle_menu_moveScrollLine = 0;
    battle_menu_moveCursorPos = D_802AD4A8;
    D_802AD10A = D_802AD4A8;
    D_802AD10E = BattleMenu_Moves_OptionCount;

    if (D_802AD10E > 6) {
        D_802AD10E = 6;
    }

    D_802AD10D = 6;
    if (BattleMenu_Moves_OptionCount < 6) {
        D_802AD10D = BattleMenu_Moves_OptionCount;
    }

    BattleMenu_Moves_TextAlpha = 255;
    D_802AD10F = 1;

    if (D_802AD10A < 0) {
        battle_menu_moveScrollLine = D_802AD10A;
    }
    if (D_802AD10A >= D_802AD10D) {
        battle_menu_moveScrollLine = D_802AD10A + 1 - D_802AD10E;
    }

    D_802AD10D = battle_menu_moveScrollLine + 6;
    if (D_802AD10D > BattleMenu_Moves_OptionCount) {
        D_802AD10D = BattleMenu_Moves_OptionCount;
    }

    battle_menu_moveScrollOffset = -battle_menu_moveScrollLine * 13;
    D_802AD112 = (D_802AD10A - battle_menu_moveScrollLine) * 13;
    battle_menu_moveOptionActive = 0;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel msg_get_print_char_width
/* BC384 80125C84 288200F0 */  slti      $v0, $a0, 0xF0
/* BC388 80125C88 44871000 */  mtc1      $a3, $f2
/* BC38C 80125C8C 8FA70010 */  lw        $a3, 0x10($sp)
/* BC390 80125C90 93A30017 */  lbu       $v1, 0x17($sp)
/* BC394 80125C94 14400004 */  bnez      $v0, .L80125CA8
/* BC398 80125C98 2482FF09 */   addiu    $v0, $a0, -0xF7
/* BC39C 80125C9C 2C420003 */  sltiu     $v0, $v0, 0x3
/* BC3A0 80125CA0 10400036 */  beqz      $v0, .L80125D7C
/* BC3A4 80125CA4 0000102D */   daddu    $v0, $zero, $zero
.L80125CA8:
/* BC3A8 80125CA8 10E00005 */  beqz      $a3, .L80125CC0
/* BC3AC 80125CAC 240200F7 */   addiu    $v0, $zero, 0xF7
/* BC3B0 80125CB0 44870000 */  mtc1      $a3, $f0
/* BC3B4 80125CB4 00000000 */  nop
/* BC3B8 80125CB8 08049754 */  j         .L80125D50
/* BC3BC 80125CBC 46800020 */   cvt.s.w  $f0, $f0
.L80125CC0:
/* BC3C0 80125CC0 10600015 */  beqz      $v1, .L80125D18
/* BC3C4 80125CC4 00051880 */   sll      $v1, $a1, 2
/* BC3C8 80125CC8 00061040 */  sll       $v0, $a2, 1
/* BC3CC 80125CCC 3C01802F */  lui       $at, %hi(gMsgCharsets)
/* BC3D0 80125CD0 00230821 */  addu      $at, $at, $v1
/* BC3D4 80125CD4 8C23B5A8 */  lw        $v1, %lo(gMsgCharsets)($at)
/* BC3D8 80125CD8 00461021 */  addu      $v0, $v0, $a2
/* BC3DC 80125CDC 8C630008 */  lw        $v1, 0x8($v1)
/* BC3E0 80125CE0 00021080 */  sll       $v0, $v0, 2
/* BC3E4 80125CE4 00431021 */  addu      $v0, $v0, $v1
/* BC3E8 80125CE8 8C430004 */  lw        $v1, 0x4($v0)
/* BC3EC 80125CEC 1060000A */  beqz      $v1, .L80125D18
/* BC3F0 80125CF0 240200F7 */   addiu    $v0, $zero, 0xF7
/* BC3F4 80125CF4 10820008 */  beq       $a0, $v0, .L80125D18
/* BC3F8 80125CF8 240200F8 */   addiu    $v0, $zero, 0xF8
/* BC3FC 80125CFC 10820006 */  beq       $a0, $v0, .L80125D18
/* BC400 80125D00 240200F9 */   addiu    $v0, $zero, 0xF9
/* BC404 80125D04 10820004 */  beq       $a0, $v0, .L80125D18
/* BC408 80125D08 00641021 */   addu     $v0, $v1, $a0
/* BC40C 80125D0C 90420000 */  lbu       $v0, 0x0($v0)
/* BC410 80125D10 08049750 */  j         .L80125D40
/* BC414 80125D14 00000000 */   nop
.L80125D18:
/* BC418 80125D18 00051880 */  sll       $v1, $a1, 2
/* BC41C 80125D1C 00061040 */  sll       $v0, $a2, 1
/* BC420 80125D20 3C01802F */  lui       $at, %hi(gMsgCharsets)
/* BC424 80125D24 00230821 */  addu      $at, $at, $v1
/* BC428 80125D28 8C23B5A8 */  lw        $v1, %lo(gMsgCharsets)($at)
/* BC42C 80125D2C 00461021 */  addu      $v0, $v0, $a2
/* BC430 80125D30 8C630008 */  lw        $v1, 0x8($v1)
/* BC434 80125D34 00021080 */  sll       $v0, $v0, 2
/* BC438 80125D38 00431021 */  addu      $v0, $v0, $v1
/* BC43C 80125D3C 90420008 */  lbu       $v0, 0x8($v0)
.L80125D40:
/* BC440 80125D40 44820000 */  mtc1      $v0, $f0
/* BC444 80125D44 00000000 */  nop
/* BC448 80125D48 46800020 */  cvt.s.w   $f0, $f0
/* BC44C 80125D4C 240200F7 */  addiu     $v0, $zero, 0xF7
.L80125D50:
/* BC450 80125D50 1482000C */  bne       $a0, $v0, .L80125D84
/* BC454 80125D54 240200F8 */   addiu    $v0, $zero, 0xF8
/* BC458 80125D58 46020002 */  mul.s     $f0, $f0, $f2
/* BC45C 80125D5C 00000000 */  nop
/* BC460 80125D60 3C018015 */  lui       $at, %hi(D_80150578)
/* BC464 80125D64 D4220578 */  ldc1      $f2, %lo(D_80150578)($at)
/* BC468 80125D68 46000021 */  cvt.d.s   $f0, $f0
.L80125D6C:
/* BC46C 80125D6C 46220002 */  mul.d     $f0, $f0, $f2
/* BC470 80125D70 00000000 */  nop
/* BC474 80125D74 4620010D */  trunc.w.d $f4, $f0
/* BC478 80125D78 44022000 */  mfc1      $v0, $f4
.L80125D7C:
/* BC47C 80125D7C 03E00008 */  jr        $ra
/* BC480 80125D80 00000000 */   nop
.L80125D84:
/* BC484 80125D84 14820008 */  bne       $a0, $v0, .L80125DA8
/* BC488 80125D88 240200F9 */   addiu    $v0, $zero, 0xF9
/* BC48C 80125D8C 46020002 */  mul.s     $f0, $f0, $f2
/* BC490 80125D90 00000000 */  nop
/* BC494 80125D94 46000021 */  cvt.d.s   $f0, $f0
/* BC498 80125D98 4620010D */  trunc.w.d $f4, $f0
/* BC49C 80125D9C 44022000 */  mfc1      $v0, $f4
/* BC4A0 80125DA0 03E00008 */  jr        $ra
/* BC4A4 80125DA4 00000000 */   nop
.L80125DA8:
/* BC4A8 80125DA8 14820008 */  bne       $a0, $v0, .L80125DCC
/* BC4AC 80125DAC 288200F0 */   slti     $v0, $a0, 0xF0
/* BC4B0 80125DB0 46020002 */  mul.s     $f0, $f0, $f2
/* BC4B4 80125DB4 00000000 */  nop
/* BC4B8 80125DB8 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* BC4BC 80125DBC 44811800 */  mtc1      $at, $f3
/* BC4C0 80125DC0 44801000 */  mtc1      $zero, $f2
/* BC4C4 80125DC4 0804975B */  j         .L80125D6C
/* BC4C8 80125DC8 46000021 */   cvt.d.s  $f0, $f0
.L80125DCC:
/* BC4CC 80125DCC 10400007 */  beqz      $v0, .L80125DEC
/* BC4D0 80125DD0 00000000 */   nop
/* BC4D4 80125DD4 46020002 */  mul.s     $f0, $f0, $f2
/* BC4D8 80125DD8 00000000 */  nop
/* BC4DC 80125DDC 4600010D */  trunc.w.s $f4, $f0
/* BC4E0 80125DE0 44022000 */  mfc1      $v0, $f4
/* BC4E4 80125DE4 03E00008 */  jr        $ra
/* BC4E8 80125DE8 00000000 */   nop
.L80125DEC:
/* BC4EC 80125DEC 03E00008 */  jr        $ra
/* BC4F0 80125DF0 0000102D */   daddu    $v0, $zero, $zero

### DECOMPILED C INSTRUCTIONS:

s32 msg_get_print_char_width(s32 character, s32 charset, s32 variation, f32 msgScale, s32 overrideCharWidth, u8 flags) {
    f32 charWidth;

    if (character >= MSG_CONTROL_CHAR
            && (character != MSG_CHAR_READ_SPACE
            && character != MSG_CHAR_READ_FULL_SPACE
            && character != MSG_CHAR_READ_HALF_SPACE)) {
        return 0;
    }

#if VERSION_IQUE
    if (character >= 0x5F && character<=0x8F) {
        charWidth = 16.0;
        return charWidth * msgScale;
    }
#endif

    if (overrideCharWidth != 0) {
        charWidth = overrideCharWidth;
    } else if (flags != 0) {
        u8* charWidthTable = gMsgCharsets[charset]->rasters[variation].charWidthTable;

        if (charWidthTable != NULL
                && character != MSG_CHAR_READ_SPACE
                && character != MSG_CHAR_READ_FULL_SPACE
                && character != MSG_CHAR_READ_HALF_SPACE) {
            charWidth = charWidthTable[character];
        } else {
            charWidth = gMsgCharsets[charset]->rasters[variation].monospaceWidth;
        }
    } else {
        charWidth = gMsgCharsets[charset]->rasters[variation].monospaceWidth;
    }

    if (character == MSG_CHAR_READ_SPACE) {
        return charWidth * msgScale * 0.6;
    }
    if (character == MSG_CHAR_READ_FULL_SPACE) {
        f64 retWidth = charWidth * msgScale;
        return retWidth;
    }
    if (character == MSG_CHAR_READ_HALF_SPACE) {
        return charWidth * msgScale * 0.5;
    }
    if (character >= MSG_CONTROL_CHAR) {
        return 0;
    }
    return charWidth * msgScale;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel PlayerLandJump
/* 1A23E4 80273B04 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* 1A23E8 80273B08 AFB00018 */  sw        $s0, 0x18($sp)
/* 1A23EC 80273B0C 3C10800E */  lui       $s0, %hi(gBattleStatus + 0xD8)
/* 1A23F0 80273B10 8E10C148 */  lw        $s0, %lo(gBattleStatus + 0xD8)($s0)
/* 1A23F4 80273B14 AFBF0020 */  sw        $ra, 0x20($sp)
/* 1A23F8 80273B18 AFB1001C */  sw        $s1, 0x1C($sp)
/* 1A23FC 80273B1C 10A00002 */  beqz      $a1, .L80273B28
/* 1A2400 80273B20 2611000C */   addiu    $s1, $s0, 0xC
/* 1A2404 80273B24 AC800070 */  sw        $zero, 0x70($a0)
.L80273B28:
/* 1A2408 80273B28 8C820070 */  lw        $v0, 0x70($a0)
/* 1A240C 80273B2C 14400008 */  bnez      $v0, .L80273B50
/* 1A2410 80273B30 24020001 */   addiu    $v0, $zero, 0x1
/* 1A2414 80273B34 C6000144 */  lwc1      $f0, 0x144($s0)
/* 1A2418 80273B38 C6020148 */  lwc1      $f2, 0x148($s0)
/* 1A241C 80273B3C C604014C */  lwc1      $f4, 0x14C($s0)
/* 1A2420 80273B40 E600000C */  swc1      $f0, 0xC($s0)
/* 1A2424 80273B44 E6020010 */  swc1      $f2, 0x10($s0)
/* 1A2428 80273B48 E6040014 */  swc1      $f4, 0x14($s0)
/* 1A242C 80273B4C AC820070 */  sw        $v0, 0x70($a0)
.L80273B50:
/* 1A2430 80273B50 C6020050 */  lwc1      $f2, 0x50($s0)
/* 1A2434 80273B54 44800000 */  mtc1      $zero, $f0
/* 1A2438 80273B58 00000000 */  nop
/* 1A243C 80273B5C 4602003C */  c.lt.s    $f0, $f2
/* 1A2440 80273B60 00000000 */  nop
/* 1A2444 80273B64 45000006 */  bc1f      .L80273B80
/* 1A2448 80273B68 00000000 */   nop
/* 1A244C 80273B6C 8E060064 */  lw        $a2, 0x64($s0)
/* 1A2450 80273B70 10C00003 */  beqz      $a2, .L80273B80
/* 1A2454 80273B74 0000202D */   daddu    $a0, $zero, $zero
/* 1A2458 80273B78 0C098F3F */  jal       set_animation
/* 1A245C 80273B7C 0080282D */   daddu    $a1, $a0, $zero
.L80273B80:
/* 1A2460 80273B80 C6220044 */  lwc1      $f2, 0x44($s1)
/* 1A2464 80273B84 44800000 */  mtc1      $zero, $f0
/* 1A2468 80273B88 00000000 */  nop
/* 1A246C 80273B8C 4600103C */  c.lt.s    $f2, $f0
/* 1A2470 80273B90 00000000 */  nop
/* 1A2474 80273B94 45000006 */  bc1f      .L80273BB0
/* 1A2478 80273B98 00000000 */   nop
/* 1A247C 80273B9C 8E26005C */  lw        $a2, 0x5C($s1)
/* 1A2480 80273BA0 10C00003 */  beqz      $a2, .L80273BB0
/* 1A2484 80273BA4 0000202D */   daddu    $a0, $zero, $zero
/* 1A2488 80273BA8 0C098F3F */  jal       set_animation
/* 1A248C 80273BAC 0080282D */   daddu    $a1, $a0, $zero
.L80273BB0:
/* 1A2490 80273BB0 C6240004 */  lwc1      $f4, 0x4($s1)
/* 1A2494 80273BB4 C6200044 */  lwc1      $f0, 0x44($s1)
/* 1A2498 80273BB8 8E250040 */  lw        $a1, 0x40($s1)
/* 1A249C 80273BBC 46002100 */  add.s     $f4, $f4, $f0
/* 1A24A0 80273BC0 C622003C */  lwc1      $f2, 0x3C($s1)
/* 1A24A4 80273BC4 8E260048 */  lw        $a2, 0x48($s1)
/* 1A24A8 80273BC8 46020001 */  sub.s     $f0, $f0, $f2
/* 1A24AC 80273BCC 0220202D */  daddu     $a0, $s1, $zero
/* 1A24B0 80273BD0 E6240004 */  swc1      $f4, 0x4($s1)
/* 1A24B4 80273BD4 0C09904A */  jal       add_xz_vec3f
/* 1A24B8 80273BD8 E6200044 */   swc1     $f0, 0x44($s1)
/* 1A24BC 80273BDC C6200000 */  lwc1      $f0, 0x0($s1)
/* 1A24C0 80273BE0 44802000 */  mtc1      $zero, $f4
/* 1A24C4 80273BE4 E6000144 */  swc1      $f0, 0x144($s0)
/* 1A24C8 80273BE8 C6200004 */  lwc1      $f0, 0x4($s1)
/* 1A24CC 80273BEC E6000148 */  swc1      $f0, 0x148($s0)
/* 1A24D0 80273BF0 46000086 */  mov.s     $f2, $f0
/* 1A24D4 80273BF4 C6200008 */  lwc1      $f0, 0x8($s1)
/* 1A24D8 80273BF8 4604103C */  c.lt.s    $f2, $f4
/* 1A24DC 80273BFC 00000000 */  nop
/* 1A24E0 80273C00 45010003 */  bc1t      .L80273C10
/* 1A24E4 80273C04 E600014C */   swc1     $f0, 0x14C($s0)
/* 1A24E8 80273C08 0809CF14 */  j         .L80273C50
/* 1A24EC 80273C0C 0000102D */   daddu    $v0, $zero, $zero
.L80273C10:
/* 1A24F0 80273C10 C600018C */  lwc1      $f0, 0x18C($s0)
/* 1A24F4 80273C14 E6040148 */  swc1      $f4, 0x148($s0)
/* 1A24F8 80273C18 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A24FC 80273C1C 8E050144 */  lw        $a1, 0x144($s0)
/* 1A2500 80273C20 8E060148 */  lw        $a2, 0x148($s0)
/* 1A2504 80273C24 8E07014C */  lw        $a3, 0x14C($s0)
/* 1A2508 80273C28 0C0990BC */  jal       play_movement_dust_effects
/* 1A250C 80273C2C 24040002 */   addiu    $a0, $zero, 0x2
/* 1A2510 80273C30 C600014C */  lwc1      $f0, 0x14C($s0)
/* 1A2514 80273C34 24040148 */  addiu     $a0, $zero, 0x148
/* 1A2518 80273C38 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A251C 80273C3C 8E060144 */  lw        $a2, 0x144($s0)
/* 1A2520 80273C40 8E070148 */  lw        $a3, 0x148($s0)
/* 1A2524 80273C44 0C052757 */  jal       sfx_play_sound_at_position
/* 1A2528 80273C48 0000282D */   daddu    $a1, $zero, $zero
/* 1A252C 80273C4C 24020001 */  addiu     $v0, $zero, 0x1
.L80273C50:
/* 1A2530 80273C50 8FBF0020 */  lw        $ra, 0x20($sp)
/* 1A2534 80273C54 8FB1001C */  lw        $s1, 0x1C($sp)
/* 1A2538 80273C58 8FB00018 */  lw        $s0, 0x18($sp)
/* 1A253C 80273C5C 03E00008 */  jr        $ra
/* 1A2540 80273C60 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

ApiStatus PlayerLandJump(Evt* script, s32 isInitialCall) {
    Actor* player = gBattleStatus.playerActor;
    ActorState* walkMovement = &player->state;

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

    if (script->functionTemp[0] == 0) {
        walkMovement->currentPos.x = player->currentPos.x;
        walkMovement->currentPos.y = player->currentPos.y;
        walkMovement->currentPos.z = player->currentPos.z;
        script->functionTemp[0] = 1;
    }

    if (walkMovement->velocity > 0.0f) {
        if (walkMovement->animJumpRise != 0) {
            set_animation(0, 0, walkMovement->animJumpRise);
        }
    }

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

    walkMovement->currentPos.y += walkMovement->velocity;
    walkMovement->velocity -= walkMovement->acceleration;

    add_xz_vec3f(&walkMovement->currentPos, walkMovement->speed, walkMovement->angle);

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

    if (player->currentPos.y < 0.0f) {
        player->currentPos.y = 0.0f;

        play_movement_dust_effects(2, player->currentPos.x, player->currentPos.y, player->currentPos.z, player->yaw);
        sfx_play_sound_at_position(SOUND_SOFT_LAND, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z);

        return ApiStatus_DONE1;
    }

    return ApiStatus_BLOCK;
}


### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_8025DBD0
/* 18C4B0 8025DBD0 27BDFFD0 */  addiu     $sp, $sp, -0x30
/* 18C4B4 8025DBD4 AFB1001C */  sw        $s1, 0x1C($sp)
/* 18C4B8 8025DBD8 0080882D */  daddu     $s1, $a0, $zero
/* 18C4BC 8025DBDC AFBF0028 */  sw        $ra, 0x28($sp)
/* 18C4C0 8025DBE0 AFB30024 */  sw        $s3, 0x24($sp)
/* 18C4C4 8025DBE4 AFB20020 */  sw        $s2, 0x20($sp)
/* 18C4C8 8025DBE8 AFB00018 */  sw        $s0, 0x18($sp)
/* 18C4CC 8025DBEC 8E3000C0 */  lw        $s0, 0xC0($s1)
/* 18C4D0 8025DBF0 00A0982D */  daddu     $s3, $a1, $zero
/* 18C4D4 8025DBF4 02139021 */  addu      $s2, $s0, $s3
/* 18C4D8 8025DBF8 824308BC */  lb        $v1, 0x8BC($s2)
/* 18C4DC 8025DBFC 10600005 */  beqz      $v1, .L8025DC14
/* 18C4E0 8025DC00 24020001 */   addiu    $v0, $zero, 0x1
/* 18C4E4 8025DC04 1062001B */  beq       $v1, $v0, .L8025DC74
/* 18C4E8 8025DC08 00131080 */   sll      $v0, $s3, 2
/* 18C4EC 8025DC0C 08097749 */  j         .L8025DD24
/* 18C4F0 8025DC10 00000000 */   nop
.L8025DC14:
/* 18C4F4 8025DC14 00131080 */  sll       $v0, $s3, 2
/* 18C4F8 8025DC18 244208B0 */  addiu     $v0, $v0, 0x8B0
/* 18C4FC 8025DC1C 3C013F99 */  lui       $at, (0x3F99999A >> 16)
/* 18C500 8025DC20 3421999A */  ori       $at, $at, (0x3F99999A & 0xFFFF)
/* 18C504 8025DC24 44810000 */  mtc1      $at, $f0
/* 18C508 8025DC28 02021021 */  addu      $v0, $s0, $v0
/* 18C50C 8025DC2C AFA20014 */  sw        $v0, 0x14($sp)
/* 18C510 8025DC30 E7A00010 */  swc1      $f0, 0x10($sp)
/* 18C514 8025DC34 8E250058 */  lw        $a1, 0x58($s1)
/* 18C518 8025DC38 8E26005C */  lw        $a2, 0x5C($s1)
/* 18C51C 8025DC3C 8E270060 */  lw        $a3, 0x60($s1)
/* 18C520 8025DC40 0C01C3AC */  jal       fx_aura
/* 18C524 8025DC44 24040002 */   addiu    $a0, $zero, 0x2
/* 18C528 8025DC48 24020001 */  addiu     $v0, $zero, 0x1
/* 18C52C 8025DC4C A24208BC */  sb        $v0, 0x8BC($s2)
/* 18C530 8025DC50 00131100 */  sll       $v0, $s3, 4
/* 18C534 8025DC54 02021021 */  addu      $v0, $s0, $v0
/* 18C538 8025DC58 24030096 */  addiu     $v1, $zero, 0x96
/* 18C53C 8025DC5C A44308C6 */  sh        $v1, 0x8C6($v0)
/* 18C540 8025DC60 A44308C8 */  sh        $v1, 0x8C8($v0)
/* 18C544 8025DC64 240300FF */  addiu     $v1, $zero, 0xFF
/* 18C548 8025DC68 A44308CA */  sh        $v1, 0x8CA($v0)
/* 18C54C 8025DC6C A44008CC */  sh        $zero, 0x8CC($v0)
/* 18C550 8025DC70 00131080 */  sll       $v0, $s3, 2
.L8025DC74:
/* 18C554 8025DC74 02021021 */  addu      $v0, $s0, $v0
/* 18C558 8025DC78 8C4508B0 */  lw        $a1, 0x8B0($v0)
/* 18C55C 8025DC7C C6200058 */  lwc1      $f0, 0x58($s1)
/* 18C560 8025DC80 8CA3000C */  lw        $v1, 0xC($a1)
/* 18C564 8025DC84 00132100 */  sll       $a0, $s3, 4
/* 18C568 8025DC88 E4600004 */  swc1      $f0, 0x4($v1)
/* 18C56C 8025DC8C C620005C */  lwc1      $f0, 0x5C($s1)
/* 18C570 8025DC90 02042021 */  addu      $a0, $s0, $a0
/* 18C574 8025DC94 E4600008 */  swc1      $f0, 0x8($v1)
/* 18C578 8025DC98 848208CC */  lh        $v0, 0x8CC($a0)
/* 18C57C 8025DC9C C6200060 */  lwc1      $f0, 0x60($s1)
/* 18C580 8025DCA0 44821000 */  mtc1      $v0, $f2
/* 18C584 8025DCA4 00000000 */  nop
/* 18C588 8025DCA8 468010A0 */  cvt.s.w   $f2, $f2
/* 18C58C 8025DCAC 46020000 */  add.s     $f0, $f0, $f2
/* 18C590 8025DCB0 E460000C */  swc1      $f0, 0xC($v1)
/* 18C594 8025DCB4 848208C6 */  lh        $v0, 0x8C6($a0)
/* 18C598 8025DCB8 3C0142C8 */  lui       $at, (0x42C80000 >> 16)
/* 18C59C 8025DCBC 44810000 */  mtc1      $at, $f0
/* 18C5A0 8025DCC0 44822000 */  mtc1      $v0, $f4
/* 18C5A4 8025DCC4 00000000 */  nop
/* 18C5A8 8025DCC8 46802120 */  cvt.s.w   $f4, $f4
/* 18C5AC 8025DCCC 8CA2000C */  lw        $v0, 0xC($a1)
/* 18C5B0 8025DCD0 46002103 */  div.s     $f4, $f4, $f0
/* 18C5B4 8025DCD4 E444001C */  swc1      $f4, 0x1C($v0)
/* 18C5B8 8025DCD8 848208C8 */  lh        $v0, 0x8C8($a0)
/* 18C5BC 8025DCDC 3C01802A */  lui       $at, %hi(D_8029D4E8)
/* 18C5C0 8025DCE0 D422D4E8 */  ldc1      $f2, %lo(D_8029D4E8)($at)
/* 18C5C4 8025DCE4 44822000 */  mtc1      $v0, $f4
/* 18C5C8 8025DCE8 00000000 */  nop
/* 18C5CC 8025DCEC 46802120 */  cvt.s.w   $f4, $f4
/* 18C5D0 8025DCF0 46002103 */  div.s     $f4, $f4, $f0
/* 18C5D4 8025DCF4 46002021 */  cvt.d.s   $f0, $f4
/* 18C5D8 8025DCF8 46220002 */  mul.d     $f0, $f0, $f2
/* 18C5DC 8025DCFC 00000000 */  nop
/* 18C5E0 8025DD00 8CA2000C */  lw        $v0, 0xC($a1)
/* 18C5E4 8025DD04 46200020 */  cvt.s.d   $f0, $f0
/* 18C5E8 8025DD08 E4400020 */  swc1      $f0, 0x20($v0)
/* 18C5EC 8025DD0C 8CA3000C */  lw        $v1, 0xC($a1)
/* 18C5F0 8025DD10 848208CA */  lh        $v0, 0x8CA($a0)
/* 18C5F4 8025DD14 AC620028 */  sw        $v0, 0x28($v1)
/* 18C5F8 8025DD18 8CA2000C */  lw        $v0, 0xC($a1)
/* 18C5FC 8025DD1C C6200064 */  lwc1      $f0, 0x64($s1)
/* 18C600 8025DD20 E4400064 */  swc1      $f0, 0x64($v0)
.L8025DD24:
/* 18C604 8025DD24 8FBF0028 */  lw        $ra, 0x28($sp)
/* 18C608 8025DD28 8FB30024 */  lw        $s3, 0x24($sp)
/* 18C60C 8025DD2C 8FB20020 */  lw        $s2, 0x20($sp)
/* 18C610 8025DD30 8FB1001C */  lw        $s1, 0x1C($sp)
/* 18C614 8025DD34 8FB00018 */  lw        $s0, 0x18($sp)
/* 18C618 8025DD38 03E00008 */  jr        $ra
/* 18C61C 8025DD3C 27BD0030 */   addiu    $sp, $sp, 0x30

### DECOMPILED C INSTRUCTIONS:

void func_8025DBD0(ActorPart* part, s32 decorationIndex) {
    DecorationTable* decor = part->decorationTable;
    EffectInstance* effect;
    AuraFXData* data;
    f32 scale;

    switch (decor->state[decorationIndex]) {
        case 0:
            fx_aura(2, part->currentPos.x, part->currentPos.y, part->currentPos.z, 1.2f, &decor->effect[decorationIndex]);
            decor->state[decorationIndex] = 1;
            decor->unk_8C6[decorationIndex].unk00 = 150;
            decor->unk_8C6[decorationIndex].unk02 = 150;
            decor->unk_8C6[decorationIndex].unk04 = 255;
            decor->unk_8C6[decorationIndex].unk06 = 0;
            // fallthrough
        case 1:
            effect = decor->effect[decorationIndex];
            data = effect->data.aura;
            data->posA.x = part->currentPos.x;
            data->posA.y = part->currentPos.y;
            data->posA.z = part->currentPos.z + decor->unk_8C6[decorationIndex].unk06;

            scale = decor->unk_8C6[decorationIndex].unk00;
            scale /= 100.0f;
            effect->data.aura->scale.x = scale;
            scale = decor->unk_8C6[decorationIndex].unk02;
            scale /= 100.0f;
            effect->data.aura->scale.y = scale * (0.8 - 1e-16); // epsilon?
            effect->data.aura->primA = decor->unk_8C6[decorationIndex].unk04;
            effect->data.aura->renderYaw = part->yaw;
            break;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel smoke_burst_main
/* 35B9D0 E004E000 27BDFFA8 */  addiu     $sp, $sp, -0x58
/* 35B9D4 E004E004 F7B40040 */  sdc1      $f20, 0x40($sp)
/* 35B9D8 E004E008 4485A000 */  mtc1      $a1, $f20
/* 35B9DC E004E00C F7B60048 */  sdc1      $f22, 0x48($sp)
/* 35B9E0 E004E010 4486B000 */  mtc1      $a2, $f22
/* 35B9E4 E004E014 AFB20030 */  sw        $s2, 0x30($sp)
/* 35B9E8 E004E018 0080902D */  daddu     $s2, $a0, $zero
/* 35B9EC E004E01C F7B80050 */  sdc1      $f24, 0x50($sp)
/* 35B9F0 E004E020 4487C000 */  mtc1      $a3, $f24
/* 35B9F4 E004E024 27A40010 */  addiu     $a0, $sp, 0x10
/* 35B9F8 E004E028 AFB30034 */  sw        $s3, 0x34($sp)
/* 35B9FC E004E02C 8FB3006C */  lw        $s3, 0x6C($sp)
/* 35BA00 E004E030 3C02E005 */  lui       $v0, %hi(smoke_burst_init)
/* 35BA04 E004E034 2442E15C */  addiu     $v0, $v0, %lo(smoke_burst_init)
/* 35BA08 E004E038 AFA20018 */  sw        $v0, 0x18($sp)
/* 35BA0C E004E03C 3C02E005 */  lui       $v0, %hi(smoke_burst_update)
/* 35BA10 E004E040 2442E164 */  addiu     $v0, $v0, %lo(smoke_burst_update)
/* 35BA14 E004E044 AFA2001C */  sw        $v0, 0x1C($sp)
/* 35BA18 E004E048 3C02E005 */  lui       $v0, %hi(smoke_burst_render)
/* 35BA1C E004E04C 2442E1D0 */  addiu     $v0, $v0, %lo(smoke_burst_render)
/* 35BA20 E004E050 AFA20020 */  sw        $v0, 0x20($sp)
/* 35BA24 E004E054 24020027 */  addiu     $v0, $zero, 0x27
/* 35BA28 E004E058 AFBF0038 */  sw        $ra, 0x38($sp)
/* 35BA2C E004E05C AFB1002C */  sw        $s1, 0x2C($sp)
/* 35BA30 E004E060 AFB00028 */  sw        $s0, 0x28($sp)
/* 35BA34 E004E064 AFA00010 */  sw        $zero, 0x10($sp)
/* 35BA38 E004E068 AFA00024 */  sw        $zero, 0x24($sp)
/* 35BA3C E004E06C 0C080124 */  jal       shim_create_effect_instance
/* 35BA40 E004E070 AFA20014 */   sw       $v0, 0x14($sp)
/* 35BA44 E004E074 24040028 */  addiu     $a0, $zero, 0x28
/* 35BA48 E004E078 24110001 */  addiu     $s1, $zero, 0x1
/* 35BA4C E004E07C 0040802D */  daddu     $s0, $v0, $zero
/* 35BA50 E004E080 0C08012C */  jal       shim_general_heap_malloc
/* 35BA54 E004E084 AE110008 */   sw       $s1, 0x8($s0)
/* 35BA58 E004E088 AE02000C */  sw        $v0, 0xC($s0)
/* 35BA5C E004E08C 0040802D */  daddu     $s0, $v0, $zero
/* 35BA60 E004E090 16000003 */  bnez      $s0, .LE004E0A0
/* 35BA64 E004E094 0200202D */   daddu    $a0, $s0, $zero
.LE004E098:
/* 35BA68 E004E098 08013826 */  j         .LE004E098
/* 35BA6C E004E09C 00000000 */   nop
.LE004E0A0:
/* 35BA70 E004E0A0 00112880 */  sll       $a1, $s1, 2
/* 35BA74 E004E0A4 00B12821 */  addu      $a1, $a1, $s1
/* 35BA78 E004E0A8 0C080130 */  jal       shim_mem_clear
/* 35BA7C E004E0AC 000528C0 */   sll      $a1, $a1, 3
/* 35BA80 E004E0B0 AE130014 */  sw        $s3, 0x14($s0)
/* 35BA84 E004E0B4 AE000018 */  sw        $zero, 0x18($s0)
/* 35BA88 E004E0B8 AE13001C */  sw        $s3, 0x1C($s0)
/* 35BA8C E004E0BC AE000020 */  sw        $zero, 0x20($s0)
/* 35BA90 E004E0C0 A6120000 */  sh        $s2, 0x0($s0)
/* 35BA94 E004E0C4 E6140004 */  swc1      $f20, 0x4($s0)
/* 35BA98 E004E0C8 E6160008 */  swc1      $f22, 0x8($s0)
/* 35BA9C E004E0CC E618000C */  swc1      $f24, 0xC($s0)
/* 35BAA0 E004E0D0 C7A00068 */  lwc1      $f0, 0x68($sp)
/* 35BAA4 E004E0D4 12400006 */  beqz      $s2, .LE004E0F0
/* 35BAA8 E004E0D8 E6000010 */   swc1     $f0, 0x10($s0)
/* 35BAAC E004E0DC 24020001 */  addiu     $v0, $zero, 0x1
/* 35BAB0 E004E0E0 12420008 */  beq       $s2, $v0, .LE004E104
/* 35BAB4 E004E0E4 240200E1 */   addiu    $v0, $zero, 0xE1
/* 35BAB8 E004E0E8 08013847 */  j         .LE004E11C
/* 35BABC E004E0EC A2020024 */   sb       $v0, 0x24($s0)
.LE004E0F0:
/* 35BAC0 E004E0F0 24020082 */  addiu     $v0, $zero, 0x82
/* 35BAC4 E004E0F4 A2000026 */  sb        $zero, 0x26($s0)
/* 35BAC8 E004E0F8 A2000025 */  sb        $zero, 0x25($s0)
/* 35BACC E004E0FC 0801384C */  j         .LE004E130
/* 35BAD0 E004E100 A2000024 */   sb       $zero, 0x24($s0)
.LE004E104:
/* 35BAD4 E004E104 240200FF */  addiu     $v0, $zero, 0xFF
/* 35BAD8 E004E108 A2020024 */  sb        $v0, 0x24($s0)
/* 35BADC E004E10C 24020082 */  addiu     $v0, $zero, 0x82
/* 35BAE0 E004E110 A2000026 */  sb        $zero, 0x26($s0)
/* 35BAE4 E004E114 0801384C */  j         .LE004E130
/* 35BAE8 E004E118 A2000025 */   sb       $zero, 0x25($s0)
.LE004E11C:
/* 35BAEC E004E11C 240200D7 */  addiu     $v0, $zero, 0xD7
/* 35BAF0 E004E120 A2020025 */  sb        $v0, 0x25($s0)
/* 35BAF4 E004E124 240200FF */  addiu     $v0, $zero, 0xFF
/* 35BAF8 E004E128 A2020026 */  sb        $v0, 0x26($s0)
/* 35BAFC E004E12C 240200B4 */  addiu     $v0, $zero, 0xB4
.LE004E130:
/* 35BB00 E004E130 A2020027 */  sb        $v0, 0x27($s0)
/* 35BB04 E004E134 8FBF0038 */  lw        $ra, 0x38($sp)
/* 35BB08 E004E138 8FB30034 */  lw        $s3, 0x34($sp)
/* 35BB0C E004E13C 8FB20030 */  lw        $s2, 0x30($sp)
/* 35BB10 E004E140 8FB1002C */  lw        $s1, 0x2C($sp)
/* 35BB14 E004E144 8FB00028 */  lw        $s0, 0x28($sp)
/* 35BB18 E004E148 D7B80050 */  ldc1      $f24, 0x50($sp)
/* 35BB1C E004E14C D7B60048 */  ldc1      $f22, 0x48($sp)
/* 35BB20 E004E150 D7B40040 */  ldc1      $f20, 0x40($sp)
/* 35BB24 E004E154 03E00008 */  jr        $ra
/* 35BB28 E004E158 27BD0058 */   addiu    $sp, $sp, 0x58

### DECOMPILED C INSTRUCTIONS:

void smoke_burst_main(s32 arg0, f32 posX, f32 posY, f32 posZ, f32 arg4, s32 timeLeft) {
    EffectBlueprint effectBp;
    EffectInstance* effect;
    SmokeBurstFXData* data;
    s32 numParts = 1;

    effectBp.init = smoke_burst_init;
    effectBp.update = smoke_burst_update;
    effectBp.renderWorld = smoke_burst_render;
    effectBp.unk_00 = 0;
    effectBp.renderUI = NULL;
    effectBp.effectID = EFFECT_SMOKE_BURST;

    effect = shim_create_effect_instance(&effectBp);
    effect->numParts = numParts;

    data = effect->data.smokeBurst = shim_general_heap_malloc(numParts * sizeof(*data));
    ASSERT(data != NULL);

    shim_mem_clear(data, numParts * sizeof(*data));
    data->timeLeft = timeLeft;
    data->lifeTime = 0;
    data->unk_1C = timeLeft;
    data->unk_20 = 0;
    data->unk_00 = arg0;
    data->pos.x = posX;
    data->pos.y = posY;
    data->pos.z = posZ;
    data->unk_10 = arg4;

    switch (arg0) {
        case 0:
            data->rgba.b = 0;
            data->rgba.g = 0;
            data->rgba.r = 0;
            data->rgba.a = 130;
            break;
        case 1:
            data->rgba.r = 255;
            data->rgba.b = 0;
            data->rgba.g = 0;
            data->rgba.a = 130;
            break;
        default:
            data->rgba.r = 225;
            data->rgba.g = 215;
            data->rgba.b = 255;
            data->rgba.a = 180;
            break;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel entity_shattering_block_init
/* 104730 802E2EB0 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* 104734 802E2EB4 AFB1001C */  sw        $s1, 0x1C($sp)
/* 104738 802E2EB8 0080882D */  daddu     $s1, $a0, $zero
/* 10473C 802E2EBC AFBF0024 */  sw        $ra, 0x24($sp)
/* 104740 802E2EC0 AFB20020 */  sw        $s2, 0x20($sp)
/* 104744 802E2EC4 AFB00018 */  sw        $s0, 0x18($sp)
/* 104748 802E2EC8 8E220040 */  lw        $v0, 0x40($s1)
/* 10474C 802E2ECC C620004C */  lwc1      $f0, 0x4C($s1)
/* 104750 802E2ED0 0000802D */  daddu     $s0, $zero, $zero
/* 104754 802E2ED4 E4400038 */  swc1      $f0, 0x38($v0)
/* 104758 802E2ED8 92240004 */  lbu       $a0, 0x4($s1)
/* 10475C 802E2EDC 0C0441A9 */  jal       get_entity_type
/* 104760 802E2EE0 0200902D */   daddu    $s2, $s0, $zero
/* 104764 802E2EE4 0040182D */  daddu     $v1, $v0, $zero
/* 104768 802E2EE8 2462FFE8 */  addiu     $v0, $v1, -0x18
/* 10476C 802E2EEC 2C420003 */  sltiu     $v0, $v0, 0x3
/* 104770 802E2EF0 10400007 */  beqz      $v0, .L802E2F10
/* 104774 802E2EF4 2463FFF3 */   addiu    $v1, $v1, -0xD
/* 104778 802E2EF8 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 10477C 802E2EFC 44810000 */  mtc1      $at, $f0
/* 104780 802E2F00 00000000 */  nop
/* 104784 802E2F04 E6200054 */  swc1      $f0, 0x54($s1)
/* 104788 802E2F08 E6200058 */  swc1      $f0, 0x58($s1)
/* 10478C 802E2F0C E620005C */  swc1      $f0, 0x5C($s1)
.L802E2F10:
/* 104790 802E2F10 2C62000E */  sltiu     $v0, $v1, 0xE
/* 104794 802E2F14 10400023 */  beqz      $v0, .L802E2FA4
/* 104798 802E2F18 00031080 */   sll      $v0, $v1, 2
/* 10479C 802E2F1C 3C01802F */  lui       $at, %hi(jtbl_802EB160)
/* 1047A0 802E2F20 00220821 */  addu      $at, $at, $v0
/* 1047A4 802E2F24 8C22B160 */  lw        $v0, %lo(jtbl_802EB160)($at)
/* 1047A8 802E2F28 00400008 */  jr        $v0
/* 1047AC 802E2F2C 00000000 */   nop
glabel .L802E2F30
/* 1047B0 802E2F30 3C120A00 */  lui       $s2, %hi(D_0A0031E0_E94A70)
/* 1047B4 802E2F34 265231E0 */  addiu     $s2, $s2, %lo(D_0A0031E0_E94A70)
/* 1047B8 802E2F38 3C100A00 */  lui       $s0, %hi(D_0A001508_E9EB58)
/* 1047BC 802E2F3C 26101508 */  addiu     $s0, $s0, %lo(D_0A001508_E9EB58)
/* 1047C0 802E2F40 080B8BE9 */  j         .L802E2FA4
/* 1047C4 802E2F44 00000000 */   nop
glabel .L802E2F48
/* 1047C8 802E2F48 3C120A00 */  lui       $s2, %hi(D_0A0031B0_E94A40)
/* 1047CC 802E2F4C 265231B0 */  addiu     $s2, $s2, %lo(D_0A0031B0_E94A40)
/* 1047D0 802E2F50 3C100A00 */  lui       $s0, %hi(D_0A0014D8_E9EB28)
/* 1047D4 802E2F54 261014D8 */  addiu     $s0, $s0, %lo(D_0A0014D8_E9EB28)
/* 1047D8 802E2F58 080B8BE9 */  j         .L802E2FA4
/* 1047DC 802E2F5C 00000000 */   nop
glabel .L802E2F60
/* 1047E0 802E2F60 3C120A00 */  lui       $s2, %hi(D_0A002F78_E94808)
/* 1047E4 802E2F64 26522F78 */  addiu     $s2, $s2, %lo(D_0A002F78_E94808)
/* 1047E8 802E2F68 3C100A00 */  lui       $s0, %hi(D_0A001218_E9E868)
/* 1047EC 802E2F6C 26101218 */  addiu     $s0, $s0, %lo(D_0A001218_E9E868)
/* 1047F0 802E2F70 080B8BE9 */  j         .L802E2FA4
/* 1047F4 802E2F74 00000000 */   nop
glabel .L802E2F78
/* 1047F8 802E2F78 24040158 */  addiu     $a0, $zero, 0x158
/* 1047FC 802E2F7C C6200050 */  lwc1      $f0, 0x50($s1)
/* 104800 802E2F80 3C120A00 */  lui       $s2, %hi(D_0A003F70_E95800)
/* 104804 802E2F84 26523F70 */  addiu     $s2, $s2, %lo(D_0A003F70_E95800)
/* 104808 802E2F88 E7A00010 */  swc1      $f0, 0x10($sp)
/* 10480C 802E2F8C 8E260048 */  lw        $a2, 0x48($s1)
/* 104810 802E2F90 8E27004C */  lw        $a3, 0x4C($s1)
/* 104814 802E2F94 3C100A00 */  lui       $s0, %hi(D_0A002318_E93BA8)
/* 104818 802E2F98 26102318 */  addiu     $s0, $s0, %lo(D_0A002318_E93BA8)
/* 10481C 802E2F9C 0C052757 */  jal       sfx_play_sound_at_position
/* 104820 802E2FA0 0000282D */   daddu    $a1, $zero, $zero
glabel .L802E2FA4
/* 104824 802E2FA4 12000004 */  beqz      $s0, .L802E2FB8
/* 104828 802E2FA8 0220202D */   daddu    $a0, $s1, $zero
/* 10482C 802E2FAC 0240282D */  daddu     $a1, $s2, $zero
/* 104830 802E2FB0 0C0B891B */  jal       entity_shattering_init_pieces
/* 104834 802E2FB4 0200302D */   daddu    $a2, $s0, $zero
.L802E2FB8:
/* 104838 802E2FB8 8FBF0024 */  lw        $ra, 0x24($sp)
/* 10483C 802E2FBC 8FB20020 */  lw        $s2, 0x20($sp)
/* 104840 802E2FC0 8FB1001C */  lw        $s1, 0x1C($sp)
/* 104844 802E2FC4 8FB00018 */  lw        $s0, 0x18($sp)
/* 104848 802E2FC8 03E00008 */  jr        $ra
/* 10484C 802E2FCC 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

void entity_shattering_block_init(Entity* entity) {
    u32 type;
    Mtx* fragmentMatrices = NULL;
    Gfx** fragmentDisplayLists = NULL;

    entity->dataBuf.shatteringBlock->originalPosY = entity->position.y;
    type = get_entity_type(entity->listIndex);

    if (type == ENTITY_TYPE_HAMMER1_BLOCK_TINY ||
        type == ENTITY_TYPE_HAMMER2_BLOCK_TINY ||
        type == ENTITY_TYPE_HAMMER3_BLOCK_TINY)
    {
        entity->scale.x = 0.5f;
        entity->scale.y = 0.5f;
        entity->scale.z = 0.5f;
    }

    switch (type) {
        case ENTITY_TYPE_HAMMER1_BLOCK:
        case ENTITY_TYPE_HAMMER1_BLOCK_TINY:
            fragmentDisplayLists = Entity_ShatteringHammer1Block_FragmentsRender;
            fragmentMatrices = Entity_ShatteringHammer1Block_FragmentsMatrices;
            break;
        case ENTITY_TYPE_HAMMER2_BLOCK:
        case ENTITY_TYPE_HAMMER2_BLOCK_TINY:
            fragmentDisplayLists = Entity_ShatteringHammer2Block_FragmentsRender;
            fragmentMatrices = Entity_ShatteringHammer2Block_FragmentsMatrices;
            break;
        case ENTITY_TYPE_HAMMER3_BLOCK:
        case ENTITY_TYPE_HAMMER3_BLOCK_TINY:
            fragmentDisplayLists = Entity_ShatteringHammer3Block_FragmentsRender;
            fragmentMatrices = Entity_ShatteringHammer3Block_FragmentsMatrices;
            break;
        case ENTITY_TYPE_BRICK_BLOCK:
            sfx_play_sound_at_position(SOUND_158, SOUND_SPACE_MODE_0, entity->position.x, entity->position.y, entity->position.z);
            fragmentDisplayLists = Entity_ShatteringBrickBlock_FragmentsRender;
            fragmentMatrices = Entity_ShatteringBrickBlock_FragmentsMatrices;
            break;
        case ENTITY_TYPE_MULTI_COIN_BRICK:
        case ENTITY_TYPE_YELLOW_BLOCK:
        case ENTITY_TYPE_SINGLE_TRIGGER_BLOCK:
        case ENTITY_TYPE_HIDDEN_YELLOW_BLOCK:
        case ENTITY_TYPE_HIDDEN_RED_BLOCK:
        case ENTITY_TYPE_INACTIVE_BLOCK:
            break;
    }

    if (fragmentMatrices == NULL) {
        return;
    }

    entity_shattering_init_pieces(entity, fragmentDisplayLists, fragmentMatrices);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel msg_get_draw_char_width
/* BC4F4 80125DF4 288200F0 */  slti      $v0, $a0, 0xF0
/* BC4F8 80125DF8 44871000 */  mtc1      $a3, $f2
/* BC4FC 80125DFC 8FA70010 */  lw        $a3, 0x10($sp)
/* BC500 80125E00 97A30016 */  lhu       $v1, 0x16($sp)
/* BC504 80125E04 14400004 */  bnez      $v0, .L80125E18
/* BC508 80125E08 2482FF0B */   addiu    $v0, $a0, -0xF5
/* BC50C 80125E0C 2C420003 */  sltiu     $v0, $v0, 0x3
/* BC510 80125E10 10400037 */  beqz      $v0, .L80125EF0
/* BC514 80125E14 0000102D */   daddu    $v0, $zero, $zero
.L80125E18:
/* BC518 80125E18 10E00005 */  beqz      $a3, .L80125E30
/* BC51C 80125E1C 240200F5 */   addiu    $v0, $zero, 0xF5
/* BC520 80125E20 44870000 */  mtc1      $a3, $f0
/* BC524 80125E24 00000000 */  nop
/* BC528 80125E28 080497B1 */  j         .L80125EC4
/* BC52C 80125E2C 46800020 */   cvt.s.w  $f0, $f0
.L80125E30:
/* BC530 80125E30 30620100 */  andi      $v0, $v1, 0x100
/* BC534 80125E34 10400015 */  beqz      $v0, .L80125E8C
/* BC538 80125E38 00051880 */   sll      $v1, $a1, 2
/* BC53C 80125E3C 00061040 */  sll       $v0, $a2, 1
/* BC540 80125E40 3C01802F */  lui       $at, %hi(gMsgCharsets)
/* BC544 80125E44 00230821 */  addu      $at, $at, $v1
/* BC548 80125E48 8C23B5A8 */  lw        $v1, %lo(gMsgCharsets)($at)
/* BC54C 80125E4C 00461021 */  addu      $v0, $v0, $a2
/* BC550 80125E50 8C630008 */  lw        $v1, 0x8($v1)
/* BC554 80125E54 00021080 */  sll       $v0, $v0, 2
/* BC558 80125E58 00431021 */  addu      $v0, $v0, $v1
/* BC55C 80125E5C 8C430004 */  lw        $v1, 0x4($v0)
/* BC560 80125E60 1060000A */  beqz      $v1, .L80125E8C
/* BC564 80125E64 240200F5 */   addiu    $v0, $zero, 0xF5
/* BC568 80125E68 10820008 */  beq       $a0, $v0, .L80125E8C
/* BC56C 80125E6C 240200F6 */   addiu    $v0, $zero, 0xF6
/* BC570 80125E70 10820006 */  beq       $a0, $v0, .L80125E8C
/* BC574 80125E74 240200F7 */   addiu    $v0, $zero, 0xF7
/* BC578 80125E78 10820004 */  beq       $a0, $v0, .L80125E8C
/* BC57C 80125E7C 00641021 */   addu     $v0, $v1, $a0
/* BC580 80125E80 90420000 */  lbu       $v0, 0x0($v0)
/* BC584 80125E84 080497AD */  j         .L80125EB4
/* BC588 80125E88 00000000 */   nop
.L80125E8C:
/* BC58C 80125E8C 00051880 */  sll       $v1, $a1, 2
/* BC590 80125E90 00061040 */  sll       $v0, $a2, 1
/* BC594 80125E94 3C01802F */  lui       $at, %hi(gMsgCharsets)
/* BC598 80125E98 00230821 */  addu      $at, $at, $v1
/* BC59C 80125E9C 8C23B5A8 */  lw        $v1, %lo(gMsgCharsets)($at)
/* BC5A0 80125EA0 00461021 */  addu      $v0, $v0, $a2
/* BC5A4 80125EA4 8C630008 */  lw        $v1, 0x8($v1)
/* BC5A8 80125EA8 00021080 */  sll       $v0, $v0, 2
/* BC5AC 80125EAC 00431021 */  addu      $v0, $v0, $v1
/* BC5B0 80125EB0 90420008 */  lbu       $v0, 0x8($v0)
.L80125EB4:
/* BC5B4 80125EB4 44820000 */  mtc1      $v0, $f0
/* BC5B8 80125EB8 00000000 */  nop
/* BC5BC 80125EBC 46800020 */  cvt.s.w   $f0, $f0
/* BC5C0 80125EC0 240200F5 */  addiu     $v0, $zero, 0xF5
.L80125EC4:
/* BC5C4 80125EC4 1482000C */  bne       $a0, $v0, .L80125EF8
/* BC5C8 80125EC8 240200F6 */   addiu    $v0, $zero, 0xF6
/* BC5CC 80125ECC 46020002 */  mul.s     $f0, $f0, $f2
/* BC5D0 80125ED0 00000000 */  nop
/* BC5D4 80125ED4 3C018015 */  lui       $at, %hi(D_80150580)
/* BC5D8 80125ED8 D4220580 */  ldc1      $f2, %lo(D_80150580)($at)
/* BC5DC 80125EDC 46000021 */  cvt.d.s   $f0, $f0
.L80125EE0:
/* BC5E0 80125EE0 46220002 */  mul.d     $f0, $f0, $f2
/* BC5E4 80125EE4 00000000 */  nop
/* BC5E8 80125EE8 4620010D */  trunc.w.d $f4, $f0
/* BC5EC 80125EEC 44022000 */  mfc1      $v0, $f4
.L80125EF0:
/* BC5F0 80125EF0 03E00008 */  jr        $ra
/* BC5F4 80125EF4 00000000 */   nop
.L80125EF8:
/* BC5F8 80125EF8 14820008 */  bne       $a0, $v0, .L80125F1C
/* BC5FC 80125EFC 240200F7 */   addiu    $v0, $zero, 0xF7
/* BC600 80125F00 46020002 */  mul.s     $f0, $f0, $f2
/* BC604 80125F04 00000000 */  nop
/* BC608 80125F08 46000021 */  cvt.d.s   $f0, $f0
/* BC60C 80125F0C 4620010D */  trunc.w.d $f4, $f0
/* BC610 80125F10 44022000 */  mfc1      $v0, $f4
/* BC614 80125F14 03E00008 */  jr        $ra
/* BC618 80125F18 00000000 */   nop
.L80125F1C:
/* BC61C 80125F1C 14820008 */  bne       $a0, $v0, .L80125F40
/* BC620 80125F20 288200F0 */   slti     $v0, $a0, 0xF0
/* BC624 80125F24 46020002 */  mul.s     $f0, $f0, $f2
/* BC628 80125F28 00000000 */  nop
/* BC62C 80125F2C 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* BC630 80125F30 44811800 */  mtc1      $at, $f3
/* BC634 80125F34 44801000 */  mtc1      $zero, $f2
/* BC638 80125F38 080497B8 */  j         .L80125EE0
/* BC63C 80125F3C 46000021 */   cvt.d.s  $f0, $f0
.L80125F40:
/* BC640 80125F40 10400007 */  beqz      $v0, .L80125F60
/* BC644 80125F44 00000000 */   nop
/* BC648 80125F48 46020002 */  mul.s     $f0, $f0, $f2
/* BC64C 80125F4C 00000000 */  nop
/* BC650 80125F50 4600010D */  trunc.w.s $f4, $f0
/* BC654 80125F54 44022000 */  mfc1      $v0, $f4
/* BC658 80125F58 03E00008 */  jr        $ra
/* BC65C 80125F5C 00000000 */   nop
.L80125F60:
/* BC660 80125F60 03E00008 */  jr        $ra
/* BC664 80125F64 0000102D */   daddu    $v0, $zero, $zero

### DECOMPILED C INSTRUCTIONS:

s32 msg_get_draw_char_width(s32 character, s32 charset, s32 variation, f32 msgScale, s32 overrideCharWidth, u16 flags) {
    f32 baseWidth;

    if (character >= MSG_CONTROL_CHAR
            && (character != MSG_CHAR_PRINT_SPACE
            && character != MSG_CHAR_PRINT_FULL_SPACE
            && character != MSG_CHAR_PRINT_HALF_SPACE)) {
        return 0;
    }

    if (overrideCharWidth != 0) {
        baseWidth = overrideCharWidth;
    } else if (flags & MSG_PRINT_FLAG_100) {
        u8* charWidthTable = gMsgCharsets[charset]->rasters[variation].charWidthTable;

        if (charWidthTable != NULL
                && character != MSG_CHAR_PRINT_SPACE
                && character != MSG_CHAR_PRINT_FULL_SPACE
                && character != MSG_CHAR_PRINT_HALF_SPACE) {
            baseWidth = charWidthTable[character];
        } else {
            baseWidth = gMsgCharsets[charset]->rasters[variation].monospaceWidth;
        }
    } else {
        baseWidth = gMsgCharsets[charset]->rasters[variation].monospaceWidth;
    }

    if (character == MSG_CHAR_PRINT_SPACE) {
        return baseWidth * msgScale * 0.6;
    }
    if (character == MSG_CHAR_PRINT_FULL_SPACE) {
        f64 charWidth = baseWidth * msgScale;
        return charWidth;
    }
    if (character == MSG_CHAR_PRINT_HALF_SPACE) {
        return baseWidth * msgScale * 0.5;
    }
    if (character >= MSG_CONTROL_CHAR) {
        return 0;
    }
    return baseWidth * msgScale;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel osViSetSpecialFeatures
/* 42260 80066E60 27BDFFE8 */  addiu     $sp, $sp, -0x18
/* 42264 80066E64 AFB00010 */  sw        $s0, 0x10($sp)
/* 42268 80066E68 AFBF0014 */  sw        $ra, 0x14($sp)
/* 4226C 80066E6C 0C01ACD8 */  jal       __osDisableInt
/* 42270 80066E70 00808021 */   addu     $s0, $a0, $zero
/* 42274 80066E74 00403021 */  addu      $a2, $v0, $zero
/* 42278 80066E78 32020001 */  andi      $v0, $s0, 0x1
/* 4227C 80066E7C 10400007 */  beqz      $v0, .L80066E9C
/* 42280 80066E80 32020002 */   andi     $v0, $s0, 0x2
/* 42284 80066E84 3C038009 */  lui       $v1, %hi(D_800959D4)
/* 42288 80066E88 8C6359D4 */  lw        $v1, %lo(D_800959D4)($v1)
/* 4228C 80066E8C 8C62000C */  lw        $v0, 0xC($v1)
/* 42290 80066E90 34420008 */  ori       $v0, $v0, 0x8
/* 42294 80066E94 AC62000C */  sw        $v0, 0xC($v1)
/* 42298 80066E98 32020002 */  andi      $v0, $s0, 0x2
.L80066E9C:
/* 4229C 80066E9C 10400006 */  beqz      $v0, .L80066EB8
/* 422A0 80066EA0 2404FFF7 */   addiu    $a0, $zero, -0x9
/* 422A4 80066EA4 3C028009 */  lui       $v0, %hi(D_800959D4)
/* 422A8 80066EA8 8C4259D4 */  lw        $v0, %lo(D_800959D4)($v0)
/* 422AC 80066EAC 8C43000C */  lw        $v1, 0xC($v0)
/* 422B0 80066EB0 00641824 */  and       $v1, $v1, $a0
/* 422B4 80066EB4 AC43000C */  sw        $v1, 0xC($v0)
.L80066EB8:
/* 422B8 80066EB8 32020004 */  andi      $v0, $s0, 0x4
/* 422BC 80066EBC 10400007 */  beqz      $v0, .L80066EDC
/* 422C0 80066EC0 32020008 */   andi     $v0, $s0, 0x8
/* 422C4 80066EC4 3C038009 */  lui       $v1, %hi(D_800959D4)
/* 422C8 80066EC8 8C6359D4 */  lw        $v1, %lo(D_800959D4)($v1)
/* 422CC 80066ECC 8C62000C */  lw        $v0, 0xC($v1)
/* 422D0 80066ED0 34420004 */  ori       $v0, $v0, 0x4
/* 422D4 80066ED4 AC62000C */  sw        $v0, 0xC($v1)
/* 422D8 80066ED8 32020008 */  andi      $v0, $s0, 0x8
.L80066EDC:
/* 422DC 80066EDC 10400006 */  beqz      $v0, .L80066EF8
/* 422E0 80066EE0 2404FFFB */   addiu    $a0, $zero, -0x5
/* 422E4 80066EE4 3C028009 */  lui       $v0, %hi(D_800959D4)
/* 422E8 80066EE8 8C4259D4 */  lw        $v0, %lo(D_800959D4)($v0)
/* 422EC 80066EEC 8C43000C */  lw        $v1, 0xC($v0)
/* 422F0 80066EF0 00641824 */  and       $v1, $v1, $a0
/* 422F4 80066EF4 AC43000C */  sw        $v1, 0xC($v0)
.L80066EF8:
/* 422F8 80066EF8 32020010 */  andi      $v0, $s0, 0x10
/* 422FC 80066EFC 10400007 */  beqz      $v0, .L80066F1C
/* 42300 80066F00 32020020 */   andi     $v0, $s0, 0x20
/* 42304 80066F04 3C038009 */  lui       $v1, %hi(D_800959D4)
/* 42308 80066F08 8C6359D4 */  lw        $v1, %lo(D_800959D4)($v1)
/* 4230C 80066F0C 8C62000C */  lw        $v0, 0xC($v1)
/* 42310 80066F10 34420010 */  ori       $v0, $v0, 0x10
/* 42314 80066F14 AC62000C */  sw        $v0, 0xC($v1)
/* 42318 80066F18 32020020 */  andi      $v0, $s0, 0x20
.L80066F1C:
/* 4231C 80066F1C 10400006 */  beqz      $v0, .L80066F38
/* 42320 80066F20 2404FFEF */   addiu    $a0, $zero, -0x11
/* 42324 80066F24 3C028009 */  lui       $v0, %hi(D_800959D4)
/* 42328 80066F28 8C4259D4 */  lw        $v0, %lo(D_800959D4)($v0)
/* 4232C 80066F2C 8C43000C */  lw        $v1, 0xC($v0)
/* 42330 80066F30 00641824 */  and       $v1, $v1, $a0
/* 42334 80066F34 AC43000C */  sw        $v1, 0xC($v0)
.L80066F38:
/* 42338 80066F38 32020040 */  andi      $v0, $s0, 0x40
/* 4233C 80066F3C 10400008 */  beqz      $v0, .L80066F60
/* 42340 80066F40 3C030001 */   lui      $v1, (0x10000 >> 16)
/* 42344 80066F44 3C048009 */  lui       $a0, %hi(D_800959D4)
/* 42348 80066F48 8C8459D4 */  lw        $a0, %lo(D_800959D4)($a0)
/* 4234C 80066F4C 8C82000C */  lw        $v0, 0xC($a0)
/* 42350 80066F50 00431025 */  or        $v0, $v0, $v1
/* 42354 80066F54 2403FCFF */  addiu     $v1, $zero, -0x301
/* 42358 80066F58 00431024 */  and       $v0, $v0, $v1
/* 4235C 80066F5C AC82000C */  sw        $v0, 0xC($a0)
.L80066F60:
/* 42360 80066F60 32020080 */  andi      $v0, $s0, 0x80
/* 42364 80066F64 1040000C */  beqz      $v0, .L80066F98
/* 42368 80066F68 3C02FFFE */   lui      $v0, (0xFFFEFFFF >> 16)
/* 4236C 80066F6C 3C048009 */  lui       $a0, %hi(D_800959D4)
/* 42370 80066F70 8C8459D4 */  lw        $a0, %lo(D_800959D4)($a0)
/* 42374 80066F74 8C83000C */  lw        $v1, 0xC($a0)
/* 42378 80066F78 8C850008 */  lw        $a1, 0x8($a0)
/* 4237C 80066F7C 3442FFFF */  ori       $v0, $v0, (0xFFFEFFFF & 0xFFFF)
/* 42380 80066F80 00621824 */  and       $v1, $v1, $v0
/* 42384 80066F84 AC83000C */  sw        $v1, 0xC($a0)
/* 42388 80066F88 8CA20004 */  lw        $v0, 0x4($a1)
/* 4238C 80066F8C 30420300 */  andi      $v0, $v0, 0x300
/* 42390 80066F90 00621825 */  or        $v1, $v1, $v0
/* 42394 80066F94 AC83000C */  sw        $v1, 0xC($a0)
.L80066F98:
/* 42398 80066F98 3C038009 */  lui       $v1, %hi(D_800959D4)
/* 4239C 80066F9C 8C6359D4 */  lw        $v1, %lo(D_800959D4)($v1)
/* 423A0 80066FA0 94620000 */  lhu       $v0, 0x0($v1)
/* 423A4 80066FA4 00C02021 */  addu      $a0, $a2, $zero
/* 423A8 80066FA8 34420008 */  ori       $v0, $v0, 0x8
/* 423AC 80066FAC 0C01ACF4 */  jal       __osRestoreInt
/* 423B0 80066FB0 A4620000 */   sh       $v0, 0x0($v1)
/* 423B4 80066FB4 8FBF0014 */  lw        $ra, 0x14($sp)
/* 423B8 80066FB8 8FB00010 */  lw        $s0, 0x10($sp)
/* 423BC 80066FBC 03E00008 */  jr        $ra
/* 423C0 80066FC0 27BD0018 */   addiu    $sp, $sp, 0x18
/* 423C4 80066FC4 00000000 */  nop
/* 423C8 80066FC8 00000000 */  nop
/* 423CC 80066FCC 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void osViSetSpecialFeatures(u32 func) {
    register u32 saveMask = __osDisableInt();

    if ((func & OS_VI_GAMMA_ON) != 0) {
        __osViNext->control |= VI_CTRL_GAMMA_ON;
    }

    if ((func & OS_VI_GAMMA_OFF) != 0) {
        __osViNext->control &= ~VI_CTRL_GAMMA_ON;
    }

    if ((func & OS_VI_GAMMA_DITHER_ON) != 0) {
        __osViNext->control |= VI_CTRL_GAMMA_DITHER_ON;
    }

    if ((func & OS_VI_GAMMA_DITHER_OFF) != 0) {
        __osViNext->control &= ~VI_CTRL_GAMMA_DITHER_ON;
    }

    if ((func & OS_VI_DIVOT_ON) != 0) {
        __osViNext->control |= VI_CTRL_DIVOT_ON;
    }

    if ((func & OS_VI_DIVOT_OFF) != 0) {
        __osViNext->control &= ~VI_CTRL_DIVOT_ON;
    }

    if ((func & OS_VI_DITHER_FILTER_ON) != 0) {
        __osViNext->control |= VI_CTRL_DITHER_FILTER_ON;
        __osViNext->control &= ~VI_CTRL_ANTIALIAS_MASK;
    }

    if ((func & OS_VI_DITHER_FILTER_OFF) != 0) {
        __osViNext->control &= ~VI_CTRL_DITHER_FILTER_ON;
        __osViNext->control |= __osViNext->modep->comRegs.ctrl & VI_CTRL_ANTIALIAS_MASK;
    }

    __osViNext->state |= VI_STATE_CTRL_UPDATED;

    __osRestoreInt(saveMask);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel load_model_animator_node
/* B6934 80120234 27BDFFB8 */  addiu     $sp, $sp, -0x48
/* B6938 80120238 AFB00030 */  sw        $s0, 0x30($sp)
/* B693C 8012023C 0080802D */  daddu     $s0, $a0, $zero
/* B6940 80120240 AFB10034 */  sw        $s1, 0x34($sp)
/* B6944 80120244 00A0882D */  daddu     $s1, $a1, $zero
/* B6948 80120248 AFB3003C */  sw        $s3, 0x3C($sp)
/* B694C 8012024C 00C0982D */  daddu     $s3, $a2, $zero
/* B6950 80120250 AFB20038 */  sw        $s2, 0x38($sp)
/* B6954 80120254 00E0902D */  daddu     $s2, $a3, $zero
/* B6958 80120258 27A60010 */  addiu     $a2, $sp, 0x10
/* B695C 8012025C 1200004C */  beqz      $s0, .L80120390
/* B6960 80120260 AFBF0040 */   sw       $ra, 0x40($sp)
/* B6964 80120264 8E020000 */  lw        $v0, 0x0($s0)
/* B6968 80120268 AFA00014 */  sw        $zero, 0x14($sp)
/* B696C 8012026C AFA00018 */  sw        $zero, 0x18($sp)
/* B6970 80120270 AFA0001C */  sw        $zero, 0x1C($sp)
/* B6974 80120274 AFA20010 */  sw        $v0, 0x10($sp)
/* B6978 80120278 86020004 */  lh        $v0, 0x4($s0)
/* B697C 8012027C 3C018015 */  lui       $at, %hi(D_80150010)
/* B6980 80120280 D4220010 */  ldc1      $f2, %lo(D_80150010)($at)
/* B6984 80120284 44820000 */  mtc1      $v0, $f0
/* B6988 80120288 00000000 */  nop
/* B698C 8012028C 46800020 */  cvt.s.w   $f0, $f0
/* B6990 80120290 46000021 */  cvt.d.s   $f0, $f0
/* B6994 80120294 46220002 */  mul.d     $f0, $f0, $f2
/* B6998 80120298 00000000 */  nop
/* B699C 8012029C 3C018015 */  lui       $at, %hi(D_80150018)
/* B69A0 801202A0 D4240018 */  ldc1      $f4, %lo(D_80150018)($at)
/* B69A4 801202A4 46240003 */  div.d     $f0, $f0, $f4
/* B69A8 801202A8 46200020 */  cvt.s.d   $f0, $f0
/* B69AC 801202AC E7A00020 */  swc1      $f0, 0x20($sp)
/* B69B0 801202B0 86020006 */  lh        $v0, 0x6($s0)
/* B69B4 801202B4 44820000 */  mtc1      $v0, $f0
/* B69B8 801202B8 00000000 */  nop
/* B69BC 801202BC 46800020 */  cvt.s.w   $f0, $f0
/* B69C0 801202C0 46000021 */  cvt.d.s   $f0, $f0
/* B69C4 801202C4 46220002 */  mul.d     $f0, $f0, $f2
/* B69C8 801202C8 00000000 */  nop
/* B69CC 801202CC 46240003 */  div.d     $f0, $f0, $f4
/* B69D0 801202D0 46200020 */  cvt.s.d   $f0, $f0
/* B69D4 801202D4 E7A00024 */  swc1      $f0, 0x24($sp)
/* B69D8 801202D8 86020008 */  lh        $v0, 0x8($s0)
/* B69DC 801202DC 44820000 */  mtc1      $v0, $f0
/* B69E0 801202E0 00000000 */  nop
/* B69E4 801202E4 46800020 */  cvt.s.w   $f0, $f0
/* B69E8 801202E8 46000021 */  cvt.d.s   $f0, $f0
/* B69EC 801202EC 46220002 */  mul.d     $f0, $f0, $f2
/* B69F0 801202F0 00000000 */  nop
/* B69F4 801202F4 0220202D */  daddu     $a0, $s1, $zero
/* B69F8 801202F8 0260282D */  daddu     $a1, $s3, $zero
/* B69FC 801202FC 46240003 */  div.d     $f0, $f0, $f4
/* B6A00 80120300 46200020 */  cvt.s.d   $f0, $f0
/* B6A04 80120304 0C0479C6 */  jal       add_anim_node
/* B6A08 80120308 E7A00028 */   swc1     $f0, 0x28($sp)
/* B6A0C 8012030C 86030028 */  lh        $v1, 0x28($s0)
/* B6A10 80120310 10600006 */  beqz      $v1, .L8012032C
/* B6A14 80120314 0040302D */   daddu    $a2, $v0, $zero
/* B6A18 80120318 94C200F4 */  lhu       $v0, 0xF4($a2)
/* B6A1C 8012031C 2463FFFF */  addiu     $v1, $v1, -0x1
/* B6A20 80120320 ACC300FC */  sw        $v1, 0xFC($a2)
/* B6A24 80120324 34421000 */  ori       $v0, $v0, 0x1000
/* B6A28 80120328 A4C200F4 */  sh        $v0, 0xF4($a2)
.L8012032C:
/* B6A2C 8012032C 3C038015 */  lui       $v1, %hi(gAnimTreeRoot)
/* B6A30 80120330 8C633B68 */  lw        $v1, %lo(gAnimTreeRoot)($v1)
/* B6A34 80120334 8C620000 */  lw        $v0, 0x0($v1)
/* B6A38 80120338 10500005 */  beq       $v0, $s0, .L80120350
/* B6A3C 8012033C 0000202D */   daddu    $a0, $zero, $zero
.L80120340:
/* B6A40 80120340 24630004 */  addiu     $v1, $v1, 0x4
/* B6A44 80120344 8C620000 */  lw        $v0, 0x0($v1)
/* B6A48 80120348 1450FFFD */  bne       $v0, $s0, .L80120340
/* B6A4C 8012034C 24840001 */   addiu    $a0, $a0, 0x1
.L80120350:
/* B6A50 80120350 00041080 */  sll       $v0, $a0, 2
/* B6A54 80120354 84C300F6 */  lh        $v1, 0xF6($a2)
/* B6A58 80120358 00521021 */  addu      $v0, $v0, $s2
/* B6A5C 8012035C AC430000 */  sw        $v1, 0x0($v0)
/* B6A60 80120360 8E04001C */  lw        $a0, 0x1C($s0)
/* B6A64 80120364 10800004 */  beqz      $a0, .L80120378
/* B6A68 80120368 0220282D */   daddu    $a1, $s1, $zero
/* B6A6C 8012036C 84C600F6 */  lh        $a2, 0xF6($a2)
/* B6A70 80120370 0C04808D */  jal       load_model_animator_node
/* B6A74 80120374 0240382D */   daddu    $a3, $s2, $zero
.L80120378:
/* B6A78 80120378 8E040018 */  lw        $a0, 0x18($s0)
/* B6A7C 8012037C 10800004 */  beqz      $a0, .L80120390
/* B6A80 80120380 0220282D */   daddu    $a1, $s1, $zero
/* B6A84 80120384 0260302D */  daddu     $a2, $s3, $zero
/* B6A88 80120388 0C04808D */  jal       load_model_animator_node
/* B6A8C 8012038C 0240382D */   daddu    $a3, $s2, $zero
.L80120390:
/* B6A90 80120390 8FBF0040 */  lw        $ra, 0x40($sp)
/* B6A94 80120394 8FB3003C */  lw        $s3, 0x3C($sp)
/* B6A98 80120398 8FB20038 */  lw        $s2, 0x38($sp)
/* B6A9C 8012039C 8FB10034 */  lw        $s1, 0x34($sp)
/* B6AA0 801203A0 8FB00030 */  lw        $s0, 0x30($sp)
/* B6AA4 801203A4 03E00008 */  jr        $ra
/* B6AA8 801203A8 27BD0048 */   addiu    $sp, $sp, 0x48

### DECOMPILED C INSTRUCTIONS:

void load_model_animator_node(StaticAnimatorNode* node, ModelAnimator* animator, s32 parentNodeID, s32* treeIndexToNodeIDs) {
    AnimatorNodeBlueprint bp;
    AnimatorNodeBlueprint* bpPtr = &bp;
    AnimatorNode* newNode;
    s32 i;

    if (node != NULL) {
        bpPtr->displayList = node->displayList;
        bpPtr->basePos.x = 0.0f;
        bpPtr->basePos.y = 0.0f;
        bpPtr->basePos.z = 0.0f;
        bpPtr->rotation.x = ((f32) node->rot.x * 180.0) / 32767.0;
        bpPtr->rotation.y = ((f32) node->rot.y * 180.0) / 32767.0;
        bpPtr->rotation.z = ((f32) node->rot.z * 180.0) / 32767.0;

        newNode = add_anim_node(animator, parentNodeID, bpPtr);

        if (node->modelID != 0) {
            newNode->fcData.modelID = node->modelID - 1;
            newNode->flags |= MODEL_ANIMATOR_FLAG_HAS_MODEL;
        }

        i = 0;
        while (gAnimTreeRoot[i] != node) {
            i++;
        }

        treeIndexToNodeIDs[i] = newNode->uniqueIndex;

        if (node->child != NULL) {
            load_model_animator_node(node->child, animator, newNode->uniqueIndex, treeIndexToNodeIDs);
        }

        if (node->sibling != NULL) {
            load_model_animator_node(node->sibling, animator, parentNodeID, treeIndexToNodeIDs);
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel UseSettingsFrom
/* F0210 802CB860 27BDFF88 */  addiu     $sp, $sp, -0x78
/* F0214 802CB864 AFB1005C */  sw        $s1, 0x5C($sp)
/* F0218 802CB868 0080882D */  daddu     $s1, $a0, $zero
/* F021C 802CB86C AFBF0064 */  sw        $ra, 0x64($sp)
/* F0220 802CB870 AFB20060 */  sw        $s2, 0x60($sp)
/* F0224 802CB874 AFB00058 */  sw        $s0, 0x58($sp)
/* F0228 802CB878 F7B60070 */  sdc1      $f22, 0x70($sp)
/* F022C 802CB87C F7B40068 */  sdc1      $f20, 0x68($sp)
/* F0230 802CB880 8E30000C */  lw        $s0, 0xC($s1)
/* F0234 802CB884 8E050000 */  lw        $a1, 0x0($s0)
/* F0238 802CB888 0C0B1EAF */  jal       evt_get_variable
/* F023C 802CB88C 26100004 */   addiu    $s0, $s0, 0x4
/* F0240 802CB890 8E050000 */  lw        $a1, 0x0($s0)
/* F0244 802CB894 26100004 */  addiu     $s0, $s0, 0x4
/* F0248 802CB898 0220202D */  daddu     $a0, $s1, $zero
/* F024C 802CB89C 3C06800B */  lui       $a2, %hi(gCameras)
/* F0250 802CB8A0 24C61D80 */  addiu     $a2, $a2, %lo(gCameras)
/* F0254 802CB8A4 00021880 */  sll       $v1, $v0, 2
/* F0258 802CB8A8 00621821 */  addu      $v1, $v1, $v0
/* F025C 802CB8AC 00031880 */  sll       $v1, $v1, 2
/* F0260 802CB8B0 00621823 */  subu      $v1, $v1, $v0
/* F0264 802CB8B4 000310C0 */  sll       $v0, $v1, 3
/* F0268 802CB8B8 00621821 */  addu      $v1, $v1, $v0
/* F026C 802CB8BC 000318C0 */  sll       $v1, $v1, 3
/* F0270 802CB8C0 0C0B210B */  jal       evt_get_float_variable
/* F0274 802CB8C4 00669021 */   addu     $s2, $v1, $a2
/* F0278 802CB8C8 8E050000 */  lw        $a1, 0x0($s0)
/* F027C 802CB8CC 26100004 */  addiu     $s0, $s0, 0x4
/* F0280 802CB8D0 0220202D */  daddu     $a0, $s1, $zero
/* F0284 802CB8D4 0C0B210B */  jal       evt_get_float_variable
/* F0288 802CB8D8 46000586 */   mov.s    $f22, $f0
/* F028C 802CB8DC 0220202D */  daddu     $a0, $s1, $zero
/* F0290 802CB8E0 8E050000 */  lw        $a1, 0x0($s0)
/* F0294 802CB8E4 0C0B210B */  jal       evt_get_float_variable
/* F0298 802CB8E8 46000506 */   mov.s    $f20, $f0
/* F029C 802CB8EC 27A20038 */  addiu     $v0, $sp, 0x38
/* F02A0 802CB8F0 3C0146FF */  lui       $at, (0x46FFFE00 >> 16)
/* F02A4 802CB8F4 3421FE00 */  ori       $at, $at, (0x46FFFE00 & 0xFFFF)
/* F02A8 802CB8F8 44812000 */  mtc1      $at, $f4
/* F02AC 802CB8FC 44803000 */  mtc1      $zero, $f6
/* F02B0 802CB900 3C01BF80 */  lui       $at, (0xBF800000 >> 16)
/* F02B4 802CB904 44811000 */  mtc1      $at, $f2
/* F02B8 802CB908 3C014120 */  lui       $at, (0x41200000 >> 16)
/* F02BC 802CB90C 44817000 */  mtc1      $at, $f14
/* F02C0 802CB910 44060000 */  mfc1      $a2, $f0
/* F02C4 802CB914 4600B306 */  mov.s     $f12, $f22
/* F02C8 802CB918 E7A40044 */  swc1      $f4, 0x44($sp)
/* F02CC 802CB91C AFA20018 */  sw        $v0, 0x18($sp)
/* F02D0 802CB920 27A2003C */  addiu     $v0, $sp, 0x3C
/* F02D4 802CB924 AFA2001C */  sw        $v0, 0x1C($sp)
/* F02D8 802CB928 27A20040 */  addiu     $v0, $sp, 0x40
/* F02DC 802CB92C AFA20020 */  sw        $v0, 0x20($sp)
/* F02E0 802CB930 27A20044 */  addiu     $v0, $sp, 0x44
/* F02E4 802CB934 AFA20024 */  sw        $v0, 0x24($sp)
/* F02E8 802CB938 27A20048 */  addiu     $v0, $sp, 0x48
/* F02EC 802CB93C AFA20028 */  sw        $v0, 0x28($sp)
/* F02F0 802CB940 27A2004C */  addiu     $v0, $sp, 0x4C
/* F02F4 802CB944 AFA2002C */  sw        $v0, 0x2C($sp)
/* F02F8 802CB948 27A20050 */  addiu     $v0, $sp, 0x50
/* F02FC 802CB94C 44073000 */  mfc1      $a3, $f6
/* F0300 802CB950 460EA380 */  add.s     $f14, $f20, $f14
/* F0304 802CB954 E7A20010 */  swc1      $f2, 0x10($sp)
/* F0308 802CB958 E7A60014 */  swc1      $f6, 0x14($sp)
/* F030C 802CB95C 0C017449 */  jal       test_ray_zones
/* F0310 802CB960 AFA20030 */   sw       $v0, 0x30($sp)
/* F0314 802CB964 0040182D */  daddu     $v1, $v0, $zero
/* F0318 802CB968 0460001A */  bltz      $v1, .L802CB9D4
/* F031C 802CB96C 000310C0 */   sll      $v0, $v1, 3
/* F0320 802CB970 00431023 */  subu      $v0, $v0, $v1
/* F0324 802CB974 3C03800E */  lui       $v1, %hi(D_800D91D4)
/* F0328 802CB978 8C6391D4 */  lw        $v1, %lo(D_800D91D4)($v1)
/* F032C 802CB97C 00021080 */  sll       $v0, $v0, 2
/* F0330 802CB980 00431021 */  addu      $v0, $v0, $v1
/* F0334 802CB984 8C420010 */  lw        $v0, 0x10($v0)
/* F0338 802CB988 264304D8 */  addiu     $v1, $s2, 0x4D8
/* F033C 802CB98C 24440020 */  addiu     $a0, $v0, 0x20
.L802CB990:
/* F0340 802CB990 8C480000 */  lw        $t0, 0x0($v0)
/* F0344 802CB994 8C490004 */  lw        $t1, 0x4($v0)
/* F0348 802CB998 8C4A0008 */  lw        $t2, 0x8($v0)
/* F034C 802CB99C 8C4B000C */  lw        $t3, 0xC($v0)
/* F0350 802CB9A0 AC680000 */  sw        $t0, 0x0($v1)
/* F0354 802CB9A4 AC690004 */  sw        $t1, 0x4($v1)
/* F0358 802CB9A8 AC6A0008 */  sw        $t2, 0x8($v1)
/* F035C 802CB9AC AC6B000C */  sw        $t3, 0xC($v1)
/* F0360 802CB9B0 24420010 */  addiu     $v0, $v0, 0x10
/* F0364 802CB9B4 1444FFF6 */  bne       $v0, $a0, .L802CB990
/* F0368 802CB9B8 24630010 */   addiu    $v1, $v1, 0x10
/* F036C 802CB9BC 8C480000 */  lw        $t0, 0x0($v0)
/* F0370 802CB9C0 8C490004 */  lw        $t1, 0x4($v0)
/* F0374 802CB9C4 8C4A0008 */  lw        $t2, 0x8($v0)
/* F0378 802CB9C8 AC680000 */  sw        $t0, 0x0($v1)
/* F037C 802CB9CC AC690004 */  sw        $t1, 0x4($v1)
/* F0380 802CB9D0 AC6A0008 */  sw        $t2, 0x8($v1)
.L802CB9D4:
/* F0384 802CB9D4 8FBF0064 */  lw        $ra, 0x64($sp)
/* F0388 802CB9D8 8FB20060 */  lw        $s2, 0x60($sp)
/* F038C 802CB9DC 8FB1005C */  lw        $s1, 0x5C($sp)
/* F0390 802CB9E0 8FB00058 */  lw        $s0, 0x58($sp)
/* F0394 802CB9E4 D7B60070 */  ldc1      $f22, 0x70($sp)
/* F0398 802CB9E8 D7B40068 */  ldc1      $f20, 0x68($sp)
/* F039C 802CB9EC 24020002 */  addiu     $v0, $zero, 0x2
/* F03A0 802CB9F0 03E00008 */  jr        $ra
/* F03A4 802CB9F4 27BD0078 */   addiu    $sp, $sp, 0x78

### DECOMPILED C INSTRUCTIONS:

ApiStatus UseSettingsFrom(Evt* script, s32 isInitialCall) {
    Bytecode* args = script->ptrReadPos;
    s32 id = evt_get_variable(script, *args++);
    Camera* camera = &gCameras[id];
    f32 startX = evt_get_float_variable(script, *args++);
    f32 startY = evt_get_float_variable(script, *args++);
    f32 startZ = evt_get_float_variable(script, *args++);
    f32 hitX, hitY, hitZ;
    f32 hitDepth = 32767.0f;
    f32 nx, ny, nz;
    s32 hitID = test_ray_zones(startX, startY + 10.0f, startZ, 0.0f, -1.0f, 0.0f, &hitX, &hitY, &hitZ, &hitDepth,
                               &nx, &ny, &nz);

    if (hitID >= 0) {
        camera->controlSettings = *gZoneCollisionData.colliderList[hitID].camSettings;
    }
    return ApiStatus_DONE2;
}