papermario/asm/nonmatchings/os/code_44380_len_4e0/osPfsFreeBlocks.s
2020-09-23 23:16:13 -04:00

80 lines
3.9 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel osPfsFreeBlocks
/* 44380 80068F80 27BDFED0 */ addiu $sp, $sp, -0x130
/* 44384 80068F84 AFB20118 */ sw $s2, 0x118($sp)
/* 44388 80068F88 00809021 */ addu $s2, $a0, $zero
/* 4438C 80068F8C AFBF0128 */ sw $ra, 0x128($sp)
/* 44390 80068F90 AFB50124 */ sw $s5, 0x124($sp)
/* 44394 80068F94 AFB40120 */ sw $s4, 0x120($sp)
/* 44398 80068F98 AFB3011C */ sw $s3, 0x11c($sp)
/* 4439C 80068F9C AFB10114 */ sw $s1, 0x114($sp)
/* 443A0 80068FA0 AFB00110 */ sw $s0, 0x110($sp)
/* 443A4 80068FA4 8E420000 */ lw $v0, ($s2)
/* 443A8 80068FA8 00A0A821 */ addu $s5, $a1, $zero
/* 443AC 80068FAC 30420001 */ andi $v0, $v0, 1
/* 443B0 80068FB0 14400003 */ bnez $v0, .L80068FC0
/* 443B4 80068FB4 00009821 */ addu $s3, $zero, $zero
/* 443B8 80068FB8 0801A41A */ j .L80069068
/* 443BC 80068FBC 24020005 */ addiu $v0, $zero, 5
.L80068FC0:
/* 443C0 80068FC0 0C01A775 */ jal osCheckId
/* 443C4 80068FC4 02402021 */ addu $a0, $s2, $zero
/* 443C8 80068FC8 14400027 */ bnez $v0, .L80069068
/* 443CC 80068FCC 00000000 */ nop
/* 443D0 80068FD0 92420064 */ lbu $v0, 0x64($s2)
/* 443D4 80068FD4 0262102B */ sltu $v0, $s3, $v0
/* 443D8 80068FD8 10400020 */ beqz $v0, .L8006905C
/* 443DC 80068FDC 00008821 */ addu $s1, $zero, $zero
/* 443E0 80068FE0 27B40010 */ addiu $s4, $sp, 0x10
/* 443E4 80068FE4 02402021 */ addu $a0, $s2, $zero
.L80068FE8:
/* 443E8 80068FE8 323000FF */ andi $s0, $s1, 0xff
/* 443EC 80068FEC 27A50010 */ addiu $a1, $sp, 0x10
/* 443F0 80068FF0 00003021 */ addu $a2, $zero, $zero
/* 443F4 80068FF4 0C01A7A3 */ jal osPfsRWInode
/* 443F8 80068FF8 02003821 */ addu $a3, $s0, $zero
/* 443FC 80068FFC 1440001A */ bnez $v0, .L80069068
/* 44400 80069000 00000000 */ nop
/* 44404 80069004 16000002 */ bnez $s0, .L80069010
/* 44408 80069008 24020001 */ addiu $v0, $zero, 1
/* 4440C 8006900C 8E420060 */ lw $v0, 0x60($s2)
.L80069010:
/* 44410 80069010 00402021 */ addu $a0, $v0, $zero
/* 44414 80069014 28820080 */ slti $v0, $a0, 0x80
/* 44418 80069018 1040000A */ beqz $v0, .L80069044
/* 4441C 8006901C 00041040 */ sll $v0, $a0, 1
/* 44420 80069020 00541821 */ addu $v1, $v0, $s4
.L80069024:
/* 44424 80069024 94620000 */ lhu $v0, ($v1)
/* 44428 80069028 24840001 */ addiu $a0, $a0, 1
/* 4442C 8006902C 38420003 */ xori $v0, $v0, 3
/* 44430 80069030 2C420001 */ sltiu $v0, $v0, 1
/* 44434 80069034 02629821 */ addu $s3, $s3, $v0
/* 44438 80069038 28820080 */ slti $v0, $a0, 0x80
/* 4443C 8006903C 1440FFF9 */ bnez $v0, .L80069024
/* 44440 80069040 24630002 */ addiu $v1, $v1, 2
.L80069044:
/* 44444 80069044 92430064 */ lbu $v1, 0x64($s2)
/* 44448 80069048 26310001 */ addiu $s1, $s1, 1
/* 4444C 8006904C 322200FF */ andi $v0, $s1, 0xff
/* 44450 80069050 0043102B */ sltu $v0, $v0, $v1
/* 44454 80069054 5440FFE4 */ bnel $v0, $zero, .L80068FE8
/* 44458 80069058 02402021 */ addu $a0, $s2, $zero
.L8006905C:
/* 4445C 8006905C 00131200 */ sll $v0, $s3, 8
/* 44460 80069060 AEA20000 */ sw $v0, ($s5)
/* 44464 80069064 00001021 */ addu $v0, $zero, $zero
.L80069068:
/* 44468 80069068 8FBF0128 */ lw $ra, 0x128($sp)
/* 4446C 8006906C 8FB50124 */ lw $s5, 0x124($sp)
/* 44470 80069070 8FB40120 */ lw $s4, 0x120($sp)
/* 44474 80069074 8FB3011C */ lw $s3, 0x11c($sp)
/* 44478 80069078 8FB20118 */ lw $s2, 0x118($sp)
/* 4447C 8006907C 8FB10114 */ lw $s1, 0x114($sp)
/* 44480 80069080 8FB00110 */ lw $s0, 0x110($sp)
/* 44484 80069084 03E00008 */ jr $ra
/* 44488 80069088 27BD0130 */ addiu $sp, $sp, 0x130
/* 4448C 8006908C 00000000 */ nop