### RAW ASSEMBLY INSTRUCTIONS:

glabel imgfx_appendGfx_mesh_anim
/* D49F0 8013E2F0 3C028007 */  lui       $v0, %hi(gCurrentDisplayContextIndex)
/* D49F4 8013E2F4 8C4241F4 */  lw        $v0, %lo(gCurrentDisplayContextIndex)($v0)
/* D49F8 8013E2F8 27BDFFC8 */  addiu     $sp, $sp, -0x38
/* D49FC 8013E2FC AFB3002C */  sw        $s3, 0x2C($sp)
/* D4A00 8013E300 0080982D */  daddu     $s3, $a0, $zero
/* D4A04 8013E304 AFBF0034 */  sw        $ra, 0x34($sp)
/* D4A08 8013E308 AFB40030 */  sw        $s4, 0x30($sp)
/* D4A0C 8013E30C AFB20028 */  sw        $s2, 0x28($sp)
/* D4A10 8013E310 AFB10024 */  sw        $s1, 0x24($sp)
/* D4A14 8013E314 AFB00020 */  sw        $s0, 0x20($sp)
/* D4A18 8013E318 00021080 */  sll       $v0, $v0, 2
/* D4A1C 8013E31C 02621821 */  addu      $v1, $s3, $v0
/* D4A20 8013E320 8C620068 */  lw        $v0, 0x68($v1)
/* D4A24 8013E324 1040016F */  beqz      $v0, .L8013E8E4
/* D4A28 8013E328 00A0A02D */   daddu    $s4, $a1, $zero
/* D4A2C 8013E32C 8C620070 */  lw        $v0, 0x70($v1)
/* D4A30 8013E330 1040016C */  beqz      $v0, .L8013E8E4
/* D4A34 8013E334 3C120001 */   lui      $s2, (0x11630 >> 16)
/* D4A38 8013E338 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* D4A3C 8013E33C 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* D4A40 8013E340 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* D4A44 8013E344 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* D4A48 8013E348 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* D4A4C 8013E34C 3C013DCC */  lui       $at, (0x3DCCCCCD >> 16)
/* D4A50 8013E350 3421CCCD */  ori       $at, $at, (0x3DCCCCCD & 0xFFFF)
/* D4A54 8013E354 44810000 */  mtc1      $at, $f0
/* D4A58 8013E358 96040000 */  lhu       $a0, 0x0($s0)
/* D4A5C 8013E35C 8E220000 */  lw        $v0, 0x0($s1)
/* D4A60 8013E360 00042180 */  sll       $a0, $a0, 6
/* D4A64 8013E364 00922021 */  addu      $a0, $a0, $s2
/* D4A68 8013E368 44050000 */  mfc1      $a1, $f0
/* D4A6C 8013E36C 00442021 */  addu      $a0, $v0, $a0
/* D4A70 8013E370 00A0302D */  daddu     $a2, $a1, $zero
/* D4A74 8013E374 0C019DC0 */  jal       guScale
/* D4A78 8013E378 00A0382D */   daddu    $a3, $a1, $zero
/* D4A7C 8013E37C 3C08800A */  lui       $t0, %hi(gMainGfxPos)
/* D4A80 8013E380 2508A66C */  addiu     $t0, $t0, %lo(gMainGfxPos)
/* D4A84 8013E384 8D070000 */  lw        $a3, 0x0($t0)
/* D4A88 8013E388 00E0282D */  daddu     $a1, $a3, $zero
/* D4A8C 8013E38C 24E70008 */  addiu     $a3, $a3, 0x8
/* D4A90 8013E390 AD070000 */  sw        $a3, 0x0($t0)
/* D4A94 8013E394 96040000 */  lhu       $a0, 0x0($s0)
/* D4A98 8013E398 3C02DA38 */  lui       $v0, (0xDA380000 >> 16)
/* D4A9C 8013E39C ACA20000 */  sw        $v0, 0x0($a1)
/* D4AA0 8013E3A0 8E230000 */  lw        $v1, 0x0($s1)
/* D4AA4 8013E3A4 3082FFFF */  andi      $v0, $a0, 0xFFFF
/* D4AA8 8013E3A8 00021180 */  sll       $v0, $v0, 6
/* D4AAC 8013E3AC 00521021 */  addu      $v0, $v0, $s2
/* D4AB0 8013E3B0 00621821 */  addu      $v1, $v1, $v0
/* D4AB4 8013E3B4 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* D4AB8 8013E3B8 00621821 */  addu      $v1, $v1, $v0
/* D4ABC 8013E3BC ACA30004 */  sw        $v1, 0x4($a1)
/* D4AC0 8013E3C0 8E620014 */  lw        $v0, 0x14($s3)
/* D4AC4 8013E3C4 24840001 */  addiu     $a0, $a0, 0x1
/* D4AC8 8013E3C8 30420020 */  andi      $v0, $v0, 0x20
/* D4ACC 8013E3CC 14400130 */  bnez      $v0, .L8013E890
/* D4AD0 8013E3D0 A6040000 */   sh       $a0, 0x0($s0)
/* D4AD4 8013E3D4 3C03E300 */  lui       $v1, (0xE3001001 >> 16)
/* D4AD8 8013E3D8 34631001 */  ori       $v1, $v1, (0xE3001001 & 0xFFFF)
/* D4ADC 8013E3DC 3C05F500 */  lui       $a1, (0xF5000100 >> 16)
/* D4AE0 8013E3E0 34A50100 */  ori       $a1, $a1, (0xF5000100 & 0xFFFF)
/* D4AE4 8013E3E4 3C060703 */  lui       $a2, (0x703C000 >> 16)
/* D4AE8 8013E3E8 34C6C000 */  ori       $a2, $a2, (0x703C000 & 0xFFFF)
/* D4AEC 8013E3EC 24E20008 */  addiu     $v0, $a3, 0x8
/* D4AF0 8013E3F0 AD020000 */  sw        $v0, 0x0($t0)
/* D4AF4 8013E3F4 34028000 */  ori       $v0, $zero, 0x8000
/* D4AF8 8013E3F8 ACE20004 */  sw        $v0, 0x4($a3)
/* D4AFC 8013E3FC 24E20010 */  addiu     $v0, $a3, 0x10
/* D4B00 8013E400 ACE30000 */  sw        $v1, 0x0($a3)
/* D4B04 8013E404 AD020000 */  sw        $v0, 0x0($t0)
/* D4B08 8013E408 3C02FD10 */  lui       $v0, (0xFD100000 >> 16)
/* D4B0C 8013E40C ACE20008 */  sw        $v0, 0x8($a3)
/* D4B10 8013E410 24E20018 */  addiu     $v0, $a3, 0x18
/* D4B14 8013E414 AD020000 */  sw        $v0, 0x0($t0)
/* D4B18 8013E418 24E20020 */  addiu     $v0, $a3, 0x20
/* D4B1C 8013E41C AD020000 */  sw        $v0, 0x0($t0)
/* D4B20 8013E420 24E20028 */  addiu     $v0, $a3, 0x28
/* D4B24 8013E424 AD020000 */  sw        $v0, 0x0($t0)
/* D4B28 8013E428 3C038015 */  lui       $v1, %hi(ImgFXCurrentTexturePtr)
/* D4B2C 8013E42C 8C63EE10 */  lw        $v1, %lo(ImgFXCurrentTexturePtr)($v1)
/* D4B30 8013E430 24E20030 */  addiu     $v0, $a3, 0x30
/* D4B34 8013E434 AD020000 */  sw        $v0, 0x0($t0)
/* D4B38 8013E438 8C640004 */  lw        $a0, 0x4($v1)
/* D4B3C 8013E43C 3C038015 */  lui       $v1, %hi(gSpriteShadingProfile)
/* D4B40 8013E440 8C631328 */  lw        $v1, %lo(gSpriteShadingProfile)($v1)
/* D4B44 8013E444 3C02E800 */  lui       $v0, (0xE8000000 >> 16)
/* D4B48 8013E448 ACE20010 */  sw        $v0, 0x10($a3)
/* D4B4C 8013E44C 3C020700 */  lui       $v0, (0x7000000 >> 16)
/* D4B50 8013E450 ACE2001C */  sw        $v0, 0x1C($a3)
/* D4B54 8013E454 3C02E600 */  lui       $v0, (0xE6000000 >> 16)
/* D4B58 8013E458 ACE20020 */  sw        $v0, 0x20($a3)
/* D4B5C 8013E45C 3C02F000 */  lui       $v0, (0xF0000000 >> 16)
/* D4B60 8013E460 ACE20028 */  sw        $v0, 0x28($a3)
/* D4B64 8013E464 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* D4B68 8013E468 ACE00014 */  sw        $zero, 0x14($a3)
/* D4B6C 8013E46C ACE50018 */  sw        $a1, 0x18($a3)
/* D4B70 8013E470 ACE00024 */  sw        $zero, 0x24($a3)
/* D4B74 8013E474 ACE6002C */  sw        $a2, 0x2C($a3)
/* D4B78 8013E478 ACE20030 */  sw        $v0, 0x30($a3)
/* D4B7C 8013E47C ACE00034 */  sw        $zero, 0x34($a3)
/* D4B80 8013E480 ACE4000C */  sw        $a0, 0xC($a3)
/* D4B84 8013E484 94620000 */  lhu       $v0, 0x0($v1)
/* D4B88 8013E488 24E30038 */  addiu     $v1, $a3, 0x38
/* D4B8C 8013E48C 30420001 */  andi      $v0, $v0, 0x1
/* D4B90 8013E490 104000A7 */  beqz      $v0, .L8013E730
/* D4B94 8013E494 AD030000 */   sw       $v1, 0x0($t0)
/* D4B98 8013E498 8E620014 */  lw        $v0, 0x14($s3)
/* D4B9C 8013E49C 3C030018 */  lui       $v1, (0x180000 >> 16)
/* D4BA0 8013E4A0 00431024 */  and       $v0, $v0, $v1
/* D4BA4 8013E4A4 504000A3 */  beql      $v0, $zero, .L8013E734
/* D4BA8 8013E4A8 3C08070A */   lui      $t0, (0x70A0280 >> 16)
/* D4BAC 8013E4AC 92630002 */  lbu       $v1, 0x2($s3)
/* D4BB0 8013E4B0 10600007 */  beqz      $v1, .L8013E4D0
/* D4BB4 8013E4B4 24020002 */   addiu    $v0, $zero, 0x2
/* D4BB8 8013E4B8 10620005 */  beq       $v1, $v0, .L8013E4D0
/* D4BBC 8013E4BC 24020007 */   addiu    $v0, $zero, 0x7
/* D4BC0 8013E4C0 10620003 */  beq       $v1, $v0, .L8013E4D0
/* D4BC4 8013E4C4 2402000B */   addiu    $v0, $zero, 0xB
/* D4BC8 8013E4C8 1462009A */  bne       $v1, $v0, .L8013E734
/* D4BCC 8013E4CC 3C08070A */   lui      $t0, (0x70A0280 >> 16)
.L8013E4D0:
/* D4BD0 8013E4D0 240E00FF */  addiu     $t6, $zero, 0xFF
/* D4BD4 8013E4D4 3C08070A */  lui       $t0, (0x70A0280 >> 16)
/* D4BD8 8013E4D8 35080280 */  ori       $t0, $t0, (0x70A0280 & 0xFFFF)
/* D4BDC 8013E4DC 3C0A010A */  lui       $t2, (0x10A0280 >> 16)
/* D4BE0 8013E4E0 354A0280 */  ori       $t2, $t2, (0x10A0280 & 0xFFFF)
/* D4BE4 8013E4E4 3C09F240 */  lui       $t1, (0xF2400400 >> 16)
/* D4BE8 8013E4E8 35290400 */  ori       $t1, $t1, (0xF2400400 & 0xFFFF)
/* D4BEC 8013E4EC 3C0B001A */  lui       $t3, (0x1A0280 >> 16)
/* D4BF0 8013E4F0 356B0280 */  ori       $t3, $t3, (0x1A0280 & 0xFFFF)
/* D4BF4 8013E4F4 3C0CF510 */  lui       $t4, (0xF5100900 >> 16)
/* D4BF8 8013E4F8 358C0900 */  ori       $t4, $t4, (0xF5100900 & 0xFFFF)
/* D4BFC 8013E4FC 3C0D020F */  lui       $t5, (0x20FC000 >> 16)
/* D4C00 8013E500 3C07800A */  lui       $a3, %hi(gMainGfxPos)
/* D4C04 8013E504 24E7A66C */  addiu     $a3, $a3, %lo(gMainGfxPos)
/* D4C08 8013E508 8CE50000 */  lw        $a1, 0x0($a3)
/* D4C0C 8013E50C 35ADC000 */  ori       $t5, $t5, (0x20FC000 & 0xFFFF)
/* D4C10 8013E510 00A0202D */  daddu     $a0, $a1, $zero
/* D4C14 8013E514 24A50008 */  addiu     $a1, $a1, 0x8
/* D4C18 8013E518 ACE50000 */  sw        $a1, 0x0($a3)
/* D4C1C 8013E51C 3C068015 */  lui       $a2, %hi(ImgFXCurrentTexturePtr)
/* D4C20 8013E520 8CC6EE10 */  lw        $a2, %lo(ImgFXCurrentTexturePtr)($a2)
/* D4C24 8013E524 24A20008 */  addiu     $v0, $a1, 0x8
/* D4C28 8013E528 ACE20000 */  sw        $v0, 0x0($a3)
/* D4C2C 8013E52C 94C20008 */  lhu       $v0, 0x8($a2)
/* D4C30 8013E530 24A30010 */  addiu     $v1, $a1, 0x10
/* D4C34 8013E534 ACE30000 */  sw        $v1, 0x0($a3)
/* D4C38 8013E538 3C03FD48 */  lui       $v1, (0xFD480000 >> 16)
/* D4C3C 8013E53C 00021042 */  srl       $v0, $v0, 1
/* D4C40 8013E540 2442FFFF */  addiu     $v0, $v0, -0x1
/* D4C44 8013E544 30420FFF */  andi      $v0, $v0, 0xFFF
/* D4C48 8013E548 00431025 */  or        $v0, $v0, $v1
/* D4C4C 8013E54C AC820000 */  sw        $v0, 0x0($a0)
/* D4C50 8013E550 8CC30000 */  lw        $v1, 0x0($a2)
/* D4C54 8013E554 24A20018 */  addiu     $v0, $a1, 0x18
/* D4C58 8013E558 ACE20000 */  sw        $v0, 0x0($a3)
/* D4C5C 8013E55C AC830004 */  sw        $v1, 0x4($a0)
/* D4C60 8013E560 94C20008 */  lhu       $v0, 0x8($a2)
/* D4C64 8013E564 24A30020 */  addiu     $v1, $a1, 0x20
/* D4C68 8013E568 ACE30000 */  sw        $v1, 0x0($a3)
/* D4C6C 8013E56C 3C03E600 */  lui       $v1, (0xE6000000 >> 16)
/* D4C70 8013E570 ACA30008 */  sw        $v1, 0x8($a1)
/* D4C74 8013E574 3C03F400 */  lui       $v1, (0xF4000000 >> 16)
/* D4C78 8013E578 ACA30010 */  sw        $v1, 0x10($a1)
/* D4C7C 8013E57C 3C03F548 */  lui       $v1, (0xF5480000 >> 16)
/* D4C80 8013E580 3C04E700 */  lui       $a0, (0xE7000000 >> 16)
/* D4C84 8013E584 ACA80004 */  sw        $t0, 0x4($a1)
/* D4C88 8013E588 ACA0000C */  sw        $zero, 0xC($a1)
/* D4C8C 8013E58C 00021042 */  srl       $v0, $v0, 1
/* D4C90 8013E590 24420007 */  addiu     $v0, $v0, 0x7
/* D4C94 8013E594 000210C3 */  sra       $v0, $v0, 3
/* D4C98 8013E598 304201FF */  andi      $v0, $v0, 0x1FF
/* D4C9C 8013E59C 00021240 */  sll       $v0, $v0, 9
/* D4CA0 8013E5A0 00431025 */  or        $v0, $v0, $v1
/* D4CA4 8013E5A4 ACA20000 */  sw        $v0, 0x0($a1)
/* D4CA8 8013E5A8 94C20008 */  lhu       $v0, 0x8($a2)
/* D4CAC 8013E5AC 94C3000A */  lhu       $v1, 0xA($a2)
/* D4CB0 8013E5B0 3C08F540 */  lui       $t0, (0xF5400000 >> 16)
/* D4CB4 8013E5B4 ACA40018 */  sw        $a0, 0x18($a1)
/* D4CB8 8013E5B8 3C040700 */  lui       $a0, (0x7000000 >> 16)
/* D4CBC 8013E5BC ACA0001C */  sw        $zero, 0x1C($a1)
/* D4CC0 8013E5C0 2442FFFF */  addiu     $v0, $v0, -0x1
/* D4CC4 8013E5C4 00021040 */  sll       $v0, $v0, 1
/* D4CC8 8013E5C8 30420FFF */  andi      $v0, $v0, 0xFFF
/* D4CCC 8013E5CC 00021300 */  sll       $v0, $v0, 12
/* D4CD0 8013E5D0 2463FFFF */  addiu     $v1, $v1, -0x1
/* D4CD4 8013E5D4 00031880 */  sll       $v1, $v1, 2
/* D4CD8 8013E5D8 30630FFF */  andi      $v1, $v1, 0xFFF
/* D4CDC 8013E5DC 00641825 */  or        $v1, $v1, $a0
/* D4CE0 8013E5E0 00431025 */  or        $v0, $v0, $v1
/* D4CE4 8013E5E4 24A30028 */  addiu     $v1, $a1, 0x28
/* D4CE8 8013E5E8 ACA20014 */  sw        $v0, 0x14($a1)
/* D4CEC 8013E5EC 94C20008 */  lhu       $v0, 0x8($a2)
/* D4CF0 8013E5F0 3C040100 */  lui       $a0, (0x1000000 >> 16)
/* D4CF4 8013E5F4 ACE30000 */  sw        $v1, 0x0($a3)
/* D4CF8 8013E5F8 ACAA0024 */  sw        $t2, 0x24($a1)
/* D4CFC 8013E5FC ACA90028 */  sw        $t1, 0x28($a1)
/* D4D00 8013E600 00021042 */  srl       $v0, $v0, 1
/* D4D04 8013E604 24420007 */  addiu     $v0, $v0, 0x7
/* D4D08 8013E608 000210C3 */  sra       $v0, $v0, 3
/* D4D0C 8013E60C 304201FF */  andi      $v0, $v0, 0x1FF
/* D4D10 8013E610 00021240 */  sll       $v0, $v0, 9
/* D4D14 8013E614 00481025 */  or        $v0, $v0, $t0
/* D4D18 8013E618 ACA20020 */  sw        $v0, 0x20($a1)
/* D4D1C 8013E61C 94C30008 */  lhu       $v1, 0x8($a2)
/* D4D20 8013E620 24A20030 */  addiu     $v0, $a1, 0x30
/* D4D24 8013E624 ACE20000 */  sw        $v0, 0x0($a3)
/* D4D28 8013E628 94C2000A */  lhu       $v0, 0xA($a2)
/* D4D2C 8013E62C 006E1821 */  addu      $v1, $v1, $t6
/* D4D30 8013E630 00031880 */  sll       $v1, $v1, 2
/* D4D34 8013E634 30630FFF */  andi      $v1, $v1, 0xFFF
/* D4D38 8013E638 00031B00 */  sll       $v1, $v1, 12
/* D4D3C 8013E63C 004E1021 */  addu      $v0, $v0, $t6
/* D4D40 8013E640 00021080 */  sll       $v0, $v0, 2
/* D4D44 8013E644 30420FFF */  andi      $v0, $v0, 0xFFF
/* D4D48 8013E648 00441025 */  or        $v0, $v0, $a0
/* D4D4C 8013E64C 00621825 */  or        $v1, $v1, $v0
/* D4D50 8013E650 ACA3002C */  sw        $v1, 0x2C($a1)
/* D4D54 8013E654 94C20008 */  lhu       $v0, 0x8($a2)
/* D4D58 8013E658 24A30038 */  addiu     $v1, $a1, 0x38
/* D4D5C 8013E65C ACE30000 */  sw        $v1, 0x0($a3)
/* D4D60 8013E660 00021042 */  srl       $v0, $v0, 1
/* D4D64 8013E664 24420007 */  addiu     $v0, $v0, 0x7
/* D4D68 8013E668 000210C3 */  sra       $v0, $v0, 3
/* D4D6C 8013E66C 304201FF */  andi      $v0, $v0, 0x1FF
/* D4D70 8013E670 00021240 */  sll       $v0, $v0, 9
/* D4D74 8013E674 00481025 */  or        $v0, $v0, $t0
/* D4D78 8013E678 ACA20030 */  sw        $v0, 0x30($a1)
/* D4D7C 8013E67C 24A20040 */  addiu     $v0, $a1, 0x40
/* D4D80 8013E680 ACAB0034 */  sw        $t3, 0x34($a1)
/* D4D84 8013E684 ACE20000 */  sw        $v0, 0x0($a3)
/* D4D88 8013E688 3C020200 */  lui       $v0, (0x2000000 >> 16)
/* D4D8C 8013E68C ACA2003C */  sw        $v0, 0x3C($a1)
/* D4D90 8013E690 24A20048 */  addiu     $v0, $a1, 0x48
/* D4D94 8013E694 ACAC0038 */  sw        $t4, 0x38($a1)
/* D4D98 8013E698 ACE20000 */  sw        $v0, 0x0($a3)
/* D4D9C 8013E69C 3C02F200 */  lui       $v0, (0xF2000000 >> 16)
/* D4DA0 8013E6A0 ACA20040 */  sw        $v0, 0x40($a1)
/* D4DA4 8013E6A4 ACAD0044 */  sw        $t5, 0x44($a1)
/* D4DA8 8013E6A8 92630002 */  lbu       $v1, 0x2($s3)
/* D4DAC 8013E6AC 24020002 */  addiu     $v0, $zero, 0x2
/* D4DB0 8013E6B0 1062000D */  beq       $v1, $v0, .L8013E6E8
/* D4DB4 8013E6B4 28620003 */   slti     $v0, $v1, 0x3
/* D4DB8 8013E6B8 10400005 */  beqz      $v0, .L8013E6D0
/* D4DBC 8013E6BC 24020007 */   addiu    $v0, $zero, 0x7
/* D4DC0 8013E6C0 1060000D */  beqz      $v1, .L8013E6F8
/* D4DC4 8013E6C4 00000000 */   nop
/* D4DC8 8013E6C8 0804F9BE */  j         .L8013E6F8
/* D4DCC 8013E6CC 00000000 */   nop
.L8013E6D0:
/* D4DD0 8013E6D0 10620008 */  beq       $v1, $v0, .L8013E6F4
/* D4DD4 8013E6D4 2402000B */   addiu    $v0, $zero, 0xB
/* D4DD8 8013E6D8 14620007 */  bne       $v1, $v0, .L8013E6F8
/* D4DDC 8013E6DC 00000000 */   nop
/* D4DE0 8013E6E0 0804F9BE */  j         .L8013E6F8
/* D4DE4 8013E6E4 240E00FF */   addiu    $t6, $zero, 0xFF
.L8013E6E8:
/* D4DE8 8013E6E8 8E6E0038 */  lw        $t6, 0x38($s3)
/* D4DEC 8013E6EC 0804F9BE */  j         .L8013E6F8
/* D4DF0 8013E6F0 00000000 */   nop
.L8013E6F4:
/* D4DF4 8013E6F4 240EFFFF */  addiu     $t6, $zero, -0x1
.L8013E6F8:
/* D4DF8 8013E6F8 3C028015 */  lui       $v0, %hi(ImgFXCurrentTexturePtr)
/* D4DFC 8013E6FC 8C42EE10 */  lw        $v0, %lo(ImgFXCurrentTexturePtr)($v0)
/* D4E00 8013E700 0280202D */  daddu     $a0, $s4, $zero
/* D4E04 8013E704 94470008 */  lhu       $a3, 0x8($v0)
/* D4E08 8013E708 9442000A */  lhu       $v0, 0xA($v0)
/* D4E0C 8013E70C 0000282D */  daddu     $a1, $zero, $zero
/* D4E10 8013E710 AFAE0014 */  sw        $t6, 0x14($sp)
/* D4E14 8013E714 AFA20010 */  sw        $v0, 0x10($sp)
/* D4E18 8013E718 8E620078 */  lw        $v0, 0x78($s3)
/* D4E1C 8013E71C 00A0302D */  daddu     $a2, $a1, $zero
/* D4E20 8013E720 0C052071 */  jal       create_shading_palette
/* D4E24 8013E724 AFA20018 */   sw       $v0, 0x18($sp)
/* D4E28 8013E728 0804FA25 */  j         .L8013E894
/* D4E2C 8013E72C 3C07D838 */   lui      $a3, (0xD8380002 >> 16)
.L8013E730:
/* D4E30 8013E730 3C08070A */  lui       $t0, (0x70A0280 >> 16)
.L8013E734:
/* D4E34 8013E734 35080280 */  ori       $t0, $t0, (0x70A0280 & 0xFFFF)
/* D4E38 8013E738 3C0A000A */  lui       $t2, (0xA0280 >> 16)
/* D4E3C 8013E73C 354A0280 */  ori       $t2, $t2, (0xA0280 & 0xFFFF)
/* D4E40 8013E740 3C09F240 */  lui       $t1, (0xF2400400 >> 16)
/* D4E44 8013E744 3C07800A */  lui       $a3, %hi(gMainGfxPos)
/* D4E48 8013E748 24E7A66C */  addiu     $a3, $a3, %lo(gMainGfxPos)
/* D4E4C 8013E74C 8CE50000 */  lw        $a1, 0x0($a3)
/* D4E50 8013E750 35290400 */  ori       $t1, $t1, (0xF2400400 & 0xFFFF)
/* D4E54 8013E754 00A0202D */  daddu     $a0, $a1, $zero
/* D4E58 8013E758 24A50008 */  addiu     $a1, $a1, 0x8
/* D4E5C 8013E75C ACE50000 */  sw        $a1, 0x0($a3)
/* D4E60 8013E760 3C068015 */  lui       $a2, %hi(ImgFXCurrentTexturePtr)
/* D4E64 8013E764 8CC6EE10 */  lw        $a2, %lo(ImgFXCurrentTexturePtr)($a2)
/* D4E68 8013E768 24A20008 */  addiu     $v0, $a1, 0x8
/* D4E6C 8013E76C ACE20000 */  sw        $v0, 0x0($a3)
/* D4E70 8013E770 94C20008 */  lhu       $v0, 0x8($a2)
/* D4E74 8013E774 24A30010 */  addiu     $v1, $a1, 0x10
/* D4E78 8013E778 ACE30000 */  sw        $v1, 0x0($a3)
/* D4E7C 8013E77C 3C03FD48 */  lui       $v1, (0xFD480000 >> 16)
/* D4E80 8013E780 00021042 */  srl       $v0, $v0, 1
/* D4E84 8013E784 2442FFFF */  addiu     $v0, $v0, -0x1
/* D4E88 8013E788 30420FFF */  andi      $v0, $v0, 0xFFF
/* D4E8C 8013E78C 00431025 */  or        $v0, $v0, $v1
/* D4E90 8013E790 AC820000 */  sw        $v0, 0x0($a0)
/* D4E94 8013E794 8CC30000 */  lw        $v1, 0x0($a2)
/* D4E98 8013E798 24A20018 */  addiu     $v0, $a1, 0x18
/* D4E9C 8013E79C ACE20000 */  sw        $v0, 0x0($a3)
/* D4EA0 8013E7A0 AC830004 */  sw        $v1, 0x4($a0)
/* D4EA4 8013E7A4 94C20008 */  lhu       $v0, 0x8($a2)
/* D4EA8 8013E7A8 24A30020 */  addiu     $v1, $a1, 0x20
/* D4EAC 8013E7AC ACE30000 */  sw        $v1, 0x0($a3)
/* D4EB0 8013E7B0 3C03E600 */  lui       $v1, (0xE6000000 >> 16)
/* D4EB4 8013E7B4 ACA30008 */  sw        $v1, 0x8($a1)
/* D4EB8 8013E7B8 3C03F400 */  lui       $v1, (0xF4000000 >> 16)
/* D4EBC 8013E7BC ACA30010 */  sw        $v1, 0x10($a1)
/* D4EC0 8013E7C0 3C03F548 */  lui       $v1, (0xF5480000 >> 16)
/* D4EC4 8013E7C4 ACA80004 */  sw        $t0, 0x4($a1)
/* D4EC8 8013E7C8 ACA0000C */  sw        $zero, 0xC($a1)
/* D4ECC 8013E7CC 00021042 */  srl       $v0, $v0, 1
/* D4ED0 8013E7D0 24420007 */  addiu     $v0, $v0, 0x7
/* D4ED4 8013E7D4 000210C3 */  sra       $v0, $v0, 3
/* D4ED8 8013E7D8 304201FF */  andi      $v0, $v0, 0x1FF
/* D4EDC 8013E7DC 00021240 */  sll       $v0, $v0, 9
/* D4EE0 8013E7E0 00431025 */  or        $v0, $v0, $v1
/* D4EE4 8013E7E4 ACA20000 */  sw        $v0, 0x0($a1)
/* D4EE8 8013E7E8 94C20008 */  lhu       $v0, 0x8($a2)
/* D4EEC 8013E7EC 94C3000A */  lhu       $v1, 0xA($a2)
/* D4EF0 8013E7F0 3C04E700 */  lui       $a0, (0xE7000000 >> 16)
/* D4EF4 8013E7F4 ACA40018 */  sw        $a0, 0x18($a1)
/* D4EF8 8013E7F8 3C040700 */  lui       $a0, (0x7000000 >> 16)
/* D4EFC 8013E7FC ACA0001C */  sw        $zero, 0x1C($a1)
/* D4F00 8013E800 2442FFFF */  addiu     $v0, $v0, -0x1
/* D4F04 8013E804 00021040 */  sll       $v0, $v0, 1
/* D4F08 8013E808 30420FFF */  andi      $v0, $v0, 0xFFF
/* D4F0C 8013E80C 00021300 */  sll       $v0, $v0, 12
/* D4F10 8013E810 2463FFFF */  addiu     $v1, $v1, -0x1
/* D4F14 8013E814 00031880 */  sll       $v1, $v1, 2
/* D4F18 8013E818 30630FFF */  andi      $v1, $v1, 0xFFF
/* D4F1C 8013E81C 00641825 */  or        $v1, $v1, $a0
/* D4F20 8013E820 00431025 */  or        $v0, $v0, $v1
/* D4F24 8013E824 ACA20014 */  sw        $v0, 0x14($a1)
/* D4F28 8013E828 94C20008 */  lhu       $v0, 0x8($a2)
/* D4F2C 8013E82C 24A30028 */  addiu     $v1, $a1, 0x28
/* D4F30 8013E830 ACE30000 */  sw        $v1, 0x0($a3)
/* D4F34 8013E834 3C03F540 */  lui       $v1, (0xF5400000 >> 16)
/* D4F38 8013E838 ACAA0024 */  sw        $t2, 0x24($a1)
/* D4F3C 8013E83C ACA90028 */  sw        $t1, 0x28($a1)
/* D4F40 8013E840 00021042 */  srl       $v0, $v0, 1
/* D4F44 8013E844 24420007 */  addiu     $v0, $v0, 0x7
/* D4F48 8013E848 000210C3 */  sra       $v0, $v0, 3
/* D4F4C 8013E84C 304201FF */  andi      $v0, $v0, 0x1FF
/* D4F50 8013E850 00021240 */  sll       $v0, $v0, 9
/* D4F54 8013E854 00431025 */  or        $v0, $v0, $v1
/* D4F58 8013E858 ACA20020 */  sw        $v0, 0x20($a1)
/* D4F5C 8013E85C 94C30008 */  lhu       $v1, 0x8($a2)
/* D4F60 8013E860 24A20030 */  addiu     $v0, $a1, 0x30
/* D4F64 8013E864 ACE20000 */  sw        $v0, 0x0($a3)
/* D4F68 8013E868 94C2000A */  lhu       $v0, 0xA($a2)
/* D4F6C 8013E86C 246300FF */  addiu     $v1, $v1, 0xFF
/* D4F70 8013E870 00031880 */  sll       $v1, $v1, 2
/* D4F74 8013E874 30630FFF */  andi      $v1, $v1, 0xFFF
/* D4F78 8013E878 00031B00 */  sll       $v1, $v1, 12
/* D4F7C 8013E87C 244200FF */  addiu     $v0, $v0, 0xFF
/* D4F80 8013E880 00021080 */  sll       $v0, $v0, 2
/* D4F84 8013E884 30420FFF */  andi      $v0, $v0, 0xFFF
/* D4F88 8013E888 00621825 */  or        $v1, $v1, $v0
/* D4F8C 8013E88C ACA3002C */  sw        $v1, 0x2C($a1)
.L8013E890:
/* D4F90 8013E890 3C07D838 */  lui       $a3, (0xD8380002 >> 16)
.L8013E894:
/* D4F94 8013E894 3C05800A */  lui       $a1, %hi(gMainGfxPos)
/* D4F98 8013E898 24A5A66C */  addiu     $a1, $a1, %lo(gMainGfxPos)
/* D4F9C 8013E89C 8CA40000 */  lw        $a0, 0x0($a1)
/* D4FA0 8013E8A0 34E70002 */  ori       $a3, $a3, (0xD8380002 & 0xFFFF)
/* D4FA4 8013E8A4 0080302D */  daddu     $a2, $a0, $zero
/* D4FA8 8013E8A8 24840008 */  addiu     $a0, $a0, 0x8
/* D4FAC 8013E8AC ACA40000 */  sw        $a0, 0x0($a1)
/* D4FB0 8013E8B0 3C028007 */  lui       $v0, %hi(gCurrentDisplayContextIndex)
/* D4FB4 8013E8B4 8C4241F4 */  lw        $v0, %lo(gCurrentDisplayContextIndex)($v0)
/* D4FB8 8013E8B8 3C03DE00 */  lui       $v1, (0xDE000000 >> 16)
/* D4FBC 8013E8BC ACC30000 */  sw        $v1, 0x0($a2)
/* D4FC0 8013E8C0 00021080 */  sll       $v0, $v0, 2
/* D4FC4 8013E8C4 02621021 */  addu      $v0, $s3, $v0
/* D4FC8 8013E8C8 8C430070 */  lw        $v1, 0x70($v0)
/* D4FCC 8013E8CC 24820008 */  addiu     $v0, $a0, 0x8
/* D4FD0 8013E8D0 ACA20000 */  sw        $v0, 0x0($a1)
/* D4FD4 8013E8D4 24020040 */  addiu     $v0, $zero, 0x40
/* D4FD8 8013E8D8 ACC30004 */  sw        $v1, 0x4($a2)
/* D4FDC 8013E8DC AC870000 */  sw        $a3, 0x0($a0)
/* D4FE0 8013E8E0 AC820004 */  sw        $v0, 0x4($a0)
.L8013E8E4:
/* D4FE4 8013E8E4 8FBF0034 */  lw        $ra, 0x34($sp)
/* D4FE8 8013E8E8 8FB40030 */  lw        $s4, 0x30($sp)
/* D4FEC 8013E8EC 8FB3002C */  lw        $s3, 0x2C($sp)
/* D4FF0 8013E8F0 8FB20028 */  lw        $s2, 0x28($sp)
/* D4FF4 8013E8F4 8FB10024 */  lw        $s1, 0x24($sp)
/* D4FF8 8013E8F8 8FB00020 */  lw        $s0, 0x20($sp)
/* D4FFC 8013E8FC 03E00008 */  jr        $ra
/* D5000 8013E900 27BD0038 */   addiu    $sp, $sp, 0x38

### DECOMPILED C INSTRUCTIONS:

void imgfx_appendGfx_mesh_anim(ImgFXState* state, Matrix4f mtx) {
    if (state->vtxBufs[gCurrentDisplayContextIndex] == NULL || state->gfxBufs[gCurrentDisplayContextIndex] == NULL) {
        return;
    }

    guScale(&gDisplayContext->matrixStack[gMatrixListPos], 0.1f, 0.1f, 0.1f);
    gSPMatrix(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);

    if (!(state->flags & IMGFX_FLAG_SKIP_TEX_SETUP)) {
        gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16);
        gDPLoadTLUT_pal16(gMainGfxPos++, 0, ImgFXCurrentTexturePtr->tex.palette);
        if ((gSpriteShadingProfile->flags & 1)
            && (state->flags & (IMGFX_FLAG_100000 | IMGFX_FLAG_80000))
            && (state->renderType == IMGFX_RENDER_DEFAULT
                || state->renderType == IMGFX_RENDER_MULTIPLY_ALPHA
                || state->renderType == IMGFX_RENDER_MULTIPLY_SHADE_ALPHA
                || state->renderType == IMGFX_RENDER_ANIM)
        ) {
            s32 alpha = 255;
            gDPScrollMultiTile2_4b(gMainGfxPos++, ImgFXCurrentTexturePtr->tex.raster, G_IM_FMT_CI,
                                    ImgFXCurrentTexturePtr->tex.width, ImgFXCurrentTexturePtr->tex.height,
                                    0, 0, ImgFXCurrentTexturePtr->tex.width - 1, ImgFXCurrentTexturePtr->tex.height - 1, 0,
                                    G_TX_CLAMP, G_TX_CLAMP, 8, 8, G_TX_NOLOD, G_TX_NOLOD,
                                    256, 256);
            gDPSetTile(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0x0100, 2, 0,
                            G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
            gDPSetTileSize(gMainGfxPos++, 2, 0, 0, 252, 0);

            switch (state->renderType) {
                case IMGFX_RENDER_DEFAULT:
                case IMGFX_RENDER_ANIM:
                    alpha = 255;
                    break;
                case IMGFX_RENDER_MULTIPLY_ALPHA:
                    alpha = state->ints.color.a;
                    break;
                case IMGFX_RENDER_MULTIPLY_SHADE_ALPHA:
                    alpha = -1;
                    break;

            }
            create_shading_palette(mtx, 0, 0, ImgFXCurrentTexturePtr->tex.width, ImgFXCurrentTexturePtr->tex.height, alpha, state->otherModeL);
        } else {
            gDPScrollTextureTile_4b(gMainGfxPos++, ImgFXCurrentTexturePtr->tex.raster, G_IM_FMT_CI,
                                    ImgFXCurrentTexturePtr->tex.width, ImgFXCurrentTexturePtr->tex.height,
                                    0, 0, ImgFXCurrentTexturePtr->tex.width - 1, ImgFXCurrentTexturePtr->tex.height - 1, 0,
                                    G_TX_CLAMP, G_TX_CLAMP, 8, 8, G_TX_NOLOD, G_TX_NOLOD,
                                    256, 256);
        }
    }
    gSPDisplayList(gMainGfxPos++, state->gfxBufs[gCurrentDisplayContextIndex]);
    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_80143C48
/* DA348 80143C48 27BDFFB8 */  addiu     $sp, $sp, -0x48
/* DA34C 80143C4C AFBE0040 */  sw        $fp, 0x40($sp)
/* DA350 80143C50 0080F02D */  daddu     $fp, $a0, $zero
/* DA354 80143C54 AFB10024 */  sw        $s1, 0x24($sp)
/* DA358 80143C58 00C0882D */  daddu     $s1, $a2, $zero
/* DA35C 80143C5C 3C02800B */  lui       $v0, %hi(gCameras)
/* DA360 80143C60 24421D80 */  addiu     $v0, $v0, %lo(gCameras)
/* DA364 80143C64 00111880 */  sll       $v1, $s1, 2
/* DA368 80143C68 00711821 */  addu      $v1, $v1, $s1
/* DA36C 80143C6C 00031880 */  sll       $v1, $v1, 2
/* DA370 80143C70 00711823 */  subu      $v1, $v1, $s1
/* DA374 80143C74 000320C0 */  sll       $a0, $v1, 3
/* DA378 80143C78 00641821 */  addu      $v1, $v1, $a0
/* DA37C 80143C7C 000318C0 */  sll       $v1, $v1, 3
/* DA380 80143C80 AFB60038 */  sw        $s6, 0x38($sp)
/* DA384 80143C84 0062B021 */  addu      $s6, $v1, $v0
/* DA388 80143C88 AFBF0044 */  sw        $ra, 0x44($sp)
/* DA38C 80143C8C AFB7003C */  sw        $s7, 0x3C($sp)
/* DA390 80143C90 AFB50034 */  sw        $s5, 0x34($sp)
/* DA394 80143C94 AFB40030 */  sw        $s4, 0x30($sp)
/* DA398 80143C98 AFB3002C */  sw        $s3, 0x2C($sp)
/* DA39C 80143C9C AFB20028 */  sw        $s2, 0x28($sp)
/* DA3A0 80143CA0 18A00133 */  blez      $a1, .L80144170
/* DA3A4 80143CA4 AFB00020 */   sw       $s0, 0x20($sp)
/* DA3A8 80143CA8 96C20000 */  lhu       $v0, 0x0($s6)
/* DA3AC 80143CAC 1040014E */  beqz      $v0, .L801441E8
/* DA3B0 80143CB0 30420002 */   andi     $v0, $v0, 0x2
/* DA3B4 80143CB4 1440014C */  bnez      $v0, .L801441E8
/* DA3B8 80143CB8 3C02DC08 */   lui      $v0, (0xDC080008 >> 16)
/* DA3BC 80143CBC 34420008 */  ori       $v0, $v0, (0xDC080008 & 0xFFFF)
/* DA3C0 80143CC0 3C04D9C0 */  lui       $a0, (0xD9C0F9FB >> 16)
/* DA3C4 80143CC4 3484F9FB */  ori       $a0, $a0, (0xD9C0F9FB & 0xFFFF)
/* DA3C8 80143CC8 3C05E300 */  lui       $a1, (0xE3000800 >> 16)
/* DA3CC 80143CCC 34A50800 */  ori       $a1, $a1, (0xE3000800 & 0xFFFF)
/* DA3D0 80143CD0 3C06E300 */  lui       $a2, (0xE3001001 >> 16)
/* DA3D4 80143CD4 34C61001 */  ori       $a2, $a2, (0xE3001001 & 0xFFFF)
/* DA3D8 80143CD8 3C07E300 */  lui       $a3, (0xE3001201 >> 16)
/* DA3DC 80143CDC 34E71201 */  ori       $a3, $a3, (0xE3001201 & 0xFFFF)
/* DA3E0 80143CE0 3C0AFCFF */  lui       $t2, (0xFCFFFFFF >> 16)
/* DA3E4 80143CE4 354AFFFF */  ori       $t2, $t2, (0xFCFFFFFF & 0xFFFF)
/* DA3E8 80143CE8 3C08FFFE */  lui       $t0, (0xFFFE793C >> 16)
/* DA3EC 80143CEC 3508793C */  ori       $t0, $t0, (0xFFFE793C & 0xFFFF)
/* DA3F0 80143CF0 3C0BE200 */  lui       $t3, (0xE200001C >> 16)
/* DA3F4 80143CF4 356B001C */  ori       $t3, $t3, (0xE200001C & 0xFFFF)
/* DA3F8 80143CF8 3C090F0A */  lui       $t1, (0xF0A4000 >> 16)
/* DA3FC 80143CFC 35294000 */  ori       $t1, $t1, (0xF0A4000 & 0xFFFF)
/* DA400 80143D00 3C0CDB04 */  lui       $t4, (0xDB040004 >> 16)
/* DA404 80143D04 358C0004 */  ori       $t4, $t4, (0xDB040004 & 0xFFFF)
/* DA408 80143D08 3C0DDB04 */  lui       $t5, (0xDB04000C >> 16)
/* DA40C 80143D0C 35AD000C */  ori       $t5, $t5, (0xDB04000C & 0xFFFF)
/* DA410 80143D10 3C0EDB04 */  lui       $t6, (0xDB040014 >> 16)
/* DA414 80143D14 35CE0014 */  ori       $t6, $t6, (0xDB040014 & 0xFFFF)
/* DA418 80143D18 3C0FDB04 */  lui       $t7, (0xDB04001C >> 16)
/* DA41C 80143D1C 35EF001C */  ori       $t7, $t7, (0xDB04001C & 0xFFFF)
/* DA420 80143D20 3C14E300 */  lui       $s4, (0xE3000A01 >> 16)
/* DA424 80143D24 36940A01 */  ori       $s4, $s4, (0xE3000A01 & 0xFFFF)
/* DA428 80143D28 3C15FF10 */  lui       $s5, (0xFF10013F >> 16)
/* DA42C 80143D2C 36B5013F */  ori       $s5, $s5, (0xFF10013F & 0xFFFF)
/* DA430 80143D30 3C12800A */  lui       $s2, %hi(gMainGfxPos)
/* DA434 80143D34 2652A66C */  addiu     $s2, $s2, %lo(gMainGfxPos)
/* DA438 80143D38 8E500000 */  lw        $s0, 0x0($s2)
/* DA43C 80143D3C 3C13E700 */  lui       $s3, (0xE7000000 >> 16)
/* DA440 80143D40 3C01800A */  lui       $at, %hi(gCurrentCamID)
/* DA444 80143D44 A431A634 */  sh        $s1, %lo(gCurrentCamID)($at)
/* DA448 80143D48 0200182D */  daddu     $v1, $s0, $zero
/* DA44C 80143D4C 26100008 */  addiu     $s0, $s0, 0x8
/* DA450 80143D50 AE500000 */  sw        $s0, 0x0($s2)
/* DA454 80143D54 AC620000 */  sw        $v0, 0x0($v1)
/* DA458 80143D58 26C200A0 */  addiu     $v0, $s6, 0xA0
/* DA45C 80143D5C AC620004 */  sw        $v0, 0x4($v1)
/* DA460 80143D60 26020008 */  addiu     $v0, $s0, 0x8
/* DA464 80143D64 AE420000 */  sw        $v0, 0x0($s2)
/* DA468 80143D68 26020010 */  addiu     $v0, $s0, 0x10
/* DA46C 80143D6C AE040000 */  sw        $a0, 0x0($s0)
/* DA470 80143D70 AE000004 */  sw        $zero, 0x4($s0)
/* DA474 80143D74 AE420000 */  sw        $v0, 0x0($s2)
/* DA478 80143D78 3C02D700 */  lui       $v0, (0xD7000000 >> 16)
/* DA47C 80143D7C AE020008 */  sw        $v0, 0x8($s0)
/* DA480 80143D80 26020018 */  addiu     $v0, $s0, 0x18
/* DA484 80143D84 AE00000C */  sw        $zero, 0xC($s0)
/* DA488 80143D88 AE420000 */  sw        $v0, 0x0($s2)
/* DA48C 80143D8C 26020020 */  addiu     $v0, $s0, 0x20
/* DA490 80143D90 AE050010 */  sw        $a1, 0x10($s0)
/* DA494 80143D94 AE000014 */  sw        $zero, 0x14($s0)
/* DA498 80143D98 AE420000 */  sw        $v0, 0x0($s2)
/* DA49C 80143D9C 26020028 */  addiu     $v0, $s0, 0x28
/* DA4A0 80143DA0 AE060018 */  sw        $a2, 0x18($s0)
/* DA4A4 80143DA4 AE00001C */  sw        $zero, 0x1C($s0)
/* DA4A8 80143DA8 AE420000 */  sw        $v0, 0x0($s2)
/* DA4AC 80143DAC 24022000 */  addiu     $v0, $zero, 0x2000
/* DA4B0 80143DB0 AE020024 */  sw        $v0, 0x24($s0)
/* DA4B4 80143DB4 26020030 */  addiu     $v0, $s0, 0x30
/* DA4B8 80143DB8 AE070020 */  sw        $a3, 0x20($s0)
/* DA4BC 80143DBC AE420000 */  sw        $v0, 0x0($s2)
/* DA4C0 80143DC0 26020038 */  addiu     $v0, $s0, 0x38
/* DA4C4 80143DC4 AE0A0028 */  sw        $t2, 0x28($s0)
/* DA4C8 80143DC8 AE08002C */  sw        $t0, 0x2C($s0)
/* DA4CC 80143DCC AE420000 */  sw        $v0, 0x0($s2)
/* DA4D0 80143DD0 26020040 */  addiu     $v0, $s0, 0x40
/* DA4D4 80143DD4 24030002 */  addiu     $v1, $zero, 0x2
/* DA4D8 80143DD8 AE0B0030 */  sw        $t3, 0x30($s0)
/* DA4DC 80143DDC AE090034 */  sw        $t1, 0x34($s0)
/* DA4E0 80143DE0 AE420000 */  sw        $v0, 0x0($s2)
/* DA4E4 80143DE4 26020048 */  addiu     $v0, $s0, 0x48
/* DA4E8 80143DE8 AE0C0038 */  sw        $t4, 0x38($s0)
/* DA4EC 80143DEC AE03003C */  sw        $v1, 0x3C($s0)
/* DA4F0 80143DF0 AE420000 */  sw        $v0, 0x0($s2)
/* DA4F4 80143DF4 26020050 */  addiu     $v0, $s0, 0x50
/* DA4F8 80143DF8 AE030044 */  sw        $v1, 0x44($s0)
/* DA4FC 80143DFC 3403FFFE */  ori       $v1, $zero, 0xFFFE
/* DA500 80143E00 AE0D0040 */  sw        $t5, 0x40($s0)
/* DA504 80143E04 AE420000 */  sw        $v0, 0x0($s2)
/* DA508 80143E08 AE0E0048 */  sw        $t6, 0x48($s0)
/* DA50C 80143E0C 3C04800A */  lui       $a0, %hi(nuGfxZBuffer)
/* DA510 80143E10 8C84A5DC */  lw        $a0, %lo(nuGfxZBuffer)($a0)
/* DA514 80143E14 26020058 */  addiu     $v0, $s0, 0x58
/* DA518 80143E18 AE03004C */  sw        $v1, 0x4C($s0)
/* DA51C 80143E1C AE420000 */  sw        $v0, 0x0($s2)
/* DA520 80143E20 26020060 */  addiu     $v0, $s0, 0x60
/* DA524 80143E24 AE0F0050 */  sw        $t7, 0x50($s0)
/* DA528 80143E28 AE030054 */  sw        $v1, 0x54($s0)
/* DA52C 80143E2C AE420000 */  sw        $v0, 0x0($s2)
/* DA530 80143E30 26020068 */  addiu     $v0, $s0, 0x68
/* DA534 80143E34 AE130058 */  sw        $s3, 0x58($s0)
/* DA538 80143E38 AE00005C */  sw        $zero, 0x5C($s0)
/* DA53C 80143E3C AE420000 */  sw        $v0, 0x0($s2)
/* DA540 80143E40 3C020030 */  lui       $v0, (0x300000 >> 16)
/* DA544 80143E44 AE020064 */  sw        $v0, 0x64($s0)
/* DA548 80143E48 26020070 */  addiu     $v0, $s0, 0x70
/* DA54C 80143E4C AE140060 */  sw        $s4, 0x60($s0)
/* DA550 80143E50 AE420000 */  sw        $v0, 0x0($s2)
/* DA554 80143E54 0C0187A4 */  jal       osVirtualToPhysical
/* DA558 80143E58 AE150068 */   sw       $s5, 0x68($s0)
/* DA55C 80143E5C 3C05FFFC */  lui       $a1, (0xFFFCFFFC >> 16)
/* DA560 80143E60 8E510000 */  lw        $s1, 0x0($s2)
/* DA564 80143E64 34A5FFFC */  ori       $a1, $a1, (0xFFFCFFFC & 0xFFFF)
/* DA568 80143E68 AE02006C */  sw        $v0, 0x6C($s0)
/* DA56C 80143E6C 3C02F700 */  lui       $v0, (0xF7000000 >> 16)
/* DA570 80143E70 3C04800A */  lui       $a0, %hi(nuGfxCfb_ptr)
/* DA574 80143E74 8C84A64C */  lw        $a0, %lo(nuGfxCfb_ptr)($a0)
/* DA578 80143E78 0220182D */  daddu     $v1, $s1, $zero
/* DA57C 80143E7C 26310008 */  addiu     $s1, $s1, 0x8
/* DA580 80143E80 AE510000 */  sw        $s1, 0x0($s2)
/* DA584 80143E84 AC620000 */  sw        $v0, 0x0($v1)
/* DA588 80143E88 26220008 */  addiu     $v0, $s1, 0x8
/* DA58C 80143E8C AC650004 */  sw        $a1, 0x4($v1)
/* DA590 80143E90 AE420000 */  sw        $v0, 0x0($s2)
/* DA594 80143E94 86C3000E */  lh        $v1, 0xE($s6)
/* DA598 80143E98 86C5000A */  lh        $a1, 0xA($s6)
/* DA59C 80143E9C 26220010 */  addiu     $v0, $s1, 0x10
/* DA5A0 80143EA0 AE420000 */  sw        $v0, 0x0($s2)
/* DA5A4 80143EA4 86C20010 */  lh        $v0, 0x10($s6)
/* DA5A8 80143EA8 00651821 */  addu      $v1, $v1, $a1
/* DA5AC 80143EAC 2463FFFF */  addiu     $v1, $v1, -0x1
/* DA5B0 80143EB0 306303FF */  andi      $v1, $v1, 0x3FF
/* DA5B4 80143EB4 86C5000C */  lh        $a1, 0xC($s6)
/* DA5B8 80143EB8 00031B80 */  sll       $v1, $v1, 14
/* DA5BC 80143EBC 00451021 */  addu      $v0, $v0, $a1
/* DA5C0 80143EC0 2442FFFF */  addiu     $v0, $v0, -0x1
/* DA5C4 80143EC4 304203FF */  andi      $v0, $v0, 0x3FF
/* DA5C8 80143EC8 00021080 */  sll       $v0, $v0, 2
/* DA5CC 80143ECC 3C05F600 */  lui       $a1, (0xF6000000 >> 16)
/* DA5D0 80143ED0 00451025 */  or        $v0, $v0, $a1
/* DA5D4 80143ED4 00621825 */  or        $v1, $v1, $v0
/* DA5D8 80143ED8 AE230000 */  sw        $v1, 0x0($s1)
/* DA5DC 80143EDC 96C2000E */  lhu       $v0, 0xE($s6)
/* DA5E0 80143EE0 96C50010 */  lhu       $a1, 0x10($s6)
/* DA5E4 80143EE4 26230018 */  addiu     $v1, $s1, 0x18
/* DA5E8 80143EE8 AE430000 */  sw        $v1, 0x0($s2)
/* DA5EC 80143EEC AE330008 */  sw        $s3, 0x8($s1)
/* DA5F0 80143EF0 AE20000C */  sw        $zero, 0xC($s1)
/* DA5F4 80143EF4 AE350010 */  sw        $s5, 0x10($s1)
/* DA5F8 80143EF8 304203FF */  andi      $v0, $v0, 0x3FF
/* DA5FC 80143EFC 00021380 */  sll       $v0, $v0, 14
/* DA600 80143F00 30A503FF */  andi      $a1, $a1, 0x3FF
/* DA604 80143F04 00052880 */  sll       $a1, $a1, 2
/* DA608 80143F08 00451025 */  or        $v0, $v0, $a1
/* DA60C 80143F0C 0C0187A4 */  jal       osVirtualToPhysical
/* DA610 80143F10 AE220004 */   sw       $v0, 0x4($s1)
/* DA614 80143F14 26D000D4 */  addiu     $s0, $s6, 0xD4
/* DA618 80143F18 8E430000 */  lw        $v1, 0x0($s2)
/* DA61C 80143F1C 44800000 */  mtc1      $zero, $f0
/* DA620 80143F20 3C01447A */  lui       $at, (0x447A0000 >> 16)
/* DA624 80143F24 44811000 */  mtc1      $at, $f2
/* DA628 80143F28 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* DA62C 80143F2C 44812000 */  mtc1      $at, $f4
/* DA630 80143F30 3C0643A0 */  lui       $a2, (0x43A00000 >> 16)
/* DA634 80143F34 3C07C370 */  lui       $a3, (0xC3700000 >> 16)
/* DA638 80143F38 0200202D */  daddu     $a0, $s0, $zero
/* DA63C 80143F3C AE220014 */  sw        $v0, 0x14($s1)
/* DA640 80143F40 0060102D */  daddu     $v0, $v1, $zero
/* DA644 80143F44 44050000 */  mfc1      $a1, $f0
/* DA648 80143F48 3C01C47A */  lui       $at, (0xC47A0000 >> 16)
/* DA64C 80143F4C 44810000 */  mtc1      $at, $f0
/* DA650 80143F50 24630008 */  addiu     $v1, $v1, 0x8
/* DA654 80143F54 AE430000 */  sw        $v1, 0x0($s2)
/* DA658 80143F58 AC530000 */  sw        $s3, 0x0($v0)
/* DA65C 80143F5C AC400004 */  sw        $zero, 0x4($v0)
/* DA660 80143F60 E7A20018 */  swc1      $f2, 0x18($sp)
/* DA664 80143F64 E7A4001C */  swc1      $f4, 0x1C($sp)
/* DA668 80143F68 AFA50010 */  sw        $a1, 0x10($sp)
/* DA66C 80143F6C 0C018E44 */  jal       guOrthoF
/* DA670 80143F70 E7A00014 */   swc1     $f0, 0x14($sp)
/* DA674 80143F74 0200202D */  daddu     $a0, $s0, $zero
/* DA678 80143F78 3C10800A */  lui       $s0, %hi(gDisplayContext)
/* DA67C 80143F7C 2610A674 */  addiu     $s0, $s0, %lo(gDisplayContext)
/* DA680 80143F80 3C05800A */  lui       $a1, %hi(gCurrentCamID)
/* DA684 80143F84 84A5A634 */  lh        $a1, %lo(gCurrentCamID)($a1)
/* DA688 80143F88 8E020000 */  lw        $v0, 0x0($s0)
/* DA68C 80143F8C 00052980 */  sll       $a1, $a1, 6
/* DA690 80143F90 24A50030 */  addiu     $a1, $a1, 0x30
/* DA694 80143F94 0C019D40 */  jal       guMtxF2L
/* DA698 80143F98 00452821 */   addu     $a1, $v0, $a1
/* DA69C 80143F9C 3C03DA38 */  lui       $v1, (0xDA380007 >> 16)
/* DA6A0 80143FA0 34630007 */  ori       $v1, $v1, (0xDA380007 & 0xFFFF)
/* DA6A4 80143FA4 3C07ED03 */  lui       $a3, (0xED030050 >> 16)
/* DA6A8 80143FA8 34E70050 */  ori       $a3, $a3, (0xED030050 & 0xFFFF)
/* DA6AC 80143FAC 3C06004D */  lui       $a2, (0x4D0370 >> 16)
/* DA6B0 80143FB0 34C60370 */  ori       $a2, $a2, (0x4D0370 & 0xFFFF)
/* DA6B4 80143FB4 3C08D9C0 */  lui       $t0, (0xD9C0F9FA >> 16)
/* DA6B8 80143FB8 3508F9FA */  ori       $t0, $t0, (0xD9C0F9FA & 0xFFFF)
/* DA6BC 80143FBC 3C0AD9FF */  lui       $t2, (0xD9FFFFFF >> 16)
/* DA6C0 80143FC0 354AFFFF */  ori       $t2, $t2, (0xD9FFFFFF & 0xFFFF)
/* DA6C4 80143FC4 3C090022 */  lui       $t1, (0x220005 >> 16)
/* DA6C8 80143FC8 35290005 */  ori       $t1, $t1, (0x220005 & 0xFFFF)
/* DA6CC 80143FCC 3C0BDC08 */  lui       $t3, (0xDC08060A >> 16)
/* DA6D0 80143FD0 356B060A */  ori       $t3, $t3, (0xDC08060A & 0xFFFF)
/* DA6D4 80143FD4 3C0CDC08 */  lui       $t4, (0xDC08090A >> 16)
/* DA6D8 80143FD8 358C090A */  ori       $t4, $t4, (0xDC08090A & 0xFFFF)
/* DA6DC 80143FDC 3C0DD700 */  lui       $t5, (0xD7000002 >> 16)
/* DA6E0 80143FE0 35AD0002 */  ori       $t5, $t5, (0xD7000002 & 0xFFFF)
/* DA6E4 80143FE4 3C0EE300 */  lui       $t6, (0xE3000F00 >> 16)
/* DA6E8 80143FE8 35CE0F00 */  ori       $t6, $t6, (0xE3000F00 & 0xFFFF)
/* DA6EC 80143FEC 3C0FE300 */  lui       $t7, (0xE3000C00 >> 16)
/* DA6F0 80143FF0 35EF0C00 */  ori       $t7, $t7, (0xE3000C00 & 0xFFFF)
/* DA6F4 80143FF4 3C11E300 */  lui       $s1, (0xE3001801 >> 16)
/* DA6F8 80143FF8 36311801 */  ori       $s1, $s1, (0xE3001801 & 0xFFFF)
/* DA6FC 80143FFC 3C15E300 */  lui       $s5, (0xE3000D01 >> 16)
/* DA700 80144000 36B50D01 */  ori       $s5, $s5, (0xE3000D01 & 0xFFFF)
/* DA704 80144004 3C16E300 */  lui       $s6, (0xE3001402 >> 16)
/* DA708 80144008 36D61402 */  ori       $s6, $s6, (0xE3001402 & 0xFFFF)
/* DA70C 8014400C 3C17E300 */  lui       $s7, (0xE3001700 >> 16)
/* DA710 80144010 36F71700 */  ori       $s7, $s7, (0xE3001700 & 0xFFFF)
/* DA714 80144014 3C18E200 */  lui       $t8, (0xE2001E01 >> 16)
/* DA718 80144018 37181E01 */  ori       $t8, $t8, (0xE2001E01 & 0xFFFF)
/* DA71C 8014401C 8E420000 */  lw        $v0, 0x0($s2)
/* DA720 80144020 3C04800A */  lui       $a0, %hi(gCurrentCamID)
/* DA724 80144024 8484A634 */  lh        $a0, %lo(gCurrentCamID)($a0)
/* DA728 80144028 0040282D */  daddu     $a1, $v0, $zero
/* DA72C 8014402C 24420008 */  addiu     $v0, $v0, 0x8
/* DA730 80144030 00042180 */  sll       $a0, $a0, 6
/* DA734 80144034 AE420000 */  sw        $v0, 0x0($s2)
/* DA738 80144038 ACA30000 */  sw        $v1, 0x0($a1)
/* DA73C 8014403C 8E030000 */  lw        $v1, 0x0($s0)
/* DA740 80144040 24840030 */  addiu     $a0, $a0, 0x30
/* DA744 80144044 00641821 */  addu      $v1, $v1, $a0
/* DA748 80144048 ACA30004 */  sw        $v1, 0x4($a1)
/* DA74C 8014404C 24430008 */  addiu     $v1, $v0, 0x8
/* DA750 80144050 AE430000 */  sw        $v1, 0x0($s2)
/* DA754 80144054 24430010 */  addiu     $v1, $v0, 0x10
/* DA758 80144058 AC470000 */  sw        $a3, 0x0($v0)
/* DA75C 8014405C AC460004 */  sw        $a2, 0x4($v0)
/* DA760 80144060 AE430000 */  sw        $v1, 0x0($s2)
/* DA764 80144064 24430018 */  addiu     $v1, $v0, 0x18
/* DA768 80144068 AC530008 */  sw        $s3, 0x8($v0)
/* DA76C 8014406C AC40000C */  sw        $zero, 0xC($v0)
/* DA770 80144070 AE430000 */  sw        $v1, 0x0($s2)
/* DA774 80144074 24430020 */  addiu     $v1, $v0, 0x20
/* DA778 80144078 AC540010 */  sw        $s4, 0x10($v0)
/* DA77C 8014407C AC400014 */  sw        $zero, 0x14($v0)
/* DA780 80144080 AE430000 */  sw        $v1, 0x0($s2)
/* DA784 80144084 24430028 */  addiu     $v1, $v0, 0x28
/* DA788 80144088 AC480018 */  sw        $t0, 0x18($v0)
/* DA78C 8014408C AC40001C */  sw        $zero, 0x1C($v0)
/* DA790 80144090 AE430000 */  sw        $v1, 0x0($s2)
/* DA794 80144094 24430030 */  addiu     $v1, $v0, 0x30
/* DA798 80144098 AC4A0020 */  sw        $t2, 0x20($v0)
/* DA79C 8014409C AC490024 */  sw        $t1, 0x24($v0)
/* DA7A0 801440A0 AE430000 */  sw        $v1, 0x0($s2)
/* DA7A4 801440A4 3C03DB02 */  lui       $v1, (0xDB020000 >> 16)
/* DA7A8 801440A8 AC430028 */  sw        $v1, 0x28($v0)
/* DA7AC 801440AC 24030018 */  addiu     $v1, $zero, 0x18
/* DA7B0 801440B0 AC43002C */  sw        $v1, 0x2C($v0)
/* DA7B4 801440B4 24430038 */  addiu     $v1, $v0, 0x38
/* DA7B8 801440B8 3C048015 */  lui       $a0, %hi(D_8014F110)
/* DA7BC 801440BC 2484F110 */  addiu     $a0, $a0, %lo(D_8014F110)
/* DA7C0 801440C0 AE430000 */  sw        $v1, 0x0($s2)
/* DA7C4 801440C4 24430040 */  addiu     $v1, $v0, 0x40
/* DA7C8 801440C8 AC440034 */  sw        $a0, 0x34($v0)
/* DA7CC 801440CC 2484FFF8 */  addiu     $a0, $a0, -0x8
/* DA7D0 801440D0 AC4B0030 */  sw        $t3, 0x30($v0)
/* DA7D4 801440D4 AE430000 */  sw        $v1, 0x0($s2)
/* DA7D8 801440D8 24430048 */  addiu     $v1, $v0, 0x48
/* DA7DC 801440DC AC4C0038 */  sw        $t4, 0x38($v0)
/* DA7E0 801440E0 AC44003C */  sw        $a0, 0x3C($v0)
/* DA7E4 801440E4 AE430000 */  sw        $v1, 0x0($s2)
/* DA7E8 801440E8 2403FFFF */  addiu     $v1, $zero, -0x1
/* DA7EC 801440EC AC430044 */  sw        $v1, 0x44($v0)
/* DA7F0 801440F0 24430050 */  addiu     $v1, $v0, 0x50
/* DA7F4 801440F4 AC4D0040 */  sw        $t5, 0x40($v0)
/* DA7F8 801440F8 AE430000 */  sw        $v1, 0x0($s2)
/* DA7FC 801440FC 24430058 */  addiu     $v1, $v0, 0x58
/* DA800 80144100 AC4E0048 */  sw        $t6, 0x48($v0)
/* DA804 80144104 AC40004C */  sw        $zero, 0x4C($v0)
/* DA808 80144108 AE430000 */  sw        $v1, 0x0($s2)
/* DA80C 8014410C 3C030008 */  lui       $v1, (0x80000 >> 16)
/* DA810 80144110 AC430054 */  sw        $v1, 0x54($v0)
/* DA814 80144114 24430060 */  addiu     $v1, $v0, 0x60
/* DA818 80144118 AC4F0050 */  sw        $t7, 0x50($v0)
/* DA81C 8014411C AE430000 */  sw        $v1, 0x0($s2)
/* DA820 80144120 240300C0 */  addiu     $v1, $zero, 0xC0
/* DA824 80144124 AC43005C */  sw        $v1, 0x5C($v0)
/* DA828 80144128 24430068 */  addiu     $v1, $v0, 0x68
/* DA82C 8014412C AC510058 */  sw        $s1, 0x58($v0)
/* DA830 80144130 AE430000 */  sw        $v1, 0x0($s2)
/* DA834 80144134 24430070 */  addiu     $v1, $v0, 0x70
/* DA838 80144138 AC550060 */  sw        $s5, 0x60($v0)
/* DA83C 8014413C AC400064 */  sw        $zero, 0x64($v0)
/* DA840 80144140 AE430000 */  sw        $v1, 0x0($s2)
/* DA844 80144144 24030C00 */  addiu     $v1, $zero, 0xC00
/* DA848 80144148 AC43006C */  sw        $v1, 0x6C($v0)
/* DA84C 8014414C 24430078 */  addiu     $v1, $v0, 0x78
/* DA850 80144150 AC560068 */  sw        $s6, 0x68($v0)
/* DA854 80144154 AE430000 */  sw        $v1, 0x0($s2)
/* DA858 80144158 24430080 */  addiu     $v1, $v0, 0x80
/* DA85C 8014415C AC570070 */  sw        $s7, 0x70($v0)
/* DA860 80144160 AC400074 */  sw        $zero, 0x74($v0)
/* DA864 80144164 AE430000 */  sw        $v1, 0x0($s2)
/* DA868 80144168 AC580078 */  sw        $t8, 0x78($v0)
/* DA86C 8014416C AC40007C */  sw        $zero, 0x7C($v0)
.L80144170:
/* DA870 80144170 07C0001D */  bltz      $fp, .L801441E8
/* DA874 80144174 2402F7FF */   addiu    $v0, $zero, -0x801
glabel func_80144178
/* DA878 80144178 03C2F024 */  and       $fp, $fp, $v0
/* DA87C 8014417C 3C038015 */  lui       $v1, %hi(gHudElements)
/* DA880 80144180 8C637960 */  lw        $v1, %lo(gHudElements)($v1)
/* DA884 80144184 001E1080 */  sll       $v0, $fp, 2
/* DA888 80144188 00431021 */  addu      $v0, $v0, $v1
/* DA88C 8014418C 8C440000 */  lw        $a0, 0x0($v0)
/* DA890 80144190 10800015 */  beqz      $a0, .L801441E8
glabel func_80144194
/* DA894 80144194 00000000 */   nop
/* DA898 80144198 8C830000 */  lw        $v1, 0x0($a0)
/* DA89C 8014419C 10600012 */  beqz      $v1, .L801441E8
/* DA8A0 801441A0 30620002 */   andi     $v0, $v1, 0x2
/* DA8A4 801441A4 14400010 */  bnez      $v0, .L801441E8
/* DA8A8 801441A8 3C021020 */   lui      $v0, (0x10200000 >> 16)
/* DA8AC 801441AC 00621024 */  and       $v0, $v1, $v0
/* DA8B0 801441B0 1440000D */  bnez      $v0, .L801441E8
/* DA8B4 801441B4 3C020001 */   lui      $v0, (0x10000 >> 16)
/* DA8B8 801441B8 00621024 */  and       $v0, $v1, $v0
/* DA8BC 801441BC 1040000A */  beqz      $v0, .L801441E8
/* DA8C0 801441C0 30620040 */   andi     $v0, $v1, 0x40
/* DA8C4 801441C4 14400008 */  bnez      $v0, .L801441E8
/* DA8C8 801441C8 00000000 */   nop
/* DA8CC 801441CC 80820045 */  lb        $v0, 0x45($a0)
/* DA8D0 801441D0 04400005 */  bltz      $v0, .L801441E8
/* DA8D4 801441D4 30620080 */   andi     $v0, $v1, 0x80
/* DA8D8 801441D8 10400003 */  beqz      $v0, .L801441E8
/* DA8DC 801441DC 00000000 */   nop
/* DA8E0 801441E0 0C050AFF */  jal       render_hud_element
/* DA8E4 801441E4 00000000 */   nop
.L801441E8:
/* DA8E8 801441E8 8FBF0044 */  lw        $ra, 0x44($sp)
/* DA8EC 801441EC 8FBE0040 */  lw        $fp, 0x40($sp)
/* DA8F0 801441F0 8FB7003C */  lw        $s7, 0x3C($sp)
/* DA8F4 801441F4 8FB60038 */  lw        $s6, 0x38($sp)
/* DA8F8 801441F8 8FB50034 */  lw        $s5, 0x34($sp)
/* DA8FC 801441FC 8FB40030 */  lw        $s4, 0x30($sp)
glabel func_80144200
/* DA900 80144200 8FB3002C */  lw        $s3, 0x2C($sp)
/* DA904 80144204 8FB20028 */  lw        $s2, 0x28($sp)
/* DA908 80144208 8FB10024 */  lw        $s1, 0x24($sp)
/* DA90C 8014420C 8FB00020 */  lw        $s0, 0x20($sp)
/* DA910 80144210 03E00008 */  jr        $ra
/* DA914 80144214 27BD0048 */   addiu    $sp, $sp, 0x48

### DECOMPILED C INSTRUCTIONS:

void func_80143C48(s32 elemID, s32 arg1, s32 camID) {
    Camera* camera = &gCameras[camID];

    if (arg1 > 0) {
        if (camera->flags == 0 || (camera->flags & CAMERA_FLAG_DISABLED)) {
            return;
        }

        gCurrentCamID = camID;

        gSPViewport(gMainGfxPos++, &camera->vp);
        gSPClearGeometryMode(gMainGfxPos++, G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN |
                                                G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH);
        gSPTexture(gMainGfxPos++, 0, 0, 0, G_TX_RENDERTILE, G_OFF);
        gDPPipelineMode(gMainGfxPos++, G_PM_NPRIMITIVE);
        gDPSetTextureLUT(gMainGfxPos++, G_TT_NONE);
        gDPSetTextureFilter(gMainGfxPos++, G_TF_BILERP);
        gDPSetCombineMode(gMainGfxPos++, G_CC_SHADE, G_CC_SHADE);
        gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
        gSPClipRatio(gMainGfxPos++, FRUSTRATIO_2);
        gDPPipeSync(gMainGfxPos++);
        //clear Z buffer inside camera viewport
        gDPSetCycleType(gMainGfxPos++, G_CYC_FILL);
        gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxZBuffer));
        gDPSetFillColor(gMainGfxPos++, GPACK_ZDZ(G_MAXFBZ, 0)<<16 | GPACK_ZDZ(G_MAXFBZ, 0));
        gDPFillRectangle(gMainGfxPos++, camera->viewportStartX, camera->viewportStartY,
                         camera->viewportStartX + camera->viewportW - 1,
                         camera->viewportStartY + camera->viewportH - 1);
        gDPPipeSync(gMainGfxPos++);

        gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
        gDPPipeSync(gMainGfxPos++);

        guOrthoF(camera->perspectiveMatrix, 0.0f, 320.0f, -240.0f, 0.0f, -1000.0f, 1000.0f, 1.0f);
        guMtxF2L(camera->perspectiveMatrix, &gDisplayContext->camPerspMatrix[gCurrentCamID]);

        gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCamID], G_MTX_NOPUSH | G_MTX_LOAD |
                                                                                G_MTX_PROJECTION);
        gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 12, 20, 308, 220);
        gDPPipeSync(gMainGfxPos++);
        gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
        gSPClearGeometryMode(gMainGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING |
                                                G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH);
        gSPSetGeometryMode(gMainGfxPos++, G_ZBUFFER | G_SHADE | G_LIGHTING | G_SHADING_SMOOTH);
        gSPSetLights1(gMainGfxPos++, D_8014F108);
        gSPTexture(gMainGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON);
        gDPSetTextureLOD(gMainGfxPos++, G_TL_TILE);
        gDPSetTexturePersp(gMainGfxPos++, G_TP_PERSP);
        gDPSetColorDither(gMainGfxPos++, G_CD_DISABLE);
        gDPSetTextureDetail(gMainGfxPos++, G_TD_CLAMP);
        gDPSetTextureConvert(gMainGfxPos++, G_TC_FILT);
        gDPSetCombineKey(gMainGfxPos++, G_CK_NONE);
        gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE);
    }

    if (elemID >= 0) {
        HudElement* elem;

        elemID &= ~HUD_ELEMENT_BATTLE_ID_MASK;
        elem = (*gHudElements)[elemID];

        if (elem != NULL) {
            if (elem->flags && !(elem->flags & HUD_ELEMENT_FLAG_DISABLED)) {
                if (!(elem->flags & (HUD_ELEMENT_FLAG_200000 | HUD_ELEMENT_FLAG_10000000))) {
                    if (elem->flags & HUD_ELEMENT_FLAG_TRANSFORM) {
                        if (!(elem->flags & HUD_ELEMENT_FLAG_FRONTUI) && (elem->drawSizePreset >= 0) && (elem->flags & HUD_ELEMENT_FLAG_80)) {
                            render_hud_element(elem);
                        }
                    }
                }
            }
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel aura_appendGfx
/* 3778CC E007685C 27BDFF00 */  addiu     $sp, $sp, -0x100
/* 3778D0 E0076860 3C02DB06 */  lui       $v0, (0xDB060024 >> 16)
/* 3778D4 E0076864 34420024 */  ori       $v0, $v0, (0xDB060024 & 0xFFFF)
/* 3778D8 E0076868 3C09800A */  lui       $t1, %hi(gMainGfxPos)
/* 3778DC E007686C 2529A66C */  addiu     $t1, $t1, %lo(gMainGfxPos)
/* 3778E0 E0076870 AFBF00F4 */  sw        $ra, 0xF4($sp)
/* 3778E4 E0076874 AFB600F0 */  sw        $s6, 0xF0($sp)
/* 3778E8 E0076878 AFB500EC */  sw        $s5, 0xEC($sp)
/* 3778EC E007687C AFB400E8 */  sw        $s4, 0xE8($sp)
/* 3778F0 E0076880 AFB300E4 */  sw        $s3, 0xE4($sp)
/* 3778F4 E0076884 AFB200E0 */  sw        $s2, 0xE0($sp)
/* 3778F8 E0076888 AFB100DC */  sw        $s1, 0xDC($sp)
/* 3778FC E007688C AFB000D8 */  sw        $s0, 0xD8($sp)
/* 377900 E0076890 F7B400F8 */  sdc1      $f20, 0xF8($sp)
/* 377904 E0076894 8C93000C */  lw        $s3, 0xC($a0)
/* 377908 E0076898 8D280000 */  lw        $t0, 0x0($t1)
/* 37790C E007689C 8E750000 */  lw        $s5, 0x0($s3)
/* 377910 E00768A0 8E760028 */  lw        $s6, 0x28($s3)
/* 377914 E00768A4 0100282D */  daddu     $a1, $t0, $zero
/* 377918 E00768A8 ACA20000 */  sw        $v0, 0x0($a1)
/* 37791C E00768AC 8C820010 */  lw        $v0, 0x10($a0)
/* 377920 E00768B0 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 377924 E00768B4 8C42001C */  lw        $v0, 0x1C($v0)
/* 377928 E00768B8 25080008 */  addiu     $t0, $t0, 0x8
/* 37792C E00768BC 00431021 */  addu      $v0, $v0, $v1
/* 377930 E00768C0 ACA20004 */  sw        $v0, 0x4($a1)
/* 377934 E00768C4 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 377938 E00768C8 AD020000 */  sw        $v0, 0x0($t0)
/* 37793C E00768CC 00151080 */  sll       $v0, $s5, 2
/* 377940 E00768D0 3C01E007 */  lui       $at, (0xE0076ED0 >> 16)
/* 377944 E00768D4 00220821 */  addu      $at, $at, $v0
/* 377948 E00768D8 8C226ED0 */  lw        $v0, (0xE0076ED0 & 0xFFFF)($at)
/* 37794C E00768DC 27A40018 */  addiu     $a0, $sp, 0x18
/* 377950 E00768E0 AD280000 */  sw        $t0, 0x0($t1)
/* 377954 E00768E4 AD020004 */  sw        $v0, 0x4($t0)
/* 377958 E00768E8 8E650010 */  lw        $a1, 0x10($s3)
/* 37795C E00768EC 8E660014 */  lw        $a2, 0x14($s3)
/* 377960 E00768F0 8E670018 */  lw        $a3, 0x18($s3)
/* 377964 E00768F4 25080008 */  addiu     $t0, $t0, 0x8
/* 377968 E00768F8 0C080108 */  jal       shim_guTranslateF
/* 37796C E00768FC AD280000 */   sw       $t0, 0x0($t1)
/* 377970 E0076900 24020002 */  addiu     $v0, $zero, 0x2
/* 377974 E0076904 16A20008 */  bne       $s5, $v0, .LE0076928
/* 377978 E0076908 27A40058 */   addiu    $a0, $sp, 0x58
/* 37797C E007690C 44800000 */  mtc1      $zero, $f0
/* 377980 E0076910 3C073F80 */  lui       $a3, (0x3F800000 >> 16)
/* 377984 E0076914 E7A00010 */  swc1      $f0, 0x10($sp)
/* 377988 E0076918 8E650064 */  lw        $a1, 0x64($s3)
/* 37798C E007691C 44060000 */  mfc1      $a2, $f0
/* 377990 E0076920 0801DA5C */  j         .LE0076970
/* 377994 E0076924 00000000 */   nop
.LE0076928:
/* 377998 E0076928 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 37799C E007692C 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 3779A0 E0076930 44800000 */  mtc1      $zero, $f0
/* 3779A4 E0076934 00031080 */  sll       $v0, $v1, 2
/* 3779A8 E0076938 00431021 */  addu      $v0, $v0, $v1
/* 3779AC E007693C 00021080 */  sll       $v0, $v0, 2
/* 3779B0 E0076940 00431023 */  subu      $v0, $v0, $v1
/* 3779B4 E0076944 000218C0 */  sll       $v1, $v0, 3
/* 3779B8 E0076948 00431021 */  addu      $v0, $v0, $v1
/* 3779BC E007694C 000210C0 */  sll       $v0, $v0, 3
/* 3779C0 E0076950 44060000 */  mfc1      $a2, $f0
/* 3779C4 E0076954 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 3779C8 E0076958 00220821 */  addu      $at, $at, $v0
/* 3779CC E007695C C4201DEC */  lwc1      $f0, %lo(gCameras + 0x6C)($at)
/* 3779D0 E0076960 3C073F80 */  lui       $a3, (0x3F800000 >> 16)
/* 3779D4 E0076964 46000007 */  neg.s     $f0, $f0
/* 3779D8 E0076968 44050000 */  mfc1      $a1, $f0
/* 3779DC E007696C AFA60010 */  sw        $a2, 0x10($sp)
.LE0076970:
/* 3779E0 E0076970 0C080104 */  jal       shim_guRotateF
/* 3779E4 E0076974 00000000 */   nop
/* 3779E8 E0076978 27B40058 */  addiu     $s4, $sp, 0x58
/* 3779EC E007697C 0280202D */  daddu     $a0, $s4, $zero
/* 3779F0 E0076980 27A50018 */  addiu     $a1, $sp, 0x18
/* 3779F4 E0076984 27B00098 */  addiu     $s0, $sp, 0x98
/* 3779F8 E0076988 0C080114 */  jal       shim_guMtxCatF
/* 3779FC E007698C 0200302D */   daddu    $a2, $s0, $zero
/* 377A00 E0076990 8E65001C */  lw        $a1, 0x1C($s3)
/* 377A04 E0076994 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 377A08 E0076998 4481A000 */  mtc1      $at, $f20
/* 377A0C E007699C 8E660020 */  lw        $a2, 0x20($s3)
/* 377A10 E00769A0 4407A000 */  mfc1      $a3, $f20
/* 377A14 E00769A4 0C080110 */  jal       shim_guScaleF
/* 377A18 E00769A8 0280202D */   daddu    $a0, $s4, $zero
/* 377A1C E00769AC 0280202D */  daddu     $a0, $s4, $zero
/* 377A20 E00769B0 0200282D */  daddu     $a1, $s0, $zero
/* 377A24 E00769B4 0C080114 */  jal       shim_guMtxCatF
/* 377A28 E00769B8 0200302D */   daddu    $a2, $s0, $zero
/* 377A2C E00769BC 16A00016 */  bnez      $s5, .LE0076A18
/* 377A30 E00769C0 3C120001 */   lui      $s2, (0x11630 >> 16)
/* 377A34 E00769C4 C660001C */  lwc1      $f0, 0x1C($s3)
/* 377A38 E00769C8 C6640024 */  lwc1      $f4, 0x24($s3)
/* 377A3C E00769CC 46040001 */  sub.s     $f0, $f0, $f4
/* 377A40 E00769D0 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 377A44 E00769D4 44811000 */  mtc1      $at, $f2
/* 377A48 E00769D8 46000007 */  neg.s     $f0, $f0
/* 377A4C E00769DC 46040003 */  div.s     $f0, $f0, $f4
/* 377A50 E00769E0 46020002 */  mul.s     $f0, $f0, $f2
/* 377A54 E00769E4 00000000 */  nop
/* 377A58 E00769E8 44050000 */  mfc1      $a1, $f0
/* 377A5C E00769EC 44800000 */  mtc1      $zero, $f0
/* 377A60 E00769F0 00000000 */  nop
/* 377A64 E00769F4 44060000 */  mfc1      $a2, $f0
/* 377A68 E00769F8 0280202D */  daddu     $a0, $s4, $zero
/* 377A6C E00769FC 0C080108 */  jal       shim_guTranslateF
/* 377A70 E0076A00 00C0382D */   daddu    $a3, $a2, $zero
/* 377A74 E0076A04 0280202D */  daddu     $a0, $s4, $zero
/* 377A78 E0076A08 0200282D */  daddu     $a1, $s0, $zero
/* 377A7C E0076A0C 0C080114 */  jal       shim_guMtxCatF
/* 377A80 E0076A10 0200302D */   daddu    $a2, $s0, $zero
/* 377A84 E0076A14 3C120001 */  lui       $s2, (0x11630 >> 16)
.LE0076A18:
/* 377A88 E0076A18 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* 377A8C E0076A1C 0200202D */  daddu     $a0, $s0, $zero
/* 377A90 E0076A20 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 377A94 E0076A24 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 377A98 E0076A28 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* 377A9C E0076A2C 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* 377AA0 E0076A30 96050000 */  lhu       $a1, 0x0($s0)
/* 377AA4 E0076A34 8E220000 */  lw        $v0, 0x0($s1)
/* 377AA8 E0076A38 00052980 */  sll       $a1, $a1, 6
/* 377AAC E0076A3C 00B22821 */  addu      $a1, $a1, $s2
/* 377AB0 E0076A40 0C080118 */  jal       shim_guMtxF2L
/* 377AB4 E0076A44 00452821 */   addu     $a1, $v0, $a1
/* 377AB8 E0076A48 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 377ABC E0076A4C 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 377AC0 E0076A50 3C06D838 */  lui       $a2, (0xD8380002 >> 16)
/* 377AC4 E0076A54 34C60002 */  ori       $a2, $a2, (0xD8380002 & 0xFFFF)
/* 377AC8 E0076A58 3C09800A */  lui       $t1, %hi(gMainGfxPos)
/* 377ACC E0076A5C 2529A66C */  addiu     $t1, $t1, %lo(gMainGfxPos)
/* 377AD0 E0076A60 27A40018 */  addiu     $a0, $sp, 0x18
/* 377AD4 E0076A64 8D280000 */  lw        $t0, 0x0($t1)
/* 377AD8 E0076A68 96020000 */  lhu       $v0, 0x0($s0)
/* 377ADC E0076A6C 0100282D */  daddu     $a1, $t0, $zero
/* 377AE0 E0076A70 25080008 */  addiu     $t0, $t0, 0x8
/* 377AE4 E0076A74 AD280000 */  sw        $t0, 0x0($t1)
/* 377AE8 E0076A78 ACA30000 */  sw        $v1, 0x0($a1)
/* 377AEC E0076A7C 24430001 */  addiu     $v1, $v0, 0x1
/* 377AF0 E0076A80 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 377AF4 E0076A84 00021180 */  sll       $v0, $v0, 6
/* 377AF8 E0076A88 A6030000 */  sh        $v1, 0x0($s0)
/* 377AFC E0076A8C 8E230000 */  lw        $v1, 0x0($s1)
/* 377B00 E0076A90 00521021 */  addu      $v0, $v0, $s2
/* 377B04 E0076A94 00621821 */  addu      $v1, $v1, $v0
/* 377B08 E0076A98 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 377B0C E0076A9C ACA30004 */  sw        $v1, 0x4($a1)
/* 377B10 E0076AA0 AD020000 */  sw        $v0, 0x0($t0)
/* 377B14 E0076AA4 00151080 */  sll       $v0, $s5, 2
/* 377B18 E0076AA8 3C03E007 */  lui       $v1, (0xE0076EC0 >> 16)
/* 377B1C E0076AAC 00621821 */  addu      $v1, $v1, $v0
/* 377B20 E0076AB0 8C636EC0 */  lw        $v1, (0xE0076EC0 & 0xFFFF)($v1)
/* 377B24 E0076AB4 25020008 */  addiu     $v0, $t0, 0x8
/* 377B28 E0076AB8 AD220000 */  sw        $v0, 0x0($t1)
/* 377B2C E0076ABC 24020040 */  addiu     $v0, $zero, 0x40
/* 377B30 E0076AC0 AD060008 */  sw        $a2, 0x8($t0)
/* 377B34 E0076AC4 AD02000C */  sw        $v0, 0xC($t0)
/* 377B38 E0076AC8 AD030004 */  sw        $v1, 0x4($t0)
/* 377B3C E0076ACC 8E650004 */  lw        $a1, 0x4($s3)
/* 377B40 E0076AD0 8E660008 */  lw        $a2, 0x8($s3)
/* 377B44 E0076AD4 8E67000C */  lw        $a3, 0xC($s3)
/* 377B48 E0076AD8 25080010 */  addiu     $t0, $t0, 0x10
/* 377B4C E0076ADC 0C080108 */  jal       shim_guTranslateF
/* 377B50 E0076AE0 AD280000 */   sw       $t0, 0x0($t1)
/* 377B54 E0076AE4 24020002 */  addiu     $v0, $zero, 0x2
/* 377B58 E0076AE8 16A20008 */  bne       $s5, $v0, .LE0076B0C
/* 377B5C E0076AEC 0280202D */   daddu    $a0, $s4, $zero
/* 377B60 E0076AF0 44800000 */  mtc1      $zero, $f0
/* 377B64 E0076AF4 4407A000 */  mfc1      $a3, $f20
/* 377B68 E0076AF8 E7A00010 */  swc1      $f0, 0x10($sp)
/* 377B6C E0076AFC 8E650064 */  lw        $a1, 0x64($s3)
/* 377B70 E0076B00 44060000 */  mfc1      $a2, $f0
/* 377B74 E0076B04 0801DAD5 */  j         .LE0076B54
/* 377B78 E0076B08 00000000 */   nop
.LE0076B0C:
/* 377B7C E0076B0C 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 377B80 E0076B10 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 377B84 E0076B14 44800000 */  mtc1      $zero, $f0
/* 377B88 E0076B18 00031080 */  sll       $v0, $v1, 2
/* 377B8C E0076B1C 00431021 */  addu      $v0, $v0, $v1
/* 377B90 E0076B20 00021080 */  sll       $v0, $v0, 2
/* 377B94 E0076B24 00431023 */  subu      $v0, $v0, $v1
/* 377B98 E0076B28 000218C0 */  sll       $v1, $v0, 3
/* 377B9C E0076B2C 00431021 */  addu      $v0, $v0, $v1
/* 377BA0 E0076B30 000210C0 */  sll       $v0, $v0, 3
/* 377BA4 E0076B34 44060000 */  mfc1      $a2, $f0
/* 377BA8 E0076B38 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 377BAC E0076B3C 00220821 */  addu      $at, $at, $v0
/* 377BB0 E0076B40 C4201DEC */  lwc1      $f0, %lo(gCameras + 0x6C)($at)
/* 377BB4 E0076B44 4407A000 */  mfc1      $a3, $f20
/* 377BB8 E0076B48 46000007 */  neg.s     $f0, $f0
/* 377BBC E0076B4C 44050000 */  mfc1      $a1, $f0
/* 377BC0 E0076B50 AFA60010 */  sw        $a2, 0x10($sp)
.LE0076B54:
/* 377BC4 E0076B54 0C080104 */  jal       shim_guRotateF
/* 377BC8 E0076B58 00000000 */   nop
/* 377BCC E0076B5C 27B10058 */  addiu     $s1, $sp, 0x58
/* 377BD0 E0076B60 0220202D */  daddu     $a0, $s1, $zero
/* 377BD4 E0076B64 27A50018 */  addiu     $a1, $sp, 0x18
/* 377BD8 E0076B68 27B00098 */  addiu     $s0, $sp, 0x98
/* 377BDC E0076B6C 0C080114 */  jal       shim_guMtxCatF
/* 377BE0 E0076B70 0200302D */   daddu    $a2, $s0, $zero
/* 377BE4 E0076B74 8E65001C */  lw        $a1, 0x1C($s3)
/* 377BE8 E0076B78 8E660020 */  lw        $a2, 0x20($s3)
/* 377BEC E0076B7C 3C073F80 */  lui       $a3, (0x3F800000 >> 16)
/* 377BF0 E0076B80 0C080110 */  jal       shim_guScaleF
/* 377BF4 E0076B84 0220202D */   daddu    $a0, $s1, $zero
/* 377BF8 E0076B88 0220202D */  daddu     $a0, $s1, $zero
/* 377BFC E0076B8C 0200282D */  daddu     $a1, $s0, $zero
/* 377C00 E0076B90 0C080114 */  jal       shim_guMtxCatF
/* 377C04 E0076B94 0200302D */   daddu    $a2, $s0, $zero
/* 377C08 E0076B98 16A00016 */  bnez      $s5, .LE0076BF4
/* 377C0C E0076B9C 3C120001 */   lui      $s2, (0x11630 >> 16)
/* 377C10 E0076BA0 C660001C */  lwc1      $f0, 0x1C($s3)
/* 377C14 E0076BA4 C6640024 */  lwc1      $f4, 0x24($s3)
/* 377C18 E0076BA8 46040001 */  sub.s     $f0, $f0, $f4
/* 377C1C E0076BAC 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 377C20 E0076BB0 44811000 */  mtc1      $at, $f2
/* 377C24 E0076BB4 46000007 */  neg.s     $f0, $f0
/* 377C28 E0076BB8 46040003 */  div.s     $f0, $f0, $f4
/* 377C2C E0076BBC 46020002 */  mul.s     $f0, $f0, $f2
/* 377C30 E0076BC0 00000000 */  nop
/* 377C34 E0076BC4 44050000 */  mfc1      $a1, $f0
/* 377C38 E0076BC8 44800000 */  mtc1      $zero, $f0
/* 377C3C E0076BCC 00000000 */  nop
/* 377C40 E0076BD0 44060000 */  mfc1      $a2, $f0
/* 377C44 E0076BD4 0220202D */  daddu     $a0, $s1, $zero
/* 377C48 E0076BD8 0C080108 */  jal       shim_guTranslateF
/* 377C4C E0076BDC 00C0382D */   daddu    $a3, $a2, $zero
/* 377C50 E0076BE0 0220202D */  daddu     $a0, $s1, $zero
/* 377C54 E0076BE4 0200282D */  daddu     $a1, $s0, $zero
/* 377C58 E0076BE8 0C080114 */  jal       shim_guMtxCatF
/* 377C5C E0076BEC 0200302D */   daddu    $a2, $s0, $zero
/* 377C60 E0076BF0 3C120001 */  lui       $s2, (0x11630 >> 16)
.LE0076BF4:
/* 377C64 E0076BF4 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* 377C68 E0076BF8 0200202D */  daddu     $a0, $s0, $zero
/* 377C6C E0076BFC 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 377C70 E0076C00 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 377C74 E0076C04 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* 377C78 E0076C08 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* 377C7C E0076C0C 96050000 */  lhu       $a1, 0x0($s0)
/* 377C80 E0076C10 8E220000 */  lw        $v0, 0x0($s1)
/* 377C84 E0076C14 00052980 */  sll       $a1, $a1, 6
/* 377C88 E0076C18 00B22821 */  addu      $a1, $a1, $s2
/* 377C8C E0076C1C 0C080118 */  jal       shim_guMtxF2L
/* 377C90 E0076C20 00452821 */   addu     $a1, $v0, $a1
/* 377C94 E0076C24 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 377C98 E0076C28 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 377C9C E0076C2C 3C06D838 */  lui       $a2, (0xD8380002 >> 16)
/* 377CA0 E0076C30 3C07800A */  lui       $a3, %hi(gMainGfxPos)
/* 377CA4 E0076C34 24E7A66C */  addiu     $a3, $a3, %lo(gMainGfxPos)
/* 377CA8 E0076C38 34C60002 */  ori       $a2, $a2, (0xD8380002 & 0xFFFF)
/* 377CAC E0076C3C 3C08DE00 */  lui       $t0, (0xDE000000 >> 16)
/* 377CB0 E0076C40 00154880 */  sll       $t1, $s5, 2
/* 377CB4 E0076C44 8CE50000 */  lw        $a1, 0x0($a3)
/* 377CB8 E0076C48 96020000 */  lhu       $v0, 0x0($s0)
/* 377CBC E0076C4C 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 377CC0 E0076C50 44812000 */  mtc1      $at, $f4
/* 377CC4 E0076C54 00A0202D */  daddu     $a0, $a1, $zero
/* 377CC8 E0076C58 24A50008 */  addiu     $a1, $a1, 0x8
/* 377CCC E0076C5C ACE50000 */  sw        $a1, 0x0($a3)
/* 377CD0 E0076C60 AC830000 */  sw        $v1, 0x0($a0)
/* 377CD4 E0076C64 24430001 */  addiu     $v1, $v0, 0x1
/* 377CD8 E0076C68 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 377CDC E0076C6C 00021180 */  sll       $v0, $v0, 6
/* 377CE0 E0076C70 A6030000 */  sh        $v1, 0x0($s0)
/* 377CE4 E0076C74 8E230000 */  lw        $v1, 0x0($s1)
/* 377CE8 E0076C78 00521021 */  addu      $v0, $v0, $s2
/* 377CEC E0076C7C 00621821 */  addu      $v1, $v1, $v0
/* 377CF0 E0076C80 24A20008 */  addiu     $v0, $a1, 0x8
/* 377CF4 E0076C84 AC830004 */  sw        $v1, 0x4($a0)
/* 377CF8 E0076C88 ACE20000 */  sw        $v0, 0x0($a3)
/* 377CFC E0076C8C ACA80000 */  sw        $t0, 0x0($a1)
/* 377D00 E0076C90 3C03E007 */  lui       $v1, (0xE0076EB0 >> 16)
/* 377D04 E0076C94 00691821 */  addu      $v1, $v1, $t1
/* 377D08 E0076C98 8C636EB0 */  lw        $v1, (0xE0076EB0 & 0xFFFF)($v1)
/* 377D0C E0076C9C 24A20010 */  addiu     $v0, $a1, 0x10
/* 377D10 E0076CA0 ACE20000 */  sw        $v0, 0x0($a3)
/* 377D14 E0076CA4 24020040 */  addiu     $v0, $zero, 0x40
/* 377D18 E0076CA8 ACA2000C */  sw        $v0, 0xC($a1)
/* 377D1C E0076CAC 24A20018 */  addiu     $v0, $a1, 0x18
/* 377D20 E0076CB0 ACA60008 */  sw        $a2, 0x8($a1)
/* 377D24 E0076CB4 ACE20000 */  sw        $v0, 0x0($a3)
/* 377D28 E0076CB8 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 377D2C E0076CBC ACA20010 */  sw        $v0, 0x10($a1)
/* 377D30 E0076CC0 ACA30004 */  sw        $v1, 0x4($a1)
/* 377D34 E0076CC4 92620068 */  lbu       $v0, 0x68($s3)
/* 377D38 E0076CC8 92640069 */  lbu       $a0, 0x69($s3)
/* 377D3C E0076CCC 9266006A */  lbu       $a2, 0x6A($s3)
/* 377D40 E0076CD0 24A30020 */  addiu     $v1, $a1, 0x20
/* 377D44 E0076CD4 ACE30000 */  sw        $v1, 0x0($a3)
/* 377D48 E0076CD8 3C03FB00 */  lui       $v1, (0xFB000000 >> 16)
/* 377D4C E0076CDC ACA30018 */  sw        $v1, 0x18($a1)
/* 377D50 E0076CE0 32C300FF */  andi      $v1, $s6, 0xFF
/* 377D54 E0076CE4 00021600 */  sll       $v0, $v0, 24
/* 377D58 E0076CE8 00042400 */  sll       $a0, $a0, 16
/* 377D5C E0076CEC 00441025 */  or        $v0, $v0, $a0
/* 377D60 E0076CF0 00063200 */  sll       $a2, $a2, 8
/* 377D64 E0076CF4 00461025 */  or        $v0, $v0, $a2
/* 377D68 E0076CF8 00431025 */  or        $v0, $v0, $v1
/* 377D6C E0076CFC ACA20014 */  sw        $v0, 0x14($a1)
/* 377D70 E0076D00 9262006B */  lbu       $v0, 0x6B($s3)
/* 377D74 E0076D04 9263006C */  lbu       $v1, 0x6C($s3)
/* 377D78 E0076D08 9264006D */  lbu       $a0, 0x6D($s3)
/* 377D7C E0076D0C 00021600 */  sll       $v0, $v0, 24
/* 377D80 E0076D10 00031C00 */  sll       $v1, $v1, 16
/* 377D84 E0076D14 00431025 */  or        $v0, $v0, $v1
/* 377D88 E0076D18 00042200 */  sll       $a0, $a0, 8
/* 377D8C E0076D1C 9263006E */  lbu       $v1, 0x6E($s3)
/* 377D90 E0076D20 00441025 */  or        $v0, $v0, $a0
/* 377D94 E0076D24 00431025 */  or        $v0, $v0, $v1
/* 377D98 E0076D28 ACA2001C */  sw        $v0, 0x1C($a1)
/* 377D9C E0076D2C C6620034 */  lwc1      $f2, 0x34($s3)
/* 377DA0 E0076D30 46041082 */  mul.s     $f2, $f2, $f4
/* 377DA4 E0076D34 00000000 */  nop
/* 377DA8 E0076D38 3C06F200 */  lui       $a2, (0xF2000000 >> 16)
/* 377DAC E0076D3C 3C040100 */  lui       $a0, (0x1000000 >> 16)
/* 377DB0 E0076D40 C6600040 */  lwc1      $f0, 0x40($s3)
/* 377DB4 E0076D44 24A20028 */  addiu     $v0, $a1, 0x28
/* 377DB8 E0076D48 46040002 */  mul.s     $f0, $f0, $f4
/* 377DBC E0076D4C 00000000 */  nop
/* 377DC0 E0076D50 ACE20000 */  sw        $v0, 0x0($a3)
/* 377DC4 E0076D54 24A20030 */  addiu     $v0, $a1, 0x30
/* 377DC8 E0076D58 ACE20000 */  sw        $v0, 0x0($a3)
/* 377DCC E0076D5C 4600118D */  trunc.w.s $f6, $f2
/* 377DD0 E0076D60 440A3000 */  mfc1      $t2, $f6
/* 377DD4 E0076D64 4600018D */  trunc.w.s $f6, $f0
/* 377DD8 E0076D68 440B3000 */  mfc1      $t3, $f6
/* 377DDC E0076D6C 31430FFF */  andi      $v1, $t2, 0xFFF
/* 377DE0 E0076D70 00031B00 */  sll       $v1, $v1, 12
/* 377DE4 E0076D74 31620FFF */  andi      $v0, $t3, 0xFFF
/* 377DE8 E0076D78 00461025 */  or        $v0, $v0, $a2
/* 377DEC E0076D7C 00621825 */  or        $v1, $v1, $v0
/* 377DF0 E0076D80 2542007C */  addiu     $v0, $t2, 0x7C
/* 377DF4 E0076D84 30420FFF */  andi      $v0, $v0, 0xFFF
/* 377DF8 E0076D88 00021300 */  sll       $v0, $v0, 12
/* 377DFC E0076D8C ACA30020 */  sw        $v1, 0x20($a1)
/* 377E00 E0076D90 256301FC */  addiu     $v1, $t3, 0x1FC
/* 377E04 E0076D94 30630FFF */  andi      $v1, $v1, 0xFFF
/* 377E08 E0076D98 00641825 */  or        $v1, $v1, $a0
/* 377E0C E0076D9C 00431025 */  or        $v0, $v0, $v1
/* 377E10 E0076DA0 ACA20024 */  sw        $v0, 0x24($a1)
/* 377E14 E0076DA4 ACA80028 */  sw        $t0, 0x28($a1)
/* 377E18 E0076DA8 3C02E007 */  lui       $v0, (0xE0076E90 >> 16)
/* 377E1C E0076DAC 00491021 */  addu      $v0, $v0, $t1
/* 377E20 E0076DB0 8C426E90 */  lw        $v0, (0xE0076E90 & 0xFFFF)($v0)
/* 377E24 E0076DB4 ACA2002C */  sw        $v0, 0x2C($a1)
/* 377E28 E0076DB8 C662004C */  lwc1      $f2, 0x4C($s3)
/* 377E2C E0076DBC 24A20038 */  addiu     $v0, $a1, 0x38
/* 377E30 E0076DC0 46041082 */  mul.s     $f2, $f2, $f4
/* 377E34 E0076DC4 00000000 */  nop
/* 377E38 E0076DC8 ACE20000 */  sw        $v0, 0x0($a3)
/* 377E3C E0076DCC C6600058 */  lwc1      $f0, 0x58($s3)
/* 377E40 E0076DD0 24A20040 */  addiu     $v0, $a1, 0x40
/* 377E44 E0076DD4 ACE20000 */  sw        $v0, 0x0($a3)
/* 377E48 E0076DD8 46040002 */  mul.s     $f0, $f0, $f4
/* 377E4C E0076DDC 00000000 */  nop
/* 377E50 E0076DE0 24A20048 */  addiu     $v0, $a1, 0x48
/* 377E54 E0076DE4 ACE20000 */  sw        $v0, 0x0($a3)
/* 377E58 E0076DE8 ACA80038 */  sw        $t0, 0x38($a1)
/* 377E5C E0076DEC 4600118D */  trunc.w.s $f6, $f2
/* 377E60 E0076DF0 440A3000 */  mfc1      $t2, $f6
/* 377E64 E0076DF4 4600018D */  trunc.w.s $f6, $f0
/* 377E68 E0076DF8 440B3000 */  mfc1      $t3, $f6
/* 377E6C E0076DFC 2543001E */  addiu     $v1, $t2, 0x1E
/* 377E70 E0076E00 30630FFF */  andi      $v1, $v1, 0xFFF
/* 377E74 E0076E04 00031B00 */  sll       $v1, $v1, 12
/* 377E78 E0076E08 2562001E */  addiu     $v0, $t3, 0x1E
/* 377E7C E0076E0C 30420FFF */  andi      $v0, $v0, 0xFFF
/* 377E80 E0076E10 00461025 */  or        $v0, $v0, $a2
/* 377E84 E0076E14 00621825 */  or        $v1, $v1, $v0
/* 377E88 E0076E18 ACA30030 */  sw        $v1, 0x30($a1)
/* 377E8C E0076E1C 2543011A */  addiu     $v1, $t2, 0x11A
/* 377E90 E0076E20 30630FFF */  andi      $v1, $v1, 0xFFF
/* 377E94 E0076E24 00031B00 */  sll       $v1, $v1, 12
/* 377E98 E0076E28 2562021A */  addiu     $v0, $t3, 0x21A
/* 377E9C E0076E2C 30420FFF */  andi      $v0, $v0, 0xFFF
/* 377EA0 E0076E30 00441025 */  or        $v0, $v0, $a0
/* 377EA4 E0076E34 00621825 */  or        $v1, $v1, $v0
/* 377EA8 E0076E38 ACA30034 */  sw        $v1, 0x34($a1)
/* 377EAC E0076E3C 3C03E007 */  lui       $v1, (0xE0076EA0 >> 16)
/* 377EB0 E0076E40 00691821 */  addu      $v1, $v1, $t1
/* 377EB4 E0076E44 8C636EA0 */  lw        $v1, (0xE0076EA0 & 0xFFFF)($v1)
/* 377EB8 E0076E48 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 377EBC E0076E4C ACA20040 */  sw        $v0, 0x40($a1)
/* 377EC0 E0076E50 ACA00044 */  sw        $zero, 0x44($a1)
/* 377EC4 E0076E54 ACA3003C */  sw        $v1, 0x3C($a1)
/* 377EC8 E0076E58 8FBF00F4 */  lw        $ra, 0xF4($sp)
/* 377ECC E0076E5C 8FB600F0 */  lw        $s6, 0xF0($sp)
/* 377ED0 E0076E60 8FB500EC */  lw        $s5, 0xEC($sp)
/* 377ED4 E0076E64 8FB400E8 */  lw        $s4, 0xE8($sp)
/* 377ED8 E0076E68 8FB300E4 */  lw        $s3, 0xE4($sp)
/* 377EDC E0076E6C 8FB200E0 */  lw        $s2, 0xE0($sp)
/* 377EE0 E0076E70 8FB100DC */  lw        $s1, 0xDC($sp)
/* 377EE4 E0076E74 8FB000D8 */  lw        $s0, 0xD8($sp)
/* 377EE8 E0076E78 D7B400F8 */  ldc1      $f20, 0xF8($sp)
/* 377EEC E0076E7C 03E00008 */  jr        $ra
/* 377EF0 E0076E80 27BD0100 */   addiu    $sp, $sp, 0x100
/* 377EF4 E0076E84 00000000 */  nop
/* 377EF8 E0076E88 00000000 */  nop
/* 377EFC E0076E8C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void aura_appendGfx(void* argEffect) {
    Matrix4f translateMtx, tempMtx, transformMtx;
    EffectInstance* effect = argEffect;
    AuraFXData* data = effect->data.aura;
    s32 type = data->type;
    s32 primA = data->primA;
    s32 v1, v2;

    gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data));
    gSPDisplayList(gMainGfxPos++, D_E0076ED0[type]);

    shim_guTranslateF(translateMtx, data->posB.x, data->posB.y, data->posB.z);
    if (type == 2) {
        shim_guRotateF(tempMtx, data->renderYaw, 0.0f, 1.0f, 0.0f);
    } else {
        shim_guRotateF(tempMtx, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
    }
    shim_guMtxCatF(tempMtx, translateMtx, transformMtx);
    shim_guScaleF(tempMtx, data->scale.x, data->scale.y, 1.0f);
    shim_guMtxCatF(tempMtx, transformMtx, transformMtx);
    if (type == 0) {
        shim_guTranslateF(tempMtx, (-(data->scale.x - data->unk_24) / data->unk_24) * 10.0f, 0.0f, 0.0f);
        shim_guMtxCatF(tempMtx, transformMtx, transformMtx);
    }
    shim_guMtxF2L(transformMtx, &gDisplayContext->matrixStack[gMatrixListPos]);

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

    shim_guTranslateF(translateMtx, data->posA.x, data->posA.y, data->posA.z);
    if (type == 2) {
        shim_guRotateF(tempMtx, data->renderYaw, 0.0f, 1.0f, 0.0f);
    } else {
        shim_guRotateF(tempMtx, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
    }
    shim_guMtxCatF(tempMtx, translateMtx, transformMtx);
    shim_guScaleF(tempMtx, data->scale.x, data->scale.y, 1.0f);
    shim_guMtxCatF(tempMtx, transformMtx, transformMtx);
    if (type == 0) {
        shim_guTranslateF(tempMtx, (-(data->scale.x - data->unk_24) / data->unk_24) * 10.0f, 0.0f, 0.0f);
        shim_guMtxCatF(tempMtx, transformMtx, transformMtx);
    }
    shim_guMtxF2L(transformMtx, &gDisplayContext->matrixStack[gMatrixListPos]);

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

    gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primR, data->primG, data->primB, primA);
    gDPSetEnvColor(gMainGfxPos++, data->envR, data->envG, data->engB, data->engA);

    v1 = data->unk_34 * 4.0f;
    v2 = data->unk_40 * 4.0f;

    gDPSetTileSize(gMainGfxPos++, 1, v1, v2, v1 + 124, v2 + 508);
    gSPDisplayList(gMainGfxPos++, D_E0076E90[type]);

    v1 = data->unk_4C * 4.0f;
    v2 = data->unk_58 * 4.0f;

    gDPSetTileSize(gMainGfxPos++, 1, v1 + 30, v2 + 30, v1 + 282, v2 + 538);
    gSPDisplayList(gMainGfxPos++, D_E0076EA0[type]);
    gDPPipeSync(gMainGfxPos++);
}