// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/loadmodel.c
// Function: load_model_svm
void* load_model_svm(FILE* infile, Datasetptr d)
{
 /*!Last Changed 26.12.2005*/
 Svm_modelptr m;
 int svmtype, kerneltype;
 m = safemalloc(sizeof(Svm_model), "load_model_svm", 2);
 fscanf(infile, "%d %d", &(m->nr_class), &(m->l));
 fscanf(infile, "%d %d %d", &svmtype, &kerneltype, &(m->param.degree));
 m->param.kernel_type = kerneltype;
 m->param.svm_type = svmtype;
 fscanf(infile, "%lf %lf %lf", &(m->param.gamma), &(m->param.coef0), &(m->param.p));
 if (!in_list(m->param.svm_type, 3, ONE_CLASS, EPSILON_SVR, NU_SVR))
   m->nSV = load_array_int(infile, m->nr_class);
	else
		 m->nSV = NULL;
 m->rho = load_array(infile, ((m->nr_class - 1) * m->nr_class) / 2);
 if (!in_list(m->param.svm_type, 3, ONE_CLASS, EPSILON_SVR, NU_SVR))
  {
   m->probA = load_array(infile, ((m->nr_class - 1) * m->nr_class) / 2);
   m->probB = load_array(infile, ((m->nr_class - 1) * m->nr_class) / 2);
  }
 else
  {
   m->probA = NULL;
   m->probB = NULL;
  }
 m->sv_coef = load_array_two(infile, m->nr_class - 1, m->l);
 m->SV = load_array_support_vector(infile, d, m->l);
 m->prob.l = 0;
 return m;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
leaq 0x6b6cc(%rip), %rsi     # 0xa6d3f
movl $0xb0, %edi
movl $0x2, %edx
callq 0x390f5
movq %rax, %r15
leaq 0x58(%rax), %r13
leaq 0x5c(%rax), %rcx
leaq 0x6a252(%rip), %rsi     # 0xa58e6
xorl %r12d, %r12d
movq %r14, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4070
leaq 0x8(%r15), %r8
leaq 0x6a234(%rip), %rsi     # 0xa58e3
leaq 0x14(%rsp), %rbp
leaq 0x10(%rsp), %rbx
movq %r14, %rdi
movq %rbp, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4070
movl (%rbx), %eax
movl %eax, 0x4(%r15)
movl (%rbp), %eax
movl %eax, (%r15)
leaq 0x10(%r15), %rdx
leaq 0x18(%r15), %rcx
leaq 0x48(%r15), %r8
leaq 0x6a232(%rip), %rsi     # 0xa591a
movq %r14, %rdi
xorl %eax, %eax
callq 0x4070
movl (%r15), %edi
movl $0x3, %esi
movl $0x2, %edx
movl $0x3, %ecx
movl $0x4, %r8d
xorl %eax, %eax
callq 0x39a80
testl %eax, %eax
jne 0x3b724
movl (%r13), %esi
movq %r14, %rdi
callq 0x3a580
movq %rax, %r12
movq %r12, 0x78(%r15)
movl 0x58(%r15), %eax
leal -0x1(%rax), %ecx
imull %eax, %ecx
movl %ecx, %esi
shrl $0x1f, %esi
addl %ecx, %esi
sarl %esi
movq %r14, %rdi
callq 0x3a514
movq %rax, 0x70(%r15)
movl (%r15), %edi
movl $0x3, %esi
movl $0x2, %edx
movl $0x3, %ecx
movl $0x4, %r8d
xorl %eax, %eax
callq 0x39a80
testl %eax, %eax
je 0x3b777
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%r15)
jmp 0x3b7bb
movl 0x58(%r15), %eax
leal -0x1(%rax), %ecx
imull %eax, %ecx
movl %ecx, %esi
shrl $0x1f, %esi
addl %ecx, %esi
sarl %esi
movq %r14, %rdi
callq 0x3a514
movq %rax, 0xa0(%r15)
movl 0x58(%r15), %eax
leal -0x1(%rax), %ecx
imull %eax, %ecx
movl %ecx, %esi
shrl $0x1f, %esi
addl %ecx, %esi
sarl %esi
movq %r14, %rdi
callq 0x3a514
movq %rax, 0xa8(%r15)
movl 0x58(%r15), %esi
movl 0x5c(%r15), %edx
decl %esi
movq %r14, %rdi
callq 0x3a5ec
movq %rax, 0x68(%r15)
movl 0x5c(%r15), %edx
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0x3a74d
movq %rax, 0x60(%r15)
movl $0x0, 0x80(%r15)
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq