// File: /workspace/github_cpp_makefile_star2_O1/skaringa[P]DistanceCalculation/Sample.cpp
// Function: main
int main()
{
	list<DistanceCalculator*> calcs;
	calcs.push_back(new ReallySimpleDistanceCalculator());
	calcs.push_back(new SimpleDistanceCalculator());
	calcs.push_back(new SphereDistanceCalculator());
	calcs.push_back(new SphereDistanceHaversineCalculator());
	calcs.push_back(new GeodDistanceCalculator());

	Point rue1(49.9917, 8.41321, "Ruesselsheim Station");
	Point rue2(50.0049, 8.42182, "Ruesselsheim Opel bridge");
	compareDistanceCalculators(rue1, rue2, calcs);
	
	Point berlin(52.5164, 13.3777, "Berlin Brandenburg Gate");
	Point lissabon(38.692668, -9.177944, "Lisbon Tagus bridge");
	compareDistanceCalculators(berlin, lissabon, calcs);

	// negativ coordinates
	Point montevideo(-34.81816, -56.21383, "Montevideo, Uruguay");
	compareDistanceCalculators(berlin, montevideo, calcs);

	// very small distance 
	Point near0(50.0, 8.0, "testpoint");
	Point near1m(50.000008985, 8.0, "testpoint+1m");
	compareDistanceCalculators(near0, near1m, calcs);
	Point near1cm(50.00000009, 8.0, "testpoint+1cm");
	compareDistanceCalculators(near0, near1cm, calcs);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rsp, %r14
movq %r14, 0x8(%r14)
movq %r14, (%r14)
movq $0x0, 0x10(%r14)
movl $0x8, %edi
callq 0x2180
movq %rax, %rbx
leaq 0x3421(%rip), %rax      # 0x5cd8
movq %rax, (%rbx)
movl $0x18, %edi
callq 0x2180
movq %rbx, 0x10(%rax)
movq %rsp, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2040
incq 0x10(%rbx)
movl $0x8, %edi
callq 0x2180
movq %rax, %rbx
leaq 0x3422(%rip), %rax      # 0x5d10
movq %rax, (%rbx)
movl $0x18, %edi
callq 0x2180
movq %rbx, 0x10(%rax)
movq %rsp, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2040
incq 0x10(%rbx)
movl $0x8, %edi
callq 0x2180
movq %rax, %rbx
leaq 0x3423(%rip), %rax      # 0x5d48
movq %rax, (%rbx)
movl $0x18, %edi
callq 0x2180
movq %rbx, 0x10(%rax)
movq %rsp, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2040
incq 0x10(%rbx)
movl $0x8, %edi
callq 0x2180
movq %rax, %rbx
leaq 0x3424(%rip), %rax      # 0x5d80
movq %rax, (%rbx)
movl $0x18, %edi
callq 0x2180
movq %rbx, 0x10(%rax)
movq %rsp, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2040
incq 0x10(%rbx)
movl $0x8, %edi
callq 0x2180
movq %rax, %rbx
leaq 0x329d(%rip), %rax      # 0x5c30
addq $0x10, %rax
movq %rax, (%rbx)
movl $0x18, %edi
callq 0x2180
movq %rbx, 0x10(%rax)
movq %rsp, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2040
incq 0x10(%rbx)
leaq 0x108(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x16e2(%rip), %rsi      # 0x40b0
leaq 0x16ef(%rip), %rdx      # 0x40c4
leaq 0xf8(%rsp), %rdi
callq 0x389e
leaq 0x328f(%rip), %r15      # 0x5c78
addq $0x10, %r15
leaq 0x1d8(%rsp), %rdi
movq %r15, -0x18(%rdi)
movabsq $0x4048fef0068db8bb, %rax # imm = 0x4048FEF0068DB8BB
movq %rax, -0x10(%rdi)
movabsq $0x4020d39042d8c2a4, %rax # imm = 0x4020D39042D8C2A4
movq %rax, -0x8(%rdi)
leaq 0x1e8(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0xf8(%rsp), %rsi
movq 0x100(%rsp), %rdx
addq %rsi, %rdx
callq 0x380e
movq 0xf8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2a56
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0x60(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x165e(%rip), %rsi      # 0x40c5
leaq 0x166f(%rip), %rdx      # 0x40dd
leaq 0x50(%rsp), %rdi
callq 0x389e
leaq 0x110(%rsp), %rdi
movq %r15, -0x18(%rdi)
movabsq $0x404900a0902de00d, %rax # imm = 0x404900A0902DE00D
movq %rax, -0x10(%rdi)
movabsq $0x4020d7f8ca8198f2, %rax # imm = 0x4020D7F8CA8198F2
movq %rax, -0x8(%rdi)
leaq 0x120(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
callq 0x380e
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x2ad5
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0x1c0(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
movq %rsp, %rdx
callq 0x3250
leaq 0xd0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x15dd(%rip), %rsi      # 0x40de
leaq 0x15ed(%rip), %rdx      # 0x40f5
leaq 0xc0(%rsp), %rdi
callq 0x389e
leaq 0x68(%rsp), %rdi
movq %r15, -0x18(%rdi)
movabsq $0x404a4219652bd3c3, %rax # imm = 0x404A4219652BD3C3
movq %rax, -0x10(%rdi)
movabsq $0x402ac161e4f765fe, %rax # imm = 0x402AC161E4F765FE
movq %rax, -0x8(%rdi)
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0xc0(%rsp), %rsi
movq 0xc8(%rsp), %rdx
addq %rsi, %rdx
callq 0x380e
movq 0xc0(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b78
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0x98(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x156a(%rip), %rsi      # 0x40f6
leaq 0x1576(%rip), %rdx      # 0x4109
leaq 0x88(%rsp), %rdi
callq 0x389e
leaq 0xd8(%rsp), %rdi
movq %r15, -0x18(%rdi)
movabsq $0x404358a958537e2c, %rax # imm = 0x404358A958537E2C
movq %rax, -0x10(%rdi)
movabsq $-0x3fdda4e48626f60e, %rax # imm = 0xC0225B1B79D909F2
movq %rax, -0x8(%rdi)
leaq 0xe8(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
addq %rsi, %rdx
callq 0x380e
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x2c09
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0x50(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movq %rsp, %rdx
callq 0x3250
leaq 0x28(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x14db(%rip), %rsi      # 0x410a
leaq 0x14e7(%rip), %rdx      # 0x411d
leaq 0x18(%rsp), %rdi
callq 0x389e
leaq 0xa0(%rsp), %rdi
movq %r15, -0x18(%rdi)
movabsq $-0x3fbe9746887a8d65, %rax # imm = 0xC04168B97785729B
movq %rax, -0x10(%rdi)
movabsq $-0x3fb3e4a137f38c54, %rax # imm = 0xC04C1B5EC80C73AC
movq %rax, -0x8(%rdi)
leaq 0xb0(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq %rsi, %rdx
callq 0x380e
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x2c9d
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0x50(%rsp), %rdi
leaq 0x88(%rsp), %rsi
movq %rsp, %rdx
callq 0x3250
leaq 0x178(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1458(%rip), %rsi      # 0x411e
leaq 0x145a(%rip), %rdx      # 0x4127
leaq 0x168(%rsp), %rdi
callq 0x389e
leaq 0x30(%rsp), %rdi
movq %r15, -0x18(%rdi)
movabsq $0x4049000000000000, %rax # imm = 0x4049000000000000
movq %rax, -0x10(%rdi)
movabsq $0x4020000000000000, %rbx # imm = 0x4020000000000000
movq %rbx, -0x8(%rdi)
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x168(%rsp), %rsi
movq 0x170(%rsp), %rdx
addq %rsi, %rdx
callq 0x380e
movq 0x168(%rsp), %rdi
cmpq %r12, %rdi
je 0x2d3d
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0x140(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x13d8(%rip), %rsi      # 0x4128
leaq 0x13dd(%rip), %rdx      # 0x4134
leaq 0x130(%rsp), %rdi
callq 0x389e
leaq 0x180(%rsp), %rdi
movq %r15, -0x18(%rdi)
movabsq $0x404900004b5f23fd, %rax # imm = 0x404900004B5F23FD
movq %rax, -0x10(%rdi)
movq %rbx, -0x8(%rdi)
leaq 0x190(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x130(%rsp), %rsi
movq 0x138(%rsp), %rdx
addq %rsi, %rdx
callq 0x380e
movq 0x130(%rsp), %rdi
cmpq %r13, %rdi
je 0x2dc4
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0x18(%rsp), %rdi
leaq 0x168(%rsp), %rsi
movq %rsp, %rdx
callq 0x3250
leaq 0x1b0(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x1349(%rip), %rsi      # 0x4135
leaq 0x134f(%rip), %rdx      # 0x4142
leaq 0x1a0(%rsp), %rdi
callq 0x389e
leaq 0x148(%rsp), %rdi
movq %r15, -0x18(%rdi)
movabsq $0x4049000000c14606, %rax # imm = 0x4049000000C14606
movq %rax, -0x10(%rdi)
movq %rbx, -0x8(%rdi)
leaq 0x158(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x1a0(%rsp), %rsi
movq 0x1a8(%rsp), %rdx
addq %rsi, %rdx
callq 0x380e
movq 0x1a0(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2e5f
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0x18(%rsp), %rdi
leaq 0x130(%rsp), %rsi
movq %rsp, %rbx
movq %rbx, %rdx
callq 0x3250
movq %r15, 0x130(%rsp)
movq 0x148(%rsp), %rdi
cmpq %r13, %rdi
je 0x2e9c
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x2190
movq %r15, 0x168(%rsp)
movq 0x180(%rsp), %rdi
cmpq %r12, %rdi
leaq 0x1e8(%rsp), %r14
leaq 0x120(%rsp), %r12
leaq 0x78(%rsp), %r13
je 0x2ed6
movq 0x190(%rsp), %rsi
incq %rsi
callq 0x2190
movq %r15, 0x18(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x2ef7
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2190
movq %r15, 0x88(%rsp)
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x2f24
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x2190
movq %r15, 0xc0(%rsp)
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x2f51
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x2190
movq %r15, 0x50(%rsp)
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x2f6d
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2190
movq %r15, 0xf8(%rsp)
movq 0x110(%rsp), %rdi
cmpq %r12, %rdi
je 0x2f92
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x2190
movq %r15, 0x1c0(%rsp)
movq 0x1d8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2fb7
movq 0x1e8(%rsp), %rsi
incq %rsi
callq 0x2190
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x2fd5
movq (%rdi), %r14
movl $0x18, %esi
callq 0x2190
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x2fc0
xorl %eax, %eax
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, 0x130(%rsp)
movq 0x148(%rsp), %rdi
cmpq %r13, %rdi
je 0x3032
movq 0x158(%rsp), %rsi
jmp 0x3023
movq %rax, %rbx
movq 0x1a0(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3032
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x3032
jmp 0x302f
movq %rax, %rbx
movq %r15, 0x168(%rsp)
movq 0x180(%rsp), %rdi
cmpq %r12, %rdi
je 0x3076
movq 0x190(%rsp), %rsi
jmp 0x3069
movq %rax, %rbx
movq 0x130(%rsp), %rdi
cmpq %r13, %rdi
je 0x3076
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x3076
movq %rax, %rbx
movq %r15, 0x18(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x30b8
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x30b8
movq %rax, %rbx
movq 0x168(%rsp), %rdi
cmpq %r12, %rdi
je 0x30b8
movq 0x178(%rsp), %rsi
jmp 0x308f
jmp 0x30b5
movq %rax, %rbx
movq %r15, 0x88(%rsp)
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x3100
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x3100
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x3100
movq 0x28(%rsp), %rsi
jmp 0x30dd
jmp 0x30fd
movq %rax, %rbx
movq %r15, 0xc0(%rsp)
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x312d
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x2190
movq %r15, 0x50(%rsp)
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x318e
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x318e
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x312d
movq 0x98(%rsp), %rsi
jmp 0x3125
movq %rax, %rbx
jmp 0x312d
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r12, %rdi
je 0x318e
movq 0xd0(%rsp), %rsi
jmp 0x3146
jmp 0x318b
movq %rax, %rbx
movq %r15, 0xf8(%rsp)
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x31bb
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x2190
movq %r15, 0x1c0(%rsp)
movq 0x1d8(%rsp), %rdi
leaq 0x1e8(%rsp), %rax
cmpq %rax, %rdi
je 0x322a
movq 0x1e8(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x322a
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x31bb
movq 0x60(%rsp), %rsi
jmp 0x31b3
movq %rax, %rbx
jmp 0x31bb
movq %rax, %rbx
movq 0xf8(%rsp), %rdi
cmpq %r12, %rdi
je 0x322a
movq 0x108(%rsp), %rsi
jmp 0x31e0
jmp 0x3227
jmp 0x3227
jmp 0x3227
jmp 0x3227
jmp 0x3227
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3248
movq (%rdi), %r15
movl $0x18, %esi
callq 0x2190
movq %r15, %rdi
cmpq %r14, %r15
jne 0x3233
movq %rbx, %rdi
callq 0x2230