// File: Laakeri[P]Triangulator/src/minfill.cpp
// Function: MinFill::SolveAtom::nbClique(Graph&)
pair<int, pair<int, int> > nbClique(Graph& G) {
	int minF = (int)1e9;
	for (int x = 0; x < G.n; x++) {
		assert(G.g[x].size() > 2);
		pair<int, int> fo = {-1, -1};
		bool fail = false;
		bool brk = false;
		int cnt = 0;
		for (int i = 0; i < (int)G.g[x].size(); i++) {
			for (int ii = i+1; ii < (int)G.g[x].size(); ii++) {
				if (!G.hasEdge(G.g[x][i], G.g[x][ii])) {
					cnt++;
					if (fo.F != -1) {
						fail = true;
						if (cnt >= minF) {
							brk = true;
							break;
						}
					}
					else {
						fo = {G.g[x][i], G.g[x][ii]};
					}
				}
			}
			if (brk) break;
		}
		if (!fail) {
			assert(fo.F != -1);
			return {-1, fo};
		}
		minF = min(minF, cnt);
	}
	return {minF, {-1, -1}};
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x18(%rbp)
movl $0x3b9aca00, -0x1c(%rbp) # imm = 0x3B9ACA00
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x50(%rcx), %eax
jge 0x341fd
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
movslq -0x20(%rbp), %rsi
callq 0x178a0
movq %rax, %rdi
callq 0x59a0
cmpq $0x2, %rax
jbe 0x33fce
jmp 0x33fed
leaq 0x2650e(%rip), %rdi     # 0x5a4e3
leaq 0x2610c(%rip), %rsi     # 0x5a0e8
movl $0x1e0, %edx            # imm = 0x1E0
leaq 0x2650d(%rip), %rcx     # 0x5a4f5
callq 0x31a0
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x30(%rbp) # imm = 0xFFFFFFFF
leaq -0x28(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x5380
movb $0x0, -0x31(%rbp)
movb $0x0, -0x32(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x74(%rbp)
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
movslq -0x20(%rbp), %rsi
callq 0x178a0
movq %rax, %rdi
callq 0x59a0
movq %rax, %rcx
movl -0x74(%rbp), %eax
cmpl %ecx, %eax
jge 0x34196
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x78(%rbp)
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
movslq -0x20(%rbp), %rsi
callq 0x178a0
movq %rax, %rdi
callq 0x59a0
movq %rax, %rcx
movl -0x78(%rbp), %eax
cmpl %ecx, %eax
jge 0x3417e
movq -0x18(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
movslq -0x20(%rbp), %rsi
callq 0x178a0
movq %rax, %rdi
movslq -0x3c(%rbp), %rsi
callq 0x178f0
movl (%rax), %eax
movl %eax, -0x7c(%rbp)
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
movslq -0x20(%rbp), %rsi
callq 0x178a0
movq %rax, %rdi
movslq -0x40(%rbp), %rsi
callq 0x178f0
movq -0x88(%rbp), %rdi
movl -0x7c(%rbp), %esi
movl (%rax), %edx
callq 0x16400
testb $0x1, %al
jne 0x3416e
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
cmpl $-0x1, -0x28(%rbp)
je 0x3410b
movb $0x1, -0x31(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jl 0x34109
movb $0x1, -0x32(%rbp)
jmp 0x3417e
jmp 0x3416c
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
movslq -0x20(%rbp), %rsi
callq 0x178a0
movq %rax, %rdi
movslq -0x3c(%rbp), %rsi
callq 0x178f0
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
movslq -0x20(%rbp), %rsi
callq 0x178a0
movq %rax, %rdi
movslq -0x40(%rbp), %rsi
callq 0x178f0
movq -0x90(%rbp), %rsi
movq %rax, %rdx
leaq -0x48(%rbp), %rdi
callq 0xdfc0
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x13e20
jmp 0x3416e
jmp 0x34170
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x34058
testb $0x1, -0x32(%rbp)
je 0x34186
jmp 0x34196
jmp 0x34188
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x34022
testb $0x1, -0x31(%rbp)
jne 0x341dd
cmpl $-0x1, -0x28(%rbp)
je 0x341a4
jmp 0x341c3
leaq 0x2638a(%rip), %rdi     # 0x5a535
leaq 0x25f36(%rip), %rsi     # 0x5a0e8
movl $0x1f8, %edx            # imm = 0x1F8
leaq 0x26337(%rip), %rcx     # 0x5a4f5
callq 0x31a0
movl $0xffffffff, -0x4c(%rbp) # imm = 0xFFFFFFFF
leaq -0xc(%rbp), %rdi
leaq -0x4c(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0x37420
jmp 0x3422d
leaq -0x1c(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x23e40
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x33f9d
movl $0xffffffff, -0x58(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x5c(%rbp) # imm = 0xFFFFFFFF
leaq -0x54(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x5c(%rbp), %rdx
callq 0x5380
leaq -0xc(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
leaq -0x54(%rbp), %rdx
callq 0x37450
movl -0x4(%rbp), %eax
movl %eax, -0x68(%rbp)
movq -0xc(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movl -0x68(%rbp), %edx
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)