// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/classification.c
// Function: test_c45rules
Prediction test_c45rules(Instanceptr data, void* model, void* parameters, double* posterior)
{
 int covered = 0, bestclass;
 double besterror = 1.5, error; 
 Ruleset* r;
 Prediction predicted;
 Decisionruleptr tmp, bestrule = NULL;
 r = (Ruleset*) model;
 tmp = r->start;
 while (tmp)
  {
   if (rule_cover_instance(data, *tmp))
    {
     covered = 1;
     error = laplace_estimate_of_rule(*tmp);
     if (error < besterror)
      {
       bestrule = tmp;
       besterror = error;
       bestclass = tmp->classno;
      }
     tmp = get_next_class_rule(tmp);
     if (tmp)
       continue;
     else
       break;
    }
   tmp = tmp->next;
  }
 if (!covered)
  {
			if (get_parameter_o("laplaceestimate") == ON)
     normalize_array_laplace(r->counts, posterior, current_dataset->classno);
			else
     normalize_array(r->counts, posterior, current_dataset->classno);
   predicted.classno = r->defaultclass;
   return predicted;
  }
 else
  {
			if (get_parameter_o("laplaceestimate") == ON)
     normalize_array_laplace(bestrule->counts, posterior, current_dataset->classno);
			else
     normalize_array(bestrule->counts, posterior, current_dataset->classno);
   predicted.classno = bestclass;
   return predicted;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x60(%rbp)
movq %rdi, -0x58(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movsd 0xd33b6(%rip), %xmm0    # 0xe2a78
movsd %xmm0, -0x30(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0xf7ad
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rcx
movq 0x30(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x30(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups 0x20(%rcx), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xacfd0
cmpl $0x0, %eax
je 0xf79c
movl $0x1, -0x24(%rbp)
movq -0x48(%rbp), %rcx
movq 0x30(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x30(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups 0x20(%rcx), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xaee50
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xf781
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x48(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x48(%rbp), %rdi
callq 0xaeeb0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0xf79a
jmp 0xf6e2
jmp 0xf7ad
movq -0x48(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0xf6e2
cmpl $0x0, -0x24(%rbp)
jne 0xf812
leaq 0xd3399(%rip), %rdi     # 0xe2b53
callq 0x79440
cmpl $0x1, %eax
jne 0xf7e4
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
leaq 0xf6069(%rip), %rax     # 0x105840
movq (%rax), %rax
movl 0x10(%rax), %edx
callq 0x50ad0
jmp 0xf802
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x20(%rbp), %rsi
leaq 0xf6049(%rip), %rax     # 0x105840
movq (%rax), %rax
movl 0x10(%rax), %edx
callq 0x50a20
movq -0x60(%rbp), %rax
movq -0x40(%rbp), %rcx
movl 0x14(%rcx), %ecx
movl %ecx, 0x8(%rax)
jmp 0xf86b
leaq 0xd333a(%rip), %rdi     # 0xe2b53
callq 0x79440
cmpl $0x1, %eax
jne 0xf843
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rsi
leaq 0xf600a(%rip), %rax     # 0x105840
movq (%rax), %rax
movl 0x10(%rax), %edx
callq 0x50ad0
jmp 0xf861
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rsi
leaq 0xf5fea(%rip), %rax     # 0x105840
movq (%rax), %rax
movl 0x10(%rax), %edx
callq 0x50a20
movq -0x60(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, 0x8(%rax)
movq -0x58(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)