// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/svm.c
// Function: solve_nu_svr
void solve_nu_svr(Svm_problem prob, Svm_parameter param, double *alpha, Solutioninfoptr si)
{
	/*Last Changed 29.04.2005*/
	Nusolverptr n;
	int l = prob.l, i;
	double C = param.C, *alpha2, *linear_term, sum;
	signed char *y;
 alpha2 = safemalloc(2 * l * sizeof(double), "solve_nu_svr", 5);
 linear_term = safemalloc(2 * l * sizeof(double), "solve_nu_svr", 6);
	y = safemalloc(2 * l * sizeof(signed char), "solve_nu_svr", 7);
	n = safemalloc(sizeof(Nusolver), "solve_nu_svr", 8);
	sum = C * param.nu * l / 2;
	for (i = 0; i < l; i++)
	 {
	 	alpha2[i] = fmin(sum, C);
			alpha2[i + l] = fmin(sum, C);
		 sum -= alpha2[i];
		 linear_term[i] = -prob.y[i];
		 y[i] = 1;
		 linear_term[i+l] = prob.y[i];
		 y[i+l] = -1;
	 }
 nu_solve(n, 2 * l, QR, linear_term, y, alpha2, C, C, si, prob, param);
	for (i = 0; i < l; i++)
		 alpha[i] = alpha2[i] - alpha2[i + l];
	safe_free(n);
	safe_free(alpha2);
 safe_free(linear_term);
	safe_free(y);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, 0x88(%rsp)
movq %rdi, %rbx
leaq 0x100(%rsp), %rax
leaq 0xe0(%rsp), %rbp
movslq (%rbp), %r15
movsd 0x30(%rax), %xmm0
movaps %xmm0, 0x90(%rsp)
leaq (%r15,%r15), %rax
movq %rax, 0x80(%rsp)
movq %r15, %r12
shlq $0x4, %r12
leaq 0x203f5(%rip), %r13     # 0xae9af
movq %r12, %rdi
movq %r13, %rsi
movl $0x5, %edx
callq 0x390f5
movq %rax, %r14
movq %r12, %rdi
movq %r13, %r12
movq %r13, %rsi
movl $0x6, %edx
callq 0x390f5
movq %rax, %r13
movq 0x80(%rsp), %rdi
movq %r12, %rsi
movl $0x7, %edx
callq 0x390f5
movq %rax, %r12
movl $0x88, %edi
leaq 0x203a8(%rip), %rsi     # 0xae9af
movl $0x8, %edx
callq 0x390f5
leaq 0x100(%rsp), %rsi
movapd 0x90(%rsp), %xmm0
movq %rax, %r8
testq %r15, %r15
jle 0x8e6cd
movsd 0x40(%rsi), %xmm1
mulsd %xmm0, %xmm1
cvtsi2sd %r15d, %xmm5
mulsd %xmm1, %xmm5
mulsd 0x146d0(%rip), %xmm5    # 0xa2d18
movq %r12, %rax
addq %r15, %rax
leaq (,%r15,8), %rcx
addq %r13, %rcx
leaq (%r14,%r15,8), %rdx
xorl %r9d, %r9d
movaps 0x14b69(%rip), %xmm1    # 0xa31d0
movapd %xmm5, %xmm2
cmpunordsd %xmm5, %xmm2
movapd %xmm2, %xmm3
andpd %xmm0, %xmm3
movapd %xmm0, %xmm4
minsd %xmm5, %xmm4
andnpd %xmm4, %xmm2
orpd %xmm3, %xmm2
movlpd %xmm2, (%r14,%r9,8)
movlpd %xmm2, (%rdx,%r9,8)
subsd %xmm2, %xmm5
movq 0x8(%rbp), %rdi
movsd (%rdi,%r9,8), %xmm2
xorps %xmm1, %xmm2
movlps %xmm2, (%r13,%r9,8)
movb $0x1, (%r12,%r9)
movq 0x8(%rbp), %rdi
movsd (%rdi,%r9,8), %xmm2
movsd %xmm2, (%rcx,%r9,8)
movb $-0x1, (%rax,%r9)
incq %r9
cmpq %r9, %r15
jne 0x8e667
leaq 0x28(%rsp), %rdi
movl $0xb, %ecx
rep  movsq (%rsi), %es:(%rdi)
movups (%rbp), %xmm2
movups 0x10(%rbp), %xmm1
movups %xmm1, 0x18(%rsp)
movups %xmm2, 0x8(%rsp)
movq 0x88(%rsp), %rax
movq %rax, (%rsp)
movq %r8, %rbp
movq %r8, %rdi
movq 0x80(%rsp), %rsi
movl $0x1, %edx
movq %r13, %rcx
movq %r12, %r8
movq %r14, %r9
movapd %xmm0, %xmm1
callq 0x949bb
testl %r15d, %r15d
jle 0x8e740
leaq (%r14,%r15,8), %rax
xorl %ecx, %ecx
movsd (%r14,%rcx,8), %xmm0
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rbx,%rcx,8)
incq %rcx
cmpq %rcx, %r15
jne 0x8e728
movq %rbp, %rdi
callq 0x39194
movq %r14, %rdi
callq 0x39194
movq %r13, %rdi
callq 0x39194
movq %r12, %rdi
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x39194