Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ echo 'int foo(int c) { int a, b; a = (c%10); b = (c/10); return a+b; }' | gcc -S -x c - -O3 -o /dev/stdout
- .file ""
- .text
- .p2align 4,,15
- .globl foo
- .type foo, @function
- foo:
- pushl %ebp
- movl $1717986919, %edx
- movl %esp, %ebp
- movl 8(%ebp), %ecx
- popl %ebp
- movl %ecx, %eax
- imull %edx
- movl %ecx, %eax
- sarl $31, %eax
- sarl $2, %edx
- subl %eax, %edx
- leal (%edx,%edx,4), %eax
- addl %eax, %eax
- subl %eax, %ecx
- leal (%edx,%ecx), %eax
- ret
- .size foo, .-foo
- .ident "GCC: (Ubuntu 4.4.3-4ubuntu5) 4.4.3"
- .section .note.GNU-stack,"",@progbits
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement