// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/loadmodel.c
// Function: load_model_regtree
void load_model_regtree(FILE* infile, Datasetptr d, Regressionnodeptr rootnode)
{
	int leaftype;
 rootnode->left = NULL;
 rootnode->parent = NULL;
 rootnode->right = NULL;
 rootnode->string = NULL;
	rootnode->instances = NULL;
 rootnode->cvinstances = NULL;
 fscanf(infile, "%d", &(rootnode->featureno));
	if (rootnode->featureno == LEAF_NODE)
  {
   fscanf(infile, "%d", &leaftype);
   rootnode->leaftype = leaftype;
   if (rootnode->leaftype == CONSTANTLEAF)
     fscanf(infile, "%lf", &(rootnode->regressionvalue));
   else
     rootnode->w = load_matrix(infile, d->multifeaturecount, 1);  
  }
	else
  {
   if (rootnode->featureno >= 0)
     fscanf(infile, "%lf", &(rootnode->split));
   else
     if (rootnode->featureno == LINEAR)
      {
       rootnode->leftcenter = safemalloc(sizeof(Instance), "load_model_regtree", 14);
       *(rootnode->leftcenter) = load_instance(infile, d, BOOLEAN_FALSE);
       rootnode->rightcenter = safemalloc(sizeof(Instance), "load_model_regtree", 16);
       *(rootnode->rightcenter) = load_instance(infile, d, BOOLEAN_FALSE);
      }
     else
       if (rootnode->featureno == SOFTLIN)
         rootnode->w = load_matrix(infile, d->multifeaturecount, 1);
   rootnode->left = safemalloc(sizeof(Regressionnode), "load_model_regtree", 20);
   load_model_regtree(infile, d, rootnode->left);
   rootnode->left->parent = rootnode;
   rootnode->right = safemalloc(sizeof(Regressionnode), "load_model_regtree", 22);
   load_model_regtree(infile, d, rootnode->right);
   rootnode->right->parent = rootnode;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
addq $0x68, %rdx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
leaq 0x71c28(%rip), %rsi     # 0xadb5d
xorl %eax, %eax
callq 0x4070
movl 0x68(%rbx), %eax
cmpl $-0x1, %eax
je 0x3bfc3
testl %eax, %eax
js 0x3c00c
leaq 0x50(%rbx), %rdx
leaq 0x6acb9(%rip), %rsi     # 0xa6c10
movq %r14, %rdi
xorl %eax, %eax
callq 0x4070
leaq 0x6aebc(%rip), %r12     # 0xa6e24
movl $0x98, %edi
movq %r12, %rsi
movl $0x14, %edx
callq 0x390f5
movq %rax, (%rbx)
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3bf05
movq (%rbx), %rax
movq %rbx, 0x18(%rax)
movl $0x98, %edi
movq %r12, %rsi
movl $0x16, %edx
callq 0x390f5
movq %rax, 0x8(%rbx)
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3bf05
movq 0x8(%rbx), %rax
movq %rbx, 0x18(%rax)
jmp 0x3c0db
leaq 0x71b93(%rip), %rsi     # 0xadb5d
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x4070
movl (%r12), %eax
movl %eax, 0x6c(%rbx)
testl %eax, %eax
je 0x3c0c3
movl 0x1c0(%r15), %esi
movq %r14, %rdi
movl $0x1, %edx
callq 0x3a488
movq %rax, 0x30(%rbx)
movq %rdx, 0x38(%rbx)
jmp 0x3c0db
cmpl $-0x6, %eax
je 0x3c0ea
cmpl $-0x2, %eax
jne 0x3bf61
leaq 0x6adff(%rip), %r12     # 0xa6e24
movl $0x30, %edi
movq %r12, %rsi
movl $0xe, %edx
callq 0x390f5
movq %rax, %r13
movq %rax, 0x80(%rbx)
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3a7c7
movups (%rbp), %xmm0
movups 0x10(%rbp), %xmm1
movups 0x20(%rbp), %xmm2
movups %xmm2, 0x20(%r13)
movups %xmm1, 0x10(%r13)
movups %xmm0, (%r13)
movl $0x30, %edi
movq %r12, %rsi
movl $0x10, %edx
callq 0x390f5
movq %rax, %r12
movq %rax, 0x88(%rbx)
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3a7c7
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups 0x20(%r13), %xmm2
movups %xmm2, 0x20(%r12)
movups %xmm1, 0x10(%r12)
movups %xmm0, (%r12)
jmp 0x3bf61
addq $0x70, %rbx
leaq 0x6ab42(%rip), %rsi     # 0xa6c10
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x4070
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x1c0(%r15), %esi
movq %r14, %rdi
movl $0x1, %edx
callq 0x3a488
movq %rax, 0x30(%rbx)
movq %rdx, 0x38(%rbx)
jmp 0x3bf61