mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 17:02:46 +01:00
136 lines
5.9 KiB
ArmAsm
136 lines
5.9 KiB
ArmAsm
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
|
|
glabel osPfsFindFile
|
|
/* 0441C0 80068DC0 27BDFFA0 */ addiu $sp, $sp, -0x60
|
|
/* 0441C4 80068DC4 AFB30044 */ sw $s3, 0x44($sp)
|
|
/* 0441C8 80068DC8 8FB30070 */ lw $s3, 0x70($sp)
|
|
/* 0441CC 80068DCC AFB00038 */ sw $s0, 0x38($sp)
|
|
/* 0441D0 80068DD0 00808021 */ addu $s0, $a0, $zero
|
|
/* 0441D4 80068DD4 AFBE0058 */ sw $fp, 0x58($sp)
|
|
/* 0441D8 80068DD8 00C0F021 */ addu $fp, $a2, $zero
|
|
/* 0441DC 80068DDC AFB20040 */ sw $s2, 0x40($sp)
|
|
/* 0441E0 80068DE0 00E09021 */ addu $s2, $a3, $zero
|
|
/* 0441E4 80068DE4 AFBF005C */ sw $ra, 0x5c($sp)
|
|
/* 0441E8 80068DE8 AFB70054 */ sw $s7, 0x54($sp)
|
|
/* 0441EC 80068DEC AFB60050 */ sw $s6, 0x50($sp)
|
|
/* 0441F0 80068DF0 AFB5004C */ sw $s5, 0x4c($sp)
|
|
/* 0441F4 80068DF4 AFB40048 */ sw $s4, 0x48($sp)
|
|
/* 0441F8 80068DF8 AFB1003C */ sw $s1, 0x3c($sp)
|
|
/* 0441FC 80068DFC 8E020000 */ lw $v0, ($s0)
|
|
/* 044200 80068E00 8FB40074 */ lw $s4, 0x74($sp)
|
|
/* 044204 80068E04 30420001 */ andi $v0, $v0, 1
|
|
/* 044208 80068E08 1040004E */ beqz $v0, .L80068F44
|
|
/* 04420C 80068E0C 00A0B821 */ addu $s7, $a1, $zero
|
|
/* 044210 80068E10 0C01A775 */ jal osCheckId
|
|
/* 044214 80068E14 02002021 */ addu $a0, $s0, $zero
|
|
/* 044218 80068E18 00403821 */ addu $a3, $v0, $zero
|
|
/* 04421C 80068E1C 14E0004A */ bnez $a3, .L80068F48
|
|
/* 044220 80068E20 00000000 */ nop
|
|
/* 044224 80068E24 8E020050 */ lw $v0, 0x50($s0)
|
|
/* 044228 80068E28 18400044 */ blez $v0, .L80068F3C
|
|
/* 04422C 80068E2C 00008821 */ addu $s1, $zero, $zero
|
|
/* 044230 80068E30 27B60020 */ addiu $s6, $sp, 0x20
|
|
/* 044234 80068E34 27B5001C */ addiu $s5, $sp, 0x1c
|
|
.L80068E38:
|
|
/* 044238 80068E38 8E06005C */ lw $a2, 0x5c($s0)
|
|
/* 04423C 80068E3C 8E040004 */ lw $a0, 4($s0)
|
|
/* 044240 80068E40 8E050008 */ lw $a1, 8($s0)
|
|
/* 044244 80068E44 27A70010 */ addiu $a3, $sp, 0x10
|
|
/* 044248 80068E48 00D13021 */ addu $a2, $a2, $s1
|
|
/* 04424C 80068E4C 0C01A874 */ jal osContRamRead
|
|
/* 044250 80068E50 30C6FFFF */ andi $a2, $a2, 0xffff
|
|
/* 044254 80068E54 00403821 */ addu $a3, $v0, $zero
|
|
/* 044258 80068E58 14E0003B */ bnez $a3, .L80068F48
|
|
/* 04425C 80068E5C 00E01021 */ addu $v0, $a3, $zero
|
|
/* 044260 80068E60 8E040004 */ lw $a0, 4($s0)
|
|
/* 044264 80068E64 0C01A530 */ jal osPfsGetStatus
|
|
/* 044268 80068E68 8E050008 */ lw $a1, 8($s0)
|
|
/* 04426C 80068E6C 00403821 */ addu $a3, $v0, $zero
|
|
/* 044270 80068E70 14E00027 */ bnez $a3, .L80068F10
|
|
/* 044274 80068E74 32E2FFFF */ andi $v0, $s7, 0xffff
|
|
/* 044278 80068E78 97A30014 */ lhu $v1, 0x14($sp)
|
|
/* 04427C 80068E7C 1462002A */ bne $v1, $v0, .L80068F28
|
|
/* 044280 80068E80 00000000 */ nop
|
|
/* 044284 80068E84 8FA20010 */ lw $v0, 0x10($sp)
|
|
/* 044288 80068E88 145E0027 */ bne $v0, $fp, .L80068F28
|
|
/* 04428C 80068E8C 00000000 */ nop
|
|
/* 044290 80068E90 1240000C */ beqz $s2, .L80068EC4
|
|
/* 044294 80068E94 00004021 */ addu $t0, $zero, $zero
|
|
/* 044298 80068E98 00002021 */ addu $a0, $zero, $zero
|
|
/* 04429C 80068E9C 02403021 */ addu $a2, $s2, $zero
|
|
/* 0442A0 80068EA0 02C02821 */ addu $a1, $s6, $zero
|
|
.L80068EA4:
|
|
/* 0442A4 80068EA4 90A30000 */ lbu $v1, ($a1)
|
|
/* 0442A8 80068EA8 90C20000 */ lbu $v0, ($a2)
|
|
/* 0442AC 80068EAC 1462001C */ bne $v1, $v0, .L80068F20
|
|
/* 0442B0 80068EB0 24C60001 */ addiu $a2, $a2, 1
|
|
/* 0442B4 80068EB4 24840001 */ addiu $a0, $a0, 1
|
|
/* 0442B8 80068EB8 28820010 */ slti $v0, $a0, 0x10
|
|
/* 0442BC 80068EBC 1440FFF9 */ bnez $v0, .L80068EA4
|
|
/* 0442C0 80068EC0 24A50001 */ addiu $a1, $a1, 1
|
|
.L80068EC4:
|
|
/* 0442C4 80068EC4 0013102B */ sltu $v0, $zero, $s3
|
|
/* 0442C8 80068EC8 2D030001 */ sltiu $v1, $t0, 1
|
|
/* 0442CC 80068ECC 00431024 */ and $v0, $v0, $v1
|
|
/* 0442D0 80068ED0 1040000C */ beqz $v0, .L80068F04
|
|
/* 0442D4 80068ED4 00000000 */ nop
|
|
/* 0442D8 80068ED8 00002021 */ addu $a0, $zero, $zero
|
|
/* 0442DC 80068EDC 02603021 */ addu $a2, $s3, $zero
|
|
/* 0442E0 80068EE0 02A02821 */ addu $a1, $s5, $zero
|
|
.L80068EE4:
|
|
/* 0442E4 80068EE4 90A30000 */ lbu $v1, ($a1)
|
|
/* 0442E8 80068EE8 90C20000 */ lbu $v0, ($a2)
|
|
/* 0442EC 80068EEC 1462000A */ bne $v1, $v0, .L80068F18
|
|
/* 0442F0 80068EF0 24C60001 */ addiu $a2, $a2, 1
|
|
/* 0442F4 80068EF4 24840001 */ addiu $a0, $a0, 1
|
|
/* 0442F8 80068EF8 28820004 */ slti $v0, $a0, 4
|
|
/* 0442FC 80068EFC 1440FFF9 */ bnez $v0, .L80068EE4
|
|
/* 044300 80068F00 24A50001 */ addiu $a1, $a1, 1
|
|
.L80068F04:
|
|
/* 044304 80068F04 15000008 */ bnez $t0, .L80068F28
|
|
/* 044308 80068F08 00000000 */ nop
|
|
/* 04430C 80068F0C AE910000 */ sw $s1, ($s4)
|
|
.L80068F10:
|
|
/* 044310 80068F10 0801A3D2 */ j .L80068F48
|
|
/* 044314 80068F14 00E01021 */ addu $v0, $a3, $zero
|
|
|
|
.L80068F18:
|
|
/* 044318 80068F18 0801A3C1 */ j .L80068F04
|
|
/* 04431C 80068F1C 24080001 */ addiu $t0, $zero, 1
|
|
|
|
.L80068F20:
|
|
/* 044320 80068F20 0801A3B1 */ j .L80068EC4
|
|
/* 044324 80068F24 24080001 */ addiu $t0, $zero, 1
|
|
|
|
.L80068F28:
|
|
/* 044328 80068F28 8E020050 */ lw $v0, 0x50($s0)
|
|
/* 04432C 80068F2C 26310001 */ addiu $s1, $s1, 1
|
|
/* 044330 80068F30 0222102A */ slt $v0, $s1, $v0
|
|
/* 044334 80068F34 1440FFC0 */ bnez $v0, .L80068E38
|
|
/* 044338 80068F38 00000000 */ nop
|
|
.L80068F3C:
|
|
/* 04433C 80068F3C 2402FFFF */ addiu $v0, $zero, -1
|
|
/* 044340 80068F40 AE820000 */ sw $v0, ($s4)
|
|
.L80068F44:
|
|
/* 044344 80068F44 24020005 */ addiu $v0, $zero, 5
|
|
.L80068F48:
|
|
/* 044348 80068F48 8FBF005C */ lw $ra, 0x5c($sp)
|
|
/* 04434C 80068F4C 8FBE0058 */ lw $fp, 0x58($sp)
|
|
/* 044350 80068F50 8FB70054 */ lw $s7, 0x54($sp)
|
|
/* 044354 80068F54 8FB60050 */ lw $s6, 0x50($sp)
|
|
/* 044358 80068F58 8FB5004C */ lw $s5, 0x4c($sp)
|
|
/* 04435C 80068F5C 8FB40048 */ lw $s4, 0x48($sp)
|
|
/* 044360 80068F60 8FB30044 */ lw $s3, 0x44($sp)
|
|
/* 044364 80068F64 8FB20040 */ lw $s2, 0x40($sp)
|
|
/* 044368 80068F68 8FB1003C */ lw $s1, 0x3c($sp)
|
|
/* 04436C 80068F6C 8FB00038 */ lw $s0, 0x38($sp)
|
|
/* 044370 80068F70 03E00008 */ jr $ra
|
|
/* 044374 80068F74 27BD0060 */ addiu $sp, $sp, 0x60
|
|
|
|
/* 044378 80068F78 00000000 */ nop
|
|
/* 04437C 80068F7C 00000000 */ nop
|
|
|
|
|