Here is how I fixed it:
.private_extern _test_malloc
.globl _test_malloc
.align 2
_test_malloc:
//function prolog
stp fp, lr, [sp, #-16]!
mov fp, sp
orr x0, xzr, #0x8
bl _malloc //malloc(8)
//function epilog
ldp fp, lr, [sp], #16
ret lr