// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/ktree.c
// Function: create_ktreechildren
int create_ktreechildren(Decisionnodeptr node, C45_parameterptr p)
{
 int i, bestdepth;
 double gain, bestgain = +INT_MAX;
 Korderingsplit ksplit, bestksplit;
 node->conditiontype = UNIVARIATE_CONDITION;
 if (!(can_be_divided(node, p)))
   return 1;
 node->featureno = DISCRETEMIX;
 node->ksplit.featurecount = get_parameter_i("smallsetsize");
 if (node->ksplit.featurecount == 0)
  {
   for (i = 1; i <= get_parameter_i("hybridspace"); i++)
    {
     ksplit = find_best_discrete_split(node, i, &gain);
     if (gain < bestgain)
      {
       bestgain = gain;
       bestdepth = i;
       bestksplit = ksplit;
      }
    }
   node->ksplit = bestksplit;
  }
 else
   node->ksplit = find_best_discrete_split(node, node->ksplit.featurecount, &gain);
 if (node->ksplit.featurecount == 0)
  {
   safe_free(node->ksplit.sortorder);
   safe_free(node->ksplit.featurelist);
   safe_free(node->ksplit.discretesplit);
   node->featureno = LEAF_NODE;
   return 1;
  }
 if (!(make_children_discrete(node)))
   return 1;
 create_ktreechildren(node->left, p);
 create_ktreechildren(node->right, p);
 return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movsd 0x992b5(%rip), %xmm0    # 0xe2010
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0x98(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x29340
cmpl $0x0, %eax
jne 0x48d8c
movl $0x1, -0x4(%rbp)
jmp 0x48fa3
movq -0x10(%rbp), %rax
movl $0xfffffffb, 0x30(%rax) # imm = 0xFFFFFFFB
leaq 0x997db(%rip), %rdi     # 0xe2579
callq 0x78f10
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x140(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x140(%rax)
jne 0x48eab
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0xb4(%rbp)
leaq 0x9c9f9(%rip), %rdi     # 0xe57d0
callq 0x78f10
movl %eax, %ecx
movl -0xb4(%rbp), %eax
cmpl %ecx, %eax
jg 0x48e79
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
leaq -0x90(%rbp), %rdi
leaq -0x28(%rbp), %rcx
callq 0x486c0
movq -0x90(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x38(%rbp)
movsd -0x28(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x48e69
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x48e6b
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x48dc7
movq -0x10(%rbp), %rax
movq -0x70(%rbp), %rcx
movq %rcx, 0x140(%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x148(%rax)
movq -0x60(%rbp), %rcx
movq %rcx, 0x150(%rax)
movq -0x58(%rbp), %rcx
movq %rcx, 0x158(%rax)
jmp 0x48f13
movq -0x10(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x140(%rax), %edx
leaq -0xb0(%rbp), %rdi
leaq -0x28(%rbp), %rcx
callq 0x486c0
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rcx
movq %rcx, 0x140(%rax)
movq -0xa8(%rbp), %rcx
movq %rcx, 0x148(%rax)
movq -0xa0(%rbp), %rcx
movq %rcx, 0x150(%rax)
movq -0x98(%rbp), %rcx
movq %rcx, 0x158(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x140(%rax)
jne 0x48f64
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rdi
callq 0x52e80
movq -0x10(%rbp), %rax
movq 0x148(%rax), %rdi
callq 0x52e80
movq -0x10(%rbp), %rax
movq 0x150(%rax), %rdi
callq 0x52e80
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x30(%rax) # imm = 0xFFFFFFFF
movl $0x1, -0x4(%rbp)
jmp 0x48fa3
movq -0x10(%rbp), %rdi
callq 0x48a40
cmpl $0x0, %eax
jne 0x48f7b
movl $0x1, -0x4(%rbp)
jmp 0x48fa3
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x48d40
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x48d40
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nop