You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
1.5 KiB

.text
.globl FourWhile
.p2align 2
FourWhile:
.L.FourWhile.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #10
mov w9, w8
mov w8, #7
mov w10, w8
mov w8, #6
mov w11, w8
mov w8, #5
mov w12, w8
b .L.FourWhile.1
.L.FourWhile.1:
mov w8, #20
cmp w12, w8
b.lt .L.FourWhile.2
b .L.FourWhile.3
.L.FourWhile.2:
mov w8, #3
add w8, w12, w8
mov w12, w8
b .L.FourWhile.4
.L.FourWhile.3:
add w8, w11, w9
add w8, w12, w8
add w8, w8, w10
mov w0, w8
ldp x29, x30, [sp], #16
ret
.L.FourWhile.4:
mov w8, #10
cmp w11, w8
b.lt .L.FourWhile.5
b .L.FourWhile.6
.L.FourWhile.5:
mov w8, #1
add w8, w11, w8
mov w11, w8
b .L.FourWhile.7
.L.FourWhile.6:
mov w8, #2
sub w8, w11, w8
mov w11, w8
b .L.FourWhile.1
.L.FourWhile.7:
mov w8, #7
cmp w10, w8
b.eq .L.FourWhile.8
b .L.FourWhile.9
.L.FourWhile.8:
mov w8, #1
sub w8, w10, w8
mov w10, w8
b .L.FourWhile.10
.L.FourWhile.9:
mov w8, #1
add w8, w10, w8
mov w10, w8
b .L.FourWhile.4
.L.FourWhile.10:
mov w8, #20
cmp w9, w8
b.lt .L.FourWhile.11
b .L.FourWhile.12
.L.FourWhile.11:
mov w8, #3
add w8, w9, w8
mov w9, w8
b .L.FourWhile.10
.L.FourWhile.12:
mov w8, #1
sub w8, w9, w8
mov w9, w8
b .L.FourWhile.7
.text
.globl main
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
bl FourWhile
mov w8, w0
mov w0, w8
ldp x29, x30, [sp], #16
ret