// File: /workspace/github_cpp_makefile_star2_O1/datourat[P]IP-label-for-graph-reachability/Graph.cpp
// Function: Graph::ProLabelQueryDFS2(int, int)
bool Graph::ProLabelQueryDFS2(const int u, const int v){
//      int tmpu;

//      cout << u << '\t';
        flag[u]=querycnt;

        if(IPtest(u,v))
                return false;

        unsigned int edgelistsize=graph[u].outList.size();

        if(edgelistsize > hugenode && HUGENODENUM!=0){

		for(int k=reachindex[v].InLimit; k!=reachindex[v].HLimit; k++){
			if(u==reachindex[v].Label[k])
				return true;
		}

		if((reachindex[v].HLimit-reachindex[v].InLimit)<HUGENODENUM)
			return false;

		if(edgelistsize > graph[ reachindex[v].Label[ reachindex[v].HLimit-1 ] ].outList.size())
			return false;
	}

//      for(unsigned int i=0; i<edgelistsize; i++){
        for(vector<int>::iterator it=graph[u].outList.begin(); it!=graph[u].outList.end(); it++){
//              tmpu=graph[u].outList[i];
                if(*it==v)
                        return true;
//              if(reachindex[tmpu].layerup > reachindex[v].layerup && reachindex[tmpu].layerdown < reachindex[v].layerdown && flag[tmpu]!=querycnt){
//              if(flag[*it]!=querycnt){
		if(reachindex[*it].layerup > reachindex[v].layerup && reachindex[*it].layerdown < reachindex[v].layerdown && flag[*it]!=querycnt){
			if(ProLabelQueryDFS2(*it, v))
				return true;
                }
        }

        return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl 0xa75c(%rip), %eax      # 0x162a0
movq 0xa74d(%rip), %rcx      # 0x16298
movslq %esi, %r15
movl %eax, (%rcx,%r15,4)
movl %r15d, %esi
callq 0xbcc2
testb %al, %al
je 0xbb75
xorl %ebp, %ebp
andb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x48(%r14), %rax
leaq (%r15,%r15,2), %r15
shlq $0x4, %r15
movq 0x18(%rax,%r15), %r12
movq 0x20(%rax,%r15), %rcx
subq %r12, %rcx
sarq $0x2, %rcx
cmpl %ecx, 0x8(%r14)
jae 0xbc1c
movl 0x4(%r14), %edx
testl %edx, %edx
je 0xbc1c
movslq %ebx, %rdi
movq 0xa8(%r14), %r9
shlq $0x4, %rdi
leaq (%r9,%rdi), %rsi
movzbl 0x5(%r9,%rdi), %r8d
movzbl 0x6(%r9,%rdi), %edi
cmpb %dil, %r8b
je 0xbbe3
movq 0x8(%rsi), %r9
movl %r8d, %r10d
movl %edi, %r11d
cmpl %ebp, (%r9,%r10,4)
je 0xbcba
incq %r10
cmpq %r10, %r11
jne 0xbbd1
movl %edi, %r9d
subl %r8d, %r9d
cmpl %edx, %r9d
jl 0xbb5e
movl %ecx, %ecx
movq 0x8(%rsi), %rdx
movslq -0x4(%rdx,%rdi,4), %rdx
leaq (%rdx,%rdx,2), %rdx
shlq $0x4, %rdx
movq 0x20(%rax,%rdx), %rsi
subq 0x18(%rax,%rdx), %rsi
sarq $0x2, %rsi
cmpq %rsi, %rcx
ja 0xbb5e
movq 0x48(%r14), %rax
cmpq 0x20(%rax,%r15), %r12
setne %bpl
je 0xbb60
movl (%r12), %esi
cmpl %ebx, %esi
je 0xbb60
movslq %ebx, %r13
addq $0x4, %r12
shlq $0x4, %r13
movslq %esi, %rax
movq 0xa8(%r14), %rcx
movq %rax, %rdx
shlq $0x4, %rdx
movzwl (%rcx,%rdx), %edi
cmpw (%rcx,%r13), %di
jbe 0xbc96
addq %rcx, %rdx
addq %r13, %rcx
movzwl 0x2(%rdx), %edx
cmpw 0x2(%rcx), %dx
jae 0xbc96
movq 0xa61f(%rip), %rcx      # 0x16298
movl (%rcx,%rax,4), %eax
cmpl 0xa61e(%rip), %eax      # 0x162a0
je 0xbc96
movq %r14, %rdi
movl %ebx, %edx
callq 0xbb2c
testb %al, %al
jne 0xbb60
movq 0x48(%r14), %rax
cmpq 0x20(%rax,%r15), %r12
setne %bpl
je 0xbb60
movl (%r12), %esi
addq $0x4, %r12
cmpl %ebx, %esi
jne 0xbc46
jmp 0xbb60
movb $0x1, %bpl
jmp 0xbb60