// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movabsq $0x41dfffffffc00000, %rax # imm = 0x41DFFFFFFFC00000
movq %rax, 0x10(%rsp)
movl $0x0, 0x98(%rdi)
callq 0x1cfd0
testl %eax, %eax
je 0x1ca5a
leaq 0xb8f02(%rip), %rax     # 0xd5870
movq (%rax), %rax
movl 0x1bc(%rax), %edi
callq 0x3afe4
movq %rax, 0x8(%rsp)
movl 0x4(%rbx), %eax
testl %eax, %eax
jle 0x1c9e7
leaq 0x28(%r14), %r12
leaq 0xb8edd(%rip), %rcx     # 0xd5870
movq (%rcx), %rcx
xorl %r15d, %r15d
movq 0x8(%rsp), %r13
movslq (%r13), %rbp
imulq $0x340, %rbp, %rdx      # imm = 0x340
cmpl $0x3, 0x30f08(%rcx,%rdx)
je 0x1c9de
movq 0x20(%r14), %rdi
movl %ebp, %esi
movq %r12, %rdx
leaq 0x10(%rsp), %rcx
callq 0xa0857
testl %eax, %eax
je 0x1c9ce
movl %ebp, 0x30(%r14)
leaq 0xb8e9b(%rip), %rax     # 0xd5870
movq (%rax), %rcx
incl %r15d
movl 0x4(%rbx), %eax
addq $0x4, %r13
cmpl %eax, %r15d
jl 0x1c99e
movq 0x8(%rsp), %rdi
callq 0x3a180
movsd 0x10(%rsp), %xmm0
ucomisd 0x892f1(%rip), %xmm0    # 0xa5cf0
jne 0x1ca0b
jp 0x1ca0b
movl $0xffffffff, 0x30(%r14) # imm = 0xFFFFFFFF
movq %r14, %rdi
callq 0xa0b60
testl %eax, %eax
je 0x1ca62
leaq 0xb8e52(%rip), %rax     # 0xd5870
movq (%rax), %rax
movslq 0x30(%r14), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
movl 0x30f08(%rax,%rcx), %edx
cmpl $0x2, %edx
je 0x1ca41
cmpl $0x1, %edx
je 0x1ca76
testl %edx, %edx
jne 0x1ca62
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x1c92d
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x1c92d
jmp 0x1ca62
movq %r14, %rdi
callq 0x1cab0
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq %rcx, %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq 0x18(%rax), %rax
testq %rax, %rax
jle 0x1ca62
imulq $0x160, %rax, %r15      # imm = 0x160
xorl %r12d, %r12d
movq 0x10(%r14), %rdi
addq %r12, %rdi
movq %rbx, %rsi
callq 0x1c92d
addq $0x160, %r12            # imm = 0x160
cmpq %r12, %r15
jne 0x1ca92
jmp 0x1ca62
nop