mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 17:02:46 +01:00
83 lines
3.7 KiB
ArmAsm
83 lines
3.7 KiB
ArmAsm
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
|
|
glabel osPfsFreeBlocks
|
|
/* 044380 80068F80 27BDFED0 */ addiu $sp, $sp, -0x130
|
|
/* 044384 80068F84 AFB20118 */ sw $s2, 0x118($sp)
|
|
/* 044388 80068F88 00809021 */ addu $s2, $a0, $zero
|
|
/* 04438C 80068F8C AFBF0128 */ sw $ra, 0x128($sp)
|
|
/* 044390 80068F90 AFB50124 */ sw $s5, 0x124($sp)
|
|
/* 044394 80068F94 AFB40120 */ sw $s4, 0x120($sp)
|
|
/* 044398 80068F98 AFB3011C */ sw $s3, 0x11c($sp)
|
|
/* 04439C 80068F9C AFB10114 */ sw $s1, 0x114($sp)
|
|
/* 0443A0 80068FA0 AFB00110 */ sw $s0, 0x110($sp)
|
|
/* 0443A4 80068FA4 8E420000 */ lw $v0, ($s2)
|
|
/* 0443A8 80068FA8 00A0A821 */ addu $s5, $a1, $zero
|
|
/* 0443AC 80068FAC 30420001 */ andi $v0, $v0, 1
|
|
/* 0443B0 80068FB0 14400003 */ bnez $v0, .L80068FC0
|
|
/* 0443B4 80068FB4 00009821 */ addu $s3, $zero, $zero
|
|
/* 0443B8 80068FB8 0801A41A */ j .L80069068
|
|
/* 0443BC 80068FBC 24020005 */ addiu $v0, $zero, 5
|
|
|
|
.L80068FC0:
|
|
/* 0443C0 80068FC0 0C01A775 */ jal osCheckId
|
|
/* 0443C4 80068FC4 02402021 */ addu $a0, $s2, $zero
|
|
/* 0443C8 80068FC8 14400027 */ bnez $v0, .L80069068
|
|
/* 0443CC 80068FCC 00000000 */ nop
|
|
/* 0443D0 80068FD0 92420064 */ lbu $v0, 0x64($s2)
|
|
/* 0443D4 80068FD4 0262102B */ sltu $v0, $s3, $v0
|
|
/* 0443D8 80068FD8 10400020 */ beqz $v0, .L8006905C
|
|
/* 0443DC 80068FDC 00008821 */ addu $s1, $zero, $zero
|
|
/* 0443E0 80068FE0 27B40010 */ addiu $s4, $sp, 0x10
|
|
/* 0443E4 80068FE4 02402021 */ addu $a0, $s2, $zero
|
|
.L80068FE8:
|
|
/* 0443E8 80068FE8 323000FF */ andi $s0, $s1, 0xff
|
|
/* 0443EC 80068FEC 27A50010 */ addiu $a1, $sp, 0x10
|
|
/* 0443F0 80068FF0 00003021 */ addu $a2, $zero, $zero
|
|
/* 0443F4 80068FF4 0C01A7A3 */ jal osPfsRWInode
|
|
/* 0443F8 80068FF8 02003821 */ addu $a3, $s0, $zero
|
|
/* 0443FC 80068FFC 1440001A */ bnez $v0, .L80069068
|
|
/* 044400 80069000 00000000 */ nop
|
|
/* 044404 80069004 16000002 */ bnez $s0, .L80069010
|
|
/* 044408 80069008 24020001 */ addiu $v0, $zero, 1
|
|
/* 04440C 8006900C 8E420060 */ lw $v0, 0x60($s2)
|
|
.L80069010:
|
|
/* 044410 80069010 00402021 */ addu $a0, $v0, $zero
|
|
/* 044414 80069014 28820080 */ slti $v0, $a0, 0x80
|
|
/* 044418 80069018 1040000A */ beqz $v0, .L80069044
|
|
/* 04441C 8006901C 00041040 */ sll $v0, $a0, 1
|
|
/* 044420 80069020 00541821 */ addu $v1, $v0, $s4
|
|
.L80069024:
|
|
/* 044424 80069024 94620000 */ lhu $v0, ($v1)
|
|
/* 044428 80069028 24840001 */ addiu $a0, $a0, 1
|
|
/* 04442C 8006902C 38420003 */ xori $v0, $v0, 3
|
|
/* 044430 80069030 2C420001 */ sltiu $v0, $v0, 1
|
|
/* 044434 80069034 02629821 */ addu $s3, $s3, $v0
|
|
/* 044438 80069038 28820080 */ slti $v0, $a0, 0x80
|
|
/* 04443C 8006903C 1440FFF9 */ bnez $v0, .L80069024
|
|
/* 044440 80069040 24630002 */ addiu $v1, $v1, 2
|
|
.L80069044:
|
|
/* 044444 80069044 92430064 */ lbu $v1, 0x64($s2)
|
|
/* 044448 80069048 26310001 */ addiu $s1, $s1, 1
|
|
/* 04444C 8006904C 322200FF */ andi $v0, $s1, 0xff
|
|
/* 044450 80069050 0043102B */ sltu $v0, $v0, $v1
|
|
/* 044454 80069054 5440FFE4 */ bnel $v0, $zero, .L80068FE8
|
|
/* 044458 80069058 02402021 */ addu $a0, $s2, $zero
|
|
.L8006905C:
|
|
/* 04445C 8006905C 00131200 */ sll $v0, $s3, 8
|
|
/* 044460 80069060 AEA20000 */ sw $v0, ($s5)
|
|
/* 044464 80069064 00001021 */ addu $v0, $zero, $zero
|
|
.L80069068:
|
|
/* 044468 80069068 8FBF0128 */ lw $ra, 0x128($sp)
|
|
/* 04446C 8006906C 8FB50124 */ lw $s5, 0x124($sp)
|
|
/* 044470 80069070 8FB40120 */ lw $s4, 0x120($sp)
|
|
/* 044474 80069074 8FB3011C */ lw $s3, 0x11c($sp)
|
|
/* 044478 80069078 8FB20118 */ lw $s2, 0x118($sp)
|
|
/* 04447C 8006907C 8FB10114 */ lw $s1, 0x114($sp)
|
|
/* 044480 80069080 8FB00110 */ lw $s0, 0x110($sp)
|
|
/* 044484 80069084 03E00008 */ jr $ra
|
|
/* 044488 80069088 27BD0130 */ addiu $sp, $sp, 0x130
|
|
|
|
/* 04448C 8006908C 00000000 */ nop
|