papermario/ver/jp/asm/nonmatchings/31300/func_80057688.s

109 lines
5.6 KiB
ArmAsm
Raw Normal View History

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80057688
/* 32A88 80057688 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 32A8C 8005768C AFB20018 */ sw $s2, 0x18($sp)
/* 32A90 80057690 00A0902D */ daddu $s2, $a1, $zero
/* 32A94 80057694 308400FF */ andi $a0, $a0, 0xff
/* 32A98 80057698 00041140 */ sll $v0, $a0, 5
/* 32A9C 8005769C 3C038008 */ lui $v1, %hi(D_80078E24)
/* 32AA0 800576A0 8C638E24 */ lw $v1, %lo(D_80078E24)($v1)
/* 32AA4 800576A4 00441023 */ subu $v0, $v0, $a0
/* 32AA8 800576A8 AFBF001C */ sw $ra, 0x1c($sp)
/* 32AAC 800576AC AFB10014 */ sw $s1, 0x14($sp)
/* 32AB0 800576B0 AFB00010 */ sw $s0, 0x10($sp)
/* 32AB4 800576B4 8C63001C */ lw $v1, 0x1c($v1)
/* 32AB8 800576B8 00021080 */ sll $v0, $v0, 2
/* 32ABC 800576BC 00628021 */ addu $s0, $v1, $v0
/* 32AC0 800576C0 8E050064 */ lw $a1, 0x64($s0)
/* 32AC4 800576C4 8E030068 */ lw $v1, 0x68($s0)
/* 32AC8 800576C8 00A3102A */ slt $v0, $a1, $v1
/* 32ACC 800576CC 14400029 */ bnez $v0, .L80057774
/* 32AD0 800576D0 26110048 */ addiu $s1, $s0, 0x48
/* 32AD4 800576D4 3C028008 */ lui $v0, %hi(D_80078151)
/* 32AD8 800576D8 24428151 */ addiu $v0, $v0, %lo(D_80078151)
/* 32ADC 800576DC 90420000 */ lbu $v0, ($v0)
/* 32AE0 800576E0 1440000E */ bnez $v0, .L8005771C
/* 32AE4 800576E4 AE030064 */ sw $v1, 0x64($s0)
/* 32AE8 800576E8 3C048008 */ lui $a0, %hi(D_80078E30)
/* 32AEC 800576EC 24848E30 */ addiu $a0, $a0, %lo(D_80078E30)
/* 32AF0 800576F0 8603004E */ lh $v1, 0x4e($s0)
/* 32AF4 800576F4 84820080 */ lh $v0, 0x80($a0)
/* 32AF8 800576F8 00620018 */ mult $v1, $v0
/* 32AFC 800576FC 00004012 */ mflo $t0
/* 32B00 80057700 000813C3 */ sra $v0, $t0, 0xf
/* 32B04 80057704 A6020050 */ sh $v0, 0x50($s0)
/* 32B08 80057708 84820080 */ lh $v0, 0x80($a0)
/* 32B0C 8005770C 00620018 */ mult $v1, $v0
/* 32B10 80057710 00004012 */ mflo $t0
/* 32B14 80057714 08015DE7 */ j .L8005779C
/* 32B18 80057718 000813C3 */ sra $v0, $t0, 0xf
.L8005771C:
/* 32B1C 8005771C 8602004C */ lh $v0, 0x4c($s0)
/* 32B20 80057720 8603004E */ lh $v1, 0x4e($s0)
/* 32B24 80057724 00021040 */ sll $v0, $v0, 1
/* 32B28 80057728 3C018008 */ lui $at, %hi(D_80078E30)
/* 32B2C 8005772C 00220821 */ addu $at, $at, $v0
/* 32B30 80057730 84228E30 */ lh $v0, %lo(D_80078E30)($at)
/* 32B34 80057734 00620018 */ mult $v1, $v0
/* 32B38 80057738 8603004C */ lh $v1, 0x4c($s0)
/* 32B3C 8005773C 00004012 */ mflo $t0
/* 32B40 80057740 000813C3 */ sra $v0, $t0, 0xf
/* 32B44 80057744 A6020050 */ sh $v0, 0x50($s0)
/* 32B48 80057748 2402007F */ addiu $v0, $zero, 0x7f
/* 32B4C 8005774C 00431023 */ subu $v0, $v0, $v1
/* 32B50 80057750 00021040 */ sll $v0, $v0, 1
/* 32B54 80057754 8603004E */ lh $v1, 0x4e($s0)
/* 32B58 80057758 3C018008 */ lui $at, %hi(D_80078E30)
/* 32B5C 8005775C 00220821 */ addu $at, $at, $v0
/* 32B60 80057760 84228E30 */ lh $v0, %lo(D_80078E30)($at)
/* 32B64 80057764 00620018 */ mult $v1, $v0
/* 32B68 80057768 00004012 */ mflo $t0
/* 32B6C 8005776C 08015DE7 */ j .L8005779C
/* 32B70 80057770 000813C3 */ sra $v0, $t0, 0xf
.L80057774:
/* 32B74 80057774 86040050 */ lh $a0, 0x50($s0)
/* 32B78 80057778 8606005A */ lh $a2, 0x5a($s0)
/* 32B7C 8005777C 0C015F2D */ jal func_80057CB4
/* 32B80 80057780 96070058 */ lhu $a3, 0x58($s0)
/* 32B84 80057784 86040052 */ lh $a0, 0x52($s0)
/* 32B88 80057788 8E050064 */ lw $a1, 0x64($s0)
/* 32B8C 8005778C 86060060 */ lh $a2, 0x60($s0)
/* 32B90 80057790 9607005E */ lhu $a3, 0x5e($s0)
/* 32B94 80057794 0C015F2D */ jal func_80057CB4
/* 32B98 80057798 A6020050 */ sh $v0, 0x50($s0)
.L8005779C:
/* 32B9C 8005779C A6020052 */ sh $v0, 0x52($s0)
/* 32BA0 800577A0 86220008 */ lh $v0, 8($s1)
/* 32BA4 800577A4 14400002 */ bnez $v0, .L800577B0
/* 32BA8 800577A8 24020001 */ addiu $v0, $zero, 1
/* 32BAC 800577AC A6220008 */ sh $v0, 8($s1)
.L800577B0:
/* 32BB0 800577B0 8622000A */ lh $v0, 0xa($s1)
/* 32BB4 800577B4 14400003 */ bnez $v0, .L800577C4
/* 32BB8 800577B8 324300FF */ andi $v1, $s2, 0xff
/* 32BBC 800577BC 24020001 */ addiu $v0, $zero, 1
/* 32BC0 800577C0 A622000A */ sh $v0, 0xa($s1)
.L800577C4:
/* 32BC4 800577C4 00031040 */ sll $v0, $v1, 1
/* 32BC8 800577C8 3C018008 */ lui $at, %hi(D_80078E30)
/* 32BCC 800577CC 00220821 */ addu $at, $at, $v0
/* 32BD0 800577D0 94228E30 */ lhu $v0, %lo(D_80078E30)($at)
/* 32BD4 800577D4 A622000C */ sh $v0, 0xc($s1)
/* 32BD8 800577D8 2402007F */ addiu $v0, $zero, 0x7f
/* 32BDC 800577DC 00431023 */ subu $v0, $v0, $v1
/* 32BE0 800577E0 00021040 */ sll $v0, $v0, 1
/* 32BE4 800577E4 3C038008 */ lui $v1, %hi(D_80078E30)
/* 32BE8 800577E8 00621821 */ addu $v1, $v1, $v0
/* 32BEC 800577EC 94638E30 */ lhu $v1, %lo(D_80078E30)($v1)
/* 32BF0 800577F0 24020001 */ addiu $v0, $zero, 1
/* 32BF4 800577F4 AE220024 */ sw $v0, 0x24($s1)
/* 32BF8 800577F8 A623000E */ sh $v1, 0xe($s1)
/* 32BFC 800577FC 8FBF001C */ lw $ra, 0x1c($sp)
/* 32C00 80057800 8FB20018 */ lw $s2, 0x18($sp)
/* 32C04 80057804 8FB10014 */ lw $s1, 0x14($sp)
/* 32C08 80057808 8FB00010 */ lw $s0, 0x10($sp)
/* 32C0C 8005780C 03E00008 */ jr $ra
/* 32C10 80057810 27BD0020 */ addiu $sp, $sp, 0x20