// File: /workspace/github_c_makefile_star2_O1/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 0x4ff6e(%rip), %rdi     # 0xa7c4d
callq 0x5341c
movl %eax, %r14d
leaq 0x53e2e(%rip), %rdi     # 0xabb1c
callq 0x5341c
movl %eax, %ebx
movb $0x0, 0xf(%rsp)
xorl %eax, %eax
callq 0x2da74
testl %ebp, %ebp
jle 0x57e6b
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 0x858c
movq %rax, %r13
testl %ebp, %ebp
jle 0x57e55
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 0x8d55a
movq %rax, 0x18(%rsp)
cmpl $0x2, 0x10(%rsp)
jl 0x57e29
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 0x2c3cc
movl %ebx, 0x18(%rax)
leaq 0x4fe8c(%rip), %rdi     # 0xa7c56
callq 0x536e7
testl %eax, %eax
je 0x57e11
cmpl $0x0, -0x10(%rbp)
je 0x57e11
leaq 0x7a280(%rip), %rax     # 0xd2060
movb (%rbx,%rax), %al
movb %al, 0xe(%rsp)
movl $0x1, %edi
movsd 0x50(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
movq %r12, %rsi
callq 0x2c3cc
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 0x57d96
movq 0x40(%rsp), %r13
addq %r13, %r15
movq 0x18(%rsp), %rdi
callq 0x39194
movq (%r15), %rdi
movq 0x8(%r15), %rsi
callq 0x3dbad
incq %r14
cmpq 0x30(%rsp), %r14
jne 0x57d52
movq %r13, %rdi
callq 0x39194
incq %rbx
cmpq 0x20(%rsp), %rbx
jne 0x57d26
leaq 0x357246(%rip), %rax    # 0x3af0b8
movl $0xa, 0x20(%rax)
xorl %ecx, %ecx
movq %rcx, 0x10(%rax)
movabsq $0x3ff0000000000000, %rdx # imm = 0x3FF0000000000000
movq %rdx, 0x18(%rax)
movabsq $0x100000001, %rsi      # imm = 0x100000001
movq %rsi, 0x24(%rax)
movl $0x1, 0x98(%rax)
movabsq $0x10000000a, %rsi      # imm = 0x10000000A
movq %rsi, 0x90(%rax)
movq %rcx, 0x80(%rax)
movq %rdx, 0x88(%rax)
xorl %eax, %eax
callq 0x2de4a
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq