// File: /workspace/github_c_makefile_star2_O3/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 0x8ad7
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a138, %rsp          # imm = 0x7A138
testl %eax, %eax
je 0x888f
movq %rdi, %r15
leaq 0x3a9859(%rip), %r14    # 0x3b20a8
movq (%r14), %rdi
leaq 0xa7d88(%rip), %rsi     # 0xb05e1
xorl %eax, %eax
callq 0x42e0
testq %r15, %r15
je 0x8ac6
leaq 0xa8385(%rip), %rbx     # 0xb0bf5
movq (%r14), %rdi
movl 0x1c(%r15), %edx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x42e0
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0x8870
jmp 0x8ac6
movl %r9d, %r14d
movl %r8d, %ebp
movq %rsi, %rbx
testl %ecx, %ecx
je 0x8935
movsd %xmm0, 0x8(%rsp)
leaq 0x9d586(%rip), %rdx     # 0xa5e33
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x3a535
leaq 0x3a97e5(%rip), %rax    # 0x3b20a8
movq (%rax), %rdi
xorps %xmm0, %xmm0
cvtsi2sdl (%rbx), %xmm0
movsd 0x9d4cb(%rip), %xmm2    # 0xa5da0
mulsd %xmm2, %xmm0
cvtsi2sdl 0x30(%rbx), %xmm1
divsd %xmm1, %xmm0
testl %ebp, %ebp
jne 0x88f2
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 0x9d48f(%rip), %xmm0    # 0xa5da0
mulsd %xmm0, %xmm2
xorps %xmm1, %xmm1
cvtsi2sdl 0x30(%rbx), %xmm1
divsd %xmm1, %xmm2
subsd %xmm2, %xmm0
leaq 0x9d50f(%rip), %rdi     # 0xa5e3b
movb $0x1, %al
callq 0x4030
jmp 0x8991
leaq 0xa085f(%rip), %rdx     # 0xa919b
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x3a535
leaq 0x3a9759(%rip), %rax    # 0x3b20a8
movq (%rax), %rdi
xorps %xmm0, %xmm0
cvtsi2sdl (%rbx), %xmm0
mulsd 0x9d43f(%rip), %xmm0    # 0xa5da0
cvtsi2sdl 0x30(%rbx), %xmm1
divsd %xmm1, %xmm0
testl %ebp, %ebp
je 0x8975
leaq 0x10(%rsp), %rsi
jmp 0x898a
movsd 0x9d423(%rip), %xmm1    # 0xa5da0
subsd %xmm0, %xmm1
leaq 0x10(%rsp), %rsi
movapd %xmm1, %xmm0
movb $0x1, %al
callq 0x42e0
testl %r14d, %r14d
je 0x8ac6
leaq 0xa07fa(%rip), %rdx     # 0xa919b
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x3a535
leaq 0x3a96f4(%rip), %r15    # 0x3b20a8
movq (%r15), %rcx
leaq 0xa89e0(%rip), %rdi     # 0xb139e
movl $0xb, %esi
movl $0x1, %edx
callq 0x42c0
leaq 0xcce9c(%rip), %r12     # 0xd5870
movq (%r12), %rax
movl 0x10(%rax), %eax
testl %ebp, %ebp
je 0x8a40
testl %eax, %eax
jle 0x8aad
xorl %r13d, %r13d
leaq 0x10(%rsp), %r14
movq 0x10(%rbx), %rax
movl (%rax,%r13,4), %eax
testl %eax, %eax
je 0x8a1d
movq 0x8(%rbx), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx,%r13,4), %xmm0
mulsd 0x9d390(%rip), %xmm0    # 0xa5da0
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
jmp 0x8a21
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 0x89ef
jmp 0x8aad
testl %eax, %eax
jle 0x8aad
xorl %r13d, %r13d
movsd 0x9d351(%rip), %xmm2    # 0xa5da0
leaq 0x10(%rsp), %r14
movq 0x10(%rbx), %rax
movl (%rax,%r13,4), %eax
movapd %xmm2, %xmm0
testl %eax, %eax
je 0x8a88
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 0x9d303(%rip), %xmm2    # 0xa5da0
incq %r13
movq (%r12), %rax
movslq 0x10(%rax), %rax
cmpq %rax, %r13
jl 0x8a54
movq (%r15), %rcx
leaq 0xa88e7(%rip), %rdi     # 0xb139e
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