### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_8025C120
/* 18AA00 8025C120 27BDFFC0 */  addiu     $sp, $sp, -0x40
/* 18AA04 8025C124 AFB40028 */  sw        $s4, 0x28($sp)
/* 18AA08 8025C128 0080A02D */  daddu     $s4, $a0, $zero
/* 18AA0C 8025C12C AFB30024 */  sw        $s3, 0x24($sp)
/* 18AA10 8025C130 00A0982D */  daddu     $s3, $a1, $zero
/* 18AA14 8025C134 AFB5002C */  sw        $s5, 0x2C($sp)
/* 18AA18 8025C138 00C0A82D */  daddu     $s5, $a2, $zero
/* 18AA1C 8025C13C AFBF0038 */  sw        $ra, 0x38($sp)
/* 18AA20 8025C140 AFB70034 */  sw        $s7, 0x34($sp)
/* 18AA24 8025C144 AFB60030 */  sw        $s6, 0x30($sp)
/* 18AA28 8025C148 AFB20020 */  sw        $s2, 0x20($sp)
/* 18AA2C 8025C14C AFB1001C */  sw        $s1, 0x1C($sp)
/* 18AA30 8025C150 AFB00018 */  sw        $s0, 0x18($sp)
/* 18AA34 8025C154 8E7000C0 */  lw        $s0, 0xC0($s3)
/* 18AA38 8025C158 820206C1 */  lb        $v0, 0x6C1($s0)
/* 18AA3C 8025C15C 8FB20050 */  lw        $s2, 0x50($sp)
/* 18AA40 8025C160 10400055 */  beqz      $v0, .L8025C2B8
/* 18AA44 8025C164 00E0B02D */   daddu    $s6, $a3, $zero
/* 18AA48 8025C168 16800016 */  bnez      $s4, .L8025C1C4
/* 18AA4C 8025C16C 00000000 */   nop
/* 18AA50 8025C170 0C0B7830 */  jal       spr_get_player_palettes
/* 18AA54 8025C174 96640088 */   lhu      $a0, 0x88($s3)
/* 18AA58 8025C178 AE0206D0 */  sw        $v0, 0x6D0($s0)
/* 18AA5C 8025C17C 0040202D */  daddu     $a0, $v0, $zero
/* 18AA60 8025C180 A20006CD */  sb        $zero, 0x6CD($s0)
/* 18AA64 8025C184 8C830000 */  lw        $v1, 0x0($a0)
/* 18AA68 8025C188 2402FFFF */  addiu     $v0, $zero, -0x1
/* 18AA6C 8025C18C 10620023 */  beq       $v1, $v0, .L8025C21C
/* 18AA70 8025C190 0080182D */   daddu    $v1, $a0, $zero
/* 18AA74 8025C194 0040202D */  daddu     $a0, $v0, $zero
.L8025C198:
/* 18AA78 8025C198 920206CD */  lbu       $v0, 0x6CD($s0)
/* 18AA7C 8025C19C 24420001 */  addiu     $v0, $v0, 0x1
/* 18AA80 8025C1A0 A20206CD */  sb        $v0, 0x6CD($s0)
/* 18AA84 8025C1A4 00021600 */  sll       $v0, $v0, 24
/* 18AA88 8025C1A8 00021583 */  sra       $v0, $v0, 22
/* 18AA8C 8025C1AC 00431021 */  addu      $v0, $v0, $v1
/* 18AA90 8025C1B0 8C420000 */  lw        $v0, 0x0($v0)
/* 18AA94 8025C1B4 10440019 */  beq       $v0, $a0, .L8025C21C
/* 18AA98 8025C1B8 00000000 */   nop
/* 18AA9C 8025C1BC 08097066 */  j         .L8025C198
/* 18AAA0 8025C1C0 00000000 */   nop
.L8025C1C4:
/* 18AAA4 8025C1C4 0C0B7A90 */  jal       spr_get_npc_palettes
/* 18AAA8 8025C1C8 96640088 */   lhu      $a0, 0x88($s3)
/* 18AAAC 8025C1CC AE0206D0 */  sw        $v0, 0x6D0($s0)
/* 18AAB0 8025C1D0 0040202D */  daddu     $a0, $v0, $zero
/* 18AAB4 8025C1D4 A20006CD */  sb        $zero, 0x6CD($s0)
/* 18AAB8 8025C1D8 8C830000 */  lw        $v1, 0x0($a0)
/* 18AABC 8025C1DC 2402FFFF */  addiu     $v0, $zero, -0x1
/* 18AAC0 8025C1E0 1062000B */  beq       $v1, $v0, .L8025C210
/* 18AAC4 8025C1E4 0080182D */   daddu    $v1, $a0, $zero
/* 18AAC8 8025C1E8 0040202D */  daddu     $a0, $v0, $zero
.L8025C1EC:
/* 18AACC 8025C1EC 920206CD */  lbu       $v0, 0x6CD($s0)
/* 18AAD0 8025C1F0 24420001 */  addiu     $v0, $v0, 0x1
/* 18AAD4 8025C1F4 A20206CD */  sb        $v0, 0x6CD($s0)
/* 18AAD8 8025C1F8 00021600 */  sll       $v0, $v0, 24
/* 18AADC 8025C1FC 00021583 */  sra       $v0, $v0, 22
/* 18AAE0 8025C200 00431021 */  addu      $v0, $v0, $v1
/* 18AAE4 8025C204 8C420000 */  lw        $v0, 0x0($v0)
/* 18AAE8 8025C208 1444FFF8 */  bne       $v0, $a0, .L8025C1EC
/* 18AAEC 8025C20C 00000000 */   nop
.L8025C210:
/* 18AAF0 8025C210 0C0B7A9B */  jal       spr_get_npc_color_variations
/* 18AAF4 8025C214 96640088 */   lhu      $a0, 0x88($s3)
/* 18AAF8 8025C218 A20206CC */  sb        $v0, 0x6CC($s0)
.L8025C21C:
/* 18AAFC 8025C21C 820306C1 */  lb        $v1, 0x6C1($s0)
/* 18AB00 8025C220 24020001 */  addiu     $v0, $zero, 0x1
/* 18AB04 8025C224 14620004 */  bne       $v1, $v0, .L8025C238
/* 18AB08 8025C228 240200FF */   addiu    $v0, $zero, 0xFF
/* 18AB0C 8025C22C A20006C2 */  sb        $zero, 0x6C2($s0)
/* 18AB10 8025C230 08097090 */  j         .L8025C240
/* 18AB14 8025C234 A60006CA */   sh       $zero, 0x6CA($s0)
.L8025C238:
/* 18AB18 8025C238 A20006C2 */  sb        $zero, 0x6C2($s0)
/* 18AB1C 8025C23C A60206CA */  sh        $v0, 0x6CA($s0)
.L8025C240:
/* 18AB20 8025C240 820206CD */  lb        $v0, 0x6CD($s0)
/* 18AB24 8025C244 18400017 */  blez      $v0, .L8025C2A4
/* 18AB28 8025C248 0000602D */   daddu    $t4, $zero, $zero
/* 18AB2C 8025C24C 0200202D */  daddu     $a0, $s0, $zero
.L8025C250:
/* 18AB30 8025C250 8E0206D0 */  lw        $v0, 0x6D0($s0)
/* 18AB34 8025C254 000C1880 */  sll       $v1, $t4, 2
/* 18AB38 8025C258 00621821 */  addu      $v1, $v1, $v0
/* 18AB3C 8025C25C 000C1140 */  sll       $v0, $t4, 5
/* 18AB40 8025C260 8C6B0000 */  lw        $t3, 0x0($v1)
/* 18AB44 8025C264 02024821 */  addu      $t1, $s0, $v0
/* 18AB48 8025C268 11600009 */  beqz      $t3, .L8025C290
/* 18AB4C 8025C26C AC8906D4 */   sw       $t1, 0x6D4($a0)
/* 18AB50 8025C270 0000502D */  daddu     $t2, $zero, $zero
.L8025C274:
/* 18AB54 8025C274 95620000 */  lhu       $v0, 0x0($t3)
/* 18AB58 8025C278 256B0002 */  addiu     $t3, $t3, 0x2
/* 18AB5C 8025C27C 254A0001 */  addiu     $t2, $t2, 0x1
/* 18AB60 8025C280 A5220000 */  sh        $v0, 0x0($t1)
/* 18AB64 8025C284 29420010 */  slti      $v0, $t2, 0x10
/* 18AB68 8025C288 1440FFFA */  bnez      $v0, .L8025C274
/* 18AB6C 8025C28C 25290002 */   addiu    $t1, $t1, 0x2
.L8025C290:
/* 18AB70 8025C290 820206CD */  lb        $v0, 0x6CD($s0)
/* 18AB74 8025C294 258C0001 */  addiu     $t4, $t4, 0x1
/* 18AB78 8025C298 0182102A */  slt       $v0, $t4, $v0
/* 18AB7C 8025C29C 1440FFEC */  bnez      $v0, .L8025C250
/* 18AB80 8025C2A0 24840004 */   addiu    $a0, $a0, 0x4
.L8025C2A4:
/* 18AB84 8025C2A4 96020744 */  lhu       $v0, 0x744($s0)
/* 18AB88 8025C2A8 A60006CA */  sh        $zero, 0x6CA($s0)
/* 18AB8C 8025C2AC A20006C2 */  sb        $zero, 0x6C2($s0)
/* 18AB90 8025C2B0 A20006C1 */  sb        $zero, 0x6C1($s0)
/* 18AB94 8025C2B4 A60206C8 */  sh        $v0, 0x6C8($s0)
.L8025C2B8:
/* 18AB98 8025C2B8 820306C2 */  lb        $v1, 0x6C2($s0)
/* 18AB9C 8025C2BC 10600005 */  beqz      $v1, .L8025C2D4
/* 18ABA0 8025C2C0 24020001 */   addiu    $v0, $zero, 0x1
/* 18ABA4 8025C2C4 1062000E */  beq       $v1, $v0, .L8025C300
/* 18ABA8 8025C2C8 24020002 */   addiu    $v0, $zero, 0x2
/* 18ABAC 8025C2CC 08097156 */  j         .L8025C558
/* 18ABB0 8025C2D0 00000000 */   nop
.L8025C2D4:
/* 18ABB4 8025C2D4 1640009E */  bnez      $s2, .L8025C550
/* 18ABB8 8025C2D8 00000000 */   nop
/* 18ABBC 8025C2DC 860206C8 */  lh        $v0, 0x6C8($s0)
/* 18ABC0 8025C2E0 960306C8 */  lhu       $v1, 0x6C8($s0)
/* 18ABC4 8025C2E4 10400003 */  beqz      $v0, .L8025C2F4
/* 18ABC8 8025C2E8 2462FFFF */   addiu    $v0, $v1, -0x1
/* 18ABCC 8025C2EC 08097154 */  j         .L8025C550
/* 18ABD0 8025C2F0 A60206C8 */   sh       $v0, 0x6C8($s0)
.L8025C2F4:
/* 18ABD4 8025C2F4 24020001 */  addiu     $v0, $zero, 0x1
/* 18ABD8 8025C2F8 A60006CA */  sh        $zero, 0x6CA($s0)
/* 18ABDC 8025C2FC A20206C2 */  sb        $v0, 0x6C2($s0)
.L8025C300:
/* 18ABE0 8025C300 16400018 */  bnez      $s2, .L8025C364
/* 18ABE4 8025C304 3C0451EB */   lui      $a0, (0x51EB851F >> 16)
/* 18ABE8 8025C308 86020746 */  lh        $v0, 0x746($s0)
/* 18ABEC 8025C30C 24036400 */  addiu     $v1, $zero, 0x6400
/* 18ABF0 8025C310 14400002 */  bnez      $v0, .L8025C31C
/* 18ABF4 8025C314 0062001A */   div      $zero, $v1, $v0
/* 18ABF8 8025C318 0007000D */  break     7
.L8025C31C:
/* 18ABFC 8025C31C 2401FFFF */  addiu     $at, $zero, -0x1
/* 18AC00 8025C320 14410004 */  bne       $v0, $at, .L8025C334
/* 18AC04 8025C324 3C018000 */   lui      $at, (0x80000000 >> 16)
/* 18AC08 8025C328 14610002 */  bne       $v1, $at, .L8025C334
/* 18AC0C 8025C32C 00000000 */   nop
/* 18AC10 8025C330 0006000D */  break     6
.L8025C334:
/* 18AC14 8025C334 00001812 */  mflo      $v1
/* 18AC18 8025C338 960206CA */  lhu       $v0, 0x6CA($s0)
/* 18AC1C 8025C33C 00431021 */  addu      $v0, $v0, $v1
/* 18AC20 8025C340 A60206CA */  sh        $v0, 0x6CA($s0)
/* 18AC24 8025C344 00021400 */  sll       $v0, $v0, 16
/* 18AC28 8025C348 00021403 */  sra       $v0, $v0, 16
/* 18AC2C 8025C34C 2842639D */  slti      $v0, $v0, 0x639D
/* 18AC30 8025C350 14400005 */  bnez      $v0, .L8025C368
/* 18AC34 8025C354 3484851F */   ori      $a0, $a0, (0x51EB851F & 0xFFFF)
/* 18AC38 8025C358 2402639C */  addiu     $v0, $zero, 0x639C
/* 18AC3C 8025C35C A60206CA */  sh        $v0, 0x6CA($s0)
/* 18AC40 8025C360 3C0451EB */  lui       $a0, (0x51EB851F >> 16)
.L8025C364:
/* 18AC44 8025C364 3484851F */  ori       $a0, $a0, (0x51EB851F & 0xFFFF)
.L8025C368:
/* 18AC48 8025C368 960306CA */  lhu       $v1, 0x6CA($s0)
/* 18AC4C 8025C36C 00031C00 */  sll       $v1, $v1, 16
/* 18AC50 8025C370 00031403 */  sra       $v0, $v1, 16
/* 18AC54 8025C374 00440018 */  mult      $v0, $a0
/* 18AC58 8025C378 0000602D */  daddu     $t4, $zero, $zero
/* 18AC5C 8025C37C 920506CC */  lbu       $a1, 0x6CC($s0)
/* 18AC60 8025C380 00031FC3 */  sra       $v1, $v1, 31
/* 18AC64 8025C384 820206CC */  lb        $v0, 0x6CC($s0)
/* 18AC68 8025C388 0000B810 */  mfhi      $s7
/* 18AC6C 8025C38C 00172143 */  sra       $a0, $s7, 5
/* 18AC70 8025C390 18400068 */  blez      $v0, .L8025C534
/* 18AC74 8025C394 00838823 */   subu     $s1, $a0, $v1
/* 18AC78 8025C398 322E00FF */  andi      $t6, $s1, 0xFF
/* 18AC7C 8025C39C 240200FF */  addiu     $v0, $zero, 0xFF
/* 18AC80 8025C3A0 004EC023 */  subu      $t8, $v0, $t6
/* 18AC84 8025C3A4 3C0F8080 */  lui       $t7, (0x80808081 >> 16)
/* 18AC88 8025C3A8 35EF8081 */  ori       $t7, $t7, (0x80808081 & 0xFFFF)
/* 18AC8C 8025C3AC 0200C82D */  daddu     $t9, $s0, $zero
.L8025C3B0:
/* 18AC90 8025C3B0 00052600 */  sll       $a0, $a1, 24
/* 18AC94 8025C3B4 86020740 */  lh        $v0, 0x740($s0)
/* 18AC98 8025C3B8 00042603 */  sra       $a0, $a0, 24
/* 18AC9C 8025C3BC 00440018 */  mult      $v0, $a0
/* 18ACA0 8025C3C0 86030742 */  lh        $v1, 0x742($s0)
/* 18ACA4 8025C3C4 000C1140 */  sll       $v0, $t4, 5
D_8025C3C8:
/* 18ACA8 8025C3C8 0000B812 */  mflo      $s7
/* 18ACAC 8025C3CC 02026821 */  addu      $t5, $s0, $v0
/* 18ACB0 8025C3D0 02EC1021 */  addu      $v0, $s7, $t4
/* 18ACB4 8025C3D4 00640018 */  mult      $v1, $a0
/* 18ACB8 8025C3D8 8E0306D0 */  lw        $v1, 0x6D0($s0)
/* 18ACBC 8025C3DC 00021080 */  sll       $v0, $v0, 2
/* 18ACC0 8025C3E0 00431021 */  addu      $v0, $v0, $v1
/* 18ACC4 8025C3E4 8C4B0000 */  lw        $t3, 0x0($v0)
/* 18ACC8 8025C3E8 0000B812 */  mflo      $s7
/* 18ACCC 8025C3EC 02EC1021 */  addu      $v0, $s7, $t4
/* 18ACD0 8025C3F0 00021080 */  sll       $v0, $v0, 2
/* 18ACD4 8025C3F4 00431021 */  addu      $v0, $v0, $v1
/* 18ACD8 8025C3F8 8C490000 */  lw        $t1, 0x0($v0)
/* 18ACDC 8025C3FC 0000502D */  daddu     $t2, $zero, $zero
/* 18ACE0 8025C400 AF2D06D4 */  sw        $t5, 0x6D4($t9)
.L8025C404:
/* 18ACE4 8025C404 95630000 */  lhu       $v1, 0x0($t3)
/* 18ACE8 8025C408 000312C2 */  srl       $v0, $v1, 11
/* 18ACEC 8025C40C 00580018 */  mult      $v0, $t8
/* 18ACF0 8025C410 95240000 */  lhu       $a0, 0x0($t1)
/* 18ACF4 8025C414 00002812 */  mflo      $a1
/* 18ACF8 8025C418 000412C2 */  srl       $v0, $a0, 11
/* 18ACFC 8025C41C 00000000 */  nop
/* 18AD00 8025C420 004E0018 */  mult      $v0, $t6
/* 18AD04 8025C424 00004012 */  mflo      $t0
/* 18AD08 8025C428 00A82821 */  addu      $a1, $a1, $t0
/* 18AD0C 8025C42C 00000000 */  nop
/* 18AD10 8025C430 00AF0018 */  mult      $a1, $t7
/* 18AD14 8025C434 0000B810 */  mfhi      $s7
/* 18AD18 8025C438 00031182 */  srl       $v0, $v1, 6
/* 18AD1C 8025C43C 3042001F */  andi      $v0, $v0, 0x1F
/* 18AD20 8025C440 00580018 */  mult      $v0, $t8
/* 18AD24 8025C444 00004012 */  mflo      $t0
/* 18AD28 8025C448 00041182 */  srl       $v0, $a0, 6
/* 18AD2C 8025C44C 3042001F */  andi      $v0, $v0, 0x1F
/* 18AD30 8025C450 004E0018 */  mult      $v0, $t6
/* 18AD34 8025C454 00003812 */  mflo      $a3
/* 18AD38 8025C458 00031842 */  srl       $v1, $v1, 1
/* 18AD3C 8025C45C 3063001F */  andi      $v1, $v1, 0x1F
/* 18AD40 8025C460 00780018 */  mult      $v1, $t8
/* 18AD44 8025C464 256B0002 */  addiu     $t3, $t3, 0x2
/* 18AD48 8025C468 254A0001 */  addiu     $t2, $t2, 0x1
/* 18AD4C 8025C46C 00042042 */  srl       $a0, $a0, 1
/* 18AD50 8025C470 00001812 */  mflo      $v1
/* 18AD54 8025C474 3084001F */  andi      $a0, $a0, 0x1F
/* 18AD58 8025C478 AFB70010 */  sw        $s7, 0x10($sp)
/* 18AD5C 8025C47C 008E0018 */  mult      $a0, $t6
/* 18AD60 8025C480 91260001 */  lbu       $a2, 0x1($t1)
/* 18AD64 8025C484 25290002 */  addiu     $t1, $t1, 0x2
/* 18AD68 8025C488 30C60001 */  andi      $a2, $a2, 0x1
/* 18AD6C 8025C48C 01072021 */  addu      $a0, $t0, $a3
/* 18AD70 8025C490 0000B812 */  mflo      $s7
/* 18AD74 8025C494 AFB70014 */  sw        $s7, 0x14($sp)
/* 18AD78 8025C498 8FB70010 */  lw        $s7, 0x10($sp)
/* 18AD7C 8025C49C 008F0018 */  mult      $a0, $t7
/* 18AD80 8025C4A0 02E51021 */  addu      $v0, $s7, $a1
/* 18AD84 8025C4A4 000211C3 */  sra       $v0, $v0, 7
/* 18AD88 8025C4A8 00052FC3 */  sra       $a1, $a1, 31
/* 18AD8C 8025C4AC 8FB70014 */  lw        $s7, 0x14($sp)
/* 18AD90 8025C4B0 00004010 */  mfhi      $t0
/* 18AD94 8025C4B4 00453823 */  subu      $a3, $v0, $a1
/* 18AD98 8025C4B8 00771821 */  addu      $v1, $v1, $s7
/* 18AD9C 8025C4BC 006F0018 */  mult      $v1, $t7
/* 18ADA0 8025C4C0 01041021 */  addu      $v0, $t0, $a0
/* 18ADA4 8025C4C4 000211C3 */  sra       $v0, $v0, 7
/* 18ADA8 8025C4C8 000427C3 */  sra       $a0, $a0, 31
/* 18ADAC 8025C4CC 00442823 */  subu      $a1, $v0, $a0
/* 18ADB0 8025C4D0 0000B810 */  mfhi      $s7
/* 18ADB4 8025C4D4 AFB70010 */  sw        $s7, 0x10($sp)
/* 18ADB8 8025C4D8 02E31021 */  addu      $v0, $s7, $v1
/* 18ADBC 8025C4DC 000211C3 */  sra       $v0, $v0, 7
/* 18ADC0 8025C4E0 00031FC3 */  sra       $v1, $v1, 31
/* 18ADC4 8025C4E4 00432023 */  subu      $a0, $v0, $v1
/* 18ADC8 8025C4E8 30E300FF */  andi      $v1, $a3, 0xFF
/* 18ADCC 8025C4EC 00031AC0 */  sll       $v1, $v1, 11
/* 18ADD0 8025C4F0 30A200FF */  andi      $v0, $a1, 0xFF
/* 18ADD4 8025C4F4 00021180 */  sll       $v0, $v0, 6
/* 18ADD8 8025C4F8 00621825 */  or        $v1, $v1, $v0
/* 18ADDC 8025C4FC 308200FF */  andi      $v0, $a0, 0xFF
/* 18ADE0 8025C500 00021040 */  sll       $v0, $v0, 1
/* 18ADE4 8025C504 00621825 */  or        $v1, $v1, $v0
/* 18ADE8 8025C508 00C33025 */  or        $a2, $a2, $v1
/* 18ADEC 8025C50C A5A60000 */  sh        $a2, 0x0($t5)
/* 18ADF0 8025C510 29420010 */  slti      $v0, $t2, 0x10
/* 18ADF4 8025C514 1440FFBB */  bnez      $v0, .L8025C404
/* 18ADF8 8025C518 25AD0002 */   addiu    $t5, $t5, 0x2
/* 18ADFC 8025C51C 258C0001 */  addiu     $t4, $t4, 0x1
/* 18AE00 8025C520 820206CC */  lb        $v0, 0x6CC($s0)
/* 18AE04 8025C524 920506CC */  lbu       $a1, 0x6CC($s0)
/* 18AE08 8025C528 0182102A */  slt       $v0, $t4, $v0
/* 18AE0C 8025C52C 1440FFA0 */  bnez      $v0, .L8025C3B0
/* 18AE10 8025C530 27390004 */   addiu    $t9, $t9, 0x4
.L8025C534:
/* 18AE14 8025C534 322300FF */  andi      $v1, $s1, 0xFF
/* 18AE18 8025C538 240200FF */  addiu     $v0, $zero, 0xFF
D_8025C53C:
/* 18AE1C 8025C53C 14620004 */  bne       $v1, $v0, .L8025C550
/* 18AE20 8025C540 24020002 */   addiu    $v0, $zero, 0x2
/* 18AE24 8025C544 96030748 */  lhu       $v1, 0x748($s0)
/* 18AE28 8025C548 A20206C2 */  sb        $v0, 0x6C2($s0)
/* 18AE2C 8025C54C A60306C8 */  sh        $v1, 0x6C8($s0)
.L8025C550:
/* 18AE30 8025C550 820306C2 */  lb        $v1, 0x6C2($s0)
/* 18AE34 8025C554 24020002 */  addiu     $v0, $zero, 0x2
.L8025C558:
/* 18AE38 8025C558 10620005 */  beq       $v1, $v0, .L8025C570
/* 18AE3C 8025C55C 24020003 */   addiu    $v0, $zero, 0x3
/* 18AE40 8025C560 1062000C */  beq       $v1, $v0, .L8025C594
/* 18AE44 8025C564 00000000 */   nop
/* 18AE48 8025C568 080971F5 */  j         .L8025C7D4
/* 18AE4C 8025C56C 00000000 */   nop
.L8025C570:
/* 18AE50 8025C570 16400098 */  bnez      $s2, .L8025C7D4
/* 18AE54 8025C574 00000000 */   nop
/* 18AE58 8025C578 860206C8 */  lh        $v0, 0x6C8($s0)
/* 18AE5C 8025C57C 960306C8 */  lhu       $v1, 0x6C8($s0)
/* 18AE60 8025C580 14400093 */  bnez      $v0, .L8025C7D0
/* 18AE64 8025C584 2462FFFF */   addiu    $v0, $v1, -0x1
/* 18AE68 8025C588 24020003 */  addiu     $v0, $zero, 0x3
/* 18AE6C 8025C58C A60006CA */  sh        $zero, 0x6CA($s0)
/* 18AE70 8025C590 A20206C2 */  sb        $v0, 0x6C2($s0)
.L8025C594:
/* 18AE74 8025C594 16400018 */  bnez      $s2, .L8025C5F8
/* 18AE78 8025C598 3C0451EB */   lui      $a0, (0x51EB851F >> 16)
/* 18AE7C 8025C59C 8602074A */  lh        $v0, 0x74A($s0)
/* 18AE80 8025C5A0 24036400 */  addiu     $v1, $zero, 0x6400
/* 18AE84 8025C5A4 14400002 */  bnez      $v0, .L8025C5B0
/* 18AE88 8025C5A8 0062001A */   div      $zero, $v1, $v0
/* 18AE8C 8025C5AC 0007000D */  break     7
.L8025C5B0:
/* 18AE90 8025C5B0 2401FFFF */  addiu     $at, $zero, -0x1
/* 18AE94 8025C5B4 14410004 */  bne       $v0, $at, .L8025C5C8
/* 18AE98 8025C5B8 3C018000 */   lui      $at, (0x80000000 >> 16)
/* 18AE9C 8025C5BC 14610002 */  bne       $v1, $at, .L8025C5C8
/* 18AEA0 8025C5C0 00000000 */   nop
/* 18AEA4 8025C5C4 0006000D */  break     6
.L8025C5C8:
/* 18AEA8 8025C5C8 00001812 */  mflo      $v1
/* 18AEAC 8025C5CC 960206CA */  lhu       $v0, 0x6CA($s0)
/* 18AEB0 8025C5D0 00431021 */  addu      $v0, $v0, $v1
D_8025C5D4:
/* 18AEB4 8025C5D4 A60206CA */  sh        $v0, 0x6CA($s0)
/* 18AEB8 8025C5D8 00021400 */  sll       $v0, $v0, 16
/* 18AEBC 8025C5DC 00021403 */  sra       $v0, $v0, 16
/* 18AEC0 8025C5E0 2842639D */  slti      $v0, $v0, 0x639D
/* 18AEC4 8025C5E4 14400005 */  bnez      $v0, .L8025C5FC
/* 18AEC8 8025C5E8 3484851F */   ori      $a0, $a0, (0x51EB851F & 0xFFFF)
/* 18AECC 8025C5EC 2402639C */  addiu     $v0, $zero, 0x639C
/* 18AED0 8025C5F0 A60206CA */  sh        $v0, 0x6CA($s0)
/* 18AED4 8025C5F4 3C0451EB */  lui       $a0, (0x51EB851F >> 16)
.L8025C5F8:
/* 18AED8 8025C5F8 3484851F */  ori       $a0, $a0, (0x51EB851F & 0xFFFF)
.L8025C5FC:
/* 18AEDC 8025C5FC 960306CA */  lhu       $v1, 0x6CA($s0)
/* 18AEE0 8025C600 00031C00 */  sll       $v1, $v1, 16
/* 18AEE4 8025C604 00031403 */  sra       $v0, $v1, 16
/* 18AEE8 8025C608 00440018 */  mult      $v0, $a0
/* 18AEEC 8025C60C 0000602D */  daddu     $t4, $zero, $zero
/* 18AEF0 8025C610 920506CC */  lbu       $a1, 0x6CC($s0)
/* 18AEF4 8025C614 00031FC3 */  sra       $v1, $v1, 31
/* 18AEF8 8025C618 820206CC */  lb        $v0, 0x6CC($s0)
/* 18AEFC 8025C61C 0000B810 */  mfhi      $s7
/* 18AF00 8025C620 00172143 */  sra       $a0, $s7, 5
/* 18AF04 8025C624 18400064 */  blez      $v0, .L8025C7B8
/* 18AF08 8025C628 00838823 */   subu     $s1, $a0, $v1
/* 18AF0C 8025C62C 322E00FF */  andi      $t6, $s1, 0xFF
/* 18AF10 8025C630 240200FF */  addiu     $v0, $zero, 0xFF
/* 18AF14 8025C634 004EC023 */  subu      $t8, $v0, $t6
/* 18AF18 8025C638 3C0F8080 */  lui       $t7, (0x80808081 >> 16)
/* 18AF1C 8025C63C 35EF8081 */  ori       $t7, $t7, (0x80808081 & 0xFFFF)
/* 18AF20 8025C640 0200C82D */  daddu     $t9, $s0, $zero
.L8025C644:
/* 18AF24 8025C644 00052600 */  sll       $a0, $a1, 24
/* 18AF28 8025C648 86020740 */  lh        $v0, 0x740($s0)
/* 18AF2C 8025C64C 00042603 */  sra       $a0, $a0, 24
/* 18AF30 8025C650 00440018 */  mult      $v0, $a0
/* 18AF34 8025C654 86030742 */  lh        $v1, 0x742($s0)
/* 18AF38 8025C658 000C1140 */  sll       $v0, $t4, 5
/* 18AF3C 8025C65C 0000B812 */  mflo      $s7
/* 18AF40 8025C660 02026821 */  addu      $t5, $s0, $v0
/* 18AF44 8025C664 02EC1021 */  addu      $v0, $s7, $t4
/* 18AF48 8025C668 00640018 */  mult      $v1, $a0
/* 18AF4C 8025C66C 8E0306D0 */  lw        $v1, 0x6D0($s0)
/* 18AF50 8025C670 00021080 */  sll       $v0, $v0, 2
/* 18AF54 8025C674 00431021 */  addu      $v0, $v0, $v1
/* 18AF58 8025C678 8C4B0000 */  lw        $t3, 0x0($v0)
/* 18AF5C 8025C67C 0000B812 */  mflo      $s7
/* 18AF60 8025C680 02EC1021 */  addu      $v0, $s7, $t4
/* 18AF64 8025C684 00021080 */  sll       $v0, $v0, 2
/* 18AF68 8025C688 00431021 */  addu      $v0, $v0, $v1
/* 18AF6C 8025C68C 8C490000 */  lw        $t1, 0x0($v0)
/* 18AF70 8025C690 0000502D */  daddu     $t2, $zero, $zero
/* 18AF74 8025C694 AF2D06D4 */  sw        $t5, 0x6D4($t9)
.L8025C698:
/* 18AF78 8025C698 95630000 */  lhu       $v1, 0x0($t3)
/* 18AF7C 8025C69C 000312C2 */  srl       $v0, $v1, 11
/* 18AF80 8025C6A0 00580018 */  mult      $v0, $t8
/* 18AF84 8025C6A4 95240000 */  lhu       $a0, 0x0($t1)
/* 18AF88 8025C6A8 00002812 */  mflo      $a1
/* 18AF8C 8025C6AC 000412C2 */  srl       $v0, $a0, 11
/* 18AF90 8025C6B0 00000000 */  nop
/* 18AF94 8025C6B4 004E0018 */  mult      $v0, $t6
/* 18AF98 8025C6B8 00004012 */  mflo      $t0
/* 18AF9C 8025C6BC 00A82821 */  addu      $a1, $a1, $t0
/* 18AFA0 8025C6C0 00000000 */  nop
/* 18AFA4 8025C6C4 00AF0018 */  mult      $a1, $t7
/* 18AFA8 8025C6C8 00009010 */  mfhi      $s2
/* 18AFAC 8025C6CC 00031182 */  srl       $v0, $v1, 6
/* 18AFB0 8025C6D0 3042001F */  andi      $v0, $v0, 0x1F
/* 18AFB4 8025C6D4 00580018 */  mult      $v0, $t8
/* 18AFB8 8025C6D8 00004012 */  mflo      $t0
/* 18AFBC 8025C6DC 00041182 */  srl       $v0, $a0, 6
/* 18AFC0 8025C6E0 3042001F */  andi      $v0, $v0, 0x1F
/* 18AFC4 8025C6E4 004E0018 */  mult      $v0, $t6
/* 18AFC8 8025C6E8 00003812 */  mflo      $a3
/* 18AFCC 8025C6EC 00031842 */  srl       $v1, $v1, 1
/* 18AFD0 8025C6F0 3063001F */  andi      $v1, $v1, 0x1F
/* 18AFD4 8025C6F4 00780018 */  mult      $v1, $t8
/* 18AFD8 8025C6F8 00001812 */  mflo      $v1
/* 18AFDC 8025C6FC 00042042 */  srl       $a0, $a0, 1
/* 18AFE0 8025C700 3084001F */  andi      $a0, $a0, 0x1F
/* 18AFE4 8025C704 008E0018 */  mult      $a0, $t6
/* 18AFE8 8025C708 256B0002 */  addiu     $t3, $t3, 0x2
/* 18AFEC 8025C70C 91260001 */  lbu       $a2, 0x1($t1)
/* 18AFF0 8025C710 25290002 */  addiu     $t1, $t1, 0x2
/* 18AFF4 8025C714 254A0001 */  addiu     $t2, $t2, 0x1
/* 18AFF8 8025C718 0000B812 */  mflo      $s7
/* 18AFFC 8025C71C 30C60001 */  andi      $a2, $a2, 0x1
/* 18B000 8025C720 01072021 */  addu      $a0, $t0, $a3
/* 18B004 8025C724 008F0018 */  mult      $a0, $t7
/* 18B008 8025C728 02451021 */  addu      $v0, $s2, $a1
/* 18B00C 8025C72C 000211C3 */  sra       $v0, $v0, 7
/* 18B010 8025C730 00052FC3 */  sra       $a1, $a1, 31
/* 18B014 8025C734 00453823 */  subu      $a3, $v0, $a1
/* 18B018 8025C738 00004010 */  mfhi      $t0
/* 18B01C 8025C73C AFB70014 */  sw        $s7, 0x14($sp)
/* 18B020 8025C740 00771821 */  addu      $v1, $v1, $s7
/* 18B024 8025C744 006F0018 */  mult      $v1, $t7
/* 18B028 8025C748 01041021 */  addu      $v0, $t0, $a0
/* 18B02C 8025C74C 000211C3 */  sra       $v0, $v0, 7
/* 18B030 8025C750 000427C3 */  sra       $a0, $a0, 31
/* 18B034 8025C754 00442823 */  subu      $a1, $v0, $a0
/* 18B038 8025C758 00009010 */  mfhi      $s2
/* 18B03C 8025C75C 02431021 */  addu      $v0, $s2, $v1
/* 18B040 8025C760 000211C3 */  sra       $v0, $v0, 7
/* 18B044 8025C764 00031FC3 */  sra       $v1, $v1, 31
/* 18B048 8025C768 00432023 */  subu      $a0, $v0, $v1
/* 18B04C 8025C76C 30E300FF */  andi      $v1, $a3, 0xFF
/* 18B050 8025C770 00031AC0 */  sll       $v1, $v1, 11
/* 18B054 8025C774 30A200FF */  andi      $v0, $a1, 0xFF
/* 18B058 8025C778 00021180 */  sll       $v0, $v0, 6
/* 18B05C 8025C77C 00621825 */  or        $v1, $v1, $v0
/* 18B060 8025C780 308200FF */  andi      $v0, $a0, 0xFF
/* 18B064 8025C784 00021040 */  sll       $v0, $v0, 1
/* 18B068 8025C788 00621825 */  or        $v1, $v1, $v0
/* 18B06C 8025C78C 00C33025 */  or        $a2, $a2, $v1
/* 18B070 8025C790 A5A60000 */  sh        $a2, 0x0($t5)
/* 18B074 8025C794 29420010 */  slti      $v0, $t2, 0x10
/* 18B078 8025C798 1440FFBF */  bnez      $v0, .L8025C698
/* 18B07C 8025C79C 25AD0002 */   addiu    $t5, $t5, 0x2
/* 18B080 8025C7A0 258C0001 */  addiu     $t4, $t4, 0x1
/* 18B084 8025C7A4 820206CC */  lb        $v0, 0x6CC($s0)
/* 18B088 8025C7A8 920506CC */  lbu       $a1, 0x6CC($s0)
/* 18B08C 8025C7AC 0182102A */  slt       $v0, $t4, $v0
/* 18B090 8025C7B0 1440FFA4 */  bnez      $v0, .L8025C644
/* 18B094 8025C7B4 27390004 */   addiu    $t9, $t9, 0x4
.L8025C7B8:
/* 18B098 8025C7B8 322300FF */  andi      $v1, $s1, 0xFF
/* 18B09C 8025C7BC 240200FF */  addiu     $v0, $zero, 0xFF
/* 18B0A0 8025C7C0 14620004 */  bne       $v1, $v0, .L8025C7D4
/* 18B0A4 8025C7C4 00000000 */   nop
/* 18B0A8 8025C7C8 96020744 */  lhu       $v0, 0x744($s0)
/* 18B0AC 8025C7CC A20006C2 */  sb        $zero, 0x6C2($s0)
.L8025C7D0:
/* 18B0B0 8025C7D0 A60206C8 */  sh        $v0, 0x6C8($s0)
.L8025C7D4:
/* 18B0B4 8025C7D4 820306C2 */  lb        $v1, 0x6C2($s0)
/* 18B0B8 8025C7D8 28620004 */  slti      $v0, $v1, 0x4
/* 18B0BC 8025C7DC 1040000D */  beqz      $v0, .L8025C814
/* 18B0C0 8025C7E0 00000000 */   nop
/* 18B0C4 8025C7E4 0460000B */  bltz      $v1, .L8025C814
/* 18B0C8 8025C7E8 00000000 */   nop
/* 18B0CC 8025C7EC 16800006 */  bnez      $s4, .L8025C808
/* 18B0D0 8025C7F0 0260202D */   daddu    $a0, $s3, $zero
/* 18B0D4 8025C7F4 02A0282D */  daddu     $a1, $s5, $zero
/* 18B0D8 8025C7F8 0C096657 */  jal       func_8025995C
/* 18B0DC 8025C7FC 02C0302D */   daddu    $a2, $s6, $zero
/* 18B0E0 8025C800 08097205 */  j         .L8025C814
/* 18B0E4 8025C804 00000000 */   nop
.L8025C808:
/* 18B0E8 8025C808 02A0282D */  daddu     $a1, $s5, $zero
/* 18B0EC 8025C80C 0C0965B0 */  jal       func_802596C0
/* 18B0F0 8025C810 02C0302D */   daddu    $a2, $s6, $zero
.L8025C814:
/* 18B0F4 8025C814 8FBF0038 */  lw        $ra, 0x38($sp)
/* 18B0F8 8025C818 8FB70034 */  lw        $s7, 0x34($sp)
/* 18B0FC 8025C81C 8FB60030 */  lw        $s6, 0x30($sp)
/* 18B100 8025C820 8FB5002C */  lw        $s5, 0x2C($sp)
/* 18B104 8025C824 8FB40028 */  lw        $s4, 0x28($sp)
/* 18B108 8025C828 8FB30024 */  lw        $s3, 0x24($sp)
/* 18B10C 8025C82C 8FB20020 */  lw        $s2, 0x20($sp)
/* 18B110 8025C830 8FB1001C */  lw        $s1, 0x1C($sp)
/* 18B114 8025C834 8FB00018 */  lw        $s0, 0x18($sp)
/* 18B118 8025C838 03E00008 */  jr        $ra
/* 18B11C 8025C83C 27BD0040 */   addiu    $sp, $sp, 0x40

### DECOMPILED C INSTRUCTIONS:

void render_with_palset_blending(b32 isNpcSprite, ActorPart* part, s32 yaw, Matrix4f mtx, b32 skipAnimation) {
    DecorationTable* decor = part->decorationTable;
    PAL_PTR color1;
    PAL_PTR color2;
    PAL_PTR outColor;
    s32 i, j;
    u8 blendAlpha;
    u8 r2, g2, b2, a1;
    u8 r1, g1, b1;

    if (decor->resetPalAdjust != 0) {
        if (isNpcSprite == SPRITE_MODE_PLAYER) {
            decor->originalPalettesList = spr_get_player_palettes(part->currentAnimation >> 16);
            decor->originalPalettesCount = 0;
            while (decor->originalPalettesList[decor->originalPalettesCount] != (PAL_PTR) -1) {
                decor->originalPalettesCount++;
            }
        } else {
            decor->originalPalettesList = spr_get_npc_palettes(part->currentAnimation >> 16);
            decor->originalPalettesCount = 0;
            while (decor->originalPalettesList[decor->originalPalettesCount] != (PAL_PTR) -1) {
                decor->originalPalettesCount++;
            }
            decor->spriteColorVariations = spr_get_npc_color_variations(part->currentAnimation >> 16);
        }

        if (decor->resetPalAdjust == 1) {
            decor->palAnimState = 0;
            decor->palBlendAlpha = 0;
        } else {
            decor->palAnimState = 0;
            decor->palBlendAlpha = 255;
        }

         for (i = 0; i < decor->originalPalettesCount; i++) {
            color2 = decor->originalPalettesList[i];
            color1 = decor->copiedPalettes[0][i];
            decor->adjustedPalettes[i] = color1;
            if (color2 != NULL) {
                for (j = 0; j < SPR_PAL_SIZE; j++) {
                    *color1++ = *color2++;
                }
            }
        }

        decor->nextPalTime = decor->palswapTimeHoldA;
        decor->palBlendAlpha = 0;
        decor->palAnimState = PAL_SWAP_HOLD_A;
        decor->resetPalAdjust = FALSE;
    }

    // blending from A -> B
    switch (decor->palAnimState) {
        case PAL_SWAP_HOLD_A:
            if (skipAnimation) {
                break;
            }
            if (decor->nextPalTime != 0) {
                decor->nextPalTime--;
                break;
            }
            decor->palBlendAlpha = 0;
            decor->palAnimState = PAL_SWAP_A_TO_B;
            // fallthrough
        case PAL_SWAP_A_TO_B:
            if (!skipAnimation) {
                decor->palBlendAlpha += 25600 / decor->palswapTimeAtoB;
                if (decor->palBlendAlpha > 255 * 100) {
                    decor->palBlendAlpha = 255 * 100;
                }
            }
            blendAlpha = decor->palBlendAlpha / 100;
            // blend all palettes from two palette sets
            for (i = 0; i < decor->spriteColorVariations; i++) {
                color2 = decor->originalPalettesList[decor->blendPalA * decor->spriteColorVariations + i];
                color1 = decor->originalPalettesList[decor->blendPalB * decor->spriteColorVariations + i];
                outColor = decor->copiedPalettes[0][i];
                decor->adjustedPalettes[i] = outColor;

                for (j = 0; j < SPR_PAL_SIZE; j++) {
                    r2 = UNPACK_PAL_R(*color2);
                    g2 = UNPACK_PAL_G(*color2);
                    b2 = UNPACK_PAL_B(*color2);
                    r1 = UNPACK_PAL_R(*color1);
                    g1 = UNPACK_PAL_G(*color1);
                    b1 = UNPACK_PAL_B(*color1);
                    a1 = UNPACK_PAL_A(*color1);
                    color2++;
                    color1++;

                    r1 = LERP_COMPONENT(r2, r1, blendAlpha);
                    g1 = LERP_COMPONENT(g2, g1, blendAlpha);
                    b1 = LERP_COMPONENT(b2, b1, blendAlpha);

                    *outColor++ = PACK_PAL_RGBA(r1, g1, b1, a1);
                }
            }
            if (blendAlpha == 255) {
                decor->palAnimState = PAL_SWAP_HOLD_B;
                decor->nextPalTime = decor->palswapTimeHoldB;
            }
            break;
    }

    switch (decor->palAnimState) {
        case PAL_SWAP_HOLD_B:
            if (skipAnimation) {
                break;
            }
            if (decor->nextPalTime != 0) {
                decor->nextPalTime--;
                break;
            }
            decor->palBlendAlpha = 0;
            decor->palAnimState = PAL_SWAP_B_TO_A;
            // fallthrough
        case PAL_SWAP_B_TO_A:
            if (!skipAnimation) {
                decor->palBlendAlpha += 25600 / decor->palswapTimeBtoA;
                if (decor->palBlendAlpha > 255 * 100) {
                    decor->palBlendAlpha = 255 * 100;
                }
            }
            blendAlpha = decor->palBlendAlpha / 100;
            // blend all palettes from two palette sets
            for (i = 0; i < decor->spriteColorVariations; i++) {
                color2 = decor->originalPalettesList[decor->blendPalA * decor->spriteColorVariations + i];
                color1 = decor->originalPalettesList[decor->blendPalB * decor->spriteColorVariations + i];
                outColor = decor->copiedPalettes[0][i];
                decor->adjustedPalettes[i] = outColor;

                for (j = 0; j < SPR_PAL_SIZE; j++) {
                    r2 = UNPACK_PAL_R(*color2);
                    g2 = UNPACK_PAL_G(*color2);
                    b2 = UNPACK_PAL_B(*color2);
                    r1 = UNPACK_PAL_R(*color1);
                    g1 = UNPACK_PAL_G(*color1);
                    b1 = UNPACK_PAL_B(*color1);
                    a1 = UNPACK_PAL_A(*color1);
                    color2++;
                    color1++;

                    r1 = LERP_COMPONENT(r2, r1, blendAlpha);
                    g1 = LERP_COMPONENT(g2, g1, blendAlpha);
                    b1 = LERP_COMPONENT(b2, b1, blendAlpha);

                    *outColor++ = PACK_PAL_RGBA(r1, g1, b1, a1);
                }
            }
            if (blendAlpha == 255) {
                decor->palAnimState = PAL_SWAP_HOLD_A;
                decor->nextPalTime = decor->palswapTimeHoldA;
            }
            break;
    }

    switch (decor->palAnimState) {
        case PAL_SWAP_HOLD_A:
        case PAL_SWAP_A_TO_B:
        case PAL_SWAP_HOLD_B:
        case PAL_SWAP_B_TO_A:
            if (isNpcSprite == SPRITE_MODE_PLAYER) {
                func_8025995C(part, yaw, mtx);
            } else {
                func_802596C0(part, yaw, mtx);
            }
            break;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel is_model_center_visible
/* B2F0C 8011C80C 27BDFF88 */  addiu     $sp, $sp, -0x78
/* B2F10 8011C810 AFB00040 */  sw        $s0, 0x40($sp)
/* B2F14 8011C814 00C0802D */  daddu     $s0, $a2, $zero
/* B2F18 8011C818 AFB10044 */  sw        $s1, 0x44($sp)
/* B2F1C 8011C81C 00E0882D */  daddu     $s1, $a3, $zero
/* B2F20 8011C820 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* B2F24 8011C824 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* B2F28 8011C828 3084FFFF */  andi      $a0, $a0, 0xFFFF
/* B2F2C 8011C82C AFA5007C */  sw        $a1, 0x7C($sp)
/* B2F30 8011C830 3C05800B */  lui       $a1, %hi(gCameras)
/* B2F34 8011C834 24A51D80 */  addiu     $a1, $a1, %lo(gCameras)
/* B2F38 8011C838 AFBF0064 */  sw        $ra, 0x64($sp)
/* B2F3C 8011C83C AFBE0060 */  sw        $fp, 0x60($sp)
/* B2F40 8011C840 AFB7005C */  sw        $s7, 0x5C($sp)
/* B2F44 8011C844 AFB60058 */  sw        $s6, 0x58($sp)
/* B2F48 8011C848 AFB50054 */  sw        $s5, 0x54($sp)
/* B2F4C 8011C84C AFB40050 */  sw        $s4, 0x50($sp)
/* B2F50 8011C850 AFB3004C */  sw        $s3, 0x4C($sp)
/* B2F54 8011C854 AFB20048 */  sw        $s2, 0x48($sp)
/* B2F58 8011C858 F7B60070 */  sdc1      $f22, 0x70($sp)
/* B2F5C 8011C85C F7B40068 */  sdc1      $f20, 0x68($sp)
/* B2F60 8011C860 00031080 */  sll       $v0, $v1, 2
/* B2F64 8011C864 00431021 */  addu      $v0, $v0, $v1
/* B2F68 8011C868 00021080 */  sll       $v0, $v0, 2
/* B2F6C 8011C86C 00431023 */  subu      $v0, $v0, $v1
/* B2F70 8011C870 000218C0 */  sll       $v1, $v0, 3
/* B2F74 8011C874 00431021 */  addu      $v0, $v0, $v1
/* B2F78 8011C878 000210C0 */  sll       $v0, $v0, 3
/* B2F7C 8011C87C 0C046C04 */  jal       get_model_list_index_from_tree_index
/* B2F80 8011C880 0045F021 */   addu     $fp, $v0, $a1
/* B2F84 8011C884 0C046B4C */  jal       get_model_from_list_index
/* B2F88 8011C888 0040202D */   daddu    $a0, $v0, $zero
/* B2F8C 8011C88C 8FA8007C */  lw        $t0, 0x7C($sp)
/* B2F90 8011C890 0040182D */  daddu     $v1, $v0, $zero
/* B2F94 8011C894 29020010 */  slti      $v0, $t0, 0x10
/* B2F98 8011C898 104001B9 */  beqz      $v0, .L8011CF80
/* B2F9C 8011C89C 27A20028 */   addiu    $v0, $sp, 0x28
/* B2FA0 8011C8A0 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* B2FA4 8011C8A4 4481A000 */  mtc1      $at, $f20
/* B2FA8 8011C8A8 AFA20014 */  sw        $v0, 0x14($sp)
/* B2FAC 8011C8AC 27A2002C */  addiu     $v0, $sp, 0x2C
/* B2FB0 8011C8B0 AFA20018 */  sw        $v0, 0x18($sp)
/* B2FB4 8011C8B4 27A20030 */  addiu     $v0, $sp, 0x30
/* B2FB8 8011C8B8 AFA2001C */  sw        $v0, 0x1C($sp)
/* B2FBC 8011C8BC 27A20034 */  addiu     $v0, $sp, 0x34
/* B2FC0 8011C8C0 AFA20020 */  sw        $v0, 0x20($sp)
/* B2FC4 8011C8C4 E7B40010 */  swc1      $f20, 0x10($sp)
/* B2FC8 8011C8C8 8C650098 */  lw        $a1, 0x98($v1)
/* B2FCC 8011C8CC 8C66009C */  lw        $a2, 0x9C($v1)
/* B2FD0 8011C8D0 8C6700A0 */  lw        $a3, 0xA0($v1)
/* B2FD4 8011C8D4 0C00A588 */  jal       transform_point
/* B2FD8 8011C8D8 27C400D4 */   addiu    $a0, $fp, 0xD4
/* B2FDC 8011C8DC C7A00034 */  lwc1      $f0, 0x34($sp)
/* B2FE0 8011C8E0 44809000 */  mtc1      $zero, $f18
/* B2FE4 8011C8E4 00000000 */  nop
/* B2FE8 8011C8E8 46120032 */  c.eq.s    $f0, $f18
/* B2FEC 8011C8EC 00000000 */  nop
/* B2FF0 8011C8F0 45000004 */  bc1f      .L8011C904
/* B2FF4 8011C8F4 24020001 */   addiu    $v0, $zero, 0x1
/* B2FF8 8011C8F8 E6120000 */  swc1      $f18, 0x0($s0)
/* B2FFC 8011C8FC 080473E1 */  j         .L8011CF84
/* B3000 8011C900 E6320000 */   swc1     $f18, 0x0($s1)
.L8011C904:
/* B3004 8011C904 C7AC0030 */  lwc1      $f12, 0x30($sp)
/* B3008 8011C908 4600A383 */  div.s     $f14, $f20, $f0
/* B300C 8011C90C 460E6302 */  mul.s     $f12, $f12, $f14
/* B3010 8011C910 00000000 */  nop
/* B3014 8011C914 46146080 */  add.s     $f2, $f12, $f20
/* B3018 8011C918 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* B301C 8011C91C 44814800 */  mtc1      $at, $f9
/* B3020 8011C920 44804000 */  mtc1      $zero, $f8
/* B3024 8011C924 460010A1 */  cvt.d.s   $f2, $f2
/* B3028 8011C928 46281082 */  mul.d     $f2, $f2, $f8
/* B302C 8011C92C 00000000 */  nop
/* B3030 8011C930 C7B00028 */  lwc1      $f16, 0x28($sp)
/* B3034 8011C934 460E8402 */  mul.s     $f16, $f16, $f14
/* B3038 8011C938 00000000 */  nop
/* B303C 8011C93C 87C2000A */  lh        $v0, 0xA($fp)
/* B3040 8011C940 44820000 */  mtc1      $v0, $f0
/* B3044 8011C944 00000000 */  nop
/* B3048 8011C948 46800020 */  cvt.s.w   $f0, $f0
/* B304C 8011C94C 46008102 */  mul.s     $f4, $f16, $f0
/* B3050 8011C950 00000000 */  nop
/* B3054 8011C954 46002100 */  add.s     $f4, $f4, $f0
/* B3058 8011C958 46002121 */  cvt.d.s   $f4, $f4
/* B305C 8011C95C 46282102 */  mul.d     $f4, $f4, $f8
/* B3060 8011C960 00000000 */  nop
/* B3064 8011C964 C7A6002C */  lwc1      $f6, 0x2C($sp)
/* B3068 8011C968 46007007 */  neg.s     $f0, $f14
/* B306C 8011C96C 46003182 */  mul.s     $f6, $f6, $f0
/* B3070 8011C970 00000000 */  nop
/* B3074 8011C974 87C2000C */  lh        $v0, 0xC($fp)
/* B3078 8011C978 44825000 */  mtc1      $v0, $f10
/* B307C 8011C97C 00000000 */  nop
/* B3080 8011C980 468052A0 */  cvt.s.w   $f10, $f10
/* B3084 8011C984 460A3002 */  mul.s     $f0, $f6, $f10
/* B3088 8011C988 00000000 */  nop
/* B308C 8011C98C E7AE0034 */  swc1      $f14, 0x34($sp)
/* B3090 8011C990 E7B00028 */  swc1      $f16, 0x28($sp)
/* B3094 8011C994 E7AC0030 */  swc1      $f12, 0x30($sp)
/* B3098 8011C998 460A0000 */  add.s     $f0, $f0, $f10
/* B309C 8011C99C E7A6002C */  swc1      $f6, 0x2C($sp)
/* B30A0 8011C9A0 462010A0 */  cvt.s.d   $f2, $f2
/* B30A4 8011C9A4 46000021 */  cvt.d.s   $f0, $f0
/* B30A8 8011C9A8 46280002 */  mul.d     $f0, $f0, $f8
/* B30AC 8011C9AC 00000000 */  nop
/* B30B0 8011C9B0 E7A20030 */  swc1      $f2, 0x30($sp)
/* B30B4 8011C9B4 87C2000E */  lh        $v0, 0xE($fp)
/* B30B8 8011C9B8 44821000 */  mtc1      $v0, $f2
/* B30BC 8011C9BC 00000000 */  nop
/* B30C0 8011C9C0 468010A0 */  cvt.s.w   $f2, $f2
/* B30C4 8011C9C4 46202120 */  cvt.s.d   $f4, $f4
/* B30C8 8011C9C8 E7A40028 */  swc1      $f4, 0x28($sp)
/* B30CC 8011C9CC 87C20010 */  lh        $v0, 0x10($fp)
/* B30D0 8011C9D0 46022100 */  add.s     $f4, $f4, $f2
/* B30D4 8011C9D4 44821000 */  mtc1      $v0, $f2
/* B30D8 8011C9D8 00000000 */  nop
/* B30DC 8011C9DC 468010A0 */  cvt.s.w   $f2, $f2
/* B30E0 8011C9E0 4600258D */  trunc.w.s $f22, $f4
/* B30E4 8011C9E4 4402B000 */  mfc1      $v0, $f22
/* B30E8 8011C9E8 E7A40028 */  swc1      $f4, 0x28($sp)
/* B30EC 8011C9EC 46200020 */  cvt.s.d   $f0, $f0
/* B30F0 8011C9F0 46020080 */  add.s     $f2, $f0, $f2
/* B30F4 8011C9F4 E7A0002C */  swc1      $f0, 0x2C($sp)
/* B30F8 8011C9F8 44820000 */  mtc1      $v0, $f0
/* B30FC 8011C9FC 00000000 */  nop
/* B3100 8011CA00 46800020 */  cvt.s.w   $f0, $f0
/* B3104 8011CA04 E7A2002C */  swc1      $f2, 0x2C($sp)
/* B3108 8011CA08 E6000000 */  swc1      $f0, 0x0($s0)
/* B310C 8011CA0C C7A0002C */  lwc1      $f0, 0x2C($sp)
/* B3110 8011CA10 4600058D */  trunc.w.s $f22, $f0
/* B3114 8011CA14 4402B000 */  mfc1      $v0, $f22
/* B3118 8011CA18 00000000 */  nop
/* B311C 8011CA1C 44820000 */  mtc1      $v0, $f0
/* B3120 8011CA20 00000000 */  nop
/* B3124 8011CA24 46800020 */  cvt.s.w   $f0, $f0
/* B3128 8011CA28 E6200000 */  swc1      $f0, 0x0($s1)
/* B312C 8011CA2C 8FA8007C */  lw        $t0, 0x7C($sp)
/* B3130 8011CA30 05010008 */  bgez      $t0, .L8011CA54
/* B3134 8011CA34 00000000 */   nop
/* B3138 8011CA38 C7A00030 */  lwc1      $f0, 0x30($sp)
/* B313C 8011CA3C 4600903C */  c.lt.s    $f18, $f0
/* B3140 8011CA40 00000000 */  nop
/* B3144 8011CA44 4501014F */  bc1t      .L8011CF84
/* B3148 8011CA48 0000102D */   daddu    $v0, $zero, $zero
/* B314C 8011CA4C 080473E1 */  j         .L8011CF84
/* B3150 8011CA50 24020001 */   addiu    $v0, $zero, 0x1
.L8011CA54:
/* B3154 8011CA54 C7A40028 */  lwc1      $f4, 0x28($sp)
/* B3158 8011CA58 4604903E */  c.le.s    $f18, $f4
/* B315C 8011CA5C 00000000 */  nop
/* B3160 8011CA60 45000140 */  bc1f      .L8011CF64
/* B3164 8011CA64 00000000 */   nop
/* B3168 8011CA68 C7A2002C */  lwc1      $f2, 0x2C($sp)
/* B316C 8011CA6C 4602903E */  c.le.s    $f18, $f2
/* B3170 8011CA70 00000000 */  nop
/* B3174 8011CA74 4500013B */  bc1f      .L8011CF64
/* B3178 8011CA78 00000000 */   nop
/* B317C 8011CA7C 3C0143A0 */  lui       $at, (0x43A00000 >> 16)
/* B3180 8011CA80 44810000 */  mtc1      $at, $f0
/* B3184 8011CA84 00000000 */  nop
/* B3188 8011CA88 4600203C */  c.lt.s    $f4, $f0
/* B318C 8011CA8C 00000000 */  nop
/* B3190 8011CA90 45000134 */  bc1f      .L8011CF64
/* B3194 8011CA94 00000000 */   nop
/* B3198 8011CA98 3C014370 */  lui       $at, (0x43700000 >> 16)
/* B319C 8011CA9C 44810000 */  mtc1      $at, $f0
/* B31A0 8011CAA0 00000000 */  nop
/* B31A4 8011CAA4 4600103C */  c.lt.s    $f2, $f0
/* B31A8 8011CAA8 00000000 */  nop
/* B31AC 8011CAAC 4500012D */  bc1f      .L8011CF64
/* B31B0 8011CAB0 3C05FD10 */   lui      $a1, (0xFD10013F >> 16)
/* B31B4 8011CAB4 3C11800A */  lui       $s1, %hi(gMainGfxPos)
/* B31B8 8011CAB8 2631A66C */  addiu     $s1, $s1, %lo(gMainGfxPos)
/* B31BC 8011CABC 34A5013F */  ori       $a1, $a1, (0xFD10013F & 0xFFFF)
/* B31C0 8011CAC0 4600158D */  trunc.w.s $f22, $f2
/* B31C4 8011CAC4 4402B000 */  mfc1      $v0, $f22
/* B31C8 8011CAC8 00000000 */  nop
/* B31CC 8011CACC 00022080 */  sll       $a0, $v0, 2
/* B31D0 8011CAD0 00822021 */  addu      $a0, $a0, $v0
/* B31D4 8011CAD4 000421C0 */  sll       $a0, $a0, 7
/* B31D8 8011CAD8 3C13E700 */  lui       $s3, (0xE7000000 >> 16)
/* B31DC 8011CADC 8E320000 */  lw        $s2, 0x0($s1)
/* B31E0 8011CAE0 3C02800A */  lui       $v0, %hi(nuGfxZBuffer)
/* B31E4 8011CAE4 8C42A5DC */  lw        $v0, %lo(nuGfxZBuffer)($v0)
/* B31E8 8011CAE8 0240182D */  daddu     $v1, $s2, $zero
/* B31EC 8011CAEC 26520008 */  addiu     $s2, $s2, 0x8
/* B31F0 8011CAF0 00442021 */  addu      $a0, $v0, $a0
/* B31F4 8011CAF4 26420008 */  addiu     $v0, $s2, 0x8
/* B31F8 8011CAF8 AE320000 */  sw        $s2, 0x0($s1)
/* B31FC 8011CAFC AC730000 */  sw        $s3, 0x0($v1)
/* B3200 8011CB00 AC600004 */  sw        $zero, 0x4($v1)
/* B3204 8011CB04 AE220000 */  sw        $v0, 0x0($s1)
/* B3208 8011CB08 0C0187A4 */  jal       osVirtualToPhysical
/* B320C 8011CB0C AE450000 */   sw       $a1, 0x0($s2)
/* B3210 8011CB10 3C06F510 */  lui       $a2, (0xF5100200 >> 16)
/* B3214 8011CB14 34C60200 */  ori       $a2, $a2, (0xF5100200 & 0xFFFF)
/* B3218 8011CB18 3C030700 */  lui       $v1, (0x7000090 >> 16)
/* B321C 8011CB1C 34630090 */  ori       $v1, $v1, (0x7000090 & 0xFFFF)
/* B3220 8011CB20 3C18FF10 */  lui       $t8, (0xFF10013F >> 16)
/* B3224 8011CB24 3718013F */  ori       $t8, $t8, (0xFF10013F & 0xFFFF)
/* B3228 8011CB28 3C07E300 */  lui       $a3, (0xE3000A01 >> 16)
/* B322C 8011CB2C 34E70A01 */  ori       $a3, $a3, (0xE3000A01 & 0xFFFF)
/* B3230 8011CB30 3C0AE200 */  lui       $t2, (0xE200001C >> 16)
/* B3234 8011CB34 354A001C */  ori       $t2, $t2, (0xE200001C & 0xFFFF)
/* B3238 8011CB38 3C080F0A */  lui       $t0, (0xF0A4000 >> 16)
/* B323C 8011CB3C 35084000 */  ori       $t0, $t0, (0xF0A4000 & 0xFFFF)
/* B3240 8011CB40 3C0BFCFF */  lui       $t3, (0xFCFFFFFF >> 16)
/* B3244 8011CB44 356BFFFF */  ori       $t3, $t3, (0xFCFFFFFF & 0xFFFF)
/* B3248 8011CB48 3C09FFFC */  lui       $t1, (0xFFFCF279 >> 16)
/* B324C 8011CB4C 3529F279 */  ori       $t1, $t1, (0xFFFCF279 & 0xFFFF)
/* B3250 8011CB50 3C0CE300 */  lui       $t4, (0xE3001201 >> 16)
/* B3254 8011CB54 358C1201 */  ori       $t4, $t4, (0xE3001201 & 0xFFFF)
/* B3258 8011CB58 3C0DE300 */  lui       $t5, (0xE3000C00 >> 16)
/* B325C 8011CB5C 35AD0C00 */  ori       $t5, $t5, (0xE3000C00 & 0xFFFF)
/* B3260 8011CB60 3C0ED700 */  lui       $t6, (0xD7000002 >> 16)
/* B3264 8011CB64 35CE0002 */  ori       $t6, $t6, (0xD7000002 & 0xFFFF)
/* B3268 8011CB68 3C0FE300 */  lui       $t7, (0xE3001001 >> 16)
/* B326C 8011CB6C 35EF1001 */  ori       $t7, $t7, (0xE3001001 & 0xFFFF)
/* B3270 8011CB70 3C15E300 */  lui       $s5, (0xE3000D01 >> 16)
/* B3274 8011CB74 36B50D01 */  ori       $s5, $s5, (0xE3000D01 & 0xFFFF)
/* B3278 8011CB78 3C16E300 */  lui       $s6, (0xE3000F00 >> 16)
/* B327C 8011CB7C 36D60F00 */  ori       $s6, $s6, (0xE3000F00 & 0xFFFF)
/* B3280 8011CB80 3C17E401 */  lui       $s7, (0xE4010004 >> 16)
/* B3284 8011CB84 36F70004 */  ori       $s7, $s7, (0xE4010004 & 0xFFFF)
/* B3288 8011CB88 3C190400 */  lui       $t9, (0x4000400 >> 16)
/* B328C 8011CB8C AFA80038 */  sw        $t0, 0x38($sp)
/* B3290 8011CB90 8E300000 */  lw        $s0, 0x0($s1)
/* B3294 8011CB94 3C148015 */  lui       $s4, %hi(depthCopyBuffer)
/* B3298 8011CB98 26943380 */  addiu     $s4, $s4, %lo(depthCopyBuffer)
/* B329C 8011CB9C AE420004 */  sw        $v0, 0x4($s2)
/* B32A0 8011CBA0 3C12ED00 */  lui       $s2, (0xED000000 >> 16)
/* B32A4 8011CBA4 0200102D */  daddu     $v0, $s0, $zero
/* B32A8 8011CBA8 26100008 */  addiu     $s0, $s0, 0x8
/* B32AC 8011CBAC AE300000 */  sw        $s0, 0x0($s1)
/* B32B0 8011CBB0 AC460000 */  sw        $a2, 0x0($v0)
/* B32B4 8011CBB4 AC430004 */  sw        $v1, 0x4($v0)
/* B32B8 8011CBB8 26020008 */  addiu     $v0, $s0, 0x8
/* B32BC 8011CBBC AE220000 */  sw        $v0, 0x0($s1)
/* B32C0 8011CBC0 3C02E600 */  lui       $v0, (0xE6000000 >> 16)
/* B32C4 8011CBC4 AE020000 */  sw        $v0, 0x0($s0)
/* B32C8 8011CBC8 AE000004 */  sw        $zero, 0x4($s0)
/* B32CC 8011CBCC C7A00028 */  lwc1      $f0, 0x28($sp)
/* B32D0 8011CBD0 26020010 */  addiu     $v0, $s0, 0x10
/* B32D4 8011CBD4 AE220000 */  sw        $v0, 0x0($s1)
/* B32D8 8011CBD8 3C02F400 */  lui       $v0, (0xF4000000 >> 16)
/* B32DC 8011CBDC 4600058D */  trunc.w.s $f22, $f0
/* B32E0 8011CBE0 4405B000 */  mfc1      $a1, $f22
/* B32E4 8011CBE4 00000000 */  nop
/* B32E8 8011CBE8 00052080 */  sll       $a0, $a1, 2
/* B32EC 8011CBEC 30840FFF */  andi      $a0, $a0, 0xFFF
/* B32F0 8011CBF0 00042300 */  sll       $a0, $a0, 12
/* B32F4 8011CBF4 00821025 */  or        $v0, $a0, $v0
/* B32F8 8011CBF8 24A30003 */  addiu     $v1, $a1, 0x3
/* B32FC 8011CBFC 00031880 */  sll       $v1, $v1, 2
/* B3300 8011CC00 30630FFF */  andi      $v1, $v1, 0xFFF
/* B3304 8011CC04 00031B00 */  sll       $v1, $v1, 12
/* B3308 8011CC08 AE020008 */  sw        $v0, 0x8($s0)
/* B330C 8011CC0C 3C020700 */  lui       $v0, (0x7000000 >> 16)
/* B3310 8011CC10 00621025 */  or        $v0, $v1, $v0
/* B3314 8011CC14 AE02000C */  sw        $v0, 0xC($s0)
/* B3318 8011CC18 26020018 */  addiu     $v0, $s0, 0x18
/* B331C 8011CC1C AE220000 */  sw        $v0, 0x0($s1)
/* B3320 8011CC20 26020020 */  addiu     $v0, $s0, 0x20
/* B3324 8011CC24 AE130010 */  sw        $s3, 0x10($s0)
/* B3328 8011CC28 AE000014 */  sw        $zero, 0x14($s0)
/* B332C 8011CC2C AE220000 */  sw        $v0, 0x0($s1)
/* B3330 8011CC30 24020090 */  addiu     $v0, $zero, 0x90
/* B3334 8011CC34 AE02001C */  sw        $v0, 0x1C($s0)
/* B3338 8011CC38 26020028 */  addiu     $v0, $s0, 0x28
/* B333C 8011CC3C AE060018 */  sw        $a2, 0x18($s0)
/* B3340 8011CC40 AE220000 */  sw        $v0, 0x0($s1)
/* B3344 8011CC44 3C02F200 */  lui       $v0, (0xF2000000 >> 16)
/* B3348 8011CC48 00822025 */  or        $a0, $a0, $v0
/* B334C 8011CC4C 26020030 */  addiu     $v0, $s0, 0x30
/* B3350 8011CC50 AE040020 */  sw        $a0, 0x20($s0)
/* B3354 8011CC54 AE030024 */  sw        $v1, 0x24($s0)
/* B3358 8011CC58 AE220000 */  sw        $v0, 0x0($s1)
/* B335C 8011CC5C 26020038 */  addiu     $v0, $s0, 0x38
/* B3360 8011CC60 AE130028 */  sw        $s3, 0x28($s0)
/* B3364 8011CC64 AE00002C */  sw        $zero, 0x2C($s0)
/* B3368 8011CC68 AE220000 */  sw        $v0, 0x0($s1)
/* B336C 8011CC6C 26020040 */  addiu     $v0, $s0, 0x40
/* B3370 8011CC70 AE180030 */  sw        $t8, 0x30($s0)
/* B3374 8011CC74 AE140034 */  sw        $s4, 0x34($s0)
/* B3378 8011CC78 AE220000 */  sw        $v0, 0x0($s1)
/* B337C 8011CC7C 26020048 */  addiu     $v0, $s0, 0x48
/* B3380 8011CC80 AE130038 */  sw        $s3, 0x38($s0)
/* B3384 8011CC84 AE00003C */  sw        $zero, 0x3C($s0)
/* B3388 8011CC88 AE220000 */  sw        $v0, 0x0($s1)
/* B338C 8011CC8C 26020050 */  addiu     $v0, $s0, 0x50
/* B3390 8011CC90 AE070040 */  sw        $a3, 0x40($s0)
/* B3394 8011CC94 AE000044 */  sw        $zero, 0x44($s0)
/* B3398 8011CC98 AE220000 */  sw        $v0, 0x0($s1)
/* B339C 8011CC9C AE0A0048 */  sw        $t2, 0x48($s0)
/* B33A0 8011CCA0 8FA80038 */  lw        $t0, 0x38($sp)
/* B33A4 8011CCA4 26020058 */  addiu     $v0, $s0, 0x58
/* B33A8 8011CCA8 AE08004C */  sw        $t0, 0x4C($s0)
/* B33AC 8011CCAC AE220000 */  sw        $v0, 0x0($s1)
/* B33B0 8011CCB0 26020060 */  addiu     $v0, $s0, 0x60
/* B33B4 8011CCB4 AE0B0050 */  sw        $t3, 0x50($s0)
/* B33B8 8011CCB8 AE090054 */  sw        $t1, 0x54($s0)
/* B33BC 8011CCBC AE220000 */  sw        $v0, 0x0($s1)
/* B33C0 8011CCC0 26020068 */  addiu     $v0, $s0, 0x68
/* B33C4 8011CCC4 AE0C0058 */  sw        $t4, 0x58($s0)
/* B33C8 8011CCC8 AE00005C */  sw        $zero, 0x5C($s0)
/* B33CC 8011CCCC AE220000 */  sw        $v0, 0x0($s1)
/* B33D0 8011CCD0 26020070 */  addiu     $v0, $s0, 0x70
/* B33D4 8011CCD4 AE0D0060 */  sw        $t5, 0x60($s0)
/* B33D8 8011CCD8 AE000064 */  sw        $zero, 0x64($s0)
/* B33DC 8011CCDC AE220000 */  sw        $v0, 0x0($s1)
/* B33E0 8011CCE0 2402FFFF */  addiu     $v0, $zero, -0x1
/* B33E4 8011CCE4 AE02006C */  sw        $v0, 0x6C($s0)
/* B33E8 8011CCE8 26020078 */  addiu     $v0, $s0, 0x78
/* B33EC 8011CCEC AE0E0068 */  sw        $t6, 0x68($s0)
/* B33F0 8011CCF0 AE220000 */  sw        $v0, 0x0($s1)
/* B33F4 8011CCF4 26020080 */  addiu     $v0, $s0, 0x80
/* B33F8 8011CCF8 AE0F0070 */  sw        $t7, 0x70($s0)
/* B33FC 8011CCFC AE000074 */  sw        $zero, 0x74($s0)
/* B3400 8011CD00 AE220000 */  sw        $v0, 0x0($s1)
/* B3404 8011CD04 26020088 */  addiu     $v0, $s0, 0x88
/* B3408 8011CD08 AE150078 */  sw        $s5, 0x78($s0)
/* B340C 8011CD0C AE00007C */  sw        $zero, 0x7C($s0)
/* B3410 8011CD10 AE220000 */  sw        $v0, 0x0($s1)
/* B3414 8011CD14 26020090 */  addiu     $v0, $s0, 0x90
/* B3418 8011CD18 AE160080 */  sw        $s6, 0x80($s0)
/* B341C 8011CD1C AE000084 */  sw        $zero, 0x84($s0)
/* B3420 8011CD20 AE220000 */  sw        $v0, 0x0($s1)
/* B3424 8011CD24 26020098 */  addiu     $v0, $s0, 0x98
/* B3428 8011CD28 AE220000 */  sw        $v0, 0x0($s1)
/* B342C 8011CD2C AE170090 */  sw        $s7, 0x90($s0)
/* B3430 8011CD30 8FA8007C */  lw        $t0, 0x7C($sp)
/* B3434 8011CD34 3C014080 */  lui       $at, (0x40800000 >> 16)
/* B3438 8011CD38 4481A000 */  mtc1      $at, $f20
/* B343C 8011CD3C 00081080 */  sll       $v0, $t0, 2
/* B3440 8011CD40 30420FFF */  andi      $v0, $v0, 0xFFF
/* B3444 8011CD44 00021300 */  sll       $v0, $v0, 12
/* B3448 8011CD48 AE020094 */  sw        $v0, 0x94($s0)
/* B344C 8011CD4C 260200A0 */  addiu     $v0, $s0, 0xA0
/* B3450 8011CD50 AE220000 */  sw        $v0, 0x0($s1)
/* B3454 8011CD54 3C02E100 */  lui       $v0, (0xE1000000 >> 16)
/* B3458 8011CD58 AE020098 */  sw        $v0, 0x98($s0)
/* B345C 8011CD5C C7A0007C */  lwc1      $f0, 0x7C($sp)
/* B3460 8011CD60 46800020 */  cvt.s.w   $f0, $f0
/* B3464 8011CD64 46140002 */  mul.s     $f0, $f0, $f20
/* B3468 8011CD68 00000000 */  nop
/* B346C 8011CD6C 00052D40 */  sll       $a1, $a1, 21
/* B3470 8011CD70 260200A8 */  addiu     $v0, $s0, 0xA8
/* B3474 8011CD74 AE05009C */  sw        $a1, 0x9C($s0)
/* B3478 8011CD78 AE220000 */  sw        $v0, 0x0($s1)
/* B347C 8011CD7C 4600058D */  trunc.w.s $f22, $f0
/* B3480 8011CD80 4402B000 */  mfc1      $v0, $f22
/* B3484 8011CD84 8FA8007C */  lw        $t0, 0x7C($sp)
/* B3488 8011CD88 37390400 */  ori       $t9, $t9, (0x4000400 & 0xFFFF)
/* B348C 8011CD8C 25030001 */  addiu     $v1, $t0, 0x1
/* B3490 8011CD90 44830000 */  mtc1      $v1, $f0
/* B3494 8011CD94 00000000 */  nop
/* B3498 8011CD98 46800020 */  cvt.s.w   $f0, $f0
/* B349C 8011CD9C 46140002 */  mul.s     $f0, $f0, $f20
/* B34A0 8011CDA0 00000000 */  nop
/* B34A4 8011CDA4 30420FFF */  andi      $v0, $v0, 0xFFF
/* B34A8 8011CDA8 00021300 */  sll       $v0, $v0, 12
/* B34AC 8011CDAC 00521025 */  or        $v0, $v0, $s2
/* B34B0 8011CDB0 AE020088 */  sw        $v0, 0x88($s0)
/* B34B4 8011CDB4 4600058D */  trunc.w.s $f22, $f0
/* B34B8 8011CDB8 4402B000 */  mfc1      $v0, $f22
/* B34BC 8011CDBC 00000000 */  nop
/* B34C0 8011CDC0 30420FFF */  andi      $v0, $v0, 0xFFF
/* B34C4 8011CDC4 00021300 */  sll       $v0, $v0, 12
/* B34C8 8011CDC8 34420004 */  ori       $v0, $v0, 0x4
/* B34CC 8011CDCC AE02008C */  sw        $v0, 0x8C($s0)
/* B34D0 8011CDD0 3C02F100 */  lui       $v0, (0xF1000000 >> 16)
/* B34D4 8011CDD4 AE0200A0 */  sw        $v0, 0xA0($s0)
/* B34D8 8011CDD8 3C04800A */  lui       $a0, %hi(nuGfxCfb_ptr)
/* B34DC 8011CDDC 8C84A64C */  lw        $a0, %lo(nuGfxCfb_ptr)($a0)
/* B34E0 8011CDE0 260200B0 */  addiu     $v0, $s0, 0xB0
/* B34E4 8011CDE4 AE1900A4 */  sw        $t9, 0xA4($s0)
/* B34E8 8011CDE8 AE220000 */  sw        $v0, 0x0($s1)
/* B34EC 8011CDEC 260200B8 */  addiu     $v0, $s0, 0xB8
/* B34F0 8011CDF0 AE1300A8 */  sw        $s3, 0xA8($s0)
/* B34F4 8011CDF4 AE0000AC */  sw        $zero, 0xAC($s0)
/* B34F8 8011CDF8 AE220000 */  sw        $v0, 0x0($s1)
/* B34FC 8011CDFC 0C0187A4 */  jal       osVirtualToPhysical
/* B3500 8011CE00 AE1800B0 */   sw       $t8, 0xB0($s0)
/* B3504 8011CE04 8E240000 */  lw        $a0, 0x0($s1)
/* B3508 8011CE08 AE0200B4 */  sw        $v0, 0xB4($s0)
/* B350C 8011CE0C 0080102D */  daddu     $v0, $a0, $zero
/* B3510 8011CE10 AC530000 */  sw        $s3, 0x0($v0)
/* B3514 8011CE14 AC400004 */  sw        $zero, 0x4($v0)
/* B3518 8011CE18 87C2000E */  lh        $v0, 0xE($fp)
/* B351C 8011CE1C 44820000 */  mtc1      $v0, $f0
/* B3520 8011CE20 00000000 */  nop
/* B3524 8011CE24 46800020 */  cvt.s.w   $f0, $f0
/* B3528 8011CE28 46140002 */  mul.s     $f0, $f0, $f20
/* B352C 8011CE2C 00000000 */  nop
/* B3530 8011CE30 87C20010 */  lh        $v0, 0x10($fp)
/* B3534 8011CE34 44821000 */  mtc1      $v0, $f2
/* B3538 8011CE38 00000000 */  nop
/* B353C 8011CE3C 468010A0 */  cvt.s.w   $f2, $f2
/* B3540 8011CE40 46141082 */  mul.s     $f2, $f2, $f20
/* B3544 8011CE44 00000000 */  nop
/* B3548 8011CE48 24840008 */  addiu     $a0, $a0, 0x8
/* B354C 8011CE4C 4600058D */  trunc.w.s $f22, $f0
/* B3550 8011CE50 4403B000 */  mfc1      $v1, $f22
/* B3554 8011CE54 00000000 */  nop
/* B3558 8011CE58 30630FFF */  andi      $v1, $v1, 0xFFF
/* B355C 8011CE5C 00031B00 */  sll       $v1, $v1, 12
/* B3560 8011CE60 4600158D */  trunc.w.s $f22, $f2
/* B3564 8011CE64 4402B000 */  mfc1      $v0, $f22
/* B3568 8011CE68 00000000 */  nop
/* B356C 8011CE6C 30420FFF */  andi      $v0, $v0, 0xFFF
/* B3570 8011CE70 00521025 */  or        $v0, $v0, $s2
/* B3574 8011CE74 00621825 */  or        $v1, $v1, $v0
/* B3578 8011CE78 AC830000 */  sw        $v1, 0x0($a0)
/* B357C 8011CE7C 87C2000E */  lh        $v0, 0xE($fp)
/* B3580 8011CE80 87C3000A */  lh        $v1, 0xA($fp)
/* B3584 8011CE84 00431021 */  addu      $v0, $v0, $v1
/* B3588 8011CE88 44821000 */  mtc1      $v0, $f2
/* B358C 8011CE8C 00000000 */  nop
/* B3590 8011CE90 468010A0 */  cvt.s.w   $f2, $f2
/* B3594 8011CE94 46141082 */  mul.s     $f2, $f2, $f20
/* B3598 8011CE98 00000000 */  nop
/* B359C 8011CE9C 87C20010 */  lh        $v0, 0x10($fp)
/* B35A0 8011CEA0 87C3000C */  lh        $v1, 0xC($fp)
/* B35A4 8011CEA4 00431021 */  addu      $v0, $v0, $v1
/* B35A8 8011CEA8 44820000 */  mtc1      $v0, $f0
/* B35AC 8011CEAC 00000000 */  nop
/* B35B0 8011CEB0 46800020 */  cvt.s.w   $f0, $f0
/* B35B4 8011CEB4 46140002 */  mul.s     $f0, $f0, $f20
/* B35B8 8011CEB8 00000000 */  nop
/* B35BC 8011CEBC AE240000 */  sw        $a0, 0x0($s1)
/* B35C0 8011CEC0 4600158D */  trunc.w.s $f22, $f2
/* B35C4 8011CEC4 4402B000 */  mfc1      $v0, $f22
/* B35C8 8011CEC8 00000000 */  nop
/* B35CC 8011CECC 30420FFF */  andi      $v0, $v0, 0xFFF
/* B35D0 8011CED0 00021300 */  sll       $v0, $v0, 12
/* B35D4 8011CED4 4600058D */  trunc.w.s $f22, $f0
/* B35D8 8011CED8 4403B000 */  mfc1      $v1, $f22
/* B35DC 8011CEDC 00000000 */  nop
/* B35E0 8011CEE0 30630FFF */  andi      $v1, $v1, 0xFFF
/* B35E4 8011CEE4 00431025 */  or        $v0, $v0, $v1
/* B35E8 8011CEE8 AC820004 */  sw        $v0, 0x4($a0)
/* B35EC 8011CEEC 8FA8007C */  lw        $t0, 0x7C($sp)
/* B35F0 8011CEF0 3C0146FF */  lui       $at, (0x46FF8000 >> 16)
/* B35F4 8011CEF4 34218000 */  ori       $at, $at, (0x46FF8000 & 0xFFFF)
/* B35F8 8011CEF8 44810000 */  mtc1      $at, $f0
/* B35FC 8011CEFC 00081040 */  sll       $v0, $t0, 1
/* B3600 8011CF00 00541021 */  addu      $v0, $v0, $s4
/* B3604 8011CF04 94420000 */  lhu       $v0, 0x0($v0)
/* B3608 8011CF08 24840008 */  addiu     $a0, $a0, 0x8
/* B360C 8011CF0C AE240000 */  sw        $a0, 0x0($s1)
/* B3610 8011CF10 3C048015 */  lui       $a0, %hi(depthFloatLookupTable)
/* B3614 8011CF14 2484B7A8 */  addiu     $a0, $a0, %lo(depthFloatLookupTable)
/* B3618 8011CF18 C7A20030 */  lwc1      $f2, 0x30($sp)
/* B361C 8011CF1C 00021B42 */  srl       $v1, $v0, 13
/* B3620 8011CF20 30421FFF */  andi      $v0, $v0, 0x1FFF
/* B3624 8011CF24 00021082 */  srl       $v0, $v0, 2
/* B3628 8011CF28 000318C0 */  sll       $v1, $v1, 3
/* B362C 8011CF2C 00641821 */  addu      $v1, $v1, $a0
/* B3630 8011CF30 46001082 */  mul.s     $f2, $f2, $f0
/* B3634 8011CF34 00000000 */  nop
/* B3638 8011CF38 8C640000 */  lw        $a0, 0x0($v1)
/* B363C 8011CF3C 8C630004 */  lw        $v1, 0x4($v1)
/* B3640 8011CF40 00821004 */  sllv      $v0, $v0, $a0
/* B3644 8011CF44 00431021 */  addu      $v0, $v0, $v1
/* B3648 8011CF48 000210C2 */  srl       $v0, $v0, 3
/* B364C 8011CF4C 4600158D */  trunc.w.s $f22, $f2
/* B3650 8011CF50 4403B000 */  mfc1      $v1, $f22
/* B3654 8011CF54 00000000 */  nop
/* B3658 8011CF58 0043102B */  sltu      $v0, $v0, $v1
/* B365C 8011CF5C 14400009 */  bnez      $v0, .L8011CF84
/* B3660 8011CF60 0000102D */   daddu    $v0, $zero, $zero
.L8011CF64:
/* B3664 8011CF64 C7A20030 */  lwc1      $f2, 0x30($sp)
/* B3668 8011CF68 44800000 */  mtc1      $zero, $f0
/* B366C 8011CF6C 00000000 */  nop
/* B3670 8011CF70 4602003C */  c.lt.s    $f0, $f2
/* B3674 8011CF74 00000000 */  nop
/* B3678 8011CF78 45010002 */  bc1t      .L8011CF84
/* B367C 8011CF7C 24020001 */   addiu    $v0, $zero, 0x1
.L8011CF80:
/* B3680 8011CF80 0000102D */  daddu     $v0, $zero, $zero
.L8011CF84:
/* B3684 8011CF84 8FBF0064 */  lw        $ra, 0x64($sp)
/* B3688 8011CF88 8FBE0060 */  lw        $fp, 0x60($sp)
/* B368C 8011CF8C 8FB7005C */  lw        $s7, 0x5C($sp)
/* B3690 8011CF90 8FB60058 */  lw        $s6, 0x58($sp)
/* B3694 8011CF94 8FB50054 */  lw        $s5, 0x54($sp)
/* B3698 8011CF98 8FB40050 */  lw        $s4, 0x50($sp)
/* B369C 8011CF9C 8FB3004C */  lw        $s3, 0x4C($sp)
/* B36A0 8011CFA0 8FB20048 */  lw        $s2, 0x48($sp)
/* B36A4 8011CFA4 8FB10044 */  lw        $s1, 0x44($sp)
/* B36A8 8011CFA8 8FB00040 */  lw        $s0, 0x40($sp)
/* B36AC 8011CFAC D7B60070 */  ldc1      $f22, 0x70($sp)
/* B36B0 8011CFB0 D7B40068 */  ldc1      $f20, 0x68($sp)
/* B36B4 8011CFB4 03E00008 */  jr        $ra
/* B36B8 8011CFB8 27BD0078 */   addiu    $sp, $sp, 0x78

### DECOMPILED C INSTRUCTIONS:

s32 is_model_center_visible(u16 modelID, s32 depthQueryID, f32* screenX, f32* screenY) {
    Camera* camera = &gCameras[gCurrentCameraID];
    Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(modelID));
    f32 outX;
    f32 outY;
    f32 outZ;
    f32 outW;

    s32 depthExponent;
    s32 depthMantissa;
    u32 shiftedMantissa, mantissaBias;
    u32 decodedDepth;
    s32 scaledDepth;

    // If an invalid depth query id was provided, return false.
    if (depthQueryID >= ARRAY_COUNT(depthCopyBuffer)) {
        return FALSE;
    }
    // Transform the model's center into clip space.
    transform_point(camera->perspectiveMatrix, model->center.x, model->center.y, model->center.z, 1.0f, &outX, &outY, &outZ, &outW);
    if (outW == 0.0f) {
        *screenX = 0.0f;
        *screenY = 0.0f;
        return TRUE;
    }
    // Perform the perspective divide (divide xyz by w) to convert to normalized device coords.
    // Normalized device coords have a range of (-1, 1) on each axis.
    outW = 1.0f / outW;
    outX *= outW;
    outY *= -outW;
    outZ *= outW;
    // Perform the viewport transform for x and y (convert normalized device coords to viewport coords).
    // Viewport coords have a range of (0, Width) for x and (0, Height) for y.
    outX = (outX * camera->viewportW + camera->viewportW) * 0.5;
    outX += camera->viewportStartX;
    outY = (outY * camera->viewportH + camera->viewportH) * 0.5;
    outY += camera->viewportStartY;
    // Convert depth from (-1, 1) to (0, 1).
    outZ = (outZ + 1.0f) * 0.5;
    // Write out the calculated x and y values.
    *screenX = (s32)outX;
    *screenY = (s32)outY;
    // If a depth query wasn't requested, simply check if the point is within the view frustum.
    if (depthQueryID < 0) {
        if (outZ > 0.0f) {
            return FALSE;
        } else {
            return TRUE;
        }
    }
    if (outX >= 0.0f && outY >= 0.0f && outX < 320.0f && outY < 240.0f) {
        gDPPipeSync(gMainGfxPos++);
        // Load a 4x1 pixel tile of the depth buffer
        gDPLoadTextureTile(gMainGfxPos++, osVirtualToPhysical(&nuGfxZBuffer[(s32) outY * 320]), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 1,
            (s32) outX, 0, (s32) outX + 3, 0,
            0,
            G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
            9, G_TX_NOMASK,
            G_TX_NOLOD, G_TX_NOLOD);
        gDPPipeSync(gMainGfxPos++);
        // Set the current color image to the buffer where copied depth values are stored.
        gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, depthCopyBuffer);
        gDPPipeSync(gMainGfxPos++);
        // Set up 1 cycle mode and all other relevant othermode params.
        // One cycle mode must be used here because only one pixel is copied, and copy mode only supports multiples of 4 pixels.
        gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
        gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
        gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
        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);
        // Adjust the scissor to only draw to the specified pixel.
        gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, depthQueryID, 0, depthQueryID + 1, 1);
        // Draw a texrect to copy one pixel of the loaded depth tile to the output buffer.
        gSPTextureRectangle(gMainGfxPos++, depthQueryID << 2, 0 << 2, 4 << 2, 1 << 2, G_TX_RENDERTILE, (s32) outX << 5, 0, 1 << 10, 1 << 10);
        // Sync and swap the color image back to the current framebuffer.
        gDPPipeSync(gMainGfxPos++);
        gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxCfb_ptr));
        gDPPipeSync(gMainGfxPos++);
        // Reconfigure the frame's normal scissor.
        gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, camera->viewportStartX, camera->viewportStartY, camera->viewportStartX + camera->viewportW, camera->viewportStartY + camera->viewportH);

        // The following code will use last frame's depth value, since the copy that was just written won't be executed until the current frame is drawn.

        // Extract the exponent and mantissa from the depth buffer value.
        depthExponent = depthCopyBuffer[depthQueryID] >> DEPTH_EXPONENT_SHIFT;
        depthMantissa = (depthCopyBuffer[depthQueryID] & (DEPTH_MANTISSA_MASK | DEPTH_DZ_MASK)) >> DEPTH_MANTISSA_SHIFT;
        // Convert the exponent and mantissa into a fixed-point value.
        shiftedMantissa = depthMantissa << depthFloatLookupTable[depthExponent].shift;
        mantissaBias = depthFloatLookupTable[depthExponent].bias;
        // Remove the 3 fractional bits of precision.
        decodedDepth = (shiftedMantissa + mantissaBias) >> 3;
        // Convert the calculated screen depth into viewport depth.
        scaledDepth = outZ * MAX_VIEWPORT_DEPTH;
        if (decodedDepth < scaledDepth) {
            return FALSE;
        }
    }
    return outZ > 0.0f;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel quizmo_stage_appendGfx
/* 398410 E009C220 27BDFF20 */  addiu     $sp, $sp, -0xE0
/* 398414 E009C224 0080182D */  daddu     $v1, $a0, $zero
/* 398418 E009C228 3C05DB06 */  lui       $a1, (0xDB060024 >> 16)
/* 39841C E009C22C 34A50024 */  ori       $a1, $a1, (0xDB060024 & 0xFFFF)
/* 398420 E009C230 27A40018 */  addiu     $a0, $sp, 0x18
/* 398424 E009C234 AFBE00C8 */  sw        $fp, 0xC8($sp)
/* 398428 E009C238 3C1E800A */  lui       $fp, %hi(gMainGfxPos)
/* 39842C E009C23C 27DEA66C */  addiu     $fp, $fp, %lo(gMainGfxPos)
/* 398430 E009C240 AFB500BC */  sw        $s5, 0xBC($sp)
/* 398434 E009C244 3C150001 */  lui       $s5, (0x11630 >> 16)
/* 398438 E009C248 AFBF00CC */  sw        $ra, 0xCC($sp)
/* 39843C E009C24C AFB700C4 */  sw        $s7, 0xC4($sp)
/* 398440 E009C250 AFB600C0 */  sw        $s6, 0xC0($sp)
/* 398444 E009C254 AFB400B8 */  sw        $s4, 0xB8($sp)
/* 398448 E009C258 AFB300B4 */  sw        $s3, 0xB4($sp)
/* 39844C E009C25C AFB200B0 */  sw        $s2, 0xB0($sp)
/* 398450 E009C260 AFB100AC */  sw        $s1, 0xAC($sp)
/* 398454 E009C264 AFB000A8 */  sw        $s0, 0xA8($sp)
/* 398458 E009C268 F7B600D8 */  sdc1      $f22, 0xD8($sp)
/* 39845C E009C26C F7B400D0 */  sdc1      $f20, 0xD0($sp)
/* 398460 E009C270 8FC80000 */  lw        $t0, 0x0($fp)
/* 398464 E009C274 8C77000C */  lw        $s7, 0xC($v1)
/* 398468 E009C278 0100102D */  daddu     $v0, $t0, $zero
/* 39846C E009C27C 25080008 */  addiu     $t0, $t0, 0x8
/* 398470 E009C280 8EF00018 */  lw        $s0, 0x18($s7)
/* 398474 E009C284 3C09E700 */  lui       $t1, (0xE7000000 >> 16)
/* 398478 E009C288 AC490000 */  sw        $t1, 0x0($v0)
/* 39847C E009C28C AC400004 */  sw        $zero, 0x4($v0)
/* 398480 E009C290 AD050000 */  sw        $a1, 0x0($t0)
/* 398484 E009C294 8C620010 */  lw        $v0, 0x10($v1)
/* 398488 E009C298 36B51630 */  ori       $s5, $s5, (0x11630 & 0xFFFF)
/* 39848C E009C29C AFC80000 */  sw        $t0, 0x0($fp)
/* 398490 E009C2A0 8C42001C */  lw        $v0, 0x1C($v0)
/* 398494 E009C2A4 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 398498 E009C2A8 00431021 */  addu      $v0, $v0, $v1
/* 39849C E009C2AC AD020004 */  sw        $v0, 0x4($t0)
/* 3984A0 E009C2B0 8EE5000C */  lw        $a1, 0xC($s7)
/* 3984A4 E009C2B4 8EE60010 */  lw        $a2, 0x10($s7)
/* 3984A8 E009C2B8 8EE70014 */  lw        $a3, 0x14($s7)
/* 3984AC E009C2BC 25080008 */  addiu     $t0, $t0, 0x8
/* 3984B0 E009C2C0 0C080108 */  jal       shim_guTranslateF
/* 3984B4 E009C2C4 AFC80000 */   sw       $t0, 0x0($fp)
/* 3984B8 E009C2C8 27B10058 */  addiu     $s1, $sp, 0x58
/* 3984BC E009C2CC 4480A000 */  mtc1      $zero, $f20
/* 3984C0 E009C2D0 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 3984C4 E009C2D4 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 3984C8 E009C2D8 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 3984CC E009C2DC 4481B000 */  mtc1      $at, $f22
/* 3984D0 E009C2E0 00031080 */  sll       $v0, $v1, 2
/* 3984D4 E009C2E4 00431021 */  addu      $v0, $v0, $v1
/* 3984D8 E009C2E8 00021080 */  sll       $v0, $v0, 2
/* 3984DC E009C2EC 00431023 */  subu      $v0, $v0, $v1
/* 3984E0 E009C2F0 000218C0 */  sll       $v1, $v0, 3
/* 3984E4 E009C2F4 00431021 */  addu      $v0, $v0, $v1
/* 3984E8 E009C2F8 000210C0 */  sll       $v0, $v0, 3
/* 3984EC E009C2FC 4406A000 */  mfc1      $a2, $f20
/* 3984F0 E009C300 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 3984F4 E009C304 00220821 */  addu      $at, $at, $v0
/* 3984F8 E009C308 C4201DEC */  lwc1      $f0, %lo(gCameras + 0x6C)($at)
/* 3984FC E009C30C 4407B000 */  mfc1      $a3, $f22
/* 398500 E009C310 46000007 */  neg.s     $f0, $f0
/* 398504 E009C314 44050000 */  mfc1      $a1, $f0
/* 398508 E009C318 0220202D */  daddu     $a0, $s1, $zero
/* 39850C E009C31C 0C080104 */  jal       shim_guRotateF
/* 398510 E009C320 E7B40010 */   swc1     $f20, 0x10($sp)
/* 398514 E009C324 0220202D */  daddu     $a0, $s1, $zero
/* 398518 E009C328 27A50018 */  addiu     $a1, $sp, 0x18
/* 39851C E009C32C 0C080114 */  jal       shim_guMtxCatF
/* 398520 E009C330 00A0302D */   daddu    $a2, $a1, $zero
/* 398524 E009C334 27A40018 */  addiu     $a0, $sp, 0x18
/* 398528 E009C338 3C168007 */  lui       $s6, %hi(gMatrixListPos)
/* 39852C E009C33C 26D641F0 */  addiu     $s6, $s6, %lo(gMatrixListPos)
/* 398530 E009C340 3C13800A */  lui       $s3, %hi(gDisplayContext)
/* 398534 E009C344 2673A674 */  addiu     $s3, $s3, %lo(gDisplayContext)
/* 398538 E009C348 96C50000 */  lhu       $a1, 0x0($s6)
/* 39853C E009C34C 8E620000 */  lw        $v0, 0x0($s3)
/* 398540 E009C350 00052980 */  sll       $a1, $a1, 6
/* 398544 E009C354 00B52821 */  addu      $a1, $a1, $s5
/* 398548 E009C358 0C080118 */  jal       shim_guMtxF2L
/* 39854C E009C35C 00452821 */   addu     $a1, $v0, $a1
/* 398550 E009C360 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 398554 E009C364 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 398558 E009C368 3C05FC12 */  lui       $a1, (0xFC121803 >> 16)
/* 39855C E009C36C 34A51803 */  ori       $a1, $a1, (0xFC121803 & 0xFFFF)
/* 398560 E009C370 321000FF */  andi      $s0, $s0, 0xFF
/* 398564 E009C374 3C14DE00 */  lui       $s4, (0xDE000000 >> 16)
/* 398568 E009C378 8FC80000 */  lw        $t0, 0x0($fp)
/* 39856C E009C37C 96C20000 */  lhu       $v0, 0x0($s6)
/* 398570 E009C380 0100202D */  daddu     $a0, $t0, $zero
/* 398574 E009C384 25080008 */  addiu     $t0, $t0, 0x8
/* 398578 E009C388 AFC80000 */  sw        $t0, 0x0($fp)
/* 39857C E009C38C AC830000 */  sw        $v1, 0x0($a0)
/* 398580 E009C390 24430001 */  addiu     $v1, $v0, 0x1
/* 398584 E009C394 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 398588 E009C398 00021180 */  sll       $v0, $v0, 6
/* 39858C E009C39C A6C30000 */  sh        $v1, 0x0($s6)
/* 398590 E009C3A0 8E630000 */  lw        $v1, 0x0($s3)
/* 398594 E009C3A4 00551021 */  addu      $v0, $v0, $s5
/* 398598 E009C3A8 00621821 */  addu      $v1, $v1, $v0
/* 39859C E009C3AC 25020008 */  addiu     $v0, $t0, 0x8
/* 3985A0 E009C3B0 AC830004 */  sw        $v1, 0x4($a0)
/* 3985A4 E009C3B4 AFC20000 */  sw        $v0, 0x0($fp)
/* 3985A8 E009C3B8 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3985AC E009C3BC AD020000 */  sw        $v0, 0x0($t0)
/* 3985B0 E009C3C0 00101600 */  sll       $v0, $s0, 24
/* 3985B4 E009C3C4 00101C00 */  sll       $v1, $s0, 16
/* 3985B8 E009C3C8 00431025 */  or        $v0, $v0, $v1
/* 3985BC E009C3CC 00108200 */  sll       $s0, $s0, 8
/* 3985C0 E009C3D0 00501025 */  or        $v0, $v0, $s0
/* 3985C4 E009C3D4 344200FF */  ori       $v0, $v0, 0xFF
/* 3985C8 E009C3D8 AD020004 */  sw        $v0, 0x4($t0)
/* 3985CC E009C3DC 25020010 */  addiu     $v0, $t0, 0x10
/* 3985D0 E009C3E0 AFC20000 */  sw        $v0, 0x0($fp)
/* 3985D4 E009C3E4 2402FFF8 */  addiu     $v0, $zero, -0x8
/* 3985D8 E009C3E8 AD02000C */  sw        $v0, 0xC($t0)
/* 3985DC E009C3EC 25020018 */  addiu     $v0, $t0, 0x18
/* 3985E0 E009C3F0 AD050008 */  sw        $a1, 0x8($t0)
/* 3985E4 E009C3F4 AFC20000 */  sw        $v0, 0x0($fp)
/* 3985E8 E009C3F8 3C020900 */  lui       $v0, %hi(D_09007230_3F3090)
/* 3985EC E009C3FC 24427230 */  addiu     $v0, $v0, %lo(D_09007230_3F3090)
/* 3985F0 E009C400 AD140010 */  sw        $s4, 0x10($t0)
/* 3985F4 E009C404 AD020014 */  sw        $v0, 0x14($t0)
/* 3985F8 E009C408 8EE3003C */  lw        $v1, 0x3C($s7)
/* 3985FC E009C40C 240200FF */  addiu     $v0, $zero, 0xFF
/* 398600 E009C410 10620150 */  beq       $v1, $v0, .LE009C954
/* 398604 E009C414 3C098080 */   lui      $t1, (0x80808081 >> 16)
/* 398608 E009C418 35298081 */  ori       $t1, $t1, (0x80808081 & 0xFFFF)
/* 39860C E009C41C AFA90098 */  sw        $t1, 0x98($sp)
/* 398610 E009C420 3C09DA38 */  lui       $t1, (0xDA380001 >> 16)
/* 398614 E009C424 35290001 */  ori       $t1, $t1, (0xDA380001 & 0xFFFF)
/* 398618 E009C428 AFA9009C */  sw        $t1, 0x9C($sp)
/* 39861C E009C42C 3C09D838 */  lui       $t1, (0xD8380002 >> 16)
/* 398620 E009C430 35290002 */  ori       $t1, $t1, (0xD8380002 & 0xFFFF)
/* 398624 E009C434 AFA900A0 */  sw        $t1, 0xA0($sp)
/* 398628 E009C438 3C09DA38 */  lui       $t1, (0xDA380000 >> 16)
/* 39862C E009C43C 3C110900 */  lui       $s1, %hi(D_090041C8_411458)
/* 398630 E009C440 263141C8 */  addiu     $s1, $s1, %lo(D_090041C8_411458)
/* 398634 E009C444 AD090018 */  sw        $t1, 0x18($t0)
/* 398638 E009C448 AD11001C */  sw        $s1, 0x1C($t0)
/* 39863C E009C44C 8EE3001C */  lw        $v1, 0x1C($s7)
/* 398640 E009C450 8FA90098 */  lw        $t1, 0x98($sp)
/* 398644 E009C454 00031040 */  sll       $v0, $v1, 1
/* 398648 E009C458 00431021 */  addu      $v0, $v0, $v1
/* 39864C E009C45C 00021900 */  sll       $v1, $v0, 4
/* 398650 E009C460 00621823 */  subu      $v1, $v1, $v0
/* 398654 E009C464 00031880 */  sll       $v1, $v1, 2
/* 398658 E009C468 00690018 */  mult      $v1, $t1
/* 39865C E009C46C 4406B000 */  mfc1      $a2, $f22
/* 398660 E009C470 4407A000 */  mfc1      $a3, $f20
/* 398664 E009C474 25020020 */  addiu     $v0, $t0, 0x20
/* 398668 E009C478 AFC20000 */  sw        $v0, 0x0($fp)
/* 39866C E009C47C 00004810 */  mfhi      $t1
/* 398670 E009C480 01231021 */  addu      $v0, $t1, $v1
/* 398674 E009C484 000211C3 */  sra       $v0, $v0, 7
/* 398678 E009C488 00031FC3 */  sra       $v1, $v1, 31
/* 39867C E009C48C 00431023 */  subu      $v0, $v0, $v1
/* 398680 E009C490 2442FF4C */  addiu     $v0, $v0, -0xB4
/* 398684 E009C494 44821000 */  mtc1      $v0, $f2
/* 398688 E009C498 00000000 */  nop
/* 39868C E009C49C 468010A0 */  cvt.s.w   $f2, $f2
/* 398690 E009C4A0 44051000 */  mfc1      $a1, $f2
/* 398694 E009C4A4 27A40018 */  addiu     $a0, $sp, 0x18
/* 398698 E009C4A8 0C080104 */  jal       shim_guRotateF
/* 39869C E009C4AC E7B40010 */   swc1     $f20, 0x10($sp)
/* 3986A0 E009C4B0 27A40018 */  addiu     $a0, $sp, 0x18
/* 3986A4 E009C4B4 96C50000 */  lhu       $a1, 0x0($s6)
/* 3986A8 E009C4B8 8E620000 */  lw        $v0, 0x0($s3)
/* 3986AC E009C4BC 00052980 */  sll       $a1, $a1, 6
/* 3986B0 E009C4C0 00B52821 */  addu      $a1, $a1, $s5
/* 3986B4 E009C4C4 0C080118 */  jal       shim_guMtxF2L
/* 3986B8 E009C4C8 00452821 */   addu     $a1, $v0, $a1
/* 3986BC E009C4CC 24120040 */  addiu     $s2, $zero, 0x40
/* 3986C0 E009C4D0 2410005A */  addiu     $s0, $zero, 0x5A
/* 3986C4 E009C4D4 8FC50000 */  lw        $a1, 0x0($fp)
/* 3986C8 E009C4D8 4406A000 */  mfc1      $a2, $f20
/* 3986CC E009C4DC 4407A000 */  mfc1      $a3, $f20
/* 3986D0 E009C4E0 96C20000 */  lhu       $v0, 0x0($s6)
/* 3986D4 E009C4E4 00A0402D */  daddu     $t0, $a1, $zero
/* 3986D8 E009C4E8 24A50008 */  addiu     $a1, $a1, 0x8
/* 3986DC E009C4EC 24430001 */  addiu     $v1, $v0, 0x1
/* 3986E0 E009C4F0 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3986E4 E009C4F4 AFC50000 */  sw        $a1, 0x0($fp)
/* 3986E8 E009C4F8 8FA9009C */  lw        $t1, 0x9C($sp)
/* 3986EC E009C4FC 00021180 */  sll       $v0, $v0, 6
/* 3986F0 E009C500 AD090000 */  sw        $t1, 0x0($t0)
/* 3986F4 E009C504 A6C30000 */  sh        $v1, 0x0($s6)
/* 3986F8 E009C508 8E630000 */  lw        $v1, 0x0($s3)
/* 3986FC E009C50C 00551021 */  addu      $v0, $v0, $s5
/* 398700 E009C510 00621821 */  addu      $v1, $v1, $v0
/* 398704 E009C514 24A20008 */  addiu     $v0, $a1, 0x8
/* 398708 E009C518 AD030004 */  sw        $v1, 0x4($t0)
/* 39870C E009C51C AFC20000 */  sw        $v0, 0x0($fp)
/* 398710 E009C520 3C020900 */  lui       $v0, %hi(D_09006E28_3F2C88)
/* 398714 E009C524 24426E28 */  addiu     $v0, $v0, %lo(D_09006E28_3F2C88)
/* 398718 E009C528 ACA20004 */  sw        $v0, 0x4($a1)
/* 39871C E009C52C 24A20010 */  addiu     $v0, $a1, 0x10
/* 398720 E009C530 3C090900 */  lui       $t1, %hi(D_09001518_40E7A8)
/* 398724 E009C534 25291518 */  addiu     $t1, $t1, %lo(D_09001518_40E7A8)
/* 398728 E009C538 24A30018 */  addiu     $v1, $a1, 0x18
/* 39872C E009C53C ACB40000 */  sw        $s4, 0x0($a1)
/* 398730 E009C540 AFC20000 */  sw        $v0, 0x0($fp)
/* 398734 E009C544 ACB40008 */  sw        $s4, 0x8($a1)
/* 398738 E009C548 ACA9000C */  sw        $t1, 0xC($a1)
/* 39873C E009C54C 8EE2002C */  lw        $v0, 0x2C($s7)
/* 398740 E009C550 3C09F200 */  lui       $t1, (0xF2000000 >> 16)
/* 398744 E009C554 AFC30000 */  sw        $v1, 0x0($fp)
/* 398748 E009C558 30420FFF */  andi      $v0, $v0, 0xFFF
/* 39874C E009C55C 00021300 */  sll       $v0, $v0, 12
/* 398750 E009C560 00491025 */  or        $v0, $v0, $t1
/* 398754 E009C564 ACA20010 */  sw        $v0, 0x10($a1)
/* 398758 E009C568 8EE3002C */  lw        $v1, 0x2C($s7)
/* 39875C E009C56C 24A20020 */  addiu     $v0, $a1, 0x20
/* 398760 E009C570 AFC20000 */  sw        $v0, 0x0($fp)
/* 398764 E009C574 3C020900 */  lui       $v0, %hi(D_09006DA0_3F2C00)
/* 398768 E009C578 24426DA0 */  addiu     $v0, $v0, %lo(D_09006DA0_3F2C00)
/* 39876C E009C57C ACB40018 */  sw        $s4, 0x18($a1)
/* 398770 E009C580 ACA2001C */  sw        $v0, 0x1C($a1)
/* 398774 E009C584 8FA900A0 */  lw        $t1, 0xA0($sp)
/* 398778 E009C588 2622FF80 */  addiu     $v0, $s1, -0x80
/* 39877C E009C58C ACB20024 */  sw        $s2, 0x24($a1)
/* 398780 E009C590 ACA2002C */  sw        $v0, 0x2C($a1)
/* 398784 E009C594 ACA90020 */  sw        $t1, 0x20($a1)
/* 398788 E009C598 3C09DA38 */  lui       $t1, (0xDA380000 >> 16)
/* 39878C E009C59C 246300FC */  addiu     $v1, $v1, 0xFC
/* 398790 E009C5A0 30630FFF */  andi      $v1, $v1, 0xFFF
/* 398794 E009C5A4 00031B00 */  sll       $v1, $v1, 12
/* 398798 E009C5A8 3463003C */  ori       $v1, $v1, 0x3C
/* 39879C E009C5AC ACA90028 */  sw        $t1, 0x28($a1)
/* 3987A0 E009C5B0 ACA30014 */  sw        $v1, 0x14($a1)
/* 3987A4 E009C5B4 8EE30020 */  lw        $v1, 0x20($s7)
/* 3987A8 E009C5B8 8FA90098 */  lw        $t1, 0x98($sp)
/* 3987AC E009C5BC 00031040 */  sll       $v0, $v1, 1
/* 3987B0 E009C5C0 00431021 */  addu      $v0, $v0, $v1
/* 3987B4 E009C5C4 00021900 */  sll       $v1, $v0, 4
/* 3987B8 E009C5C8 00621823 */  subu      $v1, $v1, $v0
/* 3987BC E009C5CC 00031840 */  sll       $v1, $v1, 1
/* 3987C0 E009C5D0 00690018 */  mult      $v1, $t1
/* 3987C4 E009C5D4 24A80028 */  addiu     $t0, $a1, 0x28
/* 3987C8 E009C5D8 24A50030 */  addiu     $a1, $a1, 0x30
/* 3987CC E009C5DC AFC80000 */  sw        $t0, 0x0($fp)
/* 3987D0 E009C5E0 AFC50000 */  sw        $a1, 0x0($fp)
/* 3987D4 E009C5E4 00004810 */  mfhi      $t1
/* 3987D8 E009C5E8 01231021 */  addu      $v0, $t1, $v1
/* 3987DC E009C5EC 000211C3 */  sra       $v0, $v0, 7
/* 3987E0 E009C5F0 00031FC3 */  sra       $v1, $v1, 31
/* 3987E4 E009C5F4 00431023 */  subu      $v0, $v0, $v1
/* 3987E8 E009C5F8 02021023 */  subu      $v0, $s0, $v0
/* 3987EC E009C5FC 44821000 */  mtc1      $v0, $f2
/* 3987F0 E009C600 00000000 */  nop
/* 3987F4 E009C604 468010A0 */  cvt.s.w   $f2, $f2
/* 3987F8 E009C608 44051000 */  mfc1      $a1, $f2
/* 3987FC E009C60C 27A40018 */  addiu     $a0, $sp, 0x18
/* 398800 E009C610 0C080104 */  jal       shim_guRotateF
/* 398804 E009C614 E7B60010 */   swc1     $f22, 0x10($sp)
/* 398808 E009C618 27A40018 */  addiu     $a0, $sp, 0x18
/* 39880C E009C61C 96C50000 */  lhu       $a1, 0x0($s6)
/* 398810 E009C620 8E620000 */  lw        $v0, 0x0($s3)
/* 398814 E009C624 00052980 */  sll       $a1, $a1, 6
/* 398818 E009C628 00B52821 */  addu      $a1, $a1, $s5
/* 39881C E009C62C 0C080118 */  jal       shim_guMtxF2L
/* 398820 E009C630 00452821 */   addu     $a1, $v0, $a1
/* 398824 E009C634 8FC50000 */  lw        $a1, 0x0($fp)
/* 398828 E009C638 4406A000 */  mfc1      $a2, $f20
/* 39882C E009C63C 4407A000 */  mfc1      $a3, $f20
/* 398830 E009C640 96C20000 */  lhu       $v0, 0x0($s6)
/* 398834 E009C644 00A0402D */  daddu     $t0, $a1, $zero
/* 398838 E009C648 24A50008 */  addiu     $a1, $a1, 0x8
/* 39883C E009C64C 24430001 */  addiu     $v1, $v0, 0x1
/* 398840 E009C650 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 398844 E009C654 AFC50000 */  sw        $a1, 0x0($fp)
/* 398848 E009C658 8FA9009C */  lw        $t1, 0x9C($sp)
/* 39884C E009C65C 00021180 */  sll       $v0, $v0, 6
/* 398850 E009C660 AD090000 */  sw        $t1, 0x0($t0)
/* 398854 E009C664 A6C30000 */  sh        $v1, 0x0($s6)
/* 398858 E009C668 8E630000 */  lw        $v1, 0x0($s3)
/* 39885C E009C66C 00551021 */  addu      $v0, $v0, $s5
/* 398860 E009C670 00621821 */  addu      $v1, $v1, $v0
/* 398864 E009C674 24A20008 */  addiu     $v0, $a1, 0x8
/* 398868 E009C678 AD030004 */  sw        $v1, 0x4($t0)
/* 39886C E009C67C AFC20000 */  sw        $v0, 0x0($fp)
/* 398870 E009C680 3C020900 */  lui       $v0, %hi(D_09006FB0_3F2E10)
/* 398874 E009C684 24426FB0 */  addiu     $v0, $v0, %lo(D_09006FB0_3F2E10)
/* 398878 E009C688 ACB40000 */  sw        $s4, 0x0($a1)
/* 39887C E009C68C ACA20004 */  sw        $v0, 0x4($a1)
/* 398880 E009C690 8FA900A0 */  lw        $t1, 0xA0($sp)
/* 398884 E009C694 2622FFC0 */  addiu     $v0, $s1, -0x40
/* 398888 E009C698 ACB2000C */  sw        $s2, 0xC($a1)
/* 39888C E009C69C ACA20014 */  sw        $v0, 0x14($a1)
/* 398890 E009C6A0 ACA90008 */  sw        $t1, 0x8($a1)
/* 398894 E009C6A4 3C09DA38 */  lui       $t1, (0xDA380000 >> 16)
/* 398898 E009C6A8 ACA90010 */  sw        $t1, 0x10($a1)
/* 39889C E009C6AC 8EE30024 */  lw        $v1, 0x24($s7)
/* 3988A0 E009C6B0 8FA90098 */  lw        $t1, 0x98($sp)
/* 3988A4 E009C6B4 00031040 */  sll       $v0, $v1, 1
/* 3988A8 E009C6B8 00431021 */  addu      $v0, $v0, $v1
/* 3988AC E009C6BC 00021900 */  sll       $v1, $v0, 4
/* 3988B0 E009C6C0 00621823 */  subu      $v1, $v1, $v0
/* 3988B4 E009C6C4 00031840 */  sll       $v1, $v1, 1
/* 3988B8 E009C6C8 00690018 */  mult      $v1, $t1
/* 3988BC E009C6CC 24A80010 */  addiu     $t0, $a1, 0x10
/* 3988C0 E009C6D0 24A50018 */  addiu     $a1, $a1, 0x18
/* 3988C4 E009C6D4 AFC80000 */  sw        $t0, 0x0($fp)
/* 3988C8 E009C6D8 AFC50000 */  sw        $a1, 0x0($fp)
/* 3988CC E009C6DC 00004810 */  mfhi      $t1
/* 3988D0 E009C6E0 01231021 */  addu      $v0, $t1, $v1
/* 3988D4 E009C6E4 000211C3 */  sra       $v0, $v0, 7
/* 3988D8 E009C6E8 00031FC3 */  sra       $v1, $v1, 31
/* 3988DC E009C6EC 00431023 */  subu      $v0, $v0, $v1
/* 3988E0 E009C6F0 2442FFA6 */  addiu     $v0, $v0, -0x5A
/* 3988E4 E009C6F4 44821000 */  mtc1      $v0, $f2
/* 3988E8 E009C6F8 00000000 */  nop
/* 3988EC E009C6FC 468010A0 */  cvt.s.w   $f2, $f2
/* 3988F0 E009C700 44051000 */  mfc1      $a1, $f2
/* 3988F4 E009C704 27A40018 */  addiu     $a0, $sp, 0x18
/* 3988F8 E009C708 0C080104 */  jal       shim_guRotateF
/* 3988FC E009C70C E7B60010 */   swc1     $f22, 0x10($sp)
/* 398900 E009C710 27A40018 */  addiu     $a0, $sp, 0x18
/* 398904 E009C714 96C50000 */  lhu       $a1, 0x0($s6)
/* 398908 E009C718 8E620000 */  lw        $v0, 0x0($s3)
/* 39890C E009C71C 00052980 */  sll       $a1, $a1, 6
/* 398910 E009C720 00B52821 */  addu      $a1, $a1, $s5
/* 398914 E009C724 0C080118 */  jal       shim_guMtxF2L
/* 398918 E009C728 00452821 */   addu     $a1, $v0, $a1
/* 39891C E009C72C 02328821 */  addu      $s1, $s1, $s2
/* 398920 E009C730 8FC50000 */  lw        $a1, 0x0($fp)
/* 398924 E009C734 4406B000 */  mfc1      $a2, $f22
/* 398928 E009C738 4407A000 */  mfc1      $a3, $f20
/* 39892C E009C73C 96C20000 */  lhu       $v0, 0x0($s6)
/* 398930 E009C740 00A0402D */  daddu     $t0, $a1, $zero
/* 398934 E009C744 24A50008 */  addiu     $a1, $a1, 0x8
/* 398938 E009C748 24430001 */  addiu     $v1, $v0, 0x1
/* 39893C E009C74C 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 398940 E009C750 AFC50000 */  sw        $a1, 0x0($fp)
/* 398944 E009C754 8FA9009C */  lw        $t1, 0x9C($sp)
/* 398948 E009C758 00021180 */  sll       $v0, $v0, 6
/* 39894C E009C75C AD090000 */  sw        $t1, 0x0($t0)
/* 398950 E009C760 A6C30000 */  sh        $v1, 0x0($s6)
/* 398954 E009C764 8E630000 */  lw        $v1, 0x0($s3)
/* 398958 E009C768 00551021 */  addu      $v0, $v0, $s5
/* 39895C E009C76C 00621821 */  addu      $v1, $v1, $v0
/* 398960 E009C770 24A20008 */  addiu     $v0, $a1, 0x8
/* 398964 E009C774 AD030004 */  sw        $v1, 0x4($t0)
/* 398968 E009C778 AFC20000 */  sw        $v0, 0x0($fp)
/* 39896C E009C77C 3C020900 */  lui       $v0, %hi(D_09006F20_3F2D80)
/* 398970 E009C780 24426F20 */  addiu     $v0, $v0, %lo(D_09006F20_3F2D80)
/* 398974 E009C784 ACA20004 */  sw        $v0, 0x4($a1)
/* 398978 E009C788 24A20010 */  addiu     $v0, $a1, 0x10
/* 39897C E009C78C ACB40000 */  sw        $s4, 0x0($a1)
/* 398980 E009C790 AFC20000 */  sw        $v0, 0x0($fp)
/* 398984 E009C794 24A20018 */  addiu     $v0, $a1, 0x18
/* 398988 E009C798 8FA900A0 */  lw        $t1, 0xA0($sp)
/* 39898C E009C79C 24A30028 */  addiu     $v1, $a1, 0x28
/* 398990 E009C7A0 ACB2000C */  sw        $s2, 0xC($a1)
/* 398994 E009C7A4 ACA90008 */  sw        $t1, 0x8($a1)
/* 398998 E009C7A8 AFC20000 */  sw        $v0, 0x0($fp)
/* 39899C E009C7AC 3C020900 */  lui       $v0, %hi(D_090070E8_3F2F48)
/* 3989A0 E009C7B0 244270E8 */  addiu     $v0, $v0, %lo(D_090070E8_3F2F48)
/* 3989A4 E009C7B4 ACA20014 */  sw        $v0, 0x14($a1)
/* 3989A8 E009C7B8 24A20020 */  addiu     $v0, $a1, 0x20
/* 3989AC E009C7BC ACB40010 */  sw        $s4, 0x10($a1)
/* 3989B0 E009C7C0 AFC20000 */  sw        $v0, 0x0($fp)
/* 3989B4 E009C7C4 3C020900 */  lui       $v0, %hi(D_09007030_3F2E90)
/* 3989B8 E009C7C8 24427030 */  addiu     $v0, $v0, %lo(D_09007030_3F2E90)
/* 3989BC E009C7CC 3C090900 */  lui       $t1, %hi(D_09001518_40E7A8)
/* 3989C0 E009C7D0 25291518 */  addiu     $t1, $t1, %lo(D_09001518_40E7A8)
/* 3989C4 E009C7D4 ACB40018 */  sw        $s4, 0x18($a1)
/* 3989C8 E009C7D8 ACA2001C */  sw        $v0, 0x1C($a1)
/* 3989CC E009C7DC ACB40020 */  sw        $s4, 0x20($a1)
/* 3989D0 E009C7E0 ACA90024 */  sw        $t1, 0x24($a1)
/* 3989D4 E009C7E4 8EE2002C */  lw        $v0, 0x2C($s7)
/* 3989D8 E009C7E8 3C09F200 */  lui       $t1, (0xF2000000 >> 16)
/* 3989DC E009C7EC AFC30000 */  sw        $v1, 0x0($fp)
/* 3989E0 E009C7F0 30420FFF */  andi      $v0, $v0, 0xFFF
/* 3989E4 E009C7F4 00021300 */  sll       $v0, $v0, 12
/* 3989E8 E009C7F8 00491025 */  or        $v0, $v0, $t1
/* 3989EC E009C7FC ACA20028 */  sw        $v0, 0x28($a1)
/* 3989F0 E009C800 8EE2002C */  lw        $v0, 0x2C($s7)
/* 3989F4 E009C804 24A30030 */  addiu     $v1, $a1, 0x30
/* 3989F8 E009C808 AFC30000 */  sw        $v1, 0x0($fp)
/* 3989FC E009C80C 3C030900 */  lui       $v1, %hi(D_09006FD8_3F2E38)
/* 398A00 E009C810 24636FD8 */  addiu     $v1, $v1, %lo(D_09006FD8_3F2E38)
/* 398A04 E009C814 3C09DA38 */  lui       $t1, (0xDA380000 >> 16)
/* 398A08 E009C818 ACB40030 */  sw        $s4, 0x30($a1)
/* 398A0C E009C81C ACA30034 */  sw        $v1, 0x34($a1)
/* 398A10 E009C820 ACA90038 */  sw        $t1, 0x38($a1)
/* 398A14 E009C824 ACB1003C */  sw        $s1, 0x3C($a1)
/* 398A18 E009C828 244200FC */  addiu     $v0, $v0, 0xFC
/* 398A1C E009C82C 30420FFF */  andi      $v0, $v0, 0xFFF
/* 398A20 E009C830 00021300 */  sll       $v0, $v0, 12
/* 398A24 E009C834 3442003C */  ori       $v0, $v0, 0x3C
/* 398A28 E009C838 ACA2002C */  sw        $v0, 0x2C($a1)
/* 398A2C E009C83C 8EE30028 */  lw        $v1, 0x28($s7)
/* 398A30 E009C840 8FA90098 */  lw        $t1, 0x98($sp)
/* 398A34 E009C844 00031040 */  sll       $v0, $v1, 1
/* 398A38 E009C848 00431021 */  addu      $v0, $v0, $v1
/* 398A3C E009C84C 00021900 */  sll       $v1, $v0, 4
/* 398A40 E009C850 00621823 */  subu      $v1, $v1, $v0
/* 398A44 E009C854 00031840 */  sll       $v1, $v1, 1
/* 398A48 E009C858 00690018 */  mult      $v1, $t1
/* 398A4C E009C85C 24A80038 */  addiu     $t0, $a1, 0x38
/* 398A50 E009C860 00B22821 */  addu      $a1, $a1, $s2
/* 398A54 E009C864 AFC80000 */  sw        $t0, 0x0($fp)
/* 398A58 E009C868 AFC50000 */  sw        $a1, 0x0($fp)
/* 398A5C E009C86C 00004810 */  mfhi      $t1
/* 398A60 E009C870 01231021 */  addu      $v0, $t1, $v1
/* 398A64 E009C874 000211C3 */  sra       $v0, $v0, 7
/* 398A68 E009C878 00031FC3 */  sra       $v1, $v1, 31
/* 398A6C E009C87C 00431023 */  subu      $v0, $v0, $v1
/* 398A70 E009C880 02028023 */  subu      $s0, $s0, $v0
/* 398A74 E009C884 44901000 */  mtc1      $s0, $f2
/* 398A78 E009C888 00000000 */  nop
/* 398A7C E009C88C 468010A0 */  cvt.s.w   $f2, $f2
/* 398A80 E009C890 44051000 */  mfc1      $a1, $f2
/* 398A84 E009C894 27A40018 */  addiu     $a0, $sp, 0x18
/* 398A88 E009C898 0C080104 */  jal       shim_guRotateF
/* 398A8C E009C89C AFA70010 */   sw       $a3, 0x10($sp)
/* 398A90 E009C8A0 27A40018 */  addiu     $a0, $sp, 0x18
/* 398A94 E009C8A4 96C50000 */  lhu       $a1, 0x0($s6)
/* 398A98 E009C8A8 8E620000 */  lw        $v0, 0x0($s3)
/* 398A9C E009C8AC 00052980 */  sll       $a1, $a1, 6
/* 398AA0 E009C8B0 00B52821 */  addu      $a1, $a1, $s5
/* 398AA4 E009C8B4 0C080118 */  jal       shim_guMtxF2L
/* 398AA8 E009C8B8 00452821 */   addu     $a1, $v0, $a1
/* 398AAC E009C8BC 8FC40000 */  lw        $a0, 0x0($fp)
/* 398AB0 E009C8C0 96C20000 */  lhu       $v0, 0x0($s6)
/* 398AB4 E009C8C4 0080282D */  daddu     $a1, $a0, $zero
/* 398AB8 E009C8C8 24840008 */  addiu     $a0, $a0, 0x8
/* 398ABC E009C8CC 24430001 */  addiu     $v1, $v0, 0x1
/* 398AC0 E009C8D0 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 398AC4 E009C8D4 AFC40000 */  sw        $a0, 0x0($fp)
/* 398AC8 E009C8D8 8FA9009C */  lw        $t1, 0x9C($sp)
/* 398ACC E009C8DC 00021180 */  sll       $v0, $v0, 6
/* 398AD0 E009C8E0 ACA90000 */  sw        $t1, 0x0($a1)
/* 398AD4 E009C8E4 A6C30000 */  sh        $v1, 0x0($s6)
/* 398AD8 E009C8E8 8E630000 */  lw        $v1, 0x0($s3)
/* 398ADC E009C8EC 00551021 */  addu      $v0, $v0, $s5
/* 398AE0 E009C8F0 00621821 */  addu      $v1, $v1, $v0
/* 398AE4 E009C8F4 24820008 */  addiu     $v0, $a0, 0x8
/* 398AE8 E009C8F8 ACA30004 */  sw        $v1, 0x4($a1)
/* 398AEC E009C8FC AFC20000 */  sw        $v0, 0x0($fp)
/* 398AF0 E009C900 3C020900 */  lui       $v0, %hi(D_09006D48_3F2BA8)
/* 398AF4 E009C904 24426D48 */  addiu     $v0, $v0, %lo(D_09006D48_3F2BA8)
/* 398AF8 E009C908 AC820004 */  sw        $v0, 0x4($a0)
/* 398AFC E009C90C 24820010 */  addiu     $v0, $a0, 0x10
/* 398B00 E009C910 AC940000 */  sw        $s4, 0x0($a0)
/* 398B04 E009C914 AFC20000 */  sw        $v0, 0x0($fp)
/* 398B08 E009C918 8FA900A0 */  lw        $t1, 0xA0($sp)
/* 398B0C E009C91C 24820018 */  addiu     $v0, $a0, 0x18
/* 398B10 E009C920 AC890008 */  sw        $t1, 0x8($a0)
/* 398B14 E009C924 AC92000C */  sw        $s2, 0xC($a0)
/* 398B18 E009C928 AFC20000 */  sw        $v0, 0x0($fp)
/* 398B1C E009C92C 3C020900 */  lui       $v0, %hi(D_09000218_415278)
/* 398B20 E009C930 24420218 */  addiu     $v0, $v0, %lo(D_09000218_415278)
/* 398B24 E009C934 AC820014 */  sw        $v0, 0x14($a0)
/* 398B28 E009C938 24820020 */  addiu     $v0, $a0, 0x20
/* 398B2C E009C93C AC940010 */  sw        $s4, 0x10($a0)
/* 398B30 E009C940 AFC20000 */  sw        $v0, 0x0($fp)
/* 398B34 E009C944 3C020900 */  lui       $v0, %hi(D_09007090_3F2EF0)
/* 398B38 E009C948 24427090 */  addiu     $v0, $v0, %lo(D_09007090_3F2EF0)
/* 398B3C E009C94C AC940018 */  sw        $s4, 0x18($a0)
/* 398B40 E009C950 AC82001C */  sw        $v0, 0x1C($a0)
.LE009C954:
/* 398B44 E009C954 3C03D838 */  lui       $v1, (0xD8380002 >> 16)
/* 398B48 E009C958 8FC20000 */  lw        $v0, 0x0($fp)
/* 398B4C E009C95C 34630002 */  ori       $v1, $v1, (0xD8380002 & 0xFFFF)
/* 398B50 E009C960 0040202D */  daddu     $a0, $v0, $zero
/* 398B54 E009C964 24420008 */  addiu     $v0, $v0, 0x8
/* 398B58 E009C968 AFC20000 */  sw        $v0, 0x0($fp)
/* 398B5C E009C96C AC830000 */  sw        $v1, 0x0($a0)
/* 398B60 E009C970 24030040 */  addiu     $v1, $zero, 0x40
/* 398B64 E009C974 AC830004 */  sw        $v1, 0x4($a0)
/* 398B68 E009C978 24430008 */  addiu     $v1, $v0, 0x8
/* 398B6C E009C97C 3C09E700 */  lui       $t1, (0xE7000000 >> 16)
/* 398B70 E009C980 AFC30000 */  sw        $v1, 0x0($fp)
/* 398B74 E009C984 AC490000 */  sw        $t1, 0x0($v0)
/* 398B78 E009C988 AC400004 */  sw        $zero, 0x4($v0)
/* 398B7C E009C98C 8FBF00CC */  lw        $ra, 0xCC($sp)
/* 398B80 E009C990 8FBE00C8 */  lw        $fp, 0xC8($sp)
/* 398B84 E009C994 8FB700C4 */  lw        $s7, 0xC4($sp)
/* 398B88 E009C998 8FB600C0 */  lw        $s6, 0xC0($sp)
/* 398B8C E009C99C 8FB500BC */  lw        $s5, 0xBC($sp)
/* 398B90 E009C9A0 8FB400B8 */  lw        $s4, 0xB8($sp)
/* 398B94 E009C9A4 8FB300B4 */  lw        $s3, 0xB4($sp)
/* 398B98 E009C9A8 8FB200B0 */  lw        $s2, 0xB0($sp)
/* 398B9C E009C9AC 8FB100AC */  lw        $s1, 0xAC($sp)
/* 398BA0 E009C9B0 8FB000A8 */  lw        $s0, 0xA8($sp)
/* 398BA4 E009C9B4 D7B600D8 */  ldc1      $f22, 0xD8($sp)
/* 398BA8 E009C9B8 D7B400D0 */  ldc1      $f20, 0xD0($sp)
/* 398BAC E009C9BC 03E00008 */  jr        $ra
/* 398BB0 E009C9C0 27BD00E0 */   addiu    $sp, $sp, 0xE0
/* 398BB4 E009C9C4 00000000 */  nop
/* 398BB8 E009C9C8 00000000 */  nop
/* 398BBC E009C9CC 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void quizmo_stage_appendGfx(void* effect) {
    QuizmoStageFXData* data = ((EffectInstance*)effect)->data.quizmoStage;
    s32 microphoneRaiseAmt = data->microphoneRaiseAmt;
    Matrix4f sp18;
    Matrix4f sp58;

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

    shim_guTranslateF(sp18, data->origin.x, data->origin.y, data->origin.z);
    shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 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_LOAD | G_MTX_MODELVIEW);
    gDPSetPrimColor(gMainGfxPos++, 0, 0, microphoneRaiseAmt, microphoneRaiseAmt, microphoneRaiseAmt, 255);
    gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA, PM_CC_16);
    gSPDisplayList(gMainGfxPos++, D_09007230_39FDF0);

    if (data->unk_3C != 255) {
        gSPMatrix(gMainGfxPos++, &D_09004148_39CD08[2], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);

        shim_guRotateF(sp18, (data->rearWallRaiseAmt * 180) / 255 - 180, 1.0f, 0.0f, 0.0f);
        shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

        gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
        gSPDisplayList(gMainGfxPos++, D_09006E28_39F9E8);
        gSPDisplayList(gMainGfxPos++, D_09001518_39A0D8);
        gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, data->lightScrollAmt, 0, data->lightScrollAmt + 252, 60);
        gSPDisplayList(gMainGfxPos++, D_09006DA0_39F960);
        gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
        gSPMatrix(gMainGfxPos++, &D_09004148_39CD08[0], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);

        shim_guRotateF(sp18, 90 - (data->leftWallRaiseAmt * 90) / 255, 0.0f, 0.0f, 1.0f);
        shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

        gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
        gSPDisplayList(gMainGfxPos++, D_09006FB0_39FB70);
        gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
        gSPMatrix(gMainGfxPos++, &D_09004148_39CD08[1], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);

        shim_guRotateF(sp18, (data->rightWallRaiseAmt * 90) / 255 - 90, 0.0f, 0.0f, 1.0f);
        shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

        gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
        gSPDisplayList(gMainGfxPos++, D_09006F20_39FAE0);
        gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
        gSPDisplayList(gMainGfxPos++, D_090070E8_39FCA8);
        gSPDisplayList(gMainGfxPos++, D_09007030_39FBF0);
        gSPDisplayList(gMainGfxPos++, D_09001518_39A0D8);
        gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, data->lightScrollAmt, 0, data->lightScrollAmt + 252, 60);
        gSPDisplayList(gMainGfxPos++, D_09006FD8_39FB98);
        gSPMatrix(gMainGfxPos++, &D_09004148_39CD08[3], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);

        shim_guRotateF(sp18, 90 - (data->podiumRaiseAmt * 90) / 255, 1.0f, 0.0f, 0.0f);
        shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

        gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
        gSPDisplayList(gMainGfxPos++, D_09006D48_39F908);
        gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
        gSPDisplayList(gMainGfxPos++, D_09000218_398DD8);
        gSPDisplayList(gMainGfxPos++, D_09007090_39FC50);
    }

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