papermario/asm/nonmatchings/code_105700_len_2130/func_802E5324.s
2020-08-12 21:56:23 -04:00

190 lines
8.3 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.include "include/macro.inc"
glabel func_802E5324
/* 106BA4 802E5324 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 106BA8 802E5328 AFB10014 */ sw $s1, 0x14($sp)
/* 106BAC 802E532C 0080882D */ daddu $s1, $a0, $zero
/* 106BB0 802E5330 AFBF0018 */ sw $ra, 0x18($sp)
/* 106BB4 802E5334 AFB00010 */ sw $s0, 0x10($sp)
/* 106BB8 802E5338 0C0B92C4 */ jal func_802E4B10
/* 106BBC 802E533C 8E300040 */ lw $s0, 0x40($s1)
/* 106BC0 802E5340 C6200054 */ lwc1 $f0, 0x54($s1)
/* 106BC4 802E5344 3C013FF0 */ lui $at, 0x3ff0
/* 106BC8 802E5348 44812800 */ mtc1 $at, $f5
/* 106BCC 802E534C 44802000 */ mtc1 $zero, $f4
/* 106BD0 802E5350 460000A1 */ cvt.d.s $f2, $f0
/* 106BD4 802E5354 4624103C */ c.lt.d $f2, $f4
/* 106BD8 802E5358 00000000 */ nop
/* 106BDC 802E535C 45010026 */ bc1t .L802E53F8
/* 106BE0 802E5360 24020001 */ addiu $v0, $zero, 1
/* 106BE4 802E5364 92030008 */ lbu $v1, 8($s0)
/* 106BE8 802E5368 10620010 */ beq $v1, $v0, .L802E53AC
/* 106BEC 802E536C 28620002 */ slti $v0, $v1, 2
/* 106BF0 802E5370 50400005 */ beql $v0, $zero, .L802E5388
/* 106BF4 802E5374 28620011 */ slti $v0, $v1, 0x11
/* 106BF8 802E5378 10600007 */ beqz $v1, .L802E5398
/* 106BFC 802E537C 00000000 */ nop
/* 106C00 802E5380 080B94FC */ j .L802E53F0
/* 106C04 802E5384 A2000008 */ sb $zero, 8($s0)
.L802E5388:
/* 106C08 802E5388 50400019 */ beql $v0, $zero, .L802E53F0
/* 106C0C 802E538C A2000008 */ sb $zero, 8($s0)
/* 106C10 802E5390 080B94F9 */ j .L802E53E4
/* 106C14 802E5394 00000000 */ nop
.L802E5398:
/* 106C18 802E5398 3C01802F */ lui $at, 0x802f
/* 106C1C 802E539C D420B298 */ ldc1 $f0, -0x4d68($at)
/* 106C20 802E53A0 46201000 */ add.d $f0, $f2, $f0
/* 106C24 802E53A4 080B94F8 */ j .L802E53E0
/* 106C28 802E53A8 46200020 */ cvt.s.d $f0, $f0
.L802E53AC:
/* 106C2C 802E53AC 3C01802F */ lui $at, 0x802f
/* 106C30 802E53B0 D420B2A0 */ ldc1 $f0, -0x4d60($at)
/* 106C34 802E53B4 46201001 */ sub.d $f0, $f2, $f0
/* 106C38 802E53B8 46200020 */ cvt.s.d $f0, $f0
/* 106C3C 802E53BC E6200054 */ swc1 $f0, 0x54($s1)
/* 106C40 802E53C0 46000021 */ cvt.d.s $f0, $f0
/* 106C44 802E53C4 4624003E */ c.le.d $f0, $f4
/* 106C48 802E53C8 00000000 */ nop
/* 106C4C 802E53CC 45000008 */ bc1f .L802E53F0
/* 106C50 802E53D0 00000000 */ nop
/* 106C54 802E53D4 3C013F80 */ lui $at, 0x3f80
/* 106C58 802E53D8 44810000 */ mtc1 $at, $f0
/* 106C5C 802E53DC 00000000 */ nop
.L802E53E0:
/* 106C60 802E53E0 E6200054 */ swc1 $f0, 0x54($s1)
.L802E53E4:
/* 106C64 802E53E4 92020008 */ lbu $v0, 8($s0)
/* 106C68 802E53E8 24420001 */ addiu $v0, $v0, 1
/* 106C6C 802E53EC A2020008 */ sb $v0, 8($s0)
.L802E53F0:
/* 106C70 802E53F0 C6200054 */ lwc1 $f0, 0x54($s1)
/* 106C74 802E53F4 E6200058 */ swc1 $f0, 0x58($s1)
.L802E53F8:
/* 106C78 802E53F8 8FBF0018 */ lw $ra, 0x18($sp)
/* 106C7C 802E53FC 8FB10014 */ lw $s1, 0x14($sp)
/* 106C80 802E5400 8FB00010 */ lw $s0, 0x10($sp)
/* 106C84 802E5404 03E00008 */ jr $ra
/* 106C88 802E5408 27BD0020 */ addiu $sp, $sp, 0x20
/* 106C8C 802E540C 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 106C90 802E5410 AFBF0010 */ sw $ra, 0x10($sp)
/* 106C94 802E5414 0C0B92C4 */ jal func_802E4B10
/* 106C98 802E5418 00000000 */ nop
/* 106C9C 802E541C 8FBF0010 */ lw $ra, 0x10($sp)
/* 106CA0 802E5420 03E00008 */ jr $ra
/* 106CA4 802E5424 27BD0018 */ addiu $sp, $sp, 0x18
/* 106CA8 802E5428 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 106CAC 802E542C AFB00010 */ sw $s0, 0x10($sp)
/* 106CB0 802E5430 AFBF0014 */ sw $ra, 0x14($sp)
/* 106CB4 802E5434 0C0B92D8 */ jal func_802E4B60
/* 106CB8 802E5438 0080802D */ daddu $s0, $a0, $zero
/* 106CBC 802E543C 3C05802F */ lui $a1, 0x802f
/* 106CC0 802E5440 24A5A728 */ addiu $a1, $a1, -0x58d8
/* 106CC4 802E5444 0C0442F3 */ jal func_80110BCC
/* 106CC8 802E5448 0200202D */ daddu $a0, $s0, $zero
/* 106CCC 802E544C 8FBF0014 */ lw $ra, 0x14($sp)
/* 106CD0 802E5450 8FB00010 */ lw $s0, 0x10($sp)
/* 106CD4 802E5454 03E00008 */ jr $ra
/* 106CD8 802E5458 27BD0018 */ addiu $sp, $sp, 0x18
/* 106CDC 802E545C 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 106CE0 802E5460 AFB00010 */ sw $s0, 0x10($sp)
/* 106CE4 802E5464 0080802D */ daddu $s0, $a0, $zero
/* 106CE8 802E5468 AFBF0014 */ sw $ra, 0x14($sp)
/* 106CEC 802E546C 0C0B9304 */ jal func_802E4C10
/* 106CF0 802E5470 0000282D */ daddu $a1, $zero, $zero
/* 106CF4 802E5474 0C0B94C9 */ jal func_802E5324
/* 106CF8 802E5478 0200202D */ daddu $a0, $s0, $zero
/* 106CFC 802E547C 8FBF0014 */ lw $ra, 0x14($sp)
/* 106D00 802E5480 8FB00010 */ lw $s0, 0x10($sp)
/* 106D04 802E5484 03E00008 */ jr $ra
/* 106D08 802E5488 27BD0018 */ addiu $sp, $sp, 0x18
/* 106D0C 802E548C 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 106D10 802E5490 AFBF0010 */ sw $ra, 0x10($sp)
/* 106D14 802E5494 0C0B9381 */ jal func_802E4E04
/* 106D18 802E5498 0000282D */ daddu $a1, $zero, $zero
/* 106D1C 802E549C 8FBF0010 */ lw $ra, 0x10($sp)
/* 106D20 802E54A0 03E00008 */ jr $ra
/* 106D24 802E54A4 27BD0018 */ addiu $sp, $sp, 0x18
/* 106D28 802E54A8 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 106D2C 802E54AC 3C05802F */ lui $a1, 0x802f
/* 106D30 802E54B0 24A5A760 */ addiu $a1, $a1, -0x58a0
/* 106D34 802E54B4 AFBF0010 */ sw $ra, 0x10($sp)
/* 106D38 802E54B8 0C0442F3 */ jal func_80110BCC
/* 106D3C 802E54BC 00000000 */ nop
/* 106D40 802E54C0 8FBF0010 */ lw $ra, 0x10($sp)
/* 106D44 802E54C4 03E00008 */ jr $ra
/* 106D48 802E54C8 27BD0018 */ addiu $sp, $sp, 0x18
/* 106D4C 802E54CC 3C028011 */ lui $v0, 0x8011
/* 106D50 802E54D0 9042F2AC */ lbu $v0, -0xd54($v0)
/* 106D54 802E54D4 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 106D58 802E54D8 AFB00010 */ sw $s0, 0x10($sp)
/* 106D5C 802E54DC 0080802D */ daddu $s0, $a0, $zero
/* 106D60 802E54E0 14400018 */ bnez $v0, .L802E5544
/* 106D64 802E54E4 AFBF0014 */ sw $ra, 0x14($sp)
/* 106D68 802E54E8 3C04F840 */ lui $a0, 0xf840
/* 106D6C 802E54EC 0C05152F */ jal get_global_flag
/* 106D70 802E54F0 34845BE0 */ ori $a0, $a0, 0x5be0
/* 106D74 802E54F4 14400013 */ bnez $v0, .L802E5544
/* 106D78 802E54F8 3C04001D */ lui $a0, 0x1d
/* 106D7C 802E54FC 34840001 */ ori $a0, $a0, 1
/* 106D80 802E5500 3C05802F */ lui $a1, 0x802f
/* 106D84 802E5504 24A5B3C0 */ addiu $a1, $a1, -0x4c40
/* 106D88 802E5508 0C049640 */ jal load_string
/* 106D8C 802E550C ACA00000 */ sw $zero, ($a1)
/* 106D90 802E5510 0C009C22 */ jal func_80027088
/* 106D94 802E5514 24040001 */ addiu $a0, $zero, 1
/* 106D98 802E5518 3C03800A */ lui $v1, 0x800a
/* 106D9C 802E551C 2463A650 */ addiu $v1, $v1, -0x59b0
/* 106DA0 802E5520 8C620000 */ lw $v0, ($v1)
/* 106DA4 802E5524 34420040 */ ori $v0, $v0, 0x40
/* 106DA8 802E5528 0C03805E */ jal func_800E0178
/* 106DAC 802E552C AC620000 */ sw $v0, ($v1)
/* 106DB0 802E5530 3C04F840 */ lui $a0, 0xf840
/* 106DB4 802E5534 0C051514 */ jal set_global_flag
/* 106DB8 802E5538 34845BE0 */ ori $a0, $a0, 0x5be0
/* 106DBC 802E553C 080B9553 */ j .L802E554C
/* 106DC0 802E5540 00000000 */ nop
.L802E5544:
/* 106DC4 802E5544 0C043F5A */ jal func_8010FD68
/* 106DC8 802E5548 0200202D */ daddu $a0, $s0, $zero
.L802E554C:
/* 106DCC 802E554C 8FBF0014 */ lw $ra, 0x14($sp)
/* 106DD0 802E5550 8FB00010 */ lw $s0, 0x10($sp)
/* 106DD4 802E5554 03E00008 */ jr $ra
/* 106DD8 802E5558 27BD0018 */ addiu $sp, $sp, 0x18
/* 106DDC 802E555C 3C02802F */ lui $v0, 0x802f
/* 106DE0 802E5560 8C42B3C0 */ lw $v0, -0x4c40($v0)
/* 106DE4 802E5564 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 106DE8 802E5568 1040000C */ beqz $v0, .L802E559C
/* 106DEC 802E556C AFBF0010 */ sw $ra, 0x10($sp)
/* 106DF0 802E5570 0C043F5A */ jal func_8010FD68
/* 106DF4 802E5574 00000000 */ nop
/* 106DF8 802E5578 0C009C22 */ jal func_80027088
/* 106DFC 802E557C 0000202D */ daddu $a0, $zero, $zero
/* 106E00 802E5580 3C02800A */ lui $v0, 0x800a
/* 106E04 802E5584 2442A650 */ addiu $v0, $v0, -0x59b0
/* 106E08 802E5588 8C430000 */ lw $v1, ($v0)
/* 106E0C 802E558C 2404FFBF */ addiu $a0, $zero, -0x41
/* 106E10 802E5590 00641824 */ and $v1, $v1, $a0
/* 106E14 802E5594 0C038069 */ jal func_800E01A4
/* 106E18 802E5598 AC430000 */ sw $v1, ($v0)
.L802E559C:
/* 106E1C 802E559C 8FBF0010 */ lw $ra, 0x10($sp)
/* 106E20 802E55A0 03E00008 */ jr $ra
/* 106E24 802E55A4 27BD0018 */ addiu $sp, $sp, 0x18