// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movsd %xmm6, -0x60(%rbp)
movq %rdi, %rbx
cvtsi2sdl 0x5d03(%rip), %xmm7 # 0x81a0
mulsd %xmm7, %xmm0
cvtsi2sdl 0x5cfb(%rip), %xmm6 # 0x81a4
mulsd %xmm6, %xmm1
mulsd %xmm7, %xmm2
mulsd %xmm6, %xmm3
mulsd %xmm7, %xmm4
mulsd %xmm6, %xmm5
movapd %xmm0, %xmm6
subsd %xmm4, %xmm6
movsd %xmm6, -0x30(%rbp)
subsd %xmm5, %xmm1
movsd %xmm4, -0x50(%rbp)
subsd %xmm4, %xmm2
movsd %xmm2, -0x40(%rbp)
movsd %xmm5, -0x58(%rbp)
subsd %xmm5, %xmm3
movapd %xmm6, %xmm0
subsd %xmm2, %xmm0
leaq -0x90(%rbp), %r14
movsd %xmm0, (%r14)
movapd %xmm2, %xmm0
subsd %xmm6, %xmm0
movsd %xmm0, 0x8(%r14)
movsd %xmm1, -0x38(%rbp)
movapd %xmm1, %xmm0
movsd %xmm3, -0x48(%rbp)
subsd %xmm3, %xmm0
movsd %xmm0, 0x10(%r14)
movapd %xmm3, %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x18(%r14)
pushq $0x4
popq %rsi
movq %r14, %rdi
callq 0x3c6d
cvttsd2si %xmm0, %r13d
leal (,%r13,2), %eax
movslq %eax, %rsi
leaq -0x90(%rbp), %rdx
movq %rbx, %rdi
callq 0x3c80
movsd -0x30(%rbp), %xmm6
movsd -0x38(%rbp), %xmm5
movsd -0x40(%rbp), %xmm4
movsd -0x48(%rbp), %xmm3
leal -0x1(%r13), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x68(%rbp)
xorl %r15d, %r15d
testl %r13d, %r13d
movl $0x0, %r12d
cmovgl %r13d, %r12d
leal -0x1(,%r13,2), %r13d
cmpq %r15, %r12
je 0x26c9
cvtsi2sd %r15d, %xmm7
divsd -0x68(%rbp), %xmm7
movapd %xmm7, %xmm0
addsd 0x2a59(%rip), %xmm0     # 0x5008
movapd %xmm6, %xmm1
mulsd %xmm0, %xmm1
mulsd %xmm5, %xmm0
movapd %xmm4, %xmm2
mulsd %xmm7, %xmm2
addsd %xmm1, %xmm2
movapd %xmm3, %xmm1
movsd %xmm7, -0x70(%rbp)
mulsd %xmm7, %xmm1
addsd %xmm0, %xmm1
movsd %xmm2, -0x90(%rbp)
movsd %xmm1, -0x88(%rbp)
movq %r14, %rdi
callq 0x3cd2
movsd 0x2a18(%rip), %xmm1     # 0x5010
movsd -0x70(%rbp), %xmm4
subsd %xmm4, %xmm1
mulsd %xmm4, %xmm4
movsd -0x48(%rbp), %xmm6
movapd %xmm6, %xmm3
mulsd %xmm4, %xmm3
mulsd %xmm1, %xmm1
movsd -0x38(%rbp), %xmm8
movapd %xmm8, %xmm2
mulsd %xmm1, %xmm2
movsd -0x40(%rbp), %xmm7
mulsd %xmm7, %xmm4
movsd -0x30(%rbp), %xmm9
mulsd %xmm9, %xmm1
addsd %xmm4, %xmm1
movsd -0x60(%rbp), %xmm4
divsd %xmm0, %xmm4
movsd -0x90(%rbp), %xmm0
mulsd %xmm4, %xmm0
mulsd -0x88(%rbp), %xmm4
addsd -0x50(%rbp), %xmm1
movapd %xmm1, %xmm5
subsd %xmm4, %xmm5
cvttsd2si %xmm5, %eax
addsd %xmm3, %xmm2
movq (%rbx), %rcx
movw %ax, (%rcx,%r15,4)
addsd -0x58(%rbp), %xmm2
movapd %xmm2, %xmm3
addsd %xmm0, %xmm3
cvttsd2si %xmm3, %eax
movw %ax, 0x2(%rcx,%r15,4)
addsd %xmm4, %xmm1
cvttsd2si %xmm1, %eax
movslq %r13d, %r13
subsd %xmm0, %xmm2
cvttsd2si %xmm2, %edx
movw %ax, (%rcx,%r13,4)
movw %dx, 0x2(%rcx,%r13,4)
incq %r15
decl %r13d
movapd %xmm6, %xmm3
movapd %xmm7, %xmm4
movapd %xmm8, %xmm5
movapd %xmm9, %xmm6
jmp 0x2590
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x4130
movq %r14, %rdi
callq 0x2280