Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .file "7.c"
- .section .rodata
- .align 8
- .LC1:
- .string "Incrorrect input, check README.md"
- .LC2:
- .string "r"
- .LC3:
- .string "w"
- .LC4:
- .string "incorrect file"
- .LC5:
- .string "%lf"
- .LC6:
- .string "%d"
- .LC7:
- .string "integral = %lf\n"
- .text
- .globl main
- .type main, @function
- main:
- .LFB7:
- .cfi_startproc
- pushq %rbp
- .cfi_def_cfa_offset 16
- .cfi_offset 6, -16
- movq %rsp, %rbp
- .cfi_def_cfa_register 6
- subq $96, %rsp
- movl %edi, -68(%rbp) #argc
- movq %rsi, -80(%rbp) #argv
- movq %fs:40, %rax
- movq %rax, -8(%rbp)
- xorl %eax, %eax
- cmpl $3, -68(%rbp)
- je .L8
- leaq .LC1(%rip), %rdi
- call puts@PLT
- movl $0, %eax
- jmp .L12
- .L8:
- movq -80(%rbp), %rax
- addq $8, %rax
- movq (%rax), %rax
- leaq .LC2(%rip), %rsi
- movq %rax, %rdi
- call fopen@PLT #input
- movq %rax, -32(%rbp)
- movq -80(%rbp), %rax
- addq $16, %rax
- movq (%rax), %rax
- leaq .LC3(%rip), %rsi
- movq %rax, %rdi
- call fopen@PLT #output
- movq %rax, -24(%rbp)
- cmpq $0, -32(%rbp)
- je .L10
- cmpq $0, -24(%rbp)
- jne .L11
- .L10:
- leaq .LC4(%rip), %rdi
- call puts@PLT
- movl $0, %eax
- jmp .L12
- .L11:
- leaq -48(%rbp), %rdx
- movq -32(%rbp), %rax
- leaq .LC5(%rip), %rsi
- movq %rax, %rdi
- movl $0, %eax
- call __isoc99_fscanf@PLT
- leaq -40(%rbp), %rdx
- movq -32(%rbp), %rax #a
- leaq .LC5(%rip), %rsi
- movq %rax, %rdi
- movl $0, %eax
- call __isoc99_fscanf@PLT
- leaq -56(%rbp), %rdx
- movq -32(%rbp), %rax #b
- leaq .LC6(%rip), %rsi
- movq %rax, %rdi
- movl $0, %eax
- call __isoc99_fscanf@PLT
- leaq -52(%rbp), %rdx
- movq -32(%rbp), %rax #A
- leaq .LC6(%rip), %rsi
- movq %rax, %rdi
- movl $0, %eax
- call __isoc99_fscanf@PLT
- movl -52(%rbp), %ecx #a to func S
- movl -56(%rbp), %edx #b to func S
- movsd -40(%rbp), %xmm0 #A to func S
- movq -48(%rbp), %rax #B to func S
- movl %ecx, %esi
- movl %edx, %edi
- movapd %xmm0, %xmm1
- movq %rax, -88(%rbp)
- movsd -88(%rbp), %xmm0
- call S
- movq %xmm0, %rax #save s from func S
- movq %rax, -16(%rbp)
- movq -16(%rbp), %rdx
- movq -24(%rbp), %rax
- movq %rdx, -88(%rbp)
- movsd -88(%rbp), %xmm0 #s
- leaq .LC7(%rip), %rsi #" "
- movq %rax, %rdi #out
- movl $1, %eax
- call fprintf@PLT
- movq -32(%rbp), %rax
- movq %rax, %rdi
- call fclose@PLT #close input
- movq -24(%rbp), %rax
- movq %rax, %rdi
- call fclose@PLT #close out
- movl $0, %eax
- .L12:
- movq -8(%rbp), %rcx
- xorq %fs:40, %rcx
- je .L13
- call __stack_chk_fail@PLT
- .L13:
- leave
- .cfi_def_cfa 7, 8
- ret
- .cfi_endproc
- .LFE7:
- .size main, .-main
- .ident "GCC: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0"
- .section .note.GNU-stack,"",@progbits
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement