// File: /workspace/github_cpp_makefile_star2_O1/datourat[P]IP-label-for-graph-reachability/Graph.cpp
// Function: Graph::SubComputeProLabelIn(int)
void Graph::SubComputeProLabelIn(int v){
	int edgelistsize=graph[v].inList.size();
	int u;
	int tmpi;
	int tmpvalue;
	vector<int>::iterator tmpiter;
	static vector< vector<int>::iterator > iterend;
	static vector< pair<int, vector<int>::iterator> > iterlist;
	static vector<int> label(KEYNUM);

	label.clear();
	iterend.clear();
	iterlist.clear();

	iterlist.push_back(make_pair(0, ProLabelIn[v].begin()));
	iterend.push_back(ProLabelIn[v].end());
/*
	for(int i=0; i<edgelistsize; i++){
		u=graph[v].inList[i];
		iterlist.push_back( make_pair(i+1, ProLabelIn[u].begin()) );
		iterend.push_back(ProLabelIn[u].end());
	}
*/
	int i=1;
	for(vector<int>::iterator it=graph[v].inList.begin(); it!=graph[v].inList.end(); i++, it++){
		iterlist.push_back( make_pair(i, ProLabelIn[*it].begin()) );
                iterend.push_back(ProLabelIn[*it].end());
	}

	int k=0;
	make_heap(iterlist.begin(), iterlist.end(), PairComparePointer<int, vector<int>::iterator> ());
	tmpi=iterlist.front().first;
	tmpiter=iterlist.front().second;
	label.push_back( *(tmpiter) );
	k++;
	tmpvalue=*tmpiter;
	pop_heap(iterlist.begin(), iterlist.end(),  PairComparePointer<int, vector<int>::iterator> ());
	tmpiter++;
	if(tmpiter==iterend[tmpi]){
		iterlist.pop_back();
	}else{
		iterlist[iterlist.size()-1].second=tmpiter;
		push_heap(iterlist.begin(), iterlist.end(),  PairComparePointer<int, vector<int>::iterator> ());
	}

	while(k<KEYNUM && iterlist.empty()==false){
		tmpi=iterlist.front().first;
		tmpiter=iterlist.front().second;
		if(tmpvalue < *tmpiter){
			label.push_back( *(tmpiter) );
			k++;
			tmpvalue=*tmpiter;
		}else if(tmpvalue > *tmpiter){
			cout << "Something must be wrong! " << endl;
			quit();
		}
		pop_heap(iterlist.begin(), iterlist.end(),  PairComparePointer<int, vector<int>::iterator> ());
		tmpiter++;
		if(tmpiter==iterend[tmpi]){
			iterlist.pop_back();
		}else{
			iterlist[iterlist.size()-1].second=tmpiter;
			push_heap(iterlist.begin(), iterlist.end(),  PairComparePointer<int, vector<int>::iterator> ());
		}
	}

	ProLabelIn[v]=label;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movb 0xc77f(%rip), %al       # 0x16340
testb %al, %al
je 0xa0a1
movb 0xc791(%rip), %al       # 0x16360
testb %al, %al
je 0xa0ab
movb 0xc7a3(%rip), %al       # 0x16380
testb %al, %al
je 0xa0b5
movq 0xc77c(%rip), %rax      # 0x16368
cmpq %rax, 0xc77d(%rip)      # 0x16370
je 0x9bfc
movq %rax, 0xc774(%rip)      # 0x16370
movq 0xc725(%rip), %rax      # 0x16328
cmpq %rax, 0xc726(%rip)      # 0x16330
je 0x9c13
movq %rax, 0xc71d(%rip)      # 0x16330
movslq %ebp, %rax
movq 0xc72b(%rip), %rcx      # 0x16348
cmpq %rcx, 0xc72c(%rip)      # 0x16350
je 0x9c2d
movq %rcx, 0xc723(%rip)      # 0x16350
movq 0x90(%rbx), %rcx
leaq (%rax,%rax,2), %r14
movq (%rcx,%r14,8), %rax
movl $0x0, (%rsp)
movq %rax, 0x8(%rsp)
movq 0xc701(%rip), %rsi      # 0x16350
cmpq 0xc702(%rip), %rsi      # 0x16358
je 0x9c69
movups (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0xc6e9(%rip)     # 0x16350
jmp 0x9c78
leaq 0xc6d8(%rip), %rdi      # 0x16348
movq %rsp, %rdx
callq 0xf2f0
movq 0x90(%rbx), %rax
movq 0x8(%rax,%r14,8), %rax
movq %rax, (%rsp)
movq 0xc6a1(%rip), %rsi      # 0x16330
cmpq 0xc6a2(%rip), %rsi      # 0x16338
je 0x9ca9
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0xc689(%rip)      # 0x16330
jmp 0x9cb8
leaq 0xc678(%rip), %rdi      # 0x16328
movq %rsp, %rdx
callq 0xf428
movq 0x48(%rbx), %rax
movq %r14, 0x10(%rsp)
shlq $0x4, %r14
movq (%rax,%r14), %rbp
cmpq 0x8(%rax,%r14), %rbp
je 0x9d8a
movl $0x1, %r15d
movq %rsp, %r12
leaq 0xc644(%rip), %r13      # 0x16328
movslq (%rbp), %rax
movq 0x90(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rax
movl %r15d, (%rsp)
movq %rax, 0x8(%rsp)
movq 0xc649(%rip), %rsi      # 0x16350
cmpq 0xc64a(%rip), %rsi      # 0x16358
je 0x9d21
movups (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0xc631(%rip)     # 0x16350
jmp 0x9d30
leaq 0xc620(%rip), %rdi      # 0x16348
movq %r12, %rdx
callq 0xf2f0
movslq (%rbp), %rax
movq 0x90(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movq 0x8(%rcx,%rax,8), %rax
movq %rax, (%rsp)
movq 0xc5e1(%rip), %rsi      # 0x16330
cmpq 0xc5e2(%rip), %rsi      # 0x16338
je 0x9d69
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0xc5c9(%rip)      # 0x16330
jmp 0x9d74
movq %r13, %rdi
movq %r12, %rdx
callq 0xf428
incl %r15d
addq $0x4, %rbp
movq 0x48(%rbx), %rax
cmpq 0x8(%rax,%r14), %rbp
jne 0x9ce4
movq 0xc5b7(%rip), %rdi      # 0x16348
movq 0xc5b8(%rip), %rsi      # 0x16350
movq %rsp, %rdx
callq 0xf565
movq 0xc5a1(%rip), %rax      # 0x16348
movslq (%rax), %r14
movq 0x8(%rax), %r15
movq 0xc5bb(%rip), %rsi      # 0x16370
cmpq 0xc5bc(%rip), %rsi      # 0x16378
je 0x9dd0
movl (%r15), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0xc5a2(%rip)      # 0x16370
jmp 0x9ddf
leaq 0xc591(%rip), %rdi      # 0x16368
movq %r15, %rdx
callq 0xdde8
movl (%r15), %r13d
movq 0xc55f(%rip), %rdi      # 0x16348
movq 0xc560(%rip), %rax      # 0x16350
movq %rax, %rcx
subq %rdi, %rcx
cmpq $0x11, %rcx
jl 0x9e22
leaq -0x10(%rax), %rdx
movl -0x10(%rax), %ecx
movq -0x8(%rax), %r8
movl (%rdi), %esi
movl %esi, -0x10(%rax)
movq 0x8(%rdi), %rsi
movq %rsi, -0x8(%rax)
subq %rdi, %rdx
sarq $0x4, %rdx
xorl %esi, %esi
callq 0xf5d2
addq $0x4, %r15
movq 0xc4fb(%rip), %rcx      # 0x16328
movq 0xc51c(%rip), %rax      # 0x16350
cmpq (%rcx,%r14,8), %r15
je 0x9ec3
movq %r15, -0x8(%rax)
movq 0xc4ff(%rip), %rax      # 0x16348
movq 0xc500(%rip), %rdi      # 0x16350
movl -0x10(%rdi), %ecx
movq -0x8(%rdi), %rdx
subq %rax, %rdi
sarq $0x4, %rdi
leaq -0x1(%rdi), %rsi
cmpq $0x2, %rdi
jl 0x9eb2
leaq -0x1(%rsi), %rdi
shrq $0x3f, %rdi
addq %rsi, %rdi
decq %rdi
sarq %rdi
movq %rdi, %r8
shlq $0x4, %r8
movq 0x8(%rax,%r8), %r9
movl (%r9), %r9d
cmpl (%rdx), %r9d
jle 0x9eb2
addq %rax, %r8
movq %rsi, %r9
shlq $0x4, %r9
movl (%r8), %r10d
movl %r10d, (%rax,%r9)
movq 0x8(%r8), %r8
movq %r8, 0x8(%rax,%r9)
cmpq $0x2, %rsi
movq %rdi, %rsi
jg 0x9e68
jmp 0x9eb5
movq %rsi, %rdi
shlq $0x4, %rdi
movl %ecx, (%rax,%rdi)
movq %rdx, 0x8(%rax,%rdi)
jmp 0x9ece
addq $-0x10, %rax
movq %rax, 0xc482(%rip)      # 0x16350
cmpl $0x2, (%rbx)
jl 0xa076
movl $0x1, %r15d
movq 0xc0f4(%rip), %r12      # 0x15fd8
movq 0xc45d(%rip), %rax      # 0x16348
cmpq 0xc45e(%rip), %rax      # 0x16350
je 0xa076
movslq (%rax), %r14
movq 0x8(%rax), %rbp
movl (%rbp), %eax
cmpl %eax, %r13d
jge 0x9f26
movq 0xc462(%rip), %rsi      # 0x16370
cmpq 0xc463(%rip), %rsi      # 0x16378
je 0x9f6b
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0xc44c(%rip)      # 0x16370
jmp 0x9f7a
jle 0x9f81
movl $0x19, %edx
movq %r12, %rdi
leaq 0x665c(%rip), %rsi      # 0x10593
callq 0x32e0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31d0
callq 0x48f8
jmp 0x9f81
leaq 0xc3f6(%rip), %rdi      # 0x16368
movq %rbp, %rdx
callq 0xdde8
incl %r15d
movl (%rbp), %r13d
movq 0xc3c0(%rip), %rdi      # 0x16348
movq 0xc3c1(%rip), %rax      # 0x16350
movq %rax, %rcx
subq %rdi, %rcx
cmpq $0x11, %rcx
jl 0x9fc1
leaq -0x10(%rax), %rdx
movl -0x10(%rax), %ecx
movq -0x8(%rax), %r8
movl (%rdi), %esi
movl %esi, -0x10(%rax)
movq 0x8(%rdi), %rsi
movq %rsi, -0x8(%rax)
subq %rdi, %rdx
sarq $0x4, %rdx
xorl %esi, %esi
callq 0xf5d2
addq $0x4, %rbp
movq 0xc35c(%rip), %rcx      # 0x16328
movq 0xc37d(%rip), %rax      # 0x16350
cmpq (%rcx,%r14,8), %rbp
je 0xa062
movq %rbp, -0x8(%rax)
movq 0xc360(%rip), %rax      # 0x16348
movq 0xc361(%rip), %rdi      # 0x16350
movl -0x10(%rdi), %ecx
movq -0x8(%rdi), %rdx
subq %rax, %rdi
sarq $0x4, %rdi
leaq -0x1(%rdi), %rsi
cmpq $0x2, %rdi
jl 0xa051
leaq -0x1(%rsi), %rdi
shrq $0x3f, %rdi
addq %rsi, %rdi
decq %rdi
sarq %rdi
movq %rdi, %r8
shlq $0x4, %r8
movq 0x8(%rax,%r8), %r9
movl (%r9), %r9d
cmpl (%rdx), %r9d
jle 0xa051
addq %rax, %r8
movq %rsi, %r9
shlq $0x4, %r9
movl (%r8), %r10d
movl %r10d, (%rax,%r9)
movq 0x8(%r8), %r8
movq %r8, 0x8(%rax,%r9)
cmpq $0x2, %rsi
movq %rdi, %rsi
jg 0xa007
jmp 0xa054
movq %rsi, %rdi
shlq $0x4, %rdi
movl %ecx, (%rax,%rdi)
movq %rdx, 0x8(%rax,%rdi)
jmp 0xa06d
addq $-0x10, %rax
movq %rax, 0xc2e3(%rip)      # 0x16350
cmpl (%rbx), %r15d
jl 0x9ee4
movq 0x10(%rsp), %rdi
shlq $0x3, %rdi
addq 0x90(%rbx), %rdi
leaq 0xc2db(%rip), %rsi      # 0x16368
callq 0xc2b6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3588
jmp 0x9bc9
callq 0x35d4
jmp 0x9bd7
leaq 0xc2c4(%rip), %rdi      # 0x16380
callq 0x3480
testl %eax, %eax
je 0x9be5
movslq (%rbx), %rsi
leaq 0xc295(%rip), %rdi      # 0x16368
movq %rsp, %rdx
callq 0xc488
leaq 0x1ec4(%rip), %rdi      # 0xbfa6
leaq 0xc27f(%rip), %rsi      # 0x16368
leaq 0xc188(%rip), %rdx      # 0x16278
callq 0x3240
leaq 0xc284(%rip), %rdi      # 0x16380
callq 0x31a0
jmp 0x9be5
movq %rax, %rbx
leaq 0xc270(%rip), %rdi      # 0x16380
callq 0x3190
movq %rbx, %rdi
callq 0x3460
nop