can anyone explain why this code snippet goes into an infinite loop?
I presume it would have something to do with the printf function.
q1: .asciz "Hello World\n"
.global main
main:
movq %rsp, %rbp
movq $3, %rcx
jmp bottom
loop:
movq $0, %rax
movq $q1, %rdi
call printf
bottom:
decq %rcx
cmpq $0, %rcx
jne loop
end:
movq $0, %rdi
call exit