// File: /workspace/github_c_makefile_star2_O2/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 0x8757
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a138, %rsp          # imm = 0x7A138
testl %eax, %eax
je 0x853f
movq %rdi, %r15
leaq 0x3a1ba1(%rip), %r14    # 0x3aa0a8
movq (%r14), %rdi
leaq 0x98034(%rip), %rsi     # 0xa0545
xorl %eax, %eax
callq 0x42e0
leaq 0x9863a(%rip), %rbx     # 0xa0b59
testq %r15, %r15
je 0x8746
movq (%r14), %rdi
movl 0x1c(%r15), %edx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x42e0
movq 0x10(%r15), %r15
jmp 0x851f
movl %r9d, %r14d
movl %r8d, %ebp
movq %rsi, %rbx
testl %ecx, %ecx
je 0x85dc
movsd %xmm0, 0x8(%rsp)
leaq 0x8d8de(%rip), %rdx     # 0x95e3b
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x35305
leaq 0x3a1b35(%rip), %rax    # 0x3aa0a8
movq (%rax), %rdi
cvtsi2sdl (%rbx), %xmm0
movsd 0x8d826(%rip), %xmm2    # 0x95da8
mulsd %xmm2, %xmm0
cvtsi2sdl 0x30(%rbx), %xmm1
divsd %xmm1, %xmm0
testl %ebp, %ebp
jne 0x859f
movapd %xmm2, %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movq %r15, %rsi
movsd 0x8(%rsp), %xmm1
movb $0x2, %al
callq 0x42e0
cvtsi2sdl (%rbx), %xmm2
movsd 0x8d7ed(%rip), %xmm0    # 0x95da8
mulsd %xmm0, %xmm2
cvtsi2sdl 0x30(%rbx), %xmm1
divsd %xmm1, %xmm2
subsd %xmm2, %xmm0
leaq 0x8d870(%rip), %rdi     # 0x95e43
movb $0x1, %al
callq 0x4030
jmp 0x8635
leaq 0x90b28(%rip), %rdx     # 0x9910b
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x35305
leaq 0x3a1ab2(%rip), %rax    # 0x3aa0a8
movq (%rax), %rdi
cvtsi2sdl (%rbx), %xmm0
mulsd 0x8d7a3(%rip), %xmm0    # 0x95da8
cvtsi2sdl 0x30(%rbx), %xmm1
divsd %xmm1, %xmm0
testl %ebp, %ebp
je 0x8619
leaq 0x10(%rsp), %rsi
jmp 0x862e
movsd 0x8d787(%rip), %xmm1    # 0x95da8
subsd %xmm0, %xmm1
leaq 0x10(%rsp), %rsi
movapd %xmm1, %xmm0
movb $0x1, %al
callq 0x42e0
testl %r14d, %r14d
je 0x8746
leaq 0x90ac6(%rip), %rdx     # 0x9910b
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x35305
leaq 0x3a1a50(%rip), %r15    # 0x3aa0a8
movq (%r15), %rcx
leaq 0x98c9c(%rip), %rdi     # 0xa12fe
pushq $0xb
popq %rsi
pushq $0x1
popq %rdx
callq 0x42c0
xorl %r12d, %r12d
leaq 0xc51f9(%rip), %r13     # 0xcd870
testl %ebp, %ebp
je 0x86cf
leaq 0x10(%rsp), %r14
movq (%r13), %rax
movslq 0x10(%rax), %rax
cmpq %rax, %r12
jge 0x8731
movq 0x10(%rbx), %rax
movl (%rax,%r12,4), %eax
testl %eax, %eax
je 0x86b9
movq 0x8(%rbx), %rcx
cvtsi2sdl (%rcx,%r12,4), %xmm0
mulsd 0x8d6f9(%rip), %xmm0    # 0x95da8
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
jmp 0x86bd
xorpd %xmm0, %xmm0
movq (%r15), %rdi
movq %r14, %rsi
movb $0x1, %al
callq 0x42e0
incq %r12
jmp 0x8680
movsd 0x8d6d1(%rip), %xmm2    # 0x95da8
leaq 0x10(%rsp), %r14
movq (%r13), %rax
movslq 0x10(%rax), %rax
cmpq %rax, %r12
jge 0x8731
movq 0x10(%rbx), %rax
movl (%rax,%r12,4), %eax
movapd %xmm2, %xmm0
testl %eax, %eax
je 0x8717
movq 0x8(%rbx), %rcx
cvtsi2sdl (%rcx,%r12,4), %xmm1
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 0x8d67c(%rip), %xmm2    # 0x95da8
incq %r12
jmp 0x86dc
movq (%r15), %rcx
leaq 0x98bc3(%rip), %rdi     # 0xa12fe
pushq $0xb
popq %rsi
pushq $0x1
popq %rdx
callq 0x42c0
addq $0x7a138, %rsp          # imm = 0x7A138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq