// File: /workspace/github_c_makefile_star2_O1/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 0x4ed3d(%rip), %rdi     # 0xa7715
callq 0x536e7
testl %eax, %eax
jne 0x589e8
xorl %eax, %eax
callq 0x2da74
movq %rbx, %rdi
callq 0x37f08
movq %rax, %r14
leaq 0x3566be(%rip), %r12    # 0x3af0b8
movb 0x38(%r12), %al
addb $0x30, %al
movsbl %al, %edi
movq %r14, %rsi
callq 0x2c324
movq %r14, %rdi
callq 0x39194
movl $0x1, 0x78(%r12)
leaq 0x4fe6b(%rip), %rsi     # 0xa888f
movq %rbx, %rdi
callq 0x40f0
testq %rax, %rax
je 0x58bba
movq %rax, %rbx
leaq 0x4f252(%rip), %rsi     # 0xa7c91
xorl %r13d, %r13d
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rax, %rdi
xorl %eax, %eax
callq 0x4070
movsd 0x4a36a(%rip), %xmm0    # 0xa2dc8
cmpl $-0x1, %eax
je 0x58b67
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 0x58aa2
movl 0x20(%r12), %edx
movq %r15, %rdi
callq 0x3a2c5
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
jmp 0x58ad3
leal 0x1(%r13), %edx
movq %rsi, %rdi
movq %r14, %rsi
callq 0x390c8
movq %rax, 0x30(%r12)
movq (%rax,%r13,8), %rdi
movq %r15, %rsi
callq 0x3a404
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 0x79585(%rip), %xmm4    # 0xd2070
movsd 0x79585(%rip), %xmm5    # 0xd2078
movl $0x2, %edi
movsd 0x4c280(%rip), %xmm1    # 0xa4d80
leaq 0x55e27(%rip), %rsi     # 0xae92e
callq 0x2c3cc
cmpl $0x0, 0x38(%r12)
movsd 0x8(%rsp), %xmm0
je 0x58b32
ucomisd 0x88(%r12), %xmm0
jbe 0x58b3e
movsd %xmm0, 0x88(%r12)
jmp 0x58b3e
ucomisd (%rsp), %xmm0
jbe 0x58b3e
movsd %xmm0, (%rsp)
movq %rbx, %rdi
leaq 0x4f149(%rip), %rsi     # 0xa7c91
movq %r15, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x4070
addq $0x8, %r14
incq %r13
cmpl $-0x1, %eax
jne 0x58a7f
jmp 0x58b6c
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x42a0
movl 0x38(%r12), %eax
testl %eax, %eax
jne 0x58bac
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 0x2de4a
addq $0x7a138, %rsp          # imm = 0x7A138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq