### RAW ASSEMBLY INSTRUCTIONS:

glabel create_actor
/* 193C84 802653A4 27BDFFB0 */  addiu     $sp, $sp, -0x50
/* 193C88 802653A8 AFB30024 */  sw        $s3, 0x24($sp)
/* 193C8C 802653AC 0080982D */  daddu     $s3, $a0, $zero
/* 193C90 802653B0 3C02EFE8 */  lui       $v0, (0xEFE82080 >> 16)
/* 193C94 802653B4 34422080 */  ori       $v0, $v0, (0xEFE82080 & 0xFFFF)
/* 193C98 802653B8 AFBF0034 */  sw        $ra, 0x34($sp)
/* 193C9C 802653BC AFB60030 */  sw        $s6, 0x30($sp)
/* 193CA0 802653C0 AFB5002C */  sw        $s5, 0x2C($sp)
/* 193CA4 802653C4 AFB40028 */  sw        $s4, 0x28($sp)
/* 193CA8 802653C8 AFB20020 */  sw        $s2, 0x20($sp)
/* 193CAC 802653CC AFB1001C */  sw        $s1, 0x1C($sp)
/* 193CB0 802653D0 AFB00018 */  sw        $s0, 0x18($sp)
/* 193CB4 802653D4 F7B80048 */  sdc1      $f24, 0x48($sp)
/* 193CB8 802653D8 F7B60040 */  sdc1      $f22, 0x40($sp)
/* 193CBC 802653DC F7B40038 */  sdc1      $f20, 0x38($sp)
/* 193CC0 802653E0 8E640004 */  lw        $a0, 0x4($s3)
/* 193CC4 802653E4 3C12800E */  lui       $s2, %hi(gBattleStatus)
/* 193CC8 802653E8 2652C070 */  addiu     $s2, $s2, %lo(gBattleStatus)
/* 193CCC 802653EC 0082102A */  slt       $v0, $a0, $v0
/* 193CD0 802653F0 14400014 */  bnez      $v0, .L80265444
/* 193CD4 802653F4 0000802D */   daddu    $s0, $zero, $zero
/* 193CD8 802653F8 3C038028 */  lui       $v1, %hi(btl_actorHomePositions)
/* 193CDC 802653FC 24633524 */  addiu     $v1, $v1, %lo(btl_actorHomePositions)
/* 193CE0 80265400 00041040 */  sll       $v0, $a0, 1
/* 193CE4 80265404 00441021 */  addu      $v0, $v0, $a0
/* 193CE8 80265408 00021040 */  sll       $v0, $v0, 1
/* 193CEC 8026540C 00431021 */  addu      $v0, $v0, $v1
/* 193CF0 80265410 84430000 */  lh        $v1, 0x0($v0)
/* 193CF4 80265414 4483C000 */  mtc1      $v1, $f24
/* 193CF8 80265418 00000000 */  nop
/* 193CFC 8026541C 4680C620 */  cvt.s.w   $f24, $f24
/* 193D00 80265420 84430002 */  lh        $v1, 0x2($v0)
/* 193D04 80265424 84420004 */  lh        $v0, 0x4($v0)
/* 193D08 80265428 4483A000 */  mtc1      $v1, $f20
/* 193D0C 8026542C 00000000 */  nop
/* 193D10 80265430 4680A520 */  cvt.s.w   $f20, $f20
/* 193D14 80265434 4482B000 */  mtc1      $v0, $f22
/* 193D18 80265438 00000000 */  nop
/* 193D1C 8026543C 08099517 */  j         .L8026545C
/* 193D20 80265440 4680B5A0 */   cvt.s.w  $f22, $f22
.L80265444:
/* 193D24 80265444 C4980000 */  lwc1      $f24, 0x0($a0)
/* 193D28 80265448 4680C620 */  cvt.s.w   $f24, $f24
/* 193D2C 8026544C C4940004 */  lwc1      $f20, 0x4($a0)
/* 193D30 80265450 4680A520 */  cvt.s.w   $f20, $f20
/* 193D34 80265454 C4960008 */  lwc1      $f22, 0x8($a0)
/* 193D38 80265458 4680B5A0 */  cvt.s.w   $f22, $f22
.L8026545C:
/* 193D3C 8026545C 8E740000 */  lw        $s4, 0x0($s3)
/* 193D40 80265460 0240182D */  daddu     $v1, $s2, $zero
/* 193D44 80265464 86960008 */  lh        $s6, 0x8($s4)
.L80265468:
/* 193D48 80265468 8C6200E0 */  lw        $v0, 0xE0($v1)
/* 193D4C 8026546C 10400005 */  beqz      $v0, .L80265484
/* 193D50 80265470 00000000 */   nop
/* 193D54 80265474 26100001 */  addiu     $s0, $s0, 0x1
/* 193D58 80265478 2A020018 */  slti      $v0, $s0, 0x18
/* 193D5C 8026547C 1440FFFA */  bnez      $v0, .L80265468
/* 193D60 80265480 24630004 */   addiu    $v1, $v1, 0x4
.L80265484:
/* 193D64 80265484 0C00AB39 */  jal       heap_malloc
/* 193D68 80265488 24040444 */   addiu    $a0, $zero, 0x444
/* 193D6C 8026548C 00101880 */  sll       $v1, $s0, 2
/* 193D70 80265490 02431821 */  addu      $v1, $s2, $v1
/* 193D74 80265494 0040882D */  daddu     $s1, $v0, $zero
/* 193D78 80265498 16200003 */  bnez      $s1, .L802654A8
/* 193D7C 8026549C AC6200E0 */   sw       $v0, 0xE0($v1)
.L802654A0:
/* 193D80 802654A0 08099528 */  j         .L802654A0
/* 193D84 802654A4 00000000 */   nop
.L802654A8:
/* 193D88 802654A8 92430093 */  lbu       $v1, 0x93($s2)
/* 193D8C 802654AC 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 193D90 802654B0 44810000 */  mtc1      $at, $f0
/* 193D94 802654B4 24620001 */  addiu     $v0, $v1, 0x1
/* 193D98 802654B8 A2420093 */  sb        $v0, 0x93($s2)
/* 193D9C 802654BC A2230134 */  sb        $v1, 0x134($s1)
/* 193DA0 802654C0 A2200135 */  sb        $zero, 0x135($s1)
/* 193DA4 802654C4 AE340008 */  sw        $s4, 0x8($s1)
/* 193DA8 802654C8 92820005 */  lbu       $v0, 0x5($s4)
/* 193DAC 802654CC A2220136 */  sb        $v0, 0x136($s1)
/* 193DB0 802654D0 8E820000 */  lw        $v0, 0x0($s4)
/* 193DB4 802654D4 E6380144 */  swc1      $f24, 0x144($s1)
/* 193DB8 802654D8 E6380138 */  swc1      $f24, 0x138($s1)
/* 193DBC 802654DC E6340148 */  swc1      $f20, 0x148($s1)
/* 193DC0 802654E0 E634013C */  swc1      $f20, 0x13C($s1)
/* 193DC4 802654E4 E636014C */  swc1      $f22, 0x14C($s1)
/* 193DC8 802654E8 E6360140 */  swc1      $f22, 0x140($s1)
/* 193DCC 802654EC A6200150 */  sh        $zero, 0x150($s1)
/* 193DD0 802654F0 A6200152 */  sh        $zero, 0x152($s1)
/* 193DD4 802654F4 A6200154 */  sh        $zero, 0x154($s1)
/* 193DD8 802654F8 AE220000 */  sw        $v0, 0x0($s1)
/* 193DDC 802654FC 92820007 */  lbu       $v0, 0x7($s4)
/* 193DE0 80265500 A23601F3 */  sb        $s6, 0x1F3($s1)
/* 193DE4 80265504 AE2001C0 */  sw        $zero, 0x1C0($s1)
/* 193DE8 80265508 A22201B8 */  sb        $v0, 0x1B8($s1)
/* 193DEC 8026550C A22201B9 */  sb        $v0, 0x1B9($s1)
/* 193DF0 80265510 8E820010 */  lw        $v0, 0x10($s4)
/* 193DF4 80265514 AE2001C8 */  sw        $zero, 0x1C8($s1)
/* 193DF8 80265518 AE2001CC */  sw        $zero, 0x1CC($s1)
/* 193DFC 8026551C AE2001D0 */  sw        $zero, 0x1D0($s1)
/* 193E00 80265520 AE2001D4 */  sw        $zero, 0x1D4($s1)
/* 193E04 80265524 AE2001D8 */  sw        $zero, 0x1D8($s1)
/* 193E08 80265528 AE2201C4 */  sw        $v0, 0x1C4($s1)
/* 193E0C 8026552C 9262000B */  lbu       $v0, 0xB($s3)
/* 193E10 80265530 A23001F2 */  sb        $s0, 0x1F2($s1)
/* 193E14 80265534 A22201F1 */  sb        $v0, 0x1F1($s1)
/* 193E18 80265538 AE20018C */  sw        $zero, 0x18C($s1)
/* 193E1C 8026553C AE20015C */  sw        $zero, 0x15C($s1)
/* 193E20 80265540 AE200160 */  sw        $zero, 0x160($s1)
/* 193E24 80265544 AE200164 */  sw        $zero, 0x164($s1)
/* 193E28 80265548 A6200168 */  sh        $zero, 0x168($s1)
/* 193E2C 8026554C A620016A */  sh        $zero, 0x16A($s1)
/* 193E30 80265550 A620016C */  sh        $zero, 0x16C($s1)
/* 193E34 80265554 E6200170 */  swc1      $f0, 0x170($s1)
/* 193E38 80265558 E6200174 */  swc1      $f0, 0x174($s1)
/* 193E3C 8026555C E6200178 */  swc1      $f0, 0x178($s1)
/* 193E40 80265560 E620017C */  swc1      $f0, 0x17C($s1)
/* 193E44 80265564 E6200180 */  swc1      $f0, 0x180($s1)
/* 193E48 80265568 E6200184 */  swc1      $f0, 0x184($s1)
/* 193E4C 8026556C A220019A */  sb        $zero, 0x19A($s1)
/* 193E50 80265570 A2200207 */  sb        $zero, 0x207($s1)
/* 193E54 80265574 92820020 */  lbu       $v0, 0x20($s4)
/* 193E58 80265578 A2220190 */  sb        $v0, 0x190($s1)
/* 193E5C 8026557C 92820021 */  lbu       $v0, 0x21($s4)
/* 193E60 80265580 E6200188 */  swc1      $f0, 0x188($s1)
/* 193E64 80265584 A2200194 */  sb        $zero, 0x194($s1)
/* 193E68 80265588 A2200195 */  sb        $zero, 0x195($s1)
/* 193E6C 8026558C A2200196 */  sb        $zero, 0x196($s1)
/* 193E70 80265590 A2200197 */  sb        $zero, 0x197($s1)
/* 193E74 80265594 A2200198 */  sb        $zero, 0x198($s1)
/* 193E78 80265598 A2200199 */  sb        $zero, 0x199($s1)
/* 193E7C 8026559C A2200206 */  sb        $zero, 0x206($s1)
/* 193E80 802655A0 AE200200 */  sw        $zero, 0x200($s1)
/* 193E84 802655A4 A2200204 */  sb        $zero, 0x204($s1)
/* 193E88 802655A8 A2200205 */  sb        $zero, 0x205($s1)
/* 193E8C 802655AC A2220191 */  sb        $v0, 0x191($s1)
/* 193E90 802655B0 82820022 */  lb        $v0, 0x22($s4)
/* 193E94 802655B4 4600C006 */  mov.s     $f0, $f24
/* 193E98 802655B8 44821000 */  mtc1      $v0, $f2
/* 193E9C 802655BC 00000000 */  nop
/* 193EA0 802655C0 468010A0 */  cvt.s.w   $f2, $f2
/* 193EA4 802655C4 46020000 */  add.s     $f0, $f0, $f2
/* 193EA8 802655C8 4600010D */  trunc.w.s $f4, $f0
/* 193EAC 802655CC 44022000 */  mfc1      $v0, $f4
/* 193EB0 802655D0 00000000 */  nop
/* 193EB4 802655D4 A6220156 */  sh        $v0, 0x156($s1)
/* 193EB8 802655D8 82820023 */  lb        $v0, 0x23($s4)
/* 193EBC 802655DC 4600A006 */  mov.s     $f0, $f20
/* 193EC0 802655E0 44821000 */  mtc1      $v0, $f2
/* 193EC4 802655E4 00000000 */  nop
/* 193EC8 802655E8 468010A0 */  cvt.s.w   $f2, $f2
/* 193ECC 802655EC 46020000 */  add.s     $f0, $f0, $f2
/* 193ED0 802655F0 4600010D */  trunc.w.s $f4, $f0
/* 193ED4 802655F4 44022000 */  mfc1      $v0, $f4
/* 193ED8 802655F8 00000000 */  nop
/* 193EDC 802655FC A6220158 */  sh        $v0, 0x158($s1)
/* 193EE0 80265600 4600B006 */  mov.s     $f0, $f22
/* 193EE4 80265604 8E220000 */  lw        $v0, 0x0($s1)
/* 193EE8 80265608 4600010D */  trunc.w.s $f4, $f0
/* 193EEC 8026560C 44032000 */  mfc1      $v1, $f4
/* 193EF0 80265610 30420800 */  andi      $v0, $v0, 0x800
/* 193EF4 80265614 10400010 */  beqz      $v0, .L80265658
/* 193EF8 80265618 A623015A */   sh       $v1, 0x15A($s1)
/* 193EFC 8026561C 92220191 */  lbu       $v0, 0x191($s1)
/* 193F00 80265620 4600A006 */  mov.s     $f0, $f20
/* 193F04 80265624 44821000 */  mtc1      $v0, $f2
/* 193F08 80265628 00000000 */  nop
/* 193F0C 8026562C 468010A0 */  cvt.s.w   $f2, $f2
/* 193F10 80265630 82820023 */  lb        $v0, 0x23($s4)
/* 193F14 80265634 46020001 */  sub.s     $f0, $f0, $f2
/* 193F18 80265638 44821000 */  mtc1      $v0, $f2
/* 193F1C 8026563C 00000000 */  nop
/* 193F20 80265640 468010A0 */  cvt.s.w   $f2, $f2
/* 193F24 80265644 46020001 */  sub.s     $f0, $f0, $f2
/* 193F28 80265648 4600010D */  trunc.w.s $f4, $f0
/* 193F2C 8026564C 44022000 */  mfc1      $v0, $f4
/* 193F30 80265650 00000000 */  nop
/* 193F34 80265654 A6220158 */  sh        $v0, 0x158($s1)
.L80265658:
/* 193F38 80265658 8E820014 */  lw        $v0, 0x14($s4)
/* 193F3C 8026565C 92230136 */  lbu       $v1, 0x136($s1)
/* 193F40 80265660 A2200210 */  sb        $zero, 0x210($s1)
/* 193F44 80265664 A2200211 */  sb        $zero, 0x211($s1)
/* 193F48 80265668 A2200212 */  sb        $zero, 0x212($s1)
/* 193F4C 8026566C A2200213 */  sb        $zero, 0x213($s1)
/* 193F50 80265670 A2200214 */  sb        $zero, 0x214($s1)
/* 193F54 80265674 A2200215 */  sb        $zero, 0x215($s1)
/* 193F58 80265678 A2200216 */  sb        $zero, 0x216($s1)
/* 193F5C 8026567C A2200217 */  sb        $zero, 0x217($s1)
/* 193F60 80265680 A2200218 */  sb        $zero, 0x218($s1)
/* 193F64 80265684 A2200219 */  sb        $zero, 0x219($s1)
/* 193F68 80265688 A2200220 */  sb        $zero, 0x220($s1)
/* 193F6C 8026568C A620021E */  sh        $zero, 0x21E($s1)
/* 193F70 80265690 A220021D */  sb        $zero, 0x21D($s1)
/* 193F74 80265694 A2200221 */  sb        $zero, 0x221($s1)
/* 193F78 80265698 A2200222 */  sb        $zero, 0x222($s1)
/* 193F7C 8026569C A2200223 */  sb        $zero, 0x223($s1)
/* 193F80 802656A0 A2200224 */  sb        $zero, 0x224($s1)
/* 193F84 802656A4 A220021C */  sb        $zero, 0x21C($s1)
/* 193F88 802656A8 AE22020C */  sw        $v0, 0x20C($s1)
/* 193F8C 802656AC 000310C0 */  sll       $v0, $v1, 3
/* 193F90 802656B0 00431023 */  subu      $v0, $v0, $v1
/* 193F94 802656B4 00021080 */  sll       $v0, $v0, 2
/* 193F98 802656B8 3C018028 */  lui       $at, %hi(bActorSoundTable)
/* 193F9C 802656BC 00220821 */  addu      $at, $at, $v0
/* 193FA0 802656C0 8C221468 */  lw        $v0, %lo(bActorSoundTable)($at)
/* 193FA4 802656C4 AE22019C */  sw        $v0, 0x19C($s1)
/* 193FA8 802656C8 000310C0 */  sll       $v0, $v1, 3
/* 193FAC 802656CC 00431023 */  subu      $v0, $v0, $v1
/* 193FB0 802656D0 00021080 */  sll       $v0, $v0, 2
/* 193FB4 802656D4 3C018028 */  lui       $at, %hi(bActorSoundTable + 0x4)
/* 193FB8 802656D8 00220821 */  addu      $at, $at, $v0
/* 193FBC 802656DC 8C22146C */  lw        $v0, %lo(bActorSoundTable + 0x4)($at)
/* 193FC0 802656E0 AE2201A0 */  sw        $v0, 0x1A0($s1)
/* 193FC4 802656E4 000310C0 */  sll       $v0, $v1, 3
/* 193FC8 802656E8 00431023 */  subu      $v0, $v0, $v1
/* 193FCC 802656EC 00021080 */  sll       $v0, $v0, 2
/* 193FD0 802656F0 3C018028 */  lui       $at, %hi(bActorSoundTable + 0x8)
/* 193FD4 802656F4 00220821 */  addu      $at, $at, $v0
/* 193FD8 802656F8 8C221470 */  lw        $v0, %lo(bActorSoundTable + 0x8)($at)
/* 193FDC 802656FC AE2201A4 */  sw        $v0, 0x1A4($s1)
/* 193FE0 80265700 000310C0 */  sll       $v0, $v1, 3
/* 193FE4 80265704 00431023 */  subu      $v0, $v0, $v1
/* 193FE8 80265708 00021080 */  sll       $v0, $v0, 2
/* 193FEC 8026570C 3C018028 */  lui       $at, %hi(bActorSoundTable + 0xC)
/* 193FF0 80265710 00220821 */  addu      $at, $at, $v0
/* 193FF4 80265714 8C221474 */  lw        $v0, %lo(bActorSoundTable + 0xC)($at)
/* 193FF8 80265718 AE2201A8 */  sw        $v0, 0x1A8($s1)
/* 193FFC 8026571C 000310C0 */  sll       $v0, $v1, 3
/* 194000 80265720 00431023 */  subu      $v0, $v0, $v1
/* 194004 80265724 00021080 */  sll       $v0, $v0, 2
/* 194008 80265728 3C018028 */  lui       $at, %hi(bActorSoundTable + 0x10)
/* 19400C 8026572C 00220821 */  addu      $at, $at, $v0
/* 194010 80265730 8C221478 */  lw        $v0, %lo(bActorSoundTable + 0x10)($at)
/* 194014 80265734 AE2201AC */  sw        $v0, 0x1AC($s1)
/* 194018 80265738 000310C0 */  sll       $v0, $v1, 3
/* 19401C 8026573C 00431023 */  subu      $v0, $v0, $v1
/* 194020 80265740 00021080 */  sll       $v0, $v0, 2
/* 194024 80265744 3C018028 */  lui       $at, %hi(bActorSoundTable + 0x14)
/* 194028 80265748 00220821 */  addu      $at, $at, $v0
/* 19402C 8026574C 8C22147C */  lw        $v0, %lo(bActorSoundTable + 0x14)($at)
/* 194030 80265750 AE2201B0 */  sw        $v0, 0x1B0($s1)
/* 194034 80265754 000310C0 */  sll       $v0, $v1, 3
/* 194038 80265758 00431023 */  subu      $v0, $v0, $v1
/* 19403C 8026575C 00021080 */  sll       $v0, $v0, 2
/* 194040 80265760 3C018028 */  lui       $at, %hi(bActorSoundTable + 0x18)
/* 194044 80265764 00220821 */  addu      $at, $at, $v0
/* 194048 80265768 94221480 */  lhu       $v0, %lo(bActorSoundTable + 0x18)($at)
/* 19404C 8026576C 24100001 */  addiu     $s0, $zero, 0x1
/* 194050 80265770 A62201B4 */  sh        $v0, 0x1B4($s1)
/* 194054 80265774 000310C0 */  sll       $v0, $v1, 3
/* 194058 80265778 00431023 */  subu      $v0, $v0, $v1
/* 19405C 8026577C 00021080 */  sll       $v0, $v0, 2
/* 194060 80265780 3C018028 */  lui       $at, %hi(bActorSoundTable + 0x1A)
/* 194064 80265784 00220821 */  addu      $at, $at, $v0
/* 194068 80265788 94221482 */  lhu       $v0, %lo(bActorSoundTable + 0x1A)($at)
/* 19406C 8026578C 26230004 */  addiu     $v1, $s1, 0x4
/* 194070 80265790 A62201B6 */  sh        $v0, 0x1B6($s1)
.L80265794:
/* 194074 80265794 AC600438 */  sw        $zero, 0x438($v1)
/* 194078 80265798 2610FFFF */  addiu     $s0, $s0, -0x1
/* 19407C 8026579C 0601FFFD */  bgez      $s0, .L80265794
/* 194080 802657A0 2463FFFC */   addiu    $v1, $v1, -0x4
/* 194084 802657A4 8E62000C */  lw        $v0, 0xC($s3)
/* 194088 802657A8 AE220088 */  sw        $v0, 0x88($s1)
/* 19408C 802657AC 8E620010 */  lw        $v0, 0x10($s3)
/* 194090 802657B0 AE22008C */  sw        $v0, 0x8C($s1)
/* 194094 802657B4 8E620014 */  lw        $v0, 0x14($s3)
/* 194098 802657B8 240400C4 */  addiu     $a0, $zero, 0xC4
/* 19409C 802657BC AE220090 */  sw        $v0, 0x90($s1)
/* 1940A0 802657C0 8E630018 */  lw        $v1, 0x18($s3)
/* 1940A4 802657C4 2402000D */  addiu     $v0, $zero, 0xD
/* 1940A8 802657C8 A6220434 */  sh        $v0, 0x434($s1)
/* 1940AC 802657CC A2200208 */  sb        $zero, 0x208($s1)
/* 1940B0 802657D0 0C00AB39 */  jal       heap_malloc
/* 1940B4 802657D4 AE230094 */   sw       $v1, 0x94($s1)
/* 1940B8 802657D8 0040802D */  daddu     $s0, $v0, $zero
/* 1940BC 802657DC 16000003 */  bnez      $s0, .L802657EC
/* 1940C0 802657E0 AE3001F4 */   sw       $s0, 0x1F4($s1)
.L802657E4:
/* 1940C4 802657E4 080995F9 */  j         .L802657E4
/* 1940C8 802657E8 00000000 */   nop
.L802657EC:
/* 1940CC 802657EC 1AC00106 */  blez      $s6, .L80265C08
/* 1940D0 802657F0 0000982D */   daddu    $s3, $zero, $zero
/* 1940D4 802657F4 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 1940D8 802657F8 4481A000 */  mtc1      $at, $f20
/* 1940DC 802657FC 3C128028 */  lui       $s2, %hi(bActorSoundTable)
/* 1940E0 80265800 26521468 */  addiu     $s2, $s2, %lo(bActorSoundTable)
/* 1940E4 80265804 0260A82D */  daddu     $s5, $s3, $zero
.L80265808:
/* 1940E8 80265808 8E82000C */  lw        $v0, 0xC($s4)
/* 1940EC 8026580C AE0000C0 */  sw        $zero, 0xC0($s0)
/* 1940F0 80265810 00551821 */  addu      $v1, $v0, $s5
/* 1940F4 80265814 AE030008 */  sw        $v1, 0x8($s0)
/* 1940F8 80265818 8C620000 */  lw        $v0, 0x0($v1)
/* 1940FC 8026581C AE000004 */  sw        $zero, 0x4($s0)
/* 194100 80265820 34420004 */  ori       $v0, $v0, 0x4
/* 194104 80265824 AE020000 */  sw        $v0, 0x0($s0)
/* 194108 80265828 90620005 */  lbu       $v0, 0x5($v1)
/* 19410C 8026582C 00021600 */  sll       $v0, $v0, 24
/* 194110 80265830 00021603 */  sra       $v0, $v0, 24
/* 194114 80265834 A6020014 */  sh        $v0, 0x14($s0)
/* 194118 80265838 00021400 */  sll       $v0, $v0, 16
/* 19411C 8026583C 00021403 */  sra       $v0, $v0, 16
/* 194120 80265840 44820000 */  mtc1      $v0, $f0
/* 194124 80265844 00000000 */  nop
/* 194128 80265848 46800020 */  cvt.s.w   $f0, $f0
/* 19412C 8026584C E6000020 */  swc1      $f0, 0x20($s0)
/* 194130 80265850 90620006 */  lbu       $v0, 0x6($v1)
/* 194134 80265854 00021600 */  sll       $v0, $v0, 24
/* 194138 80265858 00021603 */  sra       $v0, $v0, 24
/* 19413C 8026585C A6020016 */  sh        $v0, 0x16($s0)
/* 194140 80265860 00021400 */  sll       $v0, $v0, 16
/* 194144 80265864 00021403 */  sra       $v0, $v0, 16
/* 194148 80265868 44820000 */  mtc1      $v0, $f0
/* 19414C 8026586C 00000000 */  nop
/* 194150 80265870 46800020 */  cvt.s.w   $f0, $f0
/* 194154 80265874 E6000024 */  swc1      $f0, 0x24($s0)
/* 194158 80265878 90620007 */  lbu       $v0, 0x7($v1)
/* 19415C 8026587C A600001A */  sh        $zero, 0x1A($s0)
/* 194160 80265880 A600001C */  sh        $zero, 0x1C($s0)
/* 194164 80265884 A600001E */  sh        $zero, 0x1E($s0)
/* 194168 80265888 00021600 */  sll       $v0, $v0, 24
/* 19416C 8026588C 00021603 */  sra       $v0, $v0, 24
/* 194170 80265890 A6020018 */  sh        $v0, 0x18($s0)
/* 194174 80265894 00021400 */  sll       $v0, $v0, 16
/* 194178 80265898 00021403 */  sra       $v0, $v0, 16
/* 19417C 8026589C 44820000 */  mtc1      $v0, $f0
/* 194180 802658A0 00000000 */  nop
/* 194184 802658A4 46800020 */  cvt.s.w   $f0, $f0
/* 194188 802658A8 E6000028 */  swc1      $f0, 0x28($s0)
/* 19418C 802658AC C6200144 */  lwc1      $f0, 0x144($s1)
/* 194190 802658B0 E600002C */  swc1      $f0, 0x2C($s0)
/* 194194 802658B4 C6200148 */  lwc1      $f0, 0x148($s1)
/* 194198 802658B8 E6000030 */  swc1      $f0, 0x30($s0)
/* 19419C 802658BC C620014C */  lwc1      $f0, 0x14C($s1)
/* 1941A0 802658C0 E6000034 */  swc1      $f0, 0x34($s0)
/* 1941A4 802658C4 C6200144 */  lwc1      $f0, 0x144($s1)
/* 1941A8 802658C8 E6000058 */  swc1      $f0, 0x58($s0)
/* 1941AC 802658CC C6200148 */  lwc1      $f0, 0x148($s1)
/* 1941B0 802658D0 E600005C */  swc1      $f0, 0x5C($s0)
/* 1941B4 802658D4 C620014C */  lwc1      $f0, 0x14C($s1)
/* 1941B8 802658D8 E6000060 */  swc1      $f0, 0x60($s0)
/* 1941BC 802658DC 8C620010 */  lw        $v0, 0x10($v1)
/* 1941C0 802658E0 AE020078 */  sw        $v0, 0x78($s0)
/* 1941C4 802658E4 8C62000C */  lw        $v0, 0xC($v1)
/* 1941C8 802658E8 AE020094 */  sw        $v0, 0x94($s0)
/* 1941CC 802658EC 8C620014 */  lw        $v0, 0x14($v1)
/* 1941D0 802658F0 AE02007C */  sw        $v0, 0x7C($s0)
/* 1941D4 802658F4 8C620018 */  lw        $v0, 0x18($v1)
/* 1941D8 802658F8 AE020080 */  sw        $v0, 0x80($s0)
/* 1941DC 802658FC 9462000A */  lhu       $v0, 0xA($v1)
/* 1941E0 80265900 A6020098 */  sh        $v0, 0x98($s0)
/* 1941E4 80265904 00021400 */  sll       $v0, $v0, 16
/* 1941E8 80265908 00021403 */  sra       $v0, $v0, 16
/* 1941EC 8026590C 284200FF */  slti      $v0, $v0, 0xFF
/* 1941F0 80265910 10400002 */  beqz      $v0, .L8026591C
/* 1941F4 80265914 24020022 */   addiu    $v0, $zero, 0x22
/* 1941F8 80265918 A6220434 */  sh        $v0, 0x434($s1)
.L8026591C:
/* 1941FC 8026591C 92220191 */  lbu       $v0, 0x191($s1)
/* 194200 80265920 A2020073 */  sb        $v0, 0x73($s0)
/* 194204 80265924 92220190 */  lbu       $v0, 0x190($s1)
/* 194208 80265928 AE000064 */  sw        $zero, 0x64($s0)
/* 19420C 8026592C A2020072 */  sb        $v0, 0x72($s0)
/* 194210 80265930 90620008 */  lbu       $v0, 0x8($v1)
/* 194214 80265934 00021600 */  sll       $v0, $v0, 24
/* 194218 80265938 00021603 */  sra       $v0, $v0, 24
/* 19421C 8026593C A602006C */  sh        $v0, 0x6C($s0)
/* 194220 80265940 90620009 */  lbu       $v0, 0x9($v1)
/* 194224 80265944 A6000070 */  sh        $zero, 0x70($s0)
/* 194228 80265948 00021600 */  sll       $v0, $v0, 24
/* 19422C 8026594C 00021603 */  sra       $v0, $v0, 24
/* 194230 80265950 A602006E */  sh        $v0, 0x6E($s0)
/* 194234 80265954 9062001C */  lbu       $v0, 0x1C($v1)
/* 194238 80265958 A2020075 */  sb        $v0, 0x75($s0)
/* 19423C 8026595C 9063001D */  lbu       $v1, 0x1D($v1)
/* 194240 80265960 24020001 */  addiu     $v0, $zero, 0x1
/* 194244 80265964 AE000038 */  sw        $zero, 0x38($s0)
/* 194248 80265968 AE00003C */  sw        $zero, 0x3C($s0)
/* 19424C 8026596C AE000040 */  sw        $zero, 0x40($s0)
/* 194250 80265970 A6000044 */  sh        $zero, 0x44($s0)
/* 194254 80265974 A6000046 */  sh        $zero, 0x46($s0)
/* 194258 80265978 A6000048 */  sh        $zero, 0x48($s0)
/* 19425C 8026597C E614004C */  swc1      $f20, 0x4C($s0)
/* 194260 80265980 E6140050 */  swc1      $f20, 0x50($s0)
/* 194264 80265984 E6140054 */  swc1      $f20, 0x54($s0)
/* 194268 80265988 A2020074 */  sb        $v0, 0x74($s0)
/* 19426C 8026598C A6000068 */  sh        $zero, 0x68($s0)
/* 194270 80265990 A600006A */  sh        $zero, 0x6A($s0)
/* 194274 80265994 A2030076 */  sb        $v1, 0x76($s0)
/* 194278 80265998 92230136 */  lbu       $v1, 0x136($s1)
/* 19427C 8026599C 000310C0 */  sll       $v0, $v1, 3
/* 194280 802659A0 00431023 */  subu      $v0, $v0, $v1
/* 194284 802659A4 00021080 */  sll       $v0, $v0, 2
/* 194288 802659A8 00521021 */  addu      $v0, $v0, $s2
/* 19428C 802659AC 8C420000 */  lw        $v0, 0x0($v0)
/* 194290 802659B0 AE0200A4 */  sw        $v0, 0xA4($s0)
/* 194294 802659B4 92230136 */  lbu       $v1, 0x136($s1)
/* 194298 802659B8 000310C0 */  sll       $v0, $v1, 3
/* 19429C 802659BC 00431023 */  subu      $v0, $v0, $v1
/* 1942A0 802659C0 00021080 */  sll       $v0, $v0, 2
/* 1942A4 802659C4 00521021 */  addu      $v0, $v0, $s2
/* 1942A8 802659C8 8C420004 */  lw        $v0, 0x4($v0)
/* 1942AC 802659CC AE0200A8 */  sw        $v0, 0xA8($s0)
/* 1942B0 802659D0 92230136 */  lbu       $v1, 0x136($s1)
/* 1942B4 802659D4 000310C0 */  sll       $v0, $v1, 3
/* 1942B8 802659D8 00431023 */  subu      $v0, $v0, $v1
/* 1942BC 802659DC 00021080 */  sll       $v0, $v0, 2
/* 1942C0 802659E0 00521021 */  addu      $v0, $v0, $s2
/* 1942C4 802659E4 8C420008 */  lw        $v0, 0x8($v0)
/* 1942C8 802659E8 AE0200AC */  sw        $v0, 0xAC($s0)
/* 1942CC 802659EC 92230136 */  lbu       $v1, 0x136($s1)
/* 1942D0 802659F0 000310C0 */  sll       $v0, $v1, 3
/* 1942D4 802659F4 00431023 */  subu      $v0, $v0, $v1
/* 1942D8 802659F8 00021080 */  sll       $v0, $v0, 2
/* 1942DC 802659FC 00521021 */  addu      $v0, $v0, $s2
/* 1942E0 80265A00 8C42000C */  lw        $v0, 0xC($v0)
/* 1942E4 80265A04 AE0200B0 */  sw        $v0, 0xB0($s0)
/* 1942E8 80265A08 92230136 */  lbu       $v1, 0x136($s1)
/* 1942EC 80265A0C 000310C0 */  sll       $v0, $v1, 3
/* 1942F0 80265A10 00431023 */  subu      $v0, $v0, $v1
/* 1942F4 80265A14 00021080 */  sll       $v0, $v0, 2
/* 1942F8 80265A18 00521021 */  addu      $v0, $v0, $s2
/* 1942FC 80265A1C 8C420010 */  lw        $v0, 0x10($v0)
/* 194300 80265A20 AE0200B4 */  sw        $v0, 0xB4($s0)
/* 194304 80265A24 92230136 */  lbu       $v1, 0x136($s1)
/* 194308 80265A28 000310C0 */  sll       $v0, $v1, 3
/* 19430C 80265A2C 00431023 */  subu      $v0, $v0, $v1
/* 194310 80265A30 00021080 */  sll       $v0, $v0, 2
/* 194314 80265A34 00521021 */  addu      $v0, $v0, $s2
/* 194318 80265A38 8C420014 */  lw        $v0, 0x14($v0)
/* 19431C 80265A3C AE0200B8 */  sw        $v0, 0xB8($s0)
/* 194320 80265A40 92230136 */  lbu       $v1, 0x136($s1)
/* 194324 80265A44 000310C0 */  sll       $v0, $v1, 3
/* 194328 80265A48 00431023 */  subu      $v0, $v0, $v1
/* 19432C 80265A4C 00021080 */  sll       $v0, $v0, 2
/* 194330 80265A50 00521021 */  addu      $v0, $v0, $s2
/* 194334 80265A54 94420018 */  lhu       $v0, 0x18($v0)
/* 194338 80265A58 A60200BC */  sh        $v0, 0xBC($s0)
/* 19433C 80265A5C 92230136 */  lbu       $v1, 0x136($s1)
/* 194340 80265A60 000310C0 */  sll       $v0, $v1, 3
/* 194344 80265A64 00431023 */  subu      $v0, $v0, $v1
/* 194348 80265A68 00021080 */  sll       $v0, $v0, 2
/* 19434C 80265A6C 00521021 */  addu      $v0, $v0, $s2
/* 194350 80265A70 9442001A */  lhu       $v0, 0x1A($v0)
/* 194354 80265A74 8E030094 */  lw        $v1, 0x94($s0)
/* 194358 80265A78 10600034 */  beqz      $v1, .L80265B4C
/* 19435C 80265A7C A60200BE */   sh       $v0, 0xBE($s0)
/* 194360 80265A80 8E020000 */  lw        $v0, 0x0($s0)
/* 194364 80265A84 30420002 */  andi      $v0, $v0, 0x2
/* 194368 80265A88 14400030 */  bnez      $v0, .L80265B4C
/* 19436C 80265A8C 00000000 */   nop
/* 194370 80265A90 0C00AB39 */  jal       heap_malloc
/* 194374 80265A94 240408E8 */   addiu    $a0, $zero, 0x8E8
/* 194378 80265A98 0040202D */  daddu     $a0, $v0, $zero
/* 19437C 80265A9C 14800003 */  bnez      $a0, .L80265AAC
/* 194380 80265AA0 AE0200C0 */   sw       $v0, 0xC0($s0)
.L80265AA4:
/* 194384 80265AA4 080996A9 */  j         .L80265AA4
/* 194388 80265AA8 00000000 */   nop
.L80265AAC:
/* 19438C 80265AAC 0000282D */  daddu     $a1, $zero, $zero
/* 194390 80265AB0 0080182D */  daddu     $v1, $a0, $zero
/* 194394 80265AB4 A08006C0 */  sb        $zero, 0x6C0($a0)
/* 194398 80265AB8 A0800750 */  sb        $zero, 0x750($a0)
/* 19439C 80265ABC A0800764 */  sb        $zero, 0x764($a0)
/* 1943A0 80265AC0 A0800768 */  sb        $zero, 0x768($a0)
/* 1943A4 80265AC4 A08007D8 */  sb        $zero, 0x7D8($a0)
/* 1943A8 80265AC8 A08007D9 */  sb        $zero, 0x7D9($a0)
.L80265ACC:
/* 1943AC 80265ACC C6200144 */  lwc1      $f0, 0x144($s1)
/* 1943B0 80265AD0 4600010D */  trunc.w.s $f4, $f0
/* 1943B4 80265AD4 44022000 */  mfc1      $v0, $f4
/* 1943B8 80265AD8 00000000 */  nop
/* 1943BC 80265ADC A46207FC */  sh        $v0, 0x7FC($v1)
/* 1943C0 80265AE0 C6200148 */  lwc1      $f0, 0x148($s1)
/* 1943C4 80265AE4 4600010D */  trunc.w.s $f4, $f0
/* 1943C8 80265AE8 44022000 */  mfc1      $v0, $f4
/* 1943CC 80265AEC 00000000 */  nop
/* 1943D0 80265AF0 A462081C */  sh        $v0, 0x81C($v1)
/* 1943D4 80265AF4 C620014C */  lwc1      $f0, 0x14C($s1)
/* 1943D8 80265AF8 24A50001 */  addiu     $a1, $a1, 0x1
/* 1943DC 80265AFC 4600010D */  trunc.w.s $f4, $f0
/* 1943E0 80265B00 44022000 */  mfc1      $v0, $f4
/* 1943E4 80265B04 00000000 */  nop
/* 1943E8 80265B08 A462083C */  sh        $v0, 0x83C($v1)
/* 1943EC 80265B0C 28A20010 */  slti      $v0, $a1, 0x10
/* 1943F0 80265B10 1440FFEE */  bnez      $v0, .L80265ACC
/* 1943F4 80265B14 24630002 */   addiu    $v1, $v1, 0x2
/* 1943F8 80265B18 0000282D */  daddu     $a1, $zero, $zero
/* 1943FC 80265B1C 0080182D */  daddu     $v1, $a0, $zero
/* 194400 80265B20 24020003 */  addiu     $v0, $zero, 0x3
/* 194404 80265B24 A08207DA */  sb        $v0, 0x7DA($a0)
/* 194408 80265B28 A08007DB */  sb        $zero, 0x7DB($a0)
/* 19440C 80265B2C A08008AC */  sb        $zero, 0x8AC($a0)
.L80265B30:
/* 194410 80265B30 AC6008B0 */  sw        $zero, 0x8B0($v1)
/* 194414 80265B34 00851021 */  addu      $v0, $a0, $a1
/* 194418 80265B38 24A50001 */  addiu     $a1, $a1, 0x1
/* 19441C 80265B3C A04008B8 */  sb        $zero, 0x8B8($v0)
/* 194420 80265B40 28A20002 */  slti      $v0, $a1, 0x2
/* 194424 80265B44 1440FFFA */  bnez      $v0, .L80265B30
/* 194428 80265B48 24630004 */   addiu    $v1, $v1, 0x4
.L80265B4C:
/* 19442C 80265B4C 8E020000 */  lw        $v0, 0x0($s0)
/* 194430 80265B50 04400007 */  bltz      $v0, .L80265B70
/* 194434 80265B54 00000000 */   nop
/* 194438 80265B58 0C00AB39 */  jal       heap_malloc
/* 19443C 80265B5C 2404008C */   addiu    $a0, $zero, 0x8C
/* 194440 80265B60 14400003 */  bnez      $v0, .L80265B70
/* 194444 80265B64 AE020010 */   sw       $v0, 0x10($s0)
.L80265B68:
/* 194448 80265B68 080996DA */  j         .L80265B68
/* 19444C 80265B6C 00000000 */   nop
.L80265B70:
/* 194450 80265B70 8E220000 */  lw        $v0, 0x0($s1)
/* 194454 80265B74 30424000 */  andi      $v0, $v0, 0x4000
/* 194458 80265B78 10400004 */  beqz      $v0, .L80265B8C
/* 19445C 80265B7C 00000000 */   nop
/* 194460 80265B80 8E020000 */  lw        $v0, 0x0($s0)
/* 194464 80265B84 34424000 */  ori       $v0, $v0, 0x4000
/* 194468 80265B88 AE020000 */  sw        $v0, 0x0($s0)
.L80265B8C:
/* 19446C 80265B8C 8E040094 */  lw        $a0, 0x94($s0)
/* 194470 80265B90 2402FFFF */  addiu     $v0, $zero, -0x1
/* 194474 80265B94 E6140090 */  swc1      $f20, 0x90($s0)
/* 194478 80265B98 AE000088 */  sw        $zero, 0x88($s0)
/* 19447C 80265B9C 1080000A */  beqz      $a0, .L80265BC8
/* 194480 80265BA0 AE020084 */   sw       $v0, 0x84($s0)
/* 194484 80265BA4 0C09973A */  jal       get_npc_anim_for_status
/* 194488 80265BA8 24050001 */   addiu    $a1, $zero, 0x1
/* 19448C 80265BAC 3C037FFF */  lui       $v1, (0x7FFFFFFF >> 16)
/* 194490 80265BB0 3463FFFF */  ori       $v1, $v1, (0x7FFFFFFF & 0xFFFF)
/* 194494 80265BB4 00432024 */  and       $a0, $v0, $v1
/* 194498 80265BB8 0000282D */  daddu     $a1, $zero, $zero
/* 19449C 80265BBC 0C0B783B */  jal       spr_load_npc_sprite
/* 1944A0 80265BC0 AE040088 */   sw       $a0, 0x88($s0)
/* 1944A4 80265BC4 AE020084 */  sw        $v0, 0x84($s0)
.L80265BC8:
/* 1944A8 80265BC8 26620001 */  addiu     $v0, $s3, 0x1
/* 1944AC 80265BCC 0056102A */  slt       $v0, $v0, $s6
/* 1944B0 80265BD0 50400009 */  beql      $v0, $zero, .L80265BF8
/* 1944B4 80265BD4 AE00000C */   sw       $zero, 0xC($s0)
/* 1944B8 80265BD8 0C00AB39 */  jal       heap_malloc
/* 1944BC 80265BDC 240400C4 */   addiu    $a0, $zero, 0xC4
/* 1944C0 80265BE0 AE02000C */  sw        $v0, 0xC($s0)
/* 1944C4 80265BE4 0040802D */  daddu     $s0, $v0, $zero
/* 1944C8 80265BE8 56000003 */  bnel      $s0, $zero, .L80265BF8
/* 1944CC 80265BEC AE00000C */   sw       $zero, 0xC($s0)
.L80265BF0:
/* 1944D0 80265BF0 080996FC */  j         .L80265BF0
/* 1944D4 80265BF4 00000000 */   nop
.L80265BF8:
/* 1944D8 80265BF8 26730001 */  addiu     $s3, $s3, 0x1
/* 1944DC 80265BFC 0276102A */  slt       $v0, $s3, $s6
/* 1944E0 80265C00 1440FF01 */  bnez      $v0, .L80265808
/* 1944E4 80265C04 26B50024 */   addiu    $s5, $s5, 0x24
.L80265C08:
/* 1944E8 80265C08 2405000A */  addiu     $a1, $zero, 0xA
/* 1944EC 80265C0C 0000302D */  daddu     $a2, $zero, $zero
/* 1944F0 80265C10 8E2401C4 */  lw        $a0, 0x1C4($s1)
/* 1944F4 80265C14 922201F2 */  lbu       $v0, 0x1F2($s1)
/* 1944F8 80265C18 24030019 */  addiu     $v1, $zero, 0x19
/* 1944FC 80265C1C A22301BC */  sb        $v1, 0x1BC($s1)
/* 194500 80265C20 00021600 */  sll       $v0, $v0, 24
/* 194504 80265C24 00021603 */  sra       $v0, $v0, 24
/* 194508 80265C28 34420200 */  ori       $v0, $v0, 0x200
/* 19450C 80265C2C 0C0B0CF8 */  jal       start_script
/* 194510 80265C30 A6220192 */   sh       $v0, 0x192($s1)
/* 194514 80265C34 822301F2 */  lb        $v1, 0x1F2($s1)
/* 194518 80265C38 8C440144 */  lw        $a0, 0x144($v0)
/* 19451C 80265C3C 34630200 */  ori       $v1, $v1, 0x200
/* 194520 80265C40 AE2401E4 */  sw        $a0, 0x1E4($s1)
/* 194524 80265C44 AC430148 */  sw        $v1, 0x148($v0)
/* 194528 80265C48 8E250144 */  lw        $a1, 0x144($s1)
/* 19452C 80265C4C 8E260148 */  lw        $a2, 0x148($s1)
/* 194530 80265C50 8E27014C */  lw        $a3, 0x14C($s1)
/* 194534 80265C54 0C044898 */  jal       create_shadow_type
/* 194538 80265C58 0000202D */   daddu    $a0, $zero, $zero
/* 19453C 80265C5C 3C05C30E */  lui       $a1, (0xC30E0000 >> 16)
/* 194540 80265C60 3C064208 */  lui       $a2, (0x42080000 >> 16)
/* 194544 80265C64 3C073F80 */  lui       $a3, (0x3F800000 >> 16)
/* 194548 80265C68 0000202D */  daddu     $a0, $zero, $zero
/* 19454C 80265C6C AE22042C */  sw        $v0, 0x42C($s1)
/* 194550 80265C70 92220190 */  lbu       $v0, 0x190($s1)
/* 194554 80265C74 3C014038 */  lui       $at, (0x40380000 >> 16)
/* 194558 80265C78 44811800 */  mtc1      $at, $f3
/* 19455C 80265C7C 44801000 */  mtc1      $zero, $f2
/* 194560 80265C80 44820000 */  mtc1      $v0, $f0
/* 194564 80265C84 00000000 */  nop
/* 194568 80265C88 46800021 */  cvt.d.w   $f0, $f0
/* 19456C 80265C8C 46220003 */  div.d     $f0, $f0, $f2
/* 194570 80265C90 46200020 */  cvt.s.d   $f0, $f0
/* 194574 80265C94 E6200430 */  swc1      $f0, 0x430($s1)
/* 194578 80265C98 0C01C43C */  jal       fx_disable_x
/* 19457C 80265C9C AFA00010 */   sw       $zero, 0x10($sp)
/* 194580 80265CA0 AE220440 */  sw        $v0, 0x440($s1)
/* 194584 80265CA4 0C011D82 */  jal       create_status_icon_set
/* 194588 80265CA8 AE200228 */   sw       $zero, 0x228($s1)
/* 19458C 80265CAC A6220436 */  sh        $v0, 0x436($s1)
/* 194590 80265CB0 0220102D */  daddu     $v0, $s1, $zero
/* 194594 80265CB4 8FBF0034 */  lw        $ra, 0x34($sp)
/* 194598 80265CB8 8FB60030 */  lw        $s6, 0x30($sp)
/* 19459C 80265CBC 8FB5002C */  lw        $s5, 0x2C($sp)
/* 1945A0 80265CC0 8FB40028 */  lw        $s4, 0x28($sp)
/* 1945A4 80265CC4 8FB30024 */  lw        $s3, 0x24($sp)
/* 1945A8 80265CC8 8FB20020 */  lw        $s2, 0x20($sp)
/* 1945AC 80265CCC 8FB1001C */  lw        $s1, 0x1C($sp)
/* 1945B0 80265CD0 8FB00018 */  lw        $s0, 0x18($sp)
/* 1945B4 80265CD4 D7B80048 */  ldc1      $f24, 0x48($sp)
/* 1945B8 80265CD8 D7B60040 */  ldc1      $f22, 0x40($sp)
/* 1945BC 80265CDC D7B40038 */  ldc1      $f20, 0x38($sp)
/* 1945C0 80265CE0 03E00008 */  jr        $ra
/* 1945C4 80265CE4 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

Actor* create_actor(Formation formation) {
    BattleStatus* battleStatus = &gBattleStatus;
    Actor* actor;
    ActorBlueprint* formationActor;
    ActorPart* part;
    ActorPartBlueprint* partBP;
    Evt* takeTurnScript;
    s32 partCount;
    f32 x, y, z;
    DecorationTable* decorationTable;
    s32 i, j, k;

    if (formation->home.index >= EVT_LIMIT) {
        x = btl_actorHomePositions[formation->home.index].x;
        y = btl_actorHomePositions[formation->home.index].y;
        z = btl_actorHomePositions[formation->home.index].z;
    } else {
        x = formation->home.vec->x;
        y = formation->home.vec->y;
        z = formation->home.vec->z;
    }

    formationActor = formation->actor;
    partCount = formationActor->partCount;

    for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
        if (battleStatus->enemyActors[i] == NULL) {
            break;
        }
    }

    actor = battleStatus->enemyActors[i] = heap_malloc(sizeof(*actor));

    ASSERT(actor != NULL);

    actor->unk_134 = battleStatus->unk_93++;
    actor->footStepCounter = 0;
    actor->actorBlueprint = formationActor;
    actor->actorType = formationActor->type;
    actor->flags = formationActor->flags;
    actor->homePos.x = actor->currentPos.x = x;
    actor->homePos.y = actor->currentPos.y = y;
    actor->homePos.z = actor->currentPos.z = z;
    actor->headOffset.x = 0;
    actor->headOffset.y = 0;
    actor->headOffset.z = 0;
    actor->maxHP = actor->currentHP = formationActor->maxHP;
    actor->numParts = partCount;
    actor->idleSource = NULL;
    actor->takeTurnSource = formationActor->initScript;
    actor->handleEventSource = NULL;
    actor->handlePhaseSource = NULL;
    actor->idleScript = NULL;
    actor->takeTurnScript = NULL;
    actor->handleEventScript = NULL;
    actor->turnPriority = formation->priority;
    actor->enemyIndex = i;
    actor->yaw = 0.0f;
    actor->rotation.x = 0.0f;
    actor->rotation.y = 0.0f;
    actor->rotation.z = 0.0f;
    actor->rotationPivotOffset.x = 0;
    actor->rotationPivotOffset.y = 0;
    actor->rotationPivotOffset.z = 0;
    actor->scale.x = 1.0f;
    actor->scale.y = 1.0f;
    actor->scale.z = 1.0f;
    actor->scaleModifier.x = 1.0f;
    actor->scaleModifier.y = 1.0f;
    actor->scaleModifier.z = 1.0f;
    actor->verticalRenderOffset = 0;
    actor->extraCoinBonus = 0;
    actor->size.x = formationActor->size.x;
    actor->size.y = formationActor->size.y;
    actor->scalingFactor = 1.0f;
    actor->statusIconOffset.x = 0;
    actor->statusIconOffset.y = 0;
    actor->statusTextOffset.x = 0;
    actor->statusTextOffset.y = 0;
    actor->healthBarOffset.x = 0;
    actor->healthBarOffset.y = 0;
    actor->healthBarHideTime = 0;
    actor->attackResultEffect = NULL;
    actor->actionRatingCombo = 0;
    actor->actionRatingTime = 0;

    actor->healthBarPos.x = actor->currentPos.x + formationActor->healthBarOffset.x;
    actor->healthBarPos.y = actor->currentPos.y + formationActor->healthBarOffset.y;
    actor->healthBarPos.z = actor->currentPos.z;
    if (actor->flags & ACTOR_FLAG_UPSIDE_DOWN) {
        actor->healthBarPos.y = actor->currentPos.y - actor->size.y - formationActor->healthBarOffset.y;
    }

    actor->statusTable = formationActor->statusTable;
    actor->debuff = 0;
    actor->debuffDuration = 0;
    actor->staticStatus = 0;
    actor->staticDuration = 0;
    actor->stoneStatus = 0;
    actor->stoneDuration = 0;
    actor->koStatus = 0;
    actor->koDuration = 0;
    actor->transparentStatus = 0;
    actor->transparentDuration = 0;
    actor->isGlowing = 0;
    actor->unk_21E = 0;
    actor->disableDismissTimer = 0;
    actor->attackBoost = 0;
    actor->defenseBoost = 0;
    actor->chillOutAmount = 0;
    actor->chillOutTurns = 0;
    actor->statusAfflicted = 0;
    actor->actorTypeData1[0] = bActorSoundTable[actor->actorType].walk[0];
    actor->actorTypeData1[1] = bActorSoundTable[actor->actorType].walk[1];
    actor->actorTypeData1[2] = bActorSoundTable[actor->actorType].fly[0];
    actor->actorTypeData1[3] = bActorSoundTable[actor->actorType].fly[1];
    actor->actorTypeData1[4] = bActorSoundTable[actor->actorType].jump;
    actor->actorTypeData1[5] = bActorSoundTable[actor->actorType].hurt;
    actor->actorTypeData1b[0] = bActorSoundTable[actor->actorType].delay[0];
    actor->actorTypeData1b[1] = bActorSoundTable[actor->actorType].delay[1];

    for (i = 0; i < ARRAY_COUNT(actor->loopingSoundID); i++) {
        actor->loopingSoundID[i] = 0;
    }

    actor->state.varTable[0] = formation->var0;
    actor->state.varTable[1] = formation->var1;
    actor->state.varTable[2] = formation->var2;
    actor->state.varTable[3] = formation->var3;
    actor->renderMode = RENDER_MODE_ALPHATEST;
    actor->instigatorValue = 0;
    part = heap_malloc(sizeof(*part));
    actor->partsTable = part;
    ASSERT(part != NULL);

    for (j = 0; j < partCount; j++) {
        ActorPartBlueprint* actorPartBP = &formationActor->partsData[j];

        part->decorationTable = NULL;
        part->staticData = actorPartBP;
        part->flags = actorPartBP->flags | ACTOR_PART_FLAG_4;
        part->targetFlags = 0;

        part->partOffsetFloat.x = part->partOffset.x = actorPartBP->posOffset.x;
        part->partOffsetFloat.y = part->partOffset.y = actorPartBP->posOffset.y;
        part->partOffsetFloat.z = part->partOffset.z = actorPartBP->posOffset.z;

        part->visualOffset.x = 0;
        part->visualOffset.y = 0;
        part->visualOffset.z = 0;

        part->absolutePosition.x = actor->currentPos.x;
        part->absolutePosition.y = actor->currentPos.y;
        part->absolutePosition.z = actor->currentPos.z;
        part->currentPos.x = actor->currentPos.x;
        part->currentPos.y = actor->currentPos.y;
        part->currentPos.z = actor->currentPos.z;
        part->defenseTable = actorPartBP->defenseTable;
        part->idleAnimations = actorPartBP->idleAnimations;
        part->eventFlags = actorPartBP->eventFlags;
        part->elementalImmunities = actorPartBP->elementImmunityFlags;
        part->opacity = actorPartBP->opacity;
        if (part->opacity < 255) {
            actor->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3;
        }
        part->size.y = actor->size.y;
        part->size.x = actor->size.x;
        part->yaw = 0.0f;
        part->targetOffset.x = actorPartBP->targetOffset.x;
        part->targetOffset.y = actorPartBP->targetOffset.y;
        part->unk_70 = 0;
        part->projectileTargetOffset.x = actorPartBP->projectileTargetOffset.x;
        part->projectileTargetOffset.y = actorPartBP->projectileTargetOffset.y;
        part->rotation.x = 0.0f;
        part->rotation.y = 0.0f;
        part->rotation.z = 0.0f;
        part->rotationPivotOffset.x = 0;
        part->rotationPivotOffset.y = 0;
        part->rotationPivotOffset.z = 0;
        part->scale.x = 1.0f;
        part->scale.y = 1.0f;
        part->scale.z = 1.0f;
        part->verticalStretch = 1;
        part->palAnimPosOffset[0] = 0;
        part->palAnimPosOffset[1] = 0;
        part->partTypeData[0] = bActorSoundTable[actor->actorType].walk[0];
        part->partTypeData[1] = bActorSoundTable[actor->actorType].walk[1];
        part->partTypeData[2] = bActorSoundTable[actor->actorType].fly[0];
        part->partTypeData[3] = bActorSoundTable[actor->actorType].fly[1];
        part->partTypeData[4] = bActorSoundTable[actor->actorType].jump;
        part->partTypeData[5] = bActorSoundTable[actor->actorType].hurt;
        part->actorTypeData2b[0] = bActorSoundTable[actor->actorType].delay[0];
        part->actorTypeData2b[1] = bActorSoundTable[actor->actorType].delay[1];

        if (part->idleAnimations != NULL && !(part->flags & ACTOR_PART_FLAG_2)) {
            part->decorationTable = heap_malloc(sizeof(*decorationTable));
            decorationTable = part->decorationTable;
            ASSERT(decorationTable != NULL);

            decorationTable->paletteAdjustment = PAL_ADJUST_NONE;
            decorationTable->unk_750 = 0;
            decorationTable->unk_764 = 0;
            decorationTable->unk_768 = 0;
            decorationTable->unk_7D8 = 0;
            decorationTable->unk_7D9 = 0;

            for (k = 0; k < ARRAY_COUNT(decorationTable->posX); k++) {
                decorationTable->posX[k] = actor->currentPos.x;
                decorationTable->posY[k] = actor->currentPos.y;
                decorationTable->posZ[k] = actor->currentPos.z;
            }

            decorationTable->unk_7DA = 3;
            decorationTable->unk_7DB = 0;
            decorationTable->effectType = 0;

            for (k = 0; k < ARRAY_COUNT(decorationTable->effect); k++) {
                decorationTable->effect[k] = NULL;
                decorationTable->type[k] = 0;
            }

        }

        if (part->flags >= 0) {
            part->movement = heap_malloc(sizeof(*part->movement));
            ASSERT(part->movement != NULL);
        }

        if (actor->flags & ACTOR_FLAG_TARGET_ONLY) {
            part->flags |= ACTOR_PART_FLAG_4000;
        }

        part->animationRate = 1.0f;
        part->currentAnimation = 0;
        part->spriteInstanceID = -1;

        if (part->idleAnimations != NULL) {
            part->currentAnimation = get_npc_anim_for_status(part->idleAnimations, 1) & ~SPRITE_ID_TAIL_ALLOCATE;
            part->spriteInstanceID = spr_load_npc_sprite(part->currentAnimation, NULL);
        }

        if (j + 1 >= partCount) {
            part->nextPart = NULL;
            continue;
        }

        part->nextPart = heap_malloc(sizeof(*part->nextPart));
        part = part->nextPart;
        if (part == NULL) {
            PANIC();
        }

        part->nextPart = NULL;
    }

    actor->healthFraction = 25;
    actor->actorID = actor->enemyIndex | ACTOR_CLASS_ENEMY;
    takeTurnScript = start_script(actor->takeTurnSource, EVT_PRIORITY_A, 0);
    actor->takeTurnScriptID = takeTurnScript->id;
    takeTurnScript->owner1.enemyID = actor->enemyIndex | ACTOR_CLASS_ENEMY;
    actor->shadow.id = create_shadow_type(0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z);
    actor->shadowScale = actor->size.x / 24.0;
    actor->disableEffect = fx_disable_x(0, -142.0f, 34.0f, 1.0f, 0);
    actor->icePillarEffect = NULL;
    actor->hudElementDataIndex = create_status_icon_set();
    return actor;
}


### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_80249970
/* 13CCB0 80249970 27BDFF58 */  addiu     $sp, $sp, -0xA8
/* 13CCB4 80249974 3C038027 */  lui       $v1, %hi(gPauseItemsCurrentPage)
/* 13CCB8 80249978 8C6304C8 */  lw        $v1, %lo(gPauseItemsCurrentPage)($v1)
glabel func_8024997C
/* 13CCBC 8024997C 240A0001 */  addiu     $t2, $zero, 0x1
D_80249980:
/* 13CCC0 80249980 AFA500AC */  sw        $a1, 0xAC($sp)
D_80249984:
/* 13CCC4 80249984 AFAA0060 */  sw        $t2, 0x60($sp)
D_80249988:
/* 13CCC8 80249988 8FAA00AC */  lw        $t2, 0xAC($sp)
/* 13CCCC 8024998C AFA600B0 */  sw        $a2, 0xB0($sp)
/* 13CCD0 80249990 AFA700B4 */  sw        $a3, 0xB4($sp)
/* 13CCD4 80249994 8FA700B0 */  lw        $a3, 0xB0($sp)
/* 13CCD8 80249998 240B000A */  addiu     $t3, $zero, 0xA
/* 13CCDC 8024999C AFAB0064 */  sw        $t3, 0x64($sp)
/* 13CCE0 802499A0 8FAB00B4 */  lw        $t3, 0xB4($sp)
/* 13CCE4 802499A4 AFBF00A4 */  sw        $ra, 0xA4($sp)
D_802499A8:
/* 13CCE8 802499A8 AFBE00A0 */  sw        $fp, 0xA0($sp)
/* 13CCEC 802499AC AFB7009C */  sw        $s7, 0x9C($sp)
/* 13CCF0 802499B0 AFB60098 */  sw        $s6, 0x98($sp)
/* 13CCF4 802499B4 AFB50094 */  sw        $s5, 0x94($sp)
/* 13CCF8 802499B8 AFB40090 */  sw        $s4, 0x90($sp)
.L802499BC:
/* 13CCFC 802499BC AFB3008C */  sw        $s3, 0x8C($sp)
/* 13CD00 802499C0 AFB20088 */  sw        $s2, 0x88($sp)
/* 13CD04 802499C4 AFB10084 */  sw        $s1, 0x84($sp)
/* 13CD08 802499C8 AFB00080 */  sw        $s0, 0x80($sp)
.L802499CC:
/* 13CD0C 802499CC 25460044 */  addiu     $a2, $t2, 0x44
/* 13CD10 802499D0 00031040 */  sll       $v0, $v1, 1
/* 13CD14 802499D4 00431021 */  addu      $v0, $v0, $v1
/* 13CD18 802499D8 00021080 */  sll       $v0, $v0, 2
/* 13CD1C 802499DC 3C088027 */  lui       $t0, %hi(D_802704D2)
/* 13CD20 802499E0 01024021 */  addu      $t0, $t0, $v0
/* 13CD24 802499E4 910804D2 */  lbu       $t0, %lo(D_802704D2)($t0)
/* 13CD28 802499E8 8FAA00B8 */  lw        $t2, 0xB8($sp)
.L802499EC:
/* 13CD2C 802499EC 2562FFBC */  addiu     $v0, $t3, -0x44
/* 13CD30 802499F0 AFA20014 */  sw        $v0, 0x14($sp)
/* 13CD34 802499F4 240200FF */  addiu     $v0, $zero, 0xFF
/* 13CD38 802499F8 AFA00010 */  sw        $zero, 0x10($sp)
D_802499FC:
/* 13CD3C 802499FC AFA2001C */  sw        $v0, 0x1C($sp)
/* 13CD40 80249A00 AFA00020 */  sw        $zero, 0x20($sp)
/* 13CD44 80249A04 AFA00024 */  sw        $zero, 0x24($sp)
.L80249A08:
/* 13CD48 80249A08 AFA00028 */  sw        $zero, 0x28($sp)
/* 13CD4C 80249A0C AFA0002C */  sw        $zero, 0x2C($sp)
/* 13CD50 80249A10 AFA00030 */  sw        $zero, 0x30($sp)
/* 13CD54 80249A14 AFA00034 */  sw        $zero, 0x34($sp)
/* 13CD58 80249A18 AFA00038 */  sw        $zero, 0x38($sp)
/* 13CD5C 80249A1C AFA0003C */  sw        $zero, 0x3C($sp)
.L80249A20:
/* 13CD60 80249A20 AFAA0018 */  sw        $t2, 0x18($sp)
/* 13CD64 80249A24 AFA00040 */  sw        $zero, 0x40($sp)
/* 13CD68 80249A28 3C038027 */  lui       $v1, %hi(gPauseItemsSelectedIndex)
/* 13CD6C 80249A2C 8C6305C0 */  lw        $v1, %lo(gPauseItemsSelectedIndex)($v1)
/* 13CD70 80249A30 15000002 */  bnez      $t0, .L80249A3C
/* 13CD74 80249A34 0068001A */   div      $zero, $v1, $t0
/* 13CD78 80249A38 0007000D */  break     7
.L80249A3C:
/* 13CD7C 80249A3C 2401FFFF */  addiu     $at, $zero, -0x1
/* 13CD80 80249A40 15010004 */  bne       $t0, $at, .L80249A54
/* 13CD84 80249A44 3C018000 */   lui      $at, (0x80000000 >> 16)
D_80249A48:
/* 13CD88 80249A48 14610002 */  bne       $v1, $at, .L80249A54
D_80249A4C:
/* 13CD8C 80249A4C 00000000 */   nop
.L80249A50:
/* 13CD90 80249A50 0006000D */  break     6
.L80249A54:
/* 13CD94 80249A54 00005012 */  mflo      $t2
/* 13CD98 80249A58 00005810 */  mfhi      $t3
D_80249A5C:
/* 13CD9C 80249A5C 24040004 */  addiu     $a0, $zero, 0x4
/* 13CDA0 80249A60 3C058027 */  lui       $a1, %hi(gPauseWS_18)
/* 13CDA4 80249A64 24A5FCF0 */  addiu     $a1, $a1, %lo(gPauseWS_18)
/* 13CDA8 80249A68 24020140 */  addiu     $v0, $zero, 0x140
D_80249A6C:
/* 13CDAC 80249A6C AFA20044 */  sw        $v0, 0x44($sp)
D_80249A70:
/* 13CDB0 80249A70 240200F0 */  addiu     $v0, $zero, 0xF0
D_80249A74:
/* 13CDB4 80249A74 AFA20048 */  sw        $v0, 0x48($sp)
D_80249A78:
/* 13CDB8 80249A78 AFA0004C */  sw        $zero, 0x4C($sp)
D_80249A7C:
/* 13CDBC 80249A7C AFAA005C */  sw        $t2, 0x5C($sp)
D_80249A80:
/* 13CDC0 80249A80 0C03D4B8 */  jal       draw_box
D_80249A84:
/* 13CDC4 80249A84 AFAB0058 */   sw       $t3, 0x58($sp)
D_80249A88:
/* 13CDC8 80249A88 3C108027 */  lui       $s0, %hi(gPauseItemsPages)
D_80249A8C:
/* 13CDCC 80249A8C 261004D0 */  addiu     $s0, $s0, %lo(gPauseItemsPages)
D_80249A90:
/* 13CDD0 80249A90 8FAB00B0 */  lw        $t3, 0xB0($sp)
D_80249A94:
/* 13CDD4 80249A94 8FAA00AC */  lw        $t2, 0xAC($sp)
D_80249A98:
/* 13CDD8 80249A98 25660007 */  addiu     $a2, $t3, 0x7
D_80249A9C:
/* 13CDDC 80249A9C 8FAB00B4 */  lw        $t3, 0xB4($sp)
D_80249AA0:
/* 13CDE0 80249AA0 25440001 */  addiu     $a0, $t2, 0x1
D_80249AA4:
/* 13CDE4 80249AA4 014B1021 */  addu      $v0, $t2, $t3
/* 13CDE8 80249AA8 8FAA00B0 */  lw        $t2, 0xB0($sp)
/* 13CDEC 80249AAC 8FAB00B8 */  lw        $t3, 0xB8($sp)
/* 13CDF0 80249AB0 2447FFFF */  addiu     $a3, $v0, -0x1
/* 13CDF4 80249AB4 014B1021 */  addu      $v0, $t2, $t3
glabel func_80249AB8
/* 13CDF8 80249AB8 1C800002 */  bgtz      $a0, .L80249AC4
D_80249ABC:
/* 13CDFC 80249ABC 2448FFF9 */   addiu    $t0, $v0, -0x7
/* 13CE00 80249AC0 24040001 */  addiu     $a0, $zero, 0x1
.L80249AC4:
/* 13CE04 80249AC4 58C00001 */  blezl     $a2, .L80249ACC
/* 13CE08 80249AC8 24060001 */   addiu    $a2, $zero, 0x1
.L80249ACC:
/* 13CE0C 80249ACC 18E00277 */  blez      $a3, .L8024A4AC
/* 13CE10 80249AD0 00000000 */   nop
/* 13CE14 80249AD4 19000275 */  blez      $t0, .L8024A4AC
/* 13CE18 80249AD8 2882013F */   slti     $v0, $a0, 0x13F
/* 13CE1C 80249ADC 10400273 */  beqz      $v0, .L8024A4AC
D_80249AE0:
/* 13CE20 80249AE0 28C200EF */   slti     $v0, $a2, 0xEF
/* 13CE24 80249AE4 10400271 */  beqz      $v0, .L8024A4AC
/* 13CE28 80249AE8 28E2013F */   slti     $v0, $a3, 0x13F
/* 13CE2C 80249AEC 50400001 */  beql      $v0, $zero, .L80249AF4
/* 13CE30 80249AF0 2407013F */   addiu    $a3, $zero, 0x13F
.L80249AF4:
/* 13CE34 80249AF4 290200EF */  slti      $v0, $t0, 0xEF
/* 13CE38 80249AF8 50400001 */  beql      $v0, $zero, .L80249B00
/* 13CE3C 80249AFC 240800EF */   addiu    $t0, $zero, 0xEF
.L80249B00:
/* 13CE40 80249B00 3C03800A */  lui       $v1, %hi(gMainGfxPos)
/* 13CE44 80249B04 2463A66C */  addiu     $v1, $v1, %lo(gMainGfxPos)
/* 13CE48 80249B08 44841000 */  mtc1      $a0, $f2
/* 13CE4C 80249B0C 00000000 */  nop
D_80249B10:
/* 13CE50 80249B10 468010A0 */  cvt.s.w   $f2, $f2
.L80249B14:
/* 13CE54 80249B14 44860000 */  mtc1      $a2, $f0
/* 13CE58 80249B18 00000000 */  nop
/* 13CE5C 80249B1C 46800020 */  cvt.s.w   $f0, $f0
/* 13CE60 80249B20 8FAA00AC */  lw        $t2, 0xAC($sp)
/* 13CE64 80249B24 8FAB00B0 */  lw        $t3, 0xB0($sp)
/* 13CE68 80249B28 3C014080 */  lui       $at, (0x40800000 >> 16)
.L80249B2C:
/* 13CE6C 80249B2C 44812000 */  mtc1      $at, $f4
.L80249B30:
/* 13CE70 80249B30 3C04ED00 */  lui       $a0, (0xED000000 >> 16)
D_80249B34:
/* 13CE74 80249B34 AFA00054 */  sw        $zero, 0x54($sp)
.L80249B38:
/* 13CE78 80249B38 AFA00050 */  sw        $zero, 0x50($sp)
/* 13CE7C 80249B3C 254A0077 */  addiu     $t2, $t2, 0x77
/* 13CE80 80249B40 46041082 */  mul.s     $f2, $f2, $f4
/* 13CE84 80249B44 00000000 */  nop
.L80249B48:
/* 13CE88 80249B48 256B0011 */  addiu     $t3, $t3, 0x11
/* 13CE8C 80249B4C AFAA006C */  sw        $t2, 0x6C($sp)
/* 13CE90 80249B50 AFAB0070 */  sw        $t3, 0x70($sp)
/* 13CE94 80249B54 8C620000 */  lw        $v0, 0x0($v1)
.L80249B58:
/* 13CE98 80249B58 46040002 */  mul.s     $f0, $f0, $f4
/* 13CE9C 80249B5C 00000000 */  nop
/* 13CEA0 80249B60 0040282D */  daddu     $a1, $v0, $zero
/* 13CEA4 80249B64 24420008 */  addiu     $v0, $v0, 0x8
/* 13CEA8 80249B68 AC620000 */  sw        $v0, 0x0($v1)
/* 13CEAC 80249B6C 4600118D */  trunc.w.s $f6, $f2
/* 13CEB0 80249B70 44023000 */  mfc1      $v0, $f6
/* 13CEB4 80249B74 00000000 */  nop
/* 13CEB8 80249B78 30420FFF */  andi      $v0, $v0, 0xFFF
/* 13CEBC 80249B7C 00021300 */  sll       $v0, $v0, 12
D_80249B80:
/* 13CEC0 80249B80 4600018D */  trunc.w.s $f6, $f0
D_80249B84:
/* 13CEC4 80249B84 44033000 */  mfc1      $v1, $f6
D_80249B88:
/* 13CEC8 80249B88 44871000 */  mtc1      $a3, $f2
D_80249B8C:
/* 13CECC 80249B8C 00000000 */  nop
D_80249B90:
/* 13CED0 80249B90 468010A0 */  cvt.s.w   $f2, $f2
D_80249B94:
/* 13CED4 80249B94 46041082 */  mul.s     $f2, $f2, $f4
D_80249B98:
/* 13CED8 80249B98 00000000 */  nop
D_80249B9C:
/* 13CEDC 80249B9C 30630FFF */  andi      $v1, $v1, 0xFFF
D_80249BA0:
/* 13CEE0 80249BA0 00641825 */  or        $v1, $v1, $a0
D_80249BA4:
/* 13CEE4 80249BA4 00431025 */  or        $v0, $v0, $v1
D_80249BA8:
/* 13CEE8 80249BA8 44880000 */  mtc1      $t0, $f0
D_80249BAC:
/* 13CEEC 80249BAC 00000000 */  nop
D_80249BB0:
/* 13CEF0 80249BB0 46800020 */  cvt.s.w   $f0, $f0
/* 13CEF4 80249BB4 46040002 */  mul.s     $f0, $f0, $f4
D_80249BB8:
/* 13CEF8 80249BB8 00000000 */  nop
D_80249BBC:
/* 13CEFC 80249BBC ACA20000 */  sw        $v0, 0x0($a1)
/* 13CF00 80249BC0 4600118D */  trunc.w.s $f6, $f2
/* 13CF04 80249BC4 44023000 */  mfc1      $v0, $f6
/* 13CF08 80249BC8 00000000 */  nop
/* 13CF0C 80249BCC 30420FFF */  andi      $v0, $v0, 0xFFF
/* 13CF10 80249BD0 00021300 */  sll       $v0, $v0, 12
/* 13CF14 80249BD4 4600018D */  trunc.w.s $f6, $f0
/* 13CF18 80249BD8 44033000 */  mfc1      $v1, $f6
D_80249BDC:
/* 13CF1C 80249BDC 00000000 */  nop
/* 13CF20 80249BE0 30630FFF */  andi      $v1, $v1, 0xFFF
/* 13CF24 80249BE4 00431025 */  or        $v0, $v0, $v1
/* 13CF28 80249BE8 ACA20004 */  sw        $v0, 0x4($a1)
.L80249BEC:
/* 13CF2C 80249BEC 0000F02D */  daddu     $fp, $zero, $zero
/* 13CF30 80249BF0 3C0B8027 */  lui       $t3, %hi(gPauseItemsPages)
/* 13CF34 80249BF4 256B04D0 */  addiu     $t3, $t3, %lo(gPauseItemsPages)
/* 13CF38 80249BF8 AFAB007C */  sw        $t3, 0x7C($sp)
D_80249BFC:
/* 13CF3C 80249BFC 8FAA007C */  lw        $t2, 0x7C($sp)
/* 13CF40 80249C00 91420000 */  lbu       $v0, 0x0($t2)
/* 13CF44 80249C04 104000E2 */  beqz      $v0, .L80249F90
/* 13CF48 80249C08 00000000 */   nop
/* 13CF4C 80249C0C 03C0202D */  daddu     $a0, $fp, $zero
/* 13CF50 80249C10 0C09260A */  jal       func_80249828
/* 13CF54 80249C14 0000282D */   daddu    $a1, $zero, $zero
/* 13CF58 80249C18 8FAB007C */  lw        $t3, 0x7C($sp)
D_80249C1C:
/* 13CF5C 80249C1C 8D620008 */  lw        $v0, 0x8($t3)
/* 13CF60 80249C20 184000D5 */  blez      $v0, .L80249F78
/* 13CF64 80249C24 0000902D */   daddu    $s2, $zero, $zero
/* 13CF68 80249C28 8FAA0054 */  lw        $t2, 0x54($sp)
/* 13CF6C 80249C2C 3C0B8027 */  lui       $t3, %hi(gPauseItemsIconIDs)
/* 13CF70 80249C30 256B05E8 */  addiu     $t3, $t3, %lo(gPauseItemsIconIDs)
/* 13CF74 80249C34 000A1080 */  sll       $v0, $t2, 2
/* 13CF78 80249C38 004B5821 */  addu      $t3, $v0, $t3
D_80249C3C:
/* 13CF7C 80249C3C AFAB0078 */  sw        $t3, 0x78($sp)
.L80249C40:
/* 13CF80 80249C40 8FAA007C */  lw        $t2, 0x7C($sp)
/* 13CF84 80249C44 3C0B8027 */  lui       $t3, %hi(gPauseItemsItemIDs)
/* 13CF88 80249C48 256B0400 */  addiu     $t3, $t3, %lo(gPauseItemsItemIDs)
/* 13CF8C 80249C4C 8D420004 */  lw        $v0, 0x4($t2)
/* 13CF90 80249C50 24037FFF */  addiu     $v1, $zero, 0x7FFF
/* 13CF94 80249C54 00521021 */  addu      $v0, $v0, $s2
/* 13CF98 80249C58 00021040 */  sll       $v0, $v0, 1
D_80249C5C:
/* 13CF9C 80249C5C 004B1021 */  addu      $v0, $v0, $t3
/* 13CFA0 80249C60 84500000 */  lh        $s0, 0x0($v0)
/* 13CFA4 80249C64 94560000 */  lhu       $s6, 0x0($v0)
/* 13CFA8 80249C68 120300BD */  beq       $s0, $v1, .L80249F60
/* 13CFAC 80249C6C 0000982D */   daddu    $s3, $zero, $zero
/* 13CFB0 80249C70 03C0202D */  daddu     $a0, $fp, $zero
/* 13CFB4 80249C74 0C0925F4 */  jal       func_802497D0
/* 13CFB8 80249C78 0240282D */   daddu    $a1, $s2, $zero
D_80249C7C:
/* 13CFBC 80249C7C 03C0202D */  daddu     $a0, $fp, $zero
/* 13CFC0 80249C80 0240282D */  daddu     $a1, $s2, $zero
/* 13CFC4 80249C84 0C09260A */  jal       func_80249828
/* 13CFC8 80249C88 AFA20068 */   sw       $v0, 0x68($sp)
/* 13CFCC 80249C8C 0040B82D */  daddu     $s7, $v0, $zero
D_80249C90:
/* 13CFD0 80249C90 3A027FFE */  xori      $v0, $s0, 0x7FFE
.L80249C94:
/* 13CFD4 80249C94 3C038027 */  lui       $v1, %hi(gPauseMenuCurrentTab)
/* 13CFD8 80249C98 806300D4 */  lb        $v1, %lo(gPauseMenuCurrentTab)($v1)
/* 13CFDC 80249C9C 2C420001 */  sltiu     $v0, $v0, 0x1
.L80249CA0:
/* 13CFE0 80249CA0 AFA20074 */  sw        $v0, 0x74($sp)
D_80249CA4:
/* 13CFE4 80249CA4 24020003 */  addiu     $v0, $zero, 0x3
/* 13CFE8 80249CA8 14620012 */  bne       $v1, $v0, D_80249CF4
.L80249CAC:
/* 13CFEC 80249CAC 0000A02D */   daddu    $s4, $zero, $zero
.L80249CB0:
/* 13CFF0 80249CB0 3C028027 */  lui       $v0, %hi(gPauseItemsLevel)
/* 13CFF4 80249CB4 8C4205E0 */  lw        $v0, %lo(gPauseItemsLevel)($v0)
D_80249CB8:
/* 13CFF8 80249CB8 240A0001 */  addiu     $t2, $zero, 0x1
/* 13CFFC 80249CBC 144A000D */  bne       $v0, $t2, D_80249CF4
/* 13D000 80249CC0 03C0202D */   daddu    $a0, $fp, $zero
/* 13D004 80249CC4 0C092626 */  jal       func_80249898
/* 13D008 80249CC8 0240282D */   daddu    $a1, $s2, $zero
D_80249CCC:
/* 13D00C 80249CCC 8FAB0058 */  lw        $t3, 0x58($sp)
/* 13D010 80249CD0 144B0008 */  bne       $v0, $t3, D_80249CF4
.L80249CD4:
/* 13D014 80249CD4 0000A02D */   daddu    $s4, $zero, $zero
/* 13D018 80249CD8 03C0202D */  daddu     $a0, $fp, $zero
/* 13D01C 80249CDC 0C092638 */  jal       D_802498E0
D_80249CE0:
/* 13D020 80249CE0 0240282D */   daddu    $a1, $s2, $zero
/* 13D024 80249CE4 8FAA005C */  lw        $t2, 0x5C($sp)
/* 13D028 80249CE8 004A1026 */  xor       $v0, $v0, $t2
/* 13D02C 80249CEC 2C530001 */  sltiu     $s3, $v0, 0x1
dgb_01_img3_gfx:
/* 13D030 80249CF0 0000A02D */  daddu     $s4, $zero, $zero
D_80249CF4:
/* 13D034 80249CF4 12600003 */  beqz      $s3, .L80249D04
/* 13D038 80249CF8 0280A82D */   daddu    $s5, $s4, $zero
/* 13D03C 80249CFC 2414FFFF */  addiu     $s4, $zero, -0x1
/* 13D040 80249D00 0280A82D */  daddu     $s5, $s4, $zero
.L80249D04:
/* 13D044 80249D04 8FAB0050 */  lw        $t3, 0x50($sp)
/* 13D048 80249D08 15600007 */  bnez      $t3, .L80249D28
/* 13D04C 80249D0C 240A0001 */   addiu    $t2, $zero, 0x1
/* 13D050 80249D10 240B000A */  addiu     $t3, $zero, 0xA
D_80249D14:
/* 13D054 80249D14 AFAA0060 */  sw        $t2, 0x60($sp)
/* 13D058 80249D18 12600003 */  beqz      $s3, .L80249D28
/* 13D05C 80249D1C AFAB0064 */   sw       $t3, 0x64($sp)
/* 13D060 80249D20 240A0009 */  addiu     $t2, $zero, 0x9
/* 13D064 80249D24 AFAA0060 */  sw        $t2, 0x60($sp)
.L80249D28:
/* 13D068 80249D28 0C09264C */  jal       func_80249930
/* 13D06C 80249D2C 02E0202D */   daddu    $a0, $s7, $zero
D_80249D30:
/* 13D070 80249D30 1040008B */  beqz      $v0, .L80249F60
D_80249D34:
/* 13D074 80249D34 00000000 */   nop
D_80249D38:
/* 13D078 80249D38 8FAB0050 */  lw        $t3, 0x50($sp)
/* 13D07C 80249D3C 15600035 */  bnez      $t3, .L80249E14
jtbl_80249D40:
/* 13D080 80249D40 00000000 */   nop
/* 13D084 80249D44 8FAA0074 */  lw        $t2, 0x74($sp)
D_80249D48:
/* 13D088 80249D48 11400016 */  beqz      $t2, .L80249DA4
/* 13D08C 80249D4C 00161400 */   sll      $v0, $s6, 16
/* 13D090 80249D50 0C093BA0 */  jal       func_8024EE80
/* 13D094 80249D54 2404004E */   addiu    $a0, $zero, 0x4E
/* 13D098 80249D58 8FA40068 */  lw        $a0, 0x68($sp)
D_80249D5C:
/* 13D09C 80249D5C 0C09265A */  jal       func_80249968
end_00_D_80249D60_E00760:
/* 13D0A0 80249D60 0040882D */   daddu    $s1, $v0, $zero
/* 13D0A4 80249D64 8FAB006C */  lw        $t3, 0x6C($sp)
/* 13D0A8 80249D68 02E0202D */  daddu     $a0, $s7, $zero
/* 13D0AC 80249D6C 01628021 */  addu      $s0, $t3, $v0
dgb_01_img4_png:
/* 13D0B0 80249D70 0C092656 */  jal       func_80249958
/* 13D0B4 80249D74 02148021 */   addu     $s0, $s0, $s4
/* 13D0B8 80249D78 0220202D */  daddu     $a0, $s1, $zero
/* 13D0BC 80249D7C 0200282D */  daddu     $a1, $s0, $zero
/* 13D0C0 80249D80 240700FF */  addiu     $a3, $zero, 0xFF
/* 13D0C4 80249D84 8FAA0070 */  lw        $t2, 0x70($sp)
.L80249D88:
/* 13D0C8 80249D88 8FAB0064 */  lw        $t3, 0x64($sp)
/* 13D0CC 80249D8C 01421021 */  addu      $v0, $t2, $v0
/* 13D0D0 80249D90 8FAA0060 */  lw        $t2, 0x60($sp)
/* 13D0D4 80249D94 00553021 */  addu      $a2, $v0, $s5
/* 13D0D8 80249D98 AFAB0010 */  sw        $t3, 0x10($sp)
/* 13D0DC 80249D9C 08092783 */  j         .L80249E0C
/* 13D0E0 80249DA0 AFAA0014 */   sw       $t2, 0x14($sp)
.L80249DA4:
/* 13D0E4 80249DA4 000212C3 */  sra       $v0, $v0, 11
/* 13D0E8 80249DA8 3C0B8008 */  lui       $t3, %hi(gItemTable)
D_80249DAC:
/* 13D0EC 80249DAC 256B78E0 */  addiu     $t3, $t3, %lo(gItemTable)
/* 13D0F0 80249DB0 004B8821 */  addu      $s1, $v0, $t3
/* 13D0F4 80249DB4 8E220000 */  lw        $v0, 0x0($s1)
/* 13D0F8 80249DB8 10400016 */  beqz      $v0, .L80249E14
.L80249DBC:
/* 13D0FC 80249DBC 00000000 */   nop
/* 13D100 80249DC0 18400014 */  blez      $v0, .L80249E14
/* 13D104 80249DC4 00000000 */   nop
/* 13D108 80249DC8 0C09265A */  jal       func_80249968
D_80249DCC:
/* 13D10C 80249DCC 8FA40068 */   lw       $a0, 0x68($sp)
D_80249DD0:
/* 13D110 80249DD0 8FAA006C */  lw        $t2, 0x6C($sp)
/* 13D114 80249DD4 02E0202D */  daddu     $a0, $s7, $zero
/* 13D118 80249DD8 01428021 */  addu      $s0, $t2, $v0
/* 13D11C 80249DDC 0C092656 */  jal       func_80249958
/* 13D120 80249DE0 02148021 */   addu     $s0, $s0, $s4
/* 13D124 80249DE4 0200282D */  daddu     $a1, $s0, $zero
/* 13D128 80249DE8 8FAB0070 */  lw        $t3, 0x70($sp)
/* 13D12C 80249DEC 8FAA0064 */  lw        $t2, 0x64($sp)
/* 13D130 80249DF0 01621021 */  addu      $v0, $t3, $v0
/* 13D134 80249DF4 8FAB0060 */  lw        $t3, 0x60($sp)
/* 13D138 80249DF8 240700FF */  addiu     $a3, $zero, 0xFF
/* 13D13C 80249DFC AFAA0010 */  sw        $t2, 0x10($sp)
/* 13D140 80249E00 AFAB0014 */  sw        $t3, 0x14($sp)
/* 13D144 80249E04 8E240000 */  lw        $a0, 0x0($s1)
/* 13D148 80249E08 00553021 */  addu      $a2, $v0, $s5
.L80249E0C:
/* 13D14C 80249E0C 0C04993B */  jal       draw_msg
/* 13D150 80249E10 00000000 */   nop
.L80249E14:
/* 13D154 80249E14 8FAA0050 */  lw        $t2, 0x50($sp)
/* 13D158 80249E18 240B0001 */  addiu     $t3, $zero, 0x1
/* 13D15C 80249E1C 154B0050 */  bne       $t2, $t3, .L80249F60
D_80249E20:
/* 13D160 80249E20 3C052000 */   lui      $a1, (0x20000000 >> 16)
/* 13D164 80249E24 8FAA0078 */  lw        $t2, 0x78($sp)
/* 13D168 80249E28 8D510000 */  lw        $s1, 0x0($t2)
/* 13D16C 80249E2C 0C05128B */  jal       hud_element_clear_flags
/* 13D170 80249E30 0220202D */   daddu    $a0, $s1, $zero
/* 13D174 80249E34 0220202D */  daddu     $a0, $s1, $zero
/* 13D178 80249E38 0C051280 */  jal       hud_element_set_flags
/* 13D17C 80249E3C 34058000 */   ori      $a1, $zero, 0x8000
.L80249E40:
/* 13D180 80249E40 8FAB0074 */  lw        $t3, 0x74($sp)
/* 13D184 80249E44 11600005 */  beqz      $t3, .L80249E5C
/* 13D188 80249E48 00000000 */   nop
/* 13D18C 80249E4C 3C118027 */  lui       $s1, %hi(D_80270634)
/* 13D190 80249E50 8E310634 */  lw        $s1, %lo(D_80270634)($s1)
/* 13D194 80249E54 080927B9 */  j         .L80249EE4
/* 13D198 80249E58 00000000 */   nop
.L80249E5C:
/* 13D19C 80249E5C 12600010 */  beqz      $s3, .L80249EA0
/* 13D1A0 80249E60 0220202D */   daddu    $a0, $s1, $zero
/* 13D1A4 80249E64 0C051280 */  jal       hud_element_set_flags
/* 13D1A8 80249E68 3C052000 */   lui      $a1, (0x20000000 >> 16)
/* 13D1AC 80249E6C 00161400 */  sll       $v0, $s6, 16
D_80249E70:
/* 13D1B0 80249E70 000212C3 */  sra       $v0, $v0, 11
/* 13D1B4 80249E74 3C0A8008 */  lui       $t2, %hi(gItemTable)
/* 13D1B8 80249E78 254A78E0 */  addiu     $t2, $t2, %lo(gItemTable)
/* 13D1BC 80249E7C 004A1021 */  addu      $v0, $v0, $t2
/* 13D1C0 80249E80 84420004 */  lh        $v0, 0x4($v0)
/* 13D1C4 80249E84 3C0B8009 */  lui       $t3, %hi(gItemHudScripts)
/* 13D1C8 80249E88 256BA680 */  addiu     $t3, $t3, %lo(gItemHudScripts)
/* 13D1CC 80249E8C 000210C0 */  sll       $v0, $v0, 3
/* 13D1D0 80249E90 004B1021 */  addu      $v0, $v0, $t3
.L80249E94:
/* 13D1D4 80249E94 8C420000 */  lw        $v0, 0x0($v0)
/* 13D1D8 80249E98 3C018027 */  lui       $at, %hi(gPauseCurrentDescIconScript)
/* 13D1DC 80249E9C AC2200CC */  sw        $v0, %lo(gPauseCurrentDescIconScript)($at)
.L80249EA0:
/* 13D1E0 80249EA0 00161400 */  sll       $v0, $s6, 16
/* 13D1E4 80249EA4 000212C3 */  sra       $v0, $v0, 11
/* 13D1E8 80249EA8 3C0A8008 */  lui       $t2, %hi(gItemTable)
/* 13D1EC 80249EAC 254A78E0 */  addiu     $t2, $t2, %lo(gItemTable)
/* 13D1F0 80249EB0 004A1021 */  addu      $v0, $v0, $t2
/* 13D1F4 80249EB4 84420004 */  lh        $v0, 0x4($v0)
/* 13D1F8 80249EB8 3C0B8009 */  lui       $t3, %hi(gItemHudScripts)
/* 13D1FC 80249EBC 256BA680 */  addiu     $t3, $t3, %lo(gItemHudScripts)
/* 13D200 80249EC0 000210C0 */  sll       $v0, $v0, 3
/* 13D204 80249EC4 004B1021 */  addu      $v0, $v0, $t3
/* 13D208 80249EC8 8C450000 */  lw        $a1, 0x0($v0)
/* 13D20C 80249ECC 0C0511FF */  jal       hud_element_set_script
/* 13D210 80249ED0 0220202D */   daddu    $a0, $s1, $zero
/* 13D214 80249ED4 3C053F2B */  lui       $a1, (0x3F2BBA99 >> 16)
/* 13D218 80249ED8 34A5BA99 */  ori       $a1, $a1, (0x3F2BBA99 & 0xFFFF)
/* 13D21C 80249EDC 0C051308 */  jal       hud_element_set_scale
.L80249EE0:
/* 13D220 80249EE0 0220202D */   daddu    $a0, $s1, $zero
.L80249EE4:
/* 13D224 80249EE4 8FA40068 */  lw        $a0, 0x68($sp)
/* 13D228 80249EE8 0C09265A */  jal       func_80249968
/* 13D22C 80249EEC 00000000 */   nop
/* 13D230 80249EF0 02E0202D */  daddu     $a0, $s7, $zero
/* 13D234 80249EF4 8FAA00AC */  lw        $t2, 0xAC($sp)
/* 13D238 80249EF8 24500069 */  addiu     $s0, $v0, 0x69
D_80249EFC:
/* 13D23C 80249EFC 01508021 */  addu      $s0, $t2, $s0
/* 13D240 80249F00 0C092656 */  jal       func_80249958
/* 13D244 80249F04 02148021 */   addu     $s0, $s0, $s4
/* 13D248 80249F08 0220202D */  daddu     $a0, $s1, $zero
/* 13D24C 80249F0C 0200282D */  daddu     $a1, $s0, $zero
/* 13D250 80249F10 8FAB00B0 */  lw        $t3, 0xB0($sp)
/* 13D254 80249F14 24420017 */  addiu     $v0, $v0, 0x17
/* 13D258 80249F18 01621021 */  addu      $v0, $t3, $v0
/* 13D25C 80249F1C 0C051261 */  jal       hud_element_set_render_pos
/* 13D260 80249F20 00553021 */   addu     $a2, $v0, $s5
/* 13D264 80249F24 8FAA0054 */  lw        $t2, 0x54($sp)
/* 13D268 80249F28 15400005 */  bnez      $t2, .L80249F40
/* 13D26C 80249F2C 00000000 */   nop
/* 13D270 80249F30 0C0511F8 */  jal       hud_element_draw_without_clipping
/* 13D274 80249F34 0220202D */   daddu    $a0, $s1, $zero
/* 13D278 80249F38 080927D2 */  j         .L80249F48
/* 13D27C 80249F3C 00000000 */   nop
.L80249F40:
/* 13D280 80249F40 0C0511F1 */  jal       hud_element_draw_next
/* 13D284 80249F44 0220202D */   daddu    $a0, $s1, $zero
.L80249F48:
/* 13D288 80249F48 8FAB0078 */  lw        $t3, 0x78($sp)
/* 13D28C 80249F4C 8FAA0054 */  lw        $t2, 0x54($sp)
/* 13D290 80249F50 256B0004 */  addiu     $t3, $t3, 0x4
/* 13D294 80249F54 254A0001 */  addiu     $t2, $t2, 0x1
/* 13D298 80249F58 AFAB0078 */  sw        $t3, 0x78($sp)
/* 13D29C 80249F5C AFAA0054 */  sw        $t2, 0x54($sp)
.L80249F60:
/* 13D2A0 80249F60 8FAB007C */  lw        $t3, 0x7C($sp)
/* 13D2A4 80249F64 8D620008 */  lw        $v0, 0x8($t3)
/* 13D2A8 80249F68 26520001 */  addiu     $s2, $s2, 0x1
/* 13D2AC 80249F6C 0242102A */  slt       $v0, $s2, $v0
/* 13D2B0 80249F70 1440FF33 */  bnez      $v0, .L80249C40
/* 13D2B4 80249F74 00000000 */   nop
.L80249F78:
/* 13D2B8 80249F78 27DE0001 */  addiu     $fp, $fp, 0x1
/* 13D2BC 80249F7C 8FAA007C */  lw        $t2, 0x7C($sp)
/* 13D2C0 80249F80 2BC20014 */  slti      $v0, $fp, 0x14
/* 13D2C4 80249F84 254A000C */  addiu     $t2, $t2, 0xC
.L80249F88:
/* 13D2C8 80249F88 1440FF1C */  bnez      $v0, D_80249BFC
/* 13D2CC 80249F8C AFAA007C */   sw       $t2, 0x7C($sp)
.L80249F90:
/* 13D2D0 80249F90 8FAB0050 */  lw        $t3, 0x50($sp)
/* 13D2D4 80249F94 256B0001 */  addiu     $t3, $t3, 0x1
/* 13D2D8 80249F98 29620003 */  slti      $v0, $t3, 0x3
/* 13D2DC 80249F9C 1440FF13 */  bnez      $v0, .L80249BEC
/* 13D2E0 80249FA0 AFAB0050 */   sw       $t3, 0x50($sp)
/* 13D2E4 80249FA4 3C09800A */  lui       $t1, %hi(gMainGfxPos)
/* 13D2E8 80249FA8 2529A66C */  addiu     $t1, $t1, %lo(gMainGfxPos)
/* 13D2EC 80249FAC 8FAA00AC */  lw        $t2, 0xAC($sp)
/* 13D2F0 80249FB0 8FAB00B0 */  lw        $t3, 0xB0($sp)
.L80249FB4:
/* 13D2F4 80249FB4 8D250000 */  lw        $a1, 0x0($t1)
/* 13D2F8 80249FB8 25440001 */  addiu     $a0, $t2, 0x1
/* 13D2FC 80249FBC 25660001 */  addiu     $a2, $t3, 0x1
/* 13D300 80249FC0 00A0182D */  daddu     $v1, $a1, $zero
/* 13D304 80249FC4 8FAB00B4 */  lw        $t3, 0xB4($sp)
/* 13D308 80249FC8 24A50008 */  addiu     $a1, $a1, 0x8
/* 13D30C 80249FCC 014B1021 */  addu      $v0, $t2, $t3
/* 13D310 80249FD0 8FAA00B0 */  lw        $t2, 0xB0($sp)
/* 13D314 80249FD4 8FAB00B8 */  lw        $t3, 0xB8($sp)
/* 13D318 80249FD8 2447FFFF */  addiu     $a3, $v0, -0x1
/* 13D31C 80249FDC 014B1021 */  addu      $v0, $t2, $t3
/* 13D320 80249FE0 2448FFFF */  addiu     $t0, $v0, -0x1
D_80249FE4:
/* 13D324 80249FE4 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 13D328 80249FE8 AD250000 */  sw        $a1, 0x0($t1)
/* 13D32C 80249FEC AC620000 */  sw        $v0, 0x0($v1)
/* 13D330 80249FF0 1C800002 */  bgtz      $a0, .L80249FFC
/* 13D334 80249FF4 AC600004 */   sw       $zero, 0x4($v1)
/* 13D338 80249FF8 24040001 */  addiu     $a0, $zero, 0x1
.L80249FFC:
/* 13D33C 80249FFC 58C00001 */  blezl     $a2, .L8024A004
/* 13D340 8024A000 24060001 */   addiu    $a2, $zero, 0x1
.L8024A004:
/* 13D344 8024A004 18E00129 */  blez      $a3, .L8024A4AC
/* 13D348 8024A008 00000000 */   nop
/* 13D34C 8024A00C 19000127 */  blez      $t0, .L8024A4AC
/* 13D350 8024A010 2882013F */   slti     $v0, $a0, 0x13F
/* 13D354 8024A014 10400125 */  beqz      $v0, .L8024A4AC
/* 13D358 8024A018 28C200EF */   slti     $v0, $a2, 0xEF
/* 13D35C 8024A01C 10400123 */  beqz      $v0, .L8024A4AC
/* 13D360 8024A020 28E2013F */   slti     $v0, $a3, 0x13F
/* 13D364 8024A024 50400001 */  beql      $v0, $zero, .L8024A02C
/* 13D368 8024A028 2407013F */   addiu    $a3, $zero, 0x13F
.L8024A02C:
/* 13D36C 8024A02C 290200EF */  slti      $v0, $t0, 0xEF
/* 13D370 8024A030 50400001 */  beql      $v0, $zero, .L8024A038
/* 13D374 8024A034 240800EF */   addiu    $t0, $zero, 0xEF
.L8024A038:
/* 13D378 8024A038 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 13D37C 8024A03C 44812000 */  mtc1      $at, $f4
/* 13D380 8024A040 44840000 */  mtc1      $a0, $f0
/* 13D384 8024A044 00000000 */  nop
/* 13D388 8024A048 46800020 */  cvt.s.w   $f0, $f0
/* 13D38C 8024A04C 46040002 */  mul.s     $f0, $f0, $f4
/* 13D390 8024A050 00000000 */  nop
/* 13D394 8024A054 24A20008 */  addiu     $v0, $a1, 0x8
/* 13D398 8024A058 44861000 */  mtc1      $a2, $f2
/* 13D39C 8024A05C 00000000 */  nop
/* 13D3A0 8024A060 468010A0 */  cvt.s.w   $f2, $f2
/* 13D3A4 8024A064 3C04ED00 */  lui       $a0, (0xED000000 >> 16)
/* 13D3A8 8024A068 46041082 */  mul.s     $f2, $f2, $f4
/* 13D3AC 8024A06C 00000000 */  nop
/* 13D3B0 8024A070 AD220000 */  sw        $v0, 0x0($t1)
D_8024A074:
/* 13D3B4 8024A074 4600018D */  trunc.w.s $f6, $f0
/* 13D3B8 8024A078 44023000 */  mfc1      $v0, $f6
/* 13D3BC 8024A07C 00000000 */  nop
/* 13D3C0 8024A080 30420FFF */  andi      $v0, $v0, 0xFFF
/* 13D3C4 8024A084 00021300 */  sll       $v0, $v0, 12
/* 13D3C8 8024A088 4600118D */  trunc.w.s $f6, $f2
/* 13D3CC 8024A08C 44033000 */  mfc1      $v1, $f6
/* 13D3D0 8024A090 44871000 */  mtc1      $a3, $f2
/* 13D3D4 8024A094 00000000 */  nop
D_8024A098:
/* 13D3D8 8024A098 468010A0 */  cvt.s.w   $f2, $f2
/* 13D3DC 8024A09C 46041082 */  mul.s     $f2, $f2, $f4
/* 13D3E0 8024A0A0 00000000 */  nop
/* 13D3E4 8024A0A4 30630FFF */  andi      $v1, $v1, 0xFFF
/* 13D3E8 8024A0A8 00641825 */  or        $v1, $v1, $a0
/* 13D3EC 8024A0AC 00431025 */  or        $v0, $v0, $v1
/* 13D3F0 8024A0B0 44880000 */  mtc1      $t0, $f0
/* 13D3F4 8024A0B4 00000000 */  nop
/* 13D3F8 8024A0B8 46800020 */  cvt.s.w   $f0, $f0
/* 13D3FC 8024A0BC 46040002 */  mul.s     $f0, $f0, $f4
D_8024A0C0:
/* 13D400 8024A0C0 00000000 */  nop
/* 13D404 8024A0C4 ACA20000 */  sw        $v0, 0x0($a1)
/* 13D408 8024A0C8 4600118D */  trunc.w.s $f6, $f2
D_8024A0CC:
/* 13D40C 8024A0CC 44023000 */  mfc1      $v0, $f6
/* 13D410 8024A0D0 00000000 */  nop
/* 13D414 8024A0D4 30420FFF */  andi      $v0, $v0, 0xFFF
/* 13D418 8024A0D8 00021300 */  sll       $v0, $v0, 12
/* 13D41C 8024A0DC 4600018D */  trunc.w.s $f6, $f0
/* 13D420 8024A0E0 44033000 */  mfc1      $v1, $f6
/* 13D424 8024A0E4 00000000 */  nop
/* 13D428 8024A0E8 30630FFF */  andi      $v1, $v1, 0xFFF
/* 13D42C 8024A0EC 00431025 */  or        $v0, $v0, $v1
D_8024A0F0:
/* 13D430 8024A0F0 3C038027 */  lui       $v1, %hi(gPauseMenuCurrentTab)
D_8024A0F4:
/* 13D434 8024A0F4 806300D4 */  lb        $v1, %lo(gPauseMenuCurrentTab)($v1)
/* 13D438 8024A0F8 ACA20004 */  sw        $v0, 0x4($a1)
/* 13D43C 8024A0FC 24020003 */  addiu     $v0, $zero, 0x3
/* 13D440 8024A100 1462002A */  bne       $v1, $v0, .L8024A1AC
/* 13D444 8024A104 24020001 */   addiu    $v0, $zero, 0x1
/* 13D448 8024A108 3C038027 */  lui       $v1, %hi(gPauseItemsLevel)
/* 13D44C 8024A10C 8C6305E0 */  lw        $v1, %lo(gPauseItemsLevel)($v1)
/* 13D450 8024A110 14620026 */  bne       $v1, $v0, .L8024A1AC
D_8024A114:
/* 13D454 8024A114 00000000 */   nop
/* 13D458 8024A118 3C118027 */  lui       $s1, %hi(gPauseItemsCurrentPage)
/* 13D45C 8024A11C 263104C8 */  addiu     $s1, $s1, %lo(gPauseItemsCurrentPage)
/* 13D460 8024A120 8E220000 */  lw        $v0, 0x0($s1)
/* 13D464 8024A124 1840000E */  blez      $v0, .L8024A160
/* 13D468 8024A128 24420001 */   addiu    $v0, $v0, 0x1
/* 13D46C 8024A12C 3C108027 */  lui       $s0, %hi(gPauseItemsIconIDs)
D_8024A130:
/* 13D470 8024A130 261005E8 */  addiu     $s0, $s0, %lo(gPauseItemsIconIDs)
D_8024A134:
/* 13D474 8024A134 8FAB00AC */  lw        $t3, 0xAC($sp)
/* 13D478 8024A138 8E040040 */  lw        $a0, 0x40($s0)
/* 13D47C 8024A13C 8FAA00B0 */  lw        $t2, 0xB0($sp)
/* 13D480 8024A140 25650116 */  addiu     $a1, $t3, 0x116
/* 13D484 8024A144 0C051261 */  jal       hud_element_set_render_pos
/* 13D488 8024A148 2546000E */   addiu    $a2, $t2, 0xE
/* 13D48C 8024A14C 8E040040 */  lw        $a0, 0x40($s0)
/* 13D490 8024A150 0C0511F8 */  jal       hud_element_draw_without_clipping
/* 13D494 8024A154 00000000 */   nop
D_8024A158:
/* 13D498 8024A158 8E220000 */  lw        $v0, 0x0($s1)
/* 13D49C 8024A15C 24420001 */  addiu     $v0, $v0, 0x1
.L8024A160:
/* 13D4A0 8024A160 00021840 */  sll       $v1, $v0, 1
/* 13D4A4 8024A164 00621821 */  addu      $v1, $v1, $v0
/* 13D4A8 8024A168 00031880 */  sll       $v1, $v1, 2
/* 13D4AC 8024A16C 3C028027 */  lui       $v0, %hi(gPauseItemsPages)
dgb_01_img4_gfx:
/* 13D4B0 8024A170 00431021 */  addu      $v0, $v0, $v1
/* 13D4B4 8024A174 904204D0 */  lbu       $v0, %lo(gPauseItemsPages)($v0)
/* 13D4B8 8024A178 1040000C */  beqz      $v0, .L8024A1AC
/* 13D4BC 8024A17C 00000000 */   nop
D_8024A180:
/* 13D4C0 8024A180 3C108027 */  lui       $s0, %hi(gPauseItemsIconIDs)
/* 13D4C4 8024A184 261005E8 */  addiu     $s0, $s0, %lo(gPauseItemsIconIDs)
/* 13D4C8 8024A188 8FAB00AC */  lw        $t3, 0xAC($sp)
D_8024A18C:
/* 13D4CC 8024A18C 8E040044 */  lw        $a0, 0x44($s0)
D_8024A190:
/* 13D4D0 8024A190 8FAA00B0 */  lw        $t2, 0xB0($sp)
/* 13D4D4 8024A194 25650116 */  addiu     $a1, $t3, 0x116
/* 13D4D8 8024A198 0C051261 */  jal       hud_element_set_render_pos
/* 13D4DC 8024A19C 25460092 */   addiu    $a2, $t2, 0x92
/* 13D4E0 8024A1A0 8E040044 */  lw        $a0, 0x44($s0)
/* 13D4E4 8024A1A4 0C0511F8 */  jal       hud_element_draw_without_clipping
/* 13D4E8 8024A1A8 00000000 */   nop
.L8024A1AC:
/* 13D4EC 8024A1AC 3C038027 */  lui       $v1, %hi(gPauseItemsCurrentTab)
/* 13D4F0 8024A1B0 8C6305E4 */  lw        $v1, %lo(gPauseItemsCurrentTab)($v1)
D_8024A1B4:
/* 13D4F4 8024A1B4 8FA600AC */  lw        $a2, 0xAC($sp)
/* 13D4F8 8024A1B8 50600001 */  beql      $v1, $zero, .L8024A1C0
/* 13D4FC 8024A1BC 24C60009 */   addiu    $a2, $a2, 0x9
.L8024A1C0:
/* 13D500 8024A1C0 8FAB00B0 */  lw        $t3, 0xB0($sp)
/* 13D504 8024A1C4 2402005B */  addiu     $v0, $zero, 0x5B
/* 13D508 8024A1C8 AFA20014 */  sw        $v0, 0x14($sp)
/* 13D50C 8024A1CC 24020022 */  addiu     $v0, $zero, 0x22
/* 13D510 8024A1D0 AFA20018 */  sw        $v0, 0x18($sp)
/* 13D514 8024A1D4 240200FF */  addiu     $v0, $zero, 0xFF
D_8024A1D8:
/* 13D518 8024A1D8 AFA2001C */  sw        $v0, 0x1C($sp)
/* 13D51C 8024A1DC 24020001 */  addiu     $v0, $zero, 0x1
.L8024A1E0:
/* 13D520 8024A1E0 AFA00010 */  sw        $zero, 0x10($sp)
/* 13D524 8024A1E4 14620004 */  bne       $v1, $v0, .L8024A1F8
.L8024A1E8:
/* 13D528 8024A1E8 25670007 */   addiu    $a3, $t3, 0x7
/* 13D52C 8024A1EC 24020080 */  addiu     $v0, $zero, 0x80
dgb_01_img5_png:
/* 13D530 8024A1F0 0809287F */  j         .L8024A1FC
/* 13D534 8024A1F4 AFA20020 */   sw       $v0, 0x20($sp)
.L8024A1F8:
/* 13D538 8024A1F8 AFA00020 */  sw        $zero, 0x20($sp)
.L8024A1FC:
/* 13D53C 8024A1FC 24040004 */  addiu     $a0, $zero, 0x4
D_8024A200:
/* 13D540 8024A200 3C058027 */  lui       $a1, %hi(gPauseWS_17)
/* 13D544 8024A204 24A5FCB8 */  addiu     $a1, $a1, %lo(gPauseWS_17)
/* 13D548 8024A208 24020140 */  addiu     $v0, $zero, 0x140
/* 13D54C 8024A20C AFA20044 */  sw        $v0, 0x44($sp)
D_8024A210:
/* 13D550 8024A210 240200F0 */  addiu     $v0, $zero, 0xF0
glabel func_8024A214
/* 13D554 8024A214 AFA00024 */  sw        $zero, 0x24($sp)
/* 13D558 8024A218 AFA00028 */  sw        $zero, 0x28($sp)
/* 13D55C 8024A21C AFA0002C */  sw        $zero, 0x2C($sp)
/* 13D560 8024A220 AFA00030 */  sw        $zero, 0x30($sp)
/* 13D564 8024A224 AFA00034 */  sw        $zero, 0x34($sp)
/* 13D568 8024A228 AFA00038 */  sw        $zero, 0x38($sp)
/* 13D56C 8024A22C AFA0003C */  sw        $zero, 0x3C($sp)
/* 13D570 8024A230 AFA00040 */  sw        $zero, 0x40($sp)
/* 13D574 8024A234 AFA20048 */  sw        $v0, 0x48($sp)
/* 13D578 8024A238 0C03D4B8 */  jal       draw_box
/* 13D57C 8024A23C AFA0004C */   sw       $zero, 0x4C($sp)
/* 13D580 8024A240 0C093BA0 */  jal       func_8024EE80
/* 13D584 8024A244 2404004F */   addiu    $a0, $zero, 0x4F
/* 13D588 8024A248 3C118027 */  lui       $s1, %hi(gPauseItemsCurrentTab)
/* 13D58C 8024A24C 263105E4 */  addiu     $s1, $s1, %lo(gPauseItemsCurrentTab)
/* 13D590 8024A250 8FAA00AC */  lw        $t2, 0xAC($sp)
/* 13D594 8024A254 8E230000 */  lw        $v1, 0x0($s1)
/* 13D598 8024A258 14600002 */  bnez      $v1, .L8024A264
/* 13D59C 8024A25C 2545000C */   addiu    $a1, $t2, 0xC
/* 13D5A0 8024A260 25450015 */  addiu     $a1, $t2, 0x15
.L8024A264:
/* 13D5A4 8024A264 240700FF */  addiu     $a3, $zero, 0xFF
/* 13D5A8 8024A268 8FAB00B0 */  lw        $t3, 0xB0($sp)
/* 13D5AC 8024A26C 24100001 */  addiu     $s0, $zero, 0x1
/* 13D5B0 8024A270 14700002 */  bne       $v1, $s0, .L8024A27C
/* 13D5B4 8024A274 25660011 */   addiu    $a2, $t3, 0x11
/* 13D5B8 8024A278 240700BF */  addiu     $a3, $zero, 0xBF
.L8024A27C:
/* 13D5BC 8024A27C 0040202D */  daddu     $a0, $v0, $zero
/* 13D5C0 8024A280 AFA00010 */  sw        $zero, 0x10($sp)
/* 13D5C4 8024A284 0C04993B */  jal       draw_msg
.L8024A288:
/* 13D5C8 8024A288 AFB00014 */   sw       $s0, 0x14($sp)
/* 13D5CC 8024A28C 8E230000 */  lw        $v1, 0x0($s1)

### DECOMPILED C INSTRUCTIONS:

void pause_items_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
    s32 i, pageIndex, itemIndex;
    s32 totalItemIndex;
    s32 currentItemRow;
    s32 currentItemColumn;
    s32 style;
    s32 palette;
    s32 posX, posY;
    s32 sp6C;
    s32 sp70;
    s32 isNone;
    s32* sp78;
    PauseItemPage* page;
    s32 x1, y1, x2, y2;
    s16 itemID;
    s32 isSelected, itemOffsetX, itemOffsetY;
    s32* iconIDs;
    s32 itemIcon;
    s32 msg, msgX, msgY, opacity1;
    s32 selectedPosX, selectedPosY;
    s32 cursorOffsetX, cursorOffsetY;

    style = DRAW_MSG_STYLE_MENU;
    palette = MSG_PAL_STANDARD;
    currentItemColumn = gPauseItemsSelectedIndex / gPauseItemsPages[gPauseItemsCurrentPage].numCols;
    currentItemRow = gPauseItemsSelectedIndex % gPauseItemsPages[gPauseItemsCurrentPage].numCols;
    draw_box(DRAW_FLAG_NO_CLIP, &gPauseWS_18, baseX + 68, baseY, 0, width - 68, height, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);

    x1 = baseX + 1;
    y1 = baseY + 7;
    x2 = baseX + width - 1;
    y2 = baseY + height - 7;

    if (x1 <= 0) {
        x1 = 1;
    }
    if (y1 <= 0) {
        y1 = 1;
    }

    if (x2 <= 0 || y2 <= 0 || x1 >= SCREEN_WIDTH - 1 || y1 >= SCREEN_HEIGHT - 1) {
        return;
    }

    if (x2 >= SCREEN_WIDTH - 1) {
        x2 = SCREEN_WIDTH - 1;
    }
    if (y2 >= SCREEN_HEIGHT - 1) {
        y2 = SCREEN_HEIGHT - 1;
    }

    totalItemIndex = 0;
    sp6C = baseX + 119;
    sp70 = baseY + 17;

    gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);

    for (i = 0; i < 3; i++) {
        for (pageIndex = 0; pageIndex < 20; pageIndex++) {
            iconIDs = gPauseItemsIconIDs;

            page = &gPauseItemsPages[pageIndex];
            if (!page->enabled) {
                break;
            }

            pause_items_get_pos_y(pageIndex, 0);

            for (itemIndex = 0; itemIndex < page->count; itemIndex++) {
                itemID = gPauseItemsItemIDs[page->startIndex + itemIndex];
                isSelected = FALSE;
                if (itemID == ITEM_INVALID) {
                    continue;
                }

                posX = pause_items_get_pos_x(pageIndex, itemIndex);
                posY = pause_items_get_pos_y(pageIndex, itemIndex);

                isNone = itemID == ITEM_NONE_STANDIN;

                if (gPauseMenuCurrentTab == 3 &&
                    gPauseItemsLevel == 1 &&
                    pause_items_get_column(pageIndex, itemIndex) == currentItemRow &&
                    pause_items_get_row(pageIndex, itemIndex) == currentItemColumn) {
                    isSelected = TRUE;
                }

                itemOffsetX = 0;
                itemOffsetY = 0;
                if (isSelected) {
                    itemOffsetX = -1;
                    itemOffsetY = -1;
                }

                if (i == 0) {
                    style = DRAW_MSG_STYLE_MENU;
                    palette = MSG_PAL_STANDARD;

                    if (isSelected) {
                        style = DRAW_MSG_STYLE_MENU | DRAW_MSG_STYLE_DROP_SHADOW;
                    }
                }

                if (!pause_items_is_visible(posY)) {
                    continue;
                }

                if (i == 0) {
                    if (isNone) {
                        draw_msg(pause_get_menu_msg(PAUSE_MSG_BAGDE_DESC_NONE), sp6C + pause_items_scroll_offset_x(posX) + itemOffsetX,
                                sp70 + pause_items_scroll_offset_y(posY) + itemOffsetY, 255, palette, style);
                    } else {
                        if (gItemTable[itemID].nameMsg) {
                            if (gItemTable[itemID].nameMsg > 0) {
                                draw_msg(gItemTable[itemID].nameMsg, sp6C + pause_items_scroll_offset_x(posX) + itemOffsetX,
                                        sp70 + pause_items_scroll_offset_y(posY) + itemOffsetY, 255, palette, style);
                            }
                        }
                    }
                }

                if (i == 1) {
                    itemIcon = iconIDs[totalItemIndex];
                    hud_element_clear_flags(itemIcon, HUD_ELEMENT_FLAG_DROP_SHADOW);
                    hud_element_set_flags(itemIcon, HUD_ELEMENT_FLAG_FILTER_TEX);
                    if (isNone) {
                        itemIcon = gPauseItemsIconIDs[19];
                    } else {
                        if (isSelected) {
                            hud_element_set_flags(itemIcon, HUD_ELEMENT_FLAG_DROP_SHADOW);
                            gPauseCurrentDescIconScript = gItemHudScripts[gItemTable[itemID].hudElemID].enabled;
                        }

                        hud_element_set_script(itemIcon, gItemHudScripts[gItemTable[itemID].hudElemID].enabled);
                        hud_element_set_scale(itemIcon, 0.670816f);
                    }

                    hud_element_set_render_pos(itemIcon, baseX + 105 + pause_items_scroll_offset_x(posX) + itemOffsetX,
                                                baseY + 23 + pause_items_scroll_offset_y(posY) + itemOffsetY);
                    if (totalItemIndex == 0) {
                        hud_element_draw_without_clipping(itemIcon);
                    } else {
                        hud_element_draw_next(itemIcon);
                    }

                    totalItemIndex++;
                }
            }
        }
    }

    x1 = baseX + 1;
    y1 = baseY + 1;
    x2 = baseX + width - 1;
    y2 = baseY + height - 1;
    gDPPipeSync(gMainGfxPos++);

    if (x1 <= 0) {
        x1 = 1;
    }
    if (y1 <= 0) {
        y1 = 1;
    }

    if (x2 <= 0 || y2 <= 0 || x1 >= SCREEN_WIDTH - 1 || y1 >= SCREEN_HEIGHT - 1) {
        return;
    }

    if (x2 >= SCREEN_WIDTH - 1) {
        x2 = SCREEN_WIDTH - 1;
    }
    if (y2 >= SCREEN_HEIGHT - 1) {
        y2 = SCREEN_HEIGHT - 1;
    }

    gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);

    if (gPauseMenuCurrentTab == 3 && gPauseItemsLevel == 1) {
        if (gPauseItemsCurrentPage > 0) {
            hud_element_set_render_pos(gPauseItemsIconIDs[16], baseX + 278, baseY + 14);
            hud_element_draw_without_clipping(gPauseItemsIconIDs[16]);
        }

        if (gPauseItemsPages [gPauseItemsCurrentPage + 1].enabled) {
            hud_element_set_render_pos(gPauseItemsIconIDs[17], baseX + 278, baseY + 146);
            hud_element_draw_without_clipping(gPauseItemsIconIDs[17]);
        }
    }

    draw_box(DRAW_FLAG_NO_CLIP, &gPauseWS_17, gPauseItemsCurrentTab == 0 ? baseX + 9 : baseX, baseY + 7, 0,
         91, 34, 255, gPauseItemsCurrentTab == 1 ? 128 : 0, 0, 0,
         0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);

    msg = pause_get_menu_msg(PAUSE_MSG_KEY_ITEMS);
    msgX = baseX + 12;
    if (gPauseItemsCurrentTab == 0) {
        msgX = baseX + 21;
    }
    opacity1 = 255;
    msgY = baseY + 17;
    if (gPauseItemsCurrentTab == 1) {
        opacity1 = 191;
    }
    draw_msg(msg, msgX, msgY, opacity1, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU);

    draw_box(DRAW_FLAG_NO_CLIP, &gPauseWS_17, gPauseItemsCurrentTab == 1 ? baseX + 9 : baseX, baseY + 39, 0,
         91, 34, 255, gPauseItemsCurrentTab == 0 ? 128 : 0, 0, 0,
         0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);

    msg = pause_get_menu_msg(PAUSE_MSG_CONSUMABLES);
    msgX = baseX + 25;
    if (gPauseItemsCurrentTab == 1) {
        msgX = baseX + 34;
    }
    opacity1 = 255;
    msgY = baseY + 49;
    if (gPauseItemsCurrentTab == 0) {
        opacity1 = 191;
    }
    draw_msg(msg, msgX, msgY, opacity1, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU);

    if (gPauseMenuCurrentTab == 3) {
         if (gPauseItemsLevel == 0) {
             pause_set_cursor_pos(WINDOW_ID_PAUSE_ITEMS, baseX + 12, baseY + 26 + gPauseItemsCurrentTab * 32);
         } else {
             selectedPosX = pause_items_get_pos_x(gPauseItemsCurrentPage, gPauseItemsSelectedIndex  - gPauseItemsPages[gPauseItemsCurrentPage].listStart * gPauseItemsPages[gPauseItemsCurrentPage].numCols);
             selectedPosY = pause_items_get_pos_y(gPauseItemsCurrentPage, gPauseItemsSelectedIndex  - gPauseItemsPages[gPauseItemsCurrentPage].listStart * gPauseItemsPages[gPauseItemsCurrentPage].numCols);
             cursorOffsetX = pause_items_scroll_offset_x(selectedPosX);
             cursorOffsetY = pause_items_scroll_offset_y(selectedPosY);
             if (cursorOffsetY < 0) {
                 cursorOffsetY = 0;
             } else if (cursorOffsetY > 112) {
                 cursorOffsetY = 112;
             }

             if (gPauseItemsCurrentScrollPos  != gPauseItemsTargetScrollPos) {
                 pause_set_cursor_pos_immediate(WINDOW_ID_PAUSE_ITEMS, baseX + 85 + cursorOffsetX, baseY + 23 + cursorOffsetY);
             } else {
                 pause_set_cursor_pos(WINDOW_ID_PAUSE_ITEMS, baseX + 85 + cursorOffsetX, baseY + 23 + cursorOffsetY);
             }
         }
    }
}