// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x200, %rsp            # imm = 0x200
leaq 0x8(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
andq $0x0, 0x10(%rax)
pushq $0x8
popq %rdi
callq 0x2190
leaq 0x3598(%rip), %rcx      # 0x5ce0
movq %rcx, (%rax)
leaq 0x170(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0x2db2
pushq $0x8
popq %rdi
callq 0x2190
leaq 0x35a9(%rip), %rcx      # 0x5d18
movq %rcx, (%rax)
leaq 0x170(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0x2db2
pushq $0x8
popq %rdi
callq 0x2190
leaq 0x35ba(%rip), %rcx      # 0x5d50
movq %rcx, (%rax)
leaq 0x170(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0x2db2
pushq $0x8
popq %rdi
callq 0x2190
leaq 0x35cb(%rip), %rcx      # 0x5d88
movq %rcx, (%rax)
leaq 0x170(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0x2db2
pushq $0x8
popq %rdi
callq 0x2190
leaq 0x3454(%rip), %rcx      # 0x5c38
addq $0x10, %rcx
movq %rcx, (%rax)
leaq 0x170(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0x2db2
leaq 0x1919(%rip), %rsi      # 0x4120
leaq 0x1c8(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0x2dbe
leaq 0x170(%rsp), %rdi
movsd 0x1857(%rip), %xmm0     # 0x4080
movsd 0x1857(%rip), %xmm1     # 0x4088
leaq 0x1c8(%rsp), %rsi
callq 0x2dfa
leaq 0x1c8(%rsp), %rdi
callq 0x20b0
leaq 0x18e3(%rip), %rsi      # 0x4135
leaq 0x58(%rsp), %rdi
leaq 0x138(%rsp), %rdx
callq 0x2dbe
leaq 0x1c8(%rsp), %rdi
movsd 0x181c(%rip), %xmm0     # 0x4090
movsd 0x181c(%rip), %xmm1     # 0x4098
leaq 0x58(%rsp), %rsi
callq 0x2dfa
leaq 0x58(%rsp), %rdi
callq 0x20b0
leaq 0x170(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x2c77
leaq 0x189d(%rip), %rsi      # 0x414e
leaq 0x138(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0x2dbe
leaq 0x58(%rsp), %rdi
movsd 0x17cd(%rip), %xmm0     # 0x40a0
movsd 0x17cd(%rip), %xmm1     # 0x40a8
leaq 0x138(%rsp), %rsi
callq 0x2dfa
leaq 0x138(%rsp), %rdi
callq 0x20b0
leaq 0x186a(%rip), %rsi      # 0x4166
leaq 0x100(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x2dbe
leaq 0x138(%rsp), %rdi
movsd 0x1792(%rip), %xmm0     # 0x40b0
movsd 0x1792(%rip), %xmm1     # 0x40b8
leaq 0x100(%rsp), %rsi
callq 0x2dfa
leaq 0x100(%rsp), %rdi
callq 0x20b0
leaq 0x58(%rsp), %rdi
leaq 0x138(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x2c77
leaq 0x181c(%rip), %rsi      # 0x417a
leaq 0x20(%rsp), %rdi
leaq 0xc8(%rsp), %rdx
callq 0x2dbe
leaq 0x100(%rsp), %rdi
movsd 0x1740(%rip), %xmm0     # 0x40c0
movsd 0x1740(%rip), %xmm1     # 0x40c8
leaq 0x20(%rsp), %rsi
callq 0x2dfa
leaq 0x20(%rsp), %rdi
callq 0x20b0
leaq 0x58(%rsp), %rdi
leaq 0x100(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x2c77
leaq 0x17d4(%rip), %rsi      # 0x418e
leaq 0xc8(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x2dbe
leaq 0x20(%rsp), %rdi
movsd 0x16f4(%rip), %xmm0     # 0x40d0
movsd 0x16f4(%rip), %xmm1     # 0x40d8
leaq 0xc8(%rsp), %rsi
callq 0x2dfa
leaq 0xc8(%rsp), %rdi
callq 0x20b0
leaq 0x1793(%rip), %rsi      # 0x4198
leaq 0x90(%rsp), %rdi
leaq 0x1a8(%rsp), %rdx
callq 0x2dbe
leaq 0xc8(%rsp), %rdi
movsd 0x16b6(%rip), %xmm0     # 0x40e0
movsd 0x16a6(%rip), %xmm1     # 0x40d8
leaq 0x90(%rsp), %rsi
callq 0x2dfa
leaq 0x90(%rsp), %rdi
callq 0x20b0
leaq 0x20(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x2c77
leaq 0x173b(%rip), %rsi      # 0x41a5
leaq 0x1a8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x2dbe
leaq 0x90(%rsp), %rdi
movsd 0x165c(%rip), %xmm0     # 0x40e8
movsd 0x1644(%rip), %xmm1     # 0x40d8
leaq 0x1a8(%rsp), %rsi
callq 0x2dfa
leaq 0x1a8(%rsp), %rdi
callq 0x20b0
leaq 0x20(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x2c77
leaq 0x90(%rsp), %rdi
callq 0x26ea
leaq 0xc8(%rsp), %rdi
callq 0x26ea
leaq 0x20(%rsp), %rdi
callq 0x26ea
leaq 0x100(%rsp), %rdi
callq 0x26ea
leaq 0x138(%rsp), %rdi
callq 0x26ea
leaq 0x58(%rsp), %rdi
callq 0x26ea
leaq 0x1c8(%rsp), %rdi
callq 0x26ea
leaq 0x170(%rsp), %rdi
callq 0x26ea
leaq 0x8(%rsp), %rdi
callq 0x31c6
xorl %eax, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
retq
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x26ea
jmp 0x2b65
movq %rax, %rbx
leaq 0x1a8(%rsp), %rdi
callq 0x20b0
jmp 0x2b65
jmp 0x2b62
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x26ea
jmp 0x2b89
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x20b0
jmp 0x2b89
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x26ea
jmp 0x2bac
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x20b0
jmp 0x2bac
jmp 0x2ba9
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x26ea
leaq 0x138(%rsp), %rdi
callq 0x26ea
leaq 0x58(%rsp), %rdi
callq 0x26ea
leaq 0x1c8(%rsp), %rdi
callq 0x26ea
leaq 0x170(%rsp), %rdi
callq 0x26ea
jmp 0x2c65
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x20b0
jmp 0x2bb9
jmp 0x2bfd
movq %rax, %rbx
jmp 0x2bb9
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x20b0
jmp 0x2bc6
movq %rax, %rbx
jmp 0x2bc6
movq %rax, %rbx
leaq 0x138(%rsp), %rdi
callq 0x20b0
jmp 0x2bd0
jmp 0x2c2d
movq %rax, %rbx
jmp 0x2bd0
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x20b0
jmp 0x2bdd
movq %rax, %rbx
jmp 0x2bdd
movq %rax, %rbx
leaq 0x1c8(%rsp), %rdi
callq 0x20b0
jmp 0x2c65
jmp 0x2c62
jmp 0x2c62
jmp 0x2c62
jmp 0x2c62
jmp 0x2c62
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x31c6
movq %rbx, %rdi
callq 0x2230