### RAW ASSEMBLY INSTRUCTIONS:

glabel lightning_bolt_appendGfx
/* 3BA3A4 E00BC374 27BDFF08 */  addiu     $sp, $sp, -0xF8
/* 3BA3A8 E00BC378 0080482D */  daddu     $t1, $a0, $zero
/* 3BA3AC E00BC37C 3C0ADB06 */  lui       $t2, (0xDB060024 >> 16)
/* 3BA3B0 E00BC380 354A0024 */  ori       $t2, $t2, (0xDB060024 & 0xFFFF)
/* 3BA3B4 E00BC384 27A40010 */  addiu     $a0, $sp, 0x10
/* 3BA3B8 E00BC388 AFB400B0 */  sw        $s4, 0xB0($sp)
/* 3BA3BC E00BC38C 3C140001 */  lui       $s4, (0x11630 >> 16)
/* 3BA3C0 E00BC390 36941630 */  ori       $s4, $s4, (0x11630 & 0xFFFF)
/* 3BA3C4 E00BC394 AFB100A4 */  sw        $s1, 0xA4($sp)
/* 3BA3C8 E00BC398 3C11800A */  lui       $s1, %hi(gMainGfxPos)
/* 3BA3CC E00BC39C 2631A66C */  addiu     $s1, $s1, %lo(gMainGfxPos)
/* 3BA3D0 E00BC3A0 3C013DCC */  lui       $at, (0x3DCCCCCD >> 16)
/* 3BA3D4 E00BC3A4 3421CCCD */  ori       $at, $at, (0x3DCCCCCD & 0xFFFF)
/* 3BA3D8 E00BC3A8 44810000 */  mtc1      $at, $f0
/* 3BA3DC E00BC3AC 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 3BA3E0 E00BC3B0 AFBF00C4 */  sw        $ra, 0xC4($sp)
/* 3BA3E4 E00BC3B4 AFBE00C0 */  sw        $fp, 0xC0($sp)
/* 3BA3E8 E00BC3B8 AFB700BC */  sw        $s7, 0xBC($sp)
/* 3BA3EC E00BC3BC AFB600B8 */  sw        $s6, 0xB8($sp)
/* 3BA3F0 E00BC3C0 AFB500B4 */  sw        $s5, 0xB4($sp)
/* 3BA3F4 E00BC3C4 AFB300AC */  sw        $s3, 0xAC($sp)
/* 3BA3F8 E00BC3C8 AFB200A8 */  sw        $s2, 0xA8($sp)
/* 3BA3FC E00BC3CC AFB000A0 */  sw        $s0, 0xA0($sp)
/* 3BA400 E00BC3D0 F7BE00F0 */  sdc1      $f30, 0xF0($sp)
/* 3BA404 E00BC3D4 F7BC00E8 */  sdc1      $f28, 0xE8($sp)
/* 3BA408 E00BC3D8 F7BA00E0 */  sdc1      $f26, 0xE0($sp)
/* 3BA40C E00BC3DC F7B800D8 */  sdc1      $f24, 0xD8($sp)
/* 3BA410 E00BC3E0 F7B600D0 */  sdc1      $f22, 0xD0($sp)
/* 3BA414 E00BC3E4 F7B400C8 */  sdc1      $f20, 0xC8($sp)
/* 3BA418 E00BC3E8 8E280000 */  lw        $t0, 0x0($s1)
/* 3BA41C E00BC3EC 8D35000C */  lw        $s5, 0xC($t1)
/* 3BA420 E00BC3F0 0100182D */  daddu     $v1, $t0, $zero
/* 3BA424 E00BC3F4 44050000 */  mfc1      $a1, $f0
/* 3BA428 E00BC3F8 25080008 */  addiu     $t0, $t0, 0x8
/* 3BA42C E00BC3FC AE280000 */  sw        $t0, 0x0($s1)
/* 3BA430 E00BC400 8EB7002C */  lw        $s7, 0x2C($s5)
/* 3BA434 E00BC404 8EB3003C */  lw        $s3, 0x3C($s5)
/* 3BA438 E00BC408 8EB60000 */  lw        $s6, 0x0($s5)
/* 3BA43C E00BC40C C6B0004C */  lwc1      $f16, 0x4C($s5)
/* 3BA440 E00BC410 00A0302D */  daddu     $a2, $a1, $zero
/* 3BA444 E00BC414 00A0382D */  daddu     $a3, $a1, $zero
/* 3BA448 E00BC418 E7B00094 */  swc1      $f16, 0x94($sp)
/* 3BA44C E00BC41C AC620000 */  sw        $v0, 0x0($v1)
/* 3BA450 E00BC420 AC600004 */  sw        $zero, 0x4($v1)
/* 3BA454 E00BC424 AD0A0000 */  sw        $t2, 0x0($t0)
/* 3BA458 E00BC428 8D230010 */  lw        $v1, 0x10($t1)
/* 3BA45C E00BC42C 25020008 */  addiu     $v0, $t0, 0x8
/* 3BA460 E00BC430 AE220000 */  sw        $v0, 0x0($s1)
/* 3BA464 E00BC434 8C62001C */  lw        $v0, 0x1C($v1)
/* 3BA468 E00BC438 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 3BA46C E00BC43C 00431021 */  addu      $v0, $v0, $v1
/* 3BA470 E00BC440 0C080110 */  jal       shim_guScaleF
/* 3BA474 E00BC444 AD020004 */   sw       $v0, 0x4($t0)
/* 3BA478 E00BC448 27A40010 */  addiu     $a0, $sp, 0x10
/* 3BA47C E00BC44C 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 3BA480 E00BC450 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 3BA484 E00BC454 3C12800A */  lui       $s2, %hi(gDisplayContext)
/* 3BA488 E00BC458 2652A674 */  addiu     $s2, $s2, %lo(gDisplayContext)
/* 3BA48C E00BC45C 96050000 */  lhu       $a1, 0x0($s0)
/* 3BA490 E00BC460 8E420000 */  lw        $v0, 0x0($s2)
/* 3BA494 E00BC464 00052980 */  sll       $a1, $a1, 6
/* 3BA498 E00BC468 00B42821 */  addu      $a1, $a1, $s4
/* 3BA49C E00BC46C 0C080118 */  jal       shim_guMtxF2L
/* 3BA4A0 E00BC470 00452821 */   addu     $a1, $v0, $a1
/* 3BA4A4 E00BC474 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 3BA4A8 E00BC478 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 3BA4AC E00BC47C 327300FF */  andi      $s3, $s3, 0xFF
/* 3BA4B0 E00BC480 8E260000 */  lw        $a2, 0x0($s1)
/* 3BA4B4 E00BC484 96020000 */  lhu       $v0, 0x0($s0)
/* 3BA4B8 E00BC488 00C0202D */  daddu     $a0, $a2, $zero
/* 3BA4BC E00BC48C 24C60008 */  addiu     $a2, $a2, 0x8
/* 3BA4C0 E00BC490 AE260000 */  sw        $a2, 0x0($s1)
/* 3BA4C4 E00BC494 AC830000 */  sw        $v1, 0x0($a0)
/* 3BA4C8 E00BC498 24430001 */  addiu     $v1, $v0, 0x1
/* 3BA4CC E00BC49C 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3BA4D0 E00BC4A0 00021180 */  sll       $v0, $v0, 6
/* 3BA4D4 E00BC4A4 A6030000 */  sh        $v1, 0x0($s0)
/* 3BA4D8 E00BC4A8 8E430000 */  lw        $v1, 0x0($s2)
/* 3BA4DC E00BC4AC 00541021 */  addu      $v0, $v0, $s4
/* 3BA4E0 E00BC4B0 00621821 */  addu      $v1, $v1, $v0
/* 3BA4E4 E00BC4B4 24C20008 */  addiu     $v0, $a2, 0x8
/* 3BA4E8 E00BC4B8 AC830004 */  sw        $v1, 0x4($a0)
/* 3BA4EC E00BC4BC AE220000 */  sw        $v0, 0x0($s1)
/* 3BA4F0 E00BC4C0 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3BA4F4 E00BC4C4 ACC20000 */  sw        $v0, 0x0($a2)
/* 3BA4F8 E00BC4C8 92A20033 */  lbu       $v0, 0x33($s5)
/* 3BA4FC E00BC4CC 92A40037 */  lbu       $a0, 0x37($s5)
/* 3BA500 E00BC4D0 92A5003B */  lbu       $a1, 0x3B($s5)
/* 3BA504 E00BC4D4 24C30010 */  addiu     $v1, $a2, 0x10
/* 3BA508 E00BC4D8 AE230000 */  sw        $v1, 0x0($s1)
/* 3BA50C E00BC4DC 3C03FB00 */  lui       $v1, (0xFB000000 >> 16)
/* 3BA510 E00BC4E0 ACC30008 */  sw        $v1, 0x8($a2)
/* 3BA514 E00BC4E4 00021600 */  sll       $v0, $v0, 24
/* 3BA518 E00BC4E8 00042400 */  sll       $a0, $a0, 16
/* 3BA51C E00BC4EC 00441025 */  or        $v0, $v0, $a0
/* 3BA520 E00BC4F0 00052A00 */  sll       $a1, $a1, 8
/* 3BA524 E00BC4F4 00451025 */  or        $v0, $v0, $a1
/* 3BA528 E00BC4F8 00531025 */  or        $v0, $v0, $s3
/* 3BA52C E00BC4FC ACC20004 */  sw        $v0, 0x4($a2)
/* 3BA530 E00BC500 92A20043 */  lbu       $v0, 0x43($s5)
/* 3BA534 E00BC504 92A40047 */  lbu       $a0, 0x47($s5)
/* 3BA538 E00BC508 92A5004B */  lbu       $a1, 0x4B($s5)
/* 3BA53C E00BC50C 24C30018 */  addiu     $v1, $a2, 0x18
/* 3BA540 E00BC510 AE230000 */  sw        $v1, 0x0($s1)
/* 3BA544 E00BC514 3C03DE00 */  lui       $v1, (0xDE000000 >> 16)
/* 3BA548 E00BC518 ACC30010 */  sw        $v1, 0x10($a2)
/* 3BA54C E00BC51C 3C030900 */  lui       $v1, %hi(D_09001000_40E290)
/* 3BA550 E00BC520 24631000 */  addiu     $v1, $v1, %lo(D_09001000_40E290)
/* 3BA554 E00BC524 ACC30014 */  sw        $v1, 0x14($a2)
/* 3BA558 E00BC528 00021600 */  sll       $v0, $v0, 24
/* 3BA55C E00BC52C 00042400 */  sll       $a0, $a0, 16
/* 3BA560 E00BC530 00441025 */  or        $v0, $v0, $a0
/* 3BA564 E00BC534 00052A00 */  sll       $a1, $a1, 8
/* 3BA568 E00BC538 00451025 */  or        $v0, $v0, $a1
/* 3BA56C E00BC53C 34420080 */  ori       $v0, $v0, 0x80
/* 3BA570 E00BC540 ACC2000C */  sw        $v0, 0xC($a2)
/* 3BA574 E00BC544 24020002 */  addiu     $v0, $zero, 0x2
/* 3BA578 E00BC548 12C20011 */  beq       $s6, $v0, .LE00BC590
/* 3BA57C E00BC54C 26E4FFFF */   addiu    $a0, $s7, -0x1
/* 3BA580 E00BC550 2882000B */  slti      $v0, $a0, 0xB
/* 3BA584 E00BC554 10400009 */  beqz      $v0, .LE00BC57C
/* 3BA588 E00BC558 00161080 */   sll      $v0, $s6, 2
/* 3BA58C E00BC55C 00041840 */  sll       $v1, $a0, 1
/* 3BA590 E00BC560 00641821 */  addu      $v1, $v1, $a0
/* 3BA594 E00BC564 3C01E00C */  lui       $at, (0xE00C0000 >> 16)
/* 3BA598 E00BC568 00220821 */  addu      $at, $at, $v0
/* 3BA59C E00BC56C 8C22CE40 */  lw        $v0, -0x31C0($at)
/* 3BA5A0 E00BC570 000318C0 */  sll       $v1, $v1, 3
/* 3BA5A4 E00BC574 0802F184 */  j         .LE00BC610
/* 3BA5A8 E00BC578 00439021 */   addu     $s2, $v0, $v1
.LE00BC57C:
/* 3BA5AC E00BC57C 3C01E00C */  lui       $at, (0xE00C0000 >> 16)
/* 3BA5B0 E00BC580 00220821 */  addu      $at, $at, $v0
/* 3BA5B4 E00BC584 8C22CE40 */  lw        $v0, -0x31C0($at)
/* 3BA5B8 E00BC588 0802F184 */  j         .LE00BC610
/* 3BA5BC E00BC58C 245200F0 */   addiu    $s2, $v0, 0xF0
.LE00BC590:
/* 3BA5C0 E00BC590 28820008 */  slti      $v0, $a0, 0x8
/* 3BA5C4 E00BC594 10400007 */  beqz      $v0, .LE00BC5B4
/* 3BA5C8 E00BC598 00041040 */   sll      $v0, $a0, 1
/* 3BA5CC E00BC59C 00441021 */  addu      $v0, $v0, $a0
/* 3BA5D0 E00BC5A0 3C03E00C */  lui       $v1, (0xE00C0000 >> 16)
/* 3BA5D4 E00BC5A4 8C63CE40 */  lw        $v1, -0x31C0($v1)
/* 3BA5D8 E00BC5A8 000210C0 */  sll       $v0, $v0, 3
/* 3BA5DC E00BC5AC 0802F184 */  j         .LE00BC610
/* 3BA5E0 E00BC5B0 00629021 */   addu     $s2, $v1, $v0
.LE00BC5B4:
/* 3BA5E4 E00BC5B4 28820024 */  slti      $v0, $a0, 0x24
/* 3BA5E8 E00BC5B8 10400012 */  beqz      $v0, .LE00BC604
/* 3BA5EC E00BC5BC 3C022AAA */   lui      $v0, (0x2AAAAAAB >> 16)
/* 3BA5F0 E00BC5C0 3442AAAB */  ori       $v0, $v0, (0x2AAAAAAB & 0xFFFF)
/* 3BA5F4 E00BC5C4 00820018 */  mult      $a0, $v0
/* 3BA5F8 E00BC5C8 00041FC3 */  sra       $v1, $a0, 31
/* 3BA5FC E00BC5CC 00007010 */  mfhi      $t6
/* 3BA600 E00BC5D0 01C31823 */  subu      $v1, $t6, $v1
/* 3BA604 E00BC5D4 00031040 */  sll       $v0, $v1, 1
/* 3BA608 E00BC5D8 00431021 */  addu      $v0, $v0, $v1
/* 3BA60C E00BC5DC 00021040 */  sll       $v0, $v0, 1
/* 3BA610 E00BC5E0 00821023 */  subu      $v0, $a0, $v0
/* 3BA614 E00BC5E4 00021840 */  sll       $v1, $v0, 1
/* 3BA618 E00BC5E8 00621821 */  addu      $v1, $v1, $v0
/* 3BA61C E00BC5EC 000318C0 */  sll       $v1, $v1, 3
/* 3BA620 E00BC5F0 3C02E00C */  lui       $v0, (0xE00C0000 >> 16)
/* 3BA624 E00BC5F4 8C42CE40 */  lw        $v0, -0x31C0($v0)
/* 3BA628 E00BC5F8 24630030 */  addiu     $v1, $v1, 0x30
/* 3BA62C E00BC5FC 0802F184 */  j         .LE00BC610
/* 3BA630 E00BC600 00439021 */   addu     $s2, $v0, $v1
.LE00BC604:
/* 3BA634 E00BC604 3C02E00C */  lui       $v0, (0xE00C0000 >> 16)
/* 3BA638 E00BC608 8C42CE40 */  lw        $v0, -0x31C0($v0)
/* 3BA63C E00BC60C 245200F0 */  addiu     $s2, $v0, 0xF0
.LE00BC610:
/* 3BA640 E00BC610 0000982D */  daddu     $s3, $zero, $zero
/* 3BA644 E00BC614 02A0882D */  daddu     $s1, $s5, $zero
/* 3BA648 E00BC618 3C013DBA */  lui       $at, (0x3DBA2E8C >> 16)
/* 3BA64C E00BC61C 34212E8C */  ori       $at, $at, (0x3DBA2E8C & 0xFFFF)
/* 3BA650 E00BC620 4481F000 */  mtc1      $at, $f30
.LE00BC624:
/* 3BA654 E00BC624 3C058888 */  lui       $a1, (0x88888889 >> 16)
/* 3BA658 E00BC628 34A58889 */  ori       $a1, $a1, (0x88888889 & 0xFFFF)
/* 3BA65C E00BC62C 02771823 */  subu      $v1, $s3, $s7
/* 3BA660 E00BC630 00031080 */  sll       $v0, $v1, 2
/* 3BA664 E00BC634 00431021 */  addu      $v0, $v0, $v1
/* 3BA668 E00BC638 8EA40110 */  lw        $a0, 0x110($s5)
/* 3BA66C E00BC63C 00021040 */  sll       $v0, $v0, 1
/* 3BA670 E00BC640 00822021 */  addu      $a0, $a0, $v0
/* 3BA674 E00BC644 00850018 */  mult      $a0, $a1
/* 3BA678 E00BC648 C6B8001C */  lwc1      $f24, 0x1C($s5)
/* 3BA67C E00BC64C C6A00010 */  lwc1      $f0, 0x10($s5)
/* 3BA680 E00BC650 4600C601 */  sub.s     $f24, $f24, $f0
/* 3BA684 E00BC654 461EC602 */  mul.s     $f24, $f24, $f30
/* 3BA688 E00BC658 00000000 */  nop
/* 3BA68C E00BC65C C6B60020 */  lwc1      $f22, 0x20($s5)
/* 3BA690 E00BC660 C6A00014 */  lwc1      $f0, 0x14($s5)
/* 3BA694 E00BC664 4600B581 */  sub.s     $f22, $f22, $f0
/* 3BA698 E00BC668 461EB582 */  mul.s     $f22, $f22, $f30
/* 3BA69C E00BC66C 00000000 */  nop
/* 3BA6A0 E00BC670 02538021 */  addu      $s0, $s2, $s3
/* 3BA6A4 E00BC674 000417C3 */  sra       $v0, $a0, 31
/* 3BA6A8 E00BC678 00007010 */  mfhi      $t6
/* 3BA6AC E00BC67C 01C41821 */  addu      $v1, $t6, $a0
/* 3BA6B0 E00BC680 00031983 */  sra       $v1, $v1, 6
/* 3BA6B4 E00BC684 00621823 */  subu      $v1, $v1, $v0
/* 3BA6B8 E00BC688 00031100 */  sll       $v0, $v1, 4
/* 3BA6BC E00BC68C 00431023 */  subu      $v0, $v0, $v1
/* 3BA6C0 E00BC690 000210C0 */  sll       $v0, $v0, 3
/* 3BA6C4 E00BC694 00822023 */  subu      $a0, $a0, $v0
/* 3BA6C8 E00BC698 2484FFC4 */  addiu     $a0, $a0, -0x3C
/* 3BA6CC E00BC69C 4484E000 */  mtc1      $a0, $f28
/* 3BA6D0 E00BC6A0 00000000 */  nop
/* 3BA6D4 E00BC6A4 4680E720 */  cvt.s.w   $f28, $f28
/* 3BA6D8 E00BC6A8 92020000 */  lbu       $v0, 0x0($s0)
/* 3BA6DC E00BC6AC 4482D000 */  mtc1      $v0, $f26
/* 3BA6E0 E00BC6B0 00000000 */  nop
/* 3BA6E4 E00BC6B4 4680D6A0 */  cvt.s.w   $f26, $f26
/* 3BA6E8 E00BC6B8 0C080140 */  jal       shim_sin_deg
/* 3BA6EC E00BC6BC 4600E306 */   mov.s    $f12, $f28
/* 3BA6F0 E00BC6C0 461A0502 */  mul.s     $f20, $f0, $f26
/* 3BA6F4 E00BC6C4 00000000 */  nop
/* 3BA6F8 E00BC6C8 3C01E00C */  lui       $at, (0xE00C0000 >> 16)
/* 3BA6FC E00BC6CC D430CE58 */  ldc1      $f16, -0x31A8($at)
/* 3BA700 E00BC6D0 4600A521 */  cvt.d.s   $f20, $f20
/* 3BA704 E00BC6D4 4630A502 */  mul.d     $f20, $f20, $f16
/* 3BA708 E00BC6D8 00000000 */  nop
/* 3BA70C E00BC6DC 4600E306 */  mov.s     $f12, $f28
/* 3BA710 E00BC6E0 0C080144 */  jal       shim_cos_deg
/* 3BA714 E00BC6E4 4620A520 */   cvt.s.d  $f20, $f20
/* 3BA718 E00BC6E8 461A0002 */  mul.s     $f0, $f0, $f26
/* 3BA71C E00BC6EC 00000000 */  nop
/* 3BA720 E00BC6F0 3C01E00C */  lui       $at, (0xE00C0000 >> 16)
/* 3BA724 E00BC6F4 D430CE60 */  ldc1      $f16, -0x31A0($at)
/* 3BA728 E00BC6F8 46000021 */  cvt.d.s   $f0, $f0
/* 3BA72C E00BC6FC 46300002 */  mul.d     $f0, $f0, $f16
/* 3BA730 E00BC700 00000000 */  nop
/* 3BA734 E00BC704 4614B182 */  mul.s     $f6, $f22, $f20
/* 3BA738 E00BC708 00000000 */  nop
/* 3BA73C E00BC70C C6A2001C */  lwc1      $f2, 0x1C($s5)
/* 3BA740 E00BC710 C6A40010 */  lwc1      $f4, 0x10($s5)
/* 3BA744 E00BC714 46041081 */  sub.s     $f2, $f2, $f4
/* 3BA748 E00BC718 44935000 */  mtc1      $s3, $f10
/* 3BA74C E00BC71C 00000000 */  nop
/* 3BA750 E00BC720 468052A0 */  cvt.s.w   $f10, $f10
/* 3BA754 E00BC724 460A1082 */  mul.s     $f2, $f2, $f10
/* 3BA758 E00BC728 00000000 */  nop
/* 3BA75C E00BC72C 461E1082 */  mul.s     $f2, $f2, $f30
/* 3BA760 E00BC730 00000000 */  nop
/* 3BA764 E00BC734 46200020 */  cvt.s.d   $f0, $f0
/* 3BA768 E00BC738 4600C202 */  mul.s     $f8, $f24, $f0
/* 3BA76C E00BC73C 00000000 */  nop
/* 3BA770 E00BC740 4614C602 */  mul.s     $f24, $f24, $f20
/* 3BA774 E00BC744 00000000 */  nop
/* 3BA778 E00BC748 46022100 */  add.s     $f4, $f4, $f2
/* 3BA77C E00BC74C 46064201 */  sub.s     $f8, $f8, $f6
/* 3BA780 E00BC750 46082100 */  add.s     $f4, $f4, $f8
/* 3BA784 E00BC754 4600B582 */  mul.s     $f22, $f22, $f0
/* 3BA788 E00BC758 00000000 */  nop
/* 3BA78C E00BC75C E6240050 */  swc1      $f4, 0x50($s1)
/* 3BA790 E00BC760 C6A20020 */  lwc1      $f2, 0x20($s5)
/* 3BA794 E00BC764 C6A40014 */  lwc1      $f4, 0x14($s5)
/* 3BA798 E00BC768 46041081 */  sub.s     $f2, $f2, $f4
/* 3BA79C E00BC76C 460A1082 */  mul.s     $f2, $f2, $f10
/* 3BA7A0 E00BC770 00000000 */  nop
/* 3BA7A4 E00BC774 461E1082 */  mul.s     $f2, $f2, $f30
/* 3BA7A8 E00BC778 00000000 */  nop
/* 3BA7AC E00BC77C 4616C600 */  add.s     $f24, $f24, $f22
/* 3BA7B0 E00BC780 46022100 */  add.s     $f4, $f4, $f2
/* 3BA7B4 E00BC784 46182100 */  add.s     $f4, $f4, $f24
/* 3BA7B8 E00BC788 E6240080 */  swc1      $f4, 0x80($s1)
/* 3BA7BC E00BC78C C6A00024 */  lwc1      $f0, 0x24($s5)
/* 3BA7C0 E00BC790 C6A20018 */  lwc1      $f2, 0x18($s5)
/* 3BA7C4 E00BC794 46020001 */  sub.s     $f0, $f0, $f2
/* 3BA7C8 E00BC798 460A0002 */  mul.s     $f0, $f0, $f10
/* 3BA7CC E00BC79C 00000000 */  nop
/* 3BA7D0 E00BC7A0 461E0002 */  mul.s     $f0, $f0, $f30
/* 3BA7D4 E00BC7A4 00000000 */  nop
/* 3BA7D8 E00BC7A8 46001080 */  add.s     $f2, $f2, $f0
/* 3BA7DC E00BC7AC 44808000 */  mtc1      $zero, $f16
/* 3BA7E0 E00BC7B0 00000000 */  nop
/* 3BA7E4 E00BC7B4 46101080 */  add.s     $f2, $f2, $f16
/* 3BA7E8 E00BC7B8 E62200B0 */  swc1      $f2, 0xB0($s1)
/* 3BA7EC E00BC7BC 9202000C */  lbu       $v0, 0xC($s0)
/* 3BA7F0 E00BC7C0 3C01E00C */  lui       $at, (0xE00C0000 >> 16)
/* 3BA7F4 E00BC7C4 D422CE68 */  ldc1      $f2, -0x3198($at)
/* 3BA7F8 E00BC7C8 44820000 */  mtc1      $v0, $f0
/* 3BA7FC E00BC7CC 00000000 */  nop
/* 3BA800 E00BC7D0 46800020 */  cvt.s.w   $f0, $f0
/* 3BA804 E00BC7D4 46000021 */  cvt.d.s   $f0, $f0
/* 3BA808 E00BC7D8 46220002 */  mul.d     $f0, $f0, $f2
/* 3BA80C E00BC7DC 00000000 */  nop
/* 3BA810 E00BC7E0 26730001 */  addiu     $s3, $s3, 0x1
/* 3BA814 E00BC7E4 2A62000C */  slti      $v0, $s3, 0xC
/* 3BA818 E00BC7E8 46200020 */  cvt.s.d   $f0, $f0
/* 3BA81C E00BC7EC E62000E0 */  swc1      $f0, 0xE0($s1)
/* 3BA820 E00BC7F0 1440FF8C */  bnez      $v0, .LE00BC624
/* 3BA824 E00BC7F4 26310004 */   addiu    $s1, $s1, 0x4
/* 3BA828 E00BC7F8 0000982D */  daddu     $s3, $zero, $zero
/* 3BA82C E00BC7FC 0260F02D */  daddu     $fp, $s3, $zero
/* 3BA830 E00BC800 0260B82D */  daddu     $s7, $s3, $zero
/* 3BA834 E00BC804 0260B02D */  daddu     $s6, $s3, $zero
/* 3BA838 E00BC808 02A0902D */  daddu     $s2, $s5, $zero
/* 3BA83C E00BC80C 46008706 */  mov.s     $f28, $f16
/* 3BA840 E00BC810 3C04800A */  lui       $a0, %hi(gMainGfxPos)
/* 3BA844 E00BC814 2484A66C */  addiu     $a0, $a0, %lo(gMainGfxPos)
/* 3BA848 E00BC818 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
/* 3BA84C E00BC81C 4481F000 */  mtc1      $at, $f30
/* 3BA850 E00BC820 3C02DE01 */  lui       $v0, (0xDE010000 >> 16)
/* 3BA854 E00BC824 AFA00098 */  sw        $zero, 0x98($sp)
/* 3BA858 E00BC828 8C830000 */  lw        $v1, 0x0($a0)
/* 3BA85C E00BC82C 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 3BA860 E00BC830 4481D000 */  mtc1      $at, $f26
/* 3BA864 E00BC834 246E0008 */  addiu     $t6, $v1, 0x8
/* 3BA868 E00BC838 01C0A02D */  daddu     $s4, $t6, $zero
/* 3BA86C E00BC83C 24710016 */  addiu     $s1, $v1, 0x16
/* 3BA870 E00BC840 AFAE0090 */  sw        $t6, 0x90($sp)
/* 3BA874 E00BC844 AC620000 */  sw        $v0, 0x0($v1)
/* 3BA878 E00BC848 24620188 */  addiu     $v0, $v1, 0x188
/* 3BA87C E00BC84C AC620004 */  sw        $v0, 0x4($v1)
/* 3BA880 E00BC850 AC820000 */  sw        $v0, 0x0($a0)
.LE00BC854:
/* 3BA884 E00BC854 1660000D */  bnez      $s3, .LE00BC88C
/* 3BA888 E00BC858 2402000B */   addiu    $v0, $zero, 0xB
/* 3BA88C E00BC85C 3C014100 */  lui       $at, (0x41000000 >> 16)
/* 3BA890 E00BC860 4481C000 */  mtc1      $at, $f24
/* 3BA894 E00BC864 C6AC0084 */  lwc1      $f12, 0x84($s5)
/* 3BA898 E00BC868 8EA60080 */  lw        $a2, 0x80($s5)
/* 3BA89C E00BC86C C6A00050 */  lwc1      $f0, 0x50($s5)
/* 3BA8A0 E00BC870 C6AE0054 */  lwc1      $f14, 0x54($s5)
/* 3BA8A4 E00BC874 46000007 */  neg.s     $f0, $f0
/* 3BA8A8 E00BC878 44070000 */  mfc1      $a3, $f0
/* 3BA8AC E00BC87C 0C080148 */  jal       shim_atan2
/* 3BA8B0 E00BC880 46007387 */   neg.s    $f14, $f14
/* 3BA8B4 E00BC884 0802F25B */  j         .LE00BC96C
/* 3BA8B8 E00BC888 46000587 */   neg.s    $f22, $f0
.LE00BC88C:
/* 3BA8BC E00BC88C 3C014100 */  lui       $at, (0x41000000 >> 16)
/* 3BA8C0 E00BC890 4481C000 */  mtc1      $at, $f24
/* 3BA8C4 E00BC894 16620005 */  bne       $s3, $v0, .LE00BC8AC
/* 3BA8C8 E00BC898 26620001 */   addiu    $v0, $s3, 0x1
/* 3BA8CC E00BC89C 3C01C2B4 */  lui       $at, (0xC2B40000 >> 16)
/* 3BA8D0 E00BC8A0 4481B000 */  mtc1      $at, $f22
/* 3BA8D4 E00BC8A4 0802F25B */  j         .LE00BC96C
/* 3BA8D8 E00BC8A8 00000000 */   nop
.LE00BC8AC:
/* 3BA8DC E00BC8AC 00021080 */  sll       $v0, $v0, 2
/* 3BA8E0 E00BC8B0 02A21021 */  addu      $v0, $s5, $v0
/* 3BA8E4 E00BC8B4 C44C0080 */  lwc1      $f12, 0x80($v0)
/* 3BA8E8 E00BC8B8 8E460080 */  lw        $a2, 0x80($s2)
/* 3BA8EC E00BC8BC C6400050 */  lwc1      $f0, 0x50($s2)
/* 3BA8F0 E00BC8C0 C44E0050 */  lwc1      $f14, 0x50($v0)
/* 3BA8F4 E00BC8C4 46000007 */  neg.s     $f0, $f0
/* 3BA8F8 E00BC8C8 44070000 */  mfc1      $a3, $f0
/* 3BA8FC E00BC8CC 0C080148 */  jal       shim_atan2
/* 3BA900 E00BC8D0 46007387 */   neg.s    $f14, $f14
/* 3BA904 E00BC8D4 2662FFFF */  addiu     $v0, $s3, -0x1
/* 3BA908 E00BC8D8 00021080 */  sll       $v0, $v0, 2
/* 3BA90C E00BC8DC 02A21021 */  addu      $v0, $s5, $v0
/* 3BA910 E00BC8E0 C64C0080 */  lwc1      $f12, 0x80($s2)
/* 3BA914 E00BC8E4 8C460080 */  lw        $a2, 0x80($v0)
/* 3BA918 E00BC8E8 46000507 */  neg.s     $f20, $f0
/* 3BA91C E00BC8EC C4400050 */  lwc1      $f0, 0x50($v0)
/* 3BA920 E00BC8F0 C64E0050 */  lwc1      $f14, 0x50($s2)
/* 3BA924 E00BC8F4 46000007 */  neg.s     $f0, $f0
/* 3BA928 E00BC8F8 44070000 */  mfc1      $a3, $f0
/* 3BA92C E00BC8FC 0C080148 */  jal       shim_atan2
/* 3BA930 E00BC900 46007387 */   neg.s    $f14, $f14
/* 3BA934 E00BC904 46000087 */  neg.s     $f2, $f0
/* 3BA938 E00BC908 46141101 */  sub.s     $f4, $f2, $f20
/* 3BA93C E00BC90C 3C014334 */  lui       $at, (0x43340000 >> 16)
/* 3BA940 E00BC910 44810000 */  mtc1      $at, $f0
/* 3BA944 E00BC914 00000000 */  nop
/* 3BA948 E00BC918 4604003C */  c.lt.s    $f0, $f4
/* 3BA94C E00BC91C 00000000 */  nop
/* 3BA950 E00BC920 45000003 */  bc1f      .LE00BC930
/* 3BA954 E00BC924 00000000 */   nop
/* 3BA958 E00BC928 0802F253 */  j         .LE00BC94C
/* 3BA95C E00BC92C 461EA500 */   add.s    $f20, $f20, $f30
.LE00BC930:
/* 3BA960 E00BC930 3C01C334 */  lui       $at, (0xC3340000 >> 16)
/* 3BA964 E00BC934 44810000 */  mtc1      $at, $f0
/* 3BA968 E00BC938 00000000 */  nop
/* 3BA96C E00BC93C 4600203C */  c.lt.s    $f4, $f0
/* 3BA970 E00BC940 00000000 */  nop
/* 3BA974 E00BC944 45030001 */  bc1tl     .LE00BC94C
/* 3BA978 E00BC948 461E1080 */   add.s    $f2, $f2, $f30
.LE00BC94C:
/* 3BA97C E00BC94C 4602A580 */  add.s     $f22, $f20, $f2
/* 3BA980 E00BC950 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* 3BA984 E00BC954 44810800 */  mtc1      $at, $f1
/* 3BA988 E00BC958 44800000 */  mtc1      $zero, $f0
/* 3BA98C E00BC95C 4600B0A1 */  cvt.d.s   $f2, $f22
/* 3BA990 E00BC960 46201082 */  mul.d     $f2, $f2, $f0
/* 3BA994 E00BC964 00000000 */  nop
/* 3BA998 E00BC968 462015A0 */  cvt.s.d   $f22, $f2
.LE00BC96C:
/* 3BA99C E00BC96C C64000E0 */  lwc1      $f0, 0xE0($s2)
/* 3BA9A0 E00BC970 C7B00094 */  lwc1      $f16, 0x94($sp)
/* 3BA9A4 E00BC974 46008002 */  mul.s     $f0, $f16, $f0
/* 3BA9A8 E00BC978 00000000 */  nop
/* 3BA9AC E00BC97C 4600B306 */  mov.s     $f12, $f22
/* 3BA9B0 E00BC980 8FAE0098 */  lw        $t6, 0x98($sp)
/* 3BA9B4 E00BC984 4600C602 */  mul.s     $f24, $f24, $f0
/* 3BA9B8 E00BC988 00000000 */  nop
/* 3BA9BC E00BC98C 24100080 */  addiu     $s0, $zero, 0x80
/* 3BA9C0 E00BC990 020E8023 */  subu      $s0, $s0, $t6
/* 3BA9C4 E00BC994 0C080140 */  jal       shim_sin_deg
/* 3BA9C8 E00BC998 00108140 */   sll      $s0, $s0, 5
/* 3BA9CC E00BC99C 4600C502 */  mul.s     $f20, $f24, $f0
/* 3BA9D0 E00BC9A0 00000000 */  nop
/* 3BA9D4 E00BC9A4 0C080144 */  jal       shim_cos_deg
/* 3BA9D8 E00BC9A8 4600B306 */   mov.s    $f12, $f22
/* 3BA9DC E00BC9AC C6420050 */  lwc1      $f2, 0x50($s2)
/* 3BA9E0 E00BC9B0 46141080 */  add.s     $f2, $f2, $f20
/* 3BA9E4 E00BC9B4 461A1082 */  mul.s     $f2, $f2, $f26
/* 3BA9E8 E00BC9B8 00000000 */  nop
/* 3BA9EC E00BC9BC 4600C002 */  mul.s     $f0, $f24, $f0
/* 3BA9F0 E00BC9C0 00000000 */  nop
/* 3BA9F4 E00BC9C4 4600140D */  trunc.w.s $f16, $f2
/* 3BA9F8 E00BC9C8 44028000 */  mfc1      $v0, $f16
/* 3BA9FC E00BC9CC 00000000 */  nop
/* 3BAA00 E00BC9D0 A6820000 */  sh        $v0, 0x0($s4)
/* 3BAA04 E00BC9D4 C6420080 */  lwc1      $f2, 0x80($s2)
/* 3BAA08 E00BC9D8 46001080 */  add.s     $f2, $f2, $f0
/* 3BAA0C E00BC9DC 461A1082 */  mul.s     $f2, $f2, $f26
/* 3BAA10 E00BC9E0 00000000 */  nop
/* 3BAA14 E00BC9E4 4600140D */  trunc.w.s $f16, $f2
/* 3BAA18 E00BC9E8 44028000 */  mfc1      $v0, $f16
/* 3BAA1C E00BC9EC 00000000 */  nop
/* 3BAA20 E00BC9F0 A622FFF4 */  sh        $v0, -0xC($s1)
/* 3BAA24 E00BC9F4 C64200B0 */  lwc1      $f2, 0xB0($s2)
/* 3BAA28 E00BC9F8 461C1080 */  add.s     $f2, $f2, $f28
/* 3BAA2C E00BC9FC A630FFFA */  sh        $s0, -0x6($s1)
/* 3BAA30 E00BCA00 461A1082 */  mul.s     $f2, $f2, $f26
/* 3BAA34 E00BCA04 00000000 */  nop
/* 3BAA38 E00BCA08 A620FFFC */  sh        $zero, -0x4($s1)
/* 3BAA3C E00BCA0C A236FFFE */  sb        $s6, -0x2($s1)
/* 3BAA40 E00BCA10 A237FFFF */  sb        $s7, -0x1($s1)
/* 3BAA44 E00BCA14 A23E0000 */  sb        $fp, 0x0($s1)
/* 3BAA48 E00BCA18 4600140D */  trunc.w.s $f16, $f2
/* 3BAA4C E00BCA1C 44028000 */  mfc1      $v0, $f16
/* 3BAA50 E00BCA20 00000000 */  nop
/* 3BAA54 E00BCA24 A622FFF6 */  sh        $v0, -0xA($s1)
/* 3BAA58 E00BCA28 C6420050 */  lwc1      $f2, 0x50($s2)
/* 3BAA5C E00BCA2C 46141081 */  sub.s     $f2, $f2, $f20
/* 3BAA60 E00BCA30 461A1082 */  mul.s     $f2, $f2, $f26
/* 3BAA64 E00BCA34 00000000 */  nop
/* 3BAA68 E00BCA38 26940010 */  addiu     $s4, $s4, 0x10
/* 3BAA6C E00BCA3C 4600140D */  trunc.w.s $f16, $f2
/* 3BAA70 E00BCA40 44028000 */  mfc1      $v0, $f16
/* 3BAA74 E00BCA44 00000000 */  nop
/* 3BAA78 E00BCA48 A6820000 */  sh        $v0, 0x0($s4)
/* 3BAA7C E00BCA4C C6420080 */  lwc1      $f2, 0x80($s2)
/* 3BAA80 E00BCA50 46001081 */  sub.s     $f2, $f2, $f0
/* 3BAA84 E00BCA54 26730001 */  addiu     $s3, $s3, 0x1
/* 3BAA88 E00BCA58 461A1082 */  mul.s     $f2, $f2, $f26
/* 3BAA8C E00BCA5C 00000000 */  nop
/* 3BAA90 E00BCA60 8FAE0098 */  lw        $t6, 0x98($sp)
/* 3BAA94 E00BCA64 26310010 */  addiu     $s1, $s1, 0x10
/* 3BAA98 E00BCA68 25CE000C */  addiu     $t6, $t6, 0xC
/* 3BAA9C E00BCA6C AFAE0098 */  sw        $t6, 0x98($sp)
/* 3BAAA0 E00BCA70 4600140D */  trunc.w.s $f16, $f2
/* 3BAAA4 E00BCA74 44028000 */  mfc1      $v0, $f16
/* 3BAAA8 E00BCA78 00000000 */  nop
/* 3BAAAC E00BCA7C A622FFF4 */  sh        $v0, -0xC($s1)
/* 3BAAB0 E00BCA80 C64000B0 */  lwc1      $f0, 0xB0($s2)
/* 3BAAB4 E00BCA84 26940010 */  addiu     $s4, $s4, 0x10
/* 3BAAB8 E00BCA88 A23E0000 */  sb        $fp, 0x0($s1)
/* 3BAABC E00BCA8C 27DE001E */  addiu     $fp, $fp, 0x1E
/* 3BAAC0 E00BCA90 A237FFFF */  sb        $s7, -0x1($s1)
/* 3BAAC4 E00BCA94 26F70078 */  addiu     $s7, $s7, 0x78
/* 3BAAC8 E00BCA98 461C0000 */  add.s     $f0, $f0, $f28
/* 3BAACC E00BCA9C A236FFFE */  sb        $s6, -0x2($s1)
/* 3BAAD0 E00BCAA0 26D60032 */  addiu     $s6, $s6, 0x32
/* 3BAAD4 E00BCAA4 461A0002 */  mul.s     $f0, $f0, $f26
/* 3BAAD8 E00BCAA8 00000000 */  nop
/* 3BAADC E00BCAAC 26520004 */  addiu     $s2, $s2, 0x4
/* 3BAAE0 E00BCAB0 24020400 */  addiu     $v0, $zero, 0x400
/* 3BAAE4 E00BCAB4 A630FFFA */  sh        $s0, -0x6($s1)
/* 3BAAE8 E00BCAB8 A622FFFC */  sh        $v0, -0x4($s1)
/* 3BAAEC E00BCABC 4600040D */  trunc.w.s $f16, $f0
/* 3BAAF0 E00BCAC0 44028000 */  mfc1      $v0, $f16
/* 3BAAF4 E00BCAC4 00000000 */  nop
/* 3BAAF8 E00BCAC8 A622FFF6 */  sh        $v0, -0xA($s1)
/* 3BAAFC E00BCACC 2A62000C */  slti      $v0, $s3, 0xC
/* 3BAB00 E00BCAD0 1440FF60 */  bnez      $v0, .LE00BC854
/* 3BAB04 E00BCAD4 26310010 */   addiu    $s1, $s1, 0x10
/* 3BAB08 E00BCAD8 0260382D */  daddu     $a3, $s3, $zero
/* 3BAB0C E00BCADC 3C08D9DF */  lui       $t0, (0xD9DFFFFF >> 16)
/* 3BAB10 E00BCAE0 3508FFFF */  ori       $t0, $t0, (0xD9DFFFFF & 0xFFFF)
/* 3BAB14 E00BCAE4 3C09800A */  lui       $t1, %hi(gMainGfxPos)
/* 3BAB18 E00BCAE8 2529A66C */  addiu     $t1, $t1, %lo(gMainGfxPos)
/* 3BAB1C E00BCAEC 00071040 */  sll       $v0, $a3, 1
/* 3BAB20 E00BCAF0 0000982D */  daddu     $s3, $zero, $zero
/* 3BAB24 E00BCAF4 304400FF */  andi      $a0, $v0, 0xFF
/* 3BAB28 E00BCAF8 00042300 */  sll       $a0, $a0, 12
/* 3BAB2C E00BCAFC 3042007F */  andi      $v0, $v0, 0x7F
/* 3BAB30 E00BCB00 00021040 */  sll       $v0, $v0, 1
/* 3BAB34 E00BCB04 3C030100 */  lui       $v1, (0x1000000 >> 16)
/* 3BAB38 E00BCB08 00431025 */  or        $v0, $v0, $v1
/* 3BAB3C E00BCB0C 00822025 */  or        $a0, $a0, $v0
/* 3BAB40 E00BCB10 8D250000 */  lw        $a1, 0x0($t1)
/* 3BAB44 E00BCB14 24EBFFFF */  addiu     $t3, $a3, -0x1
/* 3BAB48 E00BCB18 00A0302D */  daddu     $a2, $a1, $zero
/* 3BAB4C E00BCB1C 24A50008 */  addiu     $a1, $a1, 0x8
/* 3BAB50 E00BCB20 AD250000 */  sw        $a1, 0x0($t1)
/* 3BAB54 E00BCB24 ACC40000 */  sw        $a0, 0x0($a2)
/* 3BAB58 E00BCB28 8FAE0090 */  lw        $t6, 0x90($sp)
/* 3BAB5C E00BCB2C 24A20008 */  addiu     $v0, $a1, 0x8
/* 3BAB60 E00BCB30 ACCE0004 */  sw        $t6, 0x4($a2)
/* 3BAB64 E00BCB34 AD220000 */  sw        $v0, 0x0($t1)
/* 3BAB68 E00BCB38 ACA80000 */  sw        $t0, 0x0($a1)
/* 3BAB6C E00BCB3C 1960001E */  blez      $t3, .LE00BCBB8
/* 3BAB70 E00BCB40 ACA00004 */   sw       $zero, 0x4($a1)
/* 3BAB74 E00BCB44 0120602D */  daddu     $t4, $t1, $zero
/* 3BAB78 E00BCB48 3C0D0600 */  lui       $t5, (0x6000000 >> 16)
/* 3BAB7C E00BCB4C 240A0006 */  addiu     $t2, $zero, 0x6
/* 3BAB80 E00BCB50 24090004 */  addiu     $t1, $zero, 0x4
/* 3BAB84 E00BCB54 24080002 */  addiu     $t0, $zero, 0x2
.LE00BCB58:
/* 3BAB88 E00BCB58 314700FF */  andi      $a3, $t2, 0xFF
/* 3BAB8C E00BCB5C 254A0004 */  addiu     $t2, $t2, 0x4
/* 3BAB90 E00BCB60 312500FF */  andi      $a1, $t1, 0xFF
/* 3BAB94 E00BCB64 25290004 */  addiu     $t1, $t1, 0x4
/* 3BAB98 E00BCB68 310400FF */  andi      $a0, $t0, 0xFF
/* 3BAB9C E00BCB6C 25080004 */  addiu     $t0, $t0, 0x4
/* 3BABA0 E00BCB70 00131280 */  sll       $v0, $s3, 10
/* 3BABA4 E00BCB74 26730001 */  addiu     $s3, $s3, 0x1
/* 3BABA8 E00BCB78 00042400 */  sll       $a0, $a0, 16
/* 3BABAC E00BCB7C 3042FC00 */  andi      $v0, $v0, 0xFC00
/* 3BABB0 E00BCB80 00821025 */  or        $v0, $a0, $v0
/* 3BABB4 E00BCB84 00451025 */  or        $v0, $v0, $a1
/* 3BABB8 E00BCB88 004D1025 */  or        $v0, $v0, $t5
/* 3BABBC E00BCB8C 00052A00 */  sll       $a1, $a1, 8
/* 3BABC0 E00BCB90 00852025 */  or        $a0, $a0, $a1
/* 3BABC4 E00BCB94 8D830000 */  lw        $v1, 0x0($t4)
/* 3BABC8 E00BCB98 00872025 */  or        $a0, $a0, $a3
/* 3BABCC E00BCB9C 0060302D */  daddu     $a2, $v1, $zero
/* 3BABD0 E00BCBA0 24630008 */  addiu     $v1, $v1, 0x8
/* 3BABD4 E00BCBA4 AD830000 */  sw        $v1, 0x0($t4)
/* 3BABD8 E00BCBA8 ACC20000 */  sw        $v0, 0x0($a2)
/* 3BABDC E00BCBAC 026B102A */  slt       $v0, $s3, $t3
/* 3BABE0 E00BCBB0 1440FFE9 */  bnez      $v0, .LE00BCB58
/* 3BABE4 E00BCBB4 ACC40004 */   sw       $a0, 0x4($a2)
.LE00BCBB8:
/* 3BABE8 E00BCBB8 3C05D838 */  lui       $a1, (0xD8380002 >> 16)
/* 3BABEC E00BCBBC 3C03800A */  lui       $v1, %hi(gMainGfxPos)
/* 3BABF0 E00BCBC0 2463A66C */  addiu     $v1, $v1, %lo(gMainGfxPos)
/* 3BABF4 E00BCBC4 8C620000 */  lw        $v0, 0x0($v1)
/* 3BABF8 E00BCBC8 34A50002 */  ori       $a1, $a1, (0xD8380002 & 0xFFFF)
/* 3BABFC E00BCBCC 0040202D */  daddu     $a0, $v0, $zero
/* 3BAC00 E00BCBD0 24420008 */  addiu     $v0, $v0, 0x8
/* 3BAC04 E00BCBD4 AC620000 */  sw        $v0, 0x0($v1)
/* 3BAC08 E00BCBD8 24020040 */  addiu     $v0, $zero, 0x40
/* 3BAC0C E00BCBDC AC850000 */  sw        $a1, 0x0($a0)
/* 3BAC10 E00BCBE0 AC820004 */  sw        $v0, 0x4($a0)
/* 3BAC14 E00BCBE4 8FBF00C4 */  lw        $ra, 0xC4($sp)
/* 3BAC18 E00BCBE8 8FBE00C0 */  lw        $fp, 0xC0($sp)
/* 3BAC1C E00BCBEC 8FB700BC */  lw        $s7, 0xBC($sp)
/* 3BAC20 E00BCBF0 8FB600B8 */  lw        $s6, 0xB8($sp)
/* 3BAC24 E00BCBF4 8FB500B4 */  lw        $s5, 0xB4($sp)
/* 3BAC28 E00BCBF8 8FB400B0 */  lw        $s4, 0xB0($sp)
/* 3BAC2C E00BCBFC 8FB300AC */  lw        $s3, 0xAC($sp)
/* 3BAC30 E00BCC00 8FB200A8 */  lw        $s2, 0xA8($sp)
/* 3BAC34 E00BCC04 8FB100A4 */  lw        $s1, 0xA4($sp)
/* 3BAC38 E00BCC08 8FB000A0 */  lw        $s0, 0xA0($sp)
/* 3BAC3C E00BCC0C D7BE00F0 */  ldc1      $f30, 0xF0($sp)
/* 3BAC40 E00BCC10 D7BC00E8 */  ldc1      $f28, 0xE8($sp)
/* 3BAC44 E00BCC14 D7BA00E0 */  ldc1      $f26, 0xE0($sp)
/* 3BAC48 E00BCC18 D7B800D8 */  ldc1      $f24, 0xD8($sp)
/* 3BAC4C E00BCC1C D7B600D0 */  ldc1      $f22, 0xD0($sp)
/* 3BAC50 E00BCC20 D7B400C8 */  ldc1      $f20, 0xC8($sp)
/* 3BAC54 E00BCC24 03E00008 */  jr        $ra
/* 3BAC58 E00BCC28 27BD00F8 */   addiu    $sp, $sp, 0xF8
/* 3BAC5C E00BCC2C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void lightning_bolt_appendGfx(void* effect) {
    Vtx_t* vtxBuffer;
    f32 widthScale;
    f32 cosAngle;
    f32 edgeDeltaY;
    f32 temp;
    f32 sinAngle;
    f32 edgeDeltaX;
    f32 avgDeltaY;
    f32 avgDeltaX;
    f32 deltaPos;
    f32 theta;
    f32 nextAngle;
    f32 edgeAngle;
    f32 prevAngle;
    s16 texOffsetX;
    s32 temp_a0;
    s32 alpha;
    s32 type;
    s32 lifetime;
    s32 quadCount;
    LightningPreset* preset;
    Vtx_t* vtx;
    f32 edgeDeltaZ;
    f32 deltaX, deltaY, deltaZ;
    LightningBoltFXData* data = ((EffectInstance*)effect)->data.lightningBolt;
    Matrix4f sp10;
    Matrix4f unused;
    s32 i;
    f32 edgeLength;

    lifetime = data->lifetime;
    alpha = data->outerColor.a;
    type = data->type;
    widthScale = data->widthScale;

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

    shim_guScaleF(sp10, 0.1f, 0.1f, 0.1f);
    shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
    gDPSetPrimColor(gMainGfxPos++, 0, 0, data->outerColor.r, data->outerColor.g, data->outerColor.b, alpha);
    gDPSetEnvColor(gMainGfxPos++, data->innerColor.r, data->innerColor.g, data->innerColor.b, 128);
    gSPDisplayList(gMainGfxPos++, D_09001000_3BBEA0);

    temp_a0 = lifetime - 1;
    if (type != 2) {
        if (temp_a0 <= 10) {
            preset = &D_E00BCE40[type][temp_a0];
        } else {
            preset = &D_E00BCE40[type][10];
        }
    } else if (temp_a0 < 8) {
        preset = &D_E00BCE40[0][temp_a0];
    } else if (temp_a0 < 0x24) {
        preset = &D_E00BCE40[0][temp_a0 % 6 + 2];
    } else {
        preset = &D_E00BCE40[0][10];
    }

    for (i = 0; i < ARRAY_COUNT(data->boltVertexPosX); i++) {
        avgDeltaX = (data->endPos.x - data->startPos.x) * (1 / 11.0f);
        avgDeltaY = (data->endPos.y - data->startPos.y) * (1 / 11.0f);
        theta = (data->unk_110 + (i - lifetime) * 10) % 120 - 60;
        deltaPos = preset->offset[i];

        sinAngle = shim_sin_deg(theta) * deltaPos * 0.04;
        cosAngle = shim_cos_deg(theta) * deltaPos * 0.04;

        deltaX = avgDeltaX * cosAngle - avgDeltaY * sinAngle;
        deltaY = avgDeltaX * sinAngle + avgDeltaY * cosAngle;
        deltaZ = 0.0f;

        data->boltVertexPosX[i] = data->startPos.x + (data->endPos.x - data->startPos.x) * i * (1 / 11.0f) + deltaX;
        data->boltVertexPosY[i] = data->startPos.y + (data->endPos.y - data->startPos.y) * i * (1 / 11.0f) + deltaY;
        data->boltVertexPosZ[i] = data->startPos.z + (data->endPos.z - data->startPos.z) * i * (1 / 11.0f) + deltaZ;
        data->edgeLength[i] = (f32) preset->width[i] * 0.1;
    }

    vtxBuffer = (Vtx_t*) (gMainGfxPos + 1);
    vtx = (Vtx_t*) (gMainGfxPos + 1);
    gSPBranchList(gMainGfxPos, gMainGfxPos + 0x31);
    gMainGfxPos += 0x31;

    for (i = 0; i < ARRAY_COUNT(data->boltVertexPosX); i++) {
        if (i == 0) {
            edgeLength = 8.0f;
            edgeAngle = -shim_atan2(data->boltVertexPosY[1], -data->boltVertexPosX[1], data->boltVertexPosY[0], -data->boltVertexPosX[0]);
        } else {
            edgeLength = 8.0f;
            if (i == ARRAY_COUNT(data->boltVertexPosX) - 1) {
                edgeAngle = -90.0f;
            } else {
                nextAngle = -shim_atan2(data->boltVertexPosY[i + 1], -data->boltVertexPosX[i + 1], data->boltVertexPosY[i], -data->boltVertexPosX[i]);
                prevAngle = -shim_atan2(data->boltVertexPosY[i], -data->boltVertexPosX[i], data->boltVertexPosY[i - 1], -data->boltVertexPosX[i - 1]);
                if (prevAngle - nextAngle > 180.0f) {
                    nextAngle += 360.0f;
                } else if (prevAngle - nextAngle < -180.0f) {
                    prevAngle += 360.0f;
                }
                temp = nextAngle + prevAngle; // required to match
                edgeAngle = temp;
                edgeAngle *= 0.5;

                if (prevAngle + nextAngle < 0.0f) { // required to match
                    nextAngle += 360.0f;
                }
            }
        }

        edgeLength *= (widthScale * data->edgeLength[i]);
        texOffsetX = (128 - i * 12) * 32;
        edgeDeltaX = edgeLength  * shim_sin_deg(edgeAngle);
        edgeDeltaY = edgeLength * shim_cos_deg(edgeAngle);
        edgeDeltaZ = 0.0f;

        vtx->ob[0] = (data->boltVertexPosX[i] + edgeDeltaX) * 10.0f;
        vtx->ob[1] = (data->boltVertexPosY[i] + edgeDeltaY) * 10.0f;
        vtx->ob[2] = (data->boltVertexPosZ[i] + edgeDeltaZ) * 10.0f;
        vtx->tc[0] = texOffsetX;
        vtx->tc[1] = 0;
        vtx->cn[0] = i * 50;
        vtx->cn[1] = i * 120;
        vtx->cn[2] = i * 30;
        vtx++;

        vtx->ob[0] = (data->boltVertexPosX[i] - edgeDeltaX) * 10.0f;
        vtx->ob[1] = (data->boltVertexPosY[i] - edgeDeltaY) * 10.0f;
        vtx->ob[2] = (data->boltVertexPosZ[i] + edgeDeltaZ) * 10.0f;
        vtx->tc[0] = texOffsetX;
        vtx->tc[1] = 0x400;
        vtx->cn[0] = i * 50;
        vtx->cn[1] = i * 120;
        vtx->cn[2] = i * 30;
        vtx++;
    }

    quadCount = i;

    gSPVertex(gMainGfxPos++, vtxBuffer, i * 2, 0);
    gSPClearGeometryMode(gMainGfxPos++, G_SHADING_SMOOTH);

    for (i = 0; i < quadCount - 1; i++) {
        gSP2Triangles(gMainGfxPos++, i * 2 + 1, i * 2 + 0, i * 2 + 2, 0,
                                       i * 2 + 1, i * 2 + 2, i * 2 + 3, 0);
    }

    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}


### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_80250818
/* 17F0F8 80250818 27BDFFC8 */  addiu     $sp, $sp, -0x38
/* 17F0FC 8025081C AFB20020 */  sw        $s2, 0x20($sp)
D_80250820_C0E0A0:
/* 17F100 80250820 24B2000F */  addiu     $s2, $a1, 0xF
/* 17F104 80250824 AFB30024 */  sw        $s3, 0x24($sp)
/* 17F108 80250828 0080982D */  daddu     $s3, $a0, $zero
/* 17F10C 8025082C AFBF002C */  sw        $ra, 0x2C($sp)
/* 17F110 80250830 AFB40028 */  sw        $s4, 0x28($sp)
/* 17F114 80250834 AFB1001C */  sw        $s1, 0x1C($sp)
/* 17F118 80250838 AFB00018 */  sw        $s0, 0x18($sp)
/* 17F11C 8025083C F7B40030 */  sdc1      $f20, 0x30($sp)
/* 17F120 80250840 86630012 */  lh        $v1, 0x12($s3)
/* 17F124 80250844 2C620055 */  sltiu     $v0, $v1, 0x55
/* 17F128 80250848 1040018D */  beqz      $v0, .L80250E80
/* 17F12C 8025084C 24D10006 */   addiu    $s1, $a2, 0x6
/* 17F130 80250850 00031080 */  sll       $v0, $v1, 2
/* 17F134 80250854 3C01802A */  lui       $at, %hi(jtbl_8029D048)
/* 17F138 80250858 00220821 */  addu      $at, $at, $v0
/* 17F13C 8025085C 8C22D048 */  lw        $v0, %lo(jtbl_8029D048)($at)
/* 17F140 80250860 00400008 */  jr        $v0
/* 17F144 80250864 00000000 */   nop
glabel .L80250868
/* 17F148 80250868 86620012 */  lh        $v0, 0x12($s3)
/* 17F14C 8025086C 00021080 */  sll       $v0, $v0, 2
/* 17F150 80250870 3C108028 */  lui       $s0, %hi(bMessages)
/* 17F154 80250874 02028021 */  addu      $s0, $s0, $v0
/* 17F158 80250878 8E103770 */  lw        $s0, %lo(bMessages)($s0)
/* 17F15C 8025087C 0C04992C */  jal       get_msg_lines
/* 17F160 80250880 0200202D */   daddu    $a0, $s0, $zero
/* 17F164 80250884 2443FFFF */  addiu     $v1, $v0, -0x1
/* 17F168 80250888 0200202D */  daddu     $a0, $s0, $zero
/* 17F16C 8025088C 0240282D */  daddu     $a1, $s2, $zero
/* 17F170 80250890 240700FF */  addiu     $a3, $zero, 0xFF
/* 17F174 80250894 00031040 */  sll       $v0, $v1, 1
D_80250898_C0E118:
/* 17F178 80250898 3C068028 */  lui       $a2, %hi(D_802835D4)
/* 17F17C 8025089C 00C23021 */  addu      $a2, $a2, $v0
/* 17F180 802508A0 84C635D4 */  lh        $a2, %lo(D_802835D4)($a2)
/* 17F184 802508A4 2402000F */  addiu     $v0, $zero, 0xF
/* 17F188 802508A8 AFA20010 */  sw        $v0, 0x10($sp)
/* 17F18C 802508AC AFA00014 */  sw        $zero, 0x14($sp)
D_802508B0:
/* 17F190 802508B0 0C04993B */  jal       draw_msg
/* 17F194 802508B4 02263021 */   addu     $a2, $s1, $a2
/* 17F198 802508B8 080943A0 */  j         .L80250E80
/* 17F19C 802508BC 00000000 */   nop
glabel .L802508C0
/* 17F1A0 802508C0 86620012 */  lh        $v0, 0x12($s3)
/* 17F1A4 802508C4 00021080 */  sll       $v0, $v0, 2
/* 17F1A8 802508C8 3C108028 */  lui       $s0, %hi(bMessages)
/* 17F1AC 802508CC 02028021 */  addu      $s0, $s0, $v0
/* 17F1B0 802508D0 8E103770 */  lw        $s0, %lo(bMessages)($s0)
/* 17F1B4 802508D4 0C04992C */  jal       get_msg_lines
/* 17F1B8 802508D8 0200202D */   daddu    $a0, $s0, $zero
/* 17F1BC 802508DC 2443FFFF */  addiu     $v1, $v0, -0x1
/* 17F1C0 802508E0 0000282D */  daddu     $a1, $zero, $zero
/* 17F1C4 802508E4 00031040 */  sll       $v0, $v1, 1
/* 17F1C8 802508E8 3C018028 */  lui       $at, %hi(D_802835D4)
/* 17F1CC 802508EC 00220821 */  addu      $at, $at, $v0
/* 17F1D0 802508F0 842235D4 */  lh        $v0, %lo(D_802835D4)($at)
/* 17F1D4 802508F4 3C04802A */  lui       $a0, %hi(D_8029F640)
/* 17F1D8 802508F8 8484F640 */  lh        $a0, %lo(D_8029F640)($a0)
/* 17F1DC 802508FC 0C0496FA */  jal       set_message_value
/* 17F1E0 80250900 02228821 */   addu     $s1, $s1, $v0
/* 17F1E4 80250904 08094259 */  j         .L80250964
/* 17F1E8 80250908 0200202D */   daddu    $a0, $s0, $zero
glabel .L8025090C
/* 17F1EC 8025090C 86620012 */  lh        $v0, 0x12($s3)
D_80250910_C0E190:
/* 17F1F0 80250910 00021080 */  sll       $v0, $v0, 2
/* 17F1F4 80250914 3C108028 */  lui       $s0, %hi(bMessages)
/* 17F1F8 80250918 02028021 */  addu      $s0, $s0, $v0
/* 17F1FC 8025091C 8E103770 */  lw        $s0, %lo(bMessages)($s0)
/* 17F200 80250920 0C04992C */  jal       get_msg_lines
/* 17F204 80250924 0200202D */   daddu    $a0, $s0, $zero
/* 17F208 80250928 2443FFFF */  addiu     $v1, $v0, -0x1
/* 17F20C 8025092C 0000282D */  daddu     $a1, $zero, $zero
/* 17F210 80250930 00031840 */  sll       $v1, $v1, 1
/* 17F214 80250934 3C02802A */  lui       $v0, %hi(D_8029F640)
/* 17F218 80250938 8442F640 */  lh        $v0, %lo(D_8029F640)($v0)
/* 17F21C 8025093C 3C018028 */  lui       $at, %hi(D_802835D4)
/* 17F220 80250940 00230821 */  addu      $at, $at, $v1
/* 17F224 80250944 842335D4 */  lh        $v1, %lo(D_802835D4)($at)
/* 17F228 80250948 00021080 */  sll       $v0, $v0, 2
/* 17F22C 8025094C 3C048028 */  lui       $a0, %hi(bActorMessages)
/* 17F230 80250950 00822021 */  addu      $a0, $a0, $v0
/* 17F234 80250954 8C8438C4 */  lw        $a0, %lo(bActorMessages)($a0)
/* 17F238 80250958 0C0496CF */  jal       set_message_msg
/* 17F23C 8025095C 02238821 */   addu     $s1, $s1, $v1
/* 17F240 80250960 0200202D */  daddu     $a0, $s0, $zero
.L80250964:
/* 17F244 80250964 0240282D */  daddu     $a1, $s2, $zero
/* 17F248 80250968 0220302D */  daddu     $a2, $s1, $zero
/* 17F24C 8025096C 240700FF */  addiu     $a3, $zero, 0xFF
/* 17F250 80250970 2402000F */  addiu     $v0, $zero, 0xF
/* 17F254 80250974 AFA20010 */  sw        $v0, 0x10($sp)
/* 17F258 80250978 0C04993B */  jal       draw_msg
/* 17F25C 8025097C AFA00014 */   sw       $zero, 0x14($sp)
/* 17F260 80250980 080943A0 */  j         .L80250E80
/* 17F264 80250984 00000000 */   nop
glabel .L80250988
/* 17F268 80250988 2645001D */  addiu     $a1, $s2, 0x1D
/* 17F26C 8025098C 26260006 */  addiu     $a2, $s1, 0x6
D_80250990:
/* 17F270 80250990 86620012 */  lh        $v0, 0x12($s3)
/* 17F274 80250994 240700FF */  addiu     $a3, $zero, 0xFF
/* 17F278 80250998 00021080 */  sll       $v0, $v0, 2
/* 17F27C 8025099C 3C108028 */  lui       $s0, %hi(bMessages)
/* 17F280 802509A0 02028021 */  addu      $s0, $s0, $v0
/* 17F284 802509A4 8E103770 */  lw        $s0, %lo(bMessages)($s0)
/* 17F288 802509A8 2402000F */  addiu     $v0, $zero, 0xF
/* 17F28C 802509AC AFA20010 */  sw        $v0, 0x10($sp)
/* 17F290 802509B0 AFA00014 */  sw        $zero, 0x14($sp)
/* 17F294 802509B4 0C04993B */  jal       draw_msg
/* 17F298 802509B8 0200202D */   daddu    $a0, $s0, $zero
/* 17F29C 802509BC 2645000D */  addiu     $a1, $s2, 0xD
/* 17F2A0 802509C0 3C10802A */  lui       $s0, %hi(D_8029F642)
/* 17F2A4 802509C4 2610F642 */  addiu     $s0, $s0, %lo(D_8029F642)
/* 17F2A8 802509C8 86040000 */  lh        $a0, 0x0($s0)
/* 17F2AC 802509CC 0C051261 */  jal       hud_element_set_render_pos
/* 17F2B0 802509D0 2626000E */   addiu    $a2, $s1, 0xE
/* 17F2B4 802509D4 0809439D */  j         .L80250E74
/* 17F2B8 802509D8 00000000 */   nop
glabel .L802509DC
/* 17F2BC 802509DC 82620016 */  lb        $v0, 0x16($s3)
/* 17F2C0 802509E0 28420002 */  slti      $v0, $v0, 0x2
/* 17F2C4 802509E4 10400002 */  beqz      $v0, .L802509F0
/* 17F2C8 802509E8 241400FF */   addiu    $s4, $zero, 0xFF
/* 17F2CC 802509EC 241400A0 */  addiu     $s4, $zero, 0xA0
.L802509F0:
/* 17F2D0 802509F0 86630012 */  lh        $v1, 0x12($s3)
/* 17F2D4 802509F4 2402003B */  addiu     $v0, $zero, 0x3B
/* 17F2D8 802509F8 50620001 */  beql      $v1, $v0, .L80250A00
/* 17F2DC 802509FC 241400FF */   addiu    $s4, $zero, 0xFF
.L80250A00:
/* 17F2E0 80250A00 2652FFF5 */  addiu     $s2, $s2, -0xB
/* 17F2E4 80250A04 00031080 */  sll       $v0, $v1, 2
/* 17F2E8 80250A08 3C108028 */  lui       $s0, %hi(bMessages)
/* 17F2EC 80250A0C 02028021 */  addu      $s0, $s0, $v0
/* 17F2F0 80250A10 8E103770 */  lw        $s0, %lo(bMessages)($s0)
/* 17F2F4 80250A14 2631FFFA */  addiu     $s1, $s1, -0x6
/* 17F2F8 80250A18 0C04992C */  jal       get_msg_lines
/* 17F2FC 80250A1C 0200202D */   daddu    $a0, $s0, $zero
/* 17F300 80250A20 2443FFFF */  addiu     $v1, $v0, -0x1
/* 17F304 80250A24 0200202D */  daddu     $a0, $s0, $zero
/* 17F308 80250A28 2645000B */  addiu     $a1, $s2, 0xB
/* 17F30C 80250A2C 0280382D */  daddu     $a3, $s4, $zero
/* 17F310 80250A30 00031040 */  sll       $v0, $v1, 1
/* 17F314 80250A34 3C038028 */  lui       $v1, %hi(D_802835D4)
/* 17F318 80250A38 00621821 */  addu      $v1, $v1, $v0
/* 17F31C 80250A3C 846335D4 */  lh        $v1, %lo(D_802835D4)($v1)
/* 17F320 80250A40 2402000F */  addiu     $v0, $zero, 0xF
/* 17F324 80250A44 AFA20010 */  sw        $v0, 0x10($sp)
/* 17F328 80250A48 AFA00014 */  sw        $zero, 0x14($sp)
/* 17F32C 80250A4C 02238821 */  addu      $s1, $s1, $v1
D_80250A50:
/* 17F330 80250A50 0C04993B */  jal       draw_msg
D_80250A54:
/* 17F334 80250A54 26260006 */   addiu    $a2, $s1, 0x6
D_80250A58:
/* 17F338 80250A58 96620012 */  lhu       $v0, 0x12($s3)
/* 17F33C 80250A5C 2442FFD2 */  addiu     $v0, $v0, -0x2E
/* 17F340 80250A60 00021400 */  sll       $v0, $v0, 16
/* 17F344 80250A64 00021C03 */  sra       $v1, $v0, 16
/* 17F348 80250A68 2C620014 */  sltiu     $v0, $v1, 0x14
/* 17F34C 80250A6C 10400104 */  beqz      $v0, .L80250E80
/* 17F350 80250A70 00031080 */   sll      $v0, $v1, 2
/* 17F354 80250A74 3C01802A */  lui       $at, %hi(jtbl_8029D1A0)
/* 17F358 80250A78 00220821 */  addu      $at, $at, $v0
/* 17F35C 80250A7C 8C22D1A0 */  lw        $v0, %lo(jtbl_8029D1A0)($at)
/* 17F360 80250A80 00400008 */  jr        $v0
/* 17F364 80250A84 00000000 */   nop
glabel .L80250A88
/* 17F368 80250A88 26450041 */  addiu     $a1, $s2, 0x41
/* 17F36C 80250A8C 3C10802A */  lui       $s0, %hi(D_8029F642)
/* 17F370 80250A90 2610F642 */  addiu     $s0, $s0, %lo(D_8029F642)
/* 17F374 80250A94 86040000 */  lh        $a0, 0x0($s0)
/* 17F378 80250A98 08094394 */  j         .L80250E50
/* 17F37C 80250A9C 2626000E */   addiu    $a2, $s1, 0xE
glabel .L80250AA0
/* 17F380 80250AA0 26450037 */  addiu     $a1, $s2, 0x37
/* 17F384 80250AA4 3C10802A */  lui       $s0, %hi(D_8029F642)
/* 17F388 80250AA8 2610F642 */  addiu     $s0, $s0, %lo(D_8029F642)
/* 17F38C 80250AAC 86040000 */  lh        $a0, 0x0($s0)
/* 17F390 80250AB0 0C051261 */  jal       hud_element_set_render_pos
/* 17F394 80250AB4 2626000E */   addiu    $a2, $s1, 0xE
/* 17F398 80250AB8 86040000 */  lh        $a0, 0x0($s0)
/* 17F39C 80250ABC 3C053F19 */  lui       $a1, (0x3F19999A >> 16)
/* 17F3A0 80250AC0 0C051308 */  jal       hud_element_set_scale
/* 17F3A4 80250AC4 34A5999A */   ori      $a1, $a1, (0x3F19999A & 0xFFFF)
/* 17F3A8 80250AC8 86040000 */  lh        $a0, 0x0($s0)
/* 17F3AC 80250ACC 0C0513AC */  jal       hud_element_set_alpha
/* 17F3B0 80250AD0 0280282D */   daddu    $a1, $s4, $zero
/* 17F3B4 80250AD4 86040000 */  lh        $a0, 0x0($s0)
/* 17F3B8 80250AD8 0C0511EA */  jal       hud_element_draw_clipped
/* 17F3BC 80250ADC 00000000 */   nop
/* 17F3C0 80250AE0 26450049 */  addiu     $a1, $s2, 0x49
/* 17F3C4 80250AE4 3C10802A */  lui       $s0, %hi(D_8029F644)
/* 17F3C8 80250AE8 2610F644 */  addiu     $s0, $s0, %lo(D_8029F644)
/* 17F3CC 80250AEC 86040000 */  lh        $a0, 0x0($s0)
/* 17F3D0 80250AF0 0C051261 */  jal       hud_element_set_render_pos
/* 17F3D4 80250AF4 2626001F */   addiu    $a2, $s1, 0x1F
/* 17F3D8 80250AF8 0809439A */  j         .L80250E68
/* 17F3DC 80250AFC 00000000 */   nop
glabel .L80250B00
/* 17F3E0 80250B00 26450040 */  addiu     $a1, $s2, 0x40
/* 17F3E4 80250B04 3C10802A */  lui       $s0, %hi(D_8029F642)
/* 17F3E8 80250B08 2610F642 */  addiu     $s0, $s0, %lo(D_8029F642)
/* 17F3EC 80250B0C 86040000 */  lh        $a0, 0x0($s0)
/* 17F3F0 80250B10 08094394 */  j         .L80250E50
/* 17F3F4 80250B14 2626000E */   addiu    $a2, $s1, 0xE
glabel .L80250B18
/* 17F3F8 80250B18 26450043 */  addiu     $a1, $s2, 0x43
/* 17F3FC 80250B1C 3C10802A */  lui       $s0, %hi(D_8029F642)
/* 17F400 80250B20 2610F642 */  addiu     $s0, $s0, %lo(D_8029F642)
/* 17F404 80250B24 86040000 */  lh        $a0, 0x0($s0)
/* 17F408 80250B28 08094394 */  j         .L80250E50
/* 17F40C 80250B2C 2626000E */   addiu    $a2, $s1, 0xE
glabel .L80250B30
/* 17F410 80250B30 26450038 */  addiu     $a1, $s2, 0x38
D_80250B34:
/* 17F414 80250B34 3C10802A */  lui       $s0, %hi(D_8029F642)
/* 17F418 80250B38 2610F642 */  addiu     $s0, $s0, %lo(D_8029F642)
/* 17F41C 80250B3C 86040000 */  lh        $a0, 0x0($s0)
/* 17F420 80250B40 0C051261 */  jal       hud_element_set_render_pos
D_80250B44:
/* 17F424 80250B44 2626000E */   addiu    $a2, $s1, 0xE
/* 17F428 80250B48 86040000 */  lh        $a0, 0x0($s0)
/* 17F42C 80250B4C 3C053F19 */  lui       $a1, (0x3F19999A >> 16)
/* 17F430 80250B50 08094398 */  j         .L80250E60
D_80250B54:
/* 17F434 80250B54 34A5999A */   ori      $a1, $a1, (0x3F19999A & 0xFFFF)
glabel .L80250B58
/* 17F438 80250B58 26450041 */  addiu     $a1, $s2, 0x41
/* 17F43C 80250B5C 3C10802A */  lui       $s0, %hi(D_8029F642)
/* 17F440 80250B60 2610F642 */  addiu     $s0, $s0, %lo(D_8029F642)
D_80250B64:
/* 17F444 80250B64 86040000 */  lh        $a0, 0x0($s0)
/* 17F448 80250B68 0C051261 */  jal       hud_element_set_render_pos
/* 17F44C 80250B6C 2626000D */   addiu    $a2, $s1, 0xD
/* 17F450 80250B70 86040000 */  lh        $a0, 0x0($s0)
/* 17F454 80250B74 3C053F19 */  lui       $a1, (0x3F19999A >> 16)
/* 17F458 80250B78 0C051308 */  jal       hud_element_set_scale
/* 17F45C 80250B7C 34A5999A */   ori      $a1, $a1, (0x3F19999A & 0xFFFF)
/* 17F460 80250B80 86040000 */  lh        $a0, 0x0($s0)
/* 17F464 80250B84 0C0513AC */  jal       hud_element_set_alpha
/* 17F468 80250B88 0280282D */   daddu    $a1, $s4, $zero
/* 17F46C 80250B8C 86040000 */  lh        $a0, 0x0($s0)
/* 17F470 80250B90 0C0511EA */  jal       hud_element_draw_clipped
/* 17F474 80250B94 00000000 */   nop
/* 17F478 80250B98 26450092 */  addiu     $a1, $s2, 0x92
/* 17F47C 80250B9C 3C10802A */  lui       $s0, %hi(D_8029F644)
/* 17F480 80250BA0 2610F644 */  addiu     $s0, $s0, %lo(D_8029F644)
/* 17F484 80250BA4 86040000 */  lh        $a0, 0x0($s0)
/* 17F488 80250BA8 08094381 */  j         .L80250E04
/* 17F48C 80250BAC 26260020 */   addiu    $a2, $s1, 0x20
glabel .L80250BB0
/* 17F490 80250BB0 26450056 */  addiu     $a1, $s2, 0x56
/* 17F494 80250BB4 3C10802A */  lui       $s0, %hi(D_8029F642)
/* 17F498 80250BB8 2610F642 */  addiu     $s0, $s0, %lo(D_8029F642)
/* 17F49C 80250BBC 2631000D */  addiu     $s1, $s1, 0xD
/* 17F4A0 80250BC0 86040000 */  lh        $a0, 0x0($s0)
/* 17F4A4 80250BC4 0C051261 */  jal       hud_element_set_render_pos
/* 17F4A8 80250BC8 0220302D */   daddu    $a2, $s1, $zero
/* 17F4AC 80250BCC 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 17F4B0 80250BD0 4481A000 */  mtc1      $at, $f20
/* 17F4B4 80250BD4 86040000 */  lh        $a0, 0x0($s0)
/* 17F4B8 80250BD8 4405A000 */  mfc1      $a1, $f20
/* 17F4BC 80250BDC 0C051308 */  jal       hud_element_set_scale
/* 17F4C0 80250BE0 00000000 */   nop
/* 17F4C4 80250BE4 86040000 */  lh        $a0, 0x0($s0)
/* 17F4C8 80250BE8 0C0513AC */  jal       hud_element_set_alpha
/* 17F4CC 80250BEC 0280282D */   daddu    $a1, $s4, $zero
/* 17F4D0 80250BF0 86040000 */  lh        $a0, 0x0($s0)
/* 17F4D4 80250BF4 0C0511EA */  jal       hud_element_draw_clipped
/* 17F4D8 80250BF8 00000000 */   nop
/* 17F4DC 80250BFC 26450040 */  addiu     $a1, $s2, 0x40
/* 17F4E0 80250C00 3C10802A */  lui       $s0, %hi(D_8029F644)
/* 17F4E4 80250C04 2610F644 */  addiu     $s0, $s0, %lo(D_8029F644)
/* 17F4E8 80250C08 86040000 */  lh        $a0, 0x0($s0)
/* 17F4EC 80250C0C 0C051261 */  jal       hud_element_set_render_pos
/* 17F4F0 80250C10 0220302D */   daddu    $a2, $s1, $zero
/* 17F4F4 80250C14 86040000 */  lh        $a0, 0x0($s0)
/* 17F4F8 80250C18 4405A000 */  mfc1      $a1, $f20
/* 17F4FC 80250C1C 0C051308 */  jal       hud_element_set_scale
/* 17F500 80250C20 00000000 */   nop
/* 17F504 80250C24 86040000 */  lh        $a0, 0x0($s0)
/* 17F508 80250C28 0C0513AC */  jal       hud_element_set_alpha
/* 17F50C 80250C2C 0280282D */   daddu    $a1, $s4, $zero
/* 17F510 80250C30 86040000 */  lh        $a0, 0x0($s0)
/* 17F514 80250C34 0C0511EA */  jal       hud_element_draw_clipped
/* 17F518 80250C38 00000000 */   nop
/* 17F51C 80250C3C 2645006C */  addiu     $a1, $s2, 0x6C
/* 17F520 80250C40 3C10802A */  lui       $s0, %hi(D_8029F646)
/* 17F524 80250C44 2610F646 */  addiu     $s0, $s0, %lo(D_8029F646)
/* 17F528 80250C48 86040000 */  lh        $a0, 0x0($s0)
/* 17F52C 80250C4C 08094394 */  j         .L80250E50
/* 17F530 80250C50 0220302D */   daddu    $a2, $s1, $zero
glabel .L80250C54
/* 17F534 80250C54 26450069 */  addiu     $a1, $s2, 0x69
/* 17F538 80250C58 3C10802A */  lui       $s0, %hi(D_8029F642)
D_80250C5C:
/* 17F53C 80250C5C 2610F642 */  addiu     $s0, $s0, %lo(D_8029F642)
/* 17F540 80250C60 86040000 */  lh        $a0, 0x0($s0)
/* 17F544 80250C64 0C051261 */  jal       hud_element_set_render_pos
/* 17F548 80250C68 2626000D */   addiu    $a2, $s1, 0xD
/* 17F54C 80250C6C 86040000 */  lh        $a0, 0x0($s0)
/* 17F550 80250C70 0C0513AC */  jal       hud_element_set_alpha
/* 17F554 80250C74 0280282D */   daddu    $a1, $s4, $zero
/* 17F558 80250C78 86040000 */  lh        $a0, 0x0($s0)
/* 17F55C 80250C7C 0C0511EA */  jal       hud_element_draw_clipped
/* 17F560 80250C80 00000000 */   nop
/* 17F564 80250C84 26450041 */  addiu     $a1, $s2, 0x41
/* 17F568 80250C88 3C10802A */  lui       $s0, %hi(D_8029F644)
/* 17F56C 80250C8C 2610F644 */  addiu     $s0, $s0, %lo(D_8029F644)
/* 17F570 80250C90 86040000 */  lh        $a0, 0x0($s0)
/* 17F574 80250C94 08094394 */  j         .L80250E50
/* 17F578 80250C98 2626000E */   addiu    $a2, $s1, 0xE
glabel .L80250C9C
/* 17F57C 80250C9C 2645003F */  addiu     $a1, $s2, 0x3F
/* 17F580 80250CA0 3C10802A */  lui       $s0, %hi(D_8029F642)
/* 17F584 80250CA4 2610F642 */  addiu     $s0, $s0, %lo(D_8029F642)
/* 17F588 80250CA8 2631000E */  addiu     $s1, $s1, 0xE
/* 17F58C 80250CAC 86040000 */  lh        $a0, 0x0($s0)
D_80250CB0:
/* 17F590 80250CB0 0C051261 */  jal       hud_element_set_render_pos
/* 17F594 80250CB4 0220302D */   daddu    $a2, $s1, $zero
/* 17F598 80250CB8 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 17F59C 80250CBC 4481A000 */  mtc1      $at, $f20
/* 17F5A0 80250CC0 86040000 */  lh        $a0, 0x0($s0)
/* 17F5A4 80250CC4 4405A000 */  mfc1      $a1, $f20
/* 17F5A8 80250CC8 0C051308 */  jal       hud_element_set_scale
/* 17F5AC 80250CCC 00000000 */   nop
/* 17F5B0 80250CD0 86040000 */  lh        $a0, 0x0($s0)
/* 17F5B4 80250CD4 0C0513AC */  jal       hud_element_set_alpha
/* 17F5B8 80250CD8 0280282D */   daddu    $a1, $s4, $zero
/* 17F5BC 80250CDC 86040000 */  lh        $a0, 0x0($s0)
/* 17F5C0 80250CE0 0C0511EA */  jal       hud_element_draw_clipped
/* 17F5C4 80250CE4 00000000 */   nop
/* 17F5C8 80250CE8 26450054 */  addiu     $a1, $s2, 0x54
/* 17F5CC 80250CEC 3C10802A */  lui       $s0, %hi(D_8029F644)
/* 17F5D0 80250CF0 2610F644 */  addiu     $s0, $s0, %lo(D_8029F644)
/* 17F5D4 80250CF4 86040000 */  lh        $a0, 0x0($s0)
/* 17F5D8 80250CF8 08094394 */  j         .L80250E50
/* 17F5DC 80250CFC 0220302D */   daddu    $a2, $s1, $zero
glabel .L80250D00
/* 17F5E0 80250D00 2645007C */  addiu     $a1, $s2, 0x7C
/* 17F5E4 80250D04 3C10802A */  lui       $s0, %hi(D_8029F642)
/* 17F5E8 80250D08 2610F642 */  addiu     $s0, $s0, %lo(D_8029F642)
/* 17F5EC 80250D0C 86040000 */  lh        $a0, 0x0($s0)
/* 17F5F0 80250D10 08094394 */  j         .L80250E50
D_80250D14:
/* 17F5F4 80250D14 2626000E */   addiu    $a2, $s1, 0xE
glabel .L80250D18
/* 17F5F8 80250D18 26450038 */  addiu     $a1, $s2, 0x38
/* 17F5FC 80250D1C 3C10802A */  lui       $s0, %hi(D_8029F642)
/* 17F600 80250D20 2610F642 */  addiu     $s0, $s0, %lo(D_8029F642)
/* 17F604 80250D24 86040000 */  lh        $a0, 0x0($s0)
/* 17F608 80250D28 0C051261 */  jal       hud_element_set_render_pos
/* 17F60C 80250D2C 2626001F */   addiu    $a2, $s1, 0x1F
/* 17F610 80250D30 86040000 */  lh        $a0, 0x0($s0)
/* 17F614 80250D34 0C0513AC */  jal       hud_element_set_alpha
/* 17F618 80250D38 0280282D */   daddu    $a1, $s4, $zero
/* 17F61C 80250D3C 86040000 */  lh        $a0, 0x0($s0)
/* 17F620 80250D40 0C0511EA */  jal       hud_element_draw_clipped
/* 17F624 80250D44 00000000 */   nop
/* 17F628 80250D48 26450035 */  addiu     $a1, $s2, 0x35
/* 17F62C 80250D4C 3C10802A */  lui       $s0, %hi(D_8029F644)
/* 17F630 80250D50 2610F644 */  addiu     $s0, $s0, %lo(D_8029F644)
/* 17F634 80250D54 86040000 */  lh        $a0, 0x0($s0)
D_80250D58_C0E5D8:
/* 17F638 80250D58 08094394 */  j         .L80250E50
/* 17F63C 80250D5C 2626000E */   addiu    $a2, $s1, 0xE
glabel .L80250D60
/* 17F640 80250D60 2645006B */  addiu     $a1, $s2, 0x6B
/* 17F644 80250D64 3C10802A */  lui       $s0, %hi(D_8029F642)
/* 17F648 80250D68 2610F642 */  addiu     $s0, $s0, %lo(D_8029F642)
/* 17F64C 80250D6C 86040000 */  lh        $a0, 0x0($s0)
/* 17F650 80250D70 0C051261 */  jal       hud_element_set_render_pos
/* 17F654 80250D74 2626000D */   addiu    $a2, $s1, 0xD
/* 17F658 80250D78 86040000 */  lh        $a0, 0x0($s0)
/* 17F65C 80250D7C 3C053F19 */  lui       $a1, (0x3F19999A >> 16)
/* 17F660 80250D80 34A5999A */  ori       $a1, $a1, (0x3F19999A & 0xFFFF)
/* 17F664 80250D84 0C051308 */  jal       hud_element_set_scale
/* 17F668 80250D88 2631000F */   addiu    $s1, $s1, 0xF
/* 17F66C 80250D8C 86040000 */  lh        $a0, 0x0($s0)
/* 17F670 80250D90 0C0513AC */  jal       hud_element_set_alpha
/* 17F674 80250D94 0280282D */   daddu    $a1, $s4, $zero
/* 17F678 80250D98 86040000 */  lh        $a0, 0x0($s0)
/* 17F67C 80250D9C 0C0511EA */  jal       hud_element_draw_clipped
/* 17F680 80250DA0 00000000 */   nop
/* 17F684 80250DA4 264500D2 */  addiu     $a1, $s2, 0xD2
D_80250DA8_C0E628:
/* 17F688 80250DA8 3C10802A */  lui       $s0, %hi(D_8029F644)
/* 17F68C 80250DAC 2610F644 */  addiu     $s0, $s0, %lo(D_8029F644)
/* 17F690 80250DB0 86040000 */  lh        $a0, 0x0($s0)
/* 17F694 80250DB4 0C051261 */  jal       hud_element_set_render_pos
/* 17F698 80250DB8 0220302D */   daddu    $a2, $s1, $zero
/* 17F69C 80250DBC 3C013F4C */  lui       $at, (0x3F4CCCCD >> 16)
/* 17F6A0 80250DC0 3421CCCD */  ori       $at, $at, (0x3F4CCCCD & 0xFFFF)
/* 17F6A4 80250DC4 4481A000 */  mtc1      $at, $f20
/* 17F6A8 80250DC8 86040000 */  lh        $a0, 0x0($s0)
/* 17F6AC 80250DCC 4405A000 */  mfc1      $a1, $f20
/* 17F6B0 80250DD0 0C051308 */  jal       hud_element_set_scale
/* 17F6B4 80250DD4 00000000 */   nop
/* 17F6B8 80250DD8 86040000 */  lh        $a0, 0x0($s0)
/* 17F6BC 80250DDC 0C0513AC */  jal       hud_element_set_alpha
D_80250DE0_C0E660:
/* 17F6C0 80250DE0 0280282D */   daddu    $a1, $s4, $zero
/* 17F6C4 80250DE4 86040000 */  lh        $a0, 0x0($s0)
/* 17F6C8 80250DE8 0C051086 */  jal       func_80144218
/* 17F6CC 80250DEC 00000000 */   nop
/* 17F6D0 80250DF0 26450038 */  addiu     $a1, $s2, 0x38
/* 17F6D4 80250DF4 3C10802A */  lui       $s0, %hi(D_8029F646)
/* 17F6D8 80250DF8 2610F646 */  addiu     $s0, $s0, %lo(D_8029F646)
D_80250DFC:
/* 17F6DC 80250DFC 86040000 */  lh        $a0, 0x0($s0)
/* 17F6E0 80250E00 0220302D */  daddu     $a2, $s1, $zero
.L80250E04:
/* 17F6E4 80250E04 0C051261 */  jal       hud_element_set_render_pos
/* 17F6E8 80250E08 00000000 */   nop
/* 17F6EC 80250E0C 86040000 */  lh        $a0, 0x0($s0)
/* 17F6F0 80250E10 3C053F4C */  lui       $a1, (0x3F4CCCCD >> 16)
/* 17F6F4 80250E14 0C051308 */  jal       hud_element_set_scale
/* 17F6F8 80250E18 34A5CCCD */   ori      $a1, $a1, (0x3F4CCCCD & 0xFFFF)
/* 17F6FC 80250E1C 86040000 */  lh        $a0, 0x0($s0)
/* 17F700 80250E20 0C0513AC */  jal       hud_element_set_alpha
/* 17F704 80250E24 0280282D */   daddu    $a1, $s4, $zero
/* 17F708 80250E28 86040000 */  lh        $a0, 0x0($s0)
/* 17F70C 80250E2C 0C051086 */  jal       func_80144218
/* 17F710 80250E30 00000000 */   nop
/* 17F714 80250E34 080943A0 */  j         .L80250E80
/* 17F718 80250E38 00000000 */   nop
glabel .L80250E3C
/* 17F71C 80250E3C 26450040 */  addiu     $a1, $s2, 0x40
/* 17F720 80250E40 3C10802A */  lui       $s0, %hi(D_8029F642)
/* 17F724 80250E44 2610F642 */  addiu     $s0, $s0, %lo(D_8029F642)
/* 17F728 80250E48 86040000 */  lh        $a0, 0x0($s0)
/* 17F72C 80250E4C 2626000D */  addiu     $a2, $s1, 0xD
.L80250E50:
/* 17F730 80250E50 0C051261 */  jal       hud_element_set_render_pos
/* 17F734 80250E54 00000000 */   nop
/* 17F738 80250E58 86040000 */  lh        $a0, 0x0($s0)
/* 17F73C 80250E5C 3C053F00 */  lui       $a1, (0x3F000000 >> 16)
.L80250E60:
/* 17F740 80250E60 0C051308 */  jal       hud_element_set_scale
/* 17F744 80250E64 00000000 */   nop
.L80250E68:
/* 17F748 80250E68 86040000 */  lh        $a0, 0x0($s0)
/* 17F74C 80250E6C 0C0513AC */  jal       hud_element_set_alpha
/* 17F750 80250E70 0280282D */   daddu    $a1, $s4, $zero
.L80250E74:
/* 17F754 80250E74 86040000 */  lh        $a0, 0x0($s0)
/* 17F758 80250E78 0C0511EA */  jal       hud_element_draw_clipped
/* 17F75C 80250E7C 00000000 */   nop
glabel .L80250E80
/* 17F760 80250E80 8FBF002C */  lw        $ra, 0x2C($sp)
/* 17F764 80250E84 8FB40028 */  lw        $s4, 0x28($sp)
D_80250E88_C0E708:
/* 17F768 80250E88 8FB30024 */  lw        $s3, 0x24($sp)
/* 17F76C 80250E8C 8FB20020 */  lw        $s2, 0x20($sp)
/* 17F770 80250E90 8FB1001C */  lw        $s1, 0x1C($sp)
/* 17F774 80250E94 8FB00018 */  lw        $s0, 0x18($sp)
/* 17F778 80250E98 D7B40030 */  ldc1      $f20, 0x30($sp)
/* 17F77C 80250E9C 03E00008 */  jr        $ra
/* 17F780 80250EA0 27BD0038 */   addiu    $sp, $sp, 0x38

### DECOMPILED C INSTRUCTIONS:

void func_80250818(void* data, s32 x, s32 y) {
    PopupMessage* popup = data;
    s32 messageID;
    s32 msgLinesIdx;
    s32 opacity;

    x += 15;
    y += 6;

    switch (popup->messageIndex) {
        case BTL_MSG_MERLEE_ATK_UP:
        case BTL_MSG_MERLEE_DEF_UP:
        case BTL_MSG_MERLEE_EXP_UP:
        case BTL_MSG_MERLEE_DONE:
        case BTL_MSG_CANT_CHARGE:
        case BTL_MSG_ENEMY_MISSED:
        case BTL_MSG_PLAYER_DAZED:
        case BTL_MSG_PLAYER_ASLEEP:
        case BTL_MSG_PLAYER_FROZEN:
        case BTL_MSG_PLAYER_POISONED:
        case BTL_MSG_PLAYER_SHRUNK:
        case BTL_MSG_PLAYER_PARALYZED:
        case BTL_MSG_PLAYER_CHARGED:
        case BTL_MSG_PLAYER_TRANSPARENT:
        case BTL_MSG_ENEMY_DAZED:
        case BTL_MSG_ENEMY_ASLEEP:
        case BTL_MSG_ENEMY_FROZEN:
        case BTL_MSG_ENEMY_POISONED:
        case BTL_MSG_ENEMY_SHRUNK:
        case BTL_MSG_ENEMY_PARALYZED:
        case BTL_MSG_ENEMY_ELECTRIFIED:
        case BTL_MSG_ENEMY_CANT_MOVE:
        case BTL_MSG_STAR_POWER_RECHARGED:
        case BTL_MSG_STAR_POWER_MAXED:
        case BTL_MSG_STAR_POWER_FILLED:
        case BTL_MSG_PARTNER_INJURED:
        case BTL_MSG_CHARGE_GOOMBARIO:
        case BTL_MSG_CHARGE_GOOMBARIO_MORE:
        case BTL_MSG_WATER_BLOCK_BEGIN:
        case BTL_MSG_WATER_BLOCK_END:
        case BTL_MSG_CLOUD_NINE_BEGIN:
        case BTL_MSG_CLOUD_NINE_END:
        case BTL_MSG_TURBO_CHARGE_BEGIN:
        case BTL_MSG_TURBO_CHARGE_END:
        case BTL_MSG_CHILL_OUT_BEGIN:
        case BTL_MSG_UNUSED_CLOUD_NINE:
        case BTL_MSG_NO_JUMP_TARGET:
        case BTL_MSG_NO_HAMMER_TARGET:
        case BTL_MSG_NO_ITEM_TARGET:
        case BTL_MSG_46:
        case BTL_MSG_47:
        case BTL_MSG_CANT_SELECT_NOW:
        case BTL_MSG_CANT_SWITCH:
        case BTL_MSG_CANT_SWITCH_UNUSED:
        case BTL_MSG_CANT_MOVE_UNUSED:
        case BTL_MSG_CANT_SELECT_NOW_ALT:
            messageID = bMessages[popup->messageIndex];
            msgLinesIdx = get_msg_lines(messageID) - 1;
            draw_msg(messageID, x, y + D_802835D4[msgLinesIdx], 255, MSG_PAL_0F, 0);
            break;
        case BTL_MSG_CHARGE_HAMMER:
        case BTL_MSG_CHARGE_HAMMER_MORE:
        case BTL_MSG_CHARGE_JUMP:
        case BTL_MSG_CHARGE_JUMP_MORE:
        case BTL_MSG_ATTACK_UP:
        case BTL_MSG_DEFENCE_UP:
        case BTL_MSG_1F:
        case BTL_MSG_20:
        case BTL_MSG_ENEMY_TRANSPARENT:
        case BTL_MSG_ENEMY_CHARGED:
            messageID = bMessages[popup->messageIndex];
            msgLinesIdx = get_msg_lines(messageID) - 1;
            y += D_802835D4[msgLinesIdx];
            set_message_value(D_8029F640, 0);
            draw_msg(messageID, x, y, 255, MSG_PAL_0F, 0);
            break;
        case BTL_MSG_CANT_MOVE:
            messageID = bMessages[popup->messageIndex];
            msgLinesIdx = get_msg_lines(messageID) - 1;
            y += D_802835D4[msgLinesIdx];
            set_message_msg(bActorMessages[D_8029F640], 0);
            draw_msg(messageID, x, y, 255, MSG_PAL_0F, 0);
            break;
        case BTL_MSG_HAMMER_DISABLED_1:
        case BTL_MSG_HAMMER_DISABLED_2:
        case BTL_MSG_HAMMER_DISABLED_3:
        case BTL_MSG_JUMP_DISABLED_1:
        case BTL_MSG_JUMP_DISABLED_2:
        case BTL_MSG_JUMP_DISABLED_3:
        case BTL_MSG_ITEMS_DISABLED:
            messageID = bMessages[popup->messageIndex];
            draw_msg(messageID, x + 0x1D, y + 6, 255, MSG_PAL_0F, 0);
            hud_element_set_render_pos(D_8029F642, x + 13, y + 14);
            hud_element_draw_clipped(D_8029F642);
            break;
        case BTL_MSG_ACTION_TIP_00:
        case BTL_MSG_ACTION_TIP_01:
        case BTL_MSG_ACTION_TIP_02:
        case BTL_MSG_ACTION_TIP_03:
        case BTL_MSG_ACTION_TIP_04:
        case BTL_MSG_ACTION_TIP_05:
        case BTL_MSG_ACTION_TIP_06:
        case BTL_MSG_ACTION_TIP_07:
        case BTL_MSG_ACTION_TIP_08:
        case BTL_MSG_ACTION_TIP_09:
        case BTL_MSG_ACTION_TIP_0A:
        case BTL_MSG_ACTION_TIP_0B:
        case BTL_MSG_ACTION_TIP_0C:
        case BTL_MSG_ACTION_TIP_0D:
        case BTL_MSG_ACTION_TIP_0E:
        case BTL_MSG_ACTION_TIP_0F:
        case BTL_MSG_ACTION_TIP_10:
        case BTL_MSG_ACTION_TIP_11:
        case BTL_MSG_ACTION_TIP_12:
        case BTL_MSG_ACTION_TIP_13:
        case BTL_MSG_ACTION_TIP_14:
            opacity = 255;
            if (popup->showMsgState < 2) {
                opacity = 160;
            }
            if (popup->messageIndex == BTL_MSG_ACTION_TIP_0D) {
                opacity = 255;
            }

            x -= 11;
            y -= 6;
            messageID = bMessages[popup->messageIndex];
            msgLinesIdx = get_msg_lines(messageID) - 1;
            y += D_802835D4[msgLinesIdx];
            draw_msg(messageID, x + 11, y + 6, opacity, MSG_PAL_0F, 0);

            switch (popup->messageIndex) {
                case BTL_MSG_ACTION_TIP_00:
                    hud_element_set_render_pos(D_8029F642, x + 65, y + 14);
                    hud_element_set_scale(D_8029F642, 0.5f);
                    hud_element_set_alpha(D_8029F642, opacity);
                    hud_element_draw_clipped(D_8029F642);
                    break;
                case BTL_MSG_ACTION_TIP_01:
                    hud_element_set_render_pos(D_8029F642, x + 55, y + 14);
                    hud_element_set_scale(D_8029F642, 0.6f);
                    hud_element_set_alpha(D_8029F642, opacity);
                    hud_element_draw_clipped(D_8029F642);

                    hud_element_set_render_pos(D_8029F644, x + 73, y + 31);
                    hud_element_set_alpha(D_8029F644, opacity);
                    hud_element_draw_clipped(D_8029F644);
                    break;
                case BTL_MSG_ACTION_TIP_02:
                    hud_element_set_render_pos(D_8029F642, x + 64, y + 14);
                    hud_element_set_scale(D_8029F642, 0.5f);
                    hud_element_set_alpha(D_8029F642, opacity);
                    hud_element_draw_clipped(D_8029F642);
                    break;
                case BTL_MSG_ACTION_TIP_03:
                    hud_element_set_render_pos(D_8029F642, x + 67, y + 14);
                    hud_element_set_scale(D_8029F642, 0.5f);
                    hud_element_set_alpha(D_8029F642, opacity);
                    hud_element_draw_clipped(D_8029F642);
                    break;
                case BTL_MSG_ACTION_TIP_04:
                    hud_element_set_render_pos(D_8029F642, x + 56, y + 14);
                    hud_element_set_scale(D_8029F642, 0.6f);
                    hud_element_set_alpha(D_8029F642, opacity);
                    hud_element_draw_clipped(D_8029F642);
                    break;
                case BTL_MSG_ACTION_TIP_05:
                    hud_element_set_render_pos(D_8029F642, x + 65, y + 13);
                    hud_element_set_scale(D_8029F642, 0.6f);
                    hud_element_set_alpha(D_8029F642, opacity);
                    hud_element_draw_clipped(D_8029F642);

                    hud_element_set_render_pos(D_8029F644, x + 146, y + 32);
                    hud_element_set_scale(D_8029F644, 0.8f);
                    hud_element_set_alpha(D_8029F644, opacity);
                    func_80144218(D_8029F644);
                    break;
                case BTL_MSG_ACTION_TIP_08:
                    hud_element_set_render_pos(D_8029F642, x + 86, y + 13);
                    hud_element_set_scale(D_8029F642, 0.5f);
                    hud_element_set_alpha(D_8029F642, opacity);
                    hud_element_draw_clipped(D_8029F642);

                    hud_element_set_render_pos(D_8029F644, x + 64, y + 13);
                    hud_element_set_scale(D_8029F644, 0.5f);
                    hud_element_set_alpha(D_8029F644, opacity);
                    hud_element_draw_clipped(D_8029F644);

                    hud_element_set_render_pos(D_8029F646, x + 108, y + 13);
                    hud_element_set_scale(D_8029F646, 0.5f);
                    hud_element_set_alpha(D_8029F646, opacity);
                    hud_element_draw_clipped(D_8029F646);
                    break;
                case BTL_MSG_ACTION_TIP_0A:
                    hud_element_set_render_pos(D_8029F642, x + 105, y + 13);
                    hud_element_set_alpha(D_8029F642, opacity);
                    hud_element_draw_clipped(D_8029F642);

                    hud_element_set_render_pos(D_8029F644, x + 65, y + 14);
                    hud_element_set_scale(D_8029F644, 0.5f);
                    hud_element_set_alpha(D_8029F644, opacity);
                    hud_element_draw_clipped(D_8029F644);
                    break;
                case BTL_MSG_ACTION_TIP_0C:
                    hud_element_set_render_pos(D_8029F642, x + 63, y + 14);
                    hud_element_set_scale(D_8029F642, 0.5f);
                    hud_element_set_alpha(D_8029F642, opacity);
                    hud_element_draw_clipped(D_8029F642);

                    hud_element_set_render_pos(D_8029F644, x + 84, y + 14);
                    hud_element_set_scale(D_8029F644, 0.5f);
                    hud_element_set_alpha(D_8029F644, opacity);
                    hud_element_draw_clipped(D_8029F644);
                    break;
                case BTL_MSG_ACTION_TIP_0E:
                    hud_element_set_render_pos(D_8029F642, x + 124, y + 14);
                    hud_element_set_scale(D_8029F642, 0.5f);
                    hud_element_set_alpha(D_8029F642, opacity);
                    hud_element_draw_clipped(D_8029F642);
                    break;
                case BTL_MSG_ACTION_TIP_0F:
                    hud_element_set_render_pos(D_8029F642, x + 56, y + 31);
                    hud_element_set_alpha(D_8029F642, opacity);
                    hud_element_draw_clipped(D_8029F642);

                    hud_element_set_render_pos(D_8029F644, x + 53, y + 14);
                    hud_element_set_scale(D_8029F644, 0.5f);
                    hud_element_set_alpha(D_8029F644, opacity);
                    hud_element_draw_clipped(D_8029F644);
                    break;
                case BTL_MSG_ACTION_TIP_10:
                    hud_element_set_render_pos(D_8029F642, x + 107, y + 13);
                    hud_element_set_scale(D_8029F642, 0.6f);
                    hud_element_set_alpha(D_8029F642, opacity);
                    hud_element_draw_clipped(D_8029F642);

                    hud_element_set_render_pos(D_8029F644, x + 210, y + 15);
                    hud_element_set_scale(D_8029F644, 0.8f);
                    hud_element_set_alpha(D_8029F644, opacity);
                    func_80144218(D_8029F644);

                    hud_element_set_render_pos(D_8029F646, x + 56, y + 15);
                    hud_element_set_scale(D_8029F646, 0.8f);
                    hud_element_set_alpha(D_8029F646, opacity);
                    func_80144218(D_8029F646);
                    break;
                case BTL_MSG_ACTION_TIP_12:
                case BTL_MSG_ACTION_TIP_13:
                    hud_element_set_render_pos(D_8029F642, x + 64, y + 13);
                    hud_element_set_scale(D_8029F642, 0.5f);
                    hud_element_set_alpha(D_8029F642, opacity);
                    hud_element_draw_clipped(D_8029F642);
                    break;
            }
            break;
    }
}