summaryrefslogtreecommitdiff
path: root/arm9/asm
diff options
context:
space:
mode:
Diffstat (limited to 'arm9/asm')
-rw-r--r--arm9/asm/NNS_FND_expheap_s.s107
1 files changed, 1 insertions, 106 deletions
diff --git a/arm9/asm/NNS_FND_expheap_s.s b/arm9/asm/NNS_FND_expheap_s.s
index 48ec1fe4..494e3c21 100644
--- a/arm9/asm/NNS_FND_expheap_s.s
+++ b/arm9/asm/NNS_FND_expheap_s.s
@@ -7,6 +7,7 @@
.extern InsertMBlock
.extern InitMBlock
.extern InitExpHeap
+ .extern AllocUsedBlockFromFreeBlock
.text
arm_func_start NNS_FndGetSizeForMBlockExpHeap
@@ -382,109 +383,3 @@ _020AE270:
add sp, sp, #0x4
ldmia sp!, {r4-r9,pc}
arm_func_end AllocFromHead
-
- arm_func_start AllocUsedBlockFromFreeBlock
-AllocUsedBlockFromFreeBlock: ; 0x020AE298
- stmdb sp!, {r4-r8,lr}
- sub sp, sp, #0x18
- mov r7, r0
- add r0, sp, #0x0
- mov r8, r1
- mov r6, r2
- mov r5, r3
- bl GetRegionOfMBlock
- ldr r3, [sp, #0x4]
- sub r4, r6, #0x10
- add r2, r5, r6
- mov r0, r7
- mov r1, r8
- str r4, [sp, #0x4]
- str r3, [sp, #0xc]
- str r2, [sp, #0x8]
- bl RemoveMBlock
- ldr r2, [sp, #0x0]
- ldr r1, [sp, #0x4]
- mov r5, r0
- sub r0, r1, r2
- cmp r0, #0x10
- strcc r2, [sp, #0x4]
- blo _020AE318
- ldr r1, _020AE418 ; =0x00004652
- add r0, sp, #0x0
- bl InitMBlock
- mov r1, r0
- mov r0, r7
- mov r2, r5
- bl InsertMBlock
- mov r5, r0
-_020AE318:
- ldr r1, [sp, #0xc]
- ldr r0, [sp, #0x8]
- sub r0, r1, r0
- cmp r0, #0x10
- strcc r1, [sp, #0x8]
- blo _020AE34C
- ldr r1, _020AE418 ; =0x00004652
- add r0, sp, #0x8
- bl InitMBlock
- mov r1, r0
- mov r0, r7
- mov r2, r5
- bl InsertMBlock
-_020AE34C:
- ldr r0, [r7, #-0x4]
- ldr r1, [sp, #0x4]
- and r0, r0, #0xff
- mov r0, r0, lsl #0x10
- ldr r2, [sp, #0x8]
- mov r0, r0, lsr #0x10
- sub r2, r2, r1
- ands r0, r0, #0x1
- beq _020AE378
- mov r0, #0x0
- bl MIi_CpuClear32
-_020AE378:
- ldr r2, [sp, #0x8]
- ldr r1, _020AE41C ; =0x00005544
- add r0, sp, #0x10
- str r4, [sp, #0x10]
- str r2, [sp, #0x14]
- bl InitMBlock
- mov r1, r0
- ldrh r3, [r1, #0x2]
- ldrh r2, [sp, #0x30]
- add r0, r7, #0x8
- bic r3, r3, #0x8000
- strh r3, [r1, #0x2]
- ldrh r3, [r1, #0x2]
- and r2, r2, #0x1
- orr r2, r3, r2, lsl #0xf
- strh r2, [r1, #0x2]
- ldrh r2, [r1, #0x2]
- ldr r3, [sp, #0x4]
- bic r2, r2, #0x7f00
- strh r2, [r1, #0x2]
- sub r2, r1, r3
- mov r2, r2, lsl #0x10
- mov r2, r2, lsr #0x10
- ldrh r3, [r1, #0x2]
- and r2, r2, #0x7f
- orr r2, r3, r2, lsl #0x8
- strh r2, [r1, #0x2]
- ldrh r2, [r1, #0x2]
- ldrh r3, [r7, #0x10]
- bic r2, r2, #0xff
- strh r2, [r1, #0x2]
- ldrh r2, [r1, #0x2]
- and r3, r3, #0xff
- orr r2, r2, r3
- strh r2, [r1, #0x2]
- ldr r2, [r7, #0xc]
- bl InsertMBlock
- mov r0, r6
- add sp, sp, #0x18
- ldmia sp!, {r4-r8,pc}
- .balign 4
-_020AE418: .word 0x00004652
-_020AE41C: .word 0x00005544
- arm_func_end AllocUsedBlockFromFreeBlock