// File: /workspace/github_cpp_makefile_star2_O3/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)
movl %ecx, -0x38(%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
je 0x99fb
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
movq (%rdx), %rax
movq 0x8(%rdx), %rdx
movq %rdx, %rcx
subq %rax, %rcx
je 0x9a8e
sarq $0x5, %rcx
movl $0x1, %esi
xorl %r8d, %r8d
movb $0x1, %dil
movl -0x38(%rbp), %r10d
shlq $0x5, %r8
movslq 0x4(%rax,%r8), %r9
movl 0x8(%rax,%r8), %r8d
cmpl %r10d, %r9d
je 0x9a50
cmpl %r10d, %r8d
je 0x9a50
movslq %r8d, %r8
movb %dil, (%r14,%r9)
movb %dil, (%r14,%r8)
movl %esi, %r8d
incl %esi
cmpq %r8, %rcx
ja 0x9a21
jmp 0x9a5f
cmpl %r10d, %r9d
cmovel %r10d, %r8d
movslq %r8d, %rsi
movb $0x1, (%r14,%rsi)
cmpq %rax, %rdx
je 0x9a8e
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, %rcx
ja 0x9a70
movq %r13, -0x40(%rbp)
movq %r14, -0x68(%rbp)
movl $0x70, %edi
callq 0x2140
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 -0xf0(%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 0xa806
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa984
movq -0xe0(%rbp), %rbx
cmpq %rbx, -0xc0(%rbp)
movq -0x68(%rbp), %r14
je 0x9fc6
movslq -0x38(%rbp), %rax
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, -0x130(%rbp)
movaps %xmm2, -0x140(%rbp)
movaps %xmm1, -0x150(%rbp)
movaps %xmm0, -0x160(%rbp)
leaq 0x40(%rbx), %rsi
leaq -0x120(%rbp), %rdi
callq 0x6c1e
addq $0x58, %rbx
leaq -0x108(%rbp), %rdi
movq %rbx, %rsi
callq 0x6c1e
leaq -0xf0(%rbp), %rdi
callq 0xac8a
movl -0x160(%rbp), %eax
movslq %eax, %rdx
movb $0x1, (%r14,%rdx)
movq -0x40(%rbp), %rcx
cmpb $0x0, (%rcx,%rdx)
je 0x9e38
movq -0x78(%rbp), %rax
movl %edx, (%rax)
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
movq $0x0, -0x50(%rbp)
leaq -0x350(%rbp), %rax
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq 0x10(%r12), %r14
imulq $0x70, %rdx, %rax
movl -0x2c(%rbp), %ecx
cmpl %ecx, (%r14,%rax)
je 0x9d35
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 0x6c1e
addq $0x58, %rbx
leaq -0x2c8(%rbp), %rdi
movq %rbx, %rsi
callq 0x6c1e
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 0x6c1e
addq %r13, %rbx
addq $0x58, %rbx
leaq -0x258(%rbp), %rdi
movq %rbx, %rsi
callq 0x6c1e
leaq -0x98(%rbp), %rdi
movq %r12, %rsi
leaq -0x320(%rbp), %rdx
leaq -0x2b0(%rbp), %rcx
callq 0x644b
movq -0x58(%rbp), %rsi
cmpq -0x50(%rbp), %rsi
je 0x9ccb
movups -0x98(%rbp), %xmm0
movups -0x88(%rbp), %xmm1
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
addq $0x20, %rsi
movq %rsi, -0x58(%rbp)
jmp 0x9cdb
leaq -0x60(%rbp), %rdi
leaq -0x98(%rbp), %rdx
callq 0xad3a
movq -0x258(%rbp), %rdi
testq %rdi, %rdi
je 0x9cec
callq 0x2120
movq -0x270(%rbp), %rdi
testq %rdi, %rdi
je 0x9cfd
callq 0x2120
movq -0x2c8(%rbp), %rdi
testq %rdi, %rdi
je 0x9d0e
callq 0x2120
movq -0x2e0(%rbp), %rdi
testq %rdi, %rdi
je 0x9d1f
callq 0x2120
movq 0x10(%r12), %r14
leaq (%r14,%r13), %rbx
movl -0x2c(%rbp), %eax
cmpl %eax, (%r14,%r13)
jne 0x9bd4
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 0x6c1e
addq %rbx, %r14
addq $0x58, %r14
leaq -0x1e8(%rbp), %rdi
movq %r14, %rsi
callq 0x6c1e
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 0x6c1e
addq %r14, %rbx
addq $0x58, %rbx
leaq -0x178(%rbp), %rdi
movq %rbx, %rsi
callq 0x6c1e
leaq -0x98(%rbp), %rdi
movq %r12, %rsi
leaq -0x240(%rbp), %rdx
leaq -0x1d0(%rbp), %rcx
callq 0x644b
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x9eb8
movups -0x98(%rbp), %xmm0
movups -0x88(%rbp), %xmm1
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
addq $0x20, 0x8(%r15)
jmp 0x9ec7
movq 0x10(%r12), %rcx
imulq $0x70, %rdx, %rsi
movq 0x40(%rcx,%rsi), %rdx
cmpq %rdx, 0x48(%rcx,%rsi)
je 0x9f90
movl $0x1, %ebx
xorl %esi, %esi
movslq (%rdx,%rsi,4), %rdx
cmpb $0x0, (%r14,%rdx)
jne 0x9e92
imulq $0x70, %rdx, %rdi
cmpb $0x1, 0x11(%rcx,%rdi)
jne 0x9e92
movb $0x1, (%r14,%rdx)
leaq (%rcx,%rdi), %rsi
movl %eax, 0xc(%rcx,%rdi)
leaq -0xf0(%rbp), %rdi
callq 0xa984
movq 0x10(%r12), %rcx
movl -0x160(%rbp), %eax
movl %ebx, %esi
movslq %eax, %rdx
imulq $0x70, %rdx, %rdi
movq 0x40(%rcx,%rdi), %rdx
movq 0x48(%rcx,%rdi), %rdi
subq %rdx, %rdi
sarq $0x2, %rdi
incl %ebx
cmpq %rsi, %rdi
ja 0x9e58
jmp 0x9f90
movq %r15, %rdi
leaq -0x98(%rbp), %rdx
callq 0xad3a
movq -0x178(%rbp), %rdi
testq %rdi, %rdi
je 0x9ed8
callq 0x2120
movq -0x190(%rbp), %rdi
testq %rdi, %rdi
je 0x9ee9
callq 0x2120
movq -0x1e8(%rbp), %rdi
testq %rdi, %rdi
je 0x9efa
callq 0x2120
movq -0x200(%rbp), %rdi
testq %rdi, %rdi
je 0x9f0b
callq 0x2120
movq -0x58(%rbp), %rax
subq -0x60(%rbp), %rax
shrq $0x5, %rax
decl %eax
js 0x9f5c
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 0x9f4b
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
addq $0x20, 0x8(%r15)
jmp 0x9f53
movq %r15, %rdi
callq 0x4d16
addq $-0x20, %rbx
decq %r14
jg 0x9f25
movq -0x338(%rbp), %rdi
testq %rdi, %rdi
je 0x9f6d
callq 0x2120
movq -0x350(%rbp), %rdi
testq %rdi, %rdi
movq -0x68(%rbp), %r14
je 0x9f82
callq 0x2120
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x9f90
callq 0x2120
movq -0x108(%rbp), %rdi
testq %rdi, %rdi
je 0x9fa1
callq 0x2120
movq -0x120(%rbp), %rdi
testq %rdi, %rdi
je 0x9fb2
callq 0x2120
movq -0xe0(%rbp), %rbx
cmpq %rbx, -0xc0(%rbp)
jne 0x9b1b
leaq -0xf0(%rbp), %rdi
callq 0xa6ba
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa024
movq %rax, %rbx
jmp 0xa01b
movq %rax, %rbx
movq -0x190(%rbp), %rdi
testq %rdi, %rdi
je 0xa01b
callq 0x2120
jmp 0xa01b
jmp 0xa063
movq %rax, %rbx
movq -0x200(%rbp), %rdi
jmp 0xa077
movq %rax, %rbx
leaq -0x1d0(%rbp), %rdi
callq 0x6b7e
leaq -0x240(%rbp), %rdi
jmp 0xa099
movq %rax, %rbx
jmp 0xa0c4
movq %rax, %rbx
movq -0x120(%rbp), %rdi
testq %rdi, %rdi
je 0xa0c4
callq 0x2120
jmp 0xa0c4
movq %rax, %rbx
jmp 0xa0b8
jmp 0xa063
movq %rax, %rbx
movq -0x270(%rbp), %rdi
testq %rdi, %rdi
je 0xa092
callq 0x2120
jmp 0xa092
movq %rax, %rbx
jmp 0xa09e
movq %rax, %rbx
jmp 0xa092
movq %rax, %rbx
movq -0x2e0(%rbp), %rdi
testq %rdi, %rdi
je 0xa09e
callq 0x2120
jmp 0xa09e
movq %rax, %rbx
leaq -0x2b0(%rbp), %rdi
callq 0x6b7e
leaq -0x320(%rbp), %rdi
callq 0x6b7e
leaq -0x390(%rbp), %rdi
callq 0x6b7e
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0xa0b8
callq 0x2120
leaq -0x160(%rbp), %rdi
callq 0x6b7e
leaq -0xf0(%rbp), %rdi
callq 0xa6ba
movq %rbx, %rdi
callq 0x2210