Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .intel_syntax noprefix
- .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 f
- .type f, @function
- f:
- push rbp
- mov rbp, rsp
- movsd QWORD PTR -40[rbp], xmm0 # x
- movsd QWORD PTR -48[rbp], xmm1 # m
- movsd QWORD PTR -56[rbp], xmm2 # n
- movsd xmm0, QWORD PTR .LC0[rip]
- movsd xmm4, xmm0 # sum
- movsd xmm0, QWORD PTR .LC0[rip]
- movsd xmm5, xmm0 # tmp
- pxor xmm0, xmm0
- movsd xmm3, xmm0 # i
- jmp .L2
- .L3:
- movsd xmm0, QWORD PTR -48[rbp]
- subsd xmm0, xmm3
- mulsd xmm0, QWORD PTR -40[rbp]
- movsd xmm2, xmm3
- movsd xmm1, QWORD PTR .LC0[rip]
- addsd xmm1, xmm2
- divsd xmm0, xmm1
- movsd xmm1, xmm5
- mulsd xmm0, xmm1
- movsd xmm5, xmm0
- movsd xmm0, xmm4
- addsd xmm0, xmm5
- movsd xmm4, xmm0
- movsd xmm1, xmm3
- movsd xmm0, QWORD PTR .LC0[rip]
- addsd xmm0, xmm1
- movsd xmm3, xmm0
- .L2:
- movsd xmm0, QWORD PTR -56[rbp]
- comisd xmm0, xmm3
- ja .L3
- movsd xmm0, xmm4
- pop rbp
- ret
- .size f, .-f
- .section .rodata
- .align 8
- .LC0:
- .long 0
- .long 1072693248
- .align 8
- .LC7:
- .long 0
- .long -1074790400
- .align 8
- .LC9:
- .long 0
- .long 1078525952
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement