// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/annotationsketch/graphics_cairo.c
// Function: gt_graphics_cairo_draw_curve_data
void gt_graphics_cairo_draw_curve_data(GtGraphics *gg, double x, double y,
                                       GtColor color, double data[],
                                       GtUword ndata, GtRange valrange,
                                       GtUword height)
{
  GtUword i, rnglen;
  double xpos;
  GtGraphicsCairo *g;
  g = gt_graphics_cairo_cast(gg);

  xpos = (((double)g->width-2*g->margin_x)/((double)ndata-1));
  rnglen = valrange.end - valrange.start;
  cairo_save(g->cr);
  cairo_move_to(g->cr,
                x,
                y+(1-(data[0]-valrange.start)/(double) rnglen)*height);
  for (i=1;i<ndata;i++)
  {
    double val, pval;
    if (gt_double_smaller_double(data[i], valrange.start)
          || gt_double_smaller_double(valrange.end, data[i]))
      break;
    val  = (double) (data[i]-valrange.start)/(double) rnglen;
    pval = (double) (data[i-1]-valrange.start)/(double) rnglen;
    gt_assert(val <= 1 && val >= 0 && pval >= 0 && pval <= 1);
    cairo_curve_to(g->cr,
                   x + ((i-0.5) * xpos),
                   y + (1-pval)   * height,
                   x + ((i-0.5) * xpos),
                   y + (1-val)    * height,
                   x + (i       * xpos),
                   y + (1-val)    * height);
  }
  cairo_set_source_rgba(g->cr, color.red,
                               color.green,
                               color.blue,
                               color.alpha);
  cairo_stroke(g->cr);
  cairo_restore(g->cr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r9, 0x10(%rsp)
movq %r8, %r13
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r15
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
movq %rdi, %rbx
callq 0x2e259
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2c5a1
movq %rax, %rbx
movsd 0x68(%rax), %xmm2
movsd 0x50(%rax), %xmm0
addsd %xmm0, %xmm0
subsd %xmm0, %xmm2
movq %r14, %xmm0
punpckldq 0x99be5(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x99bed(%rip), %xmm0    # 0xca490
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
addsd 0xa3849(%rip), %xmm1    # 0xd4100
divsd %xmm1, %xmm2
movsd %xmm2, 0x38(%rsp)
movq %r13, %r12
subq %rbp, %r12
movq 0x10(%rax), %rdi
callq 0xb3d0
movq 0x10(%rbx), %rdi
movsd (%r15), %xmm0
movq %rbp, %xmm1
movq 0x99b9a(%rip), %xmm2    # 0xca480
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x99b9e(%rip), %xmm3    # 0xca490
subpd %xmm3, %xmm1
movapd %xmm1, %xmm4
unpckhpd %xmm1, %xmm4            # xmm4 = xmm4[1],xmm1[1]
addpd %xmm1, %xmm4
movapd %xmm4, 0x40(%rsp)
subsd %xmm4, %xmm0
movq %r12, %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movdqa %xmm2, %xmm4
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addpd %xmm1, %xmm2
movapd %xmm2, 0x20(%rsp)
divsd %xmm2, %xmm0
movsd 0x99fb5(%rip), %xmm1    # 0xca8f0
subsd %xmm0, %xmm1
movq 0x10(%rsp), %xmm0
punpckldq %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1]
subpd %xmm3, %xmm0
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2            # xmm2 = xmm2[1],xmm0[1]
addsd %xmm0, %xmm2
movapd %xmm2, 0x50(%rsp)
mulsd %xmm2, %xmm1
addsd 0x8(%rsp), %xmm1
movsd (%rsp), %xmm0
callq 0xb240
movq %r13, %xmm0
punpckldq 0x99b00(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x99b08(%rip), %xmm0    # 0xca490
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x10(%rsp)
movaps 0x40(%rsp), %xmm0
movlhps %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movaps %xmm0, 0x60(%rsp)
movapd 0x20(%rsp), %xmm0
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movapd %xmm0, 0x20(%rsp)
pushq $0x1
popq %r12
cmpq %r14, %r12
jae 0x30adc
movsd (%r15,%r12,8), %xmm0
movaps 0x40(%rsp), %xmm1
callq 0x58dba
testb %al, %al
jne 0x30adc
movsd (%r15,%r12,8), %xmm1
movaps 0x10(%rsp), %xmm0
callq 0x58dba
testb %al, %al
jne 0x30adc
movupd -0x8(%r15,%r12,8), %xmm2
subpd 0x60(%rsp), %xmm2
divpd 0x20(%rsp), %xmm2
movapd %xmm2, %xmm0
cmplepd 0xa2c1c(%rip), %xmm0    # 0xd3630
movmskpd %xmm0, %eax
testb $0x2, %al
xorpd %xmm0, %xmm0
je 0x30b20
movapd %xmm2, %xmm5
unpckhpd %xmm2, %xmm5            # xmm5 = xmm5[1],xmm2[1]
ucomisd %xmm0, %xmm5
jb 0x30b20
ucomisd %xmm0, %xmm2
jb 0x30b20
testb $0x1, %al
je 0x30b20
movq 0x10(%rbx), %rdi
movq %r12, %xmm0
punpckldq 0x99a27(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x99a2f(%rip), %xmm0    # 0xca490
movapd %xmm0, %xmm4
unpckhpd %xmm0, %xmm4            # xmm4 = xmm4[1],xmm0[1]
addsd %xmm0, %xmm4
movapd %xmm4, %xmm0
addsd 0xa36a7(%rip), %xmm0    # 0xd4120
movsd 0x38(%rsp), %xmm7
mulsd %xmm7, %xmm0
movsd (%rsp), %xmm6
addsd %xmm6, %xmm0
movsd 0x99e5c(%rip), %xmm3    # 0xca8f0
movapd %xmm3, %xmm1
subsd %xmm2, %xmm1
movapd 0x50(%rsp), %xmm8
mulsd %xmm8, %xmm1
movsd 0x8(%rsp), %xmm2
addsd %xmm2, %xmm1
subsd %xmm5, %xmm3
mulsd %xmm8, %xmm3
addsd %xmm2, %xmm3
mulsd %xmm7, %xmm4
addsd %xmm6, %xmm4
movapd %xmm0, %xmm2
movapd %xmm3, %xmm5
callq 0xb950
incq %r12
jmp 0x309bb
movq 0x10(%rbx), %rdi
leaq 0xb0(%rsp), %rax
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movsd 0x10(%rax), %xmm2
movsd 0x18(%rax), %xmm3
callq 0xb380
movq 0x10(%rbx), %rdi
callq 0xbbb0
movq 0x10(%rbx), %rdi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xba40
movq 0xfd491(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x99535(%rip), %rsi     # 0xca066
leaq 0xa3bc4(%rip), %rdx     # 0xd46fc
leaq 0xa3bec(%rip), %rcx     # 0xd472b
leaq 0xa3626(%rip), %r8      # 0xd416c
movl $0x35b, %r9d            # imm = 0x35B
xorl %eax, %eax
callq 0xb8c0
callq 0xb300