// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movslq 0x20(%rdi), %rcx
xorl %esi, %esi
movq 0x58(%rdi), %rax
movslq 0x24(%rdi), %rdx
cmpq $0x2, %rcx
jl 0x248ed
leaq 0x1(%rdx), %rdi
leaq 0x18(%rax), %r8
xorl %r10d, %r10d
movl $0x1, %r9d
shlq $0x4, %rdi
movq (%r8), %rsi
fldt (%rsi,%rdi)
movslq %r10d, %rsi
leaq (%rsi,%rsi,2), %rsi
movq (%rax,%rsi,8), %rsi
fldt (%rsi,%rdi)
fucompi %st(1), %st
fstp %st(0)
movl %r9d, %esi
ja 0x248de
movl %r10d, %esi
incq %r9
addq $0x18, %r8
movl %esi, %r10d
cmpq %r9, %rcx
jne 0x248be
movslq %esi, %rcx
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx,8), %rax
movq %rdx, %rcx
shlq $0x4, %rcx
fldt 0x10(%rax,%rcx)
fldt (%rbx)
fchs
fucompi %st(1), %st
fstp %st(0)
jbe 0x24a1b
movq %rbx, %rdi
callq 0x24e8e
movq %rbx, %rdi
movl $0x1, %esi
callq 0x24ff6
testb %al, %al
je 0x24951
movslq 0x20(%rbx), %rax
movq 0x58(%rbx), %rcx
leaq (%rax,%rax,2), %rdx
movslq 0x24(%rbx), %rsi
movq 0x18(%rcx,%rdx,8), %rcx
shlq $0x4, %rsi
fldt 0x10(%rcx,%rsi)
fldt (%rbx)
fchs
fucompi %st(1), %st
fstp %st(0)
jbe 0x2495b
fldt 0x10(%rbx)
fchs
jmp 0x24af0
testl %eax, %eax
jle 0x24a1b
xorl %r15d, %r15d
movq 0x40(%rbx), %rcx
cmpl $-0x1, (%rcx,%r15,4)
jne 0x24a0c
movl 0x24(%rbx), %edx
testl %edx, %edx
js 0x249f9
leaq (%r15,%r15,2), %rax
shlq $0x3, %rax
addq 0x58(%rbx), %rax
movq 0x28(%rbx), %rcx
leaq 0x4(,%rdx,4), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %edi, %edi
xorl %r8d, %r8d
cmpl $-0x1, %edx
fldz
fldz
je 0x249dc
fstp %st(1)
fstp %st(0)
movq (%rax), %r10
fldt (%r10,%rdi,4)
movslq %edx, %r9
movq %r9, %r11
shlq $0x4, %r11
fldt (%r10,%r11)
fucomi %st(1), %st
ja 0x249dc
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x249e3
jp 0x249e3
movl (%rcx,%rdi), %r10d
cmpl (%rcx,%r9,4), %r10d
fldz
fldz
jge 0x249e7
fstp %st(1)
fstp %st(0)
movl %r8d, %edx
fldz
fldz
fstp %st(1)
fstp %st(0)
incl %r8d
addq $0x4, %rdi
cmpq %rdi, %rsi
jne 0x2499e
jmp 0x249fe
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rbx, %rdi
movl %r15d, %esi
callq 0x24e8e
movl 0x20(%rbx), %eax
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0x24966
movq %rbx, %rdi
movl $0x2, %esi
callq 0x24ff6
testb %al, %al
je 0x24aed
movslq 0x24(%rbx), %rsi
leaq 0x10(%rsp), %r15
leaq 0xf(%rsp), %rdx
movq %r15, %rdi
callq 0x24576
movq (%r14), %rdi
movq 0x10(%r14), %rsi
movaps (%r15), %xmm0
movups %xmm0, (%r14)
movq 0x10(%r15), %rax
movq %rax, 0x10(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
testq %rdi, %rdi
je 0x24a90
subq %rdi, %rsi
callq 0x2210
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x24a90
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movslq 0x20(%rbx), %rcx
movq 0x58(%rbx), %rdx
movslq 0x24(%rbx), %rax
testq %rcx, %rcx
jle 0x24adb
movq 0x40(%rbx), %rsi
movq (%r14), %rdi
xorl %r8d, %r8d
movq %rax, %r9
shlq $0x4, %r9
movslq (%rsi,%r8,4), %r10
cmpl %eax, %r10d
jge 0x24acb
movq (%rdx), %r11
fldt 0x10(%r11,%r9)
shlq $0x4, %r10
fstpt (%rdi,%r10)
incq %r8
addq $0x18, %rdx
cmpq %r8, %rcx
jne 0x24ab2
movq 0x58(%rbx), %rdx
leaq (%rcx,%rcx,2), %rcx
movq (%rdx,%rcx,8), %rcx
shlq $0x4, %rax
fldt 0x10(%rcx,%rax)
jmp 0x24af0
fldt 0x10(%rbx)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq