// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/eps.c
// Function: rangetest_plot
void rangetest_plot(double* ranks, int algorithmcount, char** algorithms, double critical_difference)
{
 FILE* outfile;
 char st[3];
 int i, j, oldj, algheight, axisheight, algwidth, leftcount = 0, rightcount = 0, maxcount, linecount;
 outfile = fopen("image.eps", "w");
 if (!outfile)
   return;
 for (i = 0; i < algorithmcount; i++)
   if (ranks[i] < (1.0 + algorithmcount) / 2)
     leftcount++;
   else 
     rightcount++;
 if (leftcount > rightcount)
   maxcount = leftcount;
 else 
   maxcount = rightcount;
 leftcount = 0;
 rightcount = 0;
 clear_image();
 algheight = 0.4 * (MARGIN + SMALLMARGIN);
 algwidth = (epsaxis - MARGIN) / (algorithmcount - 1);
 axisheight = algheight * (maxcount + 1);
 write_image_header(outfile, 2 * MARGIN + epsaxis, axisheight + algheight);
 write_line(outfile, MARGIN, axisheight, epsaxis, axisheight);
 for (i = 1; i <= algorithmcount; i++)
  {
   sprintf(st, "%d", i);
   write_string(outfile, MARGIN + ((epsaxis - MARGIN) / (algorithmcount - 1)) * (i - 1), axisheight + 2 * SMALLMARGIN, st, ALIGN_CENTER);  
   write_line(outfile,  MARGIN + ((epsaxis - MARGIN) / (algorithmcount - 1)) * (i - 1), axisheight - SMALLMARGIN,  MARGIN + ((epsaxis - MARGIN) / (algorithmcount - 1)) * (i - 1), axisheight + SMALLMARGIN);
  }
 for (i = 0; i < algorithmcount; i++)
  {
   if (ranks[i] < (1.0 + algorithmcount) / 2)
    {
     leftcount++;
     write_line(outfile, MARGIN + (ranks[i] - 1) * algwidth, axisheight, MARGIN + (ranks[i] - 1) * algwidth, algheight * leftcount);
     write_line(outfile, MARGIN - 2 * SMALLMARGIN, algheight * leftcount, MARGIN + (ranks[i] - 1) * algwidth, algheight * leftcount);
     write_string(outfile, SMALLMARGIN, algheight * leftcount, algorithms[i], ALIGN_LEFT);
    }
   else
    {
     rightcount++;
     write_line(outfile, MARGIN + (ranks[i] - 1) * algwidth, axisheight, MARGIN + (ranks[i] - 1) * algwidth, algheight * rightcount);
     write_line(outfile, MARGIN + (ranks[i] - 1) * algwidth, algheight * rightcount, epsaxis + 2 * SMALLMARGIN, algheight * rightcount);
     write_string(outfile, epsaxis + 3 * SMALLMARGIN, algheight * rightcount, algorithms[i], ALIGN_LEFT);
    }
  }
 qsort(ranks, algorithmcount, sizeof(double), sort_function_double_ascending);
 linecount = 1;
 oldj = 0;
 for (i = 0; i < algorithmcount - 1; i++)
  {
   j = i + 1;
   if (ranks[j] - ranks[i] < critical_difference)
     while (j < algorithmcount && ranks[j] - ranks[i] < critical_difference)
       j++;
   j--;
   if (i != j && j > oldj)
    {
     setlinewidth(outfile, 4.0);
     write_line(outfile, MARGIN + (ranks[i] - 1) * algwidth - SMALLMARGIN, axisheight - linecount * 1.5 * SMALLMARGIN, MARGIN + (ranks[j] - 1) * algwidth + SMALLMARGIN, axisheight - linecount * 1.5 * SMALLMARGIN);
     setlinewidth(outfile, 1.0);
     linecount++;
    }
   oldj = j;
  }
 write_image_footer(outfile);
 fclose(outfile);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movsd %xmm0, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movl %esi, %ebx
movq %rdi, %r14
leaq 0x74c6a(%rip), %rdi     # 0x97e8b
leaq 0x78669(%rip), %rsi     # 0x9b891
callq 0x40f0
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x2365b
cvtsi2sd %ebx, %xmm0
addsd 0x722d9(%rip), %xmm0    # 0x95520
mulsd 0x72ad1(%rip), %xmm0    # 0x95d20
movsd %xmm0, 0x20(%rsp)
xorl %eax, %eax
testl %ebx, %ebx
movl $0x0, %r15d
cmovgl %ebx, %r15d
xorl %ecx, %ecx
xorl %ebp, %ebp
movsd 0x20(%rsp), %xmm0
cmpq %rax, %r15
je 0x2328c
xorl %edx, %edx
xorl %esi, %esi
ucomisd (%r14,%rax,8), %xmm0
setbe %dl
seta %sil
addl %esi, %ecx
addl %edx, %ebp
incq %rax
jmp 0x2326d
movq %r14, 0x40(%rsp)
cmpl %ebp, %ecx
cmovgl %ecx, %ebp
xorl %eax, %eax
callq 0x2a510
leal -0x1(%rbx), %ecx
movl $0x1a4, %eax            # imm = 0x1A4
xorl %edx, %edx
movq %rcx, 0x30(%rsp)
idivl %ecx
movl %eax, 0x8(%rsp)
imull $0x22, %ebp, %r13d
leal 0x22(%r13), %r12d
leal 0x44(%r13), %edx
movq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x294, %esi            # imm = 0x294
callq 0x1ffcc
pushq $0x50
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
movl %r12d, %edx
movl $0x1f4, %ecx            # imm = 0x1F4
movl %r12d, 0x18(%rsp)
movl %r12d, %r8d
callq 0x20866
leal 0x2c(%r13), %eax
movl %eax, 0x4c(%rsp)
leal 0x1d(%r13), %eax
movl %eax, 0x48(%rsp)
addl $0x27, %r13d
movq %r13, 0x28(%rsp)
movq %r15, 0x38(%rsp)
negl %r15d
pushq $0x1
popq %r13
leaq 0x65(%rsp), %r14
movq 0x10(%rsp), %r12
leal (%r15,%r13), %eax
cmpl $0x1, %eax
je 0x2336c
movq %r14, %rdi
leaq 0x7d82a(%rip), %rsi     # 0xa0b59
movl %r13d, %edx
xorl %eax, %eax
callq 0x41b0
movq %r12, %rdi
movl %ebp, %esi
movl 0x4c(%rsp), %edx
movq %r14, %rcx
pushq $0x2
popq %r8
callq 0x20944
movq %r12, %rdi
movl %ebp, %esi
movl 0x48(%rsp), %edx
movl %ebp, %ecx
movq 0x28(%rsp), %r8
callq 0x20866
incl %r13d
addl 0x8(%rsp), %ebp
jmp 0x2331c
cvtsi2sdl 0x8(%rsp), %xmm1
xorl %r14d, %r14d
movsd 0x72a33(%rip), %xmm2    # 0x95db0
movsd 0x74a03(%rip), %xmm3    # 0x97d88
movl $0x0, 0x28(%rsp)
xorl %r13d, %r13d
movq 0x40(%rsp), %r15
movsd %xmm1, 0x8(%rsp)
cmpq %r14, 0x38(%rsp)
je 0x234b4
movsd (%r15,%r14,8), %xmm0
movsd 0x20(%rsp), %xmm4
ucomisd %xmm0, %xmm4
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
addsd %xmm3, %xmm0
cvttsd2si %xmm0, %ecx
jbe 0x2342c
movl 0x28(%rsp), %eax
incl %eax
movl %eax, 0x28(%rsp)
imull $0x22, %eax, %ebp
movq 0x10(%rsp), %r12
movq %r12, %rdi
movl %ecx, %esi
movl 0x18(%rsp), %edx
movl %ebp, %r8d
callq 0x20866
movsd (%r15,%r14,8), %xmm0
addsd 0x729b7(%rip), %xmm0    # 0x95db0
mulsd 0x8(%rsp), %xmm0
addsd 0x74981(%rip), %xmm0    # 0x97d88
cvttsd2si %xmm0, %ecx
movq %r12, %rdi
pushq $0x46
popq %rsi
movl %ebp, %edx
movl %ebp, %r8d
callq 0x20866
movq 0x58(%rsp), %rax
movq (%rax,%r14,8), %rcx
movq %r12, %rdi
pushq $0x5
popq %rsi
jmp 0x2348c
incl %r13d
imull $0x22, %r13d, %ebp
movq 0x10(%rsp), %r12
movq %r12, %rdi
movl %ecx, %esi
movl 0x18(%rsp), %edx
movl %ebp, %r8d
callq 0x20866
movsd (%r15,%r14,8), %xmm0
addsd 0x72959(%rip), %xmm0    # 0x95db0
mulsd 0x8(%rsp), %xmm0
addsd 0x74923(%rip), %xmm0    # 0x97d88
cvttsd2si %xmm0, %esi
movq %r12, %rdi
movl %ebp, %edx
movl $0x1fe, %ecx            # imm = 0x1FE
movl %ebp, %r8d
callq 0x20866
movq 0x58(%rsp), %rax
movq (%rax,%r14,8), %rcx
movq %r12, %rdi
movl $0x203, %esi            # imm = 0x203
movl %ebp, %edx
xorl %r8d, %r8d
callq 0x20944
incq %r14
movsd 0x8(%rsp), %xmm1
movsd 0x72909(%rip), %xmm2    # 0x95db0
movsd 0x748d9(%rip), %xmm3    # 0x97d88
jmp 0x2339b
movslq %ebx, %rsi
leaq 0x11f01(%rip), %rcx     # 0x353bf
pushq $0x8
popq %rdx
movq %r15, %rdi
callq 0x4240
cvtsi2sdl 0x18(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
xorl %ebp, %ebp
movq 0x30(%rsp), %rsi
testl %esi, %esi
cmovlel %ebp, %esi
leaq 0x8(%r15), %rdi
pushq $0x1
popq %rax
movl %eax, 0x20(%rsp)
pushq $0x1
popq %r12
xorl %eax, %eax
movsd 0x50(%rsp), %xmm2
movq %rsi, 0x30(%rsp)
movq 0x10(%rsp), %r14
cmpl %r12d, %ebx
movl %r12d, %ecx
cmovgl %ebx, %ecx
cmpq %rsi, %rbp
je 0x23646
movq %r15, %rdx
leaq 0x1(%rbp), %r15
movsd (%rdx,%rbp,8), %xmm0
movsd 0x8(%rdx,%rbp,8), %xmm1
subsd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
movl %r15d, %r13d
jbe 0x23558
movl %ebp, %r13d
movq %rdi, %rdx
incl %r13d
cmpl %ebx, %r13d
jge 0x23555
movsd (%rdx), %xmm1
subsd %xmm0, %xmm1
addq $0x8, %rdx
ucomisd %xmm1, %xmm2
ja 0x23539
jmp 0x23558
movl %ecx, %r13d
decl %r13d
cmpq %r13, %rbp
sete %cl
cmpl %eax, %r13d
setle %al
orb %cl, %al
jne 0x2362f
movq %rdi, 0x38(%rsp)
movq %r14, %rdi
movsd 0x72871(%rip), %xmm0    # 0x95df0
callq 0x20858
movq 0x40(%rsp), %rcx
movsd (%rcx,%rbp,8), %xmm0
movsd 0x7281a(%rip), %xmm2    # 0x95db0
addsd %xmm2, %xmm0
movsd 0x8(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x747dc(%rip), %xmm3    # 0x97d88
addsd %xmm3, %xmm0
addsd 0x747e8(%rip), %xmm0    # 0x97da0
cvttsd2si %xmm0, %esi
movl 0x20(%rsp), %ebp
cvtsi2sd %ebp, %xmm0
mulsd 0x74794(%rip), %xmm0    # 0x97d60
movsd 0x747d4(%rip), %xmm4    # 0x97da8
mulsd %xmm4, %xmm0
addsd 0x18(%rsp), %xmm0
cvttsd2si %xmm0, %edx
movslq %r13d, %rax
movsd (%rcx,%rax,8), %xmm0
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
addsd %xmm3, %xmm0
addsd %xmm4, %xmm0
cvttsd2si %xmm0, %ecx
movq %r14, %rdi
movl %edx, %r8d
callq 0x20866
movq %r14, %rdi
movsd 0x71f0c(%rip), %xmm0    # 0x95520
callq 0x20858
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movsd 0x50(%rsp), %xmm2
incl %ebp
movl %ebp, 0x20(%rsp)
incq %r12
addq $0x8, %rdi
movq %r15, %rbp
movl %r13d, %eax
movq 0x40(%rsp), %r15
jmp 0x23502
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x20a81
movq %rbx, %rdi
callq 0x42a0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq