// File: /workspace/github_cpp_makefile_star2_O3/Proudc[P]CTSS/src/ContinuousQuery/Base.cpp
// Function: initializeFirstPath(Graph*, TraversingPath*, int, std::vector<Edge, std::allocator<Edge>>&)
void initializeFirstPath(Graph* myGraph, TraversingPath* path, int currentVertex, std::vector<Edge>& currentPath)
{
	printf("Start initializing the first path...\n");
	path->finalVertexID = currentVertex;
	path->distToRefer   = 0;
	path->minPos        = 0;
	path->maxPos        = myGraph->vertexsVector[currentVertex].maxPos;
	for (unsigned int i = 0; i < currentPath.size(); i++)
	{
		const Vertex firstVertex = myGraph->vertexsVector[currentPath[i].firstVertexID];
		const Vertex secVertex   = myGraph->vertexsVector[currentPath[i].secVertexID];
		path->edges.push_back(currentPath[i].edgeID);
		path->distToRefer = std::max(path->distToRefer, firstVertex.distToRefer);
		path->distToRefer = std::max(path->distToRefer, secVertex.distToRefer);
		path->minPos      = std::max(path->minPos, firstVertex.minPos);
		path->minPos      = std::max(path->minPos, secVertex.minPos);
	}
	printf("The first path is initialized!!!\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %rbx
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %r13
leaq 0x6d0b(%rip), %rdi      # 0xc46f
callq 0x21b0
movl %r12d, 0x8(%r15)
movq $0x0, 0x10(%r15)
movl $0x0, (%r15)
movq 0x10(%r13), %rax
movslq %r12d, %rcx
imulq $0x70, %rcx, %rcx
movl 0x8(%rax,%rcx), %eax
movl %eax, 0x4(%r15)
movq (%rbx), %rax
movq %rbx, -0x30(%rbp)
cmpq %rax, 0x8(%rbx)
je 0x594d
leaq 0x28(%r15), %rcx
movq %rcx, -0x40(%rbp)
movl $0x1, %r14d
xorl %r12d, %r12d
movl %r14d, -0x34(%rbp)
movq 0x10(%r13), %rbx
shlq $0x5, %r12
movslq 0x4(%rax,%r12), %rax
imulq $0x70, %rax, %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, -0xf0(%rbp)
movaps %xmm2, -0x100(%rbp)
movaps %xmm1, -0x110(%rbp)
movaps %xmm0, -0x120(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x6c1e
leaq (%rbx,%r14), %rsi
addq $0x58, %rsi
leaq -0xc8(%rbp), %rdi
callq 0x6c1e
movq %r13, %r14
movq 0x10(%r13), %r13
movq -0x30(%rbp), %rax
movq (%rax), %rax
movslq 0x8(%rax,%r12), %rax
imulq $0x70, %rax, %rbx
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, -0x80(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm0, -0xb0(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x6c1e
addq %rbx, %r13
addq $0x58, %r13
leaq -0x58(%rbp), %rdi
movq %r13, %rsi
callq 0x6c1e
movq -0x30(%rbp), %rax
addq (%rax), %r12
movq 0x30(%r15), %rsi
cmpq 0x38(%r15), %rsi
movq %r14, %r13
je 0x58a2
movl (%r12), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x30(%r15)
jmp 0x58ae
movq -0x40(%rbp), %rdi
movq %r12, %rdx
callq 0x6da2
movsd -0xf8(%rbp), %xmm0
maxsd 0x10(%r15), %xmm0
movsd -0x88(%rbp), %xmm1
maxsd %xmm0, %xmm1
movsd %xmm1, 0x10(%r15)
movl (%r15), %eax
movl -0x11c(%rbp), %ecx
cmpl %ecx, %eax
cmovgl %eax, %ecx
movl -0xac(%rbp), %eax
cmpl %eax, %ecx
cmovlel %eax, %ecx
movl %ecx, (%r15)
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x58f8
callq 0x2120
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x5906
callq 0x2120
movq -0xc8(%rbp), %rdi
testq %rdi, %rdi
je 0x5917
callq 0x2120
movq -0xe0(%rbp), %rdi
testq %rdi, %rdi
movl -0x34(%rbp), %r14d
je 0x592c
callq 0x2120
movl %r14d, %r12d
movq -0x30(%rbp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
incl %r14d
cmpq %r12, %rcx
ja 0x57b1
leaq 0x6b40(%rip), %rdi      # 0xc494
callq 0x21b0
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x6b7e
jmp 0x59a8
movq %rax, %rbx
movq -0xe0(%rbp), %rdi
testq %rdi, %rdi
je 0x59b4
callq 0x2120
jmp 0x59b4
movq %rax, %rbx
jmp 0x59a8
movq %rax, %rbx
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x59a8
callq 0x2120
leaq -0x120(%rbp), %rdi
callq 0x6b7e
movq %rbx, %rdi
callq 0x2210