// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/part.c
// Function: create_partial_tree
void create_partial_tree(Decisionnodeptr rootnode, Instanceptr validation)
{
 int i;
 Node_expandedptr header = NULL, nextexpanded;
 Decisionnodeptr expanded_node;
 if (!add_node_to_expanded_list(rootnode, &header, -2, BOOLEAN_TRUE))
  {
   rootnode->expanded = BOOLEAN_TRUE;
   return;  
  }
 while (header)
  {
   nextexpanded = header->next;
   expanded_node = header->node;
   safe_free(header);
   header = nextexpanded;   
   expanded_node->expanded = BOOLEAN_TRUE;
   expanded_node->featureno = find_best_feature(expanded_node->instances, &(expanded_node->split));
   if (make_children(expanded_node))
    {
     if (current_dataset->features[expanded_node->featureno].type == STRING)
      {
       for (i = 0; i < current_dataset->features[expanded_node->featureno].valuecount; i++)
         if (!add_node_to_expanded_list(&(expanded_node->string[i]), &header, -2, BOOLEAN_TRUE))
          {
           expanded_node->string[i].expanded = BOOLEAN_TRUE;
           if (!subtree_replacement(rootnode, expanded_node, validation))
            {
             empty_heap(header);
             return;            
            }
          }
      }
     else
      {
       if (!add_node_to_expanded_list(expanded_node->left, &header, -2, BOOLEAN_TRUE))
        {
         expanded_node->left->expanded = BOOLEAN_TRUE;
         if (!subtree_replacement(rootnode, expanded_node, validation))
          {
           empty_heap(header);
           return;            
          }
        }
       if (!add_node_to_expanded_list(expanded_node->right, &header, -2, BOOLEAN_TRUE))
        {
         expanded_node->right->expanded = BOOLEAN_TRUE; 
         if (!subtree_replacement(rootnode, expanded_node, validation))
          {
           empty_heap(header);
           return;            
          }
        }
      }     
    }   
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
movq %rsp, %rsi
andq $0x0, (%rsi)
pushq $-0x2
popq %rdx
pushq $0x1
popq %rcx
callq 0x48af1
testl %eax, %eax
je 0x4d9fa
movq %rbx, 0x8(%rsp)
movq %rsp, %r15
pushq $-0x2
popq %rbp
pushq $0x1
popq %r12
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4da04
movq (%rdi), %r13
movq 0x10(%rdi), %rbx
callq 0x34ff7
movq %rbx, (%rsp)
movl $0x1, 0x130(%r13)
movq 0x20(%r13), %rdi
leaq 0x28(%r13), %rsi
callq 0x915cb
movl %eax, 0x30(%r13)
movq %r13, %rdi
callq 0x91657
testl %eax, %eax
je 0x4d89a
leaq 0x7ff8a(%rip), %rax     # 0xcd870
movq (%rax), %rax
movslq 0x30(%r13), %rcx
imulq $0x340, %rcx, %rdx      # imm = 0x340
cmpl $0x1, 0x30f08(%rax,%rdx)
jne 0x4d975
xorl %ebx, %ebx
xorl %r14d, %r14d
movslq %ecx, %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
movslq 0x30f20(%rax,%rcx), %rax
cmpq %rax, %r14
jge 0x4d89a
movq 0x10(%r13), %rdi
addq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
movl %r12d, %ecx
callq 0x48af1
testl %eax, %eax
jne 0x4d95b
movq 0x10(%r13), %rax
movl $0x1, 0x130(%rax,%rbx)
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq 0x10(%rsp), %rdx
callq 0x4d7da
testl %eax, %eax
je 0x4d9ef
incq %r14
leaq 0x7ff0b(%rip), %rax     # 0xcd870
movq (%rax), %rax
movl 0x30(%r13), %ecx
addq $0x160, %rbx            # imm = 0x160
jmp 0x4d903
movq (%r13), %rdi
movq %r15, %rsi
movl %ebp, %edx
movl %r12d, %ecx
callq 0x48af1
testl %eax, %eax
jne 0x4d9ae
movq (%r13), %rax
movl $0x1, 0x130(%rax)
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq 0x10(%rsp), %rdx
callq 0x4d7da
testl %eax, %eax
je 0x4d9ef
movq 0x8(%r13), %rdi
movq %r15, %rsi
movl %ebp, %edx
movl %r12d, %ecx
callq 0x48af1
testl %eax, %eax
jne 0x4d89a
movq 0x8(%r13), %rax
movl $0x1, 0x130(%rax)
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq 0x10(%rsp), %rdx
callq 0x4d7da
testl %eax, %eax
jne 0x4d89a
movq (%rsp), %rdi
callq 0x48b45
jmp 0x4da04
movl $0x1, 0x130(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq