Skip to content

Instantly share code, notes, and snippets.

@pheuter
Created December 9, 2010 00:41
Show Gist options
  • Save pheuter/734164 to your computer and use it in GitHub Desktop.
Save pheuter/734164 to your computer and use it in GitHub Desktop.
.LC0:
.string "%d"
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
movq %rsp, %rbp
.cfi_offset 6, -16
.cfi_def_cfa_register 6
subq $16, %rsp
movl $.LC0, %eax
leaq -4(%rbp), %rdx
movq %rdx, %rsi
movq %rax, %rdi
movl $0, %eax
call __isoc99_scanf
movl -4(%rbp), %eax
andl $1, %eax
testl %eax, %eax
setne %al
movzbl %al, %eax
leave
ret
.cfi_endproc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment