// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/pstricks.c
// Function: rangetest_plot_pstricks
void rangetest_plot_pstricks(double* ranks, int algorithmcount, char** algorithms, double critical_difference)
{
 FILE* outfile;
 char st[3];
 int i, j, oldj, leftcount = 0, rightcount = 0, maxcount, linecount;
 double algheight, axisheight, algwidth;
 outfile = fopen("image.txt", "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.5;
 algwidth = 1.0;
 axisheight = algheight * (maxcount + 1);
 write_image_header_pstricks(outfile, -2, -1, algorithmcount + algwidth, axisheight + algheight);
 write_line_pstricks(outfile, 0, axisheight, algorithmcount - 1, axisheight);
 for (i = 1; i <= algorithmcount; i++)
  {
   sprintf(st, "%d", i);
   write_string_pstricks(outfile, (i - 1), axisheight + .2, st, ALIGN_CENTER);
   write_line_pstricks(outfile, i - 1, axisheight - 0.1, i - 1, axisheight + 0.1);
  }
 for (i = 0; i < algorithmcount; i++)
  {
   if (ranks[i] < (1.0 + algorithmcount) / 2)
    {
     leftcount++;
     write_line_pstricks(outfile, (ranks[i] - 1) * algwidth, axisheight, (ranks[i] - 1) * algwidth, algheight * leftcount);
     write_line_pstricks(outfile, 0, algheight * leftcount, (ranks[i] - 1) * algwidth, algheight * leftcount);
     write_string_pstricks(outfile, -1.9, algheight * leftcount, algorithms[i], ALIGN_LEFT);
    }
   else
    {
     rightcount++;
     write_line_pstricks(outfile, (ranks[i] - 1) * algwidth, axisheight, (ranks[i] - 1) * algwidth, algheight * rightcount);
     write_line_pstricks(outfile, (ranks[i] - 1) * algwidth, algheight * rightcount, algorithmcount - .8, algheight * rightcount);
     write_string_pstricks(outfile, algorithmcount - .7, 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)
    {
     set_line_width_pstricks(outfile, 2.0);
     write_line_pstricks(outfile, (ranks[i] - 1) * algwidth - .1, axisheight - linecount * 0.15, (ranks[j] - 1) * algwidth + 0.1, axisheight - linecount * .15);
     set_line_width_pstricks(outfile, 1.0);
     linecount++;
    }
   oldj = j;
  }
 write_image_footer_pstricks(outfile);
 fclose(outfile);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movsd %xmm0, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movl %esi, %r15d
movq %rdi, %r14
leaq 0x3958b(%rip), %rdi     # 0xa89a8
leaq 0x3c549(%rip), %rsi     # 0xab96d
callq 0x40f0
testq %rax, %rax
je 0x6f90f
movq %rax, %rbx
movl %r15d, %edi
testl %r15d, %r15d
movq %rdi, 0x30(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
jle 0x6f494
movsd %xmm0, 0x28(%rsp)
leal 0x1(%r15), %eax
cvtsi2sd %rax, %xmm2
movsd 0x368b7(%rip), %xmm0    # 0xa5d18
movapd %xmm2, %xmm1
mulsd %xmm2, %xmm0
xorl %ecx, %ecx
xorl %ebp, %ebp
xorl %eax, %eax
xorl %edx, %edx
xorl %esi, %esi
ucomisd (%r14,%rcx,8), %xmm0
setbe %dl
seta %sil
addl %esi, %eax
addl %edx, %ebp
incq %rcx
cmpq %rcx, %rdi
jne 0x6f46f
movsd %xmm1, 0x18(%rsp)
jmp 0x6f4b0
movsd 0x36084(%rip), %xmm1    # 0xa5520
movsd %xmm0, 0x28(%rsp)
addsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rsp)
xorl %eax, %eax
xorl %ebp, %ebp
cmpl %ebp, %eax
cmovgl %eax, %ebp
xorl %eax, %eax
callq 0x2e342
incl %ebp
cvtsi2sd %ebp, %xmm3
movsd 0x3684e(%rip), %xmm0    # 0xa5d18
mulsd %xmm0, %xmm3
movsd %xmm3, 0x20(%rsp)
addsd %xmm0, %xmm3
leaq 0x3fc84(%rip), %rsi     # 0xaf163
movsd 0x38609(%rip), %xmm0    # 0xa7af0
movsd 0x368b9(%rip), %xmm1    # 0xa5da8
movq %rbx, %rdi
movsd 0x18(%rsp), %xmm2
movb $0x4, %al
callq 0x42e0
leal -0x1(%r15), %eax
movl %eax, 0x44(%rsp)
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
leaq 0x3fb2d(%rip), %rsi     # 0xaf042
xorpd %xmm0, %xmm0
movq %rbx, %rdi
movsd 0x20(%rsp), %xmm1
movapd %xmm1, %xmm3
movb $0x4, %al
callq 0x42e0
testl %r15d, %r15d
jle 0x6f8d7
movsd 0x388d2(%rip), %xmm1    # 0xa7e10
movsd 0x20(%rsp), %xmm0
addsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movsd 0x3f8e2(%rip), %xmm1    # 0xaee38
addsd %xmm0, %xmm1
movsd %xmm1, 0x38(%rsp)
movsd 0x3b6e0(%rip), %xmm1    # 0xaac48
addsd %xmm0, %xmm1
movsd %xmm1, 0x60(%rsp)
movl $0x1, %ebp
leaq 0x5d(%rsp), %r12
leaq 0x3fabf(%rip), %r13     # 0xaf042
movq %r12, %rdi
leaq 0x41668(%rip), %rsi     # 0xb0bf5
movl %ebp, %edx
xorl %eax, %eax
callq 0x41b0
leal -0x1(%rbp), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
leaq 0x3f8e0(%rip), %rsi     # 0xaee90
movsd 0x10(%rsp), %xmm1
movq %r12, %rdx
movb $0x2, %al
callq 0x42e0
movq %rbx, %rdi
movq %r13, %rsi
movsd 0x8(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movapd %xmm0, %xmm2
movsd 0x60(%rsp), %xmm3
movb $0x4, %al
callq 0x42e0
leal 0x1(%rbp), %eax
cmpl %r15d, %ebp
movl %eax, %ebp
jne 0x6f583
testl %r15d, %r15d
jle 0x6f8d7
movsd 0x18(%rsp), %xmm2
mulsd 0x36714(%rip), %xmm2    # 0xa5d18
movsd 0x3f834(%rip), %xmm1    # 0xaee40
movsd 0x28(%rsp), %xmm0
addsd %xmm0, %xmm1
movsd %xmm1, 0x38(%rsp)
addsd 0x3f824(%rip), %xmm0    # 0xaee48
movsd %xmm0, 0x28(%rsp)
xorl %r12d, %r12d
movl $0x0, 0x10(%rsp)
xorl %ebp, %ebp
movsd 0x36769(%rip), %xmm1    # 0xa5da8
movsd %xmm2, 0x18(%rsp)
movq %r15, %r13
movsd (%r14,%r12,8), %xmm0
ucomisd %xmm0, %xmm2
addsd %xmm1, %xmm0
jbe 0x6f6d6
incl %ebp
xorps %xmm3, %xmm3
cvtsi2sd %ebp, %xmm3
mulsd 0x366af(%rip), %xmm3    # 0xa5d18
movsd %xmm3, 0x8(%rsp)
movq %rbx, %rdi
leaq 0x3f9c9(%rip), %r15     # 0xaf042
movq %r15, %rsi
movsd 0x20(%rsp), %xmm1
movapd %xmm0, %xmm2
movb $0x4, %al
callq 0x42e0
movsd (%r14,%r12,8), %xmm2
addsd 0x3670d(%rip), %xmm2    # 0xa5da8
xorpd %xmm0, %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movsd 0x8(%rsp), %xmm1
movapd %xmm1, %xmm3
movb $0x4, %al
callq 0x42e0
movq 0x50(%rsp), %rax
movq (%rax,%r12,8), %rdx
movq %rbx, %rdi
leaq 0x3f797(%rip), %rsi     # 0xaee60
movsd 0x3f77f(%rip), %xmm0    # 0xaee50
jmp 0x6f757
movl 0x10(%rsp), %eax
incl %eax
movl %eax, 0x10(%rsp)
xorps %xmm3, %xmm3
cvtsi2sd %eax, %xmm3
mulsd 0x36629(%rip), %xmm3    # 0xa5d18
movsd %xmm3, 0x8(%rsp)
movq %rbx, %rdi
leaq 0x3f943(%rip), %r15     # 0xaf042
movq %r15, %rsi
movsd 0x20(%rsp), %xmm1
movapd %xmm0, %xmm2
movb $0x4, %al
callq 0x42e0
movsd (%r14,%r12,8), %xmm0
addsd 0x36687(%rip), %xmm0    # 0xa5da8
movq %rbx, %rdi
movq %r15, %rsi
movsd 0x8(%rsp), %xmm1
movsd 0x38(%rsp), %xmm2
movapd %xmm1, %xmm3
movb $0x4, %al
callq 0x42e0
movq 0x50(%rsp), %rax
movq (%rax,%r12,8), %rdx
movq %rbx, %rdi
leaq 0x3f70f(%rip), %rsi     # 0xaee60
movsd 0x28(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movb $0x2, %al
callq 0x42e0
incq %r12
movq 0x30(%rsp), %rsi
cmpq %r12, %rsi
movsd 0x36631(%rip), %xmm1    # 0xa5da8
movsd 0x18(%rsp), %xmm2
movq %r13, %r15
jne 0x6f645
leaq -0x3519a(%rip), %rcx    # 0x3a5f3
movl $0x8, %edx
movq %r14, %rdi
callq 0x4240
movq 0x30(%rsp), %rdx
cmpl $0x1, %r15d
movsd 0x48(%rsp), %xmm2
je 0x6f8ee
movl 0x44(%rsp), %esi
movl $0x1, 0x8(%rsp)
xorl %r13d, %r13d
movl $0x1, %r12d
xorl %eax, %eax
movq %rsi, 0x10(%rsp)
leaq 0x1(%r13), %r15
movsd (%r14,%r13,8), %xmm0
movsd 0x8(%r14,%r13,8), %xmm1
subsd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
movl %r15d, %ebp
jbe 0x6f806
movq %r12, %rbp
movsd (%r14,%rbp,8), %xmm1
subsd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
jbe 0x6f806
incq %rbp
cmpq %rbp, %rdx
jne 0x6f7ec
movl %edx, %ebp
decl %ebp
cmpq %rbp, %r13
sete %cl
cmpl %eax, %ebp
setle %al
orb %cl, %al
jne 0x6f8c4
movq %rbx, %rdi
leaq 0x3f972(%rip), %rsi     # 0xaf197
movsd 0x36813(%rip), %xmm0    # 0xa6040
movb $0x1, %al
callq 0x42e0
movsd (%r14,%r13,8), %xmm0
movsd 0x36566(%rip), %xmm3    # 0xa5da8
addsd %xmm3, %xmm0
addsd 0x3f5ea(%rip), %xmm0    # 0xaee38
movl 0x8(%rsp), %r13d
xorps %xmm1, %xmm1
cvtsi2sd %r13d, %xmm1
mulsd 0x3f5f5(%rip), %xmm1    # 0xaee58
addsd 0x20(%rsp), %xmm1
movslq %ebp, %rax
movsd (%r14,%rax,8), %xmm2
addsd %xmm3, %xmm2
addsd 0x3b3ca(%rip), %xmm2    # 0xaac48
movq %rbx, %rdi
leaq 0x3f7ba(%rip), %rsi     # 0xaf042
movapd %xmm1, %xmm3
movb $0x4, %al
callq 0x42e0
movq %rbx, %rdi
leaq 0x3f8fa(%rip), %rsi     # 0xaf197
movsd 0x35c7b(%rip), %xmm0    # 0xa5520
movb $0x1, %al
callq 0x42e0
movq 0x10(%rsp), %rsi
movq 0x30(%rsp), %rdx
movsd 0x48(%rsp), %xmm2
incl %r13d
movl %r13d, 0x8(%rsp)
incq %r12
movq %r15, %r13
movl %ebp, %eax
cmpq %rsi, %r15
jne 0x6f7cb
jmp 0x6f8ee
movslq %r15d, %rsi
leaq -0x352ee(%rip), %rcx    # 0x3a5f3
movl $0x8, %edx
movq %r14, %rdi
callq 0x4240
leaq 0x3f890(%rip), %rdi     # 0xaf185
movl $0x11, %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