### RAW ASSEMBLY INSTRUCTIONS:

glabel get_msg_properties
/* BC668 80125F68 27BDFEB0 */  addiu     $sp, $sp, -0x150
/* BC66C 80125F6C F7B40148 */  sdc1      $f20, 0x148($sp)
/* BC670 80125F70 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* BC674 80125F74 4481A000 */  mtc1      $at, $f20
/* BC678 80125F78 AFB3012C */  sw        $s3, 0x12C($sp)
/* BC67C 80125F7C 97B3016E */  lhu       $s3, 0x16E($sp)
/* BC680 80125F80 AFB00120 */  sw        $s0, 0x120($sp)
/* BC684 80125F84 0080802D */  daddu     $s0, $a0, $zero
/* BC688 80125F88 AFB20128 */  sw        $s2, 0x128($sp)
/* BC68C 80125F8C 0000902D */  daddu     $s2, $zero, $zero
/* BC690 80125F90 AFB7013C */  sw        $s7, 0x13C($sp)
/* BC694 80125F94 0240B82D */  daddu     $s7, $s2, $zero
/* BC698 80125F98 AFBF0144 */  sw        $ra, 0x144($sp)
/* BC69C 80125F9C AFBE0140 */  sw        $fp, 0x140($sp)
/* BC6A0 80125FA0 AFB60138 */  sw        $s6, 0x138($sp)
/* BC6A4 80125FA4 AFB50134 */  sw        $s5, 0x134($sp)
/* BC6A8 80125FA8 AFB40130 */  sw        $s4, 0x130($sp)
/* BC6AC 80125FAC AFB10124 */  sw        $s1, 0x124($sp)
/* BC6B0 80125FB0 AFA50154 */  sw        $a1, 0x154($sp)
/* BC6B4 80125FB4 AFA60158 */  sw        $a2, 0x158($sp)
/* BC6B8 80125FB8 AFA7015C */  sw        $a3, 0x15C($sp)
/* BC6BC 80125FBC A7A000E6 */  sh        $zero, 0xE6($sp)
/* BC6C0 80125FC0 A7A000EE */  sh        $zero, 0xEE($sp)
/* BC6C4 80125FC4 AFA000F0 */  sw        $zero, 0xF0($sp)
/* BC6C8 80125FC8 A7A000FE */  sh        $zero, 0xFE($sp)
/* BC6CC 80125FCC A7A00106 */  sh        $zero, 0x106($sp)
/* BC6D0 80125FD0 A7A00108 */  sh        $zero, 0x108($sp)
/* BC6D4 80125FD4 1200011A */  beqz      $s0, .L80126440
/* BC6D8 80125FD8 A7A00116 */   sh       $zero, 0x116($sp)
/* BC6DC 80125FDC 0600000A */  bltz      $s0, .L80126008
/* BC6E0 80125FE0 0200882D */   daddu    $s1, $s0, $zero
/* BC6E4 80125FE4 0C00AB0A */  jal       general_heap_malloc
/* BC6E8 80125FE8 24040400 */   addiu    $a0, $zero, 0x400
/* BC6EC 80125FEC 0200202D */  daddu     $a0, $s0, $zero
/* BC6F0 80125FF0 AFA200F0 */  sw        $v0, 0xF0($sp)
/* BC6F4 80125FF4 0C049601 */  jal       dma_load_msg
/* BC6F8 80125FF8 0040282D */   daddu    $a1, $v0, $zero
/* BC6FC 80125FFC 8FB100F0 */  lw        $s1, 0xF0($sp)
/* BC700 80126000 08049803 */  j         .L8012600C
/* BC704 80126004 32620001 */   andi     $v0, $s3, 0x1
.L80126008:
/* BC708 80126008 32620001 */  andi      $v0, $s3, 0x1
.L8012600C:
/* BC70C 8012600C 10400002 */  beqz      $v0, .L80126018
/* BC710 80126010 24080001 */   addiu    $t0, $zero, 0x1
/* BC714 80126014 A7A800EE */  sh        $t0, 0xEE($sp)
.L80126018:
/* BC718 80126018 0000802D */  daddu     $s0, $zero, $zero
/* BC71C 8012601C 0200A02D */  daddu     $s4, $s0, $zero
/* BC720 80126020 0200982D */  daddu     $s3, $s0, $zero
/* BC724 80126024 0200B02D */  daddu     $s6, $s0, $zero
/* BC728 80126028 0200A82D */  daddu     $s5, $s0, $zero
/* BC72C 8012602C 241E0001 */  addiu     $fp, $zero, 0x1
/* BC730 80126030 27A90018 */  addiu     $t1, $sp, 0x18
/* BC734 80126034 27A80058 */  addiu     $t0, $sp, 0x58
/* BC738 80126038 AFA000D8 */  sw        $zero, 0xD8($sp)
/* BC73C 8012603C AFA9011C */  sw        $t1, 0x11C($sp)
/* BC740 80126040 AFA80118 */  sw        $t0, 0x118($sp)
/* BC744 80126044 02301021 */  addu      $v0, $s1, $s0
.L80126048:
/* BC748 80126048 90440000 */  lbu       $a0, 0x0($v0)
/* BC74C 8012604C 2483FF10 */  addiu     $v1, $a0, -0xF0
/* BC750 80126050 2C620010 */  sltiu     $v0, $v1, 0x10
/* BC754 80126054 10400092 */  beqz      $v0, .L801262A0
/* BC758 80126058 26100001 */   addiu    $s0, $s0, 0x1
/* BC75C 8012605C 00031080 */  sll       $v0, $v1, 2
/* BC760 80126060 3C018015 */  lui       $at, %hi(jtbl_80150588)
glabel func_80126064
/* BC764 80126064 00220821 */  addu      $at, $at, $v0
/* BC768 80126068 8C220588 */  lw        $v0, %lo(jtbl_80150588)($at)
/* BC76C 8012606C 00400008 */  jr        $v0
/* BC770 80126070 00000000 */   nop
glabel .L80126074
/* BC774 80126074 2484FF0D */  addiu     $a0, $a0, -0xF3
/* BC778 80126078 080498BA */  j         .L801262E8
glabel func_8012607C
/* BC77C 8012607C A7A400E6 */   sh       $a0, 0xE6($sp)
glabel .L80126080
/* BC780 80126080 12C00099 */  beqz      $s6, .L801262E8
/* BC784 80126084 32E2FFFF */   andi     $v0, $s7, 0xFFFF
/* BC788 80126088 00021040 */  sll       $v0, $v0, 1
/* BC78C 8012608C 03A21021 */  addu      $v0, $sp, $v0
/* BC790 80126090 A4560098 */  sh        $s6, 0x98($v0)
glabel func_80126094
/* BC794 80126094 26F70001 */  addiu     $s7, $s7, 0x1
/* BC798 80126098 32E2FFFF */  andi      $v0, $s7, 0xFFFF
/* BC79C 8012609C 2C420020 */  sltiu     $v0, $v0, 0x20
/* BC7A0 801260A0 50400001 */  beql      $v0, $zero, .L801260A8
/* BC7A4 801260A4 24140001 */   addiu    $s4, $zero, 0x1
.L801260A8:
/* BC7A8 801260A8 080498BA */  j         .L801262E8
glabel func_801260AC
/* BC7AC 801260AC 0000B02D */   daddu    $s6, $zero, $zero
glabel .L801260B0
/* BC7B0 801260B0 3243FFFF */  andi      $v1, $s2, 0xFFFF
/* BC7B4 801260B4 26520001 */  addiu     $s2, $s2, 0x1
/* BC7B8 801260B8 8FA9011C */  lw        $t1, 0x11C($sp)
/* BC7BC 801260BC 00031840 */  sll       $v1, $v1, 1
/* BC7C0 801260C0 01231021 */  addu      $v0, $t1, $v1
/* BC7C4 801260C4 A4530000 */  sh        $s3, 0x0($v0)
/* BC7C8 801260C8 3242FFFF */  andi      $v0, $s2, 0xFFFF
/* BC7CC 801260CC 8FA80118 */  lw        $t0, 0x118($sp)
/* BC7D0 801260D0 2C420020 */  sltiu     $v0, $v0, 0x20
/* BC7D4 801260D4 01031821 */  addu      $v1, $t0, $v1
/* BC7D8 801260D8 14400002 */  bnez      $v0, .L801260E4
/* BC7DC 801260DC A4750000 */   sh       $s5, 0x0($v1)
/* BC7E0 801260E0 24140001 */  addiu     $s4, $zero, 0x1
.L801260E4:
/* BC7E4 801260E4 0000982D */  daddu     $s3, $zero, $zero
/* BC7E8 801260E8 0260A82D */  daddu     $s5, $s3, $zero
/* BC7EC 801260EC 080498BA */  j         .L801262E8
/* BC7F0 801260F0 241E0001 */   addiu    $fp, $zero, 0x1
glabel .L801260F4
/* BC7F4 801260F4 02301021 */  addu      $v0, $s1, $s0
/* BC7F8 801260F8 90420000 */  lbu       $v0, 0x0($v0)
/* BC7FC 801260FC 2443FFFF */  addiu     $v1, $v0, -0x1
/* BC800 80126100 2C62000B */  sltiu     $v0, $v1, 0xB
/* BC804 80126104 10400078 */  beqz      $v0, .L801262E8
/* BC808 80126108 26100001 */   addiu    $s0, $s0, 0x1
/* BC80C 8012610C 00031080 */  sll       $v0, $v1, 2
/* BC810 80126110 3C018015 */  lui       $at, %hi(jtbl_801505C8)
/* BC814 80126114 00220821 */  addu      $at, $at, $v0
/* BC818 80126118 8C2205C8 */  lw        $v0, %lo(jtbl_801505C8)($at)
/* BC81C 8012611C 00400008 */  jr        $v0
/* BC820 80126120 00000000 */   nop
glabel .L80126124
/* BC824 80126124 080498BA */  j         .L801262E8
/* BC828 80126128 26100004 */   addiu    $s0, $s0, 0x4
glabel .L8012612C
/* BC82C 8012612C 3243FFFF */  andi      $v1, $s2, 0xFFFF
/* BC830 80126130 26520001 */  addiu     $s2, $s2, 0x1
/* BC834 80126134 8FA9011C */  lw        $t1, 0x11C($sp)
/* BC838 80126138 00031840 */  sll       $v1, $v1, 1
/* BC83C 8012613C 01231021 */  addu      $v0, $t1, $v1
/* BC840 80126140 A4530000 */  sh        $s3, 0x0($v0)
/* BC844 80126144 8FA80118 */  lw        $t0, 0x118($sp)
/* BC848 80126148 24140001 */  addiu     $s4, $zero, 0x1
/* BC84C 8012614C 01031821 */  addu      $v1, $t0, $v1
/* BC850 80126150 080498BA */  j         .L801262E8
/* BC854 80126154 A4750000 */   sh       $s5, 0x0($v1)
glabel .L80126158
/* BC858 80126158 02301021 */  addu      $v0, $s1, $s0
/* BC85C 8012615C 90430000 */  lbu       $v1, 0x0($v0)
/* BC860 80126160 2C620030 */  sltiu     $v0, $v1, 0x30
/* BC864 80126164 1040001C */  beqz      $v0, .L801261D8
/* BC868 80126168 26100001 */   addiu    $s0, $s0, 0x1
/* BC86C 8012616C 00031080 */  sll       $v0, $v1, 2
/* BC870 80126170 3C018015 */  lui       $at, %hi(jtbl_801505F8)
/* BC874 80126174 00220821 */  addu      $at, $at, $v0
/* BC878 80126178 8C2205F8 */  lw        $v0, %lo(jtbl_801505F8)($at)
/* BC87C 8012617C 00400008 */  jr        $v0
/* BC880 80126180 00000000 */   nop
glabel .L80126184
/* BC884 80126184 02301021 */  addu      $v0, $s1, $s0
/* BC888 80126188 90420000 */  lbu       $v0, 0x0($v0)
/* BC88C 8012618C 26100001 */  addiu     $s0, $s0, 0x1
/* BC890 80126190 080498BA */  j         .L801262E8
/* BC894 80126194 A7A200EE */   sh       $v0, 0xEE($sp)
glabel .L80126198
/* BC898 80126198 26100001 */  addiu     $s0, $s0, 0x1
glabel .L8012619C
/* BC89C 8012619C 26100004 */  addiu     $s0, $s0, 0x4
glabel .L801261A0
/* BC8A0 801261A0 26100001 */  addiu     $s0, $s0, 0x1
glabel .L801261A4
/* BC8A4 801261A4 08049898 */  j         .L80126260
/* BC8A8 801261A8 26100001 */   addiu    $s0, $s0, 0x1
glabel .L801261AC
/* BC8AC 801261AC 02301021 */  addu      $v0, $s1, $s0
/* BC8B0 801261B0 90420000 */  lbu       $v0, 0x0($v0)
/* BC8B4 801261B4 5040002A */  beql      $v0, $zero, .L80126260
/* BC8B8 801261B8 24140001 */   addiu    $s4, $zero, 0x1
/* BC8BC 801261BC 080498BA */  j         .L801262E8
/* BC8C0 801261C0 26100001 */   addiu    $s0, $s0, 0x1
glabel .L801261C4
/* BC8C4 801261C4 02301021 */  addu      $v0, $s1, $s0
/* BC8C8 801261C8 90430000 */  lbu       $v1, 0x0($v0)
/* BC8CC 801261CC 240200FD */  addiu     $v0, $zero, 0xFD
/* BC8D0 801261D0 14620046 */  bne       $v1, $v0, .L801262EC
/* BC8D4 801261D4 328200FF */   andi     $v0, $s4, 0xFF
glabel .L801261D8
/* BC8D8 801261D8 080498BA */  j         .L801262E8
/* BC8DC 801261DC 24140001 */   addiu    $s4, $zero, 0x1
glabel .L801261E0
/* BC8E0 801261E0 02111021 */  addu      $v0, $s0, $s1
/* BC8E4 801261E4 90420001 */  lbu       $v0, 0x1($v0)
/* BC8E8 801261E8 3C013D80 */  lui       $at, (0x3D800000 >> 16)
/* BC8EC 801261EC 44810000 */  mtc1      $at, $f0
/* BC8F0 801261F0 3043000F */  andi      $v1, $v0, 0xF
/* BC8F4 801261F4 44831000 */  mtc1      $v1, $f2
/* BC8F8 801261F8 00000000 */  nop
/* BC8FC 801261FC 468010A0 */  cvt.s.w   $f2, $f2
/* BC900 80126200 46001082 */  mul.s     $f2, $f2, $f0
/* BC904 80126204 00000000 */  nop
/* BC908 80126208 26100002 */  addiu     $s0, $s0, 0x2
/* BC90C 8012620C 00021102 */  srl       $v0, $v0, 4
/* BC910 80126210 44820000 */  mtc1      $v0, $f0
/* BC914 80126214 00000000 */  nop
/* BC918 80126218 46800020 */  cvt.s.w   $f0, $f0
/* BC91C 8012621C 080498BA */  j         .L801262E8
/* BC920 80126220 46020500 */   add.s    $f20, $f0, $f2
glabel .L80126224
/* BC924 80126224 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* BC928 80126228 4481A000 */  mtc1      $at, $f20
/* BC92C 8012622C 080498BB */  j         .L801262EC
/* BC930 80126230 328200FF */   andi     $v0, $s4, 0xFF
glabel .L80126234
/* BC934 80126234 02301021 */  addu      $v0, $s1, $s0
/* BC938 80126238 90430000 */  lbu       $v1, 0x0($v0)
/* BC93C 8012623C 2C62000F */  sltiu     $v0, $v1, 0xF
/* BC940 80126240 10400029 */  beqz      $v0, .L801262E8
/* BC944 80126244 26100001 */   addiu    $s0, $s0, 0x1
/* BC948 80126248 00031080 */  sll       $v0, $v1, 2
/* BC94C 8012624C 3C018015 */  lui       $at, %hi(jtbl_801506B8)
/* BC950 80126250 00220821 */  addu      $at, $at, $v0
/* BC954 80126254 8C2206B8 */  lw        $v0, %lo(jtbl_801506B8)($at)
/* BC958 80126258 00400008 */  jr        $v0
/* BC95C 8012625C 00000000 */   nop
glabel .L80126260
/* BC960 80126260 080498BA */  j         .L801262E8
/* BC964 80126264 26100001 */   addiu    $s0, $s0, 0x1
glabel .L80126268
/* BC968 80126268 02301021 */  addu      $v0, $s1, $s0
/* BC96C 8012626C 26100001 */  addiu     $s0, $s0, 0x1
/* BC970 80126270 90440000 */  lbu       $a0, 0x0($v0)
/* BC974 80126274 0000282D */  daddu     $a1, $zero, $zero
/* BC978 80126278 3C098015 */  lui       $t1, %hi(gMessageMsgVars)
/* BC97C 8012627C 25295C38 */  addiu     $t1, $t1, %lo(gMessageMsgVars)
/* BC980 80126280 00042140 */  sll       $a0, $a0, 5
/* BC984 80126284 0C04991D */  jal       get_msg_width
/* BC988 80126288 00892021 */   addu     $a0, $a0, $t1
/* BC98C 8012628C 080498BA */  j         .L801262E8
/* BC990 80126290 02629821 */   addu     $s3, $s3, $v0
glabel .L80126294
/* BC994 80126294 97A80116 */  lhu       $t0, 0x116($sp)
/* BC998 80126298 25080001 */  addiu     $t0, $t0, 0x1
/* BC99C 8012629C A7A80116 */  sh        $t0, 0x116($sp)
glabel .L801262A0
/* BC9A0 801262A0 33C2FFFF */  andi      $v0, $fp, 0xFFFF
/* BC9A4 801262A4 10400006 */  beqz      $v0, .L801262C0
/* BC9A8 801262A8 308400FF */   andi     $a0, $a0, 0xFF
/* BC9AC 801262AC 8FA900D8 */  lw        $t1, 0xD8($sp)
/* BC9B0 801262B0 25290001 */  addiu     $t1, $t1, 0x1
/* BC9B4 801262B4 AFA900D8 */  sw        $t1, 0xD8($sp)
/* BC9B8 801262B8 26D60001 */  addiu     $s6, $s6, 0x1
/* BC9BC 801262BC 0000F02D */  daddu     $fp, $zero, $zero
.L801262C0:
/* BC9C0 801262C0 26B50001 */  addiu     $s5, $s5, 0x1
/* BC9C4 801262C4 97A800EE */  lhu       $t0, 0xEE($sp)
/* BC9C8 801262C8 4407A000 */  mfc1      $a3, $f20
/* BC9CC 801262CC 97A600E6 */  lhu       $a2, 0xE6($sp)
/* BC9D0 801262D0 24020001 */  addiu     $v0, $zero, 0x1
/* BC9D4 801262D4 AFA00010 */  sw        $zero, 0x10($sp)
/* BC9D8 801262D8 AFA20014 */  sw        $v0, 0x14($sp)
/* BC9DC 801262DC 0C049721 */  jal       msg_get_print_char_width
/* BC9E0 801262E0 0100282D */   daddu    $a1, $t0, $zero
/* BC9E4 801262E4 02629821 */  addu      $s3, $s3, $v0
glabel .L801262E8
/* BC9E8 801262E8 328200FF */  andi      $v0, $s4, 0xFF
.L801262EC:
/* BC9EC 801262EC 1040FF56 */  beqz      $v0, .L80126048
/* BC9F0 801262F0 02301021 */   addu     $v0, $s1, $s0
/* BC9F4 801262F4 8FA900F0 */  lw        $t1, 0xF0($sp)
/* BC9F8 801262F8 11200004 */  beqz      $t1, .L8012630C
/* BC9FC 801262FC 3242FFFF */   andi     $v0, $s2, 0xFFFF
/* BCA00 80126300 0C00AB1E */  jal       general_heap_free
/* BCA04 80126304 0120202D */   daddu    $a0, $t1, $zero
/* BCA08 80126308 3242FFFF */  andi      $v0, $s2, 0xFFFF
.L8012630C:
/* BCA0C 8012630C 10400013 */  beqz      $v0, .L8012635C
/* BCA10 80126310 0000802D */   daddu    $s0, $zero, $zero
/* BCA14 80126314 0040182D */  daddu     $v1, $v0, $zero
/* BCA18 80126318 27A60058 */  addiu     $a2, $sp, 0x58
/* BCA1C 8012631C 27A50018 */  addiu     $a1, $sp, 0x18
.L80126320:
/* BCA20 80126320 94A40000 */  lhu       $a0, 0x0($a1)
/* BCA24 80126324 97A800FE */  lhu       $t0, 0xFE($sp)
/* BCA28 80126328 0104102B */  sltu      $v0, $t0, $a0
/* BCA2C 8012632C 54400001 */  bnel      $v0, $zero, .L80126334
/* BCA30 80126330 A7A400FE */   sh       $a0, 0xFE($sp)
.L80126334:
/* BCA34 80126334 94C40000 */  lhu       $a0, 0x0($a2)
/* BCA38 80126338 97A90106 */  lhu       $t1, 0x106($sp)
/* BCA3C 8012633C 0124102B */  sltu      $v0, $t1, $a0
/* BCA40 80126340 54400001 */  bnel      $v0, $zero, .L80126348
/* BCA44 80126344 A7A40106 */   sh       $a0, 0x106($sp)
.L80126348:
/* BCA48 80126348 24C60002 */  addiu     $a2, $a2, 0x2
/* BCA4C 8012634C 26100001 */  addiu     $s0, $s0, 0x1
/* BCA50 80126350 0203102A */  slt       $v0, $s0, $v1
/* BCA54 80126354 1440FFF2 */  bnez      $v0, .L80126320
/* BCA58 80126358 24A50002 */   addiu    $a1, $a1, 0x2
.L8012635C:
/* BCA5C 8012635C 32E2FFFF */  andi      $v0, $s7, 0xFFFF
/* BCA60 80126360 14400003 */  bnez      $v0, .L80126370
/* BCA64 80126364 00000000 */   nop
/* BCA68 80126368 080498E9 */  j         .L801263A4
/* BCA6C 8012636C A7B60108 */   sh       $s6, 0x108($sp)
.L80126370:
/* BCA70 80126370 1040000C */  beqz      $v0, .L801263A4
/* BCA74 80126374 0000802D */   daddu    $s0, $zero, $zero
/* BCA78 80126378 0040282D */  daddu     $a1, $v0, $zero
/* BCA7C 8012637C 27A40098 */  addiu     $a0, $sp, 0x98
.L80126380:
/* BCA80 80126380 94830000 */  lhu       $v1, 0x0($a0)
/* BCA84 80126384 97A20108 */  lhu       $v0, 0x108($sp)
/* BCA88 80126388 0043102B */  sltu      $v0, $v0, $v1
/* BCA8C 8012638C 54400001 */  bnel      $v0, $zero, .L80126394
/* BCA90 80126390 A7A30108 */   sh       $v1, 0x108($sp)
.L80126394:
/* BCA94 80126394 26100001 */  addiu     $s0, $s0, 0x1
/* BCA98 80126398 0205102A */  slt       $v0, $s0, $a1
/* BCA9C 8012639C 1440FFF8 */  bnez      $v0, .L80126380
/* BCAA0 801263A0 24840002 */   addiu    $a0, $a0, 0x2
.L801263A4:
/* BCAA4 801263A4 8FA80158 */  lw        $t0, 0x158($sp)
/* BCAA8 801263A8 11000003 */  beqz      $t0, .L801263B8
/* BCAAC 801263AC 00000000 */   nop
/* BCAB0 801263B0 97A900FE */  lhu       $t1, 0xFE($sp)
/* BCAB4 801263B4 AD090000 */  sw        $t1, 0x0($t0)
.L801263B8:
/* BCAB8 801263B8 8FA80154 */  lw        $t0, 0x154($sp)
/* BCABC 801263BC 1100000C */  beqz      $t0, .L801263F0
/* BCAC0 801263C0 00000000 */   nop
/* BCAC4 801263C4 97A900EE */  lhu       $t1, 0xEE($sp)
/* BCAC8 801263C8 00091080 */  sll       $v0, $t1, 2
/* BCACC 801263CC 3C01802F */  lui       $at, %hi(gMsgCharsets)
/* BCAD0 801263D0 00220821 */  addu      $at, $at, $v0
/* BCAD4 801263D4 8C22B5A8 */  lw        $v0, %lo(gMsgCharsets)($at)
/* BCAD8 801263D8 8FA800D8 */  lw        $t0, 0xD8($sp)
/* BCADC 801263DC 90420003 */  lbu       $v0, 0x3($v0)
/* BCAE0 801263E0 01020018 */  mult      $t0, $v0
/* BCAE4 801263E4 8FA90154 */  lw        $t1, 0x154($sp)
/* BCAE8 801263E8 00004012 */  mflo      $t0
/* BCAEC 801263EC AD280000 */  sw        $t0, 0x0($t1)
.L801263F0:
/* BCAF0 801263F0 8FA9015C */  lw        $t1, 0x15C($sp)
/* BCAF4 801263F4 11200003 */  beqz      $t1, .L80126404
/* BCAF8 801263F8 00000000 */   nop
/* BCAFC 801263FC 97A80106 */  lhu       $t0, 0x106($sp)
/* BCB00 80126400 AD280000 */  sw        $t0, 0x0($t1)
.L80126404:
/* BCB04 80126404 8FA90160 */  lw        $t1, 0x160($sp)
/* BCB08 80126408 11200003 */  beqz      $t1, .L80126418
/* BCB0C 8012640C 00000000 */   nop
/* BCB10 80126410 8FA800D8 */  lw        $t0, 0xD8($sp)
/* BCB14 80126414 AD280000 */  sw        $t0, 0x0($t1)
.L80126418:
/* BCB18 80126418 8FA90164 */  lw        $t1, 0x164($sp)
/* BCB1C 8012641C 11200003 */  beqz      $t1, .L8012642C
/* BCB20 80126420 00000000 */   nop
/* BCB24 80126424 97A20108 */  lhu       $v0, 0x108($sp)
/* BCB28 80126428 AD220000 */  sw        $v0, 0x0($t1)
.L8012642C:
/* BCB2C 8012642C 8FA80168 */  lw        $t0, 0x168($sp)
/* BCB30 80126430 11000003 */  beqz      $t0, .L80126440
/* BCB34 80126434 00000000 */   nop
/* BCB38 80126438 97A20116 */  lhu       $v0, 0x116($sp)
/* BCB3C 8012643C AD020000 */  sw        $v0, 0x0($t0)
.L80126440:
/* BCB40 80126440 8FBF0144 */  lw        $ra, 0x144($sp)
/* BCB44 80126444 8FBE0140 */  lw        $fp, 0x140($sp)
/* BCB48 80126448 8FB7013C */  lw        $s7, 0x13C($sp)
/* BCB4C 8012644C 8FB60138 */  lw        $s6, 0x138($sp)
/* BCB50 80126450 8FB50134 */  lw        $s5, 0x134($sp)
/* BCB54 80126454 8FB40130 */  lw        $s4, 0x130($sp)
/* BCB58 80126458 8FB3012C */  lw        $s3, 0x12C($sp)
/* BCB5C 8012645C 8FB20128 */  lw        $s2, 0x128($sp)
/* BCB60 80126460 8FB10124 */  lw        $s1, 0x124($sp)
/* BCB64 80126464 8FB00120 */  lw        $s0, 0x120($sp)
/* BCB68 80126468 D7B40148 */  ldc1      $f20, 0x148($sp)
/* BCB6C 8012646C 03E00008 */  jr        $ra
/* BCB70 80126470 27BD0150 */   addiu    $sp, $sp, 0x150

### DECOMPILED C INSTRUCTIONS:

void get_msg_properties(s32 msgID, s32* height, s32* width, s32* maxLineChars, s32* numLines, s32* maxLinesPerPage, s32* numSpaces, u16 charset) {
    u8* message;
    s32 i;
    u16 pageCount;
    s32 linesOnPage;
    u8 stop;
    s32 lineWidth;
    s32 charCount;
    u16 lineIndex;
    s32 msgStyle;
    s32 functionCode;
    u8 packedScaleY;
    f32 scale;
    s32 temp;

    u16 lineWidths[32];
    u16 lineCharNumbers[32];
    u16 linesPerPage[32];
    s32 lineCount;
    u16 varIndex;
    u16 font;
    u8* buffer;
    u16 maxLineWidth;
    u16 maxCharsPerLine;
    u16 maxLinesOnPage;
    u16 spaceCount;
    u16 endl;

    u8 c;
    u8 prevChar;

    scale = 1.0f;
    c = 0;
    lineIndex = 0;
    pageCount = 0;
    varIndex = 0;
    font = 0;
    buffer = NULL;
    maxLineWidth = 0;
    maxCharsPerLine = 0;
    maxLinesOnPage = 0;
    spaceCount = 0;

    if (msgID == MSG_NONE) {
        return;
    }

    if (msgID >= 0) {
        buffer = general_heap_malloc(0x400);
        dma_load_msg(msgID, buffer);
        message = buffer;
    } else {
        message = (u8*)msgID;
    }

    if (charset & 1) {
        font = 1;
    }

    i = 0;
    stop = FALSE;
    lineWidth = 0;
    linesOnPage = 0;
    charCount = 0;
    endl = TRUE;
    lineCount = 0;

    do {
        prevChar = c;
        c = message[i++];
        switch (c) {
            case MSG_CHAR_READ_VARIANT0:
            case MSG_CHAR_READ_VARIANT1:
            case MSG_CHAR_READ_VARIANT2:
            case MSG_CHAR_READ_VARIANT3:
                varIndex = c - MSG_CHAR_READ_VARIANT0;
                break;
            case MSG_CHAR_READ_PAUSE:
                i++;
                break;
            case MSG_CHAR_READ_WAIT:
            case MSG_CHAR_READ_NEXT:
                if (linesOnPage != 0) {
                    linesPerPage[pageCount] = linesOnPage;
                    pageCount++;
                    if (pageCount >= 32) {
                        stop = 1;
                    }
                    linesOnPage = 0;
                }
                break;
            case MSG_CHAR_READ_ENDL:
                lineWidths[lineIndex] = lineWidth;
                lineCharNumbers[lineIndex] = charCount;
                lineIndex++;
                if (lineIndex >= 32) {
                    stop = 1;
                }
                lineWidth = 0;
                charCount = 0;
                endl = TRUE;
                break;
            case MSG_CHAR_READ_STYLE:
                msgStyle = message[i++];
                switch (msgStyle) {
                    case MSG_STYLE_CHOICE:
                        i += 4;
                        break;
                    case MSG_STYLE_POSTCARD:
                        i++;
                        break;
                    case MSG_STYLE_RIGHT:
                    case MSG_STYLE_LEFT:
                    case MSG_STYLE_CENTER:
                    case MSG_STYLE_TATTLE:
                    case MSG_STYLE_INSPECT:
                    case MSG_STYLE_SIGN:
                    case MSG_STYLE_LAMPPOST:
                    case MSG_STYLE_POPUP:
                    case MSG_STYLE_B:
                        break;
                }
                break;
            case MSG_CHAR_READ_END:
                lineWidths[lineIndex] = lineWidth;
                lineCharNumbers[lineIndex] = charCount;
                lineIndex++;
                stop = TRUE;
                break;
            case MSG_CHAR_READ_FUNCTION:
                functionCode = message[i++];
                switch (functionCode) {
                    case MSG_READ_FUNC_FONT:
                        font = message[i++];
                        break;
                    case MSG_READ_FUNC_RESET_GFX:
                    case MSG_READ_FUNC_NO_SKIP:
                    case MSG_READ_FUNC_INPUT_OFF:
                    case MSG_READ_FUNC_INPUT_ON:
                    case MSG_READ_FUNC_DELAY_OFF:
                    case MSG_READ_FUNC_DELAY_ON:
                    case MSG_READ_FUNC_SAVE_POS:
                    case MSG_READ_FUNC_RESTORE_POS:
                    case MSG_READ_FUNC_SAVE_COLOR:
                    case MSG_READ_FUNC_RESTORE_COLOR:
                    case MSG_READ_FUNC_ENABLE_CDOWN_NEXT:
                        break;
                    default:
                        stop = TRUE;
                        break;
                    case MSG_READ_FUNC_CUSTOM_VOICE:
                        i++;
                        // fallthrough
                    temp = 4;
                    case MSG_READ_FUNC_IMAGE:
                        i += temp;
                        // fallthrough
                    case MSG_READ_FUNC_ANIM_SPRITE:
                    case MSG_READ_FUNC_ANIM_DELAY:
                        i++;
                        // fallthrough
                    case MSG_READ_FUNC_SPEED:
                    case MSG_READ_FUNC_SET_X:
                    case MSG_READ_FUNC_ANIM_LOOP:
                        i++;
                        // fallthrough
                    case MSG_READ_FUNC_COLOR:
                    case MSG_READ_FUNC_SPACING:
                    case MSG_READ_FUNC_SCROLL:
                    case MSG_READ_FUNC_SET_Y:
                    case MSG_READ_FUNC_RIGHT:
                    case MSG_READ_FUNC_DOWN:
                    case MSG_READ_FUNC_UP:
                    case MSG_READ_FUNC_INLINE_IMAGE:
                    case MSG_READ_FUNC_ITEM_ICON:
                    case MSG_READ_FUNC_HIDE_IMAGE:
                    case MSG_READ_FUNC_ANIM_DONE:
                    case MSG_READ_FUNC_CURSOR:
                    case MSG_READ_FUNC_END_CHOICE:
                    case MSG_READ_FUNC_SET_CANCEL:
                    case MSG_READ_FUNC_OPTION:
                    case MSG_READ_FUNC_END_FX:
                    case MSG_READ_FUNC_SET_REWIND:
                    case MSG_READ_FUNC_VOICE:
                        i++;
                        break;
                    case MSG_READ_FUNC_CENTER_X:
                        if (message[i] == 0) {
                            stop = TRUE;
                        }
                        i++;
                        break;
                    case MSG_READ_FUNC_YIELD:
                        if (message[i] == MSG_CHAR_READ_END) {
                            stop = TRUE;
                        }
                        break;
                    case MSG_READ_FUNC_SIZE:
                        packedScaleY = message[i + 1];
                        i += 2;
                        scale = (f32)(packedScaleY >> 4) + ((packedScaleY & 0xF) * 0.0625f);
                        break;
                    case MSG_READ_FUNC_SIZE_RESET:
                        scale = 1.0f;
                        break;
                    case MSG_READ_FUNC_START_FX:
                        switch (message[i++]) {
                            case MSG_FX_STATIC:
                            case MSG_FX_BLUR:
                            case MSG_FX_DITHER_FADE:
                                i++;
                                break;
                            case MSG_FX_SHAKE:
                            case MSG_FX_WAVE:
                            case MSG_FX_NOISE_OUTLINE:
                            case MSG_FX_RAINBOW:
                            case MSG_FX_GLOBAL_WAVE:
                            case MSG_FX_GLOBAL_RAINBOW:
                            case MSG_FX_RISE_PRINT:
                            case MSG_FX_GROW_PRINT:
                            case MSG_FX_SIZE_JITTER:
                            case MSG_FX_SIZE_WAVE:
                            case MSG_FX_DROP_SHADOW:
                                break;
                        }
                        break;
                    case MSG_READ_FUNC_VAR:
                        lineWidth += get_msg_width((s32)gMessageMsgVars[message[i++]], 0);
                        break;
                }
                break;
            case MSG_CHAR_READ_UNK_CHAR_FA:
                break;
            case MSG_CHAR_READ_SPACE:
            case MSG_CHAR_READ_FULL_SPACE:
            case MSG_CHAR_READ_HALF_SPACE:
                spaceCount++;
                // fallthrough
            default:
                if (endl) {
                    lineCount++;
                    linesOnPage++;
                    endl = FALSE;
                }

#if VERSION_IQUE
                if (prevChar >= 0x5f && prevChar <= 0x8F) {
                    break;
                }
#endif

                lineWidth += msg_get_print_char_width(c, font, varIndex, scale, 0, 1);
                charCount++;
                break;
        }
    } while (!stop);

    if (buffer != NULL) {
        general_heap_free(buffer);
    }

    for (i = 0; i < lineIndex; i++) {
        if (maxLineWidth < lineWidths[i]) {
            maxLineWidth = lineWidths[i];
        }
        if (maxCharsPerLine < lineCharNumbers[i]) {
            maxCharsPerLine = lineCharNumbers[i];
        }
    }

    if (pageCount == 0) {
        maxLinesOnPage = linesOnPage;
    } else {
        for (i = 0; i < pageCount; i++) {
            if (maxLinesOnPage < linesPerPage[i]) {
                maxLinesOnPage = linesPerPage[i];
            }
        }
    }

    if (width != NULL) {
        *width = maxLineWidth;
    }
    if (height != NULL) {
        *height = lineCount * gMsgCharsets[font]->newLineY;
    }
    if (maxLineChars != NULL) {
        *maxLineChars = maxCharsPerLine;
    }
    if (numLines != NULL) {
        *numLines = lineCount;
    }
    if (maxLinesPerPage != NULL) {
        *maxLinesPerPage = maxLinesOnPage;
    }
    if (numSpaces != NULL) {
        *numSpaces = spaceCount;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel stop_watch_appendGfx
/* 3CB0F8 E00C4308 27BDFF20 */  addiu     $sp, $sp, -0xE0
/* 3CB0FC E00C430C 0080302D */  daddu     $a2, $a0, $zero
/* 3CB100 E00C4310 3C07DB06 */  lui       $a3, (0xDB060024 >> 16)
/* 3CB104 E00C4314 34E70024 */  ori       $a3, $a3, (0xDB060024 & 0xFFFF)
/* 3CB108 E00C4318 27A40020 */  addiu     $a0, $sp, 0x20
/* 3CB10C E00C431C 3C0F0001 */  lui       $t7, (0x11630 >> 16)
/* 3CB110 E00C4320 35EF1630 */  ori       $t7, $t7, (0x11630 & 0xFFFF)
/* 3CB114 E00C4324 AFB600C8 */  sw        $s6, 0xC8($sp)
/* 3CB118 E00C4328 0000B02D */  daddu     $s6, $zero, $zero
/* 3CB11C E00C432C AFB200B8 */  sw        $s2, 0xB8($sp)
/* 3CB120 E00C4330 3C12800A */  lui       $s2, %hi(gMainGfxPos)
/* 3CB124 E00C4334 2652A66C */  addiu     $s2, $s2, %lo(gMainGfxPos)
/* 3CB128 E00C4338 AFB500C4 */  sw        $s5, 0xC4($sp)
/* 3CB12C E00C433C 02C0A82D */  daddu     $s5, $s6, $zero
/* 3CB130 E00C4340 AFBF00D4 */  sw        $ra, 0xD4($sp)
/* 3CB134 E00C4344 AFBE00D0 */  sw        $fp, 0xD0($sp)
/* 3CB138 E00C4348 AFB700CC */  sw        $s7, 0xCC($sp)
/* 3CB13C E00C434C AFB400C0 */  sw        $s4, 0xC0($sp)
/* 3CB140 E00C4350 AFB300BC */  sw        $s3, 0xBC($sp)
/* 3CB144 E00C4354 AFB100B4 */  sw        $s1, 0xB4($sp)
/* 3CB148 E00C4358 AFB000B0 */  sw        $s0, 0xB0($sp)
/* 3CB14C E00C435C F7B400D8 */  sdc1      $f20, 0xD8($sp)
/* 3CB150 E00C4360 AFAF00A8 */  sw        $t7, 0xA8($sp)
/* 3CB154 E00C4364 8E450000 */  lw        $a1, 0x0($s2)
/* 3CB158 E00C4368 8CDE000C */  lw        $fp, 0xC($a2)
/* 3CB15C E00C436C 00A0182D */  daddu     $v1, $a1, $zero
/* 3CB160 E00C4370 24A50008 */  addiu     $a1, $a1, 0x8
/* 3CB164 E00C4374 AE450000 */  sw        $a1, 0x0($s2)
/* 3CB168 E00C4378 8FD40014 */  lw        $s4, 0x14($fp)
/* 3CB16C E00C437C 8FCF0024 */  lw        $t7, 0x24($fp)
/* 3CB170 E00C4380 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 3CB174 E00C4384 AFAF00A0 */  sw        $t7, 0xA0($sp)
/* 3CB178 E00C4388 AC620000 */  sw        $v0, 0x0($v1)
/* 3CB17C E00C438C AC600004 */  sw        $zero, 0x4($v1)
/* 3CB180 E00C4390 ACA70000 */  sw        $a3, 0x0($a1)
/* 3CB184 E00C4394 8CC30010 */  lw        $v1, 0x10($a2)
/* 3CB188 E00C4398 24A20008 */  addiu     $v0, $a1, 0x8
/* 3CB18C E00C439C AE420000 */  sw        $v0, 0x0($s2)
/* 3CB190 E00C43A0 8C62001C */  lw        $v0, 0x1C($v1)
/* 3CB194 E00C43A4 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 3CB198 E00C43A8 00431021 */  addu      $v0, $v0, $v1
/* 3CB19C E00C43AC 3C03800B */  lui       $v1, %hi(gCameras)
/* 3CB1A0 E00C43B0 24631D80 */  addiu     $v1, $v1, %lo(gCameras)
/* 3CB1A4 E00C43B4 ACA20004 */  sw        $v0, 0x4($a1)
/* 3CB1A8 E00C43B8 8FC50004 */  lw        $a1, 0x4($fp)
/* 3CB1AC E00C43BC 8FC60008 */  lw        $a2, 0x8($fp)
/* 3CB1B0 E00C43C0 3C028007 */  lui       $v0, %hi(gCurrentCameraID)
/* 3CB1B4 E00C43C4 8C427410 */  lw        $v0, %lo(gCurrentCameraID)($v0)
/* 3CB1B8 E00C43C8 8FC7000C */  lw        $a3, 0xC($fp)
/* 3CB1BC E00C43CC 00028080 */  sll       $s0, $v0, 2
/* 3CB1C0 E00C43D0 02028021 */  addu      $s0, $s0, $v0
/* 3CB1C4 E00C43D4 00108080 */  sll       $s0, $s0, 2
/* 3CB1C8 E00C43D8 02028023 */  subu      $s0, $s0, $v0
/* 3CB1CC E00C43DC 001010C0 */  sll       $v0, $s0, 3
/* 3CB1D0 E00C43E0 02028021 */  addu      $s0, $s0, $v0
/* 3CB1D4 E00C43E4 001080C0 */  sll       $s0, $s0, 3
/* 3CB1D8 E00C43E8 0C080108 */  jal       shim_guTranslateF
/* 3CB1DC E00C43EC 02038021 */   addu     $s0, $s0, $v1
/* 3CB1E0 E00C43F0 27B10060 */  addiu     $s1, $sp, 0x60
/* 3CB1E4 E00C43F4 8FC50028 */  lw        $a1, 0x28($fp)
/* 3CB1E8 E00C43F8 0220202D */  daddu     $a0, $s1, $zero
/* 3CB1EC E00C43FC 00A0302D */  daddu     $a2, $a1, $zero
/* 3CB1F0 E00C4400 0C080110 */  jal       shim_guScaleF
/* 3CB1F4 E00C4404 00A0382D */   daddu    $a3, $a1, $zero
/* 3CB1F8 E00C4408 0220202D */  daddu     $a0, $s1, $zero
/* 3CB1FC E00C440C 27A50020 */  addiu     $a1, $sp, 0x20
/* 3CB200 E00C4410 0C080114 */  jal       shim_guMtxCatF
/* 3CB204 E00C4414 00A0302D */   daddu    $a2, $a1, $zero
/* 3CB208 E00C4418 27A40020 */  addiu     $a0, $sp, 0x20
/* 3CB20C E00C441C 3C118007 */  lui       $s1, %hi(gMatrixListPos)
/* 3CB210 E00C4420 263141F0 */  addiu     $s1, $s1, %lo(gMatrixListPos)
/* 3CB214 E00C4424 3C13800A */  lui       $s3, %hi(gDisplayContext)
/* 3CB218 E00C4428 2673A674 */  addiu     $s3, $s3, %lo(gDisplayContext)
/* 3CB21C E00C442C 96250000 */  lhu       $a1, 0x0($s1)
/* 3CB220 E00C4430 8E620000 */  lw        $v0, 0x0($s3)
/* 3CB224 E00C4434 8FAF00A8 */  lw        $t7, 0xA8($sp)
/* 3CB228 E00C4438 00052980 */  sll       $a1, $a1, 6
/* 3CB22C E00C443C 00AF2821 */  addu      $a1, $a1, $t7
/* 3CB230 E00C4440 0C080118 */  jal       shim_guMtxF2L
/* 3CB234 E00C4444 00452821 */   addu     $a1, $v0, $a1
/* 3CB238 E00C4448 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 3CB23C E00C444C 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 3CB240 E00C4450 3C06DA38 */  lui       $a2, (0xDA380001 >> 16)
/* 3CB244 E00C4454 34C60001 */  ori       $a2, $a2, (0xDA380001 & 0xFFFF)
/* 3CB248 E00C4458 00141080 */  sll       $v0, $s4, 2
/* 3CB24C E00C445C 00541021 */  addu      $v0, $v0, $s4
/* 3CB250 E00C4460 0002A040 */  sll       $s4, $v0, 1
/* 3CB254 E00C4464 0280B82D */  daddu     $s7, $s4, $zero
/* 3CB258 E00C4468 8E440000 */  lw        $a0, 0x0($s2)
/* 3CB25C E00C446C 96220000 */  lhu       $v0, 0x0($s1)
/* 3CB260 E00C4470 0080282D */  daddu     $a1, $a0, $zero
/* 3CB264 E00C4474 24840008 */  addiu     $a0, $a0, 0x8
/* 3CB268 E00C4478 248F0020 */  addiu     $t7, $a0, 0x20
/* 3CB26C E00C447C AFAF00A4 */  sw        $t7, 0xA4($sp)
/* 3CB270 E00C4480 AE440000 */  sw        $a0, 0x0($s2)
/* 3CB274 E00C4484 ACA30000 */  sw        $v1, 0x0($a1)
/* 3CB278 E00C4488 24430001 */  addiu     $v1, $v0, 0x1
/* 3CB27C E00C448C 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3CB280 E00C4490 00021180 */  sll       $v0, $v0, 6
/* 3CB284 E00C4494 A6230000 */  sh        $v1, 0x0($s1)
/* 3CB288 E00C4498 8FAF00A8 */  lw        $t7, 0xA8($sp)
/* 3CB28C E00C449C 8E630000 */  lw        $v1, 0x0($s3)
/* 3CB290 E00C44A0 004F1021 */  addu      $v0, $v0, $t7
/* 3CB294 E00C44A4 00621821 */  addu      $v1, $v1, $v0
/* 3CB298 E00C44A8 24820008 */  addiu     $v0, $a0, 0x8
/* 3CB29C E00C44AC ACA30004 */  sw        $v1, 0x4($a1)
/* 3CB2A0 E00C44B0 AE420000 */  sw        $v0, 0x0($s2)
/* 3CB2A4 E00C44B4 24820010 */  addiu     $v0, $a0, 0x10
/* 3CB2A8 E00C44B8 AC860000 */  sw        $a2, 0x0($a0)
/* 3CB2AC E00C44BC AE420000 */  sw        $v0, 0x0($s2)
/* 3CB2B0 E00C44C0 8E030204 */  lw        $v1, 0x204($s0)
/* 3CB2B4 E00C44C4 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 3CB2B8 E00C44C8 AC820008 */  sw        $v0, 0x8($a0)
/* 3CB2BC E00C44CC 3C020900 */  lui       $v0, %hi(D_09001000_40E290)
/* 3CB2C0 E00C44D0 24421000 */  addiu     $v0, $v0, %lo(D_09001000_40E290)
/* 3CB2C4 E00C44D4 AC82000C */  sw        $v0, 0xC($a0)
/* 3CB2C8 E00C44D8 24820018 */  addiu     $v0, $a0, 0x18
/* 3CB2CC E00C44DC AE420000 */  sw        $v0, 0x0($s2)
/* 3CB2D0 E00C44E0 3C02FB00 */  lui       $v0, (0xFB000000 >> 16)
/* 3CB2D4 E00C44E4 AC820010 */  sw        $v0, 0x10($a0)
/* 3CB2D8 E00C44E8 AC830004 */  sw        $v1, 0x4($a0)
/* 3CB2DC E00C44EC 93C3002F */  lbu       $v1, 0x2F($fp)
/* 3CB2E0 E00C44F0 3C02DE01 */  lui       $v0, (0xDE010000 >> 16)
/* 3CB2E4 E00C44F4 AC820018 */  sw        $v0, 0x18($a0)
/* 3CB2E8 E00C44F8 24820220 */  addiu     $v0, $a0, 0x220
/* 3CB2EC E00C44FC AC82001C */  sw        $v0, 0x1C($a0)
/* 3CB2F0 E00C4500 AE420000 */  sw        $v0, 0x0($s2)
/* 3CB2F4 E00C4504 AC830014 */  sw        $v1, 0x14($a0)
.LE00C4508:
/* 3CB2F8 E00C4508 00168140 */  sll       $s0, $s6, 5
/* 3CB2FC E00C450C 44976000 */  mtc1      $s7, $f12
/* 3CB300 E00C4510 00000000 */  nop
/* 3CB304 E00C4514 46806320 */  cvt.s.w   $f12, $f12
/* 3CB308 E00C4518 8FAF00A4 */  lw        $t7, 0xA4($sp)
/* 3CB30C E00C451C C7D40030 */  lwc1      $f20, 0x30($fp)
/* 3CB310 E00C4520 0C080140 */  jal       shim_sin_deg
/* 3CB314 E00C4524 01F08021 */   addu     $s0, $t7, $s0
/* 3CB318 E00C4528 3C0143FA */  lui       $at, (0x43FA0000 >> 16)
/* 3CB31C E00C452C 44811000 */  mtc1      $at, $f2
/* 3CB320 E00C4530 00000000 */  nop
/* 3CB324 E00C4534 46020002 */  mul.s     $f0, $f0, $f2
/* 3CB328 E00C4538 00000000 */  nop
/* 3CB32C E00C453C 46140002 */  mul.s     $f0, $f0, $f20
/* 3CB330 E00C4540 00000000 */  nop
/* 3CB334 E00C4544 44946000 */  mtc1      $s4, $f12
/* 3CB338 E00C4548 00000000 */  nop
/* 3CB33C E00C454C 46806320 */  cvt.s.w   $f12, $f12
/* 3CB340 E00C4550 4600010D */  trunc.w.s $f4, $f0
/* 3CB344 E00C4554 44112000 */  mfc1      $s1, $f4
/* 3CB348 E00C4558 0C080140 */  jal       shim_sin_deg
/* 3CB34C E00C455C 26940006 */   addiu    $s4, $s4, 0x6
/* 3CB350 E00C4560 3C014348 */  lui       $at, (0x43480000 >> 16)
/* 3CB354 E00C4564 44811000 */  mtc1      $at, $f2
/* 3CB358 E00C4568 26F7003C */  addiu     $s7, $s7, 0x3C
/* 3CB35C E00C456C 46020002 */  mul.s     $f0, $f0, $f2
/* 3CB360 E00C4570 00000000 */  nop
/* 3CB364 E00C4574 001619C0 */  sll       $v1, $s6, 7
/* 3CB368 E00C4578 26D60001 */  addiu     $s6, $s6, 0x1
/* 3CB36C E00C457C 2622F380 */  addiu     $v0, $s1, -0xC80
/* 3CB370 E00C4580 26310C80 */  addiu     $s1, $s1, 0xC80
/* 3CB374 E00C4584 46140002 */  mul.s     $f0, $f0, $f20
/* 3CB378 E00C4588 00000000 */  nop
/* 3CB37C E00C458C A6020000 */  sh        $v0, 0x0($s0)
/* 3CB380 E00C4590 A6000004 */  sh        $zero, 0x4($s0)
/* 3CB384 E00C4594 A6000008 */  sh        $zero, 0x8($s0)
/* 3CB388 E00C4598 A603000A */  sh        $v1, 0xA($s0)
/* 3CB38C E00C459C 4600010D */  trunc.w.s $f4, $f0
/* 3CB390 E00C45A0 44022000 */  mfc1      $v0, $f4
/* 3CB394 E00C45A4 00000000 */  nop
/* 3CB398 E00C45A8 02A21021 */  addu      $v0, $s5, $v0
/* 3CB39C E00C45AC 2442F448 */  addiu     $v0, $v0, -0xBB8
/* 3CB3A0 E00C45B0 A6020002 */  sh        $v0, 0x2($s0)
/* 3CB3A4 E00C45B4 26100010 */  addiu     $s0, $s0, 0x10
/* 3CB3A8 E00C45B8 26B50190 */  addiu     $s5, $s5, 0x190
/* 3CB3AC E00C45BC A6020002 */  sh        $v0, 0x2($s0)
/* 3CB3B0 E00C45C0 24020800 */  addiu     $v0, $zero, 0x800
/* 3CB3B4 E00C45C4 A6020008 */  sh        $v0, 0x8($s0)
/* 3CB3B8 E00C45C8 2AC20010 */  slti      $v0, $s6, 0x10
/* 3CB3BC E00C45CC A6110000 */  sh        $s1, 0x0($s0)
/* 3CB3C0 E00C45D0 A6000004 */  sh        $zero, 0x4($s0)
/* 3CB3C4 E00C45D4 1440FFCC */  bnez      $v0, .LE00C4508
/* 3CB3C8 E00C45D8 A603000A */   sh       $v1, 0xA($s0)
/* 3CB3CC E00C45DC 27A40020 */  addiu     $a0, $sp, 0x20
/* 3CB3D0 E00C45E0 3C130001 */  lui       $s3, (0x11630 >> 16)
/* 3CB3D4 E00C45E4 36731630 */  ori       $s3, $s3, (0x11630 & 0xFFFF)
/* 3CB3D8 E00C45E8 0000B02D */  daddu     $s6, $zero, $zero
/* 3CB3DC E00C45EC 3C10800A */  lui       $s0, %hi(gMainGfxPos)
/* 3CB3E0 E00C45F0 2610A66C */  addiu     $s0, $s0, %lo(gMainGfxPos)
/* 3CB3E4 E00C45F4 3C013C23 */  lui       $at, (0x3C23D70A >> 16)
/* 3CB3E8 E00C45F8 3421D70A */  ori       $at, $at, (0x3C23D70A & 0xFFFF)
/* 3CB3EC E00C45FC 44810000 */  mtc1      $at, $f0
/* 3CB3F0 E00C4600 8E020000 */  lw        $v0, 0x0($s0)
/* 3CB3F4 E00C4604 3C03DE01 */  lui       $v1, (0xDE010000 >> 16)
/* 3CB3F8 E00C4608 AC430000 */  sw        $v1, 0x0($v0)
/* 3CB3FC E00C460C 244300A0 */  addiu     $v1, $v0, 0xA0
/* 3CB400 E00C4610 AC430004 */  sw        $v1, 0x4($v0)
/* 3CB404 E00C4614 24420008 */  addiu     $v0, $v0, 0x8
/* 3CB408 E00C4618 44050000 */  mfc1      $a1, $f0
/* 3CB40C E00C461C 0040A82D */  daddu     $s5, $v0, $zero
/* 3CB410 E00C4620 AE020000 */  sw        $v0, 0x0($s0)
/* 3CB414 E00C4624 00A0302D */  daddu     $a2, $a1, $zero
/* 3CB418 E00C4628 0C080110 */  jal       shim_guScaleF
/* 3CB41C E00C462C 00A0382D */   daddu    $a3, $a1, $zero
/* 3CB420 E00C4630 27A40020 */  addiu     $a0, $sp, 0x20
/* 3CB424 E00C4634 3C118007 */  lui       $s1, %hi(gMatrixListPos)
/* 3CB428 E00C4638 263141F0 */  addiu     $s1, $s1, %lo(gMatrixListPos)
/* 3CB42C E00C463C 3C12800A */  lui       $s2, %hi(gDisplayContext)
/* 3CB430 E00C4640 2652A674 */  addiu     $s2, $s2, %lo(gDisplayContext)
/* 3CB434 E00C4644 96250000 */  lhu       $a1, 0x0($s1)
/* 3CB438 E00C4648 8E420000 */  lw        $v0, 0x0($s2)
/* 3CB43C E00C464C 00052980 */  sll       $a1, $a1, 6
/* 3CB440 E00C4650 00B32821 */  addu      $a1, $a1, $s3
/* 3CB444 E00C4654 0C080118 */  jal       shim_guMtxF2L
/* 3CB448 E00C4658 00452821 */   addu     $a1, $v0, $a1
/* 3CB44C E00C465C 3C060102 */  lui       $a2, (0x1020040 >> 16)
/* 3CB450 E00C4660 34C60040 */  ori       $a2, $a2, (0x1020040 & 0xFFFF)
/* 3CB454 E00C4664 3C0B0600 */  lui       $t3, (0x6000000 >> 16)
/* 3CB458 E00C4668 240A0001 */  addiu     $t2, $zero, 0x1
/* 3CB45C E00C466C 3C0E0606 */  lui       $t6, (0x6060402 >> 16)
/* 3CB460 E00C4670 35CE0402 */  ori       $t6, $t6, (0x6060402 & 0xFFFF)
/* 3CB464 E00C4674 3C0D0002 */  lui       $t5, (0x20406 >> 16)
/* 3CB468 E00C4678 35AD0406 */  ori       $t5, $t5, (0x20406 & 0xFFFF)
/* 3CB46C E00C467C 3C0C0006 */  lui       $t4, (0x60804 >> 16)
/* 3CB470 E00C4680 358C0804 */  ori       $t4, $t4, (0x60804 & 0xFFFF)
/* 3CB474 E00C4684 24080004 */  addiu     $t0, $zero, 0x4
/* 3CB478 E00C4688 8E040000 */  lw        $a0, 0x0($s0)
/* 3CB47C E00C468C 24090006 */  addiu     $t1, $zero, 0x6
/* 3CB480 E00C4690 0080282D */  daddu     $a1, $a0, $zero
/* 3CB484 E00C4694 24840008 */  addiu     $a0, $a0, 0x8
/* 3CB488 E00C4698 AE040000 */  sw        $a0, 0x0($s0)
/* 3CB48C E00C469C 96220000 */  lhu       $v0, 0x0($s1)
/* 3CB490 E00C46A0 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 3CB494 E00C46A4 ACA30000 */  sw        $v1, 0x0($a1)
/* 3CB498 E00C46A8 004A1821 */  addu      $v1, $v0, $t2
/* 3CB49C E00C46AC 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3CB4A0 E00C46B0 01221004 */  sllv      $v0, $v0, $t1
/* 3CB4A4 E00C46B4 A6230000 */  sh        $v1, 0x0($s1)
/* 3CB4A8 E00C46B8 8E430000 */  lw        $v1, 0x0($s2)
/* 3CB4AC E00C46BC 00531021 */  addu      $v0, $v0, $s3
/* 3CB4B0 E00C46C0 00621821 */  addu      $v1, $v1, $v0
/* 3CB4B4 E00C46C4 24820008 */  addiu     $v0, $a0, 0x8
/* 3CB4B8 E00C46C8 ACA30004 */  sw        $v1, 0x4($a1)
/* 3CB4BC E00C46CC AE020000 */  sw        $v0, 0x0($s0)
/* 3CB4C0 E00C46D0 AC860000 */  sw        $a2, 0x0($a0)
/* 3CB4C4 E00C46D4 8FAF00A4 */  lw        $t7, 0xA4($sp)
/* 3CB4C8 E00C46D8 24070002 */  addiu     $a3, $zero, 0x2
/* 3CB4CC E00C46DC AC8F0004 */  sw        $t7, 0x4($a0)
.LE00C46E0:
/* 3CB4D0 E00C46E0 8E040000 */  lw        $a0, 0x0($s0)
/* 3CB4D4 E00C46E4 00162840 */  sll       $a1, $s6, 1
/* 3CB4D8 E00C46E8 24820008 */  addiu     $v0, $a0, 0x8
/* 3CB4DC E00C46EC 14A00004 */  bnez      $a1, .LE00C4700
/* 3CB4E0 E00C46F0 AE020000 */   sw       $v0, 0x0($s0)
/* 3CB4E4 E00C46F4 00161440 */  sll       $v0, $s6, 17
/* 3CB4E8 E00C46F8 080311CA */  j         .LE00C4728
/* 3CB4EC E00C46FC 34420402 */   ori      $v0, $v0, 0x402
.LE00C4700:
/* 3CB4F0 E00C4700 14AA0003 */  bne       $a1, $t2, .LE00C4710
/* 3CB4F4 E00C4704 30E200FF */   andi     $v0, $a3, 0xFF
/* 3CB4F8 E00C4708 080311CC */  j         .LE00C4730
/* 3CB4FC E00C470C AC8E0000 */   sw       $t6, 0x0($a0)
.LE00C4710:
/* 3CB500 E00C4710 00021400 */  sll       $v0, $v0, 16
/* 3CB504 E00C4714 00161A80 */  sll       $v1, $s6, 10
/* 3CB508 E00C4718 3063FC00 */  andi      $v1, $v1, 0xFC00
/* 3CB50C E00C471C 00431025 */  or        $v0, $v0, $v1
/* 3CB510 E00C4720 310300FF */  andi      $v1, $t0, 0xFF
/* 3CB514 E00C4724 00431025 */  or        $v0, $v0, $v1
.LE00C4728:
/* 3CB518 E00C4728 004B1025 */  or        $v0, $v0, $t3
/* 3CB51C E00C472C AC820000 */  sw        $v0, 0x0($a0)
.LE00C4730:
/* 3CB520 E00C4730 14A00003 */  bnez      $a1, .LE00C4740
/* 3CB524 E00C4734 00000000 */   nop
/* 3CB528 E00C4738 080311DB */  j         .LE00C476C
/* 3CB52C E00C473C AC8D0004 */   sw       $t5, 0x4($a0)
.LE00C4740:
/* 3CB530 E00C4740 14AA0003 */  bne       $a1, $t2, .LE00C4750
/* 3CB534 E00C4744 312200FF */   andi     $v0, $t1, 0xFF
/* 3CB538 E00C4748 080311DB */  j         .LE00C476C
/* 3CB53C E00C474C AC8C0004 */   sw       $t4, 0x4($a0)
.LE00C4750:
/* 3CB540 E00C4750 00021400 */  sll       $v0, $v0, 16
/* 3CB544 E00C4754 30E300FF */  andi      $v1, $a3, 0xFF
/* 3CB548 E00C4758 00031A00 */  sll       $v1, $v1, 8
/* 3CB54C E00C475C 00431025 */  or        $v0, $v0, $v1
/* 3CB550 E00C4760 310300FF */  andi      $v1, $t0, 0xFF
/* 3CB554 E00C4764 00431025 */  or        $v0, $v0, $v1
/* 3CB558 E00C4768 AC820004 */  sw        $v0, 0x4($a0)
.LE00C476C:
/* 3CB55C E00C476C 25080004 */  addiu     $t0, $t0, 0x4
/* 3CB560 E00C4770 24E70004 */  addiu     $a3, $a3, 0x4
/* 3CB564 E00C4774 26D60001 */  addiu     $s6, $s6, 0x1
/* 3CB568 E00C4778 2AC2000F */  slti      $v0, $s6, 0xF
/* 3CB56C E00C477C 1440FFD8 */  bnez      $v0, .LE00C46E0
/* 3CB570 E00C4780 25290004 */   addiu    $t1, $t1, 0x4
/* 3CB574 E00C4784 3C03D838 */  lui       $v1, (0xD8380002 >> 16)
/* 3CB578 E00C4788 34630002 */  ori       $v1, $v1, (0xD8380002 & 0xFFFF)
/* 3CB57C E00C478C 0000B02D */  daddu     $s6, $zero, $zero
/* 3CB580 E00C4790 3C17E00C */  lui       $s7, %hi(D_E00C49D0)
/* 3CB584 E00C4794 26F749D0 */  addiu     $s7, $s7, %lo(D_E00C49D0)
/* 3CB588 E00C4798 3C14800A */  lui       $s4, %hi(gDisplayContext)
/* 3CB58C E00C479C 2694A674 */  addiu     $s4, $s4, %lo(gDisplayContext)
/* 3CB590 E00C47A0 3C138007 */  lui       $s3, %hi(gMatrixListPos)
/* 3CB594 E00C47A4 267341F0 */  addiu     $s3, $s3, %lo(gMatrixListPos)
/* 3CB598 E00C47A8 3C120001 */  lui       $s2, (0x11630 >> 16)
/* 3CB59C E00C47AC 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* 3CB5A0 E00C47B0 3C02800A */  lui       $v0, %hi(gMainGfxPos)
/* 3CB5A4 E00C47B4 2442A66C */  addiu     $v0, $v0, %lo(gMainGfxPos)
/* 3CB5A8 E00C47B8 0040882D */  daddu     $s1, $v0, $zero
/* 3CB5AC E00C47BC 8E220000 */  lw        $v0, 0x0($s1)
/* 3CB5B0 E00C47C0 03C0802D */  daddu     $s0, $fp, $zero
/* 3CB5B4 E00C47C4 0040202D */  daddu     $a0, $v0, $zero
/* 3CB5B8 E00C47C8 24420008 */  addiu     $v0, $v0, 0x8
/* 3CB5BC E00C47CC AE220000 */  sw        $v0, 0x0($s1)
/* 3CB5C0 E00C47D0 AC830000 */  sw        $v1, 0x0($a0)
/* 3CB5C4 E00C47D4 24030040 */  addiu     $v1, $zero, 0x40
/* 3CB5C8 E00C47D8 AC830004 */  sw        $v1, 0x4($a0)
/* 3CB5CC E00C47DC 24430008 */  addiu     $v1, $v0, 0x8
/* 3CB5D0 E00C47E0 AE230000 */  sw        $v1, 0x0($s1)
/* 3CB5D4 E00C47E4 3C03DF00 */  lui       $v1, (0xDF000000 >> 16)
/* 3CB5D8 E00C47E8 AC430000 */  sw        $v1, 0x0($v0)
/* 3CB5DC E00C47EC AC400004 */  sw        $zero, 0x4($v0)
.LE00C47F0:
/* 3CB5E0 E00C47F0 06C10002 */  bgez      $s6, .LE00C47FC
/* 3CB5E4 E00C47F4 02C0102D */   daddu    $v0, $s6, $zero
/* 3CB5E8 E00C47F8 26C20003 */  addiu     $v0, $s6, 0x3
.LE00C47FC:
/* 3CB5EC E00C47FC 00021083 */  sra       $v0, $v0, 2
/* 3CB5F0 E00C4800 00021080 */  sll       $v0, $v0, 2
/* 3CB5F4 E00C4804 02C21023 */  subu      $v0, $s6, $v0
/* 3CB5F8 E00C4808 00571021 */  addu      $v0, $v0, $s7
/* 3CB5FC E00C480C 90420000 */  lbu       $v0, 0x0($v0)
/* 3CB600 E00C4810 3C01E00C */  lui       $at, (0xE00C4A98 >> 16)
/* 3CB604 E00C4814 D4224A98 */  ldc1      $f2, (0xE00C4A98 & 0xFFFF)($at)
/* 3CB608 E00C4818 44820000 */  mtc1      $v0, $f0
/* 3CB60C E00C481C 00000000 */  nop
/* 3CB610 E00C4820 46800021 */  cvt.d.w   $f0, $f0
/* 3CB614 E00C4824 46220002 */  mul.d     $f0, $f0, $f2
/* 3CB618 E00C4828 00000000 */  nop
/* 3CB61C E00C482C 46200020 */  cvt.s.d   $f0, $f0
/* 3CB620 E00C4830 E7A00010 */  swc1      $f0, 0x10($sp)
/* 3CB624 E00C4834 C6000034 */  lwc1      $f0, 0x34($s0)
/* 3CB628 E00C4838 E7A00014 */  swc1      $f0, 0x14($sp)
/* 3CB62C E00C483C C600005C */  lwc1      $f0, 0x5C($s0)
/* 3CB630 E00C4840 E7A00018 */  swc1      $f0, 0x18($sp)
/* 3CB634 E00C4844 C6000084 */  lwc1      $f0, 0x84($s0)
/* 3CB638 E00C4848 E7A0001C */  swc1      $f0, 0x1C($sp)
/* 3CB63C E00C484C 8E0500AC */  lw        $a1, 0xAC($s0)
/* 3CB640 E00C4850 8E0600D4 */  lw        $a2, 0xD4($s0)
/* 3CB644 E00C4854 8E0700FC */  lw        $a3, 0xFC($s0)
/* 3CB648 E00C4858 0C080180 */  jal       shim_guPositionF
/* 3CB64C E00C485C 27A40020 */   addiu    $a0, $sp, 0x20
/* 3CB650 E00C4860 27A40020 */  addiu     $a0, $sp, 0x20
/* 3CB654 E00C4864 96650000 */  lhu       $a1, 0x0($s3)
/* 3CB658 E00C4868 8E820000 */  lw        $v0, 0x0($s4)
/* 3CB65C E00C486C 00052980 */  sll       $a1, $a1, 6
/* 3CB660 E00C4870 00B22821 */  addu      $a1, $a1, $s2
/* 3CB664 E00C4874 0C080118 */  jal       shim_guMtxF2L
/* 3CB668 E00C4878 00452821 */   addu     $a1, $v0, $a1
/* 3CB66C E00C487C 3C088080 */  lui       $t0, (0x80808081 >> 16)
/* 3CB670 E00C4880 35088081 */  ori       $t0, $t0, (0x80808081 & 0xFFFF)
/* 3CB674 E00C4884 3C0AD838 */  lui       $t2, (0xD8380002 >> 16)
/* 3CB678 E00C4888 3C02DA38 */  lui       $v0, (0xDA380000 >> 16)
/* 3CB67C E00C488C 8E240000 */  lw        $a0, 0x0($s1)
/* 3CB680 E00C4890 96660000 */  lhu       $a2, 0x0($s3)
/* 3CB684 E00C4894 0080282D */  daddu     $a1, $a0, $zero
/* 3CB688 E00C4898 24840008 */  addiu     $a0, $a0, 0x8
/* 3CB68C E00C489C ACA20000 */  sw        $v0, 0x0($a1)
/* 3CB690 E00C48A0 30C2FFFF */  andi      $v0, $a2, 0xFFFF
/* 3CB694 E00C48A4 00021180 */  sll       $v0, $v0, 6
/* 3CB698 E00C48A8 00521021 */  addu      $v0, $v0, $s2
/* 3CB69C E00C48AC 8E830000 */  lw        $v1, 0x0($s4)
/* 3CB6A0 E00C48B0 24C60001 */  addiu     $a2, $a2, 0x1
/* 3CB6A4 E00C48B4 00621821 */  addu      $v1, $v1, $v0
/* 3CB6A8 E00C48B8 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3CB6AC E00C48BC ACA30004 */  sw        $v1, 0x4($a1)
/* 3CB6B0 E00C48C0 AC820000 */  sw        $v0, 0x0($a0)
/* 3CB6B4 E00C48C4 8E050124 */  lw        $a1, 0x124($s0)
/* 3CB6B8 E00C48C8 24820008 */  addiu     $v0, $a0, 0x8
/* 3CB6BC E00C48CC AE240000 */  sw        $a0, 0x0($s1)
/* 3CB6C0 E00C48D0 A6660000 */  sh        $a2, 0x0($s3)
/* 3CB6C4 E00C48D4 AE220000 */  sw        $v0, 0x0($s1)
/* 3CB6C8 E00C48D8 3C03E00C */  lui       $v1, (0xE00C49D4 >> 16)
/* 3CB6CC E00C48DC 00761821 */  addu      $v1, $v1, $s6
/* 3CB6D0 E00C48E0 906349D4 */  lbu       $v1, (0xE00C49D4 & 0xFFFF)($v1)
/* 3CB6D4 E00C48E4 3C06E00C */  lui       $a2, (0xE00C49E8 >> 16)
/* 3CB6D8 E00C48E8 00D63021 */  addu      $a2, $a2, $s6
/* 3CB6DC E00C48EC 90C649E8 */  lbu       $a2, (0xE00C49E8 & 0xFFFF)($a2)
/* 3CB6E0 E00C48F0 3C07E00C */  lui       $a3, (0xE00C49FC >> 16)
/* 3CB6E4 E00C48F4 00F63821 */  addu      $a3, $a3, $s6
/* 3CB6E8 E00C48F8 90E749FC */  lbu       $a3, (0xE00C49FC & 0xFFFF)($a3)
/* 3CB6EC E00C48FC 24820010 */  addiu     $v0, $a0, 0x10
/* 3CB6F0 E00C4900 AE220000 */  sw        $v0, 0x0($s1)
/* 3CB6F4 E00C4904 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 3CB6F8 E00C4908 AC820008 */  sw        $v0, 0x8($a0)
/* 3CB6FC E00C490C 24820018 */  addiu     $v0, $a0, 0x18
/* 3CB700 E00C4910 AC95000C */  sw        $s5, 0xC($a0)
/* 3CB704 E00C4914 AE220000 */  sw        $v0, 0x0($s1)
/* 3CB708 E00C4918 8FAF00A0 */  lw        $t7, 0xA0($sp)
/* 3CB70C E00C491C 354A0002 */  ori       $t2, $t2, (0xD8380002 & 0xFFFF)
/* 3CB710 E00C4920 01E50018 */  mult      $t7, $a1
/* 3CB714 E00C4924 24090040 */  addiu     $t1, $zero, 0x40
/* 3CB718 E00C4928 26100004 */  addiu     $s0, $s0, 0x4
/* 3CB71C E00C492C 26D60001 */  addiu     $s6, $s6, 0x1
/* 3CB720 E00C4930 AC8A0010 */  sw        $t2, 0x10($a0)
/* 3CB724 E00C4934 00002812 */  mflo      $a1
/* 3CB728 E00C4938 AC890014 */  sw        $t1, 0x14($a0)
/* 3CB72C E00C493C 00031E00 */  sll       $v1, $v1, 24
/* 3CB730 E00C4940 00A80018 */  mult      $a1, $t0
/* 3CB734 E00C4944 00063400 */  sll       $a2, $a2, 16
/* 3CB738 E00C4948 00661825 */  or        $v1, $v1, $a2
/* 3CB73C E00C494C 00073A00 */  sll       $a3, $a3, 8
/* 3CB740 E00C4950 00671825 */  or        $v1, $v1, $a3
/* 3CB744 E00C4954 00001010 */  mfhi      $v0
/* 3CB748 E00C4958 00451021 */  addu      $v0, $v0, $a1
/* 3CB74C E00C495C 000211C3 */  sra       $v0, $v0, 7
/* 3CB750 E00C4960 00052FC3 */  sra       $a1, $a1, 31
/* 3CB754 E00C4964 00451023 */  subu      $v0, $v0, $a1
/* 3CB758 E00C4968 304200FF */  andi      $v0, $v0, 0xFF
/* 3CB75C E00C496C 00621825 */  or        $v1, $v1, $v0
/* 3CB760 E00C4970 2AC2000A */  slti      $v0, $s6, 0xA
/* 3CB764 E00C4974 1440FF9E */  bnez      $v0, .LE00C47F0
/* 3CB768 E00C4978 AC830004 */   sw       $v1, 0x4($a0)
/* 3CB76C E00C497C 3C02800A */  lui       $v0, %hi(gMainGfxPos)
/* 3CB770 E00C4980 2442A66C */  addiu     $v0, $v0, %lo(gMainGfxPos)
/* 3CB774 E00C4984 8C430000 */  lw        $v1, 0x0($v0)
/* 3CB778 E00C4988 0060202D */  daddu     $a0, $v1, $zero
/* 3CB77C E00C498C 24630008 */  addiu     $v1, $v1, 0x8
/* 3CB780 E00C4990 AC430000 */  sw        $v1, 0x0($v0)
/* 3CB784 E00C4994 AC8A0000 */  sw        $t2, 0x0($a0)
/* 3CB788 E00C4998 AC890004 */  sw        $t1, 0x4($a0)
/* 3CB78C E00C499C 8FBF00D4 */  lw        $ra, 0xD4($sp)
/* 3CB790 E00C49A0 8FBE00D0 */  lw        $fp, 0xD0($sp)
/* 3CB794 E00C49A4 8FB700CC */  lw        $s7, 0xCC($sp)
/* 3CB798 E00C49A8 8FB600C8 */  lw        $s6, 0xC8($sp)
/* 3CB79C E00C49AC 8FB500C4 */  lw        $s5, 0xC4($sp)
/* 3CB7A0 E00C49B0 8FB400C0 */  lw        $s4, 0xC0($sp)
/* 3CB7A4 E00C49B4 8FB300BC */  lw        $s3, 0xBC($sp)
/* 3CB7A8 E00C49B8 8FB200B8 */  lw        $s2, 0xB8($sp)
/* 3CB7AC E00C49BC 8FB100B4 */  lw        $s1, 0xB4($sp)
/* 3CB7B0 E00C49C0 8FB000B0 */  lw        $s0, 0xB0($sp)
/* 3CB7B4 E00C49C4 D7B400D8 */  ldc1      $f20, 0xD8($sp)
/* 3CB7B8 E00C49C8 03E00008 */  jr        $ra
/* 3CB7BC E00C49CC 27BD00E0 */   addiu    $sp, $sp, 0xE0

### DECOMPILED C INSTRUCTIONS:

void stop_watch_appendGfx(void* effect) {
    StopWatchFXData* data = ((EffectInstance*)effect)->data.stopWatch;
    Camera* camera = &gCameras[gCurrentCameraID];
    s32 unk_14 = data->unk_14;
    s32 unk_24 = data->unk_24;
    Vtx_t* vtxBuffer;
    Gfx* savedGfxPos;
    Matrix4f sp20;
    Matrix4f sp60;
    s32 i;

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

    shim_guTranslateF(sp20, data->unk_04, data->unk_08, data->unk_0C);
    shim_guScaleF(sp60, data->unk_28, data->unk_28, data->unk_28);
    shim_guMtxCatF(sp60, sp20, sp20);
    shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
    gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
    gSPDisplayList(gMainGfxPos++, D_09001000_3CC890);
    gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, data->unk_2C);
    gSPBranchList(gMainGfxPos, &gMainGfxPos[65]);

    vtxBuffer = (Vtx_t*) (gMainGfxPos + 1);
    gMainGfxPos = &gMainGfxPos[65];

    for (i = 0; i < 16; i++) {
        Vtx_t* vtx = &vtxBuffer[i * 2];
        f32 unk_30 = data->unk_30;
        s32 temp_s1 = shim_sin_deg(unk_14 * 10 + i * 60) * 500.0f * unk_30;
        s32 temp_f0 = shim_sin_deg(unk_14 * 10 + i * 6) * 200.0f * unk_30;

        vtx->ob[0] = temp_s1 - 3200;
        vtx->ob[1] = i * 400 + temp_f0 - 3000;
        vtx->ob[2] = 0;
        vtx->tc[0] = 0;
        vtx->tc[1] = i * 128;

        vtx++;

        vtx->ob[0] = temp_s1 + 3200;
        vtx->ob[1] = i * 400 + temp_f0 - 3000;
        vtx->ob[2] = 0;
        vtx->tc[0] = 2048;
        vtx->tc[1] = i * 128;
    }

    gSPBranchList(gMainGfxPos, &gMainGfxPos[20]);

    gMainGfxPos++;
    savedGfxPos = gMainGfxPos;

    shim_guScaleF(sp20, 0.01f, 0.01f, 0.01f);
    shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
    gSPVertex(gMainGfxPos++, vtxBuffer, 32, 0);

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

    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    gSPEndDisplayList(gMainGfxPos++);

    for (i = 0; i < 10; i++) {
        shim_guPositionF(sp20, data->unk_AC[i], data->unk_D4[i], data->unk_FC[i], D_E00C49D0[i % 4] * 0.01, data->unk_34[i], data->unk_5C[i], data->unk_84[i]);
        shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

        gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
        gDPSetPrimColor(gMainGfxPos++, 0, 0, D_E00C49D4[i], D_E00C49E8[i], D_E00C49FC[i], unk_24 * data->unk_124[i] / 255);
        gSPDisplayList(gMainGfxPos++, savedGfxPos);
        gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    }

    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_80249380
/* 169BE0 80249380 27BDFFB8 */  addiu     $sp, $sp, -0x48
/* 169BE4 80249384 0080482D */  daddu     $t1, $a0, $zero
/* 169BE8 80249388 AFB5003C */  sw        $s5, 0x3C($sp)
/* 169BEC 8024938C 00A0A82D */  daddu     $s5, $a1, $zero
/* 169BF0 80249390 AFB60040 */  sw        $s6, 0x40($sp)
/* 169BF4 80249394 8FAA0058 */  lw        $t2, 0x58($sp)
/* 169BF8 80249398 3C038025 */  lui       $v1, %hi(D_8024B7CC)
.L8024939C:
/* 169BFC 8024939C 2463B7CC */  addiu     $v1, $v1, %lo(D_8024B7CC)
end_01_D_802493A0_E0E700:
/* 169C00 802493A0 AFBF0044 */  sw        $ra, 0x44($sp)
/* 169C04 802493A4 AFB40038 */  sw        $s4, 0x38($sp)
/* 169C08 802493A8 AFB30034 */  sw        $s3, 0x34($sp)
.L802493AC:
/* 169C0C 802493AC AFB20030 */  sw        $s2, 0x30($sp)
/* 169C10 802493B0 AFB1002C */  sw        $s1, 0x2C($sp)
/* 169C14 802493B4 AFB00028 */  sw        $s0, 0x28($sp)
/* 169C18 802493B8 8C620000 */  lw        $v0, 0x0($v1)
/* 169C1C 802493BC 8FAD005C */  lw        $t5, 0x5C($sp)
/* 169C20 802493C0 10E20004 */  beq       $a3, $v0, .L802493D4
/* 169C24 802493C4 00C0B02D */   daddu    $s6, $a2, $zero
/* 169C28 802493C8 AC670000 */  sw        $a3, 0x0($v1)
/* 169C2C 802493CC 3C018025 */  lui       $at, %hi(D_8024B7D0)
/* 169C30 802493D0 AC20B7D0 */  sw        $zero, %lo(D_8024B7D0)($at)
.L802493D4:
/* 169C34 802493D4 3C058025 */  lui       $a1, %hi(D_8024B7D0)
/* 169C38 802493D8 24A5B7D0 */  addiu     $a1, $a1, %lo(D_8024B7D0)
.L802493DC:
/* 169C3C 802493DC 8C630000 */  lw        $v1, 0x0($v1)
jtbl_802493E0:
/* 169C40 802493E0 8CA40000 */  lw        $a0, 0x0($a1)
/* 169C44 802493E4 00031880 */  sll       $v1, $v1, 2
/* 169C48 802493E8 00041040 */  sll       $v0, $a0, 1
/* 169C4C 802493EC 00441021 */  addu      $v0, $v0, $a0
/* 169C50 802493F0 3C01802F */  lui       $at, %hi(gMsgCharsets)
/* 169C54 802493F4 00230821 */  addu      $at, $at, $v1
/* 169C58 802493F8 8C23B5A8 */  lw        $v1, %lo(gMsgCharsets)($at)
/* 169C5C 802493FC 00021080 */  sll       $v0, $v0, 2
/* 169C60 80249400 8C640008 */  lw        $a0, 0x8($v1)
/* 169C64 80249404 90720000 */  lbu       $s2, 0x0($v1)
/* 169C68 80249408 90730001 */  lbu       $s3, 0x1($v1)
/* 169C6C 8024940C 946B0004 */  lhu       $t3, 0x4($v1)
/* 169C70 80249410 00822021 */  addu      $a0, $a0, $v0
/* 169C74 80249414 292200A2 */  slti      $v0, $t1, 0xA2
/* 169C78 80249418 90940008 */  lbu       $s4, 0x8($a0)
.L8024941C:
/* 169C7C 8024941C 8C8C0000 */  lw        $t4, 0x0($a0)
jtbl_80249420:
/* 169C80 80249420 10400130 */  beqz      $v0, D_802498E4
/* 169C84 80249424 240200F7 */   addiu    $v0, $zero, 0xF7
/* 169C88 80249428 3C08800A */  lui       $t0, %hi(gMainGfxPos)
/* 169C8C 8024942C 2508A66C */  addiu     $t0, $t0, %lo(gMainGfxPos)
/* 169C90 80249430 8C820004 */  lw        $v0, 0x4($a0)
/* 169C94 80249434 8D040000 */  lw        $a0, 0x0($t0)
/* 169C98 80249438 3C038025 */  lui       $v1, %hi(D_8024B7C8)
/* 169C9C 8024943C 8C63B7C8 */  lw        $v1, %lo(D_8024B7C8)($v1)
end_01_CreditsData:
/* 169CA0 80249440 00491021 */  addu      $v0, $v0, $t1
/* 169CA4 80249444 90540000 */  lbu       $s4, 0x0($v0)
/* 169CA8 80249448 1083000A */  beq       $a0, $v1, .L80249474
/* 169CAC 8024944C 24820008 */   addiu    $v0, $a0, 0x8
/* 169CB0 80249450 AD020000 */  sw        $v0, 0x0($t0)
/* 169CB4 80249454 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 169CB8 80249458 AC820000 */  sw        $v0, 0x0($a0)
/* 169CBC 8024945C 3C028025 */  lui       $v0, %hi(D_8024B760)
/* 169CC0 80249460 2442B760 */  addiu     $v0, $v0, %lo(D_8024B760)
/* 169CC4 80249464 AC820004 */  sw        $v0, 0x4($a0)
/* 169CC8 80249468 2402FFFF */  addiu     $v0, $zero, -0x1
/* 169CCC 8024946C 3C018025 */  lui       $at, %hi(D_8024B7D4)
/* 169CD0 80249470 AC22B7D4 */  sw        $v0, %lo(D_8024B7D4)($at)
.L80249474:
/* 169CD4 80249474 3C048025 */  lui       $a0, %hi(D_8024B7D4)
/* 169CD8 80249478 2484B7D4 */  addiu     $a0, $a0, %lo(D_8024B7D4)
/* 169CDC 8024947C 8C820000 */  lw        $v0, 0x0($a0)
/* 169CE0 80249480 104A0029 */  beq       $v0, $t2, .L80249528
D_80249484:
/* 169CE4 80249484 3C06F500 */   lui      $a2, (0xF5000100 >> 16)
/* 169CE8 80249488 34C60100 */  ori       $a2, $a2, (0xF5000100 & 0xFFFF)
.L8024948C:
/* 169CEC 8024948C 3C070703 */  lui       $a3, (0x703C000 >> 16)
/* 169CF0 80249490 34E7C000 */  ori       $a3, $a3, (0x703C000 & 0xFFFF)
/* 169CF4 80249494 8D030000 */  lw        $v1, 0x0($t0)
/* 169CF8 80249498 3C02FD10 */  lui       $v0, (0xFD100000 >> 16)
/* 169CFC 8024949C AC8A0000 */  sw        $t2, 0x0($a0)
/* 169D00 802494A0 3C04802F */  lui       $a0, %hi(D_802F4560)
/* 169D04 802494A4 24844560 */  addiu     $a0, $a0, %lo(D_802F4560)
.L802494A8:
/* 169D08 802494A8 0060282D */  daddu     $a1, $v1, $zero
.L802494AC:
/* 169D0C 802494AC 24630008 */  addiu     $v1, $v1, 0x8
/* 169D10 802494B0 AD030000 */  sw        $v1, 0x0($t0)
/* 169D14 802494B4 ACA20000 */  sw        $v0, 0x0($a1)
/* 169D18 802494B8 000A1100 */  sll       $v0, $t2, 4
/* 169D1C 802494BC 00441021 */  addu      $v0, $v0, $a0
.L802494C0:
/* 169D20 802494C0 ACA20004 */  sw        $v0, 0x4($a1)
/* 169D24 802494C4 24620008 */  addiu     $v0, $v1, 0x8
/* 169D28 802494C8 AD020000 */  sw        $v0, 0x0($t0)
/* 169D2C 802494CC 3C02E800 */  lui       $v0, (0xE8000000 >> 16)
/* 169D30 802494D0 AC620000 */  sw        $v0, 0x0($v1)
/* 169D34 802494D4 24620010 */  addiu     $v0, $v1, 0x10
/* 169D38 802494D8 AC600004 */  sw        $zero, 0x4($v1)
/* 169D3C 802494DC AD020000 */  sw        $v0, 0x0($t0)
/* 169D40 802494E0 3C020700 */  lui       $v0, (0x7000000 >> 16)
/* 169D44 802494E4 AC62000C */  sw        $v0, 0xC($v1)
/* 169D48 802494E8 24620018 */  addiu     $v0, $v1, 0x18
/* 169D4C 802494EC AC660008 */  sw        $a2, 0x8($v1)
.L802494F0:
/* 169D50 802494F0 AD020000 */  sw        $v0, 0x0($t0)
/* 169D54 802494F4 3C02E600 */  lui       $v0, (0xE6000000 >> 16)
/* 169D58 802494F8 AC620010 */  sw        $v0, 0x10($v1)
D_802494FC:
/* 169D5C 802494FC 24620020 */  addiu     $v0, $v1, 0x20
/* 169D60 80249500 AC600014 */  sw        $zero, 0x14($v1)
/* 169D64 80249504 AD020000 */  sw        $v0, 0x0($t0)
/* 169D68 80249508 3C02F000 */  lui       $v0, (0xF0000000 >> 16)
.L8024950C:
/* 169D6C 8024950C AC620018 */  sw        $v0, 0x18($v1)
/* 169D70 80249510 24620028 */  addiu     $v0, $v1, 0x28
/* 169D74 80249514 AC67001C */  sw        $a3, 0x1C($v1)
/* 169D78 80249518 AD020000 */  sw        $v0, 0x0($t0)
/* 169D7C 8024951C 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 169D80 80249520 AC620020 */  sw        $v0, 0x20($v1)
/* 169D84 80249524 AC600024 */  sw        $zero, 0x24($v1)
.L80249528:
/* 169D88 80249528 2A420010 */  slti      $v0, $s2, 0x10
/* 169D8C 8024952C 1440005E */  bnez      $v0, .L802496A8
/* 169D90 80249530 3242000F */   andi     $v0, $s2, 0xF
/* 169D94 80249534 1440005C */  bnez      $v0, .L802496A8
/* 169D98 80249538 0240202D */   daddu    $a0, $s2, $zero
/* 169D9C 8024953C 3C02FD50 */  lui       $v0, (0xFD500000 >> 16)
/* 169DA0 80249540 3C070700 */  lui       $a3, (0x7000000 >> 16)
D_80249544:
/* 169DA4 80249544 8D050000 */  lw        $a1, 0x0($t0)
/* 169DA8 80249548 01690018 */  mult      $t3, $t1
/* 169DAC 8024954C 00A0182D */  daddu     $v1, $a1, $zero
/* 169DB0 80249550 24A50008 */  addiu     $a1, $a1, 0x8
/* 169DB4 80249554 AD050000 */  sw        $a1, 0x0($t0)
/* 169DB8 80249558 AC620000 */  sw        $v0, 0x0($v1)
.L8024955C:
/* 169DBC 8024955C 24A20008 */  addiu     $v0, $a1, 0x8
/* 169DC0 80249560 AD020000 */  sw        $v0, 0x0($t0)
/* 169DC4 80249564 24A20010 */  addiu     $v0, $a1, 0x10
.L80249568:
/* 169DC8 80249568 AD020000 */  sw        $v0, 0x0($t0)
.L8024956C:
/* 169DCC 8024956C 24A20018 */  addiu     $v0, $a1, 0x18
D_80249570:
/* 169DD0 80249570 AD020000 */  sw        $v0, 0x0($t0)
/* 169DD4 80249574 00007012 */  mflo      $t6
/* 169DD8 80249578 018E1021 */  addu      $v0, $t4, $t6
/* 169DDC 8024957C AC620004 */  sw        $v0, 0x4($v1)
.L80249580:
/* 169DE0 80249580 3C02F550 */  lui       $v0, (0xF5500000 >> 16)
/* 169DE4 80249584 ACA20000 */  sw        $v0, 0x0($a1)
/* 169DE8 80249588 3C02E600 */  lui       $v0, (0xE6000000 >> 16)
/* 169DEC 8024958C ACA20008 */  sw        $v0, 0x8($a1)
.L80249590:
/* 169DF0 80249590 3C02F300 */  lui       $v0, (0xF3000000 >> 16)
.L80249594:
/* 169DF4 80249594 ACA70004 */  sw        $a3, 0x4($a1)
.L80249598:
/* 169DF8 80249598 ACA0000C */  sw        $zero, 0xC($a1)
/* 169DFC 8024959C 06410002 */  bgez      $s2, .L802495A8
/* 169E00 802495A0 ACA20010 */   sw       $v0, 0x10($a1)
/* 169E04 802495A4 2644000F */  addiu     $a0, $s2, 0xF
.L802495A8:
/* 169E08 802495A8 00043103 */  sra       $a2, $a0, 4
D_802495AC:
/* 169E0C 802495AC 18C00002 */  blez      $a2, .L802495B8
/* 169E10 802495B0 24030800 */   addiu    $v1, $zero, 0x800
/* 169E14 802495B4 24C307FF */  addiu     $v1, $a2, 0x7FF
.L802495B8:
/* 169E18 802495B8 02530018 */  mult      $s2, $s3
/* 169E1C 802495BC 00007012 */  mflo      $t6
/* 169E20 802495C0 25C20003 */  addiu     $v0, $t6, 0x3
/* 169E24 802495C4 00021083 */  sra       $v0, $v0, 2
/* 169E28 802495C8 2444FFFF */  addiu     $a0, $v0, -0x1
/* 169E2C 802495CC 28820800 */  slti      $v0, $a0, 0x800
/* 169E30 802495D0 50400001 */  beql      $v0, $zero, .L802495D8
/* 169E34 802495D4 240407FF */   addiu    $a0, $zero, 0x7FF
.L802495D8:
/* 169E38 802495D8 30820FFF */  andi      $v0, $a0, 0xFFF
D_802495DC:
/* 169E3C 802495DC 00021300 */  sll       $v0, $v0, 12
D_802495E0:
/* 169E40 802495E0 18C0000D */  blez      $a2, .L80249618
/* 169E44 802495E4 00472025 */   or       $a0, $v0, $a3
/* 169E48 802495E8 14C00002 */  bnez      $a2, .L802495F4
/* 169E4C 802495EC 0066001A */   div      $zero, $v1, $a2
/* 169E50 802495F0 0007000D */  break     7
.L802495F4:
/* 169E54 802495F4 2401FFFF */  addiu     $at, $zero, -0x1
/* 169E58 802495F8 14C10004 */  bne       $a2, $at, .L8024960C
/* 169E5C 802495FC 3C018000 */   lui      $at, (0x80000000 >> 16)
/* 169E60 80249600 14610002 */  bne       $v1, $at, .L8024960C
.L80249604:
/* 169E64 80249604 00000000 */   nop
/* 169E68 80249608 0006000D */  break     6
.L8024960C:
/* 169E6C 8024960C 00001012 */  mflo      $v0
/* 169E70 80249610 08092587 */  j         func_8024961C
/* 169E74 80249614 30420FFF */   andi     $v0, $v0, 0xFFF
.L80249618:
/* 169E78 80249618 30620FFF */  andi      $v0, $v1, 0xFFF
glabel func_8024961C
/* 169E7C 8024961C 00821025 */  or        $v0, $a0, $v0
/* 169E80 80249620 ACA20014 */  sw        $v0, 0x14($a1)
/* 169E84 80249624 3C05800A */  lui       $a1, %hi(gMainGfxPos)
/* 169E88 80249628 24A5A66C */  addiu     $a1, $a1, %lo(gMainGfxPos)
/* 169E8C 8024962C 8CA40000 */  lw        $a0, 0x0($a1)
/* 169E90 80249630 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 169E94 80249634 0080182D */  daddu     $v1, $a0, $zero
/* 169E98 80249638 24840008 */  addiu     $a0, $a0, 0x8
D_8024963C:
/* 169E9C 8024963C ACA40000 */  sw        $a0, 0x0($a1)
/* 169EA0 80249640 AC620000 */  sw        $v0, 0x0($v1)
/* 169EA4 80249644 24820008 */  addiu     $v0, $a0, 0x8
/* 169EA8 80249648 AC600004 */  sw        $zero, 0x4($v1)
/* 169EAC 8024964C ACA20000 */  sw        $v0, 0x0($a1)
/* 169EB0 80249650 00121043 */  sra       $v0, $s2, 1
/* 169EB4 80249654 24420007 */  addiu     $v0, $v0, 0x7
/* 169EB8 80249658 000210C2 */  srl       $v0, $v0, 3
/* 169EBC 8024965C 00021240 */  sll       $v0, $v0, 9
.L80249660:
/* 169EC0 80249660 3C03F540 */  lui       $v1, (0xF5400000 >> 16)
/* 169EC4 80249664 00431025 */  or        $v0, $v0, $v1
/* 169EC8 80249668 AC820000 */  sw        $v0, 0x0($a0)
/* 169ECC 8024966C 24820010 */  addiu     $v0, $a0, 0x10
/* 169ED0 80249670 AC800004 */  sw        $zero, 0x4($a0)
/* 169ED4 80249674 ACA20000 */  sw        $v0, 0x0($a1)
.L80249678:
/* 169ED8 80249678 3C02F200 */  lui       $v0, (0xF2000000 >> 16)
/* 169EDC 8024967C 2643FFFF */  addiu     $v1, $s2, -0x1
/* 169EE0 80249680 00031880 */  sll       $v1, $v1, 2
/* 169EE4 80249684 30630FFF */  andi      $v1, $v1, 0xFFF
/* 169EE8 80249688 00031B00 */  sll       $v1, $v1, 12
/* 169EEC 8024968C AC820008 */  sw        $v0, 0x8($a0)
/* 169EF0 80249690 2662FFFF */  addiu     $v0, $s3, -0x1
D_80249694:
/* 169EF4 80249694 00021080 */  sll       $v0, $v0, 2
/* 169EF8 80249698 30420FFF */  andi      $v0, $v0, 0xFFF
/* 169EFC 8024969C 00621825 */  or        $v1, $v1, $v0
.L802496A0:
/* 169F00 802496A0 080925EB */  j         .L802497AC
/* 169F04 802496A4 AC83000C */   sw       $v1, 0xC($a0)
.L802496A8:
/* 169F08 802496A8 3C05800A */  lui       $a1, %hi(gMainGfxPos)
/* 169F0C 802496AC 24A5A66C */  addiu     $a1, $a1, %lo(gMainGfxPos)
.L802496B0:
/* 169F10 802496B0 00123043 */  sra       $a2, $s2, 1
/* 169F14 802496B4 24C2FFFF */  addiu     $v0, $a2, -0x1
/* 169F18 802496B8 30420FFF */  andi      $v0, $v0, 0xFFF
/* 169F1C 802496BC 3C03FD48 */  lui       $v1, (0xFD480000 >> 16)
/* 169F20 802496C0 00431025 */  or        $v0, $v0, $v1
/* 169F24 802496C4 24C60007 */  addiu     $a2, $a2, 0x7
/* 169F28 802496C8 000630C2 */  srl       $a2, $a2, 3
/* 169F2C 802496CC 00063240 */  sll       $a2, $a2, 9
/* 169F30 802496D0 2643FFFF */  addiu     $v1, $s2, -0x1
.L802496D4:
/* 169F34 802496D4 8CA40000 */  lw        $a0, 0x0($a1)
/* 169F38 802496D8 01690018 */  mult      $t3, $t1
/* 169F3C 802496DC 0080382D */  daddu     $a3, $a0, $zero
/* 169F40 802496E0 24840008 */  addiu     $a0, $a0, 0x8
/* 169F44 802496E4 ACA40000 */  sw        $a0, 0x0($a1)
/* 169F48 802496E8 ACE20000 */  sw        $v0, 0x0($a3)
/* 169F4C 802496EC 24820008 */  addiu     $v0, $a0, 0x8
D_802496F0:
/* 169F50 802496F0 ACA20000 */  sw        $v0, 0x0($a1)
D_802496F4:
/* 169F54 802496F4 24820010 */  addiu     $v0, $a0, 0x10
.L802496F8:
/* 169F58 802496F8 ACA20000 */  sw        $v0, 0x0($a1)
.L802496FC:
/* 169F5C 802496FC 24820018 */  addiu     $v0, $a0, 0x18
/* 169F60 80249700 ACA20000 */  sw        $v0, 0x0($a1)
/* 169F64 80249704 24820020 */  addiu     $v0, $a0, 0x20
/* 169F68 80249708 ACA20000 */  sw        $v0, 0x0($a1)
/* 169F6C 8024970C 24820028 */  addiu     $v0, $a0, 0x28
/* 169F70 80249710 ACA20000 */  sw        $v0, 0x0($a1)
/* 169F74 80249714 24820030 */  addiu     $v0, $a0, 0x30
/* 169F78 80249718 ACA20000 */  sw        $v0, 0x0($a1)
/* 169F7C 8024971C 2665FFFF */  addiu     $a1, $s3, -0x1
/* 169F80 80249720 00052880 */  sll       $a1, $a1, 2
/* 169F84 80249724 30A50FFF */  andi      $a1, $a1, 0xFFF
/* 169F88 80249728 00007012 */  mflo      $t6
/* 169F8C 8024972C 018E1021 */  addu      $v0, $t4, $t6
/* 169F90 80249730 ACE20004 */  sw        $v0, 0x4($a3)
/* 169F94 80249734 3C02F548 */  lui       $v0, (0xF5480000 >> 16)
/* 169F98 80249738 00C21025 */  or        $v0, $a2, $v0
/* 169F9C 8024973C 3C070700 */  lui       $a3, (0x7000000 >> 16)
/* 169FA0 80249740 AC820000 */  sw        $v0, 0x0($a0)
/* 169FA4 80249744 3C02E600 */  lui       $v0, (0xE6000000 >> 16)
/* 169FA8 80249748 AC820008 */  sw        $v0, 0x8($a0)
/* 169FAC 8024974C 3C02F400 */  lui       $v0, (0xF4000000 >> 16)
D_80249750:
/* 169FB0 80249750 AC820010 */  sw        $v0, 0x10($a0)
/* 169FB4 80249754 00031040 */  sll       $v0, $v1, 1
glabel func_80249758
/* 169FB8 80249758 30420FFF */  andi      $v0, $v0, 0xFFF
/* 169FBC 8024975C 00021300 */  sll       $v0, $v0, 12
/* 169FC0 80249760 AC870004 */  sw        $a3, 0x4($a0)
/* 169FC4 80249764 00A73825 */  or        $a3, $a1, $a3
/* 169FC8 80249768 00471025 */  or        $v0, $v0, $a3
/* 169FCC 8024976C AC820014 */  sw        $v0, 0x14($a0)
/* 169FD0 80249770 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
.L80249774:
/* 169FD4 80249774 AC820018 */  sw        $v0, 0x18($a0)
/* 169FD8 80249778 3C02F540 */  lui       $v0, (0xF5400000 >> 16)
/* 169FDC 8024977C 00C23025 */  or        $a2, $a2, $v0
/* 169FE0 80249780 3C02F200 */  lui       $v0, (0xF2000000 >> 16)
/* 169FE4 80249784 00031880 */  sll       $v1, $v1, 2
/* 169FE8 80249788 30630FFF */  andi      $v1, $v1, 0xFFF
/* 169FEC 8024978C 00031B00 */  sll       $v1, $v1, 12
/* 169FF0 80249790 00651825 */  or        $v1, $v1, $a1
/* 169FF4 80249794 AC80000C */  sw        $zero, 0xC($a0)
/* 169FF8 80249798 AC80001C */  sw        $zero, 0x1C($a0)
/* 169FFC 8024979C AC860020 */  sw        $a2, 0x20($a0)
/* 16A000 802497A0 AC800024 */  sw        $zero, 0x24($a0)
/* 16A004 802497A4 AC820028 */  sw        $v0, 0x28($a0)
/* 16A008 802497A8 AC83002C */  sw        $v1, 0x2C($a0)
.L802497AC:
/* 16A00C 802497AC 11A0003A */  beqz      $t5, func_80249898
glabel func_802497B0
/* 16A010 802497B0 3C0AFCFF */   lui      $t2, (0xFCFF97FF >> 16)
/* 16A014 802497B4 354A97FF */  ori       $t2, $t2, (0xFCFF97FF & 0xFFFF)
/* 16A018 802497B8 3C08FF2D */  lui       $t0, (0xFF2DFEFF >> 16)
/* 16A01C 802497BC 3508FEFF */  ori       $t0, $t0, (0xFF2DFEFF & 0xFFFF)
/* 16A020 802497C0 3C11E200 */  lui       $s1, (0xE200001C >> 16)
/* 16A024 802497C4 3631001C */  ori       $s1, $s1, (0xE200001C & 0xFFFF)
.L802497C8:
/* 16A028 802497C8 3C090050 */  lui       $t1, (0x504340 >> 16)
/* 16A02C 802497CC 35294340 */  ori       $t1, $t1, (0x504340 & 0xFFFF)
glabel func_802497D0
/* 16A030 802497D0 26A40002 */  addiu     $a0, $s5, 0x2
/* 16A034 802497D4 00042080 */  sll       $a0, $a0, 2
.L802497D8:
/* 16A038 802497D8 26C50002 */  addiu     $a1, $s6, 0x2
/* 16A03C 802497DC 00052880 */  sll       $a1, $a1, 2
/* 16A040 802497E0 26460002 */  addiu     $a2, $s2, 0x2
/* 16A044 802497E4 02A63021 */  addu      $a2, $s5, $a2
/* 16A048 802497E8 00063080 */  sll       $a2, $a2, 2
/* 16A04C 802497EC 3C10800A */  lui       $s0, %hi(gMainGfxPos)
/* 16A050 802497F0 2610A66C */  addiu     $s0, $s0, %lo(gMainGfxPos)
.L802497F4:
/* 16A054 802497F4 26670002 */  addiu     $a3, $s3, 0x2
/* 16A058 802497F8 02C73821 */  addu      $a3, $s6, $a3
/* 16A05C 802497FC 8E020000 */  lw        $v0, 0x0($s0)
/* 16A060 80249800 00073880 */  sll       $a3, $a3, 2
glabel func_80249804
/* 16A064 80249804 0040182D */  daddu     $v1, $v0, $zero
/* 16A068 80249808 24420008 */  addiu     $v0, $v0, 0x8
.L8024980C:
/* 16A06C 8024980C AE020000 */  sw        $v0, 0x0($s0)
/* 16A070 80249810 AC6A0000 */  sw        $t2, 0x0($v1)
/* 16A074 80249814 AC680004 */  sw        $t0, 0x4($v1)
/* 16A078 80249818 24430008 */  addiu     $v1, $v0, 0x8
D_8024981C:
/* 16A07C 8024981C AE030000 */  sw        $v1, 0x0($s0)
/* 16A080 80249820 AC510000 */  sw        $s1, 0x0($v0)
/* 16A084 80249824 AC490004 */  sw        $t1, 0x4($v0)
glabel func_80249828
/* 16A088 80249828 24020400 */  addiu     $v0, $zero, 0x400
/* 16A08C 8024982C AFA00010 */  sw        $zero, 0x10($sp)
/* 16A090 80249830 AFA00014 */  sw        $zero, 0x14($sp)
/* 16A094 80249834 AFA00018 */  sw        $zero, 0x18($sp)
/* 16A098 80249838 AFA2001C */  sw        $v0, 0x1C($sp)
/* 16A09C 8024983C 0C090AE8 */  jal       func_80242BA0
/* 16A0A0 80249840 AFA20020 */   sw       $v0, 0x20($sp)
/* 16A0A4 80249844 3C06FCFF */  lui       $a2, (0xFCFFFFFF >> 16)
/* 16A0A8 80249848 34C6FFFF */  ori       $a2, $a2, (0xFCFFFFFF & 0xFFFF)
/* 16A0AC 8024984C 3C05FFFC */  lui       $a1, (0xFFFCF279 >> 16)
.L80249850:
/* 16A0B0 80249850 34A5F279 */  ori       $a1, $a1, (0xFFFCF279 & 0xFFFF)
D_80249854:
/* 16A0B4 80249854 3C070F0A */  lui       $a3, (0xF0A7008 >> 16)
/* 16A0B8 80249858 34E77008 */  ori       $a3, $a3, (0xF0A7008 & 0xFFFF)
/* 16A0BC 8024985C 8E020000 */  lw        $v0, 0x0($s0)
/* 16A0C0 80249860 3C03E700 */  lui       $v1, (0xE7000000 >> 16)
/* 16A0C4 80249864 0040202D */  daddu     $a0, $v0, $zero
.L80249868:
/* 16A0C8 80249868 24420008 */  addiu     $v0, $v0, 0x8
/* 16A0CC 8024986C AE020000 */  sw        $v0, 0x0($s0)
dgb_01_img2_gfx:
/* 16A0D0 80249870 AC830000 */  sw        $v1, 0x0($a0)
.L80249874:
/* 16A0D4 80249874 24430008 */  addiu     $v1, $v0, 0x8
/* 16A0D8 80249878 AC800004 */  sw        $zero, 0x4($a0)
D_8024987C:
/* 16A0DC 8024987C AE030000 */  sw        $v1, 0x0($s0)
/* 16A0E0 80249880 24430010 */  addiu     $v1, $v0, 0x10
.L80249884:
/* 16A0E4 80249884 AC460000 */  sw        $a2, 0x0($v0)
/* 16A0E8 80249888 AC450004 */  sw        $a1, 0x4($v0)
/* 16A0EC 8024988C AE030000 */  sw        $v1, 0x0($s0)
/* 16A0F0 80249890 AC510008 */  sw        $s1, 0x8($v0)
/* 16A0F4 80249894 AC47000C */  sw        $a3, 0xC($v0)
glabel func_80249898
/* 16A0F8 80249898 00152080 */  sll       $a0, $s5, 2
/* 16A0FC 8024989C 00162880 */  sll       $a1, $s6, 2
/* 16A100 802498A0 02B23021 */  addu      $a2, $s5, $s2
/* 16A104 802498A4 00063080 */  sll       $a2, $a2, 2
D_802498A8:
/* 16A108 802498A8 02D33821 */  addu      $a3, $s6, $s3
/* 16A10C 802498AC 00073880 */  sll       $a3, $a3, 2
/* 16A110 802498B0 24020400 */  addiu     $v0, $zero, 0x400
/* 16A114 802498B4 AFA00010 */  sw        $zero, 0x10($sp)
/* 16A118 802498B8 AFA00014 */  sw        $zero, 0x14($sp)
.L802498BC:
/* 16A11C 802498BC AFA00018 */  sw        $zero, 0x18($sp)
/* 16A120 802498C0 AFA2001C */  sw        $v0, 0x1C($sp)
D_802498C4:
/* 16A124 802498C4 0C090AE8 */  jal       func_80242BA0
/* 16A128 802498C8 AFA20020 */   sw       $v0, 0x20($sp)
/* 16A12C 802498CC 3C03800A */  lui       $v1, %hi(gMainGfxPos)
D_802498D0:
/* 16A130 802498D0 8C63A66C */  lw        $v1, %lo(gMainGfxPos)($v1)
D_802498D4:
/* 16A134 802498D4 3C018025 */  lui       $at, %hi(D_8024B7C8)
D_802498D8:
/* 16A138 802498D8 AC23B7C8 */  sw        $v1, %lo(D_8024B7C8)($at)
D_802498DC:
/* 16A13C 802498DC 08092655 */  j         .L80249954
D_802498E0:
/* 16A140 802498E0 0280102D */   daddu    $v0, $s4, $zero
D_802498E4:
/* 16A144 802498E4 15220003 */  bne       $t1, $v0, D_802498F4
D_802498E8:
/* 16A148 802498E8 240200F4 */   addiu    $v0, $zero, 0xF4
D_802498EC:
/* 16A14C 802498EC 08092655 */  j         .L80249954
dgb_01_img3_png:
/* 16A150 802498F0 2682FFFA */   addiu    $v0, $s4, -0x6
D_802498F4:
/* 16A154 802498F4 11220010 */  beq       $t1, $v0, .L80249938
D_802498F8:
/* 16A158 802498F8 292200F5 */   slti     $v0, $t1, 0xF5
D_802498FC:
/* 16A15C 802498FC 10400005 */  beqz      $v0, D_80249914
D_80249900:
/* 16A160 80249900 240200F3 */   addiu    $v0, $zero, 0xF3
D_80249904:
/* 16A164 80249904 1122000A */  beq       $t1, $v0, func_80249930
D_80249908:
/* 16A168 80249908 0000102D */   daddu    $v0, $zero, $zero
D_8024990C:
/* 16A16C 8024990C 08092655 */  j         .L80249954
D_80249910:
/* 16A170 80249910 00000000 */   nop
D_80249914:
/* 16A174 80249914 240200F5 */  addiu     $v0, $zero, 0xF5
/* 16A178 80249918 11220009 */  beq       $t1, $v0, .L80249940
/* 16A17C 8024991C 240200F6 */   addiu    $v0, $zero, 0xF6
.L80249920:
/* 16A180 80249920 11220009 */  beq       $t1, $v0, .L80249948
/* 16A184 80249924 0000102D */   daddu    $v0, $zero, $zero
/* 16A188 80249928 08092655 */  j         .L80249954
/* 16A18C 8024992C 00000000 */   nop
glabel func_80249930
/* 16A190 80249930 08092654 */  j         .L80249950
D_80249934:
/* 16A194 80249934 ACA00000 */   sw       $zero, 0x0($a1)
.L80249938:
/* 16A198 80249938 08092653 */  j         .L8024994C
/* 16A19C 8024993C 24020001 */   addiu    $v0, $zero, 0x1
.L80249940:
/* 16A1A0 80249940 08092653 */  j         .L8024994C
/* 16A1A4 80249944 24020002 */   addiu    $v0, $zero, 0x2
.L80249948:
/* 16A1A8 80249948 24020003 */  addiu     $v0, $zero, 0x3
.L8024994C:
/* 16A1AC 8024994C ACA20000 */  sw        $v0, 0x0($a1)
.L80249950:
/* 16A1B0 80249950 0000102D */  daddu     $v0, $zero, $zero
.L80249954:
/* 16A1B4 80249954 8FBF0044 */  lw        $ra, 0x44($sp)
glabel func_80249958
/* 16A1B8 80249958 8FB60040 */  lw        $s6, 0x40($sp)
D_8024995C:
/* 16A1BC 8024995C 8FB5003C */  lw        $s5, 0x3C($sp)
D_80249960:
/* 16A1C0 80249960 8FB40038 */  lw        $s4, 0x38($sp)
/* 16A1C4 80249964 8FB30034 */  lw        $s3, 0x34($sp)
glabel func_80249968
/* 16A1C8 80249968 8FB20030 */  lw        $s2, 0x30($sp)
/* 16A1CC 8024996C 8FB1002C */  lw        $s1, 0x2C($sp)
glabel func_80249970
/* 16A1D0 80249970 8FB00028 */  lw        $s0, 0x28($sp)
/* 16A1D4 80249974 03E00008 */  jr        $ra
/* 16A1D8 80249978 27BD0048 */   addiu    $sp, $sp, 0x48

### DECOMPILED C INSTRUCTIONS:

s32 filemenu_draw_char(s32 c, s32 x, s32 y, s32 flag1, s32 color, s32 flag2) {
    MessageCharset* charset;
    s32 texSizeX;
    s32 texSizeY;
    s32 charRasterSize;
    MessageCharData* charData;
    u8* raster;
    s32 charWidth;

    if (flag1 != filemenu_charset) {
        filemenu_charset = flag1;
        filemenu_charset_raster_id = 0;
    }

    charset = gMsgCharsets[filemenu_charset];
    texSizeX = charset->texSize.x;
    texSizeY = charset->texSize.y;
    charRasterSize = charset->charRasterSize;
    charData = &charset->rasters[filemenu_charset_raster_id];
    charWidth = charData->monospaceWidth;
    raster = charData->raster;

    if (c < 0xA2) {
        charWidth = charData->charWidthTable[c];
        if (gMainGfxPos != filemenu_savedGfxPos) {
            gSPDisplayList(gMainGfxPos++, filemenu_dl_draw_char_init);
            filemenu_char_color = -1;
        }

        if (filemenu_char_color != color) {
            filemenu_char_color = color;
            gDPLoadTLUT_pal16(gMainGfxPos++, 0, D_802F4560[color]);
        }

        if (texSizeX >= 16 && texSizeX % 16 == 0) {
            gDPLoadTextureBlock_4b(gMainGfxPos++, &raster[charRasterSize * c], G_IM_FMT_CI,
                                texSizeX, texSizeY, 0,
                                G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
        } else {
            gDPLoadTextureTile_4b(gMainGfxPos++, &raster[charRasterSize * c], G_IM_FMT_CI,
                                texSizeX, texSizeY,
                                0, 0, texSizeX - 1, texSizeY - 1, 0,
                                G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
        }

        if (flag2) {
            gDPSetCombineMode(gMainGfxPos++, PM_CC_07, PM_CC_07);
            gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
            filemenu_draw_rect((x + 2) * 4, (y + 2) * 4, (2 + x + texSizeX) * 4, (2 + y + texSizeY) * 4, 0, 0, 0, 0x400, 0x400);
            gDPPipeSync(gMainGfxPos++);
            gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
            gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2);
        }

        filemenu_draw_rect(x * 4, y * 4, (x + texSizeX) * 4, (y + texSizeY) * 4, 0, 0, 0, 0x400, 0x400);
        filemenu_savedGfxPos = gMainGfxPos;
        return charWidth;
    }

#if VERSION_IQUE
    if (c >= 0x100) {
        int offset;
        s32 character;
        s32* offsetPtr = &filemenu_glyphBufferIndex;

        character = c < 0 ? c + 0xFF : c;
        offset = (((character >> 8) - 1) * 0x31) + (c & 0xff) + 0x47;
        *offsetPtr = offset; // Probably modifying data outside of the filemenu_glyphBuffer array

        load_font_data(charset_standard_OFFSET + offset * 0x80, 0x80, &filemenu_glyphBuffer[*offsetPtr][0]);

        if (gMainGfxPos != filemenu_savedGfxPos) {
            gSPDisplayList(gMainGfxPos++, filemenu_dl_draw_char_init);
            filemenu_char_color = -1;
        }

        if (filemenu_char_color != color) {
            filemenu_char_color = color;
            gDPLoadTLUT_pal16(gMainGfxPos++, 0, D_802F4560[color]);
        }

        gDPLoadTextureBlock_4b(gMainGfxPos++, &filemenu_glyphBuffer[*offsetPtr][0], G_IM_FMT_CI, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);

        if (flag2) {
            gDPSetCombineMode(gMainGfxPos++, PM_CC_07, PM_CC_07);
            gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
            filemenu_draw_rect((x + 2) * 4, (y + 2) * 4, (x + 18) * 4, (y + 18) * 4, 0, 0, 0, 0x400, 0x400);
            gDPPipeSync(gMainGfxPos++);
            gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
            gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2);
        }

        filemenu_draw_rect(x * 4, y * 4, (x + 16) * 4, (y + 16) * 4, 0, 0, 0, 0x400, 0x400);
        filemenu_savedGfxPos = gMainGfxPos;
        *offsetPtr = (*offsetPtr + 1) % 20;

        return 16;
    }
#endif

    if (c == 0xF7) {
        return charWidth - 6;
    }

    switch (c) {
        case 0xF3:
            filemenu_charset_raster_id = 0;
            break;
        case 0xF4:
            filemenu_charset_raster_id = 1;
            break;
        case 0xF5:
            filemenu_charset_raster_id = 2;
            break;
        case 0xF6:
            filemenu_charset_raster_id = 3;
            break;
    }
    return 0;
}