// File: 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
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x180(%rbp)
movslq (%rax), %rax
movq %rax, -0x178(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x8160
movq -0x178(%rbp), %rsi
movq -0x170(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x8180
jmp 0x6b41
leaq -0x39(%rbp), %rdi
callq 0x81c0
leaq -0xa0(%rbp), %rdi
callq 0x81e0
jmp 0x6b58
leaq -0xb8(%rbp), %rdi
callq 0x2c00
movl $0x0, -0xbc(%rbp)
movl $0x0, -0xc0(%rbp)
movq -0x180(%rbp), %rcx
movl -0xc0(%rbp), %eax
cmpl (%rcx), %eax
jge 0x6c3d
movl $0x0, -0xcc(%rbp)
leaq -0xc0(%rbp), %rdi
leaq -0xcc(%rbp), %rsi
callq 0x8240
movq %rax, -0x188(%rbp)
jmp 0x6bb3
movq -0x188(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x8210
jmp 0x6bd6
jmp 0x6bd8
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0x6b78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0x81c0
jmp 0x71dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x71d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x29e0
leaq -0xa0(%rbp), %rdi
callq 0x82d0
jmp 0x71d3
jmp 0x6c3f
leaq -0xa0(%rbp), %rdi
callq 0x8270
movb %al, -0x189(%rbp)
jmp 0x6c53
movb -0x189(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x6c64
jmp 0x6ea1
leaq -0xa0(%rbp), %rdi
callq 0x8290
movq %rax, -0x198(%rbp)
jmp 0x6c79
movq -0x198(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xd0(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x8290
movq %rax, -0x1a0(%rbp)
jmp 0x6c9d
movq -0x1a0(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0xd4(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x82b0
jmp 0x6cbb
cmpl $0x0, -0xd4(%rbp)
jne 0x6e85
movslq -0xd0(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x7930
movq %rdx, -0x1b0(%rbp)
movq %rax, -0x1a8(%rbp)
jmp 0x6ce8
movq -0x1b0(%rbp), %rax
movq -0x1a8(%rbp), %rcx
movq %rcx, -0xe8(%rbp)
movq %rax, -0xe0(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x7990
testb $0x1, %al
jne 0x6d16
jmp 0x6d1b
jmp 0x6c3f
movslq -0xd0(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x7930
movq %rdx, -0x1c0(%rbp)
movq %rax, -0x1b8(%rbp)
jmp 0x6d3b
movq -0x1c0(%rbp), %rax
movq -0x1b8(%rbp), %rcx
movq %rcx, -0xf8(%rbp)
movq %rax, -0xf0(%rbp)
leaq -0xf8(%rbp), %rdi
movl $0x1, %esi
callq 0x79c0
movl $0x1, -0x104(%rbp)
leaq -0xd0(%rbp), %rdi
leaq -0x104(%rbp), %rsi
callq 0x8240
movq %rax, -0x1c8(%rbp)
jmp 0x6d8e
movq -0x1c8(%rbp), %rax
movq %rax, -0x100(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x8210
jmp 0x6db1
movq -0x180(%rbp), %rdi
addq $0x20, %rdi
movslq -0xd0(%rbp), %rsi
callq 0x29c0
movl (%rax), %eax
movl %eax, -0x108(%rbp)
movq -0x180(%rbp), %rdi
movl -0x108(%rbp), %eax
movl %eax, -0x1cc(%rbp)
addq $0x20, %rdi
movl -0xd0(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x29c0
movq %rax, %rcx
movl -0x1cc(%rbp), %eax
cmpl (%rcx), %eax
jge 0x6e83
movq -0x180(%rbp), %rdi
addq $0x8, %rdi
movslq -0x108(%rbp), %rsi
callq 0x29c0
movl (%rax), %eax
movl %eax, -0x10c(%rbp)
movl $0x0, -0x118(%rbp)
leaq -0x10c(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x8240
movq %rax, -0x1d8(%rbp)
jmp 0x6e4a
movq -0x1d8(%rbp), %rax
movq %rax, -0x114(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0x114(%rbp), %rsi
callq 0x8210
jmp 0x6e6d
jmp 0x6e6f
movl -0x108(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x108(%rbp)
jmp 0x6dd0
jmp 0x6e9c
leaq -0xb8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x7860
jmp 0x6e9a
jmp 0x6e9c
jmp 0x6c3f
movl $0x0, -0x11c(%rbp)
movq -0x180(%rbp), %rcx
movl -0x11c(%rbp), %eax
cmpl (%rcx), %eax
jge 0x6f27
movslq -0x11c(%rbp), %rsi
leaq -0xb8(%rbp), %rdi
callq 0x29c0
movq %rax, %rdi
movl $0xffffffff, -0x128(%rbp) # imm = 0xFFFFFFFF
leaq -0x128(%rbp), %rsi
callq 0x8240
movq %rax, -0x1e0(%rbp)
jmp 0x6ef1
movq -0x1e0(%rbp), %rax
movq %rax, -0x124(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0x124(%rbp), %rsi
callq 0x8210
jmp 0x6f14
jmp 0x6f16
movl -0x11c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x11c(%rbp)
jmp 0x6eab
movq -0x180(%rbp), %rax
movslq (%rax), %rsi
movb $0x0, -0x129(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x129(%rbp), %rdx
callq 0x7bf0
jmp 0x6f4a
jmp 0x6f4c
leaq -0xa0(%rbp), %rdi
callq 0x8270
movb %al, -0x1e1(%rbp)
jmp 0x6f60
movb -0x1e1(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x6f71
jmp 0x7197
leaq -0xa0(%rbp), %rdi
callq 0x8290
movq %rax, -0x1f0(%rbp)
jmp 0x6f86
movq -0x1f0(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x130(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x8290
movq %rax, -0x1f8(%rbp)
jmp 0x6faa
movq -0x1f8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x134(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x82b0
jmp 0x6fc8
movslq -0x130(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x7930
movq %rdx, -0x208(%rbp)
movq %rax, -0x200(%rbp)
jmp 0x6fe8
movq -0x208(%rbp), %rax
movq -0x200(%rbp), %rcx
movq %rcx, -0x148(%rbp)
movq %rax, -0x140(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x7990
testb $0x1, %al
jne 0x7016
jmp 0x701b
jmp 0x6f4c
movslq -0x130(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x7930
movq %rdx, -0x218(%rbp)
movq %rax, -0x210(%rbp)
jmp 0x703b
movq -0x218(%rbp), %rax
movq -0x210(%rbp), %rcx
movq %rcx, -0x158(%rbp)
movq %rax, -0x150(%rbp)
leaq -0x158(%rbp), %rdi
movl $0x1, %esi
callq 0x79c0
cmpl $-0x1, -0x134(%rbp)
jne 0x708a
movl -0xbc(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xbc(%rbp)
movl %eax, -0x21c(%rbp)
jmp 0x7096
movl -0x134(%rbp), %eax
movl %eax, -0x21c(%rbp)
movl -0x21c(%rbp), %eax
movl %eax, -0x220(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x130(%rbp), %rsi
callq 0x29c0
movl -0x220(%rbp), %ecx
movq -0x180(%rbp), %rdi
movl %ecx, (%rax)
addq $0x50, %rdi
movslq -0x130(%rbp), %rsi
callq 0x29c0
movl (%rax), %eax
movl %eax, -0x15c(%rbp)
movq -0x180(%rbp), %rdi
movl -0x15c(%rbp), %eax
movl %eax, -0x224(%rbp)
addq $0x50, %rdi
movl -0x130(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x29c0
movq %rax, %rcx
movl -0x224(%rbp), %eax
cmpl (%rcx), %eax
jge 0x7192
movq -0x180(%rbp), %rdi
addq $0x38, %rdi
movslq -0x15c(%rbp), %rsi
callq 0x29c0
movl (%rax), %eax
movl %eax, -0x160(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x130(%rbp), %rsi
callq 0x29c0
movq %rax, %rsi
leaq -0x160(%rbp), %rdi
callq 0x2940
movq %rax, -0x230(%rbp)
jmp 0x7159
movq -0x230(%rbp), %rax
movq %rax, -0x168(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x8210
jmp 0x717c
jmp 0x717e
movl -0x15c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x15c(%rbp)
jmp 0x70d9
jmp 0x6f4c
movl -0xbc(%rbp), %eax
movl %eax, -0x234(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x29e0
leaq -0xa0(%rbp), %rdi
callq 0x82d0
leaq -0x38(%rbp), %rdi
callq 0x82f0
movl -0x234(%rbp), %eax
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x82f0
movq -0x48(%rbp), %rdi
callq 0x2280
nopw %cs:(%rax,%rax)
nop