papermario/asm/nonmatchings/code_EB8E90/func_80240198_EB8FE8.s
2021-01-13 00:42:27 +09:00

184 lines
9.3 KiB
ArmAsm
Generated

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80240198_EB8FE8
/* EB8FE8 80240198 27BDFFA8 */ addiu $sp, $sp, -0x58
/* EB8FEC 8024019C AFB20038 */ sw $s2, 0x38($sp)
/* EB8FF0 802401A0 0080902D */ daddu $s2, $a0, $zero
/* EB8FF4 802401A4 AFBF0044 */ sw $ra, 0x44($sp)
/* EB8FF8 802401A8 AFB40040 */ sw $s4, 0x40($sp)
/* EB8FFC 802401AC AFB3003C */ sw $s3, 0x3c($sp)
/* EB9000 802401B0 AFB10034 */ sw $s1, 0x34($sp)
/* EB9004 802401B4 AFB00030 */ sw $s0, 0x30($sp)
/* EB9008 802401B8 F7B60050 */ sdc1 $f22, 0x50($sp)
/* EB900C 802401BC F7B40048 */ sdc1 $f20, 0x48($sp)
/* EB9010 802401C0 8E510148 */ lw $s1, 0x148($s2)
/* EB9014 802401C4 00A0982D */ daddu $s3, $a1, $zero
/* EB9018 802401C8 86240008 */ lh $a0, 8($s1)
/* EB901C 802401CC 0C00F92F */ jal func_8003E4BC
/* EB9020 802401D0 00C0A02D */ daddu $s4, $a2, $zero
/* EB9024 802401D4 8E630014 */ lw $v1, 0x14($s3)
/* EB9028 802401D8 04600030 */ bltz $v1, .L8024029C
/* EB902C 802401DC 0040802D */ daddu $s0, $v0, $zero
/* EB9030 802401E0 8E420074 */ lw $v0, 0x74($s2)
/* EB9034 802401E4 1C40002C */ bgtz $v0, .L80240298
/* EB9038 802401E8 2442FFFF */ addiu $v0, $v0, -1
/* EB903C 802401EC 0280202D */ daddu $a0, $s4, $zero
/* EB9040 802401F0 AE430074 */ sw $v1, 0x74($s2)
/* EB9044 802401F4 AFA00010 */ sw $zero, 0x10($sp)
/* EB9048 802401F8 8E66000C */ lw $a2, 0xc($s3)
/* EB904C 802401FC 8E670010 */ lw $a3, 0x10($s3)
/* EB9050 80240200 0C013469 */ jal func_8004D1A4
/* EB9054 80240204 0220282D */ daddu $a1, $s1, $zero
/* EB9058 80240208 10400021 */ beqz $v0, .L80240290
/* EB905C 8024020C 0000202D */ daddu $a0, $zero, $zero
/* EB9060 80240210 0200282D */ daddu $a1, $s0, $zero
/* EB9064 80240214 0000302D */ daddu $a2, $zero, $zero
/* EB9068 80240218 860300A8 */ lh $v1, 0xa8($s0)
/* EB906C 8024021C 3C013F80 */ lui $at, 0x3f80
/* EB9070 80240220 44810000 */ mtc1 $at, $f0
/* EB9074 80240224 3C014000 */ lui $at, 0x4000
/* EB9078 80240228 44811000 */ mtc1 $at, $f2
/* EB907C 8024022C 3C01C1A0 */ lui $at, 0xc1a0
/* EB9080 80240230 44812000 */ mtc1 $at, $f4
/* EB9084 80240234 2402000F */ addiu $v0, $zero, 0xf
/* EB9088 80240238 AFA2001C */ sw $v0, 0x1c($sp)
/* EB908C 8024023C 44833000 */ mtc1 $v1, $f6
/* EB9090 80240240 00000000 */ nop
/* EB9094 80240244 468031A0 */ cvt.s.w $f6, $f6
/* EB9098 80240248 44073000 */ mfc1 $a3, $f6
/* EB909C 8024024C 27A20028 */ addiu $v0, $sp, 0x28
/* EB90A0 80240250 AFA20020 */ sw $v0, 0x20($sp)
/* EB90A4 80240254 E7A00010 */ swc1 $f0, 0x10($sp)
/* EB90A8 80240258 E7A20014 */ swc1 $f2, 0x14($sp)
/* EB90AC 8024025C 0C01D444 */ jal func_80075110
/* EB90B0 80240260 E7A40018 */ swc1 $f4, 0x18($sp)
/* EB90B4 80240264 0200202D */ daddu $a0, $s0, $zero
/* EB90B8 80240268 240502F4 */ addiu $a1, $zero, 0x2f4
/* EB90BC 8024026C 0C013600 */ jal func_8004D800
/* EB90C0 80240270 3C060020 */ lui $a2, 0x20
/* EB90C4 80240274 8E220018 */ lw $v0, 0x18($s1)
/* EB90C8 80240278 9442002A */ lhu $v0, 0x2a($v0)
/* EB90CC 8024027C 30420001 */ andi $v0, $v0, 1
/* EB90D0 80240280 14400064 */ bnez $v0, .L80240414
/* EB90D4 80240284 2402000A */ addiu $v0, $zero, 0xa
/* EB90D8 80240288 08090105 */ j .L80240414
/* EB90DC 8024028C 2402000C */ addiu $v0, $zero, 0xc
.L80240290:
/* EB90E0 80240290 8E420074 */ lw $v0, 0x74($s2)
/* EB90E4 80240294 2442FFFF */ addiu $v0, $v0, -1
.L80240298:
/* EB90E8 80240298 AE420074 */ sw $v0, 0x74($s2)
.L8024029C:
/* EB90EC 8024029C 8602008C */ lh $v0, 0x8c($s0)
/* EB90F0 802402A0 1440005D */ bnez $v0, .L80240418
/* EB90F4 802402A4 00000000 */ nop
/* EB90F8 802402A8 C6000018 */ lwc1 $f0, 0x18($s0)
/* EB90FC 802402AC 3C014010 */ lui $at, 0x4010
/* EB9100 802402B0 44811800 */ mtc1 $at, $f3
/* EB9104 802402B4 44801000 */ mtc1 $zero, $f2
/* EB9108 802402B8 46000021 */ cvt.d.s $f0, $f0
/* EB910C 802402BC 4622003C */ c.lt.d $f0, $f2
/* EB9110 802402C0 00000000 */ nop
/* EB9114 802402C4 45000003 */ bc1f .L802402D4
/* EB9118 802402C8 0200202D */ daddu $a0, $s0, $zero
/* EB911C 802402CC 080900B6 */ j .L802402D8
/* EB9120 802402D0 0000282D */ daddu $a1, $zero, $zero
.L802402D4:
/* EB9124 802402D4 24050001 */ addiu $a1, $zero, 1
.L802402D8:
/* EB9128 802402D8 0C010420 */ jal func_80041080
/* EB912C 802402DC 00000000 */ nop
/* EB9130 802402E0 C60C0038 */ lwc1 $f12, 0x38($s0)
/* EB9134 802402E4 8E430078 */ lw $v1, 0x78($s2)
/* EB9138 802402E8 C60E0040 */ lwc1 $f14, 0x40($s0)
/* EB913C 802402EC 00031040 */ sll $v0, $v1, 1
/* EB9140 802402F0 00431021 */ addu $v0, $v0, $v1
/* EB9144 802402F4 8E2300D0 */ lw $v1, 0xd0($s1)
/* EB9148 802402F8 00021080 */ sll $v0, $v0, 2
/* EB914C 802402FC 00431021 */ addu $v0, $v0, $v1
/* EB9150 80240300 C4560004 */ lwc1 $f22, 4($v0)
/* EB9154 80240304 4680B5A0 */ cvt.s.w $f22, $f22
/* EB9158 80240308 C454000C */ lwc1 $f20, 0xc($v0)
/* EB915C 8024030C 4680A520 */ cvt.s.w $f20, $f20
/* EB9160 80240310 4406B000 */ mfc1 $a2, $f22
/* EB9164 80240314 4407A000 */ mfc1 $a3, $f20
/* EB9168 80240318 0C00ABDC */ jal fio_validate_header_checksums
/* EB916C 8024031C 00000000 */ nop
/* EB9170 80240320 8E050018 */ lw $a1, 0x18($s0)
/* EB9174 80240324 44060000 */ mfc1 $a2, $f0
/* EB9178 80240328 0200202D */ daddu $a0, $s0, $zero
/* EB917C 8024032C 0C00F909 */ jal func_8003E424
/* EB9180 80240330 AE06000C */ sw $a2, 0xc($s0)
/* EB9184 80240334 C60C0038 */ lwc1 $f12, 0x38($s0)
/* EB9188 80240338 C60E0040 */ lwc1 $f14, 0x40($s0)
/* EB918C 8024033C 4406B000 */ mfc1 $a2, $f22
/* EB9190 80240340 4407A000 */ mfc1 $a3, $f20
/* EB9194 80240344 0C00AC71 */ jal func_8002B1C4
/* EB9198 80240348 00000000 */ nop
/* EB919C 8024034C C6020018 */ lwc1 $f2, 0x18($s0)
/* EB91A0 80240350 4602003E */ c.le.s $f0, $f2
/* EB91A4 80240354 00000000 */ nop
/* EB91A8 80240358 4500002F */ bc1f .L80240418
/* EB91AC 8024035C 240403E8 */ addiu $a0, $zero, 0x3e8
/* EB91B0 80240360 24020002 */ addiu $v0, $zero, 2
/* EB91B4 80240364 0C00AB3B */ jal func_8002ACEC
/* EB91B8 80240368 AE420070 */ sw $v0, 0x70($s2)
/* EB91BC 8024036C 3C035555 */ lui $v1, 0x5555
/* EB91C0 80240370 34635556 */ ori $v1, $v1, 0x5556
/* EB91C4 80240374 00430018 */ mult $v0, $v1
/* EB91C8 80240378 000227C3 */ sra $a0, $v0, 0x1f
/* EB91CC 8024037C 00004010 */ mfhi $t0
/* EB91D0 80240380 01042023 */ subu $a0, $t0, $a0
/* EB91D4 80240384 00041840 */ sll $v1, $a0, 1
/* EB91D8 80240388 00641821 */ addu $v1, $v1, $a0
/* EB91DC 8024038C 00431023 */ subu $v0, $v0, $v1
/* EB91E0 80240390 24430002 */ addiu $v1, $v0, 2
/* EB91E4 80240394 AE430074 */ sw $v1, 0x74($s2)
/* EB91E8 80240398 8E62002C */ lw $v0, 0x2c($s3)
/* EB91EC 8024039C 18400009 */ blez $v0, .L802403C4
/* EB91F0 802403A0 24020004 */ addiu $v0, $zero, 4
/* EB91F4 802403A4 8E620004 */ lw $v0, 4($s3)
/* EB91F8 802403A8 18400006 */ blez $v0, .L802403C4
/* EB91FC 802403AC 24020004 */ addiu $v0, $zero, 4
/* EB9200 802403B0 8E620008 */ lw $v0, 8($s3)
/* EB9204 802403B4 18400003 */ blez $v0, .L802403C4
/* EB9208 802403B8 24020004 */ addiu $v0, $zero, 4
/* EB920C 802403BC 14600002 */ bnez $v1, .L802403C8
/* EB9210 802403C0 00000000 */ nop
.L802403C4:
/* EB9214 802403C4 AE420070 */ sw $v0, 0x70($s2)
.L802403C8:
/* EB9218 802403C8 0C00AB3B */ jal func_8002ACEC
/* EB921C 802403CC 24042710 */ addiu $a0, $zero, 0x2710
/* EB9220 802403D0 3C0351EB */ lui $v1, 0x51eb
/* EB9224 802403D4 3463851F */ ori $v1, $v1, 0x851f
/* EB9228 802403D8 00430018 */ mult $v0, $v1
/* EB922C 802403DC 00021FC3 */ sra $v1, $v0, 0x1f
/* EB9230 802403E0 00004010 */ mfhi $t0
/* EB9234 802403E4 00082143 */ sra $a0, $t0, 5
/* EB9238 802403E8 00832023 */ subu $a0, $a0, $v1
/* EB923C 802403EC 00041840 */ sll $v1, $a0, 1
/* EB9240 802403F0 00641821 */ addu $v1, $v1, $a0
/* EB9244 802403F4 000318C0 */ sll $v1, $v1, 3
/* EB9248 802403F8 00641821 */ addu $v1, $v1, $a0
/* EB924C 802403FC 00031880 */ sll $v1, $v1, 2
/* EB9250 80240400 8E640004 */ lw $a0, 4($s3)
/* EB9254 80240404 00431023 */ subu $v0, $v0, $v1
/* EB9258 80240408 0044102A */ slt $v0, $v0, $a0
/* EB925C 8024040C 10400002 */ beqz $v0, .L80240418
/* EB9260 80240410 24020004 */ addiu $v0, $zero, 4
.L80240414:
/* EB9264 80240414 AE420070 */ sw $v0, 0x70($s2)
.L80240418:
/* EB9268 80240418 8FBF0044 */ lw $ra, 0x44($sp)
/* EB926C 8024041C 8FB40040 */ lw $s4, 0x40($sp)
/* EB9270 80240420 8FB3003C */ lw $s3, 0x3c($sp)
/* EB9274 80240424 8FB20038 */ lw $s2, 0x38($sp)
/* EB9278 80240428 8FB10034 */ lw $s1, 0x34($sp)
/* EB927C 8024042C 8FB00030 */ lw $s0, 0x30($sp)
/* EB9280 80240430 D7B60050 */ ldc1 $f22, 0x50($sp)
/* EB9284 80240434 D7B40048 */ ldc1 $f20, 0x48($sp)
/* EB9288 80240438 03E00008 */ jr $ra
/* EB928C 8024043C 27BD0058 */ addiu $sp, $sp, 0x58