// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/classification.c
// Function: print_classification_results
void print_classification_results(Instanceptr testdata, Classificationresultptr result, double runtime, int printbinary, int displayruntime, int accuracy, int displayclassresulton)
{
 /*!Last Changed 22.05.2005*/
 /*!Last Changed 17.08.2003 Displays accuracy or error results*/
 int i;
 char pst[READLINELENGTH];
 Instanceptr tmp = testdata;
 if (result->datasize == 0)
   return;

 if (printbinary)
  {
   fprintf(output,"%d\n", result->datasize);
   while (tmp)
    {
     fprintf(output,"%d", tmp->classified);
     tmp = tmp->next;
    }
  }
 else
  {
   if (displayruntime)
    {
     set_precision(pst, NULL, " %.3lf\n");
     if (accuracy)
       fprintf(output, pst, 100 * (result->performance + 0.0) / result->datasize, runtime); 
     else
       fprintf(output, pst, 100 - 100 * (result->performance + 0.0) / result->datasize, runtime);   
	printf("error %f\n",100 - 100 * (result->performance + 0.0) / result->datasize);     
    }
   else
    {
     set_precision(pst, NULL, "\n");
     if (accuracy)
       fprintf(output, pst, 100 * (result->performance + 0.0) / result->datasize); 
     else
       fprintf(output, pst, 100 - 100 * (result->performance + 0.0) / result->datasize); 
    }
   if (displayclassresulton)
    {
     set_precision(pst, NULL, "\n");
     fprintf(output, "----------\n");
     if (accuracy)
       for (i = 0; i < current_dataset->classno; i++)
         if (result->class_counts[i] != 0)
           fprintf(output, pst, 100 * (result->class_performance[i] + 0.0) / result->class_counts[i]);
         else
           fprintf(output, pst, 0.0);
     else
       for (i = 0; i < current_dataset->classno; i++)
         if (result->class_counts[i] != 0)
           fprintf(output, pst, 100 - 100 * (result->class_performance[i] + 0.0) / result->class_counts[i]);
         else
           fprintf(output, pst, 100.0);
     fprintf(output, "----------\n");
    }
  }
}

// Assembly:
movl %edx, %eax
movl 0x30(%rsi), %edx
testl %edx, %edx
je 0x8aa7
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a138, %rsp          # imm = 0x7A138
testl %eax, %eax
je 0x885f
movq %rdi, %r15
leaq 0x3a6889(%rip), %r14    # 0x3af0a8
movq (%r14), %rdi
leaq 0xa4d20(%rip), %rsi     # 0xad549
xorl %eax, %eax
callq 0x42e0
testq %r15, %r15
je 0x8a96
leaq 0xa531d(%rip), %rbx     # 0xadb5d
movq (%r14), %rdi
movl 0x1c(%r15), %edx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x42e0
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0x8840
jmp 0x8a96
movl %r9d, %r14d
movl %r8d, %ebp
movq %rsi, %rbx
testl %ecx, %ecx
je 0x8905
movsd %xmm0, 0x8(%rsp)
leaq 0x9a5b6(%rip), %rdx     # 0xa2e33
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x39529
leaq 0x3a6815(%rip), %rax    # 0x3af0a8
movq (%rax), %rdi
xorps %xmm0, %xmm0
cvtsi2sdl (%rbx), %xmm0
movsd 0x9a4fb(%rip), %xmm2    # 0xa2da0
mulsd %xmm2, %xmm0
cvtsi2sdl 0x30(%rbx), %xmm1
divsd %xmm1, %xmm0
testl %ebp, %ebp
jne 0x88c2
movapd %xmm2, %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movsd 0x8(%rsp), %xmm1
movq %r15, %rsi
movb $0x2, %al
callq 0x42e0
xorps %xmm2, %xmm2
cvtsi2sdl (%rbx), %xmm2
movsd 0x9a4bf(%rip), %xmm0    # 0xa2da0
mulsd %xmm0, %xmm2
xorps %xmm1, %xmm1
cvtsi2sdl 0x30(%rbx), %xmm1
divsd %xmm1, %xmm2
subsd %xmm2, %xmm0
leaq 0x9a53f(%rip), %rdi     # 0xa2e3b
movb $0x1, %al
callq 0x4030
jmp 0x8961
leaq 0x9d85f(%rip), %rdx     # 0xa616b
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x39529
leaq 0x3a6789(%rip), %rax    # 0x3af0a8
movq (%rax), %rdi
xorps %xmm0, %xmm0
cvtsi2sdl (%rbx), %xmm0
mulsd 0x9a46f(%rip), %xmm0    # 0xa2da0
cvtsi2sdl 0x30(%rbx), %xmm1
divsd %xmm1, %xmm0
testl %ebp, %ebp
je 0x8945
leaq 0x10(%rsp), %rsi
jmp 0x895a
movsd 0x9a453(%rip), %xmm1    # 0xa2da0
subsd %xmm0, %xmm1
leaq 0x10(%rsp), %rsi
movapd %xmm1, %xmm0
movb $0x1, %al
callq 0x42e0
testl %r14d, %r14d
je 0x8a96
leaq 0x9d7fa(%rip), %rdx     # 0xa616b
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x39529
leaq 0x3a6724(%rip), %r15    # 0x3af0a8
movq (%r15), %rcx
leaq 0xa5978(%rip), %rdi     # 0xae306
movl $0xb, %esi
movl $0x1, %edx
callq 0x42c0
leaq 0xc9ecc(%rip), %r12     # 0xd2870
movq (%r12), %rax
movl 0x10(%rax), %eax
testl %ebp, %ebp
je 0x8a10
testl %eax, %eax
jle 0x8a7d
xorl %r13d, %r13d
leaq 0x10(%rsp), %r14
movq 0x10(%rbx), %rax
movl (%rax,%r13,4), %eax
testl %eax, %eax
je 0x89ed
movq 0x8(%rbx), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx,%r13,4), %xmm0
mulsd 0x9a3c0(%rip), %xmm0    # 0xa2da0
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
jmp 0x89f1
xorpd %xmm0, %xmm0
movq (%r15), %rdi
movq %r14, %rsi
movb $0x1, %al
callq 0x42e0
incq %r13
movq (%r12), %rax
movslq 0x10(%rax), %rax
cmpq %rax, %r13
jl 0x89bf
jmp 0x8a7d
testl %eax, %eax
jle 0x8a7d
xorl %r13d, %r13d
movsd 0x9a381(%rip), %xmm2    # 0xa2da0
leaq 0x10(%rsp), %r14
movq 0x10(%rbx), %rax
movl (%rax,%r13,4), %eax
movapd %xmm2, %xmm0
testl %eax, %eax
je 0x8a58
movq 0x8(%rbx), %rcx
xorps %xmm1, %xmm1
cvtsi2sdl (%rcx,%r13,4), %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd %xmm2, %xmm1
divsd %xmm0, %xmm1
movapd %xmm2, %xmm0
subsd %xmm1, %xmm0
movq (%r15), %rdi
movq %r14, %rsi
movb $0x1, %al
callq 0x42e0
movsd 0x9a333(%rip), %xmm2    # 0xa2da0
incq %r13
movq (%r12), %rax
movslq 0x10(%rax), %rax
cmpq %rax, %r13
jl 0x8a24
movq (%r15), %rcx
leaq 0xa587f(%rip), %rdi     # 0xae306
movl $0xb, %esi
movl $0x1, %edx
callq 0x42c0
addq $0x7a138, %rsp          # imm = 0x7A138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq