// File: /workspace/github_cpp_makefile_star2_O3/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 0x11876(%rip)           # 0x351b8
cmpb $0x0, 0xb834eb(%rip)    # 0xba6e34
je 0x24009
movq %rdi, %r12
movq (%rdi), %r15
movq 0x8(%rdi), %r14
fldz
movq %r14, %rax
subq %r15, %rax
je 0x23f7b
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 0xaf7f
movq %r15, %rdi
movq %r14, %rsi
callq 0xb062
movq (%r12), %rcx
movq 0x8(%r12), %rax
cmpq %rax, %rcx
je 0x239e1
addq $0x4, %rcx
cmpq %rax, %rcx
je 0x239e1
movl -0x4(%rcx), %edx
leaq 0x4(%rcx), %rsi
cmpl (%rcx), %edx
movq %rsi, %rcx
jne 0x239a2
leaq -0x8(%rsi), %rcx
cmpq %rax, %rsi
je 0x239d3
movl %edx, %edi
movl (%rsi), %edx
cmpl %edx, %edi
je 0x239cd
movl %edx, 0x4(%rcx)
addq $0x4, %rcx
addq $0x4, %rsi
jmp 0x239b9
addq $0x4, %rcx
cmpq %rax, %rcx
je 0x239e1
movq %rcx, 0x8(%r12)
leaq 0xb834e8(%rip), %rdi    # 0xba6ed0
movq %r12, %rsi
callq 0x263fe
leaq 0xb834e1(%rip), %rcx    # 0xba6ed8
cmpq %rcx, %rax
je 0x23a12
leaq 0xb834cd(%rip), %rdi    # 0xba6ed0
movq %r12, %rsi
callq 0x2445c
fldt (%rax)
jmp 0x23f7b
movq (%r12), %rax
movq 0x8(%r12), %r10
subq %rax, %r10
shrq $0x2, %r10
testl %r10d, %r10d
jle 0x23a6b
movl 0x1178b(%rip), %ecx     # 0x351b8
movl %r10d, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %esi, %esi
leaq 0x68db71(%rip), %rdi    # 0x6b15b0
leaq 0x6be8aa(%rip), %r8     # 0x6e22f0
movl (%rax,%rsi,4), %r9d
cmpq $0xc350, %r9            # imm = 0xC350
jae 0x23fea
movl %esi, (%rdi,%r9,4)
movslq (%rax,%rsi,4), %r9
movl %ecx, (%r8,%r9,4)
incq %rsi
cmpq %rsi, %rdx
jne 0x23a46
movq %r10, 0x8(%rsp)
leaq 0x9fc9b9(%rip), %rbx    # 0xa20430
cmpl $0x0, 0x62c0a2(%rip)    # 0x64fb20
movq %rbx, %r15
movq %r12, 0x50(%rsp)
jle 0x23c06
xorl %ebp, %ebp
leaq 0x8d7a1b(%rip), %r8     # 0x8fb4b0
leaq 0x6be854(%rip), %rbx    # 0x6e22f0
leaq 0x68db0d(%rip), %r12    # 0x6b15b0
xorl %r9d, %r9d
movslq %r9d, %rax
leaq (%rax,%rax,2), %rax
leaq 0x9fc97c(%rip), %rcx    # 0xa20430
leaq (%rcx,%rax,8), %r15
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0x23ac5
movq %rax, 0x8(%r15)
leaq (,%rbp,2), %rdx
addq %rbp, %rdx
movq (%r8,%rdx,8), %rax
movq 0x8(%r8,%rdx,8), %rcx
movq %rcx, %rsi
subq %rax, %rsi
shrq $0x2, %rsi
testl %esi, %esi
jle 0x23bac
movl %r9d, 0x14(%rsp)
leaq (%r8,%rdx,8), %r14
xorl %r13d, %r13d
movslq (%rax,%r13,4), %rdx
movl (%rbx,%rdx,4), %esi
cmpl 0x116b4(%rip), %esi     # 0x351b8
jne 0x23b31
leaq (%r12,%rdx,4), %rdx
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x23b22
movl (%rdx), %edx
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r15)
jmp 0x23b31
movq %r15, %rdi
callq 0x92c4
movq (%r14), %rax
movq 0x8(%r14), %rcx
incq %r13
movq %rcx, %rdx
subq %rax, %rdx
shrq $0x2, %rdx
movslq %edx, %rdx
cmpq %rdx, %r13
jl 0x23af7
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
movl 0x14(%rsp), %r9d
je 0x23ba5
shrq $0x2, %rcx
testl %ecx, %ecx
movq 0x8(%rsp), %rdi
leaq 0x8d7947(%rip), %r8     # 0x8fb4b0
jle 0x23ba0
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
xorl %edx, %edx
testq %rdx, %rdx
je 0x23b86
movl (%rax,%rdx,4), %esi
cmpl -0x4(%rax,%rdx,4), %esi
jg 0x23b88
jmp 0x23fcb
movl (%rax), %esi
testl %esi, %esi
js 0x23fac
cmpl %edi, %esi
jge 0x23fac
incq %rdx
cmpq %rdx, %rcx
jne 0x23b73
incl %r9d
jmp 0x23bac
leaq 0x8d7904(%rip), %r8     # 0x8fb4b0
incq %rbp
movslq 0x62bf6a(%rip), %rax    # 0x64fb20
cmpq %rax, %rbp
jl 0x23aa6
movslq %r9d, %rax
leaq (%rax,%rax,2), %rcx
leaq 0x9fc863(%rip), %rdx    # 0xa20430
leaq (%rdx,%rcx,8), %r15
testl %eax, %eax
je 0x23bff
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
leaq 0x9fc847(%rip), %r12    # 0xa20430
movq %r12, %rdi
movq %r15, %rsi
callq 0x25528
movq %r12, %rdi
movq %r15, %rsi
callq 0x255e7
leaq 0x9fc82a(%rip), %rbx    # 0xa20430
movq %rbx, %rdi
movq %r15, %rsi
callq 0x25dcb
subq %rbx, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r15
cmpl %r15d, 0x62bef3(%rip)   # 0x64fb20
jl 0x24028
cmpl $0x2, %r15d
jl 0x23cc3
movl %r15d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq 0x9fc7e4(%rip), %rdi    # 0xa20430
movl $0x1, %ecx
movq 0x9fc7e0(%rip), %rsi    # 0xa20438
leaq 0x9fc7d1(%rip), %rdx    # 0xa20430
movq %rsi, %r10
leaq (%rcx,%rcx,2), %rsi
movq (%rdx,%rsi,8), %r8
movq 0x8(%rdx,%rsi,8), %rsi
movq %r10, %r11
subq %rdi, %r11
movq %rsi, %rbx
subq %r8, %rbx
leaq (%rdi,%rbx), %r9
cmpq %r11, %rbx
cmovgeq %r10, %r9
movq %r8, %r10
cmpq %rdi, %r9
je 0x23caf
movq %r8, %r10
movl (%rdi), %r11d
movl (%r10), %ebx
cmpl %ebx, %r11d
jl 0x23cb8
jg 0x23f8d
addq $0x4, %rdi
addq $0x4, %r10
cmpq %r9, %rdi
jne 0x23c91
cmpq %rsi, %r10
je 0x23f8d
incq %rcx
movq %r8, %rdi
cmpq %rax, %rcx
jne 0x23c5f
cmpl $0x0, 0x8(%rsp)
jle 0x23cfe
movq 0x8(%rsp), %rax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
xorl %ecx, %ecx
leaq 0x7b284b(%rip), %rdx    # 0x7d6530
movq (%rcx,%rdx), %rsi
cmpq %rsi, 0x8(%rcx,%rdx)
je 0x23cf5
movq %rsi, 0x8(%rcx,%rdx)
addq $0x18, %rcx
cmpq %rcx, %rax
jne 0x23ce5
movl $0x0, 0x90(%rsp)
leaq 0x7b2820(%rip), %rbx    # 0x7d6530
testl %r15d, %r15d
jle 0x23d8a
xorl %eax, %eax
leaq 0x9fc712(%rip), %r12    # 0xa20430
leaq 0x90(%rsp), %r14
movslq %eax, %rcx
leaq (%rcx,%rcx,2), %rcx
movq (%r12,%rcx,8), %r13
movq 0x8(%r12,%rcx,8), %rbp
cmpq %rbp, %r13
je 0x23d7c
movslq (%r13), %rax
leaq (%rax,%rax,2), %rax
leaq (%rbx,%rax,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x23d64
movl 0x90(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x23d6c
movq %r14, %rdx
callq 0x92c4
addq $0x4, %r13
cmpq %rbp, %r13
jne 0x23d3b
movl 0x90(%rsp), %eax
incl %eax
movl %eax, 0x90(%rsp)
cmpl %r15d, %eax
jl 0x23d26
movq 0x8(%rsp), %r12
movslq %r12d, %r14
leaq 0x58(%rsp), %rdi
leaq 0x90(%rsp), %rdx
movq %r14, %rsi
callq 0x244f8
leaq 0x38(%rsp), %rdi
leaq 0x90(%rsp), %rdx
movq %r14, %rsi
callq 0x24576
movslq %r15d, %r14
testl %r12d, %r12d
jle 0x23e40
movq 0x8(%rsp), %rax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, 0x8(%rsp)
xorl %r12d, %r12d
fld1
fchs
fstpt 0x14(%rsp)
leaq (%r12,%r12,2), %r13
leaq (,%r13,8), %rdi
addq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0x2460e
movq (%rbx,%r13,8), %rax
movq 0x8(%rbx,%r13,8), %rcx
cmpq %rcx, %rax
fldt 0x14(%rsp)
je 0x23e27
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 0x23e12
movq 0x38(%rsp), %rax
movq %r12, %rcx
shlq $0x4, %rcx
fstpt (%rax,%rcx)
incq %r12
cmpq 0x8(%rsp), %r12
jne 0x23dde
leaq 0x20(%rsp), %rdi
leaq 0x90(%rsp), %rdx
movq %r14, %rsi
callq 0x24576
testl %r15d, %r15d
movq 0x50(%rsp), %rbx
fldz
jle 0x23e80
fstp %st(0)
movq 0x20(%rsp), %rax
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
fld1
fchs
fld %st(0)
fstpt (%rax)
addq $0x10, %rax
decq %r15
jne 0x23e73
fstp %st(0)
leaq 0x90(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x38(%rsp), %rdx
leaq 0x20(%rsp), %rcx
callq 0x24642
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
leaq 0x90(%rsp), %rdi
callq 0x24886
fstpt 0x8(%rsp)
leaq 0xb83007(%rip), %rdi    # 0xba6ed0
movq %rbx, %rsi
callq 0x2445c
fldt 0x8(%rsp)
fchs
fld %st(0)
fstpt 0x8(%rsp)
fstpt (%rax)
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x23ef9
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
leaq 0xe8(%rsp), %rbx
movq %rbx, %rdi
callq 0x24b34
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x23f22
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x23f3f
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x23f56
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x23f6d
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
leaq 0x58(%rsp), %rdi
callq 0x24b34
fldt 0x8(%rsp)
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7348(%rip), %rdi      # 0x2b2dc
leaq 0x71f6(%rip), %rsi      # 0x2b191
leaq 0x737f(%rip), %rcx      # 0x2b321
movl $0x15a, %edx            # imm = 0x15A
callq 0x2140
leaq 0x72ff(%rip), %rdi      # 0x2b2b2
leaq 0x71d7(%rip), %rsi      # 0x2b191
leaq 0x7360(%rip), %rcx      # 0x2b321
movl $0x150, %edx            # imm = 0x150
callq 0x2140
leaq 0x72c6(%rip), %rdi      # 0x2b298
leaq 0x71b8(%rip), %rsi      # 0x2b191
leaq 0x7341(%rip), %rcx      # 0x2b321
movl $0x14f, %edx            # imm = 0x14F
callq 0x2140
leaq 0x7288(%rip), %rdi      # 0x2b279
leaq 0x7199(%rip), %rsi      # 0x2b191
leaq 0x7322(%rip), %rcx      # 0x2b321
movl $0x141, %edx            # imm = 0x141
callq 0x2140
leaq 0x7179(%rip), %rdi      # 0x2b189
leaq 0x717a(%rip), %rsi      # 0x2b191
leaq 0x7303(%rip), %rcx      # 0x2b321
movl $0x135, %edx            # imm = 0x135
callq 0x2140
leaq 0x72a5(%rip), %rdi      # 0x2b2d4
leaq 0x715b(%rip), %rsi      # 0x2b191
leaq 0x72e4(%rip), %rcx      # 0x2b321
movl $0x158, %edx            # imm = 0x158
callq 0x2140
movq %rax, %rbx
jmp 0x2407d
jmp 0x24096
movq %rax, %rbx
jmp 0x240b0
movq %rax, %rbx
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x24070
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
leaq 0x90(%rsp), %rdi
callq 0x24afa
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x24099
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
jmp 0x24099
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x240b0
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
leaq 0x58(%rsp), %rdi
callq 0x24b34
movq %rbx, %rdi
callq 0x2310