// File: /workspace/github_c_makefile_star2_O1/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, %r13d
movq %rdi, %r14
leaq 0x37c3f(%rip), %rdi     # 0xa5930
leaq 0x3aba9(%rip), %rsi     # 0xa88a1
callq 0x40f0
testq %rax, %rax
je 0x6e1b3
movq %rax, 0x28(%rsp)
movl %r13d, %r15d
cvtsi2sd %r13d, %xmm1
testl %r13d, %r13d
movsd %xmm1, 0x18(%rsp)
jle 0x6dd57
movsd 0x347fa(%rip), %xmm0    # 0xa2520
addsd %xmm1, %xmm0
mulsd 0x34fe6(%rip), %xmm0    # 0xa2d18
xorl %ecx, %ecx
xorl %ebx, %ebx
xorl %eax, %eax
xorl %edx, %edx
xorl %esi, %esi
ucomisd (%r14,%rcx,8), %xmm0
setbe %dl
seta %sil
addl %esi, %eax
addl %edx, %ebx
incq %rcx
cmpq %rcx, %r15
jne 0x6dd38
jmp 0x6dd5b
xorl %eax, %eax
xorl %ebx, %ebx
cmpl %ebx, %eax
cmovgl %eax, %ebx
xorl %eax, %eax
callq 0x2da74
incl %ebx
cvtsi2sd %ebx, %xmm3
movsd 0x34fa3(%rip), %xmm0    # 0xa2d18
mulsd %xmm0, %xmm3
movsd %xmm3, 0x10(%rsp)
movsd 0x34799(%rip), %xmm2    # 0xa2520
addsd 0x18(%rsp), %xmm2
addsd %xmm0, %xmm3
leaq 0x3e2f3(%rip), %rsi     # 0xac08b
movsd 0x36c98(%rip), %xmm0    # 0xa4a38
movsd 0x35000(%rip), %xmm1    # 0xa2da8
movq 0x28(%rsp), %rbx
movq %rbx, %rdi
movsd %xmm2, 0x8(%rsp)
movb $0x4, %al
callq 0x42e0
leal -0x1(%r13), %eax
movl %eax, 0x44(%rsp)
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
leaq 0x3e197(%rip), %rsi     # 0xabf6a
xorpd %xmm0, %xmm0
movq %rbx, %rdi
movsd 0x10(%rsp), %xmm1
movapd %xmm1, %xmm3
movb $0x4, %al
callq 0x42e0
testl %r13d, %r13d
jle 0x6dea6
movsd 0x36f8c(%rip), %xmm1    # 0xa4d88
movsd 0x10(%rsp), %xmm0
addsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rsp)
movsd 0x3df4c(%rip), %xmm1    # 0xabd60
addsd %xmm0, %xmm1
movsd %xmm1, 0x38(%rsp)
movsd 0x39d72(%rip), %xmm1    # 0xa7b98
addsd %xmm0, %xmm1
movsd %xmm1, 0x30(%rsp)
movl $0x1, %ebp
leaq 0x5d(%rsp), %r12
movq %r12, %rdi
leaq 0x3fd19(%rip), %rsi     # 0xadb5d
movl %ebp, %edx
xorl %eax, %eax
callq 0x41b0
leal -0x1(%rbp), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, (%rsp)
movq %rbx, %rdi
leaq 0x3df52(%rip), %rsi     # 0xabdb8
movsd 0x20(%rsp), %xmm1
movq %r12, %rdx
movb $0x2, %al
callq 0x42e0
movq %rbx, %rdi
leaq 0x3e0ea(%rip), %rsi     # 0xabf6a
movsd (%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movapd %xmm0, %xmm2
movsd 0x30(%rsp), %xmm3
movb $0x4, %al
callq 0x42e0
leal 0x1(%rbp), %eax
cmpl %r13d, %ebp
movl %eax, %ebp
jne 0x6de3a
movq %r13, 0x30(%rsp)
testl %r13d, %r13d
movsd 0x34ef2(%rip), %xmm1    # 0xa2da8
jle 0x6e034
movsd 0x8(%rsp), %xmm0
mulsd 0x34e4e(%rip), %xmm0    # 0xa2d18
movsd %xmm0, 0x8(%rsp)
movsd 0x3de90(%rip), %xmm2    # 0xabd68
movsd 0x18(%rsp), %xmm0
addsd %xmm0, %xmm2
movsd %xmm2, 0x38(%rsp)
addsd 0x3de80(%rip), %xmm0    # 0xabd70
movsd %xmm0, 0x18(%rsp)
xorl %r12d, %r12d
movl $0x0, 0x20(%rsp)
xorl %r13d, %r13d
movsd (%r14,%r12,8), %xmm0
movsd 0x8(%rsp), %xmm2
ucomisd %xmm0, %xmm2
addsd %xmm1, %xmm0
jbe 0x6df95
incl %r13d
xorps %xmm3, %xmm3
cvtsi2sd %r13d, %xmm3
mulsd 0x34deb(%rip), %xmm3    # 0xa2d18
movsd %xmm3, (%rsp)
movq %rbx, %rdi
leaq 0x3e02e(%rip), %rbp     # 0xabf6a
movq %rbp, %rsi
movsd 0x10(%rsp), %xmm1
movapd %xmm0, %xmm2
movb $0x4, %al
callq 0x42e0
movsd (%r14,%r12,8), %xmm2
addsd 0x34e4a(%rip), %xmm2    # 0xa2da8
xorpd %xmm0, %xmm0
movq %rbx, %rdi
movq %rbp, %rsi
movsd (%rsp), %xmm1
movapd %xmm1, %xmm3
movb $0x4, %al
callq 0x42e0
movq 0x50(%rsp), %rax
movq (%rax,%r12,8), %rdx
movq %rbx, %rdi
leaq 0x3ddfd(%rip), %rsi     # 0xabd88
movsd 0x3dde5(%rip), %xmm0    # 0xabd78
jmp 0x6e014
movl 0x20(%rsp), %eax
incl %eax
movl %eax, 0x20(%rsp)
xorps %xmm3, %xmm3
cvtsi2sd %eax, %xmm3
mulsd 0x34d6a(%rip), %xmm3    # 0xa2d18
movsd %xmm3, (%rsp)
movq %rbx, %rdi
leaq 0x3dfad(%rip), %rbp     # 0xabf6a
movq %rbp, %rsi
movsd 0x10(%rsp), %xmm1
movapd %xmm0, %xmm2
movb $0x4, %al
callq 0x42e0
movsd (%r14,%r12,8), %xmm0
addsd 0x34dc9(%rip), %xmm0    # 0xa2da8
movq %rbx, %rdi
movq %rbp, %rsi
movsd (%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 0x3dd7a(%rip), %rsi     # 0xabd88
movsd 0x18(%rsp), %xmm0
movsd (%rsp), %xmm1
movb $0x2, %al
callq 0x42e0
incq %r12
cmpq %r12, %r15
movsd 0x34d7a(%rip), %xmm1    # 0xa2da8
jne 0x6df04
movq 0x30(%rsp), %rbx
movslq %ebx, %rsi
leaq -0x34a5c(%rip), %rcx    # 0x395e7
movl $0x8, %edx
movq %r14, %rdi
callq 0x4240
cmpl $0x2, %ebx
movsd 0x48(%rsp), %xmm2
jl 0x6e18d
movl 0x44(%rsp), %edx
movl $0x1, (%rsp)
xorl %r12d, %r12d
movl $0x1, %r13d
xorl %eax, %eax
movq %r15, 0x60(%rsp)
movq %rdx, 0x8(%rsp)
leaq 0x1(%r12), %rbx
movsd (%r14,%r12,8), %xmm0
movsd 0x8(%r14,%r12,8), %xmm1
subsd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
movl %ebx, %ebp
jbe 0x6e0bb
movq %r13, %rbp
movsd (%r14,%rbp,8), %xmm1
subsd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
jbe 0x6e0bb
incq %rbp
cmpq %rbp, %r15
jne 0x6e0a0
movl %r15d, %ebp
decl %ebp
cmpq %rbp, %r12
sete %cl
cmpl %eax, %ebp
setle %al
orb %cl, %al
jne 0x6e17c
movq 0x28(%rsp), %r15
movq %r15, %rdi
leaq 0x3dfe0(%rip), %rsi     # 0xac0bf
movsd 0x34f59(%rip), %xmm0    # 0xa3040
movb $0x1, %al
callq 0x42e0
movsd (%r14,%r12,8), %xmm0
movsd 0x34cac(%rip), %xmm3    # 0xa2da8
addsd %xmm3, %xmm0
addsd 0x3dc58(%rip), %xmm0    # 0xabd60
movl (%rsp), %r12d
xorps %xmm1, %xmm1
cvtsi2sd %r12d, %xmm1
mulsd 0x3dc64(%rip), %xmm1    # 0xabd80
addsd 0x10(%rsp), %xmm1
movslq %ebp, %rax
movsd (%r14,%rax,8), %xmm2
addsd %xmm3, %xmm2
addsd 0x39a61(%rip), %xmm2    # 0xa7b98
movq %r15, %rdi
leaq 0x3de29(%rip), %rsi     # 0xabf6a
movapd %xmm1, %xmm3
movb $0x4, %al
callq 0x42e0
movq %r15, %rdi
movq 0x60(%rsp), %r15
leaq 0x3df64(%rip), %rsi     # 0xac0bf
movsd 0x343bd(%rip), %xmm0    # 0xa2520
movb $0x1, %al
callq 0x42e0
movq 0x8(%rsp), %rdx
movsd 0x48(%rsp), %xmm2
incl %r12d
movl %r12d, (%rsp)
incq %r13
movq %rbx, %r12
movl %ebp, %eax
cmpq %rdx, %rbx
jne 0x6e07f
leaq 0x3df19(%rip), %rdi     # 0xac0ad
movl $0x11, %esi
movl $0x1, %edx
movq 0x28(%rsp), %rbx
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