### RAW ASSEMBLY INSTRUCTIONS:

glabel entity_HiddenPanel_flip_over
/* 107DF4 802E6574 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 107DF8 802E6578 C4201DEC */  lwc1      $f0, %lo(gCameras + 0x6C)($at)
/* 107DFC 802E657C 3C014234 */  lui       $at, (0x42340000 >> 16)
/* 107E00 802E6580 44816000 */  mtc1      $at, $f12
/* 107E04 802E6584 27BDFFC8 */  addiu     $sp, $sp, -0x38
/* 107E08 802E6588 AFB1001C */  sw        $s1, 0x1C($sp)
/* 107E0C 802E658C 0080882D */  daddu     $s1, $a0, $zero
/* 107E10 802E6590 AFBF0024 */  sw        $ra, 0x24($sp)
/* 107E14 802E6594 AFB20020 */  sw        $s2, 0x20($sp)
/* 107E18 802E6598 AFB00018 */  sw        $s0, 0x18($sp)
/* 107E1C 802E659C F7B60030 */  sdc1      $f22, 0x30($sp)
/* 107E20 802E65A0 F7B40028 */  sdc1      $f20, 0x28($sp)
/* 107E24 802E65A4 8E300040 */  lw        $s0, 0x40($s1)
/* 107E28 802E65A8 0C00A6C9 */  jal       clamp_angle
/* 107E2C 802E65AC 460C0300 */   add.s    $f12, $f0, $f12
/* 107E30 802E65B0 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 107E34 802E65B4 44811000 */  mtc1      $at, $f2
/* 107E38 802E65B8 46000106 */  mov.s     $f4, $f0
/* 107E3C 802E65BC 4602203C */  c.lt.s    $f4, $f2
/* 107E40 802E65C0 00000000 */  nop
/* 107E44 802E65C4 4501000F */  bc1t      .L802E6604
/* 107E48 802E65C8 00000000 */   nop
/* 107E4C 802E65CC 3C014334 */  lui       $at, (0x43340000 >> 16)
/* 107E50 802E65D0 44810000 */  mtc1      $at, $f0
/* 107E54 802E65D4 00000000 */  nop
/* 107E58 802E65D8 4604003E */  c.le.s    $f0, $f4
/* 107E5C 802E65DC 00000000 */  nop
/* 107E60 802E65E0 4500000B */  bc1f      .L802E6610
/* 107E64 802E65E4 00000000 */   nop
/* 107E68 802E65E8 3C014387 */  lui       $at, (0x43870000 >> 16)
/* 107E6C 802E65EC 44810000 */  mtc1      $at, $f0
/* 107E70 802E65F0 00000000 */  nop
/* 107E74 802E65F4 4600203C */  c.lt.s    $f4, $f0
/* 107E78 802E65F8 00000000 */  nop
/* 107E7C 802E65FC 45000004 */  bc1f      .L802E6610
/* 107E80 802E6600 00000000 */   nop
.L802E6604:
/* 107E84 802E6604 C6340068 */  lwc1      $f20, 0x68($s1)
/* 107E88 802E6608 080B9986 */  j         .L802E6618
/* 107E8C 802E660C 24120001 */   addiu    $s2, $zero, 0x1
.L802E6610:
/* 107E90 802E6610 C6340060 */  lwc1      $f20, 0x60($s1)
/* 107E94 802E6614 0000902D */  daddu     $s2, $zero, $zero
.L802E6618:
/* 107E98 802E6618 82030000 */  lb        $v1, 0x0($s0)
/* 107E9C 802E661C 2C62000D */  sltiu     $v0, $v1, 0xD
/* 107EA0 802E6620 1040012C */  beqz      $v0, .L802E6AD4
/* 107EA4 802E6624 00031080 */   sll      $v0, $v1, 2
/* 107EA8 802E6628 3C01802F */  lui       $at, %hi(jtbl_802EB2B0)
/* 107EAC 802E662C 00220821 */  addu      $at, $at, $v0
/* 107EB0 802E6630 8C22B2B0 */  lw        $v0, %lo(jtbl_802EB2B0)($at)
/* 107EB4 802E6634 00400008 */  jr        $v0
/* 107EB8 802E6638 00000000 */   nop
glabel .L802E663C
/* 107EBC 802E663C 0C05272D */  jal       sfx_play_sound
/* 107EC0 802E6640 240420AB */   addiu    $a0, $zero, 0x20AB
/* 107EC4 802E6644 24040001 */  addiu     $a0, $zero, 0x1
/* 107EC8 802E6648 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 107ECC 802E664C 44810000 */  mtc1      $at, $f0
/* 107ED0 802E6650 3C014282 */  lui       $at, (0x42820000 >> 16)
/* 107ED4 802E6654 44811000 */  mtc1      $at, $f2
/* 107ED8 802E6658 0080102D */  daddu     $v0, $a0, $zero
/* 107EDC 802E665C A2020000 */  sb        $v0, 0x0($s0)
/* 107EE0 802E6660 A2020002 */  sb        $v0, 0x2($s0)
/* 107EE4 802E6664 E600002C */  swc1      $f0, 0x2C($s0)
/* 107EE8 802E6668 0C009C22 */  jal       set_time_freeze_mode
/* 107EEC 802E666C E6020030 */   swc1     $f2, 0x30($s0)
/* 107EF0 802E6670 0C038045 */  jal       disable_player_static_collisions
/* 107EF4 802E6674 00000000 */   nop
/* 107EF8 802E6678 3C03800F */  lui       $v1, %hi(gPlayerStatusPtr)
/* 107EFC 802E667C 8C637B30 */  lw        $v1, %lo(gPlayerStatusPtr)($v1)
/* 107F00 802E6680 8C620004 */  lw        $v0, 0x4($v1)
/* 107F04 802E6684 34420800 */  ori       $v0, $v0, 0x800
/* 107F08 802E6688 AC620004 */  sw        $v0, 0x4($v1)
/* 107F0C 802E668C 82020003 */  lb        $v0, 0x3($s0)
/* 107F10 802E6690 10400013 */  beqz      $v0, .L802E66E0
/* 107F14 802E6694 24020005 */   addiu    $v0, $zero, 0x5
/* 107F18 802E6698 A2000003 */  sb        $zero, 0x3($s0)
/* 107F1C 802E669C C620004C */  lwc1      $f0, 0x4C($s1)
/* 107F20 802E66A0 AFA20010 */  sw        $v0, 0x10($sp)
/* 107F24 802E66A4 96020006 */  lhu       $v0, 0x6($s0)
/* 107F28 802E66A8 3C014000 */  lui       $at, (0x40000000 >> 16)
/* 107F2C 802E66AC 44811800 */  mtc1      $at, $f3
/* 107F30 802E66B0 44801000 */  mtc1      $zero, $f2
/* 107F34 802E66B4 46000021 */  cvt.d.s   $f0, $f0
/* 107F38 802E66B8 46220000 */  add.d     $f0, $f0, $f2
/* 107F3C 802E66BC AFA20014 */  sw        $v0, 0x14($sp)
/* 107F40 802E66C0 8E040010 */  lw        $a0, 0x10($s0)
/* 107F44 802E66C4 8E250048 */  lw        $a1, 0x48($s1)
/* 107F48 802E66C8 8E270050 */  lw        $a3, 0x50($s1)
/* 107F4C 802E66CC 46200020 */  cvt.s.d   $f0, $f0
/* 107F50 802E66D0 44060000 */  mfc1      $a2, $f0
/* 107F54 802E66D4 0C04C6A5 */  jal       make_item_entity_nodelay
/* 107F58 802E66D8 00000000 */   nop
/* 107F5C 802E66DC AE020014 */  sw        $v0, 0x14($s0)
.L802E66E0:
/* 107F60 802E66E0 8E220000 */  lw        $v0, 0x0($s1)
/* 107F64 802E66E4 2403FFFE */  addiu     $v1, $zero, -0x2
/* 107F68 802E66E8 00431024 */  and       $v0, $v0, $v1
/* 107F6C 802E66EC 080B9AB5 */  j         .L802E6AD4
/* 107F70 802E66F0 AE220000 */   sw       $v0, 0x0($s1)
glabel .L802E66F4
/* 107F74 802E66F4 C60C002C */  lwc1      $f12, 0x2C($s0)
/* 107F78 802E66F8 3C0140C9 */  lui       $at, (0x40C90FD0 >> 16)
/* 107F7C 802E66FC 34210FD0 */  ori       $at, $at, (0x40C90FD0 & 0xFFFF)
/* 107F80 802E6700 44810000 */  mtc1      $at, $f0
/* 107F84 802E6704 00000000 */  nop
/* 107F88 802E6708 46006302 */  mul.s     $f12, $f12, $f0
/* 107F8C 802E670C 00000000 */  nop
/* 107F90 802E6710 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
/* 107F94 802E6714 4481B000 */  mtc1      $at, $f22
/* 107F98 802E6718 0C00A85B */  jal       sin_rad
/* 107F9C 802E671C 46166303 */   div.s    $f12, $f12, $f22
/* 107FA0 802E6720 C6020028 */  lwc1      $f2, 0x28($s0)
/* 107FA4 802E6724 46001082 */  mul.s     $f2, $f2, $f0
/* 107FA8 802E6728 00000000 */  nop
/* 107FAC 802E672C C620004C */  lwc1      $f0, 0x4C($s1)
/* 107FB0 802E6730 46020000 */  add.s     $f0, $f0, $f2
/* 107FB4 802E6734 E620004C */  swc1      $f0, 0x4C($s1)
/* 107FB8 802E6738 C6020024 */  lwc1      $f2, 0x24($s0)
/* 107FBC 802E673C 4602003E */  c.le.s    $f0, $f2
/* 107FC0 802E6740 00000000 */  nop
/* 107FC4 802E6744 45000006 */  bc1f      .L802E6760
/* 107FC8 802E6748 2402000A */   addiu    $v0, $zero, 0xA
/* 107FCC 802E674C AE200068 */  sw        $zero, 0x68($s1)
/* 107FD0 802E6750 C6340068 */  lwc1      $f20, 0x68($s1)
/* 107FD4 802E6754 E622004C */  swc1      $f2, 0x4C($s1)
/* 107FD8 802E6758 AE200060 */  sw        $zero, 0x60($s1)
/* 107FDC 802E675C A2020001 */  sb        $v0, 0x1($s0)
.L802E6760:
/* 107FE0 802E6760 C600002C */  lwc1      $f0, 0x2C($s0)
/* 107FE4 802E6764 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 107FE8 802E6768 44811000 */  mtc1      $at, $f2
/* 107FEC 802E676C 00000000 */  nop
/* 107FF0 802E6770 46020000 */  add.s     $f0, $f0, $f2
/* 107FF4 802E6774 3C014334 */  lui       $at, (0x43340000 >> 16)
/* 107FF8 802E6778 44811000 */  mtc1      $at, $f2
/* 107FFC 802E677C 00000000 */  nop
/* 108000 802E6780 4600103E */  c.le.s    $f2, $f0
/* 108004 802E6784 00000000 */  nop
/* 108008 802E6788 45000007 */  bc1f      .L802E67A8
/* 10800C 802E678C E600002C */   swc1     $f0, 0x2C($s0)
/* 108010 802E6790 92020000 */  lbu       $v0, 0x0($s0)
/* 108014 802E6794 24030007 */  addiu     $v1, $zero, 0x7
/* 108018 802E6798 E602002C */  swc1      $f2, 0x2C($s0)
/* 10801C 802E679C A2030001 */  sb        $v1, 0x1($s0)
/* 108020 802E67A0 24420001 */  addiu     $v0, $v0, 0x1
/* 108024 802E67A4 A2020000 */  sb        $v0, 0x0($s0)
.L802E67A8:
/* 108028 802E67A8 C602002C */  lwc1      $f2, 0x2C($s0)
/* 10802C 802E67AC 3C0142DC */  lui       $at, (0x42DC0000 >> 16)
/* 108030 802E67B0 44810000 */  mtc1      $at, $f0
/* 108034 802E67B4 00000000 */  nop
/* 108038 802E67B8 4602003C */  c.lt.s    $f0, $f2
/* 10803C 802E67BC 00000000 */  nop
/* 108040 802E67C0 450000C4 */  bc1f      .L802E6AD4
/* 108044 802E67C4 00000000 */   nop
/* 108048 802E67C8 C6000030 */  lwc1      $f0, 0x30($s0)
/* 10804C 802E67CC 4600A500 */  add.s     $f20, $f20, $f0
/* 108050 802E67D0 4614B03E */  c.le.s    $f22, $f20
/* 108054 802E67D4 00000000 */  nop
/* 108058 802E67D8 450300BE */  bc1tl     .L802E6AD4
/* 10805C 802E67DC 4616A501 */   sub.s    $f20, $f20, $f22
/* 108060 802E67E0 080B9AB5 */  j         .L802E6AD4
/* 108064 802E67E4 00000000 */   nop
glabel .L802E67E8
/* 108068 802E67E8 C6000030 */  lwc1      $f0, 0x30($s0)
/* 10806C 802E67EC 3C014000 */  lui       $at, (0x40000000 >> 16)
/* 108070 802E67F0 44811000 */  mtc1      $at, $f2
/* 108074 802E67F4 00000000 */  nop
/* 108078 802E67F8 46020001 */  sub.s     $f0, $f0, $f2
/* 10807C 802E67FC 44801000 */  mtc1      $zero, $f2
/* 108080 802E6800 00000000 */  nop
/* 108084 802E6804 4602003E */  c.le.s    $f0, $f2
/* 108088 802E6808 00000000 */  nop
/* 10808C 802E680C 45000002 */  bc1f      .L802E6818
/* 108090 802E6810 E6000030 */   swc1     $f0, 0x30($s0)
/* 108094 802E6814 E6020030 */  swc1      $f2, 0x30($s0)
.L802E6818:
/* 108098 802E6818 C6000030 */  lwc1      $f0, 0x30($s0)
/* 10809C 802E681C 4600A500 */  add.s     $f20, $f20, $f0
/* 1080A0 802E6820 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
/* 1080A4 802E6824 44810000 */  mtc1      $at, $f0
/* 1080A8 802E6828 00000000 */  nop
/* 1080AC 802E682C 4614003E */  c.le.s    $f0, $f20
/* 1080B0 802E6830 00000000 */  nop
/* 1080B4 802E6834 45030001 */  bc1tl     .L802E683C
/* 1080B8 802E6838 4600A501 */   sub.s    $f20, $f20, $f0
.L802E683C:
/* 1080BC 802E683C 92020001 */  lbu       $v0, 0x1($s0)
/* 1080C0 802E6840 2442FFFF */  addiu     $v0, $v0, -0x1
/* 1080C4 802E6844 A2020001 */  sb        $v0, 0x1($s0)
/* 1080C8 802E6848 00021600 */  sll       $v0, $v0, 24
/* 1080CC 802E684C 1840004B */  blez      $v0, .L802E697C
/* 1080D0 802E6850 00000000 */   nop
/* 1080D4 802E6854 080B9AB5 */  j         .L802E6AD4
/* 1080D8 802E6858 00000000 */   nop
glabel .L802E685C
/* 1080DC 802E685C C6000030 */  lwc1      $f0, 0x30($s0)
/* 1080E0 802E6860 3C0140A0 */  lui       $at, (0x40A00000 >> 16)
/* 1080E4 802E6864 44811000 */  mtc1      $at, $f2
/* 1080E8 802E6868 00000000 */  nop
/* 1080EC 802E686C 46020001 */  sub.s     $f0, $f0, $f2
/* 1080F0 802E6870 4480B000 */  mtc1      $zero, $f22
/* 1080F4 802E6874 00000000 */  nop
/* 1080F8 802E6878 4616003E */  c.le.s    $f0, $f22
/* 1080FC 802E687C 00000000 */  nop
/* 108100 802E6880 45000002 */  bc1f      .L802E688C
/* 108104 802E6884 E6000030 */   swc1     $f0, 0x30($s0)
/* 108108 802E6888 E6160030 */  swc1      $f22, 0x30($s0)
.L802E688C:
/* 10810C 802E688C C6000030 */  lwc1      $f0, 0x30($s0)
/* 108110 802E6890 4600A500 */  add.s     $f20, $f20, $f0
/* 108114 802E6894 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
/* 108118 802E6898 44811000 */  mtc1      $at, $f2
/* 10811C 802E689C 00000000 */  nop
/* 108120 802E68A0 4614103E */  c.le.s    $f2, $f20
/* 108124 802E68A4 00000000 */  nop
/* 108128 802E68A8 45030001 */  bc1tl     .L802E68B0
/* 10812C 802E68AC 46001506 */   mov.s    $f20, $f2
.L802E68B0:
/* 108130 802E68B0 C60C002C */  lwc1      $f12, 0x2C($s0)
/* 108134 802E68B4 3C0140C9 */  lui       $at, (0x40C90FD0 >> 16)
/* 108138 802E68B8 34210FD0 */  ori       $at, $at, (0x40C90FD0 & 0xFFFF)
/* 10813C 802E68BC 44810000 */  mtc1      $at, $f0
/* 108140 802E68C0 00000000 */  nop
/* 108144 802E68C4 46006302 */  mul.s     $f12, $f12, $f0
/* 108148 802E68C8 00000000 */  nop
/* 10814C 802E68CC 0C00A85B */  jal       sin_rad
/* 108150 802E68D0 46026303 */   div.s    $f12, $f12, $f2
/* 108154 802E68D4 C6020028 */  lwc1      $f2, 0x28($s0)
/* 108158 802E68D8 46001082 */  mul.s     $f2, $f2, $f0
/* 10815C 802E68DC 00000000 */  nop
/* 108160 802E68E0 C620004C */  lwc1      $f0, 0x4C($s1)
/* 108164 802E68E4 46020000 */  add.s     $f0, $f0, $f2
/* 108168 802E68E8 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 10816C 802E68EC 44811000 */  mtc1      $at, $f2
/* 108170 802E68F0 E620004C */  swc1      $f0, 0x4C($s1)
/* 108174 802E68F4 C600002C */  lwc1      $f0, 0x2C($s0)
/* 108178 802E68F8 46020000 */  add.s     $f0, $f0, $f2
/* 10817C 802E68FC 3C014387 */  lui       $at, (0x43870000 >> 16)
/* 108180 802E6900 44811000 */  mtc1      $at, $f2
/* 108184 802E6904 00000000 */  nop
/* 108188 802E6908 4600103C */  c.lt.s    $f2, $f0
/* 10818C 802E690C 00000000 */  nop
/* 108190 802E6910 45000002 */  bc1f      .L802E691C
/* 108194 802E6914 E600002C */   swc1     $f0, 0x2C($s0)
/* 108198 802E6918 E602002C */  swc1      $f2, 0x2C($s0)
.L802E691C:
/* 10819C 802E691C C622004C */  lwc1      $f2, 0x4C($s1)
/* 1081A0 802E6920 C6000024 */  lwc1      $f0, 0x24($s0)
/* 1081A4 802E6924 4600103E */  c.le.s    $f2, $f0
/* 1081A8 802E6928 00000000 */  nop
/* 1081AC 802E692C 45000069 */  bc1f      .L802E6AD4
/* 1081B0 802E6930 0000202D */   daddu    $a0, $zero, $zero
/* 1081B4 802E6934 4600B506 */  mov.s     $f20, $f22
/* 1081B8 802E6938 24050002 */  addiu     $a1, $zero, 0x2
/* 1081BC 802E693C 24060001 */  addiu     $a2, $zero, 0x1
/* 1081C0 802E6940 92020000 */  lbu       $v0, 0x0($s0)
/* 1081C4 802E6944 3C073E4C */  lui       $a3, (0x3E4CCCCD >> 16)
/* 1081C8 802E6948 34E7CCCD */  ori       $a3, $a3, (0x3E4CCCCD & 0xFFFF)
/* 1081CC 802E694C 00461021 */  addu      $v0, $v0, $a2
/* 1081D0 802E6950 A2020000 */  sb        $v0, 0x0($s0)
/* 1081D4 802E6954 2402000A */  addiu     $v0, $zero, 0xA
/* 1081D8 802E6958 E620004C */  swc1      $f0, 0x4C($s1)
/* 1081DC 802E695C E6340060 */  swc1      $f20, 0x60($s1)
/* 1081E0 802E6960 E6340068 */  swc1      $f20, 0x68($s1)
/* 1081E4 802E6964 0C0B2D72 */  jal       exec_ShakeCamX
/* 1081E8 802E6968 A2020001 */   sb       $v0, 0x1($s0)
/* 1081EC 802E696C 0C05272D */  jal       sfx_play_sound
/* 1081F0 802E6970 240420AC */   addiu    $a0, $zero, 0x20AC
/* 1081F4 802E6974 080B9AB5 */  j         .L802E6AD4
/* 1081F8 802E6978 00000000 */   nop
glabel .L802E697C
/* 1081FC 802E697C 92020000 */  lbu       $v0, 0x0($s0)
/* 108200 802E6980 24420001 */  addiu     $v0, $v0, 0x1
/* 108204 802E6984 080B9AB5 */  j         .L802E6AD4
/* 108208 802E6988 A2020000 */   sb       $v0, 0x0($s0)
glabel .L802E698C
/* 10820C 802E698C 2402000B */  addiu     $v0, $zero, 0xB
/* 108210 802E6990 A2020000 */  sb        $v0, 0x0($s0)
/* 108214 802E6994 C620004C */  lwc1      $f0, 0x4C($s1)
/* 108218 802E6998 3C014000 */  lui       $at, (0x40000000 >> 16)
/* 10821C 802E699C 44811000 */  mtc1      $at, $f2
/* 108220 802E69A0 080B9A76 */  j         .L802E69D8
/* 108224 802E69A4 46020000 */   add.s    $f0, $f0, $f2
glabel .L802E69A8
/* 108228 802E69A8 2403FFFE */  addiu     $v1, $zero, -0x2
/* 10822C 802E69AC 8E220000 */  lw        $v0, 0x0($s1)
/* 108230 802E69B0 3C0140C0 */  lui       $at, (0x40C00000 >> 16)
/* 108234 802E69B4 44811000 */  mtc1      $at, $f2
/* 108238 802E69B8 00431024 */  and       $v0, $v0, $v1
/* 10823C 802E69BC AE220000 */  sw        $v0, 0x0($s1)
/* 108240 802E69C0 92020000 */  lbu       $v0, 0x0($s0)
/* 108244 802E69C4 A2000002 */  sb        $zero, 0x2($s0)
/* 108248 802E69C8 24420001 */  addiu     $v0, $v0, 0x1
/* 10824C 802E69CC A2020000 */  sb        $v0, 0x0($s0)
/* 108250 802E69D0 C620004C */  lwc1      $f0, 0x4C($s1)
/* 108254 802E69D4 46020000 */  add.s     $f0, $f0, $f2
.L802E69D8:
/* 108258 802E69D8 080B9AB5 */  j         .L802E6AD4
/* 10825C 802E69DC E620004C */   swc1     $f0, 0x4C($s1)
glabel .L802E69E0
/* 108260 802E69E0 C620004C */  lwc1      $f0, 0x4C($s1)
/* 108264 802E69E4 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 108268 802E69E8 44811000 */  mtc1      $at, $f2
/* 10826C 802E69EC 00000000 */  nop
/* 108270 802E69F0 46020001 */  sub.s     $f0, $f0, $f2
/* 108274 802E69F4 E620004C */  swc1      $f0, 0x4C($s1)
/* 108278 802E69F8 C6020024 */  lwc1      $f2, 0x24($s0)
/* 10827C 802E69FC 4602003E */  c.le.s    $f0, $f2
/* 108280 802E6A00 00000000 */  nop
/* 108284 802E6A04 45000033 */  bc1f      .L802E6AD4
/* 108288 802E6A08 24030001 */   addiu    $v1, $zero, 0x1
/* 10828C 802E6A0C E622004C */  swc1      $f2, 0x4C($s1)
/* 108290 802E6A10 92020000 */  lbu       $v0, 0x0($s0)
/* 108294 802E6A14 A2030001 */  sb        $v1, 0x1($s0)
/* 108298 802E6A18 24420001 */  addiu     $v0, $v0, 0x1
/* 10829C 802E6A1C A2020000 */  sb        $v0, 0x0($s0)
/* 1082A0 802E6A20 8E220000 */  lw        $v0, 0x0($s1)
/* 1082A4 802E6A24 34420021 */  ori       $v0, $v0, 0x21
/* 1082A8 802E6A28 AE220000 */  sw        $v0, 0x0($s1)
/* 1082AC 802E6A2C 82020002 */  lb        $v0, 0x2($s0)
/* 1082B0 802E6A30 10400028 */  beqz      $v0, .L802E6AD4
/* 1082B4 802E6A34 00000000 */   nop
/* 1082B8 802E6A38 0C038050 */  jal       enable_player_static_collisions
/* 1082BC 802E6A3C 00000000 */   nop
/* 1082C0 802E6A40 080B9AB5 */  j         .L802E6AD4
/* 1082C4 802E6A44 00000000 */   nop
glabel .L802E6A48
/* 1082C8 802E6A48 92020001 */  lbu       $v0, 0x1($s0)
/* 1082CC 802E6A4C 2442FFFF */  addiu     $v0, $v0, -0x1
/* 1082D0 802E6A50 A2020001 */  sb        $v0, 0x1($s0)
/* 1082D4 802E6A54 00021600 */  sll       $v0, $v0, 24
/* 1082D8 802E6A58 0441001E */  bgez      $v0, .L802E6AD4
/* 1082DC 802E6A5C 0220202D */   daddu    $a0, $s1, $zero
/* 1082E0 802E6A60 0C043F5A */  jal       exec_entity_commandlist
/* 1082E4 802E6A64 A2000000 */   sb       $zero, 0x0($s0)
/* 1082E8 802E6A68 82020002 */  lb        $v0, 0x2($s0)
/* 1082EC 802E6A6C 10400009 */  beqz      $v0, .L802E6A94
/* 1082F0 802E6A70 00000000 */   nop
/* 1082F4 802E6A74 0C009C22 */  jal       set_time_freeze_mode
/* 1082F8 802E6A78 0000202D */   daddu    $a0, $zero, $zero
/* 1082FC 802E6A7C 3C02800F */  lui       $v0, %hi(gPlayerStatusPtr)
/* 108300 802E6A80 8C427B30 */  lw        $v0, %lo(gPlayerStatusPtr)($v0)
/* 108304 802E6A84 8C430004 */  lw        $v1, 0x4($v0)
/* 108308 802E6A88 2404F7FF */  addiu     $a0, $zero, -0x801
/* 10830C 802E6A8C 00641824 */  and       $v1, $v1, $a0
/* 108310 802E6A90 AC430004 */  sw        $v1, 0x4($v0)
.L802E6A94:
/* 108314 802E6A94 8E220000 */  lw        $v0, 0x0($s1)
/* 108318 802E6A98 2403FFDF */  addiu     $v1, $zero, -0x21
/* 10831C 802E6A9C 00431024 */  and       $v0, $v0, $v1
/* 108320 802E6AA0 AE220000 */  sw        $v0, 0x0($s1)
/* 108324 802E6AA4 8E040008 */  lw        $a0, 0x8($s0)
/* 108328 802E6AA8 0480000A */  bltz      $a0, .L802E6AD4
/* 10832C 802E6AAC 00000000 */   nop
/* 108330 802E6AB0 0C00E2B7 */  jal       get_npc_by_index
/* 108334 802E6AB4 00000000 */   nop
/* 108338 802E6AB8 8C430000 */  lw        $v1, 0x0($v0)
/* 10833C 802E6ABC 2404FDF7 */  addiu     $a0, $zero, -0x209
/* 108340 802E6AC0 00641824 */  and       $v1, $v1, $a0
/* 108344 802E6AC4 AC430000 */  sw        $v1, 0x0($v0)
/* 108348 802E6AC8 8E04000C */  lw        $a0, 0xC($s0)
/* 10834C 802E6ACC 00641825 */  or        $v1, $v1, $a0
/* 108350 802E6AD0 AC430000 */  sw        $v1, 0x0($v0)
glabel .L802E6AD4
/* 108354 802E6AD4 56400002 */  bnel      $s2, $zero, .L802E6AE0
/* 108358 802E6AD8 E6340068 */   swc1     $f20, 0x68($s1)
/* 10835C 802E6ADC E6340060 */  swc1      $f20, 0x60($s1)
.L802E6AE0:
/* 108360 802E6AE0 8E040014 */  lw        $a0, 0x14($s0)
/* 108364 802E6AE4 04800019 */  bltz      $a0, .L802E6B4C
/* 108368 802E6AE8 00000000 */   nop
/* 10836C 802E6AEC 0C04C3D6 */  jal       get_item_entity
/* 108370 802E6AF0 00000000 */   nop
/* 108374 802E6AF4 0040182D */  daddu     $v1, $v0, $zero
/* 108378 802E6AF8 10600013 */  beqz      $v1, .L802E6B48
/* 10837C 802E6AFC 2402FFFF */   addiu    $v0, $zero, -0x1
/* 108380 802E6B00 8C620000 */  lw        $v0, 0x0($v1)
/* 108384 802E6B04 30420010 */  andi      $v0, $v0, 0x10
/* 108388 802E6B08 1040000B */  beqz      $v0, .L802E6B38
/* 10838C 802E6B0C 34028000 */   ori      $v0, $zero, 0x8000
/* 108390 802E6B10 C4600008 */  lwc1      $f0, 0x8($v1)
/* 108394 802E6B14 4600018D */  trunc.w.s $f6, $f0
/* 108398 802E6B18 E6060018 */  swc1      $f6, 0x18($s0)
/* 10839C 802E6B1C C460000C */  lwc1      $f0, 0xC($v1)
/* 1083A0 802E6B20 4600018D */  trunc.w.s $f6, $f0
/* 1083A4 802E6B24 E606001C */  swc1      $f6, 0x1C($s0)
/* 1083A8 802E6B28 C4600010 */  lwc1      $f0, 0x10($v1)
/* 1083AC 802E6B2C 4600018D */  trunc.w.s $f6, $f0
/* 1083B0 802E6B30 080B9AD3 */  j         .L802E6B4C
/* 1083B4 802E6B34 E6060020 */   swc1     $f6, 0x20($s0)
.L802E6B38:
/* 1083B8 802E6B38 AE020018 */  sw        $v0, 0x18($s0)
/* 1083BC 802E6B3C AE02001C */  sw        $v0, 0x1C($s0)
/* 1083C0 802E6B40 080B9AD3 */  j         .L802E6B4C
/* 1083C4 802E6B44 AE020020 */   sw       $v0, 0x20($s0)
.L802E6B48:
/* 1083C8 802E6B48 AE020014 */  sw        $v0, 0x14($s0)
.L802E6B4C:
/* 1083CC 802E6B4C 8FBF0024 */  lw        $ra, 0x24($sp)
/* 1083D0 802E6B50 8FB20020 */  lw        $s2, 0x20($sp)
/* 1083D4 802E6B54 8FB1001C */  lw        $s1, 0x1C($sp)
/* 1083D8 802E6B58 8FB00018 */  lw        $s0, 0x18($sp)
/* 1083DC 802E6B5C D7B60030 */  ldc1      $f22, 0x30($sp)
/* 1083E0 802E6B60 D7B40028 */  ldc1      $f20, 0x28($sp)
/* 1083E4 802E6B64 03E00008 */  jr        $ra
/* 1083E8 802E6B68 27BD0038 */   addiu    $sp, $sp, 0x38

