// File: /workspace/github_cpp_makefile_star2_O1/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, %r14
movq %rdi, %r13
leaq 0x6d33(%rip), %rdi      # 0xc477
callq 0x21c0
movl %r12d, 0x8(%r14)
movq $0x0, 0x10(%r14)
movl $0x0, (%r14)
movq 0x10(%r13), %rax
movslq %r12d, %rcx
imulq $0x70, %rcx, %rcx
movl 0x8(%rax,%rcx), %eax
movl %eax, 0x4(%r14)
movq (%rbx), %rax
movq %rbx, -0x30(%rbp)
cmpq %rax, 0x8(%rbx)
je 0x5932
leaq 0x28(%r14), %rcx
movq %rcx, -0x40(%rbp)
movl $0x1, %ebx
xorl %r12d, %r12d
movl %ebx, -0x34(%rbp)
movq 0x10(%r13), %rbx
shlq $0x5, %r12
movslq 0x4(%rax,%r12), %rax
imulq $0x70, %rax, %r15
leaq (%rbx,%r15), %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 0x6d40
leaq (%rbx,%r15), %rsi
addq $0x58, %rsi
leaq -0xc8(%rbp), %rdi
callq 0x6d40
movq %r13, %r15
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 0x6d40
addq %rbx, %r13
addq $0x58, %r13
leaq -0x58(%rbp), %rdi
movq %r13, %rsi
callq 0x6d40
movq -0x30(%rbp), %rax
addq (%rax), %r12
movq 0x30(%r14), %rsi
cmpq 0x38(%r14), %rsi
movq %r15, %r13
je 0x5880
movl (%r12), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x30(%r14)
jmp 0x588c
movq -0x40(%rbp), %rdi
movq %r12, %rdx
callq 0x6eb6
movsd -0xf8(%rbp), %xmm0
maxsd 0x10(%r14), %xmm0
movsd %xmm0, 0x10(%r14)
movsd -0x88(%rbp), %xmm1
maxsd %xmm0, %xmm1
movsd %xmm1, 0x10(%r14)
movl (%r14), %eax
movl -0x11c(%rbp), %ecx
cmpl %ecx, %eax
cmovgl %eax, %ecx
movl %ecx, (%r14)
movl -0xac(%rbp), %eax
cmpl %eax, %ecx
cmovlel %eax, %ecx
movl %ecx, (%r14)
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x58df
callq 0x2130
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x58ed
callq 0x2130
movq -0xc8(%rbp), %rdi
testq %rdi, %rdi
je 0x58fe
callq 0x2130
movq -0xe0(%rbp), %rdi
testq %rdi, %rdi
movl -0x34(%rbp), %ebx
je 0x5912
callq 0x2130
movl %ebx, %r12d
movq -0x30(%rbp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
incl %ebx
cmpq %r12, %rcx
ja 0x5790
leaq 0x6b63(%rip), %rdi      # 0xc49c
callq 0x21c0
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x6ca0
jmp 0x598d
movq %rax, %rbx
movq -0xe0(%rbp), %rdi
testq %rdi, %rdi
je 0x5999
callq 0x2130
jmp 0x5999
movq %rax, %rbx
jmp 0x598d
movq %rax, %rbx
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x598d
callq 0x2130
leaq -0x120(%rbp), %rdi
callq 0x6ca0
movq %rbx, %rdi
callq 0x2220