// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/ktree.c
// Function: make_children_discrete
int make_children_discrete(Decisionnodeptr node)
{
 Instanceptr inst, leftbefore = NULL, rightbefore = NULL;
 Decisionnodeptr left, right;
 Decisioncondition ruleleft, ruleright;
 if (node->featureno == LEAF_NODE || node->instances == NULL)
  {
   make_leaf_node(node);
   return 0;
  }
 left = createnewnode(node, 1);
 right = createnewnode(node, 1);
 node->string = NULL;
 node->left = left;
 node->right = right;
 ruleleft = create_kordering_condition(node->ksplit, '<');
 ruleleft.conditiontype = UNIVARIATE_CONDITION;
 addcondition(node->left, ruleleft);
 ruleright = create_kordering_condition(node->ksplit, '>');
 ruleright.conditiontype = UNIVARIATE_CONDITION;
 addcondition(node->right, ruleright);
 inst = node->instances;
 while (inst)
  {
   if (is_smaller_discrete_order(inst, node->ksplit))
    {
     if (leftbefore)
       leftbefore->next = inst;
     else
       left->instances = inst;
     leftbefore = inst;
    }
   else
    {
     if (rightbefore)
       rightbefore->next = inst;
     else
       right->instances = inst;
     rightbefore = inst;
    }
   inst = inst->next;
  }
 if (leftbefore)
   leftbefore->next = NULL;
 if (rightbefore)
   rightbefore->next = NULL;
 node->instances = NULL;
 return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x270, %rsp            # imm = 0x270
movq %rdi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x30(%rax)
je 0x48a74
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x48a89
movq -0x10(%rbp), %rdi
callq 0x28a30
movl $0x0, -0x4(%rbp)
jmp 0x48d25
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x29480
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x29480
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $0x140, %rax            # imm = 0x140
leaq -0x188(%rbp), %rdi
movl $0x3c, %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x48030
leaq -0xa8(%rbp), %rdi
leaq -0x188(%rbp), %rsi
movl $0x70, %edx
callq 0x42b0
movl $0x0, -0x68(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movups -0x48(%rbp), %xmm0
movq %rsp, %rax
movups %xmm0, 0x60(%rax)
movups -0x58(%rbp), %xmm0
movups %xmm0, 0x50(%rax)
movups -0x68(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0xa8(%rbp), %xmm0
movups -0x98(%rbp), %xmm1
movups -0x88(%rbp), %xmm2
movups -0x78(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x293f0
movq -0x10(%rbp), %rax
addq $0x140, %rax            # imm = 0x140
leaq -0x1f8(%rbp), %rdi
movl $0x3e, %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x48030
leaq -0x118(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
movl $0x70, %edx
callq 0x42b0
movl $0x0, -0xd8(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movups -0xb8(%rbp), %xmm0
movq %rsp, %rax
movups %xmm0, 0x60(%rax)
movups -0xc8(%rbp), %xmm0
movups %xmm0, 0x50(%rax)
movups -0xd8(%rbp), %xmm0
movups %xmm0, 0x40(%rax)
movups -0x118(%rbp), %xmm0
movups -0x108(%rbp), %xmm1
movups -0xf8(%rbp), %xmm2
movups -0xe8(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x293f0
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x48cec
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
addq $0x140, %rax            # imm = 0x140
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x29990
cmpl $0x0, %eax
je 0x48cb2
cmpq $0x0, -0x20(%rbp)
je 0x48c9c
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x48ca8
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x48cdb
cmpq $0x0, -0x28(%rbp)
je 0x48cc7
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x48cd3
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x48c42
cmpq $0x0, -0x20(%rbp)
je 0x48cff
movq -0x20(%rbp), %rax
movq $0x0, 0x10(%rax)
cmpq $0x0, -0x28(%rbp)
je 0x48d12
movq -0x28(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
nopw %cs:(%rax,%rax)