// File: /workspace/github_c_makefile_star2_O3/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 0x50b05(%rip), %rdi     # 0xaa7b5
callq 0x54bec
testl %eax, %eax
jne 0x59cc0
xorl %eax, %eax
callq 0x2e342
leaq 0x3583f1(%rip), %rbp    # 0x3b20b8
movl $0x1, 0x78(%rbp)
leaq 0x51c86(%rip), %rsi     # 0xab95b
movq %rbx, %rdi
callq 0x40f0
testq %rax, %rax
je 0x59f36
movq %rax, %rbx
leaq 0x51045(%rip), %rsi     # 0xaad35
xorl %r13d, %r13d
leaq 0x40(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0x28(%rsp), %r8
movq %rax, %rdi
xorl %eax, %eax
callq 0x4070
cmpl $-0x1, %eax
je 0x59e3f
movsd 0x4c613(%rip), %xmm0    # 0xa6330
movsd 0x4c0a3(%rip), %xmm1    # 0xa5dc8
movl $0x8, %ebp
xorl %r13d, %r13d
xorl %r15d, %r15d
xorl %r12d, %r12d
movsd %xmm1, 0x10(%rsp)
movaps %xmm0, %xmm2
xorl %r14d, %r14d
movq %rbx, 0x30(%rsp)
movsd %xmm2, (%rsp)
movsd %xmm0, 0x8(%rsp)
movsd %xmm1, 0x38(%rsp)
movq %r13, %rbx
incq %r13
movq %r14, %rdi
movq %rbp, %rsi
movl %r13d, %edx
callq 0x3a0b4
movq %rax, %r14
movq (%rax,%rbx,8), %rdi
leaq 0x40(%rsp), %rsi
callq 0x3b494
movq %rax, (%r14,%rbx,8)
movq %r12, %rdi
movq %rbp, %rsi
movl %r13d, %edx
callq 0x3a0b4
movq %rax, %r12
movq %r15, %rdi
movq %rbp, %rsi
movl %r13d, %edx
callq 0x3a0b4
movq %rax, %r15
movsd 0x20(%rsp), %xmm0
movsd %xmm0, (%r12,%rbx,8)
movsd 0x28(%rsp), %xmm1
movsd %xmm1, (%rax,%rbx,8)
movq 0x30(%rsp), %rbx
movsd 0x20(%rsp), %xmm2
movapd %xmm2, %xmm0
maxsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
minsd (%rsp), %xmm2
movsd %xmm2, 0x18(%rsp)
movapd %xmm1, %xmm0
maxsd 0x38(%rsp), %xmm0
movsd %xmm0, (%rsp)
minsd 0x8(%rsp), %xmm1
movsd %xmm1, 0x8(%rsp)
movq %rbx, %rdi
leaq 0x50f33(%rip), %rsi     # 0xaad35
leaq 0x40(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0x28(%rsp), %r8
xorl %eax, %eax
callq 0x4070
movsd 0x18(%rsp), %xmm2
movsd (%rsp), %xmm1
movsd 0x8(%rsp), %xmm0
addq $0x8, %rbp
cmpl $-0x1, %eax
jne 0x59d44
leaq 0x35827b(%rip), %rbp    # 0x3b20b8
jmp 0x59e6f
movsd 0x4bf81(%rip), %xmm1    # 0xa5dc8
movsd 0x4c4e1(%rip), %xmm0    # 0xa6330
xorl %r14d, %r14d
movsd %xmm0, 0x18(%rsp)
movsd %xmm0, 0x8(%rsp)
movsd %xmm1, 0x10(%rsp)
movsd %xmm1, (%rsp)
xorl %r12d, %r12d
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x42a0
movsd 0x10(%rsp), %xmm0
ucomisd 0x18(%rbp), %xmm0
jbe 0x59e89
movsd %xmm0, 0x18(%rbp)
movsd 0x10(%rbp), %xmm0
movsd 0x18(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x59e9f
movsd %xmm1, 0x10(%rbp)
movsd (%rsp), %xmm0
ucomisd 0x88(%rbp), %xmm0
jbe 0x59eb6
movsd %xmm0, 0x88(%rbp)
movsd 0x80(%rbp), %xmm0
movsd 0x8(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x59ed2
movsd %xmm1, 0x80(%rbp)
testl %r13d, %r13d
je 0x59f14
movl %r13d, %ebx
xorl %ebp, %ebp
movsd (%r12,%rbp,8), %xmm0
movsd (%r15,%rbp,8), %xmm1
movq (%r14,%rbp,8), %rsi
movsd 0x7b17c(%rip), %xmm2    # 0xd5070
movsd 0x7b17c(%rip), %xmm3    # 0xd5078
movl $0x6, %edi
movaps %xmm2, %xmm4
movaps %xmm3, %xmm5
callq 0x2cc6c
incq %rbp
cmpq %rbp, %rbx
jne 0x59edc
movq %r12, %rdi
callq 0x3a180
movq %r15, %rdi
callq 0x3a180
movq %r14, %rdi
movl %r13d, %esi
callq 0x3a14b
xorl %eax, %eax
callq 0x2e6d0
addq $0x7a168, %rsp          # imm = 0x7A168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq