// File: /workspace/github_c_makefile_star2_O3/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 0x51064(%rip), %rdi     # 0xaa7b5
callq 0x54bec
testl %eax, %eax
jne 0x59761
xorl %eax, %eax
callq 0x2e342
leaq 0x358950(%rip), %r12    # 0x3b20b8
movslq 0xec(%r12), %rbx
leaq 0x7b8e9(%rip), %rax     # 0xd5060
movsbl (%rbx,%rax), %ebp
movb %bpl, 0x6(%rsp)
movb $0x0, 0x7(%rsp)
leal 0x1(%rbx), %edx
leaq 0x51588(%rip), %rsi     # 0xaad17
xorl %r13d, %r13d
leaq 0x2e(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x41b0
movl %ebp, %edi
movq %r15, %rsi
callq 0x2cbc4
leaq 0x521a9(%rip), %rsi     # 0xab95b
movq %r14, %rdi
callq 0x40f0
testq %rax, %rax
je 0x59947
movq %rax, %r15
leaq 0x5156f(%rip), %rsi     # 0xaad3c
leaq 0x18(%rsp), %rdx
movq %rax, %rdi
xorl %eax, %eax
callq 0x4070
cmpl $-0x1, %eax
je 0x59886
movq %rbx, 0x20(%rsp)
movsd 0x4c5d6(%rip), %xmm0    # 0xa5dc8
movsd %xmm0, 0x8(%rsp)
movsd 0x4cb30(%rip), %xmm0    # 0xa6330
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 0x3a0b4
movq %rax, %r14
movsd 0x18(%rsp), %xmm1
movsd %xmm1, (%rax,%rbx,8)
movapd %xmm1, %xmm0
maxsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
minsd 0x10(%rsp), %xmm1
movsd %xmm1, 0x10(%rsp)
movq %r15, %rdi
leaq 0x514dd(%rip), %rsi     # 0xaad3c
movq %rbp, %rdx
xorl %eax, %eax
callq 0x4070
movsd 0x10(%rsp), %xmm0
addq $0x8, %r12
cmpl $-0x1, %eax
jne 0x59811
movq 0x20(%rsp), %rbx
leaq 0x358834(%rip), %r12    # 0x3b20b8
jmp 0x598a5
movsd 0x4caa2(%rip), %xmm0    # 0xa6330
movsd %xmm0, 0x10(%rsp)
movsd 0x4c52c(%rip), %xmm0    # 0xa5dc8
movsd %xmm0, 0x8(%rsp)
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x42a0
movsd 0x8(%rsp), %xmm0
ucomisd 0x18(%r12), %xmm0
jbe 0x598c3
movsd %xmm0, 0x18(%r12)
movsd 0x10(%r12), %xmm0
movsd 0x10(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x598dd
movsd %xmm1, 0x10(%r12)
movl $0x0, 0x78(%r12)
testl %r13d, %r13d
je 0x59938
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 0x7b75f(%rip), %xmm2    # 0xd5070
movsd 0x7b75f(%rip), %xmm3    # 0xd5078
xorpd %xmm1, %xmm1
movl $0x1, %edi
movsd 0x8(%rsp), %xmm4
movq %rbx, %rsi
callq 0x2cc6c
incq %r12
cmpq %r12, %r15
jne 0x59903
movq %r14, %rdi
callq 0x3a180
xorl %eax, %eax
callq 0x2e6d0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq