// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x50, -0x2c(%rbp)
movl $0x5, -0x30(%rbp)
movl $0x5, -0x34(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x50f90
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %ecx
imull -0xc(%rbp), %ecx
movl $0x1f4, %eax            # imm = 0x1F4
cltd
idivl %ecx
subl -0x30(%rbp), %eax
movl %eax, -0x3c(%rbp)
leaq 0xae9c4(%rip), %rdi     # 0xe4a53
leaq 0xb2128(%rip), %rsi     # 0xe81be
callq 0x40c0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x360ab
jmp 0x36238
movq -0x20(%rbp), %rdi
movl -0x2c(%rbp), %edx
addl -0x34(%rbp), %edx
imull -0xc(%rbp), %edx
addl -0x34(%rbp), %edx
movl $0x294, %esi            # imm = 0x294
callq 0x31a50
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x36111
movq -0x20(%rbp), %rdi
movl -0x2c(%rbp), %edx
addl -0x34(%rbp), %edx
imull -0x28(%rbp), %edx
addl -0x34(%rbp), %edx
movl -0x2c(%rbp), %r8d
addl -0x34(%rbp), %r8d
imull -0x28(%rbp), %r8d
addl -0x34(%rbp), %r8d
movl $0x50, %esi
movl $0x244, %ecx            # imm = 0x244
callq 0x32a70
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x360cd
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x36226
movq -0x8(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xb206f(%rip), %rsi     # 0xe81a6
callq 0x40c0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x36166
movq -0x8(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xacd30(%rip), %rdi     # 0xe2e8a
movb $0x0, %al
callq 0x4030
jmp 0x36238
jmp 0x36168
movq -0x18(%rbp), %rdi
leaq 0xb6ade(%rip), %rsi     # 0xecc51
leaq -0x24(%rbp), %rdx
movb $0x0, %al
callq 0x4070
cmpl $-0x1, %eax
je 0x3620f
movq -0x20(%rbp), %rdi
movl -0x3c(%rbp), %esi
addl -0x30(%rbp), %esi
movl -0x24(%rbp), %eax
subl $0x1, %eax
imull %eax, %esi
addl $0x50, %esi
movl -0x2c(%rbp), %eax
addl -0x34(%rbp), %eax
imull -0x28(%rbp), %eax
addl -0x34(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %ecx
addl -0x30(%rbp), %ecx
movl -0x24(%rbp), %eax
subl $0x1, %eax
imull %eax, %ecx
addl $0x50, %ecx
addl -0x3c(%rbp), %ecx
movl -0x2c(%rbp), %eax
addl -0x34(%rbp), %eax
imull -0x28(%rbp), %eax
cvtsi2sd %eax, %xmm1
cvtsi2sdl -0x2c(%rbp), %xmm0
movsd 0xae6ab(%rip), %xmm2    # 0xe4888
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %r8d
movl -0x28(%rbp), %eax
movl $0xc, %r9d
cltd
idivl %r9d
movl %edx, %eax
movl -0x40(%rbp), %edx
movl $0x4, %r9d
movl %eax, (%rsp)
callq 0x32d30
jmp 0x36168
movq -0x18(%rbp), %rdi
callq 0x4250
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x36118
movq -0x20(%rbp), %rdi
callq 0x32ec0
movq -0x20(%rbp), %rdi
callq 0x4250
addq $0x50, %rsp
popq %rbp
retq
nop