### RAW ASSEMBLY INSTRUCTIONS:

glabel radial_shimmer_appendGfx
/* 3667A0 E0066770 27BDFF28 */  addiu     $sp, $sp, -0xD8
/* 3667A4 E0066774 AFB700C4 */  sw        $s7, 0xC4($sp)
/* 3667A8 E0066778 0080B82D */  daddu     $s7, $a0, $zero
/* 3667AC E006677C 3C06DB06 */  lui       $a2, (0xDB060024 >> 16)
/* 3667B0 E0066780 34C60024 */  ori       $a2, $a2, (0xDB060024 & 0xFFFF)
/* 3667B4 E0066784 27A40020 */  addiu     $a0, $sp, 0x20
/* 3667B8 E0066788 AFB200B0 */  sw        $s2, 0xB0($sp)
/* 3667BC E006678C 3C120001 */  lui       $s2, (0x11630 >> 16)
/* 3667C0 E0066790 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* 3667C4 E0066794 AFB600C0 */  sw        $s6, 0xC0($sp)
/* 3667C8 E0066798 3C16800A */  lui       $s6, %hi(gMainGfxPos)
/* 3667CC E006679C 26D6A66C */  addiu     $s6, $s6, %lo(gMainGfxPos)
/* 3667D0 E00667A0 AFBF00CC */  sw        $ra, 0xCC($sp)
/* 3667D4 E00667A4 AFBE00C8 */  sw        $fp, 0xC8($sp)
/* 3667D8 E00667A8 AFB500BC */  sw        $s5, 0xBC($sp)
/* 3667DC E00667AC AFB400B8 */  sw        $s4, 0xB8($sp)
/* 3667E0 E00667B0 AFB300B4 */  sw        $s3, 0xB4($sp)
/* 3667E4 E00667B4 AFB100AC */  sw        $s1, 0xAC($sp)
/* 3667E8 E00667B8 AFB000A8 */  sw        $s0, 0xA8($sp)
/* 3667EC E00667BC F7B400D0 */  sdc1      $f20, 0xD0($sp)
/* 3667F0 E00667C0 8EC50000 */  lw        $a1, 0x0($s6)
/* 3667F4 E00667C4 8EF4000C */  lw        $s4, 0xC($s7)
/* 3667F8 E00667C8 00A0182D */  daddu     $v1, $a1, $zero
/* 3667FC E00667CC 8E950000 */  lw        $s5, 0x0($s4)
/* 366800 E00667D0 24A50008 */  addiu     $a1, $a1, 0x8
/* 366804 E00667D4 AEC50000 */  sw        $a1, 0x0($s6)
/* 366808 E00667D8 00151080 */  sll       $v0, $s5, 2
/* 36680C E00667DC 3C13E006 */  lui       $s3, (0xE0066C8C >> 16)
/* 366810 E00667E0 02629821 */  addu      $s3, $s3, $v0
/* 366814 E00667E4 8E736C8C */  lw        $s3, (0xE0066C8C & 0xFFFF)($s3)
/* 366818 E00667E8 3C1EE006 */  lui       $fp, (0xE0066C50 >> 16)
/* 36681C E00667EC 03C2F021 */  addu      $fp, $fp, $v0
/* 366820 E00667F0 8FDE6C50 */  lw        $fp, (0xE0066C50 & 0xFFFF)($fp)
/* 366824 E00667F4 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 366828 E00667F8 AC620000 */  sw        $v0, 0x0($v1)
/* 36682C E00667FC AC600004 */  sw        $zero, 0x4($v1)
/* 366830 E0066800 ACA60000 */  sw        $a2, 0x0($a1)
/* 366834 E0066804 8EE30010 */  lw        $v1, 0x10($s7)
/* 366838 E0066808 24A20008 */  addiu     $v0, $a1, 0x8
/* 36683C E006680C AEC20000 */  sw        $v0, 0x0($s6)
/* 366840 E0066810 8C62001C */  lw        $v0, 0x1C($v1)
/* 366844 E0066814 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 366848 E0066818 00431021 */  addu      $v0, $v0, $v1
/* 36684C E006681C 3C03800B */  lui       $v1, %hi(gCameras)
/* 366850 E0066820 24631D80 */  addiu     $v1, $v1, %lo(gCameras)
/* 366854 E0066824 ACA20004 */  sw        $v0, 0x4($a1)
/* 366858 E0066828 8E850010 */  lw        $a1, 0x10($s4)
/* 36685C E006682C 8E860014 */  lw        $a2, 0x14($s4)
/* 366860 E0066830 3C028007 */  lui       $v0, %hi(gCurrentCameraID)
/* 366864 E0066834 8C427410 */  lw        $v0, %lo(gCurrentCameraID)($v0)
/* 366868 E0066838 8E870018 */  lw        $a3, 0x18($s4)
/* 36686C E006683C 00028080 */  sll       $s0, $v0, 2
/* 366870 E0066840 02028021 */  addu      $s0, $s0, $v0
/* 366874 E0066844 00108080 */  sll       $s0, $s0, 2
/* 366878 E0066848 02028023 */  subu      $s0, $s0, $v0
/* 36687C E006684C 001010C0 */  sll       $v0, $s0, 3
/* 366880 E0066850 02028021 */  addu      $s0, $s0, $v0
/* 366884 E0066854 001080C0 */  sll       $s0, $s0, 3
/* 366888 E0066858 0C080108 */  jal       shim_guTranslateF
/* 36688C E006685C 02038021 */   addu     $s0, $s0, $v1
/* 366890 E0066860 27B10060 */  addiu     $s1, $sp, 0x60
/* 366894 E0066864 0220202D */  daddu     $a0, $s1, $zero
/* 366898 E0066868 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 36689C E006686C 4481A000 */  mtc1      $at, $f20
/* 3668A0 E0066870 8E85001C */  lw        $a1, 0x1C($s4)
/* 3668A4 E0066874 4407A000 */  mfc1      $a3, $f20
/* 3668A8 E0066878 0C080110 */  jal       shim_guScaleF
/* 3668AC E006687C 00A0302D */   daddu    $a2, $a1, $zero
/* 3668B0 E0066880 0220202D */  daddu     $a0, $s1, $zero
/* 3668B4 E0066884 27A50020 */  addiu     $a1, $sp, 0x20
/* 3668B8 E0066888 0C080114 */  jal       shim_guMtxCatF
/* 3668BC E006688C 00A0302D */   daddu    $a2, $a1, $zero
/* 3668C0 E0066890 8602000A */  lh        $v0, 0xA($s0)
/* 3668C4 E0066894 8603000C */  lh        $v1, 0xC($s0)
/* 3668C8 E0066898 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 3668CC E006689C 44810000 */  mtc1      $at, $f0
/* 3668D0 E00668A0 3C014680 */  lui       $at, (0x46800000 >> 16)
/* 3668D4 E00668A4 44811000 */  mtc1      $at, $f2
/* 3668D8 E00668A8 0220202D */  daddu     $a0, $s1, $zero
/* 3668DC E00668AC E7B40018 */  swc1      $f20, 0x18($sp)
/* 3668E0 E00668B0 E7A20014 */  swc1      $f2, 0x14($sp)
/* 3668E4 E00668B4 44821000 */  mtc1      $v0, $f2
/* 3668E8 E00668B8 00000000 */  nop
/* 3668EC E00668BC 468010A0 */  cvt.s.w   $f2, $f2
/* 3668F0 E00668C0 E7A00010 */  swc1      $f0, 0x10($sp)
/* 3668F4 E00668C4 44830000 */  mtc1      $v1, $f0
/* 3668F8 E00668C8 00000000 */  nop
/* 3668FC E00668CC 46800020 */  cvt.s.w   $f0, $f0
/* 366900 E00668D0 46001083 */  div.s     $f2, $f2, $f0
/* 366904 E00668D4 8E860060 */  lw        $a2, 0x60($s4)
/* 366908 E00668D8 44071000 */  mfc1      $a3, $f2
/* 36690C E00668DC 0C080160 */  jal       shim_guPerspectiveF
/* 366910 E00668E0 27A500A0 */   addiu    $a1, $sp, 0xA0
/* 366914 E00668E4 0220202D */  daddu     $a0, $s1, $zero
/* 366918 E00668E8 27A50020 */  addiu     $a1, $sp, 0x20
/* 36691C E00668EC 0C080114 */  jal       shim_guMtxCatF
/* 366920 E00668F0 00A0302D */   daddu    $a2, $a1, $zero
/* 366924 E00668F4 27A40020 */  addiu     $a0, $sp, 0x20
/* 366928 E00668F8 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 36692C E00668FC 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 366930 E0066900 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* 366934 E0066904 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* 366938 E0066908 96050000 */  lhu       $a1, 0x0($s0)
/* 36693C E006690C 8E220000 */  lw        $v0, 0x0($s1)
/* 366940 E0066910 00052980 */  sll       $a1, $a1, 6
/* 366944 E0066914 00B22821 */  addu      $a1, $a1, $s2
/* 366948 E0066918 0C080118 */  jal       shim_guMtxF2L
/* 36694C E006691C 00452821 */   addu     $a1, $v0, $a1
/* 366950 E0066920 3C02DA38 */  lui       $v0, (0xDA380007 >> 16)
/* 366954 E0066924 34420007 */  ori       $v0, $v0, (0xDA380007 & 0xFFFF)
/* 366958 E0066928 27A40020 */  addiu     $a0, $sp, 0x20
/* 36695C E006692C 44800000 */  mtc1      $zero, $f0
/* 366960 E0066930 8EC90000 */  lw        $t1, 0x0($s6)
/* 366964 E0066934 96080000 */  lhu       $t0, 0x0($s0)
/* 366968 E0066938 0120382D */  daddu     $a3, $t1, $zero
/* 36696C E006693C ACE20000 */  sw        $v0, 0x0($a3)
/* 366970 E0066940 3102FFFF */  andi      $v0, $t0, 0xFFFF
/* 366974 E0066944 00021180 */  sll       $v0, $v0, 6
/* 366978 E0066948 00521021 */  addu      $v0, $v0, $s2
/* 36697C E006694C 25290008 */  addiu     $t1, $t1, 0x8
/* 366980 E0066950 25080001 */  addiu     $t0, $t0, 0x1
/* 366984 E0066954 8E230000 */  lw        $v1, 0x0($s1)
/* 366988 E0066958 44050000 */  mfc1      $a1, $f0
/* 36698C E006695C 00621821 */  addu      $v1, $v1, $v0
/* 366990 E0066960 ACE30004 */  sw        $v1, 0x4($a3)
/* 366994 E0066964 8E870064 */  lw        $a3, 0x64($s4)
/* 366998 E0066968 00A0302D */  daddu     $a2, $a1, $zero
/* 36699C E006696C AEC90000 */  sw        $t1, 0x0($s6)
/* 3669A0 E0066970 0C080108 */  jal       shim_guTranslateF
/* 3669A4 E0066974 A6080000 */   sh       $t0, 0x0($s0)
/* 3669A8 E0066978 27A40020 */  addiu     $a0, $sp, 0x20
/* 3669AC E006697C 96050000 */  lhu       $a1, 0x0($s0)
/* 3669B0 E0066980 8E220000 */  lw        $v0, 0x0($s1)
/* 3669B4 E0066984 00052980 */  sll       $a1, $a1, 6
/* 3669B8 E0066988 00B22821 */  addu      $a1, $a1, $s2
/* 3669BC E006698C 0C080118 */  jal       shim_guMtxF2L
/* 3669C0 E0066990 00452821 */   addu     $a1, $v0, $a1
/* 3669C4 E0066994 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 3669C8 E0066998 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 3669CC E006699C 0000602D */  daddu     $t4, $zero, $zero
/* 3669D0 E00669A0 8EC50000 */  lw        $a1, 0x0($s6)
/* 3669D4 E00669A4 96020000 */  lhu       $v0, 0x0($s0)
/* 3669D8 E00669A8 00A0202D */  daddu     $a0, $a1, $zero
/* 3669DC E00669AC 24A50008 */  addiu     $a1, $a1, 0x8
/* 3669E0 E00669B0 AEC50000 */  sw        $a1, 0x0($s6)
/* 3669E4 E00669B4 AC830000 */  sw        $v1, 0x0($a0)
/* 3669E8 E00669B8 24430001 */  addiu     $v1, $v0, 0x1
/* 3669EC E00669BC 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3669F0 E00669C0 00021180 */  sll       $v0, $v0, 6
/* 3669F4 E00669C4 A6030000 */  sh        $v1, 0x0($s0)
/* 3669F8 E00669C8 8E230000 */  lw        $v1, 0x0($s1)
/* 3669FC E00669CC 00521021 */  addu      $v0, $v0, $s2
/* 366A00 E00669D0 00621821 */  addu      $v1, $v1, $v0
/* 366A04 E00669D4 24A20008 */  addiu     $v0, $a1, 0x8
/* 366A08 E00669D8 AC830004 */  sw        $v1, 0x4($a0)
/* 366A0C E00669DC AEC20000 */  sw        $v0, 0x0($s6)
/* 366A10 E00669E0 8E870024 */  lw        $a3, 0x24($s4)
/* 366A14 E00669E4 3C02FB00 */  lui       $v0, (0xFB000000 >> 16)
/* 366A18 E00669E8 ACA20000 */  sw        $v0, 0x0($a1)
/* 366A1C E00669EC 9282006B */  lbu       $v0, 0x6B($s4)
/* 366A20 E00669F0 9284006C */  lbu       $a0, 0x6C($s4)
/* 366A24 E00669F4 9286006D */  lbu       $a2, 0x6D($s4)
/* 366A28 E00669F8 3C03DE00 */  lui       $v1, (0xDE000000 >> 16)
/* 366A2C E00669FC ACA30008 */  sw        $v1, 0x8($a1)
/* 366A30 E0066A00 ACB3000C */  sw        $s3, 0xC($a1)
/* 366A34 E0066A04 00021600 */  sll       $v0, $v0, 24
/* 366A38 E0066A08 00042400 */  sll       $a0, $a0, 16
/* 366A3C E0066A0C 00441025 */  or        $v0, $v0, $a0
/* 366A40 E0066A10 00063200 */  sll       $a2, $a2, 8
/* 366A44 E0066A14 00461025 */  or        $v0, $v0, $a2
/* 366A48 E0066A18 3442007F */  ori       $v0, $v0, 0x7F
/* 366A4C E0066A1C ACA20004 */  sw        $v0, 0x4($a1)
/* 366A50 E0066A20 8EE20008 */  lw        $v0, 0x8($s7)
/* 366A54 E0066A24 24A50010 */  addiu     $a1, $a1, 0x10
/* 366A58 E0066A28 1840005E */  blez      $v0, .LE0066BA4
/* 366A5C E0066A2C AEC50000 */   sw       $a1, 0x0($s6)
/* 366A60 E0066A30 02C0582D */  daddu     $t3, $s6, $zero
/* 366A64 E0066A34 3C16FA00 */  lui       $s6, (0xFA000000 >> 16)
/* 366A68 E0066A38 30F000FF */  andi      $s0, $a3, 0xFF
/* 366A6C E0066A3C 24130008 */  addiu     $s3, $zero, 0x8
/* 366A70 E0066A40 2AAF0009 */  slti      $t7, $s5, 0x9
/* 366A74 E0066A44 2412000B */  addiu     $s2, $zero, 0xB
/* 366A78 E0066A48 2AAE0002 */  slti      $t6, $s5, 0x2
/* 366A7C E0066A4C 3C0DF200 */  lui       $t5, (0xF2000000 >> 16)
/* 366A80 E0066A50 3C110100 */  lui       $s1, (0x1000000 >> 16)
/* 366A84 E0066A54 268A0048 */  addiu     $t2, $s4, 0x48
.LE0066A58:
/* 366A88 E0066A58 8D620000 */  lw        $v0, 0x0($t3)
/* 366A8C E0066A5C 0040282D */  daddu     $a1, $v0, $zero
/* 366A90 E0066A60 24420008 */  addiu     $v0, $v0, 0x8
/* 366A94 E0066A64 AD620000 */  sw        $v0, 0x0($t3)
/* 366A98 E0066A68 ACB60000 */  sw        $s6, 0x0($a1)
/* 366A9C E0066A6C 91420020 */  lbu       $v0, 0x20($t2)
/* 366AA0 E0066A70 91440021 */  lbu       $a0, 0x21($t2)
/* 366AA4 E0066A74 91430022 */  lbu       $v1, 0x22($t2)
/* 366AA8 E0066A78 00021600 */  sll       $v0, $v0, 24
/* 366AAC E0066A7C 00042400 */  sll       $a0, $a0, 16
/* 366AB0 E0066A80 00441025 */  or        $v0, $v0, $a0
/* 366AB4 E0066A84 00031A00 */  sll       $v1, $v1, 8
/* 366AB8 E0066A88 00431025 */  or        $v0, $v0, $v1
/* 366ABC E0066A8C 00501025 */  or        $v0, $v0, $s0
/* 366AC0 E0066A90 12B30007 */  beq       $s5, $s3, .LE0066AB0
/* 366AC4 E0066A94 ACA20004 */   sw       $v0, 0x4($a1)
/* 366AC8 E0066A98 15E00008 */  bnez      $t7, .LE0066ABC
/* 366ACC E0066A9C 2409003F */   addiu    $t1, $zero, 0x3F
/* 366AD0 E0066AA0 12B20007 */  beq       $s5, $s2, .LE0066AC0
/* 366AD4 E0066AA4 240700FF */   addiu    $a3, $zero, 0xFF
/* 366AD8 E0066AA8 08019AB0 */  j         .LE0066AC0
/* 366ADC E0066AAC 240701FF */   addiu    $a3, $zero, 0x1FF
.LE0066AB0:
/* 366AE0 E0066AB0 2409003F */  addiu     $t1, $zero, 0x3F
/* 366AE4 E0066AB4 08019AB0 */  j         .LE0066AC0
/* 366AE8 E0066AB8 2407007F */   addiu    $a3, $zero, 0x7F
.LE0066ABC:
/* 366AEC E0066ABC 240701FF */  addiu     $a3, $zero, 0x1FF
.LE0066AC0:
/* 366AF0 E0066AC0 258C0001 */  addiu     $t4, $t4, 0x1
/* 366AF4 E0066AC4 C540FFE8 */  lwc1      $f0, -0x18($t2)
/* 366AF8 E0066AC8 C542FFF8 */  lwc1      $f2, -0x8($t2)
/* 366AFC E0066ACC C544FFF0 */  lwc1      $f4, -0x10($t2)
/* 366B00 E0066AD0 C5460000 */  lwc1      $f6, 0x0($t2)
/* 366B04 E0066AD4 254A0070 */  addiu     $t2, $t2, 0x70
/* 366B08 E0066AD8 00094880 */  sll       $t1, $t1, 2
/* 366B0C E0066ADC 8D660000 */  lw        $a2, 0x0($t3)
/* 366B10 E0066AE0 00073880 */  sll       $a3, $a3, 2
/* 366B14 E0066AE4 00C0402D */  daddu     $t0, $a2, $zero
/* 366B18 E0066AE8 24C60008 */  addiu     $a2, $a2, 0x8
/* 366B1C E0066AEC 4600020D */  trunc.w.s $f8, $f0
/* 366B20 E0066AF0 44044000 */  mfc1      $a0, $f8
/* 366B24 E0066AF4 4600120D */  trunc.w.s $f8, $f2
/* 366B28 E0066AF8 44054000 */  mfc1      $a1, $f8
/* 366B2C E0066AFC 30830FFF */  andi      $v1, $a0, 0xFFF
/* 366B30 E0066B00 00031B00 */  sll       $v1, $v1, 12
/* 366B34 E0066B04 30A20FFF */  andi      $v0, $a1, 0xFFF
/* 366B38 E0066B08 004D1025 */  or        $v0, $v0, $t5
/* 366B3C E0066B0C 00621825 */  or        $v1, $v1, $v0
/* 366B40 E0066B10 00892021 */  addu      $a0, $a0, $t1
/* 366B44 E0066B14 30840FFF */  andi      $a0, $a0, 0xFFF
/* 366B48 E0066B18 00042300 */  sll       $a0, $a0, 12
/* 366B4C E0066B1C 00A72821 */  addu      $a1, $a1, $a3
/* 366B50 E0066B20 30A50FFF */  andi      $a1, $a1, 0xFFF
/* 366B54 E0066B24 00852025 */  or        $a0, $a0, $a1
/* 366B58 E0066B28 24C20008 */  addiu     $v0, $a2, 0x8
/* 366B5C E0066B2C AD660000 */  sw        $a2, 0x0($t3)
/* 366B60 E0066B30 AD040004 */  sw        $a0, 0x4($t0)
/* 366B64 E0066B34 4600220D */  trunc.w.s $f8, $f4
/* 366B68 E0066B38 44044000 */  mfc1      $a0, $f8
/* 366B6C E0066B3C 4600320D */  trunc.w.s $f8, $f6
/* 366B70 E0066B40 44054000 */  mfc1      $a1, $f8
/* 366B74 E0066B44 AD030000 */  sw        $v1, 0x0($t0)
/* 366B78 E0066B48 30830FFF */  andi      $v1, $a0, 0xFFF
/* 366B7C E0066B4C 00031B00 */  sll       $v1, $v1, 12
/* 366B80 E0066B50 AD620000 */  sw        $v0, 0x0($t3)
/* 366B84 E0066B54 30A20FFF */  andi      $v0, $a1, 0xFFF
/* 366B88 E0066B58 004D1025 */  or        $v0, $v0, $t5
/* 366B8C E0066B5C 00621825 */  or        $v1, $v1, $v0
/* 366B90 E0066B60 00892021 */  addu      $a0, $a0, $t1
/* 366B94 E0066B64 30840FFF */  andi      $a0, $a0, 0xFFF
/* 366B98 E0066B68 00042300 */  sll       $a0, $a0, 12
/* 366B9C E0066B6C 00A72821 */  addu      $a1, $a1, $a3
/* 366BA0 E0066B70 30A50FFF */  andi      $a1, $a1, 0xFFF
/* 366BA4 E0066B74 00B12825 */  or        $a1, $a1, $s1
/* 366BA8 E0066B78 00852025 */  or        $a0, $a0, $a1
/* 366BAC E0066B7C 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 366BB0 E0066B80 ACC30000 */  sw        $v1, 0x0($a2)
/* 366BB4 E0066B84 ACC40004 */  sw        $a0, 0x4($a2)
/* 366BB8 E0066B88 ACC20008 */  sw        $v0, 0x8($a2)
/* 366BBC E0066B8C ACDE000C */  sw        $fp, 0xC($a2)
/* 366BC0 E0066B90 8EE20008 */  lw        $v0, 0x8($s7)
/* 366BC4 E0066B94 24C60010 */  addiu     $a2, $a2, 0x10
/* 366BC8 E0066B98 0182102A */  slt       $v0, $t4, $v0
/* 366BCC E0066B9C 1440FFAE */  bnez      $v0, .LE0066A58
/* 366BD0 E0066BA0 AD660000 */   sw       $a2, 0x0($t3)
.LE0066BA4:
/* 366BD4 E0066BA4 3C02D838 */  lui       $v0, (0xD8380002 >> 16)
/* 366BD8 E0066BA8 34420002 */  ori       $v0, $v0, (0xD8380002 & 0xFFFF)
/* 366BDC E0066BAC 3C05800A */  lui       $a1, %hi(gMainGfxPos)
/* 366BE0 E0066BB0 24A5A66C */  addiu     $a1, $a1, %lo(gMainGfxPos)
/* 366BE4 E0066BB4 8CA40000 */  lw        $a0, 0x0($a1)
/* 366BE8 E0066BB8 3C06DA38 */  lui       $a2, (0xDA380007 >> 16)
/* 366BEC E0066BBC 0080182D */  daddu     $v1, $a0, $zero
/* 366BF0 E0066BC0 24840008 */  addiu     $a0, $a0, 0x8
/* 366BF4 E0066BC4 ACA40000 */  sw        $a0, 0x0($a1)
/* 366BF8 E0066BC8 AC620000 */  sw        $v0, 0x0($v1)
/* 366BFC E0066BCC 24020040 */  addiu     $v0, $zero, 0x40
/* 366C00 E0066BD0 AC620004 */  sw        $v0, 0x4($v1)
/* 366C04 E0066BD4 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 366C08 E0066BD8 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 366C0C E0066BDC 24820008 */  addiu     $v0, $a0, 0x8
/* 366C10 E0066BE0 ACA20000 */  sw        $v0, 0x0($a1)
/* 366C14 E0066BE4 3C02800A */  lui       $v0, %hi(gDisplayContext)
/* 366C18 E0066BE8 8C42A674 */  lw        $v0, %lo(gDisplayContext)($v0)
/* 366C1C E0066BEC 34C60007 */  ori       $a2, $a2, (0xDA380007 & 0xFFFF)
/* 366C20 E0066BF0 AC860000 */  sw        $a2, 0x0($a0)
/* 366C24 E0066BF4 00031980 */  sll       $v1, $v1, 6
/* 366C28 E0066BF8 24630030 */  addiu     $v1, $v1, 0x30
/* 366C2C E0066BFC 00431021 */  addu      $v0, $v0, $v1
/* 366C30 E0066C00 AC820004 */  sw        $v0, 0x4($a0)
/* 366C34 E0066C04 24820010 */  addiu     $v0, $a0, 0x10
/* 366C38 E0066C08 ACA20000 */  sw        $v0, 0x0($a1)
/* 366C3C E0066C0C 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 366C40 E0066C10 AC820008 */  sw        $v0, 0x8($a0)
/* 366C44 E0066C14 AC80000C */  sw        $zero, 0xC($a0)
/* 366C48 E0066C18 8FBF00CC */  lw        $ra, 0xCC($sp)
/* 366C4C E0066C1C 8FBE00C8 */  lw        $fp, 0xC8($sp)
/* 366C50 E0066C20 8FB700C4 */  lw        $s7, 0xC4($sp)
/* 366C54 E0066C24 8FB600C0 */  lw        $s6, 0xC0($sp)
/* 366C58 E0066C28 8FB500BC */  lw        $s5, 0xBC($sp)
/* 366C5C E0066C2C 8FB400B8 */  lw        $s4, 0xB8($sp)
/* 366C60 E0066C30 8FB300B4 */  lw        $s3, 0xB4($sp)
/* 366C64 E0066C34 8FB200B0 */  lw        $s2, 0xB0($sp)
/* 366C68 E0066C38 8FB100AC */  lw        $s1, 0xAC($sp)
/* 366C6C E0066C3C 8FB000A8 */  lw        $s0, 0xA8($sp)
/* 366C70 E0066C40 D7B400D0 */  ldc1      $f20, 0xD0($sp)
/* 366C74 E0066C44 03E00008 */  jr        $ra
/* 366C78 E0066C48 27BD00D8 */   addiu    $sp, $sp, 0xD8
/* 366C7C E0066C4C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void radial_shimmer_appendGfx(void* effect) {
    Matrix4f sp20, sp60;
    u16 spA0;
    EffectInstance* effectTemp = effect;
    RadialShimmerFXData* dataOrig = effectTemp->data.radialShimmer;
    RadialShimmerFXData* data = effectTemp->data.radialShimmer;
    Camera* camera = &gCameras[gCurrentCameraID];
    s32 temp_f0;
    s32 temp_f2;
    s32 temp_f4;
    s32 temp_f6;
    Gfx* dlist2;
    Gfx* dlist1;
    s32 temp_s5;
    s32 temp_t1;
    s32 var_a3;
    s32 alpha;
    s32 other;
    s32 t1;
    s32 t2;
    s32 i;

    temp_s5 = data->unk_00;
    dlist1 = D_E0066C8C[temp_s5];
    dlist2 = D_E0066C50[temp_s5];

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

    shim_guTranslateF(sp20, data->unk_10, data->unk_14, data->unk_18);
    shim_guScaleF(sp60, data->unk_1C, data->unk_1C, 1.0f);
    shim_guMtxCatF(sp60, sp20, sp20);
    shim_guPerspectiveF(sp60, &spA0, data->unk_60, (f32) camera->viewportW / camera->viewportH, 4.0f, 16384.0f, 1.0f);
    shim_guMtxCatF(sp60, sp20, sp20);
    shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

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

    shim_guTranslateF(sp20, 0.0f, 0.0f, data->unk_64);
    shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
              G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
    alpha = data->unk_24;
    gDPSetEnvColor(gMainGfxPos++, data->unk_6B, data->unk_6C, data->unk_6D, 127);
    gSPDisplayList(gMainGfxPos++, dlist1);

    for (i = 0; i < effectTemp->numParts; i++, data++) {
        gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_68, data->unk_69, data->unk_6A, alpha);

        switch (temp_s5) {
            case 0:
            case 1:
                other = 0x3F;
                var_a3 = 0x1FF;
                break;
            case 8:
                other = 0x3F;
                var_a3 = 0x7F;
                break;
            case 11:
                other = 0x3F;
                var_a3 = 0xFF;
                break;
            default:
                other = 0x3F;
                var_a3 = 0x1FF;
                break;
        }

        temp_f0 = data->unk_30;
        temp_f2 = data->unk_40;
        temp_f4 = data->unk_38;
        temp_f6 = data->unk_48;

        gDPSetTileSize(gMainGfxPos++, 0, temp_f0, temp_f2, temp_f0 + other * 4, temp_f2 + var_a3 * 4);
        gDPSetTileSize(gMainGfxPos++, G_TX_MIRROR, temp_f4, temp_f6, temp_f4 + other * 4, temp_f6 + var_a3 * 4);
        gSPDisplayList(gMainGfxPos++, dlist2);
    }

    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    gSPMatrix(gMainGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID],
              G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
    gDPPipeSync(gMainGfxPos++);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel msg_draw_choice_pointer
/* BD678 80126F78 27BDFFA0 */  addiu     $sp, $sp, -0x60
/* BD67C 80126F7C AFB00038 */  sw        $s0, 0x38($sp)
/* BD680 80126F80 0080802D */  daddu     $s0, $a0, $zero
/* BD684 80126F84 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* BD688 80126F88 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* BD68C 80126F8C 3C0316C1 */  lui       $v1, (0x16C16C17 >> 16)
/* BD690 80126F90 AFBF0058 */  sw        $ra, 0x58($sp)
/* BD694 80126F94 AFB70054 */  sw        $s7, 0x54($sp)
/* BD698 80126F98 AFB60050 */  sw        $s6, 0x50($sp)
/* BD69C 80126F9C AFB5004C */  sw        $s5, 0x4C($sp)
/* BD6A0 80126FA0 AFB40048 */  sw        $s4, 0x48($sp)
/* BD6A4 80126FA4 AFB30044 */  sw        $s3, 0x44($sp)
/* BD6A8 80126FA8 AFB20040 */  sw        $s2, 0x40($sp)
/* BD6AC 80126FAC AFB1003C */  sw        $s1, 0x3C($sp)
/* BD6B0 80126FB0 94440134 */  lhu       $a0, 0x134($v0)
/* BD6B4 80126FB4 34636C17 */  ori       $v1, $v1, (0x16C16C17 & 0xFFFF)
/* BD6B8 80126FB8 000410C2 */  srl       $v0, $a0, 3
/* BD6BC 80126FBC 00430019 */  multu     $v0, $v1
/* BD6C0 80126FC0 241700FF */  addiu     $s7, $zero, 0xFF
/* BD6C4 80126FC4 24160048 */  addiu     $s6, $zero, 0x48
/* BD6C8 80126FC8 0000C010 */  mfhi      $t8
/* BD6CC 80126FCC 00181082 */  srl       $v0, $t8, 2
/* BD6D0 80126FD0 00021840 */  sll       $v1, $v0, 1
/* BD6D4 80126FD4 00621821 */  addu      $v1, $v1, $v0
/* BD6D8 80126FD8 00031100 */  sll       $v0, $v1, 4
/* BD6DC 80126FDC 00431023 */  subu      $v0, $v0, $v1
/* BD6E0 80126FE0 000210C0 */  sll       $v0, $v0, 3
/* BD6E4 80126FE4 00822023 */  subu      $a0, $a0, $v0
/* BD6E8 80126FE8 920304F8 */  lbu       $v1, 0x4F8($s0)
/* BD6EC 80126FEC 24020007 */  addiu     $v0, $zero, 0x7
/* BD6F0 80126FF0 10620006 */  beq       $v1, $v0, .L8012700C
/* BD6F4 80126FF4 3088FFFF */   andi     $t0, $a0, 0xFFFF
/* BD6F8 80126FF8 8E0204FC */  lw        $v0, 0x4FC($s0)
/* BD6FC 80126FFC 3C030002 */  lui       $v1, (0x20000 >> 16)
/* BD700 80127000 00431024 */  and       $v0, $v0, $v1
/* BD704 80127004 1040000F */  beqz      $v0, .L80127044
/* BD708 80127008 00000000 */   nop
.L8012700C:
/* BD70C 8012700C 920304EE */  lbu       $v1, 0x4EE($s0)
/* BD710 80127010 86020456 */  lh        $v0, 0x456($s0)
/* BD714 80127014 8604045A */  lh        $a0, 0x45A($s0)
/* BD718 80127018 00031840 */  sll       $v1, $v1, 1
/* BD71C 8012701C 02031821 */  addu      $v1, $s0, $v1
/* BD720 80127020 00441021 */  addu      $v0, $v0, $a0
/* BD724 80127024 946504D0 */  lhu       $a1, 0x4D0($v1)
/* BD728 80127028 8604045C */  lh        $a0, 0x45C($s0)
/* BD72C 8012702C 0045A021 */  addu      $s4, $v0, $a1
/* BD730 80127030 86020458 */  lh        $v0, 0x458($s0)
/* BD734 80127034 946304DC */  lhu       $v1, 0x4DC($v1)
/* BD738 80127038 00441021 */  addu      $v0, $v0, $a0
/* BD73C 8012703C 08049C4C */  j         .L80127130
/* BD740 80127040 0043A821 */   addu     $s5, $v0, $v1
.L80127044:
/* BD744 80127044 920204ED */  lbu       $v0, 0x4ED($s0)
/* BD748 80127048 3C013FF0 */  lui       $at, (0x3FF00000 >> 16)
/* BD74C 8012704C 44811800 */  mtc1      $at, $f3
/* BD750 80127050 44801000 */  mtc1      $zero, $f2
/* BD754 80127054 86030456 */  lh        $v1, 0x456($s0)
/* BD758 80127058 920604EE */  lbu       $a2, 0x4EE($s0)
/* BD75C 8012705C 920504EC */  lbu       $a1, 0x4EC($s0)
/* BD760 80127060 8604045C */  lh        $a0, 0x45C($s0)
/* BD764 80127064 44820000 */  mtc1      $v0, $f0
/* BD768 80127068 00000000 */  nop
/* BD76C 8012706C 46800021 */  cvt.d.w   $f0, $f0
/* BD770 80127070 00063040 */  sll       $a2, $a2, 1
/* BD774 80127074 02063021 */  addu      $a2, $s0, $a2
/* BD778 80127078 00052840 */  sll       $a1, $a1, 1
/* BD77C 8012707C 02052821 */  addu      $a1, $s0, $a1
/* BD780 80127080 46220000 */  add.d     $f0, $f0, $f2
/* BD784 80127084 3C014018 */  lui       $at, (0x40180000 >> 16)
/* BD788 80127088 44811800 */  mtc1      $at, $f3
/* BD78C 8012708C 44801000 */  mtc1      $zero, $f2
/* BD790 80127090 8602045A */  lh        $v0, 0x45A($s0)
/* BD794 80127094 94C704D0 */  lhu       $a3, 0x4D0($a2)
/* BD798 80127098 00621821 */  addu      $v1, $v1, $v0
/* BD79C 8012709C 00673821 */  addu      $a3, $v1, $a3
/* BD7A0 801270A0 94A204D0 */  lhu       $v0, 0x4D0($a1)
/* BD7A4 801270A4 46200020 */  cvt.s.d   $f0, $f0
/* BD7A8 801270A8 46000021 */  cvt.d.s   $f0, $f0
/* BD7AC 801270AC 46220003 */  div.d     $f0, $f0, $f2
/* BD7B0 801270B0 46200020 */  cvt.s.d   $f0, $f0
/* BD7B4 801270B4 00621821 */  addu      $v1, $v1, $v0
/* BD7B8 801270B8 00671823 */  subu      $v1, $v1, $a3
/* BD7BC 801270BC 44833000 */  mtc1      $v1, $f6
/* BD7C0 801270C0 00000000 */  nop
/* BD7C4 801270C4 468031A0 */  cvt.s.w   $f6, $f6
/* BD7C8 801270C8 46003182 */  mul.s     $f6, $f6, $f0
/* BD7CC 801270CC 00000000 */  nop
/* BD7D0 801270D0 86020458 */  lh        $v0, 0x458($s0)
/* BD7D4 801270D4 94C304DC */  lhu       $v1, 0x4DC($a2)
/* BD7D8 801270D8 00441021 */  addu      $v0, $v0, $a0
/* BD7DC 801270DC 94A404DC */  lhu       $a0, 0x4DC($a1)
/* BD7E0 801270E0 00431821 */  addu      $v1, $v0, $v1
/* BD7E4 801270E4 00441021 */  addu      $v0, $v0, $a0
/* BD7E8 801270E8 00431023 */  subu      $v0, $v0, $v1
/* BD7EC 801270EC 44822000 */  mtc1      $v0, $f4
/* BD7F0 801270F0 00000000 */  nop
/* BD7F4 801270F4 46802120 */  cvt.s.w   $f4, $f4
/* BD7F8 801270F8 46002102 */  mul.s     $f4, $f4, $f0
/* BD7FC 801270FC 00000000 */  nop
/* BD800 80127100 44871000 */  mtc1      $a3, $f2
/* BD804 80127104 00000000 */  nop
/* BD808 80127108 468010A0 */  cvt.s.w   $f2, $f2
/* BD80C 8012710C 46061080 */  add.s     $f2, $f2, $f6
/* BD810 80127110 44830000 */  mtc1      $v1, $f0
/* BD814 80127114 00000000 */  nop
/* BD818 80127118 46800020 */  cvt.s.w   $f0, $f0
/* BD81C 8012711C 46040000 */  add.s     $f0, $f0, $f4
/* BD820 80127120 4600120D */  trunc.w.s $f8, $f2
/* BD824 80127124 44144000 */  mfc1      $s4, $f8
/* BD828 80127128 4600020D */  trunc.w.s $f8, $f0
/* BD82C 8012712C 44154000 */  mfc1      $s5, $f8
.L80127130:
/* BD830 80127130 00082080 */  sll       $a0, $t0, 2
/* BD834 80127134 00882021 */  addu      $a0, $a0, $t0
/* BD838 80127138 00042080 */  sll       $a0, $a0, 2
/* BD83C 8012713C 00882023 */  subu      $a0, $a0, $t0
/* BD840 80127140 00042040 */  sll       $a0, $a0, 1
/* BD844 80127144 2484010E */  addiu     $a0, $a0, 0x10E
/* BD848 80127148 00042400 */  sll       $a0, $a0, 16
/* BD84C 8012714C 0C00A4F5 */  jal       cosine
/* BD850 80127150 00042403 */   sra      $a0, $a0, 16
/* BD854 80127154 3C013FF0 */  lui       $at, (0x3FF00000 >> 16)
/* BD858 80127158 44811800 */  mtc1      $at, $f3
/* BD85C 8012715C 44801000 */  mtc1      $zero, $f2
/* BD860 80127160 46000021 */  cvt.d.s   $f0, $f0
/* BD864 80127164 46220000 */  add.d     $f0, $f0, $f2
/* BD868 80127168 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* BD86C 8012716C 44811800 */  mtc1      $at, $f3
/* BD870 80127170 44801000 */  mtc1      $zero, $f2
/* BD874 80127174 00000000 */  nop
/* BD878 80127178 46220002 */  mul.d     $f0, $f0, $f2
/* BD87C 8012717C 00000000 */  nop
/* BD880 80127180 3C018015 */  lui       $at, %hi(D_80150718)
/* BD884 80127184 D4220718 */  ldc1      $f2, %lo(D_80150718)($at)
/* BD888 80127188 46220002 */  mul.d     $f0, $f0, $f2
/* BD88C 8012718C 00000000 */  nop
/* BD890 80127190 26B50001 */  addiu     $s5, $s5, 0x1
/* BD894 80127194 8E0204FC */  lw        $v0, 0x4FC($s0)
/* BD898 80127198 44941000 */  mtc1      $s4, $f2
/* BD89C 8012719C 00000000 */  nop
/* BD8A0 801271A0 468010A1 */  cvt.d.w   $f2, $f2
/* BD8A4 801271A4 46201080 */  add.d     $f2, $f2, $f0
/* BD8A8 801271A8 3C030002 */  lui       $v1, (0x20000 >> 16)
/* BD8AC 801271AC 00431024 */  and       $v0, $v0, $v1
/* BD8B0 801271B0 4620120D */  trunc.w.d $f8, $f2
/* BD8B4 801271B4 44144000 */  mfc1      $s4, $f8
/* BD8B8 801271B8 1040003E */  beqz      $v0, .L801272B4
/* BD8BC 801271BC 2694FFFE */   addiu    $s4, $s4, -0x2
/* BD8C0 801271C0 92020512 */  lbu       $v0, 0x512($s0)
/* BD8C4 801271C4 3C014047 */  lui       $at, (0x40470000 >> 16)
/* BD8C8 801271C8 44811800 */  mtc1      $at, $f3
/* BD8CC 801271CC 44801000 */  mtc1      $zero, $f2
/* BD8D0 801271D0 44820000 */  mtc1      $v0, $f0
/* BD8D4 801271D4 00000000 */  nop
/* BD8D8 801271D8 46800021 */  cvt.d.w   $f0, $f0
/* BD8DC 801271DC 46220002 */  mul.d     $f0, $f0, $f2
/* BD8E0 801271E0 00000000 */  nop
/* BD8E4 801271E4 3C018015 */  lui       $at, %hi(D_80150720)
/* BD8E8 801271E8 D4220720 */  ldc1      $f2, %lo(D_80150720)($at)
/* BD8EC 801271EC 46201001 */  sub.d     $f0, $f2, $f0
/* BD8F0 801271F0 3C0141E0 */  lui       $at, (0x41E00000 >> 16)
/* BD8F4 801271F4 44811800 */  mtc1      $at, $f3
/* BD8F8 801271F8 44801000 */  mtc1      $zero, $f2
/* BD8FC 801271FC 00000000 */  nop
/* BD900 80127200 4620103E */  c.le.d    $f2, $f0
/* BD904 80127204 00000000 */  nop
/* BD908 80127208 45030005 */  bc1tl     .L80127220
/* BD90C 8012720C 46220001 */   sub.d    $f0, $f0, $f2
/* BD910 80127210 4620020D */  trunc.w.d $f8, $f0
/* BD914 80127214 44034000 */  mfc1      $v1, $f8
/* BD918 80127218 08049C8D */  j         .L80127234
/* BD91C 8012721C 00000000 */   nop
.L80127220:
/* BD920 80127220 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* BD924 80127224 4620020D */  trunc.w.d $f8, $f0
/* BD928 80127228 44034000 */  mfc1      $v1, $f8
/* BD92C 8012722C 00000000 */  nop
/* BD930 80127230 00621825 */  or        $v1, $v1, $v0
.L80127234:
/* BD934 80127234 92020512 */  lbu       $v0, 0x512($s0)
/* BD938 80127238 3C018015 */  lui       $at, %hi(D_80150728)
/* BD93C 8012723C D4220728 */  ldc1      $f2, %lo(D_80150728)($at)
/* BD940 80127240 44820000 */  mtc1      $v0, $f0
/* BD944 80127244 00000000 */  nop
/* BD948 80127248 46800021 */  cvt.d.w   $f0, $f0
/* BD94C 8012724C 46220002 */  mul.d     $f0, $f0, $f2
/* BD950 80127250 00000000 */  nop
/* BD954 80127254 3C014052 */  lui       $at, (0x40520000 >> 16)
/* BD958 80127258 44811800 */  mtc1      $at, $f3
/* BD95C 8012725C 44801000 */  mtc1      $zero, $f2
/* BD960 80127260 00000000 */  nop
/* BD964 80127264 46201001 */  sub.d     $f0, $f2, $f0
/* BD968 80127268 3C0141E0 */  lui       $at, (0x41E00000 >> 16)
/* BD96C 8012726C 44811800 */  mtc1      $at, $f3
/* BD970 80127270 44801000 */  mtc1      $zero, $f2
/* BD974 80127274 00000000 */  nop
/* BD978 80127278 4620103E */  c.le.d    $f2, $f0
/* BD97C 8012727C 00000000 */  nop
/* BD980 80127280 45010005 */  bc1t      .L80127298
/* BD984 80127284 0060B82D */   daddu    $s7, $v1, $zero
/* BD988 80127288 4620020D */  trunc.w.d $f8, $f0
/* BD98C 8012728C 44034000 */  mfc1      $v1, $f8
/* BD990 80127290 08049CAD */  j         .L801272B4
/* BD994 80127294 0060B02D */   daddu    $s6, $v1, $zero
.L80127298:
/* BD998 80127298 46220001 */  sub.d     $f0, $f0, $f2
/* BD99C 8012729C 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* BD9A0 801272A0 4620020D */  trunc.w.d $f8, $f0
/* BD9A4 801272A4 44034000 */  mfc1      $v1, $f8
/* BD9A8 801272A8 00000000 */  nop
/* BD9AC 801272AC 00621825 */  or        $v1, $v1, $v0
/* BD9B0 801272B0 0060B02D */  daddu     $s6, $v1, $zero
.L801272B4:
/* BD9B4 801272B4 3C0AE300 */  lui       $t2, (0xE3001001 >> 16)
/* BD9B8 801272B8 354A1001 */  ori       $t2, $t2, (0xE3001001 & 0xFFFF)
/* BD9BC 801272BC 3C0BF500 */  lui       $t3, (0xF5000100 >> 16)
/* BD9C0 801272C0 356B0100 */  ori       $t3, $t3, (0xF5000100 & 0xFFFF)
/* BD9C4 801272C4 3C0C0703 */  lui       $t4, (0x703C000 >> 16)
/* BD9C8 801272C8 358CC000 */  ori       $t4, $t4, (0x703C000 & 0xFFFF)
/* BD9CC 801272CC 3C0FE200 */  lui       $t7, (0xE200001C >> 16)
/* BD9D0 801272D0 35EF001C */  ori       $t7, $t7, (0xE200001C & 0xFFFF)
/* BD9D4 801272D4 3C0D0050 */  lui       $t5, (0x504240 >> 16)
/* BD9D8 801272D8 35AD4240 */  ori       $t5, $t5, (0x504240 & 0xFFFF)
/* BD9DC 801272DC 3C10FCFF */  lui       $s0, (0xFCFF97FF >> 16)
/* BD9E0 801272E0 361097FF */  ori       $s0, $s0, (0xFCFF97FF & 0xFFFF)
/* BD9E4 801272E4 3C0EFF2D */  lui       $t6, (0xFF2DFEFF >> 16)
/* BD9E8 801272E8 35CEFEFF */  ori       $t6, $t6, (0xFF2DFEFF & 0xFFFF)
/* BD9EC 801272EC 3C132828 */  lui       $s3, (0x28282800 >> 16)
/* BD9F0 801272F0 36732800 */  ori       $s3, $s3, (0x28282800 & 0xFFFF)
/* BD9F4 801272F4 3C128010 */  lui       $s2, %hi(ui_point_right_png)
/* BD9F8 801272F8 2652BB60 */  addiu     $s2, $s2, %lo(ui_point_right_png)
/* BD9FC 801272FC 0240202D */  daddu     $a0, $s2, $zero
/* BDA00 80127300 24050010 */  addiu     $a1, $zero, 0x10
/* BDA04 80127304 00A0302D */  daddu     $a2, $a1, $zero
/* BDA08 80127308 3C08800A */  lui       $t0, %hi(gMainGfxPos)
/* BDA0C 8012730C 2508A66C */  addiu     $t0, $t0, %lo(gMainGfxPos)
/* BDA10 80127310 24070002 */  addiu     $a3, $zero, 0x2
/* BDA14 80127314 3C09E700 */  lui       $t1, (0xE7000000 >> 16)
/* BDA18 80127318 8D030000 */  lw        $v1, 0x0($t0)
/* BDA1C 8012731C 3C118010 */  lui       $s1, %hi(ui_point_right_pal)
/* BDA20 80127320 2631BBE0 */  addiu     $s1, $s1, %lo(ui_point_right_pal)
/* BDA24 80127324 0060102D */  daddu     $v0, $v1, $zero
/* BDA28 80127328 24630008 */  addiu     $v1, $v1, 0x8
/* BDA2C 8012732C AD030000 */  sw        $v1, 0x0($t0)
/* BDA30 80127330 AC490000 */  sw        $t1, 0x0($v0)
/* BDA34 80127334 AC400004 */  sw        $zero, 0x4($v0)
/* BDA38 80127338 24620008 */  addiu     $v0, $v1, 0x8
/* BDA3C 8012733C AD020000 */  sw        $v0, 0x0($t0)
/* BDA40 80127340 34028000 */  ori       $v0, $zero, 0x8000
/* BDA44 80127344 AC620004 */  sw        $v0, 0x4($v1)
/* BDA48 80127348 00651021 */  addu      $v0, $v1, $a1
/* BDA4C 8012734C AC6A0000 */  sw        $t2, 0x0($v1)
/* BDA50 80127350 AD020000 */  sw        $v0, 0x0($t0)
/* BDA54 80127354 3C02FD10 */  lui       $v0, (0xFD100000 >> 16)
/* BDA58 80127358 AC620008 */  sw        $v0, 0x8($v1)
/* BDA5C 8012735C 24620018 */  addiu     $v0, $v1, 0x18
/* BDA60 80127360 AC71000C */  sw        $s1, 0xC($v1)
/* BDA64 80127364 AD020000 */  sw        $v0, 0x0($t0)
/* BDA68 80127368 3C02E800 */  lui       $v0, (0xE8000000 >> 16)
/* BDA6C 8012736C AC620010 */  sw        $v0, 0x10($v1)
/* BDA70 80127370 24620020 */  addiu     $v0, $v1, 0x20
/* BDA74 80127374 AC600014 */  sw        $zero, 0x14($v1)
/* BDA78 80127378 AD020000 */  sw        $v0, 0x0($t0)
/* BDA7C 8012737C 3C020700 */  lui       $v0, (0x7000000 >> 16)
/* BDA80 80127380 AC62001C */  sw        $v0, 0x1C($v1)
/* BDA84 80127384 24620028 */  addiu     $v0, $v1, 0x28
/* BDA88 80127388 AC6B0018 */  sw        $t3, 0x18($v1)
/* BDA8C 8012738C AD020000 */  sw        $v0, 0x0($t0)
/* BDA90 80127390 3C02E600 */  lui       $v0, (0xE6000000 >> 16)
/* BDA94 80127394 AC620020 */  sw        $v0, 0x20($v1)
/* BDA98 80127398 24620030 */  addiu     $v0, $v1, 0x30
/* BDA9C 8012739C AC600024 */  sw        $zero, 0x24($v1)
/* BDAA0 801273A0 AD020000 */  sw        $v0, 0x0($t0)
/* BDAA4 801273A4 3C02F000 */  lui       $v0, (0xF0000000 >> 16)
/* BDAA8 801273A8 AC620028 */  sw        $v0, 0x28($v1)
/* BDAAC 801273AC 24620038 */  addiu     $v0, $v1, 0x38
/* BDAB0 801273B0 AC6C002C */  sw        $t4, 0x2C($v1)
/* BDAB4 801273B4 AD020000 */  sw        $v0, 0x0($t0)
/* BDAB8 801273B8 24620040 */  addiu     $v0, $v1, 0x40
/* BDABC 801273BC AC690030 */  sw        $t1, 0x30($v1)
/* BDAC0 801273C0 AC600034 */  sw        $zero, 0x34($v1)
/* BDAC4 801273C4 AD020000 */  sw        $v0, 0x0($t0)
/* BDAC8 801273C8 24620048 */  addiu     $v0, $v1, 0x48
/* BDACC 801273CC AC6F0038 */  sw        $t7, 0x38($v1)
/* BDAD0 801273D0 AC6D003C */  sw        $t5, 0x3C($v1)
/* BDAD4 801273D4 AD020000 */  sw        $v0, 0x0($t0)
/* BDAD8 801273D8 24620050 */  addiu     $v0, $v1, 0x50
/* BDADC 801273DC AC700040 */  sw        $s0, 0x40($v1)
/* BDAE0 801273E0 AC6E0044 */  sw        $t6, 0x44($v1)
/* BDAE4 801273E4 AD020000 */  sw        $v0, 0x0($t0)
/* BDAE8 801273E8 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* BDAEC 801273EC AC620048 */  sw        $v0, 0x48($v1)
/* BDAF0 801273F0 32C200FF */  andi      $v0, $s6, 0xFF
/* BDAF4 801273F4 00531025 */  or        $v0, $v0, $s3
/* BDAF8 801273F8 AC62004C */  sw        $v0, 0x4C($v1)
/* BDAFC 801273FC 02871021 */  addu      $v0, $s4, $a3
/* BDB00 80127400 00A21004 */  sllv      $v0, $v0, $a1
/* BDB04 80127404 00A21007 */  srav      $v0, $v0, $a1
/* BDB08 80127408 AFA20014 */  sw        $v0, 0x14($sp)
/* BDB0C 8012740C 02A71021 */  addu      $v0, $s5, $a3
/* BDB10 80127410 00A21004 */  sllv      $v0, $v0, $a1
/* BDB14 80127414 00A21007 */  srav      $v0, $v0, $a1
/* BDB18 80127418 AFA20018 */  sw        $v0, 0x18($sp)
/* BDB1C 8012741C 2402000A */  addiu     $v0, $zero, 0xA
/* BDB20 80127420 2410012C */  addiu     $s0, $zero, 0x12C
/* BDB24 80127424 AFA2001C */  sw        $v0, 0x1C($sp)
/* BDB28 80127428 AFA20020 */  sw        $v0, 0x20($sp)
/* BDB2C 8012742C 240200DC */  addiu     $v0, $zero, 0xDC
/* BDB30 80127430 AFA00010 */  sw        $zero, 0x10($sp)
/* BDB34 80127434 AFB00024 */  sw        $s0, 0x24($sp)
/* BDB38 80127438 0C04BB25 */  jal       draw_image_with_clipping
/* BDB3C 8012743C AFA20028 */   sw       $v0, 0x28($sp)
/* BDB40 80127440 0240202D */  daddu     $a0, $s2, $zero
/* BDB44 80127444 24050010 */  addiu     $a1, $zero, 0x10
/* BDB48 80127448 00A0302D */  daddu     $a2, $a1, $zero
/* BDB4C 8012744C 24070002 */  addiu     $a3, $zero, 0x2
/* BDB50 80127450 00B41004 */  sllv      $v0, $s4, $a1
/* BDB54 80127454 00A21007 */  srav      $v0, $v0, $a1
/* BDB58 80127458 AFA20018 */  sw        $v0, 0x18($sp)
/* BDB5C 8012745C 00B51004 */  sllv      $v0, $s5, $a1
/* BDB60 80127460 00A21007 */  srav      $v0, $v0, $a1
/* BDB64 80127464 AFA2001C */  sw        $v0, 0x1C($sp)
/* BDB68 80127468 24020014 */  addiu     $v0, $zero, 0x14
/* BDB6C 8012746C AFA20020 */  sw        $v0, 0x20($sp)
/* BDB70 80127470 AFA20024 */  sw        $v0, 0x24($sp)
/* BDB74 80127474 240200C8 */  addiu     $v0, $zero, 0xC8
/* BDB78 80127478 AFA2002C */  sw        $v0, 0x2C($sp)
/* BDB7C 8012747C 32E200FF */  andi      $v0, $s7, 0xFF
/* BDB80 80127480 AFA00010 */  sw        $zero, 0x10($sp)
/* BDB84 80127484 AFB10014 */  sw        $s1, 0x14($sp)
/* BDB88 80127488 AFB00028 */  sw        $s0, 0x28($sp)
/* BDB8C 8012748C 0C04BA68 */  jal       draw_ci_image_with_clipping
/* BDB90 80127490 AFA20030 */   sw       $v0, 0x30($sp)
/* BDB94 80127494 8FBF0058 */  lw        $ra, 0x58($sp)
/* BDB98 80127498 8FB70054 */  lw        $s7, 0x54($sp)
/* BDB9C 8012749C 8FB60050 */  lw        $s6, 0x50($sp)
/* BDBA0 801274A0 8FB5004C */  lw        $s5, 0x4C($sp)
/* BDBA4 801274A4 8FB40048 */  lw        $s4, 0x48($sp)
/* BDBA8 801274A8 8FB30044 */  lw        $s3, 0x44($sp)
/* BDBAC 801274AC 8FB20040 */  lw        $s2, 0x40($sp)
/* BDBB0 801274B0 8FB1003C */  lw        $s1, 0x3C($sp)
/* BDBB4 801274B4 8FB00038 */  lw        $s0, 0x38($sp)
/* BDBB8 801274B8 03E00008 */  jr        $ra
/* BDBBC 801274BC 27BD0060 */   addiu    $sp, $sp, 0x60

### DECOMPILED C INSTRUCTIONS:

void msg_draw_choice_pointer(MessagePrintState* printer) {
    s32 pointerAlpha = 255;
    s32 shadowAlpha = 72;
    s32 posInterpPhase = gGameStatusPtr->frameCounter % 360;
    s32 posX, posY;

    if (printer->windowState == MSG_WINDOW_STATE_WAITING_FOR_CHOICE || (printer->stateFlags & MSG_STATE_FLAG_20000)) {
        posX = printer->windowOffsetPos.x + printer->windowBasePos.x + printer->cursorPosX[printer->selectedOption];
        posY = printer->windowOffsetPos.y + printer->windowBasePos.y + printer->cursorPosY[printer->selectedOption];
    } else {
        s32 baseX, baseY, targetX, targetY;
        f32 moveToTargetAlpha = (f32)(printer->scrollingTime + 1.0) / 6.0;

        baseX = printer->windowOffsetPos.x + printer->windowBasePos.x + printer->cursorPosX[printer->selectedOption];
        targetX = printer->windowOffsetPos.x + printer->windowBasePos.x + printer->cursorPosX[printer->targetOption];
        posX = baseX + (targetX - baseX) * moveToTargetAlpha;

        baseY = printer->windowOffsetPos.y + printer->windowBasePos.y + printer->cursorPosY[printer->selectedOption];
        targetY = printer->windowOffsetPos.y + printer->windowBasePos.y + printer->cursorPosY[printer->targetOption];
        posY = baseY + (targetY - baseY) * moveToTargetAlpha;
    }

    posY += 1;
    posX += (cosine(posInterpPhase * 38 + 270) + 1.0) * 0.5 * 3.2;
    posX -= 2;

    if (printer->stateFlags & MSG_STATE_FLAG_20000) {
        u32 opacity;
        opacity = 255.0 - printer->fadeOutCounter * 46.0;
        pointerAlpha = opacity;
        opacity = 72.0 - printer->fadeOutCounter * 14.4;
        shadowAlpha = opacity;
    }

    gDPPipeSync(gMainGfxPos++);
    gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16);
    gDPLoadTLUT_pal16(gMainGfxPos++, 0, ui_point_right_pal);
    gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
    gDPSetCombineMode(gMainGfxPos++, PM_CC_07, PM_CC_07);
    gDPSetPrimColor(gMainGfxPos++, 0, 0, 40, 40, 40, shadowAlpha);
    draw_image_with_clipping(ui_point_right_png, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, posX + 2, posY + 2, 10, 10, 300, 220);
    draw_ci_image_with_clipping(ui_point_right_png, 16, 16, G_IM_FMT_CI, G_IM_SIZ_4b, ui_point_right_pal, posX, posY, 20, 20, 300, 200, pointerAlpha);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel imgfx_appendGfx_mesh_strip
/* D5004 8013E904 27BDFFD0 */  addiu     $sp, $sp, -0x30
/* D5008 8013E908 AFB40020 */  sw        $s4, 0x20($sp)
/* D500C 8013E90C 0080A02D */  daddu     $s4, $a0, $zero
/* D5010 8013E910 24050002 */  addiu     $a1, $zero, 0x2
/* D5014 8013E914 AFBF002C */  sw        $ra, 0x2C($sp)
/* D5018 8013E918 AFB60028 */  sw        $s6, 0x28($sp)
/* D501C 8013E91C AFB50024 */  sw        $s5, 0x24($sp)
/* D5020 8013E920 AFB3001C */  sw        $s3, 0x1C($sp)
/* D5024 8013E924 AFB20018 */  sw        $s2, 0x18($sp)
/* D5028 8013E928 AFB10014 */  sw        $s1, 0x14($sp)
/* D502C 8013E92C AFB00010 */  sw        $s0, 0x10($sp)
/* D5030 8013E930 8E93002C */  lw        $s3, 0x2C($s4)
/* D5034 8013E934 3C120001 */  lui       $s2, (0x11630 >> 16)
/* D5038 8013E938 96640008 */  lhu       $a0, 0x8($s3)
/* D503C 8013E93C 0C04BF84 */  jal       integer_log
/* D5040 8013E940 36521630 */   ori      $s2, $s2, (0x11630 & 0xFFFF)
/* D5044 8013E944 24050002 */  addiu     $a1, $zero, 0x2
/* D5048 8013E948 9664000A */  lhu       $a0, 0xA($s3)
/* D504C 8013E94C 0C04BF84 */  jal       integer_log
/* D5050 8013E950 0040B02D */   daddu    $s6, $v0, $zero
/* D5054 8013E954 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* D5058 8013E958 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* D505C 8013E95C 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* D5060 8013E960 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* D5064 8013E964 96040000 */  lhu       $a0, 0x0($s0)
/* D5068 8013E968 3C068015 */  lui       $a2, %hi(ImgFXCurrentTexturePtr)
/* D506C 8013E96C 8CC6EE10 */  lw        $a2, %lo(ImgFXCurrentTexturePtr)($a2)
/* D5070 8013E970 8E230000 */  lw        $v1, 0x0($s1)
/* D5074 8013E974 3C014059 */  lui       $at, (0x40590000 >> 16)
/* D5078 8013E978 44811800 */  mtc1      $at, $f3
/* D507C 8013E97C 44801000 */  mtc1      $zero, $f2
/* D5080 8013E980 3C073F80 */  lui       $a3, (0x3F800000 >> 16)
/* D5084 8013E984 00042180 */  sll       $a0, $a0, 6
/* D5088 8013E988 00922021 */  addu      $a0, $a0, $s2
/* D508C 8013E98C 00642021 */  addu      $a0, $v1, $a0
/* D5090 8013E990 94C50008 */  lhu       $a1, 0x8($a2)
/* D5094 8013E994 94C3000A */  lhu       $v1, 0xA($a2)
/* D5098 8013E998 44850000 */  mtc1      $a1, $f0
/* D509C 8013E99C 00000000 */  nop
/* D50A0 8013E9A0 46800020 */  cvt.s.w   $f0, $f0
/* D50A4 8013E9A4 46000021 */  cvt.d.s   $f0, $f0
/* D50A8 8013E9A8 46220003 */  div.d     $f0, $f0, $f2
/* D50AC 8013E9AC 46200020 */  cvt.s.d   $f0, $f0
/* D50B0 8013E9B0 44050000 */  mfc1      $a1, $f0
/* D50B4 8013E9B4 44830000 */  mtc1      $v1, $f0
/* D50B8 8013E9B8 00000000 */  nop
/* D50BC 8013E9BC 46800020 */  cvt.s.w   $f0, $f0
/* D50C0 8013E9C0 46000021 */  cvt.d.s   $f0, $f0
/* D50C4 8013E9C4 46220003 */  div.d     $f0, $f0, $f2
/* D50C8 8013E9C8 46200020 */  cvt.s.d   $f0, $f0
/* D50CC 8013E9CC 44060000 */  mfc1      $a2, $f0
/* D50D0 8013E9D0 0C019DC0 */  jal       guScale
/* D50D4 8013E9D4 0040A82D */   daddu    $s5, $v0, $zero
/* D50D8 8013E9D8 3C06E200 */  lui       $a2, (0xE200001C >> 16)
/* D50DC 8013E9DC 34C6001C */  ori       $a2, $a2, (0xE200001C & 0xFFFF)
/* D50E0 8013E9E0 3C050050 */  lui       $a1, (0x504E50 >> 16)
/* D50E4 8013E9E4 3C08800A */  lui       $t0, %hi(gMainGfxPos)
/* D50E8 8013E9E8 2508A66C */  addiu     $t0, $t0, %lo(gMainGfxPos)
/* D50EC 8013E9EC 8D070000 */  lw        $a3, 0x0($t0)
/* D50F0 8013E9F0 34A54E50 */  ori       $a1, $a1, (0x504E50 & 0xFFFF)
/* D50F4 8013E9F4 00E0202D */  daddu     $a0, $a3, $zero
/* D50F8 8013E9F8 24E70008 */  addiu     $a3, $a3, 0x8
/* D50FC 8013E9FC AD070000 */  sw        $a3, 0x0($t0)
/* D5100 8013EA00 96020000 */  lhu       $v0, 0x0($s0)
/* D5104 8013EA04 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* D5108 8013EA08 AC830000 */  sw        $v1, 0x0($a0)
/* D510C 8013EA0C 24430001 */  addiu     $v1, $v0, 0x1
/* D5110 8013EA10 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* D5114 8013EA14 00021180 */  sll       $v0, $v0, 6
/* D5118 8013EA18 A6030000 */  sh        $v1, 0x0($s0)
/* D511C 8013EA1C 8E230000 */  lw        $v1, 0x0($s1)
/* D5120 8013EA20 00521021 */  addu      $v0, $v0, $s2
/* D5124 8013EA24 00621821 */  addu      $v1, $v1, $v0
/* D5128 8013EA28 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* D512C 8013EA2C 00621821 */  addu      $v1, $v1, $v0
/* D5130 8013EA30 24E20008 */  addiu     $v0, $a3, 0x8
/* D5134 8013EA34 AC830004 */  sw        $v1, 0x4($a0)
/* D5138 8013EA38 AD020000 */  sw        $v0, 0x0($t0)
/* D513C 8013EA3C ACE60000 */  sw        $a2, 0x0($a3)
/* D5140 8013EA40 ACE50004 */  sw        $a1, 0x4($a3)
/* D5144 8013EA44 92830002 */  lbu       $v1, 0x2($s4)
/* D5148 8013EA48 2402000F */  addiu     $v0, $zero, 0xF
/* D514C 8013EA4C 14620010 */  bne       $v1, $v0, .L8013EA90
/* D5150 8013EA50 3C04FC12 */   lui      $a0, (0xFC121824 >> 16)
/* D5154 8013EA54 3C05FC12 */  lui       $a1, (0xFC121624 >> 16)
/* D5158 8013EA58 34A51624 */  ori       $a1, $a1, (0xFC121624 & 0xFFFF)
/* D515C 8013EA5C 3C04FF2F */  lui       $a0, (0xFF2FFFFF >> 16)
/* D5160 8013EA60 3484FFFF */  ori       $a0, $a0, (0xFF2FFFFF & 0xFFFF)
/* D5164 8013EA64 24E20010 */  addiu     $v0, $a3, 0x10
/* D5168 8013EA68 AD020000 */  sw        $v0, 0x0($t0)
/* D516C 8013EA6C 8E830030 */  lw        $v1, 0x30($s4)
/* D5170 8013EA70 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* D5174 8013EA74 ACE20008 */  sw        $v0, 0x8($a3)
/* D5178 8013EA78 24E20018 */  addiu     $v0, $a3, 0x18
/* D517C 8013EA7C AD020000 */  sw        $v0, 0x0($t0)
/* D5180 8013EA80 ACE50010 */  sw        $a1, 0x10($a3)
/* D5184 8013EA84 ACE40014 */  sw        $a0, 0x14($a3)
/* D5188 8013EA88 0804FAAA */  j         .L8013EAA8
/* D518C 8013EA8C 306300FF */   andi     $v1, $v1, 0xFF
.L8013EA90:
/* D5190 8013EA90 34841824 */  ori       $a0, $a0, (0xFC121824 & 0xFFFF)
/* D5194 8013EA94 3C03FF33 */  lui       $v1, (0xFF33FFFF >> 16)
/* D5198 8013EA98 3463FFFF */  ori       $v1, $v1, (0xFF33FFFF & 0xFFFF)
/* D519C 8013EA9C 24E20010 */  addiu     $v0, $a3, 0x10
/* D51A0 8013EAA0 AD020000 */  sw        $v0, 0x0($t0)
/* D51A4 8013EAA4 ACE40008 */  sw        $a0, 0x8($a3)
.L8013EAA8:
/* D51A8 8013EAA8 ACE3000C */  sw        $v1, 0xC($a3)
/* D51AC 8013EAAC 3C02E300 */  lui       $v0, (0xE3001001 >> 16)
/* D51B0 8013EAB0 34421001 */  ori       $v0, $v0, (0xE3001001 & 0xFFFF)
/* D51B4 8013EAB4 3C05F500 */  lui       $a1, (0xF5000100 >> 16)
/* D51B8 8013EAB8 34A50100 */  ori       $a1, $a1, (0xF5000100 & 0xFFFF)
/* D51BC 8013EABC 3C060703 */  lui       $a2, (0x703C000 >> 16)
/* D51C0 8013EAC0 34C6C000 */  ori       $a2, $a2, (0x703C000 & 0xFFFF)
/* D51C4 8013EAC4 3C07800A */  lui       $a3, %hi(gMainGfxPos)
/* D51C8 8013EAC8 24E7A66C */  addiu     $a3, $a3, %lo(gMainGfxPos)
/* D51CC 8013EACC 3C0BF240 */  lui       $t3, (0xF2400400 >> 16)
/* D51D0 8013EAD0 3C080700 */  lui       $t0, (0x7000000 >> 16)
/* D51D4 8013EAD4 3C0AE600 */  lui       $t2, (0xE6000000 >> 16)
/* D51D8 8013EAD8 3C09E700 */  lui       $t1, (0xE7000000 >> 16)
/* D51DC 8013EADC 8CE40000 */  lw        $a0, 0x0($a3)
/* D51E0 8013EAE0 356B0400 */  ori       $t3, $t3, (0xF2400400 & 0xFFFF)
/* D51E4 8013EAE4 0080182D */  daddu     $v1, $a0, $zero
/* D51E8 8013EAE8 24840008 */  addiu     $a0, $a0, 0x8
/* D51EC 8013EAEC ACE40000 */  sw        $a0, 0x0($a3)
/* D51F0 8013EAF0 AC620000 */  sw        $v0, 0x0($v1)
/* D51F4 8013EAF4 34028000 */  ori       $v0, $zero, 0x8000
/* D51F8 8013EAF8 AC620004 */  sw        $v0, 0x4($v1)
/* D51FC 8013EAFC 24820008 */  addiu     $v0, $a0, 0x8
/* D5200 8013EB00 ACE20000 */  sw        $v0, 0x0($a3)
/* D5204 8013EB04 3C02FD10 */  lui       $v0, (0xFD100000 >> 16)
/* D5208 8013EB08 AC820000 */  sw        $v0, 0x0($a0)
/* D520C 8013EB0C 24820010 */  addiu     $v0, $a0, 0x10
/* D5210 8013EB10 ACE20000 */  sw        $v0, 0x0($a3)
/* D5214 8013EB14 8E630004 */  lw        $v1, 0x4($s3)
/* D5218 8013EB18 3C02E800 */  lui       $v0, (0xE8000000 >> 16)
/* D521C 8013EB1C AC820008 */  sw        $v0, 0x8($a0)
/* D5220 8013EB20 24820018 */  addiu     $v0, $a0, 0x18
/* D5224 8013EB24 AC80000C */  sw        $zero, 0xC($a0)
/* D5228 8013EB28 ACE20000 */  sw        $v0, 0x0($a3)
/* D522C 8013EB2C 24820020 */  addiu     $v0, $a0, 0x20
/* D5230 8013EB30 AC850010 */  sw        $a1, 0x10($a0)
/* D5234 8013EB34 AC880014 */  sw        $t0, 0x14($a0)
/* D5238 8013EB38 ACE20000 */  sw        $v0, 0x0($a3)
/* D523C 8013EB3C 24820028 */  addiu     $v0, $a0, 0x28
/* D5240 8013EB40 AC8A0018 */  sw        $t2, 0x18($a0)
/* D5244 8013EB44 AC80001C */  sw        $zero, 0x1C($a0)
/* D5248 8013EB48 ACE20000 */  sw        $v0, 0x0($a3)
/* D524C 8013EB4C 3C02F000 */  lui       $v0, (0xF0000000 >> 16)
/* D5250 8013EB50 AC820020 */  sw        $v0, 0x20($a0)
/* D5254 8013EB54 24820030 */  addiu     $v0, $a0, 0x30
/* D5258 8013EB58 AC860024 */  sw        $a2, 0x24($a0)
/* D525C 8013EB5C ACE20000 */  sw        $v0, 0x0($a3)
/* D5260 8013EB60 24820038 */  addiu     $v0, $a0, 0x38
/* D5264 8013EB64 32A5000F */  andi      $a1, $s5, 0xF
/* D5268 8013EB68 00052B80 */  sll       $a1, $a1, 14
/* D526C 8013EB6C 32C6000F */  andi      $a2, $s6, 0xF
/* D5270 8013EB70 00063100 */  sll       $a2, $a2, 4
/* D5274 8013EB74 AC890028 */  sw        $t1, 0x28($a0)
/* D5278 8013EB78 AC80002C */  sw        $zero, 0x2C($a0)
/* D527C 8013EB7C ACE20000 */  sw        $v0, 0x0($a3)
/* D5280 8013EB80 AC830004 */  sw        $v1, 0x4($a0)
/* D5284 8013EB84 96620008 */  lhu       $v0, 0x8($s3)
/* D5288 8013EB88 24830040 */  addiu     $v1, $a0, 0x40
/* D528C 8013EB8C ACE30000 */  sw        $v1, 0x0($a3)
/* D5290 8013EB90 3C03FD48 */  lui       $v1, (0xFD480000 >> 16)
/* D5294 8013EB94 00021042 */  srl       $v0, $v0, 1
/* D5298 8013EB98 2442FFFF */  addiu     $v0, $v0, -0x1
/* D529C 8013EB9C 30420FFF */  andi      $v0, $v0, 0xFFF
/* D52A0 8013EBA0 00431025 */  or        $v0, $v0, $v1
/* D52A4 8013EBA4 AC820030 */  sw        $v0, 0x30($a0)
/* D52A8 8013EBA8 8E630000 */  lw        $v1, 0x0($s3)
/* D52AC 8013EBAC 24820048 */  addiu     $v0, $a0, 0x48
/* D52B0 8013EBB0 ACE20000 */  sw        $v0, 0x0($a3)
/* D52B4 8013EBB4 AC830034 */  sw        $v1, 0x34($a0)
/* D52B8 8013EBB8 00C81825 */  or        $v1, $a2, $t0
/* D52BC 8013EBBC 96620008 */  lhu       $v0, 0x8($s3)
/* D52C0 8013EBC0 00A31825 */  or        $v1, $a1, $v1
/* D52C4 8013EBC4 AC83003C */  sw        $v1, 0x3C($a0)
/* D52C8 8013EBC8 3C03F548 */  lui       $v1, (0xF5480000 >> 16)
/* D52CC 8013EBCC 00021042 */  srl       $v0, $v0, 1
/* D52D0 8013EBD0 24420007 */  addiu     $v0, $v0, 0x7
/* D52D4 8013EBD4 000210C3 */  sra       $v0, $v0, 3
/* D52D8 8013EBD8 304201FF */  andi      $v0, $v0, 0x1FF
/* D52DC 8013EBDC 00021240 */  sll       $v0, $v0, 9
/* D52E0 8013EBE0 00431025 */  or        $v0, $v0, $v1
/* D52E4 8013EBE4 AC820038 */  sw        $v0, 0x38($a0)
/* D52E8 8013EBE8 3C02F400 */  lui       $v0, (0xF4000000 >> 16)
/* D52EC 8013EBEC AC8A0040 */  sw        $t2, 0x40($a0)
/* D52F0 8013EBF0 AC800044 */  sw        $zero, 0x44($a0)
/* D52F4 8013EBF4 AC820048 */  sw        $v0, 0x48($a0)
/* D52F8 8013EBF8 96620008 */  lhu       $v0, 0x8($s3)
/* D52FC 8013EBFC 9663000A */  lhu       $v1, 0xA($s3)
/* D5300 8013EC00 00A62825 */  or        $a1, $a1, $a2
/* D5304 8013EC04 AC890050 */  sw        $t1, 0x50($a0)
/* D5308 8013EC08 AC800054 */  sw        $zero, 0x54($a0)
/* D530C 8013EC0C 2442FFFF */  addiu     $v0, $v0, -0x1
/* D5310 8013EC10 00021040 */  sll       $v0, $v0, 1
/* D5314 8013EC14 30420FFF */  andi      $v0, $v0, 0xFFF
/* D5318 8013EC18 00021300 */  sll       $v0, $v0, 12
/* D531C 8013EC1C 2463FFFF */  addiu     $v1, $v1, -0x1
/* D5320 8013EC20 00031880 */  sll       $v1, $v1, 2
/* D5324 8013EC24 30630FFF */  andi      $v1, $v1, 0xFFF
/* D5328 8013EC28 00681825 */  or        $v1, $v1, $t0
/* D532C 8013EC2C 00431025 */  or        $v0, $v0, $v1
/* D5330 8013EC30 AC82004C */  sw        $v0, 0x4C($a0)
/* D5334 8013EC34 96620008 */  lhu       $v0, 0x8($s3)
/* D5338 8013EC38 3C03F540 */  lui       $v1, (0xF5400000 >> 16)
/* D533C 8013EC3C AC85005C */  sw        $a1, 0x5C($a0)
/* D5340 8013EC40 AC8B0060 */  sw        $t3, 0x60($a0)
/* D5344 8013EC44 00021042 */  srl       $v0, $v0, 1
/* D5348 8013EC48 24420007 */  addiu     $v0, $v0, 0x7
/* D534C 8013EC4C 000210C3 */  sra       $v0, $v0, 3
/* D5350 8013EC50 304201FF */  andi      $v0, $v0, 0x1FF
/* D5354 8013EC54 00021240 */  sll       $v0, $v0, 9
/* D5358 8013EC58 00431025 */  or        $v0, $v0, $v1
/* D535C 8013EC5C AC820058 */  sw        $v0, 0x58($a0)
/* D5360 8013EC60 96630008 */  lhu       $v1, 0x8($s3)
/* D5364 8013EC64 9662000A */  lhu       $v0, 0xA($s3)
/* D5368 8013EC68 246300FF */  addiu     $v1, $v1, 0xFF
/* D536C 8013EC6C 00031880 */  sll       $v1, $v1, 2
/* D5370 8013EC70 30630FFF */  andi      $v1, $v1, 0xFFF
/* D5374 8013EC74 00031B00 */  sll       $v1, $v1, 12
/* D5378 8013EC78 244200FF */  addiu     $v0, $v0, 0xFF
/* D537C 8013EC7C 00021080 */  sll       $v0, $v0, 2
/* D5380 8013EC80 30420FFF */  andi      $v0, $v0, 0xFFF
/* D5384 8013EC84 00621825 */  or        $v1, $v1, $v0
/* D5388 8013EC88 AC830064 */  sw        $v1, 0x64($a0)
/* D538C 8013EC8C C684004C */  lwc1      $f4, 0x4C($s4)
/* D5390 8013EC90 C6860050 */  lwc1      $f6, 0x50($s4)
/* D5394 8013EC94 96630008 */  lhu       $v1, 0x8($s3)
/* D5398 8013EC98 9662000A */  lhu       $v0, 0xA($s3)
/* D539C 8013EC9C 4600220D */  trunc.w.s $f8, $f4
/* D53A0 8013ECA0 44054000 */  mfc1      $a1, $f8
/* D53A4 8013ECA4 4600320D */  trunc.w.s $f8, $f6
/* D53A8 8013ECA8 44064000 */  mfc1      $a2, $f8
/* D53AC 8013ECAC 00031880 */  sll       $v1, $v1, 2
/* D53B0 8013ECB0 44831000 */  mtc1      $v1, $f2
/* D53B4 8013ECB4 00000000 */  nop
/* D53B8 8013ECB8 468010A0 */  cvt.s.w   $f2, $f2
/* D53BC 8013ECBC 00021080 */  sll       $v0, $v0, 2
/* D53C0 8013ECC0 44820000 */  mtc1      $v0, $f0
/* D53C4 8013ECC4 00000000 */  nop
/* D53C8 8013ECC8 46800020 */  cvt.s.w   $f0, $f0
/* D53CC 8013ECCC 30A50FFF */  andi      $a1, $a1, 0xFFF
/* D53D0 8013ECD0 00052B00 */  sll       $a1, $a1, 12
/* D53D4 8013ECD4 30C60FFF */  andi      $a2, $a2, 0xFFF
/* D53D8 8013ECD8 3C02F200 */  lui       $v0, (0xF2000000 >> 16)
/* D53DC 8013ECDC 46041080 */  add.s     $f2, $f2, $f4
/* D53E0 8013ECE0 00C23025 */  or        $a2, $a2, $v0
/* D53E4 8013ECE4 00A62825 */  or        $a1, $a1, $a2
/* D53E8 8013ECE8 46060000 */  add.s     $f0, $f0, $f6
/* D53EC 8013ECEC AC850068 */  sw        $a1, 0x68($a0)
/* D53F0 8013ECF0 4600120D */  trunc.w.s $f8, $f2
/* D53F4 8013ECF4 44024000 */  mfc1      $v0, $f8
/* D53F8 8013ECF8 4600020D */  trunc.w.s $f8, $f0
/* D53FC 8013ECFC 44034000 */  mfc1      $v1, $f8
/* D5400 8013ED00 30420FFF */  andi      $v0, $v0, 0xFFF
/* D5404 8013ED04 00021300 */  sll       $v0, $v0, 12
/* D5408 8013ED08 30630FFF */  andi      $v1, $v1, 0xFFF
/* D540C 8013ED0C 00431025 */  or        $v0, $v0, $v1
/* D5410 8013ED10 AC82006C */  sw        $v0, 0x6C($a0)
/* D5414 8013ED14 C662000C */  lwc1      $f2, 0xC($s3)
/* D5418 8013ED18 468010A0 */  cvt.s.w   $f2, $f2
/* D541C 8013ED1C C680004C */  lwc1      $f0, 0x4C($s4)
/* D5420 8013ED20 96620008 */  lhu       $v0, 0x8($s3)
/* D5424 8013ED24 46020000 */  add.s     $f0, $f0, $f2
/* D5428 8013ED28 00021080 */  sll       $v0, $v0, 2
/* D542C 8013ED2C 4600020D */  trunc.w.s $f8, $f0
/* D5430 8013ED30 44034000 */  mfc1      $v1, $f8
/* D5434 8013ED34 14400002 */  bnez      $v0, .L8013ED40
/* D5438 8013ED38 0062001A */   div      $zero, $v1, $v0
/* D543C 8013ED3C 0007000D */  break     7
.L8013ED40:
/* D5440 8013ED40 2401FFFF */  addiu     $at, $zero, -0x1
/* D5444 8013ED44 14410004 */  bne       $v0, $at, .L8013ED58
/* D5448 8013ED48 3C018000 */   lui      $at, (0x80000000 >> 16)
/* D544C 8013ED4C 14610002 */  bne       $v1, $at, .L8013ED58
/* D5450 8013ED50 00000000 */   nop
/* D5454 8013ED54 0006000D */  break     6
.L8013ED58:
/* D5458 8013ED58 00001010 */  mfhi      $v0
/* D545C 8013ED5C 44820000 */  mtc1      $v0, $f0
/* D5460 8013ED60 00000000 */  nop
/* D5464 8013ED64 46800020 */  cvt.s.w   $f0, $f0
/* D5468 8013ED68 E680004C */  swc1      $f0, 0x4C($s4)
/* D546C 8013ED6C C6620010 */  lwc1      $f2, 0x10($s3)
/* D5470 8013ED70 468010A0 */  cvt.s.w   $f2, $f2
/* D5474 8013ED74 C6800050 */  lwc1      $f0, 0x50($s4)
/* D5478 8013ED78 9662000A */  lhu       $v0, 0xA($s3)
/* D547C 8013ED7C 46020000 */  add.s     $f0, $f0, $f2
/* D5480 8013ED80 00021080 */  sll       $v0, $v0, 2
/* D5484 8013ED84 4600020D */  trunc.w.s $f8, $f0
/* D5488 8013ED88 44034000 */  mfc1      $v1, $f8
/* D548C 8013ED8C 14400002 */  bnez      $v0, .L8013ED98
/* D5490 8013ED90 0062001A */   div      $zero, $v1, $v0
/* D5494 8013ED94 0007000D */  break     7
.L8013ED98:
/* D5498 8013ED98 2401FFFF */  addiu     $at, $zero, -0x1
/* D549C 8013ED9C 14410004 */  bne       $v0, $at, .L8013EDB0
/* D54A0 8013EDA0 3C018000 */   lui      $at, (0x80000000 >> 16)
/* D54A4 8013EDA4 14610002 */  bne       $v1, $at, .L8013EDB0
/* D54A8 8013EDA8 00000000 */   nop
/* D54AC 8013EDAC 0006000D */  break     6
.L8013EDB0:
/* D54B0 8013EDB0 00002810 */  mfhi      $a1
/* D54B4 8013EDB4 3C06D838 */  lui       $a2, (0xD8380002 >> 16)
/* D54B8 8013EDB8 34C60002 */  ori       $a2, $a2, (0xD8380002 & 0xFFFF)
/* D54BC 8013EDBC 24820050 */  addiu     $v0, $a0, 0x50
/* D54C0 8013EDC0 ACE20000 */  sw        $v0, 0x0($a3)
/* D54C4 8013EDC4 24820058 */  addiu     $v0, $a0, 0x58
/* D54C8 8013EDC8 ACE20000 */  sw        $v0, 0x0($a3)
/* D54CC 8013EDCC 24820060 */  addiu     $v0, $a0, 0x60
/* D54D0 8013EDD0 ACE20000 */  sw        $v0, 0x0($a3)
/* D54D4 8013EDD4 24820068 */  addiu     $v0, $a0, 0x68
/* D54D8 8013EDD8 ACE20000 */  sw        $v0, 0x0($a3)
/* D54DC 8013EDDC 24820070 */  addiu     $v0, $a0, 0x70
/* D54E0 8013EDE0 ACE20000 */  sw        $v0, 0x0($a3)
/* D54E4 8013EDE4 24820078 */  addiu     $v0, $a0, 0x78
/* D54E8 8013EDE8 44850000 */  mtc1      $a1, $f0
/* D54EC 8013EDEC 00000000 */  nop
/* D54F0 8013EDF0 46800020 */  cvt.s.w   $f0, $f0
/* D54F4 8013EDF4 E6800050 */  swc1      $f0, 0x50($s4)
/* D54F8 8013EDF8 ACE20000 */  sw        $v0, 0x0($a3)
/* D54FC 8013EDFC 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* D5500 8013EE00 AC820070 */  sw        $v0, 0x70($a0)
/* D5504 8013EE04 8E630014 */  lw        $v1, 0x14($s3)
/* D5508 8013EE08 24820080 */  addiu     $v0, $a0, 0x80
/* D550C 8013EE0C ACE20000 */  sw        $v0, 0x0($a3)
/* D5510 8013EE10 24020040 */  addiu     $v0, $zero, 0x40
/* D5514 8013EE14 AC860078 */  sw        $a2, 0x78($a0)
/* D5518 8013EE18 AC82007C */  sw        $v0, 0x7C($a0)
/* D551C 8013EE1C AC830074 */  sw        $v1, 0x74($a0)
/* D5520 8013EE20 8FBF002C */  lw        $ra, 0x2C($sp)
/* D5524 8013EE24 8FB60028 */  lw        $s6, 0x28($sp)
/* D5528 8013EE28 8FB50024 */  lw        $s5, 0x24($sp)
/* D552C 8013EE2C 8FB40020 */  lw        $s4, 0x20($sp)
/* D5530 8013EE30 8FB3001C */  lw        $s3, 0x1C($sp)
/* D5534 8013EE34 8FB20018 */  lw        $s2, 0x18($sp)
/* D5538 8013EE38 8FB10014 */  lw        $s1, 0x14($sp)
/* D553C 8013EE3C 8FB00010 */  lw        $s0, 0x10($sp)
/* D5540 8013EE40 03E00008 */  jr        $ra
/* D5544 8013EE44 27BD0030 */   addiu    $sp, $sp, 0x30

### DECOMPILED C INSTRUCTIONS:

void imgfx_appendGfx_mesh_strip(ImgFXState* state, Matrix4f mtx) {
    ImgFXOverlayTexture* ufs = state->ints.overlay.pattern;
    s32 shifts = integer_log(ufs->width, 2);
    s32 shiftt = integer_log(ufs->height, 2);
    s32 uls, ult;
    s32 lrs, lrt;

    guScale(&gDisplayContext->matrixStack[gMatrixListPos], (f32)ImgFXCurrentTexturePtr->tex.width / 100.0, (f32)ImgFXCurrentTexturePtr->tex.height / 100.0, 1.0f);
    gSPMatrix(gMainGfxPos++, VIRTUAL_TO_PHYSICAL(&gDisplayContext->matrixStack[gMatrixListPos++]), G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
    gDPSetRenderMode(gMainGfxPos++, G_RM_ZB_XLU_DECAL, G_RM_ZB_XLU_DECAL2);

    if (state->renderType == IMGFX_RENDER_OVERLAY_RGBA) {
        s32 alpha = state->ints.overlay.alpha;
        gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, alpha);
        gDPSetCombineMode(gMainGfxPos++, PM_CC_05, PM_CC_05);
    } else {
        gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA);
    }
    gDPSetTextureLUT(gMainGfxPos++, G_TT_RGBA16);
    gDPLoadTLUT_pal16(gMainGfxPos++, 0, ufs->palette);
    gDPScrollTextureTile_4b(gMainGfxPos++, ufs->raster, G_IM_FMT_CI, ufs->width, ufs->height,
                          0, 0, ufs->width - 1, ufs->height - 1, 0,
                          G_TX_WRAP, G_TX_WRAP, shifts, shiftt, G_TX_NOLOD, G_TX_NOLOD,
                          256, 256);

    uls = state->floats.overlay.posX;
    ult = state->floats.overlay.posY;
    lrs = ufs->width * 4 + state->floats.overlay.posX;
    lrt = ufs->height * 4 + state->floats.overlay.posY;
    gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, uls, ult, lrs, lrt);

    state->floats.overlay.posX = (s32)(state->floats.overlay.posX + ufs->offsetX) % (ufs->width * 4);
    state->floats.overlay.posY = (s32)(state->floats.overlay.posY + ufs->offsetY) % (ufs->height * 4);
    gSPDisplayList(gMainGfxPos++, ufs->displayList);
    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel mdl_project_tex_coords
/* B2A2C 8011C32C 27BDFF68 */  addiu     $sp, $sp, -0x98
/* B2A30 8011C330 AFB40058 */  sw        $s4, 0x58($sp)
/* B2A34 8011C334 00A0A02D */  daddu     $s4, $a1, $zero
/* B2A38 8011C338 AFB00048 */  sw        $s0, 0x48($sp)
/* B2A3C 8011C33C 00C0802D */  daddu     $s0, $a2, $zero
/* B2A40 8011C340 AFB5005C */  sw        $s5, 0x5C($sp)
/* B2A44 8011C344 00E0A82D */  daddu     $s5, $a3, $zero
/* B2A48 8011C348 AFBF0060 */  sw        $ra, 0x60($sp)
/* B2A4C 8011C34C AFB30054 */  sw        $s3, 0x54($sp)
/* B2A50 8011C350 AFB20050 */  sw        $s2, 0x50($sp)
/* B2A54 8011C354 AFB1004C */  sw        $s1, 0x4C($sp)
/* B2A58 8011C358 F7BE0090 */  sdc1      $f30, 0x90($sp)
/* B2A5C 8011C35C F7BC0088 */  sdc1      $f28, 0x88($sp)
/* B2A60 8011C360 F7BA0080 */  sdc1      $f26, 0x80($sp)
/* B2A64 8011C364 F7B80078 */  sdc1      $f24, 0x78($sp)
/* B2A68 8011C368 F7B60070 */  sdc1      $f22, 0x70($sp)
/* B2A6C 8011C36C F7B40068 */  sdc1      $f20, 0x68($sp)
/* B2A70 8011C370 0C046C04 */  jal       get_model_list_index_from_tree_index
/* B2A74 8011C374 3084FFFF */   andi     $a0, $a0, 0xFFFF
/* B2A78 8011C378 0C046B4C */  jal       get_model_from_list_index
/* B2A7C 8011C37C 0040202D */   daddu    $a0, $v0, $zero
/* B2A80 8011C380 8C420008 */  lw        $v0, 0x8($v0)
/* B2A84 8011C384 240600DF */  addiu     $a2, $zero, 0xDF
/* B2A88 8011C388 8C420004 */  lw        $v0, 0x4($v0)
/* B2A8C 8011C38C 24050001 */  addiu     $a1, $zero, 0x1
/* B2A90 8011C390 8C420000 */  lw        $v0, 0x0($v0)
.L8011C394:
/* B2A94 8011C394 90430000 */  lbu       $v1, 0x0($v0)
/* B2A98 8011C398 10660004 */  beq       $v1, $a2, .L8011C3AC
/* B2A9C 8011C39C 8C440004 */   lw       $a0, 0x4($v0)
/* B2AA0 8011C3A0 1465FFFC */  bne       $v1, $a1, .L8011C394
/* B2AA4 8011C3A4 24420008 */   addiu    $v0, $v0, 0x8
/* B2AA8 8011C3A8 AFA4001C */  sw        $a0, 0x1C($sp)
.L8011C3AC:
/* B2AAC 8011C3AC 8FA2001C */  lw        $v0, 0x1C($sp)
/* B2AB0 8011C3B0 84430000 */  lh        $v1, 0x0($v0)
/* B2AB4 8011C3B4 84440010 */  lh        $a0, 0x10($v0)
/* B2AB8 8011C3B8 44838000 */  mtc1      $v1, $f16
/* B2ABC 8011C3BC 00000000 */  nop
/* B2AC0 8011C3C0 46808420 */  cvt.s.w   $f16, $f16
/* B2AC4 8011C3C4 44842000 */  mtc1      $a0, $f4
/* B2AC8 8011C3C8 00000000 */  nop
/* B2ACC 8011C3CC 46802120 */  cvt.s.w   $f4, $f4
/* B2AD0 8011C3D0 46048032 */  c.eq.s    $f16, $f4
/* B2AD4 8011C3D4 84430004 */  lh        $v1, 0x4($v0)
/* B2AD8 8011C3D8 84440008 */  lh        $a0, 0x8($v0)
/* B2ADC 8011C3DC 44839000 */  mtc1      $v1, $f18
/* B2AE0 8011C3E0 00000000 */  nop
/* B2AE4 8011C3E4 468094A0 */  cvt.s.w   $f18, $f18
/* B2AE8 8011C3E8 4484A000 */  mtc1      $a0, $f20
/* B2AEC 8011C3EC 00000000 */  nop
/* B2AF0 8011C3F0 4680A520 */  cvt.s.w   $f20, $f20
/* B2AF4 8011C3F4 8443000A */  lh        $v1, 0xA($v0)
/* B2AF8 8011C3F8 84440014 */  lh        $a0, 0x14($v0)
/* B2AFC 8011C3FC 4483B000 */  mtc1      $v1, $f22
/* B2B00 8011C400 00000000 */  nop
/* B2B04 8011C404 4680B5A0 */  cvt.s.w   $f22, $f22
/* B2B08 8011C408 44845000 */  mtc1      $a0, $f10
/* B2B0C 8011C40C 00000000 */  nop
/* B2B10 8011C410 468052A0 */  cvt.s.w   $f10, $f10
/* B2B14 8011C414 E7B60038 */  swc1      $f22, 0x38($sp)
/* B2B18 8011C418 84430018 */  lh        $v1, 0x18($v0)
/* B2B1C 8011C41C 8444001A */  lh        $a0, 0x1A($v0)
/* B2B20 8011C420 44830000 */  mtc1      $v1, $f0
/* B2B24 8011C424 00000000 */  nop
/* B2B28 8011C428 46800020 */  cvt.s.w   $f0, $f0
/* B2B2C 8011C42C 4484E000 */  mtc1      $a0, $f28
/* B2B30 8011C430 00000000 */  nop
/* B2B34 8011C434 4680E720 */  cvt.s.w   $f28, $f28
/* B2B38 8011C438 E7BC0024 */  swc1      $f28, 0x24($sp)
/* B2B3C 8011C43C 84430020 */  lh        $v1, 0x20($v0)
/* B2B40 8011C440 84440024 */  lh        $a0, 0x24($v0)
/* B2B44 8011C444 4483C000 */  mtc1      $v1, $f24
/* B2B48 8011C448 00000000 */  nop
/* B2B4C 8011C44C 4680C620 */  cvt.s.w   $f24, $f24
/* B2B50 8011C450 44843000 */  mtc1      $a0, $f6
/* B2B54 8011C454 00000000 */  nop
/* B2B58 8011C458 468031A0 */  cvt.s.w   $f6, $f6
/* B2B5C 8011C45C 84430028 */  lh        $v1, 0x28($v0)
/* B2B60 8011C460 8444002A */  lh        $a0, 0x2A($v0)
/* B2B64 8011C464 4483D000 */  mtc1      $v1, $f26
/* B2B68 8011C468 00000000 */  nop
/* B2B6C 8011C46C 4680D6A0 */  cvt.s.w   $f26, $f26
/* B2B70 8011C470 4484B000 */  mtc1      $a0, $f22
/* B2B74 8011C474 00000000 */  nop
/* B2B78 8011C478 4680B5A0 */  cvt.s.w   $f22, $f22
/* B2B7C 8011C47C E7B60028 */  swc1      $f22, 0x28($sp)
/* B2B80 8011C480 9053000C */  lbu       $s3, 0xC($v0)
/* B2B84 8011C484 9052000D */  lbu       $s2, 0xD($v0)
/* B2B88 8011C488 9051000E */  lbu       $s1, 0xE($v0)
/* B2B8C 8011C48C 4503002E */  bc1tl     .L8011C548
/* B2B90 8011C490 46069081 */   sub.s    $f2, $f18, $f6
/* B2B94 8011C494 46188081 */  sub.s     $f2, $f16, $f24
/* B2B98 8011C498 46048381 */  sub.s     $f14, $f16, $f4
/* B2B9C 8011C49C 4600A201 */  sub.s     $f8, $f20, $f0
/* B2BA0 8011C4A0 460E1083 */  div.s     $f2, $f2, $f14
/* B2BA4 8011C4A4 46081002 */  mul.s     $f0, $f2, $f8
/* B2BA8 8011C4A8 00000000 */  nop
/* B2BAC 8011C4AC 460A9301 */  sub.s     $f12, $f18, $f10
/* B2BB0 8011C4B0 460C1282 */  mul.s     $f10, $f2, $f12
/* B2BB4 8011C4B4 00000000 */  nop
/* B2BB8 8011C4B8 461AA101 */  sub.s     $f4, $f20, $f26
/* B2BBC 8011C4BC 46069181 */  sub.s     $f6, $f18, $f6
/* B2BC0 8011C4C0 46040001 */  sub.s     $f0, $f0, $f4
/* B2BC4 8011C4C4 46065281 */  sub.s     $f10, $f10, $f6
/* B2BC8 8011C4C8 460A0003 */  div.s     $f0, $f0, $f10
/* B2BCC 8011C4CC E7A00040 */  swc1      $f0, 0x40($sp)
/* B2BD0 8011C4D0 46006002 */  mul.s     $f0, $f12, $f0
/* B2BD4 8011C4D4 00000000 */  nop
/* B2BD8 8011C4D8 C7B60038 */  lwc1      $f22, 0x38($sp)
/* B2BDC 8011C4DC 461CB101 */  sub.s     $f4, $f22, $f28
/* B2BE0 8011C4E0 46041082 */  mul.s     $f2, $f2, $f4
/* B2BE4 8011C4E4 00000000 */  nop
/* B2BE8 8011C4E8 46004201 */  sub.s     $f8, $f8, $f0
/* B2BEC 8011C4EC 460E4783 */  div.s     $f30, $f8, $f14
/* B2BF0 8011C4F0 4610F182 */  mul.s     $f6, $f30, $f16
/* B2BF4 8011C4F4 00000000 */  nop
/* B2BF8 8011C4F8 C7BC0028 */  lwc1      $f28, 0x28($sp)
/* B2BFC 8011C4FC 461CB001 */  sub.s     $f0, $f22, $f28
/* B2C00 8011C500 C7B60040 */  lwc1      $f22, 0x40($sp)
/* B2C04 8011C504 4612B202 */  mul.s     $f8, $f22, $f18
/* B2C08 8011C508 00000000 */  nop
/* B2C0C 8011C50C 46001081 */  sub.s     $f2, $f2, $f0
/* B2C10 8011C510 460A1683 */  div.s     $f26, $f2, $f10
/* B2C14 8011C514 461A6302 */  mul.s     $f12, $f12, $f26
/* B2C18 8011C518 00000000 */  nop
/* B2C1C 8011C51C 4612D082 */  mul.s     $f2, $f26, $f18
/* B2C20 8011C520 00000000 */  nop
/* B2C24 8011C524 460C2101 */  sub.s     $f4, $f4, $f12
/* B2C28 8011C528 460E2603 */  div.s     $f24, $f4, $f14
/* B2C2C 8011C52C 4610C002 */  mul.s     $f0, $f24, $f16
/* B2C30 8011C530 00000000 */  nop
/* B2C34 8011C534 4606A181 */  sub.s     $f6, $f20, $f6
/* B2C38 8011C538 46083181 */  sub.s     $f6, $f6, $f8
/* B2C3C 8011C53C C7BC0038 */  lwc1      $f28, 0x38($sp)
/* B2C40 8011C540 0804717C */  j         .L8011C5F0
/* B2C44 8011C544 4600E001 */   sub.s    $f0, $f28, $f0
.L8011C548:
/* B2C48 8011C548 460A9381 */  sub.s     $f14, $f18, $f10
/* B2C4C 8011C54C 4600A201 */  sub.s     $f8, $f20, $f0
/* B2C50 8011C550 460E1083 */  div.s     $f2, $f2, $f14
/* B2C54 8011C554 46081002 */  mul.s     $f0, $f2, $f8
/* B2C58 8011C558 00000000 */  nop
/* B2C5C 8011C55C 46048301 */  sub.s     $f12, $f16, $f4
/* B2C60 8011C560 460C1282 */  mul.s     $f10, $f2, $f12
/* B2C64 8011C564 00000000 */  nop
/* B2C68 8011C568 461AA101 */  sub.s     $f4, $f20, $f26
/* B2C6C 8011C56C 46188181 */  sub.s     $f6, $f16, $f24
/* B2C70 8011C570 46040001 */  sub.s     $f0, $f0, $f4
/* B2C74 8011C574 46065281 */  sub.s     $f10, $f10, $f6
/* B2C78 8011C578 460A0783 */  div.s     $f30, $f0, $f10
/* B2C7C 8011C57C 461E6002 */  mul.s     $f0, $f12, $f30
/* B2C80 8011C580 00000000 */  nop
/* B2C84 8011C584 4610F182 */  mul.s     $f6, $f30, $f16
/* B2C88 8011C588 00000000 */  nop
/* B2C8C 8011C58C C7B60038 */  lwc1      $f22, 0x38($sp)
/* B2C90 8011C590 C7BC0024 */  lwc1      $f28, 0x24($sp)
/* B2C94 8011C594 461CB101 */  sub.s     $f4, $f22, $f28
/* B2C98 8011C598 46041082 */  mul.s     $f2, $f2, $f4
/* B2C9C 8011C59C 00000000 */  nop
/* B2CA0 8011C5A0 46004201 */  sub.s     $f8, $f8, $f0
/* B2CA4 8011C5A4 460E4203 */  div.s     $f8, $f8, $f14
/* B2CA8 8011C5A8 E7A80040 */  swc1      $f8, 0x40($sp)
/* B2CAC 8011C5AC 46124202 */  mul.s     $f8, $f8, $f18
/* B2CB0 8011C5B0 00000000 */  nop
/* B2CB4 8011C5B4 C7BC0028 */  lwc1      $f28, 0x28($sp)
/* B2CB8 8011C5B8 461CB001 */  sub.s     $f0, $f22, $f28
/* B2CBC 8011C5BC 46001081 */  sub.s     $f2, $f2, $f0
/* B2CC0 8011C5C0 460A1603 */  div.s     $f24, $f2, $f10
/* B2CC4 8011C5C4 46186302 */  mul.s     $f12, $f12, $f24
/* B2CC8 8011C5C8 00000000 */  nop
/* B2CCC 8011C5CC 4610C002 */  mul.s     $f0, $f24, $f16
/* B2CD0 8011C5D0 00000000 */  nop
/* B2CD4 8011C5D4 460C2101 */  sub.s     $f4, $f4, $f12
/* B2CD8 8011C5D8 460E2683 */  div.s     $f26, $f4, $f14
/* B2CDC 8011C5DC 4612D082 */  mul.s     $f2, $f26, $f18
/* B2CE0 8011C5E0 00000000 */  nop
/* B2CE4 8011C5E4 4606A181 */  sub.s     $f6, $f20, $f6
/* B2CE8 8011C5E8 46083181 */  sub.s     $f6, $f6, $f8
/* B2CEC 8011C5EC 4600B001 */  sub.s     $f0, $f22, $f0
.L8011C5F0:
/* B2CF0 8011C5F0 E7A6002C */  swc1      $f6, 0x2C($sp)
/* B2CF4 8011C5F4 46020501 */  sub.s     $f20, $f0, $f2
/* B2CF8 8011C5F8 0280202D */  daddu     $a0, $s4, $zero
/* B2CFC 8011C5FC 27A50018 */  addiu     $a1, $sp, 0x18
/* B2D00 8011C600 27A6001C */  addiu     $a2, $sp, 0x1C
/* B2D04 8011C604 27A70020 */  addiu     $a3, $sp, 0x20
/* B2D08 8011C608 0C04700A */  jal       mdl_get_vertex_count
/* B2D0C 8011C60C AFB50010 */   sw       $s5, 0x10($sp)
/* B2D10 8011C610 8FA20018 */  lw        $v0, 0x18($sp)
/* B2D14 8011C614 1840006E */  blez      $v0, .L8011C7D0
/* B2D18 8011C618 0000282D */   daddu    $a1, $zero, $zero
/* B2D1C 8011C61C 44809000 */  mtc1      $zero, $f18
/* B2D20 8011C620 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* B2D24 8011C624 44818800 */  mtc1      $at, $f17
/* B2D28 8011C628 44808000 */  mtc1      $zero, $f16
.L8011C62C:
/* B2D2C 8011C62C 8FA3001C */  lw        $v1, 0x1C($sp)
/* B2D30 8011C630 84620000 */  lh        $v0, 0x0($v1)
/* B2D34 8011C634 44823000 */  mtc1      $v0, $f6
/* B2D38 8011C638 00000000 */  nop
/* B2D3C 8011C63C 468031A0 */  cvt.s.w   $f6, $f6
/* B2D40 8011C640 84620002 */  lh        $v0, 0x2($v1)
/* B2D44 8011C644 84630004 */  lh        $v1, 0x4($v1)
/* B2D48 8011C648 44827000 */  mtc1      $v0, $f14
/* B2D4C 8011C64C 00000000 */  nop
/* B2D50 8011C650 468073A0 */  cvt.s.w   $f14, $f14
/* B2D54 8011C654 44836000 */  mtc1      $v1, $f12
/* B2D58 8011C658 00000000 */  nop
/* B2D5C 8011C65C 46806320 */  cvt.s.w   $f12, $f12
/* B2D60 8011C660 1200001C */  beqz      $s0, .L8011C6D4
/* B2D64 8011C664 46003286 */   mov.s    $f10, $f6
/* B2D68 8011C668 C6040000 */  lwc1      $f4, 0x0($s0)
/* B2D6C 8011C66C 46062102 */  mul.s     $f4, $f4, $f6
/* B2D70 8011C670 00000000 */  nop
/* B2D74 8011C674 C60A0010 */  lwc1      $f10, 0x10($s0)
/* B2D78 8011C678 460E5282 */  mul.s     $f10, $f10, $f14
/* B2D7C 8011C67C 00000000 */  nop
/* B2D80 8011C680 C6000020 */  lwc1      $f0, 0x20($s0)
/* B2D84 8011C684 460C0002 */  mul.s     $f0, $f0, $f12
/* B2D88 8011C688 00000000 */  nop
/* B2D8C 8011C68C C6020008 */  lwc1      $f2, 0x8($s0)
/* B2D90 8011C690 46061082 */  mul.s     $f2, $f2, $f6
/* B2D94 8011C694 00000000 */  nop
/* B2D98 8011C698 C6080018 */  lwc1      $f8, 0x18($s0)
/* B2D9C 8011C69C 460E4202 */  mul.s     $f8, $f8, $f14
/* B2DA0 8011C6A0 00000000 */  nop
/* B2DA4 8011C6A4 C6060028 */  lwc1      $f6, 0x28($s0)
/* B2DA8 8011C6A8 460C3182 */  mul.s     $f6, $f6, $f12
/* B2DAC 8011C6AC 00000000 */  nop
/* B2DB0 8011C6B0 460A2100 */  add.s     $f4, $f4, $f10
/* B2DB4 8011C6B4 46081080 */  add.s     $f2, $f2, $f8
/* B2DB8 8011C6B8 46002100 */  add.s     $f4, $f4, $f0
/* B2DBC 8011C6BC 46061080 */  add.s     $f2, $f2, $f6
/* B2DC0 8011C6C0 C6000030 */  lwc1      $f0, 0x30($s0)
/* B2DC4 8011C6C4 46002280 */  add.s     $f10, $f4, $f0
/* B2DC8 8011C6C8 C6000038 */  lwc1      $f0, 0x38($s0)
/* B2DCC 8011C6CC 080471B6 */  j         .L8011C6D8
/* B2DD0 8011C6D0 46001180 */   add.s    $f6, $f2, $f0
.L8011C6D4:
/* B2DD4 8011C6D4 46006186 */  mov.s     $f6, $f12
.L8011C6D8:
/* B2DD8 8011C6D8 460AF002 */  mul.s     $f0, $f30, $f10
/* B2DDC 8011C6DC 00000000 */  nop
/* B2DE0 8011C6E0 460AC082 */  mul.s     $f2, $f24, $f10
/* B2DE4 8011C6E4 00000000 */  nop
/* B2DE8 8011C6E8 C7B60040 */  lwc1      $f22, 0x40($sp)
/* B2DEC 8011C6EC 4606B102 */  mul.s     $f4, $f22, $f6
/* B2DF0 8011C6F0 00000000 */  nop
/* B2DF4 8011C6F4 4606D182 */  mul.s     $f6, $f26, $f6
/* B2DF8 8011C6F8 00000000 */  nop
/* B2DFC 8011C6FC 46040000 */  add.s     $f0, $f0, $f4
/* B2E00 8011C700 46061080 */  add.s     $f2, $f2, $f6
/* B2E04 8011C704 C7BC002C */  lwc1      $f28, 0x2C($sp)
/* B2E08 8011C708 461C0100 */  add.s     $f4, $f0, $f28
/* B2E0C 8011C70C 4612203C */  c.lt.s    $f4, $f18
/* B2E10 8011C710 00000000 */  nop
/* B2E14 8011C714 45000004 */  bc1f      .L8011C728
/* B2E18 8011C718 46141080 */   add.s    $f2, $f2, $f20
/* B2E1C 8011C71C 46002021 */  cvt.d.s   $f0, $f4
/* B2E20 8011C720 080471D0 */  j         .L8011C740
/* B2E24 8011C724 46300001 */   sub.d    $f0, $f0, $f16
.L8011C728:
/* B2E28 8011C728 4604903C */  c.lt.s    $f18, $f4
/* B2E2C 8011C72C 00000000 */  nop
/* B2E30 8011C730 45000004 */  bc1f      .L8011C744
/* B2E34 8011C734 00000000 */   nop
/* B2E38 8011C738 46002021 */  cvt.d.s   $f0, $f4
/* B2E3C 8011C73C 46300000 */  add.d     $f0, $f0, $f16
.L8011C740:
/* B2E40 8011C740 46200120 */  cvt.s.d   $f4, $f0
.L8011C744:
/* B2E44 8011C744 4612103C */  c.lt.s    $f2, $f18
/* B2E48 8011C748 00000000 */  nop
/* B2E4C 8011C74C 45000004 */  bc1f      .L8011C760
/* B2E50 8011C750 00000000 */   nop
/* B2E54 8011C754 46001021 */  cvt.d.s   $f0, $f2
/* B2E58 8011C758 080471DE */  j         .L8011C778
/* B2E5C 8011C75C 46300001 */   sub.d    $f0, $f0, $f16
.L8011C760:
/* B2E60 8011C760 4602903C */  c.lt.s    $f18, $f2
/* B2E64 8011C764 00000000 */  nop
/* B2E68 8011C768 45000004 */  bc1f      .L8011C77C
/* B2E6C 8011C76C 00000000 */   nop
/* B2E70 8011C770 46001021 */  cvt.d.s   $f0, $f2
/* B2E74 8011C774 46300000 */  add.d     $f0, $f0, $f16
.L8011C778:
/* B2E78 8011C778 462000A0 */  cvt.s.d   $f2, $f0
.L8011C77C:
/* B2E7C 8011C77C 8FA3001C */  lw        $v1, 0x1C($sp)
/* B2E80 8011C780 4600258D */  trunc.w.s $f22, $f4
/* B2E84 8011C784 4402B000 */  mfc1      $v0, $f22
/* B2E88 8011C788 00000000 */  nop
/* B2E8C 8011C78C A4620008 */  sh        $v0, 0x8($v1)
/* B2E90 8011C790 A073000C */  sb        $s3, 0xC($v1)
/* B2E94 8011C794 8FA4001C */  lw        $a0, 0x1C($sp)
/* B2E98 8011C798 4600158D */  trunc.w.s $f22, $f2
/* B2E9C 8011C79C 4402B000 */  mfc1      $v0, $f22
/* B2EA0 8011C7A0 00000000 */  nop
/* B2EA4 8011C7A4 A462000A */  sh        $v0, 0xA($v1)
/* B2EA8 8011C7A8 A092000D */  sb        $s2, 0xD($a0)
/* B2EAC 8011C7AC 8FA2001C */  lw        $v0, 0x1C($sp)
/* B2EB0 8011C7B0 24A50001 */  addiu     $a1, $a1, 0x1
/* B2EB4 8011C7B4 A051000E */  sb        $s1, 0xE($v0)
/* B2EB8 8011C7B8 8FA2001C */  lw        $v0, 0x1C($sp)
/* B2EBC 8011C7BC 8FA30018 */  lw        $v1, 0x18($sp)
/* B2EC0 8011C7C0 24420010 */  addiu     $v0, $v0, 0x10
/* B2EC4 8011C7C4 00A3182A */  slt       $v1, $a1, $v1
/* B2EC8 8011C7C8 1460FF98 */  bnez      $v1, .L8011C62C
/* B2ECC 8011C7CC AFA2001C */   sw       $v0, 0x1C($sp)
.L8011C7D0:
/* B2ED0 8011C7D0 8FBF0060 */  lw        $ra, 0x60($sp)
/* B2ED4 8011C7D4 8FB5005C */  lw        $s5, 0x5C($sp)
/* B2ED8 8011C7D8 8FB40058 */  lw        $s4, 0x58($sp)
/* B2EDC 8011C7DC 8FB30054 */  lw        $s3, 0x54($sp)
/* B2EE0 8011C7E0 8FB20050 */  lw        $s2, 0x50($sp)
/* B2EE4 8011C7E4 8FB1004C */  lw        $s1, 0x4C($sp)
/* B2EE8 8011C7E8 8FB00048 */  lw        $s0, 0x48($sp)
/* B2EEC 8011C7EC D7BE0090 */  ldc1      $f30, 0x90($sp)
/* B2EF0 8011C7F0 D7BC0088 */  ldc1      $f28, 0x88($sp)
/* B2EF4 8011C7F4 D7BA0080 */  ldc1      $f26, 0x80($sp)
/* B2EF8 8011C7F8 D7B80078 */  ldc1      $f24, 0x78($sp)
/* B2EFC 8011C7FC D7B60070 */  ldc1      $f22, 0x70($sp)
/* B2F00 8011C800 D7B40068 */  ldc1      $f20, 0x68($sp)
/* B2F04 8011C804 03E00008 */  jr        $ra
/* B2F08 8011C808 27BD0098 */   addiu    $sp, $sp, 0x98

### DECOMPILED C INSTRUCTIONS:

void mdl_project_tex_coords(s32 modelID, Gfx* arg1, Matrix4f arg2, Vtx* arg3) {
    s32 sp18;
    Vtx* baseVtx;
    s32 sp20;
    f32 v1tc1;
    f32 v2tc1;
    f32 sp2C;
    f32 v0tc1;
    f32 sp40;
    f32 v1tc0;
    f32 v1ob2;
    f32 ob2;
    f32 ob1;
    f32 v0ob0;
    f32 v0ob2;
    f32 v0tc0;
    f32 v2ob0;
    f32 v2tc0;
    f32 v1ob0;
    f32 v2ob2;
    f32 ob0;
    f32 var_f10;
    f32 var_f24;
    f32 var_f26;
    f32 tc1;
    f32 var_f30;
    f32 tc0;
    f32 var_f6_2;
    s32 i;
    u32 cnB;
    u32 cnG;
    u32 cnR;
    f32 var_f20;

    s32 listIndex;
    Model* model;
    Gfx* dlist;
    s32 cmd;
    Vtx* tempVert;

    s8 zero = 0; // TODO needed to match

    listIndex = get_model_list_index_from_tree_index(modelID & 0xFFFF);
    model = get_model_from_list_index(listIndex);
    dlist = model->modelNode->displayData->displayList;

    while (TRUE) {
        cmd = dlist->words.w0 >> 0x18;
        tempVert = (Vtx*)dlist->words.w1;
        if (cmd == G_ENDDL) {
            break;
        }
        if (cmd == G_VTX) {
            baseVtx = tempVert;
            break;
        }
        dlist++;
    }

    v0ob0 = baseVtx[zero].v.ob[0];
    v0ob2 = baseVtx[zero].v.ob[2];
    v0tc0 = baseVtx[zero].v.tc[0];
    v0tc1 = baseVtx[zero].v.tc[1];

    v1ob0 = baseVtx[1].v.ob[0];
    v1ob2 = baseVtx[1].v.ob[2];
    v1tc0 = baseVtx[1].v.tc[0];
    v1tc1 = baseVtx[1].v.tc[1];

    v2ob0 = baseVtx[2].v.ob[0];
    v2ob2 = baseVtx[2].v.ob[2];
    v2tc0 = baseVtx[2].v.tc[0];
    v2tc1 = baseVtx[2].v.tc[1];

    cnR = baseVtx[0].v.cn[0];
    cnG = baseVtx[0].v.cn[1];
    cnB = baseVtx[0].v.cn[2];

    if (v0ob0 != v1ob0) {
        f32 f2 = v0ob0 - v2ob0;
        f32 f14 = v0ob0 - v1ob0;
        f32 f8 = v0tc0 - v1tc0;
        f32 f2a = f2 / f14;
        f32 f0 = f2a * f8;
        f32 f12 = v0ob2 - v1ob2;
        f32 f10 = f2a * f12;
        f32 f4 = v0tc0 - v2tc0;
        f32 f6 = v0ob2 - v2ob2;
        f32 f0a = f0 - f4;
        f32 f10a = f10 - f6;

        f32 f0b, f4a, f2b, f8a, f6a, f0c, f8b, f2c, f12a, f2d, f4b, f0d, f6b, f0e;

        sp40 = f0a / f10a; // used later
        f0b = f12 * sp40;
        f4a = v0tc1 - v1tc1;
        f2b = f2a * f4a;
        f8a = f8 - f0b;
        var_f30 = f8a / f14; // used later
        f6a = var_f30 * v0ob0;
        f0c = v0tc1 - v2tc1;
        f2c = f2b - f0c;
        var_f26 = f2c / f10a; // used later
        f12a = f12 * var_f26;
        var_f24 = (f4a - f12a) / f14; // used later
        sp2C = v0tc0 - f6a - sp40 * v0ob2; // used later
        var_f20 = v0tc1 - var_f24 * v0ob0 - var_f26 * v0ob2; // used later
    } else {
        f32 f2 = v0ob2 - v2ob2;
        f32 f14 = v0ob2 - v1ob2;
        f32 f8 = v0tc0 - v1tc0;
        f32 f12 = v0ob0 - v1ob0;
        f32 f4 = v0tc0 - v2tc0;
        f32 f6 = v0ob0 - v2ob0;
        f32 f0 = f2 / f14 * f8;
        f32 f10 = f2 / f14 * f12;

        f32 f0b, f4a, f2b, f8a, f6a, f0c, f8b, f2c, f12a, f2d, f4b, f0d, f6b, f0e;

        var_f30 = (f0 - f4) / (f10 - f6); // used later
        f0b = f12 * var_f30;
        f6a = var_f30 * v0ob0;
        f4a = v0tc1 - v1tc1;
        f2b = f2 / f14 * f4a;
        f8a = f8 - f0b;
        sp40 = f8a / f14; // used later
        f8b = sp40 * v0ob2;
        f0c = v0tc1 - v2tc1;
        var_f24 = (f2b - f0c) / (f10 - f6); // used later
        var_f26 = (f4a - f12 * var_f24) / f14; // used later
        sp2C = v0tc0 - f6a - f8b; // used later
        var_f20 = v0tc1 - var_f24 * v0ob0 - var_f26 * v0ob2; // used later
    }

    mdl_get_vertex_count(arg1, &sp18, &baseVtx, &sp20, arg3);

    for (i = 0; i < sp18; i++) {
        ob0 = baseVtx->v.ob[0];
        ob1 = baseVtx->v.ob[1];
        ob2 = baseVtx->v.ob[2];
        if (arg2 != NULL) {
            var_f10 = (arg2[0][0] * ob0) + (arg2[1][0] * ob1) + (arg2[2][0] * ob2) + arg2[3][0];
            var_f6_2 = (arg2[0][2] * ob0) + (arg2[1][2] * ob1) + (arg2[2][2] * ob2) + arg2[3][2];
        } else {
            var_f10 = ob0;
            var_f6_2 = ob2;
        }
        tc0 = (var_f30 * var_f10) + (sp40 * var_f6_2) + sp2C;
        tc1 = (var_f24 * var_f10) + (var_f26 * var_f6_2) + var_f20;
        if (tc0 < 0.0f) {
            tc0 -= 0.5;
        } else if (tc0 > 0.0f) {
            tc0 += 0.5;
        }

        if (tc1 < 0.0f) {
            tc1 -= 0.5;
        } else if (tc1 > 0.0f) {
            tc1 += 0.5;
        }

        baseVtx->v.tc[0] = tc0;
        baseVtx->v.tc[1] = tc1;
        baseVtx->v.cn[0] = cnR;
        baseVtx->v.cn[1] = cnG;
        baseVtx->v.cn[2] = cnB;
        baseVtx++;
    }
}