// File: /workspace/github_cpp_makefile_star2_O1/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 $0xa8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movslq (%rdi), %rsi
leaq 0x50(%rsp), %r15
movb $0x0, (%r15)
leaq 0x28(%rsp), %rdi
leaq 0x10(%rsp), %rcx
movq %r15, %rdx
callq 0x7058
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%r15)
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
callq 0x7144
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
cmpl $0x0, (%r14)
jle 0x4969
xorl %r13d, %r13d
leaq 0x50(%rsp), %r15
leaq 0x8(%rsp), %r12
movq %r13, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x72ba
incq %r13
movslq (%r14), %rax
cmpq %rax, %r13
jl 0x494e
movq 0x80(%rsp), %rax
cmpq 0x60(%rsp), %rax
je 0x4b11
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
leaq 0x3f(%rcx), %r13
leaq 0x50(%rsp), %r15
leaq 0x8(%rsp), %r12
movq 0x88(%rsp), %rdi
cmpq %rdi, %rax
je 0x49ac
movl -0x8(%rax), %ecx
movl %ecx, (%rsp)
movq %rax, %rcx
jmp 0x49c8
movq 0x98(%rsp), %rcx
movq -0x8(%rcx), %rcx
movl 0x1f8(%rcx), %edx
movl %edx, (%rsp)
addq $0x200, %rcx            # imm = 0x200
movl -0x4(%rcx), %ebp
cmpq %rdi, %rax
je 0x49d6
addq $-0x8, %rax
jmp 0x4a15
movl $0x200, %esi            # imm = 0x200
callq 0x2170
movq 0x98(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x98(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x88(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x90(%rsp)
addq $0x1f8, %rax            # imm = 0x1F8
movq %rax, 0x80(%rsp)
testl %ebp, %ebp
je 0x4a44
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x4af1
movl (%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x4afe
movslq (%rsp), %rcx
leaq 0x3f(%rcx), %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x6, %rax
shlq $0x3, %rax
addq 0x28(%rsp), %rax
movq %rcx, %rsi
andq %r13, %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 0x4afe
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 0x72ba
movslq (%rsp), %rax
movq 0x20(%r14), %rcx
movslq (%rcx,%rax,4), %rbp
cmpl 0x4(%rcx,%rax,4), %ebp
jge 0x4afe
movq 0x8(%r14), %rax
movl (%rax,%rbp,4), %eax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x72ba
incq %rbp
movslq (%rsp), %rax
movq 0x20(%r14), %rcx
movslq 0x4(%rcx,%rax,4), %rax
cmpq %rax, %rbp
jl 0x4ac3
jmp 0x4afe
leaq 0x10(%rsp), %rdi
movq %rsp, %rdx
callq 0x6140
movq 0x80(%rsp), %rax
cmpq 0x60(%rsp), %rax
jne 0x4994
movl (%r14), %eax
testl %eax, %eax
jle 0x4b56
xorl %r13d, %r13d
movabsq $-0x100000000, %rbp     # imm = 0xFFFFFFFF00000000
leaq 0x50(%rsp), %r15
leaq 0x8(%rsp), %r12
movq 0x10(%rsp), %rax
movl (%rax,%r13,4), %eax
orq %rbp, %rax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x72ba
incq %r13
movslq (%r14), %rax
cmpq %rax, %r13
jl 0x4b2f
movslq %eax, %rsi
leaq 0x28(%rsp), %rdi
movl $0x0, 0x4(%rsp)
xorl %edx, %edx
callq 0x65a6
movq 0x80(%rsp), %rax
cmpq 0x60(%rsp), %rax
je 0x4d10
movl $0x0, 0x4(%rsp)
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
addq $0x3f, %rcx
movq %rcx, 0xa0(%rsp)
leaq 0x50(%rsp), %r15
leaq 0x8(%rsp), %r12
movq 0x88(%rsp), %rdi
movq %rax, %rcx
cmpq %rdi, %rax
jne 0x4bcc
movq 0x98(%rsp), %rcx
movq -0x8(%rcx), %rcx
movl $0x200, %edx            # imm = 0x200
addq %rdx, %rcx
movq %rax, %rdx
cmpq %rdi, %rax
jne 0x4be8
movq 0x98(%rsp), %rdx
movq -0x8(%rdx), %rdx
movl $0x200, %esi            # imm = 0x200
addq %rsi, %rdx
movslq -0x8(%rcx), %r13
movl -0x4(%rdx), %ebp
cmpq %rdi, %rax
je 0x4bfa
addq $-0x8, %rax
jmp 0x4c39
movl $0x200, %esi            # imm = 0x200
callq 0x2170
movq 0x98(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x98(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x88(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x90(%rsp)
addq $0x1f8, %rax            # imm = 0x1F8
leaq 0x3f(%r13), %rdx
testq %r13, %r13
cmovnsq %r13, %rdx
sarq $0x6, %rdx
shlq $0x3, %rdx
addq 0x28(%rsp), %rdx
movq %r13, %rcx
andq 0xa0(%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, 0x80(%rsp)
movq -0x8(%rdx,%rsi,8), %rax
btq %r13, %rax
jb 0x4cfd
leaq -0x8(,%rsi,8), %rcx
orq %rdi, %rax
movq %rax, (%rdx,%rcx)
xorl %eax, %eax
cmpl $-0x1, %ebp
movl 0x4(%rsp), %ecx
cmovel %ecx, %ebp
sete %al
addl %eax, %ecx
movl %ecx, 0x4(%rsp)
movq (%rbx), %rax
movl %ebp, (%rax,%r13,4)
movq 0x50(%r14), %rax
movslq (%rax,%r13,4), %rbp
cmpl 0x4(%rax,%r13,4), %ebp
jge 0x4cfd
movq 0x38(%r14), %rax
movl (%rax,%rbp,4), %eax
movq (%rbx), %rcx
movl (%rcx,%r13,4), %ecx
shlq $0x20, %rcx
orq %rax, %rcx
movq %rcx, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x72ba
incq %rbp
movq 0x50(%r14), %rax
movslq 0x4(%rax,%r13,4), %rax
cmpq %rax, %rbp
jl 0x4cc7
movq 0x80(%rsp), %rax
cmpq 0x60(%rsp), %rax
jne 0x4ba8
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4d27
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
leaq 0x50(%rsp), %rdi
callq 0x51c0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x4d61
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
xorl %eax, %eax
movq %rax, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movl %eax, 0x40(%rsp)
movq %rax, 0x48(%rsp)
movl 0x4(%rsp), %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4d88
movq %rax, %rbx
jmp 0x4dac
jmp 0x4d88
jmp 0x4d88
jmp 0x4d88
jmp 0x4d88
jmp 0x4d88
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4da2
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
leaq 0x50(%rsp), %rdi
callq 0x51c0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x4ddc
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
xorl %eax, %eax
movq %rax, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movl %eax, 0x40(%rsp)
movq %rax, 0x48(%rsp)
movq %rbx, %rdi
callq 0x2200