### RAW ASSEMBLY INSTRUCTIONS:

glabel radiating_energy_orb_appendGfx
/* 3A0344 E009E424 27BDFED0 */  addiu     $sp, $sp, -0x130
/* 3A0348 E009E428 AFBF0104 */  sw        $ra, 0x104($sp)
/* 3A034C E009E42C AFBE0100 */  sw        $fp, 0x100($sp)
/* 3A0350 E009E430 AFB700FC */  sw        $s7, 0xFC($sp)
/* 3A0354 E009E434 AFB600F8 */  sw        $s6, 0xF8($sp)
/* 3A0358 E009E438 AFB500F4 */  sw        $s5, 0xF4($sp)
/* 3A035C E009E43C AFB400F0 */  sw        $s4, 0xF0($sp)
/* 3A0360 E009E440 AFB300EC */  sw        $s3, 0xEC($sp)
/* 3A0364 E009E444 AFB200E8 */  sw        $s2, 0xE8($sp)
/* 3A0368 E009E448 AFB100E4 */  sw        $s1, 0xE4($sp)
/* 3A036C E009E44C AFB000E0 */  sw        $s0, 0xE0($sp)
/* 3A0370 E009E450 F7BC0128 */  sdc1      $f28, 0x128($sp)
/* 3A0374 E009E454 F7BA0120 */  sdc1      $f26, 0x120($sp)
/* 3A0378 E009E458 F7B80118 */  sdc1      $f24, 0x118($sp)
/* 3A037C E009E45C F7B60110 */  sdc1      $f22, 0x110($sp)
/* 3A0380 E009E460 F7B40108 */  sdc1      $f20, 0x108($sp)
/* 3A0384 E009E464 AFA40130 */  sw        $a0, 0x130($sp)
/* 3A0388 E009E468 8C94000C */  lw        $s4, 0xC($a0)
/* 3A038C E009E46C 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 3A0390 E009E470 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 3A0394 E009E474 3C04800B */  lui       $a0, %hi(gCameras)
/* 3A0398 E009E478 24841D80 */  addiu     $a0, $a0, %lo(gCameras)
/* 3A039C E009E47C 00031080 */  sll       $v0, $v1, 2
/* 3A03A0 E009E480 00431021 */  addu      $v0, $v0, $v1
/* 3A03A4 E009E484 00021080 */  sll       $v0, $v0, 2
/* 3A03A8 E009E488 00431023 */  subu      $v0, $v0, $v1
/* 3A03AC E009E48C 000218C0 */  sll       $v1, $v0, 3
/* 3A03B0 E009E490 00431021 */  addu      $v0, $v0, $v1
/* 3A03B4 E009E494 8E8D0014 */  lw        $t5, 0x14($s4)
/* 3A03B8 E009E498 000210C0 */  sll       $v0, $v0, 3
/* 3A03BC E009E49C AFAD00DC */  sw        $t5, 0xDC($sp)
/* 3A03C0 E009E4A0 8E8D001C */  lw        $t5, 0x1C($s4)
/* 3A03C4 E009E4A4 0044B021 */  addu      $s6, $v0, $a0
/* 3A03C8 E009E4A8 31B20001 */  andi      $s2, $t5, 0x1
/* 3A03CC E009E4AC 12400009 */  beqz      $s2, .LE009E4D4
/* 3A03D0 E009E4B0 AFAD00D8 */   sw       $t5, 0xD8($sp)
/* 3A03D4 E009E4B4 3C01E00A */  lui       $at, (0xE00A0000 >> 16)
/* 3A03D8 E009E4B8 D422EE20 */  ldc1      $f2, -0x11E0($at)
/* 3A03DC E009E4BC C7A000DC */  lwc1      $f0, 0xDC($sp)
/* 3A03E0 E009E4C0 46800021 */  cvt.d.w   $f0, $f0
/* 3A03E4 E009E4C4 46220002 */  mul.d     $f0, $f0, $f2
/* 3A03E8 E009E4C8 00000000 */  nop
/* 3A03EC E009E4CC 4620010D */  trunc.w.d $f4, $f0
/* 3A03F0 E009E4D0 E7A400DC */  swc1      $f4, 0xDC($sp)
.LE009E4D4:
/* 3A03F4 E009E4D4 3C06DB06 */  lui       $a2, (0xDB060024 >> 16)
/* 3A03F8 E009E4D8 34C60024 */  ori       $a2, $a2, (0xDB060024 & 0xFFFF)
/* 3A03FC E009E4DC 27A40018 */  addiu     $a0, $sp, 0x18
/* 3A0400 E009E4E0 3C100001 */  lui       $s0, (0x11630 >> 16)
/* 3A0404 E009E4E4 3C11800A */  lui       $s1, %hi(gMainGfxPos)
/* 3A0408 E009E4E8 2631A66C */  addiu     $s1, $s1, %lo(gMainGfxPos)
/* 3A040C E009E4EC 8E250000 */  lw        $a1, 0x0($s1)
/* 3A0410 E009E4F0 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 3A0414 E009E4F4 00A0182D */  daddu     $v1, $a1, $zero
/* 3A0418 E009E4F8 24A50008 */  addiu     $a1, $a1, 0x8
/* 3A041C E009E4FC AE250000 */  sw        $a1, 0x0($s1)
/* 3A0420 E009E500 AC620000 */  sw        $v0, 0x0($v1)
/* 3A0424 E009E504 AC600004 */  sw        $zero, 0x4($v1)
/* 3A0428 E009E508 ACA60000 */  sw        $a2, 0x0($a1)
/* 3A042C E009E50C 8FAD0130 */  lw        $t5, 0x130($sp)
/* 3A0430 E009E510 36101630 */  ori       $s0, $s0, (0x11630 & 0xFFFF)
/* 3A0434 E009E514 8DA30010 */  lw        $v1, 0x10($t5)
/* 3A0438 E009E518 24A20008 */  addiu     $v0, $a1, 0x8
/* 3A043C E009E51C AE220000 */  sw        $v0, 0x0($s1)
/* 3A0440 E009E520 8C62001C */  lw        $v0, 0x1C($v1)
/* 3A0444 E009E524 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 3A0448 E009E528 00431021 */  addu      $v0, $v0, $v1
/* 3A044C E009E52C ACA20004 */  sw        $v0, 0x4($a1)
/* 3A0450 E009E530 8E850008 */  lw        $a1, 0x8($s4)
/* 3A0454 E009E534 8E86000C */  lw        $a2, 0xC($s4)
/* 3A0458 E009E538 8E870010 */  lw        $a3, 0x10($s4)
/* 3A045C E009E53C 0C080108 */  jal       shim_guTranslateF
/* 3A0460 E009E540 24170001 */   addiu    $s7, $zero, 0x1
/* 3A0464 E009E544 27A40018 */  addiu     $a0, $sp, 0x18
/* 3A0468 E009E548 3C138007 */  lui       $s3, %hi(gMatrixListPos)
/* 3A046C E009E54C 267341F0 */  addiu     $s3, $s3, %lo(gMatrixListPos)
/* 3A0470 E009E550 3C15800A */  lui       $s5, %hi(gDisplayContext)
/* 3A0474 E009E554 26B5A674 */  addiu     $s5, $s5, %lo(gDisplayContext)
/* 3A0478 E009E558 96650000 */  lhu       $a1, 0x0($s3)
/* 3A047C E009E55C 8EA20000 */  lw        $v0, 0x0($s5)
/* 3A0480 E009E560 00052980 */  sll       $a1, $a1, 6
/* 3A0484 E009E564 00B02821 */  addu      $a1, $a1, $s0
/* 3A0488 E009E568 0C080118 */  jal       shim_guMtxF2L
/* 3A048C E009E56C 00452821 */   addu     $a1, $v0, $a1
/* 3A0490 E009E570 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 3A0494 E009E574 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 3A0498 E009E578 3C0ADA38 */  lui       $t2, (0xDA380000 >> 16)
/* 3A049C E009E57C 01575025 */  or        $t2, $t2, $s7
/* 3A04A0 E009E580 3C0BFF40 */  lui       $t3, (0xFF404000 >> 16)
/* 3A04A4 E009E584 356B4000 */  ori       $t3, $t3, (0xFF404000 & 0xFFFF)
/* 3A04A8 E009E588 27A40018 */  addiu     $a0, $sp, 0x18
/* 3A04AC E009E58C 02F21004 */  sllv      $v0, $s2, $s7
/* 3A04B0 E009E590 8FAD00D8 */  lw        $t5, 0xD8($sp)
/* 3A04B4 E009E594 4480A000 */  mtc1      $zero, $f20
/* 3A04B8 E009E598 8E280000 */  lw        $t0, 0x0($s1)
/* 3A04BC E009E59C 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 3A04C0 E009E5A0 4481C000 */  mtc1      $at, $f24
/* 3A04C4 E009E5A4 004D1021 */  addu      $v0, $v0, $t5
/* 3A04C8 E009E5A8 44822000 */  mtc1      $v0, $f4
/* 3A04CC E009E5AC 00000000 */  nop
/* 3A04D0 E009E5B0 46802120 */  cvt.s.w   $f4, $f4
/* 3A04D4 E009E5B4 0100482D */  daddu     $t1, $t0, $zero
/* 3A04D8 E009E5B8 44052000 */  mfc1      $a1, $f4
/* 3A04DC E009E5BC 4406A000 */  mfc1      $a2, $f20
/* 3A04E0 E009E5C0 96620000 */  lhu       $v0, 0x0($s3)
/* 3A04E4 E009E5C4 25080008 */  addiu     $t0, $t0, 0x8
/* 3A04E8 E009E5C8 AE280000 */  sw        $t0, 0x0($s1)
/* 3A04EC E009E5CC AD230000 */  sw        $v1, 0x0($t1)
/* 3A04F0 E009E5D0 00571821 */  addu      $v1, $v0, $s7
/* 3A04F4 E009E5D4 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3A04F8 E009E5D8 00021180 */  sll       $v0, $v0, 6
/* 3A04FC E009E5DC A6630000 */  sh        $v1, 0x0($s3)
/* 3A0500 E009E5E0 8EA30000 */  lw        $v1, 0x0($s5)
/* 3A0504 E009E5E4 00501021 */  addu      $v0, $v0, $s0
/* 3A0508 E009E5E8 00621821 */  addu      $v1, $v1, $v0
/* 3A050C E009E5EC 25020008 */  addiu     $v0, $t0, 0x8
/* 3A0510 E009E5F0 AD230004 */  sw        $v1, 0x4($t1)
/* 3A0514 E009E5F4 AE220000 */  sw        $v0, 0x0($s1)
/* 3A0518 E009E5F8 25020010 */  addiu     $v0, $t0, 0x10
/* 3A051C E009E5FC AD0A0000 */  sw        $t2, 0x0($t0)
/* 3A0520 E009E600 AE220000 */  sw        $v0, 0x0($s1)
/* 3A0524 E009E604 8EC30204 */  lw        $v1, 0x204($s6)
/* 3A0528 E009E608 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3A052C E009E60C AD020008 */  sw        $v0, 0x8($t0)
/* 3A0530 E009E610 8FAD00DC */  lw        $t5, 0xDC($sp)
/* 3A0534 E009E614 4407A000 */  mfc1      $a3, $f20
/* 3A0538 E009E618 31A200FF */  andi      $v0, $t5, 0xFF
/* 3A053C E009E61C 004B1025 */  or        $v0, $v0, $t3
/* 3A0540 E009E620 AD02000C */  sw        $v0, 0xC($t0)
/* 3A0544 E009E624 AD030004 */  sw        $v1, 0x4($t0)
/* 3A0548 E009E628 0C080104 */  jal       shim_guRotateF
/* 3A054C E009E62C E7B80010 */   swc1     $f24, 0x10($sp)
/* 3A0550 E009E630 27A40018 */  addiu     $a0, $sp, 0x18
/* 3A0554 E009E634 96650000 */  lhu       $a1, 0x0($s3)
/* 3A0558 E009E638 8EA20000 */  lw        $v0, 0x0($s5)
/* 3A055C E009E63C 00052980 */  sll       $a1, $a1, 6
/* 3A0560 E009E640 00B02821 */  addu      $a1, $a1, $s0
/* 3A0564 E009E644 0C080118 */  jal       shim_guMtxF2L
/* 3A0568 E009E648 00452821 */   addu     $a1, $v0, $a1
/* 3A056C E009E64C 3C06D838 */  lui       $a2, (0xD8380002 >> 16)
/* 3A0570 E009E650 8E240000 */  lw        $a0, 0x0($s1)
/* 3A0574 E009E654 34C60002 */  ori       $a2, $a2, (0xD8380002 & 0xFFFF)
/* 3A0578 E009E658 0080282D */  daddu     $a1, $a0, $zero
/* 3A057C E009E65C 24840008 */  addiu     $a0, $a0, 0x8
/* 3A0580 E009E660 AE240000 */  sw        $a0, 0x0($s1)
/* 3A0584 E009E664 96620000 */  lhu       $v0, 0x0($s3)
/* 3A0588 E009E668 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 3A058C E009E66C ACA30000 */  sw        $v1, 0x0($a1)
/* 3A0590 E009E670 00571821 */  addu      $v1, $v0, $s7
/* 3A0594 E009E674 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3A0598 E009E678 00021180 */  sll       $v0, $v0, 6
/* 3A059C E009E67C A6630000 */  sh        $v1, 0x0($s3)
/* 3A05A0 E009E680 8EA30000 */  lw        $v1, 0x0($s5)
/* 3A05A4 E009E684 00501021 */  addu      $v0, $v0, $s0
/* 3A05A8 E009E688 00621821 */  addu      $v1, $v1, $v0
/* 3A05AC E009E68C 24820008 */  addiu     $v0, $a0, 0x8
/* 3A05B0 E009E690 ACA30004 */  sw        $v1, 0x4($a1)
/* 3A05B4 E009E694 3C03DE00 */  lui       $v1, (0xDE000000 >> 16)
/* 3A05B8 E009E698 AE220000 */  sw        $v0, 0x0($s1)
/* 3A05BC E009E69C 3C020900 */  lui       $v0, %hi(D_090012A8_40E538)
/* 3A05C0 E009E6A0 244212A8 */  addiu     $v0, $v0, %lo(D_090012A8_40E538)
/* 3A05C4 E009E6A4 AC820004 */  sw        $v0, 0x4($a0)
/* 3A05C8 E009E6A8 24820010 */  addiu     $v0, $a0, 0x10
/* 3A05CC E009E6AC AC830000 */  sw        $v1, 0x0($a0)
/* 3A05D0 E009E6B0 AE220000 */  sw        $v0, 0x0($s1)
/* 3A05D4 E009E6B4 3C020900 */  lui       $v0, %hi(D_09001510_40E7A0)
/* 3A05D8 E009E6B8 24421510 */  addiu     $v0, $v0, %lo(D_09001510_40E7A0)
/* 3A05DC E009E6BC AC82000C */  sw        $v0, 0xC($a0)
/* 3A05E0 E009E6C0 24820018 */  addiu     $v0, $a0, 0x18
/* 3A05E4 E009E6C4 AC830008 */  sw        $v1, 0x8($a0)
/* 3A05E8 E009E6C8 AE220000 */  sw        $v0, 0x0($s1)
/* 3A05EC E009E6CC 24020040 */  addiu     $v0, $zero, 0x40
/* 3A05F0 E009E6D0 AC820014 */  sw        $v0, 0x14($a0)
/* 3A05F4 E009E6D4 3C020900 */  lui       $v0, %hi(D_09001200_40E490)
/* 3A05F8 E009E6D8 24421200 */  addiu     $v0, $v0, %lo(D_09001200_40E490)
/* 3A05FC E009E6DC AC860010 */  sw        $a2, 0x10($a0)
/* 3A0600 E009E6E0 AC830018 */  sw        $v1, 0x18($a0)
/* 3A0604 E009E6E4 AC82001C */  sw        $v0, 0x1C($a0)
/* 3A0608 E009E6E8 8FAD0130 */  lw        $t5, 0x130($sp)
/* 3A060C E009E6EC 26940034 */  addiu     $s4, $s4, 0x34
/* 3A0610 E009E6F0 8DA20008 */  lw        $v0, 0x8($t5)
/* 3A0614 E009E6F4 24840020 */  addiu     $a0, $a0, 0x20
/* 3A0618 E009E6F8 02E2102A */  slt       $v0, $s7, $v0
/* 3A061C E009E6FC 104001A0 */  beqz      $v0, .LE009ED80
/* 3A0620 E009E700 AE240000 */   sw       $a0, 0x0($s1)
/* 3A0624 E009E704 4600A586 */  mov.s     $f22, $f20
/* 3A0628 E009E708 0220902D */  daddu     $s2, $s1, $zero
/* 3A062C E009E70C 27B00058 */  addiu     $s0, $sp, 0x58
/* 3A0630 E009E710 02A0B02D */  daddu     $s6, $s5, $zero
/* 3A0634 E009E714 0260A82D */  daddu     $s5, $s3, $zero
/* 3A0638 E009E718 3C130001 */  lui       $s3, (0x11630 >> 16)
/* 3A063C E009E71C 36731630 */  ori       $s3, $s3, (0x11630 & 0xFFFF)
/* 3A0640 E009E720 3C1ED838 */  lui       $fp, (0xD8380002 >> 16)
/* 3A0644 E009E724 37DE0002 */  ori       $fp, $fp, (0xD8380002 & 0xFFFF)
/* 3A0648 E009E728 2691002C */  addiu     $s1, $s4, 0x2C
/* 3A064C E009E72C 2414000A */  addiu     $s4, $zero, 0xA
/* 3A0650 E009E730 3C014270 */  lui       $at, (0x42700000 >> 16)
/* 3A0654 E009E734 4481E000 */  mtc1      $at, $f28
/* 3A0658 E009E738 3C014000 */  lui       $at, (0x40000000 >> 16)
/* 3A065C E009E73C 4481D800 */  mtc1      $at, $f27
/* 3A0660 E009E740 4480D000 */  mtc1      $zero, $f26
.LE009E744:
/* 3A0664 E009E744 C634FFFC */  lwc1      $f20, -0x4($s1)
/* 3A0668 E009E748 4616A032 */  c.eq.s    $f20, $f22
/* 3A066C E009E74C 00000000 */  nop
/* 3A0670 E009E750 45030185 */  bc1tl     .LE009ED68
/* 3A0674 E009E754 2694000A */   addiu    $s4, $s4, 0xA
/* 3A0678 E009E758 3C0AFCFF */  lui       $t2, (0xFCFF97FF >> 16)
/* 3A067C E009E75C 354A97FF */  ori       $t2, $t2, (0xFCFF97FF & 0xFFFF)
/* 3A0680 E009E760 3C09FF2D */  lui       $t1, (0xFF2DFEFF >> 16)
/* 3A0684 E009E764 3529FEFF */  ori       $t1, $t1, (0xFF2DFEFF & 0xFFFF)
/* 3A0688 E009E768 8E480000 */  lw        $t0, 0x0($s2)
/* 3A068C E009E76C 27A40018 */  addiu     $a0, $sp, 0x18
/* 3A0690 E009E770 0100282D */  daddu     $a1, $t0, $zero
/* 3A0694 E009E774 3C0DFA00 */  lui       $t5, (0xFA000000 >> 16)
/* 3A0698 E009E778 ACAD0000 */  sw        $t5, 0x0($a1)
/* 3A069C E009E77C 8E22FFE8 */  lw        $v0, -0x18($s1)
/* 3A06A0 E009E780 8FAD00DC */  lw        $t5, 0xDC($sp)
/* 3A06A4 E009E784 2403FF00 */  addiu     $v1, $zero, -0x100
/* 3A06A8 E009E788 004D0018 */  mult      $v0, $t5
/* 3A06AC E009E78C 4406B000 */  mfc1      $a2, $f22
/* 3A06B0 E009E790 4407B000 */  mfc1      $a3, $f22
/* 3A06B4 E009E794 25080008 */  addiu     $t0, $t0, 0x8
/* 3A06B8 E009E798 AE480000 */  sw        $t0, 0x0($s2)
/* 3A06BC E009E79C 00001012 */  mflo      $v0
/* 3A06C0 E009E7A0 00021203 */  sra       $v0, $v0, 8
/* 3A06C4 E009E7A4 00431025 */  or        $v0, $v0, $v1
/* 3A06C8 E009E7A8 ACA20004 */  sw        $v0, 0x4($a1)
/* 3A06CC E009E7AC AD0A0000 */  sw        $t2, 0x0($t0)
/* 3A06D0 E009E7B0 AD090004 */  sw        $t1, 0x4($t0)
/* 3A06D4 E009E7B4 E7B80010 */  swc1      $f24, 0x10($sp)
/* 3A06D8 E009E7B8 8E25FFF4 */  lw        $a1, -0xC($s1)
/* 3A06DC E009E7BC 25080008 */  addiu     $t0, $t0, 0x8
/* 3A06E0 E009E7C0 0C080104 */  jal       shim_guRotateF
/* 3A06E4 E009E7C4 AE480000 */   sw       $t0, 0x0($s2)
/* 3A06E8 E009E7C8 8E250000 */  lw        $a1, 0x0($s1)
/* 3A06EC E009E7CC 4406B000 */  mfc1      $a2, $f22
/* 3A06F0 E009E7D0 4407B000 */  mfc1      $a3, $f22
/* 3A06F4 E009E7D4 0C080108 */  jal       shim_guTranslateF
/* 3A06F8 E009E7D8 0200202D */   daddu    $a0, $s0, $zero
/* 3A06FC E009E7DC 0200202D */  daddu     $a0, $s0, $zero
/* 3A0700 E009E7E0 27A50018 */  addiu     $a1, $sp, 0x18
/* 3A0704 E009E7E4 0C080114 */  jal       shim_guMtxCatF
/* 3A0708 E009E7E8 00A0302D */   daddu    $a2, $a1, $zero
/* 3A070C E009E7EC 4405A000 */  mfc1      $a1, $f20
/* 3A0710 E009E7F0 4406A000 */  mfc1      $a2, $f20
/* 3A0714 E009E7F4 4407A000 */  mfc1      $a3, $f20
/* 3A0718 E009E7F8 0C080110 */  jal       shim_guScaleF
/* 3A071C E009E7FC 0200202D */   daddu    $a0, $s0, $zero
/* 3A0720 E009E800 0200202D */  daddu     $a0, $s0, $zero
/* 3A0724 E009E804 27A50018 */  addiu     $a1, $sp, 0x18
/* 3A0728 E009E808 0C080114 */  jal       shim_guMtxCatF
/* 3A072C E009E80C 00A0302D */   daddu    $a2, $a1, $zero
/* 3A0730 E009E810 27A40018 */  addiu     $a0, $sp, 0x18
/* 3A0734 E009E814 96A50000 */  lhu       $a1, 0x0($s5)
/* 3A0738 E009E818 8EC20000 */  lw        $v0, 0x0($s6)
/* 3A073C E009E81C 00052980 */  sll       $a1, $a1, 6
/* 3A0740 E009E820 00B32821 */  addu      $a1, $a1, $s3
/* 3A0744 E009E824 0C080118 */  jal       shim_guMtxF2L
/* 3A0748 E009E828 00452821 */   addu     $a1, $v0, $a1
/* 3A074C E009E82C 27A40018 */  addiu     $a0, $sp, 0x18
/* 3A0750 E009E830 8E480000 */  lw        $t0, 0x0($s2)
/* 3A0754 E009E834 4406B000 */  mfc1      $a2, $f22
/* 3A0758 E009E838 4407B000 */  mfc1      $a3, $f22
/* 3A075C E009E83C 96A30000 */  lhu       $v1, 0x0($s5)
/* 3A0760 E009E840 0100282D */  daddu     $a1, $t0, $zero
/* 3A0764 E009E844 25080008 */  addiu     $t0, $t0, 0x8
/* 3A0768 E009E848 3C0DDA38 */  lui       $t5, (0xDA380000 >> 16)
/* 3A076C E009E84C 24620001 */  addiu     $v0, $v1, 0x1
/* 3A0770 E009E850 3063FFFF */  andi      $v1, $v1, 0xFFFF
/* 3A0774 E009E854 00031980 */  sll       $v1, $v1, 6
/* 3A0778 E009E858 AE480000 */  sw        $t0, 0x0($s2)
/* 3A077C E009E85C ACAD0000 */  sw        $t5, 0x0($a1)
/* 3A0780 E009E860 A6A20000 */  sh        $v0, 0x0($s5)
/* 3A0784 E009E864 8EC20000 */  lw        $v0, 0x0($s6)
/* 3A0788 E009E868 00731821 */  addu      $v1, $v1, $s3
/* 3A078C E009E86C 00431021 */  addu      $v0, $v0, $v1
/* 3A0790 E009E870 ACA20004 */  sw        $v0, 0x4($a1)
/* 3A0794 E009E874 3C0DDE00 */  lui       $t5, (0xDE000000 >> 16)
/* 3A0798 E009E878 25020008 */  addiu     $v0, $t0, 0x8
/* 3A079C E009E87C AD0D0000 */  sw        $t5, 0x0($t0)
/* 3A07A0 E009E880 3C03E00A */  lui       $v1, (0xE00A0000 >> 16)
/* 3A07A4 E009E884 8C63EDFC */  lw        $v1, -0x1204($v1)
/* 3A07A8 E009E888 240D0040 */  addiu     $t5, $zero, 0x40
/* 3A07AC E009E88C AE420000 */  sw        $v0, 0x0($s2)
/* 3A07B0 E009E890 AD1E0008 */  sw        $fp, 0x8($t0)
/* 3A07B4 E009E894 AD0D000C */  sw        $t5, 0xC($t0)
/* 3A07B8 E009E898 AD030004 */  sw        $v1, 0x4($t0)
/* 3A07BC E009E89C E7B80010 */  swc1      $f24, 0x10($sp)
/* 3A07C0 E009E8A0 8E25FFF4 */  lw        $a1, -0xC($s1)
/* 3A07C4 E009E8A4 25080010 */  addiu     $t0, $t0, 0x10
/* 3A07C8 E009E8A8 0C080104 */  jal       shim_guRotateF
/* 3A07CC E009E8AC AE480000 */   sw       $t0, 0x0($s2)
/* 3A07D0 E009E8B0 C6220000 */  lwc1      $f2, 0x0($s1)
/* 3A07D4 E009E8B4 3C0140A0 */  lui       $at, (0x40A00000 >> 16)
/* 3A07D8 E009E8B8 44810000 */  mtc1      $at, $f0
/* 3A07DC E009E8BC 00000000 */  nop
/* 3A07E0 E009E8C0 46001080 */  add.s     $f2, $f2, $f0
/* 3A07E4 E009E8C4 4406B000 */  mfc1      $a2, $f22
/* 3A07E8 E009E8C8 4407B000 */  mfc1      $a3, $f22
/* 3A07EC E009E8CC 44051000 */  mfc1      $a1, $f2
/* 3A07F0 E009E8D0 0C080108 */  jal       shim_guTranslateF
/* 3A07F4 E009E8D4 0200202D */   daddu    $a0, $s0, $zero
/* 3A07F8 E009E8D8 0200202D */  daddu     $a0, $s0, $zero
/* 3A07FC E009E8DC 27A50018 */  addiu     $a1, $sp, 0x18
/* 3A0800 E009E8E0 0C080114 */  jal       shim_guMtxCatF
/* 3A0804 E009E8E4 00A0302D */   daddu    $a2, $a1, $zero
/* 3A0808 E009E8E8 3C01E00A */  lui       $at, (0xE00A0000 >> 16)
/* 3A080C E009E8EC D420EE28 */  ldc1      $f0, -0x11D8($at)
/* 3A0810 E009E8F0 4600A0A1 */  cvt.d.s   $f2, $f20
/* 3A0814 E009E8F4 46220001 */  sub.d     $f0, $f0, $f2
/* 3A0818 E009E8F8 46200020 */  cvt.s.d   $f0, $f0
/* 3A081C E009E8FC 44050000 */  mfc1      $a1, $f0
/* 3A0820 E009E900 0200202D */  daddu     $a0, $s0, $zero
/* 3A0824 E009E904 00A0302D */  daddu     $a2, $a1, $zero
/* 3A0828 E009E908 0C080110 */  jal       shim_guScaleF
/* 3A082C E009E90C 00A0382D */   daddu    $a3, $a1, $zero
/* 3A0830 E009E910 0200202D */  daddu     $a0, $s0, $zero
/* 3A0834 E009E914 27A50018 */  addiu     $a1, $sp, 0x18
/* 3A0838 E009E918 0C080114 */  jal       shim_guMtxCatF
/* 3A083C E009E91C 00A0302D */   daddu    $a2, $a1, $zero
/* 3A0840 E009E920 27A40018 */  addiu     $a0, $sp, 0x18
/* 3A0844 E009E924 96A50000 */  lhu       $a1, 0x0($s5)
/* 3A0848 E009E928 8EC20000 */  lw        $v0, 0x0($s6)
/* 3A084C E009E92C 00052980 */  sll       $a1, $a1, 6
/* 3A0850 E009E930 00B32821 */  addu      $a1, $a1, $s3
/* 3A0854 E009E934 0C080118 */  jal       shim_guMtxF2L
/* 3A0858 E009E938 00452821 */   addu     $a1, $v0, $a1
/* 3A085C E009E93C 3C0CFF00 */  lui       $t4, (0xFF00FF00 >> 16)
/* 3A0860 E009E940 358CFF00 */  ori       $t4, $t4, (0xFF00FF00 & 0xFFFF)
/* 3A0864 E009E944 3C0BFF80 */  lui       $t3, (0xFF80FF00 >> 16)
/* 3A0868 E009E948 356BFF00 */  ori       $t3, $t3, (0xFF80FF00 & 0xFFFF)
/* 3A086C E009E94C 3C0AFC50 */  lui       $t2, (0xFC5096A1 >> 16)
/* 3A0870 E009E950 354A96A1 */  ori       $t2, $t2, (0xFC5096A1 & 0xFFFF)
/* 3A0874 E009E954 3C09332D */  lui       $t1, (0x332DFEFF >> 16)
/* 3A0878 E009E958 3529FEFF */  ori       $t1, $t1, (0x332DFEFF & 0xFFFF)
/* 3A087C E009E95C 27A40018 */  addiu     $a0, $sp, 0x18
/* 3A0880 E009E960 8E480000 */  lw        $t0, 0x0($s2)
/* 3A0884 E009E964 96A30000 */  lhu       $v1, 0x0($s5)
/* 3A0888 E009E968 3C014160 */  lui       $at, (0x41600000 >> 16)
/* 3A088C E009E96C 44810000 */  mtc1      $at, $f0
/* 3A0890 E009E970 0100282D */  daddu     $a1, $t0, $zero
/* 3A0894 E009E974 25080008 */  addiu     $t0, $t0, 0x8
/* 3A0898 E009E978 3C0DDA38 */  lui       $t5, (0xDA380000 >> 16)
/* 3A089C E009E97C 24620001 */  addiu     $v0, $v1, 0x1
/* 3A08A0 E009E980 3063FFFF */  andi      $v1, $v1, 0xFFFF
/* 3A08A4 E009E984 00031980 */  sll       $v1, $v1, 6
/* 3A08A8 E009E988 AE480000 */  sw        $t0, 0x0($s2)
/* 3A08AC E009E98C ACAD0000 */  sw        $t5, 0x0($a1)
/* 3A08B0 E009E990 A6A20000 */  sh        $v0, 0x0($s5)
/* 3A08B4 E009E994 8EC20000 */  lw        $v0, 0x0($s6)
/* 3A08B8 E009E998 00731821 */  addu      $v1, $v1, $s3
/* 3A08BC E009E99C 00431021 */  addu      $v0, $v0, $v1
/* 3A08C0 E009E9A0 ACA20004 */  sw        $v0, 0x4($a1)
/* 3A08C4 E009E9A4 25020008 */  addiu     $v0, $t0, 0x8
/* 3A08C8 E009E9A8 3C0DDE00 */  lui       $t5, (0xDE000000 >> 16)
/* 3A08CC E009E9AC AE420000 */  sw        $v0, 0x0($s2)
/* 3A08D0 E009E9B0 25020010 */  addiu     $v0, $t0, 0x10
/* 3A08D4 E009E9B4 AD0D0000 */  sw        $t5, 0x0($t0)
/* 3A08D8 E009E9B8 3C03E00A */  lui       $v1, (0xE00A0000 >> 16)
/* 3A08DC E009E9BC 8C63EDF8 */  lw        $v1, -0x1208($v1)
/* 3A08E0 E009E9C0 240D0040 */  addiu     $t5, $zero, 0x40
/* 3A08E4 E009E9C4 AE420000 */  sw        $v0, 0x0($s2)
/* 3A08E8 E009E9C8 25020018 */  addiu     $v0, $t0, 0x18
/* 3A08EC E009E9CC AD0D000C */  sw        $t5, 0xC($t0)
/* 3A08F0 E009E9D0 3C0DFA00 */  lui       $t5, (0xFA000000 >> 16)
/* 3A08F4 E009E9D4 AD1E0008 */  sw        $fp, 0x8($t0)
/* 3A08F8 E009E9D8 AE420000 */  sw        $v0, 0x0($s2)
/* 3A08FC E009E9DC AD0D0010 */  sw        $t5, 0x10($t0)
/* 3A0900 E009E9E0 AD030004 */  sw        $v1, 0x4($t0)
/* 3A0904 E009E9E4 8E22FFE8 */  lw        $v0, -0x18($s1)
/* 3A0908 E009E9E8 8FAD00DC */  lw        $t5, 0xDC($sp)
/* 3A090C E009E9EC 3C03FB00 */  lui       $v1, (0xFB000000 >> 16)
/* 3A0910 E009E9F0 004D0018 */  mult      $v0, $t5
/* 3A0914 E009E9F4 AD030018 */  sw        $v1, 0x18($t0)
/* 3A0918 E009E9F8 AD0B001C */  sw        $t3, 0x1C($t0)
/* 3A091C E009E9FC AD0A0020 */  sw        $t2, 0x20($t0)
/* 3A0920 E009EA00 AD090024 */  sw        $t1, 0x24($t0)
/* 3A0924 E009EA04 00001012 */  mflo      $v0
/* 3A0928 E009EA08 00021243 */  sra       $v0, $v0, 9
/* 3A092C E009EA0C 304200FF */  andi      $v0, $v0, 0xFF
/* 3A0930 E009EA10 004C1025 */  or        $v0, $v0, $t4
/* 3A0934 E009EA14 AD020014 */  sw        $v0, 0x14($t0)
/* 3A0938 E009EA18 C622FFF4 */  lwc1      $f2, -0xC($s1)
/* 3A093C E009EA1C 4406B000 */  mfc1      $a2, $f22
/* 3A0940 E009EA20 46001080 */  add.s     $f2, $f2, $f0
/* 3A0944 E009EA24 4407B000 */  mfc1      $a3, $f22
/* 3A0948 E009EA28 25020020 */  addiu     $v0, $t0, 0x20
/* 3A094C E009EA2C 44051000 */  mfc1      $a1, $f2
/* 3A0950 E009EA30 25080028 */  addiu     $t0, $t0, 0x28
/* 3A0954 E009EA34 AE420000 */  sw        $v0, 0x0($s2)
/* 3A0958 E009EA38 AE480000 */  sw        $t0, 0x0($s2)
/* 3A095C E009EA3C 0C080104 */  jal       shim_guRotateF
/* 3A0960 E009EA40 E7B80010 */   swc1     $f24, 0x10($sp)
/* 3A0964 E009EA44 3C02B60B */  lui       $v0, (0xB60B60B7 >> 16)
/* 3A0968 E009EA48 344260B7 */  ori       $v0, $v0, (0xB60B60B7 & 0xFFFF)
/* 3A096C E009EA4C 02820018 */  mult      $s4, $v0
/* 3A0970 E009EA50 00141FC3 */  sra       $v1, $s4, 31
/* 3A0974 E009EA54 4406B000 */  mfc1      $a2, $f22
/* 3A0978 E009EA58 4407C000 */  mfc1      $a3, $f24
/* 3A097C E009EA5C 8FAD00D8 */  lw        $t5, 0xD8($sp)
/* 3A0980 E009EA60 00001010 */  mfhi      $v0
/* 3A0984 E009EA64 00541021 */  addu      $v0, $v0, $s4
/* 3A0988 E009EA68 00021143 */  sra       $v0, $v0, 5
/* 3A098C E009EA6C 00431023 */  subu      $v0, $v0, $v1
/* 3A0990 E009EA70 00021840 */  sll       $v1, $v0, 1
/* 3A0994 E009EA74 00621821 */  addu      $v1, $v1, $v0
/* 3A0998 E009EA78 00031100 */  sll       $v0, $v1, 4
/* 3A099C E009EA7C 00431023 */  subu      $v0, $v0, $v1
/* 3A09A0 E009EA80 02821023 */  subu      $v0, $s4, $v0
/* 3A09A4 E009EA84 004D1021 */  addu      $v0, $v0, $t5
/* 3A09A8 E009EA88 44822000 */  mtc1      $v0, $f4
/* 3A09AC E009EA8C 00000000 */  nop
/* 3A09B0 E009EA90 46802120 */  cvt.s.w   $f4, $f4
/* 3A09B4 E009EA94 44052000 */  mfc1      $a1, $f4
/* 3A09B8 E009EA98 0200202D */  daddu     $a0, $s0, $zero
/* 3A09BC E009EA9C 0C080104 */  jal       shim_guRotateF
/* 3A09C0 E009EAA0 E7B60010 */   swc1     $f22, 0x10($sp)
/* 3A09C4 E009EAA4 0200202D */  daddu     $a0, $s0, $zero
/* 3A09C8 E009EAA8 27A50018 */  addiu     $a1, $sp, 0x18
/* 3A09CC E009EAAC 0C080114 */  jal       shim_guMtxCatF
/* 3A09D0 E009EAB0 00A0302D */   daddu    $a2, $a1, $zero
/* 3A09D4 E009EAB4 3C0541A0 */  lui       $a1, (0x41A00000 >> 16)
/* 3A09D8 E009EAB8 4406B000 */  mfc1      $a2, $f22
/* 3A09DC E009EABC 4407B000 */  mfc1      $a3, $f22
/* 3A09E0 E009EAC0 0C080108 */  jal       shim_guTranslateF
/* 3A09E4 E009EAC4 0200202D */   daddu    $a0, $s0, $zero
/* 3A09E8 E009EAC8 0200202D */  daddu     $a0, $s0, $zero
/* 3A09EC E009EACC 27A50018 */  addiu     $a1, $sp, 0x18
/* 3A09F0 E009EAD0 0C080114 */  jal       shim_guMtxCatF
/* 3A09F4 E009EAD4 00A0302D */   daddu    $a2, $a1, $zero
/* 3A09F8 E009EAD8 C6200000 */  lwc1      $f0, 0x0($s1)
/* 3A09FC E009EADC 461C0001 */  sub.s     $f0, $f0, $f28
/* 3A0A00 E009EAE0 3C01E00A */  lui       $at, (0xE00A0000 >> 16)
/* 3A0A04 E009EAE4 D422EE30 */  ldc1      $f2, -0x11D0($at)
/* 3A0A08 E009EAE8 46000021 */  cvt.d.s   $f0, $f0
/* 3A0A0C E009EAEC 46220002 */  mul.d     $f0, $f0, $f2
/* 3A0A10 E009EAF0 00000000 */  nop
/* 3A0A14 E009EAF4 3C013FF0 */  lui       $at, (0x3FF00000 >> 16)
/* 3A0A18 E009EAF8 44811800 */  mtc1      $at, $f3
/* 3A0A1C E009EAFC 44801000 */  mtc1      $zero, $f2
/* 3A0A20 E009EB00 00000000 */  nop
/* 3A0A24 E009EB04 46220080 */  add.d     $f2, $f0, $f2
/* 3A0A28 E009EB08 4620D001 */  sub.d     $f0, $f26, $f0
/* 3A0A2C E009EB0C 4407C000 */  mfc1      $a3, $f24
/* 3A0A30 E009EB10 462010A0 */  cvt.s.d   $f2, $f2
/* 3A0A34 E009EB14 46200020 */  cvt.s.d   $f0, $f0
/* 3A0A38 E009EB18 44051000 */  mfc1      $a1, $f2
/* 3A0A3C E009EB1C 44060000 */  mfc1      $a2, $f0
/* 3A0A40 E009EB20 0C080110 */  jal       shim_guScaleF
/* 3A0A44 E009EB24 0200202D */   daddu    $a0, $s0, $zero
/* 3A0A48 E009EB28 0200202D */  daddu     $a0, $s0, $zero
/* 3A0A4C E009EB2C 27A50018 */  addiu     $a1, $sp, 0x18
/* 3A0A50 E009EB30 0C080114 */  jal       shim_guMtxCatF
/* 3A0A54 E009EB34 00A0302D */   daddu    $a2, $a1, $zero
/* 3A0A58 E009EB38 27A40018 */  addiu     $a0, $sp, 0x18
/* 3A0A5C E009EB3C 96A50000 */  lhu       $a1, 0x0($s5)
/* 3A0A60 E009EB40 8EC20000 */  lw        $v0, 0x0($s6)
/* 3A0A64 E009EB44 00052980 */  sll       $a1, $a1, 6
/* 3A0A68 E009EB48 00B32821 */  addu      $a1, $a1, $s3
/* 3A0A6C E009EB4C 0C080118 */  jal       shim_guMtxF2L
/* 3A0A70 E009EB50 00452821 */   addu     $a1, $v0, $a1
/* 3A0A74 E009EB54 3C09FF40 */  lui       $t1, (0xFF404000 >> 16)
/* 3A0A78 E009EB58 8E480000 */  lw        $t0, 0x0($s2)
/* 3A0A7C E009EB5C 4406B000 */  mfc1      $a2, $f22
/* 3A0A80 E009EB60 96A50000 */  lhu       $a1, 0x0($s5)
/* 3A0A84 E009EB64 0100202D */  daddu     $a0, $t0, $zero
/* 3A0A88 E009EB68 25080008 */  addiu     $t0, $t0, 0x8
/* 3A0A8C E009EB6C 3C0DDA38 */  lui       $t5, (0xDA380000 >> 16)
/* 3A0A90 E009EB70 30A2FFFF */  andi      $v0, $a1, 0xFFFF
/* 3A0A94 E009EB74 00021180 */  sll       $v0, $v0, 6
/* 3A0A98 E009EB78 AC8D0000 */  sw        $t5, 0x0($a0)
/* 3A0A9C E009EB7C 8EC30000 */  lw        $v1, 0x0($s6)
/* 3A0AA0 E009EB80 00531021 */  addu      $v0, $v0, $s3
/* 3A0AA4 E009EB84 00621821 */  addu      $v1, $v1, $v0
/* 3A0AA8 E009EB88 AC830004 */  sw        $v1, 0x4($a0)
/* 3A0AAC E009EB8C 3C0DDE00 */  lui       $t5, (0xDE000000 >> 16)
/* 3A0AB0 E009EB90 AD0D0000 */  sw        $t5, 0x0($t0)
/* 3A0AB4 E009EB94 3C02E00A */  lui       $v0, (0xE00A0000 >> 16)
/* 3A0AB8 E009EB98 8C42EDF4 */  lw        $v0, -0x120C($v0)
/* 3A0ABC E009EB9C 240D0040 */  addiu     $t5, $zero, 0x40
/* 3A0AC0 E009EBA0 AD0D000C */  sw        $t5, 0xC($t0)
/* 3A0AC4 E009EBA4 3C0DFA00 */  lui       $t5, (0xFA000000 >> 16)
/* 3A0AC8 E009EBA8 AD1E0008 */  sw        $fp, 0x8($t0)
/* 3A0ACC E009EBAC AD0D0010 */  sw        $t5, 0x10($t0)
/* 3A0AD0 E009EBB0 AD020004 */  sw        $v0, 0x4($t0)
/* 3A0AD4 E009EBB4 8E22FFE8 */  lw        $v0, -0x18($s1)
/* 3A0AD8 E009EBB8 35294000 */  ori       $t1, $t1, (0xFF404000 & 0xFFFF)
/* 3A0ADC E009EBBC AE480000 */  sw        $t0, 0x0($s2)
/* 3A0AE0 E009EBC0 8FAD00DC */  lw        $t5, 0xDC($sp)
/* 3A0AE4 E009EBC4 3C014208 */  lui       $at, (0x42080000 >> 16)
/* 3A0AE8 E009EBC8 44810000 */  mtc1      $at, $f0
/* 3A0AEC E009EBCC 004D0018 */  mult      $v0, $t5
/* 3A0AF0 E009EBD0 24A50001 */  addiu     $a1, $a1, 0x1
/* 3A0AF4 E009EBD4 A6A50000 */  sh        $a1, 0x0($s5)
/* 3A0AF8 E009EBD8 25020008 */  addiu     $v0, $t0, 0x8
/* 3A0AFC E009EBDC AE420000 */  sw        $v0, 0x0($s2)
/* 3A0B00 E009EBE0 00001812 */  mflo      $v1
/* 3A0B04 E009EBE4 00031203 */  sra       $v0, $v1, 8
/* 3A0B08 E009EBE8 304200FF */  andi      $v0, $v0, 0xFF
/* 3A0B0C E009EBEC 00491025 */  or        $v0, $v0, $t1
/* 3A0B10 E009EBF0 AD020014 */  sw        $v0, 0x14($t0)
/* 3A0B14 E009EBF4 C622FFF4 */  lwc1      $f2, -0xC($s1)
/* 3A0B18 E009EBF8 25020010 */  addiu     $v0, $t0, 0x10
/* 3A0B1C E009EBFC 46001080 */  add.s     $f2, $f2, $f0
/* 3A0B20 E009EC00 AE420000 */  sw        $v0, 0x0($s2)
/* 3A0B24 E009EC04 C7A000D8 */  lwc1      $f0, 0xD8($sp)
/* 3A0B28 E009EC08 46800020 */  cvt.s.w   $f0, $f0
/* 3A0B2C E009EC0C 46001080 */  add.s     $f2, $f2, $f0
/* 3A0B30 E009EC10 4407B000 */  mfc1      $a3, $f22
/* 3A0B34 E009EC14 27A40018 */  addiu     $a0, $sp, 0x18
/* 3A0B38 E009EC18 44051000 */  mfc1      $a1, $f2
/* 3A0B3C E009EC1C 25080018 */  addiu     $t0, $t0, 0x18
/* 3A0B40 E009EC20 AE480000 */  sw        $t0, 0x0($s2)
/* 3A0B44 E009EC24 0C080104 */  jal       shim_guRotateF
/* 3A0B48 E009EC28 E7B80010 */   swc1     $f24, 0x10($sp)
/* 3A0B4C E009EC2C 001710C0 */  sll       $v0, $s7, 3
/* 3A0B50 E009EC30 00571021 */  addu      $v0, $v0, $s7
/* 3A0B54 E009EC34 00021080 */  sll       $v0, $v0, 2
/* 3A0B58 E009EC38 00571023 */  subu      $v0, $v0, $s7
/* 3A0B5C E009EC3C 44822000 */  mtc1      $v0, $f4
/* 3A0B60 E009EC40 00000000 */  nop
/* 3A0B64 E009EC44 46802120 */  cvt.s.w   $f4, $f4
/* 3A0B68 E009EC48 4406B000 */  mfc1      $a2, $f22
/* 3A0B6C E009EC4C 4407C000 */  mfc1      $a3, $f24
/* 3A0B70 E009EC50 44052000 */  mfc1      $a1, $f4
/* 3A0B74 E009EC54 0200202D */  daddu     $a0, $s0, $zero
/* 3A0B78 E009EC58 0C080104 */  jal       shim_guRotateF
/* 3A0B7C E009EC5C E7B60010 */   swc1     $f22, 0x10($sp)
/* 3A0B80 E009EC60 0200202D */  daddu     $a0, $s0, $zero
/* 3A0B84 E009EC64 27A50018 */  addiu     $a1, $sp, 0x18
/* 3A0B88 E009EC68 0C080114 */  jal       shim_guMtxCatF
/* 3A0B8C E009EC6C 00A0302D */   daddu    $a2, $a1, $zero
/* 3A0B90 E009EC70 3C054170 */  lui       $a1, (0x41700000 >> 16)
/* 3A0B94 E009EC74 4406B000 */  mfc1      $a2, $f22
/* 3A0B98 E009EC78 4407B000 */  mfc1      $a3, $f22
/* 3A0B9C E009EC7C 0C080108 */  jal       shim_guTranslateF
/* 3A0BA0 E009EC80 0200202D */   daddu    $a0, $s0, $zero
/* 3A0BA4 E009EC84 0200202D */  daddu     $a0, $s0, $zero
/* 3A0BA8 E009EC88 27A50018 */  addiu     $a1, $sp, 0x18
/* 3A0BAC E009EC8C 0C080114 */  jal       shim_guMtxCatF
/* 3A0BB0 E009EC90 00A0302D */   daddu    $a2, $a1, $zero
/* 3A0BB4 E009EC94 C6200000 */  lwc1      $f0, 0x0($s1)
/* 3A0BB8 E009EC98 461C0001 */  sub.s     $f0, $f0, $f28
/* 3A0BBC E009EC9C 3C01E00A */  lui       $at, (0xE00A0000 >> 16)
/* 3A0BC0 E009ECA0 D422EE38 */  ldc1      $f2, -0x11C8($at)
/* 3A0BC4 E009ECA4 46000021 */  cvt.d.s   $f0, $f0
/* 3A0BC8 E009ECA8 46220002 */  mul.d     $f0, $f0, $f2
/* 3A0BCC E009ECAC 00000000 */  nop
/* 3A0BD0 E009ECB0 463A0000 */  add.d     $f0, $f0, $f26
/* 3A0BD4 E009ECB4 4406C000 */  mfc1      $a2, $f24
/* 3A0BD8 E009ECB8 4407C000 */  mfc1      $a3, $f24
/* 3A0BDC E009ECBC 46200020 */  cvt.s.d   $f0, $f0
/* 3A0BE0 E009ECC0 44050000 */  mfc1      $a1, $f0
/* 3A0BE4 E009ECC4 0C080110 */  jal       shim_guScaleF
/* 3A0BE8 E009ECC8 0200202D */   daddu    $a0, $s0, $zero
/* 3A0BEC E009ECCC 0200202D */  daddu     $a0, $s0, $zero
/* 3A0BF0 E009ECD0 27A50018 */  addiu     $a1, $sp, 0x18
/* 3A0BF4 E009ECD4 0C080114 */  jal       shim_guMtxCatF
/* 3A0BF8 E009ECD8 00A0302D */   daddu    $a2, $a1, $zero
/* 3A0BFC E009ECDC 27A40018 */  addiu     $a0, $sp, 0x18
/* 3A0C00 E009ECE0 96A50000 */  lhu       $a1, 0x0($s5)
/* 3A0C04 E009ECE4 8EC20000 */  lw        $v0, 0x0($s6)
/* 3A0C08 E009ECE8 00052980 */  sll       $a1, $a1, 6
/* 3A0C0C E009ECEC 00B32821 */  addu      $a1, $a1, $s3
/* 3A0C10 E009ECF0 0C080118 */  jal       shim_guMtxF2L
/* 3A0C14 E009ECF4 00452821 */   addu     $a1, $v0, $a1
/* 3A0C18 E009ECF8 8E440000 */  lw        $a0, 0x0($s2)
/* 3A0C1C E009ECFC 96A30000 */  lhu       $v1, 0x0($s5)
/* 3A0C20 E009ED00 0080282D */  daddu     $a1, $a0, $zero
/* 3A0C24 E009ED04 24840008 */  addiu     $a0, $a0, 0x8
/* 3A0C28 E009ED08 3C0DDA38 */  lui       $t5, (0xDA380000 >> 16)
/* 3A0C2C E009ED0C 24620001 */  addiu     $v0, $v1, 0x1
/* 3A0C30 E009ED10 3063FFFF */  andi      $v1, $v1, 0xFFFF
/* 3A0C34 E009ED14 00031980 */  sll       $v1, $v1, 6
/* 3A0C38 E009ED18 AE440000 */  sw        $a0, 0x0($s2)
/* 3A0C3C E009ED1C ACAD0000 */  sw        $t5, 0x0($a1)
/* 3A0C40 E009ED20 A6A20000 */  sh        $v0, 0x0($s5)
/* 3A0C44 E009ED24 8EC20000 */  lw        $v0, 0x0($s6)
/* 3A0C48 E009ED28 00731821 */  addu      $v1, $v1, $s3
/* 3A0C4C E009ED2C 00431021 */  addu      $v0, $v0, $v1
/* 3A0C50 E009ED30 ACA20004 */  sw        $v0, 0x4($a1)
/* 3A0C54 E009ED34 24820008 */  addiu     $v0, $a0, 0x8
/* 3A0C58 E009ED38 3C0DDE00 */  lui       $t5, (0xDE000000 >> 16)
/* 3A0C5C E009ED3C AE420000 */  sw        $v0, 0x0($s2)
/* 3A0C60 E009ED40 24820010 */  addiu     $v0, $a0, 0x10
/* 3A0C64 E009ED44 AC8D0000 */  sw        $t5, 0x0($a0)
/* 3A0C68 E009ED48 3C03E00A */  lui       $v1, (0xE00A0000 >> 16)
/* 3A0C6C E009ED4C 8C63EDF0 */  lw        $v1, -0x1210($v1)
/* 3A0C70 E009ED50 240D0040 */  addiu     $t5, $zero, 0x40
/* 3A0C74 E009ED54 AE420000 */  sw        $v0, 0x0($s2)
/* 3A0C78 E009ED58 AC9E0008 */  sw        $fp, 0x8($a0)
/* 3A0C7C E009ED5C AC8D000C */  sw        $t5, 0xC($a0)
/* 3A0C80 E009ED60 AC830004 */  sw        $v1, 0x4($a0)
/* 3A0C84 E009ED64 2694000A */  addiu     $s4, $s4, 0xA
.LE009ED68:
/* 3A0C88 E009ED68 8FAD0130 */  lw        $t5, 0x130($sp)
/* 3A0C8C E009ED6C 26F70001 */  addiu     $s7, $s7, 0x1
/* 3A0C90 E009ED70 8DA20008 */  lw        $v0, 0x8($t5)
/* 3A0C94 E009ED74 02E2102A */  slt       $v0, $s7, $v0
/* 3A0C98 E009ED78 1440FE72 */  bnez      $v0, .LE009E744
/* 3A0C9C E009ED7C 26310034 */   addiu    $s1, $s1, 0x34
.LE009ED80:
/* 3A0CA0 E009ED80 3C05D838 */  lui       $a1, (0xD8380002 >> 16)
/* 3A0CA4 E009ED84 3C03800A */  lui       $v1, %hi(gMainGfxPos)
/* 3A0CA8 E009ED88 2463A66C */  addiu     $v1, $v1, %lo(gMainGfxPos)
/* 3A0CAC E009ED8C 8C620000 */  lw        $v0, 0x0($v1)
/* 3A0CB0 E009ED90 34A50002 */  ori       $a1, $a1, (0xD8380002 & 0xFFFF)
/* 3A0CB4 E009ED94 0040202D */  daddu     $a0, $v0, $zero
/* 3A0CB8 E009ED98 24420008 */  addiu     $v0, $v0, 0x8
/* 3A0CBC E009ED9C AC620000 */  sw        $v0, 0x0($v1)
/* 3A0CC0 E009EDA0 24020040 */  addiu     $v0, $zero, 0x40
/* 3A0CC4 E009EDA4 AC850000 */  sw        $a1, 0x0($a0)
/* 3A0CC8 E009EDA8 AC820004 */  sw        $v0, 0x4($a0)
/* 3A0CCC E009EDAC 8FBF0104 */  lw        $ra, 0x104($sp)
/* 3A0CD0 E009EDB0 8FBE0100 */  lw        $fp, 0x100($sp)
/* 3A0CD4 E009EDB4 8FB700FC */  lw        $s7, 0xFC($sp)
/* 3A0CD8 E009EDB8 8FB600F8 */  lw        $s6, 0xF8($sp)
/* 3A0CDC E009EDBC 8FB500F4 */  lw        $s5, 0xF4($sp)
/* 3A0CE0 E009EDC0 8FB400F0 */  lw        $s4, 0xF0($sp)
/* 3A0CE4 E009EDC4 8FB300EC */  lw        $s3, 0xEC($sp)
/* 3A0CE8 E009EDC8 8FB200E8 */  lw        $s2, 0xE8($sp)
/* 3A0CEC E009EDCC 8FB100E4 */  lw        $s1, 0xE4($sp)
/* 3A0CF0 E009EDD0 8FB000E0 */  lw        $s0, 0xE0($sp)
/* 3A0CF4 E009EDD4 D7BC0128 */  ldc1      $f28, 0x128($sp)
/* 3A0CF8 E009EDD8 D7BA0120 */  ldc1      $f26, 0x120($sp)
/* 3A0CFC E009EDDC D7B80118 */  ldc1      $f24, 0x118($sp)
/* 3A0D00 E009EDE0 D7B60110 */  ldc1      $f22, 0x110($sp)
/* 3A0D04 E009EDE4 D7B40108 */  ldc1      $f20, 0x108($sp)
/* 3A0D08 E009EDE8 03E00008 */  jr        $ra
/* 3A0D0C E009EDEC 27BD0130 */   addiu    $sp, $sp, 0x130

### DECOMPILED C INSTRUCTIONS:

void radiating_energy_orb_appendGfx(void* effect) {
    RadiatingEnergyOrbFXData* part = ((EffectInstance*)effect)->data.radiatingEnergyOrb;
    Camera* camera = &gCameras[gCurrentCameraID];
    s32 unk_1C = part->unk_1C;
    s32 unk_14 = part->unk_14;
    s32 temp_s2 = unk_1C & 1;
    Matrix4f sp18;
    Matrix4f sp58;
    Matrix4f unused;
    s32 i;

    if (temp_s2) {
        unk_14 *= 0.95;
    }

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

    shim_guTranslateF(sp18, part->unk_08, part->unk_0C, part->unk_10);
    shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
    gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
    gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 64, 64, unk_14);

    shim_guRotateF(sp18, temp_s2 * 2 + unk_1C, 0.0f, 0.0f, 1.0f);
    shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
    gSPDisplayList(gMainGfxPos++, D_090012A8_3A2008);
    gSPDisplayList(gMainGfxPos++, D_09001510_3A2270);
    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    gSPDisplayList(gMainGfxPos++, D_09001200_3A1F60);

    part++;
    for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
        f32 scale = part->unk_28;

        if (scale != 0.0f) {
            gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, (part->unk_14 * unk_14) >> 8);
            gDPSetCombineMode(gMainGfxPos++, PM_CC_07, PM_CC_07);

            shim_guRotateF(sp18, part->unk_20, 0.0f, 0.0f, 1.0f);
            shim_guTranslateF(sp58, part->unk_2C, 0.0f, 0.0f);
            shim_guMtxCatF(sp58, sp18, sp18);
            shim_guScaleF(sp58, scale, scale, scale);
            shim_guMtxCatF(sp58, sp18, sp18);
            shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

            gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
            gSPDisplayList(gMainGfxPos++, D_E009EDFC[0]);
            gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);

            shim_guRotateF(sp18, part->unk_20, 0.0f, 0.0f, 1.0f);
            shim_guTranslateF(sp58, part->unk_2C + 5.0f, 0.0f, 0.0f);
            shim_guMtxCatF(sp58, sp18, sp18);
            shim_guScaleF(sp58, 2.3 - scale, 2.3 - scale, 2.3 - scale);
            shim_guMtxCatF(sp58, sp18, sp18);
            shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

            gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
            gSPDisplayList(gMainGfxPos++, D_E009EDF8[0]);
            gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
            gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 0, 255, (part->unk_14 * unk_14) >> 9);
            gDPSetEnvColor(gMainGfxPos++, 255, 128, 255, 0);
            gDPSetCombineLERP(gMainGfxPos++, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0);

            shim_guRotateF(sp18, part->unk_20 + 14.0f, 0.0f, 0.0f, 1.0f);
            shim_guRotateF(sp58, (i * 10) % 45 + unk_1C, 0.0f, 1.0f, 0.0f);
            shim_guMtxCatF(sp58, sp18, sp18);
            shim_guTranslateF(sp58, 20.0f, 0.0f, 0.0f);
            shim_guMtxCatF(sp58, sp18, sp18);
            shim_guScaleF(sp58, (part->unk_2C - 60.0f) * 0.05 + 1.0, 2.0 - (part->unk_2C - 60.0f) * 0.05, 1.0f);
            shim_guMtxCatF(sp58, sp18, sp18);
            shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

            gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
            gSPDisplayList(gMainGfxPos++, D_E009EDF4[0]);
            gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
            gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 64, 64, (part->unk_14 * unk_14) >> 8);

            shim_guRotateF(sp18, part->unk_20 + 34.0f + unk_1C, 0.0f, 0.0f, 1.0f);
            shim_guRotateF(sp58, i * 35, 0.0f, 1.0f, 0.0f);
            shim_guMtxCatF(sp58, sp18, sp18);
            shim_guTranslateF(sp58, 15.0f, 0.0f, 0.0f);
            shim_guMtxCatF(sp58, sp18, sp18);
            shim_guScaleF(sp58, (part->unk_2C - 60.0f) * 0.1 + 2.0, 1.0f, 1.0f);
            shim_guMtxCatF(sp58, sp18, sp18);
            shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

            gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
            gSPDisplayList(gMainGfxPos++, D_E009EDF0[0]);
            gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
        }
    }

    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}


### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_802A4A54_7AC3F4
/* 4197E4 802A4A54 3C02802B */  lui       $v0, %hi(BattleSubmenuStratsState)
/* 4197E8 802A4A58 9042D604 */  lbu       $v0, %lo(BattleSubmenuStratsState)($v0)
/* 4197EC 802A4A5C 27BDFFC0 */  addiu     $sp, $sp, -0x40
/* 4197F0 802A4A60 AFB20030 */  sw        $s2, 0x30($sp)
/* 4197F4 802A4A64 3C12800E */  lui       $s2, %hi(gBattleStatus)
/* 4197F8 802A4A68 2652C070 */  addiu     $s2, $s2, %lo(gBattleStatus)
/* 4197FC 802A4A6C AFBF0038 */  sw        $ra, 0x38($sp)
/* 419800 802A4A70 AFB30034 */  sw        $s3, 0x34($sp)
/* 419804 802A4A74 AFB1002C */  sw        $s1, 0x2C($sp)
/* 419808 802A4A78 24420002 */  addiu     $v0, $v0, 0x2
/* 41980C 802A4A7C 00021600 */  sll       $v0, $v0, 24
/* 419810 802A4A80 00021E03 */  sra       $v1, $v0, 24
/* 419814 802A4A84 2C62002D */  sltiu     $v0, $v1, 0x2D
/* 419818 802A4A88 104001F9 */  beqz      $v0, .L802A5270_7ACC10
/* 41981C 802A4A8C AFB00028 */   sw       $s0, 0x28($sp)
/* 419820 802A4A90 00031080 */  sll       $v0, $v1, 2
/* 419824 802A4A94 3C01802B */  lui       $at, %hi(jtbl_802AB9F0_7B3390)
/* 419828 802A4A98 00220821 */  addu      $at, $at, $v0
/* 41982C 802A4A9C 8C22B9F0 */  lw        $v0, %lo(jtbl_802AB9F0_7B3390)($at)
/* 419830 802A4AA0 00400008 */  jr        $v0
/* 419834 802A4AA4 00000000 */   nop
glabel .L802A4AA8_7AC448
/* 419838 802A4AA8 3C05802B */  lui       $a1, %hi(D_802AD608)
/* 41983C 802A4AAC 80A5D608 */  lb        $a1, %lo(D_802AD608)($a1)
/* 419840 802A4AB0 3C04802B */  lui       $a0, %hi(D_802AD605)
/* 419844 802A4AB4 8084D605 */  lb        $a0, %lo(D_802AD605)($a0)
/* 419848 802A4AB8 24020014 */  addiu     $v0, $zero, 0x14
/* 41984C 802A4ABC 3C01802B */  lui       $at, %hi(D_802AD63C)
/* 419850 802A4AC0 A422D63C */  sh        $v0, %lo(D_802AD63C)($at)
/* 419854 802A4AC4 24020044 */  addiu     $v0, $zero, 0x44
/* 419858 802A4AC8 3C01802B */  lui       $at, %hi(D_802AD63E)
/* 41985C 802A4ACC A422D63E */  sh        $v0, %lo(D_802AD63E)($at)
/* 419860 802A4AD0 00051823 */  negu      $v1, $a1
/* 419864 802A4AD4 00031040 */  sll       $v0, $v1, 1
/* 419868 802A4AD8 00431021 */  addu      $v0, $v0, $v1
/* 41986C 802A4ADC 00021080 */  sll       $v0, $v0, 2
/* 419870 802A4AE0 00431021 */  addu      $v0, $v0, $v1
/* 419874 802A4AE4 00852023 */  subu      $a0, $a0, $a1
/* 419878 802A4AE8 3C01802B */  lui       $at, %hi(D_802AD60C)
/* 41987C 802A4AEC A422D60C */  sh        $v0, %lo(D_802AD60C)($at)
/* 419880 802A4AF0 00041040 */  sll       $v0, $a0, 1
/* 419884 802A4AF4 00441021 */  addu      $v0, $v0, $a0
/* 419888 802A4AF8 00021080 */  sll       $v0, $v0, 2
/* 41988C 802A4AFC 3C03802B */  lui       $v1, %hi(D_802AD66C)
/* 419890 802A4B00 8C63D66C */  lw        $v1, %lo(D_802AD66C)($v1)
/* 419894 802A4B04 00441021 */  addu      $v0, $v0, $a0
/* 419898 802A4B08 3C01802B */  lui       $at, %hi(D_802AD60E)
/* 41989C 802A4B0C A422D60E */  sh        $v0, %lo(D_802AD60E)($at)
/* 4198A0 802A4B10 18600017 */  blez      $v1, .L802A4B70_7AC510
/* 4198A4 802A4B14 0000882D */   daddu    $s1, $zero, $zero
/* 4198A8 802A4B18 3C13802B */  lui       $s3, %hi(D_802AD628)
/* 4198AC 802A4B1C 2673D628 */  addiu     $s3, $s3, %lo(D_802AD628)
/* 4198B0 802A4B20 3C10802B */  lui       $s0, %hi(D_802AD640)
/* 4198B4 802A4B24 2610D640 */  addiu     $s0, $s0, %lo(D_802AD640)
.L802A4B28_7AC4C8:
/* 4198B8 802A4B28 8E040000 */  lw        $a0, 0x0($s0)
/* 4198BC 802A4B2C 26100004 */  addiu     $s0, $s0, 0x4
/* 4198C0 802A4B30 0C050529 */  jal       hud_element_create
/* 4198C4 802A4B34 26310001 */   addiu    $s1, $s1, 0x1
/* 4198C8 802A4B38 0040902D */  daddu     $s2, $v0, $zero
/* 4198CC 802A4B3C 3C053EE6 */  lui       $a1, (0x3EE66666 >> 16)
/* 4198D0 802A4B40 34A56666 */  ori       $a1, $a1, (0x3EE66666 & 0xFFFF)
/* 4198D4 802A4B44 0240202D */  daddu     $a0, $s2, $zero
/* 4198D8 802A4B48 0C051308 */  jal       hud_element_set_scale
/* 4198DC 802A4B4C AE720000 */   sw       $s2, 0x0($s3)
/* 4198E0 802A4B50 0240202D */  daddu     $a0, $s2, $zero
/* 4198E4 802A4B54 0C051280 */  jal       hud_element_set_flags
/* 4198E8 802A4B58 34058080 */   ori      $a1, $zero, 0x8080
/* 4198EC 802A4B5C 3C02802B */  lui       $v0, %hi(D_802AD66C)
/* 4198F0 802A4B60 8C42D66C */  lw        $v0, %lo(D_802AD66C)($v0)
/* 4198F4 802A4B64 0222102A */  slt       $v0, $s1, $v0
/* 4198F8 802A4B68 1440FFEF */  bnez      $v0, .L802A4B28_7AC4C8
/* 4198FC 802A4B6C 26730004 */   addiu    $s3, $s3, 0x4
.L802A4B70_7AC510:
/* 419900 802A4B70 3C048010 */  lui       $a0, %hi(HES_AnimatedHandPointer)
/* 419904 802A4B74 24844A28 */  addiu     $a0, $a0, %lo(HES_AnimatedHandPointer)
/* 419908 802A4B78 0C050529 */  jal       hud_element_create
/* 41990C 802A4B7C 00000000 */   nop
/* 419910 802A4B80 0040902D */  daddu     $s2, $v0, $zero
/* 419914 802A4B84 0240202D */  daddu     $a0, $s2, $zero
/* 419918 802A4B88 3C052000 */  lui       $a1, (0x20000080 >> 16)
/* 41991C 802A4B8C 3C01802B */  lui       $at, %hi(D_802AD618)
/* 419920 802A4B90 AC32D618 */  sw        $s2, %lo(D_802AD618)($at)
/* 419924 802A4B94 0C051280 */  jal       hud_element_set_flags
/* 419928 802A4B98 34A50080 */   ori      $a1, $a1, (0x20000080 & 0xFFFF)
/* 41992C 802A4B9C 3C10802B */  lui       $s0, %hi(D_802AD63C)
/* 419930 802A4BA0 2610D63C */  addiu     $s0, $s0, %lo(D_802AD63C)
/* 419934 802A4BA4 3C11802B */  lui       $s1, %hi(D_802AD63E)
/* 419938 802A4BA8 2631D63E */  addiu     $s1, $s1, %lo(D_802AD63E)
/* 41993C 802A4BAC 86050000 */  lh        $a1, 0x0($s0)
/* 419940 802A4BB0 86260000 */  lh        $a2, 0x0($s1)
/* 419944 802A4BB4 0C051261 */  jal       hud_element_set_render_pos
/* 419948 802A4BB8 0240202D */   daddu    $a0, $s2, $zero
/* 41994C 802A4BBC 3C048010 */  lui       $a0, %hi(HES_GreenArrowUp)
/* 419950 802A4BC0 248477E4 */  addiu     $a0, $a0, %lo(HES_GreenArrowUp)
/* 419954 802A4BC4 0C050529 */  jal       hud_element_create
/* 419958 802A4BC8 00000000 */   nop
/* 41995C 802A4BCC 0040902D */  daddu     $s2, $v0, $zero
/* 419960 802A4BD0 0240202D */  daddu     $a0, $s2, $zero
/* 419964 802A4BD4 3C052000 */  lui       $a1, (0x20000080 >> 16)
/* 419968 802A4BD8 3C01802B */  lui       $at, %hi(GreenArrowUpID)
/* 41996C 802A4BDC AC32D61C */  sw        $s2, %lo(GreenArrowUpID)($at)
/* 419970 802A4BE0 0C051280 */  jal       hud_element_set_flags
/* 419974 802A4BE4 34A50080 */   ori      $a1, $a1, (0x20000080 & 0xFFFF)
/* 419978 802A4BE8 0240202D */  daddu     $a0, $s2, $zero
/* 41997C 802A4BEC 86050000 */  lh        $a1, 0x0($s0)
/* 419980 802A4BF0 86260000 */  lh        $a2, 0x0($s1)
/* 419984 802A4BF4 24A50027 */  addiu     $a1, $a1, 0x27
/* 419988 802A4BF8 0C051261 */  jal       hud_element_set_render_pos
/* 41998C 802A4BFC 24C6FFF9 */   addiu    $a2, $a2, -0x7
/* 419990 802A4C00 3C048010 */  lui       $a0, %hi(HES_GreenArrowDown)
/* 419994 802A4C04 24847798 */  addiu     $a0, $a0, %lo(HES_GreenArrowDown)
/* 419998 802A4C08 0C050529 */  jal       hud_element_create
/* 41999C 802A4C0C 00000000 */   nop
/* 4199A0 802A4C10 0040902D */  daddu     $s2, $v0, $zero
/* 4199A4 802A4C14 0240202D */  daddu     $a0, $s2, $zero
/* 4199A8 802A4C18 3C052000 */  lui       $a1, (0x20000080 >> 16)
/* 4199AC 802A4C1C 3C01802B */  lui       $at, %hi(GreenArrowDownID)
/* 4199B0 802A4C20 AC32D620 */  sw        $s2, %lo(GreenArrowDownID)($at)
/* 4199B4 802A4C24 0C051280 */  jal       hud_element_set_flags
/* 4199B8 802A4C28 34A50080 */   ori      $a1, $a1, (0x20000080 & 0xFFFF)
/* 4199BC 802A4C2C 0240202D */  daddu     $a0, $s2, $zero
/* 4199C0 802A4C30 86050000 */  lh        $a1, 0x0($s0)
/* 4199C4 802A4C34 86260000 */  lh        $a2, 0x0($s1)
/* 4199C8 802A4C38 24A50027 */  addiu     $a1, $a1, 0x27
/* 4199CC 802A4C3C 0C051261 */  jal       hud_element_set_render_pos
/* 4199D0 802A4C40 24C6004E */   addiu    $a2, $a2, 0x4E
/* 4199D4 802A4C44 24040006 */  addiu     $a0, $zero, 0x6
/* 4199D8 802A4C48 24070090 */  addiu     $a3, $zero, 0x90
/* 4199DC 802A4C4C 86130000 */  lh        $s3, 0x0($s0)
/* 4199E0 802A4C50 2402000A */  addiu     $v0, $zero, 0xA
/* 4199E4 802A4C54 3C01802B */  lui       $at, %hi(D_802AD614)
/* 4199E8 802A4C58 A022D614 */  sb        $v0, %lo(D_802AD614)($at)
/* 4199EC 802A4C5C 3C02802A */  lui       $v0, %hi(func_802A5290_7ACC30)
/* 4199F0 802A4C60 24425290 */  addiu     $v0, $v0, %lo(func_802A5290_7ACC30)
/* 4199F4 802A4C64 2412FFFF */  addiu     $s2, $zero, -0x1
/* 4199F8 802A4C68 AFA00014 */  sw        $zero, 0x14($sp)
/* 4199FC 802A4C6C AFA20018 */  sw        $v0, 0x18($sp)
/* 419A00 802A4C70 AFA0001C */  sw        $zero, 0x1C($sp)
/* 419A04 802A4C74 AFB20020 */  sw        $s2, 0x20($sp)
/* 419A08 802A4C78 86300000 */  lh        $s0, 0x0($s1)
/* 419A0C 802A4C7C 3C03802B */  lui       $v1, %hi(D_802AD60A)
/* 419A10 802A4C80 8063D60A */  lb        $v1, %lo(D_802AD60A)($v1)
/* 419A14 802A4C84 0260282D */  daddu     $a1, $s3, $zero
/* 419A18 802A4C88 0200302D */  daddu     $a2, $s0, $zero
/* 419A1C 802A4C8C 00031040 */  sll       $v0, $v1, 1
/* 419A20 802A4C90 00431021 */  addu      $v0, $v0, $v1
/* 419A24 802A4C94 00021080 */  sll       $v0, $v0, 2
/* 419A28 802A4C98 00431021 */  addu      $v0, $v0, $v1
/* 419A2C 802A4C9C 2442001A */  addiu     $v0, $v0, 0x1A
/* 419A30 802A4CA0 0C051F32 */  jal       set_window_properties
/* 419A34 802A4CA4 AFA20010 */   sw       $v0, 0x10($sp)
/* 419A38 802A4CA8 24040007 */  addiu     $a0, $zero, 0x7
/* 419A3C 802A4CAC 26650012 */  addiu     $a1, $s3, 0x12
/* 419A40 802A4CB0 2606FFFA */  addiu     $a2, $s0, -0x6
/* 419A44 802A4CB4 2407006C */  addiu     $a3, $zero, 0x6C
/* 419A48 802A4CB8 24020010 */  addiu     $v0, $zero, 0x10
/* 419A4C 802A4CBC 24100001 */  addiu     $s0, $zero, 0x1
/* 419A50 802A4CC0 AFA20010 */  sw        $v0, 0x10($sp)
/* 419A54 802A4CC4 3C02802A */  lui       $v0, %hi(func_802A56F8_7AD098)
/* 419A58 802A4CC8 244256F8 */  addiu     $v0, $v0, %lo(func_802A56F8_7AD098)
/* 419A5C 802A4CCC AFB00014 */  sw        $s0, 0x14($sp)
/* 419A60 802A4CD0 AFA20018 */  sw        $v0, 0x18($sp)
/* 419A64 802A4CD4 AFA0001C */  sw        $zero, 0x1C($sp)
/* 419A68 802A4CD8 0C051F32 */  jal       set_window_properties
/* 419A6C 802A4CDC AFB20020 */   sw       $s2, 0x20($sp)
/* 419A70 802A4CE0 24130014 */  addiu     $s3, $zero, 0x14
/* 419A74 802A4CE4 24040008 */  addiu     $a0, $zero, 0x8
/* 419A78 802A4CE8 0260282D */  daddu     $a1, $s3, $zero
/* 419A7C 802A4CEC 240600BA */  addiu     $a2, $zero, 0xBA
/* 419A80 802A4CF0 24070118 */  addiu     $a3, $zero, 0x118
/* 419A84 802A4CF4 24020020 */  addiu     $v0, $zero, 0x20
/* 419A88 802A4CF8 AFA20010 */  sw        $v0, 0x10($sp)
/* 419A8C 802A4CFC 3C02802A */  lui       $v0, %hi(func_802A5738_7AD0D8)
/* 419A90 802A4D00 24425738 */  addiu     $v0, $v0, %lo(func_802A5738_7AD0D8)
/* 419A94 802A4D04 AFB30014 */  sw        $s3, 0x14($sp)
/* 419A98 802A4D08 AFA20018 */  sw        $v0, 0x18($sp)
/* 419A9C 802A4D0C AFA0001C */  sw        $zero, 0x1C($sp)
/* 419AA0 802A4D10 0C051F32 */  jal       set_window_properties
/* 419AA4 802A4D14 AFB20020 */   sw       $s2, 0x20($sp)
/* 419AA8 802A4D18 24040006 */  addiu     $a0, $zero, 0x6
/* 419AAC 802A4D1C 0C051F9F */  jal       set_window_update
/* 419AB0 802A4D20 0200282D */   daddu    $a1, $s0, $zero
/* 419AB4 802A4D24 24040007 */  addiu     $a0, $zero, 0x7
/* 419AB8 802A4D28 0C051F9F */  jal       set_window_update
/* 419ABC 802A4D2C 0200282D */   daddu    $a1, $s0, $zero
/* 419AC0 802A4D30 24040008 */  addiu     $a0, $zero, 0x8
/* 419AC4 802A4D34 0C051F9F */  jal       set_window_update
/* 419AC8 802A4D38 0200282D */   daddu    $a1, $s0, $zero
/* 419ACC 802A4D3C 3C01802B */  lui       $at, %hi(BattleSubmenuStratsState)
/* 419AD0 802A4D40 A030D604 */  sb        $s0, %lo(BattleSubmenuStratsState)($at)
/* 419AD4 802A4D44 080A949D */  j         .L802A5274_7ACC14
/* 419AD8 802A4D48 0000102D */   daddu    $v0, $zero, $zero
glabel .L802A4D4C_7AC6EC
/* 419ADC 802A4D4C 3C02802B */  lui       $v0, %hi(D_802AD607)
/* 419AE0 802A4D50 8042D607 */  lb        $v0, %lo(D_802AD607)($v0)
/* 419AE4 802A4D54 14400147 */  bnez      $v0, .L802A5274_7ACC14
/* 419AE8 802A4D58 0000102D */   daddu    $v0, $zero, $zero
/* 419AEC 802A4D5C 3C04802B */  lui       $a0, %hi(D_802AD605)
/* 419AF0 802A4D60 2484D605 */  addiu     $a0, $a0, %lo(D_802AD605)
/* 419AF4 802A4D64 3C050001 */  lui       $a1, (0x10000 >> 16)
/* 419AF8 802A4D68 8E420218 */  lw        $v0, 0x218($s2)
/* 419AFC 802A4D6C 90830000 */  lbu       $v1, 0x0($a0)
/* 419B00 802A4D70 00451024 */  and       $v0, $v0, $a1
/* 419B04 802A4D74 3C01802B */  lui       $at, %hi(D_802AD606)
/* 419B08 802A4D78 A023D606 */  sb        $v1, %lo(D_802AD606)($at)
/* 419B0C 802A4D7C 10400008 */  beqz      $v0, .L802A4DA0_7AC740
/* 419B10 802A4D80 00031600 */   sll      $v0, $v1, 24
/* 419B14 802A4D84 1C400005 */  bgtz      $v0, .L802A4D9C_7AC73C
/* 419B18 802A4D88 2462FFFF */   addiu    $v0, $v1, -0x1
/* 419B1C 802A4D8C 8E420214 */  lw        $v0, 0x214($s2)
/* 419B20 802A4D90 00451024 */  and       $v0, $v0, $a1
/* 419B24 802A4D94 10400002 */  beqz      $v0, .L802A4DA0_7AC740
/* 419B28 802A4D98 2462FFFF */   addiu    $v0, $v1, -0x1
.L802A4D9C_7AC73C:
/* 419B2C 802A4D9C A0820000 */  sb        $v0, 0x0($a0)
.L802A4DA0_7AC740:
/* 419B30 802A4DA0 8E420218 */  lw        $v0, 0x218($s2)
/* 419B34 802A4DA4 3C060002 */  lui       $a2, (0x20000 >> 16)
/* 419B38 802A4DA8 00461024 */  and       $v0, $v0, $a2
/* 419B3C 802A4DAC 10400010 */  beqz      $v0, .L802A4DF0_7AC790
/* 419B40 802A4DB0 00000000 */   nop
/* 419B44 802A4DB4 3C05802B */  lui       $a1, %hi(D_802AD605)
/* 419B48 802A4DB8 24A5D605 */  addiu     $a1, $a1, %lo(D_802AD605)
/* 419B4C 802A4DBC 3C02802B */  lui       $v0, %hi(D_802AD66C)
/* 419B50 802A4DC0 8C42D66C */  lw        $v0, %lo(D_802AD66C)($v0)
/* 419B54 802A4DC4 80A30000 */  lb        $v1, 0x0($a1)
/* 419B58 802A4DC8 90A40000 */  lbu       $a0, 0x0($a1)
/* 419B5C 802A4DCC 2442FFFF */  addiu     $v0, $v0, -0x1
/* 419B60 802A4DD0 0062182A */  slt       $v1, $v1, $v0
/* 419B64 802A4DD4 14600005 */  bnez      $v1, .L802A4DEC_7AC78C
/* 419B68 802A4DD8 24820001 */   addiu    $v0, $a0, 0x1
/* 419B6C 802A4DDC 8E420214 */  lw        $v0, 0x214($s2)
/* 419B70 802A4DE0 00461024 */  and       $v0, $v0, $a2
/* 419B74 802A4DE4 10400002 */  beqz      $v0, .L802A4DF0_7AC790
/* 419B78 802A4DE8 24820001 */   addiu    $v0, $a0, 0x1
.L802A4DEC_7AC78C:
/* 419B7C 802A4DEC A0A20000 */  sb        $v0, 0x0($a1)
.L802A4DF0_7AC790:
/* 419B80 802A4DF0 3C10802B */  lui       $s0, %hi(D_802AD605)
/* 419B84 802A4DF4 2610D605 */  addiu     $s0, $s0, %lo(D_802AD605)
/* 419B88 802A4DF8 82020000 */  lb        $v0, 0x0($s0)
/* 419B8C 802A4DFC 04410005 */  bgez      $v0, .L802A4E14_7AC7B4
/* 419B90 802A4E00 00000000 */   nop
/* 419B94 802A4E04 3C02802B */  lui       $v0, %hi(D_802AD66F)
/* 419B98 802A4E08 9042D66F */  lbu       $v0, %lo(D_802AD66F)($v0)
/* 419B9C 802A4E0C 2442FFFF */  addiu     $v0, $v0, -0x1
/* 419BA0 802A4E10 A2020000 */  sb        $v0, 0x0($s0)
.L802A4E14_7AC7B4:
/* 419BA4 802A4E14 3C11802B */  lui       $s1, %hi(D_802AD66C)
/* 419BA8 802A4E18 2631D66C */  addiu     $s1, $s1, %lo(D_802AD66C)
/* 419BAC 802A4E1C 8E220000 */  lw        $v0, 0x0($s1)
/* 419BB0 802A4E20 82030000 */  lb        $v1, 0x0($s0)
/* 419BB4 802A4E24 2442FFFF */  addiu     $v0, $v0, -0x1
/* 419BB8 802A4E28 0043102A */  slt       $v0, $v0, $v1
/* 419BBC 802A4E2C 54400001 */  bnel      $v0, $zero, .L802A4E34_7AC7D4
/* 419BC0 802A4E30 A2000000 */   sb       $zero, 0x0($s0)
.L802A4E34_7AC7D4:
/* 419BC4 802A4E34 3C03802B */  lui       $v1, %hi(D_802AD606)
/* 419BC8 802A4E38 8063D606 */  lb        $v1, %lo(D_802AD606)($v1)
/* 419BCC 802A4E3C 82020000 */  lb        $v0, 0x0($s0)
/* 419BD0 802A4E40 10620009 */  beq       $v1, $v0, .L802A4E68_7AC808
/* 419BD4 802A4E44 00031080 */   sll      $v0, $v1, 2
/* 419BD8 802A4E48 3C04802B */  lui       $a0, %hi(D_802AD628)
/* 419BDC 802A4E4C 00822021 */  addu      $a0, $a0, $v0
/* 419BE0 802A4E50 8C84D628 */  lw        $a0, %lo(D_802AD628)($a0)
/* 419BE4 802A4E54 3C053EE6 */  lui       $a1, (0x3EE66666 >> 16)
/* 419BE8 802A4E58 0C051308 */  jal       hud_element_set_scale
/* 419BEC 802A4E5C 34A56666 */   ori      $a1, $a1, (0x3EE66666 & 0xFFFF)
/* 419BF0 802A4E60 0C05272D */  jal       sfx_play_sound
/* 419BF4 802A4E64 240400C7 */   addiu    $a0, $zero, 0xC7
.L802A4E68_7AC808:
/* 419BF8 802A4E68 3C04802B */  lui       $a0, %hi(D_802AD608)
/* 419BFC 802A4E6C 2484D608 */  addiu     $a0, $a0, %lo(D_802AD608)
/* 419C00 802A4E70 82050000 */  lb        $a1, 0x0($s0)
/* 419C04 802A4E74 80820000 */  lb        $v0, 0x0($a0)
/* 419C08 802A4E78 92030000 */  lbu       $v1, 0x0($s0)
/* 419C0C 802A4E7C 00A2102A */  slt       $v0, $a1, $v0
/* 419C10 802A4E80 54400001 */  bnel      $v0, $zero, .L802A4E88_7AC828
/* 419C14 802A4E84 A0830000 */   sb       $v1, 0x0($a0)
.L802A4E88_7AC828:
/* 419C18 802A4E88 3C06802B */  lui       $a2, %hi(D_802AD609)
/* 419C1C 802A4E8C 24C6D609 */  addiu     $a2, $a2, %lo(D_802AD609)
/* 419C20 802A4E90 80C20000 */  lb        $v0, 0x0($a2)
/* 419C24 802A4E94 00A2102A */  slt       $v0, $a1, $v0
/* 419C28 802A4E98 14400006 */  bnez      $v0, .L802A4EB4_7AC854
/* 419C2C 802A4E9C 00000000 */   nop
/* 419C30 802A4EA0 3C02802B */  lui       $v0, %hi(D_802AD60A)
/* 419C34 802A4EA4 9042D60A */  lbu       $v0, %lo(D_802AD60A)($v0)
/* 419C38 802A4EA8 2442FFFF */  addiu     $v0, $v0, -0x1
/* 419C3C 802A4EAC 00621023 */  subu      $v0, $v1, $v0
/* 419C40 802A4EB0 A0820000 */  sb        $v0, 0x0($a0)
.L802A4EB4_7AC854:
/* 419C44 802A4EB4 90820000 */  lbu       $v0, 0x0($a0)
/* 419C48 802A4EB8 24420006 */  addiu     $v0, $v0, 0x6
/* 419C4C 802A4EBC A0C20000 */  sb        $v0, 0x0($a2)
/* 419C50 802A4EC0 00021600 */  sll       $v0, $v0, 24
/* 419C54 802A4EC4 8E230000 */  lw        $v1, 0x0($s1)
/* 419C58 802A4EC8 00021603 */  sra       $v0, $v0, 24
/* 419C5C 802A4ECC 0062182A */  slt       $v1, $v1, $v0
/* 419C60 802A4ED0 10600003 */  beqz      $v1, .L802A4EE0_7AC880
/* 419C64 802A4ED4 00000000 */   nop
/* 419C68 802A4ED8 92220003 */  lbu       $v0, 0x3($s1)
/* 419C6C 802A4EDC A0C20000 */  sb        $v0, 0x0($a2)
.L802A4EE0_7AC880:
/* 419C70 802A4EE0 8E430214 */  lw        $v1, 0x214($s2)
/* 419C74 802A4EE4 30628000 */  andi      $v0, $v1, 0x8000
/* 419C78 802A4EE8 10400019 */  beqz      $v0, .L802A4F50_7AC8F0
/* 419C7C 802A4EEC 00051080 */   sll      $v0, $a1, 2
/* 419C80 802A4EF0 3C03802B */  lui       $v1, %hi(D_802AD690)
/* 419C84 802A4EF4 00621821 */  addu      $v1, $v1, $v0
/* 419C88 802A4EF8 8C63D690 */  lw        $v1, %lo(D_802AD690)($v1)
/* 419C8C 802A4EFC 24020001 */  addiu     $v0, $zero, 0x1
/* 419C90 802A4F00 14620005 */  bne       $v1, $v0, .L802A4F18_7AC8B8
/* 419C94 802A4F04 00000000 */   nop
/* 419C98 802A4F08 0C05272D */  jal       sfx_play_sound
/* 419C9C 802A4F0C 240400C9 */   addiu    $a0, $zero, 0xC9
/* 419CA0 802A4F10 080A949A */  j         .L802A5268_7ACC08
/* 419CA4 802A4F14 2402FFFF */   addiu    $v0, $zero, -0x1
.L802A4F18_7AC8B8:
/* 419CA8 802A4F18 0C05272D */  jal       sfx_play_sound
/* 419CAC 802A4F1C 2404021D */   addiu    $a0, $zero, 0x21D
/* 419CB0 802A4F20 82020000 */  lb        $v0, 0x0($s0)
/* 419CB4 802A4F24 00021080 */  sll       $v0, $v0, 2
/* 419CB8 802A4F28 3C03802B */  lui       $v1, %hi(D_802AD6AA)
/* 419CBC 802A4F2C 00621821 */  addu      $v1, $v1, $v0
/* 419CC0 802A4F30 9463D6AA */  lhu       $v1, %lo(D_802AD6AA)($v1)
/* 419CC4 802A4F34 24020028 */  addiu     $v0, $zero, 0x28
/* 419CC8 802A4F38 3C01802B */  lui       $at, %hi(BattleSubmenuStratsState)
/* 419CCC 802A4F3C A022D604 */  sb        $v0, %lo(BattleSubmenuStratsState)($at)
/* 419CD0 802A4F40 3C01802B */  lui       $at, %hi(D_802AD610)
/* 419CD4 802A4F44 A423D610 */  sh        $v1, %lo(D_802AD610)($at)
/* 419CD8 802A4F48 080A949D */  j         .L802A5274_7ACC14
/* 419CDC 802A4F4C 0000102D */   daddu    $v0, $zero, $zero
.L802A4F50_7AC8F0:
/* 419CE0 802A4F50 30624000 */  andi      $v0, $v1, 0x4000
/* 419CE4 802A4F54 104000C7 */  beqz      $v0, .L802A5274_7ACC14
/* 419CE8 802A4F58 0000102D */   daddu    $v0, $zero, $zero
/* 419CEC 802A4F5C 0C05272D */  jal       sfx_play_sound
/* 419CF0 802A4F60 240400CA */   addiu    $a0, $zero, 0xCA
/* 419CF4 802A4F64 0C0A91CB */  jal       func_802A472C_7AC0CC
/* 419CF8 802A4F68 00000000 */   nop
/* 419CFC 802A4F6C 080A949A */  j         .L802A5268_7ACC08
/* 419D00 802A4F70 2402FFFE */   addiu    $v0, $zero, -0x2
glabel .L802A4F74_7AC914
/* 419D04 802A4F74 3C02802B */  lui       $v0, %hi(D_802AD66C)
/* 419D08 802A4F78 8C42D66C */  lw        $v0, %lo(D_802AD66C)($v0)
/* 419D0C 802A4F7C 1840000F */  blez      $v0, .L802A4FBC_7AC95C
/* 419D10 802A4F80 0000882D */   daddu    $s1, $zero, $zero
/* 419D14 802A4F84 3C10802B */  lui       $s0, %hi(D_802AD628)
/* 419D18 802A4F88 2610D628 */  addiu     $s0, $s0, %lo(D_802AD628)
/* 419D1C 802A4F8C 240500A0 */  addiu     $a1, $zero, 0xA0
.L802A4F90_7AC930:
/* 419D20 802A4F90 00A0302D */  daddu     $a2, $a1, $zero
/* 419D24 802A4F94 00A0382D */  daddu     $a3, $a1, $zero
/* 419D28 802A4F98 8E040000 */  lw        $a0, 0x0($s0)
/* 419D2C 802A4F9C 0C0513BF */  jal       hud_element_set_tint
/* 419D30 802A4FA0 26100004 */   addiu    $s0, $s0, 0x4
/* 419D34 802A4FA4 3C02802B */  lui       $v0, %hi(D_802AD66C)
/* 419D38 802A4FA8 8C42D66C */  lw        $v0, %lo(D_802AD66C)($v0)
/* 419D3C 802A4FAC 26310001 */  addiu     $s1, $s1, 0x1
/* 419D40 802A4FB0 0222102A */  slt       $v0, $s1, $v0
/* 419D44 802A4FB4 1440FFF6 */  bnez      $v0, .L802A4F90_7AC930
/* 419D48 802A4FB8 240500A0 */   addiu    $a1, $zero, 0xA0
.L802A4FBC_7AC95C:
/* 419D4C 802A4FBC 240500A0 */  addiu     $a1, $zero, 0xA0
/* 419D50 802A4FC0 00A0302D */  daddu     $a2, $a1, $zero
/* 419D54 802A4FC4 3C10802B */  lui       $s0, %hi(D_802AD618)
/* 419D58 802A4FC8 2610D618 */  addiu     $s0, $s0, %lo(D_802AD618)
/* 419D5C 802A4FCC 8E040000 */  lw        $a0, 0x0($s0)
/* 419D60 802A4FD0 0C0513BF */  jal       hud_element_set_tint
/* 419D64 802A4FD4 00A0382D */   daddu    $a3, $a1, $zero
/* 419D68 802A4FD8 240500A0 */  addiu     $a1, $zero, 0xA0
/* 419D6C 802A4FDC 00A0302D */  daddu     $a2, $a1, $zero
/* 419D70 802A4FE0 3C04802B */  lui       $a0, %hi(GreenArrowUpID)
/* 419D74 802A4FE4 8C84D61C */  lw        $a0, %lo(GreenArrowUpID)($a0)
/* 419D78 802A4FE8 0C0513BF */  jal       hud_element_set_tint
/* 419D7C 802A4FEC 00A0382D */   daddu    $a3, $a1, $zero
/* 419D80 802A4FF0 240500A0 */  addiu     $a1, $zero, 0xA0
/* 419D84 802A4FF4 00A0302D */  daddu     $a2, $a1, $zero
/* 419D88 802A4FF8 3C04802B */  lui       $a0, %hi(GreenArrowDownID)
/* 419D8C 802A4FFC 8C84D620 */  lw        $a0, %lo(GreenArrowDownID)($a0)
/* 419D90 802A5000 0C0513BF */  jal       hud_element_set_tint
/* 419D94 802A5004 00A0382D */   daddu    $a3, $a1, $zero
/* 419D98 802A5008 8E040000 */  lw        $a0, 0x0($s0)
/* 419D9C 802A500C 3C058010 */  lui       $a1, %hi(HES_HandPointer)
/* 419DA0 802A5010 24A54A00 */  addiu     $a1, $a1, %lo(HES_HandPointer)
/* 419DA4 802A5014 0C0511FF */  jal       hud_element_set_script
/* 419DA8 802A5018 00000000 */   nop
/* 419DAC 802A501C 24040006 */  addiu     $a0, $zero, 0x6
/* 419DB0 802A5020 2402000D */  addiu     $v0, $zero, 0xD
/* 419DB4 802A5024 3C01802B */  lui       $at, %hi(D_802AD614)
/* 419DB8 802A5028 A022D614 */  sb        $v0, %lo(D_802AD614)($at)
/* 419DBC 802A502C 0C051F9F */  jal       set_window_update
/* 419DC0 802A5030 24050004 */   addiu    $a1, $zero, 0x4
/* 419DC4 802A5034 24040007 */  addiu     $a0, $zero, 0x7
/* 419DC8 802A5038 0C051F9F */  jal       set_window_update
/* 419DCC 802A503C 24050004 */   addiu    $a1, $zero, 0x4
/* 419DD0 802A5040 24040008 */  addiu     $a0, $zero, 0x8
/* 419DD4 802A5044 0C051F9F */  jal       set_window_update
/* 419DD8 802A5048 24050002 */   addiu    $a1, $zero, 0x2
/* 419DDC 802A504C 080A9424 */  j         .L802A5090_7ACA30
/* 419DE0 802A5050 00000000 */   nop
glabel .L802A5054_7AC9F4
/* 419DE4 802A5054 080A949D */  j         .L802A5274_7ACC14
/* 419DE8 802A5058 240200FF */   addiu    $v0, $zero, 0xFF
glabel .L802A505C_7AC9FC
/* 419DEC 802A505C 24040006 */  addiu     $a0, $zero, 0x6
/* 419DF0 802A5060 0C051F9F */  jal       set_window_update
/* 419DF4 802A5064 24050002 */   addiu    $a1, $zero, 0x2
/* 419DF8 802A5068 24040007 */  addiu     $a0, $zero, 0x7
/* 419DFC 802A506C 0C051F9F */  jal       set_window_update
/* 419E00 802A5070 24050002 */   addiu    $a1, $zero, 0x2
/* 419E04 802A5074 24040008 */  addiu     $a0, $zero, 0x8
/* 419E08 802A5078 0C051F9F */  jal       set_window_update
/* 419E0C 802A507C 24050002 */   addiu    $a1, $zero, 0x2
/* 419E10 802A5080 3C02802B */  lui       $v0, %hi(D_802AD605)
/* 419E14 802A5084 8042D605 */  lb        $v0, %lo(D_802AD605)($v0)
/* 419E18 802A5088 080A9434 */  j         .L802A50D0_7ACA70
/* 419E1C 802A508C 2403000B */   addiu    $v1, $zero, 0xB
glabel .L802A5090_7ACA30
/* 419E20 802A5090 3C02802B */  lui       $v0, %hi(D_802AD605)
/* 419E24 802A5094 8042D605 */  lb        $v0, %lo(D_802AD605)($v0)
/* 419E28 802A5098 080A949D */  j         .L802A5274_7ACC14
/* 419E2C 802A509C 24420001 */   addiu    $v0, $v0, 0x1
glabel .L802A50A0_7ACA40
/* 419E30 802A50A0 24040006 */  addiu     $a0, $zero, 0x6
/* 419E34 802A50A4 0C051F9F */  jal       set_window_update
/* 419E38 802A50A8 24050001 */   addiu    $a1, $zero, 0x1
/* 419E3C 802A50AC 24040007 */  addiu     $a0, $zero, 0x7
/* 419E40 802A50B0 0C051F9F */  jal       set_window_update
/* 419E44 802A50B4 24050001 */   addiu    $a1, $zero, 0x1
/* 419E48 802A50B8 24040008 */  addiu     $a0, $zero, 0x8
/* 419E4C 802A50BC 0C051F9F */  jal       set_window_update
/* 419E50 802A50C0 24050001 */   addiu    $a1, $zero, 0x1
/* 419E54 802A50C4 3C02802B */  lui       $v0, %hi(D_802AD605)
/* 419E58 802A50C8 8042D605 */  lb        $v0, %lo(D_802AD605)($v0)
/* 419E5C 802A50CC 24030001 */  addiu     $v1, $zero, 0x1
.L802A50D0_7ACA70:
/* 419E60 802A50D0 3C01802B */  lui       $at, %hi(BattleSubmenuStratsState)
/* 419E64 802A50D4 A023D604 */  sb        $v1, %lo(BattleSubmenuStratsState)($at)
/* 419E68 802A50D8 080A949D */  j         .L802A5274_7ACC14
/* 419E6C 802A50DC 24420001 */   addiu    $v0, $v0, 0x1
glabel .L802A50E0_7ACA80
/* 419E70 802A50E0 24040006 */  addiu     $a0, $zero, 0x6
/* 419E74 802A50E4 0C051F9F */  jal       set_window_update
/* 419E78 802A50E8 24050001 */   addiu    $a1, $zero, 0x1
/* 419E7C 802A50EC 24040007 */  addiu     $a0, $zero, 0x7
/* 419E80 802A50F0 0C051F9F */  jal       set_window_update
/* 419E84 802A50F4 24050001 */   addiu    $a1, $zero, 0x1
/* 419E88 802A50F8 24040008 */  addiu     $a0, $zero, 0x8
/* 419E8C 802A50FC 0C051F9F */  jal       set_window_update
/* 419E90 802A5100 24050001 */   addiu    $a1, $zero, 0x1
/* 419E94 802A5104 080A949A */  j         .L802A5268_7ACC08
/* 419E98 802A5108 2402FFFF */   addiu    $v0, $zero, -0x1
glabel .L802A510C_7ACAAC
/* 419E9C 802A510C 2402FFFF */  addiu     $v0, $zero, -0x1
/* 419EA0 802A5110 0040182D */  daddu     $v1, $v0, $zero
/* 419EA4 802A5114 3C01802B */  lui       $at, %hi(D_802AD6D4)
/* 419EA8 802A5118 AC23D6D4 */  sw        $v1, %lo(D_802AD6D4)($at)
/* 419EAC 802A511C 24030029 */  addiu     $v1, $zero, 0x29
/* 419EB0 802A5120 3C01802B */  lui       $at, %hi(BattleSubmenuStratsState)
/* 419EB4 802A5124 A023D604 */  sb        $v1, %lo(BattleSubmenuStratsState)($at)
/* 419EB8 802A5128 080A949D */  j         .L802A5274_7ACC14
/* 419EBC 802A512C 00000000 */   nop
glabel .L802A5130_7ACAD0
/* 419EC0 802A5130 24040006 */  addiu     $a0, $zero, 0x6
/* 419EC4 802A5134 0C051F9F */  jal       set_window_update
/* 419EC8 802A5138 24050002 */   addiu    $a1, $zero, 0x2
/* 419ECC 802A513C 24040007 */  addiu     $a0, $zero, 0x7
/* 419ED0 802A5140 0C051F9F */  jal       set_window_update
/* 419ED4 802A5144 24050002 */   addiu    $a1, $zero, 0x2
/* 419ED8 802A5148 24040008 */  addiu     $a0, $zero, 0x8
/* 419EDC 802A514C 0C051F9F */  jal       set_window_update
/* 419EE0 802A5150 24050002 */   addiu    $a1, $zero, 0x2
/* 419EE4 802A5154 3C03802B */  lui       $v1, %hi(D_802AD610)
/* 419EE8 802A5158 8463D610 */  lh        $v1, %lo(D_802AD610)($v1)
/* 419EEC 802A515C 14600003 */  bnez      $v1, .L802A516C_7ACB0C
/* 419EF0 802A5160 3C04001D */   lui      $a0, (0x1D00CC >> 16)
/* 419EF4 802A5164 080A945C */  j         .L802A5170_7ACB10
/* 419EF8 802A5168 348400CB */   ori      $a0, $a0, (0x1D00CB & 0xFFFF)
.L802A516C_7ACB0C:
/* 419EFC 802A516C 348400CC */  ori       $a0, $a0, (0x1D00CC & 0xFFFF)
.L802A5170_7ACB10:
/* 419F00 802A5170 0C04991D */  jal       get_msg_width
/* 419F04 802A5174 0000282D */   daddu    $a1, $zero, $zero
/* 419F08 802A5178 24040009 */  addiu     $a0, $zero, 0x9
/* 419F0C 802A517C 24470017 */  addiu     $a3, $v0, 0x17
/* 419F10 802A5180 00072FC2 */  srl       $a1, $a3, 31
/* 419F14 802A5184 00E52821 */  addu      $a1, $a3, $a1
/* 419F18 802A5188 00052843 */  sra       $a1, $a1, 1
/* 419F1C 802A518C 240200A0 */  addiu     $v0, $zero, 0xA0
/* 419F20 802A5190 00452823 */  subu      $a1, $v0, $a1
/* 419F24 802A5194 24060050 */  addiu     $a2, $zero, 0x50
/* 419F28 802A5198 2402001C */  addiu     $v0, $zero, 0x1C
/* 419F2C 802A519C AFA20010 */  sw        $v0, 0x10($sp)
/* 419F30 802A51A0 24020014 */  addiu     $v0, $zero, 0x14
/* 419F34 802A51A4 AFA20014 */  sw        $v0, 0x14($sp)
/* 419F38 802A51A8 3C02802A */  lui       $v0, %hi(func_802A57C8_7AD168)
/* 419F3C 802A51AC 244257C8 */  addiu     $v0, $v0, %lo(func_802A57C8_7AD168)
/* 419F40 802A51B0 AFA20018 */  sw        $v0, 0x18($sp)
/* 419F44 802A51B4 2402FFFF */  addiu     $v0, $zero, -0x1
/* 419F48 802A51B8 AFA0001C */  sw        $zero, 0x1C($sp)
/* 419F4C 802A51BC 0C051F32 */  jal       set_window_properties
/* 419F50 802A51C0 AFA20020 */   sw       $v0, 0x20($sp)
/* 419F54 802A51C4 24040009 */  addiu     $a0, $zero, 0x9
/* 419F58 802A51C8 0C051F9F */  jal       set_window_update
/* 419F5C 802A51CC 24050001 */   addiu    $a1, $zero, 0x1
/* 419F60 802A51D0 2403003C */  addiu     $v1, $zero, 0x3C
/* 419F64 802A51D4 3C01802B */  lui       $at, %hi(D_802AD612)
/* 419F68 802A51D8 A423D612 */  sh        $v1, %lo(D_802AD612)($at)
/* 419F6C 802A51DC 2403002A */  addiu     $v1, $zero, 0x2A
/* 419F70 802A51E0 3C01802B */  lui       $at, %hi(BattleSubmenuStratsState)
/* 419F74 802A51E4 A023D604 */  sb        $v1, %lo(BattleSubmenuStratsState)($at)
/* 419F78 802A51E8 080A949D */  j         .L802A5274_7ACC14
/* 419F7C 802A51EC 2402FFFF */   addiu    $v0, $zero, -0x1
glabel .L802A51F0_7ACB90
/* 419F80 802A51F0 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* 419F84 802A51F4 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* 419F88 802A51F8 8C420010 */  lw        $v0, 0x10($v0)
/* 419F8C 802A51FC 3042C000 */  andi      $v0, $v0, 0xC000
/* 419F90 802A5200 10400003 */  beqz      $v0, .L802A5210_7ACBB0
/* 419F94 802A5204 00000000 */   nop
/* 419F98 802A5208 3C01802B */  lui       $at, %hi(D_802AD612)
/* 419F9C 802A520C A420D612 */  sh        $zero, %lo(D_802AD612)($at)
.L802A5210_7ACBB0:
/* 419FA0 802A5210 3C04802B */  lui       $a0, %hi(D_802AD612)
/* 419FA4 802A5214 2484D612 */  addiu     $a0, $a0, %lo(D_802AD612)
/* 419FA8 802A5218 84820000 */  lh        $v0, 0x0($a0)
/* 419FAC 802A521C 94830000 */  lhu       $v1, 0x0($a0)
/* 419FB0 802A5220 10400004 */  beqz      $v0, .L802A5234_7ACBD4
/* 419FB4 802A5224 2462FFFF */   addiu    $v0, $v1, -0x1
/* 419FB8 802A5228 A4820000 */  sh        $v0, 0x0($a0)
/* 419FBC 802A522C 080A949D */  j         .L802A5274_7ACC14
/* 419FC0 802A5230 2402FFFF */   addiu    $v0, $zero, -0x1
.L802A5234_7ACBD4:
/* 419FC4 802A5234 24040009 */  addiu     $a0, $zero, 0x9
/* 419FC8 802A5238 0C051F9F */  jal       set_window_update
/* 419FCC 802A523C 24050002 */   addiu    $a1, $zero, 0x2
/* 419FD0 802A5240 24040006 */  addiu     $a0, $zero, 0x6
/* 419FD4 802A5244 0C051F9F */  jal       set_window_update
/* 419FD8 802A5248 24050001 */   addiu    $a1, $zero, 0x1
/* 419FDC 802A524C 24040007 */  addiu     $a0, $zero, 0x7
/* 419FE0 802A5250 0C051F9F */  jal       set_window_update
/* 419FE4 802A5254 24050001 */   addiu    $a1, $zero, 0x1
/* 419FE8 802A5258 24040008 */  addiu     $a0, $zero, 0x8
/* 419FEC 802A525C 0C051F9F */  jal       set_window_update
/* 419FF0 802A5260 24050001 */   addiu    $a1, $zero, 0x1
/* 419FF4 802A5264 24020001 */  addiu     $v0, $zero, 0x1
.L802A5268_7ACC08:
/* 419FF8 802A5268 3C01802B */  lui       $at, %hi(BattleSubmenuStratsState)
/* 419FFC 802A526C A022D604 */  sb        $v0, %lo(BattleSubmenuStratsState)($at)
glabel .L802A5270_7ACC10
/* 41A000 802A5270 0000102D */  daddu     $v0, $zero, $zero
.L802A5274_7ACC14:
/* 41A004 802A5274 8FBF0038 */  lw        $ra, 0x38($sp)
/* 41A008 802A5278 8FB30034 */  lw        $s3, 0x34($sp)
/* 41A00C 802A527C 8FB20030 */  lw        $s2, 0x30($sp)
/* 41A010 802A5280 8FB1002C */  lw        $s1, 0x2C($sp)
/* 41A014 802A5284 8FB00028 */  lw        $s0, 0x28($sp)
/* 41A018 802A5288 03E00008 */  jr        $ra
/* 41A01C 802A528C 27BD0040 */   addiu    $sp, $sp, 0x40

### DECOMPILED C INSTRUCTIONS:

s32 func_802A4A54(void) {
    BattleStatus* battleStatus = &gBattleStatus;
    s32 id;
    s32 x, y;
    s32 width;
    s32 msgID;
    s32 i;

    switch (BattleSubmenuStratsState) {
        case 0:
            D_802AD63C = 20;
            D_802AD63E = 68;
            D_802AD60C = -D_802AD608 * 13;
            D_802AD60E = (D_802AD605 - D_802AD608) * 13;

            for (i = 0; i < D_802AD66C; i++) {
                D_802AD628[i] = id = hud_element_create(D_802AD640[i]);
                hud_element_set_scale(id, 0.45f);
                hud_element_set_flags(id, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80);
            }

            D_802AD618 = id = hud_element_create(&HES_AnimatedHandPointer);
            hud_element_set_flags(id, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
            hud_element_set_render_pos(id, D_802AD63C, D_802AD63E);

            GreenArrowUpID = id = hud_element_create(&HES_GreenArrowUp);
            hud_element_set_flags(id, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
            hud_element_set_render_pos(id, D_802AD63C + 39, D_802AD63E - 7);

            GreenArrowDownID = id = hud_element_create(&HES_GreenArrowDown);
            hud_element_set_flags(id, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80);
            hud_element_set_render_pos(id, D_802AD63C + 39, D_802AD63E + 78);

            D_802AD614 = MSG_PAL_STANDARD;
            x = D_802AD63C;
            y = D_802AD63E;
            set_window_properties(WINDOW_ID_6, x, y, 144, (D_802AD60A * 13) + 26, 0, func_802A5290, NULL, -1);
            set_window_properties(WINDOW_ID_7, x + 18, y - 6, 108, 16, 1, func_802A56F8, NULL, -1);
            x = 20;
            y = 186;
            set_window_properties(WINDOW_ID_8, x, y, 280, 32, WINDOW_PRIORITY_20, func_802A5738, NULL, -1);
            set_window_update(WINDOW_ID_6, WINDOW_UPDATE_SHOW);
            set_window_update(WINDOW_ID_7, WINDOW_UPDATE_SHOW);
            set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW);
            BattleSubmenuStratsState = 1;
            break;
        case 1:
            if (D_802AD607 == 0) {
                D_802AD606 = D_802AD605;
                if (battleStatus->currentButtonsHeld & BUTTON_STICK_UP) {
                    if (D_802AD605 > 0) {
                        D_802AD605--;
                    } else if (battleStatus->currentButtonsPressed & BUTTON_STICK_UP) {
                        D_802AD605--;
                    }
                }

                if (battleStatus->currentButtonsHeld & BUTTON_STICK_DOWN) {
                    if (D_802AD605 < D_802AD66C - 1) {
                        D_802AD605++;
                    } else if (battleStatus->currentButtonsPressed & BUTTON_STICK_DOWN) {
                        D_802AD605++;
                    }
                }

                if (D_802AD605 < 0) {
                    D_802AD605 = D_802AD66C - 1;
                }
                if (D_802AD66C - 1 < D_802AD605) {
                    D_802AD605 = 0;
                }

                if (D_802AD606 != D_802AD605) {
                    hud_element_set_scale(D_802AD628[D_802AD606], 0.45f);
                    sfx_play_sound(SOUND_MENU_CHANGE_SELECTION);
                }

                if (D_802AD605 < D_802AD608) {
                    D_802AD608 = D_802AD605;
                }
                if (D_802AD605 >= D_802AD609) {
                    D_802AD608 = D_802AD605 + 1 - D_802AD60A;
                }
                D_802AD609 = D_802AD608 + 6;
                if (D_802AD609 > D_802AD66C) {
                    D_802AD609 = D_802AD66C;
                }

                if (battleStatus->currentButtonsPressed & BUTTON_A) {
                    if (D_802AD690[D_802AD605] == 1) {
                        sfx_play_sound(SOUND_MENU_NEXT);
                        BattleSubmenuStratsState = -1;
                    } else {
                        sfx_play_sound(SOUND_MENU_ERROR);
                        BattleSubmenuStratsState = 40;
                        D_802AD610 = D_802AD6A8[D_802AD605];
                    }
                    break;
                }

                if (battleStatus->currentButtonsPressed & BUTTON_B) {
                    sfx_play_sound(SOUND_MENU_BACK);
                    func_802A472C();
                    BattleSubmenuStratsState = -2;
                }
            }
            break;
        case -1:
            for (i = 0; i < D_802AD66C; i++) {
                hud_element_set_tint(D_802AD628[i], 160, 160, 160);
            }
            hud_element_set_tint(D_802AD618, 160, 160, 160);
            hud_element_set_tint(GreenArrowUpID, 160, 160, 160);
            hud_element_set_tint(GreenArrowDownID, 160, 160, 160);
            hud_element_set_script(D_802AD618, &HES_HandPointer);
            D_802AD614 = MSG_PAL_0D;
            set_window_update(WINDOW_ID_6, WINDOW_UPDATE_DARKENED);
            set_window_update(WINDOW_ID_7, WINDOW_UPDATE_DARKENED);
            set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE);
            return D_802AD605 + 1;
        case -2:
            return 255;
        case 10:
            set_window_update(WINDOW_ID_6, WINDOW_UPDATE_HIDE);
            set_window_update(WINDOW_ID_7, WINDOW_UPDATE_HIDE);
            set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE);
            BattleSubmenuStratsState = 11;
            return D_802AD605 + 1;
        case 11:
            return D_802AD605 + 1;
        case 20:
            set_window_update(WINDOW_ID_6, WINDOW_UPDATE_SHOW);
            set_window_update(WINDOW_ID_7, WINDOW_UPDATE_SHOW);
            set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW);
            BattleSubmenuStratsState = 1;
            return D_802AD605 + 1;
        case 30:
            set_window_update(WINDOW_ID_6, WINDOW_UPDATE_SHOW);
            set_window_update(WINDOW_ID_7, WINDOW_UPDATE_SHOW);
            set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW);
            BattleSubmenuStratsState = -1;
            break;
        case 40:
            D_802AD6D4 = -1;
            BattleSubmenuStratsState = 41;
            return -1;
        case 41:
            set_window_update(WINDOW_ID_6, WINDOW_UPDATE_HIDE);
            set_window_update(WINDOW_ID_7, WINDOW_UPDATE_HIDE);
            set_window_update(WINDOW_ID_8, WINDOW_UPDATE_HIDE);
            switch (D_802AD610) {
                case 0:
                    msgID = MSG_Menus_Battle_CantSwitch2;
                    break;
                case 1:
                    msgID = MSG_Menus_Battle_CantRunAway;
                    break;
                default:
                    msgID = MSG_Menus_Battle_CantRunAway;
                    break;
            }
            width = get_msg_width(msgID, 0) + 23;
            set_window_properties(WINDOW_ID_BATTLE_POPUP, (SCREEN_WIDTH / 2) - (width / 2), 80, width, 28, 20, func_802A57C8, NULL, -1);
            set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
            D_802AD612 = 60;
            BattleSubmenuStratsState = 42;
            return -1;
        case 42:
            if (gGameStatusPtr->pressedButtons[0] & (BUTTON_A | BUTTON_B)) {
                D_802AD612 = 0;
            }
            if (D_802AD612 != 0) {
                D_802AD612--;
                return -1;
            }
            set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_HIDE);
            set_window_update(WINDOW_ID_6, WINDOW_UPDATE_SHOW);
            set_window_update(WINDOW_ID_7, WINDOW_UPDATE_SHOW);
            set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW);
            BattleSubmenuStratsState = 1;
            break;
    }
    return 0;
}