// File: /workspace/github_cpp_makefile_star2_O3/Laakeri[P]Triangulator/src/PMC.cpp
// Function: PMC::findMinSeps(Graph const&, long)
vector<vector<int> > findMinSeps(const Graph& G, int64_t UBcount = -1) {
	vector<vector<int> > minSeps;
	set<vector<int> > ff;
	for (int i = 0; i < G.n; i++) {
		if (G.g[i].size() == 0) continue;
		for (int j = 0; j < G.n; j++) {
			u[j] = 0;
		}
		for (int nx : G.g[i]) {
			u[nx] = 2;
		}
		u[i] = 2;
		for (int nx : G.g[i]) {
			for (int nnx : G.g[nx]) {
				if (u[nnx] == 0) {
					vector<int> nb;
					dfs4(G, nnx, nb);
					assert(nb.size() > 0);
					for (int a : nb) {
						u[a] = 2;
					}
					sort(nb.begin(), nb.end());
					if (!ff.count(nb)) {
						ff.insert(nb);
						minSeps.push_back(nb);
						if (UBcount != -1 && (int64_t)minSeps.size() >= UBcount) {
							sort(minSeps.begin(), minSeps.end());
							return minSeps;
						}
					}
				}
			}
		}
	}
	for (int i = 0; i < (int)minSeps.size(); i++) {
		auto S = minSeps[i];
		for (int x : S) {
			for (int j = 0; j < G.n; j++) {
				u[j] = 0;
			}
			for (int y : S) {
				u[y] = 2;
			}
			for (int nx : G.g[x]) {
				u[nx] = 2;
			}
			for (int nx : G.g[x]) {
				for (int nnx : G.g[nx]) {
					if (u[nnx] == 0) {
						vector<int> nb;
						dfs4(G, nnx, nb);
						assert(nb.size() > 0);
						for (int a : nb) {
							u[a] = 2;
						}
						sort(nb.begin(), nb.end());
						if (!ff.count(nb)) {
							ff.insert(nb);
							minSeps.push_back(nb);
							if (UBcount != -1 && (int64_t)minSeps.size() >= UBcount) {
								sort(minSeps.begin(), minSeps.end());
								return minSeps;
							}
						}
					}
				}
			}
		}
	}
	sort(minSeps.begin(), minSeps.end());
	return minSeps;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, 0x78(%rsp)
xorl %r8d, %r8d
movq %r8, 0x10(%rdi)
xorps %xmm0, %xmm0
movq %rdi, 0x8(%rsp)
movups %xmm0, (%rdi)
leaq 0x90(%rsp), %rax
movl $0x0, (%rax)
movq %r8, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %r8, 0x20(%rax)
movl 0x50(%rsi), %eax
testl %eax, %eax
movq %rsi, 0x70(%rsp)
jle 0x1d376
movq %rsi, %rdi
xorl %esi, %esi
leaq 0x5d0eba(%rip), %r13    # 0x5ee010
xorl %r8d, %r8d
movq 0x38(%rdi), %rcx
leaq (%rsi,%rsi,2), %rdx
movq (%rcx,%rdx,8), %r9
movq 0x8(%rcx,%rdx,8), %r10
cmpq %r9, %r10
movq %r8, 0x28(%rsp)
movq %rsi, 0x58(%rsp)
je 0x1d35c
movq %r9, %rcx
testl %eax, %eax
jle 0x1d1a2
movq %r13, %rax
xorl %ecx, %ecx
movl $0x0, (%rax)
incq %rcx
movslq 0x50(%rdi), %rdx
addq $0x4, %rax
cmpq %rdx, %rcx
jl 0x1d189
movq %r9, %rcx
movslq (%rcx), %rax
movl $0x2, (%r13,%rax,4)
addq $0x4, %rcx
cmpq %r10, %rcx
jne 0x1d1a2
movl $0x2, (%r13,%rsi,4)
movq %r10, 0x60(%rsp)
movq %r9, 0x68(%rsp)
movslq (%r9), %rax
movq 0x38(%rdi), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %r15
movq 0x8(%rcx,%rax,8), %r12
cmpq %r12, %r15
je 0x1d345
movslq (%r15), %rsi
cmpl $0x0, (%r13,%rsi,4)
jne 0x1d2ad
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
leaq 0x10(%rsp), %rdx
callq 0x1d021
movq 0x10(%rsp), %rbp
movq 0x18(%rsp), %r14
movq %r14, %rax
subq %rbp, %rax
je 0x1d714
sarq $0x2, %rax
movq %rbp, %rcx
movslq (%rcx), %rdx
movl $0x2, (%r13,%rdx,4)
addq $0x4, %rcx
cmpq %r14, %rcx
jne 0x1d22e
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %rbp, %rdi
movq %r14, %rsi
callq 0xaf7f
movq %rbp, %rdi
movq %r14, %rsi
callq 0xb062
leaq 0x88(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x21a9a
movb $0x1, %bpl
leaq 0x90(%rsp), %rcx
cmpq %rcx, %rax
je 0x1d2b6
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1d29f
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
testb %bpl, %bpl
movq 0x70(%rsp), %rdi
je 0x1d6c0
addq $0x4, %r15
jmp 0x1d1de
leaq 0x88(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x21b50
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xaaa4
movq 0x78(%rsp), %rdx
cmpq $-0x1, %rdx
je 0x1d288
movq 0x8(%rsp), %rax
movq (%rax), %r14
movq 0x8(%rax), %rbx
movq %rbx, %rax
subq %r14, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq %rdx, %rax
jl 0x1d288
movb $0x1, %cl
movq %rcx, 0x28(%rsp)
cmpq %rbx, %r14
je 0x1d33e
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb9b0
movq %r14, %rdi
movq %rbx, %rsi
callq 0xba6f
xorl %ebp, %ebp
jmp 0x1d288
movq 0x68(%rsp), %r9
addq $0x4, %r9
movq 0x60(%rsp), %r10
cmpq %r10, %r9
jne 0x1d1c5
movq 0x58(%rsp), %rsi
incq %rsi
movslq 0x50(%rdi), %rax
cmpq %rax, %rsi
movq 0x28(%rsp), %r8
jl 0x1d159
movq 0x8(%rsp), %rax
movq (%rax), %r12
movq 0x8(%rax), %r14
movq %r14, %rax
subq %r12, %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
testl %eax, %eax
jle 0x1d671
movq %r8, 0x28(%rsp)
xorl %ecx, %ecx
leaq 0x5d0c68(%rip), %rbp    # 0x5ee010
movq %rcx, 0x50(%rsp)
leaq (%rcx,%rcx,2), %rax
leaq (%r12,%rax,8), %rsi
leaq 0x10(%rsp), %rdi
callq 0x42ce
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq %rax, 0x80(%rsp)
cmpq %rax, %rdi
movq 0x70(%rsp), %r8
je 0x1d625
movslq (%rdi), %rax
cmpl $0x0, 0x50(%r8)
jle 0x1d404
movq %rbp, %rcx
xorl %edx, %edx
movl $0x0, (%rcx)
incq %rdx
movslq 0x50(%r8), %rsi
addq $0x4, %rcx
cmpq %rsi, %rdx
jl 0x1d3ee
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rdx
cmpq %rdx, %rcx
je 0x1d424
movslq (%rcx), %rsi
movl $0x2, (%rbp,%rsi,4)
addq $0x4, %rcx
jmp 0x1d40e
movq %rdi, 0x58(%rsp)
movq 0x38(%r8), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rdx
movq 0x8(%rcx,%rax,8), %rsi
movq %rdx, %rax
cmpq %rsi, %rdx
je 0x1d601
movslq (%rax), %rcx
movl $0x2, (%rbp,%rcx,4)
addq $0x4, %rax
cmpq %rsi, %rax
jne 0x1d446
cmpq %rsi, %rdx
movq %rsi, 0x60(%rsp)
je 0x1d601
movq %rdx, 0x68(%rsp)
movslq (%rdx), %rax
movq 0x38(%r8), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %r15
movq 0x8(%rcx,%rax,8), %r12
cmpq %r12, %r15
je 0x1d5ea
movslq (%r15), %rsi
cmpl $0x0, (%rbp,%rsi,4)
jne 0x1d551
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movq %r8, %rdi
leaq 0x30(%rsp), %rdx
callq 0x1d021
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %r14
movq %r14, %rax
subq %rbx, %rax
je 0x1d6f5
sarq $0x2, %rax
movq %rbx, %rcx
movslq (%rcx), %rdx
movl $0x2, (%rbp,%rdx,4)
addq $0x4, %rcx
cmpq %r14, %rcx
jne 0x1d4d3
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xaf7f
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb062
leaq 0x88(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x21a9a
movb $0x1, %r13b
leaq 0x90(%rsp), %rcx
cmpq %rcx, %rax
je 0x1d55a
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1d543
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
testb %r13b, %r13b
je 0x1d61c
movq 0x70(%rsp), %r8
addq $0x4, %r15
jmp 0x1d481
leaq 0x88(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x21b50
movq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xaaa4
movq 0x78(%rsp), %rdx
cmpq $-0x1, %rdx
je 0x1d52c
movq 0x8(%rsp), %rax
movq (%rax), %r14
movq 0x8(%rax), %rbx
movq %rbx, %rax
subq %r14, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq %rdx, %rax
jl 0x1d52c
movb $0x1, %cl
movq %rcx, 0x28(%rsp)
cmpq %rbx, %r14
je 0x1d5e2
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb9b0
movq %r14, %rdi
movq %rbx, %rsi
callq 0xba6f
xorl %r13d, %r13d
jmp 0x1d52c
movq 0x68(%rsp), %rdx
addq $0x4, %rdx
movq 0x60(%rsp), %rsi
cmpq %rsi, %rdx
jne 0x1d468
movq 0x58(%rsp), %rdi
addq $0x4, %rdi
cmpq 0x80(%rsp), %rdi
jne 0x1d3df
movb $0x1, %bl
jmp 0x1d61e
xorl %ebx, %ebx
movq 0x10(%rsp), %rdi
jmp 0x1d627
movb $0x1, %bl
movq 0x50(%rsp), %rcx
testq %rdi, %rdi
je 0x1d643
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq 0x50(%rsp), %rcx
testb %bl, %bl
je 0x1d6c0
incq %rcx
movq 0x8(%rsp), %rax
movq (%rax), %r12
movq 0x8(%rax), %r14
movq %r14, %rax
subq %r12, %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
cltq
cmpq %rax, %rcx
jl 0x1d3a8
cmpq %r14, %r12
je 0x1d6b1
movq %r14, %rax
subq %r12, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0xb9b0
movq %r12, %rdi
movq %r14, %rsi
callq 0xba6f
leaq 0x88(%rsp), %rdi
callq 0x21862
jmp 0x1d6de
leaq 0x88(%rsp), %rdi
callq 0x21862
testb $0x1, 0x28(%rsp)
jne 0x1d6de
movq 0x8(%rsp), %rdi
callq 0x41aa
movq 0x8(%rsp), %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd538(%rip), %rdi      # 0x2ac34
leaq 0xcfc3(%rip), %rsi      # 0x2a6c6
leaq 0xd538(%rip), %rcx      # 0x2ac42
movl $0x1c9, %edx            # imm = 0x1C9
callq 0x2140
leaq 0xd519(%rip), %rdi      # 0x2ac34
leaq 0xcfa4(%rip), %rsi      # 0x2a6c6
leaq 0xd519(%rip), %rcx      # 0x2ac42
movl $0x1a7, %edx            # imm = 0x1A7
callq 0x2140
jmp 0x1d735
movq %rax, %r14
jmp 0x1d770
movq %rax, %r14
jmp 0x1d759
movq %rax, %r14
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1d759
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1d770
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
leaq 0x88(%rsp), %rdi
callq 0x21862
movq 0x8(%rsp), %rdi
callq 0x41aa
movq %r14, %rdi
callq 0x2310