### DECOMPILED C INSTRUCTIONS:

void entity_HiddenPanel_flip_over(Entity* entity) {
    HiddenPanelData* data = entity->dataBuf.hiddenPanel;
    f32 yaw;
    f32 rotAngle;
    s32 flipAxis;

    yaw = clamp_angle(gCameras[CAM_DEFAULT].currentYaw + 45.0f);
    if (yaw < 90.0f || yaw >= 180.0f && yaw < 270.0f) {
        rotAngle = entity->rotation.z;
        flipAxis = 1;
    } else {
        rotAngle = entity->rotation.x;
        flipAxis = 0;
    }

    switch (data->state) {
        case 0:
            sfx_play_sound(SOUND_20AB);
            data->state = 1;
            data->unk_02 = TRUE;
            data->riseInterpPhase = 90.0f;
            data->rotationSpeed = 65.0f;
            set_time_freeze_mode(TIME_FREEZE_PARTIAL);
            disable_player_static_collisions();
            gPlayerStatusPtr->animFlags |= PA_FLAG_OPENED_HIDDEN_PANEL;
            if (data->needSpawnItem) {
                data->needSpawnItem = FALSE;
                data->spawnedItemIndex = make_item_entity_nodelay(data->itemID,
                    entity->position.x, entity->position.y + 2.0, entity->position.z,
                    ITEM_SPAWN_MODE_TOSS_NEVER_VANISH, data->pickupVar);
            }
            entity->flags &= ~ENTITY_FLAG_HIDDEN;
            break;
        case 1:
            entity->position.y += data->riseVelocity * sin_rad(DEG_TO_RAD(data->riseInterpPhase));
            if (entity->position.y <= data->initialY) {
                entity->position.y = data->initialY;
                entity->rotation.x = 0.0f;
                entity->rotation.z = 0.0f;
                rotAngle = 0.0f;
                data->timer = 10;
            }

            data->riseInterpPhase += 10.0f;
            if (data->riseInterpPhase >= 180.0f) {
                data->riseInterpPhase = 180.0f;
                data->timer = 7;
                data->state++;
            }

            if (data->riseInterpPhase > 110.0f) {
                rotAngle += data->rotationSpeed;
                if (rotAngle >= 360.0f) {
                    rotAngle -= 360.0f;
                }
            }
            break;
        case 2:
            data->rotationSpeed -= 2.0f;
            if (data->rotationSpeed <= 0.0f) {
                data->rotationSpeed = 0.0f;
            }

            rotAngle += data->rotationSpeed;
            if (rotAngle >= 360.0f) {
                rotAngle -= 360.0f;
            }

            if (--data->timer <= 0) {
                data->state++;
            }
            break;
        case 3:
            data->rotationSpeed -= 5.0f;
            if (data->rotationSpeed <= 0.0f) {
                data->rotationSpeed = 0.0f;
            }

            rotAngle += data->rotationSpeed;
            if (rotAngle >= 360.0f) {
                rotAngle = 360.0f;
            }

            entity->position.y += data->riseVelocity * sin_rad(DEG_TO_RAD(data->riseInterpPhase));
            data->riseInterpPhase += 10.0f;
            if (data->riseInterpPhase > 270.0f) {
                data->riseInterpPhase = 270.0f;
            }

            if (entity->position.y <= data->initialY) {
                data->state++;

                entity->position.y = data->initialY;
                entity->rotation.x = 0.0f;
                entity->rotation.z = 0.0f;
                rotAngle = 0.0f;
                data->timer = 10;
                exec_ShakeCamX(CAM_DEFAULT, CAM_SHAKE_DECAYING_VERTICAL, 1, 0.2f);
                sfx_play_sound(SOUND_20AC);
            }
            break;
        case 4:
            data->state++;
            break;
        case 5:
            data->state = 11;
            entity->position.y += 2.0f;
            break;
        case 10:
            entity->flags &= ~ENTITY_FLAG_HIDDEN;
            data->unk_02 = FALSE;
            data->state++;
            entity->position.y += 6.0f;
            break;
        case 11:
            entity->position.y -= 1.0f;
            if (entity->position.y <= data->initialY) {
                entity->position.y = data->initialY;
                data->timer = 1;
                data->state++;
                entity->flags |= ENTITY_FLAG_HIDDEN | ENTITY_FLAG_DISABLE_COLLISION;
                if (data->unk_02) {
                    enable_player_static_collisions();
                }
            }
            break;
        case 12:
            data->timer--;
            if (data->timer < 0) {
                data->state = 0;
                exec_entity_commandlist(entity);
                if (data->unk_02) {
                    set_time_freeze_mode(TIME_FREEZE_NORMAL);
                    gPlayerStatusPtr->animFlags &= ~PA_FLAG_OPENED_HIDDEN_PANEL;
                }
                entity->flags &= ~ENTITY_FLAG_DISABLE_COLLISION;
                if (data->standingNpcIndex >= 0) {
                    Npc* npc = get_npc_by_index(data->standingNpcIndex);
                    npc->flags &= ~(NPC_FLAG_GRAVITY | NPC_FLAG_8);
                    npc->flags |= data->npcFlags;
                }
            }
            break;
    }

    if (flipAxis == 0) {
        entity->rotation.x = rotAngle;
    } else {
        entity->rotation.z = rotAngle;
    }

    if (data->spawnedItemIndex >= 0) {
        ItemEntity* itemEntity = get_item_entity(data->spawnedItemIndex);
        if (itemEntity != NULL) {
            if (itemEntity->flags & ITEM_ENTITY_FLAG_10) {
                data->spawnedItemPos.x = itemEntity->position.x;
                data->spawnedItemPos.y = itemEntity->position.y;
                data->spawnedItemPos.z = itemEntity->position.z;
            } else {
                data->spawnedItemPos.x = 0x8000;
                data->spawnedItemPos.y = 0x8000;
                data->spawnedItemPos.z = 0x8000;
            }
        } else {
            data->spawnedItemIndex = -1;
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel chomp_drop_appendGfx
/* 396990 E009A3E0 27BDFF20 */  addiu     $sp, $sp, -0xE0
/* 396994 E009A3E4 0080482D */  daddu     $t1, $a0, $zero
/* 396998 E009A3E8 3C0ADB06 */  lui       $t2, (0xDB060024 >> 16)
/* 39699C E009A3EC 354A0024 */  ori       $t2, $t2, (0xDB060024 & 0xFFFF)
/* 3969A0 E009A3F0 27A40020 */  addiu     $a0, $sp, 0x20
/* 3969A4 E009A3F4 AFB200B0 */  sw        $s2, 0xB0($sp)
/* 3969A8 E009A3F8 3C12800A */  lui       $s2, %hi(gMainGfxPos)
/* 3969AC E009A3FC 2652A66C */  addiu     $s2, $s2, %lo(gMainGfxPos)
/* 3969B0 E009A400 3C013C23 */  lui       $at, (0x3C23D70A >> 16)
/* 3969B4 E009A404 3421D70A */  ori       $at, $at, (0x3C23D70A & 0xFFFF)
/* 3969B8 E009A408 44810000 */  mtc1      $at, $f0
/* 3969BC E009A40C 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 3969C0 E009A410 AFBF00CC */  sw        $ra, 0xCC($sp)
/* 3969C4 E009A414 AFBE00C8 */  sw        $fp, 0xC8($sp)
/* 3969C8 E009A418 AFB700C4 */  sw        $s7, 0xC4($sp)
/* 3969CC E009A41C AFB600C0 */  sw        $s6, 0xC0($sp)
/* 3969D0 E009A420 AFB500BC */  sw        $s5, 0xBC($sp)
/* 3969D4 E009A424 AFB400B8 */  sw        $s4, 0xB8($sp)
/* 3969D8 E009A428 AFB300B4 */  sw        $s3, 0xB4($sp)
/* 3969DC E009A42C AFB100AC */  sw        $s1, 0xAC($sp)
/* 3969E0 E009A430 AFB000A8 */  sw        $s0, 0xA8($sp)
/* 3969E4 E009A434 F7B600D8 */  sdc1      $f22, 0xD8($sp)
/* 3969E8 E009A438 F7B400D0 */  sdc1      $f20, 0xD0($sp)
/* 3969EC E009A43C 8E430000 */  lw        $v1, 0x0($s2)
/* 3969F0 E009A440 8D35000C */  lw        $s5, 0xC($t1)
/* 3969F4 E009A444 0060402D */  daddu     $t0, $v1, $zero
/* 3969F8 E009A448 44050000 */  mfc1      $a1, $f0
/* 3969FC E009A44C 24630008 */  addiu     $v1, $v1, 0x8
/* 396A00 E009A450 AE430000 */  sw        $v1, 0x0($s2)
/* 396A04 E009A454 C6B60034 */  lwc1      $f22, 0x34($s5)
/* 396A08 E009A458 8EB70038 */  lw        $s7, 0x38($s5)
/* 396A0C E009A45C 8EAF003C */  lw        $t7, 0x3C($s5)
/* 396A10 E009A460 3C1E8000 */  lui       $fp, (0x80000000 >> 16)
/* 396A14 E009A464 AFAF00A0 */  sw        $t7, 0xA0($sp)
/* 396A18 E009A468 8EB60044 */  lw        $s6, 0x44($s5)
/* 396A1C E009A46C 00A0302D */  daddu     $a2, $a1, $zero
/* 396A20 E009A470 AD020000 */  sw        $v0, 0x0($t0)
/* 396A24 E009A474 AD000004 */  sw        $zero, 0x4($t0)
/* 396A28 E009A478 AC6A0000 */  sw        $t2, 0x0($v1)
/* 396A2C E009A47C 8D280010 */  lw        $t0, 0x10($t1)
/* 396A30 E009A480 24620008 */  addiu     $v0, $v1, 0x8
/* 396A34 E009A484 AE420000 */  sw        $v0, 0x0($s2)
/* 396A38 E009A488 8D02001C */  lw        $v0, 0x1C($t0)
/* 396A3C E009A48C 00A0382D */  daddu     $a3, $a1, $zero
/* 396A40 E009A490 005E1021 */  addu      $v0, $v0, $fp
/* 396A44 E009A494 0C080110 */  jal       shim_guScaleF
/* 396A48 E009A498 AC620004 */   sw       $v0, 0x4($v1)
/* 396A4C E009A49C C6A00024 */  lwc1      $f0, 0x24($s5)
/* 396A50 E009A4A0 3C0142C8 */  lui       $at, (0x42C80000 >> 16)
/* 396A54 E009A4A4 44812000 */  mtc1      $at, $f4
/* 396A58 E009A4A8 E7A00010 */  swc1      $f0, 0x10($sp)
/* 396A5C E009A4AC C6A00004 */  lwc1      $f0, 0x4($s5)
/* 396A60 E009A4B0 46040002 */  mul.s     $f0, $f0, $f4
/* 396A64 E009A4B4 00000000 */  nop
/* 396A68 E009A4B8 E7A00014 */  swc1      $f0, 0x14($sp)
/* 396A6C E009A4BC C6A00008 */  lwc1      $f0, 0x8($s5)
/* 396A70 E009A4C0 46040002 */  mul.s     $f0, $f0, $f4
/* 396A74 E009A4C4 00000000 */  nop
/* 396A78 E009A4C8 3C140001 */  lui       $s4, (0x11630 >> 16)
/* 396A7C E009A4CC 36941630 */  ori       $s4, $s4, (0x11630 & 0xFFFF)
/* 396A80 E009A4D0 27B00060 */  addiu     $s0, $sp, 0x60
/* 396A84 E009A4D4 E7A00018 */  swc1      $f0, 0x18($sp)
/* 396A88 E009A4D8 C6A0000C */  lwc1      $f0, 0xC($s5)
/* 396A8C E009A4DC 44801000 */  mtc1      $zero, $f2
/* 396A90 E009A4E0 46040002 */  mul.s     $f0, $f0, $f4
/* 396A94 E009A4E4 00000000 */  nop
/* 396A98 E009A4E8 44051000 */  mfc1      $a1, $f2
/* 396A9C E009A4EC 0200202D */  daddu     $a0, $s0, $zero
/* 396AA0 E009A4F0 00A0302D */  daddu     $a2, $a1, $zero
/* 396AA4 E009A4F4 00A0382D */  daddu     $a3, $a1, $zero
/* 396AA8 E009A4F8 0C080180 */  jal       shim_guPositionF
/* 396AAC E009A4FC E7A0001C */   swc1     $f0, 0x1C($sp)
/* 396AB0 E009A500 0200202D */  daddu     $a0, $s0, $zero
/* 396AB4 E009A504 27A50020 */  addiu     $a1, $sp, 0x20
/* 396AB8 E009A508 0C080114 */  jal       shim_guMtxCatF
/* 396ABC E009A50C 00A0302D */   daddu    $a2, $a1, $zero
/* 396AC0 E009A510 27A40020 */  addiu     $a0, $sp, 0x20
/* 396AC4 E009A514 3C118007 */  lui       $s1, %hi(gMatrixListPos)
/* 396AC8 E009A518 263141F0 */  addiu     $s1, $s1, %lo(gMatrixListPos)
/* 396ACC E009A51C 3C13800A */  lui       $s3, %hi(gDisplayContext)
/* 396AD0 E009A520 2673A674 */  addiu     $s3, $s3, %lo(gDisplayContext)
/* 396AD4 E009A524 96250000 */  lhu       $a1, 0x0($s1)
/* 396AD8 E009A528 8E620000 */  lw        $v0, 0x0($s3)
/* 396ADC E009A52C 00052980 */  sll       $a1, $a1, 6
/* 396AE0 E009A530 00B42821 */  addu      $a1, $a1, $s4
/* 396AE4 E009A534 0C080118 */  jal       shim_guMtxF2L
/* 396AE8 E009A538 00452821 */   addu     $a1, $v0, $a1
/* 396AEC E009A53C 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 396AF0 E009A540 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 396AF4 E009A544 00161100 */  sll       $v0, $s6, 4
/* 396AF8 E009A548 00561023 */  subu      $v0, $v0, $s6
/* 396AFC E009A54C 00021040 */  sll       $v0, $v0, 1
/* 396B00 E009A550 4482A000 */  mtc1      $v0, $f20
/* 396B04 E009A554 00000000 */  nop
/* 396B08 E009A558 4680A520 */  cvt.s.w   $f20, $f20
/* 396B0C E009A55C 4600A306 */  mov.s     $f12, $f20
/* 396B10 E009A560 8E500000 */  lw        $s0, 0x0($s2)
/* 396B14 E009A564 96220000 */  lhu       $v0, 0x0($s1)
/* 396B18 E009A568 0200202D */  daddu     $a0, $s0, $zero
/* 396B1C E009A56C 26100008 */  addiu     $s0, $s0, 0x8
/* 396B20 E009A570 AE500000 */  sw        $s0, 0x0($s2)
/* 396B24 E009A574 AC830000 */  sw        $v1, 0x0($a0)
/* 396B28 E009A578 24430001 */  addiu     $v1, $v0, 0x1
/* 396B2C E009A57C 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 396B30 E009A580 00021180 */  sll       $v0, $v0, 6
/* 396B34 E009A584 A6230000 */  sh        $v1, 0x0($s1)
/* 396B38 E009A588 8E630000 */  lw        $v1, 0x0($s3)
/* 396B3C E009A58C 00541021 */  addu      $v0, $v0, $s4
/* 396B40 E009A590 00621821 */  addu      $v1, $v1, $v0
/* 396B44 E009A594 26020008 */  addiu     $v0, $s0, 0x8
/* 396B48 E009A598 AC830004 */  sw        $v1, 0x4($a0)
/* 396B4C E009A59C AE420000 */  sw        $v0, 0x0($s2)
/* 396B50 E009A5A0 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 396B54 E009A5A4 0C080140 */  jal       shim_sin_deg
/* 396B58 E009A5A8 AE020000 */   sw       $v0, 0x0($s0)
/* 396B5C E009A5AC 4600A306 */  mov.s     $f12, $f20
/* 396B60 E009A5B0 0C080140 */  jal       shim_sin_deg
/* 396B64 E009A5B4 46000506 */   mov.s    $f20, $f0
/* 396B68 E009A5B8 3C0141C8 */  lui       $at, (0x41C80000 >> 16)
/* 396B6C E009A5BC 44811000 */  mtc1      $at, $f2
/* 396B70 E009A5C0 00000000 */  nop
/* 396B74 E009A5C4 4602A502 */  mul.s     $f20, $f20, $f2
/* 396B78 E009A5C8 00000000 */  nop
/* 396B7C E009A5CC 3C014361 */  lui       $at, (0x43610000 >> 16)
/* 396B80 E009A5D0 44811000 */  mtc1      $at, $f2
/* 396B84 E009A5D4 46000106 */  mov.s     $f4, $f0
/* 396B88 E009A5D8 4602A500 */  add.s     $f20, $f20, $f2
/* 396B8C E009A5DC 3C014F00 */  lui       $at, (0x4F000000 >> 16)
/* 396B90 E009A5E0 44811000 */  mtc1      $at, $f2
/* 396B94 E009A5E4 00000000 */  nop
/* 396B98 E009A5E8 4614103E */  c.le.s    $f2, $f20
/* 396B9C E009A5EC 00000000 */  nop
/* 396BA0 E009A5F0 45010005 */  bc1t      .LE009A608
/* 396BA4 E009A5F4 26100004 */   addiu    $s0, $s0, 0x4
/* 396BA8 E009A5F8 4600A18D */  trunc.w.s $f6, $f20
/* 396BAC E009A5FC 44023000 */  mfc1      $v0, $f6
/* 396BB0 E009A600 08026987 */  j         .LE009A61C
/* 396BB4 E009A604 00000000 */   nop
.LE009A608:
/* 396BB8 E009A608 4602A001 */  sub.s     $f0, $f20, $f2
/* 396BBC E009A60C 4600018D */  trunc.w.s $f6, $f0
/* 396BC0 E009A610 44023000 */  mfc1      $v0, $f6
/* 396BC4 E009A614 00000000 */  nop
/* 396BC8 E009A618 005E1025 */  or        $v0, $v0, $fp
.LE009A61C:
/* 396BCC E009A61C 3C0141C8 */  lui       $at, (0x41C80000 >> 16)
/* 396BD0 E009A620 44810000 */  mtc1      $at, $f0
/* 396BD4 E009A624 00000000 */  nop
/* 396BD8 E009A628 46002002 */  mul.s     $f0, $f4, $f0
/* 396BDC E009A62C 00000000 */  nop
/* 396BE0 E009A630 3C014361 */  lui       $at, (0x43610000 >> 16)
/* 396BE4 E009A634 44811000 */  mtc1      $at, $f2
/* 396BE8 E009A638 00000000 */  nop
/* 396BEC E009A63C 46020000 */  add.s     $f0, $f0, $f2
/* 396BF0 E009A640 3C014F00 */  lui       $at, (0x4F000000 >> 16)
/* 396BF4 E009A644 44811000 */  mtc1      $at, $f2
/* 396BF8 E009A648 00000000 */  nop
/* 396BFC E009A64C 4600103E */  c.le.s    $f2, $f0
/* 396C00 E009A650 00000000 */  nop
/* 396C04 E009A654 45010005 */  bc1t      .LE009A66C
/* 396C08 E009A658 00022600 */   sll      $a0, $v0, 24
/* 396C0C E009A65C 4600018D */  trunc.w.s $f6, $f0
/* 396C10 E009A660 44033000 */  mfc1      $v1, $f6
/* 396C14 E009A664 080269A2 */  j         .LE009A688
/* 396C18 E009A668 306200FF */   andi     $v0, $v1, 0xFF
.LE009A66C:
/* 396C1C E009A66C 46020001 */  sub.s     $f0, $f0, $f2
/* 396C20 E009A670 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* 396C24 E009A674 4600018D */  trunc.w.s $f6, $f0
/* 396C28 E009A678 44033000 */  mfc1      $v1, $f6
/* 396C2C E009A67C 00000000 */  nop
/* 396C30 E009A680 00621825 */  or        $v1, $v1, $v0
/* 396C34 E009A684 306200FF */  andi      $v0, $v1, 0xFF
.LE009A688:
/* 396C38 E009A688 00021400 */  sll       $v0, $v0, 16
/* 396C3C E009A68C 8FAF00A0 */  lw        $t7, 0xA0($sp)
/* 396C40 E009A690 00821025 */  or        $v0, $a0, $v0
/* 396C44 E009A694 31E300FF */  andi      $v1, $t7, 0xFF
/* 396C48 E009A698 3463FF00 */  ori       $v1, $v1, 0xFF00
/* 396C4C E009A69C 00431025 */  or        $v0, $v0, $v1
/* 396C50 E009A6A0 AE020000 */  sw        $v0, 0x0($s0)
/* 396C54 E009A6A4 8EA3002C */  lw        $v1, 0x2C($s5)
/* 396C58 E009A6A8 24020001 */  addiu     $v0, $zero, 0x1
/* 396C5C E009A6AC 1462002F */  bne       $v1, $v0, .LE009A76C
/* 396C60 E009A6B0 3C088888 */   lui      $t0, (0x88888889 >> 16)
/* 396C64 E009A6B4 3C05800A */  lui       $a1, %hi(gMainGfxPos)
/* 396C68 E009A6B8 24A5A66C */  addiu     $a1, $a1, %lo(gMainGfxPos)
/* 396C6C E009A6BC 35088889 */  ori       $t0, $t0, (0x88888889 & 0xFFFF)
/* 396C70 E009A6C0 3C06DE00 */  lui       $a2, (0xDE000000 >> 16)
/* 396C74 E009A6C4 3C020900 */  lui       $v0, %hi(D_09001040_40E2D0)
/* 396C78 E009A6C8 24421040 */  addiu     $v0, $v0, %lo(D_09001040_40E2D0)
/* 396C7C E009A6CC 8CA40000 */  lw        $a0, 0x0($a1)
/* 396C80 E009A6D0 3C070900 */  lui       $a3, %hi(D_09001190_40E420)
/* 396C84 E009A6D4 24E71190 */  addiu     $a3, $a3, %lo(D_09001190_40E420)
/* 396C88 E009A6D8 0080182D */  daddu     $v1, $a0, $zero
/* 396C8C E009A6DC 24840008 */  addiu     $a0, $a0, 0x8
/* 396C90 E009A6E0 ACA40000 */  sw        $a0, 0x0($a1)
/* 396C94 E009A6E4 AC620004 */  sw        $v0, 0x4($v1)
/* 396C98 E009A6E8 24820008 */  addiu     $v0, $a0, 0x8
/* 396C9C E009A6EC AC660000 */  sw        $a2, 0x0($v1)
/* 396CA0 E009A6F0 ACA20000 */  sw        $v0, 0x0($a1)
/* 396CA4 E009A6F4 24820010 */  addiu     $v0, $a0, 0x10
/* 396CA8 E009A6F8 AC860000 */  sw        $a2, 0x0($a0)
/* 396CAC E009A6FC AC870004 */  sw        $a3, 0x4($a0)
/* 396CB0 E009A700 ACA20000 */  sw        $v0, 0x0($a1)
/* 396CB4 E009A704 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 396CB8 E009A708 AC820008 */  sw        $v0, 0x8($a0)
/* 396CBC E009A70C 8EA30030 */  lw        $v1, 0x30($s5)
/* 396CC0 E009A710 24820018 */  addiu     $v0, $a0, 0x18
/* 396CC4 E009A714 ACA20000 */  sw        $v0, 0x0($a1)
/* 396CC8 E009A718 3C020900 */  lui       $v0, %hi(D_090010E8_40E378)
/* 396CCC E009A71C 244210E8 */  addiu     $v0, $v0, %lo(D_090010E8_40E378)
/* 396CD0 E009A720 AC820014 */  sw        $v0, 0x14($a0)
/* 396CD4 E009A724 2402001E */  addiu     $v0, $zero, 0x1E
/* 396CD8 E009A728 AC860010 */  sw        $a2, 0x10($a0)
/* 396CDC E009A72C 00431023 */  subu      $v0, $v0, $v1
/* 396CE0 E009A730 00021A00 */  sll       $v1, $v0, 8
/* 396CE4 E009A734 00621823 */  subu      $v1, $v1, $v0
/* 396CE8 E009A738 00680018 */  mult      $v1, $t0
/* 396CEC E009A73C 24820020 */  addiu     $v0, $a0, 0x20
/* 396CF0 E009A740 ACA20000 */  sw        $v0, 0x0($a1)
/* 396CF4 E009A744 AC860018 */  sw        $a2, 0x18($a0)
/* 396CF8 E009A748 AC87001C */  sw        $a3, 0x1C($a0)
/* 396CFC E009A74C 00007810 */  mfhi      $t7
/* 396D00 E009A750 01E31021 */  addu      $v0, $t7, $v1
/* 396D04 E009A754 00021103 */  sra       $v0, $v0, 4
/* 396D08 E009A758 00031FC3 */  sra       $v1, $v1, 31
/* 396D0C E009A75C 00431023 */  subu      $v0, $v0, $v1
/* 396D10 E009A760 304200FF */  andi      $v0, $v0, 0xFF
/* 396D14 E009A764 08026A77 */  j         .LE009A9DC
/* 396D18 E009A768 AC82000C */   sw       $v0, 0xC($a0)
.LE009A76C:
/* 396D1C E009A76C 1860000D */  blez      $v1, .LE009A7A4
/* 396D20 E009A770 00000000 */   nop
/* 396D24 E009A774 3C03800A */  lui       $v1, %hi(gMainGfxPos)
/* 396D28 E009A778 2463A66C */  addiu     $v1, $v1, %lo(gMainGfxPos)
/* 396D2C E009A77C 8C620000 */  lw        $v0, 0x0($v1)
/* 396D30 E009A780 0040202D */  daddu     $a0, $v0, $zero
/* 396D34 E009A784 24420008 */  addiu     $v0, $v0, 0x8
/* 396D38 E009A788 AC620000 */  sw        $v0, 0x0($v1)
/* 396D3C E009A78C 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 396D40 E009A790 AC820000 */  sw        $v0, 0x0($a0)
/* 396D44 E009A794 3C020900 */  lui       $v0, %hi(D_090010E8_40E378)
/* 396D48 E009A798 244210E8 */  addiu     $v0, $v0, %lo(D_090010E8_40E378)
/* 396D4C E009A79C 080269F4 */  j         .LE009A7D0
/* 396D50 E009A7A0 AC820004 */   sw       $v0, 0x4($a0)
.LE009A7A4:
/* 396D54 E009A7A4 3C03800A */  lui       $v1, %hi(gMainGfxPos)
/* 396D58 E009A7A8 2463A66C */  addiu     $v1, $v1, %lo(gMainGfxPos)
/* 396D5C E009A7AC 8C620000 */  lw        $v0, 0x0($v1)
/* 396D60 E009A7B0 0040202D */  daddu     $a0, $v0, $zero
/* 396D64 E009A7B4 24420008 */  addiu     $v0, $v0, 0x8
/* 396D68 E009A7B8 AC620000 */  sw        $v0, 0x0($v1)
/* 396D6C E009A7BC 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 396D70 E009A7C0 AC820000 */  sw        $v0, 0x0($a0)
/* 396D74 E009A7C4 3C020900 */  lui       $v0, %hi(D_09001040_40E2D0)
/* 396D78 E009A7C8 24421040 */  addiu     $v0, $v0, %lo(D_09001040_40E2D0)
/* 396D7C E009A7CC AC820004 */  sw        $v0, 0x4($a0)
.LE009A7D0:
/* 396D80 E009A7D0 0000902D */  daddu     $s2, $zero, $zero
/* 396D84 E009A7D4 0240A82D */  daddu     $s5, $s2, $zero
/* 396D88 E009A7D8 00161080 */  sll       $v0, $s6, 2
/* 396D8C E009A7DC 00561021 */  addu      $v0, $v0, $s6
/* 396D90 E009A7E0 00029840 */  sll       $s3, $v0, 1
/* 396D94 E009A7E4 3C04800A */  lui       $a0, %hi(gMainGfxPos)
/* 396D98 E009A7E8 2484A66C */  addiu     $a0, $a0, %lo(gMainGfxPos)
/* 396D9C E009A7EC 8C830000 */  lw        $v1, 0x0($a0)
/* 396DA0 E009A7F0 0260A02D */  daddu     $s4, $s3, $zero
/* 396DA4 E009A7F4 24620008 */  addiu     $v0, $v1, 0x8
/* 396DA8 E009A7F8 0040B02D */  daddu     $s6, $v0, $zero
/* 396DAC E009A7FC 3C02DE01 */  lui       $v0, (0xDE010000 >> 16)
/* 396DB0 E009A800 AC620000 */  sw        $v0, 0x0($v1)
/* 396DB4 E009A804 24620208 */  addiu     $v0, $v1, 0x208
/* 396DB8 E009A808 AC620004 */  sw        $v0, 0x4($v1)
/* 396DBC E009A80C AC960000 */  sw        $s6, 0x0($a0)
.LE009A810:
/* 396DC0 E009A810 00128140 */  sll       $s0, $s2, 5
/* 396DC4 E009A814 02971021 */  addu      $v0, $s4, $s7
/* 396DC8 E009A818 44826000 */  mtc1      $v0, $f12
/* 396DCC E009A81C 00000000 */  nop
/* 396DD0 E009A820 46806320 */  cvt.s.w   $f12, $f12
/* 396DD4 E009A824 0C080140 */  jal       shim_sin_deg
/* 396DD8 E009A828 02D08021 */   addu     $s0, $s6, $s0
/* 396DDC E009A82C 3C0143FA */  lui       $at, (0x43FA0000 >> 16)
/* 396DE0 E009A830 44811000 */  mtc1      $at, $f2
/* 396DE4 E009A834 00000000 */  nop
/* 396DE8 E009A838 46020002 */  mul.s     $f0, $f0, $f2
/* 396DEC E009A83C 00000000 */  nop
/* 396DF0 E009A840 46160002 */  mul.s     $f0, $f0, $f22
/* 396DF4 E009A844 00000000 */  nop
/* 396DF8 E009A848 02771021 */  addu      $v0, $s3, $s7
/* 396DFC E009A84C 44826000 */  mtc1      $v0, $f12
/* 396E00 E009A850 00000000 */  nop
/* 396E04 E009A854 46806320 */  cvt.s.w   $f12, $f12
/* 396E08 E009A858 4600018D */  trunc.w.s $f6, $f0
/* 396E0C E009A85C 44113000 */  mfc1      $s1, $f6
/* 396E10 E009A860 0C080140 */  jal       shim_sin_deg
/* 396E14 E009A864 26730006 */   addiu    $s3, $s3, 0x6
/* 396E18 E009A868 3C014348 */  lui       $at, (0x43480000 >> 16)
/* 396E1C E009A86C 44811000 */  mtc1      $at, $f2
/* 396E20 E009A870 2694003C */  addiu     $s4, $s4, 0x3C
/* 396E24 E009A874 46020002 */  mul.s     $f0, $f0, $f2
/* 396E28 E009A878 00000000 */  nop
/* 396E2C E009A87C 001219C0 */  sll       $v1, $s2, 7
/* 396E30 E009A880 26520001 */  addiu     $s2, $s2, 0x1
/* 396E34 E009A884 2622F380 */  addiu     $v0, $s1, -0xC80
/* 396E38 E009A888 26310C80 */  addiu     $s1, $s1, 0xC80
/* 396E3C E009A88C 46160002 */  mul.s     $f0, $f0, $f22
/* 396E40 E009A890 00000000 */  nop
/* 396E44 E009A894 A6020000 */  sh        $v0, 0x0($s0)
/* 396E48 E009A898 A6000004 */  sh        $zero, 0x4($s0)
/* 396E4C E009A89C A6000008 */  sh        $zero, 0x8($s0)
/* 396E50 E009A8A0 A603000A */  sh        $v1, 0xA($s0)
/* 396E54 E009A8A4 4600018D */  trunc.w.s $f6, $f0
/* 396E58 E009A8A8 44023000 */  mfc1      $v0, $f6
/* 396E5C E009A8AC 00000000 */  nop
/* 396E60 E009A8B0 02A21021 */  addu      $v0, $s5, $v0
/* 396E64 E009A8B4 A6020002 */  sh        $v0, 0x2($s0)
/* 396E68 E009A8B8 26100010 */  addiu     $s0, $s0, 0x10
/* 396E6C E009A8BC 26B50190 */  addiu     $s5, $s5, 0x190
/* 396E70 E009A8C0 A6020002 */  sh        $v0, 0x2($s0)
/* 396E74 E009A8C4 24020800 */  addiu     $v0, $zero, 0x800
/* 396E78 E009A8C8 A6020008 */  sh        $v0, 0x8($s0)
/* 396E7C E009A8CC 2A420010 */  slti      $v0, $s2, 0x10
/* 396E80 E009A8D0 A6110000 */  sh        $s1, 0x0($s0)
/* 396E84 E009A8D4 A6000004 */  sh        $zero, 0x4($s0)
/* 396E88 E009A8D8 1440FFCD */  bnez      $v0, .LE009A810
/* 396E8C E009A8DC A603000A */   sh       $v1, 0xA($s0)
/* 396E90 E009A8E0 3C040102 */  lui       $a0, (0x1020040 >> 16)
/* 396E94 E009A8E4 34840040 */  ori       $a0, $a0, (0x1020040 & 0xFFFF)
/* 396E98 E009A8E8 0000902D */  daddu     $s2, $zero, $zero
/* 396E9C E009A8EC 3C02800A */  lui       $v0, %hi(gMainGfxPos)
/* 396EA0 E009A8F0 2442A66C */  addiu     $v0, $v0, %lo(gMainGfxPos)
/* 396EA4 E009A8F4 0040482D */  daddu     $t1, $v0, $zero
/* 396EA8 E009A8F8 3C0B0600 */  lui       $t3, (0x6000000 >> 16)
/* 396EAC E009A8FC 240A0001 */  addiu     $t2, $zero, 0x1
/* 396EB0 E009A900 3C0E0606 */  lui       $t6, (0x6060402 >> 16)
/* 396EB4 E009A904 35CE0402 */  ori       $t6, $t6, (0x6060402 & 0xFFFF)
/* 396EB8 E009A908 3C0D0002 */  lui       $t5, (0x20406 >> 16)
/* 396EBC E009A90C 35AD0406 */  ori       $t5, $t5, (0x20406 & 0xFFFF)
/* 396EC0 E009A910 3C0C0006 */  lui       $t4, (0x60804 >> 16)
/* 396EC4 E009A914 358C0804 */  ori       $t4, $t4, (0x60804 & 0xFFFF)
/* 396EC8 E009A918 24070004 */  addiu     $a3, $zero, 0x4
/* 396ECC E009A91C 24060002 */  addiu     $a2, $zero, 0x2
/* 396ED0 E009A920 8D230000 */  lw        $v1, 0x0($t1)
/* 396ED4 E009A924 24080006 */  addiu     $t0, $zero, 0x6
/* 396ED8 E009A928 24620208 */  addiu     $v0, $v1, 0x208
/* 396EDC E009A92C AD220000 */  sw        $v0, 0x0($t1)
/* 396EE0 E009A930 AC640200 */  sw        $a0, 0x200($v1)
/* 396EE4 E009A934 AC760204 */  sw        $s6, 0x204($v1)
.LE009A938:
/* 396EE8 E009A938 8D240000 */  lw        $a0, 0x0($t1)
/* 396EEC E009A93C 00122840 */  sll       $a1, $s2, 1
/* 396EF0 E009A940 24820008 */  addiu     $v0, $a0, 0x8
/* 396EF4 E009A944 14A00004 */  bnez      $a1, .LE009A958
/* 396EF8 E009A948 AD220000 */   sw       $v0, 0x0($t1)
/* 396EFC E009A94C 00121440 */  sll       $v0, $s2, 17
/* 396F00 E009A950 08026A60 */  j         .LE009A980
/* 396F04 E009A954 34420402 */   ori      $v0, $v0, 0x402
.LE009A958:
/* 396F08 E009A958 14AA0003 */  bne       $a1, $t2, .LE009A968
/* 396F0C E009A95C 30C200FF */   andi     $v0, $a2, 0xFF
/* 396F10 E009A960 08026A62 */  j         .LE009A988
/* 396F14 E009A964 AC8E0000 */   sw       $t6, 0x0($a0)
.LE009A968:
/* 396F18 E009A968 00021400 */  sll       $v0, $v0, 16
/* 396F1C E009A96C 00121A80 */  sll       $v1, $s2, 10
/* 396F20 E009A970 3063FC00 */  andi      $v1, $v1, 0xFC00
/* 396F24 E009A974 00431025 */  or        $v0, $v0, $v1
/* 396F28 E009A978 30E300FF */  andi      $v1, $a3, 0xFF
/* 396F2C E009A97C 00431025 */  or        $v0, $v0, $v1
.LE009A980:
/* 396F30 E009A980 004B1025 */  or        $v0, $v0, $t3
/* 396F34 E009A984 AC820000 */  sw        $v0, 0x0($a0)
.LE009A988:
/* 396F38 E009A988 14A00003 */  bnez      $a1, .LE009A998
/* 396F3C E009A98C 00000000 */   nop
/* 396F40 E009A990 08026A71 */  j         .LE009A9C4
/* 396F44 E009A994 AC8D0004 */   sw       $t5, 0x4($a0)
.LE009A998:
/* 396F48 E009A998 14AA0003 */  bne       $a1, $t2, .LE009A9A8
/* 396F4C E009A99C 310200FF */   andi     $v0, $t0, 0xFF
/* 396F50 E009A9A0 08026A71 */  j         .LE009A9C4
/* 396F54 E009A9A4 AC8C0004 */   sw       $t4, 0x4($a0)
.LE009A9A8:
/* 396F58 E009A9A8 00021400 */  sll       $v0, $v0, 16
/* 396F5C E009A9AC 30C300FF */  andi      $v1, $a2, 0xFF
/* 396F60 E009A9B0 00031A00 */  sll       $v1, $v1, 8
/* 396F64 E009A9B4 00431025 */  or        $v0, $v0, $v1
/* 396F68 E009A9B8 30E300FF */  andi      $v1, $a3, 0xFF
/* 396F6C E009A9BC 00431025 */  or        $v0, $v0, $v1
/* 396F70 E009A9C0 AC820004 */  sw        $v0, 0x4($a0)
.LE009A9C4:
/* 396F74 E009A9C4 24E70004 */  addiu     $a3, $a3, 0x4
/* 396F78 E009A9C8 24C60004 */  addiu     $a2, $a2, 0x4
/* 396F7C E009A9CC 26520001 */  addiu     $s2, $s2, 0x1
/* 396F80 E009A9D0 2A42000F */  slti      $v0, $s2, 0xF
/* 396F84 E009A9D4 1440FFD8 */  bnez      $v0, .LE009A938
/* 396F88 E009A9D8 25080004 */   addiu    $t0, $t0, 0x4
.LE009A9DC:
/* 396F8C E009A9DC 3C03D838 */  lui       $v1, (0xD8380002 >> 16)
/* 396F90 E009A9E0 3C04800A */  lui       $a0, %hi(gMainGfxPos)
/* 396F94 E009A9E4 2484A66C */  addiu     $a0, $a0, %lo(gMainGfxPos)
/* 396F98 E009A9E8 8C820000 */  lw        $v0, 0x0($a0)
/* 396F9C E009A9EC 34630002 */  ori       $v1, $v1, (0xD8380002 & 0xFFFF)
/* 396FA0 E009A9F0 0040282D */  daddu     $a1, $v0, $zero
/* 396FA4 E009A9F4 24420008 */  addiu     $v0, $v0, 0x8
/* 396FA8 E009A9F8 AC820000 */  sw        $v0, 0x0($a0)
/* 396FAC E009A9FC ACA30000 */  sw        $v1, 0x0($a1)
/* 396FB0 E009AA00 24030040 */  addiu     $v1, $zero, 0x40
/* 396FB4 E009AA04 ACA30004 */  sw        $v1, 0x4($a1)
/* 396FB8 E009AA08 24430008 */  addiu     $v1, $v0, 0x8
/* 396FBC E009AA0C AC830000 */  sw        $v1, 0x0($a0)
/* 396FC0 E009AA10 3C03E700 */  lui       $v1, (0xE7000000 >> 16)
/* 396FC4 E009AA14 AC430000 */  sw        $v1, 0x0($v0)
/* 396FC8 E009AA18 AC400004 */  sw        $zero, 0x4($v0)
/* 396FCC E009AA1C 8FBF00CC */  lw        $ra, 0xCC($sp)
/* 396FD0 E009AA20 8FBE00C8 */  lw        $fp, 0xC8($sp)
/* 396FD4 E009AA24 8FB700C4 */  lw        $s7, 0xC4($sp)
/* 396FD8 E009AA28 8FB600C0 */  lw        $s6, 0xC0($sp)
/* 396FDC E009AA2C 8FB500BC */  lw        $s5, 0xBC($sp)
/* 396FE0 E009AA30 8FB400B8 */  lw        $s4, 0xB8($sp)
/* 396FE4 E009AA34 8FB300B4 */  lw        $s3, 0xB4($sp)
/* 396FE8 E009AA38 8FB200B0 */  lw        $s2, 0xB0($sp)
/* 396FEC E009AA3C 8FB100AC */  lw        $s1, 0xAC($sp)
/* 396FF0 E009AA40 8FB000A8 */  lw        $s0, 0xA8($sp)
/* 396FF4 E009AA44 D7B600D8 */  ldc1      $f22, 0xD8($sp)
/* 396FF8 E009AA48 D7B400D0 */  ldc1      $f20, 0xD0($sp)
/* 396FFC E009AA4C 03E00008 */  jr        $ra
/* 397000 E009AA50 27BD00E0 */   addiu    $sp, $sp, 0xE0
/* 397004 E009AA54 00000000 */  nop
/* 397008 E009AA58 00000000 */  nop
/* 39700C E009AA5C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void chomp_drop_appendGfx(void* effect) {
    EffectInstance* effectTemp = effect;
    ChompDropFXData* data = effectTemp->data.chompDrop;
    f32 temp_f22 = data->unk_34;
    s32 temp_s7 = data->unk_38;
    s32 primA = data->unk_3C;
    s32 temp_s6 = data->unk_44;
    Matrix4f sp20, sp60;
    Gfx* savedGfxPos;
    Vtx_t* vtxTemp;
    s32 i;

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

    shim_guScaleF(sp20, 0.01f, 0.01f, 0.01f);
    shim_guPositionF(sp60, 0.0f, 0.0f, 0.0f, data->unk_24, data->unk_04 * 100.0f, data->unk_08 * 100.0f, data->unk_0C * 100.0f);
    shim_guMtxCatF(sp60, sp20, sp20);
    shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
              G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
    gDPSetPrimColor(
        gMainGfxPos++, 0, 0,
        (shim_sin_deg(temp_s6 * 30) * 25.0f) + 225.0f,
        (shim_sin_deg(temp_s6 * 30) * 25.0f) + 225.0f,
        255,
        primA
    );

    if (data->unk_2C == 1) {
        gSPDisplayList(gMainGfxPos++, D_09001040_398080);
        gSPDisplayList(gMainGfxPos++, D_09001190_3981D0);
        gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, ((30 - data->unk_30) * 255) / 30);
        gSPDisplayList(gMainGfxPos++, D_090010E8_398128);
        gSPDisplayList(gMainGfxPos++, D_09001190_3981D0);
    } else {
        if (data->unk_2C > 0) {
            gSPDisplayList(gMainGfxPos++, D_090010E8_398128);
        } else {
            gSPDisplayList(gMainGfxPos++, D_09001040_398080);
        }

        savedGfxPos = gMainGfxPos + 1;
        gSPBranchList(gMainGfxPos, gMainGfxPos + 0x41);
        gMainGfxPos = savedGfxPos;
        vtxTemp = (Vtx_t*) savedGfxPos;

        for (i = 0; i < 16; i++) {
            Vtx_t* vtx = &vtxTemp[i * 2];
            s32 temp_s1 = shim_sin_deg(((temp_s6 * 10) + (i * 60)) + temp_s7) * 500.0f * temp_f22;
            s32 temp_v0_3 = (i * 400) + (s32) (shim_sin_deg(((temp_s6 * 10) + (i * 6)) + temp_s7) * 200.0f * temp_f22);

            vtx->ob[0] = temp_s1 - 3200;
            vtx->ob[1] = temp_v0_3;
            vtx->ob[2] = 0;
            vtx->tc[0] = 0;
            vtx->tc[1] = i * 128;
            vtx++;

            vtx->ob[0] = temp_s1 + 3200;
            vtx->ob[1] = temp_v0_3;
            vtx->ob[2] = 0;
            vtx->tc[0] = 2048;
            vtx->tc[1] = i * 128;
        }

        gMainGfxPos += 0x40;
        gSPVertex(gMainGfxPos++, vtxTemp, 32, 0);

        for (i = 0; i < 15; i++) {
            s32 i2 = i * 2;
            gSP2Triangles(gMainGfxPos++,
                i2    , i2 + 2, i2 + 1, i2,
                i2 + 1, i2 + 2, i2 + 3, i2);
            };
    }

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


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_80115498
/* ABB98 80115498 27BDFF88 */  addiu     $sp, $sp, -0x78
/* ABB9C 8011549C AFB50064 */  sw        $s5, 0x64($sp)
/* ABBA0 801154A0 0080A82D */  daddu     $s5, $a0, $zero
/* ABBA4 801154A4 00A0182D */  daddu     $v1, $a1, $zero
/* ABBA8 801154A8 AFA60080 */  sw        $a2, 0x80($sp)
/* ABBAC 801154AC AFA70084 */  sw        $a3, 0x84($sp)
/* ABBB0 801154B0 00C71021 */  addu      $v0, $a2, $a3
/* ABBB4 801154B4 02A2102B */  sltu      $v0, $s5, $v0
/* ABBB8 801154B8 AFBF0074 */  sw        $ra, 0x74($sp)
/* ABBBC 801154BC AFBE0070 */  sw        $fp, 0x70($sp)
/* ABBC0 801154C0 AFB7006C */  sw        $s7, 0x6C($sp)
/* ABBC4 801154C4 AFB60068 */  sw        $s6, 0x68($sp)
/* ABBC8 801154C8 AFB40060 */  sw        $s4, 0x60($sp)
/* ABBCC 801154CC AFB3005C */  sw        $s3, 0x5C($sp)
/* ABBD0 801154D0 AFB20058 */  sw        $s2, 0x58($sp)
/* ABBD4 801154D4 AFB10054 */  sw        $s1, 0x54($sp)
/* ABBD8 801154D8 10400180 */  beqz      $v0, .L80115ADC
/* ABBDC 801154DC AFB00050 */   sw       $s0, 0x50($sp)
/* ABBE0 801154E0 27B30020 */  addiu     $s3, $sp, 0x20
/* ABBE4 801154E4 24170001 */  addiu     $s7, $zero, 0x1
/* ABBE8 801154E8 241E1000 */  addiu     $fp, $zero, 0x1000
/* ABBEC 801154EC 00031100 */  sll       $v0, $v1, 4
/* ABBF0 801154F0 00451021 */  addu      $v0, $v0, $a1
/* ABBF4 801154F4 0002B080 */  sll       $s6, $v0, 2
/* ABBF8 801154F8 02A0202D */  daddu     $a0, $s5, $zero
.L801154FC:
/* ABBFC 801154FC 26A50030 */  addiu     $a1, $s5, 0x30
/* ABC00 80115500 0C00A5CF */  jal       dma_copy
/* ABC04 80115504 27A60020 */   addiu    $a2, $sp, 0x20
/* ABC08 80115508 93A20048 */  lbu       $v0, 0x48($sp)
/* ABC0C 8011550C 10400173 */  beqz      $v0, .L80115ADC
/* ABC10 80115510 00000000 */   nop
/* ABC14 80115514 97A40042 */  lhu       $a0, 0x42($sp)
/* ABC18 80115518 97A20046 */  lhu       $v0, 0x46($sp)
/* ABC1C 8011551C 00820018 */  mult      $a0, $v0
/* ABC20 80115520 97A3004C */  lhu       $v1, 0x4C($sp)
/* ABC24 80115524 30630F00 */  andi      $v1, $v1, 0xF00
/* ABC28 80115528 00009012 */  mflo      $s2
/* ABC2C 8011552C 14600049 */  bnez      $v1, .L80115654
/* ABC30 80115530 24080100 */   addiu    $t0, $zero, 0x100
/* ABC34 80115534 93A20049 */  lbu       $v0, 0x49($sp)
/* ABC38 80115538 54570125 */  bnel      $v0, $s7, .L801159D0
/* ABC3C 8011553C 00129042 */   srl      $s2, $s2, 1
/* ABC40 80115540 24050002 */  addiu     $a1, $zero, 0x2
/* ABC44 80115544 14A00002 */  bnez      $a1, .L80115550
/* ABC48 80115548 0085001A */   div      $zero, $a0, $a1
/* ABC4C 8011554C 0007000D */  break     7
.L80115550:
/* ABC50 80115550 2401FFFF */  addiu     $at, $zero, -0x1
/* ABC54 80115554 14A10004 */  bne       $a1, $at, .L80115568
/* ABC58 80115558 3C018000 */   lui      $at, (0x80000000 >> 16)
/* ABC5C 8011555C 14810002 */  bne       $a0, $at, .L80115568
/* ABC60 80115560 00000000 */   nop
/* ABC64 80115564 0006000D */  break     6
.L80115568:
/* ABC68 80115568 00001012 */  mflo      $v0
/* ABC6C 8011556C 28420010 */  slti      $v0, $v0, 0x10
/* ABC70 80115570 54400117 */  bnel      $v0, $zero, .L801159D0
/* ABC74 80115574 00129042 */   srl      $s2, $s2, 1
/* ABC78 80115578 96660026 */  lhu       $a2, 0x26($s3)
.L8011557C:
/* ABC7C 8011557C 14A00002 */  bnez      $a1, .L80115588
/* ABC80 80115580 00C5001A */   div      $zero, $a2, $a1
/* ABC84 80115584 0007000D */  break     7
.L80115588:
/* ABC88 80115588 2401FFFF */  addiu     $at, $zero, -0x1
/* ABC8C 8011558C 14A10004 */  bne       $a1, $at, .L801155A0
/* ABC90 80115590 3C018000 */   lui      $at, (0x80000000 >> 16)
/* ABC94 80115594 14C10002 */  bne       $a2, $at, .L801155A0
/* ABC98 80115598 00000000 */   nop
/* ABC9C 8011559C 0006000D */  break     6
.L801155A0:
/* ABCA0 801155A0 00001012 */  mflo      $v0
/* ABCA4 801155A4 5840010A */  blezl     $v0, .L801159D0
/* ABCA8 801155A8 00129042 */   srl      $s2, $s2, 1
/* ABCAC 801155AC 96630022 */  lhu       $v1, 0x22($s3)
/* ABCB0 801155B0 14A00002 */  bnez      $a1, .L801155BC
/* ABCB4 801155B4 0065001A */   div      $zero, $v1, $a1
/* ABCB8 801155B8 0007000D */  break     7
.L801155BC:
/* ABCBC 801155BC 2401FFFF */  addiu     $at, $zero, -0x1
/* ABCC0 801155C0 14A10004 */  bne       $a1, $at, .L801155D4
/* ABCC4 801155C4 3C018000 */   lui      $at, (0x80000000 >> 16)
/* ABCC8 801155C8 14610002 */  bne       $v1, $at, .L801155D4
/* ABCCC 801155CC 00000000 */   nop
/* ABCD0 801155D0 0006000D */  break     6
.L801155D4:
/* ABCD4 801155D4 00001012 */  mflo      $v0
/* ABCD8 801155D8 00000000 */  nop
/* ABCDC 801155DC 00000000 */  nop
/* ABCE0 801155E0 00460018 */  mult      $v0, $a2
/* ABCE4 801155E4 00005012 */  mflo      $t2
/* ABCE8 801155E8 00000000 */  nop
/* ABCEC 801155EC 14A00002 */  bnez      $a1, .L801155F8
/* ABCF0 801155F0 0145001A */   div      $zero, $t2, $a1
/* ABCF4 801155F4 0007000D */  break     7
.L801155F8:
/* ABCF8 801155F8 2401FFFF */  addiu     $at, $zero, -0x1
/* ABCFC 801155FC 14A10004 */  bne       $a1, $at, .L80115610
/* ABD00 80115600 3C018000 */   lui      $at, (0x80000000 >> 16)
/* ABD04 80115604 15410002 */  bne       $t2, $at, .L80115610
/* ABD08 80115608 00000000 */   nop
/* ABD0C 8011560C 0006000D */  break     6
.L80115610:
/* ABD10 80115610 00002012 */  mflo      $a0
/* ABD14 80115614 00052840 */  sll       $a1, $a1, 1
/* ABD18 80115618 14A00002 */  bnez      $a1, .L80115624
/* ABD1C 8011561C 0065001A */   div      $zero, $v1, $a1
/* ABD20 80115620 0007000D */  break     7
.L80115624:
/* ABD24 80115624 2401FFFF */  addiu     $at, $zero, -0x1
/* ABD28 80115628 14A10004 */  bne       $a1, $at, .L8011563C
/* ABD2C 8011562C 3C018000 */   lui      $at, (0x80000000 >> 16)
/* ABD30 80115630 14610002 */  bne       $v1, $at, .L8011563C
/* ABD34 80115634 00000000 */   nop
/* ABD38 80115638 0006000D */  break     6
.L8011563C:
/* ABD3C 8011563C 00001012 */  mflo      $v0
/* ABD40 80115640 28420010 */  slti      $v0, $v0, 0x10
/* ABD44 80115644 1040FFCD */  beqz      $v0, .L8011557C
/* ABD48 80115648 02449021 */   addu     $s2, $s2, $a0
/* ABD4C 8011564C 08045674 */  j         .L801159D0
/* ABD50 80115650 00129042 */   srl      $s2, $s2, 1
.L80115654:
/* ABD54 80115654 14680048 */  bne       $v1, $t0, .L80115778
/* ABD58 80115658 00000000 */   nop
/* ABD5C 8011565C 93A20049 */  lbu       $v0, 0x49($sp)
/* ABD60 80115660 145700DB */  bne       $v0, $s7, .L801159D0
/* ABD64 80115664 24050002 */   addiu    $a1, $zero, 0x2
/* ABD68 80115668 14A00002 */  bnez      $a1, .L80115674
/* ABD6C 8011566C 0085001A */   div      $zero, $a0, $a1
/* ABD70 80115670 0007000D */  break     7
.L80115674:
/* ABD74 80115674 2401FFFF */  addiu     $at, $zero, -0x1
/* ABD78 80115678 14A10004 */  bne       $a1, $at, .L8011568C
/* ABD7C 8011567C 3C018000 */   lui      $at, (0x80000000 >> 16)
/* ABD80 80115680 14810002 */  bne       $a0, $at, .L8011568C
/* ABD84 80115684 00000000 */   nop
/* ABD88 80115688 0006000D */  break     6
.L8011568C:
/* ABD8C 8011568C 00001012 */  mflo      $v0
/* ABD90 80115690 28420008 */  slti      $v0, $v0, 0x8
/* ABD94 80115694 144000CE */  bnez      $v0, .L801159D0
/* ABD98 80115698 00000000 */   nop
/* ABD9C 8011569C 96660026 */  lhu       $a2, 0x26($s3)
.L801156A0:
/* ABDA0 801156A0 14A00002 */  bnez      $a1, .L801156AC
/* ABDA4 801156A4 00C5001A */   div      $zero, $a2, $a1
/* ABDA8 801156A8 0007000D */  break     7
.L801156AC:
/* ABDAC 801156AC 2401FFFF */  addiu     $at, $zero, -0x1
/* ABDB0 801156B0 14A10004 */  bne       $a1, $at, .L801156C4
/* ABDB4 801156B4 3C018000 */   lui      $at, (0x80000000 >> 16)
/* ABDB8 801156B8 14C10002 */  bne       $a2, $at, .L801156C4
/* ABDBC 801156BC 00000000 */   nop
/* ABDC0 801156C0 0006000D */  break     6
.L801156C4:
/* ABDC4 801156C4 00001012 */  mflo      $v0
/* ABDC8 801156C8 184000C1 */  blez      $v0, .L801159D0
/* ABDCC 801156CC 00000000 */   nop
/* ABDD0 801156D0 96630022 */  lhu       $v1, 0x22($s3)
/* ABDD4 801156D4 14A00002 */  bnez      $a1, .L801156E0
/* ABDD8 801156D8 0065001A */   div      $zero, $v1, $a1
/* ABDDC 801156DC 0007000D */  break     7
.L801156E0:
/* ABDE0 801156E0 2401FFFF */  addiu     $at, $zero, -0x1
/* ABDE4 801156E4 14A10004 */  bne       $a1, $at, .L801156F8
/* ABDE8 801156E8 3C018000 */   lui      $at, (0x80000000 >> 16)
/* ABDEC 801156EC 14610002 */  bne       $v1, $at, .L801156F8
/* ABDF0 801156F0 00000000 */   nop
/* ABDF4 801156F4 0006000D */  break     6
.L801156F8:
/* ABDF8 801156F8 00001012 */  mflo      $v0
/* ABDFC 801156FC 00000000 */  nop
/* ABE00 80115700 00000000 */  nop
/* ABE04 80115704 00460018 */  mult      $v0, $a2
/* ABE08 80115708 00005012 */  mflo      $t2
/* ABE0C 8011570C 00000000 */  nop
/* ABE10 80115710 14A00002 */  bnez      $a1, .L8011571C
/* ABE14 80115714 0145001A */   div      $zero, $t2, $a1
/* ABE18 80115718 0007000D */  break     7
.L8011571C:
/* ABE1C 8011571C 2401FFFF */  addiu     $at, $zero, -0x1
/* ABE20 80115720 14A10004 */  bne       $a1, $at, .L80115734
/* ABE24 80115724 3C018000 */   lui      $at, (0x80000000 >> 16)
/* ABE28 80115728 15410002 */  bne       $t2, $at, .L80115734
/* ABE2C 8011572C 00000000 */   nop
/* ABE30 80115730 0006000D */  break     6
.L80115734:
/* ABE34 80115734 00002012 */  mflo      $a0
/* ABE38 80115738 00052840 */  sll       $a1, $a1, 1
/* ABE3C 8011573C 14A00002 */  bnez      $a1, .L80115748
/* ABE40 80115740 0065001A */   div      $zero, $v1, $a1
/* ABE44 80115744 0007000D */  break     7
.L80115748:
/* ABE48 80115748 2401FFFF */  addiu     $at, $zero, -0x1
/* ABE4C 8011574C 14A10004 */  bne       $a1, $at, .L80115760
/* ABE50 80115750 3C018000 */   lui      $at, (0x80000000 >> 16)
/* ABE54 80115754 14610002 */  bne       $v1, $at, .L80115760
/* ABE58 80115758 00000000 */   nop
/* ABE5C 8011575C 0006000D */  break     6
.L80115760:
/* ABE60 80115760 00001012 */  mflo      $v0
/* ABE64 80115764 28420008 */  slti      $v0, $v0, 0x8
/* ABE68 80115768 14400099 */  bnez      $v0, .L801159D0
/* ABE6C 8011576C 02449021 */   addu     $s2, $s2, $a0
/* ABE70 80115770 080455A8 */  j         .L801156A0
/* ABE74 80115774 00000000 */   nop
.L80115778:
/* ABE78 80115778 9662002C */  lhu       $v0, 0x2C($s3)
/* ABE7C 8011577C 30430F00 */  andi      $v1, $v0, 0xF00
/* ABE80 80115780 24020200 */  addiu     $v0, $zero, 0x200
/* ABE84 80115784 14620049 */  bne       $v1, $v0, .L801158AC
/* ABE88 80115788 24020300 */   addiu    $v0, $zero, 0x300
/* ABE8C 8011578C 92620029 */  lbu       $v0, 0x29($s3)
/* ABE90 80115790 5457008F */  bnel      $v0, $s7, .L801159D0
/* ABE94 80115794 00129040 */   sll      $s2, $s2, 1
/* ABE98 80115798 96670022 */  lhu       $a3, 0x22($s3)
/* ABE9C 8011579C 24040002 */  addiu     $a0, $zero, 0x2
/* ABEA0 801157A0 14800002 */  bnez      $a0, .L801157AC
/* ABEA4 801157A4 00E4001A */   div      $zero, $a3, $a0
/* ABEA8 801157A8 0007000D */  break     7
.L801157AC:
/* ABEAC 801157AC 2401FFFF */  addiu     $at, $zero, -0x1
/* ABEB0 801157B0 14810004 */  bne       $a0, $at, .L801157C4
/* ABEB4 801157B4 3C018000 */   lui      $at, (0x80000000 >> 16)
/* ABEB8 801157B8 14E10002 */  bne       $a3, $at, .L801157C4
/* ABEBC 801157BC 00000000 */   nop
/* ABEC0 801157C0 0006000D */  break     6
.L801157C4:
/* ABEC4 801157C4 00001012 */  mflo      $v0
/* ABEC8 801157C8 28420004 */  slti      $v0, $v0, 0x4
/* ABECC 801157CC 54400080 */  bnel      $v0, $zero, .L801159D0
/* ABED0 801157D0 00129040 */   sll      $s2, $s2, 1
/* ABED4 801157D4 96660026 */  lhu       $a2, 0x26($s3)
.L801157D8:
/* ABED8 801157D8 14800002 */  bnez      $a0, .L801157E4
/* ABEDC 801157DC 00C4001A */   div      $zero, $a2, $a0
/* ABEE0 801157E0 0007000D */  break     7
.L801157E4:
/* ABEE4 801157E4 2401FFFF */  addiu     $at, $zero, -0x1
/* ABEE8 801157E8 14810004 */  bne       $a0, $at, .L801157FC
/* ABEEC 801157EC 3C018000 */   lui      $at, (0x80000000 >> 16)
/* ABEF0 801157F0 14C10002 */  bne       $a2, $at, .L801157FC
/* ABEF4 801157F4 00000000 */   nop
/* ABEF8 801157F8 0006000D */  break     6
.L801157FC:
/* ABEFC 801157FC 00001012 */  mflo      $v0
/* ABF00 80115800 58400073 */  blezl     $v0, .L801159D0
/* ABF04 80115804 00129040 */   sll      $s2, $s2, 1
/* ABF08 80115808 14800002 */  bnez      $a0, .L80115814
/* ABF0C 8011580C 00E4001A */   div      $zero, $a3, $a0
/* ABF10 80115810 0007000D */  break     7
.L80115814:
/* ABF14 80115814 2401FFFF */  addiu     $at, $zero, -0x1
/* ABF18 80115818 14810004 */  bne       $a0, $at, .L8011582C
/* ABF1C 8011581C 3C018000 */   lui      $at, (0x80000000 >> 16)
/* ABF20 80115820 14E10002 */  bne       $a3, $at, .L8011582C
/* ABF24 80115824 00000000 */   nop
/* ABF28 80115828 0006000D */  break     6
.L8011582C:
/* ABF2C 8011582C 00001012 */  mflo      $v0
/* ABF30 80115830 00000000 */  nop
/* ABF34 80115834 00000000 */  nop
/* ABF38 80115838 00460018 */  mult      $v0, $a2
/* ABF3C 8011583C 00001812 */  mflo      $v1
/* ABF40 80115840 00000000 */  nop
/* ABF44 80115844 14800002 */  bnez      $a0, .L80115850
/* ABF48 80115848 0064001A */   div      $zero, $v1, $a0
/* ABF4C 8011584C 0007000D */  break     7
.L80115850:
/* ABF50 80115850 2401FFFF */  addiu     $at, $zero, -0x1
/* ABF54 80115854 14810004 */  bne       $a0, $at, .L80115868
/* ABF58 80115858 3C018000 */   lui      $at, (0x80000000 >> 16)
/* ABF5C 8011585C 14610002 */  bne       $v1, $at, .L80115868
/* ABF60 80115860 00000000 */   nop
/* ABF64 80115864 0006000D */  break     6
.L80115868:
/* ABF68 80115868 00001812 */  mflo      $v1
/* ABF6C 8011586C 00042040 */  sll       $a0, $a0, 1
/* ABF70 80115870 14800002 */  bnez      $a0, .L8011587C
/* ABF74 80115874 00E4001A */   div      $zero, $a3, $a0
/* ABF78 80115878 0007000D */  break     7
.L8011587C:
/* ABF7C 8011587C 2401FFFF */  addiu     $at, $zero, -0x1
/* ABF80 80115880 14810004 */  bne       $a0, $at, .L80115894
/* ABF84 80115884 3C018000 */   lui      $at, (0x80000000 >> 16)
/* ABF88 80115888 14E10002 */  bne       $a3, $at, .L80115894
/* ABF8C 8011588C 00000000 */   nop
/* ABF90 80115890 0006000D */  break     6
.L80115894:
/* ABF94 80115894 00001012 */  mflo      $v0
/* ABF98 80115898 28420004 */  slti      $v0, $v0, 0x4
/* ABF9C 8011589C 1040FFCE */  beqz      $v0, .L801157D8
/* ABFA0 801158A0 02439021 */   addu     $s2, $s2, $v1
/* ABFA4 801158A4 08045674 */  j         .L801159D0
/* ABFA8 801158A8 00129040 */   sll      $s2, $s2, 1
.L801158AC:
/* ABFAC 801158AC 14620048 */  bne       $v1, $v0, .L801159D0
/* ABFB0 801158B0 00000000 */   nop
/* ABFB4 801158B4 92620029 */  lbu       $v0, 0x29($s3)
/* ABFB8 801158B8 54570045 */  bnel      $v0, $s7, .L801159D0
/* ABFBC 801158BC 00129080 */   sll      $s2, $s2, 2
/* ABFC0 801158C0 96670022 */  lhu       $a3, 0x22($s3)
/* ABFC4 801158C4 24040002 */  addiu     $a0, $zero, 0x2
/* ABFC8 801158C8 14800002 */  bnez      $a0, .L801158D4
/* ABFCC 801158CC 00E4001A */   div      $zero, $a3, $a0
/* ABFD0 801158D0 0007000D */  break     7
.L801158D4:
/* ABFD4 801158D4 2401FFFF */  addiu     $at, $zero, -0x1
/* ABFD8 801158D8 14810004 */  bne       $a0, $at, .L801158EC
/* ABFDC 801158DC 3C018000 */   lui      $at, (0x80000000 >> 16)
/* ABFE0 801158E0 14E10002 */  bne       $a3, $at, .L801158EC
/* ABFE4 801158E4 00000000 */   nop
/* ABFE8 801158E8 0006000D */  break     6
.L801158EC:
/* ABFEC 801158EC 00001012 */  mflo      $v0
/* ABFF0 801158F0 0044102A */  slt       $v0, $v0, $a0
/* ABFF4 801158F4 54400036 */  bnel      $v0, $zero, .L801159D0
/* ABFF8 801158F8 00129080 */   sll      $s2, $s2, 2
/* ABFFC 801158FC 96660026 */  lhu       $a2, 0x26($s3)
.L80115900:
/* AC000 80115900 14800002 */  bnez      $a0, .L8011590C
/* AC004 80115904 00C4001A */   div      $zero, $a2, $a0
/* AC008 80115908 0007000D */  break     7
.L8011590C:
/* AC00C 8011590C 2401FFFF */  addiu     $at, $zero, -0x1
/* AC010 80115910 14810004 */  bne       $a0, $at, .L80115924
/* AC014 80115914 3C018000 */   lui      $at, (0x80000000 >> 16)
/* AC018 80115918 14C10002 */  bne       $a2, $at, .L80115924
/* AC01C 8011591C 00000000 */   nop
/* AC020 80115920 0006000D */  break     6
.L80115924:
/* AC024 80115924 00001012 */  mflo      $v0
/* AC028 80115928 58400029 */  blezl     $v0, .L801159D0
/* AC02C 8011592C 00129080 */   sll      $s2, $s2, 2
/* AC030 80115930 14800002 */  bnez      $a0, .L8011593C
/* AC034 80115934 00E4001A */   div      $zero, $a3, $a0
/* AC038 80115938 0007000D */  break     7
.L8011593C:
/* AC03C 8011593C 2401FFFF */  addiu     $at, $zero, -0x1
/* AC040 80115940 14810004 */  bne       $a0, $at, .L80115954
/* AC044 80115944 3C018000 */   lui      $at, (0x80000000 >> 16)
/* AC048 80115948 14E10002 */  bne       $a3, $at, .L80115954
/* AC04C 8011594C 00000000 */   nop
/* AC050 80115950 0006000D */  break     6
.L80115954:
/* AC054 80115954 00001012 */  mflo      $v0
/* AC058 80115958 00000000 */  nop
/* AC05C 8011595C 00000000 */  nop
/* AC060 80115960 00460018 */  mult      $v0, $a2
/* AC064 80115964 00001812 */  mflo      $v1
/* AC068 80115968 00000000 */  nop
/* AC06C 8011596C 14800002 */  bnez      $a0, .L80115978
/* AC070 80115970 0064001A */   div      $zero, $v1, $a0
/* AC074 80115974 0007000D */  break     7
.L80115978:
/* AC078 80115978 2401FFFF */  addiu     $at, $zero, -0x1
/* AC07C 8011597C 14810004 */  bne       $a0, $at, .L80115990
/* AC080 80115980 3C018000 */   lui      $at, (0x80000000 >> 16)
/* AC084 80115984 14610002 */  bne       $v1, $at, .L80115990
/* AC088 80115988 00000000 */   nop
/* AC08C 8011598C 0006000D */  break     6
.L80115990:
/* AC090 80115990 00001812 */  mflo      $v1
/* AC094 80115994 00042040 */  sll       $a0, $a0, 1
/* AC098 80115998 14800002 */  bnez      $a0, .L801159A4
/* AC09C 8011599C 00E4001A */   div      $zero, $a3, $a0
/* AC0A0 801159A0 0007000D */  break     7
.L801159A4:
/* AC0A4 801159A4 2401FFFF */  addiu     $at, $zero, -0x1
/* AC0A8 801159A8 14810004 */  bne       $a0, $at, .L801159BC
/* AC0AC 801159AC 3C018000 */   lui      $at, (0x80000000 >> 16)
/* AC0B0 801159B0 14E10002 */  bne       $a3, $at, .L801159BC
/* AC0B4 801159B4 00000000 */   nop
/* AC0B8 801159B8 0006000D */  break     6
.L801159BC:
/* AC0BC 801159BC 00001012 */  mflo      $v0
/* AC0C0 801159C0 28420002 */  slti      $v0, $v0, 0x2
/* AC0C4 801159C4 1040FFCE */  beqz      $v0, .L80115900
/* AC0C8 801159C8 02439021 */   addu     $s2, $s2, $v1
/* AC0CC 801159CC 00129080 */  sll       $s2, $s2, 2
.L801159D0:
/* AC0D0 801159D0 9662002A */  lhu       $v0, 0x2A($s3)
/* AC0D4 801159D4 24030002 */  addiu     $v1, $zero, 0x2
/* AC0D8 801159D8 3042000F */  andi      $v0, $v0, 0xF
/* AC0DC 801159DC 14430007 */  bne       $v0, $v1, .L801159FC
/* AC0E0 801159E0 0000A02D */   daddu    $s4, $zero, $zero
/* AC0E4 801159E4 9662002C */  lhu       $v0, 0x2C($s3)
/* AC0E8 801159E8 24080100 */  addiu     $t0, $zero, 0x100
/* AC0EC 801159EC 30420F00 */  andi      $v0, $v0, 0xF00
/* AC0F0 801159F0 14480002 */  bne       $v0, $t0, .L801159FC
/* AC0F4 801159F4 24140020 */   addiu    $s4, $zero, 0x20
/* AC0F8 801159F8 24140200 */  addiu     $s4, $zero, 0x200
.L801159FC:
/* AC0FC 801159FC 92630029 */  lbu       $v1, 0x29($s3)
/* AC100 80115A00 24020003 */  addiu     $v0, $zero, 0x3
/* AC104 80115A04 1462001E */  bne       $v1, $v0, .L80115A80
/* AC108 80115A08 0000882D */   daddu    $s1, $zero, $zero
/* AC10C 80115A0C 96640020 */  lhu       $a0, 0x20($s3)
/* AC110 80115A10 96620024 */  lhu       $v0, 0x24($s3)
/* AC114 80115A14 00820018 */  mult      $a0, $v0
/* AC118 80115A18 9663002C */  lhu       $v1, 0x2C($s3)
/* AC11C 80115A1C 3063F000 */  andi      $v1, $v1, 0xF000
/* AC120 80115A20 00008012 */  mflo      $s0
/* AC124 80115A24 14600003 */  bnez      $v1, .L80115A34
/* AC128 80115A28 00000000 */   nop
/* AC12C 80115A2C 08045695 */  j         .L80115A54
/* AC130 80115A30 00108042 */   srl      $s0, $s0, 1
.L80115A34:
/* AC134 80115A34 107E0007 */  beq       $v1, $fp, .L80115A54
/* AC138 80115A38 24022000 */   addiu    $v0, $zero, 0x2000
/* AC13C 80115A3C 14620003 */  bne       $v1, $v0, .L80115A4C
/* AC140 80115A40 24023000 */   addiu    $v0, $zero, 0x3000
/* AC144 80115A44 08045695 */  j         .L80115A54
/* AC148 80115A48 00108040 */   sll      $s0, $s0, 1
.L80115A4C:
/* AC14C 80115A4C 50620001 */  beql      $v1, $v0, .L80115A54
/* AC150 80115A50 00108080 */   sll      $s0, $s0, 2
.L80115A54:
/* AC154 80115A54 9662002A */  lhu       $v0, 0x2A($s3)
/* AC158 80115A58 24030020 */  addiu     $v1, $zero, 0x20
/* AC15C 80115A5C 304200F0 */  andi      $v0, $v0, 0xF0
/* AC160 80115A60 14430008 */  bne       $v0, $v1, .L80115A84
/* AC164 80115A64 0000882D */   daddu    $s1, $zero, $zero
/* AC168 80115A68 9662002C */  lhu       $v0, 0x2C($s3)
/* AC16C 80115A6C 3042F000 */  andi      $v0, $v0, 0xF000
/* AC170 80115A70 145E0004 */  bne       $v0, $fp, .L80115A84
/* AC174 80115A74 0060882D */   daddu    $s1, $v1, $zero
/* AC178 80115A78 080456A1 */  j         .L80115A84
/* AC17C 80115A7C 24110200 */   addiu    $s1, $zero, 0x200
.L80115A80:
/* AC180 80115A80 0220802D */  daddu     $s0, $s1, $zero
.L80115A84:
/* AC184 80115A84 26D60044 */  addiu     $s6, $s6, 0x44
/* AC188 80115A88 26A40030 */  addiu     $a0, $s5, 0x30
/* AC18C 80115A8C 3C058016 */  lui       $a1, %hi(mdl_textureHandles)
/* AC190 80115A90 24A5A590 */  addiu     $a1, $a1, %lo(mdl_textureHandles)
/* AC194 80115A94 02C52821 */  addu      $a1, $s6, $a1
/* AC198 80115A98 0260302D */  daddu     $a2, $s3, $zero
/* AC19C 80115A9C 0240382D */  daddu     $a3, $s2, $zero
/* AC1A0 80115AA0 AFB40010 */  sw        $s4, 0x10($sp)
/* AC1A4 80115AA4 AFB00014 */  sw        $s0, 0x14($sp)
/* AC1A8 80115AA8 0C0452D6 */  jal       func_80114B58
/* AC1AC 80115AAC AFB10018 */   sw       $s1, 0x18($sp)
/* AC1B0 80115AB0 02541021 */  addu      $v0, $s2, $s4
/* AC1B4 80115AB4 24420030 */  addiu     $v0, $v0, 0x30
/* AC1B8 80115AB8 02A2A821 */  addu      $s5, $s5, $v0
/* AC1BC 80115ABC 02111021 */  addu      $v0, $s0, $s1
/* AC1C0 80115AC0 8FA80080 */  lw        $t0, 0x80($sp)
/* AC1C4 80115AC4 8FA90084 */  lw        $t1, 0x84($sp)
/* AC1C8 80115AC8 02A2A821 */  addu      $s5, $s5, $v0
/* AC1CC 80115ACC 01091021 */  addu      $v0, $t0, $t1
/* AC1D0 80115AD0 02A2102B */  sltu      $v0, $s5, $v0
/* AC1D4 80115AD4 1440FE89 */  bnez      $v0, .L801154FC
/* AC1D8 80115AD8 02A0202D */   daddu    $a0, $s5, $zero
.L80115ADC:
/* AC1DC 80115ADC 8FBF0074 */  lw        $ra, 0x74($sp)
/* AC1E0 80115AE0 8FBE0070 */  lw        $fp, 0x70($sp)
/* AC1E4 80115AE4 8FB7006C */  lw        $s7, 0x6C($sp)
/* AC1E8 80115AE8 8FB60068 */  lw        $s6, 0x68($sp)
/* AC1EC 80115AEC 8FB50064 */  lw        $s5, 0x64($sp)
/* AC1F0 80115AF0 8FB40060 */  lw        $s4, 0x60($sp)
/* AC1F4 80115AF4 8FB3005C */  lw        $s3, 0x5C($sp)
/* AC1F8 80115AF8 8FB20058 */  lw        $s2, 0x58($sp)
/* AC1FC 80115AFC 8FB10054 */  lw        $s1, 0x54($sp)
/* AC200 80115B00 8FB00050 */  lw        $s0, 0x50($sp)
/* AC204 80115B04 03E00008 */  jr        $ra
/* AC208 80115B08 27BD0078 */   addiu    $sp, $sp, 0x78

### DECOMPILED C INSTRUCTIONS:

void func_80115498(u32 romOffset, s32 textureID, s32 baseOffset, s32 size) {
    u32 offset;
    TextureHeader sp20;
    u32 rasterSize;
    s32 paletteSize;
    u32 auxRasterSize;
    u32 auxPaletteSize;
    s32 bitDepth;
    s32 mainSize;
    TextureHeader* header;
    s32 currentTextureID = textureID;

    for (offset = romOffset; offset < baseOffset + size;) {
        dma_copy((u8*)offset, (u8*)offset + sizeof(sp20), &sp20);
        header = &sp20;
        if (header->unk_28 == 0) {
            break;
        }

        rasterSize = header->mainW * header->mainH;

        if (header->mainBitDepth == G_IM_SIZ_4b) {
            if (header->extraTiles == EXTRA_TILE_MIPMAPS) {
                s32 d = 2;
                while (header->mainW / d >= 16 && header->mainH / d > 0) {
                    rasterSize += header->mainW / d * header->mainH / d;
                    d *= 2;
                }
            }
            rasterSize /= 2;
        } else if (header->mainBitDepth == G_IM_SIZ_8b) {
            if (header->extraTiles == EXTRA_TILE_MIPMAPS) {
                s32 d = 2;
                while (header->mainW / d >= 8 && header->mainH / d > 0) {
                    rasterSize += header->mainW / d * header->mainH / d;
                    d *= 2;
                }
            }
        } else {
            do {} while (0);
            if (header->mainBitDepth == G_IM_SIZ_16b) {
                if (header->extraTiles == EXTRA_TILE_MIPMAPS) {
                    s32 d = 2;
                    while (header->mainW / d >= 4 && header->mainH / d > 0) {
                        rasterSize += header->mainW / d * header->mainH / d;
                        d *= 2;
                    }
                }
                rasterSize *= 2;
            } else if (header->mainBitDepth == G_IM_SIZ_32b) {
                if (header->extraTiles == EXTRA_TILE_MIPMAPS) {
                    s32 d = 2;
                    while (header->mainW / d >= 2 && header->mainH / d > 0) {
                        rasterSize += header->mainW / d * header->mainH / d;
                        d *= 2;
                    }
                }
                rasterSize *= 4;
            }
        }

        if (header->mainFmt == G_IM_FMT_CI) {
            paletteSize = 0x20;
            if (header->mainBitDepth == G_IM_SIZ_8b) {
                paletteSize = 0x200;
            }
        } else {
            paletteSize = 0;
        }

        if (header->extraTiles == EXTRA_TILE_AUX_INDEPENDENT) {
            auxRasterSize = header->auxW * header->auxH;
            if (header->auxBitDepth == G_IM_SIZ_4b) {
                auxRasterSize /= 2;
            } else if (header->auxBitDepth == G_IM_SIZ_8b) {
            } else if (header->auxBitDepth == G_IM_SIZ_16b) {
                auxRasterSize *= 2;
            } else {
                if (header->auxBitDepth == G_IM_SIZ_32b) {
                    auxRasterSize *= 4;
                }
            }
            if (header->auxFmt == G_IM_FMT_CI) {
                auxPaletteSize = 0x20;
                if (header->auxBitDepth == G_IM_SIZ_8b) {
                    auxPaletteSize = 0x200;
                }
            } else {
                auxPaletteSize = 0;
            }
        } else {
            auxPaletteSize = 0;
            auxRasterSize = 0;
        }
        currentTextureID = ++textureID;
        func_80114B58(offset + sizeof(*header), &mdl_textureHandles[currentTextureID], header, rasterSize, paletteSize, auxRasterSize, auxPaletteSize);
        mainSize = rasterSize + paletteSize + sizeof(*header);
        offset += mainSize;
        offset += auxRasterSize + auxPaletteSize;
    }
}