Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .file "main.c"
- .intel_syntax noprefix
- .text
- .globl f
- .type f, @function
- f:
- push rbp
- mov rbp, rsp
- movsd QWORD PTR -40[rbp], xmm0
- movsd QWORD PTR -48[rbp], xmm1
- movsd QWORD PTR -56[rbp], xmm2
- movsd xmm0, QWORD PTR .LC0[rip]
- movsd QWORD PTR -24[rbp], xmm0
- movsd xmm0, QWORD PTR .LC0[rip]
- movsd QWORD PTR -16[rbp], xmm0
- pxor xmm0, xmm0
- movsd QWORD PTR -8[rbp], xmm0
- jmp .L2
- .L3:
- movsd xmm0, QWORD PTR -48[rbp]
- subsd xmm0, QWORD PTR -8[rbp]
- mulsd xmm0, QWORD PTR -40[rbp]
- movsd xmm2, QWORD PTR -8[rbp]
- movsd xmm1, QWORD PTR .LC0[rip]
- addsd xmm1, xmm2
- divsd xmm0, xmm1
- movsd xmm1, QWORD PTR -16[rbp]
- mulsd xmm0, xmm1
- movsd QWORD PTR -16[rbp], xmm0
- movsd xmm0, QWORD PTR -24[rbp]
- addsd xmm0, QWORD PTR -16[rbp]
- movsd QWORD PTR -24[rbp], xmm0
- movsd xmm1, QWORD PTR -8[rbp]
- movsd xmm0, QWORD PTR .LC0[rip]
- addsd xmm0, xmm1
- movsd QWORD PTR -8[rbp], xmm0
- .L2:
- movsd xmm0, QWORD PTR -56[rbp]
- comisd xmm0, QWORD PTR -8[rbp]
- ja .L3
- movsd xmm0, QWORD PTR -24[rbp]
- pop rbp
- ret
- .size f, .-f
- .section .rodata
- .align 8
- .LC2:
- .string "Incorrect input, check README.md"
- .LC3:
- .string "r"
- .LC4:
- .string "w"
- .LC5:
- .string "Incorrect file"
- .LC6:
- .string "%lf"
- .LC8:
- .string "|x| must be less than 1"
- .LC10:
- .string "Answer = %lf\n"
- .text
- .globl main
- .type main, @function
- main:
- push rbp
- mov rbp, rsp
- sub rsp, 64
- mov DWORD PTR -52[rbp], edi
- mov QWORD PTR -64[rbp], rsi
- mov rax, QWORD PTR fs:40
- mov QWORD PTR -8[rbp], rax
- xor eax, eax
- cmp DWORD PTR -52[rbp], 3
- je .L6
- lea rdi, .LC2[rip]
- call puts@PLT
- mov eax, 0
- jmp .L13
- .L6:
- mov rax, QWORD PTR -64[rbp]
- add rax, 8
- mov rax, QWORD PTR [rax]
- lea rsi, .LC3[rip]
- mov rdi, rax
- call fopen@PLT
- mov QWORD PTR -32[rbp], rax
- mov rax, QWORD PTR -64[rbp]
- add rax, 16
- mov rax, QWORD PTR [rax]
- lea rsi, .LC4[rip]
- mov rdi, rax
- call fopen@PLT
- mov QWORD PTR -24[rbp], rax
- cmp QWORD PTR -32[rbp], 0
- je .L8
- cmp QWORD PTR -24[rbp], 0
- jne .L9
- .L8:
- lea rdi, .LC5[rip]
- call puts@PLT
- mov eax, 0
- jmp .L13
- .L9:
- lea rdx, -48[rbp]
- mov rax, QWORD PTR -32[rbp]
- lea rsi, .LC6[rip]
- mov rdi, rax
- mov eax, 0
- call __isoc99_fscanf@PLT
- lea rdx, -40[rbp]
- mov rax, QWORD PTR -32[rbp]
- lea rsi, .LC6[rip]
- mov rdi, rax
- mov eax, 0
- call __isoc99_fscanf@PLT
- movsd xmm0, QWORD PTR -48[rbp]
- movsd xmm1, QWORD PTR .LC0[rip]
- comisd xmm0, xmm1
- ja .L10
- movsd xmm1, QWORD PTR -48[rbp]
- movsd xmm0, QWORD PTR .LC7[rip]
- comisd xmm0, xmm1
- jbe .L15
- .L10:
- lea rdi, .LC8[rip]
- call puts@PLT
- mov eax, 0
- jmp .L13
- .L15:
- movsd xmm0, QWORD PTR -40[rbp]
- mov rax, QWORD PTR -48[rbp]
- movsd xmm1, QWORD PTR .LC9[rip]
- movapd xmm2, xmm1
- movapd xmm1, xmm0
- movq xmm0, rax
- call f
- movq rax, xmm0
- mov QWORD PTR -16[rbp], rax
- mov rdx, QWORD PTR -16[rbp]
- mov rax, QWORD PTR -24[rbp]
- movq xmm0, rdx
- lea rsi, .LC10[rip]
- mov rdi, rax
- mov eax, 1
- call fprintf@PLT
- mov rax, QWORD PTR -32[rbp]
- mov rdi, rax
- call fclose@PLT
- mov rax, QWORD PTR -24[rbp]
- mov rdi, rax
- call fclose@PLT
- mov eax, 0
- .L13:
- mov rcx, QWORD PTR -8[rbp]
- xor rcx, QWORD PTR fs:40
- je .L14
- call __stack_chk_fail@PLT
- .L14:
- leave
- ret
- .size main, .-main
- .section .rodata
- .align 8
- .LC0:
- .long 0
- .long 1072693248
- .align 8
- .LC7:
- .long 0
- .long -1074790400
- .align 8
- .LC9:
- .long 0
- .long 1078525952
- .ident "GCC: (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0"
- .section .note.GNU-stack,"",@progbits
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement