// File: /workspace/github_cpp_makefile_star2_O3/Laakeri[P]Triangulator/src/MCS.cpp
// Function: MCS::getFracHyperTreeWidth(Graph const&, std::vector<int, std::allocator<int>> const&)
ld getFracHyperTreeWidth(const Graph& G, const vector<int>& vertMap) {
	if (G.n <= 1) return 0;
	vector<int> u(G.n);
	vector<int> order;
	for (int i = 0; i < G.n; i++) {
		if (G.g[i].size() == 0) {
			order.push_back(i);
			u[i] = 1;
		}
		else if (u[i] == 0) {
			auto ord = MCS_L(G, i, u);
			for (int x : ord) {
				assert(u[x] == 0);
				u[x] = 1;
			}
			order.insert(order.end(), ord.begin(), ord.end());
		}
	}
	assert((int)order.size() == G.n);
	for (int i = 0; i < (int)order.size(); i++) {
		invOrd[order[i]] = i;
	}
	ld treeWidth = 0;
	for (int i = 0; i < G.n; i++) {
		int x = order[i];
		assert(0<=x&&x<G.n);
		vector<int> nb = {vertMap[x]};
		for (int nx : G.g[x]) {
			if (invOrd[nx] > i) {
				nb.push_back(vertMap[nx]);
			}
		}
		ld setCoverSol = SetCover::solveFrac(nb);
		assert(setCoverSol > 0);
		treeWidth = max(treeWidth, setCoverSol);
	}
	return treeWidth;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, 0x50(%rsp)
movslq 0x50(%rdi), %rsi
fldz
cmpq $0x2, %rsi
jl 0x149f5
movq %rdi, %r14
fstp %st(0)
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %r15
movq %r15, %rdx
callq 0xaa18
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
movl $0x0, (%rsp)
movl 0x50(%r14), %eax
xorl %edx, %edx
testl %eax, %eax
jle 0x1483d
leaq 0x30(%rsp), %r15
movq %rsp, %r12
leaq 0x8(%rsp), %r13
leaq 0x58(%rsp), %rbp
movslq %edx, %rax
movq 0x38(%r14), %rcx
leaq (%rax,%rax,2), %rsi
movq 0x8(%rcx,%rsi,8), %rdi
cmpq (%rcx,%rsi,8), %rdi
je 0x147e9
movq 0x58(%rsp), %rcx
cmpl $0x0, (%rcx,%rax,4)
jne 0x1481d
movq %r13, %rdi
movq %r14, %rsi
movq %rbp, %rcx
callq 0x137a2
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
cmpq %rcx, %rdx
je 0x147c3
movq 0x58(%rsp), %rax
movq %rdx, %rsi
movslq (%rsi), %rdi
cmpl $0x0, (%rax,%rdi,4)
jne 0x14a07
movl $0x1, (%rax,%rdi,4)
addq $0x4, %rsi
cmpq %rcx, %rsi
jne 0x147a6
movq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0x15f3c
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1481d
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
jmp 0x1481d
movq 0x38(%rsp), %rsi
cmpq 0x40(%rsp), %rsi
je 0x14802
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x38(%rsp)
jmp 0x1480d
movq %r15, %rdi
movq %r12, %rdx
callq 0x92c4
movslq (%rsp), %rax
movq 0x58(%rsp), %rcx
movl $0x1, (%rcx,%rax,4)
movl (%rsp), %edx
incl %edx
movl %edx, (%rsp)
movl 0x50(%r14), %eax
cmpl %eax, %edx
jl 0x1475c
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rcx
jmp 0x1483f
xorl %ecx, %ecx
subq %rdx, %rcx
shrq $0x2, %rcx
cmpl %ecx, %eax
jne 0x14a66
fldz
testl %eax, %eax
jle 0x149c1
fstp %st(0)
movl %eax, %eax
xorl %ecx, %ecx
leaq 0x452d6b(%rip), %r12    # 0x4675d0
movslq (%rdx,%rcx,4), %rsi
movl %ecx, (%r12,%rsi,4)
incq %rcx
cmpq %rcx, %rax
jne 0x14865
movl 0x50(%r14), %eax
fldz
fstpt 0x24(%rsp)
testl %eax, %eax
jle 0x149ca
fldz
xorl %r13d, %r13d
leaq 0x70(%rsp), %rbx
fstpt 0x24(%rsp)
movq %r14, %r15
movq 0x30(%rsp), %rcx
movslq (%rcx,%r13,4), %r14
testq %r14, %r14
js 0x14a47
cmpl %eax, %r14d
jge 0x14a47
movq 0x50(%rsp), %rax
movq (%rax), %rax
movl (%rax,%r14,4), %eax
movl %eax, (%rsp)
movl $0x1, %edx
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
leaq 0x7(%rsp), %rcx
callq 0x12450
movq 0x38(%r15), %rax
leaq (%r14,%r14,2), %rcx
movq (%rax,%rcx,8), %rbp
movq 0x8(%rax,%rcx,8), %r14
cmpq %r14, %rbp
je 0x14933
movslq (%rbp), %rdx
movslq (%r12,%rdx,4), %rax
cmpq %rax, %r13
jge 0x1492d
shlq $0x2, %rdx
movq 0x50(%rsp), %rax
addq (%rax), %rdx
movq 0x10(%rsp), %rsi
cmpq 0x18(%rsp), %rsi
je 0x14923
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x10(%rsp)
jmp 0x1492d
leaq 0x8(%rsp), %rdi
callq 0x92c4
addq $0x4, %rbp
jmp 0x148ea
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0x42ce
movq %rbx, %rdi
callq 0x2392b
movq %r15, %r14
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x14973
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
fstpt 0x8c(%rsp)
callq 0x2210
fldt 0x8c(%rsp)
fldz
fxch %st(1)
fucomi %st(1), %st
fstp %st(1)
jbe 0x14a26
fldt 0x24(%rsp)
fxch %st(1)
fucomi %st(1), %st
fxch %st(1)
fcmovnbe %st(1), %st
fstp %st(1)
fstpt 0x24(%rsp)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x149aa
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
incq %r13
movslq 0x50(%r14), %rax
cmpq %rax, %r13
jl 0x14895
movq 0x30(%rsp), %rdx
jmp 0x149c5
fstpt 0x24(%rsp)
testq %rdx, %rdx
je 0x149da
movq 0x40(%rsp), %rsi
subq %rdx, %rsi
movq %rdx, %rdi
callq 0x2210
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x149f1
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
fldt 0x24(%rsp)
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x15410(%rip), %rdi     # 0x29e1e
leaq 0x152ca(%rip), %rsi     # 0x29cdf
leaq 0x15526(%rip), %rcx     # 0x29f42
movl $0x163, %edx            # imm = 0x163
callq 0x2140
fstp %st(0)
leaq 0x15555(%rip), %rdi     # 0x29f84
leaq 0x152a9(%rip), %rsi     # 0x29cdf
leaq 0x15505(%rip), %rcx     # 0x29f42
movl $0x178, %edx            # imm = 0x178
callq 0x2140
leaq 0x15418(%rip), %rdi     # 0x29e66
leaq 0x1528a(%rip), %rsi     # 0x29cdf
leaq 0x154e6(%rip), %rcx     # 0x29f42
movl $0x170, %edx            # imm = 0x170
callq 0x2140
leaq 0x153e0(%rip), %rdi     # 0x29e4d
leaq 0x1526b(%rip), %rsi     # 0x29cdf
leaq 0x154c7(%rip), %rcx     # 0x29f42
movl $0x169, %edx            # imm = 0x169
callq 0x2140
jmp 0x14a8b
jmp 0x14ab3
jmp 0x14a8b
movq %rax, %rbx
jmp 0x14acd
jmp 0x14ab3
fstp %st(0)
movq %rax, %rbx
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x14ab6
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
jmp 0x14ab6
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x14acd
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x14ae4
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x14afb
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2310