// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/plot.c
// Function: plotxynames
void plotxynames(char* names)
{
 /*!Last Changed 04.02.2008*/
 double* observations[2];
 char** obsnames;
 FILE* myfile;
 char st[READLINELENGTH];
 double obs1, obs2, minobsx = +LONG_MAX, minobsy = +LONG_MAX, maxobsx = -LONG_MAX, maxobsy = -LONG_MAX;
 int counts, j;
 Point p1;
 if (!get_parameter_o("hold"))
   clear_image();
 img.yaxis.available = YES;
 observations[0] = NULL;
 observations[1] = NULL;
 obsnames = NULL;
 myfile = fopen(names, "r");
 if (!myfile)
   return;
 counts = 0;
 while (fscanf(myfile, "%s %lf %lf\n", st, &obs1, &obs2) != EOF)
  {
   counts++;
   obsnames = alloc(obsnames, counts * sizeof(char *), counts);
   obsnames[counts - 1] = strcopy(obsnames[counts - 1], st);
   observations[0] = alloc(observations[0], counts * sizeof(double), counts);
   observations[1] = alloc(observations[1], counts * sizeof(double), counts);
   observations[0][counts - 1] = obs1;
   observations[1][counts - 1] = obs2;
   if (obs1 > maxobsx)
     maxobsx = obs1;
   if (obs1 < minobsx)
     minobsx = obs1;
   if (obs2 > maxobsy)
     maxobsy = obs2;
   if (obs2 < minobsy)
     minobsy = obs2;
  }
 fclose(myfile);
 if (maxobsx > img.xaxis.lim.max)
   img.xaxis.lim.max = maxobsx;
 if (minobsx < img.xaxis.lim.min)
   img.xaxis.lim.min = minobsx;
 if (maxobsy > img.yaxis.lim.max)
   img.yaxis.lim.max = maxobsy;
 if (minobsy < img.yaxis.lim.min)
   img.yaxis.lim.min = minobsy;
 for (j = 0; j < counts; j++)
  {
   p1.x = (double) observations[0][j];
   p1.y = (double) observations[1][j];
   add_object(OBJECT_NAMEDPOINT, p1, dummyp, dummyp, obsnames[j]);
  }
 safe_free(observations[0]);
 safe_free(observations[1]);
 free_2d((void **)obsnames, counts);
 export_image();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a168, %rsp          # imm = 0x7A168
movq %rdi, %rbx
leaq 0x489ef(%rip), %rdi     # 0x9a6e5
callq 0x4cff1
testl %eax, %eax
jne 0x51d06
xorl %eax, %eax
callq 0x2a510
leaq 0x3583ab(%rip), %rax    # 0x3aa0b8
movl $0x1, 0x78(%rax)
leaq 0x49b64(%rip), %rsi     # 0x9b87f
movq %rbx, %rdi
callq 0x40f0
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x51f0b
movsd 0x44097(%rip), %xmm1    # 0x95dd0
movsd 0x445ef(%rip), %xmm0    # 0x96330
pushq $0x8
popq %rbp
xorl %r13d, %r13d
xorl %ebx, %ebx
movsd %xmm0, 0x18(%rsp)
movsd %xmm0, 0x20(%rsp)
movsd %xmm1, 0x10(%rsp)
movsd %xmm1, 0x8(%rsp)
xorl %r12d, %r12d
xorl %r15d, %r15d
movq 0x28(%rsp), %rdi
leaq 0x48ef2(%rip), %rsi     # 0x9ac65
leaq 0x40(%rsp), %rdx
leaq 0x30(%rsp), %rcx
leaq 0x38(%rsp), %r8
xorl %eax, %eax
callq 0x4070
cmpl $-0x1, %eax
je 0x51e3d
leaq 0x1(%r13), %r14
movq %rbx, %rdi
movq %rbp, %rsi
movl %r14d, %edx
callq 0x34f30
movq %rax, %rbx
movq (%rax,%r13,8), %rdi
leaq 0x40(%rsp), %rsi
callq 0x3604c
movq %rax, (%rbx,%r13,8)
movq %r12, %rdi
movq %rbp, %rsi
movl %r14d, %edx
callq 0x34f30
movq %rax, %r12
movq %r15, %rdi
movq %rbp, %rsi
movl %r14d, %edx
callq 0x34f30
movq %rax, %r15
movsd 0x30(%rsp), %xmm0
movsd %xmm0, (%r12,%r13,8)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, (%rax,%r13,8)
movsd 0x30(%rsp), %xmm1
movapd %xmm1, %xmm2
maxsd 0x10(%rsp), %xmm2
minsd 0x18(%rsp), %xmm1
movapd %xmm0, %xmm3
maxsd 0x8(%rsp), %xmm3
minsd 0x20(%rsp), %xmm0
addq $0x8, %rbp
movq %r14, %r13
movsd %xmm1, 0x18(%rsp)
movsd %xmm0, 0x20(%rsp)
movsd %xmm2, 0x10(%rsp)
movsd %xmm3, 0x8(%rsp)
jmp 0x51d67
movq 0x28(%rsp), %rdi
callq 0x42a0
leaq 0x35826a(%rip), %rax    # 0x3aa0b8
movsd 0x10(%rsp), %xmm0
ucomisd 0x18(%rax), %xmm0
jbe 0x51e60
movsd %xmm0, 0x18(%rax)
movsd 0x10(%rax), %xmm0
movsd 0x18(%rsp), %xmm1
ucomisd %xmm1, %xmm0
movsd 0x8(%rsp), %xmm0
jbe 0x51e7c
movsd %xmm1, 0x10(%rax)
ucomisd 0x88(%rax), %xmm0
jbe 0x51e8e
movsd %xmm0, 0x88(%rax)
movsd 0x80(%rax), %xmm0
movsd 0x20(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x51eaa
movsd %xmm1, 0x80(%rax)
xorl %r14d, %r14d
pushq $0x6
popq %rbp
cmpq %r14, %r13
je 0x51ee9
movsd (%r12,%r14,8), %xmm0
movsd (%r15,%r14,8), %xmm1
movq (%rbx,%r14,8), %rsi
movsd 0x7b1a3(%rip), %xmm2    # 0xcd070
movsd 0x7b1a3(%rip), %xmm3    # 0xcd078
movl %ebp, %edi
movapd %xmm2, %xmm4
movapd %xmm3, %xmm5
callq 0x28f8d
incq %r14
jmp 0x51eb0
movq %r12, %rdi
callq 0x34ff7
movq %r15, %rdi
callq 0x34ff7
movq %rbx, %rdi
movl %r13d, %esi
callq 0x34fc3
xorl %eax, %eax
callq 0x2a858
addq $0x7a168, %rsp          # imm = 0x7A168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq