// File: Proudc[P]CTSS/src/Test.cpp
// Function: main
int main(int argc, char* argv[])
{
	string inputFolder(argv[1]);
	string outputFolder(argv[2]);
	int    startCount    = atoi(argv[3]);
	int    stopCount     = atoi(argv[4]);
	int    mode          = atoi(argv[6]);
	double delta         = atof(argv[5]);
	double sectionLength = atof(argv[7]);

	string nodePath = inputFolder + "/nodeOSM.txt";
	string edgePath = inputFolder + "/edgeOSM.txt";
	Graph* myGraph  = new Graph;
	initializeGraph(myGraph, nodePath, edgePath, delta, sectionLength);

	if (mode == 1)
	{
		eucSimpleQuery(myGraph, inputFolder, outputFolder, startCount, stopCount);
	}
	else if (mode == 2)
	{
		eucContinuousQuery(myGraph, inputFolder, outputFolder, startCount, stopCount);
	}
	else if (mode == 3)
	{
		roadSimpleQuery(myGraph, inputFolder, outputFolder, startCount, stopCount);
	}
	else if (mode == 4)
	{
		roadContinuousQuery(myGraph, inputFolder, outputFolder, startCount, stopCount);
	}
	else
	{
		printf("Sorry, You should enter the correct query mode!\n");
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x220(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x218(%rbp)
callq 0x2250
movq -0x220(%rbp), %rsi
movq -0x218(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0x21b0
jmp 0x2471
leaq -0x31(%rbp), %rdi
callq 0x2180
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x230(%rbp)
leaq -0x69(%rbp), %rdi
movq %rdi, -0x228(%rbp)
callq 0x2250
movq -0x230(%rbp), %rsi
movq -0x228(%rbp), %rdx
leaq -0x68(%rbp), %rdi
callq 0x21b0
jmp 0x24b2
leaq -0x69(%rbp), %rdi
callq 0x2180
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x21f0
movl %eax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x21f0
movl %eax, -0x74(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x21f0
movl %eax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x21a0
movsd %xmm0, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x21a0
movsd %xmm0, -0x88(%rbp)
leaq 0x16b17(%rip), %rdx     # 0x19030
leaq -0xa8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x52a0
jmp 0x252b
leaq 0x16b0b(%rip), %rdx     # 0x1903d
leaq -0xc8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x52a0
jmp 0x2544
movl $0x28, %edi
callq 0x2170
movq %rax, -0x238(%rbp)
jmp 0x2557
movq -0x238(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x240(%rbp)
leaq -0xf0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x2090
jmp 0x2588
leaq -0x110(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x2090
jmp 0x259d
movq -0x240(%rbp), %rdi
movsd -0x80(%rbp), %xmm0
movsd -0x88(%rbp), %xmm1
leaq -0xf0(%rbp), %rsi
leaq -0x110(%rbp), %rdx
callq 0x64d0
jmp 0x25c6
leaq -0x110(%rbp), %rdi
callq 0x20d0
leaq -0xf0(%rbp), %rdi
callq 0x20d0
cmpl $0x1, -0x78(%rbp)
jne 0x272f
movq -0xd0(%rbp), %rax
movq %rax, -0x248(%rbp)
leaq -0x130(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2090
jmp 0x2608
leaq -0x150(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x2090
jmp 0x261a
movq -0x248(%rbp), %rdi
movl -0x70(%rbp), %ecx
movl -0x74(%rbp), %r8d
leaq -0x130(%rbp), %rsi
leaq -0x150(%rbp), %rdx
callq 0x29d0
jmp 0x263d
leaq -0x150(%rbp), %rdi
callq 0x20d0
leaq -0x130(%rbp), %rdi
callq 0x20d0
jmp 0x295a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x2180
jmp 0x29c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x69(%rbp), %rdi
callq 0x2180
jmp 0x29b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x29af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x29a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x2997
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x26e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x20d0
leaq -0xf0(%rbp), %rdi
callq 0x20d0
jmp 0x2997
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x271e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x20d0
leaq -0x130(%rbp), %rdi
callq 0x20d0
jmp 0x2997
cmpl $0x2, -0x78(%rbp)
jne 0x27e2
movq -0xd0(%rbp), %rax
movq %rax, -0x250(%rbp)
leaq -0x170(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2090
jmp 0x2759
leaq -0x190(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x2090
jmp 0x276b
movq -0x250(%rbp), %rdi
movl -0x70(%rbp), %ecx
movl -0x74(%rbp), %r8d
leaq -0x170(%rbp), %rsi
leaq -0x190(%rbp), %rdx
callq 0x3110
jmp 0x278e
leaq -0x190(%rbp), %rdi
callq 0x20d0
leaq -0x170(%rbp), %rdi
callq 0x20d0
jmp 0x2958
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x27d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x20d0
leaq -0x170(%rbp), %rdi
callq 0x20d0
jmp 0x2997
cmpl $0x3, -0x78(%rbp)
jne 0x2895
movq -0xd0(%rbp), %rax
movq %rax, -0x258(%rbp)
leaq -0x1b0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2090
jmp 0x280c
leaq -0x1d0(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x2090
jmp 0x281e
movq -0x258(%rbp), %rdi
movl -0x70(%rbp), %ecx
movl -0x74(%rbp), %r8d
leaq -0x1b0(%rbp), %rsi
leaq -0x1d0(%rbp), %rdx
callq 0x3970
jmp 0x2841
leaq -0x1d0(%rbp), %rdi
callq 0x20d0
leaq -0x1b0(%rbp), %rdi
callq 0x20d0
jmp 0x2956
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x2884
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x20d0
leaq -0x1b0(%rbp), %rdi
callq 0x20d0
jmp 0x2997
cmpl $0x4, -0x78(%rbp)
jne 0x2942
movq -0xd0(%rbp), %rax
movq %rax, -0x260(%rbp)
leaq -0x1f0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2090
jmp 0x28bf
leaq -0x210(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x2090
jmp 0x28d1
movq -0x260(%rbp), %rdi
movl -0x70(%rbp), %ecx
movl -0x74(%rbp), %r8d
leaq -0x1f0(%rbp), %rsi
leaq -0x210(%rbp), %rdx
callq 0x4340
jmp 0x28f4
leaq -0x210(%rbp), %rdi
callq 0x20d0
leaq -0x1f0(%rbp), %rdi
callq 0x20d0
jmp 0x2954
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x2934
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x20d0
leaq -0x1f0(%rbp), %rdi
callq 0x20d0
jmp 0x2997
leaq 0x16701(%rip), %rdi     # 0x1904a
xorl %eax, %eax
callq 0x2040
jmp 0x2952
jmp 0x2954
jmp 0x2956
jmp 0x2958
jmp 0x295a
movl $0x0, -0x4(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x20d0
leaq -0xa8(%rbp), %rdi
callq 0x20d0
leaq -0x68(%rbp), %rdi
callq 0x20d0
leaq -0x30(%rbp), %rdi
callq 0x20d0
movl -0x4(%rbp), %eax
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
leaq -0xc8(%rbp), %rdi
callq 0x20d0
leaq -0xa8(%rbp), %rdi
callq 0x20d0
leaq -0x68(%rbp), %rdi
callq 0x20d0
leaq -0x30(%rbp), %rdi
callq 0x20d0
movq -0x40(%rbp), %rdi
callq 0x2240
nopw (%rax,%rax)