.section .data scanf_pattern: .asciz "%ld" prompt: .asciz "Enter a number: " result_format: .asciz "Twice your number is %ld\n" .section .text .global _start _start: mov $prompt, %rdi call printf # For 64-bit, we need to align the stack to 16-byte lines sub $16, %rsp mov $scanf_pattern, %rdi mov %rsp, %rsi call scanf mov (%rsp), %rsi add %rsi, %rsi mov $result_format, %rdi call printf mov $60, %rax mov $0, %rdi syscall