// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
fldt 0x280(%rsp)
fldt 0x270(%rsp)
fldt 0x260(%rsp)
fldl 0x1df38(%rip)           # 0x2a7b8
fld %st(1)
fstpt 0x6c(%rsp)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jbe 0xcce6
fld %st(1)
faddl 0x1df26(%rip)           # 0x2a7c0
fld %st(1)
fxch %st(1)
fucomi %st(2), %st
fstp %st(2)
jbe 0xcd09
movq %rdi, %rbx
fld %st(2)
fstpt 0x104(%rsp)
fldt 0x6c(%rsp)
fucomi %st(3), %st
fstp %st(3)
jbe 0xc8e2
fstp %st(1)
fstp %st(1)
fstp %st(0)
fld1
fchs
fstpt (%rbx)
movq %rbx, %rdi
addq $0x10, %rdi
leaq 0x29930(%rip), %rsi     # 0x36208
callq 0x402a
jmp 0xccd1
movq %rdx, %r12
movq %rsi, %r13
fxch %st(1)
fstpt 0x94(%rsp)
fxch %st(1)
fucomi %st(1), %st
fxch %st(1)
fcmovnbe %st(1), %st
fstp %st(1)
fstpt 0xf8(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x12a60
leaq 0x168(%rsp), %rdi
movq %r13, %rsi
callq 0x431c
leaq 0x180(%rsp), %rdi
leaq 0x18(%r13), %rbp
movq %rbp, %rsi
callq 0x7e36
movb 0x30(%r13), %al
leaq 0x1a0(%rsp), %r15
movb %al, -0x8(%r15)
leaq 0x38(%r13), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x4164
movq 0x50(%r13), %rax
leaq 0x168(%rsp), %rdi
movq %rax, 0x50(%rdi)
leaq 0xb8(%rsp), %rsi
callq 0x9880
leaq 0x168(%rsp), %rdi
movq %r12, %rsi
callq 0x14467
fldt 0x6c(%rsp)
faddl 0x1de2f(%rip)           # 0x2a7b8
fld %st(0)
fstpt 0xec(%rsp)
fxch %st(1)
fucomi %st(1), %st
fstp %st(1)
jbe 0xcd2e
fldt 0xf8(%rsp)
faddl 0x1de15(%rip)           # 0x2a7c0
fucompi %st(1), %st
jbe 0xc9cc
fstpt (%rbx)
movq %rbx, %rdi
addq $0x10, %rdi
leaq 0xb8(%rsp), %rsi
callq 0x402a
fldz
jmp 0xcc63
movq 0xc0(%rsp), %rax
cmpq 0xb8(%rsp), %rax
je 0xcb24
fstp %st(0)
leaq 0xa0(%rsp), %rdi
movq %r12, %rsi
callq 0x431c
fldz
fstp %st(0)
leaq 0xa0(%rsp), %rdi
callq 0x1b298
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xca22
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
fldt 0x6c(%rsp)
fstpt (%rsp)
leaq 0x1f0(%rsp), %rdi
callq 0x1b2ca
fldt 0x104(%rsp)
fstpt (%rsp)
leaq 0x1c0(%rsp), %rdi
callq 0x1b2ca
movaps 0x1c0(%rsp), %xmm0
movaps 0x1d0(%rsp), %xmm1
movaps 0x1e0(%rsp), %xmm2
movaps %xmm2, 0x50(%rsp)
movaps %xmm1, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps 0x1f0(%rsp), %xmm0
movaps 0x200(%rsp), %xmm1
movaps 0x210(%rsp), %xmm2
movaps %xmm2, 0x20(%rsp)
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
movl $0x6, %edx
callq 0x202eb
movq 0x78(%rsp), %rcx
movq 0x80(%rsp), %rax
movq %rax, %rsi
subq %rcx, %rsi
movq 0x2974a(%rip), %rdi     # 0x36210
movq 0x2973b(%rip), %rdx     # 0x36208
subq %rdx, %rdi
cmpq %rdi, %rsi
jne 0xcb78
cmpq %rax, %rcx
sete %sil
je 0xcb55
movl (%rcx), %esi
cmpl (%rdx), %esi
jne 0xcb78
movl 0x4(%rdx), %esi
cmpl %esi, 0x4(%rcx)
jne 0xcb78
addq $0x8, %rcx
addq $0xc, %rdx
cmpq %rax, %rcx
sete %sil
je 0xcb55
movl (%rcx), %esi
cmpl -0x4(%rdx), %esi
jne 0xcb78
leaq 0x8(%rcx), %rsi
movl (%rdx), %edi
addq $0x8, %rdx
cmpl %edi, 0x4(%rcx)
movq %rsi, %rcx
je 0xcb00
jmp 0xcb78
leaq 0x10(%rbx), %rdi
fldt 0x94(%rsp)
fucompi %st(1), %st
jbe 0xcb3a
fstpt (%rbx)
jmp 0xc9b8
fstp %st(0)
fld1
fchs
fstpt (%rbx)
leaq 0x296bf(%rip), %rsi     # 0x36208
callq 0x402a
fldz
jmp 0xcc63
testb %sil, %sil
je 0xcb78
fld1
fchs
fstpt (%rbx)
movq %rbx, %rdi
addq $0x10, %rdi
leaq 0x2969a(%rip), %rsi     # 0x36208
callq 0x402a
jmp 0xcc47
leaq 0x110(%rsp), %rdi
movq %r13, %rsi
callq 0x431c
leaq 0x128(%rsp), %rdi
movq %rbp, %rsi
callq 0x7e36
movb 0x30(%r13), %al
leaq 0x148(%rsp), %rbp
movb %al, -0x8(%rbp)
movq %rbp, %rdi
movq %r14, %rsi
callq 0x4164
movq 0x50(%r13), %rax
leaq 0x110(%rsp), %rdi
movq %rax, 0x50(%rdi)
leaq 0x78(%rsp), %rsi
callq 0x9880
leaq 0x110(%rsp), %rdi
movq %r12, %rsi
callq 0x14467
fldt 0xec(%rsp)
fxch %st(1)
fucomi %st(1), %st
fstp %st(1)
jbe 0xcd4f
fldt 0x94(%rsp)
fucompi %st(1), %st
jbe 0xcd70
fstpt (%rbx)
movq %rbx, %rdi
addq $0x10, %rdi
leaq 0x78(%rsp), %rsi
callq 0x402a
fldz
fstp %st(0)
movq %rbp, %rdi
callq 0x41fe
leaq 0x128(%rsp), %rdi
callq 0x43b8
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0xcc47
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0xcc61
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
fldz
fstp %st(0)
movq %r15, %rdi
callq 0x41fe
leaq 0x180(%rsp), %rdi
callq 0x43b8
movq 0x168(%rsp), %rdi
testq %rdi, %rdi
je 0xcc97
movq 0x178(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0xccb4
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0xccd1
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq %rbx, %rax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
fstp %st(1)
fstp %st(0)
leaq 0x1db70(%rip), %rdi     # 0x2a861
leaq 0x1dad8(%rip), %rsi     # 0x2a7d0
leaq 0x1db74(%rip), %rcx     # 0x2a873
movl $0x3f, %edx
callq 0x2140
fstp %st(1)
fstp %st(1)
fstp %st(0)
leaq 0x1dbce(%rip), %rdi     # 0x2a8e4
leaq 0x1dab3(%rip), %rsi     # 0x2a7d0
leaq 0x1db4f(%rip), %rcx     # 0x2a873
movl $0x40, %edx
callq 0x2140
fstp %st(0)
leaq 0x1dbc8(%rip), %rdi     # 0x2a8ff
leaq 0x1da92(%rip), %rsi     # 0x2a7d0
leaq 0x1db2e(%rip), %rcx     # 0x2a873
movl $0x4b, %edx
callq 0x2140
fstp %st(0)
leaq 0x1dbc4(%rip), %rdi     # 0x2a91c
leaq 0x1da71(%rip), %rsi     # 0x2a7d0
leaq 0x1db0d(%rip), %rcx     # 0x2a873
movl $0x5a, %edx
callq 0x2140
fstp %st(0)
leaq 0x1dbbc(%rip), %rdi     # 0x2a935
leaq 0x1da50(%rip), %rsi     # 0x2a7d0
leaq 0x1daec(%rip), %rcx     # 0x2a873
movl $0x5b, %edx
callq 0x2140
jmp 0xcdd0
fstp %st(0)
jmp 0xce5c
jmp 0xcdf1
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x43b8
jmp 0xcdb1
movq %rax, %rbx
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0xce01
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
jmp 0xce01
movq %rax, %rbx
jmp 0xce01
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xce5f
movq 0xb0(%rsp), %rsi
jmp 0xce13
fstp %st(0)
movq %rax, %rbx
leaq 0x110(%rsp), %rdi
callq 0x412c
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0xce5f
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
jmp 0xce5f
jmp 0xce5c
jmp 0xce5c
movq %rax, %rbx
leaq 0x180(%rsp), %rdi
callq 0x43b8
jmp 0xce36
movq %rax, %rbx
movq 0x168(%rsp), %rdi
testq %rdi, %rdi
je 0xce6c
movq 0x178(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
jmp 0xce6c
movq %rax, %rbx
jmp 0xce6c
fstp %st(0)
movq %rax, %rbx
leaq 0x168(%rsp), %rdi
callq 0x412c
leaq 0xb8(%rsp), %rdi
callq 0x40a0
movq %rbx, %rdi
callq 0x2310