// File: /workspace/github_c_makefile_star2_O3/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 0x73c20(%rip), %rsi     # 0xb0bf5
xorl %eax, %eax
callq 0x4070
movl 0x68(%rbx), %eax
cmpl $-0x1, %eax
je 0x3d063
testl %eax, %eax
js 0x3d0ac
leaq 0x50(%rbx), %rdx
leaq 0x6cc89(%rip), %rsi     # 0xa9c80
movq %r14, %rdi
xorl %eax, %eax
callq 0x4070
leaq 0x6ce8c(%rip), %r12     # 0xa9e94
movl $0x98, %edi
movq %r12, %rsi
movl $0x14, %edx
callq 0x3a0e1
movq %rax, (%rbx)
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3cfa5
movq (%rbx), %rax
movq %rbx, 0x18(%rax)
movl $0x98, %edi
movq %r12, %rsi
movl $0x16, %edx
callq 0x3a0e1
movq %rax, 0x8(%rbx)
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3cfa5
movq 0x8(%rbx), %rax
movq %rbx, 0x18(%rax)
jmp 0x3d17b
leaq 0x73b8b(%rip), %rsi     # 0xb0bf5
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 0x3d163
movl 0x1c0(%r15), %esi
movq %r14, %rdi
movl $0x1, %edx
callq 0x3b518
movq %rax, 0x30(%rbx)
movq %rdx, 0x38(%rbx)
jmp 0x3d17b
cmpl $-0x6, %eax
je 0x3d18a
cmpl $-0x2, %eax
jne 0x3d001
leaq 0x6cdcf(%rip), %r12     # 0xa9e94
movl $0x30, %edi
movq %r12, %rsi
movl $0xe, %edx
callq 0x3a0e1
movq %rax, %r13
movq %rax, 0x80(%rbx)
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3b857
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 0x3a0e1
movq %rax, %r12
movq %rax, 0x88(%rbx)
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3b857
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups 0x20(%r13), %xmm2
movups %xmm2, 0x20(%r12)
movups %xmm1, 0x10(%r12)
movups %xmm0, (%r12)
jmp 0x3d001
addq $0x70, %rbx
leaq 0x6cb12(%rip), %rsi     # 0xa9c80
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 0x3b518
movq %rax, 0x30(%rbx)
movq %rdx, 0x38(%rbx)
jmp 0x3d001