### RAW ASSEMBLY INSTRUCTIONS:

glabel green_impact_appendGfx
/* 365324 E0064414 27BDFEE8 */  addiu     $sp, $sp, -0x118
/* 365328 E0064418 AFB300E4 */  sw        $s3, 0xE4($sp)
/* 36532C E006441C 3C13800A */  lui       $s3, %hi(gMainGfxPos)
/* 365330 E0064420 2673A66C */  addiu     $s3, $s3, %lo(gMainGfxPos)
/* 365334 E0064424 AFBF00FC */  sw        $ra, 0xFC($sp)
/* 365338 E0064428 AFBE00F8 */  sw        $fp, 0xF8($sp)
/* 36533C E006442C AFB700F4 */  sw        $s7, 0xF4($sp)
/* 365340 E0064430 AFB600F0 */  sw        $s6, 0xF0($sp)
/* 365344 E0064434 AFB500EC */  sw        $s5, 0xEC($sp)
/* 365348 E0064438 AFB400E8 */  sw        $s4, 0xE8($sp)
/* 36534C E006443C AFB200E0 */  sw        $s2, 0xE0($sp)
/* 365350 E0064440 AFB100DC */  sw        $s1, 0xDC($sp)
/* 365354 E0064444 AFB000D8 */  sw        $s0, 0xD8($sp)
/* 365358 E0064448 F7B80110 */  sdc1      $f24, 0x110($sp)
/* 36535C E006444C F7B60108 */  sdc1      $f22, 0x108($sp)
/* 365360 E0064450 F7B40100 */  sdc1      $f20, 0x100($sp)
/* 365364 E0064454 AFA40118 */  sw        $a0, 0x118($sp)
/* 365368 E0064458 8E680000 */  lw        $t0, 0x0($s3)
/* 36536C E006445C 8FAD0118 */  lw        $t5, 0x118($sp)
/* 365370 E0064460 4480A000 */  mtc1      $zero, $f20
/* 365374 E0064464 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 365378 E0064468 4481C000 */  mtc1      $at, $f24
/* 36537C E006446C 8DB1000C */  lw        $s1, 0xC($t5)
/* 365380 E0064470 4405A000 */  mfc1      $a1, $f20
/* 365384 E0064474 96220000 */  lhu       $v0, 0x0($s1)
/* 365388 E0064478 922D0050 */  lbu       $t5, 0x50($s1)
/* 36538C E006447C 00021080 */  sll       $v0, $v0, 2
/* 365390 E0064480 3C09E006 */  lui       $t1, (0xE0064A60 >> 16)
/* 365394 E0064484 01224821 */  addu      $t1, $t1, $v0
/* 365398 E0064488 8D294A60 */  lw        $t1, (0xE0064A60 & 0xFFFF)($t1)
/* 36539C E006448C 3C06DB06 */  lui       $a2, (0xDB060024 >> 16)
/* 3653A0 E0064490 AFAD00A4 */  sw        $t5, 0xA4($sp)
/* 3653A4 E0064494 922D0051 */  lbu       $t5, 0x51($s1)
/* 3653A8 E0064498 34C60024 */  ori       $a2, $a2, (0xDB060024 & 0xFFFF)
/* 3653AC E006449C AFAD00A8 */  sw        $t5, 0xA8($sp)
/* 3653B0 E00644A0 922D0052 */  lbu       $t5, 0x52($s1)
/* 3653B4 E00644A4 27A40020 */  addiu     $a0, $sp, 0x20
/* 3653B8 E00644A8 AFAD00AC */  sw        $t5, 0xAC($sp)
/* 3653BC E00644AC 922D0053 */  lbu       $t5, 0x53($s1)
/* 3653C0 E00644B0 0100182D */  daddu     $v1, $t0, $zero
/* 3653C4 E00644B4 AFAD00B0 */  sw        $t5, 0xB0($sp)
/* 3653C8 E00644B8 922D0054 */  lbu       $t5, 0x54($s1)
/* 3653CC E00644BC 25080008 */  addiu     $t0, $t0, 0x8
/* 3653D0 E00644C0 AFAD00B4 */  sw        $t5, 0xB4($sp)
/* 3653D4 E00644C4 922D0055 */  lbu       $t5, 0x55($s1)
/* 3653D8 E00644C8 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 3653DC E00644CC AFAD00B8 */  sw        $t5, 0xB8($sp)
/* 3653E0 E00644D0 AC620000 */  sw        $v0, 0x0($v1)
/* 3653E4 E00644D4 AC600004 */  sw        $zero, 0x4($v1)
/* 3653E8 E00644D8 AD060000 */  sw        $a2, 0x0($t0)
/* 3653EC E00644DC 8FAD0118 */  lw        $t5, 0x118($sp)
/* 3653F0 E00644E0 4407A000 */  mfc1      $a3, $f20
/* 3653F4 E00644E4 8DA20010 */  lw        $v0, 0x10($t5)
/* 3653F8 E00644E8 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 3653FC E00644EC 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 365400 E00644F0 8C46001C */  lw        $a2, 0x1C($v0)
/* 365404 E00644F4 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 365408 E00644F8 AD020008 */  sw        $v0, 0x8($t0)
/* 36540C E00644FC 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* 365410 E0064500 AD09000C */  sw        $t1, 0xC($t0)
/* 365414 E0064504 00C23021 */  addu      $a2, $a2, $v0
/* 365418 E0064508 00031080 */  sll       $v0, $v1, 2
/* 36541C E006450C 00431021 */  addu      $v0, $v0, $v1
/* 365420 E0064510 00021080 */  sll       $v0, $v0, 2
/* 365424 E0064514 00431023 */  subu      $v0, $v0, $v1
/* 365428 E0064518 000218C0 */  sll       $v1, $v0, 3
/* 36542C E006451C 00431021 */  addu      $v0, $v0, $v1
/* 365430 E0064520 000210C0 */  sll       $v0, $v0, 3
/* 365434 E0064524 AD060004 */  sw        $a2, 0x4($t0)
/* 365438 E0064528 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 36543C E006452C 00220821 */  addu      $at, $at, $v0
/* 365440 E0064530 C4221DEC */  lwc1      $f2, %lo(gCameras + 0x6C)($at)
/* 365444 E0064534 3C100001 */  lui       $s0, (0x11630 >> 16)
/* 365448 E0064538 AE680000 */  sw        $t0, 0x0($s3)
/* 36544C E006453C E7B80010 */  swc1      $f24, 0x10($sp)
/* 365450 E0064540 C6200004 */  lwc1      $f0, 0x4($s1)
/* 365454 E0064544 25020008 */  addiu     $v0, $t0, 0x8
/* 365458 E0064548 AE620000 */  sw        $v0, 0x0($s3)
/* 36545C E006454C 46001087 */  neg.s     $f2, $f2
/* 365460 E0064550 E7A00014 */  swc1      $f0, 0x14($sp)
/* 365464 E0064554 C6200008 */  lwc1      $f0, 0x8($s1)
/* 365468 E0064558 44061000 */  mfc1      $a2, $f2
/* 36546C E006455C 25080010 */  addiu     $t0, $t0, 0x10
/* 365470 E0064560 AE680000 */  sw        $t0, 0x0($s3)
/* 365474 E0064564 E7A00018 */  swc1      $f0, 0x18($sp)
/* 365478 E0064568 C620000C */  lwc1      $f0, 0xC($s1)
/* 36547C E006456C 36101630 */  ori       $s0, $s0, (0x11630 & 0xFFFF)
/* 365480 E0064570 0C080180 */  jal       shim_guPositionF
/* 365484 E0064574 E7A0001C */   swc1     $f0, 0x1C($sp)
/* 365488 E0064578 27A40020 */  addiu     $a0, $sp, 0x20
/* 36548C E006457C 3C158007 */  lui       $s5, %hi(gMatrixListPos)
/* 365490 E0064580 26B541F0 */  addiu     $s5, $s5, %lo(gMatrixListPos)
/* 365494 E0064584 3C16800A */  lui       $s6, %hi(gDisplayContext)
/* 365498 E0064588 26D6A674 */  addiu     $s6, $s6, %lo(gDisplayContext)
/* 36549C E006458C 96A50000 */  lhu       $a1, 0x0($s5)
/* 3654A0 E0064590 8EC20000 */  lw        $v0, 0x0($s6)
/* 3654A4 E0064594 00052980 */  sll       $a1, $a1, 6
/* 3654A8 E0064598 00B02821 */  addu      $a1, $a1, $s0
/* 3654AC E006459C 0C080118 */  jal       shim_guMtxF2L
/* 3654B0 E00645A0 00452821 */   addu     $a1, $v0, $a1
/* 3654B4 E00645A4 24140001 */  addiu     $s4, $zero, 0x1
/* 3654B8 E00645A8 3C02DA38 */  lui       $v0, (0xDA380000 >> 16)
/* 3654BC E00645AC 8E650000 */  lw        $a1, 0x0($s3)
/* 3654C0 E00645B0 96A40000 */  lhu       $a0, 0x0($s5)
/* 3654C4 E00645B4 00A0302D */  daddu     $a2, $a1, $zero
/* 3654C8 E00645B8 24A50008 */  addiu     $a1, $a1, 0x8
/* 3654CC E00645BC ACC20000 */  sw        $v0, 0x0($a2)
/* 3654D0 E00645C0 3082FFFF */  andi      $v0, $a0, 0xFFFF
/* 3654D4 E00645C4 00021180 */  sll       $v0, $v0, 6
/* 3654D8 E00645C8 00501021 */  addu      $v0, $v0, $s0
/* 3654DC E00645CC 00942021 */  addu      $a0, $a0, $s4
/* 3654E0 E00645D0 8EC30000 */  lw        $v1, 0x0($s6)
/* 3654E4 E00645D4 00A0B82D */  daddu     $s7, $a1, $zero
/* 3654E8 E00645D8 00621821 */  addu      $v1, $v1, $v0
/* 3654EC E00645DC ACC30004 */  sw        $v1, 0x4($a2)
/* 3654F0 E00645E0 8E2D0038 */  lw        $t5, 0x38($s1)
/* 3654F4 E00645E4 26E30008 */  addiu     $v1, $s7, 0x8
/* 3654F8 E00645E8 AFAD00A0 */  sw        $t5, 0xA0($sp)
/* 3654FC E00645EC AE650000 */  sw        $a1, 0x0($s3)
/* 365500 E00645F0 A6A40000 */  sh        $a0, 0x0($s5)
/* 365504 E00645F4 AE630000 */  sw        $v1, 0x0($s3)
/* 365508 E00645F8 8FAD00A4 */  lw        $t5, 0xA4($sp)
/* 36550C E00645FC AFAD00BC */  sw        $t5, 0xBC($sp)
/* 365510 E0064600 8FAD00A8 */  lw        $t5, 0xA8($sp)
/* 365514 E0064604 AFAD00C0 */  sw        $t5, 0xC0($sp)
/* 365518 E0064608 8FAD00AC */  lw        $t5, 0xAC($sp)
/* 36551C E006460C AFAD00C4 */  sw        $t5, 0xC4($sp)
/* 365520 E0064610 8FAD00B0 */  lw        $t5, 0xB0($sp)
/* 365524 E0064614 AFAD00C8 */  sw        $t5, 0xC8($sp)
/* 365528 E0064618 8FAD00B4 */  lw        $t5, 0xB4($sp)
/* 36552C E006461C AFAD00CC */  sw        $t5, 0xCC($sp)
/* 365530 E0064620 8FAD00B8 */  lw        $t5, 0xB8($sp)
/* 365534 E0064624 AFAD00D0 */  sw        $t5, 0xD0($sp)
/* 365538 E0064628 8FAD0118 */  lw        $t5, 0x118($sp)
/* 36553C E006462C 8DA20008 */  lw        $v0, 0x8($t5)
/* 365540 E0064630 26310058 */  addiu     $s1, $s1, 0x58
/* 365544 E0064634 0282102A */  slt       $v0, $s4, $v0
/* 365548 E0064638 10400090 */  beqz      $v0, .LE006487C
/* 36554C E006463C AFA300D4 */   sw       $v1, 0xD4($sp)
/* 365550 E0064640 27B20060 */  addiu     $s2, $sp, 0x60
/* 365554 E0064644 4600A586 */  mov.s     $f22, $f20
/* 365558 E0064648 3C01E006 */  lui       $at, (0xE0064A90 >> 16)
/* 36555C E006464C D4344A90 */  ldc1      $f20, (0xE0064A90 & 0xFFFF)($at)
/* 365560 E0064650 02A0B02D */  daddu     $s6, $s5, $zero
/* 365564 E0064654 3C150001 */  lui       $s5, (0x11630 >> 16)
/* 365568 E0064658 36B51630 */  ori       $s5, $s5, (0x11630 & 0xFFFF)
/* 36556C E006465C 3C1EF200 */  lui       $fp, (0xF2000000 >> 16)
/* 365570 E0064660 26300044 */  addiu     $s0, $s1, 0x44
.LE0064664:
/* 365574 E0064664 8E020008 */  lw        $v0, 0x8($s0)
/* 365578 E0064668 0440007E */  bltz      $v0, .LE0064864
/* 36557C E006466C 00000000 */   nop
/* 365580 E0064670 8E05FFC0 */  lw        $a1, -0x40($s0)
/* 365584 E0064674 8E06FFC4 */  lw        $a2, -0x3C($s0)
/* 365588 E0064678 8E07FFC8 */  lw        $a3, -0x38($s0)
/* 36558C E006467C 0C080108 */  jal       shim_guTranslateF
/* 365590 E0064680 27A40020 */   addiu    $a0, $sp, 0x20
/* 365594 E0064684 E7B80010 */  swc1      $f24, 0x10($sp)
/* 365598 E0064688 8E05FFF0 */  lw        $a1, -0x10($s0)
/* 36559C E006468C 4406B000 */  mfc1      $a2, $f22
/* 3655A0 E0064690 4407B000 */  mfc1      $a3, $f22
/* 3655A4 E0064694 0C080104 */  jal       shim_guRotateF
/* 3655A8 E0064698 0240202D */   daddu    $a0, $s2, $zero
/* 3655AC E006469C 0240202D */  daddu     $a0, $s2, $zero
/* 3655B0 E00646A0 27A50020 */  addiu     $a1, $sp, 0x20
/* 3655B4 E00646A4 0C080114 */  jal       shim_guMtxCatF
/* 3655B8 E00646A8 00A0302D */   daddu    $a2, $a1, $zero
/* 3655BC E00646AC C604FFD8 */  lwc1      $f4, -0x28($s0)
/* 3655C0 E00646B0 46002121 */  cvt.d.s   $f4, $f4
/* 3655C4 E00646B4 46342102 */  mul.d     $f4, $f4, $f20
/* 3655C8 E00646B8 00000000 */  nop
/* 3655CC E00646BC C602FFDC */  lwc1      $f2, -0x24($s0)
/* 3655D0 E00646C0 460010A1 */  cvt.d.s   $f2, $f2
/* 3655D4 E00646C4 46341082 */  mul.d     $f2, $f2, $f20
/* 3655D8 E00646C8 00000000 */  nop
/* 3655DC E00646CC C600FFE0 */  lwc1      $f0, -0x20($s0)
/* 3655E0 E00646D0 46000021 */  cvt.d.s   $f0, $f0
/* 3655E4 E00646D4 46340002 */  mul.d     $f0, $f0, $f20
/* 3655E8 E00646D8 00000000 */  nop
/* 3655EC E00646DC 46202120 */  cvt.s.d   $f4, $f4
/* 3655F0 E00646E0 462010A0 */  cvt.s.d   $f2, $f2
/* 3655F4 E00646E4 46200020 */  cvt.s.d   $f0, $f0
/* 3655F8 E00646E8 44052000 */  mfc1      $a1, $f4
/* 3655FC E00646EC 44061000 */  mfc1      $a2, $f2
/* 365600 E00646F0 44070000 */  mfc1      $a3, $f0
/* 365604 E00646F4 0C080110 */  jal       shim_guScaleF
/* 365608 E00646F8 0240202D */   daddu    $a0, $s2, $zero
/* 36560C E00646FC 0240202D */  daddu     $a0, $s2, $zero
/* 365610 E0064700 27A50020 */  addiu     $a1, $sp, 0x20
/* 365614 E0064704 0C080114 */  jal       shim_guMtxCatF
/* 365618 E0064708 00A0302D */   daddu    $a2, $a1, $zero
/* 36561C E006470C E7B60010 */  swc1      $f22, 0x10($sp)
/* 365620 E0064710 8E05FFEC */  lw        $a1, -0x14($s0)
/* 365624 E0064714 4406B000 */  mfc1      $a2, $f22
/* 365628 E0064718 4407C000 */  mfc1      $a3, $f24
/* 36562C E006471C 0C080104 */  jal       shim_guRotateF
/* 365630 E0064720 0240202D */   daddu    $a0, $s2, $zero
/* 365634 E0064724 0240202D */  daddu     $a0, $s2, $zero
/* 365638 E0064728 27A50020 */  addiu     $a1, $sp, 0x20
/* 36563C E006472C 0C080114 */  jal       shim_guMtxCatF
/* 365640 E0064730 00A0302D */   daddu    $a2, $a1, $zero
/* 365644 E0064734 27A40020 */  addiu     $a0, $sp, 0x20
/* 365648 E0064738 96C50000 */  lhu       $a1, 0x0($s6)
/* 36564C E006473C 3C02800A */  lui       $v0, %hi(gDisplayContext)
/* 365650 E0064740 8C42A674 */  lw        $v0, %lo(gDisplayContext)($v0)
/* 365654 E0064744 00052980 */  sll       $a1, $a1, 6
/* 365658 E0064748 00B52821 */  addu      $a1, $a1, $s5
/* 36565C E006474C 0C080118 */  jal       shim_guMtxF2L
/* 365660 E0064750 00452821 */   addu     $a1, $v0, $a1
/* 365664 E0064754 3C06000F */  lui       $a2, (0xFC000 >> 16)
/* 365668 E0064758 34C6C000 */  ori       $a2, $a2, (0xFC000 & 0xFFFF)
/* 36566C E006475C 3C080107 */  lui       $t0, (0x107C000 >> 16)
/* 365670 E0064760 3508C000 */  ori       $t0, $t0, (0x107C000 & 0xFFFF)
/* 365674 E0064764 3C07D838 */  lui       $a3, (0xD8380002 >> 16)
/* 365678 E0064768 34E70002 */  ori       $a3, $a3, (0xD8380002 & 0xFFFF)
/* 36567C E006476C 8E630000 */  lw        $v1, 0x0($s3)
/* 365680 E0064770 C600FFF8 */  lwc1      $f0, -0x8($s0)
/* 365684 E0064774 0060282D */  daddu     $a1, $v1, $zero
/* 365688 E0064778 24630008 */  addiu     $v1, $v1, 0x8
/* 36568C E006477C 4600018D */  trunc.w.s $f6, $f0
/* 365690 E0064780 44023000 */  mfc1      $v0, $f6
/* 365694 E0064784 00000000 */  nop
/* 365698 E0064788 30420FFF */  andi      $v0, $v0, 0xFFF
/* 36569C E006478C 005E1025 */  or        $v0, $v0, $fp
/* 3656A0 E0064790 AE630000 */  sw        $v1, 0x0($s3)
/* 3656A4 E0064794 ACA20000 */  sw        $v0, 0x0($a1)
/* 3656A8 E0064798 24620008 */  addiu     $v0, $v1, 0x8
/* 3656AC E006479C AE620000 */  sw        $v0, 0x0($s3)
/* 3656B0 E00647A0 96C40000 */  lhu       $a0, 0x0($s6)
/* 3656B4 E00647A4 24620010 */  addiu     $v0, $v1, 0x10
/* 3656B8 E00647A8 AE620000 */  sw        $v0, 0x0($s3)
/* 3656BC E00647AC 24820001 */  addiu     $v0, $a0, 0x1
/* 3656C0 E00647B0 A6C20000 */  sh        $v0, 0x0($s6)
/* 3656C4 E00647B4 24620018 */  addiu     $v0, $v1, 0x18
/* 3656C8 E00647B8 3084FFFF */  andi      $a0, $a0, 0xFFFF
/* 3656CC E00647BC 00042180 */  sll       $a0, $a0, 6
/* 3656D0 E00647C0 C600FFF8 */  lwc1      $f0, -0x8($s0)
/* 3656D4 E00647C4 00952021 */  addu      $a0, $a0, $s5
/* 3656D8 E00647C8 AE620000 */  sw        $v0, 0x0($s3)
/* 3656DC E00647CC 4600018D */  trunc.w.s $f6, $f0
/* 3656E0 E00647D0 44023000 */  mfc1      $v0, $f6
/* 3656E4 E00647D4 00000000 */  nop
/* 3656E8 E00647D8 2442007C */  addiu     $v0, $v0, 0x7C
/* 3656EC E00647DC 30420FFF */  andi      $v0, $v0, 0xFFF
/* 3656F0 E00647E0 00461025 */  or        $v0, $v0, $a2
/* 3656F4 E00647E4 ACA20004 */  sw        $v0, 0x4($a1)
/* 3656F8 E00647E8 C6000000 */  lwc1      $f0, 0x0($s0)
/* 3656FC E00647EC 24620020 */  addiu     $v0, $v1, 0x20
/* 365700 E00647F0 AE620000 */  sw        $v0, 0x0($s3)
/* 365704 E00647F4 4600018D */  trunc.w.s $f6, $f0
/* 365708 E00647F8 44023000 */  mfc1      $v0, $f6
/* 36570C E00647FC 00000000 */  nop
/* 365710 E0064800 30420FFF */  andi      $v0, $v0, 0xFFF
/* 365714 E0064804 005E1025 */  or        $v0, $v0, $fp
/* 365718 E0064808 AC620000 */  sw        $v0, 0x0($v1)
/* 36571C E006480C C6000000 */  lwc1      $f0, 0x0($s0)
/* 365720 E0064810 3C02DA38 */  lui       $v0, (0xDA380000 >> 16)
/* 365724 E0064814 AC620008 */  sw        $v0, 0x8($v1)
/* 365728 E0064818 3C02800A */  lui       $v0, %hi(gDisplayContext)
/* 36572C E006481C 8C42A674 */  lw        $v0, %lo(gDisplayContext)($v0)
/* 365730 E0064820 3C0D0900 */  lui       $t5, %hi(D_09000540_4155A0)
/* 365734 E0064824 25AD0540 */  addiu     $t5, $t5, %lo(D_09000540_4155A0)
/* 365738 E0064828 AC6D0014 */  sw        $t5, 0x14($v1)
/* 36573C E006482C AC670018 */  sw        $a3, 0x18($v1)
/* 365740 E0064830 00441021 */  addu      $v0, $v0, $a0
/* 365744 E0064834 AC62000C */  sw        $v0, 0xC($v1)
/* 365748 E0064838 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 36574C E006483C AC620010 */  sw        $v0, 0x10($v1)
/* 365750 E0064840 24020040 */  addiu     $v0, $zero, 0x40
/* 365754 E0064844 AC62001C */  sw        $v0, 0x1C($v1)
/* 365758 E0064848 4600018D */  trunc.w.s $f6, $f0
/* 36575C E006484C 44023000 */  mfc1      $v0, $f6
/* 365760 E0064850 00000000 */  nop
/* 365764 E0064854 2442007C */  addiu     $v0, $v0, 0x7C
/* 365768 E0064858 30420FFF */  andi      $v0, $v0, 0xFFF
/* 36576C E006485C 00481025 */  or        $v0, $v0, $t0
/* 365770 E0064860 AC620004 */  sw        $v0, 0x4($v1)
.LE0064864:
/* 365774 E0064864 8FAD0118 */  lw        $t5, 0x118($sp)
/* 365778 E0064868 26940001 */  addiu     $s4, $s4, 0x1
/* 36577C E006486C 8DA20008 */  lw        $v0, 0x8($t5)
/* 365780 E0064870 0282102A */  slt       $v0, $s4, $v0
/* 365784 E0064874 1440FF7B */  bnez      $v0, .LE0064664
/* 365788 E0064878 26100058 */   addiu    $s0, $s0, 0x58
.LE006487C:
/* 36578C E006487C 3C0AD9FF */  lui       $t2, (0xD9FFF9FF >> 16)
/* 365790 E0064880 354AF9FF */  ori       $t2, $t2, (0xD9FFF9FF & 0xFFFF)
/* 365794 E0064884 3C05800A */  lui       $a1, %hi(gMainGfxPos)
/* 365798 E0064888 24A5A66C */  addiu     $a1, $a1, %lo(gMainGfxPos)
/* 36579C E006488C 3C02DF00 */  lui       $v0, (0xDF000000 >> 16)
/* 3657A0 E0064890 8CA30000 */  lw        $v1, 0x0($a1)
/* 3657A4 E0064894 3C09FA00 */  lui       $t1, (0xFA000000 >> 16)
/* 3657A8 E0064898 0060202D */  daddu     $a0, $v1, $zero
/* 3657AC E006489C 24630008 */  addiu     $v1, $v1, 0x8
/* 3657B0 E00648A0 ACA30000 */  sw        $v1, 0x0($a1)
/* 3657B4 E00648A4 AC820000 */  sw        $v0, 0x0($a0)
/* 3657B8 E00648A8 3C02DE01 */  lui       $v0, (0xDE010000 >> 16)
/* 3657BC E00648AC AC800004 */  sw        $zero, 0x4($a0)
/* 3657C0 E00648B0 AEE20000 */  sw        $v0, 0x0($s7)
/* 3657C4 E00648B4 24620008 */  addiu     $v0, $v1, 0x8
/* 3657C8 E00648B8 AEE30004 */  sw        $v1, 0x4($s7)
/* 3657CC E00648BC ACA20000 */  sw        $v0, 0x0($a1)
/* 3657D0 E00648C0 AC690000 */  sw        $t1, 0x0($v1)
/* 3657D4 E00648C4 8FAD00BC */  lw        $t5, 0xBC($sp)
/* 3657D8 E00648C8 3C0BD9FF */  lui       $t3, (0xD9FFFFFF >> 16)
/* 3657DC E00648CC 000D1600 */  sll       $v0, $t5, 24
/* 3657E0 E00648D0 8FAD00C0 */  lw        $t5, 0xC0($sp)
/* 3657E4 E00648D4 3C07FB00 */  lui       $a3, (0xFB000000 >> 16)
/* 3657E8 E00648D8 000D2400 */  sll       $a0, $t5, 16
/* 3657EC E00648DC 8FAD00C4 */  lw        $t5, 0xC4($sp)
/* 3657F0 E00648E0 00441025 */  or        $v0, $v0, $a0
/* 3657F4 E00648E4 000D2200 */  sll       $a0, $t5, 8
/* 3657F8 E00648E8 8FAD00A0 */  lw        $t5, 0xA0($sp)
/* 3657FC E00648EC 00441025 */  or        $v0, $v0, $a0
/* 365800 E00648F0 31A800FF */  andi      $t0, $t5, 0xFF
/* 365804 E00648F4 00481025 */  or        $v0, $v0, $t0
/* 365808 E00648F8 AC620004 */  sw        $v0, 0x4($v1)
/* 36580C E00648FC 24620010 */  addiu     $v0, $v1, 0x10
/* 365810 E0064900 ACA20000 */  sw        $v0, 0x0($a1)
/* 365814 E0064904 AC670008 */  sw        $a3, 0x8($v1)
/* 365818 E0064908 8FAD00C8 */  lw        $t5, 0xC8($sp)
/* 36581C E006490C 356BFFFF */  ori       $t3, $t3, (0xD9FFFFFF & 0xFFFF)
/* 365820 E0064910 000D1600 */  sll       $v0, $t5, 24
/* 365824 E0064914 8FAD00CC */  lw        $t5, 0xCC($sp)
/* 365828 E0064918 3C06DE00 */  lui       $a2, (0xDE000000 >> 16)
/* 36582C E006491C 000D2400 */  sll       $a0, $t5, 16
/* 365830 E0064920 8FAD00D0 */  lw        $t5, 0xD0($sp)
/* 365834 E0064924 00441025 */  or        $v0, $v0, $a0
/* 365838 E0064928 000D2200 */  sll       $a0, $t5, 8
/* 36583C E006492C 00441025 */  or        $v0, $v0, $a0
/* 365840 E0064930 AC62000C */  sw        $v0, 0xC($v1)
/* 365844 E0064934 24620018 */  addiu     $v0, $v1, 0x18
/* 365848 E0064938 ACA20000 */  sw        $v0, 0x0($a1)
/* 36584C E006493C 24620020 */  addiu     $v0, $v1, 0x20
/* 365850 E0064940 AC6A0010 */  sw        $t2, 0x10($v1)
/* 365854 E0064944 AC600014 */  sw        $zero, 0x14($v1)
/* 365858 E0064948 ACA20000 */  sw        $v0, 0x0($a1)
/* 36585C E006494C 24020200 */  addiu     $v0, $zero, 0x200
/* 365860 E0064950 AC62001C */  sw        $v0, 0x1C($v1)
/* 365864 E0064954 24620028 */  addiu     $v0, $v1, 0x28
/* 365868 E0064958 AC6B0018 */  sw        $t3, 0x18($v1)
/* 36586C E006495C ACA20000 */  sw        $v0, 0x0($a1)
/* 365870 E0064960 AC660020 */  sw        $a2, 0x20($v1)
/* 365874 E0064964 8FAD00D4 */  lw        $t5, 0xD4($sp)
/* 365878 E0064968 24620030 */  addiu     $v0, $v1, 0x30
/* 36587C E006496C AC6D0024 */  sw        $t5, 0x24($v1)
/* 365880 E0064970 ACA20000 */  sw        $v0, 0x0($a1)
/* 365884 E0064974 AC690028 */  sw        $t1, 0x28($v1)
/* 365888 E0064978 8FAD00A4 */  lw        $t5, 0xA4($sp)
/* 36588C E006497C 000D1600 */  sll       $v0, $t5, 24
/* 365890 E0064980 8FAD00A8 */  lw        $t5, 0xA8($sp)
/* 365894 E0064984 000D2400 */  sll       $a0, $t5, 16
/* 365898 E0064988 8FAD00AC */  lw        $t5, 0xAC($sp)
/* 36589C E006498C 00441025 */  or        $v0, $v0, $a0
/* 3658A0 E0064990 000D2200 */  sll       $a0, $t5, 8
/* 3658A4 E0064994 00441025 */  or        $v0, $v0, $a0
/* 3658A8 E0064998 00481025 */  or        $v0, $v0, $t0
/* 3658AC E006499C AC62002C */  sw        $v0, 0x2C($v1)
/* 3658B0 E00649A0 24620038 */  addiu     $v0, $v1, 0x38
/* 3658B4 E00649A4 ACA20000 */  sw        $v0, 0x0($a1)
/* 3658B8 E00649A8 AC670030 */  sw        $a3, 0x30($v1)
/* 3658BC E00649AC 8FAD00B0 */  lw        $t5, 0xB0($sp)
/* 3658C0 E00649B0 3C0CD838 */  lui       $t4, (0xD8380002 >> 16)
/* 3658C4 E00649B4 000D1600 */  sll       $v0, $t5, 24
/* 3658C8 E00649B8 8FAD00B4 */  lw        $t5, 0xB4($sp)
/* 3658CC E00649BC 358C0002 */  ori       $t4, $t4, (0xD8380002 & 0xFFFF)
/* 3658D0 E00649C0 000D2400 */  sll       $a0, $t5, 16
/* 3658D4 E00649C4 8FAD00B8 */  lw        $t5, 0xB8($sp)
/* 3658D8 E00649C8 00441025 */  or        $v0, $v0, $a0
/* 3658DC E00649CC 000D2200 */  sll       $a0, $t5, 8
/* 3658E0 E00649D0 00441025 */  or        $v0, $v0, $a0
/* 3658E4 E00649D4 AC620034 */  sw        $v0, 0x34($v1)
/* 3658E8 E00649D8 24620040 */  addiu     $v0, $v1, 0x40
/* 3658EC E00649DC ACA20000 */  sw        $v0, 0x0($a1)
/* 3658F0 E00649E0 24620048 */  addiu     $v0, $v1, 0x48
/* 3658F4 E00649E4 AC6A0038 */  sw        $t2, 0x38($v1)
/* 3658F8 E00649E8 AC60003C */  sw        $zero, 0x3C($v1)
/* 3658FC E00649EC ACA20000 */  sw        $v0, 0x0($a1)
/* 365900 E00649F0 24020400 */  addiu     $v0, $zero, 0x400
/* 365904 E00649F4 AC620044 */  sw        $v0, 0x44($v1)
/* 365908 E00649F8 24620050 */  addiu     $v0, $v1, 0x50
/* 36590C E00649FC AC6B0040 */  sw        $t3, 0x40($v1)
/* 365910 E0064A00 ACA20000 */  sw        $v0, 0x0($a1)
/* 365914 E0064A04 AC660048 */  sw        $a2, 0x48($v1)
/* 365918 E0064A08 8FAD00D4 */  lw        $t5, 0xD4($sp)
/* 36591C E0064A0C 24620058 */  addiu     $v0, $v1, 0x58
/* 365920 E0064A10 AC6D004C */  sw        $t5, 0x4C($v1)
/* 365924 E0064A14 ACA20000 */  sw        $v0, 0x0($a1)
/* 365928 E0064A18 24020040 */  addiu     $v0, $zero, 0x40
/* 36592C E0064A1C AC6C0050 */  sw        $t4, 0x50($v1)
/* 365930 E0064A20 AC620054 */  sw        $v0, 0x54($v1)
/* 365934 E0064A24 8FBF00FC */  lw        $ra, 0xFC($sp)
/* 365938 E0064A28 8FBE00F8 */  lw        $fp, 0xF8($sp)
/* 36593C E0064A2C 8FB700F4 */  lw        $s7, 0xF4($sp)
/* 365940 E0064A30 8FB600F0 */  lw        $s6, 0xF0($sp)
/* 365944 E0064A34 8FB500EC */  lw        $s5, 0xEC($sp)
/* 365948 E0064A38 8FB400E8 */  lw        $s4, 0xE8($sp)
/* 36594C E0064A3C 8FB300E4 */  lw        $s3, 0xE4($sp)
/* 365950 E0064A40 8FB200E0 */  lw        $s2, 0xE0($sp)
/* 365954 E0064A44 8FB100DC */  lw        $s1, 0xDC($sp)
/* 365958 E0064A48 8FB000D8 */  lw        $s0, 0xD8($sp)
/* 36595C E0064A4C D7B80110 */  ldc1      $f24, 0x110($sp)
/* 365960 E0064A50 D7B60108 */  ldc1      $f22, 0x108($sp)
/* 365964 E0064A54 D7B40100 */  ldc1      $f20, 0x100($sp)
/* 365968 E0064A58 03E00008 */  jr        $ra
/* 36596C E0064A5C 27BD0118 */   addiu    $sp, $sp, 0x118

### DECOMPILED C INSTRUCTIONS:

void green_impact_appendGfx(void* effect) {
    GreenImpactFXData* part = ((EffectInstance*)effect)->data.greenImpact;
    Gfx* dlist = D_E0064A60[part->unk_00];
    Gfx* dlist2;
    s32 alpha;
    s32 primR;
    s32 primG;
    s32 primB;
    s32 envR;
    s32 envG;
    s32 envB;
    s32 primR2;
    s32 primG2;
    s32 primB2;
    s32 envR2;
    s32 envG2;
    s32 envB2;
    Gfx* savedGfxPos;
    Gfx* savedGfxPos2;
    Matrix4f sp20;
    Matrix4f sp60;
    s32 i;

    primR = part->unk_50.r;
    primG = part->unk_50.g;
    primB = part->unk_50.b;
    envR = part->unk_53.r;
    envG = part->unk_53.g;
    envB = part->unk_53.b;

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

    shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, part->unk_04, part->unk_08, part->unk_0C);
    shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

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

    alpha = part->unk_38;
    primR2 = primR;
    primG2 = primG;
    primB2 = primB;
    envR2 = envR;
    envG2 = envG;
    envB2 = envB;

    savedGfxPos = gMainGfxPos;
    gMainGfxPos++;
    savedGfxPos2 = gMainGfxPos;

    part++;
    for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
        if (part->unk_4C >= 0) {
            shim_guTranslateF(sp20, part->unk_04, part->unk_08, part->unk_0C);
            shim_guRotateF(sp60, part->unk_34, 0.0f, 0.0f, 1.0f);
            shim_guMtxCatF(sp60, sp20, sp20);
            shim_guScaleF(sp60, part->unk_1C * 0.3, part->unk_20 * 0.3, part->unk_24 * 0.3);
            shim_guMtxCatF(sp60, sp20, sp20);
            shim_guRotateF(sp60, part->unk_30, 0.0f, 1.0f, 0.0f);
            shim_guMtxCatF(sp60, sp20, sp20);
            shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

            dlist2 = D_09000540_365EF0;

            gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0, (s32) part->unk_3C, 252, (s32) part->unk_3C + 124);
            gDPSetTileSize(gMainGfxPos++, 1, 0, (s32) part->unk_44, 124, (s32) part->unk_44 + 124);
            gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
            gSPDisplayList(gMainGfxPos++, dlist2);
            gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
        }
    }

    gSPEndDisplayList(gMainGfxPos++);
    gSPBranchList(savedGfxPos, gMainGfxPos);

    gDPSetPrimColor(gMainGfxPos++, 0, 0, primR2, primG2, primB2, alpha);
    gDPSetEnvColor(gMainGfxPos++, envR2, envG2, envB2, 0);
    gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH);
    gSPSetGeometryMode(gMainGfxPos++, G_CULL_FRONT);
    gSPDisplayList(gMainGfxPos++, savedGfxPos2);

    gDPSetPrimColor(gMainGfxPos++, 0, 0, primR, primG, primB, alpha);
    gDPSetEnvColor(gMainGfxPos++, envR, envG, envB, 0);
    gSPClearGeometryMode(gMainGfxPos++, G_CULL_BOTH);
    gSPSetGeometryMode(gMainGfxPos++, G_CULL_BACK);
    gSPDisplayList(gMainGfxPos++, savedGfxPos2);

    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel bulb_glow_appendGfx
/* 37A66C E007827C 27BDFFA0 */  addiu     $sp, $sp, -0x60
/* 37A670 E0078280 0080302D */  daddu     $a2, $a0, $zero
/* 37A674 E0078284 AFBF005C */  sw        $ra, 0x5C($sp)
/* 37A678 E0078288 AFBE0058 */  sw        $fp, 0x58($sp)
/* 37A67C E007828C AFB70054 */  sw        $s7, 0x54($sp)
/* 37A680 E0078290 AFB60050 */  sw        $s6, 0x50($sp)
/* 37A684 E0078294 AFB5004C */  sw        $s5, 0x4C($sp)
/* 37A688 E0078298 AFB40048 */  sw        $s4, 0x48($sp)
/* 37A68C E007829C AFB30044 */  sw        $s3, 0x44($sp)
/* 37A690 E00782A0 AFB20040 */  sw        $s2, 0x40($sp)
/* 37A694 E00782A4 AFB1003C */  sw        $s1, 0x3C($sp)
/* 37A698 E00782A8 AFB00038 */  sw        $s0, 0x38($sp)
/* 37A69C E00782AC 8CD0000C */  lw        $s0, 0xC($a2)
/* 37A6A0 E00782B0 8E140010 */  lw        $s4, 0x10($s0)
/* 37A6A4 E00782B4 8E120000 */  lw        $s2, 0x0($s0)
/* 37A6A8 E00782B8 2A820080 */  slti      $v0, $s4, 0x80
/* 37A6AC E00782BC 50400001 */  beql      $v0, $zero, .LE00782C4
/* 37A6B0 E00782C0 2414007F */   addiu    $s4, $zero, 0x7F
.LE00782C4:
/* 37A6B4 E00782C4 3C05DB06 */  lui       $a1, (0xDB060024 >> 16)
/* 37A6B8 E00782C8 3C15800A */  lui       $s5, %hi(gMainGfxPos)
/* 37A6BC E00782CC 26B5A66C */  addiu     $s5, $s5, %lo(gMainGfxPos)
/* 37A6C0 E00782D0 34A50024 */  ori       $a1, $a1, (0xDB060024 & 0xFFFF)
/* 37A6C4 E00782D4 8EA40000 */  lw        $a0, 0x0($s5)
/* 37A6C8 E00782D8 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 37A6CC E00782DC 0080182D */  daddu     $v1, $a0, $zero
/* 37A6D0 E00782E0 24840008 */  addiu     $a0, $a0, 0x8
/* 37A6D4 E00782E4 AC620000 */  sw        $v0, 0x0($v1)
/* 37A6D8 E00782E8 AC600004 */  sw        $zero, 0x4($v1)
/* 37A6DC E00782EC AC850000 */  sw        $a1, 0x0($a0)
/* 37A6E0 E00782F0 8CC20010 */  lw        $v0, 0x10($a2)
/* 37A6E4 E00782F4 AEA40000 */  sw        $a0, 0x0($s5)
/* 37A6E8 E00782F8 8C42001C */  lw        $v0, 0x1C($v0)
/* 37A6EC E00782FC 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 37A6F0 E0078300 00431021 */  addu      $v0, $v0, $v1
/* 37A6F4 E0078304 3C03E008 */  lui       $v1, %hi(D_E0078918)
/* 37A6F8 E0078308 24638918 */  addiu     $v1, $v1, %lo(D_E0078918)
/* 37A6FC E007830C AC820004 */  sw        $v0, 0x4($a0)
/* 37A700 E0078310 00121040 */  sll       $v0, $s2, 1
/* 37A704 E0078314 00521021 */  addu      $v0, $v0, $s2
/* 37A708 E0078318 000210C0 */  sll       $v0, $v0, 3
/* 37A70C E007831C 00438821 */  addu      $s1, $v0, $v1
/* 37A710 E0078320 8E360010 */  lw        $s6, 0x10($s1)
/* 37A714 E0078324 8E330014 */  lw        $s3, 0x14($s1)
/* 37A718 E0078328 27A20018 */  addiu     $v0, $sp, 0x18
/* 37A71C E007832C AFA20010 */  sw        $v0, 0x10($sp)
/* 37A720 E0078330 27A2001C */  addiu     $v0, $sp, 0x1C
/* 37A724 E0078334 AFA20014 */  sw        $v0, 0x14($sp)
/* 37A728 E0078338 C60C0004 */  lwc1      $f12, 0x4($s0)
/* 37A72C E007833C C60E0008 */  lwc1      $f14, 0x8($s0)
/* 37A730 E0078340 8E06000C */  lw        $a2, 0xC($s0)
/* 37A734 E0078344 8E07001C */  lw        $a3, 0x1C($s0)
/* 37A738 E0078348 24840008 */  addiu     $a0, $a0, 0x8
/* 37A73C E007834C 0C08015C */  jal       shim_is_point_visible
/* 37A740 E0078350 AEA40000 */   sw       $a0, 0x0($s5)
/* 37A744 E0078354 0040182D */  daddu     $v1, $v0, $zero
/* 37A748 E0078358 24020005 */  addiu     $v0, $zero, 0x5
/* 37A74C E007835C 52420001 */  beql      $s2, $v0, .LE0078364
/* 37A750 E0078360 24030001 */   addiu    $v1, $zero, 0x1
.LE0078364:
/* 37A754 E0078364 10600157 */  beqz      $v1, .LE00788C4
/* 37A758 E0078368 00000000 */   nop
/* 37A75C E007836C C7A20018 */  lwc1      $f2, 0x18($sp)
/* 37A760 E0078370 44800000 */  mtc1      $zero, $f0
/* 37A764 E0078374 00000000 */  nop
/* 37A768 E0078378 4600103C */  c.lt.s    $f2, $f0
/* 37A76C E007837C 00000000 */  nop
/* 37A770 E0078380 45010150 */  bc1t      .LE00788C4
/* 37A774 E0078384 00000000 */   nop
/* 37A778 E0078388 C7A4001C */  lwc1      $f4, 0x1C($sp)
/* 37A77C E007838C 4600203C */  c.lt.s    $f4, $f0
/* 37A780 E0078390 00000000 */  nop
/* 37A784 E0078394 4501014B */  bc1t      .LE00788C4
/* 37A788 E0078398 00000000 */   nop
/* 37A78C E007839C 3C0143A0 */  lui       $at, (0x43A00000 >> 16)
/* 37A790 E00783A0 44810000 */  mtc1      $at, $f0
/* 37A794 E00783A4 00000000 */  nop
/* 37A798 E00783A8 4602003E */  c.le.s    $f0, $f2
/* 37A79C E00783AC 00000000 */  nop
/* 37A7A0 E00783B0 45010144 */  bc1t      .LE00788C4
/* 37A7A4 E00783B4 00000000 */   nop
/* 37A7A8 E00783B8 3C014370 */  lui       $at, (0x43700000 >> 16)
/* 37A7AC E00783BC 44810000 */  mtc1      $at, $f0
/* 37A7B0 E00783C0 00000000 */  nop
/* 37A7B4 E00783C4 4604003E */  c.le.s    $f0, $f4
/* 37A7B8 E00783C8 00000000 */  nop
/* 37A7BC E00783CC 4501013D */  bc1t      .LE00788C4
/* 37A7C0 E00783D0 3C02DE00 */   lui      $v0, (0xDE000000 >> 16)
/* 37A7C4 E00783D4 8EA70000 */  lw        $a3, 0x0($s5)
/* 37A7C8 E00783D8 00E0182D */  daddu     $v1, $a3, $zero
/* 37A7CC E00783DC AC620000 */  sw        $v0, 0x0($v1)
/* 37A7D0 E00783E0 00121080 */  sll       $v0, $s2, 2
/* 37A7D4 E00783E4 3C01E008 */  lui       $at, (0xE0080000 >> 16)
/* 37A7D8 E00783E8 00220821 */  addu      $at, $at, $v0
/* 37A7DC E00783EC 8C228900 */  lw        $v0, -0x7700($at)
/* 37A7E0 E00783F0 24E70008 */  addiu     $a3, $a3, 0x8
/* 37A7E4 E00783F4 AEA70000 */  sw        $a3, 0x0($s5)
/* 37A7E8 E00783F8 AC620004 */  sw        $v0, 0x4($v1)
/* 37A7EC E00783FC 8E030020 */  lw        $v1, 0x20($s0)
/* 37A7F0 E0078400 3C04E008 */  lui       $a0, %hi(D_E00789AC)
/* 37A7F4 E0078404 248489AC */  addiu     $a0, $a0, %lo(D_E00789AC)
/* 37A7F8 E0078408 00031040 */  sll       $v0, $v1, 1
/* 37A7FC E007840C 00431021 */  addu      $v0, $v0, $v1
/* 37A800 E0078410 00441021 */  addu      $v0, $v0, $a0
/* 37A804 E0078414 90430000 */  lbu       $v1, 0x0($v0)
/* 37A808 E0078418 00144040 */  sll       $t0, $s4, 1
/* 37A80C E007841C 00680018 */  mult      $v1, $t0
/* 37A810 E0078420 00001812 */  mflo      $v1
/* 37A814 E0078424 3C098080 */  lui       $t1, (0x80808081 >> 16)
/* 37A818 E0078428 35298081 */  ori       $t1, $t1, (0x80808081 & 0xFFFF)
/* 37A81C E007842C 00690018 */  mult      $v1, $t1
/* 37A820 E0078430 44960000 */  mtc1      $s6, $f0
/* 37A824 E0078434 00000000 */  nop
/* 37A828 E0078438 46800020 */  cvt.s.w   $f0, $f0
/* 37A82C E007843C 46001081 */  sub.s     $f2, $f2, $f0
/* 37A830 E0078440 46002001 */  sub.s     $f0, $f4, $f0
/* 37A834 E0078444 4600118D */  trunc.w.s $f6, $f2
/* 37A838 E0078448 E7A60020 */  swc1      $f6, 0x20($sp)
/* 37A83C E007844C 00007010 */  mfhi      $t6
/* 37A840 E0078450 90460001 */  lbu       $a2, 0x1($v0)
/* 37A844 E0078454 00000000 */  nop
/* 37A848 E0078458 00C80018 */  mult      $a2, $t0
/* 37A84C E007845C 00162040 */  sll       $a0, $s6, 1
/* 37A850 E0078460 90450002 */  lbu       $a1, 0x2($v0)
/* 37A854 E0078464 24E20008 */  addiu     $v0, $a3, 0x8
/* 37A858 E0078468 8FB70020 */  lw        $s7, 0x20($sp)
/* 37A85C E007846C 00003012 */  mflo      $a2
/* 37A860 E0078470 AEA20000 */  sw        $v0, 0x0($s5)
/* 37A864 E0078474 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 37A868 E0078478 00C90018 */  mult      $a2, $t1
/* 37A86C E007847C ACE20000 */  sw        $v0, 0x0($a3)
/* 37A870 E0078480 02E47821 */  addu      $t7, $s7, $a0
/* 37A874 E0078484 4600018D */  trunc.w.s $f6, $f0
/* 37A878 E0078488 440A3000 */  mfc1      $t2, $f6
/* 37A87C E007848C 00000000 */  nop
/* 37A880 E0078490 01446021 */  addu      $t4, $t2, $a0
/* 37A884 E0078494 00005810 */  mfhi      $t3
/* 37A888 E0078498 01C32021 */  addu      $a0, $t6, $v1
/* 37A88C E007849C 000421C3 */  sra       $a0, $a0, 7
/* 37A890 E00784A0 00A80018 */  mult      $a1, $t0
/* 37A894 E00784A4 00031FC3 */  sra       $v1, $v1, 31
/* 37A898 E00784A8 00832023 */  subu      $a0, $a0, $v1
/* 37A89C E00784AC 00042600 */  sll       $a0, $a0, 24
/* 37A8A0 E00784B0 01661821 */  addu      $v1, $t3, $a2
/* 37A8A4 E00784B4 00002812 */  mflo      $a1
/* 37A8A8 E00784B8 000319C3 */  sra       $v1, $v1, 7
/* 37A8AC E00784BC 000637C3 */  sra       $a2, $a2, 31
/* 37A8B0 E00784C0 00A90018 */  mult      $a1, $t1
/* 37A8B4 E00784C4 00661823 */  subu      $v1, $v1, $a2
/* 37A8B8 E00784C8 306300FF */  andi      $v1, $v1, 0xFF
/* 37A8BC E00784CC 00031C00 */  sll       $v1, $v1, 16
/* 37A8C0 E00784D0 00832025 */  or        $a0, $a0, $v1
/* 37A8C4 E00784D4 00004010 */  mfhi      $t0
/* 37A8C8 E00784D8 01051021 */  addu      $v0, $t0, $a1
/* 37A8CC E00784DC 000211C3 */  sra       $v0, $v0, 7
/* 37A8D0 E00784E0 00052FC3 */  sra       $a1, $a1, 31
/* 37A8D4 E00784E4 00451023 */  subu      $v0, $v0, $a1
/* 37A8D8 E00784E8 304200FF */  andi      $v0, $v0, 0xFF
/* 37A8DC E00784EC 00021200 */  sll       $v0, $v0, 8
/* 37A8E0 E00784F0 00822025 */  or        $a0, $a0, $v0
/* 37A8E4 E00784F4 3484007F */  ori       $a0, $a0, 0x7F
/* 37A8E8 E00784F8 ACE40004 */  sw        $a0, 0x4($a3)
/* 37A8EC E00784FC 8FB70020 */  lw        $s7, 0x20($sp)
/* 37A8F0 E0078500 06E10002 */  bgez      $s7, .LE007850C
/* 37A8F4 E0078504 0000682D */   daddu    $t5, $zero, $zero
/* 37A8F8 E0078508 00176823 */  negu      $t5, $s7
.LE007850C:
/* 37A8FC E007850C 05410002 */  bgez      $t2, .LE0078518
/* 37A900 E0078510 0000182D */   daddu    $v1, $zero, $zero
/* 37A904 E0078514 000A1823 */  negu      $v1, $t2
.LE0078518:
/* 37A908 E0078518 29E20141 */  slti      $v0, $t7, 0x141
/* 37A90C E007851C 50400001 */  beql      $v0, $zero, .LE0078524
/* 37A910 E0078520 240F013F */   addiu    $t7, $zero, 0x13F
.LE0078524:
/* 37A914 E0078524 298200F1 */  slti      $v0, $t4, 0xF1
/* 37A918 E0078528 50400001 */  beql      $v0, $zero, .LE0078530
/* 37A91C E007852C 240C00EF */   addiu    $t4, $zero, 0xEF
.LE0078530:
/* 37A920 E0078530 16600002 */  bnez      $s3, .LE007853C
/* 37A924 E0078534 0073001A */   div      $zero, $v1, $s3
/* 37A928 E0078538 0007000D */  break     7
.LE007853C:
/* 37A92C E007853C 2401FFFF */  addiu     $at, $zero, -0x1
/* 37A930 E0078540 16610004 */  bne       $s3, $at, .LE0078554
/* 37A934 E0078544 3C018000 */   lui      $at, (0x80000000 >> 16)
/* 37A938 E0078548 14610002 */  bne       $v1, $at, .LE0078554
/* 37A93C E007854C 00000000 */   nop
/* 37A940 E0078550 0006000D */  break     6
.LE0078554:
/* 37A944 E0078554 00005812 */  mflo      $t3
/* 37A948 E0078558 018A1023 */  subu      $v0, $t4, $t2
/* 37A94C E007855C 16600002 */  bnez      $s3, .LE0078568
/* 37A950 E0078560 0053001A */   div      $zero, $v0, $s3
/* 37A954 E0078564 0007000D */  break     7
.LE0078568:
/* 37A958 E0078568 2401FFFF */  addiu     $at, $zero, -0x1
/* 37A95C E007856C 16610004 */  bne       $s3, $at, .LE0078580
/* 37A960 E0078570 3C018000 */   lui      $at, (0x80000000 >> 16)
/* 37A964 E0078574 14410002 */  bne       $v0, $at, .LE0078580
/* 37A968 E0078578 00000000 */   nop
/* 37A96C E007857C 0006000D */  break     6
.LE0078580:
/* 37A970 E0078580 0000B812 */  mflo      $s7
/* 37A974 E0078584 0177102A */  slt       $v0, $t3, $s7
/* 37A978 E0078588 104000CE */  beqz      $v0, .LE00788C4
/* 37A97C E007858C AFB70024 */   sw       $s7, 0x24($sp)
/* 37A980 E0078590 02A0482D */  daddu     $t1, $s5, $zero
/* 37A984 E0078594 8FB70020 */  lw        $s7, 0x20($sp)
/* 37A988 E0078598 01730018 */  mult      $t3, $s3
/* 37A98C E007859C 02EDB021 */  addu      $s6, $s7, $t5
/* 37A990 E00785A0 01F61023 */  subu      $v0, $t7, $s6
/* 37A994 E00785A4 00021040 */  sll       $v0, $v0, 1
/* 37A998 E00785A8 AFA20028 */  sw        $v0, 0x28($sp)
/* 37A99C E00785AC 0000B812 */  mflo      $s7
/* 37A9A0 E00785B0 02EA5021 */  addu      $t2, $s7, $t2
.LE00785B4:
/* 37A9A4 E00785B4 01531021 */  addu      $v0, $t2, $s3
/* 37A9A8 E00785B8 284200F0 */  slti      $v0, $v0, 0xF0
/* 37A9AC E00785BC 104000C1 */  beqz      $v0, .LE00788C4
/* 37A9B0 E00785C0 3C03F510 */   lui      $v1, (0xF5100100 >> 16)
/* 37A9B4 E00785C4 000A3080 */  sll       $a2, $t2, 2
/* 37A9B8 E00785C8 00CA1021 */  addu      $v0, $a2, $t2
/* 37A9BC E00785CC 0002F1C0 */  sll       $fp, $v0, 7
/* 37A9C0 E00785D0 34630100 */  ori       $v1, $v1, (0xF5100100 & 0xFFFF)
/* 37A9C4 E00785D4 8FB70028 */  lw        $s7, 0x28($sp)
/* 37A9C8 E00785D8 C7A40020 */  lwc1      $f4, 0x20($sp)
/* 37A9CC E00785DC 46802120 */  cvt.s.w   $f4, $f4
/* 37A9D0 E00785E0 26E20007 */  addiu     $v0, $s7, 0x7
/* 37A9D4 E00785E4 000210C3 */  sra       $v0, $v0, 3
/* 37A9D8 E00785E8 304201FF */  andi      $v0, $v0, 0x1FF
/* 37A9DC E00785EC 00021240 */  sll       $v0, $v0, 9
/* 37A9E0 E00785F0 00437025 */  or        $t6, $v0, $v1
/* 37A9E4 E00785F4 00161080 */  sll       $v0, $s6, 2
/* 37A9E8 E00785F8 30420FFF */  andi      $v0, $v0, 0xFFF
/* 37A9EC E00785FC 00026B00 */  sll       $t5, $v0, 12
/* 37A9F0 E0078600 3C02F400 */  lui       $v0, (0xF4000000 >> 16)
/* 37A9F4 E0078604 01A21025 */  or        $v0, $t5, $v0
/* 37A9F8 E0078608 AFA20030 */  sw        $v0, 0x30($sp)
/* 37A9FC E007860C 25E2FFFF */  addiu     $v0, $t7, -0x1
/* 37AA00 E0078610 00021080 */  sll       $v0, $v0, 2
/* 37AA04 E0078614 30420FFF */  andi      $v0, $v0, 0xFFF
/* 37AA08 E0078618 00029300 */  sll       $s2, $v0, 12
/* 37AA0C E007861C 2662FFFF */  addiu     $v0, $s3, -0x1
/* 37AA10 E0078620 00021080 */  sll       $v0, $v0, 2
/* 37AA14 E0078624 30500FFF */  andi      $s0, $v0, 0xFFF
/* 37AA18 E0078628 3C020700 */  lui       $v0, (0x7000000 >> 16)
/* 37AA1C E007862C C6200008 */  lwc1      $f0, 0x8($s1)
/* 37AA20 E0078630 02021025 */  or        $v0, $s0, $v0
/* 37AA24 E0078634 46002002 */  mul.s     $f0, $f4, $f0
/* 37AA28 E0078638 00000000 */  nop
/* 37AA2C E007863C 0242C825 */  or        $t9, $s2, $v0
/* 37AA30 E0078640 8E220014 */  lw        $v0, 0x14($s1)
/* 37AA34 E0078644 8D250000 */  lw        $a1, 0x0($t1)
/* 37AA38 E0078648 8E240004 */  lw        $a0, 0x4($s1)
/* 37AA3C E007864C 01620018 */  mult      $t3, $v0
/* 37AA40 E0078650 00A0382D */  daddu     $a3, $a1, $zero
/* 37AA44 E0078654 00041080 */  sll       $v0, $a0, 2
/* 37AA48 E0078658 00441021 */  addu      $v0, $v0, $a0
/* 37AA4C E007865C 4600018D */  trunc.w.s $f6, $f0
/* 37AA50 E0078660 44033000 */  mfc1      $v1, $f6
/* 37AA54 E0078664 0000B812 */  mflo      $s7
/* 37AA58 E0078668 C620000C */  lwc1      $f0, 0xC($s1)
/* 37AA5C E007866C 44971000 */  mtc1      $s7, $f2
/* 37AA60 E0078670 00000000 */  nop
/* 37AA64 E0078674 468010A0 */  cvt.s.w   $f2, $f2
/* 37AA68 E0078678 46001082 */  mul.s     $f2, $f2, $f0
/* 37AA6C E007867C 00000000 */  nop
/* 37AA70 E0078680 00021080 */  sll       $v0, $v0, 2
/* 37AA74 E0078684 24A50008 */  addiu     $a1, $a1, 0x8
/* 37AA78 E0078688 00031880 */  sll       $v1, $v1, 2
/* 37AA7C E007868C 44820000 */  mtc1      $v0, $f0
/* 37AA80 E0078690 00000000 */  nop
/* 37AA84 E0078694 46800020 */  cvt.s.w   $f0, $f0
/* 37AA88 E0078698 46020001 */  sub.s     $f0, $f0, $f2
/* 37AA8C E007869C 30630FFF */  andi      $v1, $v1, 0xFFF
/* 37AA90 E00786A0 00031B00 */  sll       $v1, $v1, 12
/* 37AA94 E00786A4 4600018D */  trunc.w.s $f6, $f0
/* 37AA98 E00786A8 44023000 */  mfc1      $v0, $f6
/* 37AA9C E00786AC 00000000 */  nop
/* 37AAA0 E00786B0 00021080 */  sll       $v0, $v0, 2
/* 37AAA4 E00786B4 30420FFF */  andi      $v0, $v0, 0xFFF
/* 37AAA8 E00786B8 3C17F200 */  lui       $s7, (0xF2000000 >> 16)
/* 37AAAC E00786BC 00571025 */  or        $v0, $v0, $s7
/* 37AAB0 E00786C0 00621825 */  or        $v1, $v1, $v0
/* 37AAB4 E00786C4 32C201FF */  andi      $v0, $s6, 0x1FF
/* 37AAB8 E00786C8 ACE30000 */  sw        $v1, 0x0($a3)
/* 37AABC E00786CC C6200008 */  lwc1      $f0, 0x8($s1)
/* 37AAC0 E00786D0 0002A540 */  sll       $s4, $v0, 21
/* 37AAC4 E00786D4 46002102 */  mul.s     $f4, $f4, $f0
/* 37AAC8 E00786D8 00000000 */  nop
/* 37AACC E00786DC C6200000 */  lwc1      $f0, 0x0($s1)
/* 37AAD0 E00786E0 46800020 */  cvt.s.w   $f0, $f0
/* 37AAD4 E00786E4 AD250000 */  sw        $a1, 0x0($t1)
/* 37AAD8 E00786E8 8E220014 */  lw        $v0, 0x14($s1)
/* 37AADC E00786EC 0000602D */  daddu     $t4, $zero, $zero
/* 37AAE0 E00786F0 01620018 */  mult      $t3, $v0
/* 37AAE4 E00786F4 3C15E700 */  lui       $s5, (0xE7000000 >> 16)
/* 37AAE8 E00786F8 30C60FFF */  andi      $a2, $a2, 0xFFF
/* 37AAEC E00786FC 01A6C025 */  or        $t8, $t5, $a2
/* 37AAF0 E0078700 8E240004 */  lw        $a0, 0x4($s1)
/* 37AAF4 E0078704 46002100 */  add.s     $f4, $f4, $f0
/* 37AAF8 E0078708 00041080 */  sll       $v0, $a0, 2
/* 37AAFC E007870C 00441021 */  addu      $v0, $v0, $a0
/* 37AB00 E0078710 4600218D */  trunc.w.s $f6, $f4
/* 37AB04 E0078714 44033000 */  mfc1      $v1, $f6
/* 37AB08 E0078718 0000B812 */  mflo      $s7
/* 37AB0C E007871C C620000C */  lwc1      $f0, 0xC($s1)
/* 37AB10 E0078720 44971000 */  mtc1      $s7, $f2
/* 37AB14 E0078724 00000000 */  nop
/* 37AB18 E0078728 468010A0 */  cvt.s.w   $f2, $f2
/* 37AB1C E007872C 46001082 */  mul.s     $f2, $f2, $f0
/* 37AB20 E0078730 00000000 */  nop
/* 37AB24 E0078734 00021080 */  sll       $v0, $v0, 2
/* 37AB28 E0078738 00441021 */  addu      $v0, $v0, $a0
/* 37AB2C E007873C 00031880 */  sll       $v1, $v1, 2
/* 37AB30 E0078740 44820000 */  mtc1      $v0, $f0
/* 37AB34 E0078744 00000000 */  nop
/* 37AB38 E0078748 46800020 */  cvt.s.w   $f0, $f0
/* 37AB3C E007874C 46020001 */  sub.s     $f0, $f0, $f2
/* 37AB40 E0078750 30630FFF */  andi      $v1, $v1, 0xFFF
/* 37AB44 E0078754 00031B00 */  sll       $v1, $v1, 12
/* 37AB48 E0078758 4600018D */  trunc.w.s $f6, $f0
/* 37AB4C E007875C 44023000 */  mfc1      $v0, $f6
/* 37AB50 E0078760 00000000 */  nop
/* 37AB54 E0078764 00021080 */  sll       $v0, $v0, 2
/* 37AB58 E0078768 30420FFF */  andi      $v0, $v0, 0xFFF
/* 37AB5C E007876C 00621825 */  or        $v1, $v1, $v0
/* 37AB60 E0078770 ACE30004 */  sw        $v1, 0x4($a3)
.LE0078774:
/* 37AB64 E0078774 3C02FD10 */  lui       $v0, (0xFD10013F >> 16)
/* 37AB68 E0078778 3442013F */  ori       $v0, $v0, (0xFD10013F & 0xFFFF)
/* 37AB6C E007877C 3C060702 */  lui       $a2, (0x7020090 >> 16)
/* 37AB70 E0078780 34C60090 */  ori       $a2, $a2, (0x7020090 & 0xFFFF)
/* 37AB74 E0078784 3C070102 */  lui       $a3, (0x1020090 >> 16)
/* 37AB78 E0078788 34E70090 */  ori       $a3, $a3, (0x1020090 & 0xFFFF)
/* 37AB7C E007878C 3C080400 */  lui       $t0, (0x4000400 >> 16)
/* 37AB80 E0078790 35080400 */  ori       $t0, $t0, (0x4000400 & 0xFFFF)
/* 37AB84 E0078794 258C0001 */  addiu     $t4, $t4, 0x1
/* 37AB88 E0078798 8D250000 */  lw        $a1, 0x0($t1)
/* 37AB8C E007879C 3C03800A */  lui       $v1, %hi(nuGfxCfb_ptr)
/* 37AB90 E00787A0 8C63A64C */  lw        $v1, %lo(nuGfxCfb_ptr)($v1)
/* 37AB94 E00787A4 00A0202D */  daddu     $a0, $a1, $zero
/* 37AB98 E00787A8 24A50008 */  addiu     $a1, $a1, 0x8
/* 37AB9C E00787AC 007E1821 */  addu      $v1, $v1, $fp
/* 37ABA0 E00787B0 AD250000 */  sw        $a1, 0x0($t1)
/* 37ABA4 E00787B4 AC820000 */  sw        $v0, 0x0($a0)
/* 37ABA8 E00787B8 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* 37ABAC E00787BC 00621821 */  addu      $v1, $v1, $v0
/* 37ABB0 E00787C0 24A20008 */  addiu     $v0, $a1, 0x8
/* 37ABB4 E00787C4 AC830004 */  sw        $v1, 0x4($a0)
/* 37ABB8 E00787C8 AD220000 */  sw        $v0, 0x0($t1)
/* 37ABBC E00787CC 24A20010 */  addiu     $v0, $a1, 0x10
/* 37ABC0 E00787D0 ACAE0000 */  sw        $t6, 0x0($a1)
/* 37ABC4 E00787D4 ACA60004 */  sw        $a2, 0x4($a1)
/* 37ABC8 E00787D8 AD220000 */  sw        $v0, 0x0($t1)
/* 37ABCC E00787DC 3C02E600 */  lui       $v0, (0xE6000000 >> 16)
/* 37ABD0 E00787E0 ACA20008 */  sw        $v0, 0x8($a1)
/* 37ABD4 E00787E4 24A20018 */  addiu     $v0, $a1, 0x18
/* 37ABD8 E00787E8 ACA0000C */  sw        $zero, 0xC($a1)
/* 37ABDC E00787EC AD220000 */  sw        $v0, 0x0($t1)
/* 37ABE0 E00787F0 24A20020 */  addiu     $v0, $a1, 0x20
/* 37ABE4 E00787F4 000F2080 */  sll       $a0, $t7, 2
/* 37ABE8 E00787F8 30840FFF */  andi      $a0, $a0, 0xFFF
/* 37ABEC E00787FC 00042300 */  sll       $a0, $a0, 12
/* 37ABF0 E0078800 01533021 */  addu      $a2, $t2, $s3
/* 37ABF4 E0078804 8FB70030 */  lw        $s7, 0x30($sp)
/* 37ABF8 E0078808 3C03E400 */  lui       $v1, (0xE4000000 >> 16)
/* 37ABFC E007880C ACB90014 */  sw        $t9, 0x14($a1)
/* 37AC00 E0078810 ACB70010 */  sw        $s7, 0x10($a1)
/* 37AC04 E0078814 AD220000 */  sw        $v0, 0x0($t1)
/* 37AC08 E0078818 24A20028 */  addiu     $v0, $a1, 0x28
/* 37AC0C E007881C ACB50018 */  sw        $s5, 0x18($a1)
/* 37AC10 E0078820 ACA0001C */  sw        $zero, 0x1C($a1)
/* 37AC14 E0078824 AD220000 */  sw        $v0, 0x0($t1)
/* 37AC18 E0078828 24A20030 */  addiu     $v0, $a1, 0x30
/* 37AC1C E007882C 3C17F200 */  lui       $s7, (0xF2000000 >> 16)
/* 37AC20 E0078830 ACAE0020 */  sw        $t6, 0x20($a1)
/* 37AC24 E0078834 ACA70024 */  sw        $a3, 0x24($a1)
/* 37AC28 E0078838 AD220000 */  sw        $v0, 0x0($t1)
/* 37AC2C E007883C 01B71025 */  or        $v0, $t5, $s7
/* 37AC30 E0078840 ACA20028 */  sw        $v0, 0x28($a1)
/* 37AC34 E0078844 3C020100 */  lui       $v0, (0x1000000 >> 16)
/* 37AC38 E0078848 02021025 */  or        $v0, $s0, $v0
/* 37AC3C E007884C 02421025 */  or        $v0, $s2, $v0
/* 37AC40 E0078850 ACA2002C */  sw        $v0, 0x2C($a1)
/* 37AC44 E0078854 24A20038 */  addiu     $v0, $a1, 0x38
/* 37AC48 E0078858 AD220000 */  sw        $v0, 0x0($t1)
/* 37AC4C E007885C 00061080 */  sll       $v0, $a2, 2
/* 37AC50 E0078860 30420FFF */  andi      $v0, $v0, 0xFFF
/* 37AC54 E0078864 00431025 */  or        $v0, $v0, $v1
/* 37AC58 E0078868 00822025 */  or        $a0, $a0, $v0
/* 37AC5C E007886C 24A20040 */  addiu     $v0, $a1, 0x40
/* 37AC60 E0078870 ACA40030 */  sw        $a0, 0x30($a1)
/* 37AC64 E0078874 ACB80034 */  sw        $t8, 0x34($a1)
/* 37AC68 E0078878 AD220000 */  sw        $v0, 0x0($t1)
/* 37AC6C E007887C 3C02E100 */  lui       $v0, (0xE1000000 >> 16)
/* 37AC70 E0078880 ACA20038 */  sw        $v0, 0x38($a1)
/* 37AC74 E0078884 24A20048 */  addiu     $v0, $a1, 0x48
/* 37AC78 E0078888 ACB4003C */  sw        $s4, 0x3C($a1)
/* 37AC7C E007888C AD220000 */  sw        $v0, 0x0($t1)
/* 37AC80 E0078890 3C02F100 */  lui       $v0, (0xF1000000 >> 16)
/* 37AC84 E0078894 ACA20040 */  sw        $v0, 0x40($a1)
/* 37AC88 E0078898 24A20050 */  addiu     $v0, $a1, 0x50
/* 37AC8C E007889C ACA80044 */  sw        $t0, 0x44($a1)
/* 37AC90 E00788A0 AD220000 */  sw        $v0, 0x0($t1)
/* 37AC94 E00788A4 ACB50048 */  sw        $s5, 0x48($a1)
/* 37AC98 E00788A8 1980FFB2 */  blez      $t4, .LE0078774
/* 37AC9C E00788AC ACA0004C */   sw       $zero, 0x4C($a1)
/* 37ACA0 E00788B0 8FB70024 */  lw        $s7, 0x24($sp)
/* 37ACA4 E00788B4 256B0001 */  addiu     $t3, $t3, 0x1
/* 37ACA8 E00788B8 0177102A */  slt       $v0, $t3, $s7
/* 37ACAC E00788BC 1440FF3D */  bnez      $v0, .LE00785B4
/* 37ACB0 E00788C0 00C0502D */   daddu    $t2, $a2, $zero
.LE00788C4:
/* 37ACB4 E00788C4 8FBF005C */  lw        $ra, 0x5C($sp)
/* 37ACB8 E00788C8 8FBE0058 */  lw        $fp, 0x58($sp)
/* 37ACBC E00788CC 8FB70054 */  lw        $s7, 0x54($sp)
/* 37ACC0 E00788D0 8FB60050 */  lw        $s6, 0x50($sp)
/* 37ACC4 E00788D4 8FB5004C */  lw        $s5, 0x4C($sp)
/* 37ACC8 E00788D8 8FB40048 */  lw        $s4, 0x48($sp)
/* 37ACCC E00788DC 8FB30044 */  lw        $s3, 0x44($sp)
/* 37ACD0 E00788E0 8FB20040 */  lw        $s2, 0x40($sp)
/* 37ACD4 E00788E4 8FB1003C */  lw        $s1, 0x3C($sp)
/* 37ACD8 E00788E8 8FB00038 */  lw        $s0, 0x38($sp)
/* 37ACDC E00788EC 03E00008 */  jr        $ra
/* 37ACE0 E00788F0 27BD0060 */   addiu    $sp, $sp, 0x60
/* 37ACE4 E00788F4 00000000 */  nop
/* 37ACE8 E00788F8 00000000 */  nop
/* 37ACEC E00788FC 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void bulb_glow_appendGfx(void* effect) {
    BulbGlowFXData* data = ((EffectInstance*)effect)->data.bulbGlow;
    f32 centerX;
    f32 centerY;
    s32 xMin;
    s32 numRects;
    s32 yMin;
    s32 temp_s2;
    s32 rectHeight;
    s32 glowExtent;
    s32 colorScale;
    s32 brightness;
    s32 yMax;
    s32 xStart;
    s32 xMax;
    s32 isPointVisible;
    s32 yStart;
    UnkBulbGlow* temp_s1;
    Color_RGB8* temp_v0;
    s32 i;
    s32 j;
    u8 r, g, b;

    brightness = data->unk_10;
    temp_s2 = data->unk_00;
    if (brightness > 127) {
        brightness = 127;
    }

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

    temp_s1 = &D_E0078918[temp_s2];
    glowExtent = temp_s1->unk_10;
    rectHeight = temp_s1->unk_14;

    isPointVisible = shim_is_point_visible(data->pos.x, data->pos.y, data->pos.z, data->unk_1C, &centerX, &centerY);

    if (temp_s2 == 5) {
        isPointVisible = TRUE;
    }

    if (!isPointVisible || centerX < 0.0f || centerY < 0.0f || centerX >= SCREEN_WIDTH || centerY >= SCREEN_HEIGHT) {
        return;
    }

    gSPDisplayList(gMainGfxPos++, D_E0078900[temp_s2]);
    temp_v0 = &D_E00789AC[data->unk_20];
    colorScale = brightness * 2;
    r = temp_v0->r * colorScale / 255;
    g = temp_v0->g * colorScale / 255;
    b = temp_v0->b * colorScale / 255;

    gDPSetPrimColor(gMainGfxPos++, 0, 0, r, g, b, 127);

    xMin = centerX - glowExtent;
    xMax = xMin + glowExtent * 2;
    yMin = centerY - glowExtent;
    yMax = yMin + glowExtent * 2;

    xStart = 0;
    if (xMin < 0) {
        xStart = -xMin;
    }
    yStart = 0;
    if (yMin < 0) {
        yStart = -yMin;
    }
    if (xMax > SCREEN_WIDTH) {
        xMax = SCREEN_WIDTH - 1;
    }
    if (yMax > SCREEN_HEIGHT) {
        yMax = SCREEN_HEIGHT - 1;
    }

    numRects = (yMax - yMin) / rectHeight;

    for (i = yStart / rectHeight; i < numRects; i++) {
        s32 y = yMin + i * rectHeight;
        if (y + rectHeight >= SCREEN_HEIGHT) {
            break;
        }

        gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE,
            (s32) (xMin * temp_s1->unk_08) << 2,
            (s32) (temp_s1->unk_04 * 20 - i * temp_s1->unk_14 * temp_s1->unk_0C) << 2,
            (s32) (xMin * temp_s1->unk_08 + temp_s1->unk_00) << 2,
            (s32) (temp_s1->unk_04 * 21 - i * temp_s1->unk_14 * temp_s1->unk_0C) << 2);

        for (j = 0; j < 1; j++) {
            gDPLoadMultiTile(gMainGfxPos++,
                VIRTUAL_TO_PHYSICAL(nuGfxCfb_ptr + y * SCREEN_WIDTH),
                TMEM_ADDR(TMEM_SIZE/2), G_TX_RENDERTILE + 1, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, 0,
                xMin + xStart, 0, xMax - 1, rectHeight - 1,
                0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 9, 8, G_TX_NOLOD, G_TX_NOLOD);
            gSPTextureRectangle(gMainGfxPos++,
                (xMin + xStart) << 2, y << 2,
                xMax << 2, (y + rectHeight) << 2,
                G_TX_RENDERTILE,
                ((xMin + xStart) & 0x1FF) << 5, 0,
                1 << 10, 1 << 10);
            gDPPipeSync(gMainGfxPos++);
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel FlyPartTo
/* 1AA818 8027BF38 27BDFFC8 */  addiu     $sp, $sp, -0x38
/* 1AA81C 8027BF3C AFB30024 */  sw        $s3, 0x24($sp)
/* 1AA820 8027BF40 0080982D */  daddu     $s3, $a0, $zero
/* 1AA824 8027BF44 AFBF002C */  sw        $ra, 0x2C($sp)
/* 1AA828 8027BF48 AFB40028 */  sw        $s4, 0x28($sp)
/* 1AA82C 8027BF4C AFB20020 */  sw        $s2, 0x20($sp)
/* 1AA830 8027BF50 AFB1001C */  sw        $s1, 0x1C($sp)
/* 1AA834 8027BF54 AFB00018 */  sw        $s0, 0x18($sp)
/* 1AA838 8027BF58 F7B40030 */  sdc1      $f20, 0x30($sp)
/* 1AA83C 8027BF5C 10A0008A */  beqz      $a1, .L8027C188
/* 1AA840 8027BF60 8E71000C */   lw       $s1, 0xC($s3)
/* 1AA844 8027BF64 8E250000 */  lw        $a1, 0x0($s1)
/* 1AA848 8027BF68 0C0B1EAF */  jal       evt_get_variable
/* 1AA84C 8027BF6C 26310004 */   addiu    $s1, $s1, 0x4
/* 1AA850 8027BF70 0040802D */  daddu     $s0, $v0, $zero
/* 1AA854 8027BF74 2402FF81 */  addiu     $v0, $zero, -0x7F
/* 1AA858 8027BF78 16020002 */  bne       $s0, $v0, .L8027BF84
/* 1AA85C 8027BF7C 00000000 */   nop
/* 1AA860 8027BF80 8E700148 */  lw        $s0, 0x148($s3)
.L8027BF84:
/* 1AA864 8027BF84 8E250000 */  lw        $a1, 0x0($s1)
/* 1AA868 8027BF88 26310004 */  addiu     $s1, $s1, 0x4
/* 1AA86C 8027BF8C 0C0B1EAF */  jal       evt_get_variable
/* 1AA870 8027BF90 0260202D */   daddu    $a0, $s3, $zero
/* 1AA874 8027BF94 0200202D */  daddu     $a0, $s0, $zero
/* 1AA878 8027BF98 0C09A75B */  jal       get_actor
/* 1AA87C 8027BF9C 0040802D */   daddu    $s0, $v0, $zero
/* 1AA880 8027BFA0 0040A02D */  daddu     $s4, $v0, $zero
/* 1AA884 8027BFA4 0280202D */  daddu     $a0, $s4, $zero
/* 1AA888 8027BFA8 0C099117 */  jal       get_actor_part
/* 1AA88C 8027BFAC 0200282D */   daddu    $a1, $s0, $zero
/* 1AA890 8027BFB0 0040902D */  daddu     $s2, $v0, $zero
/* 1AA894 8027BFB4 AE740074 */  sw        $s4, 0x74($s3)
/* 1AA898 8027BFB8 AE720078 */  sw        $s2, 0x78($s3)
/* 1AA89C 8027BFBC 8E250000 */  lw        $a1, 0x0($s1)
/* 1AA8A0 8027BFC0 26310004 */  addiu     $s1, $s1, 0x4
/* 1AA8A4 8027BFC4 8E500010 */  lw        $s0, 0x10($s2)
/* 1AA8A8 8027BFC8 0C0B1EAF */  jal       evt_get_variable
/* 1AA8AC 8027BFCC 0260202D */   daddu    $a0, $s3, $zero
/* 1AA8B0 8027BFD0 44820000 */  mtc1      $v0, $f0
/* 1AA8B4 8027BFD4 00000000 */  nop
/* 1AA8B8 8027BFD8 46800020 */  cvt.s.w   $f0, $f0
/* 1AA8BC 8027BFDC E600000C */  swc1      $f0, 0xC($s0)
/* 1AA8C0 8027BFE0 8E250000 */  lw        $a1, 0x0($s1)
/* 1AA8C4 8027BFE4 26310004 */  addiu     $s1, $s1, 0x4
/* 1AA8C8 8027BFE8 0C0B1EAF */  jal       evt_get_variable
/* 1AA8CC 8027BFEC 0260202D */   daddu    $a0, $s3, $zero
/* 1AA8D0 8027BFF0 44820000 */  mtc1      $v0, $f0
/* 1AA8D4 8027BFF4 00000000 */  nop
/* 1AA8D8 8027BFF8 46800020 */  cvt.s.w   $f0, $f0
/* 1AA8DC 8027BFFC E6000010 */  swc1      $f0, 0x10($s0)
/* 1AA8E0 8027C000 8E250000 */  lw        $a1, 0x0($s1)
/* 1AA8E4 8027C004 26310004 */  addiu     $s1, $s1, 0x4
/* 1AA8E8 8027C008 0C0B1EAF */  jal       evt_get_variable
/* 1AA8EC 8027C00C 0260202D */   daddu    $a0, $s3, $zero
/* 1AA8F0 8027C010 44820000 */  mtc1      $v0, $f0
/* 1AA8F4 8027C014 00000000 */  nop
/* 1AA8F8 8027C018 46800020 */  cvt.s.w   $f0, $f0
/* 1AA8FC 8027C01C E6000014 */  swc1      $f0, 0x14($s0)
/* 1AA900 8027C020 8E250000 */  lw        $a1, 0x0($s1)
/* 1AA904 8027C024 26310004 */  addiu     $s1, $s1, 0x4
/* 1AA908 8027C028 0C0B1EAF */  jal       evt_get_variable
/* 1AA90C 8027C02C 0260202D */   daddu    $a0, $s3, $zero
/* 1AA910 8027C030 A6020038 */  sh        $v0, 0x38($s0)
/* 1AA914 8027C034 8E250000 */  lw        $a1, 0x0($s1)
/* 1AA918 8027C038 26310004 */  addiu     $s1, $s1, 0x4
/* 1AA91C 8027C03C 0C0B1EAF */  jal       evt_get_variable
/* 1AA920 8027C040 0260202D */   daddu    $a0, $s3, $zero
/* 1AA924 8027C044 A602003A */  sh        $v0, 0x3A($s0)
/* 1AA928 8027C048 8E250000 */  lw        $a1, 0x0($s1)
/* 1AA92C 8027C04C 0C0B1EAF */  jal       evt_get_variable
/* 1AA930 8027C050 0260202D */   daddu    $a0, $s3, $zero
/* 1AA934 8027C054 AE62007C */  sw        $v0, 0x7C($s3)
/* 1AA938 8027C058 C602000C */  lwc1      $f2, 0xC($s0)
/* 1AA93C 8027C05C C640002C */  lwc1      $f0, 0x2C($s2)
/* 1AA940 8027C060 46020081 */  sub.s     $f2, $f0, $f2
/* 1AA944 8027C064 E6000000 */  swc1      $f0, 0x0($s0)
/* 1AA948 8027C068 46021102 */  mul.s     $f4, $f2, $f2
/* 1AA94C 8027C06C 00000000 */  nop
/* 1AA950 8027C070 E6000018 */  swc1      $f0, 0x18($s0)
/* 1AA954 8027C074 C6400030 */  lwc1      $f0, 0x30($s2)
/* 1AA958 8027C078 C6020010 */  lwc1      $f2, 0x10($s0)
/* 1AA95C 8027C07C 46020081 */  sub.s     $f2, $f0, $f2
/* 1AA960 8027C080 E6000004 */  swc1      $f0, 0x4($s0)
/* 1AA964 8027C084 46021182 */  mul.s     $f6, $f2, $f2
/* 1AA968 8027C088 00000000 */  nop
/* 1AA96C 8027C08C E600001C */  swc1      $f0, 0x1C($s0)
/* 1AA970 8027C090 C6400034 */  lwc1      $f0, 0x34($s2)
/* 1AA974 8027C094 C6020014 */  lwc1      $f2, 0x14($s0)
/* 1AA978 8027C098 46020081 */  sub.s     $f2, $f0, $f2
/* 1AA97C 8027C09C 46021082 */  mul.s     $f2, $f2, $f2
/* 1AA980 8027C0A0 00000000 */  nop
/* 1AA984 8027C0A4 46062100 */  add.s     $f4, $f4, $f6
/* 1AA988 8027C0A8 46022300 */  add.s     $f12, $f4, $f2
/* 1AA98C 8027C0AC E6000008 */  swc1      $f0, 0x8($s0)
/* 1AA990 8027C0B0 46006084 */  sqrt.s    $f2, $f12
/* 1AA994 8027C0B4 46021032 */  c.eq.s    $f2, $f2
/* 1AA998 8027C0B8 00000000 */  nop
/* 1AA99C 8027C0BC 45010004 */  bc1t      .L8027C0D0
/* 1AA9A0 8027C0C0 E6000020 */   swc1     $f0, 0x20($s0)
/* 1AA9A4 8027C0C4 0C0187BC */  jal       sqrtf
/* 1AA9A8 8027C0C8 00000000 */   nop
/* 1AA9AC 8027C0CC 46000086 */  mov.s     $f2, $f0
.L8027C0D0:
/* 1AA9B0 8027C0D0 86020038 */  lh        $v0, 0x38($s0)
/* 1AA9B4 8027C0D4 14400007 */  bnez      $v0, .L8027C0F4
/* 1AA9B8 8027C0D8 E6020034 */   swc1     $f2, 0x34($s0)
/* 1AA9BC 8027C0DC C6000028 */  lwc1      $f0, 0x28($s0)
/* 1AA9C0 8027C0E0 46001003 */  div.s     $f0, $f2, $f0
/* 1AA9C4 8027C0E4 4600020D */  trunc.w.s $f8, $f0
/* 1AA9C8 8027C0E8 44024000 */  mfc1      $v0, $f8
/* 1AA9CC 8027C0EC 0809F042 */  j         .L8027C108
/* 1AA9D0 8027C0F0 A6020038 */   sh       $v0, 0x38($s0)
.L8027C0F4:
/* 1AA9D4 8027C0F4 44820000 */  mtc1      $v0, $f0
/* 1AA9D8 8027C0F8 00000000 */  nop
/* 1AA9DC 8027C0FC 46800020 */  cvt.s.w   $f0, $f0
/* 1AA9E0 8027C100 46001003 */  div.s     $f0, $f2, $f0
/* 1AA9E4 8027C104 E6000028 */  swc1      $f0, 0x28($s0)
.L8027C108:
/* 1AA9E8 8027C108 86020038 */  lh        $v0, 0x38($s0)
/* 1AA9EC 8027C10C 14400003 */  bnez      $v0, .L8027C11C
/* 1AA9F0 8027C110 00000000 */   nop
.L8027C114:
/* 1AA9F4 8027C114 0809F12F */  j         .L8027C4BC
/* 1AA9F8 8027C118 24020002 */   addiu    $v0, $zero, 0x2
.L8027C11C:
/* 1AA9FC 8027C11C 8E4200AC */  lw        $v0, 0xAC($s2)
/* 1AAA00 8027C120 5040000C */  beql      $v0, $zero, .L8027C154
/* 1AAA04 8027C124 AE00003C */   sw       $zero, 0x3C($s0)
/* 1AAA08 8027C128 8E4200B0 */  lw        $v0, 0xB0($s2)
/* 1AAA0C 8027C12C 54400009 */  bnel      $v0, $zero, .L8027C154
/* 1AAA10 8027C130 AE00003C */   sw       $zero, 0x3C($s0)
/* 1AAA14 8027C134 C6400034 */  lwc1      $f0, 0x34($s2)
/* 1AAA18 8027C138 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1AAA1C 8027C13C 8E4400AC */  lw        $a0, 0xAC($s2)
/* 1AAA20 8027C140 8E46002C */  lw        $a2, 0x2C($s2)
/* 1AAA24 8027C144 8E470030 */  lw        $a3, 0x30($s2)
/* 1AAA28 8027C148 0C052757 */  jal       sfx_play_sound_at_position
/* 1AAA2C 8027C14C 0000282D */   daddu    $a1, $zero, $zero
/* 1AAA30 8027C150 AE00003C */  sw        $zero, 0x3C($s0)
.L8027C154:
/* 1AAA34 8027C154 AE000030 */  sw        $zero, 0x30($s0)
/* 1AAA38 8027C158 864200BE */  lh        $v0, 0xBE($s2)
/* 1AAA3C 8027C15C 04400004 */  bltz      $v0, .L8027C170
/* 1AAA40 8027C160 00000000 */   nop
/* 1AAA44 8027C164 868201B6 */  lh        $v0, 0x1B6($s4)
/* 1AAA48 8027C168 0809F05E */  j         .L8027C178
/* 1AAA4C 8027C16C 24420001 */   addiu    $v0, $v0, 0x1
.L8027C170:
/* 1AAA50 8027C170 868201B6 */  lh        $v0, 0x1B6($s4)
/* 1AAA54 8027C174 00021027 */  nor       $v0, $zero, $v0
.L8027C178:
/* 1AAA58 8027C178 44820000 */  mtc1      $v0, $f0
/* 1AAA5C 8027C17C 00000000 */  nop
/* 1AAA60 8027C180 46800020 */  cvt.s.w   $f0, $f0
/* 1AAA64 8027C184 E600002C */  swc1      $f0, 0x2C($s0)
.L8027C188:
/* 1AAA68 8027C188 8E720078 */  lw        $s2, 0x78($s3)
/* 1AAA6C 8027C18C 8E500010 */  lw        $s0, 0x10($s2)
/* 1AAA70 8027C190 8E740074 */  lw        $s4, 0x74($s3)
/* 1AAA74 8027C194 86020038 */  lh        $v0, 0x38($s0)
/* 1AAA78 8027C198 AFA20010 */  sw        $v0, 0x10($sp)
/* 1AAA7C 8027C19C 8E64007C */  lw        $a0, 0x7C($s3)
/* 1AAA80 8027C1A0 8E050018 */  lw        $a1, 0x18($s0)
/* 1AAA84 8027C1A4 8E06000C */  lw        $a2, 0xC($s0)
/* 1AAA88 8027C1A8 0C09EC37 */  jal       update_lerp_battle
/* 1AAA8C 8027C1AC 8E07003C */   lw       $a3, 0x3C($s0)
/* 1AAA90 8027C1B0 86020038 */  lh        $v0, 0x38($s0)
/* 1AAA94 8027C1B4 E6000000 */  swc1      $f0, 0x0($s0)
/* 1AAA98 8027C1B8 AFA20010 */  sw        $v0, 0x10($sp)
/* 1AAA9C 8027C1BC 8E64007C */  lw        $a0, 0x7C($s3)
/* 1AAAA0 8027C1C0 8E05001C */  lw        $a1, 0x1C($s0)
/* 1AAAA4 8027C1C4 8E060010 */  lw        $a2, 0x10($s0)
/* 1AAAA8 8027C1C8 0C09EC37 */  jal       update_lerp_battle
/* 1AAAAC 8027C1CC 8E07003C */   lw       $a3, 0x3C($s0)
/* 1AAAB0 8027C1D0 86020038 */  lh        $v0, 0x38($s0)
/* 1AAAB4 8027C1D4 E6000004 */  swc1      $f0, 0x4($s0)
/* 1AAAB8 8027C1D8 AFA20010 */  sw        $v0, 0x10($sp)
/* 1AAABC 8027C1DC 8E64007C */  lw        $a0, 0x7C($s3)
/* 1AAAC0 8027C1E0 8E050020 */  lw        $a1, 0x20($s0)
/* 1AAAC4 8027C1E4 8E060014 */  lw        $a2, 0x14($s0)
/* 1AAAC8 8027C1E8 0C09EC37 */  jal       update_lerp_battle
/* 1AAACC 8027C1EC 8E07003C */   lw       $a3, 0x3C($s0)
/* 1AAAD0 8027C1F0 8E02003C */  lw        $v0, 0x3C($s0)
/* 1AAAD4 8027C1F4 86030038 */  lh        $v1, 0x38($s0)
/* 1AAAD8 8027C1F8 E6000008 */  swc1      $f0, 0x8($s0)
/* 1AAADC 8027C1FC 24420001 */  addiu     $v0, $v0, 0x1
/* 1AAAE0 8027C200 0062182A */  slt       $v1, $v1, $v0
/* 1AAAE4 8027C204 10600010 */  beqz      $v1, .L8027C248
/* 1AAAE8 8027C208 AE02003C */   sw       $v0, 0x3C($s0)
/* 1AAAEC 8027C20C C600000C */  lwc1      $f0, 0xC($s0)
/* 1AAAF0 8027C210 8E4400AC */  lw        $a0, 0xAC($s2)
/* 1AAAF4 8027C214 E640002C */  swc1      $f0, 0x2C($s2)
/* 1AAAF8 8027C218 C6000010 */  lwc1      $f0, 0x10($s0)
/* 1AAAFC 8027C21C E6400030 */  swc1      $f0, 0x30($s2)
/* 1AAB00 8027C220 C6000014 */  lwc1      $f0, 0x14($s0)
/* 1AAB04 8027C224 1080FFBB */  beqz      $a0, .L8027C114
/* 1AAB08 8027C228 E6400034 */   swc1     $f0, 0x34($s2)
/* 1AAB0C 8027C22C 8E4200B0 */  lw        $v0, 0xB0($s2)
/* 1AAB10 8027C230 144000A2 */  bnez      $v0, .L8027C4BC
/* 1AAB14 8027C234 24020002 */   addiu    $v0, $zero, 0x2
/* 1AAB18 8027C238 0C0154F0 */  jal       snd_stop_sound
/* 1AAB1C 8027C23C 00000000 */   nop
/* 1AAB20 8027C240 0809F12F */  j         .L8027C4BC
/* 1AAB24 8027C244 24020002 */   addiu    $v0, $zero, 0x2
.L8027C248:
/* 1AAB28 8027C248 8E4200AC */  lw        $v0, 0xAC($s2)
/* 1AAB2C 8027C24C 1040004A */  beqz      $v0, .L8027C378
/* 1AAB30 8027C250 00000000 */   nop
/* 1AAB34 8027C254 8E4200B0 */  lw        $v0, 0xB0($s2)
/* 1AAB38 8027C258 10400047 */  beqz      $v0, .L8027C378
/* 1AAB3C 8027C25C 00000000 */   nop
/* 1AAB40 8027C260 864200BE */  lh        $v0, 0xBE($s2)
/* 1AAB44 8027C264 0440001C */  bltz      $v0, .L8027C2D8
/* 1AAB48 8027C268 00000000 */   nop
/* 1AAB4C 8027C26C C602002C */  lwc1      $f2, 0x2C($s0)
/* 1AAB50 8027C270 C6000028 */  lwc1      $f0, 0x28($s0)
/* 1AAB54 8027C274 46001080 */  add.s     $f2, $f2, $f0
/* 1AAB58 8027C278 E602002C */  swc1      $f2, 0x2C($s0)
/* 1AAB5C 8027C27C 864200BE */  lh        $v0, 0xBE($s2)
/* 1AAB60 8027C280 44820000 */  mtc1      $v0, $f0
/* 1AAB64 8027C284 00000000 */  nop
/* 1AAB68 8027C288 46800020 */  cvt.s.w   $f0, $f0
/* 1AAB6C 8027C28C 4602003C */  c.lt.s    $f0, $f2
/* 1AAB70 8027C290 00000000 */  nop
/* 1AAB74 8027C294 45000038 */  bc1f      .L8027C378
/* 1AAB78 8027C298 00000000 */   nop
/* 1AAB7C 8027C29C 92820135 */  lbu       $v0, 0x135($s4)
/* 1AAB80 8027C2A0 24420001 */  addiu     $v0, $v0, 0x1
/* 1AAB84 8027C2A4 A2820135 */  sb        $v0, 0x135($s4)
/* 1AAB88 8027C2A8 AE00002C */  sw        $zero, 0x2C($s0)
/* 1AAB8C 8027C2AC 92820135 */  lbu       $v0, 0x135($s4)
/* 1AAB90 8027C2B0 30420001 */  andi      $v0, $v0, 0x1
/* 1AAB94 8027C2B4 10400026 */  beqz      $v0, .L8027C350
/* 1AAB98 8027C2B8 00000000 */   nop
/* 1AAB9C 8027C2BC 8E4200AC */  lw        $v0, 0xAC($s2)
/* 1AABA0 8027C2C0 1040002D */  beqz      $v0, .L8027C378
/* 1AABA4 8027C2C4 00000000 */   nop
/* 1AABA8 8027C2C8 C6400034 */  lwc1      $f0, 0x34($s2)
/* 1AABAC 8027C2CC E7A00010 */  swc1      $f0, 0x10($sp)
/* 1AABB0 8027C2D0 0809F0DA */  j         .L8027C368
/* 1AABB4 8027C2D4 8E4400AC */   lw       $a0, 0xAC($s2)
.L8027C2D8:
/* 1AABB8 8027C2D8 C602002C */  lwc1      $f2, 0x2C($s0)
/* 1AABBC 8027C2DC 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 1AABC0 8027C2E0 44810000 */  mtc1      $at, $f0
/* 1AABC4 8027C2E4 00000000 */  nop
/* 1AABC8 8027C2E8 46001080 */  add.s     $f2, $f2, $f0
/* 1AABCC 8027C2EC E602002C */  swc1      $f2, 0x2C($s0)
/* 1AABD0 8027C2F0 864200BE */  lh        $v0, 0xBE($s2)
/* 1AABD4 8027C2F4 00021023 */  negu      $v0, $v0
/* 1AABD8 8027C2F8 44820000 */  mtc1      $v0, $f0
/* 1AABDC 8027C2FC 00000000 */  nop
/* 1AABE0 8027C300 46800020 */  cvt.s.w   $f0, $f0
/* 1AABE4 8027C304 4602003E */  c.le.s    $f0, $f2
/* 1AABE8 8027C308 00000000 */  nop
/* 1AABEC 8027C30C 4500001A */  bc1f      .L8027C378
/* 1AABF0 8027C310 00000000 */   nop
/* 1AABF4 8027C314 92820135 */  lbu       $v0, 0x135($s4)
/* 1AABF8 8027C318 24420001 */  addiu     $v0, $v0, 0x1
/* 1AABFC 8027C31C A2820135 */  sb        $v0, 0x135($s4)
/* 1AAC00 8027C320 AE00002C */  sw        $zero, 0x2C($s0)
/* 1AAC04 8027C324 92820135 */  lbu       $v0, 0x135($s4)
/* 1AAC08 8027C328 30420001 */  andi      $v0, $v0, 0x1
/* 1AAC0C 8027C32C 10400008 */  beqz      $v0, .L8027C350
/* 1AAC10 8027C330 00000000 */   nop
/* 1AAC14 8027C334 8E4200AC */  lw        $v0, 0xAC($s2)
/* 1AAC18 8027C338 1040000F */  beqz      $v0, .L8027C378
/* 1AAC1C 8027C33C 00000000 */   nop
/* 1AAC20 8027C340 C6400034 */  lwc1      $f0, 0x34($s2)
/* 1AAC24 8027C344 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1AAC28 8027C348 0809F0DA */  j         .L8027C368
/* 1AAC2C 8027C34C 8E4400AC */   lw       $a0, 0xAC($s2)
.L8027C350:
/* 1AAC30 8027C350 8E4200B0 */  lw        $v0, 0xB0($s2)
/* 1AAC34 8027C354 10400008 */  beqz      $v0, .L8027C378
/* 1AAC38 8027C358 00000000 */   nop
/* 1AAC3C 8027C35C C6400034 */  lwc1      $f0, 0x34($s2)
/* 1AAC40 8027C360 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1AAC44 8027C364 8E4400B0 */  lw        $a0, 0xB0($s2)
.L8027C368:
/* 1AAC48 8027C368 8E46002C */  lw        $a2, 0x2C($s2)
/* 1AAC4C 8027C36C 8E470030 */  lw        $a3, 0x30($s2)
/* 1AAC50 8027C370 0C052757 */  jal       sfx_play_sound_at_position
/* 1AAC54 8027C374 0000282D */   daddu    $a1, $zero, $zero
.L8027C378:
/* 1AAC58 8027C378 C602000C */  lwc1      $f2, 0xC($s0)
/* 1AAC5C 8027C37C C6000000 */  lwc1      $f0, 0x0($s0)
/* 1AAC60 8027C380 46001081 */  sub.s     $f2, $f2, $f0
/* 1AAC64 8027C384 46021102 */  mul.s     $f4, $f2, $f2
/* 1AAC68 8027C388 00000000 */  nop
/* 1AAC6C 8027C38C C6000004 */  lwc1      $f0, 0x4($s0)
/* 1AAC70 8027C390 C6020010 */  lwc1      $f2, 0x10($s0)
/* 1AAC74 8027C394 46001081 */  sub.s     $f2, $f2, $f0
/* 1AAC78 8027C398 46021182 */  mul.s     $f6, $f2, $f2
/* 1AAC7C 8027C39C 00000000 */  nop
/* 1AAC80 8027C3A0 C6000008 */  lwc1      $f0, 0x8($s0)
/* 1AAC84 8027C3A4 C6020014 */  lwc1      $f2, 0x14($s0)
/* 1AAC88 8027C3A8 46001081 */  sub.s     $f2, $f2, $f0
/* 1AAC8C 8027C3AC 46021002 */  mul.s     $f0, $f2, $f2
/* 1AAC90 8027C3B0 00000000 */  nop
/* 1AAC94 8027C3B4 46062100 */  add.s     $f4, $f4, $f6
/* 1AAC98 8027C3B8 46002300 */  add.s     $f12, $f4, $f0
/* 1AAC9C 8027C3BC 46006004 */  sqrt.s    $f0, $f12
/* 1AACA0 8027C3C0 46000032 */  c.eq.s    $f0, $f0
/* 1AACA4 8027C3C4 00000000 */  nop
/* 1AACA8 8027C3C8 45010003 */  bc1t      .L8027C3D8
/* 1AACAC 8027C3CC 00000000 */   nop
/* 1AACB0 8027C3D0 0C0187BC */  jal       sqrtf
/* 1AACB4 8027C3D4 00000000 */   nop
.L8027C3D8:
/* 1AACB8 8027C3D8 4480A000 */  mtc1      $zero, $f20
/* 1AACBC 8027C3DC 46000086 */  mov.s     $f2, $f0
/* 1AACC0 8027C3E0 46141032 */  c.eq.s    $f2, $f20
/* 1AACC4 8027C3E4 00000000 */  nop
/* 1AACC8 8027C3E8 45000003 */  bc1f      .L8027C3F8
/* 1AACCC 8027C3EC 00000000 */   nop
/* 1AACD0 8027C3F0 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 1AACD4 8027C3F4 44811000 */  mtc1      $at, $f2
.L8027C3F8:
/* 1AACD8 8027C3F8 C6000034 */  lwc1      $f0, 0x34($s0)
/* 1AACDC 8027C3FC 46140032 */  c.eq.s    $f0, $f20
/* 1AACE0 8027C400 00000000 */  nop
/* 1AACE4 8027C404 45000006 */  bc1f      .L8027C420
/* 1AACE8 8027C408 00000000 */   nop
/* 1AACEC 8027C40C 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 1AACF0 8027C410 44810000 */  mtc1      $at, $f0
/* 1AACF4 8027C414 00000000 */  nop
/* 1AACF8 8027C418 E6000034 */  swc1      $f0, 0x34($s0)
/* 1AACFC 8027C41C C6000034 */  lwc1      $f0, 0x34($s0)
.L8027C420:
/* 1AAD00 8027C420 3C013FF0 */  lui       $at, (0x3FF00000 >> 16)
/* 1AAD04 8027C424 44816800 */  mtc1      $at, $f13
/* 1AAD08 8027C428 44806000 */  mtc1      $zero, $f12
/* 1AAD0C 8027C42C 46001003 */  div.s     $f0, $f2, $f0
/* 1AAD10 8027C430 46000021 */  cvt.d.s   $f0, $f0
/* 1AAD14 8027C434 46206301 */  sub.d     $f12, $f12, $f0
/* 1AAD18 8027C438 3C01802A */  lui       $at, %hi(D_8029DA20)
/* 1AAD1C 8027C43C D420DA20 */  ldc1      $f0, %lo(D_8029DA20)($at)
/* 1AAD20 8027C440 46206302 */  mul.d     $f12, $f12, $f0
/* 1AAD24 8027C444 00000000 */  nop
/* 1AAD28 8027C448 0C00A8BB */  jal       sin_deg
/* 1AAD2C 8027C44C 46206320 */   cvt.s.d  $f12, $f12
/* 1AAD30 8027C450 8603003A */  lh        $v1, 0x3A($s0)
/* 1AAD34 8027C454 14600002 */  bnez      $v1, .L8027C460
/* 1AAD38 8027C458 46000106 */   mov.s    $f4, $f0
/* 1AAD3C 8027C45C 4600A106 */  mov.s     $f4, $f20
.L8027C460:
/* 1AAD40 8027C460 04610007 */  bgez      $v1, .L8027C480
/* 1AAD44 8027C464 00031023 */   negu     $v0, $v1
/* 1AAD48 8027C468 44821000 */  mtc1      $v0, $f2
/* 1AAD4C 8027C46C 00000000 */  nop
/* 1AAD50 8027C470 468010A0 */  cvt.s.w   $f2, $f2
/* 1AAD54 8027C474 46002007 */  neg.s     $f0, $f4
/* 1AAD58 8027C478 46020102 */  mul.s     $f4, $f0, $f2
/* 1AAD5C 8027C47C 00000000 */  nop
.L8027C480:
/* 1AAD60 8027C480 18600006 */  blez      $v1, .L8027C49C
/* 1AAD64 8027C484 00000000 */   nop
/* 1AAD68 8027C488 44830000 */  mtc1      $v1, $f0
/* 1AAD6C 8027C48C 00000000 */  nop
/* 1AAD70 8027C490 46800020 */  cvt.s.w   $f0, $f0
/* 1AAD74 8027C494 46002102 */  mul.s     $f4, $f4, $f0
/* 1AAD78 8027C498 00000000 */  nop
.L8027C49C:
/* 1AAD7C 8027C49C C6000000 */  lwc1      $f0, 0x0($s0)
/* 1AAD80 8027C4A0 E640002C */  swc1      $f0, 0x2C($s2)
/* 1AAD84 8027C4A4 C6000004 */  lwc1      $f0, 0x4($s0)
/* 1AAD88 8027C4A8 46040000 */  add.s     $f0, $f0, $f4
/* 1AAD8C 8027C4AC E6400030 */  swc1      $f0, 0x30($s2)
/* 1AAD90 8027C4B0 C6000008 */  lwc1      $f0, 0x8($s0)
/* 1AAD94 8027C4B4 0000102D */  daddu     $v0, $zero, $zero
/* 1AAD98 8027C4B8 E6400034 */  swc1      $f0, 0x34($s2)
.L8027C4BC:
/* 1AAD9C 8027C4BC 8FBF002C */  lw        $ra, 0x2C($sp)
/* 1AADA0 8027C4C0 8FB40028 */  lw        $s4, 0x28($sp)
/* 1AADA4 8027C4C4 8FB30024 */  lw        $s3, 0x24($sp)
/* 1AADA8 8027C4C8 8FB20020 */  lw        $s2, 0x20($sp)
/* 1AADAC 8027C4CC 8FB1001C */  lw        $s1, 0x1C($sp)
/* 1AADB0 8027C4D0 8FB00018 */  lw        $s0, 0x18($sp)
/* 1AADB4 8027C4D4 D7B40030 */  ldc1      $f20, 0x30($sp)
/* 1AADB8 8027C4D8 03E00008 */  jr        $ra
/* 1AADBC 8027C4DC 27BD0038 */   addiu    $sp, $sp, 0x38

### DECOMPILED C INSTRUCTIONS:

ApiStatus FlyPartTo(Evt* script, s32 isInitialCall) {
    Bytecode* args = script->ptrReadPos;
    Actor* actor;
    ActorPart* part;
    ActorPartMovement* partMovement;
    s32 actorID;
    s32 partID;

    f32 posX, posY, posZ;
    f32 goalX, goalY, goalZ;
    f32 deltaX, deltaY, deltaZ;
    f32 dist3D;
    f32 offsetY;

    if (isInitialCall) {
        actorID = evt_get_variable(script, *args++);
        if (actorID == ACTOR_SELF) {
            actorID = script->owner1.actorID;
        }
        partID = evt_get_variable(script, *args++);

        actor = get_actor(actorID);
        part = get_actor_part(actor, partID);
        script->functionTempPtr[1] = actor;
        script->functionTempPtr[2] = part;
        partMovement = part->movement;

        partMovement->goalPos.x = evt_get_variable(script, *args++);
        partMovement->goalPos.y = evt_get_variable(script, *args++);
        partMovement->goalPos.z = evt_get_variable(script, *args++);
        partMovement->moveTime = evt_get_variable(script, *args++);
        partMovement->unk_3A = evt_get_variable(script, *args++);
        script->functionTemp[3] = evt_get_variable(script, *args++);

        goalX = partMovement->goalPos.x;
        posX = part->absolutePosition.x;
        deltaX = posX - goalX;
        partMovement->absolutePosition.x = posX;
        partMovement->unk_18.x = posX;

        goalY = partMovement->goalPos.y;
        posY = part->absolutePosition.y;
        deltaY = posY - goalY;
        partMovement->absolutePosition.y = posY;
        partMovement->unk_18.y = posY;

        goalZ = partMovement->goalPos.z;
        posZ = part->absolutePosition.z;
        deltaZ = posZ - goalZ;
        partMovement->absolutePosition.z = posZ;
        partMovement->unk_18.z = posZ;

        partMovement->distance = sqrtf(SQ(deltaX) + SQ(deltaY) + SQ(deltaZ));

        if (partMovement->moveTime == 0) {
            partMovement->moveTime = partMovement->distance / partMovement->moveSpeed;
        } else {
            partMovement->moveSpeed = partMovement->distance / partMovement->moveTime;
        }

        if (partMovement->moveTime == 0) {
            return ApiStatus_DONE2;
        }

        if (part->partTypeData[2] != 0 && part->partTypeData[3] == 0) {
            sfx_play_sound_at_position(part->partTypeData[2], SOUND_SPACE_MODE_0, part->absolutePosition.x, part->absolutePosition.y, part->absolutePosition.z);
        }
        partMovement->unk_3C = 0;
        partMovement->angle = 0.0f;

        if (part->actorTypeData2b[1] >= 0) {
            partMovement->unk_2C = actor->actorTypeData1b[1] + 1;
        } else {
            partMovement->unk_2C = ~actor->actorTypeData1b[1];
        }
    }

    part = script->functionTempPtr[2];
    actor = script->functionTempPtr[1];
    partMovement = part->movement;
    partMovement->absolutePosition.x = update_lerp_battle(script->functionTemp[3], partMovement->unk_18.x, partMovement->goalPos.x, partMovement->unk_3C, partMovement->moveTime);
    partMovement->absolutePosition.y = update_lerp_battle(script->functionTemp[3], partMovement->unk_18.y, partMovement->goalPos.y, partMovement->unk_3C, partMovement->moveTime);
    partMovement->absolutePosition.z = update_lerp_battle(script->functionTemp[3], partMovement->unk_18.z, partMovement->goalPos.z, partMovement->unk_3C, partMovement->moveTime);
    partMovement->unk_3C++;

    if (partMovement->moveTime < partMovement->unk_3C) {
        part->absolutePosition.x = partMovement->goalPos.x;
        part->absolutePosition.y = partMovement->goalPos.y;
        part->absolutePosition.z = partMovement->goalPos.z;
        if (part->partTypeData[2] != 0 && part->partTypeData[3] == 0) {
            snd_stop_sound(part->partTypeData[2]);
        }
        return ApiStatus_DONE2;
    }

    if (part->partTypeData[2] != 0 && part->partTypeData[3] != 0) {
        if (part->actorTypeData2b[1] >= 0) {
            partMovement->unk_2C += partMovement->moveSpeed;
            if (part->actorTypeData2b[1] < partMovement->unk_2C) {
                actor->footStepCounter++;
                partMovement->unk_2C = 0;
                if (actor->footStepCounter % 2 != 0) {
                    if (part->partTypeData[2] != 0) {
                        sfx_play_sound_at_position(part->partTypeData[2], SOUND_SPACE_MODE_0, part->absolutePosition.x, part->absolutePosition.y, part->absolutePosition.z);
                    }
                } else {
                    if (part->partTypeData[3] != 0) {
                        sfx_play_sound_at_position(part->partTypeData[3], SOUND_SPACE_MODE_0, part->absolutePosition.x, part->absolutePosition.y, part->absolutePosition.z);
                    }
                }
            }
        } else {
            partMovement->unk_2C += 1.0f;
            if (-part->actorTypeData2b[1] <= partMovement->unk_2C) {
                actor->footStepCounter++;
                partMovement->unk_2C = 0;
                if (actor->footStepCounter % 2 != 0) {
                    if (part->partTypeData[2] != 0) {
                        sfx_play_sound_at_position(part->partTypeData[2], SOUND_SPACE_MODE_0, part->absolutePosition.x, part->absolutePosition.y, part->absolutePosition.z);
                    }
                } else {
                    if (part->partTypeData[3] != 0) {
                        sfx_play_sound_at_position(part->partTypeData[3], SOUND_SPACE_MODE_0, part->absolutePosition.x, part->absolutePosition.y, part->absolutePosition.z);
                    }
                }
            }
        }
    }

    deltaX = partMovement->goalPos.x - partMovement->absolutePosition.x;
    deltaY = partMovement->goalPos.y - partMovement->absolutePosition.y;
    deltaZ = partMovement->goalPos.z - partMovement->absolutePosition.z;
    dist3D = sqrtf(SQ(deltaX) + SQ(deltaY) + SQ(deltaZ));
    if (dist3D == 0.0f) {
        dist3D = 1.0f;
    }
    if (partMovement->distance == 0.0f) {
        partMovement->distance = 1.0f;
    }

    offsetY = sin_deg((1.0 - dist3D / partMovement->distance) * 180.0);
    if (partMovement->unk_3A == 0) {
        offsetY = 0.0f;
    }
    if (partMovement->unk_3A < 0) {
        offsetY = -offsetY * (-partMovement->unk_3A);
    }
    if (partMovement->unk_3A > 0) {
        offsetY = offsetY * partMovement->unk_3A;
    }

    part->absolutePosition.x = partMovement->absolutePosition.x;
    part->absolutePosition.y = partMovement->absolutePosition.y + offsetY;
    part->absolutePosition.z = partMovement->absolutePosition.z;
    return ApiStatus_BLOCK;
}