// File: /workspace/github_c_makefile_star2_O2/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 0x691ac(%rip), %rsi     # 0xa0b59
xorl %eax, %eax
callq 0x4070
movl 0x68(%rbx), %eax
cmpl $-0x1, %eax
je 0x37a37
testl %eax, %eax
js 0x37a7e
leaq 0x50(%rbx), %rdx
leaq 0x621d9(%rip), %rsi     # 0x99ba8
movq %r14, %rdi
xorl %eax, %eax
callq 0x4070
leaq 0x623dc(%rip), %r12     # 0x99dbc
pushq $0x14
popq %rdx
movl $0x98, %edi
movq %r12, %rsi
callq 0x34f59
movq %rax, (%rbx)
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3797d
movq (%rbx), %rax
movq %rbx, 0x18(%rax)
pushq $0x16
popq %rdx
movl $0x98, %edi
movq %r12, %rsi
callq 0x34f59
movq %rax, 0x8(%rbx)
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3797d
movq 0x8(%rbx), %rax
movq %rbx, 0x18(%rax)
jmp 0x37b4c
leaq 0x6911b(%rip), %rsi     # 0xa0b59
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 0x37b34
movl 0x1c0(%r15), %esi
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x360cc
movq %rax, 0x30(%rbx)
movq %rdx, 0x38(%rbx)
jmp 0x37b4c
cmpl $-0x6, %eax
je 0x37b5b
cmpl $-0x2, %eax
jne 0x379d9
leaq 0x62325(%rip), %rsi     # 0x99dbc
pushq $0x30
popq %r13
pushq $0xe
popq %rdx
movq %r13, %rdi
callq 0x34f59
movq %rax, %rbp
movq %rax, 0x80(%rbx)
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x363da
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movups %xmm2, 0x20(%rbp)
movups %xmm1, 0x10(%rbp)
movups %xmm0, (%rbp)
pushq $0x10
popq %rdx
movq %r13, %rdi
leaq 0x622cf(%rip), %rsi     # 0x99dbc
callq 0x34f59
movq %rax, %r12
movq %rax, 0x88(%rbx)
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x363da
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups 0x20(%r13), %xmm2
movups %xmm2, 0x20(%r12)
movups %xmm1, 0x10(%r12)
movups %xmm0, (%r12)
jmp 0x379d9
addq $0x70, %rbx
leaq 0x62069(%rip), %rsi     # 0x99ba8
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
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x360cc
movq %rax, 0x30(%rbx)
movq %rdx, 0x38(%rbx)
jmp 0x379d9