Advertisement
alduncin

Untitled

Apr 17th, 2012
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .file   "C.c"
  2.     .text
  3.     .p2align 4,,15
  4.     .globl  fact
  5.     .type   fact, @function
  6. fact:
  7. .LFB22:
  8.     .cfi_startproc
  9.     movl    4(%esp), %eax
  10.     leal    -1(%eax), %edx
  11.     testl   %edx, %edx
  12.     jle .L2
  13.     .p2align 4,,7
  14.     .p2align 3
  15. .L4:
  16.     imull   %edx, %eax
  17.     subl    $1, %edx
  18.     jne .L4
  19. .L2:
  20.     rep
  21.     ret
  22.     .cfi_endproc
  23. .LFE22:
  24.     .size   fact, .-fact
  25.     .section    .rodata.str1.1,"aMS",@progbits,1
  26. .LC0:
  27.     .string "\t  aCb\n  Teclea a:"
  28. .LC1:
  29.     .string "%d"
  30. .LC2:
  31.     .string "Teclea b:"
  32. .LC3:
  33.     .string "\nC= %.0f\n"
  34.     .section    .text.startup,"ax",@progbits
  35.     .p2align 4,,15
  36.     .globl  main
  37.     .type   main, @function
  38. main:
  39. .LFB23:
  40.     .cfi_startproc
  41.     pushl   %ebp
  42.     .cfi_def_cfa_offset 8
  43.     .cfi_offset 5, -8
  44.     movl    %esp, %ebp
  45.     .cfi_def_cfa_register 5
  46.     pushl   %ebx
  47.     andl    $-16, %esp
  48.     subl    $48, %esp
  49.     movl    $0, 40(%esp)
  50.     movl    $0, 44(%esp)
  51.     movl    $.LC0, 4(%esp)
  52.     movl    $1, (%esp)
  53.     .cfi_offset 3, -12
  54.     call    __printf_chk
  55.     leal    40(%esp), %eax
  56.     movl    %eax, 4(%esp)
  57.     movl    $.LC1, (%esp)
  58.     call    __isoc99_scanf
  59.     movl    $.LC2, 4(%esp)
  60.     movl    $1, (%esp)
  61.     call    __printf_chk
  62.     leal    44(%esp), %eax
  63.     movl    %eax, 4(%esp)
  64.     movl    $.LC1, (%esp)
  65.     call    __isoc99_scanf
  66.     movl    40(%esp), %eax
  67.     movl    44(%esp), %edx
  68.     movl    %eax, %ecx
  69.     leal    -1(%eax), %ebx
  70.     subl    %edx, %ecx
  71.     testl   %ebx, %ebx
  72.     jle .L8
  73.     .p2align 4,,7
  74.     .p2align 3
  75. .L16:
  76.     imull   %ebx, %eax
  77.     subl    $1, %ebx
  78.     jne .L16
  79. .L8:
  80.     leal    -1(%edx), %ebx
  81.     testl   %ebx, %ebx
  82.     movl    %eax, 40(%esp)
  83.     jle .L10
  84.     .p2align 4,,7
  85.     .p2align 3
  86. .L15:
  87.     imull   %ebx, %edx
  88.     subl    $1, %ebx
  89.     jne .L15
  90. .L10:
  91.     leal    -1(%ecx), %ebx
  92.     testl   %ebx, %ebx
  93.     movl    %edx, 44(%esp)
  94.     jle .L12
  95.     .p2align 4,,7
  96.     .p2align 3
  97. .L14:
  98.     imull   %ebx, %ecx
  99.     subl    $1, %ebx
  100.     jne .L14
  101. .L12:
  102.     imull   %edx, %ecx
  103.     movl    %eax, %edx
  104.     sarl    $31, %edx
  105.     movl    $.LC3, 4(%esp)
  106.     movl    $1, (%esp)
  107.     idivl   %ecx
  108.     movl    %eax, 28(%esp)
  109.     fildl   28(%esp)
  110.     fstpl   8(%esp)
  111.     call    __printf_chk
  112.     movl    -4(%ebp), %ebx
  113.     leave
  114.     .cfi_restore 5
  115.     .cfi_def_cfa 4, 4
  116.     .cfi_restore 3
  117.     ret
  118.     .cfi_endproc
  119. .LFE23:
  120.     .size   main, .-main
  121.     .ident  "GCC: (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1"
  122.     .section    .note.GNU-stack,"",@progbits
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement