// File: /workspace/github_cpp_makefile_star2_O3/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 $0x208, %rsp            # imm = 0x208
leaq 0x10(%rsp), %r14
movq %r14, 0x8(%r14)
movq %r14, (%r14)
movq $0x0, 0x10(%r14)
movl $0x8, %edi
callq 0x2180
movq %rax, %rbx
leaq 0x341f(%rip), %rax      # 0x5cd8
movq %rax, (%rbx)
movl $0x18, %edi
callq 0x2180
movq %rbx, 0x10(%rax)
leaq 0x10(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2040
incq 0x10(%rbx)
movl $0x8, %edi
callq 0x2180
movq %rax, %rbx
leaq 0x341e(%rip), %rax      # 0x5d10
movq %rax, (%rbx)
movl $0x18, %edi
callq 0x2180
movq %rbx, 0x10(%rax)
leaq 0x10(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2040
incq 0x10(%rbx)
movl $0x8, %edi
callq 0x2180
movq %rax, %rbx
leaq 0x341d(%rip), %rax      # 0x5d48
movq %rax, (%rbx)
movl $0x18, %edi
callq 0x2180
movq %rbx, 0x10(%rax)
leaq 0x10(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2040
incq 0x10(%rbx)
movl $0x8, %edi
callq 0x2180
movq %rax, %rbx
leaq 0x341c(%rip), %rax      # 0x5d80
movq %rax, (%rbx)
movl $0x18, %edi
callq 0x2180
movq %rbx, 0x10(%rax)
leaq 0x10(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2040
incq 0x10(%rbx)
movl $0x8, %edi
callq 0x2180
movq %rax, %rbx
leaq 0x3293(%rip), %rax      # 0x5c30
addq $0x10, %rax
movq %rax, (%rbx)
movl $0x18, %edi
callq 0x2180
movq %rbx, 0x10(%rax)
leaq 0x10(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2040
incq 0x10(%rbx)
leaq 0xe0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1756(%rip), %rsi      # 0x4130
leaq 0x1763(%rip), %rdx      # 0x4144
leaq 0xd0(%rsp), %rdi
callq 0x383a
leaq 0x3283(%rip), %r15      # 0x5c78
addq $0x10, %r15
leaq 0x1e8(%rsp), %rdi
movq %r15, -0x18(%rdi)
movaps 0x1674(%rip), %xmm0     # 0x4080
movups %xmm0, -0x10(%rdi)
leaq 0x1f8(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rdx
addq %rsi, %rdx
callq 0x37a4
movq 0xd0(%rsp), %rdi
cmpq %r12, %rdi
je 0x2a51
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x16e3(%rip), %rsi      # 0x4145
leaq 0x16f4(%rip), %rdx      # 0x415d
leaq 0x28(%rsp), %rdi
callq 0x383a
leaq 0xe8(%rsp), %rdi
movq %r15, -0x18(%rdi)
movaps 0x160a(%rip), %xmm0     # 0x4090
movups %xmm0, -0x10(%rdi)
leaq 0xf8(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
callq 0x37a4
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x2abf
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0x1d0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3222
leaq 0xa8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1671(%rip), %rsi      # 0x415e
leaq 0x1681(%rip), %rdx      # 0x4175
leaq 0x98(%rsp), %rdi
callq 0x383a
leaq 0x40(%rsp), %rdi
movq %r15, -0x18(%rdi)
movaps 0x158f(%rip), %xmm0     # 0x40a0
movups %xmm0, -0x10(%rdi)
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
addq %rsi, %rdx
callq 0x37a4
movq 0x98(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b53
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0x188(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x160f(%rip), %rsi      # 0x4176
leaq 0x161b(%rip), %rdx      # 0x4189
leaq 0x178(%rsp), %rdi
callq 0x383a
leaq 0xb0(%rsp), %rdi
movq %r15, -0x18(%rdi)
movaps 0x1522(%rip), %xmm0     # 0x40b0
movups %xmm0, -0x10(%rdi)
leaq 0xc0(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x178(%rsp), %rsi
movq 0x180(%rsp), %rdx
addq %rsi, %rdx
callq 0x37a4
movq 0x178(%rsp), %rdi
cmpq %r12, %rdi
je 0x2bd3
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0x28(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3222
leaq 0x118(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x158c(%rip), %rsi      # 0x418a
leaq 0x1598(%rip), %rdx      # 0x419d
leaq 0x108(%rsp), %rdi
callq 0x383a
leaq 0x190(%rsp), %rdi
movq %r15, -0x18(%rdi)
movaps 0x149b(%rip), %xmm0     # 0x40c0
movups %xmm0, -0x10(%rdi)
leaq 0x1a0(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rdx
addq %rsi, %rdx
callq 0x37a4
movq 0x108(%rsp), %rdi
cmpq %r12, %rdi
je 0x2c6a
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0x28(%rsp), %rdi
leaq 0x178(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3222
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x150c(%rip), %rsi      # 0x419e
leaq 0x150e(%rip), %rdx      # 0x41a7
leaq 0x60(%rsp), %rdi
callq 0x383a
leaq 0x120(%rsp), %rdi
movq %r15, -0x18(%rdi)
movaps 0x141a(%rip), %xmm0     # 0x40d0
movups %xmm0, -0x10(%rdi)
leaq 0x130(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
addq %rsi, %rdx
callq 0x37a4
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x2cef
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0x150(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x14a6(%rip), %rsi      # 0x41a8
leaq 0x14ab(%rip), %rdx      # 0x41b4
leaq 0x140(%rsp), %rdi
callq 0x383a
leaq 0x78(%rsp), %rdi
movq %r15, -0x18(%rdi)
movaps 0x13ba(%rip), %xmm0     # 0x40e0
movups %xmm0, -0x10(%rdi)
leaq 0x88(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x140(%rsp), %rsi
movq 0x148(%rsp), %rdx
addq %rsi, %rdx
callq 0x37a4
movq 0x140(%rsp), %rdi
cmpq %r13, %rdi
je 0x2d6b
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x2190
movq %rbx, %r12
leaq 0x108(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x3222
leaq 0x1c0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x141d(%rip), %rsi      # 0x41b5
leaq 0x1423(%rip), %rdx      # 0x41c2
leaq 0x1b0(%rsp), %rdi
callq 0x383a
leaq 0x158(%rsp), %rdi
movq %r15, -0x18(%rdi)
movaps 0x1331(%rip), %xmm0     # 0x40f0
movups %xmm0, -0x10(%rdi)
leaq 0x168(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x1b0(%rsp), %rsi
movq 0x1b8(%rsp), %rdx
addq %rsi, %rdx
callq 0x37a4
movq 0x1b0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2e04
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x2190
leaq 0x108(%rsp), %rdi
leaq 0x140(%rsp), %rsi
leaq 0x10(%rsp), %rbx
movq %rbx, %rdx
callq 0x3222
movq %r15, 0x140(%rsp)
movq 0x158(%rsp), %rdi
cmpq %r13, %rdi
je 0x2e46
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x2190
movq %r15, 0x60(%rsp)
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x2e6d
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x2190
movq %r15, 0x108(%rsp)
movq 0x120(%rsp), %rdi
cmpq %r12, %rdi
je 0x2e92
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x2190
movq %r15, 0x178(%rsp)
movq 0x190(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2eb7
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x2190
movq %r15, 0x98(%rsp)
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x2ee4
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x2190
movq %r15, 0x28(%rsp)
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x2f05
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2190
movq %r15, 0xd0(%rsp)
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x2f32
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x2190
movq %r15, 0x1d0(%rsp)
movq 0x1e8(%rsp), %rdi
leaq 0x1f8(%rsp), %rax
cmpq %rax, %rdi
je 0x2f5f
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x2190
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2f7e
movq (%rdi), %r14
movl $0x18, %esi
callq 0x2190
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x2f69
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, 0x8(%rsp)
movq %r15, 0x140(%rsp)
movq 0x158(%rsp), %rdi
cmpq %r13, %rdi
je 0x2fe1
movq 0x168(%rsp), %rsi
jmp 0x2fd0
movq %rax, 0x8(%rsp)
movq 0x1b0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2fe1
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x2fe1
jmp 0x2fdc
movq %rax, 0x8(%rsp)
movq %r15, 0x60(%rsp)
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x3031
movq 0x88(%rsp), %rsi
jmp 0x301f
movq %rbx, %r12
movq %rax, 0x8(%rsp)
movq 0x140(%rsp), %rdi
cmpq %r13, %rdi
je 0x3031
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x3031
movq %rbx, %r12
movq %rax, 0x8(%rsp)
movq %r15, 0x108(%rsp)
movq 0x120(%rsp), %rdi
cmpq %r12, %rdi
je 0x3075
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x3075
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x3075
movq 0x70(%rsp), %rsi
jmp 0x304e
jmp 0x3070
movq %rax, 0x8(%rsp)
movq %r15, 0x178(%rsp)
movq 0x190(%rsp), %rdi
cmpq %rbp, %rdi
je 0x30bf
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x30bf
movq %rax, 0x8(%rsp)
movq 0x108(%rsp), %rdi
cmpq %r12, %rdi
je 0x30bf
movq 0x118(%rsp), %rsi
jmp 0x3092
jmp 0x30ba
movq %rax, 0x8(%rsp)
movq %r15, 0x98(%rsp)
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x30ec
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x2190
movq %r15, 0x28(%rsp)
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x3155
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x3155
movq %rax, 0x8(%rsp)
movq 0x178(%rsp), %rdi
cmpq %r12, %rdi
je 0x30ec
movq 0x188(%rsp), %rsi
jmp 0x30e4
movq %rax, 0x8(%rsp)
jmp 0x30ec
movq %rax, 0x8(%rsp)
movq 0x98(%rsp), %rdi
cmpq %r12, %rdi
je 0x3155
movq 0xa8(%rsp), %rsi
jmp 0x3105
jmp 0x3150
movq %rax, 0x8(%rsp)
movq %r15, 0xd0(%rsp)
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x3182
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x2190
movq %r15, 0x1d0(%rsp)
movq 0x1e8(%rsp), %rdi
leaq 0x1f8(%rsp), %rax
cmpq %rax, %rdi
je 0x31f9
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x31f9
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3182
movq 0x38(%rsp), %rsi
jmp 0x317a
movq %rax, 0x8(%rsp)
jmp 0x3182
movq %rax, 0x8(%rsp)
movq 0xd0(%rsp), %rdi
cmpq %r12, %rdi
je 0x31f9
movq 0xe0(%rsp), %rsi
jmp 0x31a7
jmp 0x31f4
jmp 0x31f4
jmp 0x31f4
jmp 0x31f4
jmp 0x31f4
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x3218
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x2190
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x3203
movq 0x8(%rsp), %rdi
callq 0x2230