// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x98(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
addq $0x30, %rdx
leaq 0x97a79(%rip), %rsi     # 0xed265
movb $0x0, %al
callq 0x4070
movq -0x18(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jl 0x5584a
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movq -0x18(%rbp), %rcx
movslq 0x30(%rcx), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movl (%rax), %edi
movl $0x2, %edx
xorl %ecx, %ecx
movl %edx, %esi
movb $0x0, %al
callq 0x53e40
cmpl $0x0, %eax
je 0x5584a
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
addq $0x28, %rdx
leaq 0x90f85(%rip), %rsi     # 0xe67c8
movb $0x0, %al
callq 0x4070
movq -0x18(%rbp), %rax
cmpl $-0x1, 0x30(%rax)
jne 0x55891
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
addq $0x34, %rdx
leaq 0x979fe(%rip), %rsi     # 0xed265
movb $0x0, %al
callq 0x4070
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %esi
callq 0x54df0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0xa0(%rax)
jmp 0x55a24
movq -0x18(%rbp), %rax
movq $0x0, 0xa0(%rax)
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movq -0x18(%rbp), %rcx
movslq 0x30(%rcx), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movl (%rax), %edi
movl $0x2, %edx
xorl %ecx, %ecx
movl %edx, %esi
movb $0x0, %al
callq 0x53e40
cmpl $0x0, %eax
je 0x55965
movl $0x160, %edi            # imm = 0x160
leaq 0x90f74(%rip), %rsi     # 0xe6857
movl $0x14, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
callq 0x55770
movq -0x18(%rbp), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x18(%rax)
movl $0x160, %edi            # imm = 0x160
leaq 0x90f31(%rip), %rsi     # 0xe6857
movl $0x16, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x55770
movq -0x18(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x18(%rax)
jmp 0x55a22
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movq -0x18(%rbp), %rcx
movslq 0x30(%rcx), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movslq 0x18(%rax), %rax
imulq $0x160, %rax, %rdi      # imm = 0x160
leaq 0x90ec4(%rip), %rsi     # 0xe6857
movl $0x1b, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
addq $0x30f08, %rcx          # imm = 0x30F08
movq -0x18(%rbp), %rdx
movslq 0x30(%rdx), %rdx
imulq $0x340, %rdx, %rdx      # imm = 0x340
addq %rdx, %rcx
cmpl 0x18(%rcx), %eax
jge 0x55a20
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movslq -0x1c(%rbp), %rax
imulq $0x160, %rax, %rax      # imm = 0x160
addq %rax, %rdx
callq 0x55770
movq -0x18(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x160, %rdx, %rdx      # imm = 0x160
addq %rdx, %rax
movq %rcx, 0x18(%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x559af
jmp 0x55a22
jmp 0x55a24
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)