// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/savemodel.c
// Function: save_model_c45
void save_model_c45(FILE* modelfile, Datasetptr d, Decisionnodeptr m, int level)
{
 /*Last Changed 22.12.2005*/
 char pst[READLINELENGTH];
 int i;
	for (i = 0; i < level; i++)
		 fprintf(modelfile, "  ");
 set_precision(pst, NULL, " "); 
 fprintf(modelfile, "%d ", m->featureno);
 if (m->featureno >= 0 && in_list(d->features[m->featureno].type, 2, REAL, INTEGER))
   fprintf(modelfile, pst, m->split);
 if (m->featureno == LEAF_NODE)
  {
   fprintf(modelfile, "%d ", m->classno);
   save_array_int(modelfile, m->counts, d->classno);
   return;
  }
 else
	 {
		 fprintf(modelfile, "\n");
   if (in_list(d->features[m->featureno].type, 2, REAL, INTEGER))
    {
     save_model_c45(modelfile, d, m->left, level + 1);
     save_model_c45(modelfile, d, m->right, level + 1);
    }
   else
     for (i = 0; i < d->features[m->featureno].valuecount; i++)
       save_model_c45(modelfile, d, &(m->string[i]), level + 1);
	 }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x7a150, %rsp          # imm = 0x7A150
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x7a144(%rbp)
movl -0x7a144(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0xba5e2
movq -0x8(%rbp), %rdi
leaq 0x32eb2(%rip), %rsi     # 0xed47c
movb $0x0, %al
callq 0x4280
movl -0x7a144(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7a144(%rbp)
jmp 0xba5b4
leaq -0x7a140(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0x2ac91(%rip), %rdx     # 0xe5285
callq 0x53310
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x30(%rax), %edx
leaq 0x31e8a(%rip), %rsi     # 0xec495
movb $0x0, %al
callq 0x4280
movq -0x18(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jl 0xba66a
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 0xba66a
movq -0x8(%rbp), %rdi
leaq -0x7a140(%rbp), %rsi
movq -0x18(%rbp), %rax
movsd 0x28(%rax), %xmm0
movb $0x1, %al
callq 0x4280
movq -0x18(%rbp), %rax
cmpl $-0x1, 0x30(%rax)
jne 0xba6ad
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x34(%rax), %edx
leaq 0x31e0f(%rip), %rsi     # 0xec495
movb $0x0, %al
callq 0x4280
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0xa0(%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
callq 0xb9c10
jmp 0xba79c
movq -0x8(%rbp), %rdi
leaq 0x2b683(%rip), %rsi     # 0xe5d3b
movb $0x0, %al
callq 0x4280
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 0xba729
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
callq 0xba590
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
callq 0xba590
jmp 0xba79a
movl $0x0, -0x7a144(%rbp)
movl -0x7a144(%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 0xba798
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movslq -0x7a144(%rbp), %rax
imulq $0x160, %rax, %rax      # imm = 0x160
addq %rax, %rdx
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
callq 0xba590
movl -0x7a144(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7a144(%rbp)
jmp 0xba733
jmp 0xba79a
jmp 0xba79c
addq $0x7a150, %rsp          # imm = 0x7A150
popq %rbp
retq
nopw %cs:(%rax,%rax)