// File: /workspace/github_cpp_makefile_star2_O3/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 0x1ceaa(%rip)           # 0x297c8
fld %st(1)
fstpt 0x6c(%rsp)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jbe 0xcd5b
fld %st(1)
faddl 0x1ce98(%rip)           # 0x297d0
fld %st(1)
fxch %st(1)
fucomi %st(2), %st
fstp %st(2)
jbe 0xcd7e
movq %rdi, %rbx
fld %st(2)
fstpt 0x104(%rsp)
fldt 0x6c(%rsp)
fucomi %st(3), %st
fstp %st(3)
jbe 0xc980
fstp %st(1)
fstp %st(1)
fstp %st(0)
fld1
fchs
fstpt (%rbx)
movq %rbx, %rdi
addq $0x10, %rdi
leaq 0x28892(%rip), %rsi     # 0x35208
callq 0x3f7c
jmp 0xcd46
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 0x12cbc
leaq 0x168(%rsp), %rdi
movq %r13, %rsi
callq 0x42ce
leaq 0x180(%rsp), %rdi
leaq 0x18(%r13), %rbp
movq %rbp, %rsi
callq 0x815a
movb 0x30(%r13), %al
leaq 0x1a0(%rsp), %r15
movb %al, -0x8(%r15)
leaq 0x38(%r13), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x4110
movq 0x50(%r13), %rax
leaq 0x168(%rsp), %rdi
movq %rax, 0x50(%rdi)
leaq 0xb8(%rsp), %rsi
callq 0x9bd8
leaq 0x168(%rsp), %rdi
movq %r12, %rsi
callq 0x146e9
fldt 0x6c(%rsp)
faddl 0x1cda1(%rip)           # 0x297c8
fld %st(0)
fstpt 0xec(%rsp)
fxch %st(1)
fucomi %st(1), %st
fstp %st(1)
jbe 0xcda3
fldt 0xf8(%rsp)
faddl 0x1cd87(%rip)           # 0x297d0
fucompi %st(1), %st
jbe 0xca6a
fstpt (%rbx)
movq %rbx, %rdi
addq $0x10, %rdi
leaq 0xb8(%rsp), %rsi
callq 0x3f7c
fldz
jmp 0xccd8
movq 0xc0(%rsp), %rax
cmpq 0xb8(%rsp), %rax
je 0xcc75
fstp %st(0)
leaq 0xa0(%rsp), %rdi
movq %r12, %rsi
callq 0x42ce
fldz
fstp %st(0)
leaq 0xa0(%rsp), %rdi
callq 0x1b3d0
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xcac0
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
fldt 0x6c(%rsp)
fstpt (%rsp)
leaq 0x1f0(%rsp), %rdi
callq 0x1b402
fldt 0x104(%rsp)
fstpt (%rsp)
leaq 0x1c0(%rsp), %rdi
callq 0x1b402
movaps 0x1c0(%rsp), %xmm0
movaps 0x1d0(%rsp), %xmm1
movaps 0x1e0(%rsp), %xmm2
movaps %xmm2, 0x50(%rsp)
movaps %xmm1, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movapd 0x1f0(%rsp), %xmm0
movdqa 0x200(%rsp), %xmm1
movaps 0x210(%rsp), %xmm2
movaps %xmm2, 0x20(%rsp)
movdqa %xmm1, 0x10(%rsp)
movapd %xmm0, (%rsp)
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
movl $0x6, %edx
callq 0x20611
movq 0x78(%rsp), %rax
movq 0x80(%rsp), %rcx
movq %rcx, %rsi
subq %rax, %rsi
movq 0x286a8(%rip), %rdi     # 0x35210
movq 0x28699(%rip), %rdx     # 0x35208
subq %rdx, %rdi
cmpq %rdi, %rsi
jne 0xcba4
cmpq %rcx, %rax
je 0xcc8b
movq (%rax), %xmm0
movq (%rdx), %xmm1
pcmpeqd %xmm0, %xmm1
pshufd $0x50, %xmm1, %xmm0     # xmm0 = xmm1[0,0,1,1]
movmskpd %xmm0, %esi
cmpl $0x3, %esi
jne 0xcba4
addq $0x8, %rax
addq $0x8, %rdx
jmp 0xcb77
leaq 0x110(%rsp), %rdi
movq %r13, %rsi
callq 0x42ce
leaq 0x128(%rsp), %rdi
movq %rbp, %rsi
callq 0x815a
movb 0x30(%r13), %al
leaq 0x148(%rsp), %rbp
movb %al, -0x8(%rbp)
movq %rbp, %rdi
movq %r14, %rsi
callq 0x4110
movq 0x50(%r13), %rax
leaq 0x110(%rsp), %rdi
movq %rax, 0x50(%rdi)
leaq 0x78(%rsp), %rsi
callq 0x9bd8
leaq 0x110(%rsp), %rdi
movq %r12, %rsi
callq 0x146e9
fldt 0xec(%rsp)
fxch %st(1)
fucomi %st(1), %st
fstp %st(1)
jbe 0xcdc4
fldt 0x94(%rsp)
fucompi %st(1), %st
jbe 0xcde5
fstpt (%rbx)
movq %rbx, %rdi
addq $0x10, %rdi
leaq 0x78(%rsp), %rsi
callq 0x3f7c
fldz
fstp %st(0)
movq %rbp, %rdi
callq 0x41aa
leaq 0x128(%rsp), %rdi
callq 0x436a
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0xcca4
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
jmp 0xcca4
leaq 0x10(%rbx), %rdi
fldt 0x94(%rsp)
fucompi %st(1), %st
jbe 0xccc2
fstpt (%rbx)
jmp 0xca56
fld1
fchs
fstpt (%rbx)
movq %rbx, %rdi
addq $0x10, %rdi
leaq 0x28569(%rip), %rsi     # 0x35208
callq 0x3f7c
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0xccbe
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
fldz
jmp 0xccd8
fstp %st(0)
fld1
fchs
fstpt (%rbx)
leaq 0x28537(%rip), %rsi     # 0x35208
callq 0x3f7c
fldz
fstp %st(0)
movq %r15, %rdi
callq 0x41aa
leaq 0x180(%rsp), %rdi
callq 0x436a
movq 0x168(%rsp), %rdi
testq %rdi, %rdi
je 0xcd0c
movq 0x178(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0xcd29
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0xcd46
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 0x1cb0b(%rip), %rdi     # 0x29871
leaq 0x1ca73(%rip), %rsi     # 0x297e0
leaq 0x1cb0f(%rip), %rcx     # 0x29883
movl $0x3f, %edx
callq 0x2140
fstp %st(1)
fstp %st(1)
fstp %st(0)
leaq 0x1cb69(%rip), %rdi     # 0x298f4
leaq 0x1ca4e(%rip), %rsi     # 0x297e0
leaq 0x1caea(%rip), %rcx     # 0x29883
movl $0x40, %edx
callq 0x2140
fstp %st(0)
leaq 0x1cb63(%rip), %rdi     # 0x2990f
leaq 0x1ca2d(%rip), %rsi     # 0x297e0
leaq 0x1cac9(%rip), %rcx     # 0x29883
movl $0x4b, %edx
callq 0x2140
fstp %st(0)
leaq 0x1cb5f(%rip), %rdi     # 0x2992c
leaq 0x1ca0c(%rip), %rsi     # 0x297e0
leaq 0x1caa8(%rip), %rcx     # 0x29883
movl $0x5a, %edx
callq 0x2140
fstp %st(0)
leaq 0x1cb57(%rip), %rdi     # 0x29945
leaq 0x1c9eb(%rip), %rsi     # 0x297e0
leaq 0x1ca87(%rip), %rcx     # 0x29883
movl $0x5b, %edx
callq 0x2140
fstp %st(0)
jmp 0xced1
jmp 0xce45
jmp 0xce66
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x436a
jmp 0xce26
movq %rax, %rbx
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0xce76
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
jmp 0xce76
movq %rax, %rbx
jmp 0xce76
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xced4
movq 0xb0(%rsp), %rsi
jmp 0xce88
fstp %st(0)
movq %rax, %rbx
leaq 0x110(%rsp), %rdi
callq 0x40d8
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0xced4
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
jmp 0xced4
jmp 0xced1
jmp 0xced1
movq %rax, %rbx
leaq 0x180(%rsp), %rdi
callq 0x436a
jmp 0xceab
movq %rax, %rbx
movq 0x168(%rsp), %rdi
testq %rdi, %rdi
je 0xcee1
movq 0x178(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
jmp 0xcee1
movq %rax, %rbx
jmp 0xcee1
fstp %st(0)
movq %rax, %rbx
leaq 0x168(%rsp), %rdi
callq 0x40d8
leaq 0xb8(%rsp), %rdi
callq 0x3ff2
movq %rbx, %rdi
callq 0x2310