// File: /workspace/github_cpp_makefile_star2_O3/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 0xa824(%rip), %eax      # 0x162a0
movq 0xa815(%rip), %rcx      # 0x16298
movslq %esi, %r15
movl %eax, (%rcx,%r15,4)
movl %r15d, %esi
callq 0xbbd8
testb %al, %al
jne 0xbbc0
movq 0x48(%r14), %rax
leaq (%r15,%r15,2), %r15
shlq $0x4, %r15
movq 0x18(%rax,%r15), %r12
movq 0x20(%rax,%r15), %rcx
movq %rcx, %rdx
subq %r12, %rdx
sarq $0x2, %rdx
cmpl %edx, 0x8(%r14)
jae 0xbb51
movl 0x4(%r14), %esi
testl %esi, %esi
je 0xbb51
movslq %ebx, %r8
movq 0xa8(%r14), %r10
shlq $0x4, %r8
leaq (%r10,%r8), %rdi
movzbl 0x5(%r10,%r8), %r9d
movzbl 0x6(%r10,%r8), %r8d
cmpb %r8b, %r9b
je 0xbb0f
movq 0x8(%rdi), %r10
movl %r9d, %r11d
movl %r8d, %r13d
cmpl %ebp, (%r10,%r11,4)
je 0xbbd3
incq %r11
cmpq %r11, %r13
jne 0xbafd
movl %r8d, %r10d
subl %r9d, %r10d
cmpl %esi, %r10d
jl 0xbbc0
movl %edx, %edx
movq 0x8(%rdi), %rsi
movslq -0x4(%rsi,%r8,4), %rsi
leaq (%rsi,%rsi,2), %rsi
shlq $0x4, %rsi
movq 0x20(%rax,%rsi), %rdi
subq 0x18(%rax,%rsi), %rdi
sarq $0x2, %rdi
cmpq %rdi, %rdx
seta %dl
cmpq %rcx, %r12
sete %cl
orb %dl, %cl
je 0xbb56
jmp 0xbbc0
cmpq %rcx, %r12
je 0xbbc0
movslq %ebx, %r13
shlq $0x4, %r13
movslq (%r12), %rsi
movb $0x1, %bpl
cmpl %ebx, %esi
je 0xbbc2
movq 0xa8(%r14), %rcx
movq %rsi, %rdx
shlq $0x4, %rdx
movzwl (%rcx,%rdx), %edi
cmpw (%rcx,%r13), %di
jbe 0xbbb5
addq %rcx, %rdx
addq %r13, %rcx
movzwl 0x2(%rdx), %edx
cmpw 0x2(%rcx), %dx
jae 0xbbb5
movq 0xa700(%rip), %rcx      # 0x16298
movl (%rcx,%rsi,4), %ecx
cmpl 0xa6ff(%rip), %ecx      # 0x162a0
je 0xbbb5
movq %r14, %rdi
movl %ebx, %edx
callq 0xba64
testb %al, %al
jne 0xbbc2
movq 0x48(%r14), %rax
addq $0x4, %r12
cmpq 0x20(%rax,%r15), %r12
jne 0xbb5d
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %bpl
jmp 0xbbc2