program PointerLoop {
section module {
}
section data {
int rax = 0
int rbx = 0
int rcx = 0
int rdx = 0
string fmt_int = "%lld "
string newline = "\n"
ptr acc = null
int i = 0
}
section code {
start:
alloc acc, 8, 1
free acc
store 0, acc, 0, 1
mov i, 1
FOR_0:
cmp i, 10
jg ENDFOR_1
load rbx, acc, 0, 1
mov rcx, rbx
add rcx, i
store rcx, acc, 0, 1
FOR_CONTINUE_2:
add i, 1
jmp FOR_0
ENDFOR_1:
load rdx, acc, 0, 1
print fmt_int, rdx
print newline
free acc
done
}
}