// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/svmtree.c
// Function: find_best_svm_split_for_partition
Svm_split find_best_svm_split_for_partition(Instanceptr data, Partition p)
{
 /*!Last Changed 18.02.2008*/
 int i, j, size;
 Svm_parameter param;
 Svm_problem prob;
 Svm_modelptr model;
 Svm_split result;
 prepare_svm_problem(&prob, TWO_CLASS, data, p);
 prepare_svm_parameters(&param, TWO_CLASS);
 model = svm_train(prob, param, BOOLEAN_FALSE);
 result.l = model->l;
 result.nSV = model->nSV[0] + model->nSV[1];
 result.param = param;
 result.rho = model->rho[0];
 result.sv_coef = safemalloc(model->l * sizeof(double), "find_best_svm_split_for_partition", 13);
 memcpy(result.sv_coef, model->sv_coef[0], model->l * sizeof(double));
 result.SV = safemalloc(model->l * sizeof(Svm_nodeptr), "find_best_svm_split_for_partition", 15);
 result.weights = safecalloc(current_dataset->multifeaturecount - 1, sizeof(double), "find_best_svm_split_for_partition", 16); 
 for (i = 0; i < model->l; i++)
  {
   size = support_vector_length(model->SV[i]);
   result.SV[i] = safemalloc(sizeof(Svm_node) * size, "find_best_svm_split_for_partition", 19);
   for (j = 0; j < size - 1; j++)
    {
     result.SV[i][j].index = model->SV[i][j].index;
     result.SV[i][j].value = model->SV[i][j].value;
     result.weights[result.SV[i][j].index] += result.sv_coef[i] * result.SV[i][j].value;
    }
   result.SV[i][j].index = model->SV[i][j].index;
   result.SV[i][j].value = model->SV[i][j].value;
  }
 free_svm_model(model);
 free_svm_problem(prob);
 return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0xa0(%rbp)
movq %rdi, -0xb0(%rbp)
leaq 0x10(%rbp), %rax
movq %rsi, -0x8(%rbp)
movq -0x8(%rbp), %rdx
leaq -0x90(%rbp), %rdi
movl $0x5, %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xcaf10
leaq -0x70(%rbp), %rdi
movl $0x5, %esi
callq 0xcb0d0
xorl %eax, %eax
movq -0x20(%rbp), %rcx
movq %rsp, %rax
movq %rax, -0xa8(%rbp)
movq %rcx, 0x70(%rax)
movups -0x30(%rbp), %xmm0
movups %xmm0, 0x60(%rax)
movups -0x70(%rbp), %xmm0
movups -0x60(%rbp), %xmm1
movups -0x50(%rbp), %xmm2
movups -0x40(%rbp), %xmm3
movups %xmm3, 0x50(%rax)
movups %xmm2, 0x40(%rax)
movups %xmm1, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups -0x90(%rbp), %xmm0
movups -0x80(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
xorl %edi, %edi
callq 0xc7240
movq -0xa0(%rbp), %rdi
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movl 0x5c(%rax), %eax
movl %eax, 0x58(%rdi)
movq -0x98(%rbp), %rax
movq 0x78(%rax), %rax
movl (%rax), %eax
movq -0x98(%rbp), %rcx
movq 0x78(%rcx), %rcx
addl 0x4(%rcx), %eax
movl %eax, 0x80(%rdi)
leaq -0x70(%rbp), %rsi
movl $0x58, %edx
callq 0x42b0
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rax
movq 0x70(%rax), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x70(%rdi)
movq -0x98(%rbp), %rax
movslq 0x5c(%rax), %rdi
shlq $0x3, %rdi
leaq 0x1dac9(%rip), %rsi     # 0xee296
movl $0xd, %edx
callq 0x52d70
movq -0xa0(%rbp), %rdi
movq %rax, 0x68(%rdi)
movq 0x68(%rdi), %rdi
movq -0x98(%rbp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rsi
movq -0x98(%rbp), %rax
movslq 0x5c(%rax), %rdx
shlq $0x3, %rdx
callq 0x42b0
movq -0x98(%rbp), %rax
movslq 0x5c(%rax), %rdi
shlq $0x3, %rdi
leaq 0x1da78(%rip), %rsi     # 0xee296
movl $0xf, %edx
callq 0x52d70
movq -0xa0(%rbp), %rdi
movq %rax, 0x60(%rdi)
leaq 0x35006(%rip), %rax     # 0x105840
movq (%rax), %rax
movl 0x1c0(%rax), %eax
subl $0x1, %eax
movslq %eax, %rdi
movl $0x8, %esi
leaq 0x1da41(%rip), %rdx     # 0xee296
movl $0x10, %ecx
callq 0x52f40
movq -0xa0(%rbp), %rdi
movq %rax, 0x78(%rdi)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x98(%rbp), %rcx
cmpl 0x5c(%rcx), %eax
jge 0xd0a59
movq -0x98(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xd0660
movl %eax, -0x14(%rbp)
movslq -0x14(%rbp), %rdi
shlq $0x4, %rdi
leaq 0x1d9e8(%rip), %rsi     # 0xee296
movl $0x13, %edx
callq 0x52d70
movq %rax, %rdx
movq -0xa0(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0xc(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xd09cc
movq -0xa0(%rbp), %rcx
movq -0x98(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0xc(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movslq -0x10(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl (%rax), %edx
movq 0x60(%rcx), %rax
movslq -0xc(%rbp), %rsi
movq (%rax,%rsi,8), %rax
movslq -0x10(%rbp), %rsi
shlq $0x4, %rsi
addq %rsi, %rax
movl %edx, (%rax)
movq -0x98(%rbp), %rax
movq 0x60(%rax), %rax
movslq -0xc(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movslq -0x10(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movsd 0x8(%rax), %xmm0
movq 0x60(%rcx), %rax
movslq -0xc(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movslq -0x10(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movsd %xmm0, 0x8(%rax)
movq 0x68(%rcx), %rax
movslq -0xc(%rbp), %rdx
movsd (%rax,%rdx,8), %xmm0
movq 0x60(%rcx), %rax
movslq -0xc(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movslq -0x10(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movsd 0x8(%rax), %xmm2
movq 0x78(%rcx), %rax
movq 0x60(%rcx), %rcx
movslq -0xc(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x10(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movslq (%rcx), %rcx
movsd (%rax,%rcx,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xd08d5
movq -0xa0(%rbp), %rax
movq -0x98(%rbp), %rcx
movq 0x60(%rcx), %rcx
movslq -0xc(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x10(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movl (%rcx), %edx
movq 0x60(%rax), %rcx
movslq -0xc(%rbp), %rsi
movq (%rcx,%rsi,8), %rcx
movslq -0x10(%rbp), %rsi
shlq $0x4, %rsi
addq %rsi, %rcx
movl %edx, (%rcx)
movq -0x98(%rbp), %rcx
movq 0x60(%rcx), %rcx
movslq -0xc(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x10(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movsd 0x8(%rcx), %xmm0
movq 0x60(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xd0871
movq -0x98(%rbp), %rdi
callq 0xc5e40
leaq -0x90(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0xc5ef0
movq -0xb0(%rbp), %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw %cs:(%rax,%rax)