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.

167 lines
2.7 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
b .L.main.1
.L.main.1:
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.main.2
.L.main.2:
mov w8, #20
cmp w12, w8
b.lt .L.main.3
b .L.main.4
.L.main.3:
mov w8, #3
add w8, w12, w8
mov w12, w8
b .L.main.5
.L.main.4:
add w8, w11, w9
add w8, w12, w8
add w8, w8, w10
mov w0, w8
b .L.main.14
.L.main.5:
mov w8, #10
cmp w11, w8
b.lt .L.main.6
b .L.main.7
.L.main.6:
mov w8, #1
add w8, w11, w8
mov w11, w8
b .L.main.8
.L.main.7:
mov w8, #2
sub w8, w11, w8
mov w11, w8
b .L.main.2
.L.main.8:
mov w8, #7
cmp w10, w8
b.eq .L.main.9
b .L.main.10
.L.main.9:
mov w8, #1
sub w8, w10, w8
mov w10, w9
mov w15, w8
mov w8, w12
b .L.main.11
.L.main.10:
mov w8, #1
add w8, w10, w8
mov w10, w8
b .L.main.5
.L.main.11:
mov w9, #20
cmp w10, w9
b.lt .L.main.12
b .L.main.13
.L.main.12:
mov w9, #3
add w9, w10, w9
mov w10, w9
b .L.main.11
.L.main.13:
mov w9, #1
sub w9, w10, w9
mov w10, w15
mov w12, w8
b .L.main.8
.L.main.14:
mov w8, w0
mov w0, w8
ldp x29, x30, [sp], #16
ret