Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .file "main.c"
- .section .rodata
- .LC0:
- .string "Input array X:"
- .LC1:
- .string "X[%i]="
- .LC2:
- .string "%hd"
- .LC3:
- .string "\nInput Z:"
- .align 4
- .LC4:
- .string "\n========================================"
- .LC5:
- .string "\nResult"
- .LC6:
- .string "X[%i]=%i\n"
- .LC7:
- .string "%c"
- .text
- .globl main
- .type main, @function
- main:
- .LFB0:
- .cfi_startproc
- pushl %ebp
- .cfi_def_cfa_offset 8
- .cfi_offset 5, -8
- movl %esp, %ebp
- .cfi_def_cfa_register 5
- andl $-16, %esp
- subl $48, %esp
- movl 12(%ebp), %eax
- movl %eax, 28(%esp)
- movl %gs:20, %eax
- movl %eax, 44(%esp)
- xorl %eax, %eax
- movl $.LC0, (%esp)
- call puts
- movb $0, 33(%esp)
- jmp .L2
- .L3:
- movsbl 33(%esp), %eax
- leal 1(%eax), %edx
- movl $.LC1, %eax
- movl %edx, 4(%esp)
- movl %eax, (%esp)
- call printf
- movsbl 33(%esp), %eax
- leal 34(%esp), %edx
- addl %eax, %edx
- movl $.LC2, %eax
- movl %edx, 4(%esp)
- movl %eax, (%esp)
- call __isoc99_scanf
- addb $1, 33(%esp)
- .L2:
- cmpb $9, 33(%esp)
- jle .L3
- movl $.LC3, (%esp)
- call puts
- movl $.LC2, %eax
- leal 32(%esp), %edx
- movl %edx, 4(%esp)
- movl %eax, (%esp)
- call __isoc99_scanf
- movl $.LC4, (%esp)
- call puts
- movl $.LC5, (%esp)
- call puts
- movl $.LC4, (%esp)
- call puts
- movb $0, 33(%esp)
- jmp .L4
- .L6:
- movsbl 33(%esp), %eax
- movzbl 34(%esp,%eax), %edx
- movzbl 32(%esp), %eax
- cmpb %al, %dl
- jge .L5
- movsbl 33(%esp), %eax
- movzbl 34(%esp,%eax), %eax
- movsbl %al, %edx
- movsbl 33(%esp), %eax
- leal 1(%eax), %ecx
- movl $.LC6, %eax
- movl %edx, 8(%esp)
- movl %ecx, 4(%esp)
- movl %eax, (%esp)
- call printf
- .L5:
- addb $1, 33(%esp)
- .L4:
- cmpb $9, 33(%esp)
- jle .L6
- movl $.LC7, %eax
- leal 32(%esp), %edx
- movl %edx, 4(%esp)
- movl %eax, (%esp)
- call __isoc99_scanf
- movl $0, %eax
- movl 44(%esp), %edx
- xorl %gs:20, %edx
- je .L7
- call __stack_chk_fail
- .L7:
- leave
- .cfi_restore 5
- .cfi_def_cfa 4, 4
- ret
- .cfi_endproc
- .LFE0:
- .size main, .-main
- .ident "GCC: (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1"
- .section .note.GNU-stack,"",@progbits
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement