// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/multivariaterule.c
// Function: learn_multivariate_rules_for_positive_class
Instanceptr learn_multivariate_rules_for_positive_class(Instanceptr* instances, Ruleset* ruleset, int posclass, Instanceptr cvdata, Ripper_parameterptr param)
{
 Instanceptr grow, prune, removed = NULL;
 Decisionruleptr newrule;
 int j;
 while (class_exists_in_list(*instances, posclass))
  {
   divide_instancelist(instances, &prune, &grow, 3);    
   newrule = growrule_multivariate(&grow, posclass, param);
   if (newrule->start)
     prunerule(newrule, prune, posclass, 2);
   update_counts(newrule, grow, 1);
   update_counts(newrule, prune, 0);
   if (!(newrule->start) || (error_rate_of_rule(*newrule) >= 0.5))
    {
     free_rule(*newrule);
     safe_free(newrule);
     *instances = restore_instancelist(*instances, grow);
     merge_instancelist(instances, prune);
     break;
    }
   add_rule(ruleset, newrule);
   *instances = restore_instancelist(*instances, grow);
   merge_instancelist(instances, prune);     
   remove_covered(instances, &removed, newrule);
  }
 for (j = 0; j < param->optimizecount; j++)
  {
   merge_instancelist(instances, removed);
   removed = NULL;
   optimize_ruleset_multivariate(ruleset, posclass, instances, cvdata, param);
   simplify_ruleset_multivariate(ruleset, posclass, cvdata);
   remove_covered_by_ruleset(instances, &removed, *ruleset, 0);
  }
 return removed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl -0x14(%rbp), %esi
callq 0x182a0
cmpl $0x0, %eax
je 0x6dd72
movq -0x8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x30(%rbp), %rdx
movl $0x3, %ecx
callq 0x45f60
movl -0x14(%rbp), %esi
movq -0x28(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0x6ce00
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x6dc68
movq -0x48(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x14(%rbp), %edx
movl $0x2, %ecx
callq 0xdb170
movq -0x48(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl $0x1, %edx
callq 0xaea90
movq -0x48(%rbp), %rdi
movq -0x38(%rbp), %rsi
xorl %edx, %edx
callq 0xaea90
movq -0x48(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x6dccc
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 0xaedc0
movsd 0x74cf2(%rip), %xmm1    # 0xe29b8
ucomisd %xmm1, %xmm0
jb 0x6dd28
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 0xadd10
movq -0x48(%rbp), %rdi
callq 0x52e80
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x464e0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x44f40
jmp 0x6dd72
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0xaea30
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x464e0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x44f40
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rdx
leaq -0x40(%rbp), %rsi
callq 0xdb5b0
jmp 0x6dc06
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x6ddfe
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x44f40
movq $0x0, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x8(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x6c7b0
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
callq 0x6d1f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
xorl %eax, %eax
movq 0x20(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0x40(%rbp), %rsi
xorl %edx, %edx
callq 0xdb410
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x6dd79
movq -0x40(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)