// File: Laakeri[P]Triangulator/src/PMC.cpp
// Function: PMC::findPMCs(Graph const&, PMC::valueT, int)
vector<vector<int> > findPMCs(const Graph& G, valueT upperBound, int PROBLEM) {
	assert(G.isConnected());
	vector<int> rmV(G.n);
	vector<int> order = MCS::MCS_L(G, 0, rmV);
	reverse(order.begin(), order.end());
	vector<int> ord(G.n);
	assert((int)order.size() == G.n);
	for (int i = 0; i < G.n; i++) {
		ord[order[i]] = i;
	}
	Graph nG(G.n, true);
	vector<vector<int> > PMCs = {{order[0]}};
	vector<vector<int> > minSeps = {};
	for (int i = 1; i < G.n; i++) {
		int x = order[i];
		for (int nx : G.g[x]) {
			if (ord[nx] < ord[x]) {
				nG.addEdge(nx, x);
			}
		}
		assert(nG.isConnectedOrIsolated());
		auto newMinSeps = findMinSeps(nG);
		for (auto& s : newMinSeps) {
			assert(isMinSep(nG, s));
		}
		PMCs = ONE_MORE_VERTEX(nG, PMCs, minSeps, newMinSeps, x, upperBound, PROBLEM);
		minSeps = newMinSeps;
		for (auto& pmc : PMCs) {
			assert(canFill(G, pmc, upperBound, PROBLEM));
			sort(pmc.begin(), pmc.end());
		}
		sort(PMCs.begin(), PMCs.end());
		PMCs.erase(unique(PMCs.begin(), PMCs.end()), PMCs.end());
		if (printProgress) cerr<<"ONE_MORE_VERTEX: "<<G.n<<" "<<i<<" "<<PMCs.size()<<" "<<minSeps.size()<<endl;
	}
	return PMCs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x400, %rsp            # imm = 0x400
movq %rdi, -0x2c0(%rbp)
movq %rdi, %rax
movq %rax, -0x2b8(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x16d00
testb $0x1, %al
jne 0x3d901
jmp 0x3d903
jmp 0x3d922
leaq 0x1d325(%rip), %rdi     # 0x5ac2f
leaq 0x1cd65(%rip), %rsi     # 0x5a676
movl $0x1fa, %edx            # imm = 0x1FA
leaq 0x1d322(%rip), %rcx     # 0x5ac3f
callq 0x31a0
movq -0x10(%rbp), %rax
movslq 0x50(%rax), %rax
movq %rax, -0x2d0(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x2c8(%rbp)
callq 0x111b0
movq -0x2d0(%rbp), %rsi
movq -0x2c8(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0x17ab0
jmp 0x3d95a
leaq -0x31(%rbp), %rdi
callq 0x6620
movq -0x10(%rbp), %rsi
leaq -0x60(%rbp), %rdi
xorl %edx, %edx
leaq -0x30(%rbp), %rcx
callq 0x29a80
jmp 0x3d978
leaq -0x60(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
callq 0xe060
movq -0x2d8(%rbp), %rdi
movq %rax, -0x68(%rbp)
callq 0xe090
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x2ddc0
jmp 0x3d9ab
movq -0x10(%rbp), %rax
movslq 0x50(%rax), %rax
movq %rax, -0x2e8(%rbp)
leaq -0x89(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
callq 0x111b0
movq -0x2e8(%rbp), %rsi
movq -0x2e0(%rbp), %rdx
leaq -0x88(%rbp), %rdi
callq 0x17ab0
jmp 0x3d9e9
leaq -0x89(%rbp), %rdi
callq 0x6620
leaq -0x60(%rbp), %rdi
callq 0x59a0
movq -0x10(%rbp), %rcx
cmpl 0x50(%rcx), %eax
jne 0x3da09
jmp 0x3da81
leaq 0x1c40d(%rip), %rdi     # 0x59e1d
leaq 0x1cc5f(%rip), %rsi     # 0x5a676
movl $0x1ff, %edx            # imm = 0x1FF
leaq 0x1d21c(%rip), %rcx     # 0x5ac3f
callq 0x31a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x6620
jmp 0x3e474
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3e46b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3e462
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x89(%rbp), %rdi
callq 0x6620
jmp 0x3e462
movl $0x0, -0x90(%rbp)
movl -0x90(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x50(%rcx), %eax
jge 0x3dade
movl -0x90(%rbp), %eax
movl %eax, -0x2ec(%rbp)
movslq -0x90(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x178f0
movslq (%rax), %rsi
leaq -0x88(%rbp), %rdi
callq 0x178f0
movl -0x2ec(%rbp), %ecx
movl %ecx, (%rax)
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
jmp 0x3da8b
movq -0x10(%rbp), %rax
movl 0x50(%rax), %esi
leaq -0xe8(%rbp), %rdi
movl $0x1, %edx
callq 0x15360
jmp 0x3daf8
movb $0x0, -0xe9(%rbp)
movb $0x1, -0x136(%rbp)
leaq -0x118(%rbp), %rax
movq %rax, -0x300(%rbp)
movq %rax, -0x120(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x60(%rbp), %rdi
callq 0x178f0
movl (%rax), %eax
movl %eax, -0x134(%rbp)
leaq -0x134(%rbp), %rax
movq %rax, -0x130(%rbp)
movq $0x1, -0x128(%rbp)
leaq -0x135(%rbp), %rdi
movq %rdi, -0x2f8(%rbp)
callq 0x111b0
movq -0x300(%rbp), %rdi
movq -0x2f8(%rbp), %rcx
movq -0x130(%rbp), %rsi
movq -0x128(%rbp), %rdx
callq 0x26d30
jmp 0x3db7f
movb $0x0, -0x136(%rbp)
leaq -0x118(%rbp), %rax
movq %rax, -0x100(%rbp)
movq $0x1, -0xf8(%rbp)
leaq -0x137(%rbp), %rdi
movq %rdi, -0x308(%rbp)
callq 0x17e40
movq -0x2c0(%rbp), %rdi
movq -0x308(%rbp), %rcx
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rdx
callq 0x43640
jmp 0x3dbd5
leaq -0x137(%rbp), %rdi
callq 0x5f50
leaq -0x118(%rbp), %rax
movq %rax, -0x318(%rbp)
addq $0x18, %rax
movq %rax, -0x310(%rbp)
movq -0x310(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x320(%rbp)
callq 0x6d30
movq -0x318(%rbp), %rcx
movq -0x320(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x310(%rbp)
jne 0x3dbfa
leaq -0x135(%rbp), %rdi
callq 0x6620
leaq -0x150(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x3130
leaq -0x150(%rbp), %rdi
callq 0x17630
movl $0x1, -0x154(%rbp)
movl -0x154(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x50(%rcx), %eax
jge 0x3e3cc
movslq -0x154(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x178f0
movl (%rax), %eax
movl %eax, -0x158(%rbp)
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
movslq -0x158(%rbp), %rsi
callq 0xbba0
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rdi
callq 0x6680
movq %rax, -0x168(%rbp)
movq -0x160(%rbp), %rdi
callq 0x66b0
movq %rax, -0x170(%rbp)
leaq -0x168(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0xbbc0
testb $0x1, %al
jne 0x3dce8
jmp 0x3de6a
leaq -0x168(%rbp), %rdi
callq 0xbc00
movl (%rax), %eax
movl %eax, -0x174(%rbp)
movslq -0x174(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0x178f0
movl (%rax), %eax
movl %eax, -0x324(%rbp)
movslq -0x158(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0x178f0
movq %rax, %rcx
movl -0x324(%rbp), %eax
cmpl (%rcx), %eax
jge 0x3de57
movl -0x174(%rbp), %esi
movl -0x158(%rbp), %edx
leaq -0xe8(%rbp), %rdi
callq 0x15830
jmp 0x3dd55
jmp 0x3de57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3e456
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3dddd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x137(%rbp), %rdi
callq 0x5f50
leaq -0x118(%rbp), %rax
movq %rax, -0x338(%rbp)
addq $0x18, %rax
movq %rax, -0x330(%rbp)
movq -0x330(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x340(%rbp)
callq 0x6d30
movq -0x338(%rbp), %rcx
movq -0x340(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x330(%rbp)
jne 0x3ddaa
jmp 0x3dddd
leaq -0x135(%rbp), %rdi
callq 0x6620
testb $0x1, -0x136(%rbp)
jne 0x3ddf4
jmp 0x3de41
movq -0x120(%rbp), %rax
leaq -0x118(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x348(%rbp)
je 0x3de3f
movq -0x348(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x350(%rbp)
callq 0x6d30
movq -0x350(%rbp), %rax
leaq -0x118(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x348(%rbp)
jne 0x3de0e
jmp 0x3de41
jmp 0x3e44a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3e3ea
jmp 0x3de59
leaq -0x168(%rbp), %rdi
callq 0xbc80
jmp 0x3dccc
leaq -0xe8(%rbp), %rdi
callq 0x16df0
movb %al, -0x351(%rbp)
jmp 0x3de7e
movb -0x351(%rbp), %al
testb $0x1, %al
jne 0x3de8a
jmp 0x3de8c
jmp 0x3deab
leaq 0x1cdea(%rip), %rdi     # 0x5ac7d
leaq 0x1c7dc(%rip), %rsi     # 0x5a676
movl $0x20d, %edx            # imm = 0x20D
leaq 0x1cd99(%rip), %rcx     # 0x5ac3f
callq 0x31a0
leaq -0x190(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
movq $-0x1, %rdx
callq 0x3cb50
jmp 0x3dec7
leaq -0x190(%rbp), %rax
movq %rax, -0x198(%rbp)
movq -0x198(%rbp), %rdi
callq 0x58e0
movq %rax, -0x1a0(%rbp)
movq -0x198(%rbp), %rdi
callq 0x5910
movq %rax, -0x1a8(%rbp)
leaq -0x1a0(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x5940
testb $0x1, %al
jne 0x3df17
jmp 0x3dfa2
leaq -0x1a0(%rbp), %rdi
callq 0x5980
movq %rax, -0x1b0(%rbp)
movq -0x1b0(%rbp), %rsi
leaq -0xe8(%rbp), %rdi
callq 0x3d6c0
movb %al, -0x352(%rbp)
jmp 0x3df45
movb -0x352(%rbp), %al
testb $0x1, %al
jne 0x3df51
jmp 0x3df53
jmp 0x3df8f
leaq 0x1cd3e(%rip), %rdi     # 0x5ac98
leaq 0x1c715(%rip), %rsi     # 0x5a676
movl $0x210, %edx            # imm = 0x210
leaq 0x1ccd2(%rip), %rcx     # 0x5ac3f
callq 0x31a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x5e20
jmp 0x3e3ea
jmp 0x3df91
leaq -0x1a0(%rbp), %rdi
callq 0x59c0
jmp 0x3defb
movq -0x2c0(%rbp), %rdx
movq -0x2b0(%rbp), %rax
movl -0x158(%rbp), %r9d
movaps (%rax), %xmm0
movaps 0x10(%rax), %xmm1
movaps 0x20(%rax), %xmm2
movaps %xmm2, -0x1e0(%rbp)
movaps %xmm1, -0x1f0(%rbp)
movaps %xmm0, -0x200(%rbp)
movl -0x14(%rbp), %ecx
movaps -0x200(%rbp), %xmm0
movaps -0x1f0(%rbp), %xmm1
movaps -0x1e0(%rbp), %xmm2
movq %rsp, %rax
movaps %xmm2, 0x20(%rax)
movaps %xmm1, 0x10(%rax)
movaps %xmm0, (%rax)
movl %ecx, 0x30(%rax)
leaq -0x1c8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
leaq -0x150(%rbp), %rcx
leaq -0x190(%rbp), %r8
callq 0x3bf70
jmp 0x3e023
movq -0x2c0(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
movq %rsi, -0x360(%rbp)
callq 0x8d00
movq -0x360(%rbp), %rdi
callq 0x5e20
leaq -0x150(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x436c0
jmp 0x3e05e
movq -0x2c0(%rbp), %rax
movq %rax, -0x208(%rbp)
movq -0x208(%rbp), %rdi
callq 0x58e0
movq %rax, -0x210(%rbp)
movq -0x208(%rbp), %rdi
callq 0x5910
movq %rax, -0x218(%rbp)
leaq -0x210(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x5940
testb $0x1, %al
jne 0x3e0ae
jmp 0x3e1a4
leaq -0x210(%rbp), %rdi
callq 0x5980
movq %rax, %rcx
movq -0x2b0(%rbp), %rax
movq %rcx, -0x220(%rbp)
movq -0x10(%rbp), %rdi
movq -0x220(%rbp), %rsi
movaps (%rax), %xmm0
movaps 0x10(%rax), %xmm1
movaps 0x20(%rax), %xmm2
movaps %xmm2, -0x230(%rbp)
movaps %xmm1, -0x240(%rbp)
movaps %xmm0, -0x250(%rbp)
movl -0x14(%rbp), %edx
movaps -0x250(%rbp), %xmm0
movaps -0x240(%rbp), %xmm1
movaps -0x230(%rbp), %xmm2
movq %rsp, %rax
movaps %xmm2, 0x20(%rax)
movaps %xmm1, 0x10(%rax)
movaps %xmm0, (%rax)
callq 0x3be20
movb %al, -0x361(%rbp)
jmp 0x3e129
movb -0x361(%rbp), %al
testb $0x1, %al
jne 0x3e135
jmp 0x3e137
jmp 0x3e156
leaq 0x1cb6a(%rip), %rdi     # 0x5aca8
leaq 0x1c531(%rip), %rsi     # 0x5a676
movl $0x215, %edx            # imm = 0x215
leaq 0x1caee(%rip), %rcx     # 0x5ac3f
callq 0x31a0
movq -0x220(%rbp), %rdi
callq 0xe060
movq %rax, -0x258(%rbp)
movq -0x220(%rbp), %rdi
callq 0xe090
movq %rax, -0x260(%rbp)
movq -0x258(%rbp), %rdi
movq -0x260(%rbp), %rsi
callq 0x176e0
jmp 0x3e191
jmp 0x3e193
leaq -0x210(%rbp), %rdi
callq 0x59c0
jmp 0x3e092
movq -0x2c0(%rbp), %rdi
callq 0x58e0
movq -0x2c0(%rbp), %rdi
movq %rax, -0x268(%rbp)
callq 0x5910
movq %rax, -0x270(%rbp)
movq -0x268(%rbp), %rdi
movq -0x270(%rbp), %rsi
callq 0x17c20
jmp 0x3e1df
movq -0x2c0(%rbp), %rdi
callq 0x58e0
movq -0x2c0(%rbp), %rdi
movq %rax, -0x288(%rbp)
callq 0x5910
movq %rax, -0x290(%rbp)
movq -0x288(%rbp), %rdi
movq -0x290(%rbp), %rsi
callq 0x17cf0
movq %rax, -0x370(%rbp)
jmp 0x3e221
movq -0x370(%rbp), %rax
movq %rax, -0x280(%rbp)
leaq -0x278(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x17d30
movq -0x2c0(%rbp), %rdi
callq 0x5910
movq %rax, -0x2a0(%rbp)
leaq -0x298(%rbp), %rdi
leaq -0x2a0(%rbp), %rsi
callq 0x17d30
movq -0x2c0(%rbp), %rdi
movq -0x278(%rbp), %rsi
movq -0x298(%rbp), %rdx
callq 0x17c60
movq %rax, -0x378(%rbp)
jmp 0x3e28b
movq -0x378(%rbp), %rax
movq %rax, -0x2a8(%rbp)
testb $0x1, 0x6568d4(%rip)    # 0x694b74
je 0x3e3ac
movq 0x3bd43(%rip), %rdi     # 0x79ff0
leaq 0x1ca19(%rip), %rsi     # 0x5accd
callq 0x32b0
movq %rax, -0x380(%rbp)
jmp 0x3e2c2
movq -0x380(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x50(%rax), %esi
callq 0x3470
movq %rax, -0x388(%rbp)
jmp 0x3e2de
movq -0x388(%rbp), %rdi
leaq 0x1c9f1(%rip), %rsi     # 0x5acdd
callq 0x32b0
movq %rax, -0x390(%rbp)
jmp 0x3e2fa
movq -0x390(%rbp), %rdi
movl -0x154(%rbp), %esi
callq 0x3470
movq %rax, -0x398(%rbp)
jmp 0x3e315
movq -0x398(%rbp), %rdi
leaq 0x1c9ba(%rip), %rsi     # 0x5acdd
callq 0x32b0
movq %rax, -0x3a0(%rbp)
jmp 0x3e331
movq -0x2c0(%rbp), %rdi
callq 0x5e80
movq -0x3a0(%rbp), %rdi
movq %rax, %rsi
callq 0x3080
movq %rax, -0x3a8(%rbp)
jmp 0x3e355
movq -0x3a8(%rbp), %rdi
leaq 0x1c97a(%rip), %rsi     # 0x5acdd
callq 0x32b0
movq %rax, -0x3b0(%rbp)
jmp 0x3e371
leaq -0x150(%rbp), %rdi
callq 0x5e80
movq -0x3b0(%rbp), %rdi
movq %rax, %rsi
callq 0x3080
movq %rax, -0x3b8(%rbp)
jmp 0x3e395
movq -0x3b8(%rbp), %rdi
movq 0x3bc15(%rip), %rsi     # 0x79fb8
callq 0x3300
jmp 0x3e3aa
jmp 0x3e3ac
leaq -0x190(%rbp), %rdi
callq 0x5e20
movl -0x154(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x154(%rbp)
jmp 0x3dc60
movb $0x1, -0xe9(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x5e20
testb $0x1, -0xe9(%rbp)
jne 0x3e410
jmp 0x3e404
leaq -0x150(%rbp), %rdi
callq 0x5e20
movq -0x2c0(%rbp), %rdi
callq 0x5e20
jmp 0x3e44a
movq -0x2c0(%rbp), %rdi
callq 0x5e20
leaq -0xe8(%rbp), %rdi
callq 0x59e0
leaq -0x88(%rbp), %rdi
callq 0x6d30
leaq -0x60(%rbp), %rdi
callq 0x6d30
leaq -0x30(%rbp), %rdi
callq 0x6d30
movq -0x2b8(%rbp), %rax
addq $0x400, %rsp            # imm = 0x400
popq %rbp
retq
leaq -0xe8(%rbp), %rdi
callq 0x59e0
leaq -0x88(%rbp), %rdi
callq 0x6d30
leaq -0x60(%rbp), %rdi
callq 0x6d30
leaq -0x30(%rbp), %rdi
callq 0x6d30
movq -0x40(%rbp), %rdi
callq 0x3480
nopl (%rax)