// File: /workspace/github_cpp_makefile_star2_O3/datourat[P]IP-label-for-graph-reachability/Graph.cpp
// Function: Graph::BFS(int)
void Graph::BFS(const int root){
	queue<int> que;
	vector<bool> BFSflag(vsize, false);
	vector<bool> QueFlag(vsize, false);
	int now;

	if(root<-1){
		cout << "BFS Input Error: " << root << endl;
		return;
	}

	if(root==-1){
		for(int i=0; i<vsize; i++){
			if(vl[i].indegree==0){
				que.push(i);
				QueFlag[i]=true;
			}
		}
	}else{
		BFSflag[root]=true;
		for(int i=0; i<graph[root].outList.size(); i++){
			if(BFSflag[graph[root].outList[i]]==false){
				que.push(graph[root].outList[i]);
				QueFlag[graph[root].outList[i]]=true;
			}
		}
	}

	while(que.empty()==false){
		now=que.front();
		que.pop();

		BFSflag[now]=true;
		for(int i=0; i<graph[now].outList.size(); i++){
			if((BFSflag[graph[now].outList[i]]==false)&&(QueFlag[graph[now].outList[i]]==false)){
				que.push(graph[now].outList[i]);
				QueFlag[graph[now].outList[i]]=true;
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %esi, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0xe10a
movslq 0xc(%rbx), %rsi
leaq 0x68(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x90(%rsp), %rdi
leaq 0x8(%rsp), %rcx
callq 0xc71a
movslq 0xc(%rbx), %rsi
leaq 0x8(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x68(%rsp), %rdi
leaq 0xf(%rsp), %rcx
callq 0xc71a
cmpl $-0x2, %ebp
jg 0x7795
movq 0xe891(%rip), %rdi      # 0x15fd8
leaq 0x8dd3(%rip), %rsi      # 0x10521
movl $0x11, %edx
callq 0x32e0
movq 0xe879(%rip), %rdi      # 0x15fd8
movl %ebp, %esi
callq 0x3440
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31d0
jmp 0x7b1a
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
cmpl $-0x1, %ebp
je 0x78b6
movq 0x90(%rsp), %rax
movl %ebp, %edx
movl $0x1, %esi
movl %ebp, %ecx
shlq %cl, %rsi
shrl $0x6, %edx
orq %rsi, (%rax,%rdx,8)
movl %ebp, %ecx
movq 0x48(%rbx), %rax
leaq (%rcx,%rcx,2), %r15
shlq $0x4, %r15
movq 0x18(%rax,%r15), %rsi
cmpq %rsi, 0x20(%rax,%r15)
je 0x7960
xorl %r13d, %r13d
leaq 0x3f(%r12), %rbp
xorl %r14d, %r14d
movslq (%rsi,%r13), %rcx
leal 0x3f(%rcx), %edx
testq %rcx, %rcx
cmovnsl %ecx, %edx
sarl $0x6, %edx
movslq %edx, %rdx
shlq $0x3, %rdx
addq 0x90(%rsp), %rdx
movq %rcx, %rdi
andq %rbp, %rdi
xorl %r8d, %r8d
cmpq %r12, %rdi
setbe %r8b
movq -0x8(%rdx,%r8,8), %rdx
btq %rcx, %rdx
jb 0x7895
movq 0x40(%rsp), %rdx
movq 0x50(%rsp), %rdi
addq $-0x4, %rdi
cmpq %rdi, %rdx
je 0x7846
movl %ecx, (%rdx)
addq $0x4, %rdx
movq %rdx, 0x40(%rsp)
jmp 0x7857
addq %r13, %rsi
leaq 0x10(%rsp), %rdi
callq 0xe338
movq 0x48(%rbx), %rax
movq 0x18(%rax,%r15), %rsi
movslq (%rsi,%r13), %rcx
leal 0x3f(%rcx), %edx
testq %rcx, %rcx
cmovnsl %ecx, %edx
sarl $0x6, %edx
movslq %edx, %rdx
shlq $0x3, %rdx
addq 0x68(%rsp), %rdx
movq %rcx, %rdi
andq %rbp, %rdi
xorl %r8d, %r8d
cmpq %r12, %rdi
setbe %r8b
movl $0x1, %edi
shlq %cl, %rdi
orq %rdi, -0x8(%rdx,%r8,8)
incq %r14
movq 0x20(%rax,%r15), %rcx
subq %rsi, %rcx
sarq $0x2, %rcx
addq $0x4, %r13
cmpq %r14, %rcx
ja 0x77ec
jmp 0x7960
movl $0x0, 0x8(%rsp)
movl 0xc(%rbx), %eax
testl %eax, %eax
jle 0x7960
xorl %ecx, %ecx
leaq 0x10(%rsp), %r14
leaq 0x8(%rsp), %r15
leaq 0x3f(%r12), %r13
movslq %ecx, %rdx
movq 0x30(%rbx), %rsi
shlq $0x4, %rdx
cmpl $0x0, 0x8(%rsi,%rdx)
jne 0x7952
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rax
je 0x790c
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x40(%rsp)
jmp 0x7917
movq %r14, %rdi
movq %r15, %rsi
callq 0xe338
movslq 0x8(%rsp), %rcx
leal 0x3f(%rcx), %eax
testq %rcx, %rcx
cmovnsl %ecx, %eax
sarl $0x6, %eax
cltq
shlq $0x3, %rax
addq 0x68(%rsp), %rax
movq %rcx, %rdx
andq %r13, %rdx
xorl %esi, %esi
cmpq %r12, %rdx
setbe %sil
movl $0x1, %edx
shlq %cl, %rdx
orq %rdx, -0x8(%rax,%rsi,8)
movl 0xc(%rbx), %eax
incl %ecx
movl %ecx, 0x8(%rsp)
cmpl %eax, %ecx
jl 0x78da
movq 0x20(%rsp), %rdx
cmpq %rdx, 0x40(%rsp)
je 0x7b1a
leaq 0x3f(%r12), %r13
movslq (%rdx), %r15
movq 0x30(%rsp), %rax
addq $-0x4, %rax
cmpq %rax, %rdx
je 0x798c
addq $0x4, %rdx
jmp 0x79b9
movq 0x28(%rsp), %rdi
callq 0x3260
movq 0x38(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
leaq 0x200(%rdx), %rax
movq %rax, 0x30(%rsp)
leal 0x3f(%r15), %eax
testl %r15d, %r15d
cmovnsl %r15d, %eax
sarl $0x6, %eax
cltq
shlq $0x3, %rax
addq 0x90(%rsp), %rax
movq %r15, %rcx
andq %r13, %rcx
xorl %esi, %esi
cmpq %r12, %rcx
setbe %sil
movl $0x1, %edi
movl %r15d, %ecx
shlq %cl, %rdi
movq %rdx, 0x20(%rsp)
orq %rdi, -0x8(%rax,%rsi,8)
movq 0x48(%rbx), %rax
leaq (%r15,%r15,2), %r15
shlq $0x4, %r15
movq 0x18(%rax,%r15), %rsi
cmpq %rsi, 0x20(%rax,%r15)
je 0x7b0f
xorl %ebp, %ebp
xorl %r14d, %r14d
movslq (%rsi,%rbp), %rcx
leal 0x3f(%rcx), %edx
testq %rcx, %rcx
cmovnsl %ecx, %edx
sarl $0x6, %edx
movslq %edx, %rdi
leaq (,%rdi,8), %r9
addq 0x90(%rsp), %r9
movq %rcx, %r8
andq %r13, %r8
xorl %edx, %edx
cmpq %r12, %r8
setbe %dl
movl $0x1, %r8d
shlq %cl, %r8
movq -0x8(%r9,%rdx,8), %r9
btq %rcx, %r9
jb 0x7ae9
leaq -0x8(,%rdx,8), %r9
movq 0x68(%rsp), %rdx
leaq (%rdx,%rdi,8), %rdi
testq %r8, (%r9,%rdi)
jne 0x7ae9
movq 0x40(%rsp), %rdi
movq 0x50(%rsp), %r8
addq $-0x4, %r8
cmpq %r8, %rdi
je 0x7a9a
movl %ecx, (%rdi)
addq $0x4, %rdi
movq %rdi, 0x40(%rsp)
jmp 0x7ab0
addq %rbp, %rsi
leaq 0x10(%rsp), %rdi
callq 0xe338
movq 0x48(%rbx), %rax
movq 0x68(%rsp), %rdx
movq 0x18(%rax,%r15), %rcx
movslq (%rcx,%rbp), %rcx
leal 0x3f(%rcx), %esi
testq %rcx, %rcx
cmovnsl %ecx, %esi
sarl $0x6, %esi
movslq %esi, %rsi
movq %rcx, %rdi
andq %r13, %rdi
xorl %r8d, %r8d
cmpq %r12, %rdi
setbe %r8b
movl $0x1, %edi
shlq %cl, %rdi
leaq (%rdx,%rsi,8), %rcx
orq %rdi, -0x8(%rcx,%r8,8)
incq %r14
movq 0x18(%rax,%r15), %rsi
movq 0x20(%rax,%r15), %rcx
subq %rsi, %rcx
sarq $0x2, %rcx
addq $0x4, %rbp
cmpq %r14, %rcx
ja 0x7a1a
movq 0x20(%rsp), %rdx
cmpq %rdx, 0x40(%rsp)
jne 0x7975
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x7b3a
callq 0x3260
movq $0x0, 0x68(%rsp)
movl $0x0, 0x70(%rsp)
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x7b63
callq 0x3260
movq $0x0, 0x90(%rsp)
movl $0x0, 0x98(%rsp)
leaq 0x10(%rsp), %rdi
callq 0xcba2
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7b8f
jmp 0x7b8f
movq %rax, %rbx
jmp 0x7bb2
movq %rax, %rbx
jmp 0x7be1
jmp 0x7b8f
movq %rax, %rbx
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x7bb2
callq 0x3260
movq $0x0, 0x68(%rsp)
movl $0x0, 0x70(%rsp)
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x7be1
callq 0x3260
xorl %eax, %eax
movq %rax, 0x90(%rsp)
movl $0x0, 0x98(%rsp)
movq %rax, 0xa0(%rsp)
leaq 0x10(%rsp), %rdi
callq 0xcba2
movq %rbx, %rdi
callq 0x3460
nop