// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/plot.c
// Function: plotay
void plotay(char* names)
{
 /*!Last Changed 15.09.2006*/
 /*!Last Changed 08.10.2004 added img.xaxis.lim and img.yaxis.lim*/
 FILE* myfile;
 double obs, maxobs = -LONG_MAX, minobs = 0;
 int count2;
 char st[MAXLENGTH], *legendname;
 Point p1, p2;
 if (!get_parameter_o("hold"))
   clear_image();
 legendname = file_only_name(names);
 add_legend((char) (img.xaxis.namesavailable + '0'), legendname);
 safe_free(legendname);
 img.yaxis.available = 1;
 myfile = fopen(names, "r");
 if (!myfile)
   return;
 count2 = 0;
 while (fscanf(myfile,"%s %lf\n", st, &obs) != EOF)
  {
   count2++;
   if (!img.xaxis.namesavailable)
    {
     img.xaxis.names = alloc(img.xaxis.names, count2 * (sizeof(char*)), count2);
     img.xaxis.names[count2 - 1] = strcopy(img.xaxis.names[count2 - 1], st);
     p2.x = count2 - 1;
    }
   else
     p2.x = listindex(st, img.xaxis.names, img.xaxis.lim.division);
   p1.x = img.xaxis.namesavailable;
   p1.y = MARGIN;
   p2.y = (double) obs;
   add_object(OBJECT_RECTANGLE, p1, p2, dummyp, "");   
   if (!img.xaxis.namesavailable)
    {
     if (obs > maxobs)
       maxobs = obs;
    }
   else
     if (obs > img.yaxis.lim.max)
       img.yaxis.lim.max = obs;
  }
 fclose(myfile);
 if (!img.xaxis.namesavailable)
  {
   img.xaxis.lim.division = count2;
   img.xaxis.limitsset = 1;
   img.xaxis.lim.precision = 0;
   img.yaxis.lim.min = minobs;
   img.yaxis.lim.max = maxobs;
  }
 img.xaxis.namesavailable++;
 export_image();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a138, %rsp          # imm = 0x7A138
movq %rdi, %rbx
leaq 0x50852(%rip), %rdi     # 0xaa7b5
callq 0x54bec
testl %eax, %eax
jne 0x59f73
xorl %eax, %eax
callq 0x2e342
movq %rbx, %rdi
callq 0x38b30
movq %rax, %r14
leaq 0x358133(%rip), %r12    # 0x3b20b8
movb 0x38(%r12), %al
addb $0x30, %al
movsbl %al, %edi
movq %r14, %rsi
callq 0x2cbc4
movq %r14, %rdi
callq 0x3a180
movl $0x1, 0x78(%r12)
leaq 0x519ac(%rip), %rsi     # 0xab95b
movq %rbx, %rdi
callq 0x40f0
testq %rax, %rax
je 0x5a145
movq %rax, %rbx
leaq 0x50d77(%rip), %rsi     # 0xaad41
xorl %r13d, %r13d
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rax, %rdi
xorl %eax, %eax
callq 0x4070
movsd 0x4bddf(%rip), %xmm0    # 0xa5dc8
cmpl $-0x1, %eax
je 0x5a0f2
movsd %xmm0, (%rsp)
movl $0x8, %r14d
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %rbp
xorl %r13d, %r13d
cmpl $0x0, 0x38(%r12)
movq 0x30(%r12), %rsi
je 0x5a02d
movl 0x20(%r12), %edx
movq %r15, %rdi
callq 0x3b355
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
jmp 0x5a05e
leal 0x1(%r13), %edx
movq %rsi, %rdi
movq %r14, %rsi
callq 0x3a0b4
movq %rax, 0x30(%r12)
movq (%rax,%r13,8), %rdi
movq %r15, %rsi
callq 0x3b494
movq 0x30(%r12), %rcx
movq %rax, (%rcx,%r13,8)
xorps %xmm2, %xmm2
cvtsi2sd %r13d, %xmm2
xorps %xmm0, %xmm0
cvtsi2sdl 0x38(%r12), %xmm0
movsd 0x8(%rsp), %xmm3
movsd 0x7affa(%rip), %xmm4    # 0xd5070
movsd 0x7affa(%rip), %xmm5    # 0xd5078
movl $0x2, %edi
movsd 0x4dd7d(%rip), %xmm1    # 0xa7e08
leaq 0x5792c(%rip), %rsi     # 0xb19be
callq 0x2cc6c
cmpl $0x0, 0x38(%r12)
movsd 0x8(%rsp), %xmm0
je 0x5a0bd
ucomisd 0x88(%r12), %xmm0
jbe 0x5a0c9
movsd %xmm0, 0x88(%r12)
jmp 0x5a0c9
ucomisd (%rsp), %xmm0
jbe 0x5a0c9
movsd %xmm0, (%rsp)
movq %rbx, %rdi
leaq 0x50c6e(%rip), %rsi     # 0xaad41
movq %r15, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x4070
addq $0x8, %r14
incq %r13
cmpl $-0x1, %eax
jne 0x5a00a
jmp 0x5a0f7
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x42a0
movl 0x38(%r12), %eax
testl %eax, %eax
jne 0x5a137
movl %r13d, 0x20(%r12)
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %rcx, 0x24(%r12)
movq $0x0, 0x80(%r12)
movsd (%rsp), %xmm0
movsd %xmm0, 0x88(%r12)
incl %eax
movl %eax, 0x38(%r12)
xorl %eax, %eax
callq 0x2e6d0
addq $0x7a138, %rsp          # imm = 0x7A138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq