// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/loadmodel.c
// Function: load_model_c45
void load_model_c45(FILE* infile, Datasetptr d, Decisionnodeptr rootnode)
{
 /*!Last Changed 17.07.2006*/
 /*!Last Changed 22.12.2005*/
	int i;
 rootnode->left = NULL;
 rootnode->parent = NULL;
 rootnode->right = NULL;
 rootnode->string = NULL;
	rootnode->rule = NULL;
	rootnode->instances = NULL;
 rootnode->conditiontype = UNIVARIATE_CONDITION; 
 fscanf(infile, "%d", &(rootnode->featureno));
	if (rootnode->featureno >= 0 && in_list(d->features[rootnode->featureno].type, 2, REAL, INTEGER))
		 fscanf(infile, "%lf", &(rootnode->split));
	if (rootnode->featureno == LEAF_NODE)
	 {
		 fscanf(infile, "%d", &(rootnode->classno));
			rootnode->counts = load_array_int(infile, d->classno);
	 }
	else
	 {
		 rootnode->counts = NULL;
   if (in_list(d->features[rootnode->featureno].type, 2, REAL, INTEGER))
    {
				 rootnode->left = safemalloc(sizeof(Decisionnode), "load_model_c45", 20);
     load_model_c45(infile, d, rootnode->left);
     rootnode->left->parent = rootnode;
				 rootnode->right = safemalloc(sizeof(Decisionnode), "load_model_c45", 22);
     load_model_c45(infile, d, rootnode->right);
     rootnode->right->parent = rootnode;
    }
   else
			 {
				 rootnode->string = safemalloc(d->features[rootnode->featureno].valuecount * sizeof(Decisionnode), "load_model_c45", 27);
     for (i = 0; i < d->features[rootnode->featureno].valuecount; i++)
      {
						 load_model_c45(infile, d, &(rootnode->string[i]));
       rootnode->string[i].parent = rootnode;      
      }
			 }
	 }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
andq $0x0, 0x58(%rdx)
movq %rsi, %r14
andl $0x0, 0x98(%rdx)
leaq 0x30(%rdx), %r12
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
movups %xmm0, 0x10(%rdx)
andq $0x0, 0x20(%rdx)
leaq 0x6a31b(%rip), %rsi     # 0xa0b59
movq %rdi, (%rsp)
movq %r12, %rdx
xorl %eax, %eax
callq 0x4070
movslq 0x30(%rbx), %rax
testq %rax, %rax
js 0x36890
imulq $0x340, %rax, %rax      # imm = 0x340
movl 0x30f08(%r14,%rax), %edi
pushq $0x2
popq %rdx
movl %edx, %esi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x35812
testl %eax, %eax
je 0x3688c
leaq 0x28(%rbx), %rdx
leaq 0x63327(%rip), %rsi     # 0x99ba8
movq (%rsp), %rdi
xorl %eax, %eax
callq 0x4070
movl (%r12), %eax
cmpl $-0x1, %eax
je 0x36927
andq $0x0, 0xa0(%rbx)
cltq
imulq $0x340, %rax, %rax      # imm = 0x340
movl 0x30f08(%r14,%rax), %edi
pushq $0x2
popq %rdx
movl %edx, %esi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x35812
testl %eax, %eax
je 0x36962
leaq 0x63368(%rip), %r12     # 0x99c37
pushq $0x14
popq %rdx
movl $0x160, %edi            # imm = 0x160
movq %r12, %rsi
callq 0x34f59
movq %rax, (%rbx)
movq (%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x36807
movq (%rbx), %rax
movq %rbx, 0x18(%rax)
pushq $0x16
popq %rdx
movl $0x160, %edi            # imm = 0x160
movq %r12, %rsi
callq 0x34f59
movq %rax, 0x8(%rbx)
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x36807
movq 0x8(%rbx), %rax
movq %rbx, 0x18(%rax)
jmp 0x36953
leaq 0x34(%rbx), %rdx
leaq 0x6a227(%rip), %rsi     # 0xa0b59
movq (%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x4070
movl 0x10(%r14), %esi
movq %r15, %rdi
callq 0x361c3
movq %rax, 0xa0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %r15
leaq 0x30f08(%r14), %r13
movslq 0x30(%rbx), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
movslq 0x18(%r13,%rax), %rax
imulq $0x160, %rax, %rdi      # imm = 0x160
leaq 0x632ad(%rip), %rsi     # 0x99c37
pushq $0x1b
popq %rdx
callq 0x34f59
movq %rax, %rdx
movq %rax, 0x10(%rbx)
xorl %ebp, %ebp
xorl %r14d, %r14d
movslq (%r12), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
movslq 0x18(%r13,%rax), %rax
cmpq %rax, %r14
jge 0x36953
addq %rbp, %rdx
movq (%rsp), %rdi
movq %r15, %rsi
callq 0x36807
movq 0x10(%rbx), %rdx
movq %rbx, 0x18(%rdx,%rbp)
incq %r14
addq $0x160, %rbp            # imm = 0x160
jmp 0x3699e