mirror of
https://github.com/pmret/papermario.git
synced 2024-11-10 13:02:41 +01:00
75 lines
3.6 KiB
ArmAsm
75 lines
3.6 KiB
ArmAsm
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
glabel osPfsNumFiles
|
|
/* 44490 80069090 27BDFFB0 */ addiu $sp, $sp, -0x50
|
|
/* 44494 80069094 AFB00038 */ sw $s0, 0x38($sp)
|
|
/* 44498 80069098 00808021 */ addu $s0, $a0, $zero
|
|
/* 4449C 8006909C AFB40048 */ sw $s4, 0x48($sp)
|
|
/* 444A0 800690A0 00A0A021 */ addu $s4, $a1, $zero
|
|
/* 444A4 800690A4 AFBF004C */ sw $ra, 0x4c($sp)
|
|
/* 444A8 800690A8 AFB30044 */ sw $s3, 0x44($sp)
|
|
/* 444AC 800690AC AFB20040 */ sw $s2, 0x40($sp)
|
|
/* 444B0 800690B0 AFB1003C */ sw $s1, 0x3c($sp)
|
|
/* 444B4 800690B4 8E020000 */ lw $v0, ($s0)
|
|
/* 444B8 800690B8 00C09821 */ addu $s3, $a2, $zero
|
|
/* 444BC 800690BC 30420001 */ andi $v0, $v0, 1
|
|
/* 444C0 800690C0 14400003 */ bnez $v0, .L800690D0
|
|
/* 444C4 800690C4 00009021 */ addu $s2, $zero, $zero
|
|
/* 444C8 800690C8 0801A45C */ j .L80069170
|
|
/* 444CC 800690CC 24020005 */ addiu $v0, $zero, 5
|
|
.L800690D0:
|
|
/* 444D0 800690D0 0C01A775 */ jal osCheckId
|
|
/* 444D4 800690D4 02002021 */ addu $a0, $s0, $zero
|
|
/* 444D8 800690D8 14400025 */ bnez $v0, .L80069170
|
|
/* 444DC 800690DC 00000000 */ nop
|
|
/* 444E0 800690E0 92020065 */ lbu $v0, 0x65($s0)
|
|
/* 444E4 800690E4 10400005 */ beqz $v0, .L800690FC
|
|
/* 444E8 800690E8 02002021 */ addu $a0, $s0, $zero
|
|
/* 444EC 800690EC 0C01A5B4 */ jal osPfsSelectBank
|
|
/* 444F0 800690F0 00002821 */ addu $a1, $zero, $zero
|
|
/* 444F4 800690F4 1440001E */ bnez $v0, .L80069170
|
|
/* 444F8 800690F8 00000000 */ nop
|
|
.L800690FC:
|
|
/* 444FC 800690FC 8E020050 */ lw $v0, 0x50($s0)
|
|
/* 44500 80069100 18400015 */ blez $v0, .L80069158
|
|
/* 44504 80069104 00008821 */ addu $s1, $zero, $zero
|
|
.L80069108:
|
|
/* 44508 80069108 8E06005C */ lw $a2, 0x5c($s0)
|
|
/* 4450C 8006910C 8E040004 */ lw $a0, 4($s0)
|
|
/* 44510 80069110 8E050008 */ lw $a1, 8($s0)
|
|
/* 44514 80069114 27A70010 */ addiu $a3, $sp, 0x10
|
|
/* 44518 80069118 00D13021 */ addu $a2, $a2, $s1
|
|
/* 4451C 8006911C 0C01A874 */ jal osContRamRead
|
|
/* 44520 80069120 30C6FFFF */ andi $a2, $a2, 0xffff
|
|
/* 44524 80069124 14400012 */ bnez $v0, .L80069170
|
|
/* 44528 80069128 00000000 */ nop
|
|
/* 4452C 8006912C 97A20014 */ lhu $v0, 0x14($sp)
|
|
/* 44530 80069130 10400004 */ beqz $v0, .L80069144
|
|
/* 44534 80069134 00000000 */ nop
|
|
/* 44538 80069138 8FA20010 */ lw $v0, 0x10($sp)
|
|
/* 4453C 8006913C 0002102B */ sltu $v0, $zero, $v0
|
|
/* 44540 80069140 02429021 */ addu $s2, $s2, $v0
|
|
.L80069144:
|
|
/* 44544 80069144 8E020050 */ lw $v0, 0x50($s0)
|
|
/* 44548 80069148 26310001 */ addiu $s1, $s1, 1
|
|
/* 4454C 8006914C 0222102A */ slt $v0, $s1, $v0
|
|
/* 44550 80069150 1440FFED */ bnez $v0, .L80069108
|
|
/* 44554 80069154 00000000 */ nop
|
|
.L80069158:
|
|
/* 44558 80069158 AE720000 */ sw $s2, ($s3)
|
|
/* 4455C 8006915C 8E020050 */ lw $v0, 0x50($s0)
|
|
/* 44560 80069160 AE820000 */ sw $v0, ($s4)
|
|
/* 44564 80069164 8E040004 */ lw $a0, 4($s0)
|
|
/* 44568 80069168 0C01A530 */ jal osPfsGetStatus
|
|
/* 4456C 8006916C 8E050008 */ lw $a1, 8($s0)
|
|
.L80069170:
|
|
/* 44570 80069170 8FBF004C */ lw $ra, 0x4c($sp)
|
|
/* 44574 80069174 8FB40048 */ lw $s4, 0x48($sp)
|
|
/* 44578 80069178 8FB30044 */ lw $s3, 0x44($sp)
|
|
/* 4457C 8006917C 8FB20040 */ lw $s2, 0x40($sp)
|
|
/* 44580 80069180 8FB1003C */ lw $s1, 0x3c($sp)
|
|
/* 44584 80069184 8FB00038 */ lw $s0, 0x38($sp)
|
|
/* 44588 80069188 03E00008 */ jr $ra
|
|
/* 4458C 8006918C 27BD0050 */ addiu $sp, $sp, 0x50
|