### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_802559BC
/* 18429C 802559BC 27BDFFA8 */  addiu     $sp, $sp, -0x58
D_802559C0:
/* 1842A0 802559C0 AFB00028 */  sw        $s0, 0x28($sp)
/* 1842A4 802559C4 AFB20030 */  sw        $s2, 0x30($sp)
D_802559C8:
/* 1842A8 802559C8 00A0902D */  daddu     $s2, $a1, $zero
/* 1842AC 802559CC AFB5003C */  sw        $s5, 0x3C($sp)
jtbl_802559D0:
/* 1842B0 802559D0 3C15800B */  lui       $s5, %hi(gCameras + 0x558)
/* 1842B4 802559D4 26B522D8 */  addiu     $s5, $s5, %lo(gCameras + 0x558)
/* 1842B8 802559D8 AFBF0040 */  sw        $ra, 0x40($sp)
/* 1842BC 802559DC AFB40038 */  sw        $s4, 0x38($sp)
/* 1842C0 802559E0 AFB30034 */  sw        $s3, 0x34($sp)
/* 1842C4 802559E4 AFB1002C */  sw        $s1, 0x2C($sp)
/* 1842C8 802559E8 F7B60050 */  sdc1      $f22, 0x50($sp)
/* 1842CC 802559EC F7B40048 */  sdc1      $f20, 0x48($sp)
/* 1842D0 802559F0 1240014F */  beqz      $s2, .L80255F30
/* 1842D4 802559F4 0080802D */   daddu    $s0, $a0, $zero
/* 1842D8 802559F8 8E44042C */  lw        $a0, 0x42C($s2)
/* 1842DC 802559FC 0C044181 */  jal       get_shadow_by_index
/* 1842E0 80255A00 00000000 */   nop
/* 1842E4 80255A04 0040882D */  daddu     $s1, $v0, $zero
/* 1842E8 80255A08 8E220000 */  lw        $v0, 0x0($s1)
/* 1842EC 80255A0C 34420001 */  ori       $v0, $v0, 0x1
/* 1842F0 80255A10 AE220000 */  sw        $v0, 0x0($s1)
/* 1842F4 80255A14 8E430000 */  lw        $v1, 0x0($s2)
/* 1842F8 80255A18 30620001 */  andi      $v0, $v1, 0x1
/* 1842FC 80255A1C 14400144 */  bnez      $v0, .L80255F30
/* 184300 80255A20 3C021000 */   lui      $v0, (0x10000000 >> 16)
/* 184304 80255A24 00621024 */  and       $v0, $v1, $v0
/* 184308 80255A28 10400009 */  beqz      $v0, .L80255A50
/* 18430C 80255A2C 00000000 */   nop
/* 184310 80255A30 16000005 */  bnez      $s0, .L80255A48
/* 184314 80255A34 00000000 */   nop
/* 184318 80255A38 0C09564F */  jal       func_8025593C
/* 18431C 80255A3C 0240202D */   daddu    $a0, $s2, $zero
/* 184320 80255A40 08095694 */  j         .L80255A50
/* 184324 80255A44 00000000 */   nop
.L80255A48:
/* 184328 80255A48 0C09565F */  jal       func_8025597C
/* 18432C 80255A4C 0240202D */   daddu    $a0, $s2, $zero
.L80255A50:
/* 184330 80255A50 86420150 */  lh        $v0, 0x150($s2)
/* 184334 80255A54 C6420144 */  lwc1      $f2, 0x144($s2)
/* 184338 80255A58 8E430000 */  lw        $v1, 0x0($s2)
/* 18433C 80255A5C 44820000 */  mtc1      $v0, $f0
/* 184340 80255A60 00000000 */  nop
/* 184344 80255A64 46800020 */  cvt.s.w   $f0, $f0
/* 184348 80255A68 2402000D */  addiu     $v0, $zero, 0xD
/* 18434C 80255A6C 46001080 */  add.s     $f2, $f2, $f0
/* 184350 80255A70 30630800 */  andi      $v1, $v1, 0x800
/* 184354 80255A74 A6420434 */  sh        $v0, 0x434($s2)
/* 184358 80255A78 14600008 */  bnez      $v1, .L80255A9C
/* 18435C 80255A7C E7A20018 */   swc1     $f2, 0x18($sp)
/* 184360 80255A80 86420152 */  lh        $v0, 0x152($s2)
/* 184364 80255A84 C6400148 */  lwc1      $f0, 0x148($s2)
/* 184368 80255A88 44821000 */  mtc1      $v0, $f2
/* 18436C 80255A8C 00000000 */  nop
/* 184370 80255A90 468010A0 */  cvt.s.w   $f2, $f2
/* 184374 80255A94 080956AD */  j         .L80255AB4
/* 184378 80255A98 46020000 */   add.s    $f0, $f0, $f2
.L80255A9C:
/* 18437C 80255A9C 86420152 */  lh        $v0, 0x152($s2)
D_80255AA0:
/* 184380 80255AA0 C6400148 */  lwc1      $f0, 0x148($s2)
/* 184384 80255AA4 44821000 */  mtc1      $v0, $f2
/* 184388 80255AA8 00000000 */  nop
/* 18438C 80255AAC 468010A0 */  cvt.s.w   $f2, $f2
/* 184390 80255AB0 46020001 */  sub.s     $f0, $f0, $f2
.L80255AB4:
/* 184394 80255AB4 E7A0001C */  swc1      $f0, 0x1C($sp)
/* 184398 80255AB8 86420154 */  lh        $v0, 0x154($s2)
/* 18439C 80255ABC C642014C */  lwc1      $f2, 0x14C($s2)
/* 1843A0 80255AC0 44820000 */  mtc1      $v0, $f0
/* 1843A4 80255AC4 00000000 */  nop
/* 1843A8 80255AC8 46800020 */  cvt.s.w   $f0, $f0
/* 1843AC 80255ACC 46001080 */  add.s     $f2, $f2, $f0
/* 1843B0 80255AD0 E7A20020 */  swc1      $f2, 0x20($sp)
/* 1843B4 80255AD4 825401F3 */  lb        $s4, 0x1F3($s2)
/* 1843B8 80255AD8 8E5001F4 */  lw        $s0, 0x1F4($s2)
/* 1843BC 80255ADC 1A8000B0 */  blez      $s4, .L80255DA0
/* 1843C0 80255AE0 0000982D */   daddu    $s3, $zero, $zero
/* 1843C4 80255AE4 3C014028 */  lui       $at, (0x40280000 >> 16)
/* 1843C8 80255AE8 4481B800 */  mtc1      $at, $f23
/* 1843CC 80255AEC 4480B000 */  mtc1      $zero, $f22
.L80255AF0:
/* 1843D0 80255AF0 8E020000 */  lw        $v0, 0x0($s0)
/* 1843D4 80255AF4 30420001 */  andi      $v0, $v0, 0x1
/* 1843D8 80255AF8 144000A4 */  bnez      $v0, .L80255D8C
/* 1843DC 80255AFC 00000000 */   nop
/* 1843E0 80255B00 8E020094 */  lw        $v0, 0x94($s0)
/* 1843E4 80255B04 104000A1 */  beqz      $v0, .L80255D8C
/* 1843E8 80255B08 00000000 */   nop
/* 1843EC 80255B0C 8E040084 */  lw        $a0, 0x84($s0)
/* 1843F0 80255B10 04800007 */  bltz      $a0, .L80255B30
/* 1843F4 80255B14 00000000 */   nop
/* 1843F8 80255B18 8E050088 */  lw        $a1, 0x88($s0)
/* 1843FC 80255B1C 0C0B78AB */  jal       spr_update_sprite
/* 184400 80255B20 8E060090 */   lw       $a2, 0x90($s0)
/* 184404 80255B24 0C0B7972 */  jal       spr_get_notify_value
/* 184408 80255B28 8E040084 */   lw       $a0, 0x84($s0)
/* 18440C 80255B2C AE02008C */  sw        $v0, 0x8C($s0)
.L80255B30:
/* 184410 80255B30 8E020000 */  lw        $v0, 0x0($s0)
/* 184414 80255B34 3C030010 */  lui       $v1, (0x100000 >> 16)
/* 184418 80255B38 00431024 */  and       $v0, $v0, $v1
/* 18441C 80255B3C 14400031 */  bnez      $v0, .L80255C04
/* 184420 80255B40 00000000 */   nop
/* 184424 80255B44 86020014 */  lh        $v0, 0x14($s0)
/* 184428 80255B48 C7A00018 */  lwc1      $f0, 0x18($sp)
/* 18442C 80255B4C 44821000 */  mtc1      $v0, $f2
/* 184430 80255B50 00000000 */  nop
/* 184434 80255B54 468010A0 */  cvt.s.w   $f2, $f2
/* 184438 80255B58 8602001A */  lh        $v0, 0x1A($s0)
/* 18443C 80255B5C 46020000 */  add.s     $f0, $f0, $f2
/* 184440 80255B60 44821000 */  mtc1      $v0, $f2
/* 184444 80255B64 00000000 */  nop
/* 184448 80255B68 468010A0 */  cvt.s.w   $f2, $f2
/* 18444C 80255B6C 8E420000 */  lw        $v0, 0x0($s2)
mac_00_Quizmo_Worker:
/* 184450 80255B70 30420800 */  andi      $v0, $v0, 0x800
/* 184454 80255B74 1440000D */  bnez      $v0, .L80255BAC
/* 184458 80255B78 46020180 */   add.s    $f6, $f0, $f2
/* 18445C 80255B7C 86020016 */  lh        $v0, 0x16($s0)
/* 184460 80255B80 C7A2001C */  lwc1      $f2, 0x1C($sp)
/* 184464 80255B84 44820000 */  mtc1      $v0, $f0
mac_00_Quizmo_AnswerResult:
/* 184468 80255B88 00000000 */  nop
/* 18446C 80255B8C 46800020 */  cvt.s.w   $f0, $f0
mac_00_Quizmo_StageEffect:
/* 184470 80255B90 8602001C */  lh        $v0, 0x1C($s0)
mac_00_Quizmo_AudienceEffect:
/* 184474 80255B94 46001080 */  add.s     $f2, $f2, $f0
mac_00_Quizmo_VannaTEffect:
/* 184478 80255B98 44820000 */  mtc1      $v0, $f0
/* 18447C 80255B9C 00000000 */  nop
mac_00_D_80255BA0:
/* 184480 80255BA0 46800020 */  cvt.s.w   $f0, $f0
/* 184484 80255BA4 080956F6 */  j         .L80255BD8
/* 184488 80255BA8 46001100 */   add.s    $f4, $f2, $f0
.L80255BAC:
/* 18448C 80255BAC 86020016 */  lh        $v0, 0x16($s0)
/* 184490 80255BB0 C7A2001C */  lwc1      $f2, 0x1C($sp)
/* 184494 80255BB4 44820000 */  mtc1      $v0, $f0
/* 184498 80255BB8 00000000 */  nop
/* 18449C 80255BBC 46800020 */  cvt.s.w   $f0, $f0
/* 1844A0 80255BC0 8602001C */  lh        $v0, 0x1C($s0)
/* 1844A4 80255BC4 46001081 */  sub.s     $f2, $f2, $f0
/* 1844A8 80255BC8 44820000 */  mtc1      $v0, $f0
/* 1844AC 80255BCC 00000000 */  nop
/* 1844B0 80255BD0 46800020 */  cvt.s.w   $f0, $f0
/* 1844B4 80255BD4 46001101 */  sub.s     $f4, $f2, $f0
.L80255BD8:
/* 1844B8 80255BD8 C640018C */  lwc1      $f0, 0x18C($s2)
/* 1844BC 80255BDC 86020018 */  lh        $v0, 0x18($s0)
/* 1844C0 80255BE0 C7A20020 */  lwc1      $f2, 0x20($sp)
/* 1844C4 80255BE4 46000506 */  mov.s     $f20, $f0
/* 1844C8 80255BE8 44820000 */  mtc1      $v0, $f0
/* 1844CC 80255BEC 00000000 */  nop
/* 1844D0 80255BF0 46800020 */  cvt.s.w   $f0, $f0
/* 1844D4 80255BF4 8602001E */  lh        $v0, 0x1E($s0)
/* 1844D8 80255BF8 46001080 */  add.s     $f2, $f2, $f0
/* 1844DC 80255BFC 08095710 */  j         .L80255C40
/* 1844E0 80255C00 E6140064 */   swc1     $f20, 0x64($s0)
.L80255C04:
/* 1844E4 80255C04 C6140064 */  lwc1      $f20, 0x64($s0)
/* 1844E8 80255C08 8602001A */  lh        $v0, 0x1A($s0)
/* 1844EC 80255C0C C602002C */  lwc1      $f2, 0x2C($s0)
/* 1844F0 80255C10 44820000 */  mtc1      $v0, $f0
/* 1844F4 80255C14 00000000 */  nop
/* 1844F8 80255C18 46800020 */  cvt.s.w   $f0, $f0
/* 1844FC 80255C1C 46001180 */  add.s     $f6, $f2, $f0
/* 184500 80255C20 8602001C */  lh        $v0, 0x1C($s0)
/* 184504 80255C24 C6020030 */  lwc1      $f2, 0x30($s0)
/* 184508 80255C28 44820000 */  mtc1      $v0, $f0
/* 18450C 80255C2C 00000000 */  nop
/* 184510 80255C30 46800020 */  cvt.s.w   $f0, $f0
/* 184514 80255C34 46001100 */  add.s     $f4, $f2, $f0
/* 184518 80255C38 8602001E */  lh        $v0, 0x1E($s0)
/* 18451C 80255C3C C6020034 */  lwc1      $f2, 0x34($s0)
.L80255C40:
/* 184520 80255C40 44820000 */  mtc1      $v0, $f0
/* 184524 80255C44 00000000 */  nop
/* 184528 80255C48 46800020 */  cvt.s.w   $f0, $f0
/* 18452C 80255C4C 46001080 */  add.s     $f2, $f2, $f0
/* 184530 80255C50 8E020000 */  lw        $v0, 0x0($s0)
/* 184534 80255C54 E6060058 */  swc1      $f6, 0x58($s0)
/* 184538 80255C58 E604005C */  swc1      $f4, 0x5C($s0)
/* 18453C 80255C5C 30420004 */  andi      $v0, $v0, 0x4
/* 184540 80255C60 14400041 */  bnez      $v0, mac_00_D_80255D68
/* 184544 80255C64 E6020060 */   swc1     $f2, 0x60($s0)
/* 184548 80255C68 8E04009C */  lw        $a0, 0x9C($s0)
/* 18454C 80255C6C 0C044181 */  jal       get_shadow_by_index
/* 184550 80255C70 00000000 */   nop
/* 184554 80255C74 0040882D */  daddu     $s1, $v0, $zero
/* 184558 80255C78 8E220000 */  lw        $v0, 0x0($s1)
/* 18455C 80255C7C 2403FFFE */  addiu     $v1, $zero, -0x2
/* 184560 80255C80 00431024 */  and       $v0, $v0, $v1
/* 184564 80255C84 AE220000 */  sw        $v0, 0x0($s1)
/* 184568 80255C88 8E420000 */  lw        $v0, 0x0($s2)
/* 18456C 80255C8C C6000058 */  lwc1      $f0, 0x58($s0)
/* 184570 80255C90 30420800 */  andi      $v0, $v0, 0x800
/* 184574 80255C94 14400005 */  bnez      $v0, .L80255CAC
/* 184578 80255C98 E7A00018 */   swc1     $f0, 0x18($sp)
/* 18457C 80255C9C C600005C */  lwc1      $f0, 0x5C($s0)
/* 184580 80255CA0 46000021 */  cvt.d.s   $f0, $f0
/* 184584 80255CA4 0809572E */  j         .L80255CB8
/* 184588 80255CA8 46360000 */   add.d    $f0, $f0, $f22
.L80255CAC:
/* 18458C 80255CAC C600005C */  lwc1      $f0, 0x5C($s0)
/* 184590 80255CB0 46000021 */  cvt.d.s   $f0, $f0
/* 184594 80255CB4 46360001 */  sub.d     $f0, $f0, $f22
.L80255CB8:
/* 184598 80255CB8 46200020 */  cvt.s.d   $f0, $f0
/* 18459C 80255CBC E7A0001C */  swc1      $f0, 0x1C($sp)
/* 1845A0 80255CC0 0000202D */  daddu     $a0, $zero, $zero
/* 1845A4 80255CC4 27A50018 */  addiu     $a1, $sp, 0x18
/* 1845A8 80255CC8 27A6001C */  addiu     $a2, $sp, 0x1C
/* 1845AC 80255CCC 27A70020 */  addiu     $a3, $sp, 0x20
/* 1845B0 80255CD0 C6000060 */  lwc1      $f0, 0x60($s0)
/* 1845B4 80255CD4 3C0146FF */  lui       $at, (0x46FFFE00 >> 16)
/* 1845B8 80255CD8 3421FE00 */  ori       $at, $at, (0x46FFFE00 & 0xFFFF)
/* 1845BC 80255CDC 44811000 */  mtc1      $at, $f2
/* 1845C0 80255CE0 27A20024 */  addiu     $v0, $sp, 0x24
/* 1845C4 80255CE4 E7A00020 */  swc1      $f0, 0x20($sp)
/* 1845C8 80255CE8 E7A20024 */  swc1      $f2, 0x24($sp)
/* 1845CC 80255CEC 0C0372DF */  jal       npc_raycast_down_sides
/* 1845D0 80255CF0 AFA20010 */   sw       $v0, 0x10($sp)
/* 1845D4 80255CF4 C7A20024 */  lwc1      $f2, 0x24($sp)
/* 1845D8 80255CF8 3C014348 */  lui       $at, (0x43480000 >> 16)
/* 1845DC 80255CFC 44810000 */  mtc1      $at, $f0
/* 1845E0 80255D00 00000000 */  nop
/* 1845E4 80255D04 4602003C */  c.lt.s    $f0, $f2
/* 1845E8 80255D08 00000000 */  nop
/* 1845EC 80255D0C 45000004 */  bc1f      .L80255D20
/* 1845F0 80255D10 00000000 */   nop
/* 1845F4 80255D14 8E220000 */  lw        $v0, 0x0($s1)
/* 1845F8 80255D18 34420001 */  ori       $v0, $v0, 0x1
/* 1845FC 80255D1C AE220000 */  sw        $v0, 0x0($s1)
.L80255D20:
/* 184600 80255D20 C7A00018 */  lwc1      $f0, 0x18($sp)
/* 184604 80255D24 C7A2001C */  lwc1      $f2, 0x1C($sp)
/* 184608 80255D28 C7A40020 */  lwc1      $f4, 0x20($sp)
/* 18460C 80255D2C E6200010 */  swc1      $f0, 0x10($s1)
/* 184610 80255D30 E6220014 */  swc1      $f2, 0x14($s1)
/* 184614 80255D34 E6240018 */  swc1      $f4, 0x18($s1)
/* 184618 80255D38 C6AC006C */  lwc1      $f12, 0x6C($s5)
/* 18461C 80255D3C 0C00A6C9 */  jal       clamp_angle
/* 184620 80255D40 460CA301 */   sub.s    $f12, $f20, $f12
/* 184624 80255D44 8FA50024 */  lw        $a1, 0x24($sp)
/* 184628 80255D48 0220202D */  daddu     $a0, $s1, $zero
/* 18462C 80255D4C 0C044A17 */  jal       set_standard_shadow_scale
/* 184630 80255D50 E620002C */   swc1     $f0, 0x2C($s1)
/* 184634 80255D54 C620001C */  lwc1      $f0, 0x1C($s1)
/* 184638 80255D58 C60200A0 */  lwc1      $f2, 0xA0($s0)
/* 18463C 80255D5C 46020002 */  mul.s     $f0, $f0, $f2
/* 184640 80255D60 00000000 */  nop
/* 184644 80255D64 E620001C */  swc1      $f0, 0x1C($s1)
mac_00_D_80255D68:
/* 184648 80255D68 86020098 */  lh        $v0, 0x98($s0)
/* 18464C 80255D6C 284200FF */  slti      $v0, $v0, 0xFF
/* 184650 80255D70 14400005 */  bnez      $v0, .L80255D88
/* 184654 80255D74 24020022 */   addiu    $v0, $zero, 0x22
/* 184658 80255D78 8E020000 */  lw        $v0, 0x0($s0)
/* 18465C 80255D7C 30420100 */  andi      $v0, $v0, 0x100
/* 184660 80255D80 10400002 */  beqz      $v0, .L80255D8C
/* 184664 80255D84 24020022 */   addiu    $v0, $zero, 0x22
.L80255D88:
/* 184668 80255D88 A6420434 */  sh        $v0, 0x434($s2)
.L80255D8C:
/* 18466C 80255D8C 8E10000C */  lw        $s0, 0xC($s0)
/* 184670 80255D90 26730001 */  addiu     $s3, $s3, 0x1
/* 184674 80255D94 0274102A */  slt       $v0, $s3, $s4
/* 184678 80255D98 1440FF55 */  bnez      $v0, .L80255AF0
/* 18467C 80255D9C 00000000 */   nop
.L80255DA0:
/* 184680 80255DA0 0C044181 */  jal       get_shadow_by_index
/* 184684 80255DA4 8E44042C */   lw       $a0, 0x42C($s2)
/* 184688 80255DA8 8E430000 */  lw        $v1, 0x0($s2)
/* 18468C 80255DAC 30630004 */  andi      $v1, $v1, 0x4
/* 184690 80255DB0 14600005 */  bnez      $v1, .L80255DC8
/* 184694 80255DB4 0040882D */   daddu    $s1, $v0, $zero
/* 184698 80255DB8 8E220000 */  lw        $v0, 0x0($s1)
/* 18469C 80255DBC 2403FFFE */  addiu     $v1, $zero, -0x2
/* 1846A0 80255DC0 00431024 */  and       $v0, $v0, $v1
/* 1846A4 80255DC4 AE220000 */  sw        $v0, 0x0($s1)
.L80255DC8:
/* 1846A8 80255DC8 86420150 */  lh        $v0, 0x150($s2)
/* 1846AC 80255DCC C6400144 */  lwc1      $f0, 0x144($s2)
/* 1846B0 80255DD0 44821000 */  mtc1      $v0, $f2
/* 1846B4 80255DD4 00000000 */  nop
/* 1846B8 80255DD8 468010A0 */  cvt.s.w   $f2, $f2
/* 1846BC 80255DDC 46020000 */  add.s     $f0, $f0, $f2
/* 1846C0 80255DE0 8E420000 */  lw        $v0, 0x0($s2)
/* 1846C4 80255DE4 30420800 */  andi      $v0, $v0, 0x800
/* 1846C8 80255DE8 14400008 */  bnez      $v0, .L80255E0C
/* 1846CC 80255DEC E7A00018 */   swc1     $f0, 0x18($sp)
/* 1846D0 80255DF0 86420152 */  lh        $v0, 0x152($s2)
/* 1846D4 80255DF4 C6400148 */  lwc1      $f0, 0x148($s2)
/* 1846D8 80255DF8 44821000 */  mtc1      $v0, $f2
/* 1846DC 80255DFC 00000000 */  nop
/* 1846E0 80255E00 468010A0 */  cvt.s.w   $f2, $f2
/* 1846E4 80255E04 08095789 */  j         .L80255E24
/* 1846E8 80255E08 46020000 */   add.s    $f0, $f0, $f2
.L80255E0C:
/* 1846EC 80255E0C 86420152 */  lh        $v0, 0x152($s2)
/* 1846F0 80255E10 C6400148 */  lwc1      $f0, 0x148($s2)
/* 1846F4 80255E14 44821000 */  mtc1      $v0, $f2
/* 1846F8 80255E18 00000000 */  nop
/* 1846FC 80255E1C 468010A0 */  cvt.s.w   $f2, $f2
/* 184700 80255E20 46020001 */  sub.s     $f0, $f0, $f2
.L80255E24:
/* 184704 80255E24 3C014028 */  lui       $at, (0x40280000 >> 16)
/* 184708 80255E28 44811800 */  mtc1      $at, $f3
/* 18470C 80255E2C 44801000 */  mtc1      $zero, $f2
/* 184710 80255E30 46000021 */  cvt.d.s   $f0, $f0
/* 184714 80255E34 46220000 */  add.d     $f0, $f0, $f2
/* 184718 80255E38 46200020 */  cvt.s.d   $f0, $f0
/* 18471C 80255E3C E7A0001C */  swc1      $f0, 0x1C($sp)
/* 184720 80255E40 0000202D */  daddu     $a0, $zero, $zero
/* 184724 80255E44 27A50018 */  addiu     $a1, $sp, 0x18
/* 184728 80255E48 27A6001C */  addiu     $a2, $sp, 0x1C
/* 18472C 80255E4C 27A70020 */  addiu     $a3, $sp, 0x20
/* 184730 80255E50 86420154 */  lh        $v0, 0x154($s2)
/* 184734 80255E54 C642014C */  lwc1      $f2, 0x14C($s2)
/* 184738 80255E58 44820000 */  mtc1      $v0, $f0
/* 18473C 80255E5C 00000000 */  nop
/* 184740 80255E60 46800020 */  cvt.s.w   $f0, $f0
/* 184744 80255E64 46001080 */  add.s     $f2, $f2, $f0
/* 184748 80255E68 3C0146FF */  lui       $at, (0x46FFFE00 >> 16)
/* 18474C 80255E6C 3421FE00 */  ori       $at, $at, (0x46FFFE00 & 0xFFFF)
/* 184750 80255E70 44810000 */  mtc1      $at, $f0
/* 184754 80255E74 27A20024 */  addiu     $v0, $sp, 0x24
/* 184758 80255E78 E7A00024 */  swc1      $f0, 0x24($sp)
/* 18475C 80255E7C E7A20020 */  swc1      $f2, 0x20($sp)
/* 184760 80255E80 0C0372DF */  jal       npc_raycast_down_sides
/* 184764 80255E84 AFA20010 */   sw       $v0, 0x10($sp)
/* 184768 80255E88 C7A20024 */  lwc1      $f2, 0x24($sp)
/* 18476C 80255E8C 3C014348 */  lui       $at, (0x43480000 >> 16)
/* 184770 80255E90 44810000 */  mtc1      $at, $f0
/* 184774 80255E94 00000000 */  nop
/* 184778 80255E98 4602003C */  c.lt.s    $f0, $f2
/* 18477C 80255E9C 00000000 */  nop
/* 184780 80255EA0 45000004 */  bc1f      .L80255EB4
/* 184784 80255EA4 00000000 */   nop
/* 184788 80255EA8 8E220000 */  lw        $v0, 0x0($s1)
/* 18478C 80255EAC 34420001 */  ori       $v0, $v0, 0x1
/* 184790 80255EB0 AE220000 */  sw        $v0, 0x0($s1)
.L80255EB4:
/* 184794 80255EB4 C7A00018 */  lwc1      $f0, 0x18($sp)
/* 184798 80255EB8 C7A2001C */  lwc1      $f2, 0x1C($sp)
/* 18479C 80255EBC E6200010 */  swc1      $f0, 0x10($s1)
/* 1847A0 80255EC0 E6220014 */  swc1      $f2, 0x14($s1)
/* 1847A4 80255EC4 92420136 */  lbu       $v0, 0x136($s2)
/* 1847A8 80255EC8 00021080 */  sll       $v0, $v0, 2
/* 1847AC 80255ECC 3C018028 */  lui       $at, %hi(bActorOffsets + 0x3)
/* 1847B0 80255ED0 00220821 */  addu      $at, $at, $v0
/* 1847B4 80255ED4 80222EEB */  lb        $v0, %lo(bActorOffsets + 0x3)($at)
mac_00_LetterDelivery_SavedNpcAnim:
/* 1847B8 80255ED8 C7A00020 */  lwc1      $f0, 0x20($sp)
/* 1847BC 80255EDC 44821000 */  mtc1      $v0, $f2
D_80255EE0:
/* 1847C0 80255EE0 00000000 */  nop
/* 1847C4 80255EE4 468010A0 */  cvt.s.w   $f2, $f2
/* 1847C8 80255EE8 46020000 */  add.s     $f0, $f0, $f2
/* 1847CC 80255EEC E6200018 */  swc1      $f0, 0x18($s1)
/* 1847D0 80255EF0 C640018C */  lwc1      $f0, 0x18C($s2)
/* 1847D4 80255EF4 C6AC006C */  lwc1      $f12, 0x6C($s5)
/* 1847D8 80255EF8 0C00A6C9 */  jal       clamp_angle
/* 1847DC 80255EFC 460C0301 */   sub.s    $f12, $f0, $f12
/* 1847E0 80255F00 8FA50024 */  lw        $a1, 0x24($sp)
/* 1847E4 80255F04 0220202D */  daddu     $a0, $s1, $zero
/* 1847E8 80255F08 0C044A17 */  jal       set_standard_shadow_scale
/* 1847EC 80255F0C E620002C */   swc1     $f0, 0x2C($s1)
/* 1847F0 80255F10 C6420430 */  lwc1      $f2, 0x430($s2)
/* 1847F4 80255F14 C6400188 */  lwc1      $f0, 0x188($s2)
/* 1847F8 80255F18 46001082 */  mul.s     $f2, $f2, $f0
/* 1847FC 80255F1C 00000000 */  nop
/* 184800 80255F20 C620001C */  lwc1      $f0, 0x1C($s1)
/* 184804 80255F24 46020002 */  mul.s     $f0, $f0, $f2
/* 184808 80255F28 00000000 */  nop
/* 18480C 80255F2C E620001C */  swc1      $f0, 0x1C($s1)
.L80255F30:
/* 184810 80255F30 8FBF0040 */  lw        $ra, 0x40($sp)
/* 184814 80255F34 8FB5003C */  lw        $s5, 0x3C($sp)
/* 184818 80255F38 8FB40038 */  lw        $s4, 0x38($sp)
/* 18481C 80255F3C 8FB30034 */  lw        $s3, 0x34($sp)
/* 184820 80255F40 8FB20030 */  lw        $s2, 0x30($sp)
/* 184824 80255F44 8FB1002C */  lw        $s1, 0x2C($sp)
/* 184828 80255F48 8FB00028 */  lw        $s0, 0x28($sp)
/* 18482C 80255F4C D7B60050 */  ldc1      $f22, 0x50($sp)
/* 184830 80255F50 D7B40048 */  ldc1      $f20, 0x48($sp)
/* 184834 80255F54 03E00008 */  jr        $ra
/* 184838 80255F58 27BD0058 */   addiu    $sp, $sp, 0x58

### DECOMPILED C INSTRUCTIONS:

void update_actor_shadow(s32 arg0, Actor* actor) {
    Camera* camera = &gCameras[CAM_BATTLE];
    ActorPart* actorPart;
    Shadow* shadow;
    s32 numParts;
    f32 x1, y1, z1;
    f32 x2, y2, z2;
    f32 dist;
    s32 spriteID;
    f32 yaw;
    s32 i;

    if (actor != NULL) {
        shadow = get_shadow_by_index(actor->shadow.id);
        shadow->flags |= ENTITY_FLAG_HIDDEN;
        if (!(actor->flags & ACTOR_FLAG_DISABLED)) {
            if (actor->flags & ACTOR_FLAG_BLUR_ENABLED) {
                if (arg0 == 0) {
                    func_8025593C(actor);
                } else {
                    func_8025597C(actor);
                }
            }

            actor->renderMode = RENDER_MODE_ALPHATEST;
            x1 = actor->currentPos.x + actor->headOffset.x;
            if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
                y1 = actor->currentPos.y + actor->headOffset.y;
            } else {
                y1 = actor->currentPos.y - actor->headOffset.y;
            }
            z1 = actor->currentPos.z + actor->headOffset.z;
            numParts = actor->numParts;
            actorPart = actor->partsTable;

            for (i = 0; i < numParts; i++) {
                if (!(actorPart->flags & ACTOR_PART_FLAG_INVISIBLE) && actorPart->idleAnimations != NULL) {
                    spriteID = actorPart->spriteInstanceID;
                    if (spriteID >= 0) {
                        spr_update_sprite(spriteID, actorPart->currentAnimation, actorPart->animationRate);
                        actorPart->animNotifyValue = spr_get_notify_value(actorPart->spriteInstanceID);
                    }

                    if (!(actorPart->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) {
                        x2 = x1 + actorPart->partOffset.x + actorPart->visualOffset.x;
                        if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
                            y2 = y1 + actorPart->partOffset.y + actorPart->visualOffset.y;
                        } else {
                            y2 = y1 - actorPart->partOffset.y - actorPart->visualOffset.y;
                        }
                        z2 = z1 + actorPart->partOffset.z + actorPart->visualOffset.z;
                        yaw = actorPart->yaw = actor->yaw;
                    } else {
                        x2 = actorPart->absolutePosition.x + actorPart->visualOffset.x;
                        y2 = actorPart->absolutePosition.y + actorPart->visualOffset.y;
                        z2 = actorPart->absolutePosition.z + actorPart->visualOffset.z;
                        yaw = actorPart->yaw;
                    }
                    actorPart->currentPos.x = x2;
                    actorPart->currentPos.y = y2;
                    actorPart->currentPos.z = z2;

                    if (!(actorPart->flags & ACTOR_PART_FLAG_4)) {
                        shadow = get_shadow_by_index(actorPart->shadowIndex);
                        shadow->flags &= ~ENTITY_FLAG_HIDDEN;
                        x1 = actorPart->currentPos.x;
                        if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
                            y1 = actorPart->currentPos.y + 12.0;
                        } else {
                            y1 = actorPart->currentPos.y - 12.0;
                        }
                        z1 = actorPart->currentPos.z;

                        dist = 32767.0f;
                        npc_raycast_down_sides(0, &x1, &y1, &z1, &dist);

                        if (200.0f < dist) {
                            shadow->flags |= ENTITY_FLAG_HIDDEN;
                        }
                        shadow->position.x = x1;
                        shadow->position.y = y1;
                        shadow->position.z = z1;
                        shadow->rotation.y = clamp_angle(yaw - camera->currentYaw);
                        set_standard_shadow_scale(shadow, dist);
                        shadow->scale.x *= actorPart->shadowScale;
                    }
                    if (actorPart->opacity < 255 || actorPart->flags & ACTOR_PART_FLAG_100) {
                        actor->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3;
                    }
                }
                actorPart = actorPart->nextPart;
            }

            shadow = get_shadow_by_index(actor->shadow.id);
            if (!(actor->flags & ACTOR_FLAG_NO_SHADOW)) {
                shadow->flags &= ~ENTITY_FLAG_HIDDEN;
            }

            x1 = actor->currentPos.x + actor->headOffset.x;
            if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
                y1 = actor->currentPos.y + actor->headOffset.y + 12.0;
            } else {
                y1 = actor->currentPos.y - actor->headOffset.y + 12.0;
            }
            z1 = actor->currentPos.z + actor->headOffset.z;

            dist = 32767.0f;
            npc_raycast_down_sides(0, &x1, &y1, &z1, &dist);

            if (200.0f < dist) {
                shadow->flags |= ENTITY_FLAG_HIDDEN;
            }
            shadow->position.x = x1;
            shadow->position.y = y1;
            shadow->position.z = z1 + bActorOffsets[actor->actorType].shadow;
            shadow->rotation.y = clamp_angle(actor->yaw - camera->currentYaw);
            set_standard_shadow_scale(shadow, dist);
            shadow->scale.x *= actor->shadowScale * actor->scalingFactor;
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel star_appendGfx
/* 332070 E001E730 27BDFF20 */  addiu     $sp, $sp, -0xE0
/* 332074 E001E734 3C03DB06 */  lui       $v1, (0xDB060024 >> 16)
/* 332078 E001E738 AFB700BC */  sw        $s7, 0xBC($sp)
/* 33207C E001E73C 3C17800A */  lui       $s7, %hi(gMainGfxPos)
/* 332080 E001E740 26F7A66C */  addiu     $s7, $s7, %lo(gMainGfxPos)
/* 332084 E001E744 34630024 */  ori       $v1, $v1, (0xDB060024 & 0xFFFF)
/* 332088 E001E748 AFBF00C4 */  sw        $ra, 0xC4($sp)
/* 33208C E001E74C AFBE00C0 */  sw        $fp, 0xC0($sp)
/* 332090 E001E750 AFB600B8 */  sw        $s6, 0xB8($sp)
/* 332094 E001E754 AFB500B4 */  sw        $s5, 0xB4($sp)
/* 332098 E001E758 AFB400B0 */  sw        $s4, 0xB0($sp)
/* 33209C E001E75C AFB300AC */  sw        $s3, 0xAC($sp)
/* 3320A0 E001E760 AFB200A8 */  sw        $s2, 0xA8($sp)
/* 3320A4 E001E764 AFB100A4 */  sw        $s1, 0xA4($sp)
/* 3320A8 E001E768 AFB000A0 */  sw        $s0, 0xA0($sp)
/* 3320AC E001E76C F7B800D8 */  sdc1      $f24, 0xD8($sp)
/* 3320B0 E001E770 F7B600D0 */  sdc1      $f22, 0xD0($sp)
/* 3320B4 E001E774 F7B400C8 */  sdc1      $f20, 0xC8($sp)
/* 3320B8 E001E778 8EE60000 */  lw        $a2, 0x0($s7)
/* 3320BC E001E77C 4480A000 */  mtc1      $zero, $f20
/* 3320C0 E001E780 8C96000C */  lw        $s6, 0xC($a0)
/* 3320C4 E001E784 00C0102D */  daddu     $v0, $a2, $zero
/* 3320C8 E001E788 24C60008 */  addiu     $a2, $a2, 0x8
/* 3320CC E001E78C C6D80240 */  lwc1      $f24, 0x240($s6)
/* 3320D0 E001E790 8EDE0038 */  lw        $fp, 0x38($s6)
/* 3320D4 E001E794 8ED10244 */  lw        $s1, 0x244($s6)
/* 3320D8 E001E798 8ED20248 */  lw        $s2, 0x248($s6)
/* 3320DC E001E79C 8ED3024C */  lw        $s3, 0x24C($s6)
/* 3320E0 E001E7A0 3C0EE700 */  lui       $t6, (0xE7000000 >> 16)
/* 3320E4 E001E7A4 AC4E0000 */  sw        $t6, 0x0($v0)
/* 3320E8 E001E7A8 AC400004 */  sw        $zero, 0x4($v0)
/* 3320EC E001E7AC ACC30000 */  sw        $v1, 0x0($a2)
/* 3320F0 E001E7B0 8C820010 */  lw        $v0, 0x10($a0)
/* 3320F4 E001E7B4 3C048000 */  lui       $a0, (0x80000000 >> 16)
/* 3320F8 E001E7B8 4405A000 */  mfc1      $a1, $f20
/* 3320FC E001E7BC 4407A000 */  mfc1      $a3, $f20
/* 332100 E001E7C0 8C42001C */  lw        $v0, 0x1C($v0)
/* 332104 E001E7C4 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 332108 E001E7C8 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 33210C E001E7CC 00441021 */  addu      $v0, $v0, $a0
/* 332110 E001E7D0 ACC20004 */  sw        $v0, 0x4($a2)
/* 332114 E001E7D4 00031080 */  sll       $v0, $v1, 2
/* 332118 E001E7D8 00431021 */  addu      $v0, $v0, $v1
/* 33211C E001E7DC 00021080 */  sll       $v0, $v0, 2
/* 332120 E001E7E0 00431023 */  subu      $v0, $v0, $v1
/* 332124 E001E7E4 000218C0 */  sll       $v1, $v0, 3
/* 332128 E001E7E8 00431021 */  addu      $v0, $v0, $v1
/* 33212C E001E7EC 000210C0 */  sll       $v0, $v0, 3
/* 332130 E001E7F0 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 332134 E001E7F4 00220821 */  addu      $at, $at, $v0
/* 332138 E001E7F8 C4221DEC */  lwc1      $f2, %lo(gCameras + 0x6C)($at)
/* 33213C E001E7FC E7B80010 */  swc1      $f24, 0x10($sp)
/* 332140 E001E800 C6C00004 */  lwc1      $f0, 0x4($s6)
/* 332144 E001E804 AEE60000 */  sw        $a2, 0x0($s7)
/* 332148 E001E808 24C60008 */  addiu     $a2, $a2, 0x8
/* 33214C E001E80C E7A00014 */  swc1      $f0, 0x14($sp)
/* 332150 E001E810 C6C00008 */  lwc1      $f0, 0x8($s6)
/* 332154 E001E814 46001087 */  neg.s     $f2, $f2
/* 332158 E001E818 AEE60000 */  sw        $a2, 0x0($s7)
/* 33215C E001E81C 44061000 */  mfc1      $a2, $f2
/* 332160 E001E820 3C150001 */  lui       $s5, (0x11630 >> 16)
/* 332164 E001E824 E7A00018 */  swc1      $f0, 0x18($sp)
/* 332168 E001E828 C6C0000C */  lwc1      $f0, 0xC($s6)
/* 33216C E001E82C 27A40020 */  addiu     $a0, $sp, 0x20
/* 332170 E001E830 0C080180 */  jal       shim_guPositionF
/* 332174 E001E834 E7A0001C */   swc1     $f0, 0x1C($sp)
/* 332178 E001E838 36B51630 */  ori       $s5, $s5, (0x11630 & 0xFFFF)
/* 33217C E001E83C 27B00060 */  addiu     $s0, $sp, 0x60
/* 332180 E001E840 4406A000 */  mfc1      $a2, $f20
/* 332184 E001E844 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 332188 E001E848 44810000 */  mtc1      $at, $f0
/* 33218C E001E84C 0200202D */  daddu     $a0, $s0, $zero
/* 332190 E001E850 E7A00010 */  swc1      $f0, 0x10($sp)
/* 332194 E001E854 8EC50024 */  lw        $a1, 0x24($s6)
/* 332198 E001E858 0C080104 */  jal       shim_guRotateF
/* 33219C E001E85C 00C0382D */   daddu    $a3, $a2, $zero
/* 3321A0 E001E860 0200202D */  daddu     $a0, $s0, $zero
/* 3321A4 E001E864 27A50020 */  addiu     $a1, $sp, 0x20
/* 3321A8 E001E868 0C080114 */  jal       shim_guMtxCatF
/* 3321AC E001E86C 00A0302D */   daddu    $a2, $a1, $zero
/* 3321B0 E001E870 27A40020 */  addiu     $a0, $sp, 0x20
/* 3321B4 E001E874 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 3321B8 E001E878 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 3321BC E001E87C 3C14800A */  lui       $s4, %hi(gDisplayContext)
/* 3321C0 E001E880 2694A674 */  addiu     $s4, $s4, %lo(gDisplayContext)
/* 3321C4 E001E884 96050000 */  lhu       $a1, 0x0($s0)
/* 3321C8 E001E888 8E820000 */  lw        $v0, 0x0($s4)
/* 3321CC E001E88C 00052980 */  sll       $a1, $a1, 6
/* 3321D0 E001E890 00B52821 */  addu      $a1, $a1, $s5
/* 3321D4 E001E894 0C080118 */  jal       shim_guMtxF2L
/* 3321D8 E001E898 00452821 */   addu     $a1, $v0, $a1
/* 3321DC E001E89C 3C05FA00 */  lui       $a1, (0xFA000050 >> 16)
/* 3321E0 E001E8A0 34A50050 */  ori       $a1, $a1, (0xFA000050 & 0xFFFF)
/* 3321E4 E001E8A4 3C067F7F */  lui       $a2, (0x7F7F7F7F >> 16)
/* 3321E8 E001E8A8 34C67F7F */  ori       $a2, $a2, (0x7F7F7F7F & 0xFFFF)
/* 3321EC E001E8AC 3C080900 */  lui       $t0, %hi(D_09001530_40E7C0)
/* 3321F0 E001E8B0 25081530 */  addiu     $t0, $t0, %lo(D_09001530_40E7C0)
/* 3321F4 E001E8B4 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 3321F8 E001E8B8 00118E00 */  sll       $s1, $s1, 24
/* 3321FC E001E8BC 325200FF */  andi      $s2, $s2, 0xFF
/* 332200 E001E8C0 00129400 */  sll       $s2, $s2, 16
/* 332204 E001E8C4 02328825 */  or        $s1, $s1, $s2
/* 332208 E001E8C8 327300FF */  andi      $s3, $s3, 0xFF
/* 33220C E001E8CC 00139A00 */  sll       $s3, $s3, 8
/* 332210 E001E8D0 8EE70000 */  lw        $a3, 0x0($s7)
/* 332214 E001E8D4 02338825 */  or        $s1, $s1, $s3
/* 332218 E001E8D8 00E0202D */  daddu     $a0, $a3, $zero
/* 33221C E001E8DC 24E70008 */  addiu     $a3, $a3, 0x8
/* 332220 E001E8E0 AEE70000 */  sw        $a3, 0x0($s7)
/* 332224 E001E8E4 96020000 */  lhu       $v0, 0x0($s0)
/* 332228 E001E8E8 363100FF */  ori       $s1, $s1, 0xFF
/* 33222C E001E8EC AC830000 */  sw        $v1, 0x0($a0)
/* 332230 E001E8F0 24430001 */  addiu     $v1, $v0, 0x1
/* 332234 E001E8F4 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 332238 E001E8F8 00021180 */  sll       $v0, $v0, 6
/* 33223C E001E8FC A6030000 */  sh        $v1, 0x0($s0)
/* 332240 E001E900 8E830000 */  lw        $v1, 0x0($s4)
/* 332244 E001E904 00551021 */  addu      $v0, $v0, $s5
/* 332248 E001E908 00621821 */  addu      $v1, $v1, $v0
/* 33224C E001E90C 24E20008 */  addiu     $v0, $a3, 0x8
/* 332250 E001E910 AC830004 */  sw        $v1, 0x4($a0)
/* 332254 E001E914 AEE20000 */  sw        $v0, 0x0($s7)
/* 332258 E001E918 24E20010 */  addiu     $v0, $a3, 0x10
/* 33225C E001E91C ACE50000 */  sw        $a1, 0x0($a3)
/* 332260 E001E920 ACF10004 */  sw        $s1, 0x4($a3)
/* 332264 E001E924 AEE20000 */  sw        $v0, 0x0($s7)
/* 332268 E001E928 3C02FB00 */  lui       $v0, (0xFB000000 >> 16)
/* 33226C E001E92C ACE6000C */  sw        $a2, 0xC($a3)
/* 332270 E001E930 3C06DE00 */  lui       $a2, (0xDE000000 >> 16)
/* 332274 E001E934 ACE20008 */  sw        $v0, 0x8($a3)
/* 332278 E001E938 ACE60010 */  sw        $a2, 0x10($a3)
/* 33227C E001E93C 8EC20038 */  lw        $v0, 0x38($s6)
/* 332280 E001E940 24E50018 */  addiu     $a1, $a3, 0x18
/* 332284 E001E944 28420002 */  slti      $v0, $v0, 0x2
/* 332288 E001E948 14400003 */  bnez      $v0, .LE001E958
/* 33228C E001E94C AEE50000 */   sw       $a1, 0x0($s7)
/* 332290 E001E950 3C080900 */  lui       $t0, %hi(D_09001650_40E8E0)
/* 332294 E001E954 25081650 */  addiu     $t0, $t0, %lo(D_09001650_40E8E0)
.LE001E958:
/* 332298 E001E958 3C02D838 */  lui       $v0, (0xD8380002 >> 16)
/* 33229C E001E95C 34420002 */  ori       $v0, $v0, (0xD8380002 & 0xFFFF)
/* 3322A0 E001E960 02E0202D */  daddu     $a0, $s7, $zero
/* 3322A4 E001E964 24E30020 */  addiu     $v1, $a3, 0x20
/* 3322A8 E001E968 ACE80014 */  sw        $t0, 0x14($a3)
/* 3322AC E001E96C AC830000 */  sw        $v1, 0x0($a0)
/* 3322B0 E001E970 ACE20018 */  sw        $v0, 0x18($a3)
/* 3322B4 E001E974 24020040 */  addiu     $v0, $zero, 0x40
/* 3322B8 E001E978 ACA20004 */  sw        $v0, 0x4($a1)
/* 3322BC E001E97C 24E20028 */  addiu     $v0, $a3, 0x28
/* 3322C0 E001E980 3C0FE700 */  lui       $t7, (0xE7000000 >> 16)
/* 3322C4 E001E984 AC820000 */  sw        $v0, 0x0($a0)
/* 3322C8 E001E988 24020003 */  addiu     $v0, $zero, 0x3
/* 3322CC E001E98C ACEF0020 */  sw        $t7, 0x20($a3)
/* 3322D0 E001E990 17C20007 */  bne       $fp, $v0, .LE001E9B0
/* 3322D4 E001E994 AC600004 */   sw       $zero, 0x4($v1)
/* 3322D8 E001E998 24E20030 */  addiu     $v0, $a3, 0x30
/* 3322DC E001E99C AC820000 */  sw        $v0, 0x0($a0)
/* 3322E0 E001E9A0 3C020900 */  lui       $v0, %hi(D_090017D0_40EA60)
/* 3322E4 E001E9A4 244217D0 */  addiu     $v0, $v0, %lo(D_090017D0_40EA60)
/* 3322E8 E001E9A8 08007A71 */  j         .LE001E9C4
/* 3322EC E001E9AC AC660008 */   sw       $a2, 0x8($v1)
.LE001E9B0:
/* 3322F0 E001E9B0 24E20030 */  addiu     $v0, $a3, 0x30
/* 3322F4 E001E9B4 AEE20000 */  sw        $v0, 0x0($s7)
/* 3322F8 E001E9B8 3C020900 */  lui       $v0, %hi(D_09001780_40EA10)
/* 3322FC E001E9BC 24421780 */  addiu     $v0, $v0, %lo(D_09001780_40EA10)
/* 332300 E001E9C0 AC660008 */  sw        $a2, 0x8($v1)
.LE001E9C4:
/* 332304 E001E9C4 AC62000C */  sw        $v0, 0xC($v1)
/* 332308 E001E9C8 8EC2003C */  lw        $v0, 0x3C($s6)
/* 33230C E001E9CC 24420001 */  addiu     $v0, $v0, 0x1
/* 332310 E001E9D0 AEC2003C */  sw        $v0, 0x3C($s6)
/* 332314 E001E9D4 28420008 */  slti      $v0, $v0, 0x8
/* 332318 E001E9D8 50400001 */  beql      $v0, $zero, .LE001E9E0
/* 33231C E001E9DC AEC0003C */   sw       $zero, 0x3C($s6)
.LE001E9E0:
/* 332320 E001E9E0 C6C0001C */  lwc1      $f0, 0x1C($s6)
/* 332324 E001E9E4 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 332328 E001E9E8 4481B000 */  mtc1      $at, $f22
/* 33232C E001E9EC 00000000 */  nop
/* 332330 E001E9F0 4616003E */  c.le.s    $f0, $f22
/* 332334 E001E9F4 00000000 */  nop
/* 332338 E001E9F8 450000C5 */  bc1f      .LE001ED10
/* 33233C E001E9FC 00000000 */   nop
/* 332340 E001EA00 8EC2003C */  lw        $v0, 0x3C($s6)
/* 332344 E001EA04 24440005 */  addiu     $a0, $v0, 0x5
/* 332348 E001EA08 04810002 */  bgez      $a0, .LE001EA14
/* 33234C E001EA0C 0080302D */   daddu    $a2, $a0, $zero
/* 332350 E001EA10 2446000C */  addiu     $a2, $v0, 0xC
.LE001EA14:
/* 332354 E001EA14 000688C3 */  sra       $s1, $a2, 3
/* 332358 E001EA18 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 33235C E001EA1C 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 332360 E001EA20 4480A000 */  mtc1      $zero, $f20
/* 332364 E001EA24 00031080 */  sll       $v0, $v1, 2
/* 332368 E001EA28 00431021 */  addu      $v0, $v0, $v1
/* 33236C E001EA2C 00021080 */  sll       $v0, $v0, 2
/* 332370 E001EA30 00431023 */  subu      $v0, $v0, $v1
/* 332374 E001EA34 000218C0 */  sll       $v1, $v0, 3
/* 332378 E001EA38 00431021 */  addu      $v0, $v0, $v1
/* 33237C E001EA3C 000210C0 */  sll       $v0, $v0, 3
/* 332380 E001EA40 4405A000 */  mfc1      $a1, $f20
/* 332384 E001EA44 4407A000 */  mfc1      $a3, $f20
/* 332388 E001EA48 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 33238C E001EA4C 00220821 */  addu      $at, $at, $v0
/* 332390 E001EA50 C4221DEC */  lwc1      $f2, %lo(gCameras + 0x6C)($at)
/* 332394 E001EA54 001110C0 */  sll       $v0, $s1, 3
/* 332398 E001EA58 E7B80010 */  swc1      $f24, 0x10($sp)
/* 33239C E001EA5C C6C00004 */  lwc1      $f0, 0x4($s6)
/* 3323A0 E001EA60 46001087 */  neg.s     $f2, $f2
/* 3323A4 E001EA64 E7A00014 */  swc1      $f0, 0x14($sp)
/* 3323A8 E001EA68 C6C00008 */  lwc1      $f0, 0x8($s6)
/* 3323AC E001EA6C 44061000 */  mfc1      $a2, $f2
/* 3323B0 E001EA70 00828823 */  subu      $s1, $a0, $v0
/* 3323B4 E001EA74 E7A00018 */  swc1      $f0, 0x18($sp)
/* 3323B8 E001EA78 C6C0000C */  lwc1      $f0, 0xC($s6)
/* 3323BC E001EA7C 27A40020 */  addiu     $a0, $sp, 0x20
/* 3323C0 E001EA80 0C080180 */  jal       shim_guPositionF
/* 3323C4 E001EA84 E7A0001C */   swc1     $f0, 0x1C($sp)
/* 3323C8 E001EA88 27B00060 */  addiu     $s0, $sp, 0x60
/* 3323CC E001EA8C 4406A000 */  mfc1      $a2, $f20
/* 3323D0 E001EA90 0200202D */  daddu     $a0, $s0, $zero
/* 3323D4 E001EA94 E7B60010 */  swc1      $f22, 0x10($sp)
/* 3323D8 E001EA98 8EC50020 */  lw        $a1, 0x20($s6)
/* 3323DC E001EA9C 0C080104 */  jal       shim_guRotateF
/* 3323E0 E001EAA0 00C0382D */   daddu    $a3, $a2, $zero
/* 3323E4 E001EAA4 0200202D */  daddu     $a0, $s0, $zero
/* 3323E8 E001EAA8 27A50020 */  addiu     $a1, $sp, 0x20
/* 3323EC E001EAAC 0C080114 */  jal       shim_guMtxCatF
/* 3323F0 E001EAB0 00A0302D */   daddu    $a2, $a1, $zero
/* 3323F4 E001EAB4 8EC5003C */  lw        $a1, 0x3C($s6)
/* 3323F8 E001EAB8 27A40020 */  addiu     $a0, $sp, 0x20
/* 3323FC E001EABC 00052980 */  sll       $a1, $a1, 6
/* 332400 E001EAC0 24A50040 */  addiu     $a1, $a1, 0x40
/* 332404 E001EAC4 0C080118 */  jal       shim_guMtxF2L
/* 332408 E001EAC8 02C52821 */   addu     $a1, $s6, $a1
/* 33240C E001EACC 0000402D */  daddu     $t0, $zero, $zero
/* 332410 E001EAD0 3C15800A */  lui       $s5, %hi(gDisplayContext)
/* 332414 E001EAD4 26B5A674 */  addiu     $s5, $s5, %lo(gDisplayContext)
/* 332418 E001EAD8 3C0D8007 */  lui       $t5, %hi(gMatrixListPos)
/* 33241C E001EADC 25AD41F0 */  addiu     $t5, $t5, %lo(gMatrixListPos)
/* 332420 E001EAE0 3C0C0001 */  lui       $t4, (0x11630 >> 16)
/* 332424 E001EAE4 358C1630 */  ori       $t4, $t4, (0x11630 & 0xFFFF)
/* 332428 E001EAE8 3C0B800A */  lui       $t3, %hi(gMainGfxPos)
/* 33242C E001EAEC 256BA66C */  addiu     $t3, $t3, %lo(gMainGfxPos)
/* 332430 E001EAF0 3C13DA38 */  lui       $s3, (0xDA380000 >> 16)
/* 332434 E001EAF4 3C100100 */  lui       $s0, (0x1002000 >> 16)
/* 332438 E001EAF8 36102000 */  ori       $s0, $s0, (0x1002000 & 0xFFFF)
/* 33243C E001EAFC 3C14D838 */  lui       $s4, (0xD8380002 >> 16)
/* 332440 E001EB00 36940002 */  ori       $s4, $s4, (0xD8380002 & 0xFFFF)
/* 332444 E001EB04 24120040 */  addiu     $s2, $zero, 0x40
/* 332448 E001EB08 3C0A0900 */  lui       $t2, %hi(D_09001400_40E690)
/* 33244C E001EB0C 254A1400 */  addiu     $t2, $t2, %lo(D_09001400_40E690)
/* 332450 E001EB10 24090002 */  addiu     $t1, $zero, 0x2
.LE001EB14:
/* 332454 E001EB14 02282023 */  subu      $a0, $s1, $t0
/* 332458 E001EB18 24830008 */  addiu     $v1, $a0, 0x8
/* 33245C E001EB1C 04610002 */  bgez      $v1, .LE001EB28
/* 332460 E001EB20 0060102D */   daddu    $v0, $v1, $zero
/* 332464 E001EB24 2482000F */  addiu     $v0, $a0, 0xF
.LE001EB28:
/* 332468 E001EB28 000210C3 */  sra       $v0, $v0, 3
/* 33246C E001EB2C 000210C0 */  sll       $v0, $v0, 3
/* 332470 E001EB30 00621023 */  subu      $v0, $v1, $v0
/* 332474 E001EB34 00021180 */  sll       $v0, $v0, 6
/* 332478 E001EB38 02C21021 */  addu      $v0, $s6, $v0
/* 33247C E001EB3C 24440040 */  addiu     $a0, $v0, 0x40
/* 332480 E001EB40 24450080 */  addiu     $a1, $v0, 0x80
/* 332484 E001EB44 95A20000 */  lhu       $v0, 0x0($t5)
/* 332488 E001EB48 8EA30000 */  lw        $v1, 0x0($s5)
/* 33248C E001EB4C 00021180 */  sll       $v0, $v0, 6
/* 332490 E001EB50 00621821 */  addu      $v1, $v1, $v0
/* 332494 E001EB54 006C1821 */  addu      $v1, $v1, $t4
.LE001EB58:
/* 332498 E001EB58 8C980000 */  lw        $t8, 0x0($a0)
/* 33249C E001EB5C 8C990004 */  lw        $t9, 0x4($a0)
/* 3324A0 E001EB60 8C8E0008 */  lw        $t6, 0x8($a0)
/* 3324A4 E001EB64 8C8F000C */  lw        $t7, 0xC($a0)
/* 3324A8 E001EB68 AC780000 */  sw        $t8, 0x0($v1)
/* 3324AC E001EB6C AC790004 */  sw        $t9, 0x4($v1)
/* 3324B0 E001EB70 AC6E0008 */  sw        $t6, 0x8($v1)
/* 3324B4 E001EB74 AC6F000C */  sw        $t7, 0xC($v1)
/* 3324B8 E001EB78 24840010 */  addiu     $a0, $a0, 0x10
/* 3324BC E001EB7C 1485FFF6 */  bne       $a0, $a1, .LE001EB58
/* 3324C0 E001EB80 24630010 */   addiu    $v1, $v1, 0x10
/* 3324C4 E001EB84 3126007F */  andi      $a2, $t1, 0x7F
/* 3324C8 E001EB88 25290002 */  addiu     $t1, $t1, 0x2
/* 3324CC E001EB8C 25080001 */  addiu     $t0, $t0, 0x1
/* 3324D0 E001EB90 00063040 */  sll       $a2, $a2, 1
/* 3324D4 E001EB94 00D03025 */  or        $a2, $a2, $s0
/* 3324D8 E001EB98 8D640000 */  lw        $a0, 0x0($t3)
/* 3324DC E001EB9C 95A50000 */  lhu       $a1, 0x0($t5)
/* 3324E0 E001EBA0 0080382D */  daddu     $a3, $a0, $zero
/* 3324E4 E001EBA4 24840008 */  addiu     $a0, $a0, 0x8
/* 3324E8 E001EBA8 30A2FFFF */  andi      $v0, $a1, 0xFFFF
/* 3324EC E001EBAC 00021180 */  sll       $v0, $v0, 6
/* 3324F0 E001EBB0 004C1021 */  addu      $v0, $v0, $t4
/* 3324F4 E001EBB4 ACF30000 */  sw        $s3, 0x0($a3)
/* 3324F8 E001EBB8 8EA30000 */  lw        $v1, 0x0($s5)
/* 3324FC E001EBBC 24A50001 */  addiu     $a1, $a1, 0x1
/* 332500 E001EBC0 00621821 */  addu      $v1, $v1, $v0
/* 332504 E001EBC4 ACE30004 */  sw        $v1, 0x4($a3)
/* 332508 E001EBC8 AC8A0004 */  sw        $t2, 0x4($a0)
/* 33250C E001EBCC 254A0020 */  addiu     $t2, $t2, 0x20
/* 332510 E001EBD0 24820008 */  addiu     $v0, $a0, 0x8
/* 332514 E001EBD4 AD640000 */  sw        $a0, 0x0($t3)
/* 332518 E001EBD8 A5A50000 */  sh        $a1, 0x0($t5)
/* 33251C E001EBDC AD620000 */  sw        $v0, 0x0($t3)
/* 332520 E001EBE0 24820010 */  addiu     $v0, $a0, 0x10
/* 332524 E001EBE4 AC860000 */  sw        $a2, 0x0($a0)
/* 332528 E001EBE8 AD620000 */  sw        $v0, 0x0($t3)
/* 33252C E001EBEC 29020005 */  slti      $v0, $t0, 0x5
/* 332530 E001EBF0 AC940008 */  sw        $s4, 0x8($a0)
/* 332534 E001EBF4 1440FFC7 */  bnez      $v0, .LE001EB14
/* 332538 E001EBF8 AC92000C */   sw       $s2, 0xC($a0)
/* 33253C E001EBFC 0000402D */  daddu     $t0, $zero, $zero
/* 332540 E001EC00 3C0C800A */  lui       $t4, %hi(gMainGfxPos)
/* 332544 E001EC04 258CA66C */  addiu     $t4, $t4, %lo(gMainGfxPos)
/* 332548 E001EC08 3C0B0600 */  lui       $t3, (0x6000000 >> 16)
/* 33254C E001EC0C 240A0001 */  addiu     $t2, $zero, 0x1
/* 332550 E001EC10 3C0D0604 */  lui       $t5, (0x6040602 >> 16)
/* 332554 E001EC14 35AD0602 */  ori       $t5, $t5, (0x6040602 & 0xFFFF)
/* 332558 E001EC18 24070006 */  addiu     $a3, $zero, 0x6
/* 33255C E001EC1C 24050004 */  addiu     $a1, $zero, 0x4
/* 332560 E001EC20 0140302D */  daddu     $a2, $t2, $zero
/* 332564 E001EC24 24090002 */  addiu     $t1, $zero, 0x2
.LE001EC28:
/* 332568 E001EC28 8D840000 */  lw        $a0, 0x0($t4)
/* 33256C E001EC2C 24820008 */  addiu     $v0, $a0, 0x8
/* 332570 E001EC30 AD820000 */  sw        $v0, 0x0($t4)
/* 332574 E001EC34 00081040 */  sll       $v0, $t0, 1
/* 332578 E001EC38 14400004 */  bnez      $v0, .LE001EC4C
/* 33257C E001EC3C 00000000 */   nop
/* 332580 E001EC40 00081440 */  sll       $v0, $t0, 17
/* 332584 E001EC44 08007B1D */  j         .LE001EC74
/* 332588 E001EC48 34420204 */   ori      $v0, $v0, 0x204
.LE001EC4C:
/* 33258C E001EC4C 144A0003 */  bne       $v0, $t2, .LE001EC5C
/* 332590 E001EC50 30A200FF */   andi     $v0, $a1, 0xFF
/* 332594 E001EC54 08007B1F */  j         .LE001EC7C
/* 332598 E001EC58 AC8D0000 */   sw       $t5, 0x0($a0)
.LE001EC5C:
/* 33259C E001EC5C 00021400 */  sll       $v0, $v0, 16
/* 3325A0 E001EC60 00081A80 */  sll       $v1, $t0, 10
/* 3325A4 E001EC64 3063FC00 */  andi      $v1, $v1, 0xFC00
/* 3325A8 E001EC68 00431025 */  or        $v0, $v0, $v1
/* 3325AC E001EC6C 312300FF */  andi      $v1, $t1, 0xFF
/* 3325B0 E001EC70 00431025 */  or        $v0, $v0, $v1
.LE001EC74:
/* 3325B4 E001EC74 004B1025 */  or        $v0, $v0, $t3
/* 3325B8 E001EC78 AC820000 */  sw        $v0, 0x0($a0)
.LE001EC7C:
/* 3325BC E001EC7C 14C00004 */  bnez      $a2, .LE001EC90
/* 3325C0 E001EC80 30E200FF */   andi     $v0, $a3, 0xFF
/* 3325C4 E001EC84 00021200 */  sll       $v0, $v0, 8
/* 3325C8 E001EC88 08007B32 */  j         .LE001ECC8
/* 3325CC E001EC8C 30A300FF */   andi     $v1, $a1, 0xFF
.LE001EC90:
/* 3325D0 E001EC90 14CA0008 */  bne       $a2, $t2, .LE001ECB4
/* 3325D4 E001EC94 30A200FF */   andi     $v0, $a1, 0xFF
/* 3325D8 E001EC98 30E300FF */  andi      $v1, $a3, 0xFF
/* 3325DC E001EC9C 00031C00 */  sll       $v1, $v1, 16
/* 3325E0 E001ECA0 00021200 */  sll       $v0, $v0, 8
/* 3325E4 E001ECA4 00621825 */  or        $v1, $v1, $v0
/* 3325E8 E001ECA8 34630002 */  ori       $v1, $v1, 0x2
/* 3325EC E001ECAC 08007B34 */  j         .LE001ECD0
/* 3325F0 E001ECB0 AC830004 */   sw       $v1, 0x4($a0)
.LE001ECB4:
/* 3325F4 E001ECB4 00021400 */  sll       $v0, $v0, 16
/* 3325F8 E001ECB8 00061A40 */  sll       $v1, $a2, 9
/* 3325FC E001ECBC 3063FE00 */  andi      $v1, $v1, 0xFE00
/* 332600 E001ECC0 00431025 */  or        $v0, $v0, $v1
/* 332604 E001ECC4 30E300FF */  andi      $v1, $a3, 0xFF
.LE001ECC8:
/* 332608 E001ECC8 00431025 */  or        $v0, $v0, $v1
/* 33260C E001ECCC AC820004 */  sw        $v0, 0x4($a0)
.LE001ECD0:
/* 332610 E001ECD0 24E70004 */  addiu     $a3, $a3, 0x4
/* 332614 E001ECD4 24A50004 */  addiu     $a1, $a1, 0x4
/* 332618 E001ECD8 24C60002 */  addiu     $a2, $a2, 0x2
/* 33261C E001ECDC 25080001 */  addiu     $t0, $t0, 0x1
/* 332620 E001ECE0 29020004 */  slti      $v0, $t0, 0x4
/* 332624 E001ECE4 1440FFD0 */  bnez      $v0, .LE001EC28
/* 332628 E001ECE8 25290004 */   addiu    $t1, $t1, 0x4
/* 33262C E001ECEC 3C03800A */  lui       $v1, %hi(gMainGfxPos)
/* 332630 E001ECF0 2463A66C */  addiu     $v1, $v1, %lo(gMainGfxPos)
/* 332634 E001ECF4 8C620000 */  lw        $v0, 0x0($v1)
/* 332638 E001ECF8 0040202D */  daddu     $a0, $v0, $zero
/* 33263C E001ECFC 24420008 */  addiu     $v0, $v0, 0x8
/* 332640 E001ED00 AC620000 */  sw        $v0, 0x0($v1)
/* 332644 E001ED04 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 332648 E001ED08 AC820000 */  sw        $v0, 0x0($a0)
/* 33264C E001ED0C AC800004 */  sw        $zero, 0x4($a0)
.LE001ED10:
/* 332650 E001ED10 8FBF00C4 */  lw        $ra, 0xC4($sp)
/* 332654 E001ED14 8FBE00C0 */  lw        $fp, 0xC0($sp)
/* 332658 E001ED18 8FB700BC */  lw        $s7, 0xBC($sp)
/* 33265C E001ED1C 8FB600B8 */  lw        $s6, 0xB8($sp)
/* 332660 E001ED20 8FB500B4 */  lw        $s5, 0xB4($sp)
/* 332664 E001ED24 8FB400B0 */  lw        $s4, 0xB0($sp)
/* 332668 E001ED28 8FB300AC */  lw        $s3, 0xAC($sp)
/* 33266C E001ED2C 8FB200A8 */  lw        $s2, 0xA8($sp)
/* 332670 E001ED30 8FB100A4 */  lw        $s1, 0xA4($sp)
/* 332674 E001ED34 8FB000A0 */  lw        $s0, 0xA0($sp)
/* 332678 E001ED38 D7B800D8 */  ldc1      $f24, 0xD8($sp)
/* 33267C E001ED3C D7B600D0 */  ldc1      $f22, 0xD0($sp)
/* 332680 E001ED40 D7B400C8 */  ldc1      $f20, 0xC8($sp)
/* 332684 E001ED44 03E00008 */  jr        $ra
/* 332688 E001ED48 27BD00E0 */   addiu    $sp, $sp, 0xE0
/* 33268C E001ED4C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void star_appendGfx(void* effect) {
    StarFXData* data = ((EffectInstance*)effect)->data.star;
    f32 unk_240 = data->unk_240;
    s32 unk_38 = data->unk_38;
    s32 unk_244 = data->unk_244;
    s32 unk_248 = data->unk_248;
    s32 unk_24C = data->unk_24C;
    s32 idx;
    Matrix4f sp20;
    Matrix4f sp60;
    s32 i;

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

    shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, unk_240, data->unk_04, data->unk_08, data->unk_0C);
    shim_guRotateF(sp60, data->unk_24, 0.0f, 0.0f, 1.0f);
    shim_guMtxCatF(sp60, sp20, sp20);
    shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
    gDPSetPrimColor(gMainGfxPos++, 0, 80, unk_244, unk_248, unk_24C, 255);
    gDPSetEnvColor(gMainGfxPos++, 127, 127, 127, 127);

    gSPDisplayList(gMainGfxPos++, (data->unk_38 >= 2) ? D_09001650_333CF0 : D_09001530_333BD0);
    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    gDPPipeSync(gMainGfxPos++);

    if (unk_38 == 3) {
        gSPDisplayList(gMainGfxPos++, D_090017D0_333E70);
    } else {
        gSPDisplayList(gMainGfxPos++, D_09001780_333E20);
    }

    data->unk_3C++;
    if (data->unk_3C >= 8) {
        data->unk_3C = 0;
    }

    if (data->unk_1C <= 1.0f) {
        s32 baseIdx = (data->unk_3C + 5) % 8;

        shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, unk_240, data->unk_04, data->unk_08, data->unk_0C);
        shim_guRotateF(sp60, data->unk_20, 0.0f, 0.0f, 1.0f);
        shim_guMtxCatF(sp60, sp20, sp20);
        shim_guMtxF2L(sp20, &data->unk_40[data->unk_3C]);

        for (i = 0; i < 5; i++) {
            idx = (baseIdx - i + 8) % 8;
            gDisplayContext->matrixStack[gMatrixListPos] = data->unk_40[idx];

            gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
            gSPVertex(gMainGfxPos++, &D_09001400_333AA0[i * 2], 2, i * 2);
            gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
        }

        for (i = 0; i < 4; i++) {
            s32 i2 = i * 2;
            gSP2Triangles(gMainGfxPos++,
                i2    , i2 + 1, i2 + 2, i2,
                i2 + 1, i2 + 3, i2 + 2, i2 + 1);
        }

        gDPPipeSync(gMainGfxPos++);
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel appendGfx_draw_prev_frame_buffer
/* CEE40 80138740 27BDFFB8 */  addiu     $sp, $sp, -0x48
/* CEE44 80138744 AFB50034 */  sw        $s5, 0x34($sp)
/* CEE48 80138748 0080A82D */  daddu     $s5, $a0, $zero
/* CEE4C 8013874C AFB40030 */  sw        $s4, 0x30($sp)
/* CEE50 80138750 00C0A02D */  daddu     $s4, $a2, $zero
/* CEE54 80138754 0000C02D */  daddu     $t8, $zero, $zero
/* CEE58 80138758 C7A00058 */  lwc1      $f0, 0x58($sp)
/* CEE5C 8013875C 02A0102D */  daddu     $v0, $s5, $zero
/* CEE60 80138760 AFBF0044 */  sw        $ra, 0x44($sp)
/* CEE64 80138764 AFBE0040 */  sw        $fp, 0x40($sp)
/* CEE68 80138768 AFB7003C */  sw        $s7, 0x3C($sp)
/* CEE6C 8013876C AFB60038 */  sw        $s6, 0x38($sp)
/* CEE70 80138770 AFB3002C */  sw        $s3, 0x2C($sp)
/* CEE74 80138774 AFB20028 */  sw        $s2, 0x28($sp)
/* CEE78 80138778 AFB10024 */  sw        $s1, 0x24($sp)
/* CEE7C 8013877C AFB00020 */  sw        $s0, 0x20($sp)
/* CEE80 80138780 06A10002 */  bgez      $s5, .L8013878C
/* CEE84 80138784 AFA5004C */   sw       $a1, 0x4C($sp)
/* CEE88 80138788 26A20003 */  addiu     $v0, $s5, 0x3
.L8013878C:
/* CEE8C 8013878C 00021083 */  sra       $v0, $v0, 2
/* CEE90 80138790 0002A880 */  sll       $s5, $v0, 2
/* CEE94 80138794 06810002 */  bgez      $s4, .L801387A0
/* CEE98 80138798 0280102D */   daddu    $v0, $s4, $zero
/* CEE9C 8013879C 26820003 */  addiu     $v0, $s4, 0x3
.L801387A0:
/* CEEA0 801387A0 3C032AAA */  lui       $v1, (0x2AAAAAAB >> 16)
/* CEEA4 801387A4 3463AAAB */  ori       $v1, $v1, (0x2AAAAAAB & 0xFFFF)
/* CEEA8 801387A8 00021083 */  sra       $v0, $v0, 2
/* CEEAC 801387AC 8FB9004C */  lw        $t9, 0x4C($sp)
/* CEEB0 801387B0 00021080 */  sll       $v0, $v0, 2
/* CEEB4 801387B4 00F92023 */  subu      $a0, $a3, $t9
/* CEEB8 801387B8 00830018 */  mult      $a0, $v1
/* CEEBC 801387BC 24540004 */  addiu     $s4, $v0, 0x4
/* CEEC0 801387C0 0000902D */  daddu     $s2, $zero, $zero
/* CEEC4 801387C4 3C058007 */  lui       $a1, %hi(nuGfxCfbNum)
/* CEEC8 801387C8 24A573F0 */  addiu     $a1, $a1, %lo(nuGfxCfbNum)
/* CEECC 801387CC 000417C3 */  sra       $v0, $a0, 31
/* CEED0 801387D0 0000C810 */  mfhi      $t9
/* CEED4 801387D4 0322C823 */  subu      $t9, $t9, $v0
/* CEED8 801387D8 AFB90010 */  sw        $t9, 0x10($sp)
/* CEEDC 801387DC 0320B82D */  daddu     $s7, $t9, $zero
/* CEEE0 801387E0 00171040 */  sll       $v0, $s7, 1
/* CEEE4 801387E4 00571021 */  addu      $v0, $v0, $s7
/* CEEE8 801387E8 00021040 */  sll       $v0, $v0, 1
/* CEEEC 801387EC 8CA30000 */  lw        $v1, 0x0($a1)
/* CEEF0 801387F0 00822023 */  subu      $a0, $a0, $v0
/* CEEF4 801387F4 1060001A */  beqz      $v1, .L80138860
/* CEEF8 801387F8 AFA40010 */   sw       $a0, 0x10($sp)
/* CEEFC 801387FC 00A0382D */  daddu     $a3, $a1, $zero
/* CEF00 80138800 3C05800A */  lui       $a1, %hi(nuGfxCfb)
/* CEF04 80138804 8CA5A658 */  lw        $a1, %lo(nuGfxCfb)($a1)
/* CEF08 80138808 3C06800A */  lui       $a2, %hi(nuGfxCfb_ptr)
/* CEF0C 8013880C 8CC6A64C */  lw        $a2, %lo(nuGfxCfb_ptr)($a2)
/* CEF10 80138810 00A0202D */  daddu     $a0, $a1, $zero
.L80138814:
/* CEF14 80138814 8C820000 */  lw        $v0, 0x0($a0)
/* CEF18 80138818 1446000B */  bne       $v0, $a2, .L80138848
/* CEF1C 8013881C 00000000 */   nop
/* CEF20 80138820 8CE30000 */  lw        $v1, 0x0($a3)
/* CEF24 80138824 02431021 */  addu      $v0, $s2, $v1
/* CEF28 80138828 2442FFFF */  addiu     $v0, $v0, -0x1
/* CEF2C 8013882C 14600002 */  bnez      $v1, .L80138838
/* CEF30 80138830 0043001B */   divu     $zero, $v0, $v1
/* CEF34 80138834 0007000D */  break     7
.L80138838:
/* CEF38 80138838 00001810 */  mfhi      $v1
/* CEF3C 8013883C 00031880 */  sll       $v1, $v1, 2
/* CEF40 80138840 00651821 */  addu      $v1, $v1, $a1
/* CEF44 80138844 8C780000 */  lw        $t8, 0x0($v1)
.L80138848:
/* CEF48 80138848 3C028007 */  lui       $v0, %hi(nuGfxCfbNum)
/* CEF4C 8013884C 8C4273F0 */  lw        $v0, %lo(nuGfxCfbNum)($v0)
/* CEF50 80138850 26520001 */  addiu     $s2, $s2, 0x1
/* CEF54 80138854 0242102B */  sltu      $v0, $s2, $v0
/* CEF58 80138858 1440FFEE */  bnez      $v0, .L80138814
/* CEF5C 8013885C 24840004 */   addiu    $a0, $a0, 0x4
.L80138860:
/* CEF60 80138860 3C05E300 */  lui       $a1, (0xE3000A01 >> 16)
/* CEF64 80138864 34A50A01 */  ori       $a1, $a1, (0xE3000A01 & 0xFFFF)
/* CEF68 80138868 3C08FCFF */  lui       $t0, (0xFCFFFFFF >> 16)
/* CEF6C 8013886C 3508FFFF */  ori       $t0, $t0, (0xFCFFFFFF & 0xFFFF)
/* CEF70 80138870 3C06FFFC */  lui       $a2, (0xFFFCF67B >> 16)
/* CEF74 80138874 34C6F67B */  ori       $a2, $a2, (0xFFFCF67B & 0xFFFF)
/* CEF78 80138878 3C09E200 */  lui       $t1, (0xE200001C >> 16)
/* CEF7C 8013887C 3529001C */  ori       $t1, $t1, (0xE200001C & 0xFFFF)
/* CEF80 80138880 3C070050 */  lui       $a3, (0x504340 >> 16)
/* CEF84 80138884 34E74340 */  ori       $a3, $a3, (0x504340 & 0xFFFF)
/* CEF88 80138888 3C0AE300 */  lui       $t2, (0xE3001801 >> 16)
/* CEF8C 8013888C 354A1801 */  ori       $t2, $t2, (0xE3001801 & 0xFFFF)
/* CEF90 80138890 3C0BE300 */  lui       $t3, (0xE3001A01 >> 16)
/* CEF94 80138894 356B1A01 */  ori       $t3, $t3, (0xE3001A01 & 0xFFFF)
/* CEF98 80138898 3C0CE300 */  lui       $t4, (0xE3001201 >> 16)
/* CEF9C 8013889C 358C1201 */  ori       $t4, $t4, (0xE3001201 & 0xFFFF)
/* CEFA0 801388A0 3C0DE300 */  lui       $t5, (0xE3000C00 >> 16)
/* CEFA4 801388A4 35AD0C00 */  ori       $t5, $t5, (0xE3000C00 & 0xFFFF)
/* CEFA8 801388A8 3C0ED700 */  lui       $t6, (0xD7000002 >> 16)
/* CEFAC 801388AC 35CE0002 */  ori       $t6, $t6, (0xD7000002 & 0xFFFF)
/* CEFB0 801388B0 3C0FE300 */  lui       $t7, (0xE3001001 >> 16)
/* CEFB4 801388B4 35EF1001 */  ori       $t7, $t7, (0xE3001001 & 0xFFFF)
/* CEFB8 801388B8 3C10E300 */  lui       $s0, (0xE3000D01 >> 16)
/* CEFBC 801388BC 36100D01 */  ori       $s0, $s0, (0xE3000D01 & 0xFFFF)
/* CEFC0 801388C0 3C11E300 */  lui       $s1, (0xE3000F00 >> 16)
/* CEFC4 801388C4 3C04800A */  lui       $a0, %hi(gMainGfxPos)
/* CEFC8 801388C8 2484A66C */  addiu     $a0, $a0, %lo(gMainGfxPos)
/* CEFCC 801388CC 36310F00 */  ori       $s1, $s1, (0xE3000F00 & 0xFFFF)
/* CEFD0 801388D0 8C820000 */  lw        $v0, 0x0($a0)
/* CEFD4 801388D4 3C014F00 */  lui       $at, (0x4F000000 >> 16)
/* CEFD8 801388D8 44811000 */  mtc1      $at, $f2
/* CEFDC 801388DC 0040182D */  daddu     $v1, $v0, $zero
/* CEFE0 801388E0 24420008 */  addiu     $v0, $v0, 0x8
/* CEFE4 801388E4 AC820000 */  sw        $v0, 0x0($a0)
/* CEFE8 801388E8 AC650000 */  sw        $a1, 0x0($v1)
/* CEFEC 801388EC AC600004 */  sw        $zero, 0x4($v1)
/* CEFF0 801388F0 24430008 */  addiu     $v1, $v0, 0x8
/* CEFF4 801388F4 AC830000 */  sw        $v1, 0x0($a0)
/* CEFF8 801388F8 24430010 */  addiu     $v1, $v0, 0x10
/* CEFFC 801388FC AC480000 */  sw        $t0, 0x0($v0)
/* CF000 80138900 AC460004 */  sw        $a2, 0x4($v0)
/* CF004 80138904 AC830000 */  sw        $v1, 0x0($a0)
/* CF008 80138908 24430018 */  addiu     $v1, $v0, 0x18
/* CF00C 8013890C AC490008 */  sw        $t1, 0x8($v0)
/* CF010 80138910 AC47000C */  sw        $a3, 0xC($v0)
/* CF014 80138914 AC830000 */  sw        $v1, 0x0($a0)
/* CF018 80138918 240300C0 */  addiu     $v1, $zero, 0xC0
/* CF01C 8013891C AC430014 */  sw        $v1, 0x14($v0)
/* CF020 80138920 24430020 */  addiu     $v1, $v0, 0x20
/* CF024 80138924 AC4A0010 */  sw        $t2, 0x10($v0)
/* CF028 80138928 AC830000 */  sw        $v1, 0x0($a0)
/* CF02C 8013892C 24030020 */  addiu     $v1, $zero, 0x20
/* CF030 80138930 AC43001C */  sw        $v1, 0x1C($v0)
/* CF034 80138934 24430028 */  addiu     $v1, $v0, 0x28
/* CF038 80138938 AC4B0018 */  sw        $t3, 0x18($v0)
/* CF03C 8013893C AC830000 */  sw        $v1, 0x0($a0)
/* CF040 80138940 24430030 */  addiu     $v1, $v0, 0x30
/* CF044 80138944 AC4C0020 */  sw        $t4, 0x20($v0)
/* CF048 80138948 AC400024 */  sw        $zero, 0x24($v0)
/* CF04C 8013894C AC830000 */  sw        $v1, 0x0($a0)
/* CF050 80138950 24430038 */  addiu     $v1, $v0, 0x38
/* CF054 80138954 AC4D0028 */  sw        $t5, 0x28($v0)
/* CF058 80138958 AC40002C */  sw        $zero, 0x2C($v0)
/* CF05C 8013895C AC830000 */  sw        $v1, 0x0($a0)
/* CF060 80138960 2403FFFF */  addiu     $v1, $zero, -0x1
/* CF064 80138964 AC430034 */  sw        $v1, 0x34($v0)
/* CF068 80138968 24430040 */  addiu     $v1, $v0, 0x40
/* CF06C 8013896C AC4E0030 */  sw        $t6, 0x30($v0)
/* CF070 80138970 AC830000 */  sw        $v1, 0x0($a0)
/* CF074 80138974 24430048 */  addiu     $v1, $v0, 0x48
/* CF078 80138978 AC4F0038 */  sw        $t7, 0x38($v0)
/* CF07C 8013897C AC40003C */  sw        $zero, 0x3C($v0)
/* CF080 80138980 AC830000 */  sw        $v1, 0x0($a0)
/* CF084 80138984 24430050 */  addiu     $v1, $v0, 0x50
/* CF088 80138988 AC500040 */  sw        $s0, 0x40($v0)
/* CF08C 8013898C AC400044 */  sw        $zero, 0x44($v0)
/* CF090 80138990 AC830000 */  sw        $v1, 0x0($a0)
/* CF094 80138994 24430058 */  addiu     $v1, $v0, 0x58
/* CF098 80138998 AC510048 */  sw        $s1, 0x48($v0)
/* CF09C 8013899C AC40004C */  sw        $zero, 0x4C($v0)
/* CF0A0 801389A0 AC830000 */  sw        $v1, 0x0($a0)
/* CF0A4 801389A4 3C03FA00 */  lui       $v1, (0xFA000000 >> 16)
/* CF0A8 801389A8 24440054 */  addiu     $a0, $v0, 0x54
/* CF0AC 801389AC 4600103E */  c.le.s    $f2, $f0
/* CF0B0 801389B0 00000000 */  nop
/* CF0B4 801389B4 45010005 */  bc1t      .L801389CC
/* CF0B8 801389B8 AC430050 */   sw       $v1, 0x50($v0)
/* CF0BC 801389BC 4600010D */  trunc.w.s $f4, $f0
/* CF0C0 801389C0 44032000 */  mfc1      $v1, $f4
/* CF0C4 801389C4 0804E27A */  j         .L801389E8
/* CF0C8 801389C8 2402FF00 */   addiu    $v0, $zero, -0x100
.L801389CC:
/* CF0CC 801389CC 46020001 */  sub.s     $f0, $f0, $f2
/* CF0D0 801389D0 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* CF0D4 801389D4 4600010D */  trunc.w.s $f4, $f0
/* CF0D8 801389D8 44032000 */  mfc1      $v1, $f4
/* CF0DC 801389DC 00000000 */  nop
/* CF0E0 801389E0 00621825 */  or        $v1, $v1, $v0
/* CF0E4 801389E4 2402FF00 */  addiu     $v0, $zero, -0x100
.L801389E8:
/* CF0E8 801389E8 00621025 */  or        $v0, $v1, $v0
/* CF0EC 801389EC AC820000 */  sw        $v0, 0x0($a0)
/* CF0F0 801389F0 1AE0006D */  blez      $s7, .L80138BA8
/* CF0F4 801389F4 0000902D */   daddu    $s2, $zero, $zero
/* CF0F8 801389F8 3C11800A */  lui       $s1, %hi(gMainGfxPos)
/* CF0FC 801389FC 2631A66C */  addiu     $s1, $s1, %lo(gMainGfxPos)
/* CF100 80138A00 02951023 */  subu      $v0, $s4, $s5
/* CF104 80138A04 00021040 */  sll       $v0, $v0, 1
/* CF108 80138A08 24420007 */  addiu     $v0, $v0, 0x7
/* CF10C 80138A0C 000210C3 */  sra       $v0, $v0, 3
/* CF110 80138A10 304201FF */  andi      $v0, $v0, 0x1FF
/* CF114 80138A14 00021240 */  sll       $v0, $v0, 9
/* CF118 80138A18 3C03F510 */  lui       $v1, (0xF5100000 >> 16)
/* CF11C 80138A1C 0043B025 */  or        $s6, $v0, $v1
/* CF120 80138A20 3C1E0700 */  lui       $fp, (0x7000000 >> 16)
/* CF124 80138A24 8FB3004C */  lw        $s3, 0x4C($sp)
/* CF128 80138A28 3C03FD10 */  lui       $v1, (0xFD10013F >> 16)
.L80138A2C:
/* CF12C 80138A2C 3463013F */  ori       $v1, $v1, (0xFD10013F & 0xFFFF)
/* CF130 80138A30 0300202D */  daddu     $a0, $t8, $zero
/* CF134 80138A34 8E220000 */  lw        $v0, 0x0($s1)
/* CF138 80138A38 26520001 */  addiu     $s2, $s2, 0x1
/* CF13C 80138A3C 0040802D */  daddu     $s0, $v0, $zero
/* CF140 80138A40 24420008 */  addiu     $v0, $v0, 0x8
/* CF144 80138A44 AE220000 */  sw        $v0, 0x0($s1)
/* CF148 80138A48 AE030000 */  sw        $v1, 0x0($s0)
/* CF14C 80138A4C 0C0187A4 */  jal       osVirtualToPhysical
/* CF150 80138A50 AFB80018 */   sw       $t8, 0x18($sp)
/* CF154 80138A54 3C090400 */  lui       $t1, (0x4000400 >> 16)
/* CF158 80138A58 35290400 */  ori       $t1, $t1, (0x4000400 & 0xFFFF)
/* CF15C 80138A5C 00133880 */  sll       $a3, $s3, 2
/* CF160 80138A60 26640005 */  addiu     $a0, $s3, 0x5
/* CF164 80138A64 26630006 */  addiu     $v1, $s3, 0x6
/* CF168 80138A68 00134140 */  sll       $t0, $s3, 5
/* CF16C 80138A6C 0060982D */  daddu     $s3, $v1, $zero
/* CF170 80138A70 00153080 */  sll       $a2, $s5, 2
/* CF174 80138A74 30C60FFF */  andi      $a2, $a2, 0xFFF
/* CF178 80138A78 00063300 */  sll       $a2, $a2, 12
/* CF17C 80138A7C 30E70FFF */  andi      $a3, $a3, 0xFFF
/* CF180 80138A80 2683FFFF */  addiu     $v1, $s4, -0x1
/* CF184 80138A84 00031880 */  sll       $v1, $v1, 2
/* CF188 80138A88 30630FFF */  andi      $v1, $v1, 0xFFF
/* CF18C 80138A8C 00031B00 */  sll       $v1, $v1, 12
/* CF190 80138A90 00042080 */  sll       $a0, $a0, 2
/* CF194 80138A94 30840FFF */  andi      $a0, $a0, 0xFFF
/* CF198 80138A98 8E250000 */  lw        $a1, 0x0($s1)
/* CF19C 80138A9C 3108FFFF */  andi      $t0, $t0, 0xFFFF
/* CF1A0 80138AA0 AE020004 */  sw        $v0, 0x4($s0)
/* CF1A4 80138AA4 00A0102D */  daddu     $v0, $a1, $zero
/* CF1A8 80138AA8 24A50008 */  addiu     $a1, $a1, 0x8
/* CF1AC 80138AAC AE250000 */  sw        $a1, 0x0($s1)
/* CF1B0 80138AB0 AC560000 */  sw        $s6, 0x0($v0)
/* CF1B4 80138AB4 AC5E0004 */  sw        $fp, 0x4($v0)
/* CF1B8 80138AB8 24A20008 */  addiu     $v0, $a1, 0x8
/* CF1BC 80138ABC AE220000 */  sw        $v0, 0x0($s1)
/* CF1C0 80138AC0 3C02E600 */  lui       $v0, (0xE6000000 >> 16)
/* CF1C4 80138AC4 ACA20000 */  sw        $v0, 0x0($a1)
/* CF1C8 80138AC8 24A20010 */  addiu     $v0, $a1, 0x10
/* CF1CC 80138ACC ACA00004 */  sw        $zero, 0x4($a1)
/* CF1D0 80138AD0 AE220000 */  sw        $v0, 0x0($s1)
/* CF1D4 80138AD4 3C02F400 */  lui       $v0, (0xF4000000 >> 16)
/* CF1D8 80138AD8 00E21025 */  or        $v0, $a3, $v0
/* CF1DC 80138ADC 00C21025 */  or        $v0, $a2, $v0
/* CF1E0 80138AE0 ACA20008 */  sw        $v0, 0x8($a1)
/* CF1E4 80138AE4 009E1025 */  or        $v0, $a0, $fp
/* CF1E8 80138AE8 00621025 */  or        $v0, $v1, $v0
/* CF1EC 80138AEC ACA2000C */  sw        $v0, 0xC($a1)
/* CF1F0 80138AF0 24A20018 */  addiu     $v0, $a1, 0x18
/* CF1F4 80138AF4 AE220000 */  sw        $v0, 0x0($s1)
/* CF1F8 80138AF8 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* CF1FC 80138AFC ACA20010 */  sw        $v0, 0x10($a1)
/* CF200 80138B00 24A20020 */  addiu     $v0, $a1, 0x20
/* CF204 80138B04 ACA00014 */  sw        $zero, 0x14($a1)
/* CF208 80138B08 AE220000 */  sw        $v0, 0x0($s1)
/* CF20C 80138B0C 24A20028 */  addiu     $v0, $a1, 0x28
/* CF210 80138B10 ACB60018 */  sw        $s6, 0x18($a1)
/* CF214 80138B14 ACA0001C */  sw        $zero, 0x1C($a1)
/* CF218 80138B18 AE220000 */  sw        $v0, 0x0($s1)
/* CF21C 80138B1C 3C02F200 */  lui       $v0, (0xF2000000 >> 16)
/* CF220 80138B20 00E21025 */  or        $v0, $a3, $v0
/* CF224 80138B24 00C21025 */  or        $v0, $a2, $v0
/* CF228 80138B28 00641825 */  or        $v1, $v1, $a0
/* CF22C 80138B2C ACA20020 */  sw        $v0, 0x20($a1)
/* CF230 80138B30 24A20030 */  addiu     $v0, $a1, 0x30
/* CF234 80138B34 ACA30024 */  sw        $v1, 0x24($a1)
/* CF238 80138B38 00141880 */  sll       $v1, $s4, 2
/* CF23C 80138B3C 30630FFF */  andi      $v1, $v1, 0xFFF
/* CF240 80138B40 00031B00 */  sll       $v1, $v1, 12
/* CF244 80138B44 AE220000 */  sw        $v0, 0x0($s1)
/* CF248 80138B48 00131080 */  sll       $v0, $s3, 2
/* CF24C 80138B4C 30420FFF */  andi      $v0, $v0, 0xFFF
/* CF250 80138B50 3C04E400 */  lui       $a0, (0xE4000000 >> 16)
/* CF254 80138B54 00441025 */  or        $v0, $v0, $a0
/* CF258 80138B58 00621825 */  or        $v1, $v1, $v0
/* CF25C 80138B5C 00C73025 */  or        $a2, $a2, $a3
/* CF260 80138B60 24A20038 */  addiu     $v0, $a1, 0x38
/* CF264 80138B64 ACA30028 */  sw        $v1, 0x28($a1)
/* CF268 80138B68 ACA6002C */  sw        $a2, 0x2C($a1)
/* CF26C 80138B6C AE220000 */  sw        $v0, 0x0($s1)
/* CF270 80138B70 3C02E100 */  lui       $v0, (0xE1000000 >> 16)
/* CF274 80138B74 ACA20030 */  sw        $v0, 0x30($a1)
/* CF278 80138B78 00151540 */  sll       $v0, $s5, 21
/* CF27C 80138B7C 00481025 */  or        $v0, $v0, $t0
/* CF280 80138B80 ACA20034 */  sw        $v0, 0x34($a1)
/* CF284 80138B84 24A20040 */  addiu     $v0, $a1, 0x40
/* CF288 80138B88 AE220000 */  sw        $v0, 0x0($s1)
/* CF28C 80138B8C 3C02F100 */  lui       $v0, (0xF1000000 >> 16)
/* CF290 80138B90 ACA20038 */  sw        $v0, 0x38($a1)
/* CF294 80138B94 0257102A */  slt       $v0, $s2, $s7
/* CF298 80138B98 ACA9003C */  sw        $t1, 0x3C($a1)
/* CF29C 80138B9C 8FB80018 */  lw        $t8, 0x18($sp)
/* CF2A0 80138BA0 1440FFA2 */  bnez      $v0, .L80138A2C
/* CF2A4 80138BA4 3C03FD10 */   lui      $v1, (0xFD10013F >> 16)
.L80138BA8:
/* CF2A8 80138BA8 8FB90010 */  lw        $t9, 0x10($sp)
/* CF2AC 80138BAC 1320006A */  beqz      $t9, .L80138D58
/* CF2B0 80138BB0 3C03FD10 */   lui      $v1, (0xFD10013F >> 16)
/* CF2B4 80138BB4 3463013F */  ori       $v1, $v1, (0xFD10013F & 0xFFFF)
/* CF2B8 80138BB8 3C10800A */  lui       $s0, %hi(gMainGfxPos)
/* CF2BC 80138BBC 2610A66C */  addiu     $s0, $s0, %lo(gMainGfxPos)
/* CF2C0 80138BC0 8E020000 */  lw        $v0, 0x0($s0)
/* CF2C4 80138BC4 0300202D */  daddu     $a0, $t8, $zero
/* CF2C8 80138BC8 0040882D */  daddu     $s1, $v0, $zero
/* CF2CC 80138BCC 24420008 */  addiu     $v0, $v0, 0x8
/* CF2D0 80138BD0 AE020000 */  sw        $v0, 0x0($s0)
/* CF2D4 80138BD4 0C0187A4 */  jal       osVirtualToPhysical
/* CF2D8 80138BD8 AE230000 */   sw       $v1, 0x0($s1)
/* CF2DC 80138BDC 3C0C0400 */  lui       $t4, (0x4000400 >> 16)
/* CF2E0 80138BE0 358C0400 */  ori       $t4, $t4, (0x4000400 & 0xFFFF)
/* CF2E4 80138BE4 02952823 */  subu      $a1, $s4, $s5
/* CF2E8 80138BE8 00052840 */  sll       $a1, $a1, 1
/* CF2EC 80138BEC 24A50007 */  addiu     $a1, $a1, 0x7
/* CF2F0 80138BF0 000528C3 */  sra       $a1, $a1, 3
/* CF2F4 80138BF4 30A501FF */  andi      $a1, $a1, 0x1FF
/* CF2F8 80138BF8 8E040000 */  lw        $a0, 0x0($s0)
/* CF2FC 80138BFC 00052A40 */  sll       $a1, $a1, 9
/* CF300 80138C00 AE220004 */  sw        $v0, 0x4($s1)
/* CF304 80138C04 3C02F510 */  lui       $v0, (0xF5100000 >> 16)
/* CF308 80138C08 00A22825 */  or        $a1, $a1, $v0
/* CF30C 80138C0C 3C0A0700 */  lui       $t2, (0x7000000 >> 16)
/* CF310 80138C10 00154880 */  sll       $t1, $s5, 2
/* CF314 80138C14 31290FFF */  andi      $t1, $t1, 0xFFF
/* CF318 80138C18 00094B00 */  sll       $t1, $t1, 12
/* CF31C 80138C1C 00123840 */  sll       $a3, $s2, 1
/* CF320 80138C20 00F23821 */  addu      $a3, $a3, $s2
/* CF324 80138C24 00073840 */  sll       $a3, $a3, 1
/* CF328 80138C28 0080182D */  daddu     $v1, $a0, $zero
/* CF32C 80138C2C 24840008 */  addiu     $a0, $a0, 0x8
/* CF330 80138C30 24820008 */  addiu     $v0, $a0, 0x8
/* CF334 80138C34 AE040000 */  sw        $a0, 0x0($s0)
/* CF338 80138C38 AC650000 */  sw        $a1, 0x0($v1)
/* CF33C 80138C3C AC6A0004 */  sw        $t2, 0x4($v1)
/* CF340 80138C40 AE020000 */  sw        $v0, 0x0($s0)
/* CF344 80138C44 3C02E600 */  lui       $v0, (0xE6000000 >> 16)
/* CF348 80138C48 AC820000 */  sw        $v0, 0x0($a0)
/* CF34C 80138C4C 24820010 */  addiu     $v0, $a0, 0x10
/* CF350 80138C50 AC800004 */  sw        $zero, 0x4($a0)
/* CF354 80138C54 AE020000 */  sw        $v0, 0x0($s0)
/* CF358 80138C58 3C02F400 */  lui       $v0, (0xF4000000 >> 16)
/* CF35C 80138C5C 2683FFFF */  addiu     $v1, $s4, -0x1
/* CF360 80138C60 00031880 */  sll       $v1, $v1, 2
/* CF364 80138C64 30630FFF */  andi      $v1, $v1, 0xFFF
/* CF368 80138C68 8FB9004C */  lw        $t9, 0x4C($sp)
/* CF36C 80138C6C 00031B00 */  sll       $v1, $v1, 12
/* CF370 80138C70 03273821 */  addu      $a3, $t9, $a3
/* CF374 80138C74 00075880 */  sll       $t3, $a3, 2
/* CF378 80138C78 316B0FFF */  andi      $t3, $t3, 0xFFF
/* CF37C 80138C7C 01621025 */  or        $v0, $t3, $v0
/* CF380 80138C80 01221025 */  or        $v0, $t1, $v0
/* CF384 80138C84 AC820008 */  sw        $v0, 0x8($a0)
/* CF388 80138C88 8FB90010 */  lw        $t9, 0x10($sp)
/* CF38C 80138C8C 24820018 */  addiu     $v0, $a0, 0x18
/* CF390 80138C90 00F93021 */  addu      $a2, $a3, $t9
/* CF394 80138C94 24C8FFFF */  addiu     $t0, $a2, -0x1
/* CF398 80138C98 00084080 */  sll       $t0, $t0, 2
/* CF39C 80138C9C 31080FFF */  andi      $t0, $t0, 0xFFF
/* CF3A0 80138CA0 010A5025 */  or        $t2, $t0, $t2
/* CF3A4 80138CA4 006A5025 */  or        $t2, $v1, $t2
/* CF3A8 80138CA8 AC8A000C */  sw        $t2, 0xC($a0)
/* CF3AC 80138CAC AE020000 */  sw        $v0, 0x0($s0)
/* CF3B0 80138CB0 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* CF3B4 80138CB4 AC820010 */  sw        $v0, 0x10($a0)
/* CF3B8 80138CB8 24820020 */  addiu     $v0, $a0, 0x20
/* CF3BC 80138CBC AC800014 */  sw        $zero, 0x14($a0)
/* CF3C0 80138CC0 AE020000 */  sw        $v0, 0x0($s0)
/* CF3C4 80138CC4 24820028 */  addiu     $v0, $a0, 0x28
/* CF3C8 80138CC8 AC850018 */  sw        $a1, 0x18($a0)
/* CF3CC 80138CCC AC80001C */  sw        $zero, 0x1C($a0)
/* CF3D0 80138CD0 AE020000 */  sw        $v0, 0x0($s0)
/* CF3D4 80138CD4 3C02F200 */  lui       $v0, (0xF2000000 >> 16)
/* CF3D8 80138CD8 01621025 */  or        $v0, $t3, $v0
/* CF3DC 80138CDC 01221025 */  or        $v0, $t1, $v0
/* CF3E0 80138CE0 00681825 */  or        $v1, $v1, $t0
/* CF3E4 80138CE4 AC820020 */  sw        $v0, 0x20($a0)
/* CF3E8 80138CE8 24820030 */  addiu     $v0, $a0, 0x30
/* CF3EC 80138CEC AC830024 */  sw        $v1, 0x24($a0)
/* CF3F0 80138CF0 AE020000 */  sw        $v0, 0x0($s0)
/* CF3F4 80138CF4 00141080 */  sll       $v0, $s4, 2
/* CF3F8 80138CF8 30420FFF */  andi      $v0, $v0, 0xFFF
/* CF3FC 80138CFC 00021300 */  sll       $v0, $v0, 12
/* CF400 80138D00 00063080 */  sll       $a2, $a2, 2
/* CF404 80138D04 30C60FFF */  andi      $a2, $a2, 0xFFF
/* CF408 80138D08 3C03E400 */  lui       $v1, (0xE4000000 >> 16)
/* CF40C 80138D0C 00C33025 */  or        $a2, $a2, $v1
/* CF410 80138D10 00461025 */  or        $v0, $v0, $a2
/* CF414 80138D14 012B4825 */  or        $t1, $t1, $t3
/* CF418 80138D18 AC820028 */  sw        $v0, 0x28($a0)
/* CF41C 80138D1C 24820038 */  addiu     $v0, $a0, 0x38
/* CF420 80138D20 AC89002C */  sw        $t1, 0x2C($a0)
/* CF424 80138D24 AE020000 */  sw        $v0, 0x0($s0)
/* CF428 80138D28 3C02E100 */  lui       $v0, (0xE1000000 >> 16)
/* CF42C 80138D2C AC820030 */  sw        $v0, 0x30($a0)
/* CF430 80138D30 00151540 */  sll       $v0, $s5, 21
/* CF434 80138D34 00073940 */  sll       $a3, $a3, 5
/* CF438 80138D38 30E7FFFF */  andi      $a3, $a3, 0xFFFF
/* CF43C 80138D3C 00471025 */  or        $v0, $v0, $a3
/* CF440 80138D40 AC820034 */  sw        $v0, 0x34($a0)
/* CF444 80138D44 24820040 */  addiu     $v0, $a0, 0x40
/* CF448 80138D48 AE020000 */  sw        $v0, 0x0($s0)
/* CF44C 80138D4C 3C02F100 */  lui       $v0, (0xF1000000 >> 16)
/* CF450 80138D50 AC820038 */  sw        $v0, 0x38($a0)
/* CF454 80138D54 AC8C003C */  sw        $t4, 0x3C($a0)
.L80138D58:
/* CF458 80138D58 8FBF0044 */  lw        $ra, 0x44($sp)
/* CF45C 80138D5C 8FBE0040 */  lw        $fp, 0x40($sp)
/* CF460 80138D60 8FB7003C */  lw        $s7, 0x3C($sp)
/* CF464 80138D64 8FB60038 */  lw        $s6, 0x38($sp)
/* CF468 80138D68 8FB50034 */  lw        $s5, 0x34($sp)
/* CF46C 80138D6C 8FB40030 */  lw        $s4, 0x30($sp)
/* CF470 80138D70 8FB3002C */  lw        $s3, 0x2C($sp)
/* CF474 80138D74 8FB20028 */  lw        $s2, 0x28($sp)
/* CF478 80138D78 8FB10024 */  lw        $s1, 0x24($sp)
/* CF47C 80138D7C 8FB00020 */  lw        $s0, 0x20($sp)
/* CF480 80138D80 03E00008 */  jr        $ra
/* CF484 80138D84 27BD0048 */   addiu    $sp, $sp, 0x48

### DECOMPILED C INSTRUCTIONS:

void appendGfx_draw_prev_frame_buffer(s32 x1, s32 y1, s32 x2, s32 y2, f32 alpha) {
    s32 stripY, extraY;
    s32 i;
    u16* prevGfxCfb = NULL;

    // round the x positions
    x1 = x1 - (x1 % 4);
    x2 = x2 - (x2 % 4) + 4;
    // can only load 6 rows of the color buffer at a time: 320*6*2 = 3840 bytes of the 4096 capacity
    stripY = (y2 - y1) / 6;
    extraY = (y2 - y1) % 6;

    // get previous color buffer
    for (i = 0; i < nuGfxCfbNum; i++) {
        if (nuGfxCfb[i] == nuGfxCfb_ptr) {
            prevGfxCfb = nuGfxCfb[(i + nuGfxCfbNum - 1) % nuGfxCfbNum];
        }
    }

    gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
    gDPSetCombineMode(gMainGfxPos++, PM_CC_10, PM_CC_10);
    gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
    gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE);
    gDPSetAlphaDither(gMainGfxPos++, G_AD_NOISE);
    gDPSetTextureFilter(gMainGfxPos++, G_TF_POINT);
    gDPSetTexturePersp(gMainGfxPos++, G_TP_NONE);
    gSPTexture(gMainGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
    gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
    gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP);
    gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE);
    gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, alpha);

    for (i = 0; i < stripY; i++) {
        gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(prevGfxCfb), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 6,
                           x1, y1 + i * 6, x2 - 1, y1 + i * 6 + 5, 0,
                           G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
        gSPTextureRectangle(gMainGfxPos++, x1 * 4, (y1 + i * 6) * 4, x2 * 4, (y1 + i * 6 + 6) * 4,
                            G_TX_RENDERTILE, x1 * 32, (y1 + i * 6) * 32, 1024, 1024);
    }

    if (extraY != 0) {
        gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(prevGfxCfb), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, extraY,
                           x1, y1 + i * 6, x2 - 1, y1 + i * 6 + extraY - 1, 0,
                           G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
        gSPTextureRectangle(gMainGfxPos++, x1 * 4, (y1 + i * 6) * 4, x2 * 4, (y1 + i * 6 + extraY) * 4,
                            G_TX_RENDERTILE, x1 * 32, (y1 + i * 6) * 32, 1024, 1024);
    }
}