// File: /workspace/github_cpp_makefile_star2_O3/todo314[P]pruned-monte-carlo/src/pmc.cpp
// Function: InfluenceMaximizer::scc(std::vector<int, std::allocator<int>>&)
int InfluenceMaximizer::scc(vector<int> &comp) {
	vector<bool> vis(n);
	stack<pair<int, int> > S;
	vector<int> lis;
	int k = 0;
	for (int i = 0; i < n; i++) {
		S.push(make_pair(i, 0));
	}
	for (; !S.empty();) {
		int v = S.top().first, state = S.top().second;
		S.pop();
		if (state == 0) {
			if (vis[v]) {
				continue;
			}
			vis[v] = true;
			S.push(make_pair(v, 1));
			for (int i = at_e[v]; i < at_e[v + 1]; i++) {
				int u = es1[i];
				S.push(make_pair(u, 0));
			}
		} else {
			lis.push_back(v);
		}
	}
	for (int i = 0; i < n; i++) {
		S.push(make_pair(lis[i], -1));
	}
	vis.assign(n, false);
	for (; !S.empty();) {
		int v = S.top().first, arg = S.top().second;
		S.pop();
		if (vis[v]) {
			continue;
		}
		vis[v] = true;
		comp[v] = arg == -1 ? k++ : arg;
		for (int i = at_r[v]; i < at_r[v + 1]; i++) {
			int u = rs1[i];
			S.push(make_pair(u, comp[v]));
		}
	}
	return k;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %r13
movq %rdi, %r14
movslq (%rdi), %rsi
leaq 0x30(%rsp), %r15
movb $0x0, (%r15)
leaq 0x90(%rsp), %rdi
leaq 0x10(%rsp), %rcx
movq %r15, %rdx
callq 0x76f6
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%r15)
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x77e2
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movl (%r14), %ecx
testl %ecx, %ecx
jle 0x4936
xorl %ebx, %ebx
leaq 0x30(%rsp), %r15
leaq 0x8(%rsp), %r12
movq %rbx, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x7958
incq %rbx
movslq (%r14), %rcx
cmpq %rcx, %rbx
jl 0x491b
movq 0x60(%rsp), %rax
cmpq 0x40(%rsp), %rax
movq %r13, 0x80(%rsp)
je 0x4ad0
movl $0x1f8, %r13d           # imm = 0x1F8
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
leaq 0x3f(%rcx), %rbp
leaq 0x30(%rsp), %r15
leaq 0x8(%rsp), %r12
movq 0x68(%rsp), %rdi
cmpq %rdi, %rax
je 0x4986
leaq -0x8(%rax), %rcx
movl -0x8(%rax), %edx
movl %edx, 0x4(%rsp)
movl -0x4(%rax), %ebx
jmp 0x49cf
movq 0x78(%rsp), %rax
movq -0x8(%rax), %rax
movl 0x1f8(%rax), %ecx
movl %ecx, 0x4(%rsp)
movl 0x1fc(%rax), %ebx
movl $0x200, %esi            # imm = 0x200
callq 0x2170
movq 0x78(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x78(%rsp)
movq -0x8(%rax), %rcx
movq %rcx, 0x68(%rsp)
leaq 0x200(%rcx), %rax
movq %rax, 0x70(%rsp)
addq %r13, %rcx
movq %rcx, 0x60(%rsp)
testl %ebx, %ebx
je 0x49fc
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x4aae
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x4abd
movslq 0x4(%rsp), %rcx
leal 0x3f(%rcx), %eax
testq %rcx, %rcx
cmovnsl %ecx, %eax
sarl $0x6, %eax
cltq
shlq $0x3, %rax
addq 0x90(%rsp), %rax
movq %rcx, %rsi
andq %rbp, %rsi
xorl %edx, %edx
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
cmpq %rdi, %rsi
setbe %dl
movl $0x1, %esi
shlq %cl, %rsi
movq -0x8(%rax,%rdx,8), %rdi
btq %rcx, %rdi
jb 0x4abd
movl %ecx, %ecx
leaq -0x8(,%rdx,8), %rdx
orq %rdi, %rsi
movq %rsi, (%rax,%rdx)
btsq $0x20, %rcx
movq %rcx, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x7958
movslq 0x4(%rsp), %rax
movq 0x20(%r14), %rcx
movslq (%rcx,%rax,4), %rbx
cmpl 0x4(%rcx,%rax,4), %ebx
jge 0x4abd
movq 0x8(%r14), %rax
movl (%rax,%rbx,4), %eax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x7958
incq %rbx
movslq 0x4(%rsp), %rax
movq 0x20(%r14), %rcx
movslq 0x4(%rcx,%rax,4), %rax
cmpq %rax, %rbx
jl 0x4a7f
jmp 0x4abd
leaq 0x10(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x6498
movq 0x60(%rsp), %rax
cmpq 0x40(%rsp), %rax
jne 0x496c
movl (%r14), %ecx
testl %ecx, %ecx
jle 0x4b12
xorl %ebx, %ebx
movabsq $-0x100000000, %r13     # imm = 0xFFFFFFFF00000000
leaq 0x30(%rsp), %r15
leaq 0x8(%rsp), %r12
movq 0x10(%rsp), %rax
movl (%rax,%rbx,4), %eax
orq %r13, %rax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x7958
incq %rbx
movslq (%r14), %rsi
cmpq %rsi, %rbx
jl 0x4aea
jmp 0x4b15
movslq %ecx, %rsi
leaq 0x90(%rsp), %rdi
xorl %ebx, %ebx
xorl %edx, %edx
callq 0x68fe
movq 0x60(%rsp), %rax
cmpq 0x40(%rsp), %rax
je 0x4c9b
xorl %ebp, %ebp
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
addq $0x3f, %rcx
movq %rcx, 0x88(%rsp)
leaq 0x8(%rsp), %r12
movq 0x68(%rsp), %rdi
cmpq %rdi, %rax
je 0x4b6a
movl -0x8(%rax), %ebx
movl -0x4(%rax), %r15d
addq $-0x8, %rax
jmp 0x4bb5
movq 0x78(%rsp), %rax
movq -0x8(%rax), %rax
movl 0x1f8(%rax), %ebx
movl 0x1fc(%rax), %r15d
movl $0x200, %esi            # imm = 0x200
callq 0x2170
movq 0x78(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x78(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x68(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x70(%rsp)
movl $0x1f8, %ecx            # imm = 0x1F8
addq %rcx, %rax
movslq %ebx, %r13
leal 0x3f(%r13), %ecx
testl %r13d, %r13d
cmovnsl %r13d, %ecx
sarl $0x6, %ecx
movslq %ecx, %rdx
shlq $0x3, %rdx
addq 0x90(%rsp), %rdx
movq %r13, %rcx
andq 0x88(%rsp), %rcx
xorl %esi, %esi
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
cmpq %rdi, %rcx
setbe %sil
movl $0x1, %edi
movl %r13d, %ecx
shlq %cl, %rdi
movq %rax, 0x60(%rsp)
movq -0x8(%rdx,%rsi,8), %rcx
btq %r13, %rcx
jae 0x4c12
movl %ebp, %ebx
jmp 0x4c8e
leaq -0x8(,%rsi,8), %rsi
orq %rdi, %rcx
movq %rcx, (%rdx,%rsi)
xorl %ebx, %ebx
cmpl $-0x1, %r15d
cmovel %ebp, %r15d
sete %bl
addl %ebp, %ebx
movq 0x80(%rsp), %rbp
movq (%rbp), %rcx
movl %r15d, (%rcx,%r13,4)
movq 0x50(%r14), %rcx
movslq (%rcx,%r13,4), %r15
cmpl 0x4(%rcx,%r13,4), %r15d
jge 0x4c8e
movq 0x38(%r14), %rax
movl (%rax,%r15,4), %eax
movq (%rbp), %rcx
movl (%rcx,%r13,4), %ecx
shlq $0x20, %rcx
orq %rax, %rcx
movq %rcx, 0x8(%rsp)
leaq 0x30(%rsp), %rdi
movq %r12, %rsi
callq 0x7958
incq %r15
movq 0x50(%r14), %rax
movslq 0x4(%rax,%r13,4), %rax
cmpq %rax, %r15
jl 0x4c4f
movq 0x60(%rsp), %rax
movl %ebx, %ebp
cmpq 0x40(%rsp), %rax
jne 0x4b53
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4cb2
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
leaq 0x30(%rsp), %rdi
callq 0x5146
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x4cd9
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movl %ebx, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4cfe
movq %rax, %rbx
jmp 0x4d22
jmp 0x4cfe
jmp 0x4cfe
jmp 0x4cfe
jmp 0x4cfe
jmp 0x4cfe
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4d18
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
leaq 0x30(%rsp), %rdi
callq 0x5146
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x4d3f
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2200
nop