// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/plot.c
// Function: performance_plot
void performance_plot(char** names, int filecount, Performance_point (*calculate_performance)(int tp, int fp, int tn, int fn))
{
 int count = get_parameter_i("runcount") * get_parameter_i("foldcount"), i, j, k, number_of_points;
 matrixptr posteriors;
 Performance_pointptr points;
 Objectptr obj;
 char st[2];
 Point p1, p2, dummyp;
 st[1] = '\0';
 clear_image();
 for (i = 0; i < filecount; i++)
  {
   st[0] = '0';
   posteriors = read_posteriors(count, names[i]);
   for (j = 0; j < count; j++)
    {
     points = find_performance_points(posteriors[j], &number_of_points, 0, 1, calculate_performance);
     for (k = 0; k < number_of_points - 1; k++)
      {
       p1.x = points[k].x;
       p1.y = points[k].y;
       p2.x = points[k + 1].x;
       p2.y = points[k + 1].y;
       obj = add_object(OBJECT_LINE, p1, p2, dummyp, st);
       obj->fnt.fontcolor = i;
       if (get_parameter_o("displayequalloss") && points[k].equal_loss)
        {
         st[0] = plots[i];
         obj = add_object(OBJECT_STRING, p1, dummyp, dummyp, st);
         obj->fnt.fontcolor = i;
         obj->fnt.fontsize = 20;
        }
      }
     safe_free(points);
     matrix_free(posteriors[j]);
    }
   safe_free(posteriors);
  }
 img.xaxis.limitsset = 1;
 img.xaxis.lim.division = 10;
 img.xaxis.lim.min = 0.0;
 img.xaxis.lim.max = 1.0;
 img.xaxis.lim.precision = 1;
 img.yaxis.limitsset = 1;
 img.yaxis.lim.division = 10;
 img.yaxis.lim.min = 0.0;
 img.yaxis.lim.max = 1.0;
 img.yaxis.lim.precision = 1;
 export_image();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, 0x30(%rsp)
movl %esi, %r14d
movq %rdi, 0x20(%rsp)
leaq 0x4985c(%rip), %rdi     # 0x9ac2d
callq 0x4cd35
movl %eax, %ebp
leaq 0x4d72d(%rip), %rdi     # 0x9eb0c
callq 0x4cd35
movl %eax, %r15d
imull %ebp, %r15d
leaq 0xe(%rsp), %r12
movb $0x0, 0x1(%r12)
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2a510
testl %r15d, %r15d
movl $0x0, %eax
movl %r15d, 0x10(%rsp)
cmovgl %r15d, %eax
movq %rax, 0x38(%rsp)
testl %r14d, %r14d
cmovlel %ebx, %r14d
movq %r14, 0x28(%rsp)
pushq $0x1
popq %r15
leaq 0x4980a(%rip), %r14     # 0x9ac36
cmpq 0x28(%rsp), %rbx
je 0x5156f
movb $0x30, 0xe(%rsp)
movq 0x20(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movl 0x10(%rsp), %edi
callq 0x8294
movq %rax, 0x18(%rsp)
xorl %eax, %eax
cmpq 0x38(%rsp), %rax
je 0x5155d
movq %rax, 0x50(%rsp)
shlq $0x4, %rax
movq 0x18(%rsp), %rcx
leaq (%rcx,%rax), %rdx
movq %rdx, 0x48(%rsp)
movq (%rcx,%rax), %rdi
movq 0x8(%rcx,%rax), %rsi
leaq 0x14(%rsp), %rdx
xorl %ecx, %ecx
movl %r15d, %r8d
movq 0x30(%rsp), %r9
callq 0x82143
movq %rax, %rbp
movq %rax, 0x40(%rsp)
addq $0x20, %rbp
xorl %r13d, %r13d
movslq 0x14(%rsp), %rax
decq %rax
cmpq %rax, %r13
jge 0x51535
movsd -0x20(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
movsd -0x8(%rbp), %xmm2
movsd (%rbp), %xmm3
xorl %edi, %edi
movsd %xmm0, 0x60(%rsp)
movsd %xmm1, 0x58(%rsp)
movq %r12, %rsi
callq 0x28f8d
movl %ebx, 0x18(%rax)
movq %r14, %rdi
callq 0x4cff1
testl %eax, %eax
je 0x51529
cmpl $0x0, -0x10(%rbp)
je 0x51529
leaq 0x7bb66(%rip), %rax     # 0xcd060
movb (%rbx,%rax), %al
movb %al, 0xe(%rsp)
movl %r15d, %edi
movsd 0x60(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
movq %r12, %rsi
callq 0x28f8d
movl %ebx, 0x18(%rax)
movabsq $0x4034000000000000, %rcx # imm = 0x4034000000000000
movq %rcx, 0x10(%rax)
addq $0x18, %rbp
incq %r13
jmp 0x514a3
movq 0x40(%rsp), %rdi
callq 0x34ff7
movq 0x48(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x3929f
movq 0x50(%rsp), %rax
incq %rax
jmp 0x51455
movq 0x18(%rsp), %rdi
callq 0x34ff7
incq %rbx
jmp 0x5142c
leaq 0x358b42(%rip), %rax    # 0x3aa0b8
xorps %xmm0, %xmm0
movhps 0x43fa0(%rip), %xmm0    # xmm0 = xmm0[0,1],mem[0,1]
movl $0xa, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x24(%rax)
movl $0x1, 0x98(%rax)
movabsq $0x10000000a, %rcx      # imm = 0x10000000A
movq %rcx, 0x90(%rax)
movups %xmm0, 0x80(%rax)
xorl %eax, %eax
callq 0x2a858
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq