// File: /workspace/github_cpp_makefile_star2_O2/Laakeri[P]Triangulator/src/hyper.cpp
// Function: Hyper::SolveAtom::solveFracAtom(Graph const&, long double, long double, long double, std::vector<int, std::allocator<int>> const&)
pair<ld, vector<pair<int, int> > > solveFracAtom(const Graph& G, ld lowerBound, ld okWidth, ld upperBound, const vector<int>& vertMap) {
	assert(lowerBound > -eps);
	assert(okWidth < upperBound + eps);
	
	if (lowerBound > upperBound) return {-1, FAILSOLUTION};
	okWidth = max(okWidth, lowerBound);
	
	auto fill = MCS::MCS_MP(G);
	
	Graph gFill = G;
	gFill.addEdges(fill.F);
	
	ld fillWidth = MCS::getFracHyperTreeWidth(gFill, vertMap);
	assert(fillWidth > lowerBound - eps);
	
	if (fillWidth < okWidth + eps) return {fillWidth, fill.F};
	
	if (fill.F.size() == 0) {
		if (fillWidth < upperBound + eps) return {fillWidth, fill.F};
		else return {-1, FAILSOLUTION};
	}
	
	PMC::initVertMap(vertMap);
	auto fillO = PMC::solve(G, lowerBound, upperBound, PROBLEM_FRACHYPER);
	if (fillO == FAILSOLUTION) return {-1, FAILSOLUTION};
	Graph gFillO = G;
	gFillO.addEdges(fillO);
	ld width = MCS::getFracHyperTreeWidth(gFillO, vertMap);
	assert(width > lowerBound - eps);
	assert(width < upperBound + eps);
	return {width, fillO};
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
fldt 0x250(%rsp)
fldt 0x240(%rsp)
fldt 0x230(%rsp)
fldl 0x16052(%rip)           # 0x207c8
fld %st(1)
fstpt 0x60(%rsp)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jbe 0xaa58
fld %st(1)
faddl 0x16040(%rip)           # 0x207d0
fld %st(1)
fxch %st(1)
fucomi %st(2), %st
fstp %st(2)
jbe 0xaa75
movq %rdi, %rbx
fldt 0x60(%rsp)
fucomi %st(3), %st
jbe 0xa7d0
fstp %st(2)
fstp %st(2)
fstp %st(0)
fstp %st(0)
leaq 0x1b8(%rsp), %rsi
orl $-0x1, (%rsi)
leaq 0x25a55(%rip), %rdx     # 0x30218
movq %rbx, %rdi
callq 0xc93e
jmp 0xaa48
movq %rdx, %r14
movq %rsi, %r15
fxch %st(3)
fstpt 0xa0(%rsp)
fxch %st(1)
fstpt 0x6c(%rsp)
fxch %st(1)
fucomi %st(1), %st
fxch %st(1)
fcmovnbe %st(1), %st
fstp %st(1)
fstpt 0xac(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0xe30c
leaq 0x1b8(%rsp), %rdi
movq %r15, %rsi
callq 0x5152
leaq 0x1b8(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x7cf8
leaq 0x1b8(%rsp), %rdi
movq %r14, %rsi
callq 0xf7f9
fldt 0x60(%rsp)
faddl 0x15f86(%rip)           # 0x207c8
fld %st(0)
fstpt 0x94(%rsp)
fxch %st(1)
fucomi %st(1), %st
fstp %st(1)
jbe 0xaa94
fldt 0xac(%rsp)
faddl 0x15f6c(%rip)           # 0x207d0
fucompi %st(1), %st
jbe 0xa882
fstpt (%rbx)
leaq 0x10(%rbx), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x35f2
fldz
jmp 0xaa2c
movq 0xd8(%rsp), %rax
cmpq 0xd0(%rsp), %rax
je 0xa984
fstp %st(0)
leaq 0xb8(%rsp), %rdi
movq %r14, %rsi
callq 0x3896
fldz
fstp %st(0)
leaq 0xb8(%rsp), %rdi
callq 0x14b58
leaq 0xb8(%rsp), %rdi
callq 0x38e4
fldt 0x60(%rsp)
fstpt (%rsp)
leaq 0x130(%rsp), %rdi
callq 0x14b88
fldt 0xa0(%rsp)
fstpt (%rsp)
leaq 0x100(%rsp), %rdi
callq 0x14b88
movaps 0x100(%rsp), %xmm0
movaps 0x110(%rsp), %xmm1
movaps 0x120(%rsp), %xmm2
movaps %xmm2, 0x50(%rsp)
movaps %xmm1, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps 0x130(%rsp), %xmm0
movaps 0x140(%rsp), %xmm1
movaps 0x150(%rsp), %xmm2
movaps %xmm2, 0x20(%rsp)
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
leaq 0x78(%rsp), %rdi
pushq $0x6
popq %rdx
movq %r15, %rsi
callq 0x18a6f
leaq 0x258c1(%rip), %rsi     # 0x30218
leaq 0x78(%rsp), %rdi
callq 0x35c8
testb %al, %al
je 0xa9ae
leaq 0x160(%rsp), %rsi
orl $-0x1, (%rsi)
leaq 0x258a1(%rip), %rdx     # 0x30218
movq %rbx, %rdi
callq 0xc93e
jmp 0xaa20
fldt 0x6c(%rsp)
fucompi %st(1), %st
ja 0xa868
fstp %st(0)
leaq 0x160(%rsp), %rsi
orl $-0x1, (%rsi)
leaq 0x25874(%rip), %rdx     # 0x30218
movq %rbx, %rdi
callq 0xc93e
jmp 0xaa2a
leaq 0x160(%rsp), %rdi
movq %r15, %rsi
callq 0x5152
leaq 0x160(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x7cf8
leaq 0x160(%rsp), %rdi
movq %r14, %rsi
callq 0xf7f9
fldt 0x94(%rsp)
fxch %st(1)
fucomi %st(1), %st
fstp %st(1)
jbe 0xaab3
fldt 0x6c(%rsp)
fucompi %st(1), %st
jbe 0xaace
fstpt (%rbx)
leaq 0x10(%rbx), %rdi
leaq 0x78(%rsp), %rsi
callq 0x35f2
fldz
fstp %st(0)
leaq 0x160(%rsp), %rdi
callq 0x36d2
leaq 0x78(%rsp), %rdi
callq 0x3bfe
fldz
fstp %st(0)
leaq 0x1b8(%rsp), %rdi
callq 0x36d2
leaq 0xd0(%rsp), %rdi
callq 0x3642
movq %rbx, %rax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r14
popq %r15
retq
fstp %st(1)
fstp %st(0)
leaq 0x15e0e(%rip), %rdi     # 0x20871
leaq 0x15d76(%rip), %rsi     # 0x207e0
leaq 0x15e12(%rip), %rcx     # 0x20883
pushq $0x3f
jmp 0xaaad
fstp %st(1)
fstp %st(1)
fstp %st(0)
leaq 0x15e72(%rip), %rdi     # 0x208f4
leaq 0x15d57(%rip), %rsi     # 0x207e0
leaq 0x15df3(%rip), %rcx     # 0x20883
pushq $0x40
jmp 0xaaad
fstp %st(0)
leaq 0x15e72(%rip), %rdi     # 0x2090f
leaq 0x15d3c(%rip), %rsi     # 0x207e0
leaq 0x15dd8(%rip), %rcx     # 0x20883
pushq $0x4b
popq %rdx
callq 0x2150
fstp %st(0)
leaq 0x15e70(%rip), %rdi     # 0x2092c
leaq 0x15d1d(%rip), %rsi     # 0x207e0
leaq 0x15db9(%rip), %rcx     # 0x20883
pushq $0x5a
jmp 0xaaad
fstp %st(0)
leaq 0x15e6e(%rip), %rdi     # 0x20945
leaq 0x15d02(%rip), %rsi     # 0x207e0
leaq 0x15d9e(%rip), %rcx     # 0x20883
pushq $0x5b
jmp 0xaaad
jmp 0xab31
jmp 0xaaf3
jmp 0xab05
jmp 0xab05
fstp %st(0)
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
callq 0x36d2
jmp 0xab08
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x3bfe
jmp 0xab34
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x38e4
jmp 0xab34
jmp 0xab31
jmp 0xab31
movq %rax, %rbx
jmp 0xab41
fstp %st(0)
movq %rax, %rbx
leaq 0x1b8(%rsp), %rdi
callq 0x36d2
leaq 0xd0(%rsp), %rdi
callq 0x3642
movq %rbx, %rdi
callq 0x2340