Skip to content

Instantly share code, notes, and snippets.

@deepakkarki
Created June 3, 2014 13:24
Show Gist options
  • Save deepakkarki/07524af9a1753d656916 to your computer and use it in GitHub Desktop.
Save deepakkarki/07524af9a1753d656916 to your computer and use it in GitHub Desktop.
.file "test.c"
.section .rodata
.LC0:
.string "%d"
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
pushl %ebp
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp
.cfi_def_cfa_register 5
andl $-16, %esp
subl $32, %esp
movl $5, 20(%esp)
movl $6, 24(%esp)
movl 24(%esp), %eax
movl 20(%esp), %edx
addl %edx, %eax
movl %eax, 28(%esp)
movl $.LC0, %eax
movl 28(%esp), %edx
movl %edx, 4(%esp)
movl %eax, (%esp)
call printf
leave
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
.LFE0:
.size main, .-main
.ident "GCC: (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3"
.section .note.GNU-stack,"",@progbits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment