// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/plot.c
// Function: plotx
void plotx(char* names)
{
 /*!Last Changed 06.09.2006 incremented legendcount*/
 /*!Last Changed 07.10.2004 added img.xaxis.lim and img.yaxis.lim*/
 /*!Last Changed 02.02.2004 added safemalloc*/
 double* observations;
 FILE* myfile;
 double obs, minobs = +LONG_MAX, maxobs = -LONG_MAX;
 int counts, j, color;
 char st[2], st2[10];
 Point p1, p3;
 if (!get_parameter_o("hold"))
   clear_image();
 color = img.imagelegend.legendcount;
 st[0] = plots[color];
 st[1] = '\0';
 p3.x = color;
 sprintf(st2, "Class %d", img.imagelegend.legendcount + 1);
 add_legend(st[0], st2);
 myfile = fopen(names, "r");
 if (!myfile)
   return;
 counts = 0;
 observations = NULL;
 while (fscanf(myfile, "%lf\n", &obs) != EOF)
  {
   counts++;
   observations = alloc(observations, counts * sizeof(double), counts);
   observations[counts - 1] = obs;
   if (obs > maxobs)
     maxobs = obs;
   if (obs < minobs)
     minobs = obs;
  }
 fclose(myfile);
 if (maxobs > img.xaxis.lim.max)
   img.xaxis.lim.max = maxobs;
 if (minobs < img.xaxis.lim.min)
   img.xaxis.lim.min = minobs; 
 img.yaxis.available = 0;
 for (j = 0; j < counts; j++)
  {
   p1.x = (double) observations[j];
   p1.y = 0;
   add_object(OBJECT_STRING, p1, dummyp, p3, st);
  }
 safe_free(observations);
 export_image();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
leaq 0x4f567(%rip), %rdi     # 0xa7715
callq 0x536e7
testl %eax, %eax
jne 0x581be
xorl %eax, %eax
callq 0x2da74
leaq 0x356ef3(%rip), %r12    # 0x3af0b8
movslq 0xec(%r12), %rbx
leaq 0x79e8c(%rip), %rax     # 0xd2060
movb (%rbx,%rax), %al
movb %al, 0x6(%rsp)
movb $0x0, 0x7(%rsp)
leal 0x1(%rbx), %edx
leaq 0x4fa7d(%rip), %rsi     # 0xa7c67
xorl %r13d, %r13d
leaq 0x2e(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x41b0
movsbl 0x6(%rsp), %edi
movq %r15, %rsi
callq 0x2c324
leaq 0x5067f(%rip), %rsi     # 0xa888f
movq %r14, %rdi
callq 0x40f0
testq %rax, %rax
je 0x583ab
movq %rax, %r15
leaq 0x4fa61(%rip), %rsi     # 0xa7c8c
leaq 0x18(%rsp), %rdx
movq %rax, %rdi
xorl %eax, %eax
callq 0x4070
cmpl $-0x1, %eax
je 0x582ea
movq %rbx, 0x20(%rsp)
movsd 0x4ab78(%rip), %xmm0    # 0xa2dc8
movsd %xmm0, 0x8(%rsp)
movsd 0x4b0d2(%rip), %xmm0    # 0xa3330
movl $0x8, %r12d
leaq 0x18(%rsp), %rbp
xorl %r13d, %r13d
xorl %r14d, %r14d
movsd %xmm0, 0x10(%rsp)
movq %r13, %rbx
incq %r13
movq %r14, %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0x390c8
movq %rax, %r14
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax,%rbx,8)
movsd 0x18(%rsp), %xmm1
movapd %xmm1, %xmm0
maxsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
minsd 0x10(%rsp), %xmm1
movsd %xmm1, 0x10(%rsp)
movq %r15, %rdi
leaq 0x4f9c9(%rip), %rsi     # 0xa7c8c
movq %rbp, %rdx
xorl %eax, %eax
callq 0x4070
movsd 0x10(%rsp), %xmm0
addq $0x8, %r12
cmpl $-0x1, %eax
jne 0x5826f
movq 0x20(%rsp), %rbx
leaq 0x356dd0(%rip), %r12    # 0x3af0b8
jmp 0x58309
movsd 0x4b03e(%rip), %xmm0    # 0xa3330
movsd %xmm0, 0x10(%rsp)
movsd 0x4aac8(%rip), %xmm0    # 0xa2dc8
movsd %xmm0, 0x8(%rsp)
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x42a0
movsd 0x8(%rsp), %xmm0
ucomisd 0x18(%r12), %xmm0
jbe 0x58327
movsd %xmm0, 0x18(%r12)
movsd 0x10(%r12), %xmm0
movsd 0x10(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x58341
movsd %xmm1, 0x10(%r12)
movl $0x0, 0x78(%r12)
testl %r13d, %r13d
je 0x5839c
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movsd %xmm0, 0x8(%rsp)
movl %r13d, %r15d
xorl %r12d, %r12d
leaq 0x6(%rsp), %rbx
movsd (%r14,%r12,8), %xmm0
movsd 0x79cfb(%rip), %xmm2    # 0xd2070
movsd 0x79cfb(%rip), %xmm3    # 0xd2078
xorpd %xmm1, %xmm1
movl $0x1, %edi
movsd 0x8(%rsp), %xmm4
movq %rbx, %rsi
callq 0x2c3cc
incq %r12
cmpq %r12, %r15
jne 0x58367
movq %r14, %rdi
callq 0x39194
xorl %eax, %eax
callq 0x2de4a
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq