// File: /workspace/github_c_makefile_star2_O1/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 0x4ebea
testl %eax, %eax
je 0x541be
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x541d4
leaq 0x7e832(%rip), %r13     # 0xd2870
leaq 0x8(%rsp), %r15
movq (%rdi), %r12
movq 0x10(%rdi), %r14
callq 0x39194
movq %r14, 0x8(%rsp)
movl $0x1, 0x130(%r12)
movq 0x20(%r12), %rdi
leaq 0x28(%r12), %rsi
callq 0x9daab
movl %eax, 0x30(%r12)
movq %r12, %rdi
callq 0x9db4a
testl %eax, %eax
je 0x541ae
movq (%r13), %rax
movslq 0x30(%r12), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
cmpl $0x1, 0x30f08(%rax,%rcx)
jne 0x54134
movq (%r13), %rax
movslq 0x30(%r12), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
cmpl $0x0, 0x30f20(%rax,%rcx)
jle 0x541ae
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 0x4ebea
testl %eax, %eax
jne 0x5410b
movq 0x10(%r12), %rax
movl $0x1, 0x130(%rax,%rbp)
movq %rbx, %rdi
movq %r12, %rsi
movq 0x10(%rsp), %rdx
callq 0x53f64
testl %eax, %eax
je 0x541ca
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 0x540c5
jmp 0x541ae
movq (%r12), %rdi
movq %r15, %rsi
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
movl $0x1, %ecx
callq 0x4ebea
testl %eax, %eax
jne 0x54170
movq (%r12), %rax
movl $0x1, 0x130(%rax)
movq %rbx, %rdi
movq %r12, %rsi
movq 0x10(%rsp), %rdx
callq 0x53f64
testl %eax, %eax
je 0x541ca
movq 0x8(%r12), %rdi
movq %r15, %rsi
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
movl $0x1, %ecx
callq 0x4ebea
testl %eax, %eax
jne 0x541ae
movq 0x8(%r12), %rax
movl $0x1, 0x130(%rax)
movq %rbx, %rdi
movq %r12, %rsi
movq 0x10(%rsp), %rdx
callq 0x53f64
testl %eax, %eax
je 0x541ca
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
jne 0x54043
jmp 0x541d4
movl $0x1, 0x130(%rbx)
jmp 0x541d4
movq 0x8(%rsp), %rdi
callq 0x4ec40
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq