Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo -e 'f(a,b){return a*b;}main(){printf("%d\\n",f(rand(),rand()));}' | gcc -m32 -O0 -xc -S -o - -
- .file ""
- .text
- .globl f
- .type f, @function
- f:
- pushl %ebp
- movl %esp, %ebp
- movl 8(%ebp), %eax
- imull 12(%ebp), %eax
- popl %ebp
- ret
- .size f, .-f
- .section .rodata
- .LC0:
- .string "%d\n"
- .text
- .globl main
- .type main, @function
- main:
- pushl %ebp
- movl %esp, %ebp
- andl $-16, %esp
- pushl %ebx
- subl $28, %esp
- call rand
- movl %eax, %ebx
- call rand
- movl %ebx, 4(%esp)
- movl %eax, (%esp)
- call f
- movl %eax, 4(%esp)
- movl $.LC0, (%esp)
- call printf
- addl $28, %esp
- popl %ebx
- movl %ebp, %esp
- popl %ebp
- ret
- .size main, .-main
- .ident "GCC: (GNU) 4.4.2 20091208 (prerelease)"
- .section .note.GNU-stack,"",@progbits
Add Comment
Please, Sign In to add comment