### RAW ASSEMBLY INSTRUCTIONS:

glabel floating_cloud_puff_appendGfx
/* 3D4BF4 E00D2284 27BDFF48 */  addiu     $sp, $sp, -0xB8
/* 3D4BF8 E00D2288 0080302D */  daddu     $a2, $a0, $zero
/* 3D4BFC E00D228C 3C07DB06 */  lui       $a3, (0xDB060024 >> 16)
/* 3D4C00 E00D2290 34E70024 */  ori       $a3, $a3, (0xDB060024 & 0xFFFF)
/* 3D4C04 E00D2294 27A40010 */  addiu     $a0, $sp, 0x10
/* 3D4C08 E00D2298 AFB600A8 */  sw        $s6, 0xA8($sp)
/* 3D4C0C E00D229C 3C160001 */  lui       $s6, (0x11630 >> 16)
/* 3D4C10 E00D22A0 AFB3009C */  sw        $s3, 0x9C($sp)
/* 3D4C14 E00D22A4 3C13800A */  lui       $s3, %hi(gMainGfxPos)
/* 3D4C18 E00D22A8 2673A66C */  addiu     $s3, $s3, %lo(gMainGfxPos)
/* 3D4C1C E00D22AC 36D61630 */  ori       $s6, $s6, (0x11630 & 0xFFFF)
/* 3D4C20 E00D22B0 AFBF00AC */  sw        $ra, 0xAC($sp)
/* 3D4C24 E00D22B4 AFB500A4 */  sw        $s5, 0xA4($sp)
/* 3D4C28 E00D22B8 AFB400A0 */  sw        $s4, 0xA0($sp)
/* 3D4C2C E00D22BC AFB20098 */  sw        $s2, 0x98($sp)
/* 3D4C30 E00D22C0 AFB10094 */  sw        $s1, 0x94($sp)
/* 3D4C34 E00D22C4 AFB00090 */  sw        $s0, 0x90($sp)
/* 3D4C38 E00D22C8 F7B400B0 */  sdc1      $f20, 0xB0($sp)
/* 3D4C3C E00D22CC 8E650000 */  lw        $a1, 0x0($s3)
/* 3D4C40 E00D22D0 8CD2000C */  lw        $s2, 0xC($a2)
/* 3D4C44 E00D22D4 00A0182D */  daddu     $v1, $a1, $zero
/* 3D4C48 E00D22D8 24A50008 */  addiu     $a1, $a1, 0x8
/* 3D4C4C E00D22DC AE650000 */  sw        $a1, 0x0($s3)
/* 3D4C50 E00D22E0 8E550024 */  lw        $s5, 0x24($s2)
/* 3D4C54 E00D22E4 C6540034 */  lwc1      $f20, 0x34($s2)
/* 3D4C58 E00D22E8 C6400038 */  lwc1      $f0, 0x38($s2)
/* 3D4C5C E00D22EC 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 3D4C60 E00D22F0 AC620000 */  sw        $v0, 0x0($v1)
/* 3D4C64 E00D22F4 AC600004 */  sw        $zero, 0x4($v1)
/* 3D4C68 E00D22F8 ACA70000 */  sw        $a3, 0x0($a1)
/* 3D4C6C E00D22FC 8CC30010 */  lw        $v1, 0x10($a2)
/* 3D4C70 E00D2300 24A20008 */  addiu     $v0, $a1, 0x8
/* 3D4C74 E00D2304 AE620000 */  sw        $v0, 0x0($s3)
/* 3D4C78 E00D2308 8C62001C */  lw        $v0, 0x1C($v1)
/* 3D4C7C E00D230C 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 3D4C80 E00D2310 4600A502 */  mul.s     $f20, $f20, $f0
/* 3D4C84 E00D2314 00000000 */  nop
/* 3D4C88 E00D2318 00431021 */  addu      $v0, $v0, $v1
/* 3D4C8C E00D231C 3C03800B */  lui       $v1, %hi(gCameras)
/* 3D4C90 E00D2320 24631D80 */  addiu     $v1, $v1, %lo(gCameras)
/* 3D4C94 E00D2324 ACA20004 */  sw        $v0, 0x4($a1)
/* 3D4C98 E00D2328 8E450004 */  lw        $a1, 0x4($s2)
/* 3D4C9C E00D232C 8E460008 */  lw        $a2, 0x8($s2)
/* 3D4CA0 E00D2330 3C028007 */  lui       $v0, %hi(gCurrentCameraID)
/* 3D4CA4 E00D2334 8C427410 */  lw        $v0, %lo(gCurrentCameraID)($v0)
/* 3D4CA8 E00D2338 8E47000C */  lw        $a3, 0xC($s2)
/* 3D4CAC E00D233C 00028880 */  sll       $s1, $v0, 2
/* 3D4CB0 E00D2340 02228821 */  addu      $s1, $s1, $v0
/* 3D4CB4 E00D2344 00118880 */  sll       $s1, $s1, 2
/* 3D4CB8 E00D2348 02228823 */  subu      $s1, $s1, $v0
/* 3D4CBC E00D234C 001110C0 */  sll       $v0, $s1, 3
/* 3D4CC0 E00D2350 02228821 */  addu      $s1, $s1, $v0
/* 3D4CC4 E00D2354 001188C0 */  sll       $s1, $s1, 3
/* 3D4CC8 E00D2358 0C080108 */  jal       shim_guTranslateF
/* 3D4CCC E00D235C 02238821 */   addu     $s1, $s1, $v1
/* 3D4CD0 E00D2360 27B00050 */  addiu     $s0, $sp, 0x50
/* 3D4CD4 E00D2364 4405A000 */  mfc1      $a1, $f20
/* 3D4CD8 E00D2368 0200202D */  daddu     $a0, $s0, $zero
/* 3D4CDC E00D236C 00A0302D */  daddu     $a2, $a1, $zero
/* 3D4CE0 E00D2370 0C080110 */  jal       shim_guScaleF
/* 3D4CE4 E00D2374 00A0382D */   daddu    $a3, $a1, $zero
/* 3D4CE8 E00D2378 0200202D */  daddu     $a0, $s0, $zero
/* 3D4CEC E00D237C 27A50010 */  addiu     $a1, $sp, 0x10
/* 3D4CF0 E00D2380 0C080114 */  jal       shim_guMtxCatF
/* 3D4CF4 E00D2384 00A0302D */   daddu    $a2, $a1, $zero
/* 3D4CF8 E00D2388 27A40010 */  addiu     $a0, $sp, 0x10
/* 3D4CFC E00D238C 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 3D4D00 E00D2390 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 3D4D04 E00D2394 3C14800A */  lui       $s4, %hi(gDisplayContext)
/* 3D4D08 E00D2398 2694A674 */  addiu     $s4, $s4, %lo(gDisplayContext)
/* 3D4D0C E00D239C 96050000 */  lhu       $a1, 0x0($s0)
/* 3D4D10 E00D23A0 8E820000 */  lw        $v0, 0x0($s4)
/* 3D4D14 E00D23A4 00052980 */  sll       $a1, $a1, 6
/* 3D4D18 E00D23A8 00B62821 */  addu      $a1, $a1, $s6
/* 3D4D1C E00D23AC 0C080118 */  jal       shim_guMtxF2L
/* 3D4D20 E00D23B0 00452821 */   addu     $a1, $v0, $a1
/* 3D4D24 E00D23B4 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 3D4D28 E00D23B8 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 3D4D2C E00D23BC 3C06DA38 */  lui       $a2, (0xDA380001 >> 16)
/* 3D4D30 E00D23C0 34C60001 */  ori       $a2, $a2, (0xDA380001 & 0xFFFF)
/* 3D4D34 E00D23C4 3C08D838 */  lui       $t0, (0xD8380002 >> 16)
/* 3D4D38 E00D23C8 35080002 */  ori       $t0, $t0, (0xD8380002 & 0xFFFF)
/* 3D4D3C E00D23CC 32B500FF */  andi      $s5, $s5, 0xFF
/* 3D4D40 E00D23D0 8E640000 */  lw        $a0, 0x0($s3)
/* 3D4D44 E00D23D4 96020000 */  lhu       $v0, 0x0($s0)
/* 3D4D48 E00D23D8 0080282D */  daddu     $a1, $a0, $zero
/* 3D4D4C E00D23DC 24840008 */  addiu     $a0, $a0, 0x8
/* 3D4D50 E00D23E0 AE640000 */  sw        $a0, 0x0($s3)
/* 3D4D54 E00D23E4 ACA30000 */  sw        $v1, 0x0($a1)
/* 3D4D58 E00D23E8 24430001 */  addiu     $v1, $v0, 0x1
/* 3D4D5C E00D23EC 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3D4D60 E00D23F0 00021180 */  sll       $v0, $v0, 6
/* 3D4D64 E00D23F4 A6030000 */  sh        $v1, 0x0($s0)
/* 3D4D68 E00D23F8 8E830000 */  lw        $v1, 0x0($s4)
/* 3D4D6C E00D23FC 00561021 */  addu      $v0, $v0, $s6
/* 3D4D70 E00D2400 00621821 */  addu      $v1, $v1, $v0
/* 3D4D74 E00D2404 24820008 */  addiu     $v0, $a0, 0x8
/* 3D4D78 E00D2408 ACA30004 */  sw        $v1, 0x4($a1)
/* 3D4D7C E00D240C AE620000 */  sw        $v0, 0x0($s3)
/* 3D4D80 E00D2410 24820010 */  addiu     $v0, $a0, 0x10
/* 3D4D84 E00D2414 AC860000 */  sw        $a2, 0x0($a0)
/* 3D4D88 E00D2418 AE620000 */  sw        $v0, 0x0($s3)
/* 3D4D8C E00D241C 8E230204 */  lw        $v1, 0x204($s1)
/* 3D4D90 E00D2420 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3D4D94 E00D2424 AC820008 */  sw        $v0, 0x8($a0)
/* 3D4D98 E00D2428 AC830004 */  sw        $v1, 0x4($a0)
/* 3D4D9C E00D242C 9242001B */  lbu       $v0, 0x1B($s2)
/* 3D4DA0 E00D2430 9245001F */  lbu       $a1, 0x1F($s2)
/* 3D4DA4 E00D2434 92460023 */  lbu       $a2, 0x23($s2)
/* 3D4DA8 E00D2438 24830018 */  addiu     $v1, $a0, 0x18
/* 3D4DAC E00D243C AE630000 */  sw        $v1, 0x0($s3)
/* 3D4DB0 E00D2440 3C03FB00 */  lui       $v1, (0xFB000000 >> 16)
/* 3D4DB4 E00D2444 AC830010 */  sw        $v1, 0x10($a0)
/* 3D4DB8 E00D2448 00021600 */  sll       $v0, $v0, 24
/* 3D4DBC E00D244C 00052C00 */  sll       $a1, $a1, 16
/* 3D4DC0 E00D2450 00451025 */  or        $v0, $v0, $a1
/* 3D4DC4 E00D2454 00063200 */  sll       $a2, $a2, 8
/* 3D4DC8 E00D2458 00461025 */  or        $v0, $v0, $a2
/* 3D4DCC E00D245C 00551025 */  or        $v0, $v0, $s5
/* 3D4DD0 E00D2460 AC82000C */  sw        $v0, 0xC($a0)
/* 3D4DD4 E00D2464 24820020 */  addiu     $v0, $a0, 0x20
/* 3D4DD8 E00D2468 9243002B */  lbu       $v1, 0x2B($s2)
/* 3D4DDC E00D246C 9246002F */  lbu       $a2, 0x2F($s2)
/* 3D4DE0 E00D2470 92470033 */  lbu       $a3, 0x33($s2)
/* 3D4DE4 E00D2474 3C05DE00 */  lui       $a1, (0xDE000000 >> 16)
/* 3D4DE8 E00D2478 AE620000 */  sw        $v0, 0x0($s3)
/* 3D4DEC E00D247C 3C020900 */  lui       $v0, %hi(D_09000080_4150E0)
/* 3D4DF0 E00D2480 24420080 */  addiu     $v0, $v0, %lo(D_09000080_4150E0)
/* 3D4DF4 E00D2484 AC82001C */  sw        $v0, 0x1C($a0)
/* 3D4DF8 E00D2488 24820028 */  addiu     $v0, $a0, 0x28
/* 3D4DFC E00D248C AC850018 */  sw        $a1, 0x18($a0)
/* 3D4E00 E00D2490 AE620000 */  sw        $v0, 0x0($s3)
/* 3D4E04 E00D2494 3C020900 */  lui       $v0, %hi(D_09000168_4151C8)
/* 3D4E08 E00D2498 24420168 */  addiu     $v0, $v0, %lo(D_09000168_4151C8)
/* 3D4E0C E00D249C AC820024 */  sw        $v0, 0x24($a0)
/* 3D4E10 E00D24A0 24820030 */  addiu     $v0, $a0, 0x30
/* 3D4E14 E00D24A4 AC850020 */  sw        $a1, 0x20($a0)
/* 3D4E18 E00D24A8 AE620000 */  sw        $v0, 0x0($s3)
/* 3D4E1C E00D24AC 24020040 */  addiu     $v0, $zero, 0x40
/* 3D4E20 E00D24B0 AC880028 */  sw        $t0, 0x28($a0)
/* 3D4E24 E00D24B4 AC82002C */  sw        $v0, 0x2C($a0)
/* 3D4E28 E00D24B8 00031E00 */  sll       $v1, $v1, 24
/* 3D4E2C E00D24BC 00063400 */  sll       $a2, $a2, 16
/* 3D4E30 E00D24C0 00661825 */  or        $v1, $v1, $a2
/* 3D4E34 E00D24C4 00073A00 */  sll       $a3, $a3, 8
/* 3D4E38 E00D24C8 00671825 */  or        $v1, $v1, $a3
/* 3D4E3C E00D24CC AC830014 */  sw        $v1, 0x14($a0)
/* 3D4E40 E00D24D0 8FBF00AC */  lw        $ra, 0xAC($sp)
/* 3D4E44 E00D24D4 8FB600A8 */  lw        $s6, 0xA8($sp)
/* 3D4E48 E00D24D8 8FB500A4 */  lw        $s5, 0xA4($sp)
/* 3D4E4C E00D24DC 8FB400A0 */  lw        $s4, 0xA0($sp)
/* 3D4E50 E00D24E0 8FB3009C */  lw        $s3, 0x9C($sp)
/* 3D4E54 E00D24E4 8FB20098 */  lw        $s2, 0x98($sp)
/* 3D4E58 E00D24E8 8FB10094 */  lw        $s1, 0x94($sp)
/* 3D4E5C E00D24EC 8FB00090 */  lw        $s0, 0x90($sp)
/* 3D4E60 E00D24F0 D7B400B0 */  ldc1      $f20, 0xB0($sp)
/* 3D4E64 E00D24F4 03E00008 */  jr        $ra
/* 3D4E68 E00D24F8 27BD00B8 */   addiu    $sp, $sp, 0xB8
/* 3D4E6C E00D24FC 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void floating_cloud_puff_appendGfx(void* effect) {
    FloatingCloudPuffFXData* data = ((EffectInstance*)effect)->data.floatingCloudPuff;
    Camera* camera = &gCameras[gCurrentCameraID];
    s32 unk_24 = data->unk_24;
    f32 scale = data->unk_34 * data->unk_38;
    Matrix4f sp10;
    Matrix4f sp50;

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

    shim_guTranslateF(sp10, data->unk_04, data->unk_08, data->unk_0C);
    shim_guScaleF(sp50, scale, scale, scale);
    shim_guMtxCatF(sp50, sp10, sp10);
    shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
    gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
    gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, unk_24);
    gDPSetEnvColor(gMainGfxPos++, data->unk_28, data->unk_2C, data->unk_30, 0);
    gSPDisplayList(gMainGfxPos++, D_09000080_3D4F10);
    gSPDisplayList(gMainGfxPos++, D_09000168_3D4FF8);
    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}


### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_802437F4
/* 136B34 802437F4 27BDFEE0 */  addiu     $sp, $sp, -0x120
.L802437F8:
/* 136B38 802437F8 0000202D */  daddu     $a0, $zero, $zero
/* 136B3C 802437FC AFA50124 */  sw        $a1, 0x124($sp)
D_80243800:
/* 136B40 80243800 3C05F840 */  lui       $a1, (0xF8405BDE >> 16)
D_80243804:
/* 136B44 80243804 34A55BDE */  ori       $a1, $a1, (0xF8405BDE & 0xFFFF)
glabel func_80243808
/* 136B48 80243808 AFBF00FC */  sw        $ra, 0xFC($sp)
/* 136B4C 8024380C AFBE00F8 */  sw        $fp, 0xF8($sp)
/* 136B50 80243810 AFB700F4 */  sw        $s7, 0xF4($sp)
D_80243814:
/* 136B54 80243814 AFB600F0 */  sw        $s6, 0xF0($sp)
/* 136B58 80243818 AFB500EC */  sw        $s5, 0xEC($sp)
glabel func_8024381C
/* 136B5C 8024381C AFB400E8 */  sw        $s4, 0xE8($sp)
D_80243820:
/* 136B60 80243820 AFB300E4 */  sw        $s3, 0xE4($sp)
.L80243824:
/* 136B64 80243824 AFB200E0 */  sw        $s2, 0xE0($sp)
glabel .L80243828
/* 136B68 80243828 AFB100DC */  sw        $s1, 0xDC($sp)
D_8024382C:
/* 136B6C 8024382C AFB000D8 */  sw        $s0, 0xD8($sp)
D_80243830:
/* 136B70 80243830 F7BA0118 */  sdc1      $f26, 0x118($sp)
.L80243834:
/* 136B74 80243834 F7B80110 */  sdc1      $f24, 0x110($sp)
jtbl_80243838:
/* 136B78 80243838 F7B60108 */  sdc1      $f22, 0x108($sp)
/* 136B7C 8024383C F7B40100 */  sdc1      $f20, 0x100($sp)
D_80243840:
/* 136B80 80243840 AFA60128 */  sw        $a2, 0x128($sp)
/* 136B84 80243844 0C0B1EAF */  jal       evt_get_variable
glabel .L80243848
/* 136B88 80243848 AFA7012C */   sw       $a3, 0x12C($sp)
.L8024384C:
/* 136B8C 8024384C 104001F4 */  beqz      $v0, D_80244020
.L80243850:
/* 136B90 80243850 3C08E300 */   lui      $t0, (0xE3000A01 >> 16)
D_80243854:
/* 136B94 80243854 35080A01 */  ori       $t0, $t0, (0xE3000A01 & 0xFFFF)
.L80243858:
/* 136B98 80243858 3C0BE200 */  lui       $t3, (0xE200001C >> 16)
.L8024385C:
/* 136B9C 8024385C 356B001C */  ori       $t3, $t3, (0xE200001C & 0xFFFF)
.L80243860:
/* 136BA0 80243860 3C090050 */  lui       $t1, (0x504340 >> 16)
.L80243864:
/* 136BA4 80243864 35294340 */  ori       $t1, $t1, (0x504340 & 0xFFFF)
glabel .L80243868
/* 136BA8 80243868 3C0CFCFF */  lui       $t4, (0xFCFFFFFF >> 16)
glabel func_8024386C
/* 136BAC 8024386C 358CFFFF */  ori       $t4, $t4, (0xFCFFFFFF & 0xFFFF)
D_80243870:
/* 136BB0 80243870 3C0AFFFD */  lui       $t2, (0xFFFDF6FB >> 16)
D_80243874:
/* 136BB4 80243874 354AF6FB */  ori       $t2, $t2, (0xFFFDF6FB & 0xFFFF)
glabel .L80243878
/* 136BB8 80243878 3C0D3737 */  lui       $t5, (0x373737FF >> 16)
D_8024387C:
/* 136BBC 8024387C 35AD37FF */  ori       $t5, $t5, (0x373737FF & 0xFFFF)
D_80243880:
/* 136BC0 80243880 3C140001 */  lui       $s4, (0x11630 >> 16)
/* 136BC4 80243884 36941630 */  ori       $s4, $s4, (0x11630 & 0xFFFF)
D_80243888:
/* 136BC8 80243888 0000B82D */  daddu     $s7, $zero, $zero
D_8024388C:
/* 136BCC 8024388C 27B50068 */  addiu     $s5, $sp, 0x68
D_80243890:
/* 136BD0 80243890 3C028007 */  lui       $v0, %hi(gMatrixListPos)
/* 136BD4 80243894 244241F0 */  addiu     $v0, $v0, %lo(gMatrixListPos)
D_80243898:
/* 136BD8 80243898 0040F02D */  daddu     $fp, $v0, $zero
/* 136BDC 8024389C 3C02800A */  lui       $v0, %hi(gMainGfxPos)
.L802438A0:
/* 136BE0 802438A0 2442A66C */  addiu     $v0, $v0, %lo(gMainGfxPos)
glabel func_802438A4
/* 136BE4 802438A4 0040B02D */  daddu     $s6, $v0, $zero
D_802438A8:
/* 136BE8 802438A8 3C12FA00 */  lui       $s2, (0xFA000000 >> 16)
/* 136BEC 802438AC 8FAE0124 */  lw        $t6, 0x124($sp)
D_802438B0:
/* 136BF0 802438B0 8FAF0128 */  lw        $t7, 0x128($sp)
/* 136BF4 802438B4 3C013F4C */  lui       $at, (0x3F4CCCCD >> 16)
/* 136BF8 802438B8 3421CCCD */  ori       $at, $at, (0x3F4CCCCD & 0xFFFF)
/* 136BFC 802438BC 4481D000 */  mtc1      $at, $f26
.L802438C0:
/* 136C00 802438C0 3C014334 */  lui       $at, (0x43340000 >> 16)
/* 136C04 802438C4 4481C000 */  mtc1      $at, $f24
D_802438C8:
/* 136C08 802438C8 000E9880 */  sll       $s3, $t6, 2
D_802438CC:
/* 136C0C 802438CC 000F2880 */  sll       $a1, $t7, 2
glabel func_802438D0
/* 136C10 802438D0 8FAF012C */  lw        $t7, 0x12C($sp)
D_802438D4:
/* 136C14 802438D4 0260202D */  daddu     $a0, $s3, $zero
D_802438D8:
/* 136C18 802438D8 01CF8821 */  addu      $s1, $t6, $t7
.L802438DC:
/* 136C1C 802438DC 00118880 */  sll       $s1, $s1, 2
D_802438E0:
/* 136C20 802438E0 0220302D */  daddu     $a2, $s1, $zero
/* 136C24 802438E4 3C0F0001 */  lui       $t7, (0x11630 >> 16)
pra_13_802438E8:
/* 136C28 802438E8 8FAE0128 */  lw        $t6, 0x128($sp)
D_802438EC:
/* 136C2C 802438EC 35EF1630 */  ori       $t7, $t7, (0x11630 & 0xFFFF)
glabel func_802438F0
/* 136C30 802438F0 AFAF00D0 */  sw        $t7, 0xD0($sp)
.L802438F4:
/* 136C34 802438F4 8EC20000 */  lw        $v0, 0x0($s6)
D_802438F8:
/* 136C38 802438F8 25D0000C */  addiu     $s0, $t6, 0xC
/* 136C3C 802438FC 00108080 */  sll       $s0, $s0, 2
jtbl_80243900:
/* 136C40 80243900 0200382D */  daddu     $a3, $s0, $zero
/* 136C44 80243904 0040182D */  daddu     $v1, $v0, $zero
glabel func_80243908
/* 136C48 80243908 24420008 */  addiu     $v0, $v0, 0x8
/* 136C4C 8024390C AEC20000 */  sw        $v0, 0x0($s6)
glabel func_80243910
/* 136C50 80243910 AC680000 */  sw        $t0, 0x0($v1)
/* 136C54 80243914 AC600004 */  sw        $zero, 0x4($v1)
dgb_09_pad_3918:
/* 136C58 80243918 24430008 */  addiu     $v1, $v0, 0x8
.L8024391C:
/* 136C5C 8024391C AEC30000 */  sw        $v1, 0x0($s6)
D_80243920:
/* 136C60 80243920 24430010 */  addiu     $v1, $v0, 0x10
/* 136C64 80243924 AC4B0000 */  sw        $t3, 0x0($v0)
D_80243928:
/* 136C68 80243928 AC490004 */  sw        $t1, 0x4($v0)
.L8024392C:
/* 136C6C 8024392C AEC30000 */  sw        $v1, 0x0($s6)
jtbl_80243930:
/* 136C70 80243930 24430018 */  addiu     $v1, $v0, 0x18
.L80243934:
/* 136C74 80243934 AC4C0008 */  sw        $t4, 0x8($v0)
.L80243938:
/* 136C78 80243938 AC4A000C */  sw        $t2, 0xC($v0)
.L8024393C:
/* 136C7C 8024393C AEC30000 */  sw        $v1, 0x0($s6)
.L80243940:
/* 136C80 80243940 AC520010 */  sw        $s2, 0x10($v0)

### DECOMPILED C INSTRUCTIONS:

void pause_tutorial_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
    Matrix4f matrix1;
    Matrix4f matrix2;
    f32 (*matrix2ptr)[4];
    s32 msgHeight;
    s32 msgWidth;
    s32 msgMaxLineChars;
    s32 msgNumLines;
    s32 msgMaxLinesPerPage;
    s32 msgHeight2;
    u32 msgWidth2;
    s32 msgMaxLineChars2;
    s32 msgNumLines2;
    s32 msgMaxLinesPerPage2;
    s32 i;
    s32 margin, margin2;
    s32 state;

    if (evt_get_variable(NULL, GF_Tutorial_Badges) == FALSE) {
        return;
    }

    gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
    gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
    gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
    gDPSetPrimColor(gMainGfxPos++, 0, 0, 55, 55, 55, 255);
    pause_draw_rect(baseX * 4, baseY * 4, (baseX + width) * 4, (baseY + 12) * 4, 0, 0, 0, 0, 0);
    gDPPipeSync(gMainGfxPos++);
    gDPSetPrimColor(gMainGfxPos++, 0, 0, 185, 185, 185, 255);
    pause_draw_rect(baseX * 4, (baseY + 12) * 4, (baseX + width) * 4, (baseY + height) * 4, 0, 0, 0, 0, 0);
    gDPPipeSync(gMainGfxPos++);
    gSPViewport(gMainGfxPos++, &gPauseTutorialViewport);
    guOrthoF(matrix1, 0.0f, 320.0f, 240.0f, 0.0f, -100.0f, 100.0f, 1.0f);
    guMtxF2L(matrix1, &gDisplayContext->matrixStack[gMatrixListPos]);
    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);

    for (i = 0; i < 3; i++) {
        //needed to match
        matrix2ptr = matrix2;
        switch (i) {
            case 0:
                guTranslateF(matrix1, 40.0f, 223.0f, 0);
                guScaleF(matrix2ptr, -0.8f, 0.8f, 1.0f);
                break;
            case 1:
                guTranslateF(matrix1, 60.0f, 223.0f, 0);
                guScaleF(matrix2ptr, -0.8f, 0.8f, 1.0f);
                break;
            default:
                guTranslateF(matrix1, 280.0f, 223.0f, 0);
                guScaleF(matrix2ptr, 0.8f, 0.8f, 1.0f);
                break;
        }

        guMtxCatF(matrix2ptr, matrix1, matrix1);
        guRotateF(matrix2ptr, 180.0f, 0.0f, 0.0f, 1.0f);
        guMtxCatF(matrix2ptr, matrix1, matrix1);
        guRotateF(matrix2ptr, 180.0f, 0.0f, 1.0f, 0.0f);
        guMtxCatF(matrix2ptr, matrix1, matrix1);
        guMtxF2L(matrix1, &gDisplayContext->matrixStack[gMatrixListPos]);
        gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
        set_npc_imgfx_all(gPauseTutorialSprites[i], IMGFX_SET_COLOR, 255, 255, 255, 255, 64);
        spr_draw_npc_sprite(gPauseTutorialSprites[i], 0, 0, 0, matrix1);
        gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    }

    get_msg_properties(pause_get_menu_msg(PAUSE_MSG_TUT_NAME_BADGES), &msgHeight, &msgWidth, &msgMaxLineChars, &msgNumLines, &msgMaxLinesPerPage, NULL, 1);
    margin = (s32)(width - msgWidth) >> 1;
    draw_msg(pause_get_menu_msg(PAUSE_MSG_TUT_NAME_BADGES), baseX + margin, baseY, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU);
    gPauseTutorialScrollPos += pause_interp_text_scroll(gPauseTutorialState * 140 - gPauseTutorialScrollPos);
    gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, baseX + 1, baseY + 1, baseX + width - 1, baseY + height - 1);
    state = gPauseTutorialState;
    get_msg_properties(pause_get_menu_msg(gPauseTutorialDescMessages[state]), &msgHeight2, &msgWidth2, &msgMaxLineChars2, &msgNumLines2, &msgMaxLinesPerPage2, NULL, 1);
    margin2 = (s32)(width - msgWidth2) >> 1;
    draw_msg(pause_get_menu_msg(gPauseTutorialDescMessages[state]), baseX + margin2, baseY + 13 + state * 140 - gPauseTutorialScrollPos, 255, MSG_PAL_STANDARD, DRAW_MSG_STYLE_MENU);
    hud_element_set_render_pos(gPauseCommonIconIDs[gPauseTutorialIconIDs[gPauseTutorialState]], baseX + width / 2 - 2, baseY + 52);
    hud_element_set_flags(gPauseCommonIconIDs[gPauseTutorialIconIDs[gPauseTutorialState]], HUD_ELEMENT_FLAG_FILTER_TEX);
    hud_element_set_scale(gPauseCommonIconIDs[gPauseTutorialIconIDs[gPauseTutorialState]], 0.5f);
    hud_element_draw_without_clipping(gPauseCommonIconIDs[gPauseTutorialIconIDs[gPauseTutorialState]]);

    if (gPauseTutorialIconIDs[gPauseTutorialState] == 6) {
        hud_element_set_render_pos(gPauseCommonIconIDs[7], baseX + width / 2 + 1, baseY + 50);
        hud_element_draw_without_clipping(gPauseCommonIconIDs[7]);
    }

    draw_msg(pause_get_menu_msg(gPauseTutorialCmdMessages[gPauseTutorialState]), baseX + width / 2 + 10, baseY + 44, 255, MSG_PAL_STANDARD, 0);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel phys_update_jump
/* 7C1C8 800E2D18 27BDFFE0 */  addiu     $sp, $sp, -0x20
/* 7C1CC 800E2D1C AFB00010 */  sw        $s0, 0x10($sp)
/* 7C1D0 800E2D20 3C108011 */  lui       $s0, %hi(gPlayerStatus)
/* 7C1D4 800E2D24 2610EFC8 */  addiu     $s0, $s0, %lo(gPlayerStatus)
/* 7C1D8 800E2D28 AFBF0014 */  sw        $ra, 0x14($sp)
/* 7C1DC 800E2D2C F7B40018 */  sdc1      $f20, 0x18($sp)
/* 7C1E0 800E2D30 860200C0 */  lh        $v0, 0xC0($s0)
/* 7C1E4 800E2D34 1040006A */  beqz      $v0, .L800E2EE0
/* 7C1E8 800E2D38 00000000 */   nop
/* 7C1EC 800E2D3C 920200B4 */  lbu       $v0, 0xB4($s0)
/* 7C1F0 800E2D40 2442FFFC */  addiu     $v0, $v0, -0x4
/* 7C1F4 800E2D44 00021600 */  sll       $v0, $v0, 24
/* 7C1F8 800E2D48 00021E03 */  sra       $v1, $v0, 24
/* 7C1FC 800E2D4C 2C620014 */  sltiu     $v0, $v1, 0x14
/* 7C200 800E2D50 10400045 */  beqz      $v0, .L800E2E68
/* 7C204 800E2D54 00031080 */   sll      $v0, $v1, 2
/* 7C208 800E2D58 3C018011 */  lui       $at, %hi(jtbl_8010BD98)
/* 7C20C 800E2D5C 00220821 */  addu      $at, $at, $v0
/* 7C210 800E2D60 8C22BD98 */  lw        $v0, %lo(jtbl_8010BD98)($at)
/* 7C214 800E2D64 00400008 */  jr        $v0
/* 7C218 800E2D68 00000000 */   nop
glabel .L800E2D6C
/* 7C21C 800E2D6C 0C038AEC */  jal       func_800E2BB0
/* 7C220 800E2D70 00000000 */   nop
/* 7C224 800E2D74 08038BD3 */  j         .L800E2F4C
/* 7C228 800E2D78 00000000 */   nop
glabel .L800E2D7C
/* 7C22C 800E2D7C 0C038A72 */  jal       func_800E29C8
/* 7C230 800E2D80 00000000 */   nop
/* 7C234 800E2D84 08038BD3 */  j         .L800E2F4C
/* 7C238 800E2D88 00000000 */   nop
glabel .L800E2D8C
/* 7C23C 800E2D8C 0C038D12 */  jal       integrate_gravity
/* 7C240 800E2D90 00000000 */   nop
/* 7C244 800E2D94 C600002C */  lwc1      $f0, 0x2C($s0)
/* 7C248 800E2D98 C6020070 */  lwc1      $f2, 0x70($s0)
/* 7C24C 800E2D9C 46020000 */  add.s     $f0, $f0, $f2
/* 7C250 800E2DA0 4480A000 */  mtc1      $zero, $f20
/* 7C254 800E2DA4 00000000 */  nop
/* 7C258 800E2DA8 4614103E */  c.le.s    $f2, $f20
/* 7C25C 800E2DAC 00000000 */  nop
/* 7C260 800E2DB0 45000066 */  bc1f      .L800E2F4C
/* 7C264 800E2DB4 E600002C */   swc1     $f0, 0x2C($s0)
/* 7C268 800E2DB8 0C0389AC */  jal       record_jump_apex
/* 7C26C 800E2DBC 00000000 */   nop
/* 7C270 800E2DC0 0C011052 */  jal       is_starting_conversation
/* 7C274 800E2DC4 00000000 */   nop
/* 7C278 800E2DC8 1040001F */  beqz      $v0, .L800E2E48
/* 7C27C 800E2DCC 00000000 */   nop
/* 7C280 800E2DD0 3C013E1E */  lui       $at, (0x3E1E0C17 >> 16)
/* 7C284 800E2DD4 34210C17 */  ori       $at, $at, (0x3E1E0C17 & 0xFFFF)
/* 7C288 800E2DD8 44810000 */  mtc1      $at, $f0
/* 7C28C 800E2DDC 3C01BEB3 */  lui       $at, (0xBEB33DB0 >> 16)
/* 7C290 800E2DE0 34213DB0 */  ori       $at, $at, (0xBEB33DB0 & 0xFFFF)
/* 7C294 800E2DE4 44811000 */  mtc1      $at, $f2
/* 7C298 800E2DE8 E6140078 */  swc1      $f20, 0x78($s0)
/* 7C29C 800E2DEC E614007C */  swc1      $f20, 0x7C($s0)
/* 7C2A0 800E2DF0 E6000070 */  swc1      $f0, 0x70($s0)
/* 7C2A4 800E2DF4 08038B94 */  j         .L800E2E50
/* 7C2A8 800E2DF8 E6020074 */   swc1     $f2, 0x74($s0)
glabel .L800E2DFC
/* 7C2AC 800E2DFC C6000070 */  lwc1      $f0, 0x70($s0)
/* 7C2B0 800E2E00 3C014012 */  lui       $at, (0x40120000 >> 16)
/* 7C2B4 800E2E04 44811800 */  mtc1      $at, $f3
/* 7C2B8 800E2E08 44801000 */  mtc1      $zero, $f2
/* 7C2BC 800E2E0C 46000021 */  cvt.d.s   $f0, $f0
/* 7C2C0 800E2E10 46220001 */  sub.d     $f0, $f0, $f2
/* 7C2C4 800E2E14 C602002C */  lwc1      $f2, 0x2C($s0)
/* 7C2C8 800E2E18 46200020 */  cvt.s.d   $f0, $f0
/* 7C2CC 800E2E1C E6000070 */  swc1      $f0, 0x70($s0)
/* 7C2D0 800E2E20 46000106 */  mov.s     $f4, $f0
/* 7C2D4 800E2E24 46001080 */  add.s     $f2, $f2, $f0
/* 7C2D8 800E2E28 44800000 */  mtc1      $zero, $f0
/* 7C2DC 800E2E2C 00000000 */  nop
/* 7C2E0 800E2E30 4600203E */  c.le.s    $f4, $f0
/* 7C2E4 800E2E34 00000000 */  nop
/* 7C2E8 800E2E38 45000044 */  bc1f      .L800E2F4C
/* 7C2EC 800E2E3C E602002C */   swc1     $f2, 0x2C($s0)
/* 7C2F0 800E2E40 0C0389AC */  jal       record_jump_apex
/* 7C2F4 800E2E44 00000000 */   nop
.L800E2E48:
/* 7C2F8 800E2E48 0C038C1B */  jal       gravity_use_fall_parms
/* 7C2FC 800E2E4C 00000000 */   nop
.L800E2E50:
/* 7C300 800E2E50 0C038D12 */  jal       integrate_gravity
/* 7C304 800E2E54 00000000 */   nop
/* 7C308 800E2E58 0C039769 */  jal       set_action_state
/* 7C30C 800E2E5C 24040008 */   addiu    $a0, $zero, 0x8
/* 7C310 800E2E60 08038BD3 */  j         .L800E2F4C
/* 7C314 800E2E64 00000000 */   nop
glabel .L800E2E68
/* 7C318 800E2E68 8E0200DC */  lw        $v0, 0xDC($s0)
/* 7C31C 800E2E6C 30428000 */  andi      $v0, $v0, 0x8000
/* 7C320 800E2E70 1440001B */  bnez      $v0, .L800E2EE0
/* 7C324 800E2E74 00000000 */   nop
/* 7C328 800E2E78 0C0389AC */  jal       record_jump_apex
/* 7C32C 800E2E7C 00000000 */   nop
/* 7C330 800E2E80 0C039769 */  jal       set_action_state
/* 7C334 800E2E84 24040005 */   addiu    $a0, $zero, 0x5
/* 7C338 800E2E88 0C038D12 */  jal       integrate_gravity
/* 7C33C 800E2E8C 00000000 */   nop
/* 7C340 800E2E90 8E020000 */  lw        $v0, 0x0($s0)
/* 7C344 800E2E94 3C030004 */  lui       $v1, (0x40000 >> 16)
/* 7C348 800E2E98 00431024 */  and       $v0, $v0, $v1
/* 7C34C 800E2E9C 10400010 */  beqz      $v0, .L800E2EE0
/* 7C350 800E2EA0 00000000 */   nop
/* 7C354 800E2EA4 C6060074 */  lwc1      $f6, 0x74($s0)
/* 7C358 800E2EA8 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 7C35C 800E2EAC 44811000 */  mtc1      $at, $f2
/* 7C360 800E2EB0 00000000 */  nop
/* 7C364 800E2EB4 46023182 */  mul.s     $f6, $f6, $f2
/* 7C368 800E2EB8 00000000 */  nop
/* 7C36C 800E2EBC C6040078 */  lwc1      $f4, 0x78($s0)
/* 7C370 800E2EC0 46022102 */  mul.s     $f4, $f4, $f2
/* 7C374 800E2EC4 00000000 */  nop
/* 7C378 800E2EC8 C600007C */  lwc1      $f0, 0x7C($s0)
/* 7C37C 800E2ECC 46020002 */  mul.s     $f0, $f0, $f2
/* 7C380 800E2ED0 00000000 */  nop
/* 7C384 800E2ED4 E6060074 */  swc1      $f6, 0x74($s0)
/* 7C388 800E2ED8 E6040078 */  swc1      $f4, 0x78($s0)
/* 7C38C 800E2EDC E600007C */  swc1      $f0, 0x7C($s0)
.L800E2EE0:
/* 7C390 800E2EE0 0C038D12 */  jal       integrate_gravity
/* 7C394 800E2EE4 00000000 */   nop
/* 7C398 800E2EE8 C6020070 */  lwc1      $f2, 0x70($s0)
/* 7C39C 800E2EEC 44800000 */  mtc1      $zero, $f0
/* 7C3A0 800E2EF0 00000000 */  nop
/* 7C3A4 800E2EF4 4600103E */  c.le.s    $f2, $f0
/* 7C3A8 800E2EF8 00000000 */  nop
/* 7C3AC 800E2EFC 45000009 */  bc1f      .L800E2F24
/* 7C3B0 800E2F00 00000000 */   nop
/* 7C3B4 800E2F04 0C0389AC */  jal       record_jump_apex
/* 7C3B8 800E2F08 00000000 */   nop
/* 7C3BC 800E2F0C 0C038C1B */  jal       gravity_use_fall_parms
/* 7C3C0 800E2F10 00000000 */   nop
/* 7C3C4 800E2F14 0C038D12 */  jal       integrate_gravity
/* 7C3C8 800E2F18 00000000 */   nop
/* 7C3CC 800E2F1C 0C039769 */  jal       set_action_state
/* 7C3D0 800E2F20 24040008 */   addiu    $a0, $zero, 0x8
.L800E2F24:
/* 7C3D4 800E2F24 C6000070 */  lwc1      $f0, 0x70($s0)
/* 7C3D8 800E2F28 C602006C */  lwc1      $f2, 0x6C($s0)
/* 7C3DC 800E2F2C 4600103C */  c.lt.s    $f2, $f0
/* 7C3E0 800E2F30 00000000 */  nop
/* 7C3E4 800E2F34 45030001 */  bc1tl     .L800E2F3C
/* 7C3E8 800E2F38 E6020070 */   swc1     $f2, 0x70($s0)
.L800E2F3C:
/* 7C3EC 800E2F3C C600002C */  lwc1      $f0, 0x2C($s0)
/* 7C3F0 800E2F40 C6020070 */  lwc1      $f2, 0x70($s0)
/* 7C3F4 800E2F44 46020000 */  add.s     $f0, $f0, $f2
/* 7C3F8 800E2F48 E600002C */  swc1      $f0, 0x2C($s0)
glabel .L800E2F4C
/* 7C3FC 800E2F4C 8FBF0014 */  lw        $ra, 0x14($sp)
/* 7C400 800E2F50 8FB00010 */  lw        $s0, 0x10($sp)
/* 7C404 800E2F54 D7B40018 */  ldc1      $f20, 0x18($sp)
/* 7C408 800E2F58 03E00008 */  jr        $ra
/* 7C40C 800E2F5C 27BD0020 */   addiu    $sp, $sp, 0x20

### DECOMPILED C INSTRUCTIONS:

void phys_update_jump(void) {
    PlayerStatus* playerStatus = &gPlayerStatus;

    if (playerStatus->timeInAir != 0) {
        switch (playerStatus->actionState) {
            case ACTION_STATE_LAUNCH:
                func_800E2BB0();
                return;
            case ACTION_STATE_LANDING_ON_SWITCH:
                handle_switch_hit();
                return;
            case ACTION_STATE_BOUNCE:
                integrate_gravity();
                playerStatus->position.y += playerStatus->gravityIntegrator[0];
                if (playerStatus->gravityIntegrator[0] <= 0.0f) {
                    record_jump_apex();
                    if (is_starting_conversation()) {
                        playerStatus->gravityIntegrator[0] = 0.154343f;
                        playerStatus->gravityIntegrator[1] = -0.35008f;
                        playerStatus->gravityIntegrator[2] = 0.0f;
                        playerStatus->gravityIntegrator[3] = 0.0f;
                    } else {
                        gravity_use_fall_parms();
                    }
                    integrate_gravity();
                    set_action_state(ACTION_STATE_FALLING);
                }
                return;
            case ACTION_STATE_HOP:
                playerStatus->gravityIntegrator[0] -= 4.5;
                playerStatus->position.y += playerStatus->gravityIntegrator[0];
                if (playerStatus->gravityIntegrator[0] <= 0.0f) {
                    record_jump_apex();
                    gravity_use_fall_parms();
                    integrate_gravity();
                    set_action_state(ACTION_STATE_FALLING);
                }
                return;
            case ACTION_STATE_HIT_FIRE:
            case ACTION_STATE_HIT_LAVA:
                return;
            default:
                if (!(playerStatus->currentButtons & BUTTON_A)) {
                    record_jump_apex();
                    set_action_state(ACTION_STATE_HOP);
                    integrate_gravity();
                    if (playerStatus->flags & PS_FLAG_ENTERING_BATTLE) {
                        playerStatus->gravityIntegrator[1] *= 0.5f;
                        playerStatus->gravityIntegrator[2] *= 0.5f;
                        playerStatus->gravityIntegrator[3] *= 0.5f;
                    }
                }
                break;
        }
    }

    integrate_gravity();
    if (playerStatus->gravityIntegrator[0] <= 0.0f) {
        record_jump_apex();
        gravity_use_fall_parms();
        integrate_gravity();
        set_action_state(ACTION_STATE_FALLING);
    }

    if (playerStatus->gravityIntegrator[0] > playerStatus->maxJumpSpeed) {
        playerStatus->gravityIntegrator[0] = playerStatus->maxJumpSpeed;
    }
    playerStatus->position.y += playerStatus->gravityIntegrator[0];
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel squirt_update
/* 3B4974 E00B21E4 27BDFFB8 */  addiu     $sp, $sp, -0x48
/* 3B4978 E00B21E8 AFBF0028 */  sw        $ra, 0x28($sp)
/* 3B497C E00B21EC AFB50024 */  sw        $s5, 0x24($sp)
/* 3B4980 E00B21F0 AFB40020 */  sw        $s4, 0x20($sp)
/* 3B4984 E00B21F4 AFB3001C */  sw        $s3, 0x1C($sp)
/* 3B4988 E00B21F8 AFB20018 */  sw        $s2, 0x18($sp)
/* 3B498C E00B21FC AFB10014 */  sw        $s1, 0x14($sp)
/* 3B4990 E00B2200 AFB00010 */  sw        $s0, 0x10($sp)
/* 3B4994 E00B2204 F7B80040 */  sdc1      $f24, 0x40($sp)
/* 3B4998 E00B2208 F7B60038 */  sdc1      $f22, 0x38($sp)
/* 3B499C E00B220C F7B40030 */  sdc1      $f20, 0x30($sp)
/* 3B49A0 E00B2210 8C830000 */  lw        $v1, 0x0($a0)
/* 3B49A4 E00B2214 8C90000C */  lw        $s0, 0xC($a0)
/* 3B49A8 E00B2218 30620010 */  andi      $v0, $v1, 0x10
/* 3B49AC E00B221C 8E140000 */  lw        $s4, 0x0($s0)
/* 3B49B0 E00B2220 10400005 */  beqz      $v0, .LE00B2238
/* 3B49B4 E00B2224 2402FFEF */   addiu    $v0, $zero, -0x11
/* 3B49B8 E00B2228 00621024 */  and       $v0, $v1, $v0
/* 3B49BC E00B222C AC820000 */  sw        $v0, 0x0($a0)
/* 3B49C0 E00B2230 24020010 */  addiu     $v0, $zero, 0x10
/* 3B49C4 E00B2234 AE02002C */  sw        $v0, 0x2C($s0)
.LE00B2238:
/* 3B49C8 E00B2238 8E03002C */  lw        $v1, 0x2C($s0)
/* 3B49CC E00B223C 286203E8 */  slti      $v0, $v1, 0x3E8
/* 3B49D0 E00B2240 10400002 */  beqz      $v0, .LE00B224C
/* 3B49D4 E00B2244 2462FFFF */   addiu    $v0, $v1, -0x1
/* 3B49D8 E00B2248 AE02002C */  sw        $v0, 0x2C($s0)
.LE00B224C:
/* 3B49DC E00B224C 8E020030 */  lw        $v0, 0x30($s0)
/* 3B49E0 E00B2250 8E03002C */  lw        $v1, 0x2C($s0)
/* 3B49E4 E00B2254 24420001 */  addiu     $v0, $v0, 0x1
/* 3B49E8 E00B2258 04610005 */  bgez      $v1, .LE00B2270
/* 3B49EC E00B225C AE020030 */   sw       $v0, 0x30($s0)
/* 3B49F0 E00B2260 0C080128 */  jal       shim_remove_effect
/* 3B49F4 E00B2264 00000000 */   nop
/* 3B49F8 E00B2268 0802C90C */  j         .LE00B2430
/* 3B49FC E00B226C 00000000 */   nop
.LE00B2270:
/* 3B4A00 E00B2270 8E020054 */  lw        $v0, 0x54($s0)
/* 3B4A04 E00B2274 8E130028 */  lw        $s3, 0x28($s0)
/* 3B4A08 E00B2278 24420001 */  addiu     $v0, $v0, 0x1
/* 3B4A0C E00B227C AE020054 */  sw        $v0, 0x54($s0)
/* 3B4A10 E00B2280 2842000D */  slti      $v0, $v0, 0xD
/* 3B4A14 E00B2284 14400003 */  bnez      $v0, .LE00B2294
/* 3B4A18 E00B2288 0000902D */   daddu    $s2, $zero, $zero
/* 3B4A1C E00B228C 2402000C */  addiu     $v0, $zero, 0xC
/* 3B4A20 E00B2290 AE020054 */  sw        $v0, 0x54($s0)
.LE00B2294:
/* 3B4A24 E00B2294 3C158000 */  lui       $s5, (0x80000000 >> 16)
/* 3B4A28 E00B2298 0200882D */  daddu     $s1, $s0, $zero
/* 3B4A2C E00B229C 3C01437F */  lui       $at, (0x437F0000 >> 16)
/* 3B4A30 E00B22A0 4481C000 */  mtc1      $at, $f24
/* 3B4A34 E00B22A4 3C014F00 */  lui       $at, (0x4F000000 >> 16)
/* 3B4A38 E00B22A8 4481B000 */  mtc1      $at, $f22
.LE00B22AC:
/* 3B4A3C E00B22AC 8E220178 */  lw        $v0, 0x178($s1)
/* 3B4A40 E00B22B0 10400003 */  beqz      $v0, .LE00B22C0
/* 3B4A44 E00B22B4 2442FFFF */   addiu    $v0, $v0, -0x1
/* 3B4A48 E00B22B8 14400059 */  bnez      $v0, .LE00B2420
/* 3B4A4C E00B22BC AE220178 */   sw       $v0, 0x178($s1)
.LE00B22C0:
/* 3B4A50 E00B22C0 8E2201A8 */  lw        $v0, 0x1A8($s1)
/* 3B4A54 E00B22C4 24420001 */  addiu     $v0, $v0, 0x1
/* 3B4A58 E00B22C8 0040182D */  daddu     $v1, $v0, $zero
/* 3B4A5C E00B22CC 0073102A */  slt       $v0, $v1, $s3
/* 3B4A60 E00B22D0 14400002 */  bnez      $v0, .LE00B22DC
/* 3B4A64 E00B22D4 AE2301A8 */   sw       $v1, 0x1A8($s1)
/* 3B4A68 E00B22D8 0260182D */  daddu     $v1, $s3, $zero
.LE00B22DC:
/* 3B4A6C E00B22DC 44831000 */  mtc1      $v1, $f2
/* 3B4A70 E00B22E0 00000000 */  nop
/* 3B4A74 E00B22E4 468010A0 */  cvt.s.w   $f2, $f2
/* 3B4A78 E00B22E8 44930000 */  mtc1      $s3, $f0
/* 3B4A7C E00B22EC 00000000 */  nop
/* 3B4A80 E00B22F0 46800020 */  cvt.s.w   $f0, $f0
/* 3B4A84 E00B22F4 16800017 */  bnez      $s4, .LE00B2354
/* 3B4A88 E00B22F8 46001503 */   div.s    $f20, $f2, $f0
/* 3B4A8C E00B22FC C600001C */  lwc1      $f0, 0x1C($s0)
/* 3B4A90 E00B2300 C6020010 */  lwc1      $f2, 0x10($s0)
/* 3B4A94 E00B2304 46020001 */  sub.s     $f0, $f0, $f2
/* 3B4A98 E00B2308 46140002 */  mul.s     $f0, $f0, $f20
/* 3B4A9C E00B230C 00000000 */  nop
/* 3B4AA0 E00B2310 46001080 */  add.s     $f2, $f2, $f0
/* 3B4AA4 E00B2314 E62200E8 */  swc1      $f2, 0xE8($s1)
/* 3B4AA8 E00B2318 C6000020 */  lwc1      $f0, 0x20($s0)
/* 3B4AAC E00B231C C6020014 */  lwc1      $f2, 0x14($s0)
/* 3B4AB0 E00B2320 46020001 */  sub.s     $f0, $f0, $f2
/* 3B4AB4 E00B2324 46140002 */  mul.s     $f0, $f0, $f20
/* 3B4AB8 E00B2328 00000000 */  nop
/* 3B4ABC E00B232C 46001080 */  add.s     $f2, $f2, $f0
/* 3B4AC0 E00B2330 E6220118 */  swc1      $f2, 0x118($s1)
/* 3B4AC4 E00B2334 C6000024 */  lwc1      $f0, 0x24($s0)
/* 3B4AC8 E00B2338 C6020018 */  lwc1      $f2, 0x18($s0)
/* 3B4ACC E00B233C 46020001 */  sub.s     $f0, $f0, $f2
/* 3B4AD0 E00B2340 46140002 */  mul.s     $f0, $f0, $f20
/* 3B4AD4 E00B2344 00000000 */  nop
/* 3B4AD8 E00B2348 46001080 */  add.s     $f2, $f2, $f0
/* 3B4ADC E00B234C 0802C908 */  j         .LE00B2420
/* 3B4AE0 E00B2350 E6220148 */   swc1     $f2, 0x148($s1)
.LE00B2354:
/* 3B4AE4 E00B2354 3C014334 */  lui       $at, (0x43340000 >> 16)
/* 3B4AE8 E00B2358 44816000 */  mtc1      $at, $f12
/* 3B4AEC E00B235C 00000000 */  nop
/* 3B4AF0 E00B2360 460CA302 */  mul.s     $f12, $f20, $f12
/* 3B4AF4 E00B2364 00000000 */  nop
/* 3B4AF8 E00B2368 C600001C */  lwc1      $f0, 0x1C($s0)
/* 3B4AFC E00B236C C6020010 */  lwc1      $f2, 0x10($s0)
/* 3B4B00 E00B2370 46020001 */  sub.s     $f0, $f0, $f2
/* 3B4B04 E00B2374 46140002 */  mul.s     $f0, $f0, $f20
/* 3B4B08 E00B2378 00000000 */  nop
/* 3B4B0C E00B237C 46001080 */  add.s     $f2, $f2, $f0
/* 3B4B10 E00B2380 0C080140 */  jal       shim_sin_deg
/* 3B4B14 E00B2384 E62200E8 */   swc1     $f2, 0xE8($s1)
/* 3B4B18 E00B2388 3C0142F0 */  lui       $at, (0x42F00000 >> 16)
/* 3B4B1C E00B238C 44811000 */  mtc1      $at, $f2
/* 3B4B20 E00B2390 00000000 */  nop
/* 3B4B24 E00B2394 46020002 */  mul.s     $f0, $f0, $f2
/* 3B4B28 E00B2398 00000000 */  nop
/* 3B4B2C E00B239C C6040020 */  lwc1      $f4, 0x20($s0)
/* 3B4B30 E00B23A0 C6060014 */  lwc1      $f6, 0x14($s0)
/* 3B4B34 E00B23A4 46062101 */  sub.s     $f4, $f4, $f6
/* 3B4B38 E00B23A8 46142102 */  mul.s     $f4, $f4, $f20
/* 3B4B3C E00B23AC 00000000 */  nop
/* 3B4B40 E00B23B0 46043180 */  add.s     $f6, $f6, $f4
/* 3B4B44 E00B23B4 46003180 */  add.s     $f6, $f6, $f0
/* 3B4B48 E00B23B8 4618A102 */  mul.s     $f4, $f20, $f24
/* 3B4B4C E00B23BC 00000000 */  nop
/* 3B4B50 E00B23C0 E6260118 */  swc1      $f6, 0x118($s1)
/* 3B4B54 E00B23C4 C6000024 */  lwc1      $f0, 0x24($s0)
/* 3B4B58 E00B23C8 C6020018 */  lwc1      $f2, 0x18($s0)
/* 3B4B5C E00B23CC 46020001 */  sub.s     $f0, $f0, $f2
/* 3B4B60 E00B23D0 46140002 */  mul.s     $f0, $f0, $f20
/* 3B4B64 E00B23D4 00000000 */  nop
/* 3B4B68 E00B23D8 46001080 */  add.s     $f2, $f2, $f0
/* 3B4B6C E00B23DC 02121021 */  addu      $v0, $s0, $s2
/* 3B4B70 E00B23E0 4604C001 */  sub.s     $f0, $f24, $f4
/* 3B4B74 E00B23E4 244201D8 */  addiu     $v0, $v0, 0x1D8
/* 3B4B78 E00B23E8 4600B03E */  c.le.s    $f22, $f0
/* 3B4B7C E00B23EC 00000000 */  nop
/* 3B4B80 E00B23F0 45010005 */  bc1t      .LE00B2408
/* 3B4B84 E00B23F4 E6220148 */   swc1     $f2, 0x148($s1)
/* 3B4B88 E00B23F8 4600020D */  trunc.w.s $f8, $f0
/* 3B4B8C E00B23FC 44034000 */  mfc1      $v1, $f8
/* 3B4B90 E00B2400 0802C908 */  j         .LE00B2420
/* 3B4B94 E00B2404 A0430000 */   sb       $v1, 0x0($v0)
.LE00B2408:
/* 3B4B98 E00B2408 46160001 */  sub.s     $f0, $f0, $f22
/* 3B4B9C E00B240C 4600020D */  trunc.w.s $f8, $f0
/* 3B4BA0 E00B2410 44034000 */  mfc1      $v1, $f8
/* 3B4BA4 E00B2414 00000000 */  nop
/* 3B4BA8 E00B2418 00751825 */  or        $v1, $v1, $s5
/* 3B4BAC E00B241C A0430000 */  sb        $v1, 0x0($v0)
.LE00B2420:
/* 3B4BB0 E00B2420 26520001 */  addiu     $s2, $s2, 0x1
/* 3B4BB4 E00B2424 2A42000C */  slti      $v0, $s2, 0xC
/* 3B4BB8 E00B2428 1440FFA0 */  bnez      $v0, .LE00B22AC
/* 3B4BBC E00B242C 26310004 */   addiu    $s1, $s1, 0x4
.LE00B2430:
/* 3B4BC0 E00B2430 8FBF0028 */  lw        $ra, 0x28($sp)
/* 3B4BC4 E00B2434 8FB50024 */  lw        $s5, 0x24($sp)
/* 3B4BC8 E00B2438 8FB40020 */  lw        $s4, 0x20($sp)
/* 3B4BCC E00B243C 8FB3001C */  lw        $s3, 0x1C($sp)
/* 3B4BD0 E00B2440 8FB20018 */  lw        $s2, 0x18($sp)
/* 3B4BD4 E00B2444 8FB10014 */  lw        $s1, 0x14($sp)
/* 3B4BD8 E00B2448 8FB00010 */  lw        $s0, 0x10($sp)
/* 3B4BDC E00B244C D7B80040 */  ldc1      $f24, 0x40($sp)
/* 3B4BE0 E00B2450 D7B60038 */  ldc1      $f22, 0x38($sp)
/* 3B4BE4 E00B2454 D7B40030 */  ldc1      $f20, 0x30($sp)
/* 3B4BE8 E00B2458 03E00008 */  jr        $ra
/* 3B4BEC E00B245C 27BD0048 */   addiu    $sp, $sp, 0x48

### DECOMPILED C INSTRUCTIONS:

void squirt_update(EffectInstance* effect) {
    SquirtFXData* data = effect->data.squirt;
    s32 unk_00 = data->unk_00;
    s32 unk_28;
    s32 var_v1;
    f32 factor;
    s32 i;

    if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
        effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
        data->unk_2C = 16;
    }

    if (data->unk_2C < 1000) {
        data->unk_2C--;
    }

    data->unk_30++;

    if (data->unk_2C < 0) {
        shim_remove_effect(effect);
        return;
    }

    unk_28 = data->unk_28;

    data->unk_54++;
    if (data->unk_54 > 12) {
        data->unk_54 = 12;
    }

    for (i = 0; i < 12; i++) {
        if (data->unk_178[i] == 0 || --data->unk_178[i] == 0) {
            data->unk_1A8[i]++;
            if (data->unk_1A8[i] >= unk_28) {
                var_v1 = unk_28;
            } else {
                var_v1 = data->unk_1A8[i];
            }

            factor = (f32) var_v1 / unk_28;

            if (unk_00 == 0) {
                data->unk_E8[i] = data->unk_10 + (data->unk_1C - data->unk_10) * factor;
                data->unk_118[i] = data->unk_14 + (data->unk_20 - data->unk_14) * factor;
                data->unk_148[i] = data->unk_18 + (data->unk_24 - data->unk_18) * factor;
            } else {
                data->unk_E8[i] = data->unk_10 + (data->unk_1C - data->unk_10) * factor;
                data->unk_118[i] = data->unk_14 + (data->unk_20 - data->unk_14) * factor + shim_sin_deg(factor * 180.0f) * 120.0f;
                data->unk_148[i] = data->unk_18 + (data->unk_24 - data->unk_18) * factor;
                data->unk_1D8[i] = 255.0f - factor * 255.0f;
            }
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel dispatch_damage_event_actor
/* 1A6FB4 802786D4 27BDFFD0 */  addiu     $sp, $sp, -0x30
/* 1A6FB8 802786D8 AFB00018 */  sw        $s0, 0x18($sp)
/* 1A6FBC 802786DC 0080802D */  daddu     $s0, $a0, $zero
/* 1A6FC0 802786E0 AFB20020 */  sw        $s2, 0x20($sp)
/* 1A6FC4 802786E4 00C0902D */  daddu     $s2, $a2, $zero
/* 1A6FC8 802786E8 AFB30024 */  sw        $s3, 0x24($sp)
/* 1A6FCC 802786EC 3C13800E */  lui       $s3, %hi(gBattleStatus)
/* 1A6FD0 802786F0 2673C070 */  addiu     $s3, $s3, %lo(gBattleStatus)
/* 1A6FD4 802786F4 AFBF0028 */  sw        $ra, 0x28($sp)
/* 1A6FD8 802786F8 AFB1001C */  sw        $s1, 0x1C($sp)
/* 1A6FDC 802786FC A665017E */  sh        $a1, 0x17E($s3)
/* 1A6FE0 80278700 00052C00 */  sll       $a1, $a1, 16
/* 1A6FE4 80278704 00052C03 */  sra       $a1, $a1, 16
/* 1A6FE8 80278708 960301FA */  lhu       $v1, 0x1FA($s0)
/* 1A6FEC 8027870C 960201FC */  lhu       $v0, 0x1FC($s0)
/* 1A6FF0 80278710 00651821 */  addu      $v1, $v1, $a1
/* 1A6FF4 80278714 A60301FA */  sh        $v1, 0x1FA($s0)
/* 1A6FF8 80278718 00031C00 */  sll       $v1, $v1, 16
/* 1A6FFC 8027871C 00031C03 */  sra       $v1, $v1, 16
/* 1A7000 80278720 960401FA */  lhu       $a0, 0x1FA($s0)
/* 1A7004 80278724 00431021 */  addu      $v0, $v0, $v1
/* 1A7008 80278728 A60201FC */  sh        $v0, 0x1FC($s0)
/* 1A700C 8027872C 00832023 */  subu      $a0, $a0, $v1
/* 1A7010 80278730 A60401FA */  sh        $a0, 0x1FA($s0)
/* 1A7014 80278734 A6600180 */  sh        $zero, 0x180($s3)
/* 1A7018 80278738 920201B8 */  lbu       $v0, 0x1B8($s0)
/* 1A701C 8027873C 0060282D */  daddu     $a1, $v1, $zero
/* 1A7020 80278740 00451023 */  subu      $v0, $v0, $a1
/* 1A7024 80278744 A20201B8 */  sb        $v0, 0x1B8($s0)
/* 1A7028 80278748 00021600 */  sll       $v0, $v0, 24
/* 1A702C 8027874C 00021E03 */  sra       $v1, $v0, 24
/* 1A7030 80278750 1C600006 */  bgtz      $v1, .L8027876C
/* 1A7034 80278754 2611000C */   addiu    $s1, $s0, 0xC
/* 1A7038 80278758 96620180 */  lhu       $v0, 0x180($s3)
/* 1A703C 8027875C 24120020 */  addiu     $s2, $zero, 0x20
/* 1A7040 80278760 00431021 */  addu      $v0, $v0, $v1
/* 1A7044 80278764 A6620180 */  sh        $v0, 0x180($s3)
/* 1A7048 80278768 A20001B8 */  sb        $zero, 0x1B8($s0)
.L8027876C:
/* 1A704C 8027876C 96620180 */  lhu       $v0, 0x180($s3)
/* 1A7050 80278770 00451021 */  addu      $v0, $v0, $a1
/* 1A7054 80278774 A6620180 */  sh        $v0, 0x180($s3)
/* 1A7058 80278778 A60201F8 */  sh        $v0, 0x1F8($s0)
/* 1A705C 8027877C 8E620000 */  lw        $v0, 0x0($s3)
/* 1A7060 80278780 30420020 */  andi      $v0, $v0, 0x20
/* 1A7064 80278784 10400007 */  beqz      $v0, .L802787A4
/* 1A7068 80278788 A260019A */   sb       $zero, 0x19A($s3)
/* 1A706C 8027878C 24020009 */  addiu     $v0, $zero, 0x9
/* 1A7070 80278790 52420001 */  beql      $s2, $v0, .L80278798
/* 1A7074 80278794 2412000A */   addiu    $s2, $zero, 0xA
.L80278798:
/* 1A7078 80278798 24020017 */  addiu     $v0, $zero, 0x17
/* 1A707C 8027879C 52420001 */  beql      $s2, $v0, .L802787A4
/* 1A7080 802787A0 24120019 */   addiu    $s2, $zero, 0x19
.L802787A4:
/* 1A7084 802787A4 24020020 */  addiu     $v0, $zero, 0x20
/* 1A7088 802787A8 16420006 */  bne       $s2, $v0, .L802787C4
/* 1A708C 802787AC 24020011 */   addiu    $v0, $zero, 0x11
/* 1A7090 802787B0 50C20001 */  beql      $a2, $v0, .L802787B8
/* 1A7094 802787B4 24120025 */   addiu    $s2, $zero, 0x25
.L802787B8:
/* 1A7098 802787B8 2402002F */  addiu     $v0, $zero, 0x2F
/* 1A709C 802787BC 50C20001 */  beql      $a2, $v0, .L802787C4
/* 1A70A0 802787C0 24120026 */   addiu    $s2, $zero, 0x26
.L802787C4:
/* 1A70A4 802787C4 54E0002C */  bnel      $a3, $zero, .L80278878
/* 1A70A8 802787C8 AFA00010 */   sw       $zero, 0x10($sp)
/* 1A70AC 802787CC 0200202D */  daddu     $a0, $s0, $zero
/* 1A70B0 802787D0 86110428 */  lh        $s1, 0x428($s0)
/* 1A70B4 802787D4 0C098C8C */  jal       func_80263230
/* 1A70B8 802787D8 0200282D */   daddu    $a1, $s0, $zero
/* 1A70BC 802787DC 50400032 */  beql      $v0, $zero, .L802788A8
/* 1A70C0 802787E0 A6110428 */   sh       $s1, 0x428($s0)
/* 1A70C4 802787E4 86020230 */  lh        $v0, 0x230($s0)
/* 1A70C8 802787E8 86030232 */  lh        $v1, 0x232($s0)
/* 1A70CC 802787EC 86040234 */  lh        $a0, 0x234($s0)
/* 1A70D0 802787F0 AFA00010 */  sw        $zero, 0x10($sp)
/* 1A70D4 802787F4 86670180 */  lh        $a3, 0x180($s3)
/* 1A70D8 802787F8 44826000 */  mtc1      $v0, $f12
/* 1A70DC 802787FC 00000000 */  nop
/* 1A70E0 80278800 46806320 */  cvt.s.w   $f12, $f12
/* 1A70E4 80278804 44840000 */  mtc1      $a0, $f0
/* 1A70E8 80278808 00000000 */  nop
/* 1A70EC 8027880C 46800020 */  cvt.s.w   $f0, $f0
/* 1A70F0 80278810 44060000 */  mfc1      $a2, $f0
/* 1A70F4 80278814 44837000 */  mtc1      $v1, $f14
/* 1A70F8 80278818 00000000 */  nop
/* 1A70FC 8027881C 0C09996B */  jal       show_next_damage_popup
/* 1A7100 80278820 468073A0 */   cvt.s.w  $f14, $f14
/* 1A7104 80278824 86020230 */  lh        $v0, 0x230($s0)
/* 1A7108 80278828 86030232 */  lh        $v1, 0x232($s0)
/* 1A710C 8027882C 44820000 */  mtc1      $v0, $f0
/* 1A7110 80278830 00000000 */  nop
/* 1A7114 80278834 46800020 */  cvt.s.w   $f0, $f0
/* 1A7118 80278838 44050000 */  mfc1      $a1, $f0
/* 1A711C 8027883C 44830000 */  mtc1      $v1, $f0
/* 1A7120 80278840 00000000 */  nop
/* 1A7124 80278844 46800020 */  cvt.s.w   $f0, $f0
/* 1A7128 80278848 44060000 */  mfc1      $a2, $f0
/* 1A712C 8027884C 86020234 */  lh        $v0, 0x234($s0)
/* 1A7130 80278850 86630180 */  lh        $v1, 0x180($s3)
/* 1A7134 80278854 44820000 */  mtc1      $v0, $f0
/* 1A7138 80278858 00000000 */  nop
/* 1A713C 8027885C 46800020 */  cvt.s.w   $f0, $f0
/* 1A7140 80278860 44070000 */  mfc1      $a3, $f0
/* 1A7144 80278864 0200202D */  daddu     $a0, $s0, $zero
/* 1A7148 80278868 0C0999B9 */  jal       show_damage_fx
/* 1A714C 8027886C AFA30010 */   sw       $v1, 0x10($sp)
/* 1A7150 80278870 0809E22A */  j         .L802788A8
/* 1A7154 80278874 A6110428 */   sh       $s1, 0x428($s0)
.L80278878:
/* 1A7158 80278878 C62C000C */  lwc1      $f12, 0xC($s1)
/* 1A715C 8027887C C62E0010 */  lwc1      $f14, 0x10($s1)
/* 1A7160 80278880 86670180 */  lh        $a3, 0x180($s3)
/* 1A7164 80278884 0C09996B */  jal       show_next_damage_popup
/* 1A7168 80278888 8E260014 */   lw       $a2, 0x14($s1)
/* 1A716C 8027888C 86620180 */  lh        $v0, 0x180($s3)
/* 1A7170 80278890 AFA20010 */  sw        $v0, 0x10($sp)
/* 1A7174 80278894 8E25000C */  lw        $a1, 0xC($s1)
/* 1A7178 80278898 8E260010 */  lw        $a2, 0x10($s1)
/* 1A717C 8027889C 8E270014 */  lw        $a3, 0x14($s1)
/* 1A7180 802788A0 0C0999B9 */  jal       show_damage_fx
/* 1A7184 802788A4 0200202D */   daddu    $a0, $s0, $zero
.L802788A8:
/* 1A7188 802788A8 86620180 */  lh        $v0, 0x180($s3)
/* 1A718C 802788AC 18400003 */  blez      $v0, .L802788BC
/* 1A7190 802788B0 0200202D */   daddu    $a0, $s0, $zero
/* 1A7194 802788B4 0C099C06 */  jal       func_80267018
/* 1A7198 802788B8 24050001 */   addiu    $a1, $zero, 0x1
.L802788BC:
/* 1A719C 802788BC 0200202D */  daddu     $a0, $s0, $zero
/* 1A71A0 802788C0 0240282D */  daddu     $a1, $s2, $zero
/* 1A71A4 802788C4 8C820000 */  lw        $v0, 0x0($a0)
/* 1A71A8 802788C8 3C030008 */  lui       $v1, (0x80000 >> 16)
/* 1A71AC 802788CC 00431025 */  or        $v0, $v0, $v1
/* 1A71B0 802788D0 0C09DC58 */  jal       dispatch_event_actor
/* 1A71B4 802788D4 AC820000 */   sw       $v0, 0x0($a0)
/* 1A71B8 802788D8 8FBF0028 */  lw        $ra, 0x28($sp)
/* 1A71BC 802788DC 8FB30024 */  lw        $s3, 0x24($sp)
/* 1A71C0 802788E0 8FB20020 */  lw        $s2, 0x20($sp)
/* 1A71C4 802788E4 8FB1001C */  lw        $s1, 0x1C($sp)
/* 1A71C8 802788E8 8FB00018 */  lw        $s0, 0x18($sp)
/* 1A71CC 802788EC 0000102D */  daddu     $v0, $zero, $zero
/* 1A71D0 802788F0 03E00008 */  jr        $ra
/* 1A71D4 802788F4 27BD0030 */   addiu    $sp, $sp, 0x30

### DECOMPILED C INSTRUCTIONS:

s32 dispatch_damage_event_actor(Actor* actor, s32 damageAmount, s32 originalEvent, s32 stopMotion) {
    BattleStatus* battleStatus = &gBattleStatus;
    ActorState* state = &actor->state;
    s32 dispatchEvent = originalEvent;
    s32 currentAttackDamage;
    s32 hpChangeCounter;
    s32 hpChange;
    s32 flagCheck;
    s32 new_var;

    battleStatus->currentAttackDamage = damageAmount;
    hpChange = (s16) damageAmount;
    actor->hpChangeCounter += hpChange;
    new_var = actor->hpChangeCounter;
    hpChange = new_var;
    actor->damageCounter += hpChange;
    actor->hpChangeCounter -= hpChange;
    battleStatus->lastAttackDamage = 0;
    actor->currentHP -= hpChange;

    if (actor->currentHP <= 0) {
        dispatchEvent = EVENT_DEATH;
        battleStatus->lastAttackDamage += actor->currentHP;
        actor->currentHP = 0;
    }

    battleStatus->lastAttackDamage += hpChange;
    actor->lastDamageTaken = battleStatus->lastAttackDamage;
    battleStatus->currentDamageSource = DMG_SRC_DEFAULT;
    if (battleStatus->flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
        if (dispatchEvent == EVENT_HIT_COMBO) {
            dispatchEvent = EVENT_HIT;
        }
        if (dispatchEvent == EVENT_ZERO_DAMAGE) {
            dispatchEvent = EVENT_IMMUNE;
        }
    }
    if (dispatchEvent == EVENT_DEATH) {
        if (originalEvent == EVENT_SPIN_SMASH_LAUNCH_HIT) {
            dispatchEvent = EVENT_SPIN_SMASH_LAUNCH_DEATH;
        }
        if (originalEvent == EVENT_SHOCK_HIT) {
            dispatchEvent = EVENT_SHOCK_DEATH;
        }
    }

    if (!stopMotion) {
        s32 oldTargetActorID = actor->targetActorID;

        if (func_80263230(actor, actor) != 0) {
            show_next_damage_popup(actor->targetData[0].posA.x, actor->targetData[0].posA.y, actor->targetData[0].posA.z, battleStatus->lastAttackDamage, 0);
            show_damage_fx(actor, actor->targetData[0].posA.x, actor->targetData[0].posA.y, actor->targetData[0].posA.z, battleStatus->lastAttackDamage);
            actor->targetActorID = oldTargetActorID;
        } else {
            actor->targetActorID = oldTargetActorID;
        }
    } else {
        show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
        show_damage_fx(actor, state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage);
    }

    if (battleStatus->lastAttackDamage > 0) {
        func_80267018(actor, 1);
    }
    actor->flags |= ACTOR_FLAG_HEALTH_BAR_HIDDEN;
    dispatch_event_actor(actor, dispatchEvent);
    return 0;
}


### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_802542CC
/* 182BAC 802542CC 27BDFFB8 */  addiu     $sp, $sp, -0x48
/* 182BB0 802542D0 AFB3001C */  sw        $s3, 0x1C($sp)
/* 182BB4 802542D4 0080982D */  daddu     $s3, $a0, $zero
/* 182BB8 802542D8 AFBF0030 */  sw        $ra, 0x30($sp)
/* 182BBC 802542DC AFB7002C */  sw        $s7, 0x2C($sp)
/* 182BC0 802542E0 AFB60028 */  sw        $s6, 0x28($sp)
/* 182BC4 802542E4 AFB50024 */  sw        $s5, 0x24($sp)
/* 182BC8 802542E8 AFB40020 */  sw        $s4, 0x20($sp)
/* 182BCC 802542EC AFB20018 */  sw        $s2, 0x18($sp)
/* 182BD0 802542F0 AFB10014 */  sw        $s1, 0x14($sp)
/* 182BD4 802542F4 AFB00010 */  sw        $s0, 0x10($sp)
/* 182BD8 802542F8 F7B60040 */  sdc1      $f22, 0x40($sp)
/* 182BDC 802542FC F7B40038 */  sdc1      $f20, 0x38($sp)
/* 182BE0 80254300 8E7201F4 */  lw        $s2, 0x1F4($s3)
/* 182BE4 80254304 8E4300C0 */  lw        $v1, 0xC0($s2)
/* 182BE8 80254308 906207DB */  lbu       $v0, 0x7DB($v1)
/* 182BEC 8025430C 0000A82D */  daddu     $s5, $zero, $zero
/* 182BF0 80254310 A06008AC */  sb        $zero, 0x8AC($v1)
/* 182BF4 80254314 24420001 */  addiu     $v0, $v0, 0x1
/* 182BF8 80254318 A06207DB */  sb        $v0, 0x7DB($v1)
/* 182BFC 8025431C 3C031000 */  lui       $v1, (0x10000000 >> 16)
/* 182C00 80254320 8E7201F4 */  lw        $s2, 0x1F4($s3)
/* 182C04 80254324 8E620000 */  lw        $v0, 0x0($s3)
/* 182C08 80254328 827701F3 */  lb        $s7, 0x1F3($s3)
/* 182C0C 8025432C 00431025 */  or        $v0, $v0, $v1
/* 182C10 80254330 1AE0007D */  blez      $s7, .L80254528
/* 182C14 80254334 AE620000 */   sw       $v0, 0x0($s3)
/* 182C18 80254338 3C168000 */  lui       $s6, (0x80000000 >> 16)
/* 182C1C 8025433C 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 182C20 80254340 4481B000 */  mtc1      $at, $f22
/* 182C24 80254344 3C014F00 */  lui       $at, (0x4F000000 >> 16)
/* 182C28 80254348 4481A000 */  mtc1      $at, $f20
.L8025434C:
/* 182C2C 8025434C 8E420094 */  lw        $v0, 0x94($s2)
/* 182C30 80254350 10400070 */  beqz      $v0, .L80254514
/* 182C34 80254354 00000000 */   nop
/* 182C38 80254358 8E420000 */  lw        $v0, 0x0($s2)
/* 182C3C 8025435C 30420002 */  andi      $v0, $v0, 0x2
/* 182C40 80254360 1440006C */  bnez      $v0, .L80254514
/* 182C44 80254364 00000000 */   nop
/* 182C48 80254368 8E4300C0 */  lw        $v1, 0xC0($s2)
/* 182C4C 8025436C 0000A02D */  daddu     $s4, $zero, $zero
/* 182C50 80254370 0060802D */  daddu     $s0, $v1, $zero
/* 182C54 80254374 0060882D */  daddu     $s1, $v1, $zero
/* 182C58 80254378 A20007D8 */  sb        $zero, 0x7D8($s0)
/* 182C5C 8025437C A20007D9 */  sb        $zero, 0x7D9($s0)
.L80254380:
/* 182C60 80254380 C6400058 */  lwc1      $f0, 0x58($s2)
/* 182C64 80254384 4600010D */  trunc.w.s $f4, $f0
/* 182C68 80254388 44022000 */  mfc1      $v0, $f4
/* 182C6C 8025438C 00000000 */  nop
/* 182C70 80254390 A60207FC */  sh        $v0, 0x7FC($s0)
/* 182C74 80254394 C640005C */  lwc1      $f0, 0x5C($s2)
/* 182C78 80254398 4600010D */  trunc.w.s $f4, $f0
/* 182C7C 8025439C 44022000 */  mfc1      $v0, $f4
/* 182C80 802543A0 00000000 */  nop
/* 182C84 802543A4 A602081C */  sh        $v0, 0x81C($s0)
/* 182C88 802543A8 C6400060 */  lwc1      $f0, 0x60($s2)
/* 182C8C 802543AC 4600010D */  trunc.w.s $f4, $f0
/* 182C90 802543B0 44022000 */  mfc1      $v0, $f4
/* 182C94 802543B4 00000000 */  nop
/* 182C98 802543B8 A602083C */  sh        $v0, 0x83C($s0)
/* 182C9C 802543BC C660018C */  lwc1      $f0, 0x18C($s3)
/* 182CA0 802543C0 4600010D */  trunc.w.s $f4, $f0
/* 182CA4 802543C4 44022000 */  mfc1      $v0, $f4
/* 182CA8 802543C8 00000000 */  nop
/* 182CAC 802543CC A60207DC */  sh        $v0, 0x7DC($s0)
/* 182CB0 802543D0 86620168 */  lh        $v0, 0x168($s3)
/* 182CB4 802543D4 C6620188 */  lwc1      $f2, 0x188($s3)
/* 182CB8 802543D8 44820000 */  mtc1      $v0, $f0
/* 182CBC 802543DC 00000000 */  nop
/* 182CC0 802543E0 46800020 */  cvt.s.w   $f0, $f0
/* 182CC4 802543E4 46020002 */  mul.s     $f0, $f0, $f2
/* 182CC8 802543E8 00000000 */  nop
/* 182CCC 802543EC 4600010D */  trunc.w.s $f4, $f0
/* 182CD0 802543F0 44022000 */  mfc1      $v0, $f4
/* 182CD4 802543F4 00000000 */  nop
/* 182CD8 802543F8 A222085C */  sb        $v0, 0x85C($s1)
/* 182CDC 802543FC 8662016A */  lh        $v0, 0x16A($s3)
/* 182CE0 80254400 C6620188 */  lwc1      $f2, 0x188($s3)
/* 182CE4 80254404 44820000 */  mtc1      $v0, $f0
/* 182CE8 80254408 00000000 */  nop
/* 182CEC 8025440C 46800020 */  cvt.s.w   $f0, $f0
/* 182CF0 80254410 46020002 */  mul.s     $f0, $f0, $f2
/* 182CF4 80254414 00000000 */  nop
/* 182CF8 80254418 4600010D */  trunc.w.s $f4, $f0
D_8025441C:
/* 182CFC 8025441C 44022000 */  mfc1      $v0, $f4
/* 182D00 80254420 00000000 */  nop
/* 182D04 80254424 A222086C */  sb        $v0, 0x86C($s1)
/* 182D08 80254428 0C00A6C9 */  jal       clamp_angle
/* 182D0C 8025442C C66C015C */   lwc1     $f12, 0x15C($s3)
/* 182D10 80254430 46160002 */  mul.s     $f0, $f0, $f22
/* 182D14 80254434 00000000 */  nop
/* 182D18 80254438 4600A03E */  c.le.s    $f20, $f0
/* 182D1C 8025443C 00000000 */  nop
/* 182D20 80254440 45010005 */  bc1t      .L80254458
/* 182D24 80254444 2623087C */   addiu    $v1, $s1, 0x87C
/* 182D28 80254448 4600010D */  trunc.w.s $f4, $f0
/* 182D2C 8025444C 44022000 */  mfc1      $v0, $f4
/* 182D30 80254450 0809511C */  j         .L80254470
/* 182D34 80254454 A0620000 */   sb       $v0, 0x0($v1)
.L80254458:
/* 182D38 80254458 46140001 */  sub.s     $f0, $f0, $f20
/* 182D3C 8025445C 4600010D */  trunc.w.s $f4, $f0
/* 182D40 80254460 44022000 */  mfc1      $v0, $f4
/* 182D44 80254464 00000000 */  nop
/* 182D48 80254468 00561025 */  or        $v0, $v0, $s6
/* 182D4C 8025446C A0620000 */  sb        $v0, 0x0($v1)
.L80254470:
/* 182D50 80254470 0C00A6C9 */  jal       clamp_angle
/* 182D54 80254474 C66C0160 */   lwc1     $f12, 0x160($s3)
/* 182D58 80254478 46160002 */  mul.s     $f0, $f0, $f22
/* 182D5C 8025447C 00000000 */  nop
/* 182D60 80254480 4600A03E */  c.le.s    $f20, $f0
/* 182D64 80254484 00000000 */  nop
/* 182D68 80254488 45010005 */  bc1t      .L802544A0
/* 182D6C 8025448C 2623088C */   addiu    $v1, $s1, 0x88C
/* 182D70 80254490 4600010D */  trunc.w.s $f4, $f0
/* 182D74 80254494 44022000 */  mfc1      $v0, $f4
/* 182D78 80254498 0809512E */  j         .L802544B8
/* 182D7C 8025449C A0620000 */   sb       $v0, 0x0($v1)
.L802544A0:
/* 182D80 802544A0 46140001 */  sub.s     $f0, $f0, $f20
/* 182D84 802544A4 4600010D */  trunc.w.s $f4, $f0
/* 182D88 802544A8 44022000 */  mfc1      $v0, $f4
/* 182D8C 802544AC 00000000 */  nop
/* 182D90 802544B0 00561025 */  or        $v0, $v0, $s6
/* 182D94 802544B4 A0620000 */  sb        $v0, 0x0($v1)
.L802544B8:
/* 182D98 802544B8 0C00A6C9 */  jal       clamp_angle
/* 182D9C 802544BC C66C0164 */   lwc1     $f12, 0x164($s3)
/* 182DA0 802544C0 46160002 */  mul.s     $f0, $f0, $f22
/* 182DA4 802544C4 00000000 */  nop
/* 182DA8 802544C8 4600A03E */  c.le.s    $f20, $f0
/* 182DAC 802544CC 00000000 */  nop
/* 182DB0 802544D0 45010005 */  bc1t      .L802544E8
/* 182DB4 802544D4 2623089C */   addiu    $v1, $s1, 0x89C
/* 182DB8 802544D8 4600010D */  trunc.w.s $f4, $f0
/* 182DBC 802544DC 44022000 */  mfc1      $v0, $f4
/* 182DC0 802544E0 08095140 */  j         .L80254500
/* 182DC4 802544E4 A0620000 */   sb       $v0, 0x0($v1)
.L802544E8:
/* 182DC8 802544E8 46140001 */  sub.s     $f0, $f0, $f20
/* 182DCC 802544EC 4600010D */  trunc.w.s $f4, $f0
/* 182DD0 802544F0 44022000 */  mfc1      $v0, $f4
/* 182DD4 802544F4 00000000 */  nop
/* 182DD8 802544F8 00561025 */  or        $v0, $v0, $s6
/* 182DDC 802544FC A0620000 */  sb        $v0, 0x0($v1)
.L80254500:
/* 182DE0 80254500 26310001 */  addiu     $s1, $s1, 0x1
/* 182DE4 80254504 26940001 */  addiu     $s4, $s4, 0x1
/* 182DE8 80254508 2A820010 */  slti      $v0, $s4, 0x10
/* 182DEC 8025450C 1440FF9C */  bnez      $v0, .L80254380
/* 182DF0 80254510 26100002 */   addiu    $s0, $s0, 0x2
.L80254514:
/* 182DF4 80254514 8E52000C */  lw        $s2, 0xC($s2)
/* 182DF8 80254518 26B50001 */  addiu     $s5, $s5, 0x1
/* 182DFC 8025451C 02B7102A */  slt       $v0, $s5, $s7
/* 182E00 80254520 1440FF8A */  bnez      $v0, .L8025434C
/* 182E04 80254524 00000000 */   nop
.L80254528:
/* 182E08 80254528 8FBF0030 */  lw        $ra, 0x30($sp)
/* 182E0C 8025452C 8FB7002C */  lw        $s7, 0x2C($sp)
/* 182E10 80254530 8FB60028 */  lw        $s6, 0x28($sp)
/* 182E14 80254534 8FB50024 */  lw        $s5, 0x24($sp)
/* 182E18 80254538 8FB40020 */  lw        $s4, 0x20($sp)
/* 182E1C 8025453C 8FB3001C */  lw        $s3, 0x1C($sp)
/* 182E20 80254540 8FB20018 */  lw        $s2, 0x18($sp)
/* 182E24 80254544 8FB10014 */  lw        $s1, 0x14($sp)
/* 182E28 80254548 8FB00010 */  lw        $s0, 0x10($sp)
/* 182E2C 8025454C D7B60040 */  ldc1      $f22, 0x40($sp)
/* 182E30 80254550 D7B40038 */  ldc1      $f20, 0x38($sp)
/* 182E34 80254554 03E00008 */  jr        $ra
/* 182E38 80254558 27BD0048 */   addiu    $sp, $sp, 0x48

### DECOMPILED C INSTRUCTIONS:

void enable_actor_blur(Actor* actor) {
    ActorPart* partsTable = actor->partsTable;
    DecorationTable* decorationTable = partsTable->decorationTable;
    s32 i, j;
    s32 numParts;

    decorationTable->effectType = 0;
    decorationTable->unk_7DB++;
    actor->flags |= ACTOR_FLAG_BLUR_ENABLED;
    partsTable = actor->partsTable;
    numParts = actor->numParts;

    for (i = 0; i < numParts; i++) {
        if (partsTable->idleAnimations != NULL && !(partsTable->flags & ACTOR_PART_FLAG_2)) {
            decorationTable = partsTable->decorationTable;
            decorationTable->unk_7D8 = 0;
            decorationTable->unk_7D9 = 0;
            for (j = 0; j < ARRAY_COUNT(decorationTable->posX); j++) {
                decorationTable->posX[j] = partsTable->currentPos.x;
                decorationTable->posY[j] = partsTable->currentPos.y;
                decorationTable->posZ[j] = partsTable->currentPos.z;
                decorationTable->yaw[j] = actor->yaw;
                decorationTable->rotationPivotOffsetX[j] = (s32)(actor->rotationPivotOffset.x * actor->scalingFactor);
                decorationTable->rotationPivotOffsetY[j] = (s32)(actor->rotationPivotOffset.y * actor->scalingFactor);

                decorationTable->rotX[j] = clamp_angle(actor->rotation.x) * 0.5f;
                decorationTable->rotY[j] = clamp_angle(actor->rotation.y) * 0.5f;
                decorationTable->rotZ[j] = clamp_angle(actor->rotation.z) * 0.5f;
            }
        }
        partsTable = partsTable->nextPart;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel SetCamProperties
/* F0D9C 802CC3EC 27BDFF60 */  addiu     $sp, $sp, -0xA0
/* F0DA0 802CC3F0 AFB1005C */  sw        $s1, 0x5C($sp)
/* F0DA4 802CC3F4 0080882D */  daddu     $s1, $a0, $zero
/* F0DA8 802CC3F8 AFB20060 */  sw        $s2, 0x60($sp)
/* F0DAC 802CC3FC 00A0902D */  daddu     $s2, $a1, $zero
/* F0DB0 802CC400 AFBF0068 */  sw        $ra, 0x68($sp)
/* F0DB4 802CC404 AFB30064 */  sw        $s3, 0x64($sp)
/* F0DB8 802CC408 AFB00058 */  sw        $s0, 0x58($sp)
/* F0DBC 802CC40C F7BE0098 */  sdc1      $f30, 0x98($sp)
/* F0DC0 802CC410 F7BC0090 */  sdc1      $f28, 0x90($sp)
/* F0DC4 802CC414 F7BA0088 */  sdc1      $f26, 0x88($sp)
/* F0DC8 802CC418 F7B80080 */  sdc1      $f24, 0x80($sp)
/* F0DCC 802CC41C F7B60078 */  sdc1      $f22, 0x78($sp)
/* F0DD0 802CC420 F7B40070 */  sdc1      $f20, 0x70($sp)
/* F0DD4 802CC424 8E30000C */  lw        $s0, 0xC($s1)
/* F0DD8 802CC428 8E050000 */  lw        $a1, 0x0($s0)
/* F0DDC 802CC42C 0C0B1EAF */  jal       evt_get_variable
/* F0DE0 802CC430 26100004 */   addiu    $s0, $s0, 0x4
/* F0DE4 802CC434 8E050000 */  lw        $a1, 0x0($s0)
/* F0DE8 802CC438 26100004 */  addiu     $s0, $s0, 0x4
/* F0DEC 802CC43C 0220202D */  daddu     $a0, $s1, $zero
/* F0DF0 802CC440 3C06800B */  lui       $a2, %hi(gCameras)
/* F0DF4 802CC444 24C61D80 */  addiu     $a2, $a2, %lo(gCameras)
/* F0DF8 802CC448 00021880 */  sll       $v1, $v0, 2
/* F0DFC 802CC44C 00621821 */  addu      $v1, $v1, $v0
/* F0E00 802CC450 00031880 */  sll       $v1, $v1, 2
/* F0E04 802CC454 00621823 */  subu      $v1, $v1, $v0
/* F0E08 802CC458 000310C0 */  sll       $v0, $v1, 3
/* F0E0C 802CC45C 00621821 */  addu      $v1, $v1, $v0
/* F0E10 802CC460 000318C0 */  sll       $v1, $v1, 3
/* F0E14 802CC464 0C0B210B */  jal       evt_get_float_variable
/* F0E18 802CC468 00669821 */   addu     $s3, $v1, $a2
/* F0E1C 802CC46C 8E050000 */  lw        $a1, 0x0($s0)
/* F0E20 802CC470 26100004 */  addiu     $s0, $s0, 0x4
/* F0E24 802CC474 0220202D */  daddu     $a0, $s1, $zero
/* F0E28 802CC478 0C0B210B */  jal       evt_get_float_variable
/* F0E2C 802CC47C E7A00054 */   swc1     $f0, 0x54($sp)
/* F0E30 802CC480 8E050000 */  lw        $a1, 0x0($s0)
/* F0E34 802CC484 26100004 */  addiu     $s0, $s0, 0x4
/* F0E38 802CC488 0220202D */  daddu     $a0, $s1, $zero
/* F0E3C 802CC48C 0C0B210B */  jal       evt_get_float_variable
/* F0E40 802CC490 46000606 */   mov.s    $f24, $f0
/* F0E44 802CC494 8E050000 */  lw        $a1, 0x0($s0)
/* F0E48 802CC498 26100004 */  addiu     $s0, $s0, 0x4
/* F0E4C 802CC49C 0220202D */  daddu     $a0, $s1, $zero
/* F0E50 802CC4A0 0C0B210B */  jal       evt_get_float_variable
/* F0E54 802CC4A4 46000586 */   mov.s    $f22, $f0
/* F0E58 802CC4A8 8E050000 */  lw        $a1, 0x0($s0)
/* F0E5C 802CC4AC 26100004 */  addiu     $s0, $s0, 0x4
/* F0E60 802CC4B0 0220202D */  daddu     $a0, $s1, $zero
/* F0E64 802CC4B4 0C0B210B */  jal       evt_get_float_variable
/* F0E68 802CC4B8 46000506 */   mov.s    $f20, $f0
/* F0E6C 802CC4BC 8E050000 */  lw        $a1, 0x0($s0)
/* F0E70 802CC4C0 26100004 */  addiu     $s0, $s0, 0x4
/* F0E74 802CC4C4 0220202D */  daddu     $a0, $s1, $zero
/* F0E78 802CC4C8 0C0B210B */  jal       evt_get_float_variable
/* F0E7C 802CC4CC 46000786 */   mov.s    $f30, $f0
/* F0E80 802CC4D0 0220202D */  daddu     $a0, $s1, $zero
/* F0E84 802CC4D4 8E050000 */  lw        $a1, 0x0($s0)
/* F0E88 802CC4D8 0C0B210B */  jal       evt_get_float_variable
/* F0E8C 802CC4DC 46000706 */   mov.s    $f28, $f0
/* F0E90 802CC4E0 12400049 */  beqz      $s2, .L802CC608
/* F0E94 802CC4E4 46000686 */   mov.s    $f26, $f0
/* F0E98 802CC4E8 27A20038 */  addiu     $v0, $sp, 0x38
/* F0E9C 802CC4EC 3C0146FF */  lui       $at, (0x46FFFE00 >> 16)
/* F0EA0 802CC4F0 3421FE00 */  ori       $at, $at, (0x46FFFE00 & 0xFFFF)
/* F0EA4 802CC4F4 44811000 */  mtc1      $at, $f2
/* F0EA8 802CC4F8 44802000 */  mtc1      $zero, $f4
/* F0EAC 802CC4FC 3C01BF80 */  lui       $at, (0xBF800000 >> 16)
/* F0EB0 802CC500 44810000 */  mtc1      $at, $f0
/* F0EB4 802CC504 3C014120 */  lui       $at, (0x41200000 >> 16)
/* F0EB8 802CC508 44817000 */  mtc1      $at, $f14
/* F0EBC 802CC50C 4406A000 */  mfc1      $a2, $f20
/* F0EC0 802CC510 4600C306 */  mov.s     $f12, $f24
/* F0EC4 802CC514 E7A20044 */  swc1      $f2, 0x44($sp)
/* F0EC8 802CC518 AFA20018 */  sw        $v0, 0x18($sp)
/* F0ECC 802CC51C 27A2003C */  addiu     $v0, $sp, 0x3C
/* F0ED0 802CC520 AFA2001C */  sw        $v0, 0x1C($sp)
/* F0ED4 802CC524 27A20040 */  addiu     $v0, $sp, 0x40
/* F0ED8 802CC528 AFA20020 */  sw        $v0, 0x20($sp)
/* F0EDC 802CC52C 27A20044 */  addiu     $v0, $sp, 0x44
/* F0EE0 802CC530 AFA20024 */  sw        $v0, 0x24($sp)
/* F0EE4 802CC534 27A20048 */  addiu     $v0, $sp, 0x48
/* F0EE8 802CC538 AFA20028 */  sw        $v0, 0x28($sp)
/* F0EEC 802CC53C 27A2004C */  addiu     $v0, $sp, 0x4C
/* F0EF0 802CC540 AFA2002C */  sw        $v0, 0x2C($sp)
/* F0EF4 802CC544 27A20050 */  addiu     $v0, $sp, 0x50
/* F0EF8 802CC548 44072000 */  mfc1      $a3, $f4
/* F0EFC 802CC54C 460EB380 */  add.s     $f14, $f22, $f14
/* F0F00 802CC550 E7A00010 */  swc1      $f0, 0x10($sp)
/* F0F04 802CC554 E7A40014 */  swc1      $f4, 0x14($sp)
/* F0F08 802CC558 0C017449 */  jal       test_ray_zones
/* F0F0C 802CC55C AFA20030 */   sw       $v0, 0x30($sp)
/* F0F10 802CC560 0040182D */  daddu     $v1, $v0, $zero
/* F0F14 802CC564 0460001A */  bltz      $v1, .L802CC5D0
/* F0F18 802CC568 000310C0 */   sll      $v0, $v1, 3
/* F0F1C 802CC56C 00431023 */  subu      $v0, $v0, $v1
/* F0F20 802CC570 3C03800E */  lui       $v1, %hi(D_800D91D4)
/* F0F24 802CC574 8C6391D4 */  lw        $v1, %lo(D_800D91D4)($v1)
/* F0F28 802CC578 00021080 */  sll       $v0, $v0, 2
/* F0F2C 802CC57C 00431021 */  addu      $v0, $v0, $v1
/* F0F30 802CC580 8C420010 */  lw        $v0, 0x10($v0)
/* F0F34 802CC584 266304D8 */  addiu     $v1, $s3, 0x4D8
/* F0F38 802CC588 24440020 */  addiu     $a0, $v0, 0x20
.L802CC58C:
/* F0F3C 802CC58C 8C480000 */  lw        $t0, 0x0($v0)
/* F0F40 802CC590 8C490004 */  lw        $t1, 0x4($v0)
/* F0F44 802CC594 8C4A0008 */  lw        $t2, 0x8($v0)
/* F0F48 802CC598 8C4B000C */  lw        $t3, 0xC($v0)
/* F0F4C 802CC59C AC680000 */  sw        $t0, 0x0($v1)
/* F0F50 802CC5A0 AC690004 */  sw        $t1, 0x4($v1)
/* F0F54 802CC5A4 AC6A0008 */  sw        $t2, 0x8($v1)
/* F0F58 802CC5A8 AC6B000C */  sw        $t3, 0xC($v1)
/* F0F5C 802CC5AC 24420010 */  addiu     $v0, $v0, 0x10
/* F0F60 802CC5B0 1444FFF6 */  bne       $v0, $a0, .L802CC58C
/* F0F64 802CC5B4 24630010 */   addiu    $v1, $v1, 0x10
/* F0F68 802CC5B8 8C480000 */  lw        $t0, 0x0($v0)
/* F0F6C 802CC5BC 8C490004 */  lw        $t1, 0x4($v0)
/* F0F70 802CC5C0 8C4A0008 */  lw        $t2, 0x8($v0)
/* F0F74 802CC5C4 AC680000 */  sw        $t0, 0x0($v1)
/* F0F78 802CC5C8 AC690004 */  sw        $t1, 0x4($v1)
/* F0F7C 802CC5CC AC6A0008 */  sw        $t2, 0x8($v1)
.L802CC5D0:
/* F0F80 802CC5D0 0000102D */  daddu     $v0, $zero, $zero
/* F0F84 802CC5D4 E67804B0 */  swc1      $f24, 0x4B0($s3)
/* F0F88 802CC5D8 E67604B4 */  swc1      $f22, 0x4B4($s3)
/* F0F8C 802CC5DC E67404B8 */  swc1      $f20, 0x4B8($s3)
/* F0F90 802CC5E0 E67E04DC */  swc1      $f30, 0x4DC($s3)
/* F0F94 802CC5E4 E67C04E0 */  swc1      $f28, 0x4E0($s3)
/* F0F98 802CC5E8 E67A04FC */  swc1      $f26, 0x4FC($s3)
/* F0F9C 802CC5EC C7A60054 */  lwc1      $f6, 0x54($sp)
/* F0FA0 802CC5F0 24030001 */  addiu     $v1, $zero, 0x1
/* F0FA4 802CC5F4 E6660490 */  swc1      $f6, 0x490($s3)
/* F0FA8 802CC5F8 A6630506 */  sh        $v1, 0x506($s3)
/* F0FAC 802CC5FC A6630504 */  sh        $v1, 0x504($s3)
/* F0FB0 802CC600 080B318B */  j         .L802CC62C
/* F0FB4 802CC604 AE600508 */   sw       $zero, 0x508($s3)
.L802CC608:
/* F0FB8 802CC608 C6620484 */  lwc1      $f2, 0x484($s3)
/* F0FBC 802CC60C 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* F0FC0 802CC610 44810000 */  mtc1      $at, $f0
/* F0FC4 802CC614 00000000 */  nop
/* F0FC8 802CC618 4602003E */  c.le.s    $f0, $f2
/* F0FCC 802CC61C 00000000 */  nop
/* F0FD0 802CC620 45010002 */  bc1t      .L802CC62C
/* F0FD4 802CC624 24020002 */   addiu    $v0, $zero, 0x2
/* F0FD8 802CC628 0000102D */  daddu     $v0, $zero, $zero
.L802CC62C:
/* F0FDC 802CC62C 8FBF0068 */  lw        $ra, 0x68($sp)
/* F0FE0 802CC630 8FB30064 */  lw        $s3, 0x64($sp)
/* F0FE4 802CC634 8FB20060 */  lw        $s2, 0x60($sp)
/* F0FE8 802CC638 8FB1005C */  lw        $s1, 0x5C($sp)
/* F0FEC 802CC63C 8FB00058 */  lw        $s0, 0x58($sp)
/* F0FF0 802CC640 D7BE0098 */  ldc1      $f30, 0x98($sp)
/* F0FF4 802CC644 D7BC0090 */  ldc1      $f28, 0x90($sp)
/* F0FF8 802CC648 D7BA0088 */  ldc1      $f26, 0x88($sp)
/* F0FFC 802CC64C D7B80080 */  ldc1      $f24, 0x80($sp)
/* F1000 802CC650 D7B60078 */  ldc1      $f22, 0x78($sp)
/* F1004 802CC654 D7B40070 */  ldc1      $f20, 0x70($sp)
/* F1008 802CC658 03E00008 */  jr        $ra
/* F100C 802CC65C 27BD00A0 */   addiu    $sp, $sp, 0xA0

### DECOMPILED C INSTRUCTIONS:

ApiStatus SetCamProperties(Evt* script, s32 isInitialCall) {
    f32 hitX, hitY, hitZ, hitDepth, nX, nY, nZ;
    s32 zoneID;
    Bytecode* args = script->ptrReadPos;
    Camera* camera = &gCameras[evt_get_variable(script, *args++)];
    f32 moveSpeed = evt_get_float_variable(script, *args++);
    f32 posX = evt_get_float_variable(script, *args++);
    f32 posY = evt_get_float_variable(script, *args++);
    f32 posZ = evt_get_float_variable(script, *args++);
    f32 boomLength = evt_get_float_variable(script, *args++);
    f32 boomPitch = evt_get_float_variable(script, *args++);
    f32 viewPitch = evt_get_float_variable(script, *args++);

    if (isInitialCall) {
        hitDepth = 32767.0f;
        zoneID = test_ray_zones(posX, posY + 10.0f, posZ, 0.0f, -1.0f, 0.0f, &hitX, &hitY, &hitZ, &hitDepth, &nX, &nY, &nZ);
        if (zoneID >= 0) {
            camera->controlSettings = *gZoneCollisionData.colliderList[zoneID].camSettings;
        }

        camera->movePos.x = posX;
        camera->movePos.y = posY;
        camera->movePos.z = posZ;
        camera->controlSettings.boomLength = boomLength;
        camera->controlSettings.boomPitch = boomPitch;
        camera->controlSettings.viewPitch = viewPitch;
        camera->moveSpeed = moveSpeed;
        camera->panActive = TRUE;
        camera->followPlayer = TRUE;
        camera->panPhase = 0.0f;
        return ApiStatus_BLOCK;
    }

    if (camera->interpAlpha >= 1.0f) {
        return ApiStatus_DONE2;
    } else {
        return ApiStatus_BLOCK;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel btl_init_menu_partner
/* 1921F4 80263914 27BDFFC8 */  addiu     $sp, $sp, -0x38
/* 1921F8 80263918 AFBE0030 */  sw        $fp, 0x30($sp)
/* 1921FC 8026391C 3C1E8011 */  lui       $fp, %hi(gPlayerData)
/* 192200 80263920 27DEF290 */  addiu     $fp, $fp, %lo(gPlayerData)
/* 192204 80263924 AFB10014 */  sw        $s1, 0x14($sp)
/* 192208 80263928 24110017 */  addiu     $s1, $zero, 0x17
/* 19220C 8026392C AFB40020 */  sw        $s4, 0x20($sp)
/* 192210 80263930 3C14800E */  lui       $s4, %hi(gBattleStatus)
/* 192214 80263934 2694C070 */  addiu     $s4, $s4, %lo(gBattleStatus)
/* 192218 80263938 02911021 */  addu      $v0, $s4, $s1
/* 19221C 8026393C AFBF0034 */  sw        $ra, 0x34($sp)
/* 192220 80263940 AFB7002C */  sw        $s7, 0x2C($sp)
/* 192224 80263944 AFB60028 */  sw        $s6, 0x28($sp)
/* 192228 80263948 AFB50024 */  sw        $s5, 0x24($sp)
/* 19222C 8026394C AFB3001C */  sw        $s3, 0x1C($sp)
/* 192230 80263950 AFB20018 */  sw        $s2, 0x18($sp)
/* 192234 80263954 AFB00010 */  sw        $s0, 0x10($sp)
/* 192238 80263958 8E9700D8 */  lw        $s7, 0xD8($s4)
/* 19223C 8026395C 8E9500DC */  lw        $s5, 0xDC($s4)
.L80263960:
/* 192240 80263960 A04001DE */  sb        $zero, 0x1DE($v0)
/* 192244 80263964 2631FFFF */  addiu     $s1, $s1, -0x1
/* 192248 80263968 0621FFFD */  bgez      $s1, .L80263960
/* 19224C 8026396C 2442FFFF */   addiu    $v0, $v0, -0x1
/* 192250 80263970 8EA20008 */  lw        $v0, 0x8($s5)
/* 192254 80263974 24110001 */  addiu     $s1, $zero, 0x1
/* 192258 80263978 90420006 */  lbu       $v0, 0x6($v0)
/* 19225C 8026397C 83C30012 */  lb        $v1, 0x12($fp)
/* 192260 80263980 24420002 */  addiu     $v0, $v0, 0x2
/* 192264 80263984 A282020E */  sb        $v0, 0x20E($s4)
/* 192268 80263988 02231004 */  sllv      $v0, $v1, $s1
/* 19226C 8026398C 00431021 */  addu      $v0, $v0, $v1
/* 192270 80263990 02221004 */  sllv      $v0, $v0, $s1
/* 192274 80263994 2442007D */  addiu     $v0, $v0, 0x7D
/* 192278 80263998 8EA30008 */  lw        $v1, 0x8($s5)
/* 19227C 8026399C 9284020E */  lbu       $a0, 0x20E($s4)
/* 192280 802639A0 90630006 */  lbu       $v1, 0x6($v1)
/* 192284 802639A4 0224202A */  slt       $a0, $s1, $a0
/* 192288 802639A8 00621821 */  addu      $v1, $v1, $v0
/* 19228C 802639AC 1080000E */  beqz      $a0, .L802639E8
/* 192290 802639B0 A28301DE */   sb       $v1, 0x1DE($s4)
.L802639B4:
/* 192294 802639B4 83C30012 */  lb        $v1, 0x12($fp)
/* 192298 802639B8 02912021 */  addu      $a0, $s4, $s1
/* 19229C 802639BC 00031040 */  sll       $v0, $v1, 1
/* 1922A0 802639C0 00431021 */  addu      $v0, $v0, $v1
/* 1922A4 802639C4 00021040 */  sll       $v0, $v0, 1
/* 1922A8 802639C8 2442007F */  addiu     $v0, $v0, 0x7F
/* 1922AC 802639CC 00511021 */  addu      $v0, $v0, $s1
/* 1922B0 802639D0 A08201DE */  sb        $v0, 0x1DE($a0)
/* 1922B4 802639D4 9282020E */  lbu       $v0, 0x20E($s4)
/* 1922B8 802639D8 26310001 */  addiu     $s1, $s1, 0x1
/* 1922BC 802639DC 0222102A */  slt       $v0, $s1, $v0
/* 1922C0 802639E0 1440FFF4 */  bnez      $v0, .L802639B4
/* 1922C4 802639E4 00000000 */   nop
.L802639E8:
/* 1922C8 802639E8 0000882D */  daddu     $s1, $zero, $zero
/* 1922CC 802639EC 9282020E */  lbu       $v0, 0x20E($s4)
/* 1922D0 802639F0 10400037 */  beqz      $v0, .L80263AD0
/* 1922D4 802639F4 0220B02D */   daddu    $s6, $s1, $zero
/* 1922D8 802639F8 0280902D */  daddu     $s2, $s4, $zero
.L802639FC:
/* 1922DC 802639FC 924301DE */  lbu       $v1, 0x1DE($s2)
/* 1922E0 80263A00 3C068009 */  lui       $a2, %hi(gMoveTable)
/* 1922E4 80263A04 24C6F060 */  addiu     $a2, $a2, %lo(gMoveTable)
/* 1922E8 80263A08 00031080 */  sll       $v0, $v1, 2
/* 1922EC 80263A0C 00431021 */  addu      $v0, $v0, $v1
/* 1922F0 80263A10 00021080 */  sll       $v0, $v0, 2
/* 1922F4 80263A14 00469821 */  addu      $s3, $v0, $a2
/* 1922F8 80263A18 82700011 */  lb        $s0, 0x11($s3)
/* 1922FC 80263A1C 1200000B */  beqz      $s0, .L80263A4C
/* 192300 80263A20 02E0202D */   daddu    $a0, $s7, $zero
/* 192304 80263A24 0C099CAB */  jal       player_team_is_ability_active
/* 192308 80263A28 24050018 */   addiu    $a1, $zero, 0x18
/* 19230C 80263A2C 02028023 */  subu      $s0, $s0, $v0
/* 192310 80263A30 02E0202D */  daddu     $a0, $s7, $zero
/* 192314 80263A34 0C099CAB */  jal       player_team_is_ability_active
/* 192318 80263A38 24050026 */   addiu    $a1, $zero, 0x26
/* 19231C 80263A3C 00021040 */  sll       $v0, $v0, 1
/* 192320 80263A40 02028023 */  subu      $s0, $s0, $v0
/* 192324 80263A44 5A000001 */  blezl     $s0, .L80263A4C
/* 192328 80263A48 24100001 */   addiu    $s0, $zero, 0x1
.L80263A4C:
/* 19232C 80263A4C 24020005 */  addiu     $v0, $zero, 0x5
/* 192330 80263A50 A2820178 */  sb        $v0, 0x178($s4)
/* 192334 80263A54 8EA20008 */  lw        $v0, 0x8($s5)
/* 192338 80263A58 90420006 */  lbu       $v0, 0x6($v0)
/* 19233C 80263A5C A682017A */  sh        $v0, 0x17A($s4)
/* 192340 80263A60 8E620004 */  lw        $v0, 0x4($s3)
/* 192344 80263A64 02A0202D */  daddu     $a0, $s5, $zero
/* 192348 80263A68 0C098C0B */  jal       func_8026302C
/* 19234C 80263A6C AE820184 */   sw       $v0, 0x184($s4)
/* 192350 80263A70 82A2040C */  lb        $v0, 0x40C($s5)
/* 192354 80263A74 10400006 */  beqz      $v0, .L80263A90
/* 192358 80263A78 2402FFFE */   addiu    $v0, $zero, -0x2
/* 19235C 80263A7C 24160001 */  addiu     $s6, $zero, 0x1
/* 192360 80263A80 A25601F6 */  sb        $s6, 0x1F6($s2)
/* 192364 80263A84 82A2040C */  lb        $v0, 0x40C($s5)
/* 192368 80263A88 14400002 */  bnez      $v0, .L80263A94
/* 19236C 80263A8C 2402FFFE */   addiu    $v0, $zero, -0x2
.L80263A90:
/* 192370 80263A90 A24201F6 */  sb        $v0, 0x1F6($s2)
.L80263A94:
/* 192374 80263A94 83C20005 */  lb        $v0, 0x5($fp)
/* 192378 80263A98 0050102A */  slt       $v0, $v0, $s0
/* 19237C 80263A9C 54400001 */  bnel      $v0, $zero, .L80263AA4
/* 192380 80263AA0 A24001F6 */   sb       $zero, 0x1F6($s2)
.L80263AA4:
/* 192384 80263AA4 3C02800E */  lui       $v0, %hi(gBattleStatus + 0x4)
/* 192388 80263AA8 8C42C074 */  lw        $v0, %lo(gBattleStatus + 0x4)($v0)
/* 19238C 80263AAC 30421000 */  andi      $v0, $v0, 0x1000
/* 192390 80263AB0 10400002 */  beqz      $v0, .L80263ABC
/* 192394 80263AB4 2402FFFF */   addiu    $v0, $zero, -0x1
/* 192398 80263AB8 A24201F6 */  sb        $v0, 0x1F6($s2)
.L80263ABC:
/* 19239C 80263ABC 9282020E */  lbu       $v0, 0x20E($s4)
/* 1923A0 80263AC0 26310001 */  addiu     $s1, $s1, 0x1
/* 1923A4 80263AC4 0222102A */  slt       $v0, $s1, $v0
/* 1923A8 80263AC8 1440FFCC */  bnez      $v0, .L802639FC
/* 1923AC 80263ACC 26520001 */   addiu    $s2, $s2, 0x1
.L80263AD0:
/* 1923B0 80263AD0 16C00002 */  bnez      $s6, .L80263ADC
/* 1923B4 80263AD4 24020001 */   addiu    $v0, $zero, 0x1
/* 1923B8 80263AD8 2402FFFF */  addiu     $v0, $zero, -0x1
.L80263ADC:
/* 1923BC 80263ADC A2820080 */  sb        $v0, 0x80($s4)
/* 1923C0 80263AE0 8FBF0034 */  lw        $ra, 0x34($sp)
/* 1923C4 80263AE4 8FBE0030 */  lw        $fp, 0x30($sp)
/* 1923C8 80263AE8 8FB7002C */  lw        $s7, 0x2C($sp)
/* 1923CC 80263AEC 8FB60028 */  lw        $s6, 0x28($sp)
/* 1923D0 80263AF0 8FB50024 */  lw        $s5, 0x24($sp)
/* 1923D4 80263AF4 8FB40020 */  lw        $s4, 0x20($sp)
/* 1923D8 80263AF8 8FB3001C */  lw        $s3, 0x1C($sp)
/* 1923DC 80263AFC 8FB20018 */  lw        $s2, 0x18($sp)
/* 1923E0 80263B00 8FB10014 */  lw        $s1, 0x14($sp)
/* 1923E4 80263B04 8FB00010 */  lw        $s0, 0x10($sp)
/* 1923E8 80263B08 03E00008 */  jr        $ra
/* 1923EC 80263B0C 27BD0038 */   addiu    $sp, $sp, 0x38

### DECOMPILED C INSTRUCTIONS:

void btl_init_menu_partner(void) {
    PlayerData* playerData = &gPlayerData;
    BattleStatus* battleStatus = &gBattleStatus;
    Actor* player = battleStatus->playerActor;
    Actor* partner = battleStatus->partnerActor;
    s32 fpCost;
    s32 i;
    s32 hasAnyBadgeMoves;

    for (i = 0; i < ARRAY_COUNT(battleStatus->submenuMoves); i++) {
        battleStatus->submenuMoves[i] = 0;
    }

    // In the move table (enum MoveIDs), partners get move IDs set up like this:
    //
    //  Move ID offset | Description          | Goombario example
    // ----------------+----------------------+-------------------
    //  0              | No rank only         | Headbonk
    //  1              | Super rank only      | Headbonk (2)
    //  2              | Ultra rank only      | Headbonk (3)
    //  3              | Always unlocked      | Tattle
    //  4              | Unlocked after super | Charge
    //  5              | Unlocked after ultra | Multibonk

    battleStatus->submenuMoveCount = partner->actorBlueprint->level + 2;

    // Offsets 0,1,2
    battleStatus->submenuMoves[0] =
        playerData->currentPartner * 6
        + (MOVE_HEADBONK1 - 6)
        + partner->actorBlueprint->level;

    // Offsets 3,4,5
    for (i = 1; i < battleStatus->submenuMoveCount; i++) {
        battleStatus->submenuMoves[i] =
            playerData->currentPartner * 6
            + (MOVE_TATTLE - 6)
            + (i - 1);
    }

    hasAnyBadgeMoves = FALSE;
    for (i = 0; i < battleStatus->submenuMoveCount; i++){
        MoveData* move = &gMoveTable[battleStatus->submenuMoves[i]];

        fpCost = move->costFP;
        if (fpCost != 0) {
            fpCost -= player_team_is_ability_active(player, ABILITY_FLOWER_SAVER);
            fpCost -= player_team_is_ability_active(player, ABILITY_FLOWER_FANATIC) * 2;
            if (fpCost < 1) {
                fpCost = 1;
            }
        }

        battleStatus->moveCategory = BTL_MENU_TYPE_CHANGE_PARTNER;
        battleStatus->moveArgument = partner->actorBlueprint->level;
        battleStatus->currentTargetListFlags = move->flags;
        player_create_target_list(partner);

        if (partner->targetListLength != 0){
            hasAnyBadgeMoves = TRUE;
            battleStatus->submenuStatus[i] = BATTLE_SUBMENU_STATUS_ENABLED;
        }

        if (partner->targetListLength == 0) {
            battleStatus->submenuStatus[i] = BATTLE_SUBMENU_STATUS_NO_TARGETS_2;
        }

        if (playerData->curFP < fpCost) {
            battleStatus->submenuStatus[i] = BATTLE_SUBMENU_STATUS_NOT_ENOUGH_FP;
        }
        if (gBattleStatus.flags2 & BS_FLAGS2_NO_TARGET_AVAILABLE) {
            battleStatus->submenuStatus[i] = BATTLE_SUBMENU_STATUS_NO_TARGETS;
        }
    }

    if (!hasAnyBadgeMoves) {
        battleStatus->menuStatus[3] = -1;
    } else {
        battleStatus->menuStatus[3] = 1;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel EnemyDamageTarget
/* 1AB594 8027CCB4 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* 1AB598 8027CCB8 AFB3001C */  sw        $s3, 0x1C($sp)
/* 1AB59C 8027CCBC 0080982D */  daddu     $s3, $a0, $zero
/* 1AB5A0 8027CCC0 AFBF0024 */  sw        $ra, 0x24($sp)
/* 1AB5A4 8027CCC4 AFB40020 */  sw        $s4, 0x20($sp)
/* 1AB5A8 8027CCC8 AFB20018 */  sw        $s2, 0x18($sp)
/* 1AB5AC 8027CCCC AFB10014 */  sw        $s1, 0x14($sp)
/* 1AB5B0 8027CCD0 AFB00010 */  sw        $s0, 0x10($sp)
/* 1AB5B4 8027CCD4 8E70000C */  lw        $s0, 0xC($s3)
/* 1AB5B8 8027CCD8 8E050000 */  lw        $a1, 0x0($s0)
/* 1AB5BC 8027CCDC 0C0B1EAF */  jal       evt_get_variable
/* 1AB5C0 8027CCE0 26100004 */   addiu    $s0, $s0, 0x4
/* 1AB5C4 8027CCE4 0040202D */  daddu     $a0, $v0, $zero
/* 1AB5C8 8027CCE8 3C11800E */  lui       $s1, %hi(gBattleStatus)
/* 1AB5CC 8027CCEC 2631C070 */  addiu     $s1, $s1, %lo(gBattleStatus)
/* 1AB5D0 8027CCF0 2402FF81 */  addiu     $v0, $zero, -0x7F
/* 1AB5D4 8027CCF4 14820002 */  bne       $a0, $v0, .L8027CD00
/* 1AB5D8 8027CCF8 00000000 */   nop
/* 1AB5DC 8027CCFC 8E640148 */  lw        $a0, 0x148($s3)
.L8027CD00:
/* 1AB5E0 8027CD00 0C09A75B */  jal       get_actor
/* 1AB5E4 8027CD04 00000000 */   nop
/* 1AB5E8 8027CD08 8E140000 */  lw        $s4, 0x0($s0)
/* 1AB5EC 8027CD0C 26100004 */  addiu     $s0, $s0, 0x4
/* 1AB5F0 8027CD10 8E030000 */  lw        $v1, 0x0($s0)
/* 1AB5F4 8027CD14 26100004 */  addiu     $s0, $s0, 0x4
/* 1AB5F8 8027CD18 0260202D */  daddu     $a0, $s3, $zero
/* 1AB5FC 8027CD1C 0040902D */  daddu     $s2, $v0, $zero
/* 1AB600 8027CD20 AE230188 */  sw        $v1, 0x188($s1)
/* 1AB604 8027CD24 8E030000 */  lw        $v1, 0x0($s0)
/* 1AB608 8027CD28 26100004 */  addiu     $s0, $s0, 0x4
/* 1AB60C 8027CD2C AE23018C */  sw        $v1, 0x18C($s1)
/* 1AB610 8027CD30 8E030000 */  lw        $v1, 0x0($s0)
/* 1AB614 8027CD34 26100004 */  addiu     $s0, $s0, 0x4
/* 1AB618 8027CD38 AE230190 */  sw        $v1, 0x190($s1)
/* 1AB61C 8027CD3C 8E050000 */  lw        $a1, 0x0($s0)
/* 1AB620 8027CD40 0C0B1EAF */  jal       evt_get_variable
/* 1AB624 8027CD44 26100004 */   addiu    $s0, $s0, 0x4
/* 1AB628 8027CD48 A622017E */  sh        $v0, 0x17E($s1)
/* 1AB62C 8027CD4C 8E050000 */  lw        $a1, 0x0($s0)
/* 1AB630 8027CD50 30A20010 */  andi      $v0, $a1, 0x10
/* 1AB634 8027CD54 10400004 */  beqz      $v0, .L8027CD68
/* 1AB638 8027CD58 2403FFDF */   addiu    $v1, $zero, -0x21
/* 1AB63C 8027CD5C 8E220000 */  lw        $v0, 0x0($s1)
/* 1AB640 8027CD60 0809F364 */  j         .L8027CD90
/* 1AB644 8027CD64 34420010 */   ori      $v0, $v0, 0x10
.L8027CD68:
/* 1AB648 8027CD68 30A20020 */  andi      $v0, $a1, 0x20
/* 1AB64C 8027CD6C 10400005 */  beqz      $v0, .L8027CD84
/* 1AB650 8027CD70 2403FFEF */   addiu    $v1, $zero, -0x11
/* 1AB654 8027CD74 8E220000 */  lw        $v0, 0x0($s1)
/* 1AB658 8027CD78 00431024 */  and       $v0, $v0, $v1
/* 1AB65C 8027CD7C 0809F365 */  j         .L8027CD94
/* 1AB660 8027CD80 34420020 */   ori      $v0, $v0, 0x20
.L8027CD84:
/* 1AB664 8027CD84 8E220000 */  lw        $v0, 0x0($s1)
/* 1AB668 8027CD88 00431024 */  and       $v0, $v0, $v1
/* 1AB66C 8027CD8C 2403FFDF */  addiu     $v1, $zero, -0x21
.L8027CD90:
/* 1AB670 8027CD90 00431024 */  and       $v0, $v0, $v1
.L8027CD94:
/* 1AB674 8027CD94 AE220000 */  sw        $v0, 0x0($s1)
/* 1AB678 8027CD98 30A20040 */  andi      $v0, $a1, 0x40
/* 1AB67C 8027CD9C 10400007 */  beqz      $v0, .L8027CDBC
/* 1AB680 8027CDA0 2404FFBF */   addiu    $a0, $zero, -0x41
/* 1AB684 8027CDA4 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 1AB688 8027CDA8 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 1AB68C 8027CDAC 8C620000 */  lw        $v0, 0x0($v1)
/* 1AB690 8027CDB0 34420040 */  ori       $v0, $v0, 0x40
/* 1AB694 8027CDB4 0809F374 */  j         .L8027CDD0
/* 1AB698 8027CDB8 AC620000 */   sw       $v0, 0x0($v1)
.L8027CDBC:
/* 1AB69C 8027CDBC 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1AB6A0 8027CDC0 2442C070 */  addiu     $v0, $v0, %lo(gBattleStatus)
/* 1AB6A4 8027CDC4 8C430000 */  lw        $v1, 0x0($v0)
/* 1AB6A8 8027CDC8 00641824 */  and       $v1, $v1, $a0
/* 1AB6AC 8027CDCC AC430000 */  sw        $v1, 0x0($v0)
.L8027CDD0:
/* 1AB6B0 8027CDD0 30A20200 */  andi      $v0, $a1, 0x200
/* 1AB6B4 8027CDD4 10400007 */  beqz      $v0, .L8027CDF4
/* 1AB6B8 8027CDD8 2404FDFF */   addiu    $a0, $zero, -0x201
/* 1AB6BC 8027CDDC 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 1AB6C0 8027CDE0 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 1AB6C4 8027CDE4 8C620000 */  lw        $v0, 0x0($v1)
/* 1AB6C8 8027CDE8 34420200 */  ori       $v0, $v0, 0x200
/* 1AB6CC 8027CDEC 0809F382 */  j         .L8027CE08
/* 1AB6D0 8027CDF0 AC620000 */   sw       $v0, 0x0($v1)
.L8027CDF4:
/* 1AB6D4 8027CDF4 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1AB6D8 8027CDF8 2442C070 */  addiu     $v0, $v0, %lo(gBattleStatus)
/* 1AB6DC 8027CDFC 8C430000 */  lw        $v1, 0x0($v0)
/* 1AB6E0 8027CE00 00641824 */  and       $v1, $v1, $a0
/* 1AB6E4 8027CE04 AC430000 */  sw        $v1, 0x0($v0)
.L8027CE08:
/* 1AB6E8 8027CE08 30A20080 */  andi      $v0, $a1, 0x80
/* 1AB6EC 8027CE0C 10400007 */  beqz      $v0, .L8027CE2C
/* 1AB6F0 8027CE10 2404FF7F */   addiu    $a0, $zero, -0x81
/* 1AB6F4 8027CE14 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 1AB6F8 8027CE18 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 1AB6FC 8027CE1C 8C620000 */  lw        $v0, 0x0($v1)
/* 1AB700 8027CE20 34420080 */  ori       $v0, $v0, 0x80
/* 1AB704 8027CE24 0809F390 */  j         .L8027CE40
/* 1AB708 8027CE28 AC620000 */   sw       $v0, 0x0($v1)
.L8027CE2C:
/* 1AB70C 8027CE2C 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1AB710 8027CE30 2442C070 */  addiu     $v0, $v0, %lo(gBattleStatus)
/* 1AB714 8027CE34 8C430000 */  lw        $v1, 0x0($v0)
/* 1AB718 8027CE38 00641824 */  and       $v1, $v1, $a0
/* 1AB71C 8027CE3C AC430000 */  sw        $v1, 0x0($v0)
.L8027CE40:
/* 1AB720 8027CE40 96420428 */  lhu       $v0, 0x428($s2)
/* 1AB724 8027CE44 92230193 */  lbu       $v1, 0x193($s1)
/* 1AB728 8027CE48 A62201A0 */  sh        $v0, 0x1A0($s1)
/* 1AB72C 8027CE4C 92420426 */  lbu       $v0, 0x426($s2)
/* 1AB730 8027CE50 A2230194 */  sb        $v1, 0x194($s1)
/* 1AB734 8027CE54 306300FF */  andi      $v1, $v1, 0xFF
/* 1AB738 8027CE58 A22201A2 */  sb        $v0, 0x1A2($s1)
/* 1AB73C 8027CE5C 240200FF */  addiu     $v0, $zero, 0xFF
/* 1AB740 8027CE60 50620001 */  beql      $v1, $v0, .L8027CE68
/* 1AB744 8027CE64 A2200194 */   sb       $zero, 0x194($s1)
.L8027CE68:
/* 1AB748 8027CE68 8E220190 */  lw        $v0, 0x190($s1)
/* 1AB74C 8027CE6C 0240202D */  daddu     $a0, $s2, $zero
/* 1AB750 8027CE70 30420F00 */  andi      $v0, $v0, 0xF00
/* 1AB754 8027CE74 00021203 */  sra       $v0, $v0, 8
/* 1AB758 8027CE78 0C09DD0B */  jal       calc_enemy_damage_target
/* 1AB75C 8027CE7C A2220195 */   sb       $v0, 0x195($s1)
/* 1AB760 8027CE80 0440000B */  bltz      $v0, .L8027CEB0
/* 1AB764 8027CE84 0260202D */   daddu    $a0, $s3, $zero
/* 1AB768 8027CE88 0280282D */  daddu     $a1, $s4, $zero
/* 1AB76C 8027CE8C 0C0B2026 */  jal       evt_set_variable
/* 1AB770 8027CE90 0040302D */   daddu    $a2, $v0, $zero
/* 1AB774 8027CE94 0C0B1069 */  jal       does_script_exist_by_ref
/* 1AB778 8027CE98 0260202D */   daddu    $a0, $s3, $zero
/* 1AB77C 8027CE9C 0040182D */  daddu     $v1, $v0, $zero
/* 1AB780 8027CEA0 10600004 */  beqz      $v1, .L8027CEB4
/* 1AB784 8027CEA4 240200FF */   addiu    $v0, $zero, 0xFF
/* 1AB788 8027CEA8 0809F3AD */  j         .L8027CEB4
/* 1AB78C 8027CEAC 24020002 */   addiu    $v0, $zero, 0x2
.L8027CEB0:
/* 1AB790 8027CEB0 240200FF */  addiu     $v0, $zero, 0xFF
.L8027CEB4:
/* 1AB794 8027CEB4 8FBF0024 */  lw        $ra, 0x24($sp)
/* 1AB798 8027CEB8 8FB40020 */  lw        $s4, 0x20($sp)
/* 1AB79C 8027CEBC 8FB3001C */  lw        $s3, 0x1C($sp)
/* 1AB7A0 8027CEC0 8FB20018 */  lw        $s2, 0x18($sp)
/* 1AB7A4 8027CEC4 8FB10014 */  lw        $s1, 0x14($sp)
/* 1AB7A8 8027CEC8 8FB00010 */  lw        $s0, 0x10($sp)
/* 1AB7AC 8027CECC 03E00008 */  jr        $ra
/* 1AB7B0 8027CED0 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

ApiStatus EnemyDamageTarget(Evt* script, s32 isInitialCall) {
    Bytecode* args = script->ptrReadPos;
    BattleStatus* battleStatus = &gBattleStatus;
    s32 actorID = evt_get_variable(script, *args++);
    Actor* actor;
    s32 outVar;
    s32 hitResult;
    s32 battleStatusFlags1Temp;
    s32 battleFlagsModifier;

    if (actorID == ACTOR_SELF) {
        actorID = script->owner1.enemyID;
    }

    actor = get_actor(actorID);
    outVar = *args++;
    battleStatus->currentAttackElement = *args++;
    battleStatus->currentAttackEventSuppression = *args++;
    battleStatus->currentAttackStatus = *args++;
    battleStatus->currentAttackDamage = evt_get_variable(script, *args++);
    battleFlagsModifier = *args++;

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

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

    battleStatus->currentTargetID = actor->targetActorID;
    battleStatus->currentTargetPart = actor->targetPartIndex;

    battleStatus->statusChance = battleStatus->currentAttackStatus & 0xFF;
    if (battleStatus->statusChance == STATUS_KEY_NEVER) {
        battleStatus->statusChance = 0;
    }
    battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8;

    hitResult = calc_enemy_damage_target(actor);
    if (hitResult < 0) {
        return ApiStatus_FINISH;
    }

    evt_set_variable(script, outVar, hitResult);
    if (!(does_script_exist_by_ref(script))) {
        return ApiStatus_FINISH;
    }

    return ApiStatus_DONE2;
}