// File: /workspace/github_c_makefile_star2_O2/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 $0xc8, %rsp
movq %rsi, 0xb0(%rsp)
movq %rdi, 0xb8(%rsp)
leaq 0x120(%rsp), %rcx
leaq 0x100(%rsp), %rax
movslq (%rax), %rbp
movsd 0x30(%rcx), %xmm0
movsd %xmm0, 0x88(%rsp)
leaq (,%rbp,2), %rbx
movq %rbp, %r15
shlq $0x4, %r15
leaq 0x1e8ce(%rip), %r13     # 0xa1987
pushq $0x5
popq %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x34f59
movq %rax, %r14
pushq $0x6
popq %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x34f59
movq %rax, %r15
pushq $0x7
popq %rdx
movq %rbx, 0xa8(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x34f59
movq %rax, %r12
pushq $0x8
popq %rdx
movl $0x88, %edi
movq %r13, %rsi
callq 0x34f59
movq %rax, 0xa0(%rsp)
leaq 0x120(%rsp), %rax
movsd 0x40(%rax), %xmm0
mulsd 0x88(%rsp), %xmm0
movq %rbp, %rax
cvtsi2sd %eax, %xmm1
mulsd %xmm0, %xmm1
mulsd 0x12beb(%rip), %xmm1    # 0x95d20
xorl %ebx, %ebx
testl %eax, %eax
movl $0x0, %r13d
cmovgl %eax, %r13d
leaq (%r14,%rbp,8), %rbp
movq %r15, 0x98(%rsp)
leaq (%r15,%rax,8), %r15
movq %r12, 0x90(%rsp)
addq %rax, %r12
cmpq %rbx, %r13
je 0x831de
movapd %xmm1, %xmm0
movsd %xmm1, 0xc0(%rsp)
movsd 0x88(%rsp), %xmm1
callq 0x34c95
movsd 0xc0(%rsp), %xmm1
movsd %xmm0, (%r14,%rbx,8)
movsd %xmm0, (%rbp,%rbx,8)
subsd (%r14,%rbx,8), %xmm1
leaq 0x100(%rsp), %rax
movq 0x8(%rax), %rax
movsd (%rax,%rbx,8), %xmm0
xorps 0x1301f(%rip), %xmm0    # 0x961d0
movq 0x98(%rsp), %rcx
movlps %xmm0, (%rcx,%rbx,8)
movq 0x90(%rsp), %rcx
movb $0x1, (%rcx,%rbx)
movsd (%rax,%rbx,8), %xmm0
movsd %xmm0, (%r15,%rbx,8)
movb $-0x1, (%r12,%rbx)
incq %rbx
jmp 0x8315e
leaq 0x28(%rsp), %rdi
pushq $0xb
popq %rcx
leaq 0x120(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x100(%rsp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, (%rsp)
pushq $0x1
popq %rdx
movq 0xa0(%rsp), %rbx
movq %rbx, %rdi
movq 0xa8(%rsp), %rsi
movq 0x98(%rsp), %rcx
movq 0x90(%rsp), %r8
movq %r14, %r9
movsd 0x88(%rsp), %xmm0
movapd %xmm0, %xmm1
callq 0x88dcb
xorl %eax, %eax
movq 0xb8(%rsp), %rcx
cmpq %rax, %r13
je 0x83276
movsd (%r14,%rax,8), %xmm0
subsd (%rbp,%rax,8), %xmm0
movsd %xmm0, (%rcx,%rax,8)
incq %rax
jmp 0x8325b
movq %rbx, %rdi
callq 0x34ff7
movq %r14, %rdi
callq 0x34ff7
movq 0x98(%rsp), %rdi
callq 0x34ff7
movq 0x90(%rsp), %rdi
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34ff7