// File: /workspace/github_cpp_makefile_star2_O1/fiveseven-lambda[P]michaelis-menten/a.cpp
// Function: bezier(Vector<double>, Vector<double>, Vector<double>, double)
std::vector<XPoint> bezier(Vector<double> p1, Vector<double> p2, Vector<double> p3, double w){
	p1.x *= width;
	p1.y *= height;
	p2.x *= width;
	p2.y *= height;
	p3.x *= width;
	p3.y *= height;
	p1 -= p3;
	p2 -= p3;
	int n = std::max({p1.x - p2.x, p2.x - p1.x, p1.y - p2.y, p2.y - p1.y});
	std::vector<XPoint> ret(n * 2);
	for(int i = 0; i < n; ++i){
		double t = static_cast<double>(i) / (n - 1);
		Vector<double> p = (1 - t) * (1 - t) * p1 + t * t * p2;
		Vector<double> v = (t - 1) * p1 + t * p2;
		v *= w / v.abs();
		ret[i].x = p3.x + p.x - v.y;
		ret[i].y = p3.y + p.y + v.x;
		ret[n * 2 - i - 1].x = p3.x + p.x + v.y;
		ret[n * 2 - i - 1].y = p3.y + p.y - v.x;
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
cvtsi2sdl 0x4c86(%rip), %xmm8 # 0x71a0
cvtsi2sdl 0x4c82(%rip), %xmm7 # 0x71a4
mulsd %xmm8, %xmm0
mulsd %xmm7, %xmm1
mulsd %xmm8, %xmm2
mulsd %xmm7, %xmm3
mulsd %xmm8, %xmm4
mulsd %xmm7, %xmm5
subsd %xmm4, %xmm0
subsd %xmm5, %xmm1
subsd %xmm4, %xmm2
subsd %xmm5, %xmm3
movapd %xmm0, %xmm7
subsd %xmm2, %xmm7
leaq -0xa0(%rbp), %rax
movsd %xmm7, (%rax)
movapd %xmm2, %xmm7
subsd %xmm0, %xmm7
movsd %xmm7, 0x8(%rax)
movapd %xmm1, %xmm7
subsd %xmm3, %xmm7
movsd %xmm7, 0x10(%rax)
movapd %xmm3, %xmm7
subsd %xmm1, %xmm7
movsd %xmm7, 0x18(%rax)
movl $0x8, %ecx
movsd -0xa0(%rbp,%rcx), %xmm7
ucomisd (%rax), %xmm7
jbe 0x25a5
leaq (%rcx,%rbp), %rax
addq $-0xa0, %rax
addq $0x8, %rcx
cmpq $0x20, %rcx
jne 0x258c
cvttsd2si (%rax), %r14d
leal (%r14,%r14), %r15d
movslq %r15d, %rsi
leaq -0xa0(%rbp), %rdx
movq %rbx, %rdi
movsd %xmm6, -0x60(%rbp)
movsd %xmm5, -0x58(%rbp)
movsd %xmm4, -0x50(%rbp)
movsd %xmm3, -0x48(%rbp)
movsd %xmm2, -0x40(%rbp)
movsd %xmm1, -0x38(%rbp)
movsd %xmm0, -0x30(%rbp)
callq 0x40f0
testl %r14d, %r14d
jle 0x2735
leal -0x1(%r14), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x28(%rbp)
movl %r15d, %eax
movl %r14d, %r14d
leaq -0x2(,%rax,4), %r15
xorl %r12d, %r12d
xorps %xmm7, %xmm7
cvtsi2sd %r12d, %xmm7
divsd -0x28(%rbp), %xmm7
movsd 0x29dc(%rip), %xmm0     # 0x5008
subsd %xmm7, %xmm0
mulsd %xmm0, %xmm0
movsd -0x30(%rbp), %xmm5
movapd %xmm5, %xmm1
mulsd %xmm0, %xmm1
movsd -0x38(%rbp), %xmm4
mulsd %xmm4, %xmm0
movapd %xmm7, %xmm6
mulsd %xmm7, %xmm6
movsd -0x40(%rbp), %xmm3
movapd %xmm3, %xmm2
mulsd %xmm6, %xmm2
addsd %xmm1, %xmm2
movsd %xmm2, -0x78(%rbp)
movsd -0x48(%rbp), %xmm2
mulsd %xmm2, %xmm6
addsd %xmm0, %xmm6
movsd %xmm6, -0x80(%rbp)
movapd %xmm7, %xmm0
addsd 0x298a(%rip), %xmm0     # 0x5010
movapd %xmm5, %xmm1
mulsd %xmm0, %xmm1
mulsd %xmm4, %xmm0
mulsd %xmm7, %xmm3
addsd %xmm1, %xmm3
movsd %xmm3, -0x68(%rbp)
mulsd %xmm2, %xmm7
addsd %xmm0, %xmm7
movsd %xmm7, -0x70(%rbp)
movapd %xmm3, %xmm0
movapd %xmm7, %xmm1
callq 0x2080
movsd -0x60(%rbp), %xmm1
divsd %xmm0, %xmm1
movsd -0x68(%rbp), %xmm4
mulsd %xmm1, %xmm4
mulsd -0x70(%rbp), %xmm1
movsd -0x78(%rbp), %xmm2
addsd -0x50(%rbp), %xmm2
movapd %xmm2, %xmm0
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movq (%rbx), %rcx
movw %ax, (%rcx,%r12,4)
movsd -0x80(%rbp), %xmm3
addsd -0x58(%rbp), %xmm3
movapd %xmm3, %xmm0
addsd %xmm4, %xmm0
cvttsd2si %xmm0, %eax
movw %ax, 0x2(%rcx,%r12,4)
addsd %xmm1, %xmm2
cvttsd2si %xmm2, %eax
movw %ax, -0x2(%rcx,%r15)
subsd %xmm4, %xmm3
cvttsd2si %xmm3, %eax
movw %ax, (%rcx,%r15)
incq %r12
addq $-0x4, %r15
cmpq %r12, %r14
jne 0x2617
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq