// File: Proudc[P]CTSS/src/ContinuousQuery/Base.cpp
// Function: (anonymous namespace)::setReferInitialAndFinal(ReferencePath*)
void setReferInitialAndFinal(ReferencePath* temPath)
{
	assert(temPath->edges.size() >= 2);

	int first1  = temPath->edges[0].firstVertexID;
	int sec1    = temPath->edges[0].secVertexID;
	int first2  = temPath->edges[1].firstVertexID;
	int sec2    = temPath->edges[1].secVertexID;
	int firstL2 = temPath->edges[temPath->edges.size() - 2].firstVertexID;
	int secL2   = temPath->edges[temPath->edges.size() - 2].secVertexID;
	int firstL1 = temPath->edges[temPath->edges.size() - 1].firstVertexID;
	int secL1   = temPath->edges[temPath->edges.size() - 1].secVertexID;
	if ((first1 == first2) || (first1 == sec2))
	{
		temPath->initialVertex = sec1;
	}
	else
	{
		temPath->initialVertex = first1;
	}
	if ((firstL1 == firstL2) || (firstL1 == secL2))
	{
		temPath->finalVertex = secL1;
	}
	else
	{
		temPath->finalVertex = firstL1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x5360
cmpq $0x2, %rax
jb 0x8a21
jmp 0x8a40
leaq 0x10be8(%rip), %rdi     # 0x19610
leaq 0x10ad5(%rip), %rsi     # 0x19504
movl $0x3a, %edx
leaq 0x10bf0(%rip), %rcx     # 0x1962b
callq 0x20e0
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x5380
movl 0x4(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x5380
movl 0x8(%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
movl $0x1, %esi
callq 0x5380
movl 0x4(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
movl $0x1, %esi
callq 0x5380
movl 0x8(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x5360
movq -0x48(%rbp), %rdi
movq %rax, %rsi
subq $0x2, %rsi
callq 0x5380
movl 0x4(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x5360
movq -0x40(%rbp), %rdi
movq %rax, %rsi
subq $0x2, %rsi
callq 0x5380
movl 0x8(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x5360
movq -0x38(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x5380
movl 0x4(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x5360
movq -0x30(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x5380
movl 0x8(%rax), %eax
movl %eax, -0x28(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x14(%rbp), %eax
je 0x8b6a
movl -0xc(%rbp), %eax
cmpl -0x18(%rbp), %eax
jne 0x8b75
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
jmp 0x8b7e
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movl -0x24(%rbp), %eax
cmpl -0x1c(%rbp), %eax
je 0x8b8e
movl -0x24(%rbp), %eax
cmpl -0x20(%rbp), %eax
jne 0x8b9a
movl -0x28(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
jmp 0x8ba4
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)