// File: /workspace/github_cpp_makefile_star2_O1/Laakeri[P]Triangulator/src/setcover.cpp
// Function: SetCover::solveFrac(std::vector<int, std::allocator<int>>)
ld solveFrac(vector<int> univ) {
	git++;
	assert(hasInit);
	if (univ.size() == 0) return {};
	sort(univ.begin(), univ.end());
	univ.erase(unique(univ.begin(), univ.end()), univ.end());
	
	if (fracSol.count(univ)) {
		return fracSol[univ];
	}
	
	int n = univ.size();
	
	for (int i = 0; i < n; i++) {
		assert(univ[i] >= 0 && univ[i] < maxN);
		plc[univ[i]] = i;
		is[univ[i]] = git;
	}
	int m = 0;
	for (int i = 0; i < gm; i++) {
		sets[m].clear();
		for (int j = 0; j < (int)Gsets[i].size(); j++) {
			if (is[Gsets[i][j]] == git) {
				sets[m].push_back(plc[Gsets[i][j]]);
			}
		}
		if (sets[m].size() > 0) {
			for (int j = 0; j < (int)sets[m].size(); j++) {
				if (j > 0) assert(sets[m][j] > sets[m][j-1]);
				assert(sets[m][j] >= 0 && sets[m][j] < n);
			}
			m++;
		}
	}
	sort(sets, sets+m);
	auto last = unique(sets, sets+m);
	m = last - sets;
	assert(m <= gm);
	for (int i = 1; i < m; i++) {
		assert(sets[i] > sets[i-1]);
	}
	for (int i = 0; i < n; i++) {
		where[i].clear();
	}
	for (int i = 0; i < m; i++) {
		for (int x : sets[i]) {
			where[x].push_back(i);
		}
	}
#ifdef USE_GLPK
	glp_prob* lp = glp_create_prob();
	glp_set_obj_dir(lp, GLP_MIN);
	assert(glp_add_rows(lp, n) == 1);
	assert(glp_add_cols(lp, m) == 1);
	for (int i = 0; i < n; i++) {
		glp_set_row_bnds(lp, i+1, GLP_LO, 1, 0);
	}
	for (int i = 0; i < m; i++) {
		glp_set_col_bnds(lp, i+1, GLP_DB, 0, 1);
		glp_set_obj_coef(lp, i+1, 1);
	}
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < (int)where[i].size(); j++) {
			glpTempId[j+1] = where[i][j]+1;
			glpTempVal[j+1] = 1;
		}
		glp_set_mat_row(lp, i+1, (int)where[i].size(), glpTempId, glpTempVal);
	}
	glp_smcp param;
	glp_init_smcp(&param);
	param.msg_lev = GLP_MSG_OFF;
	glp_simplex(lp, &param);
	ld val = glp_get_obj_val(lp);
#else
	vector<vector<ld> > A(n);
	vector<ld> b(n);
	for (int i = 0; i < n; i++) {
		A[i].resize(m);
		for (int x : where[i]) {
			A[i][x] = -1;
		}
		b[i] = -1;
	}
	vector<ld> c(m);
	for (int i = 0; i < m; i++) {
		c[i] = -1;
	}
	LPSolver lps(A, b, c);
	vector<ld> sol;
	ld val = -lps.Solve(sol);
#endif
	fracSol[univ] = val;
	return val;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
incl 0x12812(%rip)           # 0x361b8
cmpb $0x0, 0xb84487(%rip)    # 0xba7e34
je 0x23ffd
movq %rdi, %rbx
movq (%rdi), %r15
movq 0x8(%rdi), %r14
fldz
movq %r14, %rax
subq %r15, %rax
je 0x23f6f
fstp %st(0)
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0xac3d
movq %r15, %rdi
movq %r14, %rsi
callq 0xad20
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0xaf90
movq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x23a1f
movq 0x8(%rbx), %rdx
movq %rdx, %rsi
subq %rcx, %rsi
addq %rsi, %rax
cmpq %rax, %rdx
je 0x23a1f
movq %rax, 0x8(%rbx)
leaq 0xb844aa(%rip), %rdi    # 0xba7ed0
movq %rbx, %rsi
callq 0x26938
leaq 0xb844a3(%rip), %rcx    # 0xba7ed8
cmpq %rcx, %rax
je 0x23a50
leaq 0xb8448f(%rip), %rdi    # 0xba7ed0
movq %rbx, %rsi
callq 0x2447e
fldt (%rax)
jmp 0x23f6f
movq (%rbx), %rax
movq 0x8(%rbx), %rbp
subq %rax, %rbp
shrq $0x2, %rbp
testl %ebp, %ebp
jle 0x23aa5
movl 0x12750(%rip), %ecx     # 0x361b8
movl %ebp, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %esi, %esi
leaq 0x68eb37(%rip), %rdi    # 0x6b25b0
leaq 0x6bf870(%rip), %r8     # 0x6e32f0
movl (%rax,%rsi,4), %r9d
cmpq $0xc350, %r9            # imm = 0xC350
jae 0x23fbf
movl %esi, (%rdi,%r9,4)
movslq (%rax,%rsi,4), %r9
movl %ecx, (%r8,%r9,4)
incq %rsi
cmpq %rsi, %rdx
jne 0x23a80
movq %rbx, 0x50(%rsp)
cmpl $0x0, 0x62d06f(%rip)    # 0x650b20
jle 0x23be0
xorl %r12d, %r12d
leaq 0x6bf82f(%rip), %rbx    # 0x6e32f0
leaq 0x68eae8(%rip), %r14    # 0x6b25b0
xorl %ecx, %ecx
movq %rbp, 0x18(%rsp)
movl %ecx, 0xc(%rsp)
movslq %ecx, %rax
leaq (%rax,%rax,2), %rax
leaq 0x9fd94f(%rip), %rcx    # 0xa21430
leaq (%rcx,%rax,8), %r15
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0x23af2
movq %rax, 0x8(%r15)
leaq (%r12,%r12,2), %rcx
leaq 0x8d89b3(%rip), %rdx    # 0x8fc4b0
movq (%rdx,%rcx,8), %rax
movq 0x8(%rdx,%rcx,8), %rdx
subq %rax, %rdx
shrq $0x2, %rdx
testl %edx, %edx
jle 0x23b6c
leaq 0x8d8998(%rip), %rdx    # 0x8fc4b0
leaq (%rdx,%rcx,8), %rbp
xorl %r13d, %r13d
movslq (%rax,%r13,4), %rax
movl (%rbx,%rax,4), %ecx
cmpl 0x1268c(%rip), %ecx     # 0x361b8
jne 0x23b52
leaq (%r14,%rax,4), %rdx
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x23b4a
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r15)
jmp 0x23b52
movq %r15, %rdi
callq 0x8fde
incq %r13
movq (%rbp), %rax
movq 0x8(%rbp), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r13
jl 0x23b1f
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
je 0x23bc2
shrq $0x2, %rcx
testl %ecx, %ecx
movq 0x18(%rsp), %rbp
jle 0x23bba
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
xorl %edx, %edx
testq %rdx, %rdx
je 0x23b9f
movl (%rax,%rdx,4), %esi
cmpl -0x4(%rax,%rdx,4), %esi
jle 0x23fa0
movl (%rax,%rdx,4), %esi
testl %esi, %esi
js 0x23f81
cmpl %ebp, %esi
jge 0x23f81
incq %rdx
cmpq %rdx, %rcx
jne 0x23b8d
movl 0xc(%rsp), %ecx
incl %ecx
jmp 0x23bcb
movq 0x18(%rsp), %rbp
movl 0xc(%rsp), %ecx
incq %r12
movslq 0x62cf4b(%rip), %rax    # 0x650b20
cmpq %rax, %r12
jl 0x23acf
jmp 0x23be2
xorl %ecx, %ecx
movslq %ecx, %rax
leaq (%rax,%rax,2), %rcx
leaq 0x9fd840(%rip), %rdx    # 0xa21430
leaq (%rdx,%rcx,8), %r15
testl %eax, %eax
je 0x23c22
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
leaq 0x9fd824(%rip), %r12    # 0xa21430
movq %r12, %rdi
movq %r15, %rsi
callq 0x25889
movq %r12, %rdi
movq %r15, %rsi
callq 0x25948
leaq 0x9fd807(%rip), %rbx    # 0xa21430
movq %rbx, %rdi
movq %r15, %rsi
callq 0x262f7
subq %rbx, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r12
cmpl %r12d, 0x62ced0(%rip)   # 0x650b20
jl 0x2401c
cmpl $0x2, %r12d
jl 0x23cd6
movl %r12d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl $0x1, %ecx
leaq (%rcx,%rcx,2), %rsi
leaq 0x9fd7bc(%rip), %r8     # 0xa21430
movq -0x18(%r8,%rsi,8), %rdi
movq -0x10(%r8,%rsi,8), %r9
movq (%r8,%rsi,8), %rdx
movq 0x8(%r8,%rsi,8), %rsi
movq %r9, %r10
subq %rdi, %r10
movq %rsi, %r11
subq %rdx, %r11
leaq (%rdi,%r11), %r8
cmpq %r10, %r11
cmovgeq %r9, %r8
cmpq %rdi, %r8
je 0x23cbb
movl (%rdi), %r9d
movl (%rdx), %r10d
cmpl %r9d, %r10d
jne 0x23cc3
addq $0x4, %rdi
addq $0x4, %rdx
cmpq %r8, %rdi
jne 0x23ca3
cmpq %rsi, %rdx
setne %dl
jmp 0x23cc6
setg %dl
testb %dl, %dl
je 0x23fde
incq %rcx
cmpq %rax, %rcx
jne 0x23c69
testl %ebp, %ebp
jle 0x23d0b
movl %ebp, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
xorl %ecx, %ecx
leaq 0x7b383e(%rip), %rdx    # 0x7d7530
movq (%rcx,%rdx), %rsi
cmpq %rsi, 0x8(%rcx,%rdx)
je 0x23d02
movq %rsi, 0x8(%rcx,%rdx)
addq $0x18, %rcx
cmpq %rcx, %rax
jne 0x23cf2
movl $0x0, 0x90(%rsp)
leaq 0x7b3813(%rip), %rbx    # 0x7d7530
testl %r12d, %r12d
jle 0x23d92
xorl %eax, %eax
leaq 0x90(%rsp), %r15
cltq
leaq (%rax,%rax,2), %rax
leaq 0x9fd6f7(%rip), %rcx    # 0xa21430
movq (%rcx,%rax,8), %r14
movq 0x8(%rcx,%rax,8), %r13
cmpq %r13, %r14
je 0x23d7d
movslq (%r14), %rax
leaq (%rax,%rax,2), %rax
leaq (%rbx,%rax,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x23d6f
movl 0x90(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x23d77
movq %r15, %rdx
callq 0x8fde
addq $0x4, %r14
jmp 0x23d42
movl 0x90(%rsp), %eax
incl %eax
movl %eax, 0x90(%rsp)
cmpl %r12d, %eax
jl 0x23d2c
movslq %ebp, %r14
leaq 0x58(%rsp), %rdi
leaq 0x90(%rsp), %rdx
movq %r14, %rsi
callq 0x24524
leaq 0x38(%rsp), %rdi
leaq 0x90(%rsp), %rdx
movq %r14, %rsi
callq 0x245ac
testl %ebp, %ebp
jle 0x23e37
movslq %r12d, %r14
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
xorl %r15d, %r15d
fld1
fchs
fstpt 0xc(%rsp)
leaq (%r15,%r15,2), %r13
leaq (,%r13,8), %rdi
addq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0x24642
movq (%rbx,%r13,8), %rax
movq 0x8(%rbx,%r13,8), %rcx
cmpq %rcx, %rax
fldt 0xc(%rsp)
je 0x23e20
movq 0x58(%rsp), %rdx
movq (%rdx,%r13,8), %rdx
movslq (%rax), %rsi
shlq $0x4, %rsi
fld %st(0)
fstpt (%rdx,%rsi)
addq $0x4, %rax
cmpq %rcx, %rax
jne 0x23e0b
movq 0x38(%rsp), %rax
movq %r15, %rcx
shlq $0x4, %rcx
fstpt (%rax,%rcx)
incq %r15
cmpq %rbp, %r15
jne 0x23dd7
movslq %r12d, %rsi
leaq 0x20(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x245ac
testl %r12d, %r12d
fldz
jle 0x23e72
fstp %st(0)
movq 0x20(%rsp), %rax
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
fld1
fchs
fld %st(0)
fstpt (%rax)
addq $0x10, %rax
decq %r12
jne 0x23e65
fstp %st(0)
leaq 0x90(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x38(%rsp), %rdx
leaq 0x20(%rsp), %rcx
callq 0x24676
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
leaq 0x90(%rsp), %rdi
callq 0x248d6
fstpt 0xc(%rsp)
movq 0x50(%rsp), %rsi
leaq 0xb84010(%rip), %rdi    # 0xba7ed0
callq 0x2447e
fldt 0xc(%rsp)
fchs
fld %st(0)
fstpt 0xc(%rsp)
fstpt (%rax)
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x23eed
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
leaq 0xe8(%rsp), %rbx
movq %rbx, %rdi
callq 0x24b66
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x23f16
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x23f33
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x23f4a
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x23f61
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
leaq 0x58(%rsp), %rdi
callq 0x24b66
fldt 0xc(%rsp)
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x831a(%rip), %rdi      # 0x2c2a2
leaq 0x81f2(%rip), %rsi      # 0x2c181
leaq 0x837b(%rip), %rcx      # 0x2c311
movl $0x150, %edx            # imm = 0x150
callq 0x2140
leaq 0x82e1(%rip), %rdi      # 0x2c288
leaq 0x81d3(%rip), %rsi      # 0x2c181
leaq 0x835c(%rip), %rcx      # 0x2c311
movl $0x14f, %edx            # imm = 0x14F
callq 0x2140
leaq 0x82a3(%rip), %rdi      # 0x2c269
leaq 0x81b4(%rip), %rsi      # 0x2c181
leaq 0x833d(%rip), %rcx      # 0x2c311
movl $0x141, %edx            # imm = 0x141
callq 0x2140
leaq 0x82e7(%rip), %rdi      # 0x2c2cc
leaq 0x8195(%rip), %rsi      # 0x2c181
leaq 0x831e(%rip), %rcx      # 0x2c311
movl $0x15a, %edx            # imm = 0x15A
callq 0x2140
leaq 0x8175(%rip), %rdi      # 0x2c179
leaq 0x8176(%rip), %rsi      # 0x2c181
leaq 0x82ff(%rip), %rcx      # 0x2c311
movl $0x135, %edx            # imm = 0x135
callq 0x2140
leaq 0x82a1(%rip), %rdi      # 0x2c2c4
leaq 0x8157(%rip), %rsi      # 0x2c181
leaq 0x82e0(%rip), %rcx      # 0x2c311
movl $0x158, %edx            # imm = 0x158
callq 0x2140
movq %rax, %rbx
jmp 0x24071
jmp 0x2408a
movq %rax, %rbx
jmp 0x240a4
movq %rax, %rbx
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x24064
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
leaq 0x90(%rsp), %rdi
callq 0x24b2c
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2408d
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
jmp 0x2408d
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x240a4
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
leaq 0x58(%rsp), %rdi
callq 0x24b66
movq %rbx, %rdi
callq 0x2310