// File: /workspace/github_c_makefile_star2_O3/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 0x6d6b0(%rip), %rsi     # 0xa9daf
movl $0xb0, %edi
movl $0x2, %edx
callq 0x3a0e1
movq %rax, %r15
leaq 0x58(%rax), %r13
leaq 0x5c(%rax), %rcx
leaq 0x6c23e(%rip), %rsi     # 0xa895e
xorl %r12d, %r12d
movq %r14, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4070
leaq 0x8(%r15), %r8
leaq 0x6c220(%rip), %rsi     # 0xa895b
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 0x6c21e(%rip), %rsi     # 0xa8992
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 0x3aa8c
testl %eax, %eax
jne 0x3c7b0
movl (%r13), %esi
movq %r14, %rdi
callq 0x3b610
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 0x3b5a4
movq %rax, 0x70(%r15)
movl (%r15), %edi
movl $0x3, %esi
movl $0x2, %edx
movl $0x3, %ecx
movl $0x4, %r8d
xorl %eax, %eax
callq 0x3aa8c
testl %eax, %eax
je 0x3c805
movq $0x0, 0xa0(%r15)
xorl %eax, %eax
jmp 0x3c842
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 0x3b5a4
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 0x3b5a4
movq %rax, 0xa8(%r15)
movl 0x58(%r15), %esi
movl 0x5c(%r15), %edx
decl %esi
movq %r14, %rdi
callq 0x3b67c
movq %rax, 0x68(%r15)
movl 0x5c(%r15), %edx
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0x3b7dd
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