scanf_format: .asciz "%lf" sin_format: .asciz "sin: %lf\n" cos_format: .asciz "cos: %lf\n" prompt: .asciz "Enter a value: " .global _start _start: mov $prompt, %rdi call printf // 16, not 8, for alignment sub $16, %rsp mov $scanf_format, %rdi mov %rsp, %rsi call scanf movsd (%rsp), %xmm0 call sin mov $sin_format, %rdi mov $1, %rax // Number to print is already in xmm0 call printf movsd (%rsp), %xmm0 call cos mov $cos_format, %rdi mov $1, %rax // Number to print is already in xmm0 call printf mov $60, %rax mov $0, %rdi syscall