// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/plot.c
// Function: polyplot
void polyplot(double start, double end, char* polynomial, int color, int sig) 
{
 /*!Last Changed 20.09.2006*/
 /*!Last Changed 08.10.2004 added img.xaxis.lim and img.yaxis.lim*/
 int i;
 double minvaluey = +LONG_MAX, maxvaluey = -LONG_MAX, valuey, valuex;
 Point p1, p2;
 char st2[3]; 
 Polynomptr p = read_polynom(polynomial);
 Objectptr obj;
 if (!get_parameter_o("hold"))
   clear_image();
 add_legend((char)('A' + color), polynomial);
 img.yaxis.available = 1;
 for (i = 0; i <= PARTITIONS; i++)
  {
   valuex = start + i * ((end - start) / PARTITIONS);
   valuey = polynom_value(p, valuex);
   if (img.yaxis.lim.min >= img.yaxis.lim.max)
    {
     if (valuey < minvaluey)
       minvaluey = valuey;
     if (valuey > maxvaluey)
       maxvaluey = valuey;
    }
  }
 if (img.yaxis.lim.min >= img.yaxis.lim.max)
  {
   img.yaxis.lim.min = minvaluey;
   img.yaxis.lim.max = maxvaluey;
  }
 if (img.xaxis.lim.min >= img.xaxis.lim.max)
  {
   img.xaxis.lim.min = start;
   img.xaxis.lim.max = end;
  }
 p1.x = start;
 p1.y = (polynom_value(p, p1.x));
 if (sig)
   p1.y = sigmoid(p1.y);
 sprintf(st2, "%c", 'A' + color);
 for (i = 1; i <= PARTITIONS; i++)
  {
   p2.x = (start + i * ((end - start) / PARTITIONS));
   p2.y = (polynom_value(p, p1.x));
   if (sig)
     p2.y = sigmoid(p2.y);
   obj = add_object(OBJECT_LINE, p1, p2, dummyp, st2);
   obj->fnt.fontcolor = color;
   p1.x = p2.x;
   p1.y = p2.y;
  }
 free_polynom(p);
 export_image();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movsd %xmm0, -0x8(%rbp)
movsd %xmm1, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movl %edx, -0x20(%rbp)
movsd 0x64d49(%rip), %xmm0    # 0xe2fb0
movsd %xmm0, -0x30(%rbp)
movsd 0x647ec(%rip), %xmm0    # 0xe2a60
movsd %xmm0, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x82070
movq %rax, -0x78(%rbp)
leaq 0x6907b(%rip), %rdi     # 0xe7308
callq 0x79440
cmpl $0x0, %eax
jne 0x7e29e
movb $0x0, %al
callq 0x41a40
movl -0x1c(%rbp), %eax
addl $0x41, %eax
movq -0x18(%rbp), %rsi
movsbl %al, %edi
callq 0x3efa0
leaq 0x363dd1(%rip), %rax    # 0x3e2088
movl $0x1, 0x78(%rax)
movl $0x0, -0x24(%rbp)
cmpl $0x1f4, -0x24(%rbp)     # imm = 0x1F4
jg 0x7e374
movsd -0x8(%rbp), %xmm1
cvtsi2sdl -0x24(%rbp), %xmm0
movsd -0x10(%rbp), %xmm2
subsd -0x8(%rbp), %xmm2
movsd 0x66692(%rip), %xmm3    # 0xe4980
divsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x78(%rbp), %rdi
movsd -0x48(%rbp), %xmm0
callq 0x81500
movsd %xmm0, -0x40(%rbp)
leaq 0x363d6f(%rip), %rax    # 0x3e2088
movsd 0x80(%rax), %xmm0
leaq 0x363d60(%rip), %rax    # 0x3e2088
ucomisd 0x88(%rax), %xmm0
jb 0x7e364
movsd -0x40(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x7e34c
movsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x40(%rbp), %xmm0
ucomisd -0x38(%rbp), %xmm0
jbe 0x7e362
movsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
jmp 0x7e364
jmp 0x7e366
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x7e2c5
leaq 0x363d0d(%rip), %rax    # 0x3e2088
movsd 0x80(%rax), %xmm0
leaq 0x363cfe(%rip), %rax    # 0x3e2088
ucomisd 0x88(%rax), %xmm0
jb 0x7e3bc
movsd -0x30(%rbp), %xmm0
leaq 0x363ce8(%rip), %rax    # 0x3e2088
movsd %xmm0, 0x80(%rax)
movsd -0x38(%rbp), %xmm0
leaq 0x363cd4(%rip), %rax    # 0x3e2088
movsd %xmm0, 0x88(%rax)
leaq 0x363cc5(%rip), %rax    # 0x3e2088
movsd 0x10(%rax), %xmm0
leaq 0x363cb9(%rip), %rax    # 0x3e2088
ucomisd 0x18(%rax), %xmm0
jb 0x7e3f8
movsd -0x8(%rbp), %xmm0
leaq 0x363ca6(%rip), %rax    # 0x3e2088
movsd %xmm0, 0x10(%rax)
movsd -0x10(%rbp), %xmm0
leaq 0x363c95(%rip), %rax    # 0x3e2088
movsd %xmm0, 0x18(%rax)
movsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x78(%rbp), %rdi
movsd -0x58(%rbp), %xmm0
callq 0x81500
movsd %xmm0, -0x50(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x7e42a
movsd -0x50(%rbp), %xmm0
callq 0x7aab0
movsd %xmm0, -0x50(%rbp)
leaq -0x6b(%rbp), %rdi
movl -0x1c(%rbp), %edx
addl $0x41, %edx
leaq 0x684dd(%rip), %rsi     # 0xe6918
movb $0x0, %al
callq 0x4170
movl $0x1, -0x24(%rbp)
cmpl $0x1f4, -0x24(%rbp)     # imm = 0x1F4
jg 0x7e50a
movsd -0x8(%rbp), %xmm1
cvtsi2sdl -0x24(%rbp), %xmm0
movsd -0x10(%rbp), %xmm2
subsd -0x8(%rbp), %xmm2
movsd 0x6650e(%rip), %xmm3    # 0xe4980
divsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
movq -0x78(%rbp), %rdi
movsd -0x58(%rbp), %xmm0
callq 0x81500
movsd %xmm0, -0x60(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x7e4ab
movsd -0x60(%rbp), %xmm0
callq 0x7aab0
movsd %xmm0, -0x60(%rbp)
leaq -0x6b(%rbp), %rsi
movsd -0x58(%rbp), %xmm0
movsd -0x50(%rbp), %xmm1
movsd -0x68(%rbp), %xmm2
movsd -0x60(%rbp), %xmm3
movsd 0x86b75(%rip), %xmm4    # 0x105040
movsd 0x86b75(%rip), %xmm5    # 0x105048
xorl %edi, %edi
callq 0x3f100
movq %rax, -0x80(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0x18(%rax)
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x7e449
movq -0x78(%rbp), %rdi
callq 0x815c0
movb $0x0, %al
callq 0x42280
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)