// File: 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:
subq $0x98, %rsp
movq %rdi, 0x88(%rsp)
movl %esi, 0x84(%rsp)
movl %edx, 0x80(%rsp)
movq 0x88(%rsp), %rdi
movq %rdi, 0x58(%rsp)
movl 0x24b48(%rip), %edx     # 0x352f8
movq 0x24b39(%rip), %rax     # 0x352f0
movslq 0x84(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x84(%rsp), %esi
movl 0x80(%rsp), %edx
callq 0x10ba0
testb $0x1, %al
jne 0x107db
jmp 0x107e8
movb $0x0, 0x97(%rsp)
jmp 0x10b81
movq 0x58(%rsp), %rdi
addq $0x48, %rdi
movslq 0x84(%rsp), %rsi
callq 0x11d60
movq %rax, %rdi
addq $0x18, %rdi
callq 0x4c10
movq 0x58(%rsp), %rcx
movl %eax, 0x7c(%rsp)
movl 0x7c(%rsp), %eax
cmpl 0x8(%rcx), %eax
jbe 0x109ce
movq 0x58(%rsp), %rax
cmpl $0x0, 0x4(%rax)
je 0x109ce
movq 0x58(%rsp), %rdi
addq $0xa8, %rdi
movslq 0x80(%rsp), %rsi
callq 0x142b0
movzbl 0x5(%rax), %eax
movl %eax, 0x78(%rsp)
movq 0x58(%rsp), %rdi
movl 0x78(%rsp), %eax
movl %eax, 0x54(%rsp)
addq $0xa8, %rdi
movslq 0x80(%rsp), %rsi
callq 0x142b0
movq %rax, %rcx
movl 0x54(%rsp), %eax
movzbl 0x6(%rcx), %ecx
cmpl %ecx, %eax
je 0x108d8
movq 0x58(%rsp), %rdi
movl 0x84(%rsp), %eax
movl %eax, 0x50(%rsp)
addq $0xa8, %rdi
movslq 0x80(%rsp), %rsi
callq 0x142b0
movq %rax, %rcx
movl 0x50(%rsp), %eax
movq 0x8(%rcx), %rcx
movslq 0x78(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0x108c6
movb $0x1, 0x97(%rsp)
jmp 0x10b81
jmp 0x108c8
movl 0x78(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x78(%rsp)
jmp 0x10850
movq 0x58(%rsp), %rdi
addq $0xa8, %rdi
movslq 0x80(%rsp), %rsi
callq 0x142b0
movq 0x58(%rsp), %rdi
movzbl 0x6(%rax), %eax
movl %eax, 0x4c(%rsp)
addq $0xa8, %rdi
movslq 0x80(%rsp), %rsi
callq 0x142b0
movq 0x58(%rsp), %rcx
movq %rax, %rdx
movl 0x4c(%rsp), %eax
movzbl 0x5(%rdx), %edx
subl %edx, %eax
cmpl 0x4(%rcx), %eax
jge 0x10936
movb $0x0, 0x97(%rsp)
jmp 0x10b81
movq 0x58(%rsp), %rdi
movl 0x7c(%rsp), %eax
movq %rax, 0x40(%rsp)
movq %rdi, %rax
addq $0x48, %rax
movq %rax, 0x30(%rsp)
addq $0xa8, %rdi
movslq 0x80(%rsp), %rsi
callq 0x142b0
movq 0x58(%rsp), %rdi
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
addq $0xa8, %rdi
movslq 0x80(%rsp), %rsi
callq 0x142b0
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movq 0x38(%rsp), %rax
movzbl 0x6(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movslq (%rax,%rcx,4), %rsi
callq 0x11d60
movq %rax, %rdi
addq $0x18, %rdi
callq 0x4c10
movq %rax, %rcx
movq 0x40(%rsp), %rax
cmpq %rcx, %rax
jbe 0x109cc
movb $0x0, 0x97(%rsp)
jmp 0x10b81
jmp 0x109ce
movq 0x58(%rsp), %rdi
addq $0x48, %rdi
movslq 0x84(%rsp), %rsi
callq 0x11d60
movq %rax, %rdi
addq $0x18, %rdi
callq 0x12270
movq %rax, 0x70(%rsp)
movq 0x58(%rsp), %rdi
addq $0x48, %rdi
movslq 0x84(%rsp), %rsi
callq 0x11d60
movq %rax, %rdi
addq $0x18, %rdi
callq 0x122e0
movq %rax, 0x68(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x122a0
testb $0x1, %al
jne 0x10a34
jmp 0x10b79
leaq 0x70(%rsp), %rdi
callq 0x12310
movl (%rax), %eax
cmpl 0x80(%rsp), %eax
jne 0x10a56
movb $0x1, 0x97(%rsp)
jmp 0x10b81
movq 0x58(%rsp), %rax
addq $0xa8, %rax
movq %rax, 0x20(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x12310
movq 0x20(%rsp), %rdi
movslq (%rax), %rsi
callq 0x142b0
movq 0x58(%rsp), %rdi
movzwl (%rax), %eax
movl %eax, 0x2c(%rsp)
addq $0xa8, %rdi
movslq 0x80(%rsp), %rsi
callq 0x142b0
movq %rax, %rcx
movl 0x2c(%rsp), %eax
movzwl (%rcx), %ecx
cmpl %ecx, %eax
jle 0x10b61
movq 0x58(%rsp), %rax
addq $0xa8, %rax
movq %rax, 0x10(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x12310
movq 0x10(%rsp), %rdi
movslq (%rax), %rsi
callq 0x142b0
movq 0x58(%rsp), %rdi
movzwl 0x2(%rax), %eax
movl %eax, 0x1c(%rsp)
addq $0xa8, %rdi
movslq 0x80(%rsp), %rsi
callq 0x142b0
movq %rax, %rcx
movl 0x1c(%rsp), %eax
movzwl 0x2(%rcx), %ecx
cmpl %ecx, %eax
jge 0x10b61
movq 0x247e3(%rip), %rax     # 0x352f0
movq %rax, 0x8(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x12310
movq %rax, %rcx
movq 0x8(%rsp), %rax
movslq (%rcx), %rcx
movl (%rax,%rcx,4), %eax
cmpl 0x247c8(%rip), %eax     # 0x352f8
je 0x10b61
leaq 0x70(%rsp), %rdi
callq 0x12310
movq 0x58(%rsp), %rdi
movl (%rax), %esi
movl 0x80(%rsp), %edx
callq 0x10780
testb $0x1, %al
jne 0x10b55
jmp 0x10b5f
movb $0x1, 0x97(%rsp)
jmp 0x10b81
jmp 0x10b61
jmp 0x10b63
leaq 0x70(%rsp), %rdi
xorl %esi, %esi
callq 0x12320
movq %rax, 0x60(%rsp)
jmp 0x109f5
movb $0x0, 0x97(%rsp)
movb 0x97(%rsp), %al
andb $0x1, %al
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)