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.

252 lines
4.5 KiB

.data
.globl g
.p2align 2
g:
.word 0
.globl h
.p2align 2
h:
.word 0
.globl f
.p2align 2
f:
.word 0
.globl e
.p2align 2
e:
.word 0
.text
.globl EightWhile
.p2align 2
EightWhile:
.L.EightWhile.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
sub sp, sp, #32
str x19, [sp, #0]
str x20, [sp, #8]
mov w8, #10
mov w12, w8
mov w8, #7
mov w15, w8
mov w8, #6
mov w11, w8
mov w8, #5
mov w9, w8
b .L.EightWhile.1
.L.EightWhile.1:
mov w8, #20
cmp w9, w8
b.lt .L.EightWhile.2
b .L.EightWhile.3
.L.EightWhile.2:
mov w8, #3
add w8, w9, w8
mov w9, w11
mov w10, w8
b .L.EightWhile.4
.L.EightWhile.3:
add w8, w11, w12
add w8, w9, w8
add w10, w8, w15
adrp x13, e
ldr w8, [x13, #:lo12:e]
add w9, w8, w12
adrp x13, g
ldr w8, [x13, #:lo12:g]
sub w9, w9, w8
adrp x13, h
ldr w8, [x13, #:lo12:h]
add w8, w9, w8
sub w8, w10, w8
mov w0, w8
ldr x19, [sp, #0]
ldr x20, [sp, #8]
add sp, sp, #32
ldp x29, x30, [sp], #16
ret
.L.EightWhile.4:
mov w8, #10
cmp w9, w8
b.lt .L.EightWhile.5
b .L.EightWhile.6
.L.EightWhile.5:
mov w8, #1
add w8, w9, w8
mov w9, w15
mov w11, w8
b .L.EightWhile.7
.L.EightWhile.6:
mov w8, #2
sub w8, w9, w8
mov w11, w8
mov w9, w10
b .L.EightWhile.1
.L.EightWhile.7:
mov w8, #7
cmp w9, w8
b.eq .L.EightWhile.8
b .L.EightWhile.9
.L.EightWhile.8:
mov w8, #1
sub w8, w9, w8
mov w9, w12
b .L.EightWhile.10
.L.EightWhile.9:
mov w8, #1
add w8, w9, w8
mov w15, w8
mov w9, w11
b .L.EightWhile.4
.L.EightWhile.10:
mov w12, #20
cmp w9, w12
b.lt .L.EightWhile.11
b .L.EightWhile.12
.L.EightWhile.11:
mov w12, #3
add w9, w9, w12
mov w15, w9
mov w12, w8
mov w19, w10
b .L.EightWhile.13
.L.EightWhile.12:
mov w12, #1
sub w9, w9, w12
mov w12, w9
mov w9, w8
b .L.EightWhile.7
.L.EightWhile.13:
adrp x13, e
ldr w9, [x13, #:lo12:e]
mov w8, #1
cmp w9, w8
b.gt .L.EightWhile.14
b .L.EightWhile.15
.L.EightWhile.14:
adrp x13, e
ldr w9, [x13, #:lo12:e]
mov w8, #1
sub w8, w9, w8
adrp x13, e
str w8, [x13, #:lo12:e]
mov w10, w12
mov w20, w11
b .L.EightWhile.16
.L.EightWhile.15:
adrp x13, e
ldr w8, [x13, #:lo12:e]
mov w9, #1
add w8, w8, w9
adrp x13, e
str w8, [x13, #:lo12:e]
mov w9, w15
mov w8, w12
mov w10, w19
b .L.EightWhile.10
.L.EightWhile.16:
adrp x13, f
ldr w8, [x13, #:lo12:f]
mov w9, #2
cmp w8, w9
b.gt .L.EightWhile.17
b .L.EightWhile.18
.L.EightWhile.17:
adrp x13, f
ldr w8, [x13, #:lo12:f]
mov w9, #2
sub w8, w8, w9
adrp x13, f
str w8, [x13, #:lo12:f]
mov w12, w20
mov w11, w19
b .L.EightWhile.19
.L.EightWhile.18:
adrp x13, f
ldr w8, [x13, #:lo12:f]
mov w9, #1
add w8, w8, w9
adrp x13, f
str w8, [x13, #:lo12:f]
mov w12, w10
mov w11, w20
b .L.EightWhile.13
.L.EightWhile.19:
adrp x13, g
ldr w8, [x13, #:lo12:g]
mov w9, #3
cmp w8, w9
b.lt .L.EightWhile.20
b .L.EightWhile.21
.L.EightWhile.20:
adrp x13, g
ldr w8, [x13, #:lo12:g]
mov w9, #10
add w8, w8, w9
adrp x13, g
str w8, [x13, #:lo12:g]
mov w9, w12
mov w8, w11
b .L.EightWhile.22
.L.EightWhile.21:
adrp x13, g
ldr w9, [x13, #:lo12:g]
mov w8, #8
sub w8, w9, w8
adrp x13, g
str w8, [x13, #:lo12:g]
mov w20, w12
mov w19, w11
b .L.EightWhile.16
.L.EightWhile.22:
adrp x13, h
ldr w12, [x13, #:lo12:h]
mov w11, #10
cmp w12, w11
b.lt .L.EightWhile.23
b .L.EightWhile.24
.L.EightWhile.23:
adrp x13, h
ldr w12, [x13, #:lo12:h]
mov w11, #8
add w11, w12, w11
adrp x13, h
str w11, [x13, #:lo12:h]
b .L.EightWhile.22
.L.EightWhile.24:
adrp x13, h
ldr w12, [x13, #:lo12:h]
mov w11, #1
sub w11, w12, w11
adrp x13, h
str w11, [x13, #:lo12:h]
mov w12, w9
mov w11, w8
b .L.EightWhile.19
.text
.globl main
.p2align 2
main:
.L.main.0:
stp x29, x30, [sp, #-16]!
mov x29, sp
mov w8, #1
adrp x13, g
str w8, [x13, #:lo12:g]
mov w8, #2
adrp x13, h
str w8, [x13, #:lo12:h]
mov w8, #4
adrp x13, e
str w8, [x13, #:lo12:e]
mov w8, #6
adrp x13, f
str w8, [x13, #:lo12:f]
bl EightWhile
mov w8, w0
mov w0, w8
ldp x29, x30, [sp], #16
ret