### RAW ASSEMBLY INSTRUCTIONS:

glabel check_conversation_trigger
/* 1E5DC 800431DC 27BDFF58 */  addiu     $sp, $sp, -0xA8
/* 1E5E0 800431E0 3C03FDFF */  lui       $v1, (0xFDFFFFFF >> 16)
/* 1E5E4 800431E4 AFB40060 */  sw        $s4, 0x60($sp)
/* 1E5E8 800431E8 3C148011 */  lui       $s4, %hi(gPlayerStatus)
/* 1E5EC 800431EC 2694EFC8 */  addiu     $s4, $s4, %lo(gPlayerStatus)
/* 1E5F0 800431F0 AFBF0074 */  sw        $ra, 0x74($sp)
/* 1E5F4 800431F4 AFBE0070 */  sw        $fp, 0x70($sp)
/* 1E5F8 800431F8 AFB7006C */  sw        $s7, 0x6C($sp)
/* 1E5FC 800431FC AFB60068 */  sw        $s6, 0x68($sp)
/* 1E600 80043200 AFB50064 */  sw        $s5, 0x64($sp)
/* 1E604 80043204 AFB3005C */  sw        $s3, 0x5C($sp)
/* 1E608 80043208 AFB20058 */  sw        $s2, 0x58($sp)
/* 1E60C 8004320C AFB10054 */  sw        $s1, 0x54($sp)
/* 1E610 80043210 AFB00050 */  sw        $s0, 0x50($sp)
/* 1E614 80043214 F7BE00A0 */  sdc1      $f30, 0xA0($sp)
/* 1E618 80043218 F7BC0098 */  sdc1      $f28, 0x98($sp)
/* 1E61C 8004321C F7BA0090 */  sdc1      $f26, 0x90($sp)
/* 1E620 80043220 F7B80088 */  sdc1      $f24, 0x88($sp)
/* 1E624 80043224 F7B60080 */  sdc1      $f22, 0x80($sp)
/* 1E628 80043228 F7B40078 */  sdc1      $f20, 0x78($sp)
/* 1E62C 8004322C 8E820000 */  lw        $v0, 0x0($s4)
/* 1E630 80043230 3463FFFF */  ori       $v1, $v1, (0xFDFFFFFF & 0xFFFF)
/* 1E634 80043234 00431024 */  and       $v0, $v0, $v1
/* 1E638 80043238 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 1E63C 8004323C 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 1E640 80043240 3C04800B */  lui       $a0, %hi(gCameras)
/* 1E644 80043244 24841D80 */  addiu     $a0, $a0, %lo(gCameras)
/* 1E648 80043248 AE8000C8 */  sw        $zero, 0xC8($s4)
/* 1E64C 8004324C AE820000 */  sw        $v0, 0x0($s4)
/* 1E650 80043250 00031080 */  sll       $v0, $v1, 2
/* 1E654 80043254 00431021 */  addu      $v0, $v0, $v1
/* 1E658 80043258 00021080 */  sll       $v0, $v0, 2
/* 1E65C 8004325C 00431023 */  subu      $v0, $v0, $v1
/* 1E660 80043260 000218C0 */  sll       $v1, $v0, 3
/* 1E664 80043264 00431021 */  addu      $v0, $v0, $v1
/* 1E668 80043268 000210C0 */  sll       $v0, $v0, 3
/* 1E66C 8004326C 0044B821 */  addu      $s7, $v0, $a0
/* 1E670 80043270 868200B0 */  lh        $v0, 0xB0($s4)
/* 1E674 80043274 968300B2 */  lhu       $v1, 0xB2($s4)
/* 1E678 80043278 44823000 */  mtc1      $v0, $f6
/* 1E67C 8004327C 00000000 */  nop
/* 1E680 80043280 468031A0 */  cvt.s.w   $f6, $f6
/* 1E684 80043284 00031C00 */  sll       $v1, $v1, 16
/* 1E688 80043288 00031403 */  sra       $v0, $v1, 16
/* 1E68C 8004328C 00031FC2 */  srl       $v1, $v1, 31
/* 1E690 80043290 00431021 */  addu      $v0, $v0, $v1
/* 1E694 80043294 00021043 */  sra       $v0, $v0, 1
/* 1E698 80043298 44824000 */  mtc1      $v0, $f8
/* 1E69C 8004329C 00000000 */  nop
/* 1E6A0 800432A0 46804220 */  cvt.s.w   $f8, $f8
/* 1E6A4 800432A4 E7A6003C */  swc1      $f6, 0x3C($sp)
/* 1E6A8 800432A8 E7A80040 */  swc1      $f8, 0x40($sp)
/* 1E6AC 800432AC C6860028 */  lwc1      $f6, 0x28($s4)
/* 1E6B0 800432B0 3C028011 */  lui       $v0, %hi(gPartnerStatus)
/* 1E6B4 800432B4 8042EBB0 */  lb        $v0, %lo(gPartnerStatus)($v0)
/* 1E6B8 800432B8 E7A60030 */  swc1      $f6, 0x30($sp)
/* 1E6BC 800432BC C688002C */  lwc1      $f8, 0x2C($s4)
/* 1E6C0 800432C0 E7A80034 */  swc1      $f8, 0x34($sp)
/* 1E6C4 800432C4 C6860030 */  lwc1      $f6, 0x30($s4)
/* 1E6C8 800432C8 144000E6 */  bnez      $v0, .L80043664
/* 1E6CC 800432CC E7A60038 */   swc1     $f6, 0x38($sp)
/* 1E6D0 800432D0 0000F02D */  daddu     $fp, $zero, $zero
/* 1E6D4 800432D4 03C0A82D */  daddu     $s5, $fp, $zero
/* 1E6D8 800432D8 3C02800B */  lui       $v0, %hi(gCurrentEncounter + 0x1C)
/* 1E6DC 800432DC 80420F2C */  lb        $v0, %lo(gCurrentEncounter + 0x1C)($v0)
/* 1E6E0 800432E0 3C01477F */  lui       $at, (0x477FFF00 >> 16)
/* 1E6E4 800432E4 3421FF00 */  ori       $at, $at, (0x477FFF00 & 0xFFFF)
/* 1E6E8 800432E8 44814000 */  mtc1      $at, $f8
/* 1E6EC 800432EC 03C0B02D */  daddu     $s6, $fp, $zero
/* 1E6F0 800432F0 AFA0002C */  sw        $zero, 0x2C($sp)
/* 1E6F4 800432F4 184000B8 */  blez      $v0, .L800435D8
/* 1E6F8 800432F8 E7A80048 */   swc1     $f8, 0x48($sp)
/* 1E6FC 800432FC 00151080 */  sll       $v0, $s5, 2
.L80043300:
/* 1E700 80043300 3C08800B */  lui       $t0, %hi(gCurrentEncounter)
/* 1E704 80043304 25080F10 */  addiu     $t0, $t0, %lo(gCurrentEncounter)
/* 1E708 80043308 01021021 */  addu      $v0, $t0, $v0
/* 1E70C 8004330C 8C530028 */  lw        $s3, 0x28($v0)
/* 1E710 80043310 126000AB */  beqz      $s3, .L800435C0
/* 1E714 80043314 00000000 */   nop
/* 1E718 80043318 8E620000 */  lw        $v0, 0x0($s3)
/* 1E71C 8004331C 184000A8 */  blez      $v0, .L800435C0
/* 1E720 80043320 0000902D */   daddu    $s2, $zero, $zero
/* 1E724 80043324 00121080 */  sll       $v0, $s2, 2
.L80043328:
/* 1E728 80043328 02621021 */  addu      $v0, $s3, $v0
/* 1E72C 8004332C 8C510004 */  lw        $s1, 0x4($v0)
/* 1E730 80043330 1220009E */  beqz      $s1, .L800435AC
/* 1E734 80043334 3C028000 */   lui      $v0, (0x80000020 >> 16)
/* 1E738 80043338 8E230000 */  lw        $v1, 0x0($s1)
/* 1E73C 8004333C 34420020 */  ori       $v0, $v0, (0x80000020 & 0xFFFF)
/* 1E740 80043340 00621024 */  and       $v0, $v1, $v0
/* 1E744 80043344 14400099 */  bnez      $v0, .L800435AC
/* 1E748 80043348 30620001 */   andi     $v0, $v1, 0x1
/* 1E74C 8004334C 10400097 */  beqz      $v0, .L800435AC
/* 1E750 80043350 3C020800 */   lui      $v0, (0x8000000 >> 16)
/* 1E754 80043354 00621024 */  and       $v0, $v1, $v0
/* 1E758 80043358 14400094 */  bnez      $v0, .L800435AC
/* 1E75C 8004335C 00000000 */   nop
/* 1E760 80043360 8E220020 */  lw        $v0, 0x20($s1)
/* 1E764 80043364 10400091 */  beqz      $v0, .L800435AC
/* 1E768 80043368 00000000 */   nop
/* 1E76C 8004336C 0C00EABB */  jal       get_npc_unsafe
/* 1E770 80043370 86240008 */   lh       $a0, 0x8($s1)
/* 1E774 80043374 0040802D */  daddu     $s0, $v0, $zero
/* 1E778 80043378 C45A0038 */  lwc1      $f26, 0x38($v0)
/* 1E77C 8004337C C7A60030 */  lwc1      $f6, 0x30($sp)
/* 1E780 80043380 4606D081 */  sub.s     $f2, $f26, $f6
/* 1E784 80043384 46021082 */  mul.s     $f2, $f2, $f2
/* 1E788 80043388 00000000 */  nop
/* 1E78C 8004338C C61C0040 */  lwc1      $f28, 0x40($s0)
/* 1E790 80043390 C7A80038 */  lwc1      $f8, 0x38($sp)
/* 1E794 80043394 4608E001 */  sub.s     $f0, $f28, $f8
/* 1E798 80043398 46000002 */  mul.s     $f0, $f0, $f0
/* 1E79C 8004339C 00000000 */  nop
/* 1E7A0 800433A0 860200A8 */  lh        $v0, 0xA8($s0)
/* 1E7A4 800433A4 860300A6 */  lh        $v1, 0xA6($s0)
/* 1E7A8 800433A8 44823000 */  mtc1      $v0, $f6
/* 1E7AC 800433AC 00000000 */  nop
/* 1E7B0 800433B0 468031A0 */  cvt.s.w   $f6, $f6
/* 1E7B4 800433B4 4483F000 */  mtc1      $v1, $f30
/* 1E7B8 800433B8 00000000 */  nop
/* 1E7BC 800433BC 4680F7A0 */  cvt.s.w   $f30, $f30
/* 1E7C0 800433C0 46001300 */  add.s     $f12, $f2, $f0
/* 1E7C4 800433C4 E7A60044 */  swc1      $f6, 0x44($sp)
/* 1E7C8 800433C8 C618003C */  lwc1      $f24, 0x3C($s0)
/* 1E7CC 800433CC 46006104 */  sqrt.s    $f4, $f12
/* 1E7D0 800433D0 46042032 */  c.eq.s    $f4, $f4
/* 1E7D4 800433D4 00000000 */  nop
/* 1E7D8 800433D8 45010004 */  bc1t      .L800433EC
/* 1E7DC 800433DC 00000000 */   nop
/* 1E7E0 800433E0 0C0187BC */  jal       sqrtf
/* 1E7E4 800433E4 00000000 */   nop
/* 1E7E8 800433E8 46000106 */  mov.s     $f4, $f0
.L800433EC:
/* 1E7EC 800433EC C7A80040 */  lwc1      $f8, 0x40($sp)
/* 1E7F0 800433F0 461E4000 */  add.s     $f0, $f8, $f30
/* 1E7F4 800433F4 46002586 */  mov.s     $f22, $f4
/* 1E7F8 800433F8 4616003E */  c.le.s    $f0, $f22
/* 1E7FC 800433FC 00000000 */  nop
/* 1E800 80043400 4501006A */  bc1t      .L800435AC
/* 1E804 80043404 00000000 */   nop
/* 1E808 80043408 C7A60044 */  lwc1      $f6, 0x44($sp)
/* 1E80C 8004340C 4606C000 */  add.s     $f0, $f24, $f6
/* 1E810 80043410 C7A80034 */  lwc1      $f8, 0x34($sp)
/* 1E814 80043414 4608003C */  c.lt.s    $f0, $f8
/* 1E818 80043418 00000000 */  nop
/* 1E81C 8004341C 45010063 */  bc1t      .L800435AC
/* 1E820 80043420 00000000 */   nop
/* 1E824 80043424 C7A6003C */  lwc1      $f6, 0x3C($sp)
/* 1E828 80043428 46064000 */  add.s     $f0, $f8, $f6
/* 1E82C 8004342C 4618003C */  c.lt.s    $f0, $f24
/* 1E830 80043430 00000000 */  nop
/* 1E834 80043434 4501005D */  bc1t      .L800435AC
/* 1E838 80043438 00000000 */   nop
/* 1E83C 8004343C 0C00A6C9 */  jal       clamp_angle
/* 1E840 80043440 C68C00A8 */   lwc1     $f12, 0xA8($s4)
/* 1E844 80043444 3C014334 */  lui       $at, (0x43340000 >> 16)
/* 1E848 80043448 44811000 */  mtc1      $at, $f2
/* 1E84C 8004344C 00000000 */  nop
/* 1E850 80043450 4602003C */  c.lt.s    $f0, $f2
/* 1E854 80043454 00000000 */  nop
/* 1E858 80043458 4500000F */  bc1f      .L80043498
/* 1E85C 8004345C 00000000 */   nop
/* 1E860 80043460 C6EC006C */  lwc1      $f12, 0x6C($s7)
/* 1E864 80043464 3C0142F0 */  lui       $at, (0x42F00000 >> 16)
/* 1E868 80043468 44814000 */  mtc1      $at, $f8
/* 1E86C 8004346C 0C00A6C9 */  jal       clamp_angle
/* 1E870 80043470 46086301 */   sub.s    $f12, $f12, $f8
/* 1E874 80043474 8E8200A4 */  lw        $v0, 0xA4($s4)
/* 1E878 80043478 3C080100 */  lui       $t0, (0x1000000 >> 16)
/* 1E87C 8004347C 00481024 */  and       $v0, $v0, $t0
/* 1E880 80043480 10400016 */  beqz      $v0, .L800434DC
/* 1E884 80043484 46000506 */   mov.s    $f20, $f0
/* 1E888 80043488 3C014270 */  lui       $at, (0x42700000 >> 16)
/* 1E88C 8004348C 44813000 */  mtc1      $at, $f6
/* 1E890 80043490 08010D34 */  j         .L800434D0
/* 1E894 80043494 4606A300 */   add.s    $f12, $f20, $f6
.L80043498:
/* 1E898 80043498 C6EC006C */  lwc1      $f12, 0x6C($s7)
/* 1E89C 8004349C 3C0142F0 */  lui       $at, (0x42F00000 >> 16)
/* 1E8A0 800434A0 44814000 */  mtc1      $at, $f8
/* 1E8A4 800434A4 0C00A6C9 */  jal       clamp_angle
/* 1E8A8 800434A8 46086300 */   add.s    $f12, $f12, $f8
/* 1E8AC 800434AC 8E8200A4 */  lw        $v0, 0xA4($s4)
/* 1E8B0 800434B0 3C080100 */  lui       $t0, (0x1000000 >> 16)
/* 1E8B4 800434B4 00481024 */  and       $v0, $v0, $t0
/* 1E8B8 800434B8 10400008 */  beqz      $v0, .L800434DC
/* 1E8BC 800434BC 46000506 */   mov.s    $f20, $f0
/* 1E8C0 800434C0 3C014270 */  lui       $at, (0x42700000 >> 16)
/* 1E8C4 800434C4 44813000 */  mtc1      $at, $f6
/* 1E8C8 800434C8 00000000 */  nop
/* 1E8CC 800434CC 4606A301 */  sub.s     $f12, $f20, $f6
.L800434D0:
/* 1E8D0 800434D0 0C00A6C9 */  jal       clamp_angle
/* 1E8D4 800434D4 00000000 */   nop
/* 1E8D8 800434D8 46000506 */  mov.s     $f20, $f0
.L800434DC:
/* 1E8DC 800434DC C7AC0030 */  lwc1      $f12, 0x30($sp)
/* 1E8E0 800434E0 4406D000 */  mfc1      $a2, $f26
/* 1E8E4 800434E4 4407E000 */  mfc1      $a3, $f28
/* 1E8E8 800434E8 0C00A720 */  jal       atan2
/* 1E8EC 800434EC C7AE0038 */   lwc1     $f14, 0x38($sp)
/* 1E8F0 800434F0 4600A306 */  mov.s     $f12, $f20
/* 1E8F4 800434F4 0C00A70A */  jal       get_clamped_angle_diff
/* 1E8F8 800434F8 46000386 */   mov.s    $f14, $f0
/* 1E8FC 800434FC 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 1E900 80043500 44811000 */  mtc1      $at, $f2
/* 1E904 80043504 46000005 */  abs.s     $f0, $f0
/* 1E908 80043508 4600103C */  c.lt.s    $f2, $f0
/* 1E90C 8004350C 00000000 */  nop
/* 1E910 80043510 45010026 */  bc1t      .L800435AC
/* 1E914 80043514 3C030001 */   lui      $v1, (0x10000 >> 16)
/* 1E918 80043518 8E220000 */  lw        $v0, 0x0($s1)
/* 1E91C 8004351C 00431024 */  and       $v0, $v0, $v1
/* 1E920 80043520 14400019 */  bnez      $v0, .L80043588
/* 1E924 80043524 3C032000 */   lui      $v1, (0x20000000 >> 16)
/* 1E928 80043528 8E020000 */  lw        $v0, 0x0($s0)
/* 1E92C 8004352C 00431024 */  and       $v0, $v0, $v1
/* 1E930 80043530 10400015 */  beqz      $v0, .L80043588
/* 1E934 80043534 4600D306 */   mov.s    $f12, $f26
/* 1E938 80043538 8FA60030 */  lw        $a2, 0x30($sp)
/* 1E93C 8004353C 8FA70038 */  lw        $a3, 0x38($sp)
/* 1E940 80043540 4600E386 */  mov.s     $f14, $f28
/* 1E944 80043544 E7AC0020 */  swc1      $f12, 0x20($sp)
/* 1E948 80043548 E7B80024 */  swc1      $f24, 0x24($sp)
/* 1E94C 8004354C 0C00A720 */  jal       atan2
/* 1E950 80043550 E7AE0028 */   swc1     $f14, 0x28($sp)
/* 1E954 80043554 0000202D */  daddu     $a0, $zero, $zero
/* 1E958 80043558 27A60024 */  addiu     $a2, $sp, 0x24
/* 1E95C 8004355C 27A70028 */  addiu     $a3, $sp, 0x28
/* 1E960 80043560 27A50020 */  addiu     $a1, $sp, 0x20
/* 1E964 80043564 C7A80044 */  lwc1      $f8, 0x44($sp)
/* 1E968 80043568 461EF080 */  add.s     $f2, $f30, $f30
/* 1E96C 8004356C E7B60010 */  swc1      $f22, 0x10($sp)
/* 1E970 80043570 E7A00014 */  swc1      $f0, 0x14($sp)
/* 1E974 80043574 E7A80018 */  swc1      $f8, 0x18($sp)
/* 1E978 80043578 0C0376B9 */  jal       npc_test_move_taller_with_slipping
/* 1E97C 8004357C E7A2001C */   swc1     $f2, 0x1C($sp)
/* 1E980 80043580 1440000A */  bnez      $v0, .L800435AC
/* 1E984 80043584 00000000 */   nop
.L80043588:
/* 1E988 80043588 C7A60048 */  lwc1      $f6, 0x48($sp)
/* 1E98C 8004358C 4606B03C */  c.lt.s    $f22, $f6
/* 1E990 80043590 00000000 */  nop
/* 1E994 80043594 45000005 */  bc1f      .L800435AC
/* 1E998 80043598 00000000 */   nop
/* 1E99C 8004359C 0200F02D */  daddu     $fp, $s0, $zero
/* 1E9A0 800435A0 0220B02D */  daddu     $s6, $s1, $zero
/* 1E9A4 800435A4 E7B60048 */  swc1      $f22, 0x48($sp)
/* 1E9A8 800435A8 AFB3002C */  sw        $s3, 0x2C($sp)
.L800435AC:
/* 1E9AC 800435AC 8E620000 */  lw        $v0, 0x0($s3)
/* 1E9B0 800435B0 26520001 */  addiu     $s2, $s2, 0x1
/* 1E9B4 800435B4 0242102A */  slt       $v0, $s2, $v0
/* 1E9B8 800435B8 1440FF5B */  bnez      $v0, .L80043328
/* 1E9BC 800435BC 00121080 */   sll      $v0, $s2, 2
.L800435C0:
/* 1E9C0 800435C0 3C02800B */  lui       $v0, %hi(gCurrentEncounter + 0x1C)
/* 1E9C4 800435C4 80420F2C */  lb        $v0, %lo(gCurrentEncounter + 0x1C)($v0)
/* 1E9C8 800435C8 26B50001 */  addiu     $s5, $s5, 0x1
/* 1E9CC 800435CC 02A2102A */  slt       $v0, $s5, $v0
/* 1E9D0 800435D0 1440FF4B */  bnez      $v0, .L80043300
/* 1E9D4 800435D4 00151080 */   sll      $v0, $s5, 2
.L800435D8:
/* 1E9D8 800435D8 8E820004 */  lw        $v0, 0x4($s4)
/* 1E9DC 800435DC 30424000 */  andi      $v0, $v0, 0x4000
/* 1E9E0 800435E0 14400021 */  bnez      $v0, .L80043668
/* 1E9E4 800435E4 0000102D */   daddu    $v0, $zero, $zero
/* 1E9E8 800435E8 13C0001F */  beqz      $fp, .L80043668
/* 1E9EC 800435EC 00000000 */   nop
/* 1E9F0 800435F0 0C04D07A */  jal       is_picking_up_item
/* 1E9F4 800435F4 00000000 */   nop
/* 1E9F8 800435F8 1440001B */  bnez      $v0, .L80043668
/* 1E9FC 800435FC 0000102D */   daddu    $v0, $zero, $zero
/* 1EA00 80043600 8E830000 */  lw        $v1, 0x0($s4)
/* 1EA04 80043604 8E8400E0 */  lw        $a0, 0xE0($s4)
/* 1EA08 80043608 3C020200 */  lui       $v0, (0x2000000 >> 16)
/* 1EA0C 8004360C AE9E00C8 */  sw        $fp, 0xC8($s4)
/* 1EA10 80043610 00621825 */  or        $v1, $v1, $v0
/* 1EA14 80043614 30848000 */  andi      $a0, $a0, 0x8000
/* 1EA18 80043618 10800012 */  beqz      $a0, .L80043664
/* 1EA1C 8004361C AE830000 */   sw       $v1, 0x0($s4)
/* 1EA20 80043620 0C03A5EE */  jal       close_status_bar
/* 1EA24 80043624 00000000 */   nop
/* 1EA28 80043628 24020001 */  addiu     $v0, $zero, 0x1
/* 1EA2C 8004362C 24030005 */  addiu     $v1, $zero, 0x5
/* 1EA30 80043630 3C01800B */  lui       $at, %hi(gCurrentEncounter + 0x5)
/* 1EA34 80043634 A0230F15 */  sb        $v1, %lo(gCurrentEncounter + 0x5)($at)
/* 1EA38 80043638 A2C30005 */  sb        $v1, 0x5($s6)
/* 1EA3C 8004363C 8FA8002C */  lw        $t0, 0x2C($sp)
/* 1EA40 80043640 0040182D */  daddu     $v1, $v0, $zero
/* 1EA44 80043644 3C01800B */  lui       $at, %hi(gCurrentEncounter + 0x8C)
/* 1EA48 80043648 AC360F9C */  sw        $s6, %lo(gCurrentEncounter + 0x8C)($at)
/* 1EA4C 8004364C 3C01800B */  lui       $at, %hi(gCurrentEncounter + 0x4)
/* 1EA50 80043650 A0230F14 */  sb        $v1, %lo(gCurrentEncounter + 0x4)($at)
/* 1EA54 80043654 3C01800B */  lui       $at, %hi(gCurrentEncounter + 0x88)
/* 1EA58 80043658 AC280F98 */  sw        $t0, %lo(gCurrentEncounter + 0x88)($at)
/* 1EA5C 8004365C 08010D9A */  j         .L80043668
/* 1EA60 80043660 00000000 */   nop
.L80043664:
/* 1EA64 80043664 0000102D */  daddu     $v0, $zero, $zero
.L80043668:
/* 1EA68 80043668 8FBF0074 */  lw        $ra, 0x74($sp)
/* 1EA6C 8004366C 8FBE0070 */  lw        $fp, 0x70($sp)
/* 1EA70 80043670 8FB7006C */  lw        $s7, 0x6C($sp)
/* 1EA74 80043674 8FB60068 */  lw        $s6, 0x68($sp)
/* 1EA78 80043678 8FB50064 */  lw        $s5, 0x64($sp)
/* 1EA7C 8004367C 8FB40060 */  lw        $s4, 0x60($sp)
/* 1EA80 80043680 8FB3005C */  lw        $s3, 0x5C($sp)
/* 1EA84 80043684 8FB20058 */  lw        $s2, 0x58($sp)
/* 1EA88 80043688 8FB10054 */  lw        $s1, 0x54($sp)
/* 1EA8C 8004368C 8FB00050 */  lw        $s0, 0x50($sp)
/* 1EA90 80043690 D7BE00A0 */  ldc1      $f30, 0xA0($sp)
/* 1EA94 80043694 D7BC0098 */  ldc1      $f28, 0x98($sp)
/* 1EA98 80043698 D7BA0090 */  ldc1      $f26, 0x90($sp)
/* 1EA9C 8004369C D7B80088 */  ldc1      $f24, 0x88($sp)
/* 1EAA0 800436A0 D7B60080 */  ldc1      $f22, 0x80($sp)
/* 1EAA4 800436A4 D7B40078 */  ldc1      $f20, 0x78($sp)
/* 1EAA8 800436A8 03E00008 */  jr        $ra
/* 1EAAC 800436AC 27BD00A8 */   addiu    $sp, $sp, 0xA8

### DECOMPILED C INSTRUCTIONS:

s32 check_conversation_trigger(void) {
    PlayerStatus* playerStatus = &gPlayerStatus;
    Camera* camera = &gCameras[gCurrentCameraID];
    EncounterStatus* encounterStatus = &gCurrentEncounter;
    f32 npcX, npcY, npcZ;
    f32 angle;
    f32 deltaX, deltaZ;
    Encounter* encounter;
    f32 playerX, playerY, playerZ;
    f32 playerColliderHeight;
    f32 playerColliderRadius;
    f32 length;
    f32 npcCollisionHeight;
    f32 npcCollisionRadius;
    Encounter* encounterTemp;
    Npc* npc;
    Npc* encounterNpc;
    Enemy* enemy;
    Enemy* encounterEnemy;
    f32 minLength;
    f32 xTemp, yTemp, zTemp;
    s32 i, j;

    playerStatus->encounteredNPC = NULL;
    playerStatus->flags &= ~PS_FLAG_HAS_CONVERSATION_NPC;
    playerColliderHeight = playerStatus->colliderHeight;
    playerColliderRadius = playerStatus->colliderDiameter / 2;
    playerX = playerStatus->position.x;
    playerY = playerStatus->position.y;
    playerZ = playerStatus->position.z;

    if (gPartnerStatus.partnerActionState != PARTNER_ACTION_NONE) {
        return FALSE;
    }

    encounter = NULL;
    npc = NULL;
    enemy = NULL;
    minLength = 65535.0f;

    for (i = 0; i < encounterStatus->numEncounters; i++) {
        encounterTemp = encounterStatus->encounterList[i];

        if (encounterTemp == NULL) {
            continue;
        }

        for (j = 0; j < encounterTemp->count; j++) {
            encounterEnemy = encounterTemp->enemy[j];

            if (encounterEnemy == NULL) {
                continue;
            }

            if (encounterEnemy->flags & (ENEMY_FLAG_SUSPENDED | ENEMY_FLAG_DISABLE_AI)) {
                continue;
            }

            if (!(encounterEnemy->flags & ENEMY_FLAG_PASSIVE)) {
                continue;
            }

            if ((encounterEnemy->flags & ENEMY_FLAG_CANT_INTERACT) || encounterEnemy->interactBytecode == NULL) {
                continue;
            }

            encounterNpc = get_npc_unsafe(encounterEnemy->npcID);

            npcX = encounterNpc->pos.x;
            npcY = encounterNpc->pos.y;
            npcZ = encounterNpc->pos.z;
            deltaX = npcX - playerX;
            deltaZ = npcZ - playerZ;
            npcCollisionHeight = encounterNpc->collisionHeight;
            npcCollisionRadius = encounterNpc->collisionDiameter;
            length = sqrtf(SQ(deltaX) + SQ(deltaZ));

            if ((playerColliderRadius + npcCollisionRadius <= length) ||
                (npcY + npcCollisionHeight < playerY) ||
                (playerY + playerColliderHeight < npcY)) {
                continue;
            }

            if (clamp_angle(playerStatus->spriteFacingAngle) < 180.0f) {
                angle = clamp_angle(camera->currentYaw - 120.0f);
                if (playerStatus->trueAnimation & SPRITE_ID_BACK_FACING) {
                    angle = clamp_angle(angle + 60.0f);
                }
            } else {
                angle = clamp_angle(camera->currentYaw + 120.0f);
                if (playerStatus->trueAnimation & SPRITE_ID_BACK_FACING) {
                    angle = clamp_angle(angle - 60.0f);
                }
            }

            if (fabsf(get_clamped_angle_diff(angle, atan2(playerX, playerZ, npcX, npcZ))) > 90.0f) {
                continue;
            }

            if (!(encounterEnemy->flags & ENEMY_FLAG_10000) && encounterNpc->flags & NPC_FLAG_20000000) {
                xTemp = npcX;
                yTemp = npcY;
                zTemp = npcZ;

                if (npc_test_move_taller_with_slipping(0, &xTemp, &yTemp, &zTemp, length,
                                                        atan2(npcX, npcZ, playerX, playerZ),
                                                        npcCollisionHeight,
                                                        2.0f * npcCollisionRadius)) {
                    continue;
                }
            }

            if (length < minLength) {
                minLength = length;
                encounter = encounterTemp;
                npc = encounterNpc;
                enemy = encounterEnemy;
            }
        }
    }

    if (!(playerStatus->animFlags & PA_FLAG_8BIT_MARIO) && npc != NULL && !is_picking_up_item()) {
        playerStatus->encounteredNPC = npc;
        playerStatus->flags |= PS_FLAG_HAS_CONVERSATION_NPC;
        if (playerStatus->pressedButtons & BUTTON_A) {
            close_status_bar();
            gCurrentEncounter.hitType = ENCOUNTER_TRIGGER_CONVERSATION;
            enemy->encountered = ENCOUNTER_TRIGGER_CONVERSATION;
            encounterStatus->currentEncounter = encounter;
            encounterStatus->currentEnemy = enemy;
            encounterStatus->firstStrikeType = FIRST_STRIKE_PLAYER;
            return TRUE;
        }
    }
    return FALSE;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel ShowShopPurchaseDialog
/* 7E139C 8028051C 27BDFFD0 */  addiu     $sp, $sp, -0x30
/* 7E13A0 80280520 AFB3001C */  sw        $s3, 0x1C($sp)
/* 7E13A4 80280524 0080982D */  daddu     $s3, $a0, $zero
/* 7E13A8 80280528 AFB00010 */  sw        $s0, 0x10($sp)
/* 7E13AC 8028052C 00A0802D */  daddu     $s0, $a1, $zero
/* 7E13B0 80280530 AFB60028 */  sw        $s6, 0x28($sp)
/* 7E13B4 80280534 3C168011 */  lui       $s6, %hi(gPlayerData)
/* 7E13B8 80280538 26D6F290 */  addiu     $s6, $s6, %lo(gPlayerData)
/* 7E13BC 8028053C AFBF002C */  sw        $ra, 0x2C($sp)
/* 7E13C0 80280540 AFB50024 */  sw        $s5, 0x24($sp)
/* 7E13C4 80280544 AFB40020 */  sw        $s4, 0x20($sp)
/* 7E13C8 80280548 AFB20018 */  sw        $s2, 0x18($sp)
/* 7E13CC 8028054C AFB10014 */  sw        $s1, 0x14($sp)
/* 7E13D0 80280550 8E750084 */  lw        $s5, 0x84($s3)
/* 7E13D4 80280554 3C038007 */  lui       $v1, %hi(gGameStatusPtr)
/* 7E13D8 80280558 8C63419C */  lw        $v1, %lo(gGameStatusPtr)($v1)
/* 7E13DC 8028055C 00151040 */  sll       $v0, $s5, 1
/* 7E13E0 80280560 8C740144 */  lw        $s4, 0x144($v1)
/* 7E13E4 80280564 00551021 */  addu      $v0, $v0, $s5
/* 7E13E8 80280568 8E830018 */  lw        $v1, 0x18($s4)
.L8028056C:
/* 7E13EC 8028056C 00021080 */  sll       $v0, $v0, 2
/* 7E13F0 80280570 00629021 */  addu      $s2, $v1, $v0
/* 7E13F4 80280574 96820000 */  lhu       $v0, 0x0($s4)
/* 7E13F8 80280578 8E430000 */  lw        $v1, 0x0($s2)
/* 7E13FC 8028057C 3042FFFE */  andi      $v0, $v0, 0xFFFE
.L80280580:
/* 7E1400 80280580 A6820000 */  sh        $v0, 0x0($s4)
/* 7E1404 80280584 3C028008 */  lui       $v0, %hi(gItemTable)
/* 7E1408 80280588 244278E0 */  addiu     $v0, $v0, %lo(gItemTable)
/* 7E140C 8028058C 00031940 */  sll       $v1, $v1, 5
/* 7E1410 80280590 0C03A640 */  jal       func_800E9900
/* 7E1414 80280594 00628821 */   addu     $s1, $v1, $v0
/* 7E1418 80280598 1200001B */  beqz      $s0, .L80280608
.L8028059C:
/* 7E141C 8028059C 00000000 */   nop
/* 7E1420 802805A0 96220018 */  lhu       $v0, 0x18($s1)
/* 7E1424 802805A4 3C018028 */  lui       $at, %hi(wShopSelectedItem)
.L802805A8:
/* 7E1428 802805A8 AC206530 */  sw        $zero, %lo(wShopSelectedItem)($at)
.L802805AC:
/* 7E142C 802805AC 3C018028 */  lui       $at, %hi(wShopBuyResult)
/* 7E1430 802805B0 AC206534 */  sw        $zero, %lo(wShopBuyResult)($at)
/* 7E1434 802805B4 30420040 */  andi      $v0, $v0, 0x40
/* 7E1438 802805B8 10400008 */  beqz      $v0, .L802805DC
/* 7E143C 802805BC 2407FFFF */   addiu    $a3, $zero, -0x1
/* 7E1440 802805C0 9223001A */  lbu       $v1, 0x1A($s1)
/* 7E1444 802805C4 00031080 */  sll       $v0, $v1, 2
/* 7E1448 802805C8 00431021 */  addu      $v0, $v0, $v1
/* 7E144C 802805CC 00021080 */  sll       $v0, $v0, 2
/* 7E1450 802805D0 3C078009 */  lui       $a3, %hi(D_8008F072)
.L802805D4:
/* 7E1454 802805D4 00E23821 */  addu      $a3, $a3, $v0
/* 7E1458 802805D8 80E7F072 */  lb        $a3, %lo(D_8008F072)($a3)
.L802805DC:
/* 7E145C 802805DC 8E250000 */  lw        $a1, 0x0($s1)
/* 7E1460 802805E0 8E460004 */  lw        $a2, 0x4($s2)
/* 7E1464 802805E4 0C0A0022 */  jal       shop_owner_buy_dialog
.L802805E8:
/* 7E1468 802805E8 0000202D */   daddu    $a0, $zero, $zero
/* 7E146C 802805EC AE620074 */  sw        $v0, 0x74($s3)
/* 7E1470 802805F0 0C03A6D5 */  jal       increment_status_bar_disabled
/* 7E1474 802805F4 AE600070 */   sw       $zero, 0x70($s3)
/* 7E1478 802805F8 0C03A640 */  jal       func_800E9900
/* 7E147C 802805FC 00000000 */   nop
/* 7E1480 80280600 0C03A546 */  jal       show_coin_counter
/* 7E1484 80280604 00000000 */   nop
.L80280608:
/* 7E1488 80280608 8E630070 */  lw        $v1, 0x70($s3)
.L8028060C:
/* 7E148C 8028060C 24100005 */  addiu     $s0, $zero, 0x5
/* 7E1490 80280610 10700085 */  beq       $v1, $s0, .L80280828
/* 7E1494 80280614 28620006 */   slti     $v0, $v1, 0x6
/* 7E1498 80280618 1040000D */  beqz      $v0, .L80280650
/* 7E149C 8028061C 24020001 */   addiu    $v0, $zero, 0x1
.L80280620:
/* 7E14A0 80280620 1062006D */  beq       $v1, $v0, .L802807D8
/* 7E14A4 80280624 28620002 */   slti     $v0, $v1, 0x2
/* 7E14A8 80280628 10400005 */  beqz      $v0, .L80280640
/* 7E14AC 8028062C 24020004 */   addiu    $v0, $zero, 0x4
/* 7E14B0 80280630 10600017 */  beqz      $v1, .L80280690
/* 7E14B4 80280634 0000102D */   daddu    $v0, $zero, $zero
/* 7E14B8 80280638 080A024B */  j         .L8028092C
/* 7E14BC 8028063C 00000000 */   nop
.L80280640:
/* 7E14C0 80280640 1062006F */  beq       $v1, $v0, .L80280800
.L80280644:
/* 7E14C4 80280644 0000102D */   daddu    $v0, $zero, $zero
/* 7E14C8 80280648 080A024B */  j         .L8028092C
/* 7E14CC 8028064C 00000000 */   nop
.L80280650:
/* 7E14D0 80280650 2410000A */  addiu     $s0, $zero, 0xA
/* 7E14D4 80280654 10700091 */  beq       $v1, $s0, .L8028089C
.L80280658:
/* 7E14D8 80280658 2862000B */   slti     $v0, $v1, 0xB
/* 7E14DC 8028065C 10400005 */  beqz      $v0, .L80280674
/* 7E14E0 80280660 24020006 */   addiu    $v0, $zero, 0x6
/* 7E14E4 80280664 1062007F */  beq       $v1, $v0, .L80280864
/* 7E14E8 80280668 0000102D */   daddu    $v0, $zero, $zero
/* 7E14EC 8028066C 080A024B */  j         .L8028092C
/* 7E14F0 80280670 00000000 */   nop
.L80280674:
/* 7E14F4 80280674 2402000B */  addiu     $v0, $zero, 0xB
/* 7E14F8 80280678 1062009D */  beq       $v1, $v0, .L802808F0
.L8028067C:
/* 7E14FC 8028067C 24020064 */   addiu    $v0, $zero, 0x64
/* 7E1500 80280680 10620012 */  beq       $v1, $v0, .L802806CC
/* 7E1504 80280684 0000102D */   daddu    $v0, $zero, $zero
/* 7E1508 80280688 080A024B */  j         .L8028092C
/* 7E150C 8028068C 00000000 */   nop
.L80280690:
/* 7E1510 80280690 0C0B1059 */  jal       does_script_exist
/* 7E1514 80280694 8E640074 */   lw       $a0, 0x74($s3)
/* 7E1518 80280698 144000A4 */  bnez      $v0, .L8028092C
/* 7E151C 8028069C 0000102D */   daddu    $v0, $zero, $zero
/* 7E1520 802806A0 3C04001E */  lui       $a0, (0x1E0001 >> 16)
/* 7E1524 802806A4 34840001 */  ori       $a0, $a0, (0x1E0001 & 0xFFFF)
/* 7E1528 802806A8 26650078 */  addiu     $a1, $s3, 0x78
/* 7E152C 802806AC 24020064 */  addiu     $v0, $zero, 0x64
/* 7E1530 802806B0 AE620070 */  sw        $v0, 0x70($s3)
/* 7E1534 802806B4 0C049640 */  jal       msg_get_printer_for_msg
.L802806B8:
/* 7E1538 802806B8 AE600078 */   sw       $zero, 0x78($s3)
/* 7E153C 802806BC 3C018028 */  lui       $at, %hi(D_80286528)
/* 7E1540 802806C0 AC226528 */  sw        $v0, %lo(D_80286528)($at)
/* 7E1544 802806C4 080A024B */  j         .L8028092C
/* 7E1548 802806C8 0000102D */   daddu    $v0, $zero, $zero
.L802806CC:
/* 7E154C 802806CC 8E700078 */  lw        $s0, 0x78($s3)
/* 7E1550 802806D0 24020001 */  addiu     $v0, $zero, 0x1
/* 7E1554 802806D4 16020095 */  bne       $s0, $v0, .L8028092C
/* 7E1558 802806D8 0000102D */   daddu    $v0, $zero, $zero
/* 7E155C 802806DC 3C028028 */  lui       $v0, %hi(D_80286528)
/* 7E1560 802806E0 8C426528 */  lw        $v0, %lo(D_80286528)($v0)
/* 7E1564 802806E4 904204E8 */  lbu       $v0, 0x4E8($v0)
.L802806E8:
/* 7E1568 802806E8 14400035 */  bnez      $v0, .L802807C0
.L802806EC:
/* 7E156C 802806EC 00000000 */   nop
/* 7E1570 802806F0 86C2000C */  lh        $v0, 0xC($s6)
/* 7E1574 802806F4 8E430004 */  lw        $v1, 0x4($s2)
/* 7E1578 802806F8 0043102A */  slt       $v0, $v0, $v1
/* 7E157C 802806FC 10400006 */  beqz      $v0, .L80280718
/* 7E1580 80280700 00000000 */   nop
/* 7E1584 80280704 0C0A005F */  jal       shop_owner_continue_speech
/* 7E1588 80280708 24040001 */   addiu    $a0, $zero, 0x1
glabel func_8028070C
/* 7E158C 8028070C AE620074 */  sw        $v0, 0x74($s3)
/* 7E1590 80280710 080A024A */  j         .L80280928
/* 7E1594 80280714 AE700070 */   sw       $s0, 0x70($s3)
.L80280718:
/* 7E1598 80280718 8E420000 */  lw        $v0, 0x0($s2)
/* 7E159C 8028071C 2442FF20 */  addiu     $v0, $v0, -0xE0
/* 7E15A0 80280720 2C420075 */  sltiu     $v0, $v0, 0x75
/* 7E15A4 80280724 1440000C */  bnez      $v0, .L80280758
/* 7E15A8 80280728 00000000 */   nop
/* 7E15AC 8028072C 0C039D5D */  jal       add_item
/* 7E15B0 80280730 0000202D */   daddu    $a0, $zero, $zero
/* 7E15B4 80280734 2403FFFF */  addiu     $v1, $zero, -0x1
/* 7E15B8 80280738 14430007 */  bne       $v0, $v1, .L80280758
/* 7E15BC 8028073C 00000000 */   nop
/* 7E15C0 80280740 0C0A005F */  jal       shop_owner_continue_speech
/* 7E15C4 80280744 24040002 */   addiu    $a0, $zero, 0x2
/* 7E15C8 80280748 AE620074 */  sw        $v0, 0x74($s3)
/* 7E15CC 8028074C 24020004 */  addiu     $v0, $zero, 0x4
/* 7E15D0 80280750 080A024A */  j         .L80280928
/* 7E15D4 80280754 AE620070 */   sw       $v0, 0x70($s3)
.L80280758:
/* 7E15D8 80280758 96C2000C */  lhu       $v0, 0xC($s6)
/* 7E15DC 8028075C 96430006 */  lhu       $v1, 0x6($s2)
/* 7E15E0 80280760 00431023 */  subu      $v0, $v0, $v1
/* 7E15E4 80280764 A6C2000C */  sh        $v0, 0xC($s6)
/* 7E15E8 80280768 8E440000 */  lw        $a0, 0x0($s2)
/* 7E15EC 8028076C 2482FF20 */  addiu     $v0, $a0, -0xE0
/* 7E15F0 80280770 2C420075 */  sltiu     $v0, $v0, 0x75
/* 7E15F4 80280774 1040000A */  beqz      $v0, .L802807A0
/* 7E15F8 80280778 00000000 */   nop
/* 7E15FC 8028077C 0C039DCF */  jal       add_badge
/* 7E1600 80280780 00000000 */   nop
/* 7E1604 80280784 0000202D */  daddu     $a0, $zero, $zero
/* 7E1608 80280788 3C05F840 */  lui       $a1, (0xF8405CF0 >> 16)
/* 7E160C 8028078C 34A55CF0 */  ori       $a1, $a1, (0xF8405CF0 & 0xFFFF)
.L80280790:
/* 7E1610 80280790 0C0B2026 */  jal       evt_set_variable
/* 7E1614 80280794 24060001 */   addiu    $a2, $zero, 0x1
/* 7E1618 80280798 080A01EA */  j         func_802807A8
/* 7E161C 8028079C 00000000 */   nop
.L802807A0:
/* 7E1620 802807A0 0C039D5D */  jal       add_item
/* 7E1624 802807A4 00000000 */   nop
glabel func_802807A8
/* 7E1628 802807A8 0C0A005F */  jal       shop_owner_continue_speech
/* 7E162C 802807AC 24040003 */   addiu    $a0, $zero, 0x3
/* 7E1630 802807B0 AE620074 */  sw        $v0, 0x74($s3)
/* 7E1634 802807B4 24020005 */  addiu     $v0, $zero, 0x5
/* 7E1638 802807B8 080A024A */  j         .L80280928
/* 7E163C 802807BC AE620070 */   sw       $v0, 0x70($s3)
.L802807C0:
/* 7E1640 802807C0 0C0A00B4 */  jal       shop_owner_reset_speech
/* 7E1644 802807C4 24040016 */   addiu    $a0, $zero, 0x16
/* 7E1648 802807C8 AE620074 */  sw        $v0, 0x74($s3)
/* 7E164C 802807CC 24020006 */  addiu     $v0, $zero, 0x6
glabel GetActionCommandResult
/* 7E1650 802807D0 080A024A */  j         .L80280928
/* 7E1654 802807D4 AE620070 */   sw       $v0, 0x70($s3)
.L802807D8:
/* 7E1658 802807D8 8E640074 */  lw        $a0, 0x74($s3)
/* 7E165C 802807DC 0C0B1059 */  jal       does_script_exist
/* 7E1660 802807E0 00000000 */   nop
/* 7E1664 802807E4 14400051 */  bnez      $v0, .L8028092C
/* 7E1668 802807E8 0000102D */   daddu    $v0, $zero, $zero
/* 7E166C 802807EC 8E430000 */  lw        $v1, 0x0($s2)
/* 7E1670 802807F0 3C018028 */  lui       $at, %hi(wShopBuyResult)
.L802807F4:
/* 7E1674 802807F4 AC206534 */  sw        $zero, %lo(wShopBuyResult)($at)
/* 7E1678 802807F8 080A0214 */  j         .L80280850
/* 7E167C 802807FC 2402000A */   addiu    $v0, $zero, 0xA
.L80280800:
/* 7E1680 80280800 8E640074 */  lw        $a0, 0x74($s3)
/* 7E1684 80280804 0C0B1059 */  jal       does_script_exist
/* 7E1688 80280808 00000000 */   nop
/* 7E168C 8028080C 14400047 */  bnez      $v0, .L8028092C
/* 7E1690 80280810 0000102D */   daddu    $v0, $zero, $zero
/* 7E1694 80280814 8E430000 */  lw        $v1, 0x0($s2)
glabel PartnerYieldTurn
/* 7E1698 80280818 3C018028 */  lui       $at, %hi(wShopBuyResult)
/* 7E169C 8028081C AC306534 */  sw        $s0, %lo(wShopBuyResult)($at)
/* 7E16A0 80280820 080A0214 */  j         .L80280850
/* 7E16A4 80280824 2402000A */   addiu    $v0, $zero, 0xA
.L80280828:
/* 7E16A8 80280828 8E640074 */  lw        $a0, 0x74($s3)
/* 7E16AC 8028082C 0C0B1059 */  jal       does_script_exist
/* 7E16B0 80280830 00000000 */   nop
/* 7E16B4 80280834 1440003D */  bnez      $v0, .L8028092C
/* 7E16B8 80280838 0000102D */   daddu    $v0, $zero, $zero
/* 7E16BC 8028083C 8E430000 */  lw        $v1, 0x0($s2)
glabel GetDamageIntensity
/* 7E16C0 80280840 24020001 */  addiu     $v0, $zero, 0x1
/* 7E16C4 80280844 3C018028 */  lui       $at, %hi(wShopBuyResult)
/* 7E16C8 80280848 AC226534 */  sw        $v0, %lo(wShopBuyResult)($at)
/* 7E16CC 8028084C 2402000A */  addiu     $v0, $zero, 0xA
.L80280850:
/* 7E16D0 80280850 AE620070 */  sw        $v0, 0x70($s3)
/* 7E16D4 80280854 3C018028 */  lui       $at, %hi(wShopSelectedItem)
/* 7E16D8 80280858 AC236530 */  sw        $v1, %lo(wShopSelectedItem)($at)
.L8028085C:
/* 7E16DC 8028085C 080A024B */  j         .L8028092C
/* 7E16E0 80280860 0000102D */   daddu    $v0, $zero, $zero
.L80280864:
/* 7E16E4 80280864 8E640074 */  lw        $a0, 0x74($s3)
/* 7E16E8 80280868 0C0B1059 */  jal       does_script_exist
/* 7E16EC 8028086C 00000000 */   nop
/* 7E16F0 80280870 1440002E */  bnez      $v0, .L8028092C
.L80280874:
/* 7E16F4 80280874 0000102D */   daddu    $v0, $zero, $zero
.L80280878:
/* 7E16F8 80280878 8E430000 */  lw        $v1, 0x0($s2)
/* 7E16FC 8028087C 24020003 */  addiu     $v0, $zero, 0x3
glabel AddEffectOffset
/* 7E1700 80280880 3C018028 */  lui       $at, %hi(wShopBuyResult)
/* 7E1704 80280884 AC226534 */  sw        $v0, %lo(wShopBuyResult)($at)
/* 7E1708 80280888 AE700070 */  sw        $s0, 0x70($s3)
/* 7E170C 8028088C 3C018028 */  lui       $at, %hi(wShopSelectedItem)
/* 7E1710 80280890 AC236530 */  sw        $v1, %lo(wShopSelectedItem)($at)
/* 7E1714 80280894 080A024B */  j         .L8028092C
/* 7E1718 80280898 0000102D */   daddu    $v0, $zero, $zero
.L8028089C:
/* 7E171C 8028089C 8E820010 */  lw        $v0, 0x10($s4)
/* 7E1720 802808A0 3C108028 */  lui       $s0, %hi(wShopBuyCallbackScript)
/* 7E1724 802808A4 2610652C */  addiu     $s0, $s0, %lo(wShopBuyCallbackScript)
/* 7E1728 802808A8 1040000E */  beqz      $v0, .L802808E4
/* 7E172C 802808AC AE000000 */   sw       $zero, 0x0($s0)
/* 7E1730 802808B0 8C44000C */  lw        $a0, 0xC($v0)
/* 7E1734 802808B4 1080000B */  beqz      $a0, .L802808E4
/* 7E1738 802808B8 24050001 */   addiu    $a1, $zero, 0x1
/* 7E173C 802808BC 0C0B0CF8 */  jal       start_script
/* 7E1740 802808C0 0000302D */   daddu    $a2, $zero, $zero
/* 7E1744 802808C4 3C038028 */  lui       $v1, %hi(wShopBuyResult)
/* 7E1748 802808C8 8C636534 */  lw        $v1, %lo(wShopBuyResult)($v1)
/* 7E174C 802808CC 3C048028 */  lui       $a0, %hi(wShopSelectedItem)
/* 7E1750 802808D0 8C846530 */  lw        $a0, %lo(wShopSelectedItem)($a0)
/* 7E1754 802808D4 AE020000 */  sw        $v0, 0x0($s0)
/* 7E1758 802808D8 AC55008C */  sw        $s5, 0x8C($v0)
/* 7E175C 802808DC AC430084 */  sw        $v1, 0x84($v0)
/* 7E1760 802808E0 AC440088 */  sw        $a0, 0x88($v0)
.L802808E4:
/* 7E1764 802808E4 2402000B */  addiu     $v0, $zero, 0xB
/* 7E1768 802808E8 080A024A */  j         .L80280928
/* 7E176C 802808EC AE620070 */   sw       $v0, 0x70($s3)
.L802808F0:
/* 7E1770 802808F0 3C028028 */  lui       $v0, %hi(wShopBuyCallbackScript)
/* 7E1774 802808F4 8C42652C */  lw        $v0, %lo(wShopBuyCallbackScript)($v0)
/* 7E1778 802808F8 10400005 */  beqz      $v0, .L80280910
/* 7E177C 802808FC 00000000 */   nop
/* 7E1780 80280900 0C0B1059 */  jal       does_script_exist
/* 7E1784 80280904 8C440144 */   lw       $a0, 0x144($v0)
/* 7E1788 80280908 14400008 */  bnez      $v0, .L8028092C
/* 7E178C 8028090C 0000102D */   daddu    $v0, $zero, $zero
.L80280910:
/* 7E1790 80280910 0C03A6CC */  jal       decrement_status_bar_disabled
/* 7E1794 80280914 00000000 */   nop
/* 7E1798 80280918 0C03A5B2 */  jal       hide_coin_counter_immediately
/* 7E179C 8028091C 00000000 */   nop
/* 7E17A0 80280920 080A024B */  j         .L8028092C
/* 7E17A4 80280924 24020001 */   addiu    $v0, $zero, 0x1
.L80280928:
/* 7E17A8 80280928 0000102D */  daddu     $v0, $zero, $zero
.L8028092C:
/* 7E17AC 8028092C 8FBF002C */  lw        $ra, 0x2C($sp)
/* 7E17B0 80280930 8FB60028 */  lw        $s6, 0x28($sp)
/* 7E17B4 80280934 8FB50024 */  lw        $s5, 0x24($sp)
/* 7E17B8 80280938 8FB40020 */  lw        $s4, 0x20($sp)
/* 7E17BC 8028093C 8FB3001C */  lw        $s3, 0x1C($sp)
/* 7E17C0 80280940 8FB20018 */  lw        $s2, 0x18($sp)
/* 7E17C4 80280944 8FB10014 */  lw        $s1, 0x14($sp)
/* 7E17C8 80280948 8FB00010 */  lw        $s0, 0x10($sp)
/* 7E17CC 8028094C 03E00008 */  jr        $ra
glabel LoadStarPowerScript
/* 7E17D0 80280950 27BD0030 */   addiu    $sp, $sp, 0x30

### DECOMPILED C INSTRUCTIONS:

API_CALLABLE(ShowShopPurchaseDialog) {
    PlayerData* playerData = &gPlayerData;
    s32 shopItemSlot = script->varTable[0];
    Shop* shop = gGameStatusPtr->mapShop;
    ShopItemData* shopInventory = &shop->staticInventory[shopItemSlot];
    ItemData* shopItem = &gItemTable[shopInventory->itemID];
    s32 bpCost;

    static MessagePrintState* D_80286528;
    static Evt* wShopBuyCallbackScript;
    static s32 wShopSelectedItem;
    static s32 wShopBuyResult;

    // functionTemp[0] is PurchaseDialogState
    // functionTemp[1] is speech script ID
    // functionTemp[2] is speech printer isClosed writeback

    shop->flags &= ~SHOP_FLAG_1;
    func_800E9900();

    if (isInitialCall) {
        wShopSelectedItem = ITEM_NONE;
        wShopBuyResult = SHOP_BUY_RESULT_NOT_ENOUGH_COINS;
        bpCost = -1;
        if (shopItem->typeFlags & ITEM_TYPE_FLAG_BADGE) {
            bpCost = gMoveTable[shopItem->moveID].costBP;
        }
        script->functionTemp[1] = shop_owner_buy_dialog(SHOP_MSG_BUY_CONFIRM, shopItem->nameMsg, shopInventory->price, bpCost);
        script->functionTemp[0] = PURCHASE_DIALOG_STATE_INIT;
        increment_status_bar_disabled();
        func_800E9900();
        show_coin_counter();
    }

    switch (script->functionTemp[0]) {
        case PURCHASE_DIALOG_STATE_INIT:
            if (!does_script_exist(script->functionTemp[1])) {
                script->functionTemp[0] = PURCHASE_DIALOG_STATE_WAIT_FOR_SPEECH;
                script->functionTemp[2] = FALSE;
                D_80286528 = msg_get_printer_for_msg(MSG_Choice_0001, &script->functionTemp[2]);
            }
            break;
        case PURCHASE_DIALOG_STATE_WAIT_FOR_SPEECH:
            if (script->functionTemp[2] == TRUE) {
                if (D_80286528->currentOption == 0) {
                    if (playerData->coins < shopInventory->price) {
                        script->functionTemp[1] = shop_owner_continue_speech(SHOP_MSG_NOT_ENOUGH_COINS);
                        script->functionTemp[0] = PURCHASE_DIALOG_STATE_NOT_ENOUGH_COINS;
                    } else if (!IS_BADGE(shopInventory->itemID) && add_item(ITEM_NONE) == -1) {
                        script->functionTemp[1] = shop_owner_continue_speech(SHOP_MSG_NOT_ENOUGH_ROOM);
                        script->functionTemp[0] = PURCHASE_DIALOG_STATE_NOT_ENOUGH_ROOM;
                    } else {
                        playerData->coins -= shopInventory->price;
                        if (IS_BADGE(shopInventory->itemID)) {
                            add_badge(shopInventory->itemID);
                            evt_set_variable(NULL, GF_MAC01_BoughtBadgeFromRowf, TRUE);
                        } else {
                            add_item(shopInventory->itemID);
                        }
                        script->functionTemp[1] = shop_owner_continue_speech(SHOP_MSG_BUY_THANK_YOU);
                        script->functionTemp[0] = PURCHASE_DIALOG_STATE_ACCEPTED;
                    }
                } else {
                    script->functionTemp[1] = shop_owner_reset_speech(SHOP_MSG_FAREWELL);
                    script->functionTemp[0] = PURCHASE_DIALOG_STATE_CANCEL;
                }
            }
            break;
        case PURCHASE_DIALOG_STATE_NOT_ENOUGH_COINS:
            if (!does_script_exist(script->functionTemp[1])) {
                wShopBuyResult = SHOP_BUY_RESULT_NOT_ENOUGH_COINS;
                wShopSelectedItem = shopInventory->itemID;
                script->functionTemp[0] = PURCHASE_DIALOG_STATE_EXEC_CALLBACK;
            }
            break;
        case PURCHASE_DIALOG_STATE_NOT_ENOUGH_ROOM:
            if (!does_script_exist(script->functionTemp[1])) {
                wShopBuyResult = SHOP_BUY_RESULT_NOT_ENOUGH_ROOM;
                wShopSelectedItem = shopInventory->itemID;
                script->functionTemp[0] = PURCHASE_DIALOG_STATE_EXEC_CALLBACK;
            }
            break;
        case PURCHASE_DIALOG_STATE_ACCEPTED:
            if (!does_script_exist(script->functionTemp[1])) {
                wShopBuyResult = SHOP_BUY_RESULT_OK;
                wShopSelectedItem = shopInventory->itemID;
                script->functionTemp[0] = PURCHASE_DIALOG_STATE_EXEC_CALLBACK;
            }
            break;
        case PURCHASE_DIALOG_STATE_CANCEL:
            if (!does_script_exist(script->functionTemp[1])) {
                wShopBuyResult = SHOP_BUY_RESULT_CANCEL;
                wShopSelectedItem = shopInventory->itemID;
                script->functionTemp[0] = PURCHASE_DIALOG_STATE_EXEC_CALLBACK;
            }
            break;
        case PURCHASE_DIALOG_STATE_EXEC_CALLBACK:
            wShopBuyCallbackScript = NULL;
            if (shop->owner != NULL) {
                if (shop->owner->onBuyEvt != NULL) {
                    wShopBuyCallbackScript = start_script(shop->owner->onBuyEvt, EVT_PRIORITY_1, 0);
                    wShopBuyCallbackScript->varTable[0] = wShopBuyResult;
                    wShopBuyCallbackScript->varTable[1] = wShopSelectedItem;
                    wShopBuyCallbackScript->varTable[2] = shopItemSlot;
                }
            }
            script->functionTemp[0] = PURCHASE_DIALOG_STATE_AWAIT_CALLBACK;
            break;
        case PURCHASE_DIALOG_STATE_AWAIT_CALLBACK:
            if (wShopBuyCallbackScript != NULL && does_script_exist(wShopBuyCallbackScript->id)) {
                break;
            }
            decrement_status_bar_disabled();
            hide_coin_counter_immediately();
            return ApiStatus_DONE1;
    }
    return ApiStatus_BLOCK;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel water_splash_appendGfx
/* 3BC51C E00BE5BC 27BDFF40 */  addiu     $sp, $sp, -0xC0
/* 3BC520 E00BE5C0 3C05DB06 */  lui       $a1, (0xDB060024 >> 16)
/* 3BC524 E00BE5C4 34A50024 */  ori       $a1, $a1, (0xDB060024 & 0xFFFF)
/* 3BC528 E00BE5C8 AFA400C0 */  sw        $a0, 0xC0($sp)
/* 3BC52C E00BE5CC 27A40010 */  addiu     $a0, $sp, 0x10
/* 3BC530 E00BE5D0 AFB1009C */  sw        $s1, 0x9C($sp)
/* 3BC534 E00BE5D4 3C110001 */  lui       $s1, (0x11630 >> 16)
/* 3BC538 E00BE5D8 36311630 */  ori       $s1, $s1, (0x11630 & 0xFFFF)
/* 3BC53C E00BE5DC AFB300A4 */  sw        $s3, 0xA4($sp)
/* 3BC540 E00BE5E0 3C13800A */  lui       $s3, %hi(gMainGfxPos)
/* 3BC544 E00BE5E4 2673A66C */  addiu     $s3, $s3, %lo(gMainGfxPos)
/* 3BC548 E00BE5E8 AFBF00BC */  sw        $ra, 0xBC($sp)
/* 3BC54C E00BE5EC AFBE00B8 */  sw        $fp, 0xB8($sp)
/* 3BC550 E00BE5F0 AFB700B4 */  sw        $s7, 0xB4($sp)
/* 3BC554 E00BE5F4 AFB600B0 */  sw        $s6, 0xB0($sp)
/* 3BC558 E00BE5F8 AFB500AC */  sw        $s5, 0xAC($sp)
/* 3BC55C E00BE5FC AFB400A8 */  sw        $s4, 0xA8($sp)
/* 3BC560 E00BE600 AFB200A0 */  sw        $s2, 0xA0($sp)
/* 3BC564 E00BE604 AFB00098 */  sw        $s0, 0x98($sp)
/* 3BC568 E00BE608 8E670000 */  lw        $a3, 0x0($s3)
/* 3BC56C E00BE60C 8FAC00C0 */  lw        $t4, 0xC0($sp)
/* 3BC570 E00BE610 00E0182D */  daddu     $v1, $a3, $zero
/* 3BC574 E00BE614 8D92000C */  lw        $s2, 0xC($t4)
/* 3BC578 E00BE618 24E70008 */  addiu     $a3, $a3, 0x8
/* 3BC57C E00BE61C AE670000 */  sw        $a3, 0x0($s3)
/* 3BC580 E00BE620 8E4C0030 */  lw        $t4, 0x30($s2)
/* 3BC584 E00BE624 24160001 */  addiu     $s6, $zero, 0x1
/* 3BC588 E00BE628 AFAC0090 */  sw        $t4, 0x90($sp)
/* 3BC58C E00BE62C C6400004 */  lwc1      $f0, 0x4($s2)
/* 3BC590 E00BE630 C6420008 */  lwc1      $f2, 0x8($s2)
/* 3BC594 E00BE634 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 3BC598 E00BE638 AC620000 */  sw        $v0, 0x0($v1)
/* 3BC59C E00BE63C 24E20008 */  addiu     $v0, $a3, 0x8
/* 3BC5A0 E00BE640 AC600004 */  sw        $zero, 0x4($v1)
/* 3BC5A4 E00BE644 AE620000 */  sw        $v0, 0x0($s3)
/* 3BC5A8 E00BE648 ACE50000 */  sw        $a1, 0x0($a3)
/* 3BC5AC E00BE64C 4600010D */  trunc.w.s $f4, $f0
/* 3BC5B0 E00BE650 E7A40094 */  swc1      $f4, 0x94($sp)
/* 3BC5B4 E00BE654 C7A40094 */  lwc1      $f4, 0x94($sp)
/* 3BC5B8 E00BE658 46802120 */  cvt.s.w   $f4, $f4
/* 3BC5BC E00BE65C 44052000 */  mfc1      $a1, $f4
/* 3BC5C0 E00BE660 4600110D */  trunc.w.s $f4, $f2
/* 3BC5C4 E00BE664 441E2000 */  mfc1      $fp, $f4
/* 3BC5C8 E00BE668 8FAC00C0 */  lw        $t4, 0xC0($sp)
/* 3BC5CC E00BE66C 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 3BC5D0 E00BE670 8D820010 */  lw        $v0, 0x10($t4)
/* 3BC5D4 E00BE674 449E2000 */  mtc1      $fp, $f4
/* 3BC5D8 E00BE678 00000000 */  nop
/* 3BC5DC E00BE67C 46802120 */  cvt.s.w   $f4, $f4
/* 3BC5E0 E00BE680 8C42001C */  lw        $v0, 0x1C($v0)
/* 3BC5E4 E00BE684 44062000 */  mfc1      $a2, $f4
/* 3BC5E8 E00BE688 00431021 */  addu      $v0, $v0, $v1
/* 3BC5EC E00BE68C 3C03800B */  lui       $v1, %hi(gCameras)
/* 3BC5F0 E00BE690 24631D80 */  addiu     $v1, $v1, %lo(gCameras)
/* 3BC5F4 E00BE694 ACE20004 */  sw        $v0, 0x4($a3)
/* 3BC5F8 E00BE698 3C028007 */  lui       $v0, %hi(gCurrentCameraID)
/* 3BC5FC E00BE69C 8C427410 */  lw        $v0, %lo(gCurrentCameraID)($v0)
/* 3BC600 E00BE6A0 8E47000C */  lw        $a3, 0xC($s2)
/* 3BC604 E00BE6A4 00028080 */  sll       $s0, $v0, 2
/* 3BC608 E00BE6A8 02028021 */  addu      $s0, $s0, $v0
/* 3BC60C E00BE6AC 00108080 */  sll       $s0, $s0, 2
/* 3BC610 E00BE6B0 02028023 */  subu      $s0, $s0, $v0
/* 3BC614 E00BE6B4 001010C0 */  sll       $v0, $s0, 3
/* 3BC618 E00BE6B8 02028021 */  addu      $s0, $s0, $v0
/* 3BC61C E00BE6BC 001080C0 */  sll       $s0, $s0, 3
/* 3BC620 E00BE6C0 0C080108 */  jal       shim_guTranslateF
/* 3BC624 E00BE6C4 02038021 */   addu     $s0, $s0, $v1
/* 3BC628 E00BE6C8 27B40050 */  addiu     $s4, $sp, 0x50
/* 3BC62C E00BE6CC 8E450034 */  lw        $a1, 0x34($s2)
/* 3BC630 E00BE6D0 0280202D */  daddu     $a0, $s4, $zero
/* 3BC634 E00BE6D4 00A0302D */  daddu     $a2, $a1, $zero
/* 3BC638 E00BE6D8 0C080110 */  jal       shim_guScaleF
/* 3BC63C E00BE6DC 00A0382D */   daddu    $a3, $a1, $zero
/* 3BC640 E00BE6E0 0280202D */  daddu     $a0, $s4, $zero
/* 3BC644 E00BE6E4 27A50010 */  addiu     $a1, $sp, 0x10
/* 3BC648 E00BE6E8 0C080114 */  jal       shim_guMtxCatF
/* 3BC64C E00BE6EC 00A0302D */   daddu    $a2, $a1, $zero
/* 3BC650 E00BE6F0 27A40010 */  addiu     $a0, $sp, 0x10
/* 3BC654 E00BE6F4 3C158007 */  lui       $s5, %hi(gMatrixListPos)
/* 3BC658 E00BE6F8 26B541F0 */  addiu     $s5, $s5, %lo(gMatrixListPos)
/* 3BC65C E00BE6FC 3C17800A */  lui       $s7, %hi(gDisplayContext)
/* 3BC660 E00BE700 26F7A674 */  addiu     $s7, $s7, %lo(gDisplayContext)
/* 3BC664 E00BE704 96A50000 */  lhu       $a1, 0x0($s5)
/* 3BC668 E00BE708 8EE20000 */  lw        $v0, 0x0($s7)
/* 3BC66C E00BE70C 00052980 */  sll       $a1, $a1, 6
/* 3BC670 E00BE710 00B12821 */  addu      $a1, $a1, $s1
/* 3BC674 E00BE714 0C080118 */  jal       shim_guMtxF2L
/* 3BC678 E00BE718 00452821 */   addu     $a1, $v0, $a1
/* 3BC67C E00BE71C 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 3BC680 E00BE720 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 3BC684 E00BE724 3C06DA38 */  lui       $a2, (0xDA380000 >> 16)
/* 3BC688 E00BE728 00D63025 */  or        $a2, $a2, $s6
/* 3BC68C E00BE72C 8E640000 */  lw        $a0, 0x0($s3)
/* 3BC690 E00BE730 96A20000 */  lhu       $v0, 0x0($s5)
/* 3BC694 E00BE734 0080282D */  daddu     $a1, $a0, $zero
/* 3BC698 E00BE738 24840008 */  addiu     $a0, $a0, 0x8
/* 3BC69C E00BE73C AE640000 */  sw        $a0, 0x0($s3)
/* 3BC6A0 E00BE740 ACA30000 */  sw        $v1, 0x0($a1)
/* 3BC6A4 E00BE744 00561821 */  addu      $v1, $v0, $s6
/* 3BC6A8 E00BE748 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3BC6AC E00BE74C 00021180 */  sll       $v0, $v0, 6
/* 3BC6B0 E00BE750 A6A30000 */  sh        $v1, 0x0($s5)
/* 3BC6B4 E00BE754 8EE30000 */  lw        $v1, 0x0($s7)
/* 3BC6B8 E00BE758 00511021 */  addu      $v0, $v0, $s1
/* 3BC6BC E00BE75C 00621821 */  addu      $v1, $v1, $v0
/* 3BC6C0 E00BE760 24820008 */  addiu     $v0, $a0, 0x8
/* 3BC6C4 E00BE764 ACA30004 */  sw        $v1, 0x4($a1)
/* 3BC6C8 E00BE768 AE620000 */  sw        $v0, 0x0($s3)
/* 3BC6CC E00BE76C AC860000 */  sw        $a2, 0x0($a0)
/* 3BC6D0 E00BE770 8E030204 */  lw        $v1, 0x204($s0)
/* 3BC6D4 E00BE774 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 3BC6D8 E00BE778 AC820008 */  sw        $v0, 0x8($a0)
/* 3BC6DC E00BE77C 3C020900 */  lui       $v0, %hi(D_09000100_415160)
/* 3BC6E0 E00BE780 24420100 */  addiu     $v0, $v0, %lo(D_09000100_415160)
/* 3BC6E4 E00BE784 AC82000C */  sw        $v0, 0xC($a0)
/* 3BC6E8 E00BE788 AC830004 */  sw        $v1, 0x4($a0)
/* 3BC6EC E00BE78C 8FAC00C0 */  lw        $t4, 0xC0($sp)
/* 3BC6F0 E00BE790 26520038 */  addiu     $s2, $s2, 0x38
/* 3BC6F4 E00BE794 8D820008 */  lw        $v0, 0x8($t4)
/* 3BC6F8 E00BE798 24840010 */  addiu     $a0, $a0, 0x10
/* 3BC6FC E00BE79C 02C2102A */  slt       $v0, $s6, $v0
/* 3BC700 E00BE7A0 104000BB */  beqz      $v0, .LE00BEA90
/* 3BC704 E00BE7A4 AE640000 */   sw       $a0, 0x0($s3)
/* 3BC708 E00BE7A8 0260882D */  daddu     $s1, $s3, $zero
/* 3BC70C E00BE7AC 3C130001 */  lui       $s3, (0x11630 >> 16)
/* 3BC710 E00BE7B0 36731630 */  ori       $s3, $s3, (0x11630 & 0xFFFF)
/* 3BC714 E00BE7B4 26500030 */  addiu     $s0, $s2, 0x30
.LE00BE7B8:
/* 3BC718 E00BE7B8 C600FFD4 */  lwc1      $f0, -0x2C($s0)
/* 3BC71C E00BE7BC 4600010D */  trunc.w.s $f4, $f0
/* 3BC720 E00BE7C0 44022000 */  mfc1      $v0, $f4
/* 3BC724 E00BE7C4 8FAC0094 */  lw        $t4, 0x94($sp)
/* 3BC728 E00BE7C8 C600FFD8 */  lwc1      $f0, -0x28($s0)
/* 3BC72C E00BE7CC 004C5021 */  addu      $t2, $v0, $t4
/* 3BC730 E00BE7D0 4600010D */  trunc.w.s $f4, $f0
/* 3BC734 E00BE7D4 44022000 */  mfc1      $v0, $f4
/* 3BC738 E00BE7D8 05410004 */  bgez      $t2, .LE00BE7EC
/* 3BC73C E00BE7DC 005E5821 */   addu     $t3, $v0, $fp
/* 3BC740 E00BE7E0 3142007F */  andi      $v0, $t2, 0x7F
/* 3BC744 E00BE7E4 0802F9FC */  j         .LE00BE7F0
/* 3BC748 E00BE7E8 00025023 */   negu     $t2, $v0
.LE00BE7EC:
/* 3BC74C E00BE7EC 314A007F */  andi      $t2, $t2, 0x7F
.LE00BE7F0:
/* 3BC750 E00BE7F0 19600003 */  blez      $t3, .LE00BE800
/* 3BC754 E00BE7F4 3162003F */   andi     $v0, $t3, 0x3F
/* 3BC758 E00BE7F8 0802FA01 */  j         .LE00BE804
/* 3BC75C E00BE7FC 00025823 */   negu     $t3, $v0
.LE00BE800:
/* 3BC760 E00BE800 316B003F */  andi      $t3, $t3, 0x3F
.LE00BE804:
/* 3BC764 E00BE804 3C02FD10 */  lui       $v0, (0xFD10013F >> 16)
/* 3BC768 E00BE808 3442013F */  ori       $v0, $v0, (0xFD10013F & 0xFFFF)
/* 3BC76C E00BE80C 3C07F510 */  lui       $a3, (0xF5101100 >> 16)
/* 3BC770 E00BE810 34E71100 */  ori       $a3, $a3, (0xF5101100 & 0xFFFF)
/* 3BC774 E00BE814 3C050701 */  lui       $a1, (0x7014050 >> 16)
/* 3BC778 E00BE818 34A54050 */  ori       $a1, $a1, (0x7014050 & 0xFFFF)
/* 3BC77C E00BE81C 3C090101 */  lui       $t1, (0x1014050 >> 16)
/* 3BC780 E00BE820 35294050 */  ori       $t1, $t1, (0x1014050 & 0xFFFF)
/* 3BC784 E00BE824 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 3BC788 E00BE828 25660078 */  addiu     $a2, $t3, 0x78
/* 3BC78C E00BE82C 00063080 */  sll       $a2, $a2, 2
/* 3BC790 E00BE830 8E280000 */  lw        $t0, 0x0($s1)
/* 3BC794 E00BE834 30C60FFF */  andi      $a2, $a2, 0xFFF
/* 3BC798 E00BE838 0100202D */  daddu     $a0, $t0, $zero
/* 3BC79C E00BE83C AC820000 */  sw        $v0, 0x0($a0)
/* 3BC7A0 E00BE840 3C02800A */  lui       $v0, %hi(nuGfxCfb_ptr)
/* 3BC7A4 E00BE844 8C42A64C */  lw        $v0, %lo(nuGfxCfb_ptr)($v0)
/* 3BC7A8 E00BE848 25080008 */  addiu     $t0, $t0, 0x8
/* 3BC7AC E00BE84C 00431021 */  addu      $v0, $v0, $v1
/* 3BC7B0 E00BE850 AC820004 */  sw        $v0, 0x4($a0)
/* 3BC7B4 E00BE854 3C02E600 */  lui       $v0, (0xE6000000 >> 16)
/* 3BC7B8 E00BE858 AD050004 */  sw        $a1, 0x4($t0)
/* 3BC7BC E00BE85C 254500A0 */  addiu     $a1, $t2, 0xA0
/* 3BC7C0 E00BE860 00052880 */  sll       $a1, $a1, 2
/* 3BC7C4 E00BE864 30A50FFF */  andi      $a1, $a1, 0xFFF
/* 3BC7C8 E00BE868 00052B00 */  sll       $a1, $a1, 12
/* 3BC7CC E00BE86C AD020008 */  sw        $v0, 0x8($t0)
/* 3BC7D0 E00BE870 3C02F400 */  lui       $v0, (0xF4000000 >> 16)
/* 3BC7D4 E00BE874 00C21025 */  or        $v0, $a2, $v0
/* 3BC7D8 E00BE878 00A21025 */  or        $v0, $a1, $v0
/* 3BC7DC E00BE87C 254400BF */  addiu     $a0, $t2, 0xBF
/* 3BC7E0 E00BE880 00042080 */  sll       $a0, $a0, 2
/* 3BC7E4 E00BE884 30840FFF */  andi      $a0, $a0, 0xFFF
/* 3BC7E8 E00BE888 00042300 */  sll       $a0, $a0, 12
/* 3BC7EC E00BE88C 25630097 */  addiu     $v1, $t3, 0x97
/* 3BC7F0 E00BE890 00031880 */  sll       $v1, $v1, 2
/* 3BC7F4 E00BE894 30630FFF */  andi      $v1, $v1, 0xFFF
/* 3BC7F8 E00BE898 AD020010 */  sw        $v0, 0x10($t0)
/* 3BC7FC E00BE89C 3C020700 */  lui       $v0, (0x7000000 >> 16)
/* 3BC800 E00BE8A0 00621025 */  or        $v0, $v1, $v0
/* 3BC804 E00BE8A4 00821025 */  or        $v0, $a0, $v0
/* 3BC808 E00BE8A8 AD020014 */  sw        $v0, 0x14($t0)
/* 3BC80C E00BE8AC 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 3BC810 E00BE8B0 AD020018 */  sw        $v0, 0x18($t0)
/* 3BC814 E00BE8B4 3C02F200 */  lui       $v0, (0xF2000000 >> 16)
/* 3BC818 E00BE8B8 00C23025 */  or        $a2, $a2, $v0
/* 3BC81C E00BE8BC 00A62825 */  or        $a1, $a1, $a2
/* 3BC820 E00BE8C0 3C020100 */  lui       $v0, (0x1000000 >> 16)
/* 3BC824 E00BE8C4 00621825 */  or        $v1, $v1, $v0
/* 3BC828 E00BE8C8 00832025 */  or        $a0, $a0, $v1
/* 3BC82C E00BE8CC AD04002C */  sw        $a0, 0x2C($t0)
/* 3BC830 E00BE8D0 27A40010 */  addiu     $a0, $sp, 0x10
/* 3BC834 E00BE8D4 AD070000 */  sw        $a3, 0x0($t0)
/* 3BC838 E00BE8D8 AD00000C */  sw        $zero, 0xC($t0)
/* 3BC83C E00BE8DC AD00001C */  sw        $zero, 0x1C($t0)
/* 3BC840 E00BE8E0 AD070020 */  sw        $a3, 0x20($t0)
/* 3BC844 E00BE8E4 AD090024 */  sw        $t1, 0x24($t0)
/* 3BC848 E00BE8E8 AD050028 */  sw        $a1, 0x28($t0)
/* 3BC84C E00BE8EC 8E05FFD4 */  lw        $a1, -0x2C($s0)
/* 3BC850 E00BE8F0 8E06FFD8 */  lw        $a2, -0x28($s0)
/* 3BC854 E00BE8F4 8E07FFDC */  lw        $a3, -0x24($s0)
/* 3BC858 E00BE8F8 25020008 */  addiu     $v0, $t0, 0x8
/* 3BC85C E00BE8FC AE280000 */  sw        $t0, 0x0($s1)
/* 3BC860 E00BE900 AE220000 */  sw        $v0, 0x0($s1)
/* 3BC864 E00BE904 25020010 */  addiu     $v0, $t0, 0x10
/* 3BC868 E00BE908 AE220000 */  sw        $v0, 0x0($s1)
/* 3BC86C E00BE90C 25020018 */  addiu     $v0, $t0, 0x18
/* 3BC870 E00BE910 AE220000 */  sw        $v0, 0x0($s1)
/* 3BC874 E00BE914 25020020 */  addiu     $v0, $t0, 0x20
/* 3BC878 E00BE918 AE220000 */  sw        $v0, 0x0($s1)
/* 3BC87C E00BE91C 25020028 */  addiu     $v0, $t0, 0x28
/* 3BC880 E00BE920 25080030 */  addiu     $t0, $t0, 0x30
/* 3BC884 E00BE924 AE220000 */  sw        $v0, 0x0($s1)
/* 3BC888 E00BE928 0C080108 */  jal       shim_guTranslateF
/* 3BC88C E00BE92C AE280000 */   sw       $t0, 0x0($s1)
/* 3BC890 E00BE930 8E050004 */  lw        $a1, 0x4($s0)
/* 3BC894 E00BE934 0280202D */  daddu     $a0, $s4, $zero
/* 3BC898 E00BE938 00A0302D */  daddu     $a2, $a1, $zero
/* 3BC89C E00BE93C 0C080110 */  jal       shim_guScaleF
/* 3BC8A0 E00BE940 00A0382D */   daddu    $a3, $a1, $zero
/* 3BC8A4 E00BE944 0280202D */  daddu     $a0, $s4, $zero
/* 3BC8A8 E00BE948 27A50010 */  addiu     $a1, $sp, 0x10
/* 3BC8AC E00BE94C 0C080114 */  jal       shim_guMtxCatF
/* 3BC8B0 E00BE950 00A0302D */   daddu    $a2, $a1, $zero
/* 3BC8B4 E00BE954 27A40010 */  addiu     $a0, $sp, 0x10
/* 3BC8B8 E00BE958 96A50000 */  lhu       $a1, 0x0($s5)
/* 3BC8BC E00BE95C 8EE20000 */  lw        $v0, 0x0($s7)
/* 3BC8C0 E00BE960 00052980 */  sll       $a1, $a1, 6
/* 3BC8C4 E00BE964 00B32821 */  addu      $a1, $a1, $s3
/* 3BC8C8 E00BE968 0C080118 */  jal       shim_guMtxF2L
/* 3BC8CC E00BE96C 00452821 */   addu     $a1, $v0, $a1
/* 3BC8D0 E00BE970 3C088080 */  lui       $t0, (0x80808081 >> 16)
/* 3BC8D4 E00BE974 35088081 */  ori       $t0, $t0, (0x80808081 & 0xFFFF)
/* 3BC8D8 E00BE978 3C09C8FF */  lui       $t1, (0xC8FFFF00 >> 16)
/* 3BC8DC E00BE97C 3529FF00 */  ori       $t1, $t1, (0xC8FFFF00 & 0xFFFF)
/* 3BC8E0 E00BE980 3C070020 */  lui       $a3, (0x202000 >> 16)
/* 3BC8E4 E00BE984 34E72000 */  ori       $a3, $a3, (0x202000 & 0xFFFF)
/* 3BC8E8 E00BE988 3C0AD838 */  lui       $t2, (0xD8380002 >> 16)
/* 3BC8EC E00BE98C 3C02DA38 */  lui       $v0, (0xDA380000 >> 16)
/* 3BC8F0 E00BE990 8E240000 */  lw        $a0, 0x0($s1)
/* 3BC8F4 E00BE994 96A50000 */  lhu       $a1, 0x0($s5)
/* 3BC8F8 E00BE998 0080302D */  daddu     $a2, $a0, $zero
/* 3BC8FC E00BE99C 24840008 */  addiu     $a0, $a0, 0x8
/* 3BC900 E00BE9A0 ACC20000 */  sw        $v0, 0x0($a2)
/* 3BC904 E00BE9A4 30A2FFFF */  andi      $v0, $a1, 0xFFFF
/* 3BC908 E00BE9A8 00021180 */  sll       $v0, $v0, 6
/* 3BC90C E00BE9AC 8EE30000 */  lw        $v1, 0x0($s7)
/* 3BC910 E00BE9B0 00531021 */  addu      $v0, $v0, $s3
/* 3BC914 E00BE9B4 00621821 */  addu      $v1, $v1, $v0
/* 3BC918 E00BE9B8 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3BC91C E00BE9BC ACC30004 */  sw        $v1, 0x4($a2)
/* 3BC920 E00BE9C0 AC820000 */  sw        $v0, 0x0($a0)
/* 3BC924 E00BE9C4 8E030000 */  lw        $v1, 0x0($s0)
/* 3BC928 E00BE9C8 24A50001 */  addiu     $a1, $a1, 0x1
/* 3BC92C E00BE9CC AE240000 */  sw        $a0, 0x0($s1)
/* 3BC930 E00BE9D0 A6A50000 */  sh        $a1, 0x0($s5)
/* 3BC934 E00BE9D4 8FAC0090 */  lw        $t4, 0x90($sp)
/* 3BC938 E00BE9D8 354A0002 */  ori       $t2, $t2, (0xD8380002 & 0xFFFF)
/* 3BC93C E00BE9DC 01830018 */  mult      $t4, $v1
/* 3BC940 E00BE9E0 24820008 */  addiu     $v0, $a0, 0x8
/* 3BC944 E00BE9E4 AE220000 */  sw        $v0, 0x0($s1)
/* 3BC948 E00BE9E8 24820010 */  addiu     $v0, $a0, 0x10
/* 3BC94C E00BE9EC AE220000 */  sw        $v0, 0x0($s1)
/* 3BC950 E00BE9F0 00001812 */  mflo      $v1
/* 3BC954 E00BE9F4 3C02FB00 */  lui       $v0, (0xFB000000 >> 16)
/* 3BC958 E00BE9F8 AC820008 */  sw        $v0, 0x8($a0)
/* 3BC95C E00BE9FC 00680018 */  mult      $v1, $t0
/* 3BC960 E00BEA00 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 3BC964 E00BEA04 AC87000C */  sw        $a3, 0xC($a0)
/* 3BC968 E00BEA08 AC820010 */  sw        $v0, 0x10($a0)
/* 3BC96C E00BEA0C 3C0CE00C */  lui       $t4, %hi(D_E00BEAF0)
/* 3BC970 E00BEA10 258CEAF0 */  addiu     $t4, $t4, %lo(D_E00BEAF0)
/* 3BC974 E00BEA14 00004010 */  mfhi      $t0
/* 3BC978 E00BEA18 01031021 */  addu      $v0, $t0, $v1
/* 3BC97C E00BEA1C 000211C3 */  sra       $v0, $v0, 7
/* 3BC980 E00BEA20 00031FC3 */  sra       $v1, $v1, 31
/* 3BC984 E00BEA24 00431023 */  subu      $v0, $v0, $v1
/* 3BC988 E00BEA28 304200FF */  andi      $v0, $v0, 0xFF
/* 3BC98C E00BEA2C 3C038007 */  lui       $v1, %hi(gGameStatusPtr)
/* 3BC990 E00BEA30 8C63419C */  lw        $v1, %lo(gGameStatusPtr)($v1)
/* 3BC994 E00BEA34 00491025 */  or        $v0, $v0, $t1
/* 3BC998 E00BEA38 AC820004 */  sw        $v0, 0x4($a0)
/* 3BC99C E00BEA3C 94620134 */  lhu       $v0, 0x134($v1)
/* 3BC9A0 E00BEA40 24830018 */  addiu     $v1, $a0, 0x18
/* 3BC9A4 E00BEA44 AE230000 */  sw        $v1, 0x0($s1)
/* 3BC9A8 E00BEA48 00021042 */  srl       $v0, $v0, 1
/* 3BC9AC E00BEA4C 02C21021 */  addu      $v0, $s6, $v0
/* 3BC9B0 E00BEA50 30420003 */  andi      $v0, $v0, 0x3
/* 3BC9B4 E00BEA54 00021080 */  sll       $v0, $v0, 2
/* 3BC9B8 E00BEA58 004C1021 */  addu      $v0, $v0, $t4
/* 3BC9BC E00BEA5C 8C430000 */  lw        $v1, 0x0($v0)
/* 3BC9C0 E00BEA60 24820020 */  addiu     $v0, $a0, 0x20
/* 3BC9C4 E00BEA64 AE220000 */  sw        $v0, 0x0($s1)
/* 3BC9C8 E00BEA68 24020040 */  addiu     $v0, $zero, 0x40
/* 3BC9CC E00BEA6C AC8A0018 */  sw        $t2, 0x18($a0)
/* 3BC9D0 E00BEA70 AC82001C */  sw        $v0, 0x1C($a0)
/* 3BC9D4 E00BEA74 AC830014 */  sw        $v1, 0x14($a0)
/* 3BC9D8 E00BEA78 8FAC00C0 */  lw        $t4, 0xC0($sp)
/* 3BC9DC E00BEA7C 8D820008 */  lw        $v0, 0x8($t4)
/* 3BC9E0 E00BEA80 26D60001 */  addiu     $s6, $s6, 0x1
/* 3BC9E4 E00BEA84 02C2102A */  slt       $v0, $s6, $v0
/* 3BC9E8 E00BEA88 1440FF4B */  bnez      $v0, .LE00BE7B8
/* 3BC9EC E00BEA8C 26100038 */   addiu    $s0, $s0, 0x38
.LE00BEA90:
/* 3BC9F0 E00BEA90 3C05D838 */  lui       $a1, (0xD8380002 >> 16)
/* 3BC9F4 E00BEA94 3C03800A */  lui       $v1, %hi(gMainGfxPos)
/* 3BC9F8 E00BEA98 2463A66C */  addiu     $v1, $v1, %lo(gMainGfxPos)
/* 3BC9FC E00BEA9C 8C620000 */  lw        $v0, 0x0($v1)
/* 3BCA00 E00BEAA0 34A50002 */  ori       $a1, $a1, (0xD8380002 & 0xFFFF)
/* 3BCA04 E00BEAA4 0040202D */  daddu     $a0, $v0, $zero
/* 3BCA08 E00BEAA8 24420008 */  addiu     $v0, $v0, 0x8
/* 3BCA0C E00BEAAC AC620000 */  sw        $v0, 0x0($v1)
/* 3BCA10 E00BEAB0 24020040 */  addiu     $v0, $zero, 0x40
/* 3BCA14 E00BEAB4 AC850000 */  sw        $a1, 0x0($a0)
/* 3BCA18 E00BEAB8 AC820004 */  sw        $v0, 0x4($a0)
/* 3BCA1C E00BEABC 8FBF00BC */  lw        $ra, 0xBC($sp)
/* 3BCA20 E00BEAC0 8FBE00B8 */  lw        $fp, 0xB8($sp)
/* 3BCA24 E00BEAC4 8FB700B4 */  lw        $s7, 0xB4($sp)
/* 3BCA28 E00BEAC8 8FB600B0 */  lw        $s6, 0xB0($sp)
/* 3BCA2C E00BEACC 8FB500AC */  lw        $s5, 0xAC($sp)
/* 3BCA30 E00BEAD0 8FB400A8 */  lw        $s4, 0xA8($sp)
/* 3BCA34 E00BEAD4 8FB300A4 */  lw        $s3, 0xA4($sp)
/* 3BCA38 E00BEAD8 8FB200A0 */  lw        $s2, 0xA0($sp)
/* 3BCA3C E00BEADC 8FB1009C */  lw        $s1, 0x9C($sp)
/* 3BCA40 E00BEAE0 8FB00098 */  lw        $s0, 0x98($sp)
/* 3BCA44 E00BEAE4 03E00008 */  jr        $ra
/* 3BCA48 E00BEAE8 27BD00C0 */   addiu    $sp, $sp, 0xC0
/* 3BCA4C E00BEAEC 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void water_splash_appendGfx(void* effect) {
    Matrix4f sp10;
    Matrix4f sp50;
    WaterSplashFXData* data = ((EffectInstance*)effect)->data.waterSplash;
    s32 sp90 = data->unk_30;
    s32 sp94 = data->unk_04.x;
    s32 temp_fp = data->unk_04.y;
    Camera* currentCamera = &gCameras[gCurrentCameraID];
    s32 i;

    gDPPipeSync(gMainGfxPos++);
    gSPSegment(gMainGfxPos++, 0x09, OS_K0_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
    shim_guTranslateF(sp10, sp94, temp_fp, data->unk_04.z);
    shim_guScaleF(sp50, data->unk_34, data->unk_34, data->unk_34);
    shim_guMtxCatF(sp50, sp10, sp10);
    shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
    gSPMatrix(gMainGfxPos++, currentCamera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
    gSPDisplayList(gMainGfxPos++, D_09000100_3BCB90);

    data++;
    for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, data++) {
        s32 temp_t2 = (s32)data->unk_04.x + sp94;
        s32 temp_t3 = (s32)data->unk_04.y + temp_fp;

        if (temp_t2 < 0) {
            temp_t2 = -(temp_t2 & 0x7F);
        } else {
            temp_t2 = temp_t2 & 0x7F;
        }

        if (temp_t3 > 0) {
            temp_t3 = -(temp_t3 & 0x3F);
        } else {
            temp_t3 = temp_t3 & 0x3F;
        }

        gDPLoadMultiTile(gMainGfxPos++, OS_K0_TO_PHYSICAL(nuGfxCfb_ptr), 0x100, 1, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 0,
                         temp_t2 + 0xA0, temp_t3 + 0x78, temp_t2 + 0xBF, temp_t3 + 0x97, 0,
                         G_TX_WRAP, G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD);

        shim_guTranslateF(sp10, data->unk_04.x, data->unk_04.y, data->unk_04.z);
        shim_guScaleF(sp50, data->unk_34, data->unk_34, data->unk_34);
        shim_guMtxCatF(sp50, sp10, sp10);
        shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]);
        gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
        gDPSetPrimColor(gMainGfxPos++, 0, 0, 200, 255, 255, (sp90 * data->unk_30) / 255);
        gDPSetEnvColor(gMainGfxPos++, 0, 32, 32, 0);
        gSPDisplayList(gMainGfxPos++, D_E00BEAF0[(i + (gGameStatusPtr->frameCounter / 2)) & 3]);
        gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    }
    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_E00AC2A4
/* 3AF0C4 E00AC2A4 27BDFF30 */  addiu     $sp, $sp, -0xD0
/* 3AF0C8 E00AC2A8 0080482D */  daddu     $t1, $a0, $zero
/* 3AF0CC E00AC2AC AFBF00C4 */  sw        $ra, 0xC4($sp)
/* 3AF0D0 E00AC2B0 AFBE00C0 */  sw        $fp, 0xC0($sp)
/* 3AF0D4 E00AC2B4 AFB700BC */  sw        $s7, 0xBC($sp)
/* 3AF0D8 E00AC2B8 AFB600B8 */  sw        $s6, 0xB8($sp)
/* 3AF0DC E00AC2BC AFB500B4 */  sw        $s5, 0xB4($sp)
/* 3AF0E0 E00AC2C0 AFB400B0 */  sw        $s4, 0xB0($sp)
/* 3AF0E4 E00AC2C4 AFB300AC */  sw        $s3, 0xAC($sp)
/* 3AF0E8 E00AC2C8 AFB200A8 */  sw        $s2, 0xA8($sp)
/* 3AF0EC E00AC2CC AFB100A4 */  sw        $s1, 0xA4($sp)
/* 3AF0F0 E00AC2D0 AFB000A0 */  sw        $s0, 0xA0($sp)
/* 3AF0F4 E00AC2D4 F7B400C8 */  sdc1      $f20, 0xC8($sp)
/* 3AF0F8 E00AC2D8 8D34000C */  lw        $s4, 0xC($t1)
/* 3AF0FC E00AC2DC 44801000 */  mtc1      $zero, $f2
/* 3AF100 E00AC2E0 C6800028 */  lwc1      $f0, 0x28($s4)
/* 3AF104 E00AC2E4 8E9E001C */  lw        $fp, 0x1C($s4)
/* 3AF108 E00AC2E8 8E970020 */  lw        $s7, 0x20($s4)
/* 3AF10C E00AC2EC 46020032 */  c.eq.s    $f0, $f2
/* 3AF110 E00AC2F0 00000000 */  nop
/* 3AF114 E00AC2F4 4501011F */  bc1t      .LE00AC774
/* 3AF118 E00AC2F8 00000000 */   nop
/* 3AF11C E00AC2FC C680002C */  lwc1      $f0, 0x2C($s4)
/* 3AF120 E00AC300 46020032 */  c.eq.s    $f0, $f2
/* 3AF124 E00AC304 00000000 */  nop
/* 3AF128 E00AC308 4501011A */  bc1t      .LE00AC774
/* 3AF12C E00AC30C 3C08DB06 */   lui      $t0, (0xDB060024 >> 16)
/* 3AF130 E00AC310 35080024 */  ori       $t0, $t0, (0xDB060024 & 0xFFFF)
/* 3AF134 E00AC314 3C13800A */  lui       $s3, %hi(gMainGfxPos)
/* 3AF138 E00AC318 2673A66C */  addiu     $s3, $s3, %lo(gMainGfxPos)
/* 3AF13C E00AC31C 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 3AF140 E00AC320 8E660000 */  lw        $a2, 0x0($s3)
/* 3AF144 E00AC324 44051000 */  mfc1      $a1, $f2
/* 3AF148 E00AC328 00C0182D */  daddu     $v1, $a2, $zero
/* 3AF14C E00AC32C 24C60008 */  addiu     $a2, $a2, 0x8
/* 3AF150 E00AC330 AC620000 */  sw        $v0, 0x0($v1)
/* 3AF154 E00AC334 AC600004 */  sw        $zero, 0x4($v1)
/* 3AF158 E00AC338 ACC80000 */  sw        $t0, 0x0($a2)
/* 3AF15C E00AC33C 8D220010 */  lw        $v0, 0x10($t1)
/* 3AF160 E00AC340 3C088000 */  lui       $t0, (0x80000000 >> 16)
/* 3AF164 E00AC344 8C42001C */  lw        $v0, 0x1C($v0)
/* 3AF168 E00AC348 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 3AF16C E00AC34C 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 3AF170 E00AC350 00481021 */  addu      $v0, $v0, $t0
/* 3AF174 E00AC354 ACC20004 */  sw        $v0, 0x4($a2)
/* 3AF178 E00AC358 00031080 */  sll       $v0, $v1, 2
/* 3AF17C E00AC35C 00431021 */  addu      $v0, $v0, $v1
/* 3AF180 E00AC360 00021080 */  sll       $v0, $v0, 2
/* 3AF184 E00AC364 00431023 */  subu      $v0, $v0, $v1
/* 3AF188 E00AC368 000218C0 */  sll       $v1, $v0, 3
/* 3AF18C E00AC36C 00431021 */  addu      $v0, $v0, $v1
/* 3AF190 E00AC370 000210C0 */  sll       $v0, $v0, 3
/* 3AF194 E00AC374 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 3AF198 E00AC378 00220821 */  addu      $at, $at, $v0
/* 3AF19C E00AC37C C4221DEC */  lwc1      $f2, %lo(gCameras + 0x6C)($at)
/* 3AF1A0 E00AC380 C6800010 */  lwc1      $f0, 0x10($s4)
/* 3AF1A4 E00AC384 27A40020 */  addiu     $a0, $sp, 0x20
/* 3AF1A8 E00AC388 E7A00010 */  swc1      $f0, 0x10($sp)
/* 3AF1AC E00AC38C C6800004 */  lwc1      $f0, 0x4($s4)
/* 3AF1B0 E00AC390 3C120001 */  lui       $s2, (0x11630 >> 16)
/* 3AF1B4 E00AC394 AE660000 */  sw        $a2, 0x0($s3)
/* 3AF1B8 E00AC398 24C60008 */  addiu     $a2, $a2, 0x8
/* 3AF1BC E00AC39C E7A00014 */  swc1      $f0, 0x14($sp)
/* 3AF1C0 E00AC3A0 C6800008 */  lwc1      $f0, 0x8($s4)
/* 3AF1C4 E00AC3A4 46001087 */  neg.s     $f2, $f2
/* 3AF1C8 E00AC3A8 AE660000 */  sw        $a2, 0x0($s3)
/* 3AF1CC E00AC3AC 44061000 */  mfc1      $a2, $f2
/* 3AF1D0 E00AC3B0 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* 3AF1D4 E00AC3B4 E7A00018 */  swc1      $f0, 0x18($sp)
/* 3AF1D8 E00AC3B8 C680000C */  lwc1      $f0, 0xC($s4)
/* 3AF1DC E00AC3BC 00A0382D */  daddu     $a3, $a1, $zero
/* 3AF1E0 E00AC3C0 0C080180 */  jal       shim_guPositionF
/* 3AF1E4 E00AC3C4 E7A0001C */   swc1     $f0, 0x1C($sp)
/* 3AF1E8 E00AC3C8 27A40020 */  addiu     $a0, $sp, 0x20
/* 3AF1EC E00AC3CC 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 3AF1F0 E00AC3D0 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 3AF1F4 E00AC3D4 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* 3AF1F8 E00AC3D8 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* 3AF1FC E00AC3DC 96050000 */  lhu       $a1, 0x0($s0)
/* 3AF200 E00AC3E0 8E220000 */  lw        $v0, 0x0($s1)
/* 3AF204 E00AC3E4 00052980 */  sll       $a1, $a1, 6
/* 3AF208 E00AC3E8 00B22821 */  addu      $a1, $a1, $s2
/* 3AF20C E00AC3EC 0C080118 */  jal       shim_guMtxF2L
/* 3AF210 E00AC3F0 00452821 */   addu     $a1, $v0, $a1
/* 3AF214 E00AC3F4 8E670000 */  lw        $a3, 0x0($s3)
/* 3AF218 E00AC3F8 00E0202D */  daddu     $a0, $a3, $zero
/* 3AF21C E00AC3FC 24E70008 */  addiu     $a3, $a3, 0x8
/* 3AF220 E00AC400 AE670000 */  sw        $a3, 0x0($s3)
/* 3AF224 E00AC404 96020000 */  lhu       $v0, 0x0($s0)
/* 3AF228 E00AC408 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 3AF22C E00AC40C AC830000 */  sw        $v1, 0x0($a0)
/* 3AF230 E00AC410 24430001 */  addiu     $v1, $v0, 0x1
/* 3AF234 E00AC414 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3AF238 E00AC418 00021180 */  sll       $v0, $v0, 6
/* 3AF23C E00AC41C A6030000 */  sh        $v1, 0x0($s0)
/* 3AF240 E00AC420 8E230000 */  lw        $v1, 0x0($s1)
/* 3AF244 E00AC424 00521021 */  addu      $v0, $v0, $s2
/* 3AF248 E00AC428 00621821 */  addu      $v1, $v1, $v0
/* 3AF24C E00AC42C AC830004 */  sw        $v1, 0x4($a0)
/* 3AF250 E00AC430 8E830024 */  lw        $v1, 0x24($s4)
/* 3AF254 E00AC434 240200FF */  addiu     $v0, $zero, 0xFF
/* 3AF258 E00AC438 54620011 */  bnel      $v1, $v0, .LE00AC480
/* 3AF25C E00AC43C 3C05E200 */   lui      $a1, (0xE200001C >> 16)
/* 3AF260 E00AC440 3C04E200 */  lui       $a0, (0xE200001C >> 16)
/* 3AF264 E00AC444 3484001C */  ori       $a0, $a0, (0xE200001C & 0xFFFF)
/* 3AF268 E00AC448 3C030055 */  lui       $v1, (0x551208 >> 16)
/* 3AF26C E00AC44C 34631208 */  ori       $v1, $v1, (0x551208 & 0xFFFF)
/* 3AF270 E00AC450 3C05FC12 */  lui       $a1, (0xFC127E24 >> 16)
/* 3AF274 E00AC454 34A57E24 */  ori       $a1, $a1, (0xFC127E24 & 0xFFFF)
/* 3AF278 E00AC458 24E20008 */  addiu     $v0, $a3, 0x8
/* 3AF27C E00AC45C AE620000 */  sw        $v0, 0x0($s3)
/* 3AF280 E00AC460 24E20010 */  addiu     $v0, $a3, 0x10
/* 3AF284 E00AC464 ACE40000 */  sw        $a0, 0x0($a3)
/* 3AF288 E00AC468 ACE30004 */  sw        $v1, 0x4($a3)
/* 3AF28C E00AC46C AE620000 */  sw        $v0, 0x0($s3)
/* 3AF290 E00AC470 2402F3F9 */  addiu     $v0, $zero, -0xC07
/* 3AF294 E00AC474 ACE50008 */  sw        $a1, 0x8($a3)
/* 3AF298 E00AC478 0802B12F */  j         .LE00AC4BC
/* 3AF29C E00AC47C ACE2000C */   sw       $v0, 0xC($a3)
.LE00AC480:
/* 3AF2A0 E00AC480 34A5001C */  ori       $a1, $a1, (0xE200001C & 0xFFFF)
/* 3AF2A4 E00AC484 3C030050 */  lui       $v1, (0x504340 >> 16)
/* 3AF2A8 E00AC488 34634340 */  ori       $v1, $v1, (0x504340 & 0xFFFF)
/* 3AF2AC E00AC48C 3C06FC12 */  lui       $a2, (0xFC123224 >> 16)
/* 3AF2B0 E00AC490 34C63224 */  ori       $a2, $a2, (0xFC123224 & 0xFFFF)
/* 3AF2B4 E00AC494 3C04FF67 */  lui       $a0, (0xFF67FFFF >> 16)
/* 3AF2B8 E00AC498 3484FFFF */  ori       $a0, $a0, (0xFF67FFFF & 0xFFFF)
/* 3AF2BC E00AC49C 24E20008 */  addiu     $v0, $a3, 0x8
/* 3AF2C0 E00AC4A0 AE620000 */  sw        $v0, 0x0($s3)
/* 3AF2C4 E00AC4A4 24E20010 */  addiu     $v0, $a3, 0x10
/* 3AF2C8 E00AC4A8 ACE50000 */  sw        $a1, 0x0($a3)
/* 3AF2CC E00AC4AC ACE30004 */  sw        $v1, 0x4($a3)
/* 3AF2D0 E00AC4B0 AE620000 */  sw        $v0, 0x0($s3)
/* 3AF2D4 E00AC4B4 ACE60008 */  sw        $a2, 0x8($a3)
/* 3AF2D8 E00AC4B8 ACE4000C */  sw        $a0, 0xC($a3)
.LE00AC4BC:
/* 3AF2DC E00AC4BC 27A40020 */  addiu     $a0, $sp, 0x20
/* 3AF2E0 E00AC4C0 3C120001 */  lui       $s2, (0x11630 >> 16)
/* 3AF2E4 E00AC4C4 4480A000 */  mtc1      $zero, $f20
/* 3AF2E8 E00AC4C8 8E860040 */  lw        $a2, 0x40($s4)
/* 3AF2EC E00AC4CC 4405A000 */  mfc1      $a1, $f20
/* 3AF2F0 E00AC4D0 4407A000 */  mfc1      $a3, $f20
/* 3AF2F4 E00AC4D4 0C080108 */  jal       shim_guTranslateF
/* 3AF2F8 E00AC4D8 36521630 */   ori      $s2, $s2, (0x11630 & 0xFFFF)
/* 3AF2FC E00AC4DC 27B00060 */  addiu     $s0, $sp, 0x60
/* 3AF300 E00AC4E0 8E850028 */  lw        $a1, 0x28($s4)
/* 3AF304 E00AC4E4 8E86002C */  lw        $a2, 0x2C($s4)
/* 3AF308 E00AC4E8 3C073F80 */  lui       $a3, (0x3F800000 >> 16)
/* 3AF30C E00AC4EC 0C080110 */  jal       shim_guScaleF
/* 3AF310 E00AC4F0 0200202D */   daddu    $a0, $s0, $zero
/* 3AF314 E00AC4F4 0200202D */  daddu     $a0, $s0, $zero
/* 3AF318 E00AC4F8 27A50020 */  addiu     $a1, $sp, 0x20
/* 3AF31C E00AC4FC 0C080114 */  jal       shim_guMtxCatF
/* 3AF320 E00AC500 00A0302D */   daddu    $a2, $a1, $zero
/* 3AF324 E00AC504 27A40020 */  addiu     $a0, $sp, 0x20
/* 3AF328 E00AC508 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 3AF32C E00AC50C 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 3AF330 E00AC510 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* 3AF334 E00AC514 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* 3AF338 E00AC518 96050000 */  lhu       $a1, 0x0($s0)
/* 3AF33C E00AC51C 8E220000 */  lw        $v0, 0x0($s1)
/* 3AF340 E00AC520 00052980 */  sll       $a1, $a1, 6
/* 3AF344 E00AC524 00B22821 */  addu      $a1, $a1, $s2
/* 3AF348 E00AC528 0C080118 */  jal       shim_guMtxF2L
/* 3AF34C E00AC52C 00452821 */   addu     $a1, $v0, $a1
/* 3AF350 E00AC530 3C09D838 */  lui       $t1, (0xD8380002 >> 16)
/* 3AF354 E00AC534 35290002 */  ori       $t1, $t1, (0xD8380002 & 0xFFFF)
/* 3AF358 E00AC538 27A40020 */  addiu     $a0, $sp, 0x20
/* 3AF35C E00AC53C 3C15800A */  lui       $s5, %hi(gMainGfxPos)
/* 3AF360 E00AC540 26B5A66C */  addiu     $s5, $s5, %lo(gMainGfxPos)
/* 3AF364 E00AC544 3C13DA38 */  lui       $s3, (0xDA380000 >> 16)
/* 3AF368 E00AC548 3C16DE00 */  lui       $s6, (0xDE000000 >> 16)
/* 3AF36C E00AC54C 8EA80000 */  lw        $t0, 0x0($s5)
/* 3AF370 E00AC550 4405A000 */  mfc1      $a1, $f20
/* 3AF374 E00AC554 0100302D */  daddu     $a2, $t0, $zero
/* 3AF378 E00AC558 25080008 */  addiu     $t0, $t0, 0x8
/* 3AF37C E00AC55C AEA80000 */  sw        $t0, 0x0($s5)
/* 3AF380 E00AC560 96020000 */  lhu       $v0, 0x0($s0)
/* 3AF384 E00AC564 00A0382D */  daddu     $a3, $a1, $zero
/* 3AF388 E00AC568 ACD30000 */  sw        $s3, 0x0($a2)
/* 3AF38C E00AC56C 24430001 */  addiu     $v1, $v0, 0x1
/* 3AF390 E00AC570 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3AF394 E00AC574 00021180 */  sll       $v0, $v0, 6
/* 3AF398 E00AC578 A6030000 */  sh        $v1, 0x0($s0)
/* 3AF39C E00AC57C 8E230000 */  lw        $v1, 0x0($s1)
/* 3AF3A0 E00AC580 00521021 */  addu      $v0, $v0, $s2
/* 3AF3A4 E00AC584 00621821 */  addu      $v1, $v1, $v0
/* 3AF3A8 E00AC588 25020008 */  addiu     $v0, $t0, 0x8
/* 3AF3AC E00AC58C ACC30004 */  sw        $v1, 0x4($a2)
/* 3AF3B0 E00AC590 AEA20000 */  sw        $v0, 0x0($s5)
/* 3AF3B4 E00AC594 25020010 */  addiu     $v0, $t0, 0x10
/* 3AF3B8 E00AC598 001E3080 */  sll       $a2, $fp, 2
/* 3AF3BC E00AC59C AD160000 */  sw        $s6, 0x0($t0)
/* 3AF3C0 E00AC5A0 AEA20000 */  sw        $v0, 0x0($s5)
/* 3AF3C4 E00AC5A4 3C03E00B */  lui       $v1, (0xE00B0000 >> 16)
/* 3AF3C8 E00AC5A8 00661821 */  addu      $v1, $v1, $a2
/* 3AF3CC E00AC5AC 8C63C7B0 */  lw        $v1, -0x3850($v1)
/* 3AF3D0 E00AC5B0 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3AF3D4 E00AC5B4 AD020008 */  sw        $v0, 0x8($t0)
/* 3AF3D8 E00AC5B8 AD030004 */  sw        $v1, 0x4($t0)
/* 3AF3DC E00AC5BC 92830027 */  lbu       $v1, 0x27($s4)
/* 3AF3E0 E00AC5C0 25020018 */  addiu     $v0, $t0, 0x18
/* 3AF3E4 E00AC5C4 AEA20000 */  sw        $v0, 0x0($s5)
/* 3AF3E8 E00AC5C8 AD160010 */  sw        $s6, 0x10($t0)
/* 3AF3EC E00AC5CC AD03000C */  sw        $v1, 0xC($t0)
/* 3AF3F0 E00AC5D0 3C03E00B */  lui       $v1, (0xE00B0000 >> 16)
/* 3AF3F4 E00AC5D4 00661821 */  addu      $v1, $v1, $a2
/* 3AF3F8 E00AC5D8 8C63C7BC */  lw        $v1, -0x3844($v1)
/* 3AF3FC E00AC5DC 25020020 */  addiu     $v0, $t0, 0x20
/* 3AF400 E00AC5E0 AEA20000 */  sw        $v0, 0x0($s5)
/* 3AF404 E00AC5E4 24020040 */  addiu     $v0, $zero, 0x40
/* 3AF408 E00AC5E8 AD02001C */  sw        $v0, 0x1C($t0)
/* 3AF40C E00AC5EC 3C020900 */  lui       $v0, %hi(D_090028E0_40FB70)
/* 3AF410 E00AC5F0 244228E0 */  addiu     $v0, $v0, %lo(D_090028E0_40FB70)
/* 3AF414 E00AC5F4 AD090018 */  sw        $t1, 0x18($t0)
/* 3AF418 E00AC5F8 AD160020 */  sw        $s6, 0x20($t0)
/* 3AF41C E00AC5FC AD020024 */  sw        $v0, 0x24($t0)
/* 3AF420 E00AC600 AD030014 */  sw        $v1, 0x14($t0)
/* 3AF424 E00AC604 8E86003C */  lw        $a2, 0x3C($s4)
/* 3AF428 E00AC608 25080028 */  addiu     $t0, $t0, 0x28
/* 3AF42C E00AC60C 0C080108 */  jal       shim_guTranslateF
/* 3AF430 E00AC610 AEA80000 */   sw       $t0, 0x0($s5)
/* 3AF434 E00AC614 27A40020 */  addiu     $a0, $sp, 0x20
/* 3AF438 E00AC618 96050000 */  lhu       $a1, 0x0($s0)
/* 3AF43C E00AC61C 8E220000 */  lw        $v0, 0x0($s1)
/* 3AF440 E00AC620 00052980 */  sll       $a1, $a1, 6
/* 3AF444 E00AC624 00B22821 */  addu      $a1, $a1, $s2
/* 3AF448 E00AC628 0C080118 */  jal       shim_guMtxF2L
/* 3AF44C E00AC62C 00452821 */   addu     $a1, $v0, $a1
/* 3AF450 E00AC630 02E0302D */  daddu     $a2, $s7, $zero
/* 3AF454 E00AC634 8EA50000 */  lw        $a1, 0x0($s5)
/* 3AF458 E00AC638 96020000 */  lhu       $v0, 0x0($s0)
/* 3AF45C E00AC63C 00A0202D */  daddu     $a0, $a1, $zero
/* 3AF460 E00AC640 24A50008 */  addiu     $a1, $a1, 0x8
/* 3AF464 E00AC644 24430001 */  addiu     $v1, $v0, 0x1
/* 3AF468 E00AC648 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3AF46C E00AC64C 00021180 */  sll       $v0, $v0, 6
/* 3AF470 E00AC650 AEA50000 */  sw        $a1, 0x0($s5)
/* 3AF474 E00AC654 AC930000 */  sw        $s3, 0x0($a0)
/* 3AF478 E00AC658 A6030000 */  sh        $v1, 0x0($s0)
/* 3AF47C E00AC65C 8E230000 */  lw        $v1, 0x0($s1)
/* 3AF480 E00AC660 00521021 */  addu      $v0, $v0, $s2
/* 3AF484 E00AC664 00621821 */  addu      $v1, $v1, $v0
/* 3AF488 E00AC668 06E10002 */  bgez      $s7, .LE00AC674
/* 3AF48C E00AC66C AC830004 */   sw       $v1, 0x4($a0)
/* 3AF490 E00AC670 00173023 */  negu      $a2, $s7
.LE00AC674:
/* 3AF494 E00AC674 3C026666 */  lui       $v0, (0x66666667 >> 16)
/* 3AF498 E00AC678 34426667 */  ori       $v0, $v0, (0x66666667 & 0xFFFF)
/* 3AF49C E00AC67C 00C20018 */  mult      $a2, $v0
/* 3AF4A0 E00AC680 24A20008 */  addiu     $v0, $a1, 0x8
/* 3AF4A4 E00AC684 AEA20000 */  sw        $v0, 0x0($s5)
/* 3AF4A8 E00AC688 000617C3 */  sra       $v0, $a2, 31
/* 3AF4AC E00AC68C ACB60000 */  sw        $s6, 0x0($a1)
/* 3AF4B0 E00AC690 00005010 */  mfhi      $t2
/* 3AF4B4 E00AC694 000A1883 */  sra       $v1, $t2, 2
/* 3AF4B8 E00AC698 00621823 */  subu      $v1, $v1, $v0
/* 3AF4BC E00AC69C 00031080 */  sll       $v0, $v1, 2
/* 3AF4C0 E00AC6A0 00431021 */  addu      $v0, $v0, $v1
/* 3AF4C4 E00AC6A4 00021040 */  sll       $v0, $v0, 1
/* 3AF4C8 E00AC6A8 00C21023 */  subu      $v0, $a2, $v0
/* 3AF4CC E00AC6AC 00021080 */  sll       $v0, $v0, 2
/* 3AF4D0 E00AC6B0 3C03E00B */  lui       $v1, (0xE00B0000 >> 16)
/* 3AF4D4 E00AC6B4 00621821 */  addu      $v1, $v1, $v0
/* 3AF4D8 E00AC6B8 8C63C7C8 */  lw        $v1, -0x3838($v1)
/* 3AF4DC E00AC6BC 24A20010 */  addiu     $v0, $a1, 0x10
/* 3AF4E0 E00AC6C0 AEA20000 */  sw        $v0, 0x0($s5)
/* 3AF4E4 E00AC6C4 3C020900 */  lui       $v0, %hi(D_090028C0_40FB50)
/* 3AF4E8 E00AC6C8 244228C0 */  addiu     $v0, $v0, %lo(D_090028C0_40FB50)
/* 3AF4EC E00AC6CC ACA2000C */  sw        $v0, 0xC($a1)
/* 3AF4F0 E00AC6D0 3C02E00B */  lui       $v0, %hi(D_E00AC7C8)
/* 3AF4F4 E00AC6D4 2442C7C8 */  addiu     $v0, $v0, %lo(D_E00AC7C8)
/* 3AF4F8 E00AC6D8 ACB60008 */  sw        $s6, 0x8($a1)
/* 3AF4FC E00AC6DC 06E00005 */  bltz      $s7, .LE00AC6F4
/* 3AF500 E00AC6E0 ACA30004 */   sw       $v1, 0x4($a1)
/* 3AF504 E00AC6E4 ACB60010 */  sw        $s6, 0x10($a1)
/* 3AF508 E00AC6E8 8C43002C */  lw        $v1, 0x2C($v0)
/* 3AF50C E00AC6EC 0802B1C0 */  j         .LE00AC700
/* 3AF510 E00AC6F0 24A20018 */   addiu    $v0, $a1, 0x18
.LE00AC6F4:
/* 3AF514 E00AC6F4 ACB60010 */  sw        $s6, 0x10($a1)
/* 3AF518 E00AC6F8 8C430028 */  lw        $v1, 0x28($v0)
/* 3AF51C E00AC6FC 24A20018 */  addiu     $v0, $a1, 0x18
.LE00AC700:
/* 3AF520 E00AC700 AEA20000 */  sw        $v0, 0x0($s5)
/* 3AF524 E00AC704 ACA30014 */  sw        $v1, 0x14($a1)
/* 3AF528 E00AC708 3C06D838 */  lui       $a2, (0xD8380002 >> 16)
/* 3AF52C E00AC70C 3C04800A */  lui       $a0, %hi(gMainGfxPos)
/* 3AF530 E00AC710 2484A66C */  addiu     $a0, $a0, %lo(gMainGfxPos)
/* 3AF534 E00AC714 34C60002 */  ori       $a2, $a2, (0xD8380002 & 0xFFFF)
/* 3AF538 E00AC718 8C830000 */  lw        $v1, 0x0($a0)
/* 3AF53C E00AC71C 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 3AF540 E00AC720 0060282D */  daddu     $a1, $v1, $zero
/* 3AF544 E00AC724 24630008 */  addiu     $v1, $v1, 0x8
/* 3AF548 E00AC728 AC830000 */  sw        $v1, 0x0($a0)
/* 3AF54C E00AC72C ACA20000 */  sw        $v0, 0x0($a1)
/* 3AF550 E00AC730 3C020900 */  lui       $v0, %hi(D_090028A0_40FB30)
/* 3AF554 E00AC734 244228A0 */  addiu     $v0, $v0, %lo(D_090028A0_40FB30)
/* 3AF558 E00AC738 ACA20004 */  sw        $v0, 0x4($a1)
/* 3AF55C E00AC73C 24620008 */  addiu     $v0, $v1, 0x8
/* 3AF560 E00AC740 24050040 */  addiu     $a1, $zero, 0x40
/* 3AF564 E00AC744 AC820000 */  sw        $v0, 0x0($a0)
/* 3AF568 E00AC748 24620010 */  addiu     $v0, $v1, 0x10
/* 3AF56C E00AC74C AC660000 */  sw        $a2, 0x0($v1)
/* 3AF570 E00AC750 AC650004 */  sw        $a1, 0x4($v1)
/* 3AF574 E00AC754 AC820000 */  sw        $v0, 0x0($a0)
/* 3AF578 E00AC758 24620018 */  addiu     $v0, $v1, 0x18
/* 3AF57C E00AC75C AC660008 */  sw        $a2, 0x8($v1)
/* 3AF580 E00AC760 AC65000C */  sw        $a1, 0xC($v1)
/* 3AF584 E00AC764 AC820000 */  sw        $v0, 0x0($a0)
/* 3AF588 E00AC768 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 3AF58C E00AC76C AC620010 */  sw        $v0, 0x10($v1)
/* 3AF590 E00AC770 AC600014 */  sw        $zero, 0x14($v1)
.LE00AC774:
/* 3AF594 E00AC774 8FBF00C4 */  lw        $ra, 0xC4($sp)
/* 3AF598 E00AC778 8FBE00C0 */  lw        $fp, 0xC0($sp)
/* 3AF59C E00AC77C 8FB700BC */  lw        $s7, 0xBC($sp)
/* 3AF5A0 E00AC780 8FB600B8 */  lw        $s6, 0xB8($sp)
/* 3AF5A4 E00AC784 8FB500B4 */  lw        $s5, 0xB4($sp)
/* 3AF5A8 E00AC788 8FB400B0 */  lw        $s4, 0xB0($sp)
/* 3AF5AC E00AC78C 8FB300AC */  lw        $s3, 0xAC($sp)
/* 3AF5B0 E00AC790 8FB200A8 */  lw        $s2, 0xA8($sp)
/* 3AF5B4 E00AC794 8FB100A4 */  lw        $s1, 0xA4($sp)
/* 3AF5B8 E00AC798 8FB000A0 */  lw        $s0, 0xA0($sp)
/* 3AF5BC E00AC79C D7B400C8 */  ldc1      $f20, 0xC8($sp)
/* 3AF5C0 E00AC7A0 03E00008 */  jr        $ra
/* 3AF5C4 E00AC7A4 27BD00D0 */   addiu    $sp, $sp, 0xD0
/* 3AF5C8 E00AC7A8 00000000 */  nop
/* 3AF5CC E00AC7AC 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void func_E00AC2A4(EffectInstance* effect) {
    StatChangeFXData* data = effect->data.statChange;
    s32 arrowType = data->arrowType;
    s32 arrowValue = data->arrowValue;
    s32 idx;
    Matrix4f sp20;
    Matrix4f sp60;

    if (data->scaleX != 0.0f && data->scaleY != 0.0f) {
        gDPPipeSync(gMainGfxPos++);
        gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));

        shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, data->scale, data->pos.x, data->pos.y, data->pos.z);
        shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

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

        if (data->unk_24 == 255) {
            gDPSetRenderMode(gMainGfxPos++, AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM), AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM));
            gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
        } else {
            gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
            gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, SHADE, 0, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, SHADE, 0, PRIMITIVE, 0, TEXEL0, 0);
        }

        shim_guTranslateF(sp20, 0.0f, data->unk_40, 0.0f);
        shim_guScaleF(sp60, data->scaleX, data->scaleY, 1.0f);
        shim_guMtxCatF(sp60, sp20, sp20);
        shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

        gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
        gSPDisplayList(gMainGfxPos++, D_E00AC7B0[arrowType]);
        gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, data->unk_24);
        gSPDisplayList(gMainGfxPos++, D_E00AC7BC[arrowType]);
        gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
        gSPDisplayList(gMainGfxPos++, D_090028E0_3B1FE0);

        shim_guTranslateF(sp20, 0.0f, data->unk_3C, 0.0f);
        shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

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

        if (arrowValue < 0) {
            idx = -arrowValue;
        } else {
            idx = arrowValue;
        }

        gSPDisplayList(gMainGfxPos++, D_E00AC7C8[idx % 10]);
        gSPDisplayList(gMainGfxPos++, D_090028C0_3B1FC0);

        if (arrowValue >= 0) {
            gSPDisplayList(gMainGfxPos++, D_E00AC7C8[11]);
        } else {
            gSPDisplayList(gMainGfxPos++, D_E00AC7C8[10]);
        }

        gSPDisplayList(gMainGfxPos++, D_090028A0_3B1FA0);
        gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
        gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
        gDPPipeSync(gMainGfxPos++);
    }
}