// File: /workspace/github_cpp_makefile_star2_O3/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
movsd %xmm6, -0x60(%rbp)
movq %rdi, %rbx
cvtsi2sdl 0x4c82(%rip), %xmm7 # 0x71a0
xorps %xmm6, %xmm6
cvtsi2sdl 0x4c7b(%rip), %xmm6 # 0x71a4
mulsd %xmm7, %xmm0
mulsd %xmm6, %xmm1
mulsd %xmm7, %xmm2
mulsd %xmm6, %xmm3
mulsd %xmm7, %xmm4
mulsd %xmm6, %xmm5
subsd %xmm4, %xmm0
subsd %xmm5, %xmm1
movsd %xmm4, -0x50(%rbp)
subsd %xmm4, %xmm2
movsd %xmm5, -0x58(%rbp)
subsd %xmm5, %xmm3
movapd %xmm0, %xmm4
subsd %xmm2, %xmm4
leaq -0xa0(%rbp), %rax
movsd %xmm4, (%rax)
movsd %xmm2, -0x38(%rbp)
movsd %xmm0, -0x28(%rbp)
subsd %xmm0, %xmm2
movsd %xmm2, 0x8(%rax)
movapd %xmm1, %xmm2
subsd %xmm3, %xmm2
movsd %xmm2, 0x10(%rax)
movsd %xmm3, -0x40(%rbp)
movapd %xmm3, %xmm2
movsd %xmm1, -0x30(%rbp)
subsd %xmm1, %xmm2
movsd %xmm2, 0x18(%rax)
movl $0x8, %ecx
leaq (%rcx,%rbp), %rdx
addq $-0xa0, %rdx
movsd (%rdx), %xmm1
ucomisd %xmm4, %xmm1
cmovaq %rdx, %rax
maxsd %xmm4, %xmm1
addq $0x8, %rcx
movapd %xmm1, %xmm4
cmpq $0x20, %rcx
jne 0x25aa
cvttsd2si (%rax), %r15d
leal (%r15,%r15), %eax
movslq %eax, %r14
leaq -0xa0(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40bc
testl %r15d, %r15d
movsd -0x40(%rbp), %xmm5
movsd -0x38(%rbp), %xmm6
movsd -0x30(%rbp), %xmm7
movsd -0x28(%rbp), %xmm8
jle 0x275f
leal -0x1(%r15), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x48(%rbp)
movl %r15d, %r15d
leaq -0x2(,%r14,4), %r14
xorl %r12d, %r12d
xorps %xmm1, %xmm1
cvtsi2sd %r12d, %xmm1
divsd -0x48(%rbp), %xmm1
movsd 0x29c6(%rip), %xmm0     # 0x5008
subsd %xmm1, %xmm0
mulsd %xmm0, %xmm0
movapd %xmm8, %xmm3
mulsd %xmm0, %xmm3
mulsd %xmm7, %xmm0
movapd %xmm1, %xmm2
mulsd %xmm1, %xmm2
movapd %xmm6, %xmm4
mulsd %xmm2, %xmm4
addsd %xmm3, %xmm4
movsd %xmm4, -0x78(%rbp)
mulsd %xmm5, %xmm2
addsd %xmm0, %xmm2
movsd %xmm2, -0x80(%rbp)
movapd %xmm1, %xmm0
addsd 0x2987(%rip), %xmm0     # 0x5010
movapd %xmm8, %xmm2
mulsd %xmm0, %xmm2
mulsd %xmm7, %xmm0
mulsd %xmm1, %xmm6
addsd %xmm2, %xmm6
movsd %xmm6, -0x68(%rbp)
mulsd %xmm5, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x70(%rbp)
movapd %xmm6, %xmm0
callq 0x2080
movsd -0x28(%rbp), %xmm8
movsd -0x30(%rbp), %xmm7
movsd -0x38(%rbp), %xmm6
movsd -0x40(%rbp), %xmm5
movsd -0x50(%rbp), %xmm4
movsd -0x58(%rbp), %xmm3
movsd -0x60(%rbp), %xmm1
divsd %xmm0, %xmm1
movsd -0x68(%rbp), %xmm11
mulsd %xmm1, %xmm11
mulsd -0x70(%rbp), %xmm1
movsd -0x78(%rbp), %xmm9
addsd %xmm4, %xmm9
movapd %xmm9, %xmm0
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movq (%rbx), %rcx
movw %ax, (%rcx,%r12,4)
movsd -0x80(%rbp), %xmm10
addsd %xmm3, %xmm10
movapd %xmm10, %xmm0
addsd %xmm11, %xmm0
cvttsd2si %xmm0, %eax
movw %ax, 0x2(%rcx,%r12,4)
addsd %xmm1, %xmm9
cvttsd2si %xmm9, %eax
movw %ax, -0x2(%rcx,%r14)
subsd %xmm11, %xmm10
cvttsd2si %xmm10, %eax
movw %ax, (%rcx,%r14)
incq %r12
addq $-0x4, %r14
cmpq %r12, %r15
jne 0x262d
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq