Advertisement
Guest User

With -O3

a guest
Aug 22nd, 2012
453
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   %ebp
  10.     .cfi_def_cfa_offset 8
  11.     .cfi_offset 5, -8
  12.     pushl   %edi
  13.     .cfi_def_cfa_offset 12
  14.     .cfi_offset 7, -12
  15.     pushl   %esi
  16.     .cfi_def_cfa_offset 16
  17.     .cfi_offset 6, -16
  18.     pushl   %ebx
  19.     .cfi_def_cfa_offset 20
  20.     .cfi_offset 3, -20
  21.     subl    $28, %esp
  22.     .cfi_def_cfa_offset 48
  23.     movl    56(%esp), %edx
  24.     movl    48(%esp), %eax
  25.     movl    52(%esp), %ecx
  26.     testl   %edx, %edx
  27.     je  L1
  28.     movl    %edx, %ebx
  29.     movl    %edx, 8(%esp)
  30.     shrl    $4, %ebx
  31.     movl    %ebx, %esi
  32.     movl    %ebx, 4(%esp)
  33.     sall    $4, %esi
  34.     testl   %esi, %esi
  35.     je  L3
  36.     leal    16(%ecx), %edi
  37.     cmpl    $15, %edx
  38.     seta    15(%esp)
  39.     cmpl    %edi, %eax
  40.     leal    16(%eax), %ebp
  41.     seta    %bl
  42.     cmpl    %ebp, %ecx
  43.     movl    %ebx, %edi
  44.     seta    %bl
  45.     movl    %ebx, %ebp
  46.     orl %ebp, %edi
  47.     movl    %edi, %ebx
  48.     testb   %bl, 15(%esp)
  49.     je  L3
  50.     movl    4(%esp), %ebx
  51.     xorl    %edi, %edi
  52.     xorl    %ebp, %ebp
  53.     .p2align 4,,10
  54. L4:
  55.     vmovdqu (%ecx,%edi), %xmm1
  56.     addl    $1, %ebp
  57.     vmovdqu (%eax,%edi), %xmm0
  58.     vpxor   %xmm0, %xmm1, %xmm0
  59.     vmovdqu %xmm0, (%eax,%edi)
  60.     addl    $16, %edi
  61.     cmpl    %ebp, %ebx
  62.     ja  L4
  63.     addl    %esi, %eax
  64.     addl    %esi, %ecx
  65.     subl    %esi, %edx
  66.     cmpl    %esi, 8(%esp)
  67.     je  L1
  68. L3:
  69.     xorl    %ebx, %ebx
  70.     movl    %ecx, %esi
  71.     .p2align 4,,10
  72. L5:
  73.     movzbl  (%esi,%ebx), %ecx
  74.     xorb    %cl, (%eax,%ebx)
  75.     addl    $1, %ebx
  76.     subl    $1, %edx
  77.     jne L5
  78. L1:
  79.     addl    $28, %esp
  80.     .cfi_def_cfa_offset 20
  81.     popl    %ebx
  82.     .cfi_def_cfa_offset 16
  83.     .cfi_restore 3
  84.     popl    %esi
  85.     .cfi_def_cfa_offset 12
  86.     .cfi_restore 6
  87.     popl    %edi
  88.     .cfi_def_cfa_offset 8
  89.     .cfi_restore 7
  90.     popl    %ebp
  91.     .cfi_def_cfa_offset 4
  92.     .cfi_restore 5
  93.     ret
  94.     .cfi_endproc
  95. LFE18:
  96.     .def    ___main;    .scl    2;  .type   32; .endef
  97.     .section .rdata,"dr"
  98. LC0:
  99.     .ascii "result = \0"
  100. LC1:
  101.     .ascii "%.2x\0"
  102.     .section    .text.startup,"x"
  103.     .p2align 4,,15
  104.     .globl  _main
  105.     .def    _main;  .scl    2;  .type   32; .endef
  106. _main:
  107. LFB19:
  108.     .cfi_startproc
  109.     pushl   %ebp
  110.     .cfi_def_cfa_offset 8
  111.     .cfi_offset 5, -8
  112.     movl    %esp, %ebp
  113.     .cfi_def_cfa_register 5
  114.     pushl   %edi
  115.     pushl   %esi
  116.     pushl   %ebx
  117.     andl    $-16, %esp
  118.     subl    $48, %esp
  119.     .cfi_offset 3, -20
  120.     .cfi_offset 6, -16
  121.     .cfi_offset 7, -12
  122.     call    ___main
  123.     movl    $32, (%esp)
  124.     call    _malloc
  125.     movl    $32, (%esp)
  126.     movl    %eax, 44(%esp)
  127.     call    _malloc
  128.     movl    %eax, 40(%esp)
  129.     movl    44(%esp), %eax
  130.     movl    $-1431655766, (%eax)
  131.     movl    $-1431655766, 4(%eax)
  132.     movl    $-1431655766, 8(%eax)
  133.     movl    $-1431655766, 12(%eax)
  134.     movl    $-1431655766, 16(%eax)
  135.     movl    $-1431655766, 20(%eax)
  136.     movl    $-1431655766, 24(%eax)
  137.     movl    $-1431655766, 28(%eax)
  138.     movl    40(%esp), %eax
  139.     movl    $-1145324613, (%eax)
  140.     movl    $-1145324613, 4(%eax)
  141.     movl    $-1145324613, 8(%eax)
  142.     movl    $-1145324613, 12(%eax)
  143.     movl    $-1145324613, 16(%eax)
  144.     movl    $-1145324613, 20(%eax)
  145.     movl    $-1145324613, 24(%eax)
  146.     movl    $-1145324613, 28(%eax)
  147.     movl    44(%esp), %eax
  148.     negl    %eax
  149.     andl    $15, %eax
  150.     movl    %eax, 36(%esp)
  151.     je  L17
  152.     movl    %eax, %edi
  153.     movl    40(%esp), %ecx
  154.     xorl    %edx, %edx
  155.     movl    44(%esp), %eax
  156.     .p2align 4,,10
  157. L11:
  158.     movzbl  (%ecx), %esi
  159.     addl    $1, %ecx
  160.     movl    %esi, %ebx
  161.     movl    $31, %esi
  162.     xorb    %bl, (%eax)
  163.     subl    %edx, %esi
  164.     addl    $1, %edx
  165.     addl    $1, %eax
  166.     cmpl    %edx, %edi
  167.     ja  L11
  168. L10:
  169.     movl    36(%esp), %edx
  170.     movl    $32, 28(%esp)
  171.     subl    %edx, 28(%esp)
  172.     movl    28(%esp), %ebx
  173.     shrl    $4, %ebx
  174.     movl    %ebx, 24(%esp)
  175.     sall    $4, %ebx
  176.     testl   %ebx, %ebx
  177.     movl    %ebx, 32(%esp)
  178.     je  L12
  179.     movl    40(%esp), %ebx
  180.     movl    %eax, 36(%esp)
  181.     movl    44(%esp), %edi
  182.     movl    %ecx, 20(%esp)
  183.     movl    24(%esp), %eax
  184.     addl    %edx, %ebx
  185.     movl    %ebx, 40(%esp)
  186.     addl    %edx, %edi
  187.     xorl    %ebx, %ebx
  188.     movl    40(%esp), %ecx
  189.     xorl    %edx, %edx
  190.     .p2align 4,,10
  191. L13:
  192.     vmovdqu (%ecx,%edx), %xmm0
  193.     addl    $1, %ebx
  194.     vpxor   (%edi,%edx), %xmm0, %xmm0
  195.     vmovdqa %xmm0, (%edi,%edx)
  196.     addl    $16, %edx
  197.     cmpl    %eax, %ebx
  198.     jb  L13
  199.     movl    36(%esp), %eax
  200.     movl    20(%esp), %ecx
  201.     movl    32(%esp), %edx
  202.     subl    32(%esp), %esi
  203.     addl    32(%esp), %eax
  204.     addl    32(%esp), %ecx
  205.     cmpl    %edx, 28(%esp)
  206.     je  L14
  207. L12:
  208.     xorl    %edx, %edx
  209.     .p2align 4,,10
  210. L15:
  211.     movzbl  (%ecx,%edx), %ebx
  212.     xorb    %bl, (%eax,%edx)
  213.     addl    $1, %edx
  214.     cmpl    %esi, %edx
  215.     jne L15
  216. L14:
  217.     movl    $LC0, (%esp)
  218.     xorl    %ebx, %ebx
  219.     call    _printf
  220.     movl    44(%esp), %esi
  221.     .p2align 4,,10
  222. L16:
  223.     movzbl  (%esi,%ebx), %eax
  224.     movl    $LC1, (%esp)
  225.     movl    %eax, 4(%esp)
  226.     addl    $1, %ebx
  227.     call    _printf
  228.     cmpl    $32, %ebx
  229.     jne L16
  230.     movl    $10, (%esp)
  231.     call    _putchar
  232.     leal    -12(%ebp), %esp
  233.     xorl    %eax, %eax
  234.     popl    %ebx
  235.     .cfi_remember_state
  236.     .cfi_restore 3
  237.     popl    %esi
  238.     .cfi_restore 6
  239.     popl    %edi
  240.     .cfi_restore 7
  241.     popl    %ebp
  242.     .cfi_def_cfa 4, 4
  243.     .cfi_restore 5
  244.     ret
  245. L17:
  246.     .cfi_restore_state
  247.     movl    40(%esp), %ecx
  248.     movl    $32, %esi
  249.     movl    44(%esp), %eax
  250.     jmp L10
  251.     .cfi_endproc
  252. LFE19:
  253.     .def    _putchar;   .scl    2;  .type   32; .endef
  254.     .def    _malloc;    .scl    2;  .type   32; .endef
  255.     .def    _printf;    .scl    2;  .type   32; .endef
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement