// File: /workspace/github_c_makefile_star2_O1/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, 0x58(%rsp)
movq %rdx, 0x28(%rsp)
movl %esi, %ebx
movq %rdi, %r14
leaq 0x7f1f8(%rip), %rdi     # 0xa4eb3
leaq 0x82bdf(%rip), %rsi     # 0xa88a1
callq 0x40f0
testq %rax, %rax
je 0x261eb
movq %rax, %r15
movl %ebx, %edi
cvtsi2sd %ebx, %xmm1
testl %ebx, %ebx
movsd %xmm1, 0x10(%rsp)
jle 0x25d1e
movsd 0x7c835(%rip), %xmm0    # 0xa2520
addsd %xmm1, %xmm0
mulsd 0x7d021(%rip), %xmm0    # 0xa2d18
xorl %ecx, %ecx
xorl %r12d, %r12d
xorl %eax, %eax
xorl %edx, %edx
xorl %esi, %esi
ucomisd (%r14,%rcx,8), %xmm0
setbe %dl
seta %sil
addl %esi, %eax
addl %edx, %r12d
incq %rcx
cmpq %rcx, %rdi
jne 0x25cfe
jmp 0x25d23
xorl %eax, %eax
xorl %r12d, %r12d
movq %rdi, 0x40(%rsp)
cmpl %r12d, %eax
cmovgl %eax, %r12d
xorl %eax, %eax
callq 0x2da74
leal -0x1(%rbx), %ecx
movl $0x1a4, %eax            # imm = 0x1A4
xorl %edx, %edx
movl %ecx, 0x4c(%rsp)
idivl %ecx
movl %eax, 0x8(%rsp)
movl %r12d, %r13d
shll $0x5, %r13d
leal 0x22(%r13,%r12,2), %ebp
leal 0x44(%r13,%r12,2), %edx
movq %r15, %rdi
movl $0x294, %esi            # imm = 0x294
callq 0x22236
leaq 0x7f293(%rip), %rsi     # 0xa5002
movq %r15, %rdi
movq %r15, 0x20(%rsp)
movl $0x50, %r15d
movl $0x50, %edx
movl %ebp, %ecx
movl $0x1f4, %r8d            # imm = 0x1F4
movl %ebp, 0x18(%rsp)
movl %ebp, %r9d
xorl %eax, %eax
callq 0x42e0
movq %rbx, 0x30(%rsp)
testl %ebx, %ebx
movq 0x20(%rsp), %rbp
jle 0x25e3b
leal (%r13,%r12,2), %eax
leal 0x2c(%rax), %ecx
movl %ecx, 0x54(%rsp)
leal 0x1d(%rax), %ecx
movl %ecx, 0x50(%rsp)
addl $0x27, %eax
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rbx
negl %ebx
movl $0x1, %r13d
leaq 0x65(%rsp), %r12
movq %r12, %rdi
leaq 0x87d7c(%rip), %rsi     # 0xadb5d
movl %r13d, %edx
xorl %eax, %eax
callq 0x41b0
movq %rbp, %rdi
movl %r15d, %esi
movl 0x54(%rsp), %edx
movq %r12, %rcx
movl $0x2, %r8d
callq 0x22d13
movq %rbp, %rdi
leaq 0x7f1f5(%rip), %rsi     # 0xa5002
movl %r15d, %edx
movl 0x50(%rsp), %ecx
movl %r15d, %r8d
movq 0x38(%rsp), %r9
xorl %eax, %eax
callq 0x42e0
leal (%rbx,%r13), %eax
incl %eax
movl %r13d, %ecx
incl %ecx
addl 0x8(%rsp), %r15d
movl %ecx, %r13d
cmpl $0x1, %eax
jne 0x25dd7
xorps %xmm0, %xmm0
cvtsi2sdl 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
cmpl $0x0, 0x30(%rsp)
movq 0x40(%rsp), %rbx
movsd 0x10(%rsp), %xmm1
jle 0x26010
addsd 0x7c6b8(%rip), %xmm1    # 0xa2520
mulsd 0x7cea8(%rip), %xmm1    # 0xa2d18
movsd 0x7cf30(%rip), %xmm2    # 0xa2da8
xorl %r15d, %r15d
xorl %ecx, %ecx
xorl %esi, %esi
movsd %xmm1, 0x10(%rsp)
movsd (%r14,%r15,8), %xmm0
ucomisd %xmm0, %xmm1
addsd %xmm2, %xmm0
jbe 0x25f46
mulsd 0x8(%rsp), %xmm0
movsd 0x7eed9(%rip), %xmm1    # 0xa4d80
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %edx
movl %esi, %r12d
incl %r12d
movl %r12d, %eax
shll $0x5, %eax
leal (%rax,%rsi,2), %ebp
addl $0x2, %ebp
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
leaq 0x7f132(%rip), %rsi     # 0xa5002
movq %rcx, %r13
movl 0x18(%rsp), %ecx
movl %edx, %r8d
movl %ebp, %r9d
xorl %eax, %eax
callq 0x42e0
movsd (%r14,%r15,8), %xmm0
addsd 0x7ceb6(%rip), %xmm0    # 0xa2da8
mulsd 0x8(%rsp), %xmm0
addsd 0x7ee80(%rip), %xmm0    # 0xa4d80
cvttsd2si %xmm0, %r8d
movq %rbx, %rdi
leaq 0x7f0f3(%rip), %rsi     # 0xa5002
movl $0x46, %edx
movl %ebp, %ecx
movl %ebp, %r9d
xorl %eax, %eax
callq 0x42e0
movq 0x28(%rsp), %rax
movq (%rax,%r15,8), %rcx
movq %rbx, %rdi
movl $0x5, %esi
movl %ebp, %edx
xorl %r8d, %r8d
callq 0x22d13
movq %r13, %rcx
movl %r12d, %esi
jmp 0x25ff1
mulsd 0x8(%rsp), %xmm0
movsd 0x7ee2c(%rip), %xmm1    # 0xa4d80
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %edx
movl %ecx, %r12d
incl %r12d
movl %r12d, %eax
shll $0x5, %eax
leal (%rax,%rcx,2), %ebp
addl $0x2, %ebp
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
leaq 0x7f085(%rip), %r13     # 0xa5002
movq %rsi, 0x38(%rsp)
movq %r13, %rsi
movl 0x18(%rsp), %ecx
movl %edx, %r8d
movl %ebp, %r9d
xorl %eax, %eax
callq 0x42e0
movsd (%r14,%r15,8), %xmm0
addsd 0x7ce04(%rip), %xmm0    # 0xa2da8
mulsd 0x8(%rsp), %xmm0
addsd 0x7edce(%rip), %xmm0    # 0xa4d80
cvttsd2si %xmm0, %edx
movq %rbx, %rdi
movq %r13, %rsi
movl %ebp, %ecx
movl $0x1fe, %r8d            # imm = 0x1FE
movl %ebp, %r9d
xorl %eax, %eax
callq 0x42e0
movq 0x28(%rsp), %rax
movq (%rax,%r15,8), %rcx
movq %rbx, %rdi
movl $0x203, %esi            # imm = 0x203
movl %ebp, %edx
xorl %r8d, %r8d
callq 0x22d13
movq 0x38(%rsp), %rsi
movl %r12d, %ecx
incq %r15
movq 0x40(%rsp), %rbx
cmpq %r15, %rbx
movsd 0x10(%rsp), %xmm1
movsd 0x7cd9e(%rip), %xmm2    # 0xa2da8
jne 0x25e85
movq 0x30(%rsp), %r15
movslq %r15d, %rsi
leaq 0x135c8(%rip), %rcx     # 0x395e7
movl $0x8, %edx
movq %r14, %rdi
callq 0x4240
cmpl $0x2, %r15d
movsd 0x58(%rsp), %xmm2
jl 0x261ac
xorps %xmm0, %xmm0
cvtsi2sdl 0x18(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movl 0x4c(%rsp), %edx
movl $0x1, 0x10(%rsp)
movl $0x1, %r12d
xorl %r13d, %r13d
xorl %eax, %eax
movq %rdx, 0x18(%rsp)
leaq 0x1(%r13), %rbp
movsd (%r14,%r13,8), %xmm0
movsd 0x8(%r14,%r13,8), %xmm1
subsd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
movl %ebp, %r15d
jbe 0x260a3
movq %r12, %r15
movsd (%r14,%r15,8), %xmm1
subsd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
jbe 0x260a3
incq %r15
cmpq %r15, %rbx
jne 0x26088
movl %ebx, %r15d
decl %r15d
cmpq %r15, %r13
sete %cl
cmpl %eax, %r15d
setle %al
orb %cl, %al
jne 0x2619a
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
leaq 0x7ee32(%rip), %rsi     # 0xa4efb
movsd 0x7cd17(%rip), %xmm0    # 0xa2de8
movb $0x1, %al
callq 0x42e0
movsd (%r14,%r13,8), %xmm0
movsd 0x7ccc2(%rip), %xmm2    # 0xa2da8
addsd %xmm2, %xmm0
movsd 0x8(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x7ec84(%rip), %xmm3    # 0xa4d80
addsd %xmm3, %xmm0
addsd 0x7ec90(%rip), %xmm0    # 0xa4d98
cvttsd2si %xmm0, %edx
movl 0x10(%rsp), %r13d
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
mulsd 0x7ec37(%rip), %xmm0    # 0xa4d58
movsd 0x7ec77(%rip), %xmm4    # 0xa4da0
mulsd %xmm4, %xmm0
addsd 0x28(%rsp), %xmm0
cvttsd2si %xmm0, %ecx
movslq %r15d, %rax
movsd (%r14,%rax,8), %xmm0
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
addsd %xmm3, %xmm0
addsd %xmm4, %xmm0
cvttsd2si %xmm0, %r8d
movq %rbx, %rdi
leaq 0x7eea3(%rip), %rsi     # 0xa5002
movl %ecx, %r9d
xorl %eax, %eax
callq 0x42e0
movq %rbx, %rdi
movq 0x40(%rsp), %rbx
leaq 0x7ed83(%rip), %rsi     # 0xa4efb
movsd 0x7c3a0(%rip), %xmm0    # 0xa2520
movb $0x1, %al
callq 0x42e0
movq 0x18(%rsp), %rdx
movsd 0x58(%rsp), %xmm2
incl %r13d
movl %r13d, 0x10(%rsp)
incq %r12
movq %rbp, %r13
movl %r15d, %eax
cmpq %rdx, %rbp
jne 0x26067
leaq 0x7ecab(%rip), %rdi     # 0xa4e5e
movl $0x7, %esi
movl $0x1, %edx
movq 0x20(%rsp), %rbx
movq %rbx, %rcx
callq 0x42c0
leaq 0x7eded(%rip), %rdi     # 0xa4fbe
movl $0x9, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
movq %rbx, %rdi
callq 0x42a0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq