// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/eps.c
// Function: rank_plot
void rank_plot(char** names, int filecount)
{
 FILE* myfile, *outfile;
 int obs, i, barheight = MARGIN, bargap = SMALLMARGIN, gap = SMALLMARGIN, count = file_length(names[0]), barwidth = epsaxis / (count * filecount) - bargap;
 outfile = fopen("image.eps", "w");
 if (!outfile)
   return; 
 write_image_header(outfile, 2 * MARGIN + epsaxis, (barheight + gap) * filecount + gap);
 for (i = 0; i < filecount; i++)
   write_line(outfile, MARGIN, (barheight + gap) * i + gap, epsaxis + MARGIN, (barheight + gap) * i + gap);
 for (i = 0; i < filecount; i++)
  {
   myfile = fopen(names[i], "r");
   if (!myfile)
    { 
     printf(m1274, names[i]);
     return;
    }
   while (fscanf(myfile, "%d\n", &obs) != EOF)
     write_rectangle(outfile, MARGIN + (barwidth + bargap) * (obs - 1), (barheight + gap) * i + gap, MARGIN + (barwidth + bargap) * (obs - 1) + barwidth, (barheight + gap) * i + 0.75 * barheight, FILL_COLOR, i % COLORCOUNT);
   fclose(myfile);
  }  
 write_image_footer(outfile);
 fclose(outfile);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %ebx
movq %rdi, 0x20(%rsp)
movq (%rdi), %rdi
callq 0x37e22
movl %eax, %ecx
imull %ebx, %ecx
movl $0x1f4, %eax            # imm = 0x1F4
xorl %edx, %edx
idivl %ecx
movl %eax, %r15d
leaq 0x7f41f(%rip), %rdi     # 0xa4eb3
leaq 0x82e06(%rip), %rsi     # 0xa88a1
callq 0x40f0
testq %rax, %rax
je 0x25c87
movq %rax, %r14
movq %r15, 0x18(%rsp)
imull $0x55, %ebx, %edx
addl $0x5, %edx
movq %rax, %rdi
movl $0x294, %esi            # imm = 0x294
callq 0x22236
testl %ebx, %ebx
jle 0x25afc
movl $0x5, %ebp
leaq 0x7f52e(%rip), %r12     # 0xa5002
movl %ebx, %r15d
movq %r14, %rdi
movq %r12, %rsi
movl $0x50, %edx
movl %ebp, %ecx
movl $0x244, %r8d            # imm = 0x244
movl %ebp, %r9d
xorl %eax, %eax
callq 0x42e0
addl $0x55, %ebp
decl %r15d
jne 0x25ad7
testl %ebx, %ebx
jle 0x25c2f
movq 0x18(%rsp), %rax
leal -0x5(%rax), %ebp
movl %ebx, %eax
movq %rax, 0x30(%rsp)
leaq 0x87a2f(%rip), %r15     # 0xad549
leaq 0xc(%rsp), %r12
xorl %ecx, %ecx
movq %r14, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rcx, 0x10(%rsp)
movq (%rax,%rcx,8), %rdi
leaq 0x82d54(%rip), %rsi     # 0xa888f
callq 0x40f0
testq %rax, %rax
je 0x25c6b
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x4070
cmpl $-0x1, %eax
movq 0x18(%rsp), %r14
je 0x25c03
movq 0x10(%rsp), %rdx
imull $0x55, %edx, %r12d
addl $0x3c, %r12d
movl %edx, %eax
movl $0xaaaaaaab, %ecx       # imm = 0xAAAAAAAB
imulq %rcx, %rax
shrq $0x23, %rax
shll $0x2, %eax
leal (%rax,%rax,2), %eax
imull $0x55, %edx, %r13d
movl %edx, %ecx
subl %eax, %ecx
leaq (%rcx,%rcx,2), %rax
leaq 0xac021(%rip), %rcx     # 0xd1bc0
leaq (%rcx,%rax,8), %r15
addl $0x5, %r13d
movl 0xc(%rsp), %eax
decl %eax
imull %r14d, %eax
leal (%rax,%rbp), %r8d
addl $0x50, %r8d
movl %eax, %edx
addl $0x50, %edx
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
movsd 0x10(%r15), %xmm2
movq 0x28(%rsp), %rdi
leaq 0x7f511(%rip), %rsi     # 0xa50ec
movl %r13d, %ecx
movl %r12d, %r9d
movb $0x3, %al
callq 0x42e0
movq %rbx, %rdi
leaq 0x87957(%rip), %rsi     # 0xad549
leaq 0xc(%rsp), %rdx
xorl %eax, %eax
callq 0x4070
cmpl $-0x1, %eax
jne 0x25ba7
movq %rbx, %rdi
callq 0x42a0
movq 0x10(%rsp), %rcx
incq %rcx
cmpq 0x30(%rsp), %rcx
movq 0x28(%rsp), %r14
leaq 0x87925(%rip), %r15     # 0xad549
leaq 0xc(%rsp), %r12
jne 0x25b26
leaq 0x7f228(%rip), %rdi     # 0xa4e5e
movl $0x7, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
leaq 0x7f36f(%rip), %rdi     # 0xa4fbe
movl $0x9, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
movq %r14, %rdi
callq 0x42a0
jmp 0x25c87
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x7d58a(%rip), %rdi     # 0xa320a
xorl %eax, %eax
callq 0x4030
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq