// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: make_regression_children
int make_regression_children(Regressionnodeptr node, LEAF_TYPE leaftype)
{
	/*!Last Changed 24.03.2005*/
	/*!Last Changed 09.12.2004*/
 Regressionnodeptr left, right;
 if (node->featureno == LEAF_NODE || node->instances == NULL)
	 {
		 make_leaf_regression_node(node, leaftype);
   return 0;
	 }
 left = createnewregnode(node, 1, leaftype);
 right = createnewregnode(node, 1, leaftype);
	if (node->featureno >= 0)
	 {
  	divide_instancelist_according_to_split(&(node->instances), &(left->instances), &(right->instances), node->featureno, node->split);
	  divide_instancelist_according_to_split(&(node->cvinstances), &(left->cvinstances), &(right->cvinstances), node->featureno, node->split);
	 }
	else
		 if (node->featureno == LINEAR)
			 {
				 divide_instancelist_according_centers(&(node->instances), &(left->instances), &(right->instances), node->leftcenter, node->rightcenter, NO);
				 divide_instancelist_according_centers(&(node->cvinstances), &(left->cvinstances), &(right->cvinstances), node->leftcenter, node->rightcenter, NO);
			 }
			else
			 {
				 divide_instancelist_according_centers(&(node->instances), &(left->instances), &(right->instances), node->leftcenter, node->rightcenter, YES);
				 divide_instancelist_according_centers(&(node->cvinstances), &(left->cvinstances), &(right->cvinstances), node->leftcenter, node->rightcenter, YES);
			 }
	node->left = left;
	node->right = right;
 return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
cmpl $-0x1, 0x68(%rdi)
je 0x7744d
cmpq $0x0, 0x20(%rbx)
je 0x7744d
leaq 0x20(%rbx), %rax
movq %rax, (%rsp)
leaq 0x388c3(%rip), %r15     # 0xafc78
movl $0x98, %edi
movq %r15, %rsi
movl $0x3, %edx
callq 0x3a0e1
movq %rax, %r14
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r12d, 0x68(%rax)
movl %ebp, 0x6c(%rax)
leaq 0x20(%rax), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movq %rbx, 0x18(%rax)
movl $0x98, %edi
movq %r15, %rsi
movl $0x3, %edx
callq 0x3a0e1
movq %rax, %r15
movl %r12d, 0x68(%rax)
movl %ebp, 0x6c(%rax)
leaq 0x20(%rax), %rdx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movq %rbx, 0x18(%rax)
movl 0x68(%rbx), %ecx
testl %ecx, %ecx
js 0x7746c
movsd 0x50(%rbx), %xmm0
movq (%rsp), %rdi
movq %r13, %rsi
callq 0x30ade
leaq 0x28(%rbx), %rdi
movq %r14, %rsi
addq $0x28, %rsi
movq %r15, %rdx
addq $0x28, %rdx
movl 0x68(%rbx), %ecx
movsd 0x50(%rbx), %xmm0
callq 0x30ade
jmp 0x774ef
movl $0xffffffff, 0x68(%rbx) # imm = 0xFFFFFFFF
movl %ebp, 0x6c(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
xorl %eax, %eax
jmp 0x774fb
movq %r13, %rsi
movq (%rsp), %rdi
leaq 0x28(%rbx), %r13
movq %r14, %rbp
addq $0x28, %rbp
movq %r15, %r12
addq $0x28, %r12
movq 0x80(%rbx), %rax
movq 0x88(%rbx), %r8
cmpl $-0x2, %ecx
jne 0x774bf
movq %rax, %rcx
xorl %r9d, %r9d
callq 0x30a0d
movq 0x80(%rbx), %rcx
movq 0x88(%rbx), %r8
movq %r13, %rdi
movq %rbp, %rsi
movq %r12, %rdx
xorl %r9d, %r9d
jmp 0x774ea
movq %rax, %rcx
movl $0x1, %r9d
callq 0x30a0d
movq 0x80(%rbx), %rcx
movq 0x88(%rbx), %r8
movq %r13, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movl $0x1, %r9d
callq 0x30a0d
movq %r14, (%rbx)
movq %r15, 0x8(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq