// File: /workspace/github_c_makefile_star2_O3/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 $0x58, %rsp
movq %rdx, 0x38(%rsp)
movl %esi, %ebp
movq %rdi, 0x28(%rsp)
leaq 0x51a6e(%rip), %rdi     # 0xaacfd
callq 0x54920
movl %eax, %r14d
leaq 0x5594a(%rip), %rdi     # 0xaebe8
callq 0x54920
movl %eax, %ebx
movb $0x0, 0xf(%rsp)
xorl %eax, %eax
callq 0x2e342
testl %ebp, %ebp
jle 0x5941b
imull %r14d, %ebx
movl %ebp, %eax
movq %rax, 0x20(%rsp)
movl %ebx, 0x14(%rsp)
movl %ebx, %eax
movq %rax, 0x30(%rsp)
xorl %ebx, %ebx
leaq 0xe(%rsp), %r12
movb $0x30, 0xe(%rsp)
movq 0x28(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movl 0x14(%rsp), %ebp
movl %ebp, %edi
callq 0x85bc
movq %rax, %r13
testl %ebp, %ebp
jle 0x59405
xorl %r14d, %r14d
movq %r13, 0x40(%rsp)
movq %r14, %r15
shlq $0x4, %r15
movq (%r13,%r15), %rdi
movq 0x8(%r13,%r15), %rsi
leaq 0x10(%rsp), %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
movq 0x38(%rsp), %r9
callq 0x8fd16
movq %rax, 0x18(%rsp)
cmpl $0x2, 0x10(%rsp)
jl 0x593d9
movq 0x18(%rsp), %rax
leaq 0x20(%rax), %rbp
xorl %r13d, %r13d
movsd -0x20(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
movsd -0x8(%rbp), %xmm2
movsd (%rbp), %xmm3
xorl %edi, %edi
movsd %xmm0, 0x50(%rsp)
movsd %xmm1, 0x48(%rsp)
movq %r12, %rsi
callq 0x2cc6c
movl %ebx, 0x18(%rax)
leaq 0x5198c(%rip), %rdi     # 0xaad06
callq 0x54bec
testl %eax, %eax
je 0x593c1
cmpl $0x0, -0x10(%rbp)
je 0x593c1
leaq 0x7bcd0(%rip), %rax     # 0xd5060
movb (%rbx,%rax), %al
movb %al, 0xe(%rsp)
movl $0x1, %edi
movsd 0x50(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
movq %r12, %rsi
callq 0x2cc6c
movl %ebx, 0x18(%rax)
movabsq $0x4034000000000000, %rcx # imm = 0x4034000000000000
movq %rcx, 0x10(%rax)
incq %r13
movslq 0x10(%rsp), %rax
decq %rax
addq $0x18, %rbp
cmpq %rax, %r13
jl 0x59346
movq 0x40(%rsp), %r13
addq %r13, %r15
movq 0x18(%rsp), %rdi
callq 0x3a180
movq (%r15), %rdi
movq 0x8(%r15), %rsi
callq 0x3ed51
incq %r14
cmpq 0x30(%rsp), %r14
jne 0x59302
movq %r13, %rdi
callq 0x3a180
incq %rbx
cmpq 0x20(%rsp), %rbx
jne 0x592d6
leaq 0x358c96(%rip), %rax    # 0x3b20b8
xorps %xmm0, %xmm0
movhps 0x4c0f4(%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 0x2e6d0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq