Advertisement
Guest User

gcc -S -Wall -O2 test.c

a guest
Jan 11th, 2012
445
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. .file "test.c"
  2. .text
  3. .p2align 4,,15
  4. .globl test
  5. .type test, @function
  6. test:
  7. pushl %ebp
  8. movl $-1, %eax
  9. movl %esp, %ebp
  10. xorl %edx, %edx
  11. movl 8(%ebp), %ecx
  12. popl %ebp
  13. sall %cl, %eax
  14. andb $32, %cl
  15. cmovne %eax, %edx
  16. cmovne %edx, %eax
  17. ret
  18. .size test, .-test
  19. .section .rodata.str1.1,"aMS",@progbits,1
  20. .LC0:
  21. .string "%d"
  22. .LC1:
  23. .string "%ul\n"
  24. .text
  25. .p2align 4,,15
  26. .globl main
  27. .type main, @function
  28. main:
  29. pushl %ebp
  30. movl %esp, %ebp
  31. andl $-16, %esp
  32. subl $32, %esp
  33. leal 28(%esp), %eax
  34. movl %eax, 8(%esp)
  35. movl 12(%ebp), %eax
  36. movl $.LC0, 4(%esp)
  37. movl 4(%eax), %eax
  38. movl %eax, (%esp)
  39. call __isoc99_sscanf
  40. movl 28(%esp), %ecx
  41. movl $-1, %eax
  42. xorl %edx, %edx
  43. movl $.LC1, 4(%esp)
  44. movl $1, (%esp)
  45. sall %cl, %eax
  46. andb $32, %cl
  47. cmovne %eax, %edx
  48. cmovne %edx, %eax
  49. movl %eax, 8(%esp)
  50. call __printf_chk
  51. xorl %eax, %eax
  52. leave
  53. ret
  54. .size main, .-main
  55. .ident "GCC: (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5"
  56. .section .note.GNU-stack,"",@progbits
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement