// File: /workspace/github_cpp_makefile_star2_O2/Laakeri[P]Triangulator/src/setcover.cpp
// Function: SetCover::LPSolver::Solve(std::vector<long double, std::allocator<long double>>&)
ld Solve(vector<ld>& x) {
		int r = 0;
		for (int i = 1; i < m; i++) if (D[i][n + 1] < D[r][n + 1]) r = i;
		if (D[r][n + 1] < -eps) {
			Pivot(r, n);
			if (!Simplex(1) || D[m + 1][n + 1] < -eps) return -inf;
			for (int i = 0; i < m; i++) if (B[i] == -1) {
				int s = -1;
				for (int j = 0; j <= n; j++)
				if (s==-1||D[i][j]<D[i][s]||(D[i][j]==D[i][s]&&N[j]<N[s])) s=j;
				Pivot(i, s);
			}
		}
		if (!Simplex(2)) return inf;
		x = vector<ld>(n);
		for (int i = 0; i < m; i++) if (B[i] < n) x[B[i]] = D[i][n + 1];
		return D[m][n + 1];
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x20(%rdi), %rcx
movq 0x58(%rdi), %rax
movslq 0x24(%rdi), %rdx
leaq 0x1(%rdx), %rdi
leaq 0x18(%rax), %r8
xorl %esi, %esi
pushq $0x1
popq %r9
shlq $0x4, %rdi
movslq %esi, %r10
cmpq %rcx, %r9
jge 0x1c62b
movq (%r8), %r11
fldt (%r11,%rdi)
imulq $0x18, %r10, %r10
movq (%rax,%r10), %r10
fldt (%r10,%rdi)
fucompi %st(1), %st
fstp %st(0)
movl %r9d, %r10d
ja 0x1c61f
movl %esi, %r10d
incq %r9
addq $0x18, %r8
movl %r10d, %esi
jmp 0x1c5f8
imulq $0x18, %r10, %rcx
movq (%rax,%rcx), %rax
movq %rdx, %rcx
shlq $0x4, %rcx
fldt 0x10(%rax,%rcx)
fldt (%r14)
fchs
fucompi %st(1), %st
fstp %st(0)
jbe 0x1c741
movq %r14, %rdi
callq 0x1cbba
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x1cce2
testb %al, %al
je 0x1c68c
movslq 0x20(%r14), %rax
movq 0x58(%r14), %rcx
imulq $0x18, %rax, %rdx
movslq 0x24(%r14), %rsi
movq 0x18(%rcx,%rdx), %rcx
shlq $0x4, %rsi
fldt 0x10(%rcx,%rsi)
fldt (%r14)
fchs
fucompi %st(1), %st
fstp %st(0)
jbe 0x1c697
fldt 0x10(%r14)
fchs
jmp 0x1c7dd
xorl %r15d, %r15d
pushq $-0x1
popq %rbp
movslq %eax, %rcx
cmpq %rcx, %r15
jge 0x1c741
movq 0x40(%r14), %rcx
cmpl $-0x1, (%rcx,%r15,4)
jne 0x1c739
movslq 0x24(%r14), %rax
imulq $0x18, %r15, %rcx
addq 0x58(%r14), %rcx
movq 0x28(%r14), %rsi
xorl %edi, %edi
xorl %r8d, %r8d
movl %ebp, %edx
cmpq %rax, %r8
jg 0x1c72a
cmpl $-0x1, %edx
fldz
fldz
je 0x1c712
fstp %st(1)
fstp %st(0)
movq (%rcx), %r10
fldt (%r10,%rdi)
movslq %edx, %r9
movq %r9, %r11
shlq $0x4, %r11
fldt (%r10,%r11)
fucomi %st(1), %st
ja 0x1c712
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x1c719
jp 0x1c719
movl (%rsi,%r8,4), %r10d
cmpl (%rsi,%r9,4), %r10d
fldz
fldz
jge 0x1c71d
fstp %st(1)
fstp %st(0)
movl %r8d, %edx
fldz
fldz
fstp %st(1)
fstp %st(0)
incq %r8
addq $0x10, %rdi
jmp 0x1c6cf
movq %r14, %rdi
movl %r15d, %esi
callq 0x1cbba
movl 0x20(%r14), %eax
incq %r15
jmp 0x1c69d
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x1cce2
testb %al, %al
je 0x1c7ca
movslq 0x24(%r14), %rsi
leaq 0x10(%rsp), %r15
leaq 0xf(%rsp), %rdx
movq %r15, %rdi
callq 0x1c328
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1ce72
movq %r15, %rdi
callq 0x1cae4
movslq 0x20(%r14), %rax
movq 0x40(%r14), %rdx
movq 0x58(%r14), %rcx
movslq 0x24(%r14), %rsi
xorl %edi, %edi
testl %eax, %eax
movl $0x0, %r8d
cmovgl %eax, %r8d
movq (%rbx), %r10
movq %rsi, %r9
shlq $0x4, %r9
movq %rcx, %r11
cmpq %rdi, %r8
je 0x1c7d0
movslq (%rdx,%rdi,4), %rbx
cmpl %esi, %ebx
jge 0x1c7c1
movq (%r11), %r14
fldt 0x10(%r14,%r9)
shlq $0x4, %rbx
fstpt (%r10,%rbx)
incq %rdi
addq $0x18, %r11
jmp 0x1c7a4
fldt 0x10(%r14)
jmp 0x1c7dd
imulq $0x18, %rax, %rax
movq (%rcx,%rax), %rax
fldt 0x10(%rax,%r9)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq