.text .global fib fib: cmp x0, 1 b.le fib_end mov x1, 0 mov x2, 1 fib_rec: add x3, x1, x2 mov x1, x2 mov x2, x3 sub x0, x0, 1 cbnz x0, fib_rec mov x0, x1 fib_end: ret