// File: /workspace/github_c_makefile_star2_O0/eitijupaenoithoowohd[P]TBezierInterpolation/TBezierInterpolation.cpp
// Function: main
int main()
{
	vector<Point2D> testValues;
	vector<Segment> spline;
	Point2D p;

	testValues.push_back(Point2D(0, 0));
	testValues.push_back(Point2D(20, 0));
	testValues.push_back(Point2D(45, -47));
	testValues.push_back(Point2D(53, 335));
	testValues.push_back(Point2D(57, 26));
	testValues.push_back(Point2D(62, 387));
	testValues.push_back(Point2D(74, 104));
	testValues.push_back(Point2D(89, 0));
	testValues.push_back(Point2D(95, 100));
	testValues.push_back(Point2D(100, 0));

	calculateSpline(testValues, spline);

	for (auto s : spline)
	{
		for (int i = 0; i < RESOLUTION; ++i)
		{
			s.calc((double)i / (double)RESOLUTION, p);
			cout << p.x << " " << p.y << endl;
		}
	}

	cout << testValues.back().x << " " << testValues.back().y << endl;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movl $0x0, -0x4(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x2040
leaq -0x38(%rbp), %rdi
callq 0x2060
leaq -0x48(%rbp), %rdi
callq 0x1de0
jmp 0x195f
leaq -0x68(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x20b0
jmp 0x1970
leaq -0x20(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x2080
jmp 0x197f
leaq -0x78(%rbp), %rdi
movsd 0x2695(%rip), %xmm0     # 0x4020
xorps %xmm1, %xmm1
callq 0x20b0
jmp 0x1995
leaq -0x20(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x2080
jmp 0x19a4
leaq -0x88(%rbp), %rdi
movsd 0x2675(%rip), %xmm0     # 0x4028
movsd 0x2675(%rip), %xmm1     # 0x4030
callq 0x20b0
jmp 0x19c2
leaq -0x20(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x2080
jmp 0x19d4
leaq -0x98(%rbp), %rdi
movsd 0x2655(%rip), %xmm0     # 0x4038
movsd 0x2655(%rip), %xmm1     # 0x4040
callq 0x20b0
jmp 0x19f2
leaq -0x20(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x2080
jmp 0x1a04
leaq -0xa8(%rbp), %rdi
movsd 0x2635(%rip), %xmm0     # 0x4048
movsd 0x2635(%rip), %xmm1     # 0x4050
callq 0x20b0
jmp 0x1a22
leaq -0x20(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x2080
jmp 0x1a34
leaq -0xb8(%rbp), %rdi
movsd 0x2615(%rip), %xmm0     # 0x4058
movsd 0x2615(%rip), %xmm1     # 0x4060
callq 0x20b0
jmp 0x1a52
leaq -0x20(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x2080
jmp 0x1a64
leaq -0xc8(%rbp), %rdi
movsd 0x25f5(%rip), %xmm0     # 0x4068
movsd 0x25f5(%rip), %xmm1     # 0x4070
callq 0x20b0
jmp 0x1a82
leaq -0x20(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x2080
jmp 0x1a94
leaq -0xd8(%rbp), %rdi
movsd 0x25d5(%rip), %xmm0     # 0x4078
xorps %xmm1, %xmm1
callq 0x20b0
jmp 0x1aad
leaq -0x20(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x2080
jmp 0x1abf
leaq -0xe8(%rbp), %rdi
movsd 0x25b2(%rip), %xmm0     # 0x4080
movsd 0x25b2(%rip), %xmm1     # 0x4088
callq 0x20b0
jmp 0x1add
leaq -0x20(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x2080
jmp 0x1aef
leaq -0xf8(%rbp), %rdi
movsd 0x258a(%rip), %xmm0     # 0x4088
xorps %xmm1, %xmm1
callq 0x20b0
jmp 0x1b08
leaq -0x20(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x2080
jmp 0x1b1a
leaq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x1290
jmp 0x1b29
leaq -0x38(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rdi
callq 0x20e0
movq %rax, -0x108(%rbp)
movq -0x100(%rbp), %rdi
callq 0x2110
movq %rax, -0x110(%rbp)
leaq -0x108(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x2140
testb $0x1, %al
jne 0x1b76
jmp 0x1c84
leaq -0x108(%rbp), %rdi
callq 0x2180
movq %rax, %rsi
leaq -0x150(%rbp), %rdi
movl $0x40, %edx
callq 0x10a0
movl $0x0, -0x154(%rbp)
cmpl $0x20, -0x154(%rbp)
jge 0x1c71
cvtsi2sdl -0x154(%rbp), %xmm0
movsd 0x24d3(%rip), %xmm1     # 0x4090
mulsd %xmm1, %xmm0
leaq -0x150(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x21a0
jmp 0x1bd3
movsd -0x48(%rbp), %xmm0
movq 0x53f9(%rip), %rdi      # 0x6fd8
callq 0x1140
movq %rax, -0x160(%rbp)
jmp 0x1bed
movq -0x160(%rbp), %rdi
leaq 0x24b5(%rip), %rsi      # 0x40b0
callq 0x10d0
movq %rax, -0x168(%rbp)
jmp 0x1c09
movq -0x168(%rbp), %rdi
movsd -0x40(%rbp), %xmm0
callq 0x1140
movq %rax, -0x170(%rbp)
jmp 0x1c23
movq -0x170(%rbp), %rdi
movq 0x5397(%rip), %rsi      # 0x6fc8
callq 0x10f0
jmp 0x1c38
jmp 0x1c3a
movl -0x154(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x154(%rbp)
jmp 0x1ba0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x2330
leaq -0x20(%rbp), %rdi
callq 0x2390
jmp 0x1d1f
jmp 0x1c73
leaq -0x108(%rbp), %rdi
callq 0x22d0
jmp 0x1b5a
leaq -0x20(%rbp), %rdi
callq 0x22f0
movsd (%rax), %xmm0
movq 0x5340(%rip), %rdi      # 0x6fd8
callq 0x1140
movq %rax, -0x178(%rbp)
jmp 0x1ca6
movq -0x178(%rbp), %rdi
leaq 0x23fc(%rip), %rsi      # 0x40b0
callq 0x10d0
movq %rax, -0x180(%rbp)
jmp 0x1cc2
leaq -0x20(%rbp), %rdi
callq 0x22f0
movq -0x180(%rbp), %rdi
movsd 0x8(%rax), %xmm0
callq 0x1140
movq %rax, -0x188(%rbp)
jmp 0x1ce5
movq -0x188(%rbp), %rdi
movq 0x52d5(%rip), %rsi      # 0x6fc8
callq 0x10f0
jmp 0x1cfa
movl $0x0, -0x4(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x2330
leaq -0x20(%rbp), %rdi
callq 0x2390
movl -0x4(%rbp), %eax
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x1130
nopl (%rax,%rax)