// File: /workspace/github_c_makefile_star2_O2/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 0x62b13(%rip), %rsi     # 0x99cd7
pushq $0x2
popq %rdx
movl $0xb0, %edi
callq 0x34f59
movq %rax, %r15
leaq 0x58(%rax), %r13
leaq 0x5c(%rax), %rcx
leaq 0x616fb(%rip), %rsi     # 0x988de
xorl %r12d, %r12d
movq %r14, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4070
leaq 0x8(%r15), %r8
leaq 0x616dd(%rip), %rsi     # 0x988db
leaq 0x14(%rsp), %rbx
leaq 0x10(%rsp), %rbp
movq %r14, %rdi
movq %rbx, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x4070
movl (%rbp), %eax
movl %eax, 0x4(%r15)
movl (%rbx), %eax
pushq $0x2
popq %rbx
movl %eax, (%r15)
leaq 0x10(%r15), %rdx
leaq 0x18(%r15), %rcx
leaq 0x48(%r15), %r8
leaq 0x616d8(%rip), %rsi     # 0x98912
movq %r14, %rdi
xorl %eax, %eax
callq 0x4070
movl (%r15), %edi
pushq $0x3
popq %rcx
pushq $0x4
popq %r8
movl %ecx, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x35812
testl %eax, %eax
jne 0x3726c
movl (%r13), %esi
movq %r14, %rdi
callq 0x361c3
movq %rax, %r12
movq %r12, 0x78(%r15)
movl 0x58(%r15), %ecx
leal -0x1(%rcx), %eax
imull %ecx, %eax
cltd
idivl %ebx
movq %r14, %rdi
movl %eax, %esi
callq 0x3615a
movq %rax, 0x70(%r15)
movl (%r15), %edi
pushq $0x3
popq %rcx
pushq $0x4
popq %r8
movl %ecx, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x35812
testl %eax, %eax
je 0x372b0
andq $0x0, 0xa0(%r15)
xorl %eax, %eax
jmp 0x372e5
movl 0x58(%r15), %ecx
leal -0x1(%rcx), %eax
imull %ecx, %eax
cltd
idivl %ebx
movq %r14, %rdi
movl %eax, %esi
callq 0x3615a
movq %rax, 0xa0(%r15)
movl 0x58(%r15), %ecx
leal -0x1(%rcx), %eax
imull %ecx, %eax
cltd
idivl %ebx
movq %r14, %rdi
movl %eax, %esi
callq 0x3615a
movq %rax, 0xa8(%r15)
movl 0x58(%r15), %esi
movl 0x5c(%r15), %edx
decl %esi
movq %r14, %rdi
callq 0x3622c
movq %rax, 0x68(%r15)
movl 0x5c(%r15), %edx
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0x3636a
movq %rax, 0x60(%r15)
andl $0x0, 0x80(%r15)
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq