// File: /workspace/github_cpp_makefile_star2_O2/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 0xbfc2(%rip), %eax      # 0x15290
movq 0xbfb3(%rip), %rcx      # 0x15288
movslq %esi, %r15
movl %eax, (%rcx,%r15,4)
movl %r15d, %esi
callq 0x940e
testb %al, %al
je 0x92fb
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x48(%r14), %rax
imulq $0x30, %r15, %r15
movq 0x18(%rax,%r15), %r12
movq 0x20(%rax,%r15), %rcx
subq %r12, %rcx
sarq $0x2, %rcx
movslq %ebx, %r13
cmpl %ecx, 0x8(%r14)
jae 0x9398
movl 0x4(%r14), %edx
testl %edx, %edx
je 0x9398
movq 0xa8(%r14), %rdi
movq %r13, %r9
shlq $0x4, %r9
leaq (%rdi,%r9), %rsi
movzbl 0x5(%rdi,%r9), %r8d
movzbl 0x6(%rdi,%r9), %edi
movq %r8, %r9
cmpq %r9, %rdi
je 0x9361
movq 0x8(%rsi), %r10
leaq 0x1(%r9), %r11
cmpl %ebp, (%r10,%r9,4)
movq %r11, %r9
jne 0x9346
movb $0x1, %bpl
jmp 0x92ea
movl %edi, %r9d
subl %r8d, %r9d
cmpl %edx, %r9d
jl 0x92e8
movl %ecx, %ecx
movq 0x8(%rsi), %rdx
movl %edi, %esi
movslq -0x4(%rdx,%rsi,4), %rdx
imulq $0x30, %rdx, %rdx
movq 0x20(%rax,%rdx), %rsi
subq 0x18(%rax,%rdx), %rsi
sarq $0x2, %rsi
cmpq %rsi, %rcx
ja 0x92e8
shlq $0x4, %r13
cmpq 0x20(%rax,%r15), %r12
setne %bpl
je 0x92ea
movslq (%r12), %rsi
cmpl %ebx, %esi
je 0x92ea
movq 0xa8(%r14), %rcx
movq %rsi, %rdx
shlq $0x4, %rdx
movzwl (%rcx,%rdx), %edi
cmpw (%rcx,%r13), %di
jbe 0x9408
addq %rcx, %rdx
addq %r13, %rcx
movzwl 0x2(%rdx), %edx
cmpw 0x2(%rcx), %dx
jae 0x9408
movq 0xbea1(%rip), %rcx      # 0x15288
movl (%rcx,%rsi,4), %ecx
cmpl 0xbea0(%rip), %ecx      # 0x15290
je 0x9408
movq %r14, %rdi
movl %ebx, %edx
callq 0x92b6
testb %al, %al
jne 0x92ea
movq 0x48(%r14), %rax
addq $0x4, %r12
jmp 0x939c