// File: /workspace/github_cpp_makefile_star2_O1/datourat[P]IP-label-for-graph-reachability/Graph.cpp
// Function: Graph::SubComputeProLabelOut(int)
void Graph::SubComputeProLabelOut(int u){
	int edgelistsize=graph[u].outList.size();
	int v;
	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, ProLabelOut[u].begin()));
	iterend.push_back(ProLabelOut[u].end());
/*
	for(int i=0; i<edgelistsize; i++){
		v=graph[u].outList[i];
		iterlist.push_back( make_pair(i+1, ProLabelOut[v].begin()) );
		iterend.push_back(ProLabelOut[v].end());
	}
*/
	int i=1;
	for(vector<int>::iterator it=graph[u].outList.begin(); it!=graph[u].outList.end(); i++, it++){
		iterlist.push_back( make_pair(i, ProLabelOut[*it].begin()) );
		iterend.push_back( ProLabelOut[*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> ());
		}
	}

	ProLabelOut[u]=label;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movb 0xcd6b(%rip), %al       # 0x162e0
testb %al, %al
je 0x9a47
movb 0xcd7d(%rip), %al       # 0x16300
testb %al, %al
je 0x9a51
movb 0xcd8f(%rip), %al       # 0x16320
testb %al, %al
je 0x9a5b
movq 0xcd68(%rip), %rax      # 0x16308
cmpq %rax, 0xcd69(%rip)      # 0x16310
je 0x95b0
movq %rax, 0xcd60(%rip)      # 0x16310
movq 0xcd11(%rip), %rax      # 0x162c8
cmpq %rax, 0xcd12(%rip)      # 0x162d0
je 0x95c7
movq %rax, 0xcd09(%rip)      # 0x162d0
movslq %ebp, %rax
movq 0xcd17(%rip), %rcx      # 0x162e8
cmpq %rcx, 0xcd18(%rip)      # 0x162f0
je 0x95e1
movq %rcx, 0xcd0f(%rip)      # 0x162f0
movq 0x78(%rbx), %rcx
leaq (%rax,%rax,2), %r14
movq (%rcx,%r14,8), %rax
movl $0x0, (%rsp)
movq %rax, 0x8(%rsp)
movq 0xccf0(%rip), %rsi      # 0x162f0
cmpq 0xccf1(%rip), %rsi      # 0x162f8
je 0x961a
movups (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0xccd8(%rip)     # 0x162f0
jmp 0x9629
leaq 0xccc7(%rip), %rdi      # 0x162e8
movq %rsp, %rdx
callq 0xf2f0
movq 0x78(%rbx), %rax
movq 0x8(%rax,%r14,8), %rax
movq %rax, (%rsp)
movq 0xcc93(%rip), %rsi      # 0x162d0
cmpq 0xcc94(%rip), %rsi      # 0x162d8
je 0x9657
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0xcc7b(%rip)      # 0x162d0
jmp 0x9666
leaq 0xcc6a(%rip), %rdi      # 0x162c8
movq %rsp, %rdx
callq 0xf428
movq 0x48(%rbx), %rax
movq %r14, 0x10(%rsp)
shlq $0x4, %r14
movq 0x18(%rax,%r14), %rbp
cmpq 0x20(%rax,%r14), %rbp
je 0x9733
movl $0x1, %r15d
movq %rsp, %r12
leaq 0xcc35(%rip), %r13      # 0x162c8
movslq (%rbp), %rax
movq 0x78(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rax
movl %r15d, (%rsp)
movq %rax, 0x8(%rsp)
movq 0xcc3d(%rip), %rsi      # 0x162f0
cmpq 0xcc3e(%rip), %rsi      # 0x162f8
je 0x96cd
movups (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0xcc25(%rip)     # 0x162f0
jmp 0x96dc
leaq 0xcc14(%rip), %rdi      # 0x162e8
movq %r12, %rdx
callq 0xf2f0
movslq (%rbp), %rax
movq 0x78(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movq 0x8(%rcx,%rax,8), %rax
movq %rax, (%rsp)
movq 0xcbd8(%rip), %rsi      # 0x162d0
cmpq 0xcbd9(%rip), %rsi      # 0x162d8
je 0x9712
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0xcbc0(%rip)      # 0x162d0
jmp 0x971d
movq %r13, %rdi
movq %r12, %rdx
callq 0xf428
incl %r15d
addq $0x4, %rbp
movq 0x48(%rbx), %rax
cmpq 0x20(%rax,%r14), %rbp
jne 0x9693
movq 0xcbae(%rip), %rdi      # 0x162e8
movq 0xcbaf(%rip), %rsi      # 0x162f0
movq %rsp, %rdx
callq 0xf565
movq 0xcb98(%rip), %rax      # 0x162e8
movslq (%rax), %r14
movq 0x8(%rax), %r15
movq 0xcbb2(%rip), %rsi      # 0x16310
cmpq 0xcbb3(%rip), %rsi      # 0x16318
je 0x9779
movl (%r15), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0xcb99(%rip)      # 0x16310
jmp 0x9788
leaq 0xcb88(%rip), %rdi      # 0x16308
movq %r15, %rdx
callq 0xdde8
movl (%r15), %r13d
movq 0xcb56(%rip), %rdi      # 0x162e8
movq 0xcb57(%rip), %rax      # 0x162f0
movq %rax, %rcx
subq %rdi, %rcx
cmpq $0x11, %rcx
jl 0x97cb
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 0xcaf2(%rip), %rcx      # 0x162c8
movq 0xcb13(%rip), %rax      # 0x162f0
cmpq (%rcx,%r14,8), %r15
je 0x986c
movq %r15, -0x8(%rax)
movq 0xcaf6(%rip), %rax      # 0x162e8
movq 0xcaf7(%rip), %rdi      # 0x162f0
movl -0x10(%rdi), %ecx
movq -0x8(%rdi), %rdx
subq %rax, %rdi
sarq $0x4, %rdi
leaq -0x1(%rdi), %rsi
cmpq $0x2, %rdi
jl 0x985b
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 0x985b
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 0x9811
jmp 0x985e
movq %rsi, %rdi
shlq $0x4, %rdi
movl %ecx, (%rax,%rdi)
movq %rdx, 0x8(%rax,%rdi)
jmp 0x9877
addq $-0x10, %rax
movq %rax, 0xca79(%rip)      # 0x162f0
cmpl $0x2, (%rbx)
jl 0x9a1f
movl $0x1, %r15d
movq 0xc74b(%rip), %r12      # 0x15fd8
movq 0xca54(%rip), %rax      # 0x162e8
cmpq 0xca55(%rip), %rax      # 0x162f0
je 0x9a1f
movslq (%rax), %r14
movq 0x8(%rax), %rbp
movl (%rbp), %eax
cmpl %eax, %r13d
jge 0x98cf
movq 0xca59(%rip), %rsi      # 0x16310
cmpq 0xca5a(%rip), %rsi      # 0x16318
je 0x9914
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0xca43(%rip)      # 0x16310
jmp 0x9923
jle 0x992a
movl $0x19, %edx
movq %r12, %rdi
leaq 0x6cb3(%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 0x992a
leaq 0xc9ed(%rip), %rdi      # 0x16308
movq %rbp, %rdx
callq 0xdde8
incl %r15d
movl (%rbp), %r13d
movq 0xc9b7(%rip), %rdi      # 0x162e8
movq 0xc9b8(%rip), %rax      # 0x162f0
movq %rax, %rcx
subq %rdi, %rcx
cmpq $0x11, %rcx
jl 0x996a
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 0xc953(%rip), %rcx      # 0x162c8
movq 0xc974(%rip), %rax      # 0x162f0
cmpq (%rcx,%r14,8), %rbp
je 0x9a0b
movq %rbp, -0x8(%rax)
movq 0xc957(%rip), %rax      # 0x162e8
movq 0xc958(%rip), %rdi      # 0x162f0
movl -0x10(%rdi), %ecx
movq -0x8(%rdi), %rdx
subq %rax, %rdi
sarq $0x4, %rdi
leaq -0x1(%rdi), %rsi
cmpq $0x2, %rdi
jl 0x99fa
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 0x99fa
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 0x99b0
jmp 0x99fd
movq %rsi, %rdi
shlq $0x4, %rdi
movl %ecx, (%rax,%rdi)
movq %rdx, 0x8(%rax,%rdi)
jmp 0x9a16
addq $-0x10, %rax
movq %rax, 0xc8da(%rip)      # 0x162f0
cmpl (%rbx), %r15d
jl 0x988d
movq 0x10(%rsp), %rdi
shlq $0x3, %rdi
addq 0x78(%rbx), %rdi
leaq 0xc8d5(%rip), %rsi      # 0x16308
callq 0xc2b6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x34f0
jmp 0x957d
callq 0x353c
jmp 0x958b
leaq 0xc8be(%rip), %rdi      # 0x16320
callq 0x3480
testl %eax, %eax
je 0x9599
movslq (%rbx), %rsi
leaq 0xc88f(%rip), %rdi      # 0x16308
movq %rsp, %rdx
callq 0xc488
leaq 0x251e(%rip), %rdi      # 0xbfa6
leaq 0xc879(%rip), %rsi      # 0x16308
leaq 0xc7e2(%rip), %rdx      # 0x16278
callq 0x3240
leaq 0xc87e(%rip), %rdi      # 0x16320
callq 0x31a0
jmp 0x9599
movq %rax, %rbx
leaq 0xc86a(%rip), %rdi      # 0x16320
callq 0x3190
movq %rbx, %rdi
callq 0x3460
nop