// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0xb0, %edi
leaq 0x900cb(%rip), %rsi     # 0xe68f7
movl $0x2, %edx
callq 0x52d70
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
addq $0x58, %rdx
movq -0x18(%rbp), %rcx
addq $0x5c, %rcx
leaq 0x8ec39(%rip), %rsi     # 0xe548e
movb $0x0, %al
callq 0x4070
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %r8
addq $0x8, %r8
leaq 0x8ec1c(%rip), %rsi     # 0xe548b
leaq -0x1c(%rbp), %rdx
leaq -0x20(%rbp), %rcx
movb $0x0, %al
callq 0x4070
movl -0x20(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
addq $0x10, %rdx
movq -0x18(%rbp), %rcx
addq $0x18, %rcx
movq -0x18(%rbp), %r8
addq $0x48, %r8
leaq 0x8ec0e(%rip), %rsi     # 0xe54c2
movb $0x0, %al
callq 0x4070
movq -0x18(%rbp), %rax
movl (%rax), %edi
movl $0x3, %ecx
movl $0x2, %edx
movl $0x4, %r8d
movl %ecx, %esi
movb $0x0, %al
callq 0x53e40
cmpl $0x0, %eax
jne 0x568fc
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x58(%rax), %esi
callq 0x54df0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x78(%rax)
jmp 0x56908
movq -0x18(%rbp), %rax
movq $0x0, 0x78(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x58(%rax), %eax
subl $0x1, %eax
movq -0x18(%rbp), %rcx
imull 0x58(%rcx), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %esi
callq 0x54d70
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x18(%rbp), %rax
movl (%rax), %edi
movl $0x3, %ecx
movl $0x2, %edx
movl $0x4, %r8d
movl %ecx, %esi
movb $0x0, %al
callq 0x53e40
cmpl $0x0, %eax
jne 0x569c4
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x58(%rax), %eax
subl $0x1, %eax
movq -0x18(%rbp), %rcx
imull 0x58(%rcx), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %esi
callq 0x54d70
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x58(%rax), %eax
subl $0x1, %eax
movq -0x18(%rbp), %rcx
imull 0x58(%rcx), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %esi
callq 0x54d70
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0xa8(%rax)
jmp 0x569e2
movq -0x18(%rbp), %rax
movq $0x0, 0xa0(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0xa8(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x58(%rax), %esi
subl $0x1, %esi
movq -0x18(%rbp), %rax
movl 0x5c(%rax), %edx
callq 0x54e70
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x5c(%rax), %edx
callq 0x55020
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x80(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop