// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/decisionforest.c
// Function: create_randomforestchildren
int create_randomforestchildren(Decisionnodeptr node, Randomforest_parameterptr p)
{
 int count, i, t, fno;
 int* array;
 double bestgain = +INT_MAX;
 node->conditiontype = UNIVARIATE_CONDITION;
 if (!(setup_node_properties(node)))
  {
   make_leaf_node(node);
   return 1;
  }
 i = 0;
 t = 0;
 array = random_array(current_dataset->featurecount);
 while (i < p->featuresize)
  {
   fno = array[t];
   if (current_dataset->features[fno].type != CLASSDEF)
    {
     if (find_best_split_for_feature_i(node->instances, fno, &(node->split), &bestgain))
       node->featureno = fno;
     i++;
    }
   t++;
  }
 safe_free(array);
 if (bestgain == ISELL)
   node->featureno = -1;
 if (!(make_children(node)))
   return 1;
 switch (current_dataset->features[node->featureno].type)
  {
   case INTEGER:
   case REAL   :create_randomforestchildren(node->left, p);
                create_randomforestchildren(node->right, p);
                break;
   case STRING :count = current_dataset->features[node->featureno].valuecount;
                for (i = 0; i < count; i++)
                  create_randomforestchildren(&(node->string[i]), p);
                break;
  }
 return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movsd 0xb97d8(%rip), %xmm0    # 0xe2010
movsd %xmm0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0x98(%rax)
movq -0x10(%rbp), %rdi
callq 0x29290
cmpl $0x0, %eax
jne 0x2886e
movq -0x10(%rbp), %rdi
callq 0x28a30
movl $0x1, -0x4(%rbp)
jmp 0x28a22
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
leaq 0xdcfbd(%rip), %rax     # 0x105840
movq (%rax), %rax
movl 0x1bc(%rax), %edi
callq 0x54600
movq %rax, -0x30(%rbp)
movl -0x20(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x28911
movq -0x30(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x28(%rbp)
leaq 0xdcf8a(%rip), %rax     # 0x105840
movq (%rax), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x28(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
cmpl $0x3, (%rax)
je 0x28906
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movl -0x28(%rbp), %esi
movq -0x10(%rbp), %rdx
addq $0x28, %rdx
leaq -0x38(%rbp), %rcx
callq 0xdc9a0
cmpl $0x0, %eax
je 0x288fd
movl -0x28(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x28895
movq -0x30(%rbp), %rdi
callq 0x52e80
movsd -0x38(%rbp), %xmm0
movsd 0xba071(%rip), %xmm1    # 0xe2998
ucomisd %xmm1, %xmm0
jne 0x2893a
jp 0x2893a
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x30(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rdi
callq 0xdcde0
cmpl $0x0, %eax
jne 0x28954
movl $0x1, -0x4(%rbp)
jmp 0x28a22
leaq 0xdcee5(%rip), %rax     # 0x105840
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x30(%rcx), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
movl 0x30f08(%rax,%rcx), %eax
movl %eax, -0x3c(%rbp)
testl %eax, %eax
je 0x28995
jmp 0x2897d
movl -0x3c(%rbp), %eax
subl $0x1, %eax
je 0x289b8
jmp 0x28987
movl -0x3c(%rbp), %eax
subl $0x2, %eax
jne 0x28a1b
jmp 0x28995
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x28820
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x28820
jmp 0x28a1b
leaq 0xdce81(%rip), %rax     # 0x105840
movq (%rax), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movq -0x10(%rbp), %rcx
movslq 0x30(%rcx), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movl 0x18(%rax), %eax
movl %eax, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x28a19
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movslq -0x20(%rbp), %rax
imulq $0x160, %rax, %rax      # imm = 0x160
addq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x28820
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x289e7
jmp 0x28a1b
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)