### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_80262240
/* 190B20 80262240 27BDFFB0 */  addiu     $sp, $sp, -0x50
/* 190B24 80262244 0080582D */  daddu     $t3, $a0, $zero
/* 190B28 80262248 AFB5003C */  sw        $s5, 0x3C($sp)
/* 190B2C 8026224C 0000A82D */  daddu     $s5, $zero, $zero
/* 190B30 80262250 AFB70044 */  sw        $s7, 0x44($sp)
/* 190B34 80262254 AFB60040 */  sw        $s6, 0x40($sp)
/* 190B38 80262258 3C16800E */  lui       $s6, %hi(gBattleStatus)
/* 190B3C 8026225C 26D6C070 */  addiu     $s6, $s6, %lo(gBattleStatus)
/* 190B40 80262260 AFBF004C */  sw        $ra, 0x4C($sp)
/* 190B44 80262264 AFBE0048 */  sw        $fp, 0x48($sp)
/* 190B48 80262268 AFB40038 */  sw        $s4, 0x38($sp)
/* 190B4C 8026226C AFB30034 */  sw        $s3, 0x34($sp)
/* 190B50 80262270 AFB20030 */  sw        $s2, 0x30($sp)
/* 190B54 80262274 AFB1002C */  sw        $s1, 0x2C($sp)
/* 190B58 80262278 AFB00028 */  sw        $s0, 0x28($sp)
/* 190B5C 8026227C AFA00018 */  sw        $zero, 0x18($sp)
/* 190B60 80262280 8EC300D8 */  lw        $v1, 0xD8($s6)
/* 190B64 80262284 8EC20184 */  lw        $v0, 0x184($s6)
/* 190B68 80262288 8EC400DC */  lw        $a0, 0xDC($s6)
/* 190B6C 8026228C 04410004 */  bgez      $v0, .L802622A0
/* 190B70 80262290 2577022C */   addiu    $s7, $t3, 0x22C
/* 190B74 80262294 2402FFFF */  addiu     $v0, $zero, -0x1
/* 190B78 80262298 08098BFF */  j         .L80262FFC
/* 190B7C 8026229C A162040C */   sb       $v0, 0x40C($t3)
.L802622A0:
/* 190B80 802622A0 30420008 */  andi      $v0, $v0, 0x8
/* 190B84 802622A4 1040005B */  beqz      $v0, .L80262414
/* 190B88 802622A8 24020001 */   addiu    $v0, $zero, 0x1
/* 190B8C 802622AC A560022C */  sh        $zero, 0x22C($t3)
/* 190B90 802622B0 14A00029 */  bnez      $a1, .L80262358
/* 190B94 802622B4 A562022E */   sh       $v0, 0x22E($t3)
/* 190B98 802622B8 90620190 */  lbu       $v0, 0x190($v1)
/* 190B9C 802622BC 3C01802A */  lui       $at, %hi(D_8029D5A0)
/* 190BA0 802622C0 D420D5A0 */  ldc1      $f0, %lo(D_8029D5A0)($at)
/* 190BA4 802622C4 44821000 */  mtc1      $v0, $f2
/* 190BA8 802622C8 00000000 */  nop
/* 190BAC 802622CC 468010A1 */  cvt.d.w   $f2, $f2
/* 190BB0 802622D0 46201082 */  mul.d     $f2, $f2, $f0
/* 190BB4 802622D4 00000000 */  nop
/* 190BB8 802622D8 C4600188 */  lwc1      $f0, 0x188($v1)
/* 190BBC 802622DC 46000021 */  cvt.d.s   $f0, $f0
/* 190BC0 802622E0 46201082 */  mul.d     $f2, $f2, $f0
/* 190BC4 802622E4 00000000 */  nop
/* 190BC8 802622E8 C4600144 */  lwc1      $f0, 0x144($v1)
/* 190BCC 802622EC 46000021 */  cvt.d.s   $f0, $f0
/* 190BD0 802622F0 46220000 */  add.d     $f0, $f0, $f2
/* 190BD4 802622F4 4620048D */  trunc.w.d $f18, $f0
/* 190BD8 802622F8 44029000 */  mfc1      $v0, $f18
/* 190BDC 802622FC 00000000 */  nop
/* 190BE0 80262300 A5620230 */  sh        $v0, 0x230($t3)
/* 190BE4 80262304 90620191 */  lbu       $v0, 0x191($v1)
/* 190BE8 80262308 3C01802A */  lui       $at, %hi(D_8029D5A8)
/* 190BEC 8026230C D420D5A8 */  ldc1      $f0, %lo(D_8029D5A8)($at)
/* 190BF0 80262310 44821000 */  mtc1      $v0, $f2
/* 190BF4 80262314 00000000 */  nop
/* 190BF8 80262318 468010A1 */  cvt.d.w   $f2, $f2
/* 190BFC 8026231C 46201082 */  mul.d     $f2, $f2, $f0
/* 190C00 80262320 00000000 */  nop
/* 190C04 80262324 C4600188 */  lwc1      $f0, 0x188($v1)
/* 190C08 80262328 46000021 */  cvt.d.s   $f0, $f0
/* 190C0C 8026232C 46201082 */  mul.d     $f2, $f2, $f0
/* 190C10 80262330 00000000 */  nop
/* 190C14 80262334 C4600148 */  lwc1      $f0, 0x148($v1)
/* 190C18 80262338 46000021 */  cvt.d.s   $f0, $f0
/* 190C1C 8026233C 46220000 */  add.d     $f0, $f0, $f2
/* 190C20 80262340 4620048D */  trunc.w.d $f18, $f0
/* 190C24 80262344 44029000 */  mfc1      $v0, $f18
/* 190C28 80262348 00000000 */  nop
/* 190C2C 8026234C A5620232 */  sh        $v0, 0x232($t3)
/* 190C30 80262350 080988FD */  j         .L802623F4
/* 190C34 80262354 C460014C */   lwc1     $f0, 0x14C($v1)
.L80262358:
/* 190C38 80262358 90620190 */  lbu       $v0, 0x190($v1)
/* 190C3C 8026235C 3C01802A */  lui       $at, %hi(D_8029D5B0)
/* 190C40 80262360 D420D5B0 */  ldc1      $f0, %lo(D_8029D5B0)($at)
/* 190C44 80262364 44821000 */  mtc1      $v0, $f2
/* 190C48 80262368 00000000 */  nop
/* 190C4C 8026236C 468010A1 */  cvt.d.w   $f2, $f2
/* 190C50 80262370 46201082 */  mul.d     $f2, $f2, $f0
/* 190C54 80262374 00000000 */  nop
/* 190C58 80262378 C4600188 */  lwc1      $f0, 0x188($v1)
/* 190C5C 8026237C 46000021 */  cvt.d.s   $f0, $f0
/* 190C60 80262380 46201082 */  mul.d     $f2, $f2, $f0
/* 190C64 80262384 00000000 */  nop
/* 190C68 80262388 C4600138 */  lwc1      $f0, 0x138($v1)
/* 190C6C 8026238C 46000021 */  cvt.d.s   $f0, $f0
/* 190C70 80262390 46220000 */  add.d     $f0, $f0, $f2
/* 190C74 80262394 4620048D */  trunc.w.d $f18, $f0
/* 190C78 80262398 44029000 */  mfc1      $v0, $f18
/* 190C7C 8026239C 00000000 */  nop
/* 190C80 802623A0 A5620230 */  sh        $v0, 0x230($t3)
/* 190C84 802623A4 90620191 */  lbu       $v0, 0x191($v1)
/* 190C88 802623A8 3C01802A */  lui       $at, %hi(D_8029D5B8)
/* 190C8C 802623AC D420D5B8 */  ldc1      $f0, %lo(D_8029D5B8)($at)
/* 190C90 802623B0 44821000 */  mtc1      $v0, $f2
/* 190C94 802623B4 00000000 */  nop
/* 190C98 802623B8 468010A1 */  cvt.d.w   $f2, $f2
/* 190C9C 802623BC 46201082 */  mul.d     $f2, $f2, $f0
/* 190CA0 802623C0 00000000 */  nop
/* 190CA4 802623C4 C4600188 */  lwc1      $f0, 0x188($v1)
/* 190CA8 802623C8 46000021 */  cvt.d.s   $f0, $f0
/* 190CAC 802623CC 46201082 */  mul.d     $f2, $f2, $f0
/* 190CB0 802623D0 00000000 */  nop
/* 190CB4 802623D4 C460013C */  lwc1      $f0, 0x13C($v1)
/* 190CB8 802623D8 46000021 */  cvt.d.s   $f0, $f0
/* 190CBC 802623DC 46220000 */  add.d     $f0, $f0, $f2
/* 190CC0 802623E0 4620048D */  trunc.w.d $f18, $f0
/* 190CC4 802623E4 44029000 */  mfc1      $v0, $f18
/* 190CC8 802623E8 00000000 */  nop
/* 190CCC 802623EC A5620232 */  sh        $v0, 0x232($t3)
/* 190CD0 802623F0 C4600140 */  lwc1      $f0, 0x140($v1)
.L802623F4:
/* 190CD4 802623F4 4600048D */  trunc.w.s $f18, $f0
/* 190CD8 802623F8 44029000 */  mfc1      $v0, $f18
/* 190CDC 802623FC 00000000 */  nop
/* 190CE0 80262400 A5620234 */  sh        $v0, 0x234($t3)
/* 190CE4 80262404 2402FF9C */  addiu     $v0, $zero, -0x64
/* 190CE8 80262408 A2E20010 */  sb        $v0, 0x10($s7)
/* 190CEC 8026240C 26B50001 */  addiu     $s5, $s5, 0x1
/* 190CF0 80262410 26F70014 */  addiu     $s7, $s7, 0x14
.L80262414:
/* 190CF4 80262414 8EC20184 */  lw        $v0, 0x184($s6)
/* 190CF8 80262418 30420100 */  andi      $v0, $v0, 0x100
/* 190CFC 8026241C 1040005F */  beqz      $v0, .L8026259C
/* 190D00 80262420 0000982D */   daddu    $s3, $zero, $zero
/* 190D04 80262424 1080005D */  beqz      $a0, .L8026259C
/* 190D08 80262428 24020100 */   addiu    $v0, $zero, 0x100
/* 190D0C 8026242C A6E20000 */  sh        $v0, 0x0($s7)
/* 190D10 80262430 24020001 */  addiu     $v0, $zero, 0x1
/* 190D14 80262434 14A00029 */  bnez      $a1, .L802624DC
/* 190D18 80262438 A6E20002 */   sh       $v0, 0x2($s7)
/* 190D1C 8026243C 90820190 */  lbu       $v0, 0x190($a0)
/* 190D20 80262440 3C01802A */  lui       $at, %hi(D_8029D5C0)
/* 190D24 80262444 D420D5C0 */  ldc1      $f0, %lo(D_8029D5C0)($at)
/* 190D28 80262448 44821000 */  mtc1      $v0, $f2
/* 190D2C 8026244C 00000000 */  nop
/* 190D30 80262450 468010A1 */  cvt.d.w   $f2, $f2
/* 190D34 80262454 46201082 */  mul.d     $f2, $f2, $f0
/* 190D38 80262458 00000000 */  nop
/* 190D3C 8026245C C4800188 */  lwc1      $f0, 0x188($a0)
/* 190D40 80262460 46000021 */  cvt.d.s   $f0, $f0
/* 190D44 80262464 46201082 */  mul.d     $f2, $f2, $f0
/* 190D48 80262468 00000000 */  nop
/* 190D4C 8026246C C4800144 */  lwc1      $f0, 0x144($a0)
/* 190D50 80262470 46000021 */  cvt.d.s   $f0, $f0
/* 190D54 80262474 46220000 */  add.d     $f0, $f0, $f2
/* 190D58 80262478 4620048D */  trunc.w.d $f18, $f0
/* 190D5C 8026247C 44029000 */  mfc1      $v0, $f18
/* 190D60 80262480 00000000 */  nop
/* 190D64 80262484 A6E20004 */  sh        $v0, 0x4($s7)
/* 190D68 80262488 90820191 */  lbu       $v0, 0x191($a0)
/* 190D6C 8026248C 3C01802A */  lui       $at, %hi(D_8029D5C8)
/* 190D70 80262490 D420D5C8 */  ldc1      $f0, %lo(D_8029D5C8)($at)
/* 190D74 80262494 44821000 */  mtc1      $v0, $f2
/* 190D78 80262498 00000000 */  nop
/* 190D7C 8026249C 468010A1 */  cvt.d.w   $f2, $f2
/* 190D80 802624A0 46201082 */  mul.d     $f2, $f2, $f0
/* 190D84 802624A4 00000000 */  nop
/* 190D88 802624A8 C4800188 */  lwc1      $f0, 0x188($a0)
/* 190D8C 802624AC 46000021 */  cvt.d.s   $f0, $f0
/* 190D90 802624B0 46201082 */  mul.d     $f2, $f2, $f0
/* 190D94 802624B4 00000000 */  nop
/* 190D98 802624B8 C4800148 */  lwc1      $f0, 0x148($a0)
/* 190D9C 802624BC 46000021 */  cvt.d.s   $f0, $f0
/* 190DA0 802624C0 46220000 */  add.d     $f0, $f0, $f2
/* 190DA4 802624C4 4620048D */  trunc.w.d $f18, $f0
/* 190DA8 802624C8 44029000 */  mfc1      $v0, $f18
/* 190DAC 802624CC 00000000 */  nop
/* 190DB0 802624D0 A6E20006 */  sh        $v0, 0x6($s7)
/* 190DB4 802624D4 0809895E */  j         .L80262578
/* 190DB8 802624D8 C480014C */   lwc1     $f0, 0x14C($a0)
.L802624DC:
/* 190DBC 802624DC 90820190 */  lbu       $v0, 0x190($a0)
/* 190DC0 802624E0 3C01802A */  lui       $at, %hi(D_8029D5D0)
/* 190DC4 802624E4 D420D5D0 */  ldc1      $f0, %lo(D_8029D5D0)($at)
/* 190DC8 802624E8 44821000 */  mtc1      $v0, $f2
/* 190DCC 802624EC 00000000 */  nop
/* 190DD0 802624F0 468010A1 */  cvt.d.w   $f2, $f2
/* 190DD4 802624F4 46201082 */  mul.d     $f2, $f2, $f0
/* 190DD8 802624F8 00000000 */  nop
/* 190DDC 802624FC C4800188 */  lwc1      $f0, 0x188($a0)
/* 190DE0 80262500 46000021 */  cvt.d.s   $f0, $f0
/* 190DE4 80262504 46201082 */  mul.d     $f2, $f2, $f0
/* 190DE8 80262508 00000000 */  nop
/* 190DEC 8026250C C4800138 */  lwc1      $f0, 0x138($a0)
/* 190DF0 80262510 46000021 */  cvt.d.s   $f0, $f0
/* 190DF4 80262514 46220000 */  add.d     $f0, $f0, $f2
/* 190DF8 80262518 4620048D */  trunc.w.d $f18, $f0
/* 190DFC 8026251C 44029000 */  mfc1      $v0, $f18
/* 190E00 80262520 00000000 */  nop
/* 190E04 80262524 A6E20004 */  sh        $v0, 0x4($s7)
/* 190E08 80262528 90820191 */  lbu       $v0, 0x191($a0)
/* 190E0C 8026252C 3C01802A */  lui       $at, %hi(D_8029D5D8)
/* 190E10 80262530 D420D5D8 */  ldc1      $f0, %lo(D_8029D5D8)($at)
/* 190E14 80262534 44821000 */  mtc1      $v0, $f2
/* 190E18 80262538 00000000 */  nop
/* 190E1C 8026253C 468010A1 */  cvt.d.w   $f2, $f2
/* 190E20 80262540 46201082 */  mul.d     $f2, $f2, $f0
D_80262544:
/* 190E24 80262544 00000000 */  nop
/* 190E28 80262548 C4800188 */  lwc1      $f0, 0x188($a0)
/* 190E2C 8026254C 46000021 */  cvt.d.s   $f0, $f0
/* 190E30 80262550 46201082 */  mul.d     $f2, $f2, $f0
/* 190E34 80262554 00000000 */  nop
/* 190E38 80262558 C480013C */  lwc1      $f0, 0x13C($a0)
/* 190E3C 8026255C 46000021 */  cvt.d.s   $f0, $f0
/* 190E40 80262560 46220000 */  add.d     $f0, $f0, $f2
D_80262564:
/* 190E44 80262564 4620048D */  trunc.w.d $f18, $f0
/* 190E48 80262568 44029000 */  mfc1      $v0, $f18
D_8026256C:
/* 190E4C 8026256C 00000000 */  nop
/* 190E50 80262570 A6E20006 */  sh        $v0, 0x6($s7)
D_80262574:
/* 190E54 80262574 C4800140 */  lwc1      $f0, 0x140($a0)
.L80262578:
/* 190E58 80262578 4600048D */  trunc.w.s $f18, $f0
/* 190E5C 8026257C 44029000 */  mfc1      $v0, $f18
/* 190E60 80262580 00000000 */  nop
/* 190E64 80262584 A6E20008 */  sh        $v0, 0x8($s7)
/* 190E68 80262588 2402FFCE */  addiu     $v0, $zero, -0x32
/* 190E6C 8026258C A2E20010 */  sb        $v0, 0x10($s7)
D_80262590:
/* 190E70 80262590 26B50001 */  addiu     $s5, $s5, 0x1
/* 190E74 80262594 26F70014 */  addiu     $s7, $s7, 0x14
/* 190E78 80262598 0000982D */  daddu     $s3, $zero, $zero
.L8026259C:
/* 190E7C 8026259C 3C0140A0 */  lui       $at, (0x40A00000 >> 16)
/* 190E80 802625A0 44818000 */  mtc1      $at, $f16
D_802625A4:
/* 190E84 802625A4 240A0001 */  addiu     $t2, $zero, 0x1
/* 190E88 802625A8 240D0002 */  addiu     $t5, $zero, 0x2
/* 190E8C 802625AC 24090003 */  addiu     $t1, $zero, 0x3
/* 190E90 802625B0 02C0602D */  daddu     $t4, $s6, $zero
.L802625B4:
/* 190E94 802625B4 8D9200E0 */  lw        $s2, 0xE0($t4)
/* 190E98 802625B8 524000B6 */  beql      $s2, $zero, .L80262894
D_802625BC:
/* 190E9C 802625BC 26730001 */   addiu    $s3, $s3, 0x1
/* 190EA0 802625C0 8EC20184 */  lw        $v0, 0x184($s6)
D_802625C4:
/* 190EA4 802625C4 30420108 */  andi      $v0, $v0, 0x108
/* 190EA8 802625C8 544000B6 */  bnel      $v0, $zero, .L802628A4
/* 190EAC 802625CC A1600425 */   sb       $zero, 0x425($t3)
/* 190EB0 802625D0 824801F3 */  lb        $t0, 0x1F3($s2)
/* 190EB4 802625D4 8E5101F4 */  lw        $s1, 0x1F4($s2)
/* 190EB8 802625D8 190000AD */  blez      $t0, D_80262890
/* 190EBC 802625DC 0000382D */   daddu    $a3, $zero, $zero
D_802625E0:
/* 190EC0 802625E0 26E60013 */  addiu     $a2, $s7, 0x13
.L802625E4:
/* 190EC4 802625E4 8E230000 */  lw        $v1, 0x0($s1)
/* 190EC8 802625E8 3C020002 */  lui       $v0, (0x20000 >> 16)
/* 190ECC 802625EC 00621024 */  and       $v0, $v1, $v0
/* 190ED0 802625F0 144000A2 */  bnez      $v0, .L8026287C
D_802625F4:
/* 190ED4 802625F4 3C020010 */   lui      $v0, (0x100000 >> 16)
/* 190ED8 802625F8 8E240008 */  lw        $a0, 0x8($s1)
/* 190EDC 802625FC 00621024 */  and       $v0, $v1, $v0
/* 190EE0 80262600 14400036 */  bnez      $v0, .L802626DC
D_80262604:
/* 190EE4 80262604 00000000 */   nop
/* 190EE8 80262608 14A00005 */  bnez      $a1, .L80262620
/* 190EEC 8026260C 00000000 */   nop
/* 190EF0 80262610 C6460144 */  lwc1      $f6, 0x144($s2)
/* 190EF4 80262614 C6480148 */  lwc1      $f8, 0x148($s2)
/* 190EF8 80262618 0809898B */  j         .L8026262C
/* 190EFC 8026261C C64A014C */   lwc1     $f10, 0x14C($s2)
.L80262620:
/* 190F00 80262620 C6460138 */  lwc1      $f6, 0x138($s2)
/* 190F04 80262624 C648013C */  lwc1      $f8, 0x13C($s2)
/* 190F08 80262628 C64A0140 */  lwc1      $f10, 0x140($s2)
.L8026262C:
/* 190F0C 8026262C 86220014 */  lh        $v0, 0x14($s1)
/* 190F10 80262630 C6440188 */  lwc1      $f4, 0x188($s2)
/* 190F14 80262634 44820000 */  mtc1      $v0, $f0
/* 190F18 80262638 00000000 */  nop
/* 190F1C 8026263C 46800020 */  cvt.s.w   $f0, $f0
/* 190F20 80262640 46040002 */  mul.s     $f0, $f0, $f4
/* 190F24 80262644 00000000 */  nop
/* 190F28 80262648 8E420000 */  lw        $v0, 0x0($s2)
/* 190F2C 8026264C 30430800 */  andi      $v1, $v0, 0x800
/* 190F30 80262650 14600008 */  bnez      $v1, .L80262674
/* 190F34 80262654 46003180 */   add.s    $f6, $f6, $f0
/* 190F38 80262658 86220016 */  lh        $v0, 0x16($s1)
/* 190F3C 8026265C 44820000 */  mtc1      $v0, $f0
/* 190F40 80262660 00000000 */  nop
/* 190F44 80262664 46800020 */  cvt.s.w   $f0, $f0
/* 190F48 80262668 46040002 */  mul.s     $f0, $f0, $f4
/* 190F4C 8026266C 00000000 */  nop
/* 190F50 80262670 46004200 */  add.s     $f8, $f8, $f0
.L80262674:
/* 190F54 80262674 86220018 */  lh        $v0, 0x18($s1)
/* 190F58 80262678 44821000 */  mtc1      $v0, $f2
/* 190F5C 8026267C 00000000 */  nop
/* 190F60 80262680 468010A0 */  cvt.s.w   $f2, $f2
/* 190F64 80262684 46041082 */  mul.s     $f2, $f2, $f4
/* 190F68 80262688 00000000 */  nop
/* 190F6C 8026268C 8622006C */  lh        $v0, 0x6C($s1)
/* 190F70 80262690 44820000 */  mtc1      $v0, $f0
/* 190F74 80262694 00000000 */  nop
/* 190F78 80262698 46800020 */  cvt.s.w   $f0, $f0
/* 190F7C 8026269C 46040002 */  mul.s     $f0, $f0, $f4
/* 190F80 802626A0 00000000 */  nop
/* 190F84 802626A4 46025280 */  add.s     $f10, $f10, $f2
/* 190F88 802626A8 46003306 */  mov.s     $f12, $f6
/* 190F8C 802626AC 46006180 */  add.s     $f6, $f12, $f0
D_802626B0:
/* 190F90 802626B0 46004086 */  mov.s     $f2, $f8
/* 190F94 802626B4 1460001B */  bnez      $v1, .L80262724
D_802626B8:
/* 190F98 802626B8 46105380 */   add.s    $f14, $f10, $f16
/* 190F9C 802626BC 8622006E */  lh        $v0, 0x6E($s1)
D_802626C0:
/* 190FA0 802626C0 44820000 */  mtc1      $v0, $f0
/* 190FA4 802626C4 00000000 */  nop
D_802626C8:
/* 190FA8 802626C8 46800020 */  cvt.s.w   $f0, $f0
/* 190FAC 802626CC 46040002 */  mul.s     $f0, $f0, $f4
D_802626D0:
/* 190FB0 802626D0 00000000 */  nop
/* 190FB4 802626D4 080989C9 */  j         .L80262724
D_802626D8:
/* 190FB8 802626D8 46001200 */   add.s    $f8, $f2, $f0
.L802626DC:
/* 190FBC 802626DC C6280030 */  lwc1      $f8, 0x30($s1)
D_802626E0:
/* 190FC0 802626E0 C62A0034 */  lwc1      $f10, 0x34($s1)
/* 190FC4 802626E4 C62C002C */  lwc1      $f12, 0x2C($s1)
D_802626E8:
/* 190FC8 802626E8 8622006C */  lh        $v0, 0x6C($s1)
/* 190FCC 802626EC 46004086 */  mov.s     $f2, $f8
jtbl_802626F0:
/* 190FD0 802626F0 46105380 */  add.s     $f14, $f10, $f16
/* 190FD4 802626F4 44820000 */  mtc1      $v0, $f0
/* 190FD8 802626F8 00000000 */  nop
/* 190FDC 802626FC 46800020 */  cvt.s.w   $f0, $f0
/* 190FE0 80262700 8E420000 */  lw        $v0, 0x0($s2)
/* 190FE4 80262704 30420800 */  andi      $v0, $v0, 0x800
/* 190FE8 80262708 14400006 */  bnez      $v0, .L80262724
/* 190FEC 8026270C 46006180 */   add.s    $f6, $f12, $f0
/* 190FF0 80262710 8622006E */  lh        $v0, 0x6E($s1)
/* 190FF4 80262714 44820000 */  mtc1      $v0, $f0
/* 190FF8 80262718 00000000 */  nop
/* 190FFC 8026271C 46800020 */  cvt.s.w   $f0, $f0
/* 191000 80262720 46001200 */  add.s     $f8, $f2, $f0
.L80262724:
/* 191004 80262724 36620200 */  ori       $v0, $s3, 0x200
/* 191008 80262728 A6E20000 */  sh        $v0, 0x0($s7)
/* 19100C 8026272C 90830004 */  lbu       $v1, 0x4($a0)
/* 191010 80262730 4600348D */  trunc.w.s $f18, $f6
/* 191014 80262734 44029000 */  mfc1      $v0, $f18
/* 191018 80262738 00000000 */  nop
/* 19101C 8026273C A4C2FFF1 */  sh        $v0, -0xF($a2)
/* 191020 80262740 4600448D */  trunc.w.s $f18, $f8
/* 191024 80262744 44029000 */  mfc1      $v0, $f18
/* 191028 80262748 00000000 */  nop
/* 19102C 8026274C A4C2FFF3 */  sh        $v0, -0xD($a2)
/* 191030 80262750 4600548D */  trunc.w.s $f18, $f10
/* 191034 80262754 44029000 */  mfc1      $v0, $f18
/* 191038 80262758 00000000 */  nop
/* 19103C 8026275C A4C2FFF5 */  sh        $v0, -0xB($a2)
/* 191040 80262760 A0C0FFFD */  sb        $zero, -0x3($a2)
/* 191044 80262764 00031E00 */  sll       $v1, $v1, 24
/* 191048 80262768 00031E03 */  sra       $v1, $v1, 24
/* 19104C 8026276C A4C3FFEF */  sh        $v1, -0x11($a2)
/* 191050 80262770 8E420000 */  lw        $v0, 0x0($s2)
/* 191054 80262774 24034000 */  addiu     $v1, $zero, 0x4000
/* 191058 80262778 30424010 */  andi      $v0, $v0, 0x4010
/* 19105C 8026277C 14430002 */  bne       $v0, $v1, .L80262788
/* 191060 80262780 24020064 */   addiu    $v0, $zero, 0x64
/* 191064 80262784 A0C2FFFD */  sb        $v0, -0x3($a2)
.L80262788:
/* 191068 80262788 92230071 */  lbu       $v1, 0x71($s1)
/* 19106C 8026278C 90C4FFFD */  lbu       $a0, -0x3($a2)
/* 191070 80262790 4600148D */  trunc.w.s $f18, $f2
/* 191074 80262794 44029000 */  mfc1      $v0, $f18
/* 191078 80262798 00000000 */  nop
/* 19107C 8026279C A4C2FFF9 */  sh        $v0, -0x7($a2)
/* 191080 802627A0 4600748D */  trunc.w.s $f18, $f14
/* 191084 802627A4 44029000 */  mfc1      $v0, $f18
/* 191088 802627A8 00000000 */  nop
/* 19108C 802627AC A4C2FFFB */  sh        $v0, -0x5($a2)
/* 191090 802627B0 00832021 */  addu      $a0, $a0, $v1
/* 191094 802627B4 00041E00 */  sll       $v1, $a0, 24
/* 191098 802627B8 00031E03 */  sra       $v1, $v1, 24
/* 19109C 802627BC 00031040 */  sll       $v0, $v1, 1
/* 1910A0 802627C0 00431021 */  addu      $v0, $v0, $v1
/* 1910A4 802627C4 000210C0 */  sll       $v0, $v0, 3
/* 1910A8 802627C8 00431021 */  addu      $v0, $v0, $v1
/* 1910AC 802627CC 00021080 */  sll       $v0, $v0, 2
/* 1910B0 802627D0 44820000 */  mtc1      $v0, $f0
/* 1910B4 802627D4 00000000 */  nop
/* 1910B8 802627D8 46800020 */  cvt.s.w   $f0, $f0
/* 1910BC 802627DC 46006000 */  add.s     $f0, $f12, $f0
/* 1910C0 802627E0 84C3FFF9 */  lh        $v1, -0x7($a2)
/* 1910C4 802627E4 A0C4FFFD */  sb        $a0, -0x3($a2)
/* 1910C8 802627E8 4600048D */  trunc.w.s $f18, $f0
/* 1910CC 802627EC 44029000 */  mfc1      $v0, $f18
/* 1910D0 802627F0 00000000 */  nop
/* 1910D4 802627F4 A4C2FFF7 */  sh        $v0, -0x9($a2)
/* 1910D8 802627F8 28620028 */  slti      $v0, $v1, 0x28
/* 1910DC 802627FC 10400003 */  beqz      $v0, .L8026280C
/* 1910E0 80262800 28620055 */   slti     $v0, $v1, 0x55
/* 1910E4 80262804 08098A0A */  j         .L80262828
/* 1910E8 80262808 A0C0FFFF */   sb       $zero, -0x1($a2)
.L8026280C:
/* 1910EC 8026280C 10400003 */  beqz      $v0, .L8026281C
/* 1910F0 80262810 28620064 */   slti     $v0, $v1, 0x64
/* 1910F4 80262814 08098A0A */  j         .L80262828
/* 1910F8 80262818 A0CAFFFF */   sb       $t2, -0x1($a2)
.L8026281C:
/* 1910FC 8026281C 50400002 */  beql      $v0, $zero, .L80262828
/* 191100 80262820 A0C9FFFF */   sb       $t1, -0x1($a2)
/* 191104 80262824 A0CDFFFF */  sb        $t5, -0x1($a2)
.L80262828:
/* 191108 80262828 84C3FFF7 */  lh        $v1, -0x9($a2)
/* 19110C 8026282C 28620019 */  slti      $v0, $v1, 0x19
/* 191110 80262830 10400003 */  beqz      $v0, .L80262840
/* 191114 80262834 28620041 */   slti     $v0, $v1, 0x41
/* 191118 80262838 08098A17 */  j         .L8026285C
/* 19111C 8026283C A0C0FFFE */   sb       $zero, -0x2($a2)
.L80262840:
/* 191120 80262840 10400003 */  beqz      $v0, .L80262850
/* 191124 80262844 28620069 */   slti     $v0, $v1, 0x69
/* 191128 80262848 08098A17 */  j         .L8026285C
/* 19112C 8026284C A0CAFFFE */   sb       $t2, -0x2($a2)
.L80262850:
/* 191130 80262850 50400002 */  beql      $v0, $zero, .L8026285C
/* 191134 80262854 A0C9FFFE */   sb       $t1, -0x2($a2)
/* 191138 80262858 A0CDFFFE */  sb        $t5, -0x2($a2)
.L8026285C:
/* 19113C 8026285C 84C2FFFB */  lh        $v0, -0x5($a2)
/* 191140 80262860 2842FFE2 */  slti      $v0, $v0, -0x1E
/* 191144 80262864 50400002 */  beql      $v0, $zero, .L80262870
/* 191148 80262868 A0CA0000 */   sb       $t2, 0x0($a2)
/* 19114C 8026286C A0C00000 */  sb        $zero, 0x0($a2)
.L80262870:
/* 191150 80262870 26B50001 */  addiu     $s5, $s5, 0x1
/* 191154 80262874 24C60014 */  addiu     $a2, $a2, 0x14
/* 191158 80262878 26F70014 */  addiu     $s7, $s7, 0x14
.L8026287C:
/* 19115C 8026287C 8E31000C */  lw        $s1, 0xC($s1)
D_80262880:
/* 191160 80262880 24E70001 */  addiu     $a3, $a3, 0x1
/* 191164 80262884 00E8102A */  slt       $v0, $a3, $t0
D_80262888:
/* 191168 80262888 1440FF56 */  bnez      $v0, .L802625E4
/* 19116C 8026288C 00000000 */   nop
D_80262890:
/* 191170 80262890 26730001 */  addiu     $s3, $s3, 0x1
.L80262894:
/* 191174 80262894 2A620018 */  slti      $v0, $s3, 0x18
D_80262898:
/* 191178 80262898 1440FF46 */  bnez      $v0, .L802625B4
/* 19117C 8026289C 258C0004 */   addiu    $t4, $t4, 0x4
jtbl_802628A0:
/* 191180 802628A0 A1600425 */  sb        $zero, 0x425($t3)
.L802628A4:
/* 191184 802628A4 A175040C */  sb        $s5, 0x40C($t3)
/* 191188 802628A8 92C30197 */  lbu       $v1, 0x197($s6)
/* 19118C 802628AC 00031600 */  sll       $v0, $v1, 24
/* 191190 802628B0 00022603 */  sra       $a0, $v0, 24
/* 191194 802628B4 30630004 */  andi      $v1, $v1, 0x4
/* 191198 802628B8 04810002 */  bgez      $a0, .L802628C4
/* 19119C 802628BC AFA3001C */   sw       $v1, 0x1C($sp)
/* 1911A0 802628C0 24840003 */  addiu     $a0, $a0, 0x3
.L802628C4:
/* 1911A4 802628C4 2577022C */  addiu     $s7, $t3, 0x22C
/* 1911A8 802628C8 00151600 */  sll       $v0, $s5, 24
/* 1911AC 802628CC 0002AE03 */  sra       $s5, $v0, 24
/* 1911B0 802628D0 0000982D */  daddu     $s3, $zero, $zero
/* 1911B4 802628D4 1AA0006A */  blez      $s5, .L80262A80
/* 1911B8 802628D8 0004F083 */   sra      $fp, $a0, 2
/* 1911BC 802628DC 0260A02D */  daddu     $s4, $s3, $zero
.L802628E0:
/* 1911C0 802628E0 02F48021 */  addu      $s0, $s7, $s4
/* 1911C4 802628E4 86040000 */  lh        $a0, 0x0($s0)
/* 1911C8 802628E8 0C09A75B */  jal       get_actor
/* 1911CC 802628EC AFAB0020 */   sw       $t3, 0x20($sp)
/* 1911D0 802628F0 0040902D */  daddu     $s2, $v0, $zero
/* 1911D4 802628F4 86050002 */  lh        $a1, 0x2($s0)
/* 1911D8 802628F8 0C099117 */  jal       get_actor_part
/* 1911DC 802628FC 0240202D */   daddu    $a0, $s2, $zero
/* 1911E0 80262900 86030000 */  lh        $v1, 0x0($s0)
/* 1911E4 80262904 8FAB0020 */  lw        $t3, 0x20($sp)
/* 1911E8 80262908 10600059 */  beqz      $v1, mac_01_D_80262A70
/* 1911EC 8026290C 0040882D */   daddu    $s1, $v0, $zero
/* 1911F0 80262910 24020100 */  addiu     $v0, $zero, 0x100
/* 1911F4 80262914 50620057 */  beql      $v1, $v0, .L80262A74
/* 1911F8 80262918 26730001 */   addiu    $s3, $s3, 0x1
/* 1911FC 8026291C 8EC20184 */  lw        $v0, 0x184($s6)
/* 191200 80262920 04420029 */  bltzl     $v0, .L802629C8
/* 191204 80262924 24040001 */   addiu    $a0, $zero, 0x1
/* 191208 80262928 3C02800E */  lui       $v0, %hi(gBattleStatus + 0x4)
/* 19120C 8026292C 8C42C074 */  lw        $v0, %lo(gBattleStatus + 0x4)($v0)
/* 191210 80262930 30424000 */  andi      $v0, $v0, 0x4000
/* 191214 80262934 14400013 */  bnez      $v0, .L80262984
/* 191218 80262938 00000000 */   nop
/* 19121C 8026293C 82C20432 */  lb        $v0, 0x432($s6)
/* 191220 80262940 18400010 */  blez      $v0, .L80262984
/* 191224 80262944 24040001 */   addiu    $a0, $zero, 0x1
/* 191228 80262948 27A50010 */  addiu     $a1, $sp, 0x10
/* 19122C 8026294C 27A60014 */  addiu     $a2, $sp, 0x14
/* 191230 80262950 0C04DF70 */  jal       get_screen_overlay_params
/* 191234 80262954 AFAB0020 */   sw       $t3, 0x20($sp)
/* 191238 80262958 C7A20014 */  lwc1      $f2, 0x14($sp)
/* 19123C 8026295C 3C014357 */  lui       $at, (0x43570000 >> 16)
/* 191240 80262960 44810000 */  mtc1      $at, $f0
/* 191244 80262964 8FAB0020 */  lw        $t3, 0x20($sp)
/* 191248 80262968 4602003E */  c.le.s    $f0, $f2
/* 19124C 8026296C 00000000 */  nop
/* 191250 80262970 45000004 */  bc1f      .L80262984
/* 191254 80262974 24040001 */   addiu    $a0, $zero, 0x1
/* 191258 80262978 0080782D */  daddu     $t7, $a0, $zero
/* 19125C 8026297C 08098A72 */  j         .L802629C8
/* 191260 80262980 AFAF0018 */   sw       $t7, 0x18($sp)
.L80262984:
/* 191264 80262984 8EC20184 */  lw        $v0, 0x184($s6)
/* 191268 80262988 30428000 */  andi      $v0, $v0, 0x8000
/* 19126C 8026298C 1040000D */  beqz      $v0, .L802629C4
/* 191270 80262990 3C020080 */   lui      $v0, (0x800000 >> 16)
/* 191274 80262994 8E230000 */  lw        $v1, 0x0($s1)
/* 191278 80262998 00621024 */  and       $v0, $v1, $v0
/* 19127C 8026299C 1040000A */  beqz      $v0, .L802629C8
/* 191280 802629A0 24040001 */   addiu    $a0, $zero, 0x1
/* 191284 802629A4 8E420000 */  lw        $v0, 0x0($s2)
/* 191288 802629A8 30420040 */  andi      $v0, $v0, 0x40
/* 19128C 802629AC 14400006 */  bnez      $v0, .L802629C8
/* 191290 802629B0 30620040 */   andi     $v0, $v1, 0x40
/* 191294 802629B4 50400004 */  beql      $v0, $zero, .L802629C8
/* 191298 802629B8 0000202D */   daddu    $a0, $zero, $zero
/* 19129C 802629BC 08098A72 */  j         .L802629C8
/* 1912A0 802629C0 00000000 */   nop
.L802629C4:
/* 1912A4 802629C4 0000202D */  daddu     $a0, $zero, $zero
.L802629C8:
/* 1912A8 802629C8 5080002A */  beql      $a0, $zero, .L80262A74
/* 1912AC 802629CC 26730001 */   addiu    $s3, $s3, 0x1
/* 1912B0 802629D0 26A5FFFF */  addiu     $a1, $s5, -0x1
/* 1912B4 802629D4 0265102A */  slt       $v0, $s3, $a1
/* 1912B8 802629D8 10400022 */  beqz      $v0, mac_01_Quizmo_AudienceEffect
/* 1912BC 802629DC 0260382D */   daddu    $a3, $s3, $zero
/* 1912C0 802629E0 00071880 */  sll       $v1, $a3, 2
.L802629E4:
/* 1912C4 802629E4 00671821 */  addu      $v1, $v1, $a3
/* 1912C8 802629E8 00031880 */  sll       $v1, $v1, 2
/* 1912CC 802629EC 01631821 */  addu      $v1, $t3, $v1
/* 1912D0 802629F0 24E40001 */  addiu     $a0, $a3, 0x1
/* 1912D4 802629F4 00041080 */  sll       $v0, $a0, 2
/* 1912D8 802629F8 00441021 */  addu      $v0, $v0, $a0
/* 1912DC 802629FC 00021080 */  sll       $v0, $v0, 2
/* 1912E0 80262A00 01621021 */  addu      $v0, $t3, $v0
/* 1912E4 80262A04 8858022C */  lwl       $t8, 0x22C($v0)
/* 1912E8 80262A08 9858022F */  lwr       $t8, 0x22F($v0)
/* 1912EC 80262A0C 88590230 */  lwl       $t9, 0x230($v0)
/* 1912F0 80262A10 98590233 */  lwr       $t9, 0x233($v0)
/* 1912F4 80262A14 884E0234 */  lwl       $t6, 0x234($v0)
/* 1912F8 80262A18 984E0237 */  lwr       $t6, 0x237($v0)
/* 1912FC 80262A1C 884F0238 */  lwl       $t7, 0x238($v0)
/* 191300 80262A20 984F023B */  lwr       $t7, 0x23B($v0)
/* 191304 80262A24 A878022C */  swl       $t8, 0x22C($v1)
/* 191308 80262A28 B878022F */  swr       $t8, 0x22F($v1)
/* 19130C 80262A2C A8790230 */  swl       $t9, 0x230($v1)
D_80262A30:
/* 191310 80262A30 B8790233 */  swr       $t9, 0x233($v1)
/* 191314 80262A34 A86E0234 */  swl       $t6, 0x234($v1)
/* 191318 80262A38 B86E0237 */  swr       $t6, 0x237($v1)
/* 19131C 80262A3C A86F0238 */  swl       $t7, 0x238($v1)
mac_01_Quizmo_Worker:
/* 191320 80262A40 B86F023B */  swr       $t7, 0x23B($v1)
/* 191324 80262A44 8858023C */  lwl       $t8, 0x23C($v0)
D_80262A48:
/* 191328 80262A48 9858023F */  lwr       $t8, 0x23F($v0)
/* 19132C 80262A4C A878023C */  swl       $t8, 0x23C($v1)
/* 191330 80262A50 B878023F */  swr       $t8, 0x23F($v1)
/* 191334 80262A54 0080382D */  daddu     $a3, $a0, $zero
mac_01_Quizmo_AnswerResult:
/* 191338 80262A58 00E5102A */  slt       $v0, $a3, $a1
/* 19133C 80262A5C 1440FFE1 */  bnez      $v0, .L802629E4
mac_01_Quizmo_StageEffect:
/* 191340 80262A60 00071880 */   sll      $v1, $a3, 2
mac_01_Quizmo_AudienceEffect:
/* 191344 80262A64 26B5FFFF */  addiu     $s5, $s5, -0x1
mac_01_Quizmo_VannaTEffect:
/* 191348 80262A68 2694FFEC */  addiu     $s4, $s4, -0x14
/* 19134C 80262A6C 2673FFFF */  addiu     $s3, $s3, -0x1
mac_01_D_80262A70:
/* 191350 80262A70 26730001 */  addiu     $s3, $s3, 0x1
.L80262A74:
/* 191354 80262A74 0275102A */  slt       $v0, $s3, $s5
/* 191358 80262A78 1440FF99 */  bnez      $v0, .L802628E0
/* 19135C 80262A7C 26940014 */   addiu    $s4, $s4, 0x14
.L80262A80:
/* 191360 80262A80 1AA00115 */  blez      $s5, .L80262ED8
/* 191364 80262A84 0000982D */   daddu    $s3, $zero, $zero
/* 191368 80262A88 00131080 */  sll       $v0, $s3, 2
.L80262A8C:
/* 19136C 80262A8C 00531021 */  addu      $v0, $v0, $s3
/* 191370 80262A90 00021080 */  sll       $v0, $v0, 2
/* 191374 80262A94 02E28021 */  addu      $s0, $s7, $v0
/* 191378 80262A98 86040000 */  lh        $a0, 0x0($s0)
/* 19137C 80262A9C 0C09A75B */  jal       get_actor
/* 191380 80262AA0 AFAB0020 */   sw       $t3, 0x20($sp)
/* 191384 80262AA4 0040902D */  daddu     $s2, $v0, $zero
/* 191388 80262AA8 86050002 */  lh        $a1, 0x2($s0)
/* 19138C 80262AAC 0C099117 */  jal       get_actor_part
/* 191390 80262AB0 0240202D */   daddu    $a0, $s2, $zero
/* 191394 80262AB4 86030000 */  lh        $v1, 0x0($s0)
/* 191398 80262AB8 8FAB0020 */  lw        $t3, 0x20($sp)
/* 19139C 80262ABC 10600102 */  beqz      $v1, .L80262EC8
/* 1913A0 80262AC0 0040882D */   daddu    $s1, $v0, $zero
/* 1913A4 80262AC4 24020100 */  addiu     $v0, $zero, 0x100
/* 1913A8 80262AC8 50620100 */  beql      $v1, $v0, .L80262ECC
/* 1913AC 80262ACC 26730001 */   addiu    $s3, $s3, 0x1
/* 1913B0 80262AD0 8EC20184 */  lw        $v0, 0x184($s6)
/* 1913B4 80262AD4 30420800 */  andi      $v0, $v0, 0x800
/* 1913B8 80262AD8 10400005 */  beqz      $v0, .L80262AF0
/* 1913BC 80262ADC 00000000 */   nop
/* 1913C0 80262AE0 8E220004 */  lw        $v0, 0x4($s1)
/* 1913C4 80262AE4 30420001 */  andi      $v0, $v0, 0x1
/* 1913C8 80262AE8 544000CE */  bnel      $v0, $zero, .L80262E24
/* 1913CC 80262AEC 24040001 */   addiu    $a0, $zero, 0x1
.L80262AF0:
/* 1913D0 80262AF0 8EC20184 */  lw        $v0, 0x184($s6)
/* 1913D4 80262AF4 30421000 */  andi      $v0, $v0, 0x1000
/* 1913D8 80262AF8 10400005 */  beqz      $v0, .L80262B10
/* 1913DC 80262AFC 00000000 */   nop
/* 1913E0 80262B00 8E220004 */  lw        $v0, 0x4($s1)
/* 1913E4 80262B04 30420002 */  andi      $v0, $v0, 0x2
/* 1913E8 80262B08 544000C6 */  bnel      $v0, $zero, .L80262E24
/* 1913EC 80262B0C 24040001 */   addiu    $a0, $zero, 0x1
.L80262B10:
/* 1913F0 80262B10 8EC20184 */  lw        $v0, 0x184($s6)
/* 1913F4 80262B14 3C030002 */  lui       $v1, (0x20000 >> 16)
/* 1913F8 80262B18 00431024 */  and       $v0, $v0, $v1
/* 1913FC 80262B1C 10400009 */  beqz      $v0, .L80262B44
/* 191400 80262B20 00000000 */   nop
/* 191404 80262B24 8E420000 */  lw        $v0, 0x0($s2)
/* 191408 80262B28 30420080 */  andi      $v0, $v0, 0x80
/* 19140C 80262B2C 544000BD */  bnel      $v0, $zero, .L80262E24
/* 191410 80262B30 24040001 */   addiu    $a0, $zero, 0x1
/* 191414 80262B34 8E220000 */  lw        $v0, 0x0($s1)
/* 191418 80262B38 30420080 */  andi      $v0, $v0, 0x80
/* 19141C 80262B3C 544000B9 */  bnel      $v0, $zero, .L80262E24
/* 191420 80262B40 24040001 */   addiu    $a0, $zero, 0x1
.L80262B44:
/* 191424 80262B44 8EC20184 */  lw        $v0, 0x184($s6)
/* 191428 80262B48 30420400 */  andi      $v0, $v0, 0x400
/* 19142C 80262B4C 10400005 */  beqz      $v0, .L80262B64
/* 191430 80262B50 00000000 */   nop
/* 191434 80262B54 8E420000 */  lw        $v0, 0x0($s2)
/* 191438 80262B58 30420800 */  andi      $v0, $v0, 0x800
/* 19143C 80262B5C 544000B1 */  bnel      $v0, $zero, .L80262E24
/* 191440 80262B60 24040001 */   addiu    $a0, $zero, 0x1
.L80262B64:
/* 191444 80262B64 8EC20184 */  lw        $v0, 0x184($s6)
/* 191448 80262B68 3C030001 */  lui       $v1, (0x10000 >> 16)
/* 19144C 80262B6C 00431024 */  and       $v0, $v0, $v1
/* 191450 80262B70 14400005 */  bnez      $v0, .L80262B88
/* 191454 80262B74 00000000 */   nop
/* 191458 80262B78 8E420000 */  lw        $v0, 0x0($s2)
/* 19145C 80262B7C 30424000 */  andi      $v0, $v0, 0x4000
/* 191460 80262B80 544000A8 */  bnel      $v0, $zero, .L80262E24
/* 191464 80262B84 24040001 */   addiu    $a0, $zero, 0x1
.L80262B88:
/* 191468 80262B88 8EC20184 */  lw        $v0, 0x184($s6)
/* 19146C 80262B8C 3C030004 */  lui       $v1, (0x40000 >> 16)
/* 191470 80262B90 00431024 */  and       $v0, $v0, $v1
/* 191474 80262B94 10400005 */  beqz      $v0, .L80262BAC
/* 191478 80262B98 00000000 */   nop
/* 19147C 80262B9C 8E420000 */  lw        $v0, 0x0($s2)
/* 191480 80262BA0 30420800 */  andi      $v0, $v0, 0x800
/* 191484 80262BA4 5440009F */  bnel      $v0, $zero, .L80262E24
/* 191488 80262BA8 24040001 */   addiu    $a0, $zero, 0x1
.L80262BAC:
/* 19148C 80262BAC 8EC20184 */  lw        $v0, 0x184($s6)
/* 191490 80262BB0 30420004 */  andi      $v0, $v0, 0x4
/* 191494 80262BB4 10400004 */  beqz      $v0, .L80262BC8
/* 191498 80262BB8 00000000 */   nop
/* 19149C 80262BBC 82020012 */  lb        $v0, 0x12($s0)
/* 1914A0 80262BC0 54400098 */  bnel      $v0, $zero, .L80262E24
/* 1914A4 80262BC4 24040001 */   addiu    $a0, $zero, 0x1
.L80262BC8:
/* 1914A8 80262BC8 8EC20184 */  lw        $v0, 0x184($s6)
/* 1914AC 80262BCC 30420010 */  andi      $v0, $v0, 0x10
/* 1914B0 80262BD0 10400005 */  beqz      $v0, .L80262BE8
/* 1914B4 80262BD4 00000000 */   nop
/* 1914B8 80262BD8 82020012 */  lb        $v0, 0x12($s0)
/* 1914BC 80262BDC 28420002 */  slti      $v0, $v0, 0x2
/* 1914C0 80262BE0 50400090 */  beql      $v0, $zero, .L80262E24
/* 1914C4 80262BE4 24040001 */   addiu    $a0, $zero, 0x1
.L80262BE8:
/* 1914C8 80262BE8 8EC20184 */  lw        $v0, 0x184($s6)
/* 1914CC 80262BEC 30420040 */  andi      $v0, $v0, 0x40
/* 1914D0 80262BF0 10400004 */  beqz      $v0, .L80262C04
/* 1914D4 80262BF4 00000000 */   nop
/* 1914D8 80262BF8 82020012 */  lb        $v0, 0x12($s0)
/* 1914DC 80262BFC 18400089 */  blez      $v0, .L80262E24
/* 1914E0 80262C00 24040001 */   addiu    $a0, $zero, 0x1
.L80262C04:
/* 1914E4 80262C04 8EC20184 */  lw        $v0, 0x184($s6)
/* 1914E8 80262C08 30424000 */  andi      $v0, $v0, 0x4000
/* 1914EC 80262C0C 1040001D */  beqz      $v0, .L80262C84
/* 1914F0 80262C10 00000000 */   nop
/* 1914F4 80262C14 8E220000 */  lw        $v0, 0x0($s1)
/* 1914F8 80262C18 30420020 */  andi      $v0, $v0, 0x20
/* 1914FC 80262C1C 14400019 */  bnez      $v0, .L80262C84
/* 191500 80262C20 0000302D */   daddu    $a2, $zero, $zero
/* 191504 80262C24 1AA00015 */  blez      $s5, .L80262C7C
/* 191508 80262C28 00C0382D */   daddu    $a3, $a2, $zero
/* 19150C 80262C2C 02E0202D */  daddu     $a0, $s7, $zero
.L80262C30:
/* 191510 80262C30 0080282D */  daddu     $a1, $a0, $zero
mac_01_LetterDelivery_SavedNpcAnim:
/* 191514 80262C34 5205000E */  beql      $s0, $a1, .L80262C70
D_80262C38:
/* 191518 80262C38 24E70001 */   addiu    $a3, $a3, 0x1
/* 19151C 80262C3C 82030013 */  lb        $v1, 0x13($s0)
/* 191520 80262C40 80A20013 */  lb        $v0, 0x13($a1)
/* 191524 80262C44 1462000A */  bne       $v1, $v0, .L80262C70
/* 191528 80262C48 24E70001 */   addiu    $a3, $a3, 0x1
/* 19152C 80262C4C 82030011 */  lb        $v1, 0x11($s0)
/* 191530 80262C50 80A20011 */  lb        $v0, 0x11($a1)
/* 191534 80262C54 14620006 */  bne       $v1, $v0, .L80262C70
/* 191538 80262C58 00000000 */   nop
/* 19153C 80262C5C 82030012 */  lb        $v1, 0x12($s0)
/* 191540 80262C60 80A20012 */  lb        $v0, 0x12($a1)
/* 191544 80262C64 0062182A */  slt       $v1, $v1, $v0
/* 191548 80262C68 54600004 */  bnel      $v1, $zero, .L80262C7C
/* 19154C 80262C6C 24060001 */   addiu    $a2, $zero, 0x1
.L80262C70:
/* 191550 80262C70 00F5102A */  slt       $v0, $a3, $s5
/* 191554 80262C74 1440FFEE */  bnez      $v0, .L80262C30
/* 191558 80262C78 24840014 */   addiu    $a0, $a0, 0x14
.L80262C7C:
/* 19155C 80262C7C 14C00069 */  bnez      $a2, .L80262E24
/* 191560 80262C80 24040001 */   addiu    $a0, $zero, 0x1
.L80262C84:
/* 191564 80262C84 8EC20184 */  lw        $v0, 0x184($s6)
/* 191568 80262C88 30422000 */  andi      $v0, $v0, 0x2000
/* 19156C 80262C8C 10400015 */  beqz      $v0, .L80262CE4
/* 191570 80262C90 0000302D */   daddu    $a2, $zero, $zero
/* 191574 80262C94 1AA00011 */  blez      $s5, .L80262CDC
/* 191578 80262C98 00C0382D */   daddu    $a3, $a2, $zero
/* 19157C 80262C9C 02E0202D */  daddu     $a0, $s7, $zero
.L80262CA0:
/* 191580 80262CA0 0080282D */  daddu     $a1, $a0, $zero
/* 191584 80262CA4 1205000A */  beq       $s0, $a1, .L80262CD0
/* 191588 80262CA8 24E70001 */   addiu    $a3, $a3, 0x1
/* 19158C 80262CAC 96030012 */  lhu       $v1, 0x12($s0)
/* 191590 80262CB0 94A20012 */  lhu       $v0, 0x12($a1)
/* 191594 80262CB4 14620006 */  bne       $v1, $v0, .L80262CD0
/* 191598 80262CB8 00000000 */   nop
/* 19159C 80262CBC 82030011 */  lb        $v1, 0x11($s0)
/* 1915A0 80262CC0 80A20011 */  lb        $v0, 0x11($a1)
/* 1915A4 80262CC4 0043102A */  slt       $v0, $v0, $v1
/* 1915A8 80262CC8 54400004 */  bnel      $v0, $zero, .L80262CDC
/* 1915AC 80262CCC 24060001 */   addiu    $a2, $zero, 0x1
.L80262CD0:
/* 1915B0 80262CD0 00F5102A */  slt       $v0, $a3, $s5
/* 1915B4 80262CD4 1440FFF2 */  bnez      $v0, .L80262CA0
/* 1915B8 80262CD8 24840014 */   addiu    $a0, $a0, 0x14
.L80262CDC:
/* 1915BC 80262CDC 54C00051 */  bnel      $a2, $zero, .L80262E24
/* 1915C0 80262CE0 24040001 */   addiu    $a0, $zero, 0x1
.L80262CE4:
/* 1915C4 80262CE4 8EC20184 */  lw        $v0, 0x184($s6)
/* 1915C8 80262CE8 30420020 */  andi      $v0, $v0, 0x20
/* 1915CC 80262CEC 10400005 */  beqz      $v0, .L80262D04
/* 1915D0 80262CF0 00000000 */   nop
/* 1915D4 80262CF4 8E420000 */  lw        $v0, 0x0($s2)
/* 1915D8 80262CF8 30420200 */  andi      $v0, $v0, 0x200
/* 1915DC 80262CFC 54400049 */  bnel      $v0, $zero, .L80262E24
/* 1915E0 80262D00 24040001 */   addiu    $a0, $zero, 0x1
.L80262D04:
/* 1915E4 80262D04 8EC20184 */  lw        $v0, 0x184($s6)
/* 1915E8 80262D08 3C030010 */  lui       $v1, (0x100000 >> 16)
/* 1915EC 80262D0C 00431024 */  and       $v0, $v0, $v1
/* 1915F0 80262D10 10400004 */  beqz      $v0, .L80262D24
/* 1915F4 80262D14 27C20001 */   addiu    $v0, $fp, 0x1
/* 1915F8 80262D18 82030012 */  lb        $v1, 0x12($s0)
/* 1915FC 80262D1C 50620041 */  beql      $v1, $v0, .L80262E24
/* 191600 80262D20 24040001 */   addiu    $a0, $zero, 0x1
.L80262D24:
/* 191604 80262D24 8EC20184 */  lw        $v0, 0x184($s6)
/* 191608 80262D28 3C030020 */  lui       $v1, (0x200000 >> 16)
/* 19160C 80262D2C 00431024 */  and       $v0, $v0, $v1
/* 191610 80262D30 10400004 */  beqz      $v0, .L80262D44
/* 191614 80262D34 27C2FFFF */   addiu    $v0, $fp, -0x1
/* 191618 80262D38 82030012 */  lb        $v1, 0x12($s0)
/* 19161C 80262D3C 50620039 */  beql      $v1, $v0, .L80262E24
/* 191620 80262D40 24040001 */   addiu    $a0, $zero, 0x1
.L80262D44:
/* 191624 80262D44 8EC20184 */  lw        $v0, 0x184($s6)
/* 191628 80262D48 3C030040 */  lui       $v1, (0x400000 >> 16)
/* 19162C 80262D4C 00431024 */  and       $v0, $v0, $v1
/* 191630 80262D50 10400006 */  beqz      $v0, .L80262D6C
/* 191634 80262D54 00000000 */   nop
/* 191638 80262D58 8FB8001C */  lw        $t8, 0x1C($sp)
/* 19163C 80262D5C 82030011 */  lb        $v1, 0x11($s0)
/* 191640 80262D60 2702FFFF */  addiu     $v0, $t8, -0x1
/* 191644 80262D64 5062002F */  beql      $v1, $v0, .L80262E24
/* 191648 80262D68 24040001 */   addiu    $a0, $zero, 0x1
.L80262D6C:
/* 19164C 80262D6C 8EC20184 */  lw        $v0, 0x184($s6)
/* 191650 80262D70 3C030080 */  lui       $v1, (0x800000 >> 16)
/* 191654 80262D74 00431024 */  and       $v0, $v0, $v1
/* 191658 80262D78 10400006 */  beqz      $v0, .L80262D94
/* 19165C 80262D7C 00000000 */   nop
/* 191660 80262D80 8FB9001C */  lw        $t9, 0x1C($sp)
/* 191664 80262D84 82030011 */  lb        $v1, 0x11($s0)
/* 191668 80262D88 27220001 */  addiu     $v0, $t9, 0x1
/* 19166C 80262D8C 50620025 */  beql      $v1, $v0, .L80262E24
/* 191670 80262D90 24040001 */   addiu    $a0, $zero, 0x1
.L80262D94:
/* 191674 80262D94 8EC20184 */  lw        $v0, 0x184($s6)
/* 191678 80262D98 3C030010 */  lui       $v1, (0x100000 >> 16)
/* 19167C 80262D9C 00431024 */  and       $v0, $v0, $v1
/* 191680 80262DA0 10400005 */  beqz      $v0, .L80262DB8
/* 191684 80262DA4 00000000 */   nop
/* 191688 80262DA8 82020012 */  lb        $v0, 0x12($s0)
/* 19168C 80262DAC 005E102A */  slt       $v0, $v0, $fp
/* 191690 80262DB0 5440001C */  bnel      $v0, $zero, .L80262E24
/* 191694 80262DB4 24040001 */   addiu    $a0, $zero, 0x1
.L80262DB8:
/* 191698 80262DB8 8EC20184 */  lw        $v0, 0x184($s6)
/* 19169C 80262DBC 3C030020 */  lui       $v1, (0x200000 >> 16)
/* 1916A0 80262DC0 00431024 */  and       $v0, $v0, $v1
/* 1916A4 80262DC4 10400005 */  beqz      $v0, .L80262DDC
/* 1916A8 80262DC8 00000000 */   nop
/* 1916AC 80262DCC 82020012 */  lb        $v0, 0x12($s0)
/* 1916B0 80262DD0 03C2102A */  slt       $v0, $fp, $v0
/* 1916B4 80262DD4 54400013 */  bnel      $v0, $zero, .L80262E24
/* 1916B8 80262DD8 24040001 */   addiu    $a0, $zero, 0x1
.L80262DDC:
/* 1916BC 80262DDC 8EC20184 */  lw        $v0, 0x184($s6)
/* 1916C0 80262DE0 3C030040 */  lui       $v1, (0x400000 >> 16)
/* 1916C4 80262DE4 00431024 */  and       $v0, $v0, $v1
/* 1916C8 80262DE8 10400006 */  beqz      $v0, .L80262E04
/* 1916CC 80262DEC 00000000 */   nop
/* 1916D0 80262DF0 82020011 */  lb        $v0, 0x11($s0)
/* 1916D4 80262DF4 8FAE001C */  lw        $t6, 0x1C($sp)
/* 1916D8 80262DF8 01C2102A */  slt       $v0, $t6, $v0
/* 1916DC 80262DFC 14400009 */  bnez      $v0, .L80262E24
/* 1916E0 80262E00 24040001 */   addiu    $a0, $zero, 0x1
.L80262E04:
/* 1916E4 80262E04 8EC20184 */  lw        $v0, 0x184($s6)
/* 1916E8 80262E08 3C030080 */  lui       $v1, (0x800000 >> 16)
/* 1916EC 80262E0C 00431024 */  and       $v0, $v0, $v1
/* 1916F0 80262E10 10400004 */  beqz      $v0, .L80262E24
/* 1916F4 80262E14 0000202D */   daddu    $a0, $zero, $zero
/* 1916F8 80262E18 82020011 */  lb        $v0, 0x11($s0)
/* 1916FC 80262E1C 8FAF001C */  lw        $t7, 0x1C($sp)
/* 191700 80262E20 004F202A */  slt       $a0, $v0, $t7
.L80262E24:
/* 191704 80262E24 50800029 */  beql      $a0, $zero, .L80262ECC
/* 191708 80262E28 26730001 */   addiu    $s3, $s3, 0x1
/* 19170C 80262E2C 26A5FFFF */  addiu     $a1, $s5, -0x1
/* 191710 80262E30 0265102A */  slt       $v0, $s3, $a1
/* 191714 80262E34 10400022 */  beqz      $v0, .L80262EC0
/* 191718 80262E38 0260382D */   daddu    $a3, $s3, $zero
/* 19171C 80262E3C 00071880 */  sll       $v1, $a3, 2
.L80262E40:
/* 191720 80262E40 00671821 */  addu      $v1, $v1, $a3
/* 191724 80262E44 00031880 */  sll       $v1, $v1, 2
/* 191728 80262E48 01631821 */  addu      $v1, $t3, $v1
/* 19172C 80262E4C 24E40001 */  addiu     $a0, $a3, 0x1
/* 191730 80262E50 00041080 */  sll       $v0, $a0, 2
/* 191734 80262E54 00441021 */  addu      $v0, $v0, $a0
/* 191738 80262E58 00021080 */  sll       $v0, $v0, 2
/* 19173C 80262E5C 01621021 */  addu      $v0, $t3, $v0
/* 191740 80262E60 8858022C */  lwl       $t8, 0x22C($v0)
/* 191744 80262E64 9858022F */  lwr       $t8, 0x22F($v0)
/* 191748 80262E68 88590230 */  lwl       $t9, 0x230($v0)
/* 19174C 80262E6C 98590233 */  lwr       $t9, 0x233($v0)
/* 191750 80262E70 884E0234 */  lwl       $t6, 0x234($v0)
/* 191754 80262E74 984E0237 */  lwr       $t6, 0x237($v0)
/* 191758 80262E78 884F0238 */  lwl       $t7, 0x238($v0)
/* 19175C 80262E7C 984F023B */  lwr       $t7, 0x23B($v0)
/* 191760 80262E80 A878022C */  swl       $t8, 0x22C($v1)
/* 191764 80262E84 B878022F */  swr       $t8, 0x22F($v1)
/* 191768 80262E88 A8790230 */  swl       $t9, 0x230($v1)
/* 19176C 80262E8C B8790233 */  swr       $t9, 0x233($v1)
/* 191770 80262E90 A86E0234 */  swl       $t6, 0x234($v1)
/* 191774 80262E94 B86E0237 */  swr       $t6, 0x237($v1)
/* 191778 80262E98 A86F0238 */  swl       $t7, 0x238($v1)
/* 19177C 80262E9C B86F023B */  swr       $t7, 0x23B($v1)
/* 191780 80262EA0 8858023C */  lwl       $t8, 0x23C($v0)
/* 191784 80262EA4 9858023F */  lwr       $t8, 0x23F($v0)
/* 191788 80262EA8 A878023C */  swl       $t8, 0x23C($v1)
/* 19178C 80262EAC B878023F */  swr       $t8, 0x23F($v1)
/* 191790 80262EB0 0080382D */  daddu     $a3, $a0, $zero
/* 191794 80262EB4 00E5102A */  slt       $v0, $a3, $a1
/* 191798 80262EB8 1440FFE1 */  bnez      $v0, .L80262E40
/* 19179C 80262EBC 00071880 */   sll      $v1, $a3, 2
.L80262EC0:
/* 1917A0 80262EC0 26B5FFFF */  addiu     $s5, $s5, -0x1
/* 1917A4 80262EC4 2673FFFF */  addiu     $s3, $s3, -0x1
.L80262EC8:
/* 1917A8 80262EC8 26730001 */  addiu     $s3, $s3, 0x1
.L80262ECC:
/* 1917AC 80262ECC 0275102A */  slt       $v0, $s3, $s5
/* 1917B0 80262ED0 1440FEEE */  bnez      $v0, .L80262A8C
/* 1917B4 80262ED4 00131080 */   sll      $v0, $s3, 2
.L80262ED8:
/* 1917B8 80262ED8 16A0000A */  bnez      $s5, .L80262F04
/* 1917BC 80262EDC A175040C */   sb       $s5, 0x40C($t3)
/* 1917C0 80262EE0 8FB80018 */  lw        $t8, 0x18($sp)
/* 1917C4 80262EE4 13000007 */  beqz      $t8, .L80262F04
/* 1917C8 80262EE8 00000000 */   nop
/* 1917CC 80262EEC 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 1917D0 80262EF0 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 1917D4 80262EF4 8C620004 */  lw        $v0, 0x4($v1)
/* 1917D8 80262EF8 34421000 */  ori       $v0, $v0, 0x1000
/* 1917DC 80262EFC 08098BC7 */  j         .L80262F1C
/* 1917E0 80262F00 AC620004 */   sw       $v0, 0x4($v1)
.L80262F04:
/* 1917E4 80262F04 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1917E8 80262F08 2442C070 */  addiu     $v0, $v0, %lo(gBattleStatus)
/* 1917EC 80262F0C 8C430004 */  lw        $v1, 0x4($v0)
/* 1917F0 80262F10 2404EFFF */  addiu     $a0, $zero, -0x1001
/* 1917F4 80262F14 00641824 */  and       $v1, $v1, $a0
/* 1917F8 80262F18 AC430004 */  sw        $v1, 0x4($v0)
.L80262F1C:
/* 1917FC 80262F1C 2577022C */  addiu     $s7, $t3, 0x22C
/* 191800 80262F20 8175040C */  lb        $s5, 0x40C($t3)
/* 191804 80262F24 0000982D */  daddu     $s3, $zero, $zero
/* 191808 80262F28 1AA00007 */  blez      $s5, .L80262F48
/* 19180C 80262F2C 256A040D */   addiu    $t2, $t3, 0x40D
/* 191810 80262F30 01531021 */  addu      $v0, $t2, $s3
.L80262F34:
/* 191814 80262F34 A0530000 */  sb        $s3, 0x0($v0)
/* 191818 80262F38 26730001 */  addiu     $s3, $s3, 0x1
/* 19181C 80262F3C 0275102A */  slt       $v0, $s3, $s5
/* 191820 80262F40 1440FFFC */  bnez      $v0, .L80262F34
/* 191824 80262F44 01531021 */   addu     $v0, $t2, $s3
.L80262F48:
/* 191828 80262F48 26A2FFFF */  addiu     $v0, $s5, -0x1
/* 19182C 80262F4C 1840002B */  blez      $v0, .L80262FFC
/* 191830 80262F50 0000982D */   daddu    $s3, $zero, $zero
/* 191834 80262F54 0040582D */  daddu     $t3, $v0, $zero
/* 191838 80262F58 26670001 */  addiu     $a3, $s3, 0x1
.L80262F5C:
/* 19183C 80262F5C 00F5102A */  slt       $v0, $a3, $s5
/* 191840 80262F60 50400023 */  beql      $v0, $zero, .L80262FF0
/* 191844 80262F64 26730001 */   addiu    $s3, $s3, 0x1
D_80262F68:
/* 191848 80262F68 01534821 */  addu      $t1, $t2, $s3
/* 19184C 80262F6C 01474021 */  addu      $t0, $t2, $a3
.L80262F70:
/* 191850 80262F70 81260000 */  lb        $a2, 0x0($t1)
/* 191854 80262F74 81030000 */  lb        $v1, 0x0($t0)
/* 191858 80262F78 00061080 */  sll       $v0, $a2, 2
/* 19185C 80262F7C 00461021 */  addu      $v0, $v0, $a2
/* 191860 80262F80 00021080 */  sll       $v0, $v0, 2
/* 191864 80262F84 02E28021 */  addu      $s0, $s7, $v0
/* 191868 80262F88 00031080 */  sll       $v0, $v1, 2
/* 19186C 80262F8C 00431021 */  addu      $v0, $v0, $v1
/* 191870 80262F90 00021080 */  sll       $v0, $v0, 2
/* 191874 80262F94 02E22821 */  addu      $a1, $s7, $v0
/* 191878 80262F98 82030010 */  lb        $v1, 0x10($s0)
/* 19187C 80262F9C 86040004 */  lh        $a0, 0x4($s0)
/* 191880 80262FA0 00031080 */  sll       $v0, $v1, 2
/* 191884 80262FA4 00431021 */  addu      $v0, $v0, $v1
/* 191888 80262FA8 00021040 */  sll       $v0, $v0, 1
/* 19188C 80262FAC 80A30010 */  lb        $v1, 0x10($a1)
/* 191890 80262FB0 00822021 */  addu      $a0, $a0, $v0
/* 191894 80262FB4 00031080 */  sll       $v0, $v1, 2
/* 191898 80262FB8 00431021 */  addu      $v0, $v0, $v1
/* 19189C 80262FBC 84A30004 */  lh        $v1, 0x4($a1)
/* 1918A0 80262FC0 00021040 */  sll       $v0, $v0, 1
/* 1918A4 80262FC4 00621821 */  addu      $v1, $v1, $v0
/* 1918A8 80262FC8 0064182A */  slt       $v1, $v1, $a0
/* 1918AC 80262FCC 91020000 */  lbu       $v0, 0x0($t0)
/* 1918B0 80262FD0 10600003 */  beqz      $v1, .L80262FE0
/* 1918B4 80262FD4 24E70001 */   addiu    $a3, $a3, 0x1
/* 1918B8 80262FD8 A1220000 */  sb        $v0, 0x0($t1)
/* 1918BC 80262FDC A1060000 */  sb        $a2, 0x0($t0)
.L80262FE0:
/* 1918C0 80262FE0 00F5102A */  slt       $v0, $a3, $s5
/* 1918C4 80262FE4 1440FFE2 */  bnez      $v0, .L80262F70
/* 1918C8 80262FE8 01474021 */   addu     $t0, $t2, $a3
/* 1918CC 80262FEC 26730001 */  addiu     $s3, $s3, 0x1
.L80262FF0:
/* 1918D0 80262FF0 026B102A */  slt       $v0, $s3, $t3
/* 1918D4 80262FF4 5440FFD9 */  bnel      $v0, $zero, .L80262F5C
/* 1918D8 80262FF8 26670001 */   addiu    $a3, $s3, 0x1
.L80262FFC:
/* 1918DC 80262FFC 8FBF004C */  lw        $ra, 0x4C($sp)
/* 1918E0 80263000 8FBE0048 */  lw        $fp, 0x48($sp)
/* 1918E4 80263004 8FB70044 */  lw        $s7, 0x44($sp)
/* 1918E8 80263008 8FB60040 */  lw        $s6, 0x40($sp)
/* 1918EC 8026300C 8FB5003C */  lw        $s5, 0x3C($sp)
/* 1918F0 80263010 8FB40038 */  lw        $s4, 0x38($sp)
/* 1918F4 80263014 8FB30034 */  lw        $s3, 0x34($sp)
/* 1918F8 80263018 8FB20030 */  lw        $s2, 0x30($sp)
/* 1918FC 8026301C 8FB1002C */  lw        $s1, 0x2C($sp)
/* 191900 80263020 8FB00028 */  lw        $s0, 0x28($sp)
/* 191904 80263024 03E00008 */  jr        $ra
/* 191908 80263028 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

void create_target_list(Actor* actor, s32 arg1) {
    s32 numTargets = 0;
    BattleStatus* battleStatus = &gBattleStatus;
    SelectableTarget* targetDataList = actor->targetData;
    Actor* playerActor = battleStatus->playerActor;
    Actor* partnerActor = battleStatus->partnerActor;
    SelectableTarget* targetData;
    SelectableTarget* otherTarget;
    Actor* targetActor;
    ActorPart* targetPart;
    s8* targetIndexList;
    s32 numParts;
    s32 i, j;
    f32 targetX, targetY, targetZ;
    f32 f2, f12, f14;
    u8 overlayType;
    f32 overlayZoom;
    s32 sp18 = FALSE;
    s32 col;
    s32 row;
    s32 skip;

    if (battleStatus->currentTargetListFlags & TARGET_FLAG_80000000) {
        actor->targetListLength = -1;
        return;
    }

    if (battleStatus->currentTargetListFlags & TARGET_FLAG_PLAYER) {
        targetDataList->actorID = ACTOR_PLAYER;
        targetDataList->partID = 1;
        if (!arg1) {
            targetDataList->posA.x = playerActor->currentPos.x + playerActor->size.x * 0.3 * playerActor->scalingFactor;
            targetDataList->posA.y = playerActor->currentPos.y + playerActor->size.y * 0.9 * playerActor->scalingFactor;
            targetDataList->posA.z = playerActor->currentPos.z;
        } else {
            targetDataList->posA.x = playerActor->homePos.x + playerActor->size.x * 0.3 * playerActor->scalingFactor;
            targetDataList->posA.y = playerActor->homePos.y + playerActor->size.y * 0.9 * playerActor->scalingFactor;
            targetDataList->posA.z = playerActor->homePos.z;
        }
        targetDataList->unk_10 = -100;
        numTargets++;
        targetDataList++;
    }

    if ((battleStatus->currentTargetListFlags & TARGET_FLAG_100) && partnerActor != NULL) {
        targetDataList->actorID = ACTOR_PARTNER;
        targetDataList->partID = 1;
        if (!arg1) {
            targetDataList->posA.x = partnerActor->currentPos.x + partnerActor->size.x * 0.1 * partnerActor->scalingFactor;
            targetDataList->posA.y = partnerActor->currentPos.y + partnerActor->size.y * 0.8 * partnerActor->scalingFactor;
            targetDataList->posA.z = partnerActor->currentPos.z;
        } else {
            targetDataList->posA.x = partnerActor->homePos.x + partnerActor->size.x * 0.1 * partnerActor->scalingFactor;
            targetDataList->posA.y = partnerActor->homePos.y + partnerActor->size.y * 0.8 * partnerActor->scalingFactor;
            targetDataList->posA.z = partnerActor->homePos.z;
        }
        targetDataList->unk_10 = -50;
        numTargets++;
        targetDataList++;
    }

    for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
        targetActor = battleStatus->enemyActors[i];
        if (targetActor == NULL) {
            continue;
        }
        if ((battleStatus->currentTargetListFlags & TARGET_FLAG_100) || (battleStatus->currentTargetListFlags & TARGET_FLAG_PLAYER)) {
            break;
        }
        targetPart = targetActor->partsTable;
        numParts = targetActor->numParts;
        for (j = 0; j < numParts; targetPart = targetPart->nextPart, j++) {
            if (!(targetPart->flags & ACTOR_PART_FLAG_NO_TARGET)) {
                ActorPartBlueprint* partBlueprint = targetPart->staticData;
                s8 partIndex;
                if (!(targetPart->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) {
                    row = !arg1; // required to match
                    if (row) {
                        targetX = targetActor->currentPos.x;
                        targetY = targetActor->currentPos.y;
                        targetZ = targetActor->currentPos.z;
                    } else {
                        targetX = targetActor->homePos.x;
                        targetY = targetActor->homePos.y;
                        targetZ = targetActor->homePos.z;
                    }
                    targetX += targetPart->partOffset.x * targetActor->scalingFactor;
                    if (!(targetActor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
                        targetY += targetPart->partOffset.y * targetActor->scalingFactor;
                    }
                    targetZ += targetPart->partOffset.z * targetActor->scalingFactor;
                    f12 = targetX;
                    targetX = targetActor->scalingFactor;
                    targetX = f12 + targetPart->targetOffset.x * targetX;
                    f2 = targetY;
                    f14 = targetZ + 5.0f;
                    if (!(targetActor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
                        targetY = f2 + targetPart->targetOffset.y * targetActor->scalingFactor;
                    }
                } else {
                    targetY = targetPart->absolutePosition.y;
                    targetZ = targetPart->absolutePosition.z;
                    f12 = targetPart->absolutePosition.x;
                    f2 = targetY;
                    f14 = targetZ + 5.0f;
                    targetX = f12 + targetPart->targetOffset.x;
                    if (!(targetActor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
                        targetY = f2 + targetPart->targetOffset.y;
                    }
                }

                targetDataList->actorID = ACTOR_CLASS_ENEMY | i;
                partIndex = partBlueprint->index;
                targetDataList->posA.x = targetX;
                targetDataList->posA.y = targetY;
                targetDataList->posA.z = targetZ;
                targetDataList->unk_10 = 0;
                targetDataList->partID = partIndex;

                if ((targetActor->flags & ACTOR_FLAG_TARGET_ONLY) && !(targetActor->flags & ACTOR_FLAG_10)) {
                    targetDataList->unk_10 = 100;
                }
                targetDataList->unk_10 += targetPart->unk_70;
                targetDataList->posB.x = f12 + targetDataList->unk_10 * 100;
                targetDataList->posB.y = f2;
                targetDataList->posB.z = f14;

                if (targetDataList->posB.y < 40) {
                    targetDataList->homeRow = 0;
                } else if (targetDataList->posB.y < 85) {
                    targetDataList->homeRow = 1;
                } else if (targetDataList->posB.y < 100) {
                    targetDataList->homeRow = 2;
                } else {
                    do {
                        do {
                            targetDataList->homeRow = 3;
                        } while (0);
                    } while (0);
                }

                if (targetDataList->posB.x < 25) {
                    targetDataList->homeCol = 0;
                } else if (targetDataList->posB.x < 65) {
                    targetDataList->homeCol = 1;
                } else if (targetDataList->posB.x < 105) {
                    targetDataList->homeCol = 2;
                } else {
                    do {
                        targetDataList->homeCol = 3;
                    } while (0);
                }

                if (targetDataList->posB.z < -30) {
                    targetDataList->layer = 0;
                } else {
                    targetDataList->layer = 1;
                }
                numTargets++;
                targetDataList++;
            }
        }
    }
    do {
        actor->selectedTargetIndex = 0;
    } while (0);
    actor->targetListLength = numTargets;

    // @bug this should be % 4
    col = battleStatus->targetHomeIndex & 4;
    row = battleStatus->targetHomeIndex / 4;

    targetDataList = actor->targetData;
    numTargets = actor->targetListLength;

    for (i = 0; i < numTargets; i++) {
        targetData = &targetDataList[i];
        targetActor = get_actor(targetData->actorID);
        targetPart = get_actor_part(targetActor, targetData->partID);
        if (targetData->actorID == ACTOR_PLAYER || targetData->actorID == ACTOR_PARTNER) {
            continue;
        }
        if (battleStatus->currentTargetListFlags & TARGET_FLAG_80000000) {
            skip = TRUE;
            goto END2;
        }
        if (!(gBattleStatus.flags2 & BS_FLAGS2_4000) && battleStatus->darknessMode > 0) {
            get_screen_overlay_params(SCREEN_LAYER_BACK, &overlayType, &overlayZoom);
            if (overlayZoom >= 215.0f) {
                skip = TRUE;
                sp18 = 1;
                goto END2;
            }
        }
        if (battleStatus->currentTargetListFlags & TARGET_FLAG_8000) {
            if (!(targetPart->flags & ACTOR_PART_FLAG_MULTI_TARGET) ||
                 (targetActor->flags & ACTOR_FLAG_40) ||
                 (targetPart->flags & ACTOR_PART_FLAG_40))
            {
                skip = TRUE;
                goto END2;
            }
        }
        skip = 0;
END2:
        if (skip) {
            for (j = i; j < numTargets - 1; j++) {
                actor->targetData[j] = actor->targetData[j + 1];
            }
            numTargets--;
            i--;
        }
    }

    for (i = 0; i < numTargets; i++) {
        targetData = &targetDataList[i];
        targetActor = get_actor(targetData->actorID);
        targetPart = get_actor_part(targetActor, targetData->partID);
        if (targetData->actorID == ACTOR_PLAYER || targetData->actorID == ACTOR_PARTNER) {
            continue;
        }
        do {
            if ((battleStatus->currentTargetListFlags & TARGET_FLAG_800) && (targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_1)) {
                skip = TRUE;
                goto END;
            }
        } while (0);
        do {
            if ((battleStatus->currentTargetListFlags & TARGET_FLAG_1000) && (targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_2)) {
                skip = TRUE;
                goto END;
            }
        } while (0);
        do {
            if ((battleStatus->currentTargetListFlags & TARGET_FLAG_20000) && ((targetActor->flags & ACTOR_FLAG_80) || (targetPart->flags & ACTOR_PART_FLAG_80))) {
                skip = TRUE;
                goto END;
            }
        } while (0);
        if ((battleStatus->currentTargetListFlags & TARGET_FLAG_400) && (targetActor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
            skip = TRUE;
            goto END;
        }
        if (!(battleStatus->currentTargetListFlags & TARGET_FLAG_10000) && (targetActor->flags & ACTOR_FLAG_TARGET_ONLY)) {
            skip = TRUE;
            goto END;
        }
        if ((battleStatus->currentTargetListFlags & TARGET_FLAG_40000) && (targetActor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
            skip = TRUE;
            goto END;
        }
        if ((battleStatus->currentTargetListFlags & TARGET_FLAG_4) && targetData->homeRow != 0) {
            skip = TRUE;
            goto END;
        }
        if ((battleStatus->currentTargetListFlags & TARGET_FLAG_10) && targetData->homeRow >= 2) {
            skip = TRUE;
            goto END;
        }
        if ((battleStatus->currentTargetListFlags & TARGET_FLAG_40) && targetData->homeRow <= 0) {
            skip = TRUE;
            goto END;
        }
        if ((battleStatus->currentTargetListFlags & TARGET_FLAG_4000) && !(targetPart->flags & ACTOR_PART_FLAG_20)) {
            s32 cond = FALSE;
            do {
                for (j = 0; j < numTargets; j++) {
                    otherTarget = &targetDataList[j];
                    if (targetData != otherTarget) {
                        if (targetData->layer == otherTarget->layer &&
                            targetData->homeCol == otherTarget->homeCol &&
                            targetData->homeRow < otherTarget->homeRow) {
                            cond = TRUE;
                            break;
                        }
                    }
                }
            } while (0);
            if (cond) {
                skip = TRUE;
                goto END;
            }
        }
        if (battleStatus->currentTargetListFlags & TARGET_FLAG_2000) {
            s32 cond = FALSE;

            for (j = 0; j < numTargets; j++) {
                otherTarget = &targetDataList[j];
                if (targetData != otherTarget) {
                    if (targetData->layer == otherTarget->layer &&
                        targetData->homeRow == otherTarget->homeRow &&
                        targetData->homeCol > otherTarget->homeCol) {
                        cond = TRUE;
                        break;
                    }
                }
            }

            if (cond) {
                skip = TRUE;
                goto END;
            }
        }
        do {
            if ((battleStatus->currentTargetListFlags & TARGET_FLAG_20) && (targetActor->flags & ACTOR_FLAG_FLYING)) {
                skip = TRUE;
                goto END;
            }
        } while (0);
        do {
            if ((battleStatus->currentTargetListFlags & TARGET_FLAG_100000) && targetData->homeRow == row + 1) {
                skip = TRUE;
                goto END;
            }
        } while (0);
        do {
            if ((battleStatus->currentTargetListFlags & TARGET_FLAG_200000) && targetData->homeRow == row - 1) {
                skip = TRUE;
                goto END;
            }
        } while (0);
        do {
            if ((battleStatus->currentTargetListFlags & TARGET_FLAG_400000) && targetData->homeCol == col - 1) {
                skip = TRUE;
                goto END;
            }
        } while (0);
        do {
            if ((battleStatus->currentTargetListFlags & TARGET_FLAG_800000) && targetData->homeCol == col + 1) {
                skip = TRUE;
                goto END;
            }
        } while (0);
        do {
            if ((battleStatus->currentTargetListFlags & TARGET_FLAG_100000) && targetData->homeRow < row) {
                skip = TRUE;
                goto END;
            }
        } while (0);
        do {
            if ((battleStatus->currentTargetListFlags & TARGET_FLAG_200000) && targetData->homeRow > row) {
                skip = TRUE;
                goto END;
            }
        } while (0);
        do {
            if ((battleStatus->currentTargetListFlags & TARGET_FLAG_400000) && targetData->homeCol > col) {
                skip = TRUE;
                goto END;
            }
        } while (0);
        do {
            if ((battleStatus->currentTargetListFlags & TARGET_FLAG_800000) && targetData->homeCol < col) {
                skip = TRUE;
                goto END;
            }
        } while (0);
        skip = FALSE;
END:
        if (skip) {
            for (j = i; j < numTargets - 1; j++) {
                actor->targetData[j] = actor->targetData[j + 1];
            }
            numTargets--;
            i--;
        }
    }

    actor->targetListLength = numTargets;
    if (numTargets == 0 && sp18) {
        gBattleStatus.flags2 |= BS_FLAGS2_NO_TARGET_AVAILABLE;
    } else {
        gBattleStatus.flags2 &= ~BS_FLAGS2_NO_TARGET_AVAILABLE;
    }

    targetDataList = actor->targetData;

    numTargets = actor->targetListLength;
    targetIndexList = actor->targetIndexList;
    for (i = 0; i < numTargets; i++) {
        targetIndexList[i] = i;
    }
    for (i = 0; i < numTargets - 1; i++) {
        for (j = i + 1; j < numTargets; j++) {
            s32 index1 = targetIndexList[i];
            s32 index2 = targetIndexList[j];
            targetData = &targetDataList[index1];
            otherTarget = &targetDataList[index2];
            if (targetData->posA.x + targetData->unk_10 * 10 > otherTarget->posA.x + otherTarget->unk_10 * 10) {
                targetIndexList[i] = targetIndexList[j];
                targetIndexList[j] = index1;
            }
        }
    }
}