// File: /workspace/github_cpp_makefile_star2_O1/Proudc[P]CTSS/src/ContinuousQuery/Pruneline.cpp
// Function: maxmalOverlapPath(Graph*, std::vector<Edge, std::allocator<Edge>>&, std::vector<Edge, std::allocator<Edge>>&, int, int, int*)
void maxmalOverlapPath(Graph* myGraph, std::vector<Edge>& localPath, std::vector<Edge>& lastPath, int firstVertexID, int secVertexID, int* endVertexID)
{
	bool bfsFlag[(myGraph->vertexPos)];
	bool lastPathFlag[(myGraph->vertexPos)];
	for (unsigned int i = 0; i < myGraph->vertexPos; i++)
	{
		bfsFlag[i] = false;
		lastPathFlag[i] = false;
	}
	for (unsigned int i = 0; i < lastPath.size(); i++)
	{
		Edge temEdge = lastPath[i];
		if (temEdge.firstVertexID == firstVertexID || temEdge.secVertexID == firstVertexID)
		{
			if (temEdge.firstVertexID == firstVertexID)
			{
				bfsFlag[temEdge.firstVertexID] = true;
			}
			else
			{
				bfsFlag[temEdge.secVertexID] = true;
			}
			break;
		}
		else
		{
			bfsFlag[temEdge.firstVertexID] = true;
			bfsFlag[temEdge.secVertexID]   = true;
		}
	}
	for (unsigned int i = 0; i < lastPath.size(); i++)
	{
		lastPathFlag[lastPath[i].firstVertexID] = true;
		lastPathFlag[lastPath[i].secVertexID]   = true;
	}
	Vertex* initVertex = new Vertex;
	initVertex->vertexID = secVertexID;
	std::queue<Vertex> queue;
	queue.push(*initVertex);
	while (!queue.empty())
	{
		Vertex temVertex = queue.front();
		queue.pop();
		bfsFlag[temVertex.vertexID] = true;
		if (lastPathFlag[temVertex.vertexID] == false)
		{
			for (unsigned int i = 0; i < myGraph->vertexsVector[temVertex.vertexID].adjVertexID.size(); i++)
			{
				int nextVertexID = myGraph->vertexsVector[temVertex.vertexID].adjVertexID[i];
				if (bfsFlag[nextVertexID] == false && myGraph->vertexsVector[nextVertexID].locationFlag == true)
				{
					bfsFlag[nextVertexID] = true;
					Vertex* newVertex = new Vertex;
					newVertex = &myGraph->vertexsVector[nextVertexID];
					newVertex->parentVertexID = temVertex.vertexID;
					queue.push(*newVertex);
				}
			}
		}
		else
		{
			(*endVertexID) = temVertex.vertexID;
			std::vector<Edge> temPath;
			Vertex newVertex;
			int temID = temVertex.vertexID;
			while (myGraph->vertexsVector[temID].vertexID != secVertexID)
			{
				int temParentID = myGraph->vertexsVector[temID].parentVertexID;
				temPath.push_back(findEdge(myGraph, myGraph->vertexsVector[temID], myGraph->vertexsVector[temParentID]));
				temID = temParentID;
			}
			localPath.push_back(findEdge(myGraph, myGraph->vertexsVector[firstVertexID], myGraph->vertexsVector[secVertexID]));
			for (int i = temPath.size() - 1; i >= 0; i--)
			{
				localPath.push_back(temPath[i]);
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x368, %rsp            # imm = 0x368
movq %r9, -0x78(%rbp)
movl %r8d, -0x2c(%rbp)
movq %rsi, %r15
movq %rdi, %r12
movl 0x4(%rdi), %ebx
movq %rsp, %r14
leaq 0xf(%rbx), %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
movq %rsp, %r13
subq %rax, %r13
movq %r13, %rsp
testq %rbx, %rbx
movl %ecx, -0x38(%rbp)
je 0x9b69
movq %r14, %rdi
xorl %esi, %esi
movq %rdx, -0x40(%rbp)
movq %rbx, %rdx
callq 0x20b0
movq %r13, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x20b0
movq -0x40(%rbp), %rdx
movl -0x38(%rbp), %ecx
movq (%rdx), %rax
movq 0x8(%rdx), %rdx
movq %rdx, %r10
subq %rax, %r10
sarq $0x5, %r10
cmpq %rax, %rdx
je 0x9bc8
movl $0x1, %esi
xorl %r8d, %r8d
movb $0x1, %dil
shlq $0x5, %r8
movslq 0x4(%rax,%r8), %r9
movl 0x8(%rax,%r8), %r8d
cmpl %ecx, %r9d
je 0x9bb9
cmpl %ecx, %r8d
je 0x9bb9
movslq %r8d, %r8
movb %dil, (%r14,%r9)
movb %dil, (%r14,%r8)
movl %esi, %r8d
incl %esi
cmpq %r8, %r10
ja 0x9b8a
jmp 0x9bc8
cmpl %ecx, %r9d
cmovel %r9d, %r8d
movslq %r8d, %rsi
movb $0x1, (%r14,%rsi)
movq %r14, -0x68(%rbp)
cmpq %rax, %rdx
je 0x9bfb
addq $0x8, %rax
movl $0x1, %edx
movb $0x1, %sil
movslq -0x4(%rax), %rdi
movb %sil, (%r13,%rdi)
movslq (%rax), %rdi
movb %sil, (%r13,%rdi)
movl %edx, %edi
addq $0x20, %rax
incl %edx
cmpq %rdi, %r10
ja 0x9bdd
movq %r13, -0x40(%rbp)
movl $0x70, %edi
callq 0x2150
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x60(%rax)
movl -0x2c(%rbp), %eax
movl %eax, (%rbx)
leaq -0x160(%rbp), %r14
movaps %xmm0, 0x40(%r14)
movaps %xmm0, 0x30(%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movq %r14, %rdi
xorl %esi, %esi
callq 0xa9e0
movq %r14, %rdi
movq %rbx, %rsi
callq 0xab5e
movq -0x150(%rbp), %rbx
cmpq %rbx, -0x130(%rbp)
movq -0x68(%rbp), %r14
movl -0x38(%rbp), %eax
je 0xa134
cltq
movslq -0x2c(%rbp), %rcx
imulq $0x70, %rax, %rax
movq %rax, -0x38(%rbp)
imulq $0x70, %rcx, %rax
movq %rax, -0x70(%rbp)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups 0x30(%rbx), %xmm3
movaps %xmm3, -0xe0(%rbp)
movaps %xmm2, -0xf0(%rbp)
movaps %xmm1, -0x100(%rbp)
movaps %xmm0, -0x110(%rbp)
leaq 0x40(%rbx), %rsi
leaq -0xd0(%rbp), %rdi
callq 0x6d40
addq $0x58, %rbx
leaq -0xb8(%rbp), %rdi
movq %rbx, %rsi
callq 0x6d40
leaq -0x160(%rbp), %rdi
callq 0xae64
movl -0x110(%rbp), %eax
cltq
movb $0x1, (%r14,%rax)
movq -0x40(%rbp), %rcx
cmpb $0x0, (%rcx,%rax)
je 0x9fa1
movq -0x78(%rbp), %rcx
movl %eax, (%rcx)
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
movq $0x0, -0x50(%rbp)
leaq -0x350(%rbp), %rcx
movups %xmm0, 0x20(%rcx)
movups %xmm0, 0x10(%rcx)
movups %xmm0, (%rcx)
movq 0x10(%r12), %r14
imulq $0x70, %rax, %rax
movl -0x2c(%rbp), %ecx
cmpl %ecx, (%r14,%rax)
je 0x9e9e
addq %rax, %r14
movq %r14, %rbx
movslq 0xc(%rbx), %r14
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups 0x30(%rbx), %xmm3
movaps %xmm0, -0x320(%rbp)
movaps %xmm1, -0x310(%rbp)
movaps %xmm2, -0x300(%rbp)
movaps %xmm3, -0x2f0(%rbp)
leaq 0x40(%rbx), %rsi
leaq -0x2e0(%rbp), %rdi
callq 0x6d40
addq $0x58, %rbx
leaq -0x2c8(%rbp), %rdi
movq %rbx, %rsi
callq 0x6d40
movq 0x10(%r12), %rbx
imulq $0x70, %r14, %r13
leaq (%rbx,%r13), %rsi
addq $0x40, %rsi
movups -0x40(%rsi), %xmm0
movups -0x30(%rsi), %xmm1
movups -0x20(%rsi), %xmm2
movups -0x10(%rsi), %xmm3
movaps %xmm3, -0x280(%rbp)
movaps %xmm2, -0x290(%rbp)
movaps %xmm1, -0x2a0(%rbp)
movaps %xmm0, -0x2b0(%rbp)
leaq -0x270(%rbp), %rdi
callq 0x6d40
addq %r13, %rbx
addq $0x58, %rbx
leaq -0x258(%rbp), %rdi
movq %rbx, %rsi
callq 0x6d40
leaq -0x98(%rbp), %rdi
movq %r12, %rsi
leaq -0x320(%rbp), %rdx
leaq -0x2b0(%rbp), %rcx
callq 0x655c
movq -0x58(%rbp), %rsi
cmpq -0x50(%rbp), %rsi
je 0x9e34
movups -0x98(%rbp), %xmm0
movups -0x88(%rbp), %xmm1
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
addq $0x20, %rsi
movq %rsi, -0x58(%rbp)
jmp 0x9e44
leaq -0x60(%rbp), %rdi
leaq -0x98(%rbp), %rdx
callq 0xaf14
movq -0x258(%rbp), %rdi
testq %rdi, %rdi
je 0x9e55
callq 0x2130
movq -0x270(%rbp), %rdi
testq %rdi, %rdi
je 0x9e66
callq 0x2130
movq -0x2c8(%rbp), %rdi
testq %rdi, %rdi
je 0x9e77
callq 0x2130
movq -0x2e0(%rbp), %rdi
testq %rdi, %rdi
je 0x9e88
callq 0x2130
movq 0x10(%r12), %r14
leaq (%r14,%r13), %rbx
movl -0x2c(%rbp), %eax
cmpl %eax, (%r14,%r13)
jne 0x9d3d
movq -0x38(%rbp), %rbx
leaq (%r14,%rbx), %rsi
addq $0x40, %rsi
movups -0x40(%rsi), %xmm0
movups -0x30(%rsi), %xmm1
movups -0x20(%rsi), %xmm2
movups -0x10(%rsi), %xmm3
movaps %xmm0, -0x240(%rbp)
movaps %xmm1, -0x230(%rbp)
movaps %xmm2, -0x220(%rbp)
movaps %xmm3, -0x210(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x6d40
addq %rbx, %r14
addq $0x58, %r14
leaq -0x1e8(%rbp), %rdi
movq %r14, %rsi
callq 0x6d40
movq 0x10(%r12), %rbx
movq -0x70(%rbp), %r14
leaq (%rbx,%r14), %rsi
addq $0x40, %rsi
movups -0x40(%rsi), %xmm0
movups -0x30(%rsi), %xmm1
movups -0x20(%rsi), %xmm2
movups -0x10(%rsi), %xmm3
movaps %xmm3, -0x1a0(%rbp)
movaps %xmm2, -0x1b0(%rbp)
movaps %xmm1, -0x1c0(%rbp)
movaps %xmm0, -0x1d0(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x6d40
addq %r14, %rbx
addq $0x58, %rbx
leaq -0x178(%rbp), %rdi
movq %rbx, %rsi
callq 0x6d40
leaq -0x98(%rbp), %rdi
movq %r12, %rsi
leaq -0x240(%rbp), %rdx
leaq -0x1d0(%rbp), %rcx
callq 0x655c
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0xa026
movups -0x98(%rbp), %xmm0
movups -0x88(%rbp), %xmm1
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
addq $0x20, 0x8(%r15)
jmp 0xa035
movq 0x10(%r12), %rax
movslq -0x110(%rbp), %rcx
imulq $0x70, %rcx, %rsi
movq 0x40(%rax,%rsi), %rdx
cmpq %rdx, 0x48(%rax,%rsi)
je 0xa0fe
movl $0x1, %ebx
xorl %esi, %esi
movslq (%rdx,%rsi,4), %rdx
cmpb $0x0, (%r14,%rdx)
jne 0x9ff7
imulq $0x70, %rdx, %rdi
cmpb $0x1, 0x11(%rax,%rdi)
jne 0x9ff7
movb $0x1, (%r14,%rdx)
leaq (%rax,%rdi), %rsi
movl %ecx, 0xc(%rax,%rdi)
leaq -0x160(%rbp), %rdi
callq 0xab5e
movl %ebx, %esi
movq 0x10(%r12), %rax
movslq -0x110(%rbp), %rcx
imulq $0x70, %rcx, %rdi
movq 0x40(%rax,%rdi), %rdx
movq 0x48(%rax,%rdi), %rdi
subq %rdx, %rdi
sarq $0x2, %rdi
incl %ebx
cmpq %rsi, %rdi
ja 0x9fc8
jmp 0xa0fe
movq %r15, %rdi
leaq -0x98(%rbp), %rdx
callq 0xaf14
movq -0x178(%rbp), %rdi
testq %rdi, %rdi
je 0xa046
callq 0x2130
movq -0x190(%rbp), %rdi
testq %rdi, %rdi
je 0xa057
callq 0x2130
movq -0x1e8(%rbp), %rdi
testq %rdi, %rdi
je 0xa068
callq 0x2130
movq -0x200(%rbp), %rdi
testq %rdi, %rdi
je 0xa079
callq 0x2130
movq -0x58(%rbp), %rax
subq -0x60(%rbp), %rax
shrq $0x5, %rax
decl %eax
js 0xa0ca
movl %eax, %ebx
leaq 0x1(%rbx), %r14
shlq $0x5, %rbx
movq -0x60(%rbp), %rdx
addq %rbx, %rdx
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0xa0b9
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
addq $0x20, 0x8(%r15)
jmp 0xa0c1
movq %r15, %rdi
callq 0x4cf6
addq $-0x20, %rbx
decq %r14
jg 0xa093
movq -0x338(%rbp), %rdi
testq %rdi, %rdi
je 0xa0db
callq 0x2130
movq -0x350(%rbp), %rdi
testq %rdi, %rdi
movq -0x68(%rbp), %r14
je 0xa0f0
callq 0x2130
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0xa0fe
callq 0x2130
movq -0xb8(%rbp), %rdi
testq %rdi, %rdi
je 0xa10f
callq 0x2130
movq -0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0xa120
callq 0x2130
movq -0x150(%rbp), %rbx
cmpq %rbx, -0x130(%rbp)
jne 0x9c85
leaq -0x160(%rbp), %rdi
callq 0xa8a6
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa192
movq %rax, %rbx
jmp 0xa189
movq %rax, %rbx
movq -0x190(%rbp), %rdi
testq %rdi, %rdi
je 0xa189
callq 0x2130
jmp 0xa189
jmp 0xa1d1
movq %rax, %rbx
movq -0x200(%rbp), %rdi
jmp 0xa1e5
movq %rax, %rbx
leaq -0x1d0(%rbp), %rdi
callq 0x6ca0
leaq -0x240(%rbp), %rdi
jmp 0xa207
movq %rax, %rbx
jmp 0xa232
movq %rax, %rbx
movq -0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0xa232
callq 0x2130
jmp 0xa232
movq %rax, %rbx
jmp 0xa226
jmp 0xa1d1
movq %rax, %rbx
movq -0x270(%rbp), %rdi
testq %rdi, %rdi
je 0xa200
callq 0x2130
jmp 0xa200
movq %rax, %rbx
jmp 0xa20c
movq %rax, %rbx
jmp 0xa200
movq %rax, %rbx
movq -0x2e0(%rbp), %rdi
testq %rdi, %rdi
je 0xa20c
callq 0x2130
jmp 0xa20c
movq %rax, %rbx
leaq -0x2b0(%rbp), %rdi
callq 0x6ca0
leaq -0x320(%rbp), %rdi
callq 0x6ca0
leaq -0x390(%rbp), %rdi
callq 0x6ca0
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0xa226
callq 0x2130
leaq -0x110(%rbp), %rdi
callq 0x6ca0
leaq -0x160(%rbp), %rdi
callq 0xa8a6
movq %rbx, %rdi
callq 0x2220