papermario/ver/us/asm/nonmatchings/42E3A0/func_802A9298_42E638.s
Ethan Roseman 647db26552
Mass function rename from Star Rod + a couple funcs (#298)
* .

* yaml update

* git subrepo pull --force tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "cd690f725d"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "cd690f725d"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* separate main bss syms

* renames and one match

* SR symbol rename

* fix symbol_addrs

* git subrepo pull tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "5fa8aa24ca"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "5fa8aa24ca"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* remove old artifacts
2021-06-30 11:27:12 +09:00

429 lines
22 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_802A9298_42E638
/* 42E638 802A9298 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 42E63C 802A929C AFB10014 */ sw $s1, 0x14($sp)
/* 42E640 802A92A0 3C11802A */ lui $s1, %hi(D_8029FBE0)
/* 42E644 802A92A4 2631FBE0 */ addiu $s1, $s1, %lo(D_8029FBE0)
/* 42E648 802A92A8 AFB20018 */ sw $s2, 0x18($sp)
/* 42E64C 802A92AC 3C12800E */ lui $s2, %hi(gBattleStatus)
/* 42E650 802A92B0 2652C070 */ addiu $s2, $s2, %lo(gBattleStatus)
/* 42E654 802A92B4 AFBF0020 */ sw $ra, 0x20($sp)
/* 42E658 802A92B8 AFB3001C */ sw $s3, 0x1c($sp)
/* 42E65C 802A92BC AFB00010 */ sw $s0, 0x10($sp)
/* 42E660 802A92C0 8623004C */ lh $v1, 0x4c($s1)
/* 42E664 802A92C4 8E5300DC */ lw $s3, 0xdc($s2)
/* 42E668 802A92C8 2C62000D */ sltiu $v0, $v1, 0xd
/* 42E66C 802A92CC 10400171 */ beqz $v0, L802A9894_42EC34
/* 42E670 802A92D0 00031080 */ sll $v0, $v1, 2
/* 42E674 802A92D4 3C01802B */ lui $at, %hi(jtbl_802A9A40_42EDE0)
/* 42E678 802A92D8 00220821 */ addu $at, $at, $v0
/* 42E67C 802A92DC 8C229A40 */ lw $v0, %lo(jtbl_802A9A40_42EDE0)($at)
/* 42E680 802A92E0 00400008 */ jr $v0
/* 42E684 802A92E4 00000000 */ nop
glabel L802A92E8_42E688
/* 42E688 802A92E8 0C093EB1 */ jal btl_set_popup_duration
/* 42E68C 802A92EC 24040063 */ addiu $a0, $zero, 0x63
/* 42E690 802A92F0 8E300004 */ lw $s0, 4($s1)
/* 42E694 802A92F4 240500FF */ addiu $a1, $zero, 0xff
/* 42E698 802A92F8 0C0513AC */ jal set_hud_element_alpha
/* 42E69C 802A92FC 0200202D */ daddu $a0, $s0, $zero
/* 42E6A0 802A9300 82220061 */ lb $v0, 0x61($s1)
/* 42E6A4 802A9304 10400003 */ beqz $v0, .L802A9314
/* 42E6A8 802A9308 0200202D */ daddu $a0, $s0, $zero
/* 42E6AC 802A930C 0C05128B */ jal clear_hud_element_flags
/* 42E6B0 802A9310 24050002 */ addiu $a1, $zero, 2
.L802A9314:
/* 42E6B4 802A9314 8E300008 */ lw $s0, 8($s1)
/* 42E6B8 802A9318 240500FF */ addiu $a1, $zero, 0xff
/* 42E6BC 802A931C 0C0513AC */ jal set_hud_element_alpha
/* 42E6C0 802A9320 0200202D */ daddu $a0, $s0, $zero
/* 42E6C4 802A9324 82220061 */ lb $v0, 0x61($s1)
/* 42E6C8 802A9328 10400003 */ beqz $v0, .L802A9338
/* 42E6CC 802A932C 0200202D */ daddu $a0, $s0, $zero
/* 42E6D0 802A9330 0C05128B */ jal clear_hud_element_flags
/* 42E6D4 802A9334 24050002 */ addiu $a1, $zero, 2
.L802A9338:
/* 42E6D8 802A9338 24020001 */ addiu $v0, $zero, 1
/* 42E6DC 802A933C 080AA625 */ j L802A9894_42EC34
/* 42E6E0 802A9340 A622004C */ sh $v0, 0x4c($s1)
glabel L802A9344_42E6E4
/* 42E6E4 802A9344 0C093EB1 */ jal btl_set_popup_duration
/* 42E6E8 802A9348 24040063 */ addiu $a0, $zero, 0x63
/* 42E6EC 802A934C 8622006C */ lh $v0, 0x6c($s1)
/* 42E6F0 802A9350 9623006C */ lhu $v1, 0x6c($s1)
/* 42E6F4 802A9354 10400003 */ beqz $v0, .L802A9364
/* 42E6F8 802A9358 2462FFFF */ addiu $v0, $v1, -1
/* 42E6FC 802A935C 080AA625 */ j L802A9894_42EC34
/* 42E700 802A9360 A622006C */ sh $v0, 0x6c($s1)
.L802A9364:
/* 42E704 802A9364 96220056 */ lhu $v0, 0x56($s1)
/* 42E708 802A9368 24420014 */ addiu $v0, $v0, 0x14
/* 42E70C 802A936C A6220056 */ sh $v0, 0x56($s1)
/* 42E710 802A9370 00021400 */ sll $v0, $v0, 0x10
/* 42E714 802A9374 00021403 */ sra $v0, $v0, 0x10
/* 42E718 802A9378 28420033 */ slti $v0, $v0, 0x33
/* 42E71C 802A937C 14400002 */ bnez $v0, .L802A9388
/* 42E720 802A9380 24020032 */ addiu $v0, $zero, 0x32
/* 42E724 802A9384 A6220056 */ sh $v0, 0x56($s1)
.L802A9388:
/* 42E728 802A9388 8E240004 */ lw $a0, 4($s1)
/* 42E72C 802A938C 86250056 */ lh $a1, 0x56($s1)
/* 42E730 802A9390 0C051261 */ jal set_hud_element_render_pos
/* 42E734 802A9394 86260058 */ lh $a2, 0x58($s1)
/* 42E738 802A9398 8E240008 */ lw $a0, 8($s1)
/* 42E73C 802A939C 86260058 */ lh $a2, 0x58($s1)
/* 42E740 802A93A0 86250056 */ lh $a1, 0x56($s1)
/* 42E744 802A93A4 0C051261 */ jal set_hud_element_render_pos
/* 42E748 802A93A8 24C6001C */ addiu $a2, $a2, 0x1c
/* 42E74C 802A93AC 080AA625 */ j L802A9894_42EC34
/* 42E750 802A93B0 00000000 */ nop
glabel L802A93B4_42E754
/* 42E754 802A93B4 0C093EB1 */ jal btl_set_popup_duration
/* 42E758 802A93B8 24040063 */ addiu $a0, $zero, 0x63
/* 42E75C 802A93BC 8622004E */ lh $v0, 0x4e($s1)
/* 42E760 802A93C0 9623004E */ lhu $v1, 0x4e($s1)
/* 42E764 802A93C4 10400003 */ beqz $v0, .L802A93D4
/* 42E768 802A93C8 2462FFFF */ addiu $v0, $v1, -1
/* 42E76C 802A93CC 080AA625 */ j L802A9894_42EC34
/* 42E770 802A93D0 A622004E */ sh $v0, 0x4e($s1)
.L802A93D4:
/* 42E774 802A93D4 8E240004 */ lw $a0, 4($s1)
/* 42E778 802A93D8 3C058011 */ lui $a1, %hi(D_80108F30)
/* 42E77C 802A93DC 24A58F30 */ addiu $a1, $a1, %lo(D_80108F30)
/* 42E780 802A93E0 0C0511FF */ jal set_hud_element_script
/* 42E784 802A93E4 00000000 */ nop
/* 42E788 802A93E8 3C048000 */ lui $a0, 0x8000
/* 42E78C 802A93EC 34840041 */ ori $a0, $a0, 0x41
/* 42E790 802A93F0 0000282D */ daddu $a1, $zero, $zero
/* 42E794 802A93F4 00A0302D */ daddu $a2, $a1, $zero
/* 42E798 802A93F8 96220052 */ lhu $v0, 0x52($s1)
/* 42E79C 802A93FC 00A0382D */ daddu $a3, $a1, $zero
/* 42E7A0 802A9400 A6200044 */ sh $zero, 0x44($s1)
/* 42E7A4 802A9404 A2400085 */ sb $zero, 0x85($s2)
/* 42E7A8 802A9408 A220005C */ sb $zero, 0x5c($s1)
/* 42E7AC 802A940C 0C0526AE */ jal sfx_play_sound_with_params
/* 42E7B0 802A9410 A6220054 */ sh $v0, 0x54($s1)
/* 42E7B4 802A9414 2402000B */ addiu $v0, $zero, 0xb
/* 42E7B8 802A9418 A622004C */ sh $v0, 0x4c($s1)
glabel L802A941C_42E7BC
/* 42E7BC 802A941C 0C093EB1 */ jal btl_set_popup_duration
/* 42E7C0 802A9420 24040063 */ addiu $a0, $zero, 0x63
/* 42E7C4 802A9424 86220068 */ lh $v0, 0x68($s1)
/* 42E7C8 802A9428 14400066 */ bnez $v0, .L802A95C4
/* 42E7CC 802A942C 00000000 */ nop
/* 42E7D0 802A9430 82220080 */ lb $v0, 0x80($s1)
/* 42E7D4 802A9434 00021040 */ sll $v0, $v0, 1
/* 42E7D8 802A9438 02221021 */ addu $v0, $s1, $v0
/* 42E7DC 802A943C 84430074 */ lh $v1, 0x74($v0)
/* 42E7E0 802A9440 86220044 */ lh $v0, 0x44($s1)
/* 42E7E4 802A9444 14600002 */ bnez $v1, .L802A9450
/* 42E7E8 802A9448 0043001A */ div $zero, $v0, $v1
/* 42E7EC 802A944C 0007000D */ break 7
.L802A9450:
/* 42E7F0 802A9450 2401FFFF */ addiu $at, $zero, -1
/* 42E7F4 802A9454 14610004 */ bne $v1, $at, .L802A9468
/* 42E7F8 802A9458 3C018000 */ lui $at, 0x8000
/* 42E7FC 802A945C 14410002 */ bne $v0, $at, .L802A9468
/* 42E800 802A9460 00000000 */ nop
/* 42E804 802A9464 0006000D */ break 6
.L802A9468:
/* 42E808 802A9468 00001012 */ mflo $v0
/* 42E80C 802A946C 3C036666 */ lui $v1, 0x6666
/* 42E810 802A9470 34636667 */ ori $v1, $v1, 0x6667
/* 42E814 802A9474 00430018 */ mult $v0, $v1
/* 42E818 802A9478 000217C3 */ sra $v0, $v0, 0x1f
/* 42E81C 802A947C 00001810 */ mfhi $v1
/* 42E820 802A9480 000318C3 */ sra $v1, $v1, 3
/* 42E824 802A9484 00621823 */ subu $v1, $v1, $v0
/* 42E828 802A9488 00031880 */ sll $v1, $v1, 2
/* 42E82C 802A948C 96220044 */ lhu $v0, 0x44($s1)
/* 42E830 802A9490 3C01802B */ lui $at, %hi(D_802A99D2_42ED72)
/* 42E834 802A9494 00230821 */ addu $at, $at, $v1
/* 42E838 802A9498 942399D2 */ lhu $v1, %lo(D_802A99D2_42ED72)($at)
/* 42E83C 802A949C 00431023 */ subu $v0, $v0, $v1
/* 42E840 802A94A0 A6220044 */ sh $v0, 0x44($s1)
/* 42E844 802A94A4 00021400 */ sll $v0, $v0, 0x10
/* 42E848 802A94A8 04420001 */ bltzl $v0, .L802A94B0
/* 42E84C 802A94AC A6200044 */ sh $zero, 0x44($s1)
.L802A94B0:
/* 42E850 802A94B0 86220068 */ lh $v0, 0x68($s1)
/* 42E854 802A94B4 14400043 */ bnez $v0, .L802A95C4
/* 42E858 802A94B8 3C040004 */ lui $a0, 4
/* 42E85C 802A94BC 8E420210 */ lw $v0, 0x210($s2)
/* 42E860 802A94C0 00441024 */ and $v0, $v0, $a0
/* 42E864 802A94C4 10400006 */ beqz $v0, .L802A94E0
/* 42E868 802A94C8 00000000 */ nop
/* 42E86C 802A94CC 8E420210 */ lw $v0, 0x210($s2)
/* 42E870 802A94D0 24030001 */ addiu $v1, $zero, 1
/* 42E874 802A94D4 00441024 */ and $v0, $v0, $a0
/* 42E878 802A94D8 14400029 */ bnez $v0, .L802A9580
/* 42E87C 802A94DC A223005C */ sb $v1, 0x5c($s1)
.L802A94E0:
/* 42E880 802A94E0 8222005C */ lb $v0, 0x5c($s1)
/* 42E884 802A94E4 10400026 */ beqz $v0, .L802A9580
/* 42E888 802A94E8 00000000 */ nop
/* 42E88C 802A94EC 86220064 */ lh $v0, 0x64($s1)
/* 42E890 802A94F0 1440000D */ bnez $v0, .L802A9528
/* 42E894 802A94F4 3C0451EB */ lui $a0, 0x51eb
/* 42E898 802A94F8 86220050 */ lh $v0, 0x50($s1)
/* 42E89C 802A94FC 8E430434 */ lw $v1, 0x434($s2)
/* 42E8A0 802A9500 00021080 */ sll $v0, $v0, 2
/* 42E8A4 802A9504 00431021 */ addu $v0, $v0, $v1
/* 42E8A8 802A9508 8C440000 */ lw $a0, ($v0)
/* 42E8AC 802A950C 96230044 */ lhu $v1, 0x44($s1)
/* 42E8B0 802A9510 00041040 */ sll $v0, $a0, 1
/* 42E8B4 802A9514 00441021 */ addu $v0, $v0, $a0
/* 42E8B8 802A9518 00021080 */ sll $v0, $v0, 2
/* 42E8BC 802A951C 00441021 */ addu $v0, $v0, $a0
/* 42E8C0 802A9520 080AA55E */ j .L802A9578
/* 42E8C4 802A9524 00621821 */ addu $v1, $v1, $v0
.L802A9528:
/* 42E8C8 802A9528 86220050 */ lh $v0, 0x50($s1)
/* 42E8CC 802A952C 8E430434 */ lw $v1, 0x434($s2)
/* 42E8D0 802A9530 00021080 */ sll $v0, $v0, 2
/* 42E8D4 802A9534 00431021 */ addu $v0, $v0, $v1
/* 42E8D8 802A9538 8C430000 */ lw $v1, ($v0)
/* 42E8DC 802A953C 3484851F */ ori $a0, $a0, 0x851f
/* 42E8E0 802A9540 00031040 */ sll $v0, $v1, 1
/* 42E8E4 802A9544 00431021 */ addu $v0, $v0, $v1
/* 42E8E8 802A9548 000210C0 */ sll $v0, $v0, 3
/* 42E8EC 802A954C 00431021 */ addu $v0, $v0, $v1
/* 42E8F0 802A9550 00021900 */ sll $v1, $v0, 4
/* 42E8F4 802A9554 00431021 */ addu $v0, $v0, $v1
/* 42E8F8 802A9558 00021040 */ sll $v0, $v0, 1
/* 42E8FC 802A955C 00440018 */ mult $v0, $a0
/* 42E900 802A9560 000217C3 */ sra $v0, $v0, 0x1f
/* 42E904 802A9564 96230044 */ lhu $v1, 0x44($s1)
/* 42E908 802A9568 00004810 */ mfhi $t1
/* 42E90C 802A956C 00092143 */ sra $a0, $t1, 5
/* 42E910 802A9570 00822023 */ subu $a0, $a0, $v0
/* 42E914 802A9574 00641821 */ addu $v1, $v1, $a0
.L802A9578:
/* 42E918 802A9578 A6230044 */ sh $v1, 0x44($s1)
/* 42E91C 802A957C A220005C */ sb $zero, 0x5c($s1)
.L802A9580:
/* 42E920 802A9580 8E420214 */ lw $v0, 0x214($s2)
/* 42E924 802A9584 3C030008 */ lui $v1, 8
/* 42E928 802A9588 00431024 */ and $v0, $v0, $v1
/* 42E92C 802A958C 1040000D */ beqz $v0, .L802A95C4
/* 42E930 802A9590 00000000 */ nop
/* 42E934 802A9594 86220050 */ lh $v0, 0x50($s1)
/* 42E938 802A9598 8E430434 */ lw $v1, 0x434($s2)
/* 42E93C 802A959C 00021080 */ sll $v0, $v0, 2
/* 42E940 802A95A0 00431021 */ addu $v0, $v0, $v1
/* 42E944 802A95A4 8C440000 */ lw $a0, ($v0)
/* 42E948 802A95A8 96230044 */ lhu $v1, 0x44($s1)
/* 42E94C 802A95AC 00041040 */ sll $v0, $a0, 1
/* 42E950 802A95B0 00441021 */ addu $v0, $v0, $a0
/* 42E954 802A95B4 00021080 */ sll $v0, $v0, 2
/* 42E958 802A95B8 00441023 */ subu $v0, $v0, $a0
/* 42E95C 802A95BC 00621823 */ subu $v1, $v1, $v0
/* 42E960 802A95C0 A6230044 */ sh $v1, 0x44($s1)
.L802A95C4:
/* 42E964 802A95C4 86220044 */ lh $v0, 0x44($s1)
/* 42E968 802A95C8 04420001 */ bltzl $v0, .L802A95D0
/* 42E96C 802A95CC A6200044 */ sh $zero, 0x44($s1)
.L802A95D0:
/* 42E970 802A95D0 86220044 */ lh $v0, 0x44($s1)
/* 42E974 802A95D4 28422711 */ slti $v0, $v0, 0x2711
/* 42E978 802A95D8 14400010 */ bnez $v0, .L802A961C
/* 42E97C 802A95DC 3C0451EB */ lui $a0, 0x51eb
/* 42E980 802A95E0 8E30000C */ lw $s0, 0xc($s1)
/* 42E984 802A95E4 86250056 */ lh $a1, 0x56($s1)
/* 42E988 802A95E8 86260058 */ lh $a2, 0x58($s1)
/* 42E98C 802A95EC 24022710 */ addiu $v0, $zero, 0x2710
/* 42E990 802A95F0 A6220044 */ sh $v0, 0x44($s1)
/* 42E994 802A95F4 24020001 */ addiu $v0, $zero, 1
/* 42E998 802A95F8 A6220068 */ sh $v0, 0x68($s1)
/* 42E99C 802A95FC 0200202D */ daddu $a0, $s0, $zero
/* 42E9A0 802A9600 24A50032 */ addiu $a1, $a1, 0x32
/* 42E9A4 802A9604 0C051261 */ jal set_hud_element_render_pos
/* 42E9A8 802A9608 24C6001C */ addiu $a2, $a2, 0x1c
/* 42E9AC 802A960C 0200202D */ daddu $a0, $s0, $zero
/* 42E9B0 802A9610 0C05128B */ jal clear_hud_element_flags
/* 42E9B4 802A9614 24050002 */ addiu $a1, $zero, 2
/* 42E9B8 802A9618 3C0451EB */ lui $a0, 0x51eb
.L802A961C:
/* 42E9BC 802A961C 3484851F */ ori $a0, $a0, 0x851f
/* 42E9C0 802A9620 96230044 */ lhu $v1, 0x44($s1)
/* 42E9C4 802A9624 0000282D */ daddu $a1, $zero, $zero
/* 42E9C8 802A9628 00031C00 */ sll $v1, $v1, 0x10
/* 42E9CC 802A962C 00031403 */ sra $v0, $v1, 0x10
/* 42E9D0 802A9630 00440018 */ mult $v0, $a0
/* 42E9D4 802A9634 00A0302D */ daddu $a2, $a1, $zero
/* 42E9D8 802A9638 3C048000 */ lui $a0, 0x8000
/* 42E9DC 802A963C 34840041 */ ori $a0, $a0, 0x41
/* 42E9E0 802A9640 00031FC3 */ sra $v1, $v1, 0x1f
/* 42E9E4 802A9644 00004810 */ mfhi $t1
/* 42E9E8 802A9648 00094143 */ sra $t0, $t1, 5
/* 42E9EC 802A964C 01034023 */ subu $t0, $t0, $v1
/* 42E9F0 802A9650 00081600 */ sll $v0, $t0, 0x18
/* 42E9F4 802A9654 00021603 */ sra $v0, $v0, 0x18
/* 42E9F8 802A9658 00023840 */ sll $a3, $v0, 1
/* 42E9FC 802A965C 00E23821 */ addu $a3, $a3, $v0
/* 42EA00 802A9660 00073880 */ sll $a3, $a3, 2
/* 42EA04 802A9664 0C0526F9 */ jal sfx_adjust_env_sound_params
/* 42EA08 802A9668 A2480084 */ sb $t0, 0x84($s2)
/* 42EA0C 802A966C 8E620008 */ lw $v0, 8($s3)
/* 42EA10 802A9670 90430006 */ lbu $v1, 6($v0)
/* 42EA14 802A9674 24020001 */ addiu $v0, $zero, 1
/* 42EA18 802A9678 10620019 */ beq $v1, $v0, .L802A96E0
/* 42EA1C 802A967C 28620002 */ slti $v0, $v1, 2
/* 42EA20 802A9680 10400005 */ beqz $v0, .L802A9698
/* 42EA24 802A9684 24020002 */ addiu $v0, $zero, 2
/* 42EA28 802A9688 10600007 */ beqz $v1, .L802A96A8
/* 42EA2C 802A968C 00000000 */ nop
/* 42EA30 802A9690 080AA5F0 */ j .L802A97C0
/* 42EA34 802A9694 00000000 */ nop
.L802A9698:
/* 42EA38 802A9698 1062001F */ beq $v1, $v0, .L802A9718
/* 42EA3C 802A969C 00000000 */ nop
/* 42EA40 802A96A0 080AA5F0 */ j .L802A97C0
/* 42EA44 802A96A4 00000000 */ nop
.L802A96A8:
/* 42EA48 802A96A8 82420085 */ lb $v0, 0x85($s2)
/* 42EA4C 802A96AC 82430084 */ lb $v1, 0x84($s2)
/* 42EA50 802A96B0 00021080 */ sll $v0, $v0, 2
/* 42EA54 802A96B4 3C01802B */ lui $at, %hi(D_802A99E4_42ED84)
/* 42EA58 802A96B8 00220821 */ addu $at, $at, $v0
/* 42EA5C 802A96BC 8C2299E4 */ lw $v0, %lo(D_802A99E4_42ED84)($at)
/* 42EA60 802A96C0 3C05802B */ lui $a1, %hi(D_802A99E4_42ED84)
/* 42EA64 802A96C4 24A599E4 */ addiu $a1, $a1, %lo(D_802A99E4_42ED84)
/* 42EA68 802A96C8 0062182A */ slt $v1, $v1, $v0
/* 42EA6C 802A96CC 92420085 */ lbu $v0, 0x85($s2)
/* 42EA70 802A96D0 1460002F */ bnez $v1, .L802A9790
/* 42EA74 802A96D4 24420001 */ addiu $v0, $v0, 1
/* 42EA78 802A96D8 080AA5E4 */ j .L802A9790
/* 42EA7C 802A96DC A2420085 */ sb $v0, 0x85($s2)
.L802A96E0:
/* 42EA80 802A96E0 82420085 */ lb $v0, 0x85($s2)
/* 42EA84 802A96E4 82430084 */ lb $v1, 0x84($s2)
/* 42EA88 802A96E8 00021080 */ sll $v0, $v0, 2
/* 42EA8C 802A96EC 3C01802B */ lui $at, %hi(D_802A99F4_42ED94)
/* 42EA90 802A96F0 00220821 */ addu $at, $at, $v0
/* 42EA94 802A96F4 8C2299F4 */ lw $v0, %lo(D_802A99F4_42ED94)($at)
/* 42EA98 802A96F8 3C05802B */ lui $a1, %hi(D_802A99F4_42ED94)
/* 42EA9C 802A96FC 24A599F4 */ addiu $a1, $a1, %lo(D_802A99F4_42ED94)
/* 42EAA0 802A9700 0062182A */ slt $v1, $v1, $v0
/* 42EAA4 802A9704 92420085 */ lbu $v0, 0x85($s2)
/* 42EAA8 802A9708 14600021 */ bnez $v1, .L802A9790
/* 42EAAC 802A970C 24420001 */ addiu $v0, $v0, 1
/* 42EAB0 802A9710 080AA5E4 */ j .L802A9790
/* 42EAB4 802A9714 A2420085 */ sb $v0, 0x85($s2)
.L802A9718:
/* 42EAB8 802A9718 86220064 */ lh $v0, 0x64($s1)
/* 42EABC 802A971C 1440000F */ bnez $v0, .L802A975C
/* 42EAC0 802A9720 00000000 */ nop
/* 42EAC4 802A9724 82420085 */ lb $v0, 0x85($s2)
/* 42EAC8 802A9728 82430084 */ lb $v1, 0x84($s2)
/* 42EACC 802A972C 00021080 */ sll $v0, $v0, 2
/* 42EAD0 802A9730 3C01802B */ lui $at, %hi(D_802A9A08_42EDA8)
/* 42EAD4 802A9734 00220821 */ addu $at, $at, $v0
/* 42EAD8 802A9738 8C229A08 */ lw $v0, %lo(D_802A9A08_42EDA8)($at)
/* 42EADC 802A973C 3C05802B */ lui $a1, %hi(D_802A9A08_42EDA8)
/* 42EAE0 802A9740 24A59A08 */ addiu $a1, $a1, %lo(D_802A9A08_42EDA8)
/* 42EAE4 802A9744 0062182A */ slt $v1, $v1, $v0
/* 42EAE8 802A9748 92420085 */ lbu $v0, 0x85($s2)
/* 42EAEC 802A974C 14600010 */ bnez $v1, .L802A9790
/* 42EAF0 802A9750 24420001 */ addiu $v0, $v0, 1
/* 42EAF4 802A9754 080AA5E4 */ j .L802A9790
/* 42EAF8 802A9758 A2420085 */ sb $v0, 0x85($s2)
.L802A975C:
/* 42EAFC 802A975C 82420085 */ lb $v0, 0x85($s2)
/* 42EB00 802A9760 82430084 */ lb $v1, 0x84($s2)
/* 42EB04 802A9764 00021080 */ sll $v0, $v0, 2
/* 42EB08 802A9768 3C01802B */ lui $at, %hi(D_802A9A20_42EDC0)
/* 42EB0C 802A976C 00220821 */ addu $at, $at, $v0
/* 42EB10 802A9770 8C229A20 */ lw $v0, %lo(D_802A9A20_42EDC0)($at)
/* 42EB14 802A9774 3C05802B */ lui $a1, %hi(D_802A9A20_42EDC0)
/* 42EB18 802A9778 24A59A20 */ addiu $a1, $a1, %lo(D_802A9A20_42EDC0)
/* 42EB1C 802A977C 0062182A */ slt $v1, $v1, $v0
/* 42EB20 802A9780 92420085 */ lbu $v0, 0x85($s2)
/* 42EB24 802A9784 14600002 */ bnez $v1, .L802A9790
/* 42EB28 802A9788 24420001 */ addiu $v0, $v0, 1
/* 42EB2C 802A978C A2420085 */ sb $v0, 0x85($s2)
.L802A9790:
/* 42EB30 802A9790 82420085 */ lb $v0, 0x85($s2)
/* 42EB34 802A9794 92440085 */ lbu $a0, 0x85($s2)
/* 42EB38 802A9798 18400009 */ blez $v0, .L802A97C0
/* 42EB3C 802A979C 2442FFFF */ addiu $v0, $v0, -1
/* 42EB40 802A97A0 00021080 */ sll $v0, $v0, 2
/* 42EB44 802A97A4 00451021 */ addu $v0, $v0, $a1
/* 42EB48 802A97A8 82430084 */ lb $v1, 0x84($s2)
/* 42EB4C 802A97AC 8C420000 */ lw $v0, ($v0)
/* 42EB50 802A97B0 0062182A */ slt $v1, $v1, $v0
/* 42EB54 802A97B4 10600002 */ beqz $v1, .L802A97C0
/* 42EB58 802A97B8 2482FFFF */ addiu $v0, $a0, -1
/* 42EB5C 802A97BC A2420085 */ sb $v0, 0x85($s2)
.L802A97C0:
/* 42EB60 802A97C0 86220054 */ lh $v0, 0x54($s1)
/* 42EB64 802A97C4 96230054 */ lhu $v1, 0x54($s1)
/* 42EB68 802A97C8 1440002E */ bnez $v0, .L802A9884
/* 42EB6C 802A97CC 2462FFFF */ addiu $v0, $v1, -1
/* 42EB70 802A97D0 96220044 */ lhu $v0, 0x44($s1)
/* 42EB74 802A97D4 00021C00 */ sll $v1, $v0, 0x10
/* 42EB78 802A97D8 00032403 */ sra $a0, $v1, 0x10
/* 42EB7C 802A97DC 14800003 */ bnez $a0, .L802A97EC
/* 42EB80 802A97E0 3C0251EB */ lui $v0, 0x51eb
/* 42EB84 802A97E4 080AA601 */ j .L802A9804
/* 42EB88 802A97E8 2402FFFF */ addiu $v0, $zero, -1
.L802A97EC:
/* 42EB8C 802A97EC 3442851F */ ori $v0, $v0, 0x851f
/* 42EB90 802A97F0 00820018 */ mult $a0, $v0
/* 42EB94 802A97F4 00031FC3 */ sra $v1, $v1, 0x1f
/* 42EB98 802A97F8 00004810 */ mfhi $t1
/* 42EB9C 802A97FC 00091143 */ sra $v0, $t1, 5
/* 42EBA0 802A9800 00431023 */ subu $v0, $v0, $v1
.L802A9804:
/* 42EBA4 802A9804 A2420081 */ sb $v0, 0x81($s2)
/* 42EBA8 802A9808 82220080 */ lb $v0, 0x80($s1)
/* 42EBAC 802A980C 2442FFFF */ addiu $v0, $v0, -1
/* 42EBB0 802A9810 00021040 */ sll $v0, $v0, 1
/* 42EBB4 802A9814 02221021 */ addu $v0, $s1, $v0
/* 42EBB8 802A9818 84430074 */ lh $v1, 0x74($v0)
/* 42EBBC 802A981C 82420081 */ lb $v0, 0x81($s2)
/* 42EBC0 802A9820 0062102A */ slt $v0, $v1, $v0
/* 42EBC4 802A9824 14400002 */ bnez $v0, .L802A9830
/* 42EBC8 802A9828 24020001 */ addiu $v0, $zero, 1
/* 42EBCC 802A982C 2402FFFE */ addiu $v0, $zero, -2
.L802A9830:
/* 42EBD0 802A9830 A2420086 */ sb $v0, 0x86($s2)
/* 42EBD4 802A9834 82430081 */ lb $v1, 0x81($s2)
/* 42EBD8 802A9838 24020064 */ addiu $v0, $zero, 0x64
/* 42EBDC 802A983C 14620003 */ bne $v1, $v0, .L802A984C
/* 42EBE0 802A9840 00000000 */ nop
/* 42EBE4 802A9844 0C09A458 */ jal func_80269160
/* 42EBE8 802A9848 00000000 */ nop
.L802A984C:
/* 42EBEC 802A984C 0C093EB1 */ jal btl_set_popup_duration
/* 42EBF0 802A9850 0000202D */ daddu $a0, $zero, $zero
/* 42EBF4 802A9854 3C048000 */ lui $a0, 0x8000
/* 42EBF8 802A9858 0C05271B */ jal sfx_stop_sound
/* 42EBFC 802A985C 34840041 */ ori $a0, $a0, 0x41
/* 42EC00 802A9860 24020005 */ addiu $v0, $zero, 5
/* 42EC04 802A9864 A6220054 */ sh $v0, 0x54($s1)
/* 42EC08 802A9868 2402000C */ addiu $v0, $zero, 0xc
/* 42EC0C 802A986C 080AA625 */ j L802A9894_42EC34
/* 42EC10 802A9870 A622004C */ sh $v0, 0x4c($s1)
glabel L802A9874_42EC14
/* 42EC14 802A9874 86220054 */ lh $v0, 0x54($s1)
/* 42EC18 802A9878 96230054 */ lhu $v1, 0x54($s1)
/* 42EC1C 802A987C 10400003 */ beqz $v0, .L802A988C
/* 42EC20 802A9880 2462FFFF */ addiu $v0, $v1, -1
.L802A9884:
/* 42EC24 802A9884 080AA625 */ j L802A9894_42EC34
/* 42EC28 802A9888 A6220054 */ sh $v0, 0x54($s1)
.L802A988C:
/* 42EC2C 802A988C 0C09A327 */ jal func_80268C9C
/* 42EC30 802A9890 00000000 */ nop
glabel L802A9894_42EC34
/* 42EC34 802A9894 8FBF0020 */ lw $ra, 0x20($sp)
/* 42EC38 802A9898 8FB3001C */ lw $s3, 0x1c($sp)
/* 42EC3C 802A989C 8FB20018 */ lw $s2, 0x18($sp)
/* 42EC40 802A98A0 8FB10014 */ lw $s1, 0x14($sp)
/* 42EC44 802A98A4 8FB00010 */ lw $s0, 0x10($sp)
/* 42EC48 802A98A8 03E00008 */ jr $ra
/* 42EC4C 802A98AC 27BD0028 */ addiu $sp, $sp, 0x28