// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
pushq %rbx
subq $0xe8, %rsp
leaq 0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq 0x10(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl (%rcx), %ecx
movl %ecx, -0x24(%rbp)
movsd 0x30(%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x24(%rbp), %eax
shll %eax
movslq %eax, %rdi
shlq $0x3, %rdi
leaq 0x27681(%rip), %rsi     # 0xee047
movl $0x5, %edx
callq 0x52d70
movq %rax, -0x38(%rbp)
movl -0x24(%rbp), %eax
shll %eax
movslq %eax, %rdi
shlq $0x3, %rdi
leaq 0x27660(%rip), %rsi     # 0xee047
movl $0x6, %edx
callq 0x52d70
movq %rax, -0x40(%rbp)
movl -0x24(%rbp), %eax
shll %eax
movslq %eax, %rdi
shlq $0x0, %rdi
leaq 0x2763f(%rip), %rsi     # 0xee047
movl $0x7, %edx
callq 0x52d70
movq %rax, -0x50(%rbp)
movl $0x88, %edi
leaq 0x27625(%rip), %rsi     # 0xee047
movl $0x8, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x20(%rbp)
movsd -0x30(%rbp), %xmm0
mulsd 0x40(%rax), %xmm0
cvtsi2sdl -0x24(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x1c24e(%rip), %xmm1    # 0xe2ca0
divsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0xc6b77
movq -0x60(%rbp), %rax
movsd -0x48(%rbp), %xmm3
movsd -0x30(%rbp), %xmm2
movaps %xmm2, %xmm4
movaps %xmm3, %xmm0
cmpunordsd %xmm0, %xmm0
movaps %xmm0, %xmm1
pand %xmm4, %xmm1
minsd %xmm3, %xmm2
pandn %xmm2, %xmm0
por %xmm1, %xmm0
movq -0x38(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movsd %xmm0, (%rcx,%rdx,8)
movsd -0x48(%rbp), %xmm3
movsd -0x30(%rbp), %xmm2
movaps %xmm2, %xmm4
movaps %xmm3, %xmm0
cmpunordsd %xmm0, %xmm0
movaps %xmm0, %xmm1
pand %xmm4, %xmm1
minsd %xmm3, %xmm2
pandn %xmm2, %xmm0
por %xmm1, %xmm0
movq -0x38(%rbp), %rcx
movl -0x28(%rbp), %edx
addl -0x24(%rbp), %edx
movslq %edx, %rdx
movsd %xmm0, (%rcx,%rdx,8)
movq -0x38(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm1
movsd -0x48(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
movq 0x8(%rax), %rcx
movslq -0x28(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
movq -0x40(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movsd %xmm0, (%rcx,%rdx,8)
movq -0x50(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movb $0x1, (%rcx,%rdx)
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x40(%rbp), %rax
movl -0x28(%rbp), %ecx
addl -0x24(%rbp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x50(%rbp), %rax
movl -0x28(%rbp), %ecx
addl -0x24(%rbp), %ecx
movslq %ecx, %rcx
movb $-0x1, (%rax,%rcx)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xc6a62
movq -0x60(%rbp), %r10
movq -0x58(%rbp), %r11
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
shll %esi
movq -0x40(%rbp), %rcx
movq -0x50(%rbp), %r8
movq -0x38(%rbp), %r9
movsd -0x30(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
movq -0x18(%rbp), %rdx
movq 0x50(%r11), %rbx
movq %rsp, %rax
movq %rax, -0x68(%rbp)
movq %rbx, 0x78(%rax)
movups 0x40(%r11), %xmm2
movups %xmm2, 0x68(%rax)
movups (%r11), %xmm2
movups 0x10(%r11), %xmm3
movups 0x20(%r11), %xmm4
movups 0x30(%r11), %xmm5
movups %xmm5, 0x58(%rax)
movups %xmm4, 0x48(%rax)
movups %xmm3, 0x38(%rax)
movups %xmm2, 0x28(%rax)
movups (%r10), %xmm2
movups 0x10(%r10), %xmm3
movups %xmm3, 0x18(%rax)
movups %xmm2, 0x8(%rax)
movq %rdx, (%rax)
movl $0x1, %edx
callq 0xd0590
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0xc6c41
movq -0x38(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x38(%rbp), %rax
movl -0x28(%rbp), %ecx
addl -0x24(%rbp), %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xc6c02
movq -0x20(%rbp), %rdi
callq 0x52e80
movq -0x38(%rbp), %rdi
callq 0x52e80
movq -0x40(%rbp), %rdi
callq 0x52e80
movq -0x50(%rbp), %rdi
callq 0x52e80
addq $0xe8, %rsp
popq %rbx
popq %rbp
retq
nop