### RAW ASSEMBLY INSTRUCTIONS:

glabel sleep_bubble_update
/* 35CB70 E00520F0 27BDFF98 */  addiu     $sp, $sp, -0x68
/* 35CB74 E00520F4 AFBF0030 */  sw        $ra, 0x30($sp)
/* 35CB78 E00520F8 AFB7002C */  sw        $s7, 0x2C($sp)
/* 35CB7C E00520FC AFB60028 */  sw        $s6, 0x28($sp)
/* 35CB80 E0052100 AFB50024 */  sw        $s5, 0x24($sp)
/* 35CB84 E0052104 AFB40020 */  sw        $s4, 0x20($sp)
/* 35CB88 E0052108 AFB3001C */  sw        $s3, 0x1C($sp)
/* 35CB8C E005210C AFB20018 */  sw        $s2, 0x18($sp)
/* 35CB90 E0052110 AFB10014 */  sw        $s1, 0x14($sp)
/* 35CB94 E0052114 AFB00010 */  sw        $s0, 0x10($sp)
/* 35CB98 E0052118 F7BE0060 */  sdc1      $f30, 0x60($sp)
/* 35CB9C E005211C F7BC0058 */  sdc1      $f28, 0x58($sp)
/* 35CBA0 E0052120 F7BA0050 */  sdc1      $f26, 0x50($sp)
/* 35CBA4 E0052124 F7B80048 */  sdc1      $f24, 0x48($sp)
/* 35CBA8 E0052128 F7B60040 */  sdc1      $f22, 0x40($sp)
/* 35CBAC E005212C F7B40038 */  sdc1      $f20, 0x38($sp)
/* 35CBB0 E0052130 8C90000C */  lw        $s0, 0xC($a0)
/* 35CBB4 E0052134 8E03001C */  lw        $v1, 0x1C($s0)
/* 35CBB8 E0052138 28620064 */  slti      $v0, $v1, 0x64
/* 35CBBC E005213C 10400003 */  beqz      $v0, .LE005214C
/* 35CBC0 E0052140 26130024 */   addiu    $s3, $s0, 0x24
/* 35CBC4 E0052144 2462FFFF */  addiu     $v0, $v1, -0x1
/* 35CBC8 E0052148 AE02001C */  sw        $v0, 0x1C($s0)
.LE005214C:
/* 35CBCC E005214C 3C030004 */  lui       $v1, (0x4F1A0 >> 16)
/* 35CBD0 E0052150 8E020020 */  lw        $v0, 0x20($s0)
/* 35CBD4 E0052154 3463F1A0 */  ori       $v1, $v1, (0x4F1A0 & 0xFFFF)
/* 35CBD8 E0052158 24420001 */  addiu     $v0, $v0, 0x1
/* 35CBDC E005215C 0062182A */  slt       $v1, $v1, $v0
/* 35CBE0 E0052160 10600003 */  beqz      $v1, .LE0052170
/* 35CBE4 E0052164 AE020020 */   sw       $v0, 0x20($s0)
/* 35CBE8 E0052168 24020100 */  addiu     $v0, $zero, 0x100
/* 35CBEC E005216C AE020020 */  sw        $v0, 0x20($s0)
.LE0052170:
/* 35CBF0 E0052170 8E03001C */  lw        $v1, 0x1C($s0)
/* 35CBF4 E0052174 04610005 */  bgez      $v1, .LE005218C
/* 35CBF8 E0052178 0060B82D */   daddu    $s7, $v1, $zero
/* 35CBFC E005217C 0C080128 */  jal       shim_remove_effect
/* 35CC00 E0052180 00000000 */   nop
/* 35CC04 E0052184 080148F6 */  j         .LE00523D8
/* 35CC08 E0052188 00000000 */   nop
.LE005218C:
/* 35CC0C E005218C C6020014 */  lwc1      $f2, 0x14($s0)
/* 35CC10 E0052190 C6140018 */  lwc1      $f20, 0x18($s0)
/* 35CC14 E0052194 46141081 */  sub.s     $f2, $f2, $f20
/* 35CC18 E0052198 3C013DCC */  lui       $at, (0x3DCCCCCD >> 16)
/* 35CC1C E005219C 3421CCCD */  ori       $at, $at, (0x3DCCCCCD & 0xFFFF)
/* 35CC20 E00521A0 44810000 */  mtc1      $at, $f0
/* 35CC24 E00521A4 00000000 */  nop
/* 35CC28 E00521A8 46001082 */  mul.s     $f2, $f2, $f0
/* 35CC2C E00521AC 00000000 */  nop
/* 35CC30 E00521B0 8E160020 */  lw        $s6, 0x20($s0)
/* 35CC34 E00521B4 00161040 */  sll       $v0, $s6, 1
/* 35CC38 E00521B8 4602A500 */  add.s     $f20, $f20, $f2
/* 35CC3C E00521BC 00561021 */  addu      $v0, $v0, $s6
/* 35CC40 E00521C0 44826000 */  mtc1      $v0, $f12
/* 35CC44 E00521C4 00000000 */  nop
/* 35CC48 E00521C8 46806320 */  cvt.s.w   $f12, $f12
/* 35CC4C E00521CC 0C080140 */  jal       shim_sin_deg
/* 35CC50 E00521D0 E6140018 */   swc1     $f20, 0x18($s0)
/* 35CC54 E00521D4 4600A002 */  mul.s     $f0, $f20, $f0
/* 35CC58 E00521D8 00000000 */  nop
/* 35CC5C E00521DC 3C01E005 */  lui       $at, (0xE0052A80 >> 16)
/* 35CC60 E00521E0 D4222A80 */  ldc1      $f2, (0xE0052A80 & 0xFFFF)($at)
/* 35CC64 E00521E4 46000021 */  cvt.d.s   $f0, $f0
/* 35CC68 E00521E8 46220002 */  mul.d     $f0, $f0, $f2
/* 35CC6C E00521EC 00000000 */  nop
/* 35CC70 E00521F0 0000902D */  daddu     $s2, $zero, $zero
/* 35CC74 E00521F4 26110028 */  addiu     $s1, $s0, 0x28
/* 35CC78 E00521F8 0240A82D */  daddu     $s5, $s2, $zero
/* 35CC7C E00521FC 0240A02D */  daddu     $s4, $s2, $zero
/* 35CC80 E0052200 4600A521 */  cvt.d.s   $f20, $f20
/* 35CC84 E0052204 3C014000 */  lui       $at, (0x40000000 >> 16)
/* 35CC88 E0052208 4481F800 */  mtc1      $at, $f31
/* 35CC8C E005220C 4480F000 */  mtc1      $zero, $f30
/* 35CC90 E0052210 4620A500 */  add.d     $f20, $f20, $f0
/* 35CC94 E0052214 3C013FF8 */  lui       $at, (0x3FF80000 >> 16)
/* 35CC98 E0052218 4481E800 */  mtc1      $at, $f29
/* 35CC9C E005221C 4480E000 */  mtc1      $zero, $f28
/* 35CCA0 E0052220 46201686 */  mov.d     $f26, $f2
/* 35CCA4 E0052224 4620A620 */  cvt.s.d   $f24, $f20
.LE0052228:
/* 35CCA8 E0052228 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
/* 35CCAC E005222C 4481A000 */  mtc1      $at, $f20
/* 35CCB0 E0052230 4492B000 */  mtc1      $s2, $f22
/* 35CCB4 E0052234 00000000 */  nop
/* 35CCB8 E0052238 4680B5A0 */  cvt.s.w   $f22, $f22
/* 35CCBC E005223C 4614B502 */  mul.s     $f20, $f22, $f20
/* 35CCC0 E0052240 00000000 */  nop
/* 35CCC4 E0052244 3C0141A8 */  lui       $at, (0x41A80000 >> 16)
/* 35CCC8 E0052248 44810000 */  mtc1      $at, $f0
/* 35CCCC E005224C 3C014188 */  lui       $at, (0x41880000 >> 16)
/* 35CCD0 E0052250 44811000 */  mtc1      $at, $f2
/* 35CCD4 E0052254 4600A503 */  div.s     $f20, $f20, $f0
/* 35CCD8 E0052258 4602A500 */  add.s     $f20, $f20, $f2
/* 35CCDC E005225C 0C080140 */  jal       shim_sin_deg
/* 35CCE0 E0052260 4600A306 */   mov.s    $f12, $f20
/* 35CCE4 E0052264 4600C002 */  mul.s     $f0, $f24, $f0
/* 35CCE8 E0052268 00000000 */  nop
/* 35CCEC E005226C 4600A306 */  mov.s     $f12, $f20
/* 35CCF0 E0052270 0C080144 */  jal       shim_cos_deg
/* 35CCF4 E0052274 E6600000 */   swc1     $f0, 0x0($s3)
/* 35CCF8 E0052278 4600C087 */  neg.s     $f2, $f24
/* 35CCFC E005227C 46001082 */  mul.s     $f2, $f2, $f0
/* 35CD00 E0052280 00000000 */  nop
/* 35CD04 E0052284 44946000 */  mtc1      $s4, $f12
/* 35CD08 E0052288 00000000 */  nop
/* 35CD0C E005228C 46806320 */  cvt.s.w   $f12, $f12
/* 35CD10 E0052290 0C080140 */  jal       shim_sin_deg
/* 35CD14 E0052294 E6220000 */   swc1     $f2, 0x0($s1)
/* 35CD18 E0052298 46000021 */  cvt.d.s   $f0, $f0
/* 35CD1C E005229C 463A0002 */  mul.d     $f0, $f0, $f26
/* 35CD20 E00522A0 00000000 */  nop
/* 35CD24 E00522A4 463E0000 */  add.d     $f0, $f0, $f30
/* 35CD28 E00522A8 4496A000 */  mtc1      $s6, $f20
/* 35CD2C E00522AC 00000000 */  nop
/* 35CD30 E00522B0 4680A520 */  cvt.s.w   $f20, $f20
/* 35CD34 E00522B4 4600A521 */  cvt.d.s   $f20, $f20
/* 35CD38 E00522B8 4620A002 */  mul.d     $f0, $f20, $f0
/* 35CD3C E00522BC 00000000 */  nop
/* 35CD40 E00522C0 3C0140A0 */  lui       $at, (0x40A00000 >> 16)
/* 35CD44 E00522C4 44811000 */  mtc1      $at, $f2
/* 35CD48 E00522C8 00000000 */  nop
/* 35CD4C E00522CC 4602B580 */  add.s     $f22, $f22, $f2
/* 35CD50 E00522D0 3C0141F0 */  lui       $at, (0x41F00000 >> 16)
/* 35CD54 E00522D4 44811000 */  mtc1      $at, $f2
/* 35CD58 E00522D8 00000000 */  nop
/* 35CD5C E00522DC 4602B082 */  mul.s     $f2, $f22, $f2
/* 35CD60 E00522E0 00000000 */  nop
/* 35CD64 E00522E4 460010A1 */  cvt.d.s   $f2, $f2
/* 35CD68 E00522E8 46220000 */  add.d     $f0, $f0, $f2
/* 35CD6C E00522EC 0C080140 */  jal       shim_sin_deg
/* 35CD70 E00522F0 46200320 */   cvt.s.d  $f12, $f0
/* 35CD74 E00522F4 46000021 */  cvt.d.s   $f0, $f0
/* 35CD78 E00522F8 463C0002 */  mul.d     $f0, $f0, $f28
/* 35CD7C E00522FC 00000000 */  nop
/* 35CD80 E0052300 C6620000 */  lwc1      $f2, 0x0($s3)
/* 35CD84 E0052304 460010A1 */  cvt.d.s   $f2, $f2
/* 35CD88 E0052308 46201080 */  add.d     $f2, $f2, $f0
/* 35CD8C E005230C 44956000 */  mtc1      $s5, $f12
/* 35CD90 E0052310 00000000 */  nop
/* 35CD94 E0052314 46806320 */  cvt.s.w   $f12, $f12
/* 35CD98 E0052318 462010A0 */  cvt.s.d   $f2, $f2
/* 35CD9C E005231C 0C080144 */  jal       shim_cos_deg
/* 35CDA0 E0052320 E6620000 */   swc1     $f2, 0x0($s3)
/* 35CDA4 E0052324 46000021 */  cvt.d.s   $f0, $f0
/* 35CDA8 E0052328 463A0002 */  mul.d     $f0, $f0, $f26
/* 35CDAC E005232C 00000000 */  nop
/* 35CDB0 E0052330 463E0000 */  add.d     $f0, $f0, $f30
/* 35CDB4 E0052334 4620A502 */  mul.d     $f20, $f20, $f0
/* 35CDB8 E0052338 00000000 */  nop
/* 35CDBC E005233C 3C014248 */  lui       $at, (0x42480000 >> 16)
/* 35CDC0 E0052340 44810000 */  mtc1      $at, $f0
/* 35CDC4 E0052344 00000000 */  nop
/* 35CDC8 E0052348 4600B582 */  mul.s     $f22, $f22, $f0
/* 35CDCC E005234C 00000000 */  nop
/* 35CDD0 E0052350 4600B5A1 */  cvt.d.s   $f22, $f22
/* 35CDD4 E0052354 4636A500 */  add.d     $f20, $f20, $f22
/* 35CDD8 E0052358 0C080144 */  jal       shim_cos_deg
/* 35CDDC E005235C 4620A320 */   cvt.s.d  $f12, $f20
/* 35CDE0 E0052360 46000021 */  cvt.d.s   $f0, $f0
/* 35CDE4 E0052364 463C0002 */  mul.d     $f0, $f0, $f28
/* 35CDE8 E0052368 00000000 */  nop
/* 35CDEC E005236C 26520001 */  addiu     $s2, $s2, 0x1
/* 35CDF0 E0052370 26940035 */  addiu     $s4, $s4, 0x35
/* 35CDF4 E0052374 C6220000 */  lwc1      $f2, 0x0($s1)
/* 35CDF8 E0052378 26B50024 */  addiu     $s5, $s5, 0x24
/* 35CDFC E005237C 460010A1 */  cvt.d.s   $f2, $f2
/* 35CE00 E0052380 46201080 */  add.d     $f2, $f2, $f0
/* 35CE04 E0052384 26730008 */  addiu     $s3, $s3, 0x8
/* 35CE08 E0052388 2A420014 */  slti      $v0, $s2, 0x14
/* 35CE0C E005238C 462010A0 */  cvt.s.d   $f2, $f2
/* 35CE10 E0052390 E6220000 */  swc1      $f2, 0x0($s1)
/* 35CE14 E0052394 1440FFA4 */  bnez      $v0, .LE0052228
/* 35CE18 E0052398 26310008 */   addiu    $s1, $s1, 0x8
/* 35CE1C E005239C 2AE20064 */  slti      $v0, $s7, 0x64
/* 35CE20 E00523A0 10400006 */  beqz      $v0, .LE00523BC
/* 35CE24 E00523A4 AE0000C4 */   sw       $zero, 0xC4($s0)
/* 35CE28 E00523A8 C60000C8 */  lwc1      $f0, 0xC8($s0)
/* 35CE2C E00523AC 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 35CE30 E00523B0 44811000 */  mtc1      $at, $f2
/* 35CE34 E00523B4 080148F5 */  j         .LE00523D4
/* 35CE38 E00523B8 46020000 */   add.s    $f0, $f0, $f2
.LE00523BC:
/* 35CE3C E00523BC 3C01E005 */  lui       $at, (0xE0052A88 >> 16)
/* 35CE40 E00523C0 D4222A88 */  ldc1      $f2, (0xE0052A88 & 0xFFFF)($at)
/* 35CE44 E00523C4 4600C021 */  cvt.d.s   $f0, $f24
/* 35CE48 E00523C8 46220002 */  mul.d     $f0, $f0, $f2
/* 35CE4C E00523CC 00000000 */  nop
/* 35CE50 E00523D0 46200020 */  cvt.s.d   $f0, $f0
.LE00523D4:
/* 35CE54 E00523D4 E60000C8 */  swc1      $f0, 0xC8($s0)
.LE00523D8:
/* 35CE58 E00523D8 8FBF0030 */  lw        $ra, 0x30($sp)
/* 35CE5C E00523DC 8FB7002C */  lw        $s7, 0x2C($sp)
/* 35CE60 E00523E0 8FB60028 */  lw        $s6, 0x28($sp)
/* 35CE64 E00523E4 8FB50024 */  lw        $s5, 0x24($sp)
/* 35CE68 E00523E8 8FB40020 */  lw        $s4, 0x20($sp)
/* 35CE6C E00523EC 8FB3001C */  lw        $s3, 0x1C($sp)
/* 35CE70 E00523F0 8FB20018 */  lw        $s2, 0x18($sp)
/* 35CE74 E00523F4 8FB10014 */  lw        $s1, 0x14($sp)
/* 35CE78 E00523F8 8FB00010 */  lw        $s0, 0x10($sp)
/* 35CE7C E00523FC D7BE0060 */  ldc1      $f30, 0x60($sp)
/* 35CE80 E0052400 D7BC0058 */  ldc1      $f28, 0x58($sp)
/* 35CE84 E0052404 D7BA0050 */  ldc1      $f26, 0x50($sp)
/* 35CE88 E0052408 D7B80048 */  ldc1      $f24, 0x48($sp)
/* 35CE8C E005240C D7B60040 */  ldc1      $f22, 0x40($sp)
/* 35CE90 E0052410 D7B40038 */  ldc1      $f20, 0x38($sp)
/* 35CE94 E0052414 03E00008 */  jr        $ra
/* 35CE98 E0052418 27BD0068 */   addiu    $sp, $sp, 0x68

### DECOMPILED C INSTRUCTIONS:

void sleep_bubble_update(EffectInstance* effect) {
    SleepBubbleFXData* part = effect->data.sleepBubble;
    f32* xPtr = &part->points->x;
    f32* yPtr;
    s32 xAngle, yAngle, i, timeLeft, unk_20;
    f32 angle, temp1, temp2;

    if (part->timeLeft < 100) {
        part->timeLeft--;
    }

    part->unk_20++;
    if (part->unk_20 > 324000) {
        part->unk_20 = 256;
    }

    if (part->timeLeft < 0) {
        shim_remove_effect(effect);
        return;
    }

    unk_20 = part->unk_20;
    timeLeft = part->timeLeft;

    temp1 = part->unk_18 + (part->unk_14 - part->unk_18) * 0.1f;
    part->unk_18 = temp1;
    temp2 = temp1 + (temp1 * shim_sin_deg(unk_20 * 3)) * 0.1;

    i = 0;
    yPtr = &part->points->y;
    xAngle = yAngle = i;

    for (i = 0; i < ARRAY_COUNT(part->points); i++) {
        angle = i * 360.0f / 21.0f + 17.0f;

        *xPtr = temp2 * shim_sin_deg(angle);
        *yPtr = -temp2 * shim_cos_deg(angle);

        *xPtr += shim_sin_deg((f32)unk_20 * (shim_sin_deg(xAngle) * 0.1 + 2.0) + (i + 5.0f) * 30.0f) * 1.5;
        *yPtr += shim_cos_deg((f32)unk_20 * (shim_cos_deg(yAngle) * 0.1 + 2.0) + (i + 5.0f) * 50.0f) * 1.5;

        xAngle += 53;
        yAngle += 36;

        xPtr += 2;
        yPtr += 2;
    }

    part->unk_C4 = 0.0f;
    if (timeLeft < 100) {
        part->unk_C8 += 1.0f;
    } else {
        part->unk_C8 = temp2 * 1.2;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel show_first_strike_message
/* 1D05C 80041C5C 27BDFFA8 */  addiu     $sp, $sp, -0x58
/* 1D060 80041C60 3C05800B */  lui       $a1, %hi(gCurrentEncounter)
/* 1D064 80041C64 24A50F10 */  addiu     $a1, $a1, %lo(gCurrentEncounter)
/* 1D068 80041C68 AFBF0054 */  sw        $ra, 0x54($sp)
/* 1D06C 80041C6C AFB00050 */  sw        $s0, 0x50($sp)
/* 1D070 80041C70 8CA20094 */  lw        $v0, 0x94($a1)
/* 1D074 80041C74 14400005 */  bnez      $v0, .L80041C8C
/* 1D078 80041C78 2402FF38 */   addiu    $v0, $zero, -0xC8
/* 1D07C 80041C7C 3C01800A */  lui       $at, %hi(gFirstStrikeMessagePos)
/* 1D080 80041C80 A422A668 */  sh        $v0, %lo(gFirstStrikeMessagePos)($at)
/* 1D084 80041C84 080107C0 */  j         .L80041F00
/* 1D088 80041C88 00000000 */   nop
.L80041C8C:
/* 1D08C 80041C8C 3C02800A */  lui       $v0, %hi(gFirstStrikeMessagePos)
/* 1D090 80041C90 2442A668 */  addiu     $v0, $v0, %lo(gFirstStrikeMessagePos)
/* 1D094 80041C94 94430000 */  lhu       $v1, 0x0($v0)
/* 1D098 80041C98 24630028 */  addiu     $v1, $v1, 0x28
/* 1D09C 80041C9C 00032400 */  sll       $a0, $v1, 16
/* 1D0A0 80041CA0 00048403 */  sra       $s0, $a0, 16
/* 1D0A4 80041CA4 1A000005 */  blez      $s0, .L80041CBC
/* 1D0A8 80041CA8 A4430000 */   sh       $v1, 0x0($v0)
/* 1D0AC 80041CAC 2A020640 */  slti      $v0, $s0, 0x640
/* 1D0B0 80041CB0 10400002 */  beqz      $v0, .L80041CBC
/* 1D0B4 80041CB4 2610F9C0 */   addiu    $s0, $s0, -0x640
/* 1D0B8 80041CB8 0000802D */  daddu     $s0, $zero, $zero
.L80041CBC:
/* 1D0BC 80041CBC 80A30004 */  lb        $v1, 0x4($a1)
/* 1D0C0 80041CC0 24020001 */  addiu     $v0, $zero, 0x1
/* 1D0C4 80041CC4 10620005 */  beq       $v1, $v0, .L80041CDC
/* 1D0C8 80041CC8 24020002 */   addiu    $v0, $zero, 0x2
/* 1D0CC 80041CCC 1062005D */  beq       $v1, $v0, .L80041E44
/* 1D0D0 80041CD0 00000000 */   nop
/* 1D0D4 80041CD4 080107C0 */  j         .L80041F00
/* 1D0D8 80041CD8 00000000 */   nop
.L80041CDC:
/* 1D0DC 80041CDC 80A30005 */  lb        $v1, 0x5($a1)
/* 1D0E0 80041CE0 24020004 */  addiu     $v0, $zero, 0x4
/* 1D0E4 80041CE4 1062000C */  beq       $v1, $v0, .L80041D18
/* 1D0E8 80041CE8 28620005 */   slti     $v0, $v1, 0x5
/* 1D0EC 80041CEC 10400005 */  beqz      $v0, .L80041D04
/* 1D0F0 80041CF0 24020002 */   addiu    $v0, $zero, 0x2
/* 1D0F4 80041CF4 10620009 */  beq       $v1, $v0, .L80041D1C
/* 1D0F8 80041CF8 3C04001D */   lui      $a0, (0x1D00AC >> 16)
/* 1D0FC 80041CFC 080107C0 */  j         .L80041F00
/* 1D100 80041D00 00000000 */   nop
.L80041D04:
/* 1D104 80041D04 24020006 */  addiu     $v0, $zero, 0x6
/* 1D108 80041D08 10620029 */  beq       $v1, $v0, .L80041DB0
/* 1D10C 80041D0C 3C04001D */   lui      $a0, (0x1D00AD >> 16)
/* 1D110 80041D10 080107C0 */  j         .L80041F00
/* 1D114 80041D14 00000000 */   nop
.L80041D18:
/* 1D118 80041D18 3C04001D */  lui       $a0, (0x1D00AC >> 16)
.L80041D1C:
/* 1D11C 80041D1C 348400AC */  ori       $a0, $a0, (0x1D00AC & 0xFFFF)
/* 1D120 80041D20 0C04991D */  jal       get_msg_width
/* 1D124 80041D24 0000282D */   daddu    $a1, $zero, $zero
/* 1D128 80041D28 24480018 */  addiu     $t0, $v0, 0x18
/* 1D12C 80041D2C 260300A0 */  addiu     $v1, $s0, 0xA0
/* 1D130 80041D30 000817C2 */  srl       $v0, $t0, 31
/* 1D134 80041D34 01021021 */  addu      $v0, $t0, $v0
/* 1D138 80041D38 00021043 */  sra       $v0, $v0, 1
/* 1D13C 80041D3C 00628023 */  subu      $s0, $v1, $v0
/* 1D140 80041D40 0000202D */  daddu     $a0, $zero, $zero
/* 1D144 80041D44 24050014 */  addiu     $a1, $zero, 0x14
/* 1D148 80041D48 0200302D */  daddu     $a2, $s0, $zero
/* 1D14C 80041D4C 24070045 */  addiu     $a3, $zero, 0x45
/* 1D150 80041D50 2402001C */  addiu     $v0, $zero, 0x1C
/* 1D154 80041D54 AFA20018 */  sw        $v0, 0x18($sp)
/* 1D158 80041D58 240200FF */  addiu     $v0, $zero, 0xFF
/* 1D15C 80041D5C AFA2001C */  sw        $v0, 0x1C($sp)
/* 1D160 80041D60 24020140 */  addiu     $v0, $zero, 0x140
/* 1D164 80041D64 AFA20044 */  sw        $v0, 0x44($sp)
/* 1D168 80041D68 240200F0 */  addiu     $v0, $zero, 0xF0
/* 1D16C 80041D6C AFA00010 */  sw        $zero, 0x10($sp)
/* 1D170 80041D70 AFA80014 */  sw        $t0, 0x14($sp)
/* 1D174 80041D74 AFA00020 */  sw        $zero, 0x20($sp)
/* 1D178 80041D78 AFA00024 */  sw        $zero, 0x24($sp)
/* 1D17C 80041D7C AFA00028 */  sw        $zero, 0x28($sp)
/* 1D180 80041D80 AFA0002C */  sw        $zero, 0x2C($sp)
/* 1D184 80041D84 AFA00030 */  sw        $zero, 0x30($sp)
/* 1D188 80041D88 AFA00034 */  sw        $zero, 0x34($sp)
/* 1D18C 80041D8C AFA00038 */  sw        $zero, 0x38($sp)
/* 1D190 80041D90 AFA0003C */  sw        $zero, 0x3C($sp)
/* 1D194 80041D94 AFA00040 */  sw        $zero, 0x40($sp)
/* 1D198 80041D98 AFA20048 */  sw        $v0, 0x48($sp)
/* 1D19C 80041D9C 0C03D4B8 */  jal       draw_box
/* 1D1A0 80041DA0 AFA0004C */   sw       $zero, 0x4C($sp)
/* 1D1A4 80041DA4 3C04001D */  lui       $a0, (0x1D00AD >> 16)
/* 1D1A8 80041DA8 080107B9 */  j         .L80041EE4
/* 1D1AC 80041DAC 348400AC */   ori      $a0, $a0, (0x1D00AC & 0xFFFF)
.L80041DB0:
/* 1D1B0 80041DB0 348400AD */  ori       $a0, $a0, (0x1D00AD & 0xFFFF)
/* 1D1B4 80041DB4 0C04991D */  jal       get_msg_width
/* 1D1B8 80041DB8 0000282D */   daddu    $a1, $zero, $zero
/* 1D1BC 80041DBC 24480018 */  addiu     $t0, $v0, 0x18
/* 1D1C0 80041DC0 260300A0 */  addiu     $v1, $s0, 0xA0
/* 1D1C4 80041DC4 000817C2 */  srl       $v0, $t0, 31
/* 1D1C8 80041DC8 01021021 */  addu      $v0, $t0, $v0
/* 1D1CC 80041DCC 00021043 */  sra       $v0, $v0, 1
/* 1D1D0 80041DD0 00628023 */  subu      $s0, $v1, $v0
/* 1D1D4 80041DD4 0000202D */  daddu     $a0, $zero, $zero
/* 1D1D8 80041DD8 24050014 */  addiu     $a1, $zero, 0x14
/* 1D1DC 80041DDC 0200302D */  daddu     $a2, $s0, $zero
/* 1D1E0 80041DE0 24070045 */  addiu     $a3, $zero, 0x45
/* 1D1E4 80041DE4 2402001C */  addiu     $v0, $zero, 0x1C
/* 1D1E8 80041DE8 AFA20018 */  sw        $v0, 0x18($sp)
/* 1D1EC 80041DEC 240200FF */  addiu     $v0, $zero, 0xFF
/* 1D1F0 80041DF0 AFA2001C */  sw        $v0, 0x1C($sp)
/* 1D1F4 80041DF4 24020140 */  addiu     $v0, $zero, 0x140
/* 1D1F8 80041DF8 AFA20044 */  sw        $v0, 0x44($sp)
/* 1D1FC 80041DFC 240200F0 */  addiu     $v0, $zero, 0xF0
/* 1D200 80041E00 AFA00010 */  sw        $zero, 0x10($sp)
/* 1D204 80041E04 AFA80014 */  sw        $t0, 0x14($sp)
/* 1D208 80041E08 AFA00020 */  sw        $zero, 0x20($sp)
/* 1D20C 80041E0C AFA00024 */  sw        $zero, 0x24($sp)
/* 1D210 80041E10 AFA00028 */  sw        $zero, 0x28($sp)
/* 1D214 80041E14 AFA0002C */  sw        $zero, 0x2C($sp)
/* 1D218 80041E18 AFA00030 */  sw        $zero, 0x30($sp)
/* 1D21C 80041E1C AFA00034 */  sw        $zero, 0x34($sp)
/* 1D220 80041E20 AFA00038 */  sw        $zero, 0x38($sp)
/* 1D224 80041E24 AFA0003C */  sw        $zero, 0x3C($sp)
/* 1D228 80041E28 AFA00040 */  sw        $zero, 0x40($sp)
/* 1D22C 80041E2C AFA20048 */  sw        $v0, 0x48($sp)
/* 1D230 80041E30 0C03D4B8 */  jal       draw_box
/* 1D234 80041E34 AFA0004C */   sw       $zero, 0x4C($sp)
/* 1D238 80041E38 3C04001D */  lui       $a0, (0x1D00AD >> 16)
/* 1D23C 80041E3C 080107B9 */  j         .L80041EE4
/* 1D240 80041E40 348400AD */   ori      $a0, $a0, (0x1D00AD & 0xFFFF)
.L80041E44:
/* 1D244 80041E44 0C03A752 */  jal       is_ability_active
/* 1D248 80041E48 24040011 */   addiu    $a0, $zero, 0x11
/* 1D24C 80041E4C 1440002C */  bnez      $v0, .L80041F00
/* 1D250 80041E50 3C04001D */   lui      $a0, (0x1D00AE >> 16)
/* 1D254 80041E54 348400AE */  ori       $a0, $a0, (0x1D00AE & 0xFFFF)
/* 1D258 80041E58 0C04991D */  jal       get_msg_width
/* 1D25C 80041E5C 0000282D */   daddu    $a1, $zero, $zero
/* 1D260 80041E60 24480018 */  addiu     $t0, $v0, 0x18
/* 1D264 80041E64 260300A0 */  addiu     $v1, $s0, 0xA0
/* 1D268 80041E68 000817C2 */  srl       $v0, $t0, 31
/* 1D26C 80041E6C 01021021 */  addu      $v0, $t0, $v0
/* 1D270 80041E70 00021043 */  sra       $v0, $v0, 1
/* 1D274 80041E74 00628023 */  subu      $s0, $v1, $v0
/* 1D278 80041E78 0000202D */  daddu     $a0, $zero, $zero
/* 1D27C 80041E7C 24050004 */  addiu     $a1, $zero, 0x4
/* 1D280 80041E80 0200302D */  daddu     $a2, $s0, $zero
/* 1D284 80041E84 24070045 */  addiu     $a3, $zero, 0x45
/* 1D288 80041E88 2402001C */  addiu     $v0, $zero, 0x1C
/* 1D28C 80041E8C AFA20018 */  sw        $v0, 0x18($sp)
/* 1D290 80041E90 240200FF */  addiu     $v0, $zero, 0xFF
/* 1D294 80041E94 AFA2001C */  sw        $v0, 0x1C($sp)
/* 1D298 80041E98 24020140 */  addiu     $v0, $zero, 0x140
/* 1D29C 80041E9C AFA20044 */  sw        $v0, 0x44($sp)
/* 1D2A0 80041EA0 240200F0 */  addiu     $v0, $zero, 0xF0
/* 1D2A4 80041EA4 AFA00010 */  sw        $zero, 0x10($sp)
/* 1D2A8 80041EA8 AFA80014 */  sw        $t0, 0x14($sp)
/* 1D2AC 80041EAC AFA00020 */  sw        $zero, 0x20($sp)
/* 1D2B0 80041EB0 AFA00024 */  sw        $zero, 0x24($sp)
/* 1D2B4 80041EB4 AFA00028 */  sw        $zero, 0x28($sp)
/* 1D2B8 80041EB8 AFA0002C */  sw        $zero, 0x2C($sp)
/* 1D2BC 80041EBC AFA00030 */  sw        $zero, 0x30($sp)
/* 1D2C0 80041EC0 AFA00034 */  sw        $zero, 0x34($sp)
/* 1D2C4 80041EC4 AFA00038 */  sw        $zero, 0x38($sp)
/* 1D2C8 80041EC8 AFA0003C */  sw        $zero, 0x3C($sp)
/* 1D2CC 80041ECC AFA00040 */  sw        $zero, 0x40($sp)
/* 1D2D0 80041ED0 AFA20048 */  sw        $v0, 0x48($sp)
/* 1D2D4 80041ED4 0C03D4B8 */  jal       draw_box
/* 1D2D8 80041ED8 AFA0004C */   sw       $zero, 0x4C($sp)
/* 1D2DC 80041EDC 3C04001D */  lui       $a0, (0x1D00AE >> 16)
/* 1D2E0 80041EE0 348400AE */  ori       $a0, $a0, (0x1D00AE & 0xFFFF)
.L80041EE4:
/* 1D2E4 80041EE4 2605000B */  addiu     $a1, $s0, 0xB
/* 1D2E8 80041EE8 2406004B */  addiu     $a2, $zero, 0x4B
/* 1D2EC 80041EEC 240700FF */  addiu     $a3, $zero, 0xFF
/* 1D2F0 80041EF0 2402000A */  addiu     $v0, $zero, 0xA
/* 1D2F4 80041EF4 AFA20010 */  sw        $v0, 0x10($sp)
/* 1D2F8 80041EF8 0C04993B */  jal       draw_msg
/* 1D2FC 80041EFC AFA00014 */   sw       $zero, 0x14($sp)
.L80041F00:
/* 1D300 80041F00 8FBF0054 */  lw        $ra, 0x54($sp)
/* 1D304 80041F04 8FB00050 */  lw        $s0, 0x50($sp)
/* 1D308 80041F08 03E00008 */  jr        $ra
/* 1D30C 80041F0C 27BD0058 */   addiu    $sp, $sp, 0x58

### DECOMPILED C INSTRUCTIONS:

void show_first_strike_message(void) {
    EncounterStatus* currentEncounter = &gCurrentEncounter;
    s32 posX;
    s32 width;
    s32 xOffset;
    s32 screenWidthHalf;

    if (currentEncounter->unk_94 == 0) {
        gFirstStrikeMessagePos = -200;
        return;
    }

    gFirstStrikeMessagePos += 40;
    xOffset = gFirstStrikeMessagePos;
    if (xOffset > 0) {
        if (xOffset < 1600) {
            xOffset = 0;
        } else {
            xOffset -= 1600;
        }
    }

    screenWidthHalf = SCREEN_WIDTH / 2;

    switch (currentEncounter->firstStrikeType) {
        case FIRST_STRIKE_PLAYER:
            switch (currentEncounter->hitType) {
                case 2:
                case 4:
                    width = get_msg_width(MSG_Menus_PlayerFirstStrike, 0) + 24;
                    posX = (xOffset + screenWidthHalf) - (width / 2);
                    draw_box(0, WINDOW_STYLE_20, posX, 69, 0, width, 28, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, 0, NULL,
                             SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
                    draw_msg(MSG_Menus_PlayerFirstStrike, posX + 11, 75, 0xFF, MSG_PAL_STANDARD, 0);
                    break;
                case 6:
                    width = get_msg_width(MSG_Menus_PartnerFirstStrike, 0) + 24;
                    posX = (xOffset + screenWidthHalf) - (width / 2);
                    draw_box(0, WINDOW_STYLE_20, posX, 69, 0, width, 28, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, 0, NULL,
                             SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
                    draw_msg(MSG_Menus_PartnerFirstStrike, posX + 11, 75, 0xFF, MSG_PAL_STANDARD, 0);
                    break;
            }
            break;
        case FIRST_STRIKE_ENEMY:
            if (!is_ability_active(ABILITY_CHILL_OUT)) {
                width = get_msg_width(MSG_Menus_EnemyFirstStrike, 0) + 24;
                posX = (xOffset + screenWidthHalf) - (width / 2);
                draw_box(0, WINDOW_STYLE_4, posX, 69, 0, width, 28, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, 0, NULL,
                         SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
                draw_msg(MSG_Menus_EnemyFirstStrike, posX + 11, 75, 0xFF, MSG_PAL_STANDARD, 0);
            }
            break;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel breaking_junk_main
/* 403400 E0118000 27BDFF90 */  addiu     $sp, $sp, -0x70
/* 403404 E0118004 F7B80050 */  sdc1      $f24, 0x50($sp)
/* 403408 E0118008 4485C000 */  mtc1      $a1, $f24
/* 40340C E011800C F7BA0058 */  sdc1      $f26, 0x58($sp)
/* 403410 E0118010 4486D000 */  mtc1      $a2, $f26
/* 403414 E0118014 F7BC0060 */  sdc1      $f28, 0x60($sp)
/* 403418 E0118018 4487E000 */  mtc1      $a3, $f28
/* 40341C E011801C AFB1002C */  sw        $s1, 0x2C($sp)
/* 403420 E0118020 0080882D */  daddu     $s1, $a0, $zero
/* 403424 E0118024 F7BE0068 */  sdc1      $f30, 0x68($sp)
/* 403428 E0118028 C7BE0080 */  lwc1      $f30, 0x80($sp)
/* 40342C E011802C 27A40010 */  addiu     $a0, $sp, 0x10
/* 403430 E0118030 AFB00028 */  sw        $s0, 0x28($sp)
/* 403434 E0118034 8FB00084 */  lw        $s0, 0x84($sp)
/* 403438 E0118038 3C02E012 */  lui       $v0, %hi(breaking_junk_init)
/* 40343C E011803C 244282EC */  addiu     $v0, $v0, %lo(breaking_junk_init)
/* 403440 E0118040 AFA20018 */  sw        $v0, 0x18($sp)
/* 403444 E0118044 3C02E012 */  lui       $v0, %hi(breaking_junk_update)
/* 403448 E0118048 244282F4 */  addiu     $v0, $v0, %lo(breaking_junk_update)
/* 40344C E011804C AFA2001C */  sw        $v0, 0x1C($sp)
/* 403450 E0118050 3C02E012 */  lui       $v0, %hi(breaking_junk_render)
/* 403454 E0118054 24428454 */  addiu     $v0, $v0, %lo(breaking_junk_render)
/* 403458 E0118058 AFA20020 */  sw        $v0, 0x20($sp)
/* 40345C E011805C 2402007E */  addiu     $v0, $zero, 0x7E
/* 403460 E0118060 AFBF0038 */  sw        $ra, 0x38($sp)
/* 403464 E0118064 AFB30034 */  sw        $s3, 0x34($sp)
/* 403468 E0118068 AFB20030 */  sw        $s2, 0x30($sp)
/* 40346C E011806C F7B60048 */  sdc1      $f22, 0x48($sp)
/* 403470 E0118070 F7B40040 */  sdc1      $f20, 0x40($sp)
/* 403474 E0118074 AFA00010 */  sw        $zero, 0x10($sp)
/* 403478 E0118078 AFA00024 */  sw        $zero, 0x24($sp)
/* 40347C E011807C 0C080124 */  jal       shim_create_effect_instance
/* 403480 E0118080 AFA20014 */   sw       $v0, 0x14($sp)
/* 403484 E0118084 24040168 */  addiu     $a0, $zero, 0x168
/* 403488 E0118088 24030006 */  addiu     $v1, $zero, 0x6
/* 40348C E011808C 0040982D */  daddu     $s3, $v0, $zero
/* 403490 E0118090 0C08012C */  jal       shim_general_heap_malloc
/* 403494 E0118094 AE630008 */   sw       $v1, 0x8($s3)
/* 403498 E0118098 0040182D */  daddu     $v1, $v0, $zero
/* 40349C E011809C 14600003 */  bnez      $v1, .LE01180AC
/* 4034A0 E01180A0 AE62000C */   sw       $v0, 0xC($s3)
.LE01180A4:
/* 4034A4 E01180A4 08046029 */  j         .LE01180A4
/* 4034A8 E01180A8 00000000 */   nop
.LE01180AC:
/* 4034AC E01180AC AC710000 */  sw        $s1, 0x0($v1)
/* 4034B0 E01180B0 1E000004 */  bgtz      $s0, .LE01180C4
/* 4034B4 E01180B4 AC600020 */   sw       $zero, 0x20($v1)
/* 4034B8 E01180B8 240203E8 */  addiu     $v0, $zero, 0x3E8
/* 4034BC E01180BC 08046032 */  j         .LE01180C8
/* 4034C0 E01180C0 AC62001C */   sw       $v0, 0x1C($v1)
.LE01180C4:
/* 4034C4 E01180C4 AC70001C */  sw        $s0, 0x1C($v1)
.LE01180C8:
/* 4034C8 E01180C8 240200FF */  addiu     $v0, $zero, 0xFF
/* 4034CC E01180CC A4620032 */  sh        $v0, 0x32($v1)
/* 4034D0 E01180D0 8E620008 */  lw        $v0, 0x8($s3)
/* 4034D4 E01180D4 18400077 */  blez      $v0, .LE01182B4
/* 4034D8 E01180D8 0000882D */   daddu    $s1, $zero, $zero
/* 4034DC E01180DC 241200FF */  addiu     $s2, $zero, 0xFF
/* 4034E0 E01180E0 24700028 */  addiu     $s0, $v1, 0x28
/* 4034E4 E01180E4 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* 4034E8 E01180E8 4481B800 */  mtc1      $at, $f23
/* 4034EC E01180EC 4480B000 */  mtc1      $zero, $f22
/* 4034F0 E01180F0 3C01E012 */  lui       $at, (0xE0120000 >> 16)
/* 4034F4 E01180F4 D43487D0 */  ldc1      $f20, -0x7830($at)
.LE01180F8:
/* 4034F8 E01180F8 2404000A */  addiu     $a0, $zero, 0xA
/* 4034FC E01180FC E618FFDC */  swc1      $f24, -0x24($s0)
/* 403500 E0118100 E61AFFE0 */  swc1      $f26, -0x20($s0)
/* 403504 E0118104 0C080138 */  jal       shim_rand_int
/* 403508 E0118108 E61CFFE4 */   swc1     $f28, -0x1C($s0)
/* 40350C E011810C 2442FFFB */  addiu     $v0, $v0, -0x5
/* 403510 E0118110 44820000 */  mtc1      $v0, $f0
/* 403514 E0118114 00000000 */  nop
/* 403518 E0118118 46800021 */  cvt.d.w   $f0, $f0
/* 40351C E011811C 46360002 */  mul.d     $f0, $f0, $f22
/* 403520 E0118120 00000000 */  nop
/* 403524 E0118124 24040005 */  addiu     $a0, $zero, 0x5
/* 403528 E0118128 46200020 */  cvt.s.d   $f0, $f0
/* 40352C E011812C 0C080138 */  jal       shim_rand_int
/* 403530 E0118130 E600FFE8 */   swc1     $f0, -0x18($s0)
/* 403534 E0118134 24420001 */  addiu     $v0, $v0, 0x1
/* 403538 E0118138 3C01E012 */  lui       $at, (0xE0120000 >> 16)
/* 40353C E011813C D42287D8 */  ldc1      $f2, -0x7828($at)
/* 403540 E0118140 44820000 */  mtc1      $v0, $f0
/* 403544 E0118144 00000000 */  nop
/* 403548 E0118148 46800021 */  cvt.d.w   $f0, $f0
/* 40354C E011814C 46220002 */  mul.d     $f0, $f0, $f2
/* 403550 E0118150 00000000 */  nop
/* 403554 E0118154 2404000A */  addiu     $a0, $zero, 0xA
/* 403558 E0118158 46200020 */  cvt.s.d   $f0, $f0
/* 40355C E011815C 0C080138 */  jal       shim_rand_int
/* 403560 E0118160 E600FFEC */   swc1     $f0, -0x14($s0)
/* 403564 E0118164 2442FFFB */  addiu     $v0, $v0, -0x5
/* 403568 E0118168 44820000 */  mtc1      $v0, $f0
/* 40356C E011816C 00000000 */  nop
/* 403570 E0118170 46800021 */  cvt.d.w   $f0, $f0
/* 403574 E0118174 46360002 */  mul.d     $f0, $f0, $f22
/* 403578 E0118178 00000000 */  nop
/* 40357C E011817C 240400FF */  addiu     $a0, $zero, 0xFF
/* 403580 E0118180 E61EFFFC */  swc1      $f30, -0x4($s0)
/* 403584 E0118184 46200020 */  cvt.s.d   $f0, $f0
/* 403588 E0118188 0C080138 */  jal       shim_rand_int
/* 40358C E011818C E600FFF0 */   swc1     $f0, -0x10($s0)
/* 403590 E0118190 A602000C */  sh        $v0, 0xC($s0)
/* 403594 E0118194 8604000C */  lh        $a0, 0xC($s0)
/* 403598 E0118198 A6020004 */  sh        $v0, 0x4($s0)
/* 40359C E011819C 0C080138 */  jal       shim_rand_int
/* 4035A0 E01181A0 02442023 */   subu     $a0, $s2, $a0
/* 4035A4 E01181A4 9603000C */  lhu       $v1, 0xC($s0)
/* 4035A8 E01181A8 A602000E */  sh        $v0, 0xE($s0)
/* 4035AC E01181AC A6020006 */  sh        $v0, 0x6($s0)
/* 4035B0 E01181B0 02421023 */  subu      $v0, $s2, $v0
/* 4035B4 E01181B4 00431023 */  subu      $v0, $v0, $v1
/* 4035B8 E01181B8 A6020010 */  sh        $v0, 0x10($s0)
/* 4035BC E01181BC A6020008 */  sh        $v0, 0x8($s0)
/* 4035C0 E01181C0 96020004 */  lhu       $v0, 0x4($s0)
/* 4035C4 E01181C4 96030006 */  lhu       $v1, 0x6($s0)
/* 4035C8 E01181C8 244200A8 */  addiu     $v0, $v0, 0xA8
/* 4035CC E01181CC A6020004 */  sh        $v0, 0x4($s0)
/* 4035D0 E01181D0 96020008 */  lhu       $v0, 0x8($s0)
/* 4035D4 E01181D4 246300A8 */  addiu     $v1, $v1, 0xA8
/* 4035D8 E01181D8 A6030006 */  sh        $v1, 0x6($s0)
/* 4035DC E01181DC 86030004 */  lh        $v1, 0x4($s0)
/* 4035E0 E01181E0 244200A8 */  addiu     $v0, $v0, 0xA8
/* 4035E4 E01181E4 28630100 */  slti      $v1, $v1, 0x100
/* 4035E8 E01181E8 14600002 */  bnez      $v1, .LE01181F4
/* 4035EC E01181EC A6020008 */   sh       $v0, 0x8($s0)
/* 4035F0 E01181F0 A6120004 */  sh        $s2, 0x4($s0)
.LE01181F4:
/* 4035F4 E01181F4 86020006 */  lh        $v0, 0x6($s0)
/* 4035F8 E01181F8 28420100 */  slti      $v0, $v0, 0x100
/* 4035FC E01181FC 50400001 */  beql      $v0, $zero, .LE0118204
/* 403600 E0118200 A6120006 */   sh       $s2, 0x6($s0)
.LE0118204:
/* 403604 E0118204 86020008 */  lh        $v0, 0x8($s0)
/* 403608 E0118208 28420100 */  slti      $v0, $v0, 0x100
/* 40360C E011820C 50400001 */  beql      $v0, $zero, .LE0118214
/* 403610 E0118210 A6120008 */   sh       $s2, 0x8($s0)
.LE0118214:
/* 403614 E0118214 8602000C */  lh        $v0, 0xC($s0)
/* 403618 E0118218 44822000 */  mtc1      $v0, $f4
/* 40361C E011821C 00000000 */  nop
/* 403620 E0118220 46802121 */  cvt.d.w   $f4, $f4
/* 403624 E0118224 46342102 */  mul.d     $f4, $f4, $f20
/* 403628 E0118228 00000000 */  nop
/* 40362C E011822C 8602000E */  lh        $v0, 0xE($s0)
/* 403630 E0118230 44821000 */  mtc1      $v0, $f2
/* 403634 E0118234 00000000 */  nop
/* 403638 E0118238 468010A1 */  cvt.d.w   $f2, $f2
/* 40363C E011823C 46341082 */  mul.d     $f2, $f2, $f20
/* 403640 E0118240 00000000 */  nop
/* 403644 E0118244 86020010 */  lh        $v0, 0x10($s0)
/* 403648 E0118248 44820000 */  mtc1      $v0, $f0
/* 40364C E011824C 00000000 */  nop
/* 403650 E0118250 46800021 */  cvt.d.w   $f0, $f0
/* 403654 E0118254 46340002 */  mul.d     $f0, $f0, $f20
/* 403658 E0118258 00000000 */  nop
/* 40365C E011825C 24040167 */  addiu     $a0, $zero, 0x167
/* 403660 E0118260 26310001 */  addiu     $s1, $s1, 0x1
/* 403664 E0118264 4620218D */  trunc.w.d $f6, $f4
/* 403668 E0118268 44023000 */  mfc1      $v0, $f6
/* 40366C E011826C 00000000 */  nop
/* 403670 E0118270 A602000C */  sh        $v0, 0xC($s0)
/* 403674 E0118274 4620118D */  trunc.w.d $f6, $f2
/* 403678 E0118278 44023000 */  mfc1      $v0, $f6
/* 40367C E011827C 00000000 */  nop
/* 403680 E0118280 A602000E */  sh        $v0, 0xE($s0)
/* 403684 E0118284 4620018D */  trunc.w.d $f6, $f0
/* 403688 E0118288 44023000 */  mfc1      $v0, $f6
/* 40368C E011828C 0C080138 */  jal       shim_rand_int
/* 403690 E0118290 A6020010 */   sh       $v0, 0x10($s0)
/* 403694 E0118294 44820000 */  mtc1      $v0, $f0
/* 403698 E0118298 00000000 */  nop
/* 40369C E011829C 46800020 */  cvt.s.w   $f0, $f0
/* 4036A0 E01182A0 E6000000 */  swc1      $f0, 0x0($s0)
/* 4036A4 E01182A4 8E620008 */  lw        $v0, 0x8($s3)
/* 4036A8 E01182A8 0222102A */  slt       $v0, $s1, $v0
/* 4036AC E01182AC 1440FF92 */  bnez      $v0, .LE01180F8
/* 4036B0 E01182B0 2610003C */   addiu    $s0, $s0, 0x3C
.LE01182B4:
/* 4036B4 E01182B4 0260102D */  daddu     $v0, $s3, $zero
/* 4036B8 E01182B8 8FBF0038 */  lw        $ra, 0x38($sp)
/* 4036BC E01182BC 8FB30034 */  lw        $s3, 0x34($sp)
/* 4036C0 E01182C0 8FB20030 */  lw        $s2, 0x30($sp)
/* 4036C4 E01182C4 8FB1002C */  lw        $s1, 0x2C($sp)
/* 4036C8 E01182C8 8FB00028 */  lw        $s0, 0x28($sp)
/* 4036CC E01182CC D7BE0068 */  ldc1      $f30, 0x68($sp)
/* 4036D0 E01182D0 D7BC0060 */  ldc1      $f28, 0x60($sp)
/* 4036D4 E01182D4 D7BA0058 */  ldc1      $f26, 0x58($sp)
/* 4036D8 E01182D8 D7B80050 */  ldc1      $f24, 0x50($sp)
/* 4036DC E01182DC D7B60048 */  ldc1      $f22, 0x48($sp)
/* 4036E0 E01182E0 D7B40040 */  ldc1      $f20, 0x40($sp)
/* 4036E4 E01182E4 03E00008 */  jr        $ra
/* 4036E8 E01182E8 27BD0070 */   addiu    $sp, $sp, 0x70

### DECOMPILED C INSTRUCTIONS:

EffectInstance* breaking_junk_main(s32 arg0, f32 x, f32 y, f32 z, f32 scale, s32 time) {
    EffectBlueprint bp;
    EffectBlueprint* bpPtr = &bp;
    EffectInstance* effect;
    BreakingJunkFXData* data;
    s32 numParts = 6;
    u32 g;
    s32 i;

    bp.unk_00 = 0;
    bp.init = breaking_junk_init;
    bp.update = breaking_junk_update;
    bp.renderWorld = breaking_junk_render;
    bp.renderUI = NULL;
    bp.effectID = EFFECT_BREAKING_JUNK;

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

    data = effect->data.breakingJunk = shim_general_heap_malloc(numParts * sizeof(*data));

    ASSERT(effect->data.breakingJunk != NULL);

    data->unk_00 = arg0;
    data->lifeTime = 0;
    if (time <= 0) {
        data->timeLeft = 1000;
    } else {
        data->timeLeft = time;
    }
    data->primA = 255;

    for (i = 0; i < effect->numParts; i++, data++) {
        data->pos.x = x;
        data->pos.y = y;
        data->pos.z = z;
        data->vel.x = (shim_rand_int(10) - 5) * 0.5;
        data->vel.y = (shim_rand_int(5) + 1) * 0.8;
        data->vel.z = (shim_rand_int(10) - 5) * 0.5;
        data->scale = scale;
        data->primR = data->envR = shim_rand_int(255);
        g = shim_rand_int(255 - data->envR);
        data->primG = data->envG = g;
        data->primB = data->envB = (255 - g) - data->envR;
        data->primR += 168;
        data->primG += 168;
        data->primB += 168;
        if (data->primR > 255) {
            data->primR = 255;
        }
        if (data->primG > 255) {
            data->primG = 255;
        }
        if (data->primB > 255) {
            data->primB = 255;
        }
        data->envR = data->envR * 0.6;
        data->envG = data->envG * 0.6;
        data->envB = data->envB * 0.6;
        data->rot = shim_rand_int(359);
    }
    return effect;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel step_game_loop
/* 1B40 80026740 27BDFFE0 */  addiu     $sp, $sp, -0x20
/* 1B44 80026744 AFBF0018 */  sw        $ra, 0x18($sp)
/* 1B48 80026748 AFB10014 */  sw        $s1, 0x14($sp)
/* 1B4C 8002674C 0C00A21D */  jal       update_input
/* 1B50 80026750 AFB00010 */   sw       $s0, 0x10($sp)
/* 1B54 80026754 3C038007 */  lui       $v1, %hi(gGameStatusPtr)
/* 1B58 80026758 8C63419C */  lw        $v1, %lo(gGameStatusPtr)($v1)
/* 1B5C 8002675C 3C040CDF */  lui       $a0, (0xCDFE5FF >> 16)
/* 1B60 80026760 94620134 */  lhu       $v0, 0x134($v1)
/* 1B64 80026764 3C108011 */  lui       $s0, %hi(gPlayerData)
/* 1B68 80026768 2610F290 */  addiu     $s0, $s0, %lo(gPlayerData)
/* 1B6C 8002676C 24420001 */  addiu     $v0, $v0, 0x1
/* 1B70 80026770 A4620134 */  sh        $v0, 0x134($v1)
/* 1B74 80026774 8E0202BC */  lw        $v0, 0x2BC($s0)
/* 1B78 80026778 3484E5FF */  ori       $a0, $a0, (0xCDFE5FF & 0xFFFF)
/* 1B7C 8002677C 24420002 */  addiu     $v0, $v0, 0x2
/* 1B80 80026780 AE0202BC */  sw        $v0, 0x2BC($s0)
/* 1B84 80026784 0082102B */  sltu      $v0, $a0, $v0
/* 1B88 80026788 54400001 */  bnel      $v0, $zero, .L80026790
/* 1B8C 8002678C AE0402BC */   sw       $a0, 0x2BC($s0)
.L80026790:
/* 1B90 80026790 0C00A3E3 */  jal       update_max_rumble_duration
/* 1B94 80026794 00000000 */   nop
/* 1B98 80026798 3C048007 */  lui       $a0, %hi(gGameStepDelayCount)
/* 1B9C 8002679C 24844021 */  addiu     $a0, $a0, %lo(gGameStepDelayCount)
/* 1BA0 800267A0 80820000 */  lb        $v0, 0x0($a0)
/* 1BA4 800267A4 90830000 */  lbu       $v1, 0x0($a0)
/* 1BA8 800267A8 10400008 */  beqz      $v0, .L800267CC
/* 1BAC 800267AC 2462FFFF */   addiu    $v0, $v1, -0x1
/* 1BB0 800267B0 A0820000 */  sb        $v0, 0x0($a0)
/* 1BB4 800267B4 00021600 */  sll       $v0, $v0, 24
/* 1BB8 800267B8 14400087 */  bnez      $v0, .L800269D8
/* 1BBC 800267BC 00000000 */   nop
/* 1BC0 800267C0 3C028007 */  lui       $v0, %hi(gGameStepDelayAmount)
/* 1BC4 800267C4 90424020 */  lbu       $v0, %lo(gGameStepDelayAmount)($v0)
/* 1BC8 800267C8 A0820000 */  sb        $v0, 0x0($a0)
.L800267CC:
/* 1BCC 800267CC 0C046EBA */  jal       func_8011BAE8
/* 1BD0 800267D0 00000000 */   nop
/* 1BD4 800267D4 0C00E15F */  jal       npc_iter_no_op
/* 1BD8 800267D8 00000000 */   nop
/* 1BDC 800267DC 0C048D01 */  jal       update_workers
/* 1BE0 800267E0 00000000 */   nop
/* 1BE4 800267E4 0C051618 */  jal       update_triggers
/* 1BE8 800267E8 00000000 */   nop
/* 1BEC 800267EC 0C0B0F5D */  jal       update_scripts
/* 1BF0 800267F0 00000000 */   nop
/* 1BF4 800267F4 0C048DF6 */  jal       update_messages
/* 1BF8 800267F8 00000000 */   nop
/* 1BFC 800267FC 0C050584 */  jal       update_hud_elements
/* 1C00 80026800 00000000 */   nop
/* 1C04 80026804 0C044B9E */  jal       step_current_game_mode
/* 1C08 80026808 00000000 */   nop
/* 1C0C 8002680C 0C043DB4 */  jal       update_entities
/* 1C10 80026810 00000000 */   nop
/* 1C14 80026814 0C04E066 */  jal       func_80138198
/* 1C18 80026818 00000000 */   nop
/* 1C1C 8002681C 0C052952 */  jal       bgm_update_music_settings
/* 1C20 80026820 00000000 */   nop
/* 1C24 80026824 0C051C99 */  jal       update_ambient_sounds
/* 1C28 80026828 00000000 */   nop
/* 1C2C 8002682C 0C0525CD */  jal       sfx_update_env_sound_params
/* 1C30 80026830 00000000 */   nop
/* 1C34 80026834 0C051D05 */  jal       update_windows
/* 1C38 80026838 00000000 */   nop
/* 1C3C 8002683C 0C00AE9E */  jal       update_curtains
/* 1C40 80026840 00000000 */   nop
/* 1C44 80026844 3C10800A */  lui       $s0, %hi(gOverrideFlags)
/* 1C48 80026848 2610A650 */  addiu     $s0, $s0, %lo(gOverrideFlags)
/* 1C4C 8002684C 8E040000 */  lw        $a0, 0x0($s0)
/* 1C50 80026850 30820020 */  andi      $v0, $a0, 0x20
/* 1C54 80026854 10400035 */  beqz      $v0, .L8002692C
/* 1C58 80026858 00000000 */   nop
/* 1C5C 8002685C 3C118007 */  lui       $s1, %hi(D_800741A2)
/* 1C60 80026860 263141A2 */  addiu     $s1, $s1, %lo(D_800741A2)
/* 1C64 80026864 86230000 */  lh        $v1, 0x0($s1)
/* 1C68 80026868 10600005 */  beqz      $v1, .L80026880
/* 1C6C 8002686C 24020001 */   addiu    $v0, $zero, 0x1
/* 1C70 80026870 1062001C */  beq       $v1, $v0, .L800268E4
/* 1C74 80026874 34840008 */   ori      $a0, $a0, 0x8
/* 1C78 80026878 08009A4F */  j         .L8002693C
/* 1C7C 8002687C 00000000 */   nop
.L80026880:
/* 1C80 80026880 34820200 */  ori       $v0, $a0, 0x200
/* 1C84 80026884 0C03805E */  jal       disable_player_input
/* 1C88 80026888 AE020000 */   sw       $v0, 0x0($s0)
/* 1C8C 8002688C 3C048007 */  lui       $a0, %hi(D_800741A0)
/* 1C90 80026890 248441A0 */  addiu     $a0, $a0, %lo(D_800741A0)
/* 1C94 80026894 240500FF */  addiu     $a1, $zero, 0xFF
/* 1C98 80026898 84820000 */  lh        $v0, 0x0($a0)
/* 1C9C 8002689C 94830000 */  lhu       $v1, 0x0($a0)
/* 1CA0 800268A0 14450008 */  bne       $v0, $a1, .L800268C4
/* 1CA4 800268A4 2462000A */   addiu    $v0, $v1, 0xA
/* 1CA8 800268A8 24020001 */  addiu     $v0, $zero, 0x1
/* 1CAC 800268AC A6220000 */  sh        $v0, 0x0($s1)
/* 1CB0 800268B0 24020003 */  addiu     $v0, $zero, 0x3
/* 1CB4 800268B4 3C01800A */  lui       $at, %hi(D_8009A690)
/* 1CB8 800268B8 A422A690 */  sh        $v0, %lo(D_8009A690)($at)
/* 1CBC 800268BC 08009A4F */  j         .L8002693C
/* 1CC0 800268C0 00000000 */   nop
.L800268C4:
/* 1CC4 800268C4 A4820000 */  sh        $v0, 0x0($a0)
/* 1CC8 800268C8 00021400 */  sll       $v0, $v0, 16
/* 1CCC 800268CC 00021403 */  sra       $v0, $v0, 16
/* 1CD0 800268D0 28420100 */  slti      $v0, $v0, 0x100
/* 1CD4 800268D4 50400019 */  beql      $v0, $zero, .L8002693C
/* 1CD8 800268D8 A4850000 */   sh       $a1, 0x0($a0)
/* 1CDC 800268DC 08009A4F */  j         .L8002693C
/* 1CE0 800268E0 00000000 */   nop
.L800268E4:
/* 1CE4 800268E4 3C02800A */  lui       $v0, %hi(D_8009A690)
/* 1CE8 800268E8 2442A690 */  addiu     $v0, $v0, %lo(D_8009A690)
/* 1CEC 800268EC 94430000 */  lhu       $v1, 0x0($v0)
/* 1CF0 800268F0 AE040000 */  sw        $a0, 0x0($s0)
/* 1CF4 800268F4 2463FFFF */  addiu     $v1, $v1, -0x1
/* 1CF8 800268F8 A4430000 */  sh        $v1, 0x0($v0)
/* 1CFC 800268FC 00031C00 */  sll       $v1, $v1, 16
/* 1D00 80026900 1460000E */  bnez      $v1, .L8002693C
/* 1D04 80026904 00000000 */   nop
/* 1D08 80026908 0C05260E */  jal       sfx_stop_env_sounds
/* 1D0C 8002690C 00000000 */   nop
/* 1D10 80026910 0C00CD3C */  jal       set_game_mode
/* 1D14 80026914 0000202D */   daddu    $a0, $zero, $zero
/* 1D18 80026918 8E020000 */  lw        $v0, 0x0($s0)
/* 1D1C 8002691C 2403FFDF */  addiu     $v1, $zero, -0x21
/* 1D20 80026920 00431024 */  and       $v0, $v0, $v1
/* 1D24 80026924 08009A4F */  j         .L8002693C
/* 1D28 80026928 AE020000 */   sw       $v0, 0x0($s0)
.L8002692C:
/* 1D2C 8002692C 3C018007 */  lui       $at, %hi(D_800741A0)
/* 1D30 80026930 A42041A0 */  sh        $zero, %lo(D_800741A0)($at)
/* 1D34 80026934 3C018007 */  lui       $at, %hi(D_800741A2)
/* 1D38 80026938 A42041A2 */  sh        $zero, %lo(D_800741A2)($at)
.L8002693C:
/* 1D3C 8002693C 3C04800A */  lui       $a0, %hi(gOverrideFlags)
/* 1D40 80026940 2484A650 */  addiu     $a0, $a0, %lo(gOverrideFlags)
/* 1D44 80026944 8C830000 */  lw        $v1, 0x0($a0)
/* 1D48 80026948 30620100 */  andi      $v0, $v1, 0x100
/* 1D4C 8002694C 14400003 */  bnez      $v0, .L8002695C
/* 1D50 80026950 34621000 */   ori      $v0, $v1, 0x1000
/* 1D54 80026954 2402EFFF */  addiu     $v0, $zero, -0x1001
/* 1D58 80026958 00621024 */  and       $v0, $v1, $v0
.L8002695C:
/* 1D5C 8002695C AC820000 */  sw        $v0, 0x0($a0)
/* 1D60 80026960 3C04800A */  lui       $a0, %hi(gOverrideFlags)
/* 1D64 80026964 2484A650 */  addiu     $a0, $a0, %lo(gOverrideFlags)
/* 1D68 80026968 8C830000 */  lw        $v1, 0x0($a0)
/* 1D6C 8002696C 30620200 */  andi      $v0, $v1, 0x200
/* 1D70 80026970 14400003 */  bnez      $v0, .L80026980
/* 1D74 80026974 34622000 */   ori      $v0, $v1, 0x2000
/* 1D78 80026978 2402DFFF */  addiu     $v0, $zero, -0x2001
/* 1D7C 8002697C 00621024 */  and       $v0, $v1, $v0
.L80026980:
/* 1D80 80026980 AC820000 */  sw        $v0, 0x0($a0)
/* 1D84 80026984 3C04800A */  lui       $a0, %hi(gOverrideFlags)
/* 1D88 80026988 2484A650 */  addiu     $a0, $a0, %lo(gOverrideFlags)
/* 1D8C 8002698C 8C830000 */  lw        $v1, 0x0($a0)
/* 1D90 80026990 30620400 */  andi      $v0, $v1, 0x400
/* 1D94 80026994 14400003 */  bnez      $v0, .L800269A4
/* 1D98 80026998 34624000 */   ori      $v0, $v1, 0x4000
/* 1D9C 8002699C 2402BFFF */  addiu     $v0, $zero, -0x4001
/* 1DA0 800269A0 00621024 */  and       $v0, $v1, $v0
.L800269A4:
/* 1DA4 800269A4 AC820000 */  sw        $v0, 0x0($a0)
/* 1DA8 800269A8 3C04800A */  lui       $a0, %hi(gOverrideFlags)
/* 1DAC 800269AC 2484A650 */  addiu     $a0, $a0, %lo(gOverrideFlags)
/* 1DB0 800269B0 8C830000 */  lw        $v1, 0x0($a0)
/* 1DB4 800269B4 30620800 */  andi      $v0, $v1, 0x800
/* 1DB8 800269B8 14400004 */  bnez      $v0, .L800269CC
/* 1DBC 800269BC 34628000 */   ori      $v0, $v1, 0x8000
/* 1DC0 800269C0 3C02FFFF */  lui       $v0, (0xFFFF7FFF >> 16)
/* 1DC4 800269C4 34427FFF */  ori       $v0, $v0, (0xFFFF7FFF & 0xFFFF)
/* 1DC8 800269C8 00621024 */  and       $v0, $v1, $v0
.L800269CC:
/* 1DCC 800269CC AC820000 */  sw        $v0, 0x0($a0)
/* 1DD0 800269D0 0C00A67F */  jal       rand_int
/* 1DD4 800269D4 24040001 */   addiu    $a0, $zero, 0x1
.L800269D8:
/* 1DD8 800269D8 8FBF0018 */  lw        $ra, 0x18($sp)
/* 1DDC 800269DC 8FB10014 */  lw        $s1, 0x14($sp)
/* 1DE0 800269E0 8FB00010 */  lw        $s0, 0x10($sp)
/* 1DE4 800269E4 03E00008 */  jr        $ra
/* 1DE8 800269E8 27BD0020 */   addiu    $sp, $sp, 0x20

### DECOMPILED C INSTRUCTIONS:

void step_game_loop(void) {
    PlayerData* playerData = &gPlayerData;
    const int MAX_GAME_TIME = 1000*60*60*60 - 1; // 1000 hours minus one frame at 60 fps

#if !VERSION_JP
    update_input();
#endif

    gGameStatusPtr->frameCounter++;

    playerData->frameCounter += 2;
    if (playerData->frameCounter > MAX_GAME_TIME) {
        playerData->frameCounter = MAX_GAME_TIME;
    }

#if VERSION_JP
    update_input();
#endif

    update_max_rumble_duration();

    if (gGameStepDelayCount != 0) {
        gGameStepDelayCount-- ;
        if (gGameStepDelayCount == 0) {
            gGameStepDelayCount = gGameStepDelayAmount;
        } else {
            return;
        }
    }

    func_8011BAE8();
    npc_iter_no_op();
    update_workers();
    update_triggers();
    update_scripts();
    update_messages();
    update_hud_elements();
    step_current_game_mode();
    update_entities();
    func_80138198();
    bgm_update_music_settings();
    update_ambient_sounds();
    sfx_update_env_sound_params();
    update_windows();
    update_curtains();

    if (gOverrideFlags & GLOBAL_OVERRIDES_ENABLE_TRANSITION_STENCIL) {
        switch (D_800741A2) {
            case 0:
                gOverrideFlags |= GLOBAL_OVERRIDES_200;
                disable_player_input();

                if (D_800741A0 == 255) {
                    D_800741A2 = 1;
                    D_8009A690 = 3;
                } else {
                    D_800741A0 += 10;
                    if (D_800741A0 > 255) {
                        D_800741A0 = 255;
                    }
                }
                break;
            case 1:
                gOverrideFlags |= GLOBAL_OVERRIDES_8;
                D_8009A690--;
                if (D_8009A690 == 0) {
                    sfx_stop_env_sounds();
                    set_game_mode(GAME_MODE_STARTUP);
                    gOverrideFlags &= ~GLOBAL_OVERRIDES_ENABLE_TRANSITION_STENCIL;
                }
                break;
        }
    } else {
        D_800741A0 = 0;
        D_800741A2 = 0;
    }

    if (gOverrideFlags & GLOBAL_OVERRIDES_DISABLE_BATTLES) {
        gOverrideFlags |= GLOBAL_OVERRIDES_1000;
    } else {
        gOverrideFlags &= ~GLOBAL_OVERRIDES_1000;
    }

    if (gOverrideFlags & GLOBAL_OVERRIDES_200) {
        gOverrideFlags |= GLOBAL_OVERRIDES_2000;
    } else {
        gOverrideFlags &= ~GLOBAL_OVERRIDES_2000;
    }

    if (gOverrideFlags & GLOBAL_OVERRIDES_400) {
        gOverrideFlags |= GLOBAL_OVERRIDES_4000;
    } else {
        gOverrideFlags &= ~GLOBAL_OVERRIDES_4000;
    }

    if (gOverrideFlags & GLOBAL_OVERRIDES_800) {
        gOverrideFlags |= GLOBAL_OVERRIDES_8000;
    } else {
        gOverrideFlags &= ~GLOBAL_OVERRIDES_8000;
    }

    rand_int(1);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel merlin_house_stars_appendGfx
/* 3A58F4 E00A63A4 27BDFF50 */  addiu     $sp, $sp, -0xB0
/* 3A58F8 E00A63A8 0080182D */  daddu     $v1, $a0, $zero
/* 3A58FC E00A63AC 3C05DB06 */  lui       $a1, (0xDB060024 >> 16)
/* 3A5900 E00A63B0 34A50024 */  ori       $a1, $a1, (0xDB060024 & 0xFFFF)
/* 3A5904 E00A63B4 AFB10094 */  sw        $s1, 0x94($sp)
/* 3A5908 E00A63B8 3C11800A */  lui       $s1, %hi(gMainGfxPos)
/* 3A590C E00A63BC 2631A66C */  addiu     $s1, $s1, %lo(gMainGfxPos)
/* 3A5910 E00A63C0 27A40010 */  addiu     $a0, $sp, 0x10
/* 3A5914 E00A63C4 AFB600A8 */  sw        $s6, 0xA8($sp)
/* 3A5918 E00A63C8 3C16E700 */  lui       $s6, (0xE7000000 >> 16)
/* 3A591C E00A63CC AFBF00AC */  sw        $ra, 0xAC($sp)
/* 3A5920 E00A63D0 AFB500A4 */  sw        $s5, 0xA4($sp)
/* 3A5924 E00A63D4 AFB400A0 */  sw        $s4, 0xA0($sp)
/* 3A5928 E00A63D8 AFB3009C */  sw        $s3, 0x9C($sp)
/* 3A592C E00A63DC AFB20098 */  sw        $s2, 0x98($sp)
/* 3A5930 E00A63E0 AFB00090 */  sw        $s0, 0x90($sp)
/* 3A5934 E00A63E4 8E280000 */  lw        $t0, 0x0($s1)
/* 3A5938 E00A63E8 8C72000C */  lw        $s2, 0xC($v1)
/* 3A593C E00A63EC 0100102D */  daddu     $v0, $t0, $zero
/* 3A5940 E00A63F0 8E540018 */  lw        $s4, 0x18($s2)
/* 3A5944 E00A63F4 25080008 */  addiu     $t0, $t0, 0x8
/* 3A5948 E00A63F8 AC560000 */  sw        $s6, 0x0($v0)
/* 3A594C E00A63FC AC400004 */  sw        $zero, 0x4($v0)
/* 3A5950 E00A6400 AD050000 */  sw        $a1, 0x0($t0)
/* 3A5954 E00A6404 8C620010 */  lw        $v0, 0x10($v1)
/* 3A5958 E00A6408 3C150001 */  lui       $s5, (0x11630 >> 16)
/* 3A595C E00A640C AE280000 */  sw        $t0, 0x0($s1)
/* 3A5960 E00A6410 8C42001C */  lw        $v0, 0x1C($v0)
/* 3A5964 E00A6414 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 3A5968 E00A6418 00431021 */  addu      $v0, $v0, $v1
/* 3A596C E00A641C AD020004 */  sw        $v0, 0x4($t0)
/* 3A5970 E00A6420 8E45000C */  lw        $a1, 0xC($s2)
/* 3A5974 E00A6424 8E460010 */  lw        $a2, 0x10($s2)
/* 3A5978 E00A6428 8E470014 */  lw        $a3, 0x14($s2)
/* 3A597C E00A642C 25080008 */  addiu     $t0, $t0, 0x8
/* 3A5980 E00A6430 0C080108 */  jal       shim_guTranslateF
/* 3A5984 E00A6434 AE280000 */   sw       $t0, 0x0($s1)
/* 3A5988 E00A6438 36B51630 */  ori       $s5, $s5, (0x11630 & 0xFFFF)
/* 3A598C E00A643C 3C013F75 */  lui       $at, (0x3F75C28F >> 16)
/* 3A5990 E00A6440 3421C28F */  ori       $at, $at, (0x3F75C28F & 0xFFFF)
/* 3A5994 E00A6444 44810000 */  mtc1      $at, $f0
/* 3A5998 E00A6448 27B00050 */  addiu     $s0, $sp, 0x50
/* 3A599C E00A644C 44050000 */  mfc1      $a1, $f0
/* 3A59A0 E00A6450 0200202D */  daddu     $a0, $s0, $zero
/* 3A59A4 E00A6454 00A0302D */  daddu     $a2, $a1, $zero
/* 3A59A8 E00A6458 0C080110 */  jal       shim_guScaleF
/* 3A59AC E00A645C 00A0382D */   daddu    $a3, $a1, $zero
/* 3A59B0 E00A6460 0200202D */  daddu     $a0, $s0, $zero
/* 3A59B4 E00A6464 27A50010 */  addiu     $a1, $sp, 0x10
/* 3A59B8 E00A6468 0C080114 */  jal       shim_guMtxCatF
/* 3A59BC E00A646C 00A0302D */   daddu    $a2, $a1, $zero
/* 3A59C0 E00A6470 27A40010 */  addiu     $a0, $sp, 0x10
/* 3A59C4 E00A6474 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 3A59C8 E00A6478 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 3A59CC E00A647C 3C13800A */  lui       $s3, %hi(gDisplayContext)
/* 3A59D0 E00A6480 2673A674 */  addiu     $s3, $s3, %lo(gDisplayContext)
/* 3A59D4 E00A6484 96050000 */  lhu       $a1, 0x0($s0)
/* 3A59D8 E00A6488 8E620000 */  lw        $v0, 0x0($s3)
/* 3A59DC E00A648C 00052980 */  sll       $a1, $a1, 6
/* 3A59E0 E00A6490 00B52821 */  addu      $a1, $a1, $s5
/* 3A59E4 E00A6494 0C080118 */  jal       shim_guMtxF2L
/* 3A59E8 E00A6498 00452821 */   addu     $a1, $v0, $a1
/* 3A59EC E00A649C 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 3A59F0 E00A64A0 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 3A59F4 E00A64A4 3C07FCFF */  lui       $a3, (0xFCFFA7FF >> 16)
/* 3A59F8 E00A64A8 34E7A7FF */  ori       $a3, $a3, (0xFCFFA7FF & 0xFFFF)
/* 3A59FC E00A64AC 3C06FF17 */  lui       $a2, (0xFF17723F >> 16)
/* 3A5A00 E00A64B0 34C6723F */  ori       $a2, $a2, (0xFF17723F & 0xFFFF)
/* 3A5A04 E00A64B4 3C08D838 */  lui       $t0, (0xD8380002 >> 16)
/* 3A5A08 E00A64B8 35080002 */  ori       $t0, $t0, (0xD8380002 & 0xFFFF)
/* 3A5A0C E00A64BC 329400FF */  andi      $s4, $s4, 0xFF
/* 3A5A10 E00A64C0 8E250000 */  lw        $a1, 0x0($s1)
/* 3A5A14 E00A64C4 96020000 */  lhu       $v0, 0x0($s0)
/* 3A5A18 E00A64C8 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 3A5A1C E00A64CC 44812000 */  mtc1      $at, $f4
/* 3A5A20 E00A64D0 00A0202D */  daddu     $a0, $a1, $zero
/* 3A5A24 E00A64D4 24A50008 */  addiu     $a1, $a1, 0x8
/* 3A5A28 E00A64D8 AE250000 */  sw        $a1, 0x0($s1)
/* 3A5A2C E00A64DC AC830000 */  sw        $v1, 0x0($a0)
/* 3A5A30 E00A64E0 24430001 */  addiu     $v1, $v0, 0x1
/* 3A5A34 E00A64E4 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3A5A38 E00A64E8 00021180 */  sll       $v0, $v0, 6
/* 3A5A3C E00A64EC A6030000 */  sh        $v1, 0x0($s0)
/* 3A5A40 E00A64F0 8E630000 */  lw        $v1, 0x0($s3)
/* 3A5A44 E00A64F4 00551021 */  addu      $v0, $v0, $s5
/* 3A5A48 E00A64F8 00621821 */  addu      $v1, $v1, $v0
/* 3A5A4C E00A64FC 24A20008 */  addiu     $v0, $a1, 0x8
/* 3A5A50 E00A6500 AC830004 */  sw        $v1, 0x4($a0)
/* 3A5A54 E00A6504 AE220000 */  sw        $v0, 0x0($s1)
/* 3A5A58 E00A6508 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3A5A5C E00A650C ACA20000 */  sw        $v0, 0x0($a1)
/* 3A5A60 E00A6510 2402007F */  addiu     $v0, $zero, 0x7F
/* 3A5A64 E00A6514 ACA20004 */  sw        $v0, 0x4($a1)
/* 3A5A68 E00A6518 24A20010 */  addiu     $v0, $a1, 0x10
/* 3A5A6C E00A651C AE220000 */  sw        $v0, 0x0($s1)
/* 3A5A70 E00A6520 3C02FB00 */  lui       $v0, (0xFB000000 >> 16)
/* 3A5A74 E00A6524 ACA60014 */  sw        $a2, 0x14($a1)
/* 3A5A78 E00A6528 3C06DE00 */  lui       $a2, (0xDE000000 >> 16)
/* 3A5A7C E00A652C ACA20008 */  sw        $v0, 0x8($a1)
/* 3A5A80 E00A6530 3C020900 */  lui       $v0, %hi(D_09001000_40E290)
/* 3A5A84 E00A6534 24421000 */  addiu     $v0, $v0, %lo(D_09001000_40E290)
/* 3A5A88 E00A6538 ACB4000C */  sw        $s4, 0xC($a1)
/* 3A5A8C E00A653C ACA70010 */  sw        $a3, 0x10($a1)
/* 3A5A90 E00A6540 ACA60018 */  sw        $a2, 0x18($a1)
/* 3A5A94 E00A6544 ACA2001C */  sw        $v0, 0x1C($a1)
/* 3A5A98 E00A6548 C642001C */  lwc1      $f2, 0x1C($s2)
/* 3A5A9C E00A654C 24A20018 */  addiu     $v0, $a1, 0x18
/* 3A5AA0 E00A6550 AE220000 */  sw        $v0, 0x0($s1)
/* 3A5AA4 E00A6554 24A20020 */  addiu     $v0, $a1, 0x20
/* 3A5AA8 E00A6558 46041082 */  mul.s     $f2, $f2, $f4
/* 3A5AAC E00A655C 00000000 */  nop
/* 3A5AB0 E00A6560 AE220000 */  sw        $v0, 0x0($s1)
/* 3A5AB4 E00A6564 C6400020 */  lwc1      $f0, 0x20($s2)
/* 3A5AB8 E00A6568 24A20028 */  addiu     $v0, $a1, 0x28
/* 3A5ABC E00A656C AE220000 */  sw        $v0, 0x0($s1)
/* 3A5AC0 E00A6570 46040002 */  mul.s     $f0, $f0, $f4
/* 3A5AC4 E00A6574 00000000 */  nop
/* 3A5AC8 E00A6578 24A20030 */  addiu     $v0, $a1, 0x30
/* 3A5ACC E00A657C 3C04F200 */  lui       $a0, (0xF2000000 >> 16)
/* 3A5AD0 E00A6580 AE220000 */  sw        $v0, 0x0($s1)
/* 3A5AD4 E00A6584 4600118D */  trunc.w.s $f6, $f2
/* 3A5AD8 E00A6588 44073000 */  mfc1      $a3, $f6
/* 3A5ADC E00A658C 4600018D */  trunc.w.s $f6, $f0
/* 3A5AE0 E00A6590 44093000 */  mfc1      $t1, $f6
/* 3A5AE4 E00A6594 30E30FFF */  andi      $v1, $a3, 0xFFF
/* 3A5AE8 E00A6598 00031B00 */  sll       $v1, $v1, 12
/* 3A5AEC E00A659C 31220FFF */  andi      $v0, $t1, 0xFFF
/* 3A5AF0 E00A65A0 00441025 */  or        $v0, $v0, $a0
/* 3A5AF4 E00A65A4 00621825 */  or        $v1, $v1, $v0
/* 3A5AF8 E00A65A8 24E200FC */  addiu     $v0, $a3, 0xFC
/* 3A5AFC E00A65AC 30420FFF */  andi      $v0, $v0, 0xFFF
/* 3A5B00 E00A65B0 00021300 */  sll       $v0, $v0, 12
/* 3A5B04 E00A65B4 ACA30020 */  sw        $v1, 0x20($a1)
/* 3A5B08 E00A65B8 252300FC */  addiu     $v1, $t1, 0xFC
/* 3A5B0C E00A65BC 30630FFF */  andi      $v1, $v1, 0xFFF
/* 3A5B10 E00A65C0 00431025 */  or        $v0, $v0, $v1
/* 3A5B14 E00A65C4 ACA20024 */  sw        $v0, 0x24($a1)
/* 3A5B18 E00A65C8 C6420024 */  lwc1      $f2, 0x24($s2)
/* 3A5B1C E00A65CC 24A20038 */  addiu     $v0, $a1, 0x38
/* 3A5B20 E00A65D0 46041082 */  mul.s     $f2, $f2, $f4
/* 3A5B24 E00A65D4 00000000 */  nop
/* 3A5B28 E00A65D8 AE220000 */  sw        $v0, 0x0($s1)
/* 3A5B2C E00A65DC C6400028 */  lwc1      $f0, 0x28($s2)
/* 3A5B30 E00A65E0 24A20040 */  addiu     $v0, $a1, 0x40
/* 3A5B34 E00A65E4 AE220000 */  sw        $v0, 0x0($s1)
/* 3A5B38 E00A65E8 46040002 */  mul.s     $f0, $f0, $f4
/* 3A5B3C E00A65EC 00000000 */  nop
/* 3A5B40 E00A65F0 3C020900 */  lui       $v0, %hi(D_09001418_40E6A8)
/* 3A5B44 E00A65F4 24421418 */  addiu     $v0, $v0, %lo(D_09001418_40E6A8)
/* 3A5B48 E00A65F8 ACA60030 */  sw        $a2, 0x30($a1)
/* 3A5B4C E00A65FC ACA20034 */  sw        $v0, 0x34($a1)
/* 3A5B50 E00A6600 4600118D */  trunc.w.s $f6, $f2
/* 3A5B54 E00A6604 44073000 */  mfc1      $a3, $f6
/* 3A5B58 E00A6608 4600018D */  trunc.w.s $f6, $f0
/* 3A5B5C E00A660C 44093000 */  mfc1      $t1, $f6
/* 3A5B60 E00A6610 30E30FFF */  andi      $v1, $a3, 0xFFF
/* 3A5B64 E00A6614 00031B00 */  sll       $v1, $v1, 12
/* 3A5B68 E00A6618 31220FFF */  andi      $v0, $t1, 0xFFF
/* 3A5B6C E00A661C 00441025 */  or        $v0, $v0, $a0
/* 3A5B70 E00A6620 00621825 */  or        $v1, $v1, $v0
/* 3A5B74 E00A6624 24E200FC */  addiu     $v0, $a3, 0xFC
/* 3A5B78 E00A6628 30420FFF */  andi      $v0, $v0, 0xFFF
/* 3A5B7C E00A662C 00021300 */  sll       $v0, $v0, 12
/* 3A5B80 E00A6630 ACA30028 */  sw        $v1, 0x28($a1)
/* 3A5B84 E00A6634 252300FC */  addiu     $v1, $t1, 0xFC
/* 3A5B88 E00A6638 30630FFF */  andi      $v1, $v1, 0xFFF
/* 3A5B8C E00A663C 3C040100 */  lui       $a0, (0x1000000 >> 16)
/* 3A5B90 E00A6640 00641825 */  or        $v1, $v1, $a0
/* 3A5B94 E00A6644 00431025 */  or        $v0, $v0, $v1
/* 3A5B98 E00A6648 ACA2002C */  sw        $v0, 0x2C($a1)
/* 3A5B9C E00A664C 24020040 */  addiu     $v0, $zero, 0x40
/* 3A5BA0 E00A6650 ACA80038 */  sw        $t0, 0x38($a1)
/* 3A5BA4 E00A6654 ACA2003C */  sw        $v0, 0x3C($a1)
/* 3A5BA8 E00A6658 24A20048 */  addiu     $v0, $a1, 0x48
/* 3A5BAC E00A665C AE220000 */  sw        $v0, 0x0($s1)
/* 3A5BB0 E00A6660 ACB60040 */  sw        $s6, 0x40($a1)
/* 3A5BB4 E00A6664 ACA00044 */  sw        $zero, 0x44($a1)
/* 3A5BB8 E00A6668 8FBF00AC */  lw        $ra, 0xAC($sp)
/* 3A5BBC E00A666C 8FB600A8 */  lw        $s6, 0xA8($sp)
/* 3A5BC0 E00A6670 8FB500A4 */  lw        $s5, 0xA4($sp)
/* 3A5BC4 E00A6674 8FB400A0 */  lw        $s4, 0xA0($sp)
/* 3A5BC8 E00A6678 8FB3009C */  lw        $s3, 0x9C($sp)
/* 3A5BCC E00A667C 8FB20098 */  lw        $s2, 0x98($sp)
/* 3A5BD0 E00A6680 8FB10094 */  lw        $s1, 0x94($sp)
/* 3A5BD4 E00A6684 8FB00090 */  lw        $s0, 0x90($sp)
/* 3A5BD8 E00A6688 03E00008 */  jr        $ra
/* 3A5BDC E00A668C 27BD00B0 */   addiu    $sp, $sp, 0xB0

### DECOMPILED C INSTRUCTIONS:

void merlin_house_stars_appendGfx(void* effect) {
    MerlinHouseStarsFXData* data = ((EffectInstance*)effect)->data.merlinHouseStars;
    s32 unk_18 = data->unk_18;
    Matrix4f sp10;
    Matrix4f sp50;
    s32 uls;
    s32 ult;

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

    shim_guTranslateF(sp10, data->unk_0C, data->unk_10, data->unk_14);
    shim_guScaleF(sp50, 0.96f, 0.96f, 0.96f);
    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);
    gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, 127);
    gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, unk_18);
    gDPSetCombineLERP(gMainGfxPos++, 0, 0, 0, 1, TEXEL1, 0, PRIMITIVE, TEXEL0, 0, 0, 0, COMBINED, COMBINED, 0, ENVIRONMENT, 0);
    gSPDisplayList(gMainGfxPos++, D_09001000_3A6BE0);

    uls = data->unk_1C * 4.0f;
    ult = data->unk_20 * 4.0f;
    gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, uls, ult, uls + 252, ult + 252);

    uls = data->unk_24 * 4.0f;
    ult = data->unk_28 * 4.0f;
    gDPSetTileSize(gMainGfxPos++, 1, uls, ult, uls + 252, ult + 252);

    gSPDisplayList(gMainGfxPos++, D_09001418_3A6FF8);
    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    gDPPipeSync(gMainGfxPos++);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel big_snowflakes_appendGfx
/* 3635B0 E0060450 27BDFEF0 */  addiu     $sp, $sp, -0x110
/* 3635B4 E0060454 3C02DB06 */  lui       $v0, (0xDB060024 >> 16)
/* 3635B8 E0060458 34420024 */  ori       $v0, $v0, (0xDB060024 & 0xFFFF)
/* 3635BC E006045C AFB400E8 */  sw        $s4, 0xE8($sp)
/* 3635C0 E0060460 3C14800A */  lui       $s4, %hi(gMainGfxPos)
/* 3635C4 E0060464 2694A66C */  addiu     $s4, $s4, %lo(gMainGfxPos)
/* 3635C8 E0060468 AFBF00FC */  sw        $ra, 0xFC($sp)
/* 3635CC E006046C AFBE00F8 */  sw        $fp, 0xF8($sp)
/* 3635D0 E0060470 AFB700F4 */  sw        $s7, 0xF4($sp)
/* 3635D4 E0060474 AFB600F0 */  sw        $s6, 0xF0($sp)
/* 3635D8 E0060478 AFB500EC */  sw        $s5, 0xEC($sp)
/* 3635DC E006047C AFB300E4 */  sw        $s3, 0xE4($sp)
/* 3635E0 E0060480 AFB200E0 */  sw        $s2, 0xE0($sp)
/* 3635E4 E0060484 AFB100DC */  sw        $s1, 0xDC($sp)
/* 3635E8 E0060488 AFB000D8 */  sw        $s0, 0xD8($sp)
/* 3635EC E006048C F7B60108 */  sdc1      $f22, 0x108($sp)
/* 3635F0 E0060490 F7B40100 */  sdc1      $f20, 0x100($sp)
/* 3635F4 E0060494 AFA40110 */  sw        $a0, 0x110($sp)
/* 3635F8 E0060498 8E850000 */  lw        $a1, 0x0($s4)
/* 3635FC E006049C 8C90000C */  lw        $s0, 0xC($a0)
/* 363600 E00604A0 3C06E006 */  lui       $a2, (0xE0060738 >> 16)
/* 363604 E00604A4 8CC60738 */  lw        $a2, (0xE0060738 & 0xFFFF)($a2)
/* 363608 E00604A8 00A0202D */  daddu     $a0, $a1, $zero
/* 36360C E00604AC 24A50008 */  addiu     $a1, $a1, 0x8
/* 363610 E00604B0 AE850000 */  sw        $a1, 0x0($s4)
/* 363614 E00604B4 AC820000 */  sw        $v0, 0x0($a0)
/* 363618 E00604B8 24A20008 */  addiu     $v0, $a1, 0x8
/* 36361C E00604BC AE820000 */  sw        $v0, 0x0($s4)
/* 363620 E00604C0 8FA80110 */  lw        $t0, 0x110($sp)
/* 363624 E00604C4 3C071464 */  lui       $a3, (0x14641400 >> 16)
/* 363628 E00604C8 8D030010 */  lw        $v1, 0x10($t0)
/* 36362C E00604CC 24A20010 */  addiu     $v0, $a1, 0x10
/* 363630 E00604D0 AE820000 */  sw        $v0, 0x0($s4)
/* 363634 E00604D4 8C62001C */  lw        $v0, 0x1C($v1)
/* 363638 E00604D8 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 36363C E00604DC 00431021 */  addu      $v0, $v0, $v1
/* 363640 E00604E0 AC820004 */  sw        $v0, 0x4($a0)
/* 363644 E00604E4 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 363648 E00604E8 ACA20000 */  sw        $v0, 0x0($a1)
/* 36364C E00604EC 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 363650 E00604F0 ACA60004 */  sw        $a2, 0x4($a1)
/* 363654 E00604F4 ACA20008 */  sw        $v0, 0x8($a1)
/* 363658 E00604F8 92020027 */  lbu       $v0, 0x27($s0)
/* 36365C E00604FC 34E71400 */  ori       $a3, $a3, (0x14641400 & 0xFFFF)
/* 363660 E0060500 00471025 */  or        $v0, $v0, $a3
/* 363664 E0060504 ACA2000C */  sw        $v0, 0xC($a1)
/* 363668 E0060508 8E050004 */  lw        $a1, 0x4($s0)
/* 36366C E006050C 8E060008 */  lw        $a2, 0x8($s0)
/* 363670 E0060510 8E07000C */  lw        $a3, 0xC($s0)
/* 363674 E0060514 0C080108 */  jal       shim_guTranslateF
/* 363678 E0060518 27A40018 */   addiu    $a0, $sp, 0x18
/* 36367C E006051C 27B10058 */  addiu     $s1, $sp, 0x58
/* 363680 E0060520 4480A000 */  mtc1      $zero, $f20
/* 363684 E0060524 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 363688 E0060528 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 36368C E006052C 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 363690 E0060530 4481B000 */  mtc1      $at, $f22
/* 363694 E0060534 00031080 */  sll       $v0, $v1, 2
/* 363698 E0060538 00431021 */  addu      $v0, $v0, $v1
/* 36369C E006053C 00021080 */  sll       $v0, $v0, 2
/* 3636A0 E0060540 00431023 */  subu      $v0, $v0, $v1
/* 3636A4 E0060544 000218C0 */  sll       $v1, $v0, 3
/* 3636A8 E0060548 00431021 */  addu      $v0, $v0, $v1
/* 3636AC E006054C 000210C0 */  sll       $v0, $v0, 3
/* 3636B0 E0060550 4406A000 */  mfc1      $a2, $f20
/* 3636B4 E0060554 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 3636B8 E0060558 00220821 */  addu      $at, $at, $v0
/* 3636BC E006055C C4201DEC */  lwc1      $f0, %lo(gCameras + 0x6C)($at)
/* 3636C0 E0060560 4407B000 */  mfc1      $a3, $f22
/* 3636C4 E0060564 46000007 */  neg.s     $f0, $f0
/* 3636C8 E0060568 44050000 */  mfc1      $a1, $f0
/* 3636CC E006056C 0220202D */  daddu     $a0, $s1, $zero
/* 3636D0 E0060570 0C080104 */  jal       shim_guRotateF
/* 3636D4 E0060574 E7B40010 */   swc1     $f20, 0x10($sp)
/* 3636D8 E0060578 0220202D */  daddu     $a0, $s1, $zero
/* 3636DC E006057C 27A50018 */  addiu     $a1, $sp, 0x18
/* 3636E0 E0060580 0C080114 */  jal       shim_guMtxCatF
/* 3636E4 E0060584 27A60098 */   addiu    $a2, $sp, 0x98
/* 3636E8 E0060588 8FA80110 */  lw        $t0, 0x110($sp)
/* 3636EC E006058C 24130001 */  addiu     $s3, $zero, 0x1
/* 3636F0 E0060590 8D020008 */  lw        $v0, 0x8($t0)
/* 3636F4 E0060594 0262102A */  slt       $v0, $s3, $v0
/* 3636F8 E0060598 10400056 */  beqz      $v0, .LE00606F4
/* 3636FC E006059C 26100030 */   addiu    $s0, $s0, 0x30
/* 363700 E00605A0 0220902D */  daddu     $s2, $s1, $zero
/* 363704 E00605A4 3C1E800A */  lui       $fp, %hi(gDisplayContext)
/* 363708 E00605A8 27DEA674 */  addiu     $fp, $fp, %lo(gDisplayContext)
/* 36370C E00605AC 3C178007 */  lui       $s7, %hi(gMatrixListPos)
/* 363710 E00605B0 26F741F0 */  addiu     $s7, $s7, %lo(gMatrixListPos)
/* 363714 E00605B4 3C160001 */  lui       $s6, (0x11630 >> 16)
/* 363718 E00605B8 36D61630 */  ori       $s6, $s6, (0x11630 & 0xFFFF)
/* 36371C E00605BC 26110020 */  addiu     $s1, $s0, 0x20
.LE00605C0:
/* 363720 E00605C0 32700001 */  andi      $s0, $s3, 0x1
/* 363724 E00605C4 00101080 */  sll       $v0, $s0, 2
/* 363728 E00605C8 3C08E006 */  lui       $t0, %hi(D_E0060730)
/* 36372C E00605CC 25080730 */  addiu     $t0, $t0, %lo(D_E0060730)
/* 363730 E00605D0 00481021 */  addu      $v0, $v0, $t0
/* 363734 E00605D4 8E25FFE4 */  lw        $a1, -0x1C($s1)
/* 363738 E00605D8 8E26FFE8 */  lw        $a2, -0x18($s1)
/* 36373C E00605DC 8E27FFEC */  lw        $a3, -0x14($s1)
/* 363740 E00605E0 8C550000 */  lw        $s5, 0x0($v0)
/* 363744 E00605E4 0C080108 */  jal       shim_guTranslateF
/* 363748 E00605E8 0240202D */   daddu    $a0, $s2, $zero
/* 36374C E00605EC 0240202D */  daddu     $a0, $s2, $zero
/* 363750 E00605F0 27A50098 */  addiu     $a1, $sp, 0x98
/* 363754 E00605F4 0C080114 */  jal       shim_guMtxCatF
/* 363758 E00605F8 27A60018 */   addiu    $a2, $sp, 0x18
/* 36375C E00605FC 56000016 */  bnel      $s0, $zero, .LE0060658
/* 363760 E0060600 27A40018 */   addiu    $a0, $sp, 0x18
/* 363764 E0060604 E7B60010 */  swc1      $f22, 0x10($sp)
/* 363768 E0060608 8E25FFF8 */  lw        $a1, -0x8($s1)
/* 36376C E006060C 4406A000 */  mfc1      $a2, $f20
/* 363770 E0060610 4407A000 */  mfc1      $a3, $f20
/* 363774 E0060614 0C080104 */  jal       shim_guRotateF
/* 363778 E0060618 0240202D */   daddu    $a0, $s2, $zero
/* 36377C E006061C 0240202D */  daddu     $a0, $s2, $zero
/* 363780 E0060620 27A50018 */  addiu     $a1, $sp, 0x18
/* 363784 E0060624 0C080114 */  jal       shim_guMtxCatF
/* 363788 E0060628 00A0302D */   daddu    $a2, $a1, $zero
/* 36378C E006062C E7B40010 */  swc1      $f20, 0x10($sp)
/* 363790 E0060630 8E250000 */  lw        $a1, 0x0($s1)
/* 363794 E0060634 4406A000 */  mfc1      $a2, $f20
/* 363798 E0060638 4407B000 */  mfc1      $a3, $f22
/* 36379C E006063C 0C080104 */  jal       shim_guRotateF
/* 3637A0 E0060640 0240202D */   daddu    $a0, $s2, $zero
/* 3637A4 E0060644 0240202D */  daddu     $a0, $s2, $zero
/* 3637A8 E0060648 27A50018 */  addiu     $a1, $sp, 0x18
/* 3637AC E006064C 0C080114 */  jal       shim_guMtxCatF
/* 3637B0 E0060650 00A0302D */   daddu    $a2, $a1, $zero
/* 3637B4 E0060654 27A40018 */  addiu     $a0, $sp, 0x18
.LE0060658:
/* 3637B8 E0060658 26730001 */  addiu     $s3, $s3, 0x1
/* 3637BC E006065C 96E50000 */  lhu       $a1, 0x0($s7)
/* 3637C0 E0060660 8FC20000 */  lw        $v0, 0x0($fp)
/* 3637C4 E0060664 00052980 */  sll       $a1, $a1, 6
/* 3637C8 E0060668 00B62821 */  addu      $a1, $a1, $s6
/* 3637CC E006066C 0C080118 */  jal       shim_guMtxF2L
/* 3637D0 E0060670 00452821 */   addu     $a1, $v0, $a1
/* 3637D4 E0060674 3C06D838 */  lui       $a2, (0xD8380002 >> 16)
/* 3637D8 E0060678 8E840000 */  lw        $a0, 0x0($s4)
/* 3637DC E006067C 34C60002 */  ori       $a2, $a2, (0xD8380002 & 0xFFFF)
/* 3637E0 E0060680 0080282D */  daddu     $a1, $a0, $zero
/* 3637E4 E0060684 24840008 */  addiu     $a0, $a0, 0x8
/* 3637E8 E0060688 AE840000 */  sw        $a0, 0x0($s4)
/* 3637EC E006068C 96E20000 */  lhu       $v0, 0x0($s7)
/* 3637F0 E0060690 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 3637F4 E0060694 ACA30000 */  sw        $v1, 0x0($a1)
/* 3637F8 E0060698 24430001 */  addiu     $v1, $v0, 0x1
/* 3637FC E006069C 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 363800 E00606A0 00021180 */  sll       $v0, $v0, 6
/* 363804 E00606A4 A6E30000 */  sh        $v1, 0x0($s7)
/* 363808 E00606A8 8FC30000 */  lw        $v1, 0x0($fp)
/* 36380C E00606AC 00561021 */  addu      $v0, $v0, $s6
/* 363810 E00606B0 00621821 */  addu      $v1, $v1, $v0
/* 363814 E00606B4 24820008 */  addiu     $v0, $a0, 0x8
/* 363818 E00606B8 ACA30004 */  sw        $v1, 0x4($a1)
/* 36381C E00606BC AE820000 */  sw        $v0, 0x0($s4)
/* 363820 E00606C0 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 363824 E00606C4 AC820000 */  sw        $v0, 0x0($a0)
/* 363828 E00606C8 24020040 */  addiu     $v0, $zero, 0x40
/* 36382C E00606CC AC950004 */  sw        $s5, 0x4($a0)
/* 363830 E00606D0 AC860008 */  sw        $a2, 0x8($a0)
/* 363834 E00606D4 AC82000C */  sw        $v0, 0xC($a0)
/* 363838 E00606D8 8FA80110 */  lw        $t0, 0x110($sp)
/* 36383C E00606DC 26310030 */  addiu     $s1, $s1, 0x30
/* 363840 E00606E0 8D020008 */  lw        $v0, 0x8($t0)
/* 363844 E00606E4 24840010 */  addiu     $a0, $a0, 0x10
/* 363848 E00606E8 0262102A */  slt       $v0, $s3, $v0
/* 36384C E00606EC 1440FFB4 */  bnez      $v0, .LE00605C0
/* 363850 E00606F0 AE840000 */   sw       $a0, 0x0($s4)
.LE00606F4:
/* 363854 E00606F4 8FBF00FC */  lw        $ra, 0xFC($sp)
/* 363858 E00606F8 8FBE00F8 */  lw        $fp, 0xF8($sp)
/* 36385C E00606FC 8FB700F4 */  lw        $s7, 0xF4($sp)
/* 363860 E0060700 8FB600F0 */  lw        $s6, 0xF0($sp)
/* 363864 E0060704 8FB500EC */  lw        $s5, 0xEC($sp)
/* 363868 E0060708 8FB400E8 */  lw        $s4, 0xE8($sp)
/* 36386C E006070C 8FB300E4 */  lw        $s3, 0xE4($sp)
/* 363870 E0060710 8FB200E0 */  lw        $s2, 0xE0($sp)
/* 363874 E0060714 8FB100DC */  lw        $s1, 0xDC($sp)
/* 363878 E0060718 8FB000D8 */  lw        $s0, 0xD8($sp)
/* 36387C E006071C D7B60108 */  ldc1      $f22, 0x108($sp)
/* 363880 E0060720 D7B40100 */  ldc1      $f20, 0x100($sp)
/* 363884 E0060724 03E00008 */  jr        $ra
/* 363888 E0060728 27BD0110 */   addiu    $sp, $sp, 0x110
/* 36388C E006072C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void big_snowflakes_appendGfx(void* effect) {
    BigSnowflakesFXData* data = ((EffectInstance*)effect)->data.bigSnowflakes;
    Matrix4f sp18;
    Matrix4f sp58;
    Matrix4f sp98;
    Gfx* dlist = D_E0060738[0];
    s32 i;

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

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

    data++;
    for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, data++) {
        Gfx* dlist2 = D_E0060730[i & 1]; // should be able to be i % 2 (ARRAY_COUNT(D_E0060730))

        shim_guTranslateF(sp58, data->unk_04, data->unk_08, data->unk_0C);
        shim_guMtxCatF(sp58, sp98, sp18);

        if (!(i & 1)) {
            shim_guRotateF(sp58, data->unk_18, 0.0f, 0.0f, 1.0f);
            shim_guMtxCatF(sp58, sp18, sp18);
            shim_guRotateF(sp58, data->unk_20, 0.0f, 1.0f, 0.0f);
            shim_guMtxCatF(sp58, sp18, sp18);
        }
        shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

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


### RAW ASSEMBLY INSTRUCTIONS:

glabel npc_imgfx_update
/* 187BC 8003D3BC 27BDFFC0 */  addiu     $sp, $sp, -0x40
/* 187C0 8003D3C0 AFB10024 */  sw        $s1, 0x24($sp)
/* 187C4 8003D3C4 0080882D */  daddu     $s1, $a0, $zero
/* 187C8 8003D3C8 0000282D */  daddu     $a1, $zero, $zero
/* 187CC 8003D3CC AFBF003C */  sw        $ra, 0x3C($sp)
/* 187D0 8003D3D0 AFB60038 */  sw        $s6, 0x38($sp)
/* 187D4 8003D3D4 AFB50034 */  sw        $s5, 0x34($sp)
/* 187D8 8003D3D8 AFB40030 */  sw        $s4, 0x30($sp)
/* 187DC 8003D3DC AFB3002C */  sw        $s3, 0x2C($sp)
/* 187E0 8003D3E0 AFB20028 */  sw        $s2, 0x28($sp)
/* 187E4 8003D3E4 AFB00020 */  sw        $s0, 0x20($sp)
/* 187E8 8003D3E8 86340098 */  lh        $s4, 0x98($s1)
/* 187EC 8003D3EC 8630009A */  lh        $s0, 0x9A($s1)
/* 187F0 8003D3F0 8635009C */  lh        $s5, 0x9C($s1)
/* 187F4 8003D3F4 8632009E */  lh        $s2, 0x9E($s1)
/* 187F8 8003D3F8 863600A0 */  lh        $s6, 0xA0($s1)
/* 187FC 8003D3FC 963300A2 */  lhu       $s3, 0xA2($s1)
/* 18800 8003D400 00A0302D */  daddu     $a2, $a1, $zero
/* 18804 8003D404 AFA00010 */  sw        $zero, 0x10($sp)
/* 18808 8003D408 AFA00014 */  sw        $zero, 0x14($sp)
/* 1880C 8003D40C AFA00018 */  sw        $zero, 0x18($sp)
/* 18810 8003D410 8E240024 */  lw        $a0, 0x24($s1)
/* 18814 8003D414 0C0B7A25 */  jal       set_npc_imgfx_all
/* 18818 8003D418 00A0382D */   daddu    $a3, $a1, $zero
/* 1881C 8003D41C 2E820011 */  sltiu     $v0, $s4, 0x11
/* 18820 8003D420 10400076 */  beqz      $v0, .L8003D5FC
/* 18824 8003D424 00141080 */   sll      $v0, $s4, 2
/* 18828 8003D428 3C01800A */  lui       $at, %hi(jtbl_80098548)
/* 1882C 8003D42C 00220821 */  addu      $at, $at, $v0
/* 18830 8003D430 8C228548 */  lw        $v0, %lo(jtbl_80098548)($at)
/* 18834 8003D434 00400008 */  jr        $v0
/* 18838 8003D438 00000000 */   nop
glabel .L8003D43C
/* 1883C 8003D43C 0000282D */  daddu     $a1, $zero, $zero
/* 18840 8003D440 00A0302D */  daddu     $a2, $a1, $zero
/* 18844 8003D444 2402000D */  addiu     $v0, $zero, 0xD
/* 18848 8003D448 A22200AA */  sb        $v0, 0xAA($s1)
/* 1884C 8003D44C AFA00010 */  sw        $zero, 0x10($sp)
/* 18850 8003D450 AFA00014 */  sw        $zero, 0x14($sp)
/* 18854 8003D454 AFB30018 */  sw        $s3, 0x18($sp)
/* 18858 8003D458 8E240024 */  lw        $a0, 0x24($s1)
/* 1885C 8003D45C 0800F57D */  j         .L8003D5F4
/* 18860 8003D460 00A0382D */   daddu    $a3, $a1, $zero
glabel .L8003D464
/* 18864 8003D464 2402000D */  addiu     $v0, $zero, 0xD
/* 18868 8003D468 A22200AA */  sb        $v0, 0xAA($s1)
glabel .L8003D46C
/* 1886C 8003D46C 0280282D */  daddu     $a1, $s4, $zero
/* 18870 8003D470 0000302D */  daddu     $a2, $zero, $zero
/* 18874 8003D474 AFA00010 */  sw        $zero, 0x10($sp)
/* 18878 8003D478 AFA00014 */  sw        $zero, 0x14($sp)
/* 1887C 8003D47C AFB30018 */  sw        $s3, 0x18($sp)
/* 18880 8003D480 8E240024 */  lw        $a0, 0x24($s1)
/* 18884 8003D484 0800F57D */  j         .L8003D5F4
/* 18888 8003D488 00C0382D */   daddu    $a3, $a2, $zero
glabel .L8003D48C
/* 1888C 8003D48C 24050004 */  addiu     $a1, $zero, 0x4
/* 18890 8003D490 0200302D */  daddu     $a2, $s0, $zero
/* 18894 8003D494 2402000D */  addiu     $v0, $zero, 0xD
/* 18898 8003D498 A22200AA */  sb        $v0, 0xAA($s1)
/* 1889C 8003D49C AFB20010 */  sw        $s2, 0x10($sp)
/* 188A0 8003D4A0 0800F57A */  j         .L8003D5E8
/* 188A4 8003D4A4 AFA00014 */   sw       $zero, 0x14($sp)
glabel .L8003D4A8
/* 188A8 8003D4A8 24050006 */  addiu     $a1, $zero, 0x6
/* 188AC 8003D4AC 0200302D */  daddu     $a2, $s0, $zero
/* 188B0 8003D4B0 2402000D */  addiu     $v0, $zero, 0xD
/* 188B4 8003D4B4 A22200AA */  sb        $v0, 0xAA($s1)
/* 188B8 8003D4B8 240200FF */  addiu     $v0, $zero, 0xFF
/* 188BC 8003D4BC AFB20010 */  sw        $s2, 0x10($sp)
/* 188C0 8003D4C0 0800F57A */  j         .L8003D5E8
/* 188C4 8003D4C4 AFA20014 */   sw       $v0, 0x14($sp)
glabel .L8003D4C8
/* 188C8 8003D4C8 24050007 */  addiu     $a1, $zero, 0x7
/* 188CC 8003D4CC 240600FF */  addiu     $a2, $zero, 0xFF
/* 188D0 8003D4D0 24020016 */  addiu     $v0, $zero, 0x16
/* 188D4 8003D4D4 A22200AA */  sb        $v0, 0xAA($s1)
/* 188D8 8003D4D8 00C0102D */  daddu     $v0, $a2, $zero
/* 188DC 8003D4DC AFA20010 */  sw        $v0, 0x10($sp)
/* 188E0 8003D4E0 AFB00014 */  sw        $s0, 0x14($sp)
/* 188E4 8003D4E4 AFB30018 */  sw        $s3, 0x18($sp)
/* 188E8 8003D4E8 8E240024 */  lw        $a0, 0x24($s1)
/* 188EC 8003D4EC 0800F57D */  j         .L8003D5F4
/* 188F0 8003D4F0 00C0382D */   daddu    $a3, $a2, $zero
glabel .L8003D4F4
/* 188F4 8003D4F4 24050008 */  addiu     $a1, $zero, 0x8
/* 188F8 8003D4F8 0200302D */  daddu     $a2, $s0, $zero
/* 188FC 8003D4FC 24020016 */  addiu     $v0, $zero, 0x16
/* 18900 8003D500 A22200AA */  sb        $v0, 0xAA($s1)
/* 18904 8003D504 AFB20010 */  sw        $s2, 0x10($sp)
/* 18908 8003D508 0800F57A */  j         .L8003D5E8
/* 1890C 8003D50C AFB60014 */   sw       $s6, 0x14($sp)
glabel .L8003D510
/* 18910 8003D510 24050009 */  addiu     $a1, $zero, 0x9
/* 18914 8003D514 0200302D */  daddu     $a2, $s0, $zero
/* 18918 8003D518 2402000D */  addiu     $v0, $zero, 0xD
/* 1891C 8003D51C A22200AA */  sb        $v0, 0xAA($s1)
/* 18920 8003D520 240200FF */  addiu     $v0, $zero, 0xFF
/* 18924 8003D524 AFB20010 */  sw        $s2, 0x10($sp)
/* 18928 8003D528 0800F57A */  j         .L8003D5E8
/* 1892C 8003D52C AFA20014 */   sw       $v0, 0x14($sp)
glabel .L8003D530
/* 18930 8003D530 2405000A */  addiu     $a1, $zero, 0xA
/* 18934 8003D534 0200302D */  daddu     $a2, $s0, $zero
/* 18938 8003D538 24020016 */  addiu     $v0, $zero, 0x16
/* 1893C 8003D53C A22200AA */  sb        $v0, 0xAA($s1)
/* 18940 8003D540 AFB20010 */  sw        $s2, 0x10($sp)
/* 18944 8003D544 0800F57A */  j         .L8003D5E8
/* 18948 8003D548 AFB60014 */   sw       $s6, 0x14($sp)
glabel .L8003D54C
/* 1894C 8003D54C 24050005 */  addiu     $a1, $zero, 0x5
/* 18950 8003D550 0200302D */  daddu     $a2, $s0, $zero
/* 18954 8003D554 2402000D */  addiu     $v0, $zero, 0xD
/* 18958 8003D558 A22200AA */  sb        $v0, 0xAA($s1)
/* 1895C 8003D55C AFB20010 */  sw        $s2, 0x10($sp)
/* 18960 8003D560 0800F57A */  j         .L8003D5E8
/* 18964 8003D564 AFA00014 */   sw       $zero, 0x14($sp)
glabel .L8003D568
/* 18968 8003D568 2405000D */  addiu     $a1, $zero, 0xD
/* 1896C 8003D56C 0200302D */  daddu     $a2, $s0, $zero
/* 18970 8003D570 24020016 */  addiu     $v0, $zero, 0x16
/* 18974 8003D574 A22200AA */  sb        $v0, 0xAA($s1)
/* 18978 8003D578 AFB20010 */  sw        $s2, 0x10($sp)
/* 1897C 8003D57C 0800F57A */  j         .L8003D5E8
/* 18980 8003D580 AFB60014 */   sw       $s6, 0x14($sp)
glabel .L8003D584
/* 18984 8003D584 2405000E */  addiu     $a1, $zero, 0xE
/* 18988 8003D588 0200302D */  daddu     $a2, $s0, $zero
/* 1898C 8003D58C 2402000D */  addiu     $v0, $zero, 0xD
/* 18990 8003D590 A22200AA */  sb        $v0, 0xAA($s1)
/* 18994 8003D594 240200FF */  addiu     $v0, $zero, 0xFF
/* 18998 8003D598 AFB20010 */  sw        $s2, 0x10($sp)
/* 1899C 8003D59C 0800F57A */  j         .L8003D5E8
/* 189A0 8003D5A0 AFA20014 */   sw       $v0, 0x14($sp)
glabel .L8003D5A4
/* 189A4 8003D5A4 2405000F */  addiu     $a1, $zero, 0xF
/* 189A8 8003D5A8 0200302D */  daddu     $a2, $s0, $zero
/* 189AC 8003D5AC 2402000D */  addiu     $v0, $zero, 0xD
/* 189B0 8003D5B0 A22200AA */  sb        $v0, 0xAA($s1)
/* 189B4 8003D5B4 240200FF */  addiu     $v0, $zero, 0xFF
/* 189B8 8003D5B8 AFA00010 */  sw        $zero, 0x10($sp)
/* 189BC 8003D5BC AFA20014 */  sw        $v0, 0x14($sp)
/* 189C0 8003D5C0 AFB30018 */  sw        $s3, 0x18($sp)
/* 189C4 8003D5C4 8E240024 */  lw        $a0, 0x24($s1)
/* 189C8 8003D5C8 0800F57D */  j         .L8003D5F4
/* 189CC 8003D5CC 0040382D */   daddu    $a3, $v0, $zero
glabel .L8003D5D0
/* 189D0 8003D5D0 2405000F */  addiu     $a1, $zero, 0xF
/* 189D4 8003D5D4 0200302D */  daddu     $a2, $s0, $zero
/* 189D8 8003D5D8 24020016 */  addiu     $v0, $zero, 0x16
/* 189DC 8003D5DC A22200AA */  sb        $v0, 0xAA($s1)
/* 189E0 8003D5E0 AFA00010 */  sw        $zero, 0x10($sp)
/* 189E4 8003D5E4 AFB50014 */  sw        $s5, 0x14($sp)
.L8003D5E8:
/* 189E8 8003D5E8 AFB30018 */  sw        $s3, 0x18($sp)
/* 189EC 8003D5EC 8E240024 */  lw        $a0, 0x24($s1)
/* 189F0 8003D5F0 02A0382D */  daddu     $a3, $s5, $zero
.L8003D5F4:
/* 189F4 8003D5F4 0C0B7A25 */  jal       set_npc_imgfx_all
/* 189F8 8003D5F8 00000000 */   nop
glabel .L8003D5FC
/* 189FC 8003D5FC 8FBF003C */  lw        $ra, 0x3C($sp)
/* 18A00 8003D600 8FB60038 */  lw        $s6, 0x38($sp)
/* 18A04 8003D604 8FB50034 */  lw        $s5, 0x34($sp)
/* 18A08 8003D608 8FB40030 */  lw        $s4, 0x30($sp)
/* 18A0C 8003D60C 8FB3002C */  lw        $s3, 0x2C($sp)
/* 18A10 8003D610 8FB20028 */  lw        $s2, 0x28($sp)
/* 18A14 8003D614 8FB10024 */  lw        $s1, 0x24($sp)
/* 18A18 8003D618 8FB00020 */  lw        $s0, 0x20($sp)
/* 18A1C 8003D61C 03E00008 */  jr        $ra
/* 18A20 8003D620 27BD0040 */   addiu    $sp, $sp, 0x40

### DECOMPILED C INSTRUCTIONS:

void npc_imgfx_update(Npc* npc) {
    s32 imgfxType = npc->imgfxType;
    s32 imgfxArg1 = npc->imgfxArg1;
    s32 imgfxArg2 = npc->imgfxArg2;
    s32 imgfxArg3 = npc->imgfxArg3;
    s32 imgfxArg4 = npc->imgfxArg4;
    s32 imgfxFlags = npc->imgfxFlags;

    set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_CLEAR, 0, 0, 0, 0, 0);

    switch (imgfxType) {
        case IMGFX_CLEAR:
            npc->renderMode = RENDER_MODE_ALPHATEST;
            set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_CLEAR, 0, 0, 0, 0, imgfxFlags);
            break;
        case IMGFX_UNK_2:
        case IMGFX_RESET:
            npc->renderMode = RENDER_MODE_ALPHATEST;
            // fallthrough
        case IMGFX_UNK_1:
            set_npc_imgfx_all(npc->spriteInstanceID, imgfxType, 0, 0, 0, 0, imgfxFlags);
            break;
        case IMGFX_SET_WAVY:
            npc->renderMode = RENDER_MODE_ALPHATEST;
            set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_SET_WAVY, imgfxArg1, imgfxArg2, imgfxArg3, 0, imgfxFlags);
            break;
        case IMGFX_SET_COLOR:
            npc->renderMode = RENDER_MODE_ALPHATEST;
            set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_SET_COLOR, imgfxArg1, imgfxArg2, imgfxArg3, 255, imgfxFlags);
            break;
        case IMGFX_SET_ALPHA:
            npc->renderMode = RENDER_MODE_SURFACE_XLU_LAYER2;
            set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_SET_ALPHA, 255, 255, 255, imgfxArg1, imgfxFlags);
            break;
        case IMGFX_SET_TINT:
            npc->renderMode = RENDER_MODE_SURFACE_XLU_LAYER2;
            set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_SET_TINT, imgfxArg1, imgfxArg2, imgfxArg3, imgfxArg4, imgfxFlags);
            break;
        case IMGFX_SET_WHITE_FADE:
            npc->renderMode = RENDER_MODE_ALPHATEST;
            set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_SET_WHITE_FADE, imgfxArg1, imgfxArg2, imgfxArg3, 255, imgfxFlags);
            break;
        case IMGFX_SET_CREDITS_FADE:
            npc->renderMode = RENDER_MODE_SURFACE_XLU_LAYER2;
            set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_SET_CREDITS_FADE, imgfxArg1, imgfxArg2, imgfxArg3, imgfxArg4, imgfxFlags);
            break;
        case IMGFX_SET_ANIM:
            npc->renderMode = RENDER_MODE_ALPHATEST;
            set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_SET_ANIM, imgfxArg1, imgfxArg2, imgfxArg3, 0, imgfxFlags);
            break;
        case IMGFX_HOLOGRAM:
            npc->renderMode = RENDER_MODE_SURFACE_XLU_LAYER2;
            set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_HOLOGRAM, imgfxArg1, imgfxArg2, imgfxArg3, imgfxArg4, imgfxFlags);
            break;
        case IMGFX_FILL_COLOR:
            npc->renderMode = RENDER_MODE_ALPHATEST;
            set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_FILL_COLOR, imgfxArg1, imgfxArg2, imgfxArg3, 255, imgfxFlags);
            break;
        case IMGFX_OVERLAY:
            npc->renderMode = RENDER_MODE_ALPHATEST;
            set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_OVERLAY, imgfxArg1, 255, 0, 255, imgfxFlags);
            break;
        case IMGFX_OVERLAY_XLU:
            npc->renderMode = RENDER_MODE_SURFACE_XLU_LAYER2;
            set_npc_imgfx_all(npc->spriteInstanceID, IMGFX_OVERLAY, imgfxArg1, imgfxArg2, 0, imgfxArg2, imgfxFlags);
            break;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_E00D8334
/* 3D6AF4 E00D8334 27BDFFB8 */  addiu     $sp, $sp, -0x48
/* 3D6AF8 E00D8338 00A0C02D */  daddu     $t8, $a1, $zero
/* 3D6AFC E00D833C 3C03FFFF */  lui       $v1, (0xFFFF0000 >> 16)
/* 3D6B00 E00D8340 AFBF0030 */  sw        $ra, 0x30($sp)
/* 3D6B04 E00D8344 AFB7002C */  sw        $s7, 0x2C($sp)
/* 3D6B08 E00D8348 AFB60028 */  sw        $s6, 0x28($sp)
/* 3D6B0C E00D834C AFB50024 */  sw        $s5, 0x24($sp)
/* 3D6B10 E00D8350 AFB40020 */  sw        $s4, 0x20($sp)
/* 3D6B14 E00D8354 AFB3001C */  sw        $s3, 0x1C($sp)
/* 3D6B18 E00D8358 AFB20018 */  sw        $s2, 0x18($sp)
/* 3D6B1C E00D835C AFB10014 */  sw        $s1, 0x14($sp)
/* 3D6B20 E00D8360 AFB00010 */  sw        $s0, 0x10($sp)
/* 3D6B24 E00D8364 F7B60040 */  sdc1      $f22, 0x40($sp)
/* 3D6B28 E00D8368 F7B40038 */  sdc1      $f20, 0x38($sp)
/* 3D6B2C E00D836C AFA70054 */  sw        $a3, 0x54($sp)
/* 3D6B30 E00D8370 90820034 */  lbu       $v0, 0x34($a0)
/* 3D6B34 E00D8374 3C01437F */  lui       $at, (0x437F0000 >> 16)
/* 3D6B38 E00D8378 44811000 */  mtc1      $at, $f2
/* 3D6B3C E00D837C 44820000 */  mtc1      $v0, $f0
/* 3D6B40 E00D8380 00000000 */  nop
/* 3D6B44 E00D8384 46800020 */  cvt.s.w   $f0, $f0
/* 3D6B48 E00D8388 90820035 */  lbu       $v0, 0x35($a0)
/* 3D6B4C E00D838C 46020103 */  div.s     $f4, $f0, $f2
/* 3D6B50 E00D8390 44820000 */  mtc1      $v0, $f0
/* 3D6B54 E00D8394 00000000 */  nop
/* 3D6B58 E00D8398 46800020 */  cvt.s.w   $f0, $f0
/* 3D6B5C E00D839C 8C820034 */  lw        $v0, 0x34($a0)
/* 3D6B60 E00D83A0 00431024 */  and       $v0, $v0, $v1
/* 3D6B64 E00D83A4 10400095 */  beqz      $v0, .LE00D85FC
/* 3D6B68 E00D83A8 46020583 */   div.s    $f22, $f0, $f2
/* 3D6B6C E00D83AC 3C09E300 */  lui       $t1, (0xE3000A01 >> 16)
/* 3D6B70 E00D83B0 35290A01 */  ori       $t1, $t1, (0xE3000A01 & 0xFFFF)
/* 3D6B74 E00D83B4 3C0AE300 */  lui       $t2, (0xE3000C00 >> 16)
/* 3D6B78 E00D83B8 354A0C00 */  ori       $t2, $t2, (0xE3000C00 & 0xFFFF)
/* 3D6B7C E00D83BC 3C0BE300 */  lui       $t3, (0xE3000D01 >> 16)
/* 3D6B80 E00D83C0 356B0D01 */  ori       $t3, $t3, (0xE3000D01 & 0xFFFF)
/* 3D6B84 E00D83C4 3C0CE300 */  lui       $t4, (0xE3000F00 >> 16)
/* 3D6B88 E00D83C8 358C0F00 */  ori       $t4, $t4, (0xE3000F00 & 0xFFFF)
/* 3D6B8C E00D83CC 3C0DE300 */  lui       $t5, (0xE3001001 >> 16)
/* 3D6B90 E00D83D0 35AD1001 */  ori       $t5, $t5, (0xE3001001 & 0xFFFF)
/* 3D6B94 E00D83D4 3C0EE300 */  lui       $t6, (0xE3001201 >> 16)
/* 3D6B98 E00D83D8 35CE1201 */  ori       $t6, $t6, (0xE3001201 & 0xFFFF)
/* 3D6B9C E00D83DC 3C0FE300 */  lui       $t7, (0xE3001402 >> 16)
/* 3D6BA0 E00D83E0 35EF1402 */  ori       $t7, $t7, (0xE3001402 & 0xFFFF)
/* 3D6BA4 E00D83E4 3C15E200 */  lui       $s5, (0xE200001C >> 16)
/* 3D6BA8 E00D83E8 36B5001C */  ori       $s5, $s5, (0xE200001C & 0xFFFF)
/* 3D6BAC E00D83EC 3C100050 */  lui       $s0, (0x504340 >> 16)
/* 3D6BB0 E00D83F0 36104340 */  ori       $s0, $s0, (0x504340 & 0xFFFF)
/* 3D6BB4 E00D83F4 3C16FCFF */  lui       $s6, (0xFCFFFFFF >> 16)
/* 3D6BB8 E00D83F8 36D6FFFF */  ori       $s6, $s6, (0xFCFFFFFF & 0xFFFF)
/* 3D6BBC E00D83FC 3C11FFFD */  lui       $s1, (0xFFFDF6FB >> 16)
/* 3D6BC0 E00D8400 3631F6FB */  ori       $s1, $s1, (0xFFFDF6FB & 0xFFFF)
/* 3D6BC4 E00D8404 3C171830 */  lui       $s7, (0x183060FF >> 16)
/* 3D6BC8 E00D8408 36F760FF */  ori       $s7, $s7, (0x183060FF & 0xFFFF)
/* 3D6BCC E00D840C 27140004 */  addiu     $s4, $t8, 0x4
/* 3D6BD0 E00D8410 0280202D */  daddu     $a0, $s4, $zero
/* 3D6BD4 E00D8414 24D30004 */  addiu     $s3, $a2, 0x4
/* 3D6BD8 E00D8418 0260282D */  daddu     $a1, $s3, $zero
/* 3D6BDC E00D841C 3C08800A */  lui       $t0, %hi(gMainGfxPos)
/* 3D6BE0 E00D8420 2508A66C */  addiu     $t0, $t0, %lo(gMainGfxPos)
/* 3D6BE4 E00D8424 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 3D6BE8 E00D8428 44940000 */  mtc1      $s4, $f0
/* 3D6BEC E00D842C 00000000 */  nop
/* 3D6BF0 E00D8430 46800020 */  cvt.s.w   $f0, $f0
/* 3D6BF4 E00D8434 8FB20058 */  lw        $s2, 0x58($sp)
/* 3D6BF8 E00D8438 8D030000 */  lw        $v1, 0x0($t0)
/* 3D6BFC E00D843C 00D29021 */  addu      $s2, $a2, $s2
/* 3D6C00 E00D8440 2652FFFC */  addiu     $s2, $s2, -0x4
/* 3D6C04 E00D8444 0240382D */  daddu     $a3, $s2, $zero
/* 3D6C08 E00D8448 0060302D */  daddu     $a2, $v1, $zero
/* 3D6C0C E00D844C 24630008 */  addiu     $v1, $v1, 0x8
/* 3D6C10 E00D8450 AD030000 */  sw        $v1, 0x0($t0)
/* 3D6C14 E00D8454 ACC20000 */  sw        $v0, 0x0($a2)
/* 3D6C18 E00D8458 24620008 */  addiu     $v0, $v1, 0x8
/* 3D6C1C E00D845C ACC00004 */  sw        $zero, 0x4($a2)
/* 3D6C20 E00D8460 AD020000 */  sw        $v0, 0x0($t0)
/* 3D6C24 E00D8464 3C02D700 */  lui       $v0, (0xD7000000 >> 16)
/* 3D6C28 E00D8468 AC620000 */  sw        $v0, 0x0($v1)
/* 3D6C2C E00D846C 2402FFFF */  addiu     $v0, $zero, -0x1
/* 3D6C30 E00D8470 AC620004 */  sw        $v0, 0x4($v1)
/* 3D6C34 E00D8474 24620010 */  addiu     $v0, $v1, 0x10
/* 3D6C38 E00D8478 AD020000 */  sw        $v0, 0x0($t0)
/* 3D6C3C E00D847C 24620018 */  addiu     $v0, $v1, 0x18
/* 3D6C40 E00D8480 AC690008 */  sw        $t1, 0x8($v1)
/* 3D6C44 E00D8484 AC60000C */  sw        $zero, 0xC($v1)
/* 3D6C48 E00D8488 AD020000 */  sw        $v0, 0x0($t0)
/* 3D6C4C E00D848C 24620020 */  addiu     $v0, $v1, 0x20
/* 3D6C50 E00D8490 AC6A0010 */  sw        $t2, 0x10($v1)
/* 3D6C54 E00D8494 AC600014 */  sw        $zero, 0x14($v1)
/* 3D6C58 E00D8498 AD020000 */  sw        $v0, 0x0($t0)
/* 3D6C5C E00D849C 24620028 */  addiu     $v0, $v1, 0x28
/* 3D6C60 E00D84A0 AC6B0018 */  sw        $t3, 0x18($v1)
/* 3D6C64 E00D84A4 AC60001C */  sw        $zero, 0x1C($v1)
/* 3D6C68 E00D84A8 AD020000 */  sw        $v0, 0x0($t0)
/* 3D6C6C E00D84AC 24620030 */  addiu     $v0, $v1, 0x30
/* 3D6C70 E00D84B0 AC6C0020 */  sw        $t4, 0x20($v1)
/* 3D6C74 E00D84B4 AC600024 */  sw        $zero, 0x24($v1)
/* 3D6C78 E00D84B8 AD020000 */  sw        $v0, 0x0($t0)
/* 3D6C7C E00D84BC 24620038 */  addiu     $v0, $v1, 0x38
/* 3D6C80 E00D84C0 AC6D0028 */  sw        $t5, 0x28($v1)
/* 3D6C84 E00D84C4 AC60002C */  sw        $zero, 0x2C($v1)
/* 3D6C88 E00D84C8 AD020000 */  sw        $v0, 0x0($t0)
/* 3D6C8C E00D84CC 24023000 */  addiu     $v0, $zero, 0x3000
/* 3D6C90 E00D84D0 AC620034 */  sw        $v0, 0x34($v1)
/* 3D6C94 E00D84D4 24620040 */  addiu     $v0, $v1, 0x40
/* 3D6C98 E00D84D8 AC6E0030 */  sw        $t6, 0x30($v1)
/* 3D6C9C E00D84DC AD020000 */  sw        $v0, 0x0($t0)
/* 3D6CA0 E00D84E0 24020C00 */  addiu     $v0, $zero, 0xC00
/* 3D6CA4 E00D84E4 AC62003C */  sw        $v0, 0x3C($v1)
/* 3D6CA8 E00D84E8 24620048 */  addiu     $v0, $v1, 0x48
/* 3D6CAC E00D84EC AC6F0038 */  sw        $t7, 0x38($v1)
/* 3D6CB0 E00D84F0 AD020000 */  sw        $v0, 0x0($t0)
/* 3D6CB4 E00D84F4 24620050 */  addiu     $v0, $v1, 0x50
/* 3D6CB8 E00D84F8 AC750040 */  sw        $s5, 0x40($v1)
/* 3D6CBC E00D84FC AC700044 */  sw        $s0, 0x44($v1)
/* 3D6CC0 E00D8500 AD020000 */  sw        $v0, 0x0($t0)
/* 3D6CC4 E00D8504 AC760048 */  sw        $s6, 0x48($v1)
/* 3D6CC8 E00D8508 AC71004C */  sw        $s1, 0x4C($v1)
/* 3D6CCC E00D850C 8FB90054 */  lw        $t9, 0x54($sp)
/* 3D6CD0 E00D8510 02538023 */  subu      $s0, $s2, $s3
/* 3D6CD4 E00D8514 03198821 */  addu      $s1, $t8, $t9
/* 3D6CD8 E00D8518 2631FFFC */  addiu     $s1, $s1, -0x4
/* 3D6CDC E00D851C 02341023 */  subu      $v0, $s1, $s4
/* 3D6CE0 E00D8520 000237C2 */  srl       $a2, $v0, 31
/* 3D6CE4 E00D8524 00461021 */  addu      $v0, $v0, $a2
/* 3D6CE8 E00D8528 00021043 */  sra       $v0, $v0, 1
/* 3D6CEC E00D852C 4482A000 */  mtc1      $v0, $f20
/* 3D6CF0 E00D8530 00000000 */  nop
/* 3D6CF4 E00D8534 4680A520 */  cvt.s.w   $f20, $f20
/* 3D6CF8 E00D8538 24620058 */  addiu     $v0, $v1, 0x58
/* 3D6CFC E00D853C 4604A502 */  mul.s     $f20, $f20, $f4
/* 3D6D00 E00D8540 00000000 */  nop
/* 3D6D04 E00D8544 AD020000 */  sw        $v0, 0x0($t0)
/* 3D6D08 E00D8548 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3D6D0C E00D854C AC620050 */  sw        $v0, 0x50($v1)
/* 3D6D10 E00D8550 001017C2 */  srl       $v0, $s0, 31
/* 3D6D14 E00D8554 02028021 */  addu      $s0, $s0, $v0
/* 3D6D18 E00D8558 46140000 */  add.s     $f0, $f0, $f20
/* 3D6D1C E00D855C 00108043 */  sra       $s0, $s0, 1
/* 3D6D20 E00D8560 4600018D */  trunc.w.s $f6, $f0
/* 3D6D24 E00D8564 44063000 */  mfc1      $a2, $f6
/* 3D6D28 E00D8568 0C0360A2 */  jal       func_E00D8288
/* 3D6D2C E00D856C AC770054 */   sw       $s7, 0x54($v1)
/* 3D6D30 E00D8570 0260282D */  daddu     $a1, $s3, $zero
/* 3D6D34 E00D8574 44910000 */  mtc1      $s1, $f0
/* 3D6D38 E00D8578 00000000 */  nop
/* 3D6D3C E00D857C 46800020 */  cvt.s.w   $f0, $f0
/* 3D6D40 E00D8580 46140001 */  sub.s     $f0, $f0, $f20
/* 3D6D44 E00D8584 0220302D */  daddu     $a2, $s1, $zero
/* 3D6D48 E00D8588 4600018D */  trunc.w.s $f6, $f0
/* 3D6D4C E00D858C 44043000 */  mfc1      $a0, $f6
/* 3D6D50 E00D8590 0C0360A2 */  jal       func_E00D8288
/* 3D6D54 E00D8594 0240382D */   daddu    $a3, $s2, $zero
/* 3D6D58 E00D8598 4490A000 */  mtc1      $s0, $f20
/* 3D6D5C E00D859C 00000000 */  nop
/* 3D6D60 E00D85A0 4680A520 */  cvt.s.w   $f20, $f20
/* 3D6D64 E00D85A4 4616A502 */  mul.s     $f20, $f20, $f22
/* 3D6D68 E00D85A8 00000000 */  nop
/* 3D6D6C E00D85AC 0280202D */  daddu     $a0, $s4, $zero
/* 3D6D70 E00D85B0 44930000 */  mtc1      $s3, $f0
/* 3D6D74 E00D85B4 00000000 */  nop
/* 3D6D78 E00D85B8 46800020 */  cvt.s.w   $f0, $f0
/* 3D6D7C E00D85BC 46140000 */  add.s     $f0, $f0, $f20
/* 3D6D80 E00D85C0 0260282D */  daddu     $a1, $s3, $zero
/* 3D6D84 E00D85C4 4600018D */  trunc.w.s $f6, $f0
/* 3D6D88 E00D85C8 44073000 */  mfc1      $a3, $f6
/* 3D6D8C E00D85CC 0C0360A2 */  jal       func_E00D8288
/* 3D6D90 E00D85D0 0220302D */   daddu    $a2, $s1, $zero
/* 3D6D94 E00D85D4 0280202D */  daddu     $a0, $s4, $zero
/* 3D6D98 E00D85D8 44920000 */  mtc1      $s2, $f0
/* 3D6D9C E00D85DC 00000000 */  nop
/* 3D6DA0 E00D85E0 46800020 */  cvt.s.w   $f0, $f0
/* 3D6DA4 E00D85E4 46140001 */  sub.s     $f0, $f0, $f20
/* 3D6DA8 E00D85E8 0220302D */  daddu     $a2, $s1, $zero
/* 3D6DAC E00D85EC 4600018D */  trunc.w.s $f6, $f0
/* 3D6DB0 E00D85F0 44053000 */  mfc1      $a1, $f6
/* 3D6DB4 E00D85F4 0C0360A2 */  jal       func_E00D8288
/* 3D6DB8 E00D85F8 0240382D */   daddu    $a3, $s2, $zero
.LE00D85FC:
/* 3D6DBC E00D85FC 8FBF0030 */  lw        $ra, 0x30($sp)
/* 3D6DC0 E00D8600 8FB7002C */  lw        $s7, 0x2C($sp)
/* 3D6DC4 E00D8604 8FB60028 */  lw        $s6, 0x28($sp)
/* 3D6DC8 E00D8608 8FB50024 */  lw        $s5, 0x24($sp)
/* 3D6DCC E00D860C 8FB40020 */  lw        $s4, 0x20($sp)
/* 3D6DD0 E00D8610 8FB3001C */  lw        $s3, 0x1C($sp)
/* 3D6DD4 E00D8614 8FB20018 */  lw        $s2, 0x18($sp)
/* 3D6DD8 E00D8618 8FB10014 */  lw        $s1, 0x14($sp)
/* 3D6DDC E00D861C 8FB00010 */  lw        $s0, 0x10($sp)
/* 3D6DE0 E00D8620 D7B60040 */  ldc1      $f22, 0x40($sp)
/* 3D6DE4 E00D8624 D7B40038 */  ldc1      $f20, 0x38($sp)
/* 3D6DE8 E00D8628 03E00008 */  jr        $ra
/* 3D6DEC E00D862C 27BD0048 */   addiu    $sp, $sp, 0x48

### DECOMPILED C INSTRUCTIONS:

void func_E00D8334(TattleWindowFXData* data, s32 left, s32 top, s32 right, s32 bottom) {
    f32 t1 = data->unk_34 / 255.0f;
    f32 t2 = data->unk_35 / 255.0f;
    s32 xMid, yMid;
    s32 l, t, r, b;

    if (data->unk_34 > 0 || data->unk_35 > 0) {
        gDPPipeSync(gMainGfxPos++);
        gSPTexture(gMainGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF);
        gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
        gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
        gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP);
        gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE);
        gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
        gDPSetTextureFilter(gMainGfxPos++, G_TF_AVERAGE);
        gDPSetTextureConvert(gMainGfxPos++, G_TC_FILT);
        gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
        gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
        gDPSetPrimColor(gMainGfxPos++, 0, 0, 24, 48, 96, 255);
        l = left + 4;
        r = (left + right) - 4;
        t = top + 4;
        b = (top + bottom) - 4;
        xMid = (r - l) / 2;
        yMid = (b - t) / 2;
        func_E00D8288(l, t, l + (xMid * t1), b);
        func_E00D8288(r - (xMid * t1), t, r, b);
        func_E00D8288(l, t, r, t + (yMid * t2));
        func_E00D8288(l, b - (yMid * t2), r, b);
    }
}