Advertisement
Guest User

With -O2

a guest
Aug 22nd, 2012
536
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     .file   "main.c"
  2.     .text
  3.     .p2align 4,,15
  4.     .globl  _xorBuffer
  5.     .def    _xorBuffer; .scl    2;  .type   32; .endef
  6. _xorBuffer:
  7. LFB18:
  8.     .cfi_startproc
  9.     pushl   %esi
  10.     .cfi_def_cfa_offset 8
  11.     .cfi_offset 6, -8
  12.     pushl   %ebx
  13.     .cfi_def_cfa_offset 12
  14.     .cfi_offset 3, -12
  15.     movl    20(%esp), %edx
  16.     movl    12(%esp), %ecx
  17.     movl    16(%esp), %esi
  18.     testl   %edx, %edx
  19.     je  L1
  20.     xorl    %eax, %eax
  21.     .p2align 4,,10
  22. L3:
  23.     movzbl  (%esi,%eax), %ebx
  24.     xorb    %bl, (%ecx,%eax)
  25.     addl    $1, %eax
  26.     subl    $1, %edx
  27.     jne L3
  28. L1:
  29.     popl    %ebx
  30.     .cfi_def_cfa_offset 8
  31.     .cfi_restore 3
  32.     popl    %esi
  33.     .cfi_def_cfa_offset 4
  34.     .cfi_restore 6
  35.     ret
  36.     .cfi_endproc
  37. LFE18:
  38.     .def    ___main;    .scl    2;  .type   32; .endef
  39.     .section .rdata,"dr"
  40. LC0:
  41.     .ascii "result = \0"
  42. LC1:
  43.     .ascii "%.2x\0"
  44.     .section    .text.startup,"x"
  45.     .p2align 4,,15
  46.     .globl  _main
  47.     .def    _main;  .scl    2;  .type   32; .endef
  48. _main:
  49. LFB19:
  50.     .cfi_startproc
  51.     pushl   %ebp
  52.     .cfi_def_cfa_offset 8
  53.     .cfi_offset 5, -8
  54.     movl    %esp, %ebp
  55.     .cfi_def_cfa_register 5
  56.     pushl   %esi
  57.     pushl   %ebx
  58.     andl    $-16, %esp
  59.     subl    $16, %esp
  60.     .cfi_offset 3, -16
  61.     .cfi_offset 6, -12
  62.     call    ___main
  63.     movl    $32, (%esp)
  64.     call    _malloc
  65.     movl    $32, (%esp)
  66.     movl    %eax, %esi
  67.     call    _malloc
  68.     movl    $-1431655766, (%esi)
  69.     movl    $-1431655766, 4(%esi)
  70.     xorl    %edx, %edx
  71.     movl    $-1431655766, 8(%esi)
  72.     movl    $-1431655766, 12(%esi)
  73.     movl    $-1431655766, 16(%esi)
  74.     movl    $-1431655766, 20(%esi)
  75.     movl    $-1431655766, 24(%esi)
  76.     movl    $-1431655766, 28(%esi)
  77.     movl    $-1145324613, (%eax)
  78.     movl    $-1145324613, 4(%eax)
  79.     movl    $-1145324613, 8(%eax)
  80.     movl    $-1145324613, 12(%eax)
  81.     movl    $-1145324613, 16(%eax)
  82.     movl    $-1145324613, 20(%eax)
  83.     movl    $-1145324613, 24(%eax)
  84.     movl    $-1145324613, 28(%eax)
  85.     .p2align 4,,10
  86. L7:
  87.     movzbl  (%eax,%edx), %ecx
  88.     xorb    %cl, (%esi,%edx)
  89.     addl    $1, %edx
  90.     cmpl    $32, %edx
  91.     jne L7
  92.     movl    $LC0, (%esp)
  93.     xorl    %ebx, %ebx
  94.     call    _printf
  95.     .p2align 4,,10
  96. L8:
  97.     movzbl  (%esi,%ebx), %eax
  98.     movl    $LC1, (%esp)
  99.     movl    %eax, 4(%esp)
  100.     addl    $1, %ebx
  101.     call    _printf
  102.     cmpl    $32, %ebx
  103.     jne L8
  104.     movl    $10, (%esp)
  105.     call    _putchar
  106.     leal    -8(%ebp), %esp
  107.     xorl    %eax, %eax
  108.     popl    %ebx
  109.     .cfi_restore 3
  110.     popl    %esi
  111.     .cfi_restore 6
  112.     popl    %ebp
  113.     .cfi_def_cfa 4, 4
  114.     .cfi_restore 5
  115.     ret
  116.     .cfi_endproc
  117. LFE19:
  118.     .def    _putchar;   .scl    2;  .type   32; .endef
  119.     .def    _malloc;    .scl    2;  .type   32; .endef
  120.     .def    _printf;    .scl    2;  .type   32; .endef
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement