### RAW ASSEMBLY INSTRUCTIONS:

glabel debuff_update
/* 364520 E0062220 27BDFFC0 */  addiu     $sp, $sp, -0x40
/* 364524 E0062224 AFB3001C */  sw        $s3, 0x1C($sp)
/* 364528 E0062228 0080982D */  daddu     $s3, $a0, $zero
/* 36452C E006222C AFBF0020 */  sw        $ra, 0x20($sp)
/* 364530 E0062230 AFB20018 */  sw        $s2, 0x18($sp)
/* 364534 E0062234 AFB10014 */  sw        $s1, 0x14($sp)
/* 364538 E0062238 AFB00010 */  sw        $s0, 0x10($sp)
/* 36453C E006223C F7B80038 */  sdc1      $f24, 0x38($sp)
/* 364540 E0062240 F7B60030 */  sdc1      $f22, 0x30($sp)
/* 364544 E0062244 F7B40028 */  sdc1      $f20, 0x28($sp)
/* 364548 E0062248 8E64000C */  lw        $a0, 0xC($s3)
/* 36454C E006224C 8C820028 */  lw        $v0, 0x28($a0)
/* 364550 E0062250 8C830024 */  lw        $v1, 0x24($a0)
/* 364554 E0062254 24420001 */  addiu     $v0, $v0, 0x1
/* 364558 E0062258 2463FFFF */  addiu     $v1, $v1, -0x1
/* 36455C E006225C AC820028 */  sw        $v0, 0x28($a0)
/* 364560 E0062260 04610005 */  bgez      $v1, .LE0062278
/* 364564 E0062264 AC830024 */   sw       $v1, 0x24($a0)
/* 364568 E0062268 0C080128 */  jal       shim_remove_effect
/* 36456C E006226C 0260202D */   daddu    $a0, $s3, $zero
/* 364570 E0062270 08018920 */  j         .LE0062480
/* 364574 E0062274 00000000 */   nop
.LE0062278:
/* 364578 E0062278 8C920028 */  lw        $s2, 0x28($a0)
/* 36457C E006227C 2A42000B */  slti      $v0, $s2, 0xB
/* 364580 E0062280 14400009 */  bnez      $v0, .LE00622A8
/* 364584 E0062284 00000000 */   nop
/* 364588 E0062288 3C01E006 */  lui       $at, (0xE00628D0 >> 16)
/* 36458C E006228C D42228D0 */  ldc1      $f2, (0xE00628D0 & 0xFFFF)($at)
/* 364590 E0062290 C4800034 */  lwc1      $f0, 0x34($a0)
/* 364594 E0062294 46800021 */  cvt.d.w   $f0, $f0
/* 364598 E0062298 46220002 */  mul.d     $f0, $f0, $f2
/* 36459C E006229C 00000000 */  nop
/* 3645A0 E00622A0 4620038D */  trunc.w.d $f14, $f0
/* 3645A4 E00622A4 E48E0034 */  swc1      $f14, 0x34($a0)
.LE00622A8:
/* 3645A8 E00622A8 8E620008 */  lw        $v0, 0x8($s3)
/* 3645AC E00622AC 24110001 */  addiu     $s1, $zero, 0x1
/* 3645B0 E00622B0 0222102A */  slt       $v0, $s1, $v0
/* 3645B4 E00622B4 10400072 */  beqz      $v0, .LE0062480
/* 3645B8 E00622B8 24840040 */   addiu    $a0, $a0, 0x40
/* 3645BC E00622BC 24900008 */  addiu     $s0, $a0, 0x8
/* 3645C0 E00622C0 3C01E006 */  lui       $at, (0xE00628D8 >> 16)
/* 3645C4 E00622C4 D43428D8 */  ldc1      $f20, (0xE00628D8 & 0xFFFF)($at)
/* 3645C8 E00622C8 3C01E006 */  lui       $at, (0xE00628E0 >> 16)
/* 3645CC E00622CC D43628E0 */  ldc1      $f22, (0xE00628E0 & 0xFFFF)($at)
/* 3645D0 E00622D0 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 3645D4 E00622D4 4481C000 */  mtc1      $at, $f24
.LE00622D8:
/* 3645D8 E00622D8 2A42000B */  slti      $v0, $s2, 0xB
/* 3645DC E00622DC 1440002B */  bnez      $v0, .LE006238C
/* 3645E0 E00622E0 2A42000A */   slti     $v0, $s2, 0xA
/* 3645E4 E00622E4 C60A0014 */  lwc1      $f10, 0x14($s0)
/* 3645E8 E00622E8 3C013FF0 */  lui       $at, (0x3FF00000 >> 16)
/* 3645EC E00622EC 44816800 */  mtc1      $at, $f13
/* 3645F0 E00622F0 44806000 */  mtc1      $zero, $f12
/* 3645F4 E00622F4 460052A1 */  cvt.d.s   $f10, $f10
/* 3645F8 E00622F8 462A6301 */  sub.d     $f12, $f12, $f10
/* 3645FC E00622FC 46346302 */  mul.d     $f12, $f12, $f20
/* 364600 E0062300 00000000 */  nop
/* 364604 E0062304 C6080018 */  lwc1      $f8, 0x18($s0)
/* 364608 E0062308 3C014019 */  lui       $at, (0x4019999A >> 16)
/* 36460C E006230C 3421999A */  ori       $at, $at, (0x4019999A & 0xFFFF)
/* 364610 E0062310 44812000 */  mtc1      $at, $f4
/* 364614 E0062314 00000000 */  nop
/* 364618 E0062318 46082101 */  sub.s     $f4, $f4, $f8
/* 36461C E006231C 46002121 */  cvt.d.s   $f4, $f4
/* 364620 E0062320 46342102 */  mul.d     $f4, $f4, $f20
/* 364624 E0062324 00000000 */  nop
/* 364628 E0062328 C6060028 */  lwc1      $f6, 0x28($s0)
/* 36462C E006232C 3C0142C8 */  lui       $at, (0x42C80000 >> 16)
/* 364630 E0062330 44811000 */  mtc1      $at, $f2
/* 364634 E0062334 00000000 */  nop
/* 364638 E0062338 46061081 */  sub.s     $f2, $f2, $f6
/* 36463C E006233C 3C01E006 */  lui       $at, (0xE00628E8 >> 16)
/* 364640 E0062340 D42028E8 */  ldc1      $f0, (0xE00628E8 & 0xFFFF)($at)
/* 364644 E0062344 460010A1 */  cvt.d.s   $f2, $f2
/* 364648 E0062348 46201082 */  mul.d     $f2, $f2, $f0
/* 36464C E006234C 00000000 */  nop
/* 364650 E0062350 3C01E006 */  lui       $at, (0xE00628F0 >> 16)
/* 364654 E0062354 D42028F0 */  ldc1      $f0, (0xE00628F0 & 0xFFFF)($at)
/* 364658 E0062358 46201082 */  mul.d     $f2, $f2, $f0
/* 36465C E006235C 00000000 */  nop
/* 364660 E0062360 462C5280 */  add.d     $f10, $f10, $f12
/* 364664 E0062364 46004221 */  cvt.d.s   $f8, $f8
/* 364668 E0062368 46244200 */  add.d     $f8, $f8, $f4
/* 36466C E006236C 460031A1 */  cvt.d.s   $f6, $f6
/* 364670 E0062370 462052A0 */  cvt.s.d   $f10, $f10
/* 364674 E0062374 46204220 */  cvt.s.d   $f8, $f8
/* 364678 E0062378 46223180 */  add.d     $f6, $f6, $f2
/* 36467C E006237C E60A0014 */  swc1      $f10, 0x14($s0)
/* 364680 E0062380 E6080018 */  swc1      $f8, 0x18($s0)
/* 364684 E0062384 462031A0 */  cvt.s.d   $f6, $f6
/* 364688 E0062388 E6060028 */  swc1      $f6, 0x28($s0)
.LE006238C:
/* 36468C E006238C 10400029 */  beqz      $v0, .LE0062434
/* 364690 E0062390 00000000 */   nop
/* 364694 E0062394 C60C0014 */  lwc1      $f12, 0x14($s0)
/* 364698 E0062398 3C0140E0 */  lui       $at, (0x40E00000 >> 16)
/* 36469C E006239C 44814000 */  mtc1      $at, $f8
/* 3646A0 E00623A0 00000000 */  nop
/* 3646A4 E00623A4 460C4201 */  sub.s     $f8, $f8, $f12
/* 3646A8 E00623A8 46004221 */  cvt.d.s   $f8, $f8
/* 3646AC E00623AC 46364202 */  mul.d     $f8, $f8, $f22
/* 3646B0 E00623B0 00000000 */  nop
/* 3646B4 E00623B4 C60A0018 */  lwc1      $f10, 0x18($s0)
/* 3646B8 E00623B8 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 3646BC E00623BC 44812000 */  mtc1      $at, $f4
/* 3646C0 E00623C0 00000000 */  nop
/* 3646C4 E00623C4 460A2101 */  sub.s     $f4, $f4, $f10
/* 3646C8 E00623C8 46002121 */  cvt.d.s   $f4, $f4
/* 3646CC E00623CC 46342102 */  mul.d     $f4, $f4, $f20
/* 3646D0 E00623D0 00000000 */  nop
/* 3646D4 E00623D4 C6060028 */  lwc1      $f6, 0x28($s0)
/* 3646D8 E00623D8 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 3646DC E00623DC 44811000 */  mtc1      $at, $f2
/* 3646E0 E00623E0 00000000 */  nop
/* 3646E4 E00623E4 46061081 */  sub.s     $f2, $f2, $f6
/* 3646E8 E00623E8 460010A1 */  cvt.d.s   $f2, $f2
/* 3646EC E00623EC 46361082 */  mul.d     $f2, $f2, $f22
/* 3646F0 E00623F0 00000000 */  nop
/* 3646F4 E00623F4 3C01E006 */  lui       $at, (0xE00628F8 >> 16)
/* 3646F8 E00623F8 D42028F8 */  ldc1      $f0, (0xE00628F8 & 0xFFFF)($at)
/* 3646FC E00623FC 46201082 */  mul.d     $f2, $f2, $f0
/* 364700 E0062400 00000000 */  nop
/* 364704 E0062404 46006321 */  cvt.d.s   $f12, $f12
/* 364708 E0062408 46286300 */  add.d     $f12, $f12, $f8
/* 36470C E006240C 460052A1 */  cvt.d.s   $f10, $f10
/* 364710 E0062410 46245280 */  add.d     $f10, $f10, $f4
/* 364714 E0062414 460031A1 */  cvt.d.s   $f6, $f6
/* 364718 E0062418 46206320 */  cvt.s.d   $f12, $f12
/* 36471C E006241C 462052A0 */  cvt.s.d   $f10, $f10
/* 364720 E0062420 46223180 */  add.d     $f6, $f6, $f2
/* 364724 E0062424 E60C0014 */  swc1      $f12, 0x14($s0)
/* 364728 E0062428 E60A0018 */  swc1      $f10, 0x18($s0)
/* 36472C E006242C 462031A0 */  cvt.s.d   $f6, $f6
/* 364730 E0062430 E6060028 */  swc1      $f6, 0x28($s0)
.LE0062434:
/* 364734 E0062434 C60C0024 */  lwc1      $f12, 0x24($s0)
/* 364738 E0062438 0C080144 */  jal       shim_cos_deg
/* 36473C E006243C 46186300 */   add.s    $f12, $f12, $f24
/* 364740 E0062440 C6020028 */  lwc1      $f2, 0x28($s0)
/* 364744 E0062444 46020002 */  mul.s     $f0, $f0, $f2
/* 364748 E0062448 00000000 */  nop
/* 36474C E006244C C60C0024 */  lwc1      $f12, 0x24($s0)
/* 364750 E0062450 46186300 */  add.s     $f12, $f12, $f24
/* 364754 E0062454 0C080140 */  jal       shim_sin_deg
/* 364758 E0062458 E600FFFC */   swc1     $f0, -0x4($s0)
/* 36475C E006245C C6020028 */  lwc1      $f2, 0x28($s0)
/* 364760 E0062460 46020002 */  mul.s     $f0, $f0, $f2
/* 364764 E0062464 00000000 */  nop
/* 364768 E0062468 26310001 */  addiu     $s1, $s1, 0x1
/* 36476C E006246C E6000000 */  swc1      $f0, 0x0($s0)
/* 364770 E0062470 8E620008 */  lw        $v0, 0x8($s3)
/* 364774 E0062474 0222102A */  slt       $v0, $s1, $v0
/* 364778 E0062478 1440FF97 */  bnez      $v0, .LE00622D8
/* 36477C E006247C 26100040 */   addiu    $s0, $s0, 0x40
.LE0062480:
/* 364780 E0062480 8FBF0020 */  lw        $ra, 0x20($sp)
/* 364784 E0062484 8FB3001C */  lw        $s3, 0x1C($sp)
/* 364788 E0062488 8FB20018 */  lw        $s2, 0x18($sp)
/* 36478C E006248C 8FB10014 */  lw        $s1, 0x14($sp)
/* 364790 E0062490 8FB00010 */  lw        $s0, 0x10($sp)
/* 364794 E0062494 D7B80038 */  ldc1      $f24, 0x38($sp)
/* 364798 E0062498 D7B60030 */  ldc1      $f22, 0x30($sp)
/* 36479C E006249C D7B40028 */  ldc1      $f20, 0x28($sp)
/* 3647A0 E00624A0 03E00008 */  jr        $ra
/* 3647A4 E00624A4 27BD0040 */   addiu    $sp, $sp, 0x40

### DECOMPILED C INSTRUCTIONS:

void debuff_update(EffectInstance* effect) {
    DebuffFXData* data = effect->data.debuff;
    s32 time;
    s32 i;

    data->lifetime++;
    data->timeLeft--;
    if (data->timeLeft < 0) {
        shim_remove_effect(effect);
        return;
    }

    time = data->lifetime;

    if (time > 10) {
        data->alpha *= 0.9;
    }

    data++;
    for (i = 1; i < effect->numParts; i++, data++) {
        if (time > 10) {
            data->scaleY += (1.0 - data->scaleY) * 0.1;
            data->scaleX += (2.4f - data->scaleX) * 0.1;
            data->unk_30 += ((100.0f - data->unk_30) * 0.07) * 0.2;
        }
        if (time < 10) {
            data->scaleY += (7.0f - data->scaleY) * 0.05;
            data->scaleX += (1.0f - data->scaleX) * 0.1;
            data->unk_30 += ((10.0f - data->unk_30) * 0.05) * 0.6;
        }
        data->pos.x = shim_cos_deg(data->rotZ + 90.0f) * data->unk_30;
        data->pos.y = shim_sin_deg(data->rotZ + 90.0f) * data->unk_30;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_8025FF8C
/* 18E86C 8025FF8C 27BDFF78 */  addiu     $sp, $sp, -0x88
/* 18E870 8025FF90 AFBF007C */  sw        $ra, 0x7C($sp)
/* 18E874 8025FF94 AFBE0078 */  sw        $fp, 0x78($sp)
/* 18E878 8025FF98 AFB70074 */  sw        $s7, 0x74($sp)
/* 18E87C 8025FF9C AFB60070 */  sw        $s6, 0x70($sp)
/* 18E880 8025FFA0 AFB5006C */  sw        $s5, 0x6C($sp)
/* 18E884 8025FFA4 AFB40068 */  sw        $s4, 0x68($sp)
/* 18E888 8025FFA8 AFB30064 */  sw        $s3, 0x64($sp)
/* 18E88C 8025FFAC AFB20060 */  sw        $s2, 0x60($sp)
/* 18E890 8025FFB0 AFB1005C */  sw        $s1, 0x5C($sp)
/* 18E894 8025FFB4 AFB00058 */  sw        $s0, 0x58($sp)
/* 18E898 8025FFB8 F7B40080 */  sdc1      $f20, 0x80($sp)
/* 18E89C 8025FFBC 10800014 */  beqz      $a0, .L80260010
/* 18E8A0 8025FFC0 24020001 */   addiu    $v0, $zero, 0x1
/* 18E8A4 8025FFC4 14820013 */  bne       $a0, $v0, .L80260014
/* 18E8A8 8025FFC8 24110064 */   addiu    $s1, $zero, 0x64
/* 18E8AC 8025FFCC 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 18E8B0 8025FFD0 2442C070 */  addiu     $v0, $v0, %lo(gBattleStatus)
/* 18E8B4 8025FFD4 80420048 */  lb        $v0, 0x48($v0)
/* 18E8B8 8025FFD8 10400005 */  beqz      $v0, .L8025FFF0
/* 18E8BC 8025FFDC 0000882D */   daddu    $s1, $zero, $zero
/* 18E8C0 8025FFE0 10440006 */  beq       $v0, $a0, .L8025FFFC
/* 18E8C4 8025FFE4 24110064 */   addiu    $s1, $zero, 0x64
/* 18E8C8 8025FFE8 08098002 */  j         .L80260008
/* 18E8CC 8025FFEC 0220B82D */   daddu    $s7, $s1, $zero
.L8025FFF0:
/* 18E8D0 8025FFF0 24170064 */  addiu     $s7, $zero, 0x64
/* 18E8D4 8025FFF4 08098007 */  j         .L8026001C
/* 18E8D8 8025FFF8 241E0064 */   addiu    $fp, $zero, 0x64
.L8025FFFC:
/* 18E8DC 8025FFFC 0000B82D */  daddu     $s7, $zero, $zero
/* 18E8E0 80260000 08098007 */  j         .L8026001C
/* 18E8E4 80260004 241E0064 */   addiu    $fp, $zero, 0x64
.L80260008:
/* 18E8E8 80260008 08098007 */  j         .L8026001C
/* 18E8EC 8026000C 0000F02D */   daddu    $fp, $zero, $zero
.L80260010:
/* 18E8F0 80260010 24110064 */  addiu     $s1, $zero, 0x64
.L80260014:
/* 18E8F4 80260014 0220B82D */  daddu     $s7, $s1, $zero
/* 18E8F8 80260018 0220F02D */  daddu     $fp, $s1, $zero
.L8026001C:
/* 18E8FC 8026001C 27B60050 */  addiu     $s6, $sp, 0x50
/* 18E900 80260020 02C0282D */  daddu     $a1, $s6, $zero
/* 18E904 80260024 3C15802A */  lui       $s5, %hi(LevelUpStatEmblemIDs)
/* 18E908 80260028 26B5FA80 */  addiu     $s5, $s5, %lo(LevelUpStatEmblemIDs)
/* 18E90C 8026002C 27B40054 */  addiu     $s4, $sp, 0x54
/* 18E910 80260030 8EA40000 */  lw        $a0, 0x0($s5)
/* 18E914 80260034 0C05126B */  jal       hud_element_get_render_pos
D_80260038:
/* 18E918 80260038 0280302D */   daddu    $a2, $s4, $zero
/* 18E91C 8026003C 0000202D */  daddu     $a0, $zero, $zero
/* 18E920 80260040 2405000F */  addiu     $a1, $zero, 0xF
/* 18E924 80260044 2410002C */  addiu     $s0, $zero, 0x2C
/* 18E928 80260048 241300FF */  addiu     $s3, $zero, 0xFF
/* 18E92C 8026004C 8FA60050 */  lw        $a2, 0x50($sp)
/* 18E930 80260050 8FA70054 */  lw        $a3, 0x54($sp)
/* 18E934 80260054 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 18E938 80260058 4481A000 */  mtc1      $at, $f20
D_8026005C:
/* 18E93C 8026005C 24120140 */  addiu     $s2, $zero, 0x140
/* 18E940 80260060 AFB10020 */  sw        $s1, 0x20($sp)
/* 18E944 80260064 241100F0 */  addiu     $s1, $zero, 0xF0
/* 18E948 80260068 AFA00010 */  sw        $zero, 0x10($sp)
D_8026006C:
/* 18E94C 8026006C AFB00014 */  sw        $s0, 0x14($sp)
/* 18E950 80260070 AFB00018 */  sw        $s0, 0x18($sp)
/* 18E954 80260074 AFB3001C */  sw        $s3, 0x1C($sp)
/* 18E958 80260078 AFA0002C */  sw        $zero, 0x2C($sp)
D_8026007C:
/* 18E95C 8026007C AFA00030 */  sw        $zero, 0x30($sp)
/* 18E960 80260080 AFA00034 */  sw        $zero, 0x34($sp)
/* 18E964 80260084 AFA00038 */  sw        $zero, 0x38($sp)
/* 18E968 80260088 AFA0003C */  sw        $zero, 0x3C($sp)
D_8026008C:
/* 18E96C 8026008C AFA00040 */  sw        $zero, 0x40($sp)
/* 18E970 80260090 AFB20044 */  sw        $s2, 0x44($sp)
/* 18E974 80260094 AFB10048 */  sw        $s1, 0x48($sp)
/* 18E978 80260098 AFA0004C */  sw        $zero, 0x4C($sp)
D_8026009C:
/* 18E97C 8026009C 24C6FFEA */  addiu     $a2, $a2, -0x16
/* 18E980 802600A0 24E7FFEA */  addiu     $a3, $a3, -0x16
/* 18E984 802600A4 E7B40024 */  swc1      $f20, 0x24($sp)
/* 18E988 802600A8 0C03D4B8 */  jal       draw_box
D_802600AC:
/* 18E98C 802600AC E7B40028 */   swc1     $f20, 0x28($sp)
/* 18E990 802600B0 02C0282D */  daddu     $a1, $s6, $zero
/* 18E994 802600B4 8EA4000C */  lw        $a0, 0xC($s5)
/* 18E998 802600B8 0C05126B */  jal       hud_element_get_render_pos
/* 18E99C 802600BC 0280302D */   daddu    $a2, $s4, $zero
/* 18E9A0 802600C0 0000202D */  daddu     $a0, $zero, $zero
/* 18E9A4 802600C4 8FA60050 */  lw        $a2, 0x50($sp)
/* 18E9A8 802600C8 8FA70054 */  lw        $a3, 0x54($sp)
/* 18E9AC 802600CC 2405000F */  addiu     $a1, $zero, 0xF
/* 18E9B0 802600D0 AFA00010 */  sw        $zero, 0x10($sp)
/* 18E9B4 802600D4 AFB00014 */  sw        $s0, 0x14($sp)
/* 18E9B8 802600D8 AFB00018 */  sw        $s0, 0x18($sp)
/* 18E9BC 802600DC AFB3001C */  sw        $s3, 0x1C($sp)
/* 18E9C0 802600E0 AFB70020 */  sw        $s7, 0x20($sp)
/* 18E9C4 802600E4 E7B40024 */  swc1      $f20, 0x24($sp)
/* 18E9C8 802600E8 E7B40028 */  swc1      $f20, 0x28($sp)
/* 18E9CC 802600EC AFA0002C */  sw        $zero, 0x2C($sp)
/* 18E9D0 802600F0 AFA00030 */  sw        $zero, 0x30($sp)
/* 18E9D4 802600F4 AFA00034 */  sw        $zero, 0x34($sp)
/* 18E9D8 802600F8 AFA00038 */  sw        $zero, 0x38($sp)
/* 18E9DC 802600FC AFA0003C */  sw        $zero, 0x3C($sp)
/* 18E9E0 80260100 AFA00040 */  sw        $zero, 0x40($sp)
/* 18E9E4 80260104 AFB20044 */  sw        $s2, 0x44($sp)
/* 18E9E8 80260108 AFB10048 */  sw        $s1, 0x48($sp)
/* 18E9EC 8026010C AFA0004C */  sw        $zero, 0x4C($sp)
/* 18E9F0 80260110 24C6FFEA */  addiu     $a2, $a2, -0x16
/* 18E9F4 80260114 0C03D4B8 */  jal       draw_box
/* 18E9F8 80260118 24E7FFEA */   addiu    $a3, $a3, -0x16
/* 18E9FC 8026011C 02C0282D */  daddu     $a1, $s6, $zero
/* 18EA00 80260120 8EA40008 */  lw        $a0, 0x8($s5)
/* 18EA04 80260124 0C05126B */  jal       hud_element_get_render_pos
/* 18EA08 80260128 0280302D */   daddu    $a2, $s4, $zero
/* 18EA0C 8026012C 0000202D */  daddu     $a0, $zero, $zero
/* 18EA10 80260130 8FA60050 */  lw        $a2, 0x50($sp)
/* 18EA14 80260134 8FA70054 */  lw        $a3, 0x54($sp)
/* 18EA18 80260138 2405000F */  addiu     $a1, $zero, 0xF
/* 18EA1C 8026013C AFA00010 */  sw        $zero, 0x10($sp)
/* 18EA20 80260140 AFB00014 */  sw        $s0, 0x14($sp)
/* 18EA24 80260144 AFB00018 */  sw        $s0, 0x18($sp)
/* 18EA28 80260148 AFB3001C */  sw        $s3, 0x1C($sp)
/* 18EA2C 8026014C AFBE0020 */  sw        $fp, 0x20($sp)
/* 18EA30 80260150 E7B40024 */  swc1      $f20, 0x24($sp)
/* 18EA34 80260154 E7B40028 */  swc1      $f20, 0x28($sp)
/* 18EA38 80260158 AFA0002C */  sw        $zero, 0x2C($sp)
/* 18EA3C 8026015C AFA00030 */  sw        $zero, 0x30($sp)
/* 18EA40 80260160 AFA00034 */  sw        $zero, 0x34($sp)
/* 18EA44 80260164 AFA00038 */  sw        $zero, 0x38($sp)
/* 18EA48 80260168 AFA0003C */  sw        $zero, 0x3C($sp)
/* 18EA4C 8026016C AFA00040 */  sw        $zero, 0x40($sp)
/* 18EA50 80260170 AFB20044 */  sw        $s2, 0x44($sp)
/* 18EA54 80260174 AFB10048 */  sw        $s1, 0x48($sp)
/* 18EA58 80260178 AFA0004C */  sw        $zero, 0x4C($sp)
/* 18EA5C 8026017C 24C6FFEA */  addiu     $a2, $a2, -0x16
/* 18EA60 80260180 0C03D4B8 */  jal       draw_box
/* 18EA64 80260184 24E7FFEA */   addiu    $a3, $a3, -0x16
/* 18EA68 80260188 8FBF007C */  lw        $ra, 0x7C($sp)
/* 18EA6C 8026018C 8FBE0078 */  lw        $fp, 0x78($sp)
/* 18EA70 80260190 8FB70074 */  lw        $s7, 0x74($sp)
/* 18EA74 80260194 8FB60070 */  lw        $s6, 0x70($sp)
/* 18EA78 80260198 8FB5006C */  lw        $s5, 0x6C($sp)
/* 18EA7C 8026019C 8FB40068 */  lw        $s4, 0x68($sp)
/* 18EA80 802601A0 8FB30064 */  lw        $s3, 0x64($sp)
/* 18EA84 802601A4 8FB20060 */  lw        $s2, 0x60($sp)
/* 18EA88 802601A8 8FB1005C */  lw        $s1, 0x5C($sp)
/* 18EA8C 802601AC 8FB00058 */  lw        $s0, 0x58($sp)
/* 18EA90 802601B0 D7B40080 */  ldc1      $f20, 0x80($sp)
/* 18EA94 802601B4 03E00008 */  jr        $ra
/* 18EA98 802601B8 27BD0088 */   addiu    $sp, $sp, 0x88

### DECOMPILED C INSTRUCTIONS:

void btl_draw_upgrade_windows(s32 phase) {
    BattleStatus* battleStatus = &gBattleStatus;
    s32 x;
    s32 y;
    s32 d1;
    s32 d2;
    s32 d3;

    switch (phase) {
        case 0: // before choice
            d1 = 100;
            d2 = 100;
            d3 = 100;
            break;
        case 1: // choosing
            switch (battleStatus->currentSubmenu) {
                case MENU_HP:
                    d1 = 0;
                    d2 = 100;
                    d3 = 100;
                    break;
                case MENU_FP:
                    d1 = 100;
                    d2 = 0;
                    d3 = 100;
                    break;
                default:
                    d1 = 100;
                    d2 = 100;
                    d3 = 0;
                    break;
            }
            break;
        default: // after choice
            d1 = 100;
            d2 = 100;
            d3 = 100;
            break;
    }

    hud_element_get_render_pos(LevelUpStatEmblemIDs[0], &x, &y);
    draw_box(0, WINDOW_STYLE_15, x - 22, y - 22, 0, 44, 44, 255, d1, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
             SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
    hud_element_get_render_pos(LevelUpStatEmblemIDs[3], &x, &y);
    draw_box(0, WINDOW_STYLE_15, x - 22, y - 22, 0, 44, 44, 255, d2, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
             SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
    hud_element_get_render_pos(LevelUpStatEmblemIDs[2], &x, &y);
    draw_box(0, WINDOW_STYLE_15, x - 22, y - 22, 0, 44, 44, 255, d3, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
             SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel action_command_free
/* 19757C 80268C9C 27BDFFE8 */  addiu     $sp, $sp, -0x18
/* 197580 80268CA0 AFB00010 */  sw        $s0, 0x10($sp)
/* 197584 80268CA4 3C10802A */  lui       $s0, %hi(gActionCommandStatus)
/* 197588 80268CA8 2610FBE0 */  addiu     $s0, $s0, %lo(gActionCommandStatus)
/* 19758C 80268CAC AFBF0014 */  sw        $ra, 0x14($sp)
/* 197590 80268CB0 8603004A */  lh        $v1, 0x4A($s0)
/* 197594 80268CB4 2C620018 */  sltiu     $v0, $v1, 0x18
/* 197598 80268CB8 10400060 */  beqz      $v0, .L80268E3C
/* 19759C 80268CBC 00031080 */   sll      $v0, $v1, 2
/* 1975A0 80268CC0 3C01802A */  lui       $at, %hi(jtbl_8029D760)
/* 1975A4 80268CC4 00220821 */  addu      $at, $at, $v0
/* 1975A8 80268CC8 8C22D760 */  lw        $v0, %lo(jtbl_8029D760)($at)
/* 1975AC 80268CCC 00400008 */  jr        $v0
/* 1975B0 80268CD0 00000000 */   nop
glabel .L80268CD4
/* 1975B4 80268CD4 0C0AA564 */  jal       func_802A9590
/* 1975B8 80268CD8 00000000 */   nop
/* 1975BC 80268CDC 0809A390 */  j         .L80268E40
/* 1975C0 80268CE0 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268CE4
/* 1975C4 80268CE4 0C0AA68C */  jal       func_802A9A30
/* 1975C8 80268CE8 00000000 */   nop
/* 1975CC 80268CEC 0809A390 */  j         .L80268E40
/* 1975D0 80268CF0 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268CF4
/* 1975D4 80268CF4 0C0AA625 */  jal       func_802A9894
/* 1975D8 80268CF8 00000000 */   nop
/* 1975DC 80268CFC 0809A390 */  j         .L80268E40
/* 1975E0 80268D00 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268D04
/* 1975E4 80268D04 0C0AA5FF */  jal       func_802A97FC
/* 1975E8 80268D08 00000000 */   nop
/* 1975EC 80268D0C 0809A390 */  j         .L80268E40
/* 1975F0 80268D10 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268D14
/* 1975F4 80268D14 0C0AA626 */  jal       func_802A9898
/* 1975F8 80268D18 00000000 */   nop
/* 1975FC 80268D1C 0809A390 */  j         .L80268E40
/* 197600 80268D20 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268D24
/* 197604 80268D24 0C0AA551 */  jal       func_802A9544
/* 197608 80268D28 00000000 */   nop
/* 19760C 80268D2C 0809A390 */  j         .L80268E40
/* 197610 80268D30 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268D34
/* 197614 80268D34 0C0AA567 */  jal       func_802A959C
/* 197618 80268D38 00000000 */   nop
/* 19761C 80268D3C 0809A390 */  j         .L80268E40
/* 197620 80268D40 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268D44
/* 197624 80268D44 0C0AA5EF */  jal       func_802A97BC
/* 197628 80268D48 00000000 */   nop
/* 19762C 80268D4C 0809A390 */  j         .L80268E40
/* 197630 80268D50 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268D54
/* 197634 80268D54 0C0AA645 */  jal       func_802A9914
/* 197638 80268D58 00000000 */   nop
/* 19763C 80268D5C 0809A390 */  j         .L80268E40
/* 197640 80268D60 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268D64
/* 197644 80268D64 0C0AA58F */  jal       func_802A963C
/* 197648 80268D68 00000000 */   nop
/* 19764C 80268D6C 0809A390 */  j         .L80268E40
/* 197650 80268D70 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268D74
/* 197654 80268D74 0C0AA5F3 */  jal       func_802A97CC
/* 197658 80268D78 00000000 */   nop
/* 19765C 80268D7C 0809A390 */  j         .L80268E40
/* 197660 80268D80 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268D84
/* 197664 80268D84 0C0AA5C2 */  jal       func_802A9708
/* 197668 80268D88 00000000 */   nop
/* 19766C 80268D8C 0809A390 */  j         .L80268E40
/* 197670 80268D90 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268D94
/* 197674 80268D94 0C0AA604 */  jal       func_802A9810
/* 197678 80268D98 00000000 */   nop
/* 19767C 80268D9C 0809A390 */  j         .L80268E40
/* 197680 80268DA0 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268DA4
/* 197684 80268DA4 0C0AA64B */  jal       func_802A992C
/* 197688 80268DA8 00000000 */   nop
/* 19768C 80268DAC 0809A390 */  j         .L80268E40
/* 197690 80268DB0 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268DB4
/* 197694 80268DB4 0C0AA5C8 */  jal       func_802A9720
/* 197698 80268DB8 00000000 */   nop
/* 19769C 80268DBC 0809A390 */  j         .L80268E40
/* 1976A0 80268DC0 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268DC4
/* 1976A4 80268DC4 0C0AA695 */  jal       func_802A9A54
/* 1976A8 80268DC8 00000000 */   nop
/* 1976AC 80268DCC 0809A390 */  j         .L80268E40
/* 1976B0 80268DD0 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268DD4
/* 1976B4 80268DD4 0C0AA638 */  jal       func_802A98E0
/* 1976B8 80268DD8 00000000 */   nop
/* 1976BC 80268DDC 0809A390 */  j         .L80268E40
/* 1976C0 80268DE0 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268DE4
/* 1976C4 80268DE4 0C0AA664 */  jal       func_802A9990
/* 1976C8 80268DE8 00000000 */   nop
/* 1976CC 80268DEC 0809A390 */  j         .L80268E40
/* 1976D0 80268DF0 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268DF4
/* 1976D4 80268DF4 0C0AA607 */  jal       func_802A981C
/* 1976D8 80268DF8 00000000 */   nop
/* 1976DC 80268DFC 0809A390 */  j         .L80268E40
/* 1976E0 80268E00 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268E04
/* 1976E4 80268E04 0C0AA625 */  jal       func_802A9894
/* 1976E8 80268E08 00000000 */   nop
/* 1976EC 80268E0C 0809A390 */  j         .L80268E40
/* 1976F0 80268E10 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268E14
/* 1976F4 80268E14 0C0AA637 */  jal       func_802A98DC
/* 1976F8 80268E18 00000000 */   nop
/* 1976FC 80268E1C 0809A390 */  j         .L80268E40
/* 197700 80268E20 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268E24
/* 197704 80268E24 0C0AA836 */  jal       func_802AA0D8
/* 197708 80268E28 00000000 */   nop
/* 19770C 80268E2C 0809A390 */  j         .L80268E40
/* 197710 80268E30 3C05FFFF */   lui      $a1, (0xFFFF7FFF >> 16)
glabel .L80268E34
/* 197714 80268E34 0C0AA5D9 */  jal       func_802A9764
/* 197718 80268E38 00000000 */   nop
glabel .L80268E3C
/* 19771C 80268E3C 3C05FFFF */  lui       $a1, (0xFFFF7FFF >> 16)
.L80268E40:
/* 197720 80268E40 34A57FFF */  ori       $a1, $a1, (0xFFFF7FFF & 0xFFFF)
/* 197724 80268E44 3C04800E */  lui       $a0, %hi(gBattleStatus)
/* 197728 80268E48 2484C070 */  addiu     $a0, $a0, %lo(gBattleStatus)
/* 19772C 80268E4C A600004A */  sh        $zero, 0x4A($s0)
/* 197730 80268E50 8C820000 */  lw        $v0, 0x0($a0)
/* 197734 80268E54 2403DFFF */  addiu     $v1, $zero, -0x2001
/* 197738 80268E58 00431024 */  and       $v0, $v0, $v1
/* 19773C 80268E5C 00451024 */  and       $v0, $v0, $a1
/* 197740 80268E60 2403BFFF */  addiu     $v1, $zero, -0x4001
/* 197744 80268E64 00431024 */  and       $v0, $v0, $v1
/* 197748 80268E68 0C093EC3 */  jal       func_8024FB0C
/* 19774C 80268E6C AC820000 */   sw       $v0, 0x0($a0)
/* 197750 80268E70 0C093EB1 */  jal       func_8024FAC4
/* 197754 80268E74 0000202D */   daddu    $a0, $zero, $zero
/* 197758 80268E78 8FBF0014 */  lw        $ra, 0x14($sp)
/* 19775C 80268E7C 8FB00010 */  lw        $s0, 0x10($sp)
/* 197760 80268E80 03E00008 */  jr        $ra
/* 197764 80268E84 27BD0018 */   addiu    $sp, $sp, 0x18

### DECOMPILED C INSTRUCTIONS:

void action_command_free(void) {
    ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;

    switch (actionCommandStatus->actionCommandID) {
        case ACTION_COMMAND_NONE:
            break;
        case ACTION_COMMAND_JUMP:
            action_command_jump_free();
            break;
        case ACTION_COMMAND_SMASH:
            action_command_hammer_free();
            break;
        case ACTION_COMMAND_FLEE:
            action_command_flee_free();
            break;
        case ACTION_COMMAND_BREAK_FREE:
            action_command_break_free_free();
            break;
        case ACTION_COMMAND_WHIRLWIND:
            action_command_whirlwind_free();
            break;
        case ACTION_COMMAND_STOP_LEECH:
            action_command_jump_draw();
            break;
        case ACTION_COMMAND_07:
            action_command_07_free();
            break;
        case ACTION_COMMAND_DIZZY_SHELL:
            action_command_dizzy_shell_free();
            break;
        case ACTION_COMMAND_FIRE_SHELL:
            action_command_fire_shell_free();
            break;
        case ACTION_COMMAND_0A:
            action_command_0A_free();
            break;
        case ACTION_COMMAND_BOMB:
            action_command_bomb_free();
            break;
        case ACTION_COMMAND_BODY_SLAM:
            action_command_body_slam_free();
            break;
        case ACTION_COMMAND_AIR_LIFT:
            action_command_air_lift_free();
            break;
        case ACTION_COMMAND_AIR_RAID:
            action_command_air_raid_free();
            break;
        case ACTION_COMMAND_SQUIRT:
            action_command_squirt_free();
            break;
        case ACTION_COMMAND_POWER_SHOCK:
            action_command_power_shock_free();
            break;
        case ACTION_COMMAND_MEGA_SHOCK:
            action_command_mega_shock_free();
            break;
        case ACTION_COMMAND_SMACK:
            action_command_smack_free();
            break;
        case ACTION_COMMAND_SPINY_SURGE:
            action_command_spiny_surge_free();
            break;
        case ACTION_COMMAND_HURRICANE:
            action_command_hurricane_free();
            break;
        case ACTION_COMMAND_SPOOK:
            action_command_spook_free();
            break;
        case ACTION_COMMAND_WATER_BLOCK:
            action_command_water_block_free();
            break;
        case ACTION_COMMAND_TIDAL_WAVE:
            action_command_tidal_wave_free();
            break;
    }

    actionCommandStatus->actionCommandID = ACTION_COMMAND_NONE;
    gBattleStatus.flags1 &= ~BS_FLAGS1_2000;
    gBattleStatus.flags1 &= ~BS_FLAGS1_8000;
    gBattleStatus.flags1 &= ~BS_FLAGS1_4000;
    close_action_command_instruction_popup();
    btl_set_popup_duration(0);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel damage_indicator_main
/* 34F4C0 E003C000 27BDFF98 */  addiu     $sp, $sp, -0x68
/* 34F4C4 E003C004 F7B40040 */  sdc1      $f20, 0x40($sp)
/* 34F4C8 E003C008 4485A000 */  mtc1      $a1, $f20
/* 34F4CC E003C00C F7B60048 */  sdc1      $f22, 0x48($sp)
/* 34F4D0 E003C010 4486B000 */  mtc1      $a2, $f22
/* 34F4D4 E003C014 F7BA0058 */  sdc1      $f26, 0x58($sp)
/* 34F4D8 E003C018 4487D000 */  mtc1      $a3, $f26
/* 34F4DC E003C01C AFB20030 */  sw        $s2, 0x30($sp)
/* 34F4E0 E003C020 8FB20080 */  lw        $s2, 0x80($sp)
/* 34F4E4 E003C024 F7B80050 */  sdc1      $f24, 0x50($sp)
/* 34F4E8 E003C028 C7B80078 */  lwc1      $f24, 0x78($sp)
/* 34F4EC E003C02C AFB1002C */  sw        $s1, 0x2C($sp)
/* 34F4F0 E003C030 0080882D */  daddu     $s1, $a0, $zero
/* 34F4F4 E003C034 F7BC0060 */  sdc1      $f28, 0x60($sp)
/* 34F4F8 E003C038 C7BC007C */  lwc1      $f28, 0x7C($sp)
/* 34F4FC E003C03C 27A40010 */  addiu     $a0, $sp, 0x10
/* 34F500 E003C040 AFBF0038 */  sw        $ra, 0x38($sp)
/* 34F504 E003C044 AFB30034 */  sw        $s3, 0x34($sp)
/* 34F508 E003C048 AFB00028 */  sw        $s0, 0x28($sp)
/* 34F50C E003C04C 2A420015 */  slti      $v0, $s2, 0x15
/* 34F510 E003C050 14400002 */  bnez      $v0, .LE003C05C
/* 34F514 E003C054 0240802D */   daddu    $s0, $s2, $zero
/* 34F518 E003C058 24120014 */  addiu     $s2, $zero, 0x14
.LE003C05C:
/* 34F51C E003C05C 26520001 */  addiu     $s2, $s2, 0x1
/* 34F520 E003C060 3C02E004 */  lui       $v0, %hi(damage_indicator_init)
/* 34F524 E003C064 2442C23C */  addiu     $v0, $v0, %lo(damage_indicator_init)
/* 34F528 E003C068 AFA20018 */  sw        $v0, 0x18($sp)
/* 34F52C E003C06C 3C02E004 */  lui       $v0, %hi(damage_indicator_update)
/* 34F530 E003C070 2442C244 */  addiu     $v0, $v0, %lo(damage_indicator_update)
/* 34F534 E003C074 AFA2001C */  sw        $v0, 0x1C($sp)
/* 34F538 E003C078 3C02E004 */  lui       $v0, %hi(damage_indicator_render)
/* 34F53C E003C07C 2442C474 */  addiu     $v0, $v0, %lo(damage_indicator_render)
/* 34F540 E003C080 AFA20020 */  sw        $v0, 0x20($sp)
/* 34F544 E003C084 3C02E004 */  lui       $v0, %hi(damage_indicator_render_ui)
/* 34F548 E003C088 2442C47C */  addiu     $v0, $v0, %lo(damage_indicator_render_ui)
/* 34F54C E003C08C AFA20024 */  sw        $v0, 0x24($sp)
/* 34F550 E003C090 2402001E */  addiu     $v0, $zero, 0x1E
/* 34F554 E003C094 AFA00010 */  sw        $zero, 0x10($sp)
/* 34F558 E003C098 0C080124 */  jal       shim_create_effect_instance
/* 34F55C E003C09C AFA20014 */   sw       $v0, 0x14($sp)
/* 34F560 E003C0A0 00122180 */  sll       $a0, $s2, 6
/* 34F564 E003C0A4 0040982D */  daddu     $s3, $v0, $zero
/* 34F568 E003C0A8 0C08012C */  jal       shim_general_heap_malloc
/* 34F56C E003C0AC AE720008 */   sw       $s2, 0x8($s3)
/* 34F570 E003C0B0 0040182D */  daddu     $v1, $v0, $zero
/* 34F574 E003C0B4 14600003 */  bnez      $v1, .LE003C0C4
/* 34F578 E003C0B8 AE63000C */   sw       $v1, 0xC($s3)
.LE003C0BC:
/* 34F57C E003C0BC 0800F02F */  j         .LE003C0BC
/* 34F580 E003C0C0 00000000 */   nop
.LE003C0C4:
/* 34F584 E003C0C4 24020064 */  addiu     $v0, $zero, 0x64
/* 34F588 E003C0C8 AC710000 */  sw        $s1, 0x0($v1)
/* 34F58C E003C0CC E4740004 */  swc1      $f20, 0x4($v1)
/* 34F590 E003C0D0 E4760008 */  swc1      $f22, 0x8($v1)
/* 34F594 E003C0D4 E47A000C */  swc1      $f26, 0xC($v1)
/* 34F598 E003C0D8 E4780028 */  swc1      $f24, 0x28($v1)
/* 34F59C E003C0DC AC620030 */  sw        $v0, 0x30($v1)
/* 34F5A0 E003C0E0 AC600034 */  sw        $zero, 0x34($v1)
/* 34F5A4 E003C0E4 AC70003C */  sw        $s0, 0x3C($v1)
/* 34F5A8 E003C0E8 24110001 */  addiu     $s1, $zero, 0x1
/* 34F5AC E003C0EC 0232102A */  slt       $v0, $s1, $s2
/* 34F5B0 E003C0F0 10400044 */  beqz      $v0, .LE003C204
/* 34F5B4 E003C0F4 24630040 */   addiu    $v1, $v1, 0x40
/* 34F5B8 E003C0F8 2470002C */  addiu     $s0, $v1, 0x2C
/* 34F5BC E003C0FC 44920000 */  mtc1      $s2, $f0
/* 34F5C0 E003C100 00000000 */  nop
/* 34F5C4 E003C104 46800020 */  cvt.s.w   $f0, $f0
/* 34F5C8 E003C108 3C0141F0 */  lui       $at, (0x41F00000 >> 16)
/* 34F5CC E003C10C 44811000 */  mtc1      $at, $f2
/* 34F5D0 E003C110 3C013FF8 */  lui       $at, (0x3FF80000 >> 16)
/* 34F5D4 E003C114 4481B800 */  mtc1      $at, $f23
/* 34F5D8 E003C118 4480B000 */  mtc1      $zero, $f22
/* 34F5DC E003C11C 46001681 */  sub.s     $f26, $f2, $f0
.LE003C120:
/* 34F5E0 E003C120 001117C2 */  srl       $v0, $s1, 31
/* 34F5E4 E003C124 02221021 */  addu      $v0, $s1, $v0
/* 34F5E8 E003C128 00021043 */  sra       $v0, $v0, 1
/* 34F5EC E003C12C 00021040 */  sll       $v0, $v0, 1
/* 34F5F0 E003C130 02221023 */  subu      $v0, $s1, $v0
/* 34F5F4 E003C134 00021040 */  sll       $v0, $v0, 1
/* 34F5F8 E003C138 AE00FFD8 */  sw        $zero, -0x28($s0)
/* 34F5FC E003C13C C600FFD8 */  lwc1      $f0, -0x28($s0)
/* 34F600 E003C140 2442FFFF */  addiu     $v0, $v0, -0x1
/* 34F604 E003C144 AE00FFDC */  sw        $zero, -0x24($s0)
/* 34F608 E003C148 00510018 */  mult      $v0, $s1
/* 34F60C E003C14C C602FFDC */  lwc1      $f2, -0x24($s0)
/* 34F610 E003C150 AE00FFE0 */  sw        $zero, -0x20($s0)
/* 34F614 E003C154 E600FFE4 */  swc1      $f0, -0x1C($s0)
/* 34F618 E003C158 00001012 */  mflo      $v0
/* 34F61C E003C15C 00021FC2 */  srl       $v1, $v0, 31
/* 34F620 E003C160 00431021 */  addu      $v0, $v0, $v1
/* 34F624 E003C164 00021043 */  sra       $v0, $v0, 1
/* 34F628 E003C168 4482A000 */  mtc1      $v0, $f20
/* 34F62C E003C16C 00000000 */  nop
/* 34F630 E003C170 4680A520 */  cvt.s.w   $f20, $f20
/* 34F634 E003C174 461AA502 */  mul.s     $f20, $f20, $f26
/* 34F638 E003C178 00000000 */  nop
/* 34F63C E003C17C C600FFE0 */  lwc1      $f0, -0x20($s0)
/* 34F640 E003C180 E602FFE8 */  swc1      $f2, -0x18($s0)
/* 34F644 E003C184 3C013E4C */  lui       $at, (0x3E4CCCCD >> 16)
/* 34F648 E003C188 3421CCCD */  ori       $at, $at, (0x3E4CCCCD & 0xFFFF)
/* 34F64C E003C18C 44811000 */  mtc1      $at, $f2
/* 34F650 E003C190 4614E500 */  add.s     $f20, $f28, $f20
/* 34F654 E003C194 E600FFEC */  swc1      $f0, -0x14($s0)
/* 34F658 E003C198 E602000C */  swc1      $f2, 0xC($s0)
/* 34F65C E003C19C 0C080140 */  jal       shim_sin_deg
/* 34F660 E003C1A0 4600A306 */   mov.s    $f12, $f20
/* 34F664 E003C1A4 46000007 */  neg.s     $f0, $f0
/* 34F668 E003C1A8 46180002 */  mul.s     $f0, $f0, $f24
/* 34F66C E003C1AC 00000000 */  nop
/* 34F670 E003C1B0 46000021 */  cvt.d.s   $f0, $f0
/* 34F674 E003C1B4 46360002 */  mul.d     $f0, $f0, $f22
/* 34F678 E003C1B8 00000000 */  nop
/* 34F67C E003C1BC 4600A306 */  mov.s     $f12, $f20
/* 34F680 E003C1C0 46200020 */  cvt.s.d   $f0, $f0
/* 34F684 E003C1C4 0C080144 */  jal       shim_cos_deg
/* 34F688 E003C1C8 E600FFF0 */   swc1     $f0, -0x10($s0)
/* 34F68C E003C1CC 46180002 */  mul.s     $f0, $f0, $f24
/* 34F690 E003C1D0 00000000 */  nop
/* 34F694 E003C1D4 46000021 */  cvt.d.s   $f0, $f0
/* 34F698 E003C1D8 46360002 */  mul.d     $f0, $f0, $f22
/* 34F69C E003C1DC 00000000 */  nop
/* 34F6A0 E003C1E0 26310001 */  addiu     $s1, $s1, 0x1
/* 34F6A4 E003C1E4 240200FF */  addiu     $v0, $zero, 0xFF
/* 34F6A8 E003C1E8 AE020000 */  sw        $v0, 0x0($s0)
/* 34F6AC E003C1EC 0232102A */  slt       $v0, $s1, $s2
/* 34F6B0 E003C1F0 AE00FFF8 */  sw        $zero, -0x8($s0)
/* 34F6B4 E003C1F4 46200020 */  cvt.s.d   $f0, $f0
/* 34F6B8 E003C1F8 E600FFF4 */  swc1      $f0, -0xC($s0)
/* 34F6BC E003C1FC 1440FFC8 */  bnez      $v0, .LE003C120
/* 34F6C0 E003C200 26100040 */   addiu    $s0, $s0, 0x40
.LE003C204:
/* 34F6C4 E003C204 8FA20084 */  lw        $v0, 0x84($sp)
/* 34F6C8 E003C208 AC530000 */  sw        $s3, 0x0($v0)
/* 34F6CC E003C20C 8FBF0038 */  lw        $ra, 0x38($sp)
/* 34F6D0 E003C210 8FB30034 */  lw        $s3, 0x34($sp)
/* 34F6D4 E003C214 8FB20030 */  lw        $s2, 0x30($sp)
/* 34F6D8 E003C218 8FB1002C */  lw        $s1, 0x2C($sp)
/* 34F6DC E003C21C 8FB00028 */  lw        $s0, 0x28($sp)
/* 34F6E0 E003C220 D7BC0060 */  ldc1      $f28, 0x60($sp)
/* 34F6E4 E003C224 D7BA0058 */  ldc1      $f26, 0x58($sp)
/* 34F6E8 E003C228 D7B80050 */  ldc1      $f24, 0x50($sp)
/* 34F6EC E003C22C D7B60048 */  ldc1      $f22, 0x48($sp)
/* 34F6F0 E003C230 D7B40040 */  ldc1      $f20, 0x40($sp)
/* 34F6F4 E003C234 03E00008 */  jr        $ra
/* 34F6F8 E003C238 27BD0068 */   addiu    $sp, $sp, 0x68

### DECOMPILED C INSTRUCTIONS:

void damage_indicator_main(s32 arg0, f32 posX, f32 posY, f32 posZ, f32 starsRadius, f32 starsAngle, s32 damageAmt, EffectInstance** effectOut) {
    EffectBlueprint bp;
    EffectBlueprint* bpPtr = &bp;
    EffectInstance* effect;
    f32 angle;
    DamageIndicatorFXData* part;
    s32 trueDamageAmt = damageAmt;
    s32 i;

    // limit number of stars that can appear
    if (damageAmt > 20) {
        damageAmt = 20;
    }
    damageAmt++;

    bp.init = damage_indicator_init;
    bp.update = damage_indicator_update;
    bp.renderWorld = damage_indicator_render;
    bp.renderUI = damage_indicator_render_ui;
    bp.unk_00 = 0;
    bp.effectID = EFFECT_DAMAGE_INDICATOR;

    effect = shim_create_effect_instance(bpPtr);
    effect->numParts = damageAmt;

    effect->data.damageIndicator = part = shim_general_heap_malloc(damageAmt * sizeof(*part));
    ASSERT(effect->data.damageIndicator != NULL);

    part->unk_00 = arg0;
    part->basePos.x = posX;
    part->basePos.y = posY;
    part->basePos.z = posZ;
    part->radius = starsRadius;
    part->timeLeft = 100;
    part->lifetime = 0;
    part->damageAmt = trueDamageAmt;

    part++;
    for (i = 1; i < damageAmt; i++, part++) {
        part->basePos.x = 0.0f;
        part->basePos.y = 0.0f;
        part->basePos.z = 0.0f;
        part->curPos.x = part->basePos.x;
        part->curPos.y = part->basePos.y;
        part->curPos.z = part->basePos.z;
        angle = starsAngle + (((s32) ((((i % 2) * 2) - 1) * i) / 2) * (30.0f - damageAmt));
        part->scale = 0.2f;
        part->relPos.x = -shim_sin_deg(angle) * starsRadius * 1.5;
        part->relPos.y = shim_cos_deg(angle) * starsRadius * 1.5;
        part->relPos.z = 0;
        part->alpha = 255;
    }
    *effectOut = effect;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_80027BAC
/* 2FAC 80027BAC 27BDFFD0 */  addiu     $sp, $sp, -0x30
/* 2FB0 80027BB0 3C06D700 */  lui       $a2, (0xD7000002 >> 16)
/* 2FB4 80027BB4 34C60002 */  ori       $a2, $a2, (0xD7000002 & 0xFFFF)
/* 2FB8 80027BB8 3C07FF10 */  lui       $a3, (0xFF10013F >> 16)
/* 2FBC 80027BBC 34E7013F */  ori       $a3, $a3, (0xFF10013F & 0xFFFF)
/* 2FC0 80027BC0 3C08E300 */  lui       $t0, (0xE3000A01 >> 16)
/* 2FC4 80027BC4 35080A01 */  ori       $t0, $t0, (0xE3000A01 & 0xFFFF)
/* 2FC8 80027BC8 3C09E300 */  lui       $t1, (0xE3000C00 >> 16)
/* 2FCC 80027BCC 35290C00 */  ori       $t1, $t1, (0xE3000C00 & 0xFFFF)
/* 2FD0 80027BD0 3C0AE300 */  lui       $t2, (0xE3001001 >> 16)
/* 2FD4 80027BD4 354A1001 */  ori       $t2, $t2, (0xE3001001 & 0xFFFF)
/* 2FD8 80027BD8 3C0BE200 */  lui       $t3, (0xE200001C >> 16)
/* 2FDC 80027BDC 356B001C */  ori       $t3, $t3, (0xE200001C & 0xFFFF)
/* 2FE0 80027BE0 3C0CE300 */  lui       $t4, (0xE3001201 >> 16)
/* 2FE4 80027BE4 358C1201 */  ori       $t4, $t4, (0xE3001201 & 0xFFFF)
/* 2FE8 80027BE8 0000C82D */  daddu     $t9, $zero, $zero
/* 2FEC 80027BEC 3C02800A */  lui       $v0, %hi(gMainGfxPos)
/* 2FF0 80027BF0 2442A66C */  addiu     $v0, $v0, %lo(gMainGfxPos)
/* 2FF4 80027BF4 0040682D */  daddu     $t5, $v0, $zero
/* 2FF8 80027BF8 AFB5001C */  sw        $s5, 0x1C($sp)
/* 2FFC 80027BFC 3C15FD10 */  lui       $s5, (0xFD10013F >> 16)
/* 3000 80027C00 36B5013F */  ori       $s5, $s5, (0xFD10013F & 0xFFFF)
/* 3004 80027C04 AFB00008 */  sw        $s0, 0x8($sp)
/* 3008 80027C08 3C10F510 */  lui       $s0, (0xF510A000 >> 16)
/* 300C 80027C0C 3610A000 */  ori       $s0, $s0, (0xF510A000 & 0xFFFF)
/* 3010 80027C10 AFB40018 */  sw        $s4, 0x18($sp)
/* 3014 80027C14 3C14074F */  lui       $s4, (0x74FC014 >> 16)
/* 3018 80027C18 3694C014 */  ori       $s4, $s4, (0x74FC014 & 0xFFFF)
/* 301C 80027C1C AFB1000C */  sw        $s1, 0xC($sp)
/* 3020 80027C20 3C11E700 */  lui       $s1, (0xE7000000 >> 16)
/* 3024 80027C24 AFBE0028 */  sw        $fp, 0x28($sp)
/* 3028 80027C28 3C1EF200 */  lui       $fp, (0xF2000000 >> 16)
/* 302C 80027C2C AFB30014 */  sw        $s3, 0x14($sp)
/* 3030 80027C30 3C13004F */  lui       $s3, (0x4FC014 >> 16)
/* 3034 80027C34 3673C014 */  ori       $s3, $s3, (0x4FC014 & 0xFFFF)
/* 3038 80027C38 AFB20010 */  sw        $s2, 0x10($sp)
/* 303C 80027C3C 3C12E44F */  lui       $s2, (0xE44FC000 >> 16)
/* 3040 80027C40 3652C000 */  ori       $s2, $s2, (0xE44FC000 & 0xFFFF)
/* 3044 80027C44 AFB70024 */  sw        $s7, 0x24($sp)
/* 3048 80027C48 3C17E100 */  lui       $s7, (0xE1000000 >> 16)
/* 304C 80027C4C AFB60020 */  sw        $s6, 0x20($sp)
/* 3050 80027C50 3C16F100 */  lui       $s6, (0xF1000000 >> 16)
/* 3054 80027C54 0320C02D */  daddu     $t8, $t9, $zero
/* 3058 80027C58 240F0014 */  addiu     $t7, $zero, 0x14
/* 305C 80027C5C 0080702D */  daddu     $t6, $a0, $zero
/* 3060 80027C60 8DA20000 */  lw        $v0, 0x0($t5)
/* 3064 80027C64 0220182D */  daddu     $v1, $s1, $zero
/* 3068 80027C68 0040202D */  daddu     $a0, $v0, $zero
/* 306C 80027C6C 24420008 */  addiu     $v0, $v0, 0x8
/* 3070 80027C70 ADA20000 */  sw        $v0, 0x0($t5)
/* 3074 80027C74 AC830000 */  sw        $v1, 0x0($a0)
/* 3078 80027C78 24430008 */  addiu     $v1, $v0, 0x8
/* 307C 80027C7C AC800004 */  sw        $zero, 0x4($a0)
/* 3080 80027C80 ADA30000 */  sw        $v1, 0x0($t5)
/* 3084 80027C84 2403FFFF */  addiu     $v1, $zero, -0x1
/* 3088 80027C88 AC430004 */  sw        $v1, 0x4($v0)
/* 308C 80027C8C 24430010 */  addiu     $v1, $v0, 0x10
/* 3090 80027C90 AC460000 */  sw        $a2, 0x0($v0)
/* 3094 80027C94 ADA30000 */  sw        $v1, 0x0($t5)
/* 3098 80027C98 24430018 */  addiu     $v1, $v0, 0x18
/* 309C 80027C9C AC470008 */  sw        $a3, 0x8($v0)
/* 30A0 80027CA0 AC45000C */  sw        $a1, 0xC($v0)
/* 30A4 80027CA4 ADA30000 */  sw        $v1, 0x0($t5)
/* 30A8 80027CA8 3C030020 */  lui       $v1, (0x200000 >> 16)
/* 30AC 80027CAC AC430014 */  sw        $v1, 0x14($v0)
/* 30B0 80027CB0 24430020 */  addiu     $v1, $v0, 0x20
/* 30B4 80027CB4 AC480010 */  sw        $t0, 0x10($v0)
/* 30B8 80027CB8 ADA30000 */  sw        $v1, 0x0($t5)
/* 30BC 80027CBC 24430028 */  addiu     $v1, $v0, 0x28
/* 30C0 80027CC0 AC490018 */  sw        $t1, 0x18($v0)
/* 30C4 80027CC4 AC40001C */  sw        $zero, 0x1C($v0)
/* 30C8 80027CC8 ADA30000 */  sw        $v1, 0x0($t5)
/* 30CC 80027CCC 24430030 */  addiu     $v1, $v0, 0x30
/* 30D0 80027CD0 AC4A0020 */  sw        $t2, 0x20($v0)
/* 30D4 80027CD4 AC400024 */  sw        $zero, 0x24($v0)
/* 30D8 80027CD8 ADA30000 */  sw        $v1, 0x0($t5)
/* 30DC 80027CDC 24430038 */  addiu     $v1, $v0, 0x38
/* 30E0 80027CE0 AC4B0028 */  sw        $t3, 0x28($v0)
/* 30E4 80027CE4 AC40002C */  sw        $zero, 0x2C($v0)
/* 30E8 80027CE8 ADA30000 */  sw        $v1, 0x0($t5)
/* 30EC 80027CEC AC4C0030 */  sw        $t4, 0x30($v0)
/* 30F0 80027CF0 AC400034 */  sw        $zero, 0x34($v0)
.L80027CF4:
/* 30F4 80027CF4 3C061000 */  lui       $a2, (0x10000400 >> 16)
/* 30F8 80027CF8 34C60400 */  ori       $a2, $a2, (0x10000400 & 0xFFFF)
/* 30FC 80027CFC 33050FFF */  andi      $a1, $t8, 0xFFF
/* 3100 80027D00 27180018 */  addiu     $t8, $t8, 0x18
/* 3104 80027D04 31E40FFF */  andi      $a0, $t7, 0xFFF
/* 3108 80027D08 25EF0018 */  addiu     $t7, $t7, 0x18
/* 310C 80027D0C 27390001 */  addiu     $t9, $t9, 0x1
/* 3110 80027D10 8DA20000 */  lw        $v0, 0x0($t5)
/* 3114 80027D14 00922025 */  or        $a0, $a0, $s2
/* 3118 80027D18 0040182D */  daddu     $v1, $v0, $zero
/* 311C 80027D1C 24420008 */  addiu     $v0, $v0, 0x8
/* 3120 80027D20 AC6E0004 */  sw        $t6, 0x4($v1)
/* 3124 80027D24 ADA20000 */  sw        $v0, 0x0($t5)
/* 3128 80027D28 AC750000 */  sw        $s5, 0x0($v1)
/* 312C 80027D2C 24430008 */  addiu     $v1, $v0, 0x8
/* 3130 80027D30 3C070700 */  lui       $a3, (0x7000000 >> 16)
/* 3134 80027D34 ADA30000 */  sw        $v1, 0x0($t5)
/* 3138 80027D38 24430010 */  addiu     $v1, $v0, 0x10
/* 313C 80027D3C AC470004 */  sw        $a3, 0x4($v0)
/* 3140 80027D40 3C07E600 */  lui       $a3, (0xE6000000 >> 16)
/* 3144 80027D44 AC500000 */  sw        $s0, 0x0($v0)
/* 3148 80027D48 ADA30000 */  sw        $v1, 0x0($t5)
/* 314C 80027D4C 24430018 */  addiu     $v1, $v0, 0x18
/* 3150 80027D50 AC470008 */  sw        $a3, 0x8($v0)
/* 3154 80027D54 3C07F400 */  lui       $a3, (0xF4000000 >> 16)
/* 3158 80027D58 AC40000C */  sw        $zero, 0xC($v0)
/* 315C 80027D5C ADA30000 */  sw        $v1, 0x0($t5)
/* 3160 80027D60 24430020 */  addiu     $v1, $v0, 0x20
/* 3164 80027D64 AC470010 */  sw        $a3, 0x10($v0)
/* 3168 80027D68 AC540014 */  sw        $s4, 0x14($v0)
/* 316C 80027D6C ADA30000 */  sw        $v1, 0x0($t5)
/* 3170 80027D70 24430028 */  addiu     $v1, $v0, 0x28
/* 3174 80027D74 AC510018 */  sw        $s1, 0x18($v0)
/* 3178 80027D78 AC40001C */  sw        $zero, 0x1C($v0)
/* 317C 80027D7C ADA30000 */  sw        $v1, 0x0($t5)
/* 3180 80027D80 24430030 */  addiu     $v1, $v0, 0x30
/* 3184 80027D84 AC500020 */  sw        $s0, 0x20($v0)
/* 3188 80027D88 AC400024 */  sw        $zero, 0x24($v0)
/* 318C 80027D8C ADA30000 */  sw        $v1, 0x0($t5)
/* 3190 80027D90 24430038 */  addiu     $v1, $v0, 0x38
/* 3194 80027D94 AC5E0028 */  sw        $fp, 0x28($v0)
/* 3198 80027D98 AC53002C */  sw        $s3, 0x2C($v0)
/* 319C 80027D9C ADA30000 */  sw        $v1, 0x0($t5)
/* 31A0 80027DA0 24430040 */  addiu     $v1, $v0, 0x40
/* 31A4 80027DA4 AC440030 */  sw        $a0, 0x30($v0)
/* 31A8 80027DA8 AC450034 */  sw        $a1, 0x34($v0)
/* 31AC 80027DAC ADA30000 */  sw        $v1, 0x0($t5)
/* 31B0 80027DB0 24430048 */  addiu     $v1, $v0, 0x48
/* 31B4 80027DB4 AC570038 */  sw        $s7, 0x38($v0)
/* 31B8 80027DB8 AC40003C */  sw        $zero, 0x3C($v0)
/* 31BC 80027DBC ADA30000 */  sw        $v1, 0x0($t5)
/* 31C0 80027DC0 24430050 */  addiu     $v1, $v0, 0x50
/* 31C4 80027DC4 AC560040 */  sw        $s6, 0x40($v0)
/* 31C8 80027DC8 AC460044 */  sw        $a2, 0x44($v0)
/* 31CC 80027DCC ADA30000 */  sw        $v1, 0x0($t5)
/* 31D0 80027DD0 AC510048 */  sw        $s1, 0x48($v0)
/* 31D4 80027DD4 AC40004C */  sw        $zero, 0x4C($v0)
/* 31D8 80027DD8 2B220028 */  slti      $v0, $t9, 0x28
/* 31DC 80027DDC 1440FFC5 */  bnez      $v0, .L80027CF4
/* 31E0 80027DE0 25CE0F00 */   addiu    $t6, $t6, 0xF00
/* 31E4 80027DE4 8FBE0028 */  lw        $fp, 0x28($sp)
/* 31E8 80027DE8 8FB70024 */  lw        $s7, 0x24($sp)
/* 31EC 80027DEC 8FB60020 */  lw        $s6, 0x20($sp)
/* 31F0 80027DF0 8FB5001C */  lw        $s5, 0x1C($sp)
/* 31F4 80027DF4 8FB40018 */  lw        $s4, 0x18($sp)
/* 31F8 80027DF8 8FB30014 */  lw        $s3, 0x14($sp)
/* 31FC 80027DFC 8FB20010 */  lw        $s2, 0x10($sp)
/* 3200 80027E00 8FB1000C */  lw        $s1, 0xC($sp)
/* 3204 80027E04 8FB00008 */  lw        $s0, 0x8($sp)
/* 3208 80027E08 03E00008 */  jr        $ra
/* 320C 80027E0C 27BD0030 */   addiu    $sp, $sp, 0x30

### DECOMPILED C INSTRUCTIONS:

void func_80027BAC(s32 arg0, s32 arg1) {
    s32 i;
    s32 temp = 24; // todo figure out why this is needed and can't be used elsewhere

    gDPPipeSync(gMainGfxPos++);
    gSPTexture(gMainGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON);
    gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, arg1);
    gDPSetCycleType(gMainGfxPos++, G_CYC_COPY);
    gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
    gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
    gDPSetRenderMode(gMainGfxPos++, G_RM_NOOP, G_RM_NOOP2);
    gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);

    for (i = 0; i < 40; i++) {
        gDPLoadTextureTile(gMainGfxPos++, arg0 + (0xF00 * i), G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH,
                           SCREEN_HEIGHT, 0, 0, SCREEN_WIDTH - 1, 5, 0, G_TX_NOMIRROR | G_TX_WRAP,
                           G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
        gSPTextureRectangle(gMainGfxPos++, 0, i * temp, 0x04FC, (i * 24) + 20, G_TX_RENDERTILE, 0, 0, 0x1000, 0x0400);
        gDPPipeSync(gMainGfxPos++);
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel sweat_appendGfx
/* 35C2D8 E0050308 27BDFF40 */  addiu     $sp, $sp, -0xC0
/* 35C2DC E005030C 0080282D */  daddu     $a1, $a0, $zero
/* 35C2E0 E0050310 3C06DB06 */  lui       $a2, (0xDB060024 >> 16)
/* 35C2E4 E0050314 34C60024 */  ori       $a2, $a2, (0xDB060024 & 0xFFFF)
/* 35C2E8 E0050318 27A40018 */  addiu     $a0, $sp, 0x18
/* 35C2EC E005031C AFB400A8 */  sw        $s4, 0xA8($sp)
/* 35C2F0 E0050320 3C14800A */  lui       $s4, %hi(gMainGfxPos)
/* 35C2F4 E0050324 2694A66C */  addiu     $s4, $s4, %lo(gMainGfxPos)
/* 35C2F8 E0050328 AFB200A0 */  sw        $s2, 0xA0($sp)
/* 35C2FC E005032C 3C120001 */  lui       $s2, (0x11630 >> 16)
/* 35C300 E0050330 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 35C304 E0050334 AFBF00AC */  sw        $ra, 0xAC($sp)
/* 35C308 E0050338 AFB300A4 */  sw        $s3, 0xA4($sp)
/* 35C30C E005033C AFB1009C */  sw        $s1, 0x9C($sp)
/* 35C310 E0050340 AFB00098 */  sw        $s0, 0x98($sp)
/* 35C314 E0050344 F7B600B8 */  sdc1      $f22, 0xB8($sp)
/* 35C318 E0050348 F7B400B0 */  sdc1      $f20, 0xB0($sp)
/* 35C31C E005034C 8E880000 */  lw        $t0, 0x0($s4)
/* 35C320 E0050350 8CB3000C */  lw        $s3, 0xC($a1)
/* 35C324 E0050354 0100182D */  daddu     $v1, $t0, $zero
/* 35C328 E0050358 25080008 */  addiu     $t0, $t0, 0x8
/* 35C32C E005035C AC620000 */  sw        $v0, 0x0($v1)
/* 35C330 E0050360 AC600004 */  sw        $zero, 0x4($v1)
/* 35C334 E0050364 AD060000 */  sw        $a2, 0x0($t0)
/* 35C338 E0050368 8CA20010 */  lw        $v0, 0x10($a1)
/* 35C33C E005036C 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* 35C340 E0050370 AE880000 */  sw        $t0, 0x0($s4)
/* 35C344 E0050374 8C42001C */  lw        $v0, 0x1C($v0)
/* 35C348 E0050378 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 35C34C E005037C 00431021 */  addu      $v0, $v0, $v1
/* 35C350 E0050380 AD020004 */  sw        $v0, 0x4($t0)
/* 35C354 E0050384 8E650004 */  lw        $a1, 0x4($s3)
/* 35C358 E0050388 8E660008 */  lw        $a2, 0x8($s3)
/* 35C35C E005038C 8E67000C */  lw        $a3, 0xC($s3)
/* 35C360 E0050390 25080008 */  addiu     $t0, $t0, 0x8
/* 35C364 E0050394 0C080108 */  jal       shim_guTranslateF
/* 35C368 E0050398 AE880000 */   sw       $t0, 0x0($s4)
/* 35C36C E005039C 27B00058 */  addiu     $s0, $sp, 0x58
/* 35C370 E00503A0 4480A000 */  mtc1      $zero, $f20
/* 35C374 E00503A4 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 35C378 E00503A8 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 35C37C E00503AC 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 35C380 E00503B0 4481B000 */  mtc1      $at, $f22
/* 35C384 E00503B4 00031080 */  sll       $v0, $v1, 2
/* 35C388 E00503B8 00431021 */  addu      $v0, $v0, $v1
/* 35C38C E00503BC 00021080 */  sll       $v0, $v0, 2
/* 35C390 E00503C0 00431023 */  subu      $v0, $v0, $v1
/* 35C394 E00503C4 000218C0 */  sll       $v1, $v0, 3
/* 35C398 E00503C8 00431021 */  addu      $v0, $v0, $v1
/* 35C39C E00503CC 000210C0 */  sll       $v0, $v0, 3
/* 35C3A0 E00503D0 4406A000 */  mfc1      $a2, $f20
/* 35C3A4 E00503D4 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 35C3A8 E00503D8 00220821 */  addu      $at, $at, $v0
/* 35C3AC E00503DC C4201DEC */  lwc1      $f0, %lo(gCameras + 0x6C)($at)
/* 35C3B0 E00503E0 4407B000 */  mfc1      $a3, $f22
/* 35C3B4 E00503E4 46000007 */  neg.s     $f0, $f0
/* 35C3B8 E00503E8 44050000 */  mfc1      $a1, $f0
/* 35C3BC E00503EC 0200202D */  daddu     $a0, $s0, $zero
/* 35C3C0 E00503F0 0C080104 */  jal       shim_guRotateF
/* 35C3C4 E00503F4 E7B40010 */   swc1     $f20, 0x10($sp)
/* 35C3C8 E00503F8 0200202D */  daddu     $a0, $s0, $zero
/* 35C3CC E00503FC 27A50018 */  addiu     $a1, $sp, 0x18
/* 35C3D0 E0050400 0C080114 */  jal       shim_guMtxCatF
/* 35C3D4 E0050404 00A0302D */   daddu    $a2, $a1, $zero
/* 35C3D8 E0050408 E7B60010 */  swc1      $f22, 0x10($sp)
/* 35C3DC E005040C 8E650010 */  lw        $a1, 0x10($s3)
/* 35C3E0 E0050410 4406A000 */  mfc1      $a2, $f20
/* 35C3E4 E0050414 4407A000 */  mfc1      $a3, $f20
/* 35C3E8 E0050418 0C080104 */  jal       shim_guRotateF
/* 35C3EC E005041C 0200202D */   daddu    $a0, $s0, $zero
/* 35C3F0 E0050420 0200202D */  daddu     $a0, $s0, $zero
/* 35C3F4 E0050424 27A50018 */  addiu     $a1, $sp, 0x18
/* 35C3F8 E0050428 0C080114 */  jal       shim_guMtxCatF
/* 35C3FC E005042C 00A0302D */   daddu    $a2, $a1, $zero
/* 35C400 E0050430 27A40018 */  addiu     $a0, $sp, 0x18
/* 35C404 E0050434 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 35C408 E0050438 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 35C40C E005043C 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* 35C410 E0050440 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* 35C414 E0050444 96050000 */  lhu       $a1, 0x0($s0)
/* 35C418 E0050448 8E220000 */  lw        $v0, 0x0($s1)
/* 35C41C E005044C 00052980 */  sll       $a1, $a1, 6
/* 35C420 E0050450 00B22821 */  addu      $a1, $a1, $s2
/* 35C424 E0050454 0C080118 */  jal       shim_guMtxF2L
/* 35C428 E0050458 00452821 */   addu     $a1, $v0, $a1
/* 35C42C E005045C 3C02DA38 */  lui       $v0, (0xDA380002 >> 16)
/* 35C430 E0050460 34420002 */  ori       $v0, $v0, (0xDA380002 & 0xFFFF)
/* 35C434 E0050464 8E860000 */  lw        $a2, 0x0($s4)
/* 35C438 E0050468 96040000 */  lhu       $a0, 0x0($s0)
/* 35C43C E005046C 00C0282D */  daddu     $a1, $a2, $zero
/* 35C440 E0050470 24C60008 */  addiu     $a2, $a2, 0x8
/* 35C444 E0050474 AE860000 */  sw        $a2, 0x0($s4)
/* 35C448 E0050478 ACA20000 */  sw        $v0, 0x0($a1)
/* 35C44C E005047C 3082FFFF */  andi      $v0, $a0, 0xFFFF
/* 35C450 E0050480 00021180 */  sll       $v0, $v0, 6
/* 35C454 E0050484 8E230000 */  lw        $v1, 0x0($s1)
/* 35C458 E0050488 00521021 */  addu      $v0, $v0, $s2
/* 35C45C E005048C 00621821 */  addu      $v1, $v1, $v0
/* 35C460 E0050490 ACA30004 */  sw        $v1, 0x4($a1)
/* 35C464 E0050494 C6600010 */  lwc1      $f0, 0x10($s3)
/* 35C468 E0050498 24840001 */  addiu     $a0, $a0, 0x1
/* 35C46C E005049C 4600A03C */  c.lt.s    $f20, $f0
/* 35C470 E00504A0 00000000 */  nop
/* 35C474 E00504A4 4500000D */  bc1f      .LE00504DC
/* 35C478 E00504A8 A6040000 */   sh       $a0, 0x0($s0)
/* 35C47C E00504AC 3C040900 */  lui       $a0, %hi(D_090002C8_415328)
/* 35C480 E00504B0 248402C8 */  addiu     $a0, $a0, %lo(D_090002C8_415328)
/* 35C484 E00504B4 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 35C488 E00504B8 ACC20000 */  sw        $v0, 0x0($a2)
/* 35C48C E00504BC 8E630000 */  lw        $v1, 0x0($s3)
/* 35C490 E00504C0 24C20008 */  addiu     $v0, $a2, 0x8
/* 35C494 E00504C4 1460000F */  bnez      $v1, .LE0050504
/* 35C498 E00504C8 AE820000 */   sw       $v0, 0x0($s4)
/* 35C49C E00504CC 3C040900 */  lui       $a0, %hi(D_09000200_415260)
/* 35C4A0 E00504D0 24840200 */  addiu     $a0, $a0, %lo(D_09000200_415260)
/* 35C4A4 E00504D4 08014142 */  j         .LE0050508
/* 35C4A8 E00504D8 ACC40004 */   sw       $a0, 0x4($a2)
.LE00504DC:
/* 35C4AC E00504DC 3C040900 */  lui       $a0, %hi(D_09000460_4154C0)
/* 35C4B0 E00504E0 24840460 */  addiu     $a0, $a0, %lo(D_09000460_4154C0)
/* 35C4B4 E00504E4 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 35C4B8 E00504E8 ACC20000 */  sw        $v0, 0x0($a2)
/* 35C4BC E00504EC 8E630000 */  lw        $v1, 0x0($s3)
/* 35C4C0 E00504F0 24C20008 */  addiu     $v0, $a2, 0x8
/* 35C4C4 E00504F4 14600003 */  bnez      $v1, .LE0050504
/* 35C4C8 E00504F8 AE820000 */   sw       $v0, 0x0($s4)
/* 35C4CC E00504FC 3C040900 */  lui       $a0, %hi(D_09000390_4153F0)
/* 35C4D0 E0050500 24840390 */  addiu     $a0, $a0, %lo(D_09000390_4153F0)
.LE0050504:
/* 35C4D4 E0050504 ACC40004 */  sw        $a0, 0x4($a2)
.LE0050508:
/* 35C4D8 E0050508 3C05D838 */  lui       $a1, (0xD8380002 >> 16)
/* 35C4DC E005050C 3C03800A */  lui       $v1, %hi(gMainGfxPos)
/* 35C4E0 E0050510 2463A66C */  addiu     $v1, $v1, %lo(gMainGfxPos)
/* 35C4E4 E0050514 8C620000 */  lw        $v0, 0x0($v1)
/* 35C4E8 E0050518 34A50002 */  ori       $a1, $a1, (0xD8380002 & 0xFFFF)
/* 35C4EC E005051C 0040202D */  daddu     $a0, $v0, $zero
/* 35C4F0 E0050520 24420008 */  addiu     $v0, $v0, 0x8
/* 35C4F4 E0050524 AC620000 */  sw        $v0, 0x0($v1)
/* 35C4F8 E0050528 24020040 */  addiu     $v0, $zero, 0x40
/* 35C4FC E005052C AC850000 */  sw        $a1, 0x0($a0)
/* 35C500 E0050530 AC820004 */  sw        $v0, 0x4($a0)
/* 35C504 E0050534 8FBF00AC */  lw        $ra, 0xAC($sp)
/* 35C508 E0050538 8FB400A8 */  lw        $s4, 0xA8($sp)
/* 35C50C E005053C 8FB300A4 */  lw        $s3, 0xA4($sp)
/* 35C510 E0050540 8FB200A0 */  lw        $s2, 0xA0($sp)
/* 35C514 E0050544 8FB1009C */  lw        $s1, 0x9C($sp)
/* 35C518 E0050548 8FB00098 */  lw        $s0, 0x98($sp)
/* 35C51C E005054C D7B600B8 */  ldc1      $f22, 0xB8($sp)
/* 35C520 E0050550 D7B400B0 */  ldc1      $f20, 0xB0($sp)
/* 35C524 E0050554 03E00008 */  jr        $ra
/* 35C528 E0050558 27BD00C0 */   addiu    $sp, $sp, 0xC0
/* 35C52C E005055C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void sweat_appendGfx(void* effect) {
    SweatFXData* data = ((EffectInstance*)effect)->data.sweat;
    Matrix4f sp18;
    Matrix4f sp58;

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

    shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z);
    shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
    shim_guMtxCatF(sp58, sp18, sp18);
    shim_guRotateF(sp58, data->unk_10, 0.0f, 0.0f, 1.0f);
    shim_guMtxCatF(sp58, sp18, sp18);
    shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

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

    if (data->unk_10 > 0.0f) {
        gSPDisplayList(gMainGfxPos++, data->unk_00 == 0 ? D_09000200_35C750 : D_090002C8_35C818);
    } else {
        gSPDisplayList(gMainGfxPos++, data->unk_00 == 0 ? D_09000390_35C8E0 : D_09000460_35C9B0);
    }

    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel EnemyTestTarget
/* 1AB898 8027CFB8 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* 1AB89C 8027CFBC AFB3001C */  sw        $s3, 0x1C($sp)
/* 1AB8A0 8027CFC0 0080982D */  daddu     $s3, $a0, $zero
/* 1AB8A4 8027CFC4 AFBF0024 */  sw        $ra, 0x24($sp)
/* 1AB8A8 8027CFC8 AFB40020 */  sw        $s4, 0x20($sp)
/* 1AB8AC 8027CFCC AFB20018 */  sw        $s2, 0x18($sp)
/* 1AB8B0 8027CFD0 AFB10014 */  sw        $s1, 0x14($sp)
/* 1AB8B4 8027CFD4 AFB00010 */  sw        $s0, 0x10($sp)
/* 1AB8B8 8027CFD8 8E70000C */  lw        $s0, 0xC($s3)
/* 1AB8BC 8027CFDC 8E050000 */  lw        $a1, 0x0($s0)
/* 1AB8C0 8027CFE0 0C0B1EAF */  jal       evt_get_variable
/* 1AB8C4 8027CFE4 26100004 */   addiu    $s0, $s0, 0x4
/* 1AB8C8 8027CFE8 0040202D */  daddu     $a0, $v0, $zero
/* 1AB8CC 8027CFEC 3C11800E */  lui       $s1, %hi(gBattleStatus)
/* 1AB8D0 8027CFF0 2631C070 */  addiu     $s1, $s1, %lo(gBattleStatus)
/* 1AB8D4 8027CFF4 2402FF81 */  addiu     $v0, $zero, -0x7F
/* 1AB8D8 8027CFF8 14820002 */  bne       $a0, $v0, .L8027D004
/* 1AB8DC 8027CFFC 00000000 */   nop
/* 1AB8E0 8027D000 8E640148 */  lw        $a0, 0x148($s3)
.L8027D004:
/* 1AB8E4 8027D004 0C09A75B */  jal       get_actor
/* 1AB8E8 8027D008 00000000 */   nop
/* 1AB8EC 8027D00C 8E140000 */  lw        $s4, 0x0($s0)
/* 1AB8F0 8027D010 26100004 */  addiu     $s0, $s0, 0x4
/* 1AB8F4 8027D014 8E030000 */  lw        $v1, 0x0($s0)
/* 1AB8F8 8027D018 26100004 */  addiu     $s0, $s0, 0x4
/* 1AB8FC 8027D01C 0260202D */  daddu     $a0, $s3, $zero
/* 1AB900 8027D020 0040902D */  daddu     $s2, $v0, $zero
/* 1AB904 8027D024 AE20018C */  sw        $zero, 0x18C($s1)
/* 1AB908 8027D028 AE230188 */  sw        $v1, 0x188($s1)
/* 1AB90C 8027D02C 8E030000 */  lw        $v1, 0x0($s0)
/* 1AB910 8027D030 26100004 */  addiu     $s0, $s0, 0x4
/* 1AB914 8027D034 AE230190 */  sw        $v1, 0x190($s1)
/* 1AB918 8027D038 8E050000 */  lw        $a1, 0x0($s0)
/* 1AB91C 8027D03C 0C0B1EAF */  jal       evt_get_variable
/* 1AB920 8027D040 26100004 */   addiu    $s0, $s0, 0x4
/* 1AB924 8027D044 A622017E */  sh        $v0, 0x17E($s1)
/* 1AB928 8027D048 8E050000 */  lw        $a1, 0x0($s0)
/* 1AB92C 8027D04C 30A20010 */  andi      $v0, $a1, 0x10
/* 1AB930 8027D050 10400004 */  beqz      $v0, .L8027D064
/* 1AB934 8027D054 2403FFDF */   addiu    $v1, $zero, -0x21
/* 1AB938 8027D058 8E220000 */  lw        $v0, 0x0($s1)
/* 1AB93C 8027D05C 0809F423 */  j         .L8027D08C
/* 1AB940 8027D060 34420010 */   ori      $v0, $v0, 0x10
.L8027D064:
/* 1AB944 8027D064 30A20020 */  andi      $v0, $a1, 0x20
/* 1AB948 8027D068 10400005 */  beqz      $v0, .L8027D080
/* 1AB94C 8027D06C 2403FFEF */   addiu    $v1, $zero, -0x11
/* 1AB950 8027D070 8E220000 */  lw        $v0, 0x0($s1)
/* 1AB954 8027D074 00431024 */  and       $v0, $v0, $v1
/* 1AB958 8027D078 0809F424 */  j         .L8027D090
/* 1AB95C 8027D07C 34420020 */   ori      $v0, $v0, 0x20
.L8027D080:
/* 1AB960 8027D080 8E220000 */  lw        $v0, 0x0($s1)
/* 1AB964 8027D084 00431024 */  and       $v0, $v0, $v1
/* 1AB968 8027D088 2403FFDF */  addiu     $v1, $zero, -0x21
.L8027D08C:
/* 1AB96C 8027D08C 00431024 */  and       $v0, $v0, $v1
.L8027D090:
/* 1AB970 8027D090 AE220000 */  sw        $v0, 0x0($s1)
/* 1AB974 8027D094 30A20040 */  andi      $v0, $a1, 0x40
/* 1AB978 8027D098 10400007 */  beqz      $v0, .L8027D0B8
/* 1AB97C 8027D09C 2404FFBF */   addiu    $a0, $zero, -0x41
/* 1AB980 8027D0A0 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 1AB984 8027D0A4 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 1AB988 8027D0A8 8C620000 */  lw        $v0, 0x0($v1)
/* 1AB98C 8027D0AC 34420040 */  ori       $v0, $v0, 0x40
/* 1AB990 8027D0B0 0809F433 */  j         .L8027D0CC
/* 1AB994 8027D0B4 AC620000 */   sw       $v0, 0x0($v1)
.L8027D0B8:
/* 1AB998 8027D0B8 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1AB99C 8027D0BC 2442C070 */  addiu     $v0, $v0, %lo(gBattleStatus)
/* 1AB9A0 8027D0C0 8C430000 */  lw        $v1, 0x0($v0)
/* 1AB9A4 8027D0C4 00641824 */  and       $v1, $v1, $a0
/* 1AB9A8 8027D0C8 AC430000 */  sw        $v1, 0x0($v0)
.L8027D0CC:
/* 1AB9AC 8027D0CC 30A20200 */  andi      $v0, $a1, 0x200
/* 1AB9B0 8027D0D0 10400007 */  beqz      $v0, .L8027D0F0
/* 1AB9B4 8027D0D4 2404FDFF */   addiu    $a0, $zero, -0x201
/* 1AB9B8 8027D0D8 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 1AB9BC 8027D0DC 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 1AB9C0 8027D0E0 8C620000 */  lw        $v0, 0x0($v1)
/* 1AB9C4 8027D0E4 34420200 */  ori       $v0, $v0, 0x200
/* 1AB9C8 8027D0E8 0809F441 */  j         .L8027D104
/* 1AB9CC 8027D0EC AC620000 */   sw       $v0, 0x0($v1)
.L8027D0F0:
/* 1AB9D0 8027D0F0 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1AB9D4 8027D0F4 2442C070 */  addiu     $v0, $v0, %lo(gBattleStatus)
/* 1AB9D8 8027D0F8 8C430000 */  lw        $v1, 0x0($v0)
/* 1AB9DC 8027D0FC 00641824 */  and       $v1, $v1, $a0
/* 1AB9E0 8027D100 AC430000 */  sw        $v1, 0x0($v0)
.L8027D104:
/* 1AB9E4 8027D104 30A20080 */  andi      $v0, $a1, 0x80
/* 1AB9E8 8027D108 10400007 */  beqz      $v0, .L8027D128
/* 1AB9EC 8027D10C 2404FF7F */   addiu    $a0, $zero, -0x81
/* 1AB9F0 8027D110 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 1AB9F4 8027D114 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 1AB9F8 8027D118 8C620000 */  lw        $v0, 0x0($v1)
/* 1AB9FC 8027D11C 34420080 */  ori       $v0, $v0, 0x80
/* 1ABA00 8027D120 0809F44F */  j         .L8027D13C
/* 1ABA04 8027D124 AC620000 */   sw       $v0, 0x0($v1)
.L8027D128:
/* 1ABA08 8027D128 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1ABA0C 8027D12C 2442C070 */  addiu     $v0, $v0, %lo(gBattleStatus)
/* 1ABA10 8027D130 8C430000 */  lw        $v1, 0x0($v0)
/* 1ABA14 8027D134 00641824 */  and       $v1, $v1, $a0
/* 1ABA18 8027D138 AC430000 */  sw        $v1, 0x0($v0)
.L8027D13C:
/* 1ABA1C 8027D13C 96420428 */  lhu       $v0, 0x428($s2)
/* 1ABA20 8027D140 92230193 */  lbu       $v1, 0x193($s1)
/* 1ABA24 8027D144 A62201A0 */  sh        $v0, 0x1A0($s1)
/* 1ABA28 8027D148 92420426 */  lbu       $v0, 0x426($s2)
/* 1ABA2C 8027D14C A2230194 */  sb        $v1, 0x194($s1)
/* 1ABA30 8027D150 306300FF */  andi      $v1, $v1, 0xFF
/* 1ABA34 8027D154 A22201A2 */  sb        $v0, 0x1A2($s1)
/* 1ABA38 8027D158 240200FF */  addiu     $v0, $zero, 0xFF
/* 1ABA3C 8027D15C 50620001 */  beql      $v1, $v0, .L8027D164
/* 1ABA40 8027D160 A2200194 */   sb       $zero, 0x194($s1)
.L8027D164:
/* 1ABA44 8027D164 8E220190 */  lw        $v0, 0x190($s1)
/* 1ABA48 8027D168 0240202D */  daddu     $a0, $s2, $zero
/* 1ABA4C 8027D16C 30420F00 */  andi      $v0, $v0, 0xF00
/* 1ABA50 8027D170 00021203 */  sra       $v0, $v0, 8
/* 1ABA54 8027D174 0C09DC7E */  jal       calc_enemy_test_target
/* 1ABA58 8027D178 A2220195 */   sb       $v0, 0x195($s1)
/* 1ABA5C 8027D17C 04400006 */  bltz      $v0, .L8027D198
/* 1ABA60 8027D180 0260202D */   daddu    $a0, $s3, $zero
/* 1ABA64 8027D184 0280282D */  daddu     $a1, $s4, $zero
/* 1ABA68 8027D188 0C0B2026 */  jal       evt_set_variable
/* 1ABA6C 8027D18C 0040302D */   daddu    $a2, $v0, $zero
/* 1ABA70 8027D190 0809F467 */  j         .L8027D19C
/* 1ABA74 8027D194 24020002 */   addiu    $v0, $zero, 0x2
.L8027D198:
/* 1ABA78 8027D198 240200FF */  addiu     $v0, $zero, 0xFF
.L8027D19C:
/* 1ABA7C 8027D19C 8FBF0024 */  lw        $ra, 0x24($sp)
/* 1ABA80 8027D1A0 8FB40020 */  lw        $s4, 0x20($sp)
/* 1ABA84 8027D1A4 8FB3001C */  lw        $s3, 0x1C($sp)
/* 1ABA88 8027D1A8 8FB20018 */  lw        $s2, 0x18($sp)
/* 1ABA8C 8027D1AC 8FB10014 */  lw        $s1, 0x14($sp)
/* 1ABA90 8027D1B0 8FB00010 */  lw        $s0, 0x10($sp)
/* 1ABA94 8027D1B4 03E00008 */  jr        $ra
/* 1ABA98 8027D1B8 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

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

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

    actor = get_actor(actorID);
    outVar = *args++;
    battleStatus->currentAttackElement = *args++;
    battleStatus->currentAttackEventSuppression = 0;
    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;
    }

    attackStatus = battleStatus->currentAttackStatus;
    battleStatus->currentTargetID = actor->targetActorID;

    battleStatus->currentTargetPart = actor->targetPartIndex;
    battleStatus->statusChance = attackStatus;

    if ((attackStatus & 0xFF) == 0xFF) {
        battleStatus->statusChance = 0;
    }

    battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8;
    hitResult = calc_enemy_test_target(actor);

    if (hitResult < 0) {
        return ApiStatus_FINISH;
    }

    evt_set_variable(script, outVar, hitResult);

    return ApiStatus_DONE2;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel parasol_get_npc
/* E23260 802B6000 27BDFFD0 */  addiu     $sp, $sp, -0x30
/* E23264 802B6004 AFB1001C */  sw        $s1, 0x1C($sp)
/* E23268 802B6008 AFB00018 */  sw        $s0, 0x18($sp)
/* E2326C 802B600C 3C108011 */  lui       $s0, %hi(gPlayerStatus)
/* E23270 802B6010 2610EFC8 */  addiu     $s0, $s0, %lo(gPlayerStatus)
/* E23274 802B6014 AFBF0024 */  sw        $ra, 0x24($sp)
.L802B6018:
/* E23278 802B6018 AFB20020 */  sw        $s2, 0x20($sp)
/* E2327C 802B601C F7B40028 */  sdc1      $f20, 0x28($sp)
/* E23280 802B6020 8E040004 */  lw        $a0, 0x4($s0)
/* E23284 802B6024 3C128011 */  lui       $s2, %hi(gPlayerData)
/* E23288 802B6028 2652F290 */  addiu     $s2, $s2, %lo(gPlayerData)
/* E2328C 802B602C 30821000 */  andi      $v0, $a0, 0x1000
/* E23290 802B6030 10400005 */  beqz      $v0, action_hammer_play_hit_fx
/* E23294 802B6034 0000882D */   daddu    $s1, $zero, $zero
/* E23298 802B6038 0C0AD879 */  jal       func_802B61E4
/* E2329C 802B603C 00000000 */   nop
.L802B6040:
/* E232A0 802B6040 080AD872 */  j         .L802B61C8
.L802B6044:
/* E232A4 802B6044 00000000 */   nop
glabel action_hammer_play_hit_fx
/* E232A8 802B6048 96020008 */  lhu       $v0, 0x8($s0)
.L802B604C:
/* E232AC 802B604C 8E030000 */  lw        $v1, 0x0($s0)
.L802B6050:
/* E232B0 802B6050 24420001 */  addiu     $v0, $v0, 0x1
/* E232B4 802B6054 0461001E */  bgez      $v1, .L802B60D0
.L802B6058:
/* E232B8 802B6058 A6020008 */   sh       $v0, 0x8($s0)
/* E232BC 802B605C 3C027FF7 */  lui       $v0, (0x7FF7FFF1 >> 16)
glabel action_update_sliding
/* E232C0 802B6060 3442FFF1 */  ori       $v0, $v0, (0x7FF7FFF1 & 0xFFFF)
/* E232C4 802B6064 24110001 */  addiu     $s1, $zero, 0x1
.L802B6068:
/* E232C8 802B6068 00621024 */  and       $v0, $v1, $v0
/* E232CC 802B606C AE020000 */  sw        $v0, 0x0($s0)
/* E232D0 802B6070 30824000 */  andi      $v0, $a0, 0x4000
.L802B6074:
/* E232D4 802B6074 A20000B6 */  sb        $zero, 0xB6($s0)
/* E232D8 802B6078 A6000008 */  sh        $zero, 0x8($s0)
glabel .L802B607C
/* E232DC 802B607C A60000C0 */  sh        $zero, 0xC0($s0)
.L802B6080:
/* E232E0 802B6080 A60000C2 */  sh        $zero, 0xC2($s0)
/* E232E4 802B6084 AE000054 */  sw        $zero, 0x54($s0)
/* E232E8 802B6088 10400004 */  beqz      $v0, action_update_state_23
.L802B608C:
/* E232EC 802B608C AE00008C */   sw       $zero, 0x8C($s0)
.L802B6090:
/* E232F0 802B6090 3C040009 */  lui       $a0, (0x90002 >> 16)
.L802B6094:
/* E232F4 802B6094 080AD832 */  j         .L802B60C8
/* E232F8 802B6098 34840002 */   ori      $a0, $a0, (0x90002 & 0xFFFF)
glabel action_update_state_23
/* E232FC 802B609C 30820001 */  andi      $v0, $a0, 0x1
/* E23300 802B60A0 54400004 */  bnel      $v0, $zero, action_update_jump
glabel action_update_use_spinning_flower
/* E23304 802B60A4 3C040006 */   lui      $a0, (0x60007 >> 16)
.L802B60A8:
/* E23308 802B60A8 3C040001 */  lui       $a0, (0x10007 >> 16)
.L802B60AC:
/* E2330C 802B60AC 080AD832 */  j         .L802B60C8
/* E23310 802B60B0 34840002 */   ori      $a0, $a0, (0x10002 & 0xFFFF)
glabel action_update_jump
/* E23314 802B60B4 820200B5 */  lb        $v0, 0xB5($s0)
/* E23318 802B60B8 14400003 */  bnez      $v0, .L802B60C8
/* E2331C 802B60BC 34840007 */   ori      $a0, $a0, (0x10007 & 0xFFFF)
/* E23320 802B60C0 3C040006 */  lui       $a0, (0x60005 >> 16)
/* E23324 802B60C4 34840005 */  ori       $a0, $a0, (0x60005 & 0xFFFF)
.L802B60C8:
/* E23328 802B60C8 0C037FBF */  jal       suggest_player_anim_allow_backward
/* E2332C 802B60CC 00000000 */   nop
glabel .L802B60D0
/* E23330 802B60D0 8E020004 */  lw        $v0, 0x4($s0)
.L802B60D4:
/* E23334 802B60D4 30420200 */  andi      $v0, $v0, 0x200
/* E23338 802B60D8 10400005 */  beqz      $v0, .L802B60F0
/* E2333C 802B60DC 27A40010 */   addiu    $a0, $sp, 0x10
/* E23340 802B60E0 0C039769 */  jal       set_action_state
/* E23344 802B60E4 2404001C */   addiu    $a0, $zero, 0x1C
.L802B60E8:
/* E23348 802B60E8 080AD872 */  j         .L802B61C8
.L802B60EC:
/* E2334C 802B60EC 00000000 */   nop
.L802B60F0:
/* E23350 802B60F0 0C0388C1 */  jal       player_input_to_move_vector
glabel .L802B60F4
/* E23354 802B60F4 27A50014 */   addiu    $a1, $sp, 0x14
/* E23358 802B60F8 0C039454 */  jal       phys_update_interact_collider
/* E2335C 802B60FC 00000000 */   nop
.L802B6100:
/* E23360 802B6100 0C039858 */  jal       check_input_jump
.L802B6104:
/* E23364 802B6104 00000000 */   nop
.L802B6108:
/* E23368 802B6108 10400011 */  beqz      $v0, .L802B6150
glabel .L802B610C
/* E2336C 802B610C 00000000 */   nop
.L802B6110:
/* E23370 802B6110 C7A20014 */  lwc1      $f2, 0x14($sp)
/* E23374 802B6114 44800000 */  mtc1      $zero, $f0
.L802B6118:
/* E23378 802B6118 00000000 */  nop
/* E2337C 802B611C 46001032 */  c.eq.s    $f2, $f0
glabel action_update_parasol
/* E23380 802B6120 00000000 */  nop
.L802B6124:
/* E23384 802B6124 45000007 */  bc1f      .L802B6144
.L802B6128:
/* E23388 802B6128 00000000 */   nop
/* E2338C 802B612C C6020080 */  lwc1      $f2, 0x80($s0)
/* E23390 802B6130 C7A00010 */  lwc1      $f0, 0x10($sp)
glabel .L802B6134
/* E23394 802B6134 46001032 */  c.eq.s    $f2, $f0
/* E23398 802B6138 00000000 */  nop
.L802B613C:
/* E2339C 802B613C 45010022 */  bc1t      .L802B61C8
.L802B6140:
/* E233A0 802B6140 00000000 */   nop
.L802B6144:
/* E233A4 802B6144 C7A00010 */  lwc1      $f0, 0x10($sp)
/* E233A8 802B6148 080AD872 */  j         .L802B61C8
.L802B614C:
/* E233AC 802B614C E6000080 */   swc1     $f0, 0x80($s0)
.L802B6150:
/* E233B0 802B6150 16200005 */  bnez      $s1, .L802B6168
.L802B6154:
/* E233B4 802B6154 00000000 */   nop
.L802B6158:
/* E233B8 802B6158 0C039838 */  jal       check_input_hammer
.L802B615C:
/* E233BC 802B615C 00000000 */   nop
/* E233C0 802B6160 14400019 */  bnez      $v0, .L802B61C8
.L802B6164:
/* E233C4 802B6164 00000000 */   nop
.L802B6168:
/* E233C8 802B6168 C7A00014 */  lwc1      $f0, 0x14($sp)
/* E233CC 802B616C 4480A000 */  mtc1      $zero, $f20
glabel .L802B6170
/* E233D0 802B6170 00000000 */  nop
glabel .L802B6174
/* E233D4 802B6174 46140032 */  c.eq.s    $f0, $f20
/* E233D8 802B6178 00000000 */  nop
.L802B617C:
/* E233DC 802B617C 45000005 */  bc1f      .L802B6194
.L802B6180:
/* E233E0 802B6180 24040001 */   addiu    $a0, $zero, 0x1
glabel .L802B6184
/* E233E4 802B6184 964202B8 */  lhu       $v0, 0x2B8($s2)
.L802B6188:
/* E233E8 802B6188 24420001 */  addiu     $v0, $v0, 0x1
.L802B618C:
/* E233EC 802B618C 080AD872 */  j         .L802B61C8
.L802B6190:
/* E233F0 802B6190 A64202B8 */   sh       $v0, 0x2B8($s2)
.L802B6194:
/* E233F4 802B6194 0C039769 */  jal       set_action_state
glabel func_802B6198
/* E233F8 802B6198 A6000008 */   sh       $zero, 0x8($s0)
/* E233FC 802B619C C7A00014 */  lwc1      $f0, 0x14($sp)
.L802B61A0:
/* E23400 802B61A0 46140032 */  c.eq.s    $f0, $f20
.L802B61A4:
/* E23404 802B61A4 00000000 */  nop
.L802B61A8:
/* E23408 802B61A8 45010007 */  bc1t      .L802B61C8
.L802B61AC:
/* E2340C 802B61AC 3C037FFF */   lui      $v1, (0x7FFFFFFF >> 16)
.L802B61B0:
/* E23410 802B61B0 3463FFFF */  ori       $v1, $v1, (0x7FFFFFFF & 0xFFFF)
.L802B61B4:
/* E23414 802B61B4 8E020004 */  lw        $v0, 0x4($s0)
/* E23418 802B61B8 C7A00010 */  lwc1      $f0, 0x10($sp)
/* E2341C 802B61BC 00431024 */  and       $v0, $v0, $v1
glabel func_802B61C0
/* E23420 802B61C0 E6000080 */  swc1      $f0, 0x80($s0)
/* E23424 802B61C4 AE020004 */  sw        $v0, 0x4($s0)
.L802B61C8:
/* E23428 802B61C8 8FBF0024 */  lw        $ra, 0x24($sp)
.L802B61CC:
/* E2342C 802B61CC 8FB20020 */  lw        $s2, 0x20($sp)
/* E23430 802B61D0 8FB1001C */  lw        $s1, 0x1C($sp)
.L802B61D4:
/* E23434 802B61D4 8FB00018 */  lw        $s0, 0x18($sp)
.L802B61D8:
/* E23438 802B61D8 D7B40028 */  ldc1      $f20, 0x28($sp)
.L802B61DC:
/* E2343C 802B61DC 03E00008 */  jr        $ra
/* E23440 802B61E0 27BD0030 */   addiu    $sp, $sp, 0x30

### DECOMPILED C INSTRUCTIONS:

void action_update_idle(void) {
    PlayerStatus* playerStatus = &gPlayerStatus;
    PlayerData* playerData = &gPlayerData;
    s32 wasMoving = FALSE;
    f32 angle, magnitude;
    AnimID anim;

    if (playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS) {
        action_update_idle_peach();
        return;
    }

    playerStatus->currentStateTime++;

    if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) {
        playerStatus->flags &= ~(PS_FLAG_ACTION_STATE_CHANGED | PS_FLAG_ARMS_RAISED | PS_FLAG_AIRBORNE);
        wasMoving = TRUE;
        playerStatus->actionSubstate = SUBSTATE_IDLE_DEFAULT;
        playerStatus->currentStateTime = 0;
        playerStatus->timeInAir = 0;
        playerStatus->peakJumpTime = 0;
        playerStatus->currentSpeed = 0.0f;
        playerStatus->pitch = 0.0f;

        if (playerStatus->animFlags & PA_FLAG_8BIT_MARIO) {
            anim = ANIM_MarioW3_8bit_Still;
        } else if (!(playerStatus->animFlags & PA_FLAG_USING_WATT)) {
            anim = ANIM_Mario1_Idle;
        } else if (playerStatus->prevActionState == ACTION_STATE_IDLE) {
            anim = ANIM_MarioW1_TakeItem;
        } else {
            anim = ANIM_MarioW1_CarryIdle;
        }
        suggest_player_anim_allow_backward(anim);
    }

    if (playerStatus->animFlags & PA_FLAG_RAISED_ARMS) {
        set_action_state(ACTION_STATE_RAISE_ARMS);
    } else {
        player_input_to_move_vector(&angle, &magnitude);
        phys_update_interact_collider();

        if (check_input_jump()) {
            if (magnitude != 0.0f || playerStatus->targetYaw != angle) {
                playerStatus->targetYaw = angle;
            }
        } else if (wasMoving || !check_input_hammer()) {
            if (magnitude == 0.0f) {
                playerData->idleFrameCounter++;
            } else {
                playerStatus->currentStateTime = 0;
                set_action_state(ACTION_STATE_WALK);
                if (magnitude != 0.0f) {
                    playerStatus->targetYaw = angle;
                    playerStatus->animFlags &= ~PA_FLAG_80000000;
                }
            }
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_80027774
/* 2B74 80027774 27BDFF90 */  addiu     $sp, $sp, -0x70
/* 2B78 80027778 AFB40058 */  sw        $s4, 0x58($sp)
/* 2B7C 8002777C 0080A02D */  daddu     $s4, $a0, $zero
/* 2B80 80027780 AFB5005C */  sw        $s5, 0x5C($sp)
/* 2B84 80027784 00A0A82D */  daddu     $s5, $a1, $zero
/* 2B88 80027788 AFB30054 */  sw        $s3, 0x54($sp)
/* 2B8C 8002778C 24130001 */  addiu     $s3, $zero, 0x1
/* 2B90 80027790 27A80018 */  addiu     $t0, $sp, 0x18
/* 2B94 80027794 AFA80040 */  sw        $t0, 0x40($sp)
/* 2B98 80027798 24080140 */  addiu     $t0, $zero, 0x140
/* 2B9C 8002779C AFBF006C */  sw        $ra, 0x6C($sp)
/* 2BA0 800277A0 AFBE0068 */  sw        $fp, 0x68($sp)
/* 2BA4 800277A4 AFB70064 */  sw        $s7, 0x64($sp)
/* 2BA8 800277A8 AFB60060 */  sw        $s6, 0x60($sp)
/* 2BAC 800277AC AFB20050 */  sw        $s2, 0x50($sp)
/* 2BB0 800277B0 AFB1004C */  sw        $s1, 0x4C($sp)
/* 2BB4 800277B4 AFB00048 */  sw        $s0, 0x48($sp)
/* 2BB8 800277B8 AFA60078 */  sw        $a2, 0x78($sp)
/* 2BBC 800277BC AFA80044 */  sw        $t0, 0x44($sp)
.L800277C0:
/* 2BC0 800277C0 24120001 */  addiu     $s2, $zero, 0x1
/* 2BC4 800277C4 267EFFFF */  addiu     $fp, $s3, -0x1
/* 2BC8 800277C8 8FA80044 */  lw        $t0, 0x44($sp)
/* 2BCC 800277CC 0272B821 */  addu      $s7, $s3, $s2
/* 2BD0 800277D0 0112B021 */  addu      $s6, $t0, $s2
/* 2BD4 800277D4 00161840 */  sll       $v1, $s6, 1
.L800277D8:
/* 2BD8 800277D8 00752021 */  addu      $a0, $v1, $s5
/* 2BDC 800277DC 9482FFFE */  lhu       $v0, -0x2($a0)
/* 2BE0 800277E0 00021082 */  srl       $v0, $v0, 2
/* 2BE4 800277E4 3042000F */  andi      $v0, $v0, 0xF
/* 2BE8 800277E8 2C420008 */  sltiu     $v0, $v0, 0x8
/* 2BEC 800277EC 5440000D */  bnel      $v0, $zero, .L80027824
/* 2BF0 800277F0 0280202D */   daddu    $a0, $s4, $zero
/* 2BF4 800277F4 94820000 */  lhu       $v0, 0x0($a0)
/* 2BF8 800277F8 00021082 */  srl       $v0, $v0, 2
/* 2BFC 800277FC 3042000F */  andi      $v0, $v0, 0xF
/* 2C00 80027800 2C420008 */  sltiu     $v0, $v0, 0x8
/* 2C04 80027804 54400007 */  bnel      $v0, $zero, .L80027824
/* 2C08 80027808 0280202D */   daddu    $a0, $s4, $zero
/* 2C0C 8002780C 94820002 */  lhu       $v0, 0x2($a0)
/* 2C10 80027810 00021082 */  srl       $v0, $v0, 2
/* 2C14 80027814 3042000F */  andi      $v0, $v0, 0xF
/* 2C18 80027818 2C420008 */  sltiu     $v0, $v0, 0x8
/* 2C1C 8002781C 10400048 */  beqz      $v0, .L80027940
/* 2C20 80027820 0280202D */   daddu    $a0, $s4, $zero
.L80027824:
/* 2C24 80027824 02A0282D */  daddu     $a1, $s5, $zero
/* 2C28 80027828 03C0302D */  daddu     $a2, $fp, $zero
/* 2C2C 8002782C 2650FFFF */  addiu     $s0, $s2, -0x1
/* 2C30 80027830 8FA80040 */  lw        $t0, 0x40($sp)
/* 2C34 80027834 0200382D */  daddu     $a3, $s0, $zero
/* 2C38 80027838 0C009C7F */  jal       gfx_frame_filter_pass_0
/* 2C3C 8002783C AFA80010 */   sw       $t0, 0x10($sp)
/* 2C40 80027840 0280202D */  daddu     $a0, $s4, $zero
/* 2C44 80027844 02A0282D */  daddu     $a1, $s5, $zero
/* 2C48 80027848 03C0302D */  daddu     $a2, $fp, $zero
/* 2C4C 8002784C 0240382D */  daddu     $a3, $s2, $zero
/* 2C50 80027850 27A2001C */  addiu     $v0, $sp, 0x1C
/* 2C54 80027854 0C009C7F */  jal       gfx_frame_filter_pass_0
/* 2C58 80027858 AFA20010 */   sw       $v0, 0x10($sp)
/* 2C5C 8002785C 0280202D */  daddu     $a0, $s4, $zero
/* 2C60 80027860 02A0282D */  daddu     $a1, $s5, $zero
/* 2C64 80027864 03C0302D */  daddu     $a2, $fp, $zero
/* 2C68 80027868 26510001 */  addiu     $s1, $s2, 0x1
/* 2C6C 8002786C 0220382D */  daddu     $a3, $s1, $zero
/* 2C70 80027870 27A20020 */  addiu     $v0, $sp, 0x20
/* 2C74 80027874 0C009C7F */  jal       gfx_frame_filter_pass_0
/* 2C78 80027878 AFA20010 */   sw       $v0, 0x10($sp)
/* 2C7C 8002787C 0280202D */  daddu     $a0, $s4, $zero
/* 2C80 80027880 02A0282D */  daddu     $a1, $s5, $zero
/* 2C84 80027884 0260302D */  daddu     $a2, $s3, $zero
/* 2C88 80027888 0200382D */  daddu     $a3, $s0, $zero
/* 2C8C 8002788C 27A20024 */  addiu     $v0, $sp, 0x24
/* 2C90 80027890 0C009C7F */  jal       gfx_frame_filter_pass_0
/* 2C94 80027894 AFA20010 */   sw       $v0, 0x10($sp)
/* 2C98 80027898 0280202D */  daddu     $a0, $s4, $zero
/* 2C9C 8002789C 02A0282D */  daddu     $a1, $s5, $zero
/* 2CA0 800278A0 0260302D */  daddu     $a2, $s3, $zero
/* 2CA4 800278A4 0240382D */  daddu     $a3, $s2, $zero
/* 2CA8 800278A8 27A20028 */  addiu     $v0, $sp, 0x28
/* 2CAC 800278AC 0C009C7F */  jal       gfx_frame_filter_pass_0
/* 2CB0 800278B0 AFA20010 */   sw       $v0, 0x10($sp)
/* 2CB4 800278B4 0280202D */  daddu     $a0, $s4, $zero
/* 2CB8 800278B8 02A0282D */  daddu     $a1, $s5, $zero
/* 2CBC 800278BC 0260302D */  daddu     $a2, $s3, $zero
/* 2CC0 800278C0 0220382D */  daddu     $a3, $s1, $zero
/* 2CC4 800278C4 27A2002C */  addiu     $v0, $sp, 0x2C
/* 2CC8 800278C8 0C009C7F */  jal       gfx_frame_filter_pass_0
/* 2CCC 800278CC AFA20010 */   sw       $v0, 0x10($sp)
/* 2CD0 800278D0 0280202D */  daddu     $a0, $s4, $zero
/* 2CD4 800278D4 02A0282D */  daddu     $a1, $s5, $zero
/* 2CD8 800278D8 02E0302D */  daddu     $a2, $s7, $zero
/* 2CDC 800278DC 0200382D */  daddu     $a3, $s0, $zero
/* 2CE0 800278E0 27A20030 */  addiu     $v0, $sp, 0x30
/* 2CE4 800278E4 0C009C7F */  jal       gfx_frame_filter_pass_0
/* 2CE8 800278E8 AFA20010 */   sw       $v0, 0x10($sp)
/* 2CEC 800278EC 0280202D */  daddu     $a0, $s4, $zero
/* 2CF0 800278F0 02A0282D */  daddu     $a1, $s5, $zero
/* 2CF4 800278F4 02E0302D */  daddu     $a2, $s7, $zero
/* 2CF8 800278F8 0240382D */  daddu     $a3, $s2, $zero
/* 2CFC 800278FC 27A20034 */  addiu     $v0, $sp, 0x34
/* 2D00 80027900 0C009C7F */  jal       gfx_frame_filter_pass_0
/* 2D04 80027904 AFA20010 */   sw       $v0, 0x10($sp)
/* 2D08 80027908 0280202D */  daddu     $a0, $s4, $zero
/* 2D0C 8002790C 02A0282D */  daddu     $a1, $s5, $zero
/* 2D10 80027910 02E0302D */  daddu     $a2, $s7, $zero
/* 2D14 80027914 0220382D */  daddu     $a3, $s1, $zero
/* 2D18 80027918 27A20038 */  addiu     $v0, $sp, 0x38
/* 2D1C 8002791C 0C009C7F */  jal       gfx_frame_filter_pass_0
/* 2D20 80027920 AFA20010 */   sw       $v0, 0x10($sp)
/* 2D24 80027924 00162840 */  sll       $a1, $s6, 1
/* 2D28 80027928 8FA80078 */  lw        $t0, 0x78($sp)
/* 2D2C 8002792C 8FA40040 */  lw        $a0, 0x40($sp)
/* 2D30 80027930 0C009D80 */  jal       func_80027600
/* 2D34 80027934 01052821 */   addu     $a1, $t0, $a1
/* 2D38 80027938 08009E57 */  j         .L8002795C
/* 2D3C 8002793C 26D60001 */   addiu    $s6, $s6, 0x1
.L80027940:
/* 2D40 80027940 00741021 */  addu      $v0, $v1, $s4
/* 2D44 80027944 8FA80078 */  lw        $t0, 0x78($sp)
/* 2D48 80027948 94420000 */  lhu       $v0, 0x0($v0)
/* 2D4C 8002794C 00681821 */  addu      $v1, $v1, $t0
/* 2D50 80027950 34420001 */  ori       $v0, $v0, 0x1
/* 2D54 80027954 A4620000 */  sh        $v0, 0x0($v1)
/* 2D58 80027958 26D60001 */  addiu     $s6, $s6, 0x1
.L8002795C:
/* 2D5C 8002795C 26520001 */  addiu     $s2, $s2, 0x1
/* 2D60 80027960 2A42013F */  slti      $v0, $s2, 0x13F
/* 2D64 80027964 1440FF9C */  bnez      $v0, .L800277D8
/* 2D68 80027968 00161840 */   sll      $v1, $s6, 1
/* 2D6C 8002796C 26730001 */  addiu     $s3, $s3, 0x1
/* 2D70 80027970 8FA80044 */  lw        $t0, 0x44($sp)
/* 2D74 80027974 2A6200EF */  slti      $v0, $s3, 0xEF
/* 2D78 80027978 25080140 */  addiu     $t0, $t0, 0x140
/* 2D7C 8002797C 1440FF90 */  bnez      $v0, .L800277C0
/* 2D80 80027980 AFA80044 */   sw       $t0, 0x44($sp)
/* 2D84 80027984 8FBF006C */  lw        $ra, 0x6C($sp)
/* 2D88 80027988 8FBE0068 */  lw        $fp, 0x68($sp)
/* 2D8C 8002798C 8FB70064 */  lw        $s7, 0x64($sp)
/* 2D90 80027990 8FB60060 */  lw        $s6, 0x60($sp)
/* 2D94 80027994 8FB5005C */  lw        $s5, 0x5C($sp)
/* 2D98 80027998 8FB40058 */  lw        $s4, 0x58($sp)
/* 2D9C 8002799C 8FB30054 */  lw        $s3, 0x54($sp)
/* 2DA0 800279A0 8FB20050 */  lw        $s2, 0x50($sp)
/* 2DA4 800279A4 8FB1004C */  lw        $s1, 0x4C($sp)
/* 2DA8 800279A8 8FB00048 */  lw        $s0, 0x48($sp)
/* 2DAC 800279AC 03E00008 */  jr        $ra
/* 2DB0 800279B0 27BD0070 */   addiu    $sp, $sp, 0x70

### DECOMPILED C INSTRUCTIONS:

void func_80027774(u16* frameBuffer0, u16* frameBuffer1, u16* zBuffer) {
    Color_RGBA8 filterBuf0[9];
    s32 x, y;

    for (y = 1; y < SCREEN_HEIGHT - 1; y++) {
        for (x = 1; x < SCREEN_WIDTH - 1; x++) {

            /*
            The application of gfx_frame_filter_pass_0 is done to the following pixels, where x is the current pixel.
               ...
               .x.
               ...
            */
            if (
                (((frameBuffer1[(SCREEN_WIDTH * y) + x - 1] >> 2) & 0xF) < 8) ||
                (((frameBuffer1[(SCREEN_WIDTH * y) + x + 0] >> 2) & 0xF) < 8) ||
                (((frameBuffer1[(SCREEN_WIDTH * y) + x + 1] >> 2) & 0xF) < 8))
            {
                gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y - 1, x - 1, &filterBuf0[0]);
                gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y - 1, x,     &filterBuf0[1]);
                gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y - 1, x + 1, &filterBuf0[2]);
                gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y    , x - 1, &filterBuf0[3]);
                gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y    , x,     &filterBuf0[4]);
                gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y    , x + 1, &filterBuf0[5]);
                gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y + 1, x - 1, &filterBuf0[6]);
                gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y + 1, x,     &filterBuf0[7]);
                gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y + 1, x + 1, &filterBuf0[8]);
                func_80027600(filterBuf0, &zBuffer[(SCREEN_WIDTH * y) + x]);
            } else {
                zBuffer[(SCREEN_WIDTH * y) + x] = frameBuffer0[(SCREEN_WIDTH * y) + x] | 1;
            }
        }
    }
}