// File: /workspace/github_c_makefile_star2_O3/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
leaq 0x8(%rsp), %rsi
movq $0x0, (%rsi)
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
movl $0x1, %ecx
callq 0x50108
testl %eax, %eax
je 0x5569d
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x556b3
leaq 0x80346(%rip), %r13     # 0xd5870
leaq 0x8(%rsp), %r15
movq (%rdi), %r12
movq 0x10(%rdi), %r14
callq 0x3a180
movq %r14, 0x8(%rsp)
movl $0x1, 0x130(%r12)
movq 0x20(%r12), %rdi
leaq 0x28(%r12), %rsi
callq 0xa0abe
movl %eax, 0x30(%r12)
movq %r12, %rdi
callq 0xa0b60
testl %eax, %eax
je 0x5568d
movq (%r13), %rax
movslq 0x30(%r12), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
cmpl $0x1, 0x30f08(%rax,%rcx)
jne 0x55613
addq $0x30f08, %rax          # imm = 0x30F08
cmpl $0x0, 0x18(%rax,%rcx)
jle 0x5568d
xorl %ebp, %ebp
xorl %r14d, %r14d
movq 0x10(%r12), %rdi
addq %rbp, %rdi
movq %r15, %rsi
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
movl $0x1, %ecx
callq 0x50108
testl %eax, %eax
jne 0x555ea
movq 0x10(%r12), %rax
movl $0x1, 0x130(%rax,%rbp)
movq %rbx, %rdi
movq %r12, %rsi
movq 0x10(%rsp), %rdx
callq 0x55444
testl %eax, %eax
je 0x556a9
incq %r14
movq (%r13), %rax
movslq 0x30(%r12), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
movslq 0x30f20(%rax,%rcx), %rax
addq $0x160, %rbp            # imm = 0x160
cmpq %rax, %r14
jl 0x555a4
jmp 0x5568d
movq (%r12), %rdi
movq %r15, %rsi
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
movl $0x1, %ecx
callq 0x50108
testl %eax, %eax
jne 0x5564f
movq (%r12), %rax
movl $0x1, 0x130(%rax)
movq %rbx, %rdi
movq %r12, %rsi
movq 0x10(%rsp), %rdx
callq 0x55444
testl %eax, %eax
je 0x556a9
movq 0x8(%r12), %rdi
movq %r15, %rsi
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
movl $0x1, %ecx
callq 0x50108
testl %eax, %eax
jne 0x5568d
movq 0x8(%r12), %rax
movl $0x1, 0x130(%rax)
movq %rbx, %rdi
movq %r12, %rsi
movq 0x10(%rsp), %rdx
callq 0x55444
testl %eax, %eax
je 0x556a9
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
jne 0x5552f
jmp 0x556b3
movl $0x1, 0x130(%rbx)
jmp 0x556b3
movq 0x8(%rsp), %rdi
callq 0x5015e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq