Advertisement
AlexMatveev

Untitled

Mar 10th, 2012
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         .file   "main.c"
  2.         .section        .rodata
  3. .LC0:
  4.         .string "Input array X:"
  5. .LC1:
  6.         .string "X[%i]="
  7. .LC2:
  8.         .string "%hd"
  9. .LC3:
  10.         .string "\nInput Z:"
  11.         .align 4
  12. .LC4:
  13.         .string "\n========================================"
  14. .LC5:
  15.         .string "\nResult"
  16. .LC6:
  17.         .string "X[%i]=%i\n"
  18. .LC7:
  19.         .string "%c"
  20.         .text
  21.         .globl  main
  22.         .type   main, @function
  23. main:
  24. .LFB0:
  25.         .cfi_startproc
  26.         pushl   %ebp
  27.         .cfi_def_cfa_offset 8
  28.         .cfi_offset 5, -8
  29.         movl    %esp, %ebp
  30.         .cfi_def_cfa_register 5
  31.         andl    $-16, %esp
  32.         subl    $48, %esp
  33.         movl    12(%ebp), %eax
  34.         movl    %eax, 28(%esp)
  35.         movl    %gs:20, %eax
  36.         movl    %eax, 44(%esp)
  37.         xorl    %eax, %eax
  38.         movl    $.LC0, (%esp)
  39.         call    puts
  40.         movb    $0, 33(%esp)
  41.         jmp     .L2
  42. .L3:
  43.         movsbl  33(%esp), %eax
  44.         leal    1(%eax), %edx
  45.         movl    $.LC1, %eax
  46.         movl    %edx, 4(%esp)
  47.         movl    %eax, (%esp)
  48.         call    printf
  49.         movsbl  33(%esp), %eax
  50.         leal    34(%esp), %edx
  51.         addl    %eax, %edx
  52.         movl    $.LC2, %eax
  53.         movl    %edx, 4(%esp)
  54.         movl    %eax, (%esp)
  55.         call    __isoc99_scanf
  56.         addb    $1, 33(%esp)
  57. .L2:
  58.         cmpb    $9, 33(%esp)
  59.         jle     .L3
  60.         movl    $.LC3, (%esp)
  61.         call    puts
  62.         movl    $.LC2, %eax
  63.         leal    32(%esp), %edx
  64.         movl    %edx, 4(%esp)
  65.         movl    %eax, (%esp)
  66.         call    __isoc99_scanf
  67.         movl    $.LC4, (%esp)
  68.         call    puts
  69.         movl    $.LC5, (%esp)
  70.         call    puts
  71.         movl    $.LC4, (%esp)
  72.         call    puts
  73.         movb    $0, 33(%esp)
  74.         jmp     .L4
  75. .L6:
  76.         movsbl  33(%esp), %eax
  77.         movzbl  34(%esp,%eax), %edx
  78.         movzbl  32(%esp), %eax
  79.         cmpb    %al, %dl
  80.         jge     .L5
  81.         movsbl  33(%esp), %eax
  82.         movzbl  34(%esp,%eax), %eax
  83.         movsbl  %al, %edx
  84.         movsbl  33(%esp), %eax
  85.         leal    1(%eax), %ecx
  86.         movl    $.LC6, %eax
  87.         movl    %edx, 8(%esp)
  88.         movl    %ecx, 4(%esp)
  89.         movl    %eax, (%esp)
  90.         call    printf
  91. .L5:
  92.         addb    $1, 33(%esp)
  93. .L4:
  94.         cmpb    $9, 33(%esp)
  95.         jle     .L6
  96.         movl    $.LC7, %eax
  97.         leal    32(%esp), %edx
  98.         movl    %edx, 4(%esp)
  99.         movl    %eax, (%esp)
  100.         call    __isoc99_scanf
  101.         movl    $0, %eax
  102.         movl    44(%esp), %edx
  103.         xorl    %gs:20, %edx
  104.         je      .L7
  105.         call    __stack_chk_fail
  106. .L7:
  107.         leave
  108.         .cfi_restore 5
  109.         .cfi_def_cfa 4, 4
  110.         ret
  111.         .cfi_endproc
  112. .LFE0:
  113.         .size   main, .-main
  114.         .ident  "GCC: (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1"
  115.         .section        .note.GNU-stack,"",@progbits
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement