// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/univariaterule.c
// Function: growrule
Decisionruleptr growrule(Instanceptr* growset, int positive, Ripper_parameterptr param)
{
 /*!Last Changed 21.01.2004*/
 /*!Last Changed 29.12.2003*/
 /*!Last Changed 02.12.2003*/
 /*!Last Changed 10.05.2003*/
 Decisionruleptr result;
 Decisionconditionptr newcondition = NULL;
 Instanceptr obey, notobey = NULL;
 int n, pnew, nnew;
 double bestgain;
 result = empty_rule(positive);
 obey = (*growset);
 if (rule_cover_negative(obey, *result))
   n = 1;
 else
   n = 0;
 while (n > 0)
  {
   if (get_parameter_o("usediscrete") == ON)
     if (get_parameter_i("smallsetsize") == 0)
       newcondition = find_best_discrete_condition_omnivariate(obey, positive);
     else
       newcondition = find_best_discrete_condition(obey, get_parameter_i("smallsetsize"), positive, &bestgain);
   else
     newcondition = find_best_condition(obey, positive, param);
   if (newcondition && newcondition->featureindex != -1)
    {
     count_examples_for_condition(newcondition, &pnew, &nnew, positive, obey);
     if (result->decisioncount == 0 || nnew != n)
       n = nnew;
     else
      {
       free_condition(*newcondition);
       safe_free(newcondition);
       break;
      }
     send_exceptions(newcondition, &obey, &notobey);
     add_condition(result, newcondition);
    }
   else
    {
     if (newcondition && newcondition->featureindex == -1)
      {
       free_condition(*newcondition);
       safe_free(newcondition);
      }
     break;
    }
  }
 if (notobey)
  {
   merge_instancelist(&notobey, obey);
   (*growset) = notobey;
  }
 else
   (*growset) = obey;
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
movq $0x0, 0x80(%rsp)
movl %esi, %edi
callq 0x7bfd8
movq %rax, %r14
movq %rbx, 0x90(%rsp)
movq (%rbx), %rdi
movq %rdi, 0x78(%rsp)
movq 0x30(%rax), %rax
movq %rax, 0x30(%rsp)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x7c604
testl %eax, %eax
je 0x9f4ec
movl $0x1, %r12d
leaq 0x64b1(%rip), %rdi      # 0xa58ae
callq 0x54bec
cmpl $0x1, %eax
jne 0x9f43d
leaq 0x6466(%rip), %rbx      # 0xa5874
movq %rbx, %rdi
callq 0x54920
movq 0x78(%rsp), %r13
testl %eax, %eax
je 0x9f451
movq %rbx, %rdi
callq 0x54920
movq %r13, %rdi
movl %eax, %esi
movl %ebp, %edx
leaq 0xa0(%rsp), %rcx
callq 0x3246f
jmp 0x9f45b
movq 0x78(%rsp), %r13
movq %r13, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x9ecc1
jmp 0x9f45b
movq %r13, %rdi
movl %ebp, %esi
callq 0x32340
movq %rax, %rbx
testq %rax, %rax
je 0x9f4ec
cmpl $-0x1, (%rbx)
je 0x9f4d1
movq %rbx, %rdi
leaq 0x9c(%rsp), %rsi
leaq 0x8c(%rsp), %rdx
movl %ebp, %ecx
movq %r13, %r8
callq 0x7b141
cmpl $0x0, 0x28(%r14)
setne %al
movl 0x8c(%rsp), %r13d
cmpl %r12d, %r13d
sete %cl
testb %cl, %al
jne 0x9f4d1
movq %rbx, %rdi
leaq 0x78(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x9f29e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7c040
movl %r13d, %r12d
testl %r13d, %r13d
jg 0x9f3f6
jmp 0x9f4ec
movl $0xe, %ecx
movq %rsp, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x7c1f4
movq %rbx, %rdi
callq 0x3a180
cmpq $0x0, 0x80(%rsp)
je 0x9f50e
movq 0x78(%rsp), %rsi
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
callq 0x30648
jmp 0x9f513
leaq 0x78(%rsp), %rbx
movq (%rbx), %rax
movq 0x90(%rsp), %rcx
movq %rax, (%rcx)
movq %r14, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq