// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/annotationsketch/graphics_cairo.c
// Function: gt_graphics_cairo_draw_caret
void gt_graphics_cairo_draw_caret(GtGraphics *gg, double x, double y,
                                  double width,double height,
                                  ArrowStatus arrow_status, double arrow_width,
                                  double stroke_width, GtColor stroke_color)
{
  GtGraphicsCairo *g = gt_graphics_cairo_cast(gg);
  gt_assert(g);

  /* save cairo context */
  cairo_save(g->cr);
  cairo_rectangle(g->cr, g->margin_x, g->margin_y,
                  g->width-2*g->margin_x, g->height-2*g->margin_y);
  cairo_clip(g->cr);
  /* create caret path */
  switch (arrow_status)
  {
    case ARROW_RIGHT:
      if (gt_double_smaller_double(0, width - arrow_width))
      {
        width -= arrow_width;
        cairo_move_to(g->cr, x, y + (height/2));
        cairo_line_to(g->cr, x + (width/2), y);
        cairo_line_to(g->cr, x + width, y + (height/2));
        cairo_line_to(g->cr, x + width + arrow_width, y + (height/2));
        /* add arrowhead */
        cairo_move_to(g->cr, x + width, y);
        cairo_line_to(g->cr, x + width + arrow_width, y + height / 2);
        cairo_line_to(g->cr, x + width, y + height);
      }
      break;
    case ARROW_LEFT:
      if (gt_double_smaller_double(0, width - arrow_width))
      {
        width -= arrow_width;
        /* draw arrowhead */
        cairo_move_to(g->cr, x + arrow_width , y);
        cairo_line_to(g->cr, x, y + (height/2));
        cairo_line_to(g->cr, x + arrow_width, y + height);
        cairo_move_to(g->cr, x, y + (height/2));
        cairo_line_to(g->cr, x + arrow_width, y + (height/2));
        cairo_line_to(g->cr, x + arrow_width + (width/2), y);
        cairo_line_to(g->cr, x + arrow_width + width, y + (height/2));
      }
      break;
    case ARROW_BOTH: /* XXX */
    case ARROW_NONE:
     cairo_move_to(g->cr, x, y + (height/2));
     cairo_line_to(g->cr, x + (width/2), y);
     cairo_line_to(g->cr, x + width, y + (height/2));
   }
   /* draw caret */
   cairo_set_line_width(g->cr, stroke_width);
   cairo_set_source_rgba(g->cr, stroke_color.red,
                                stroke_color.green,
                                stroke_color.blue,
                                stroke_color.alpha);
   cairo_stroke(g->cr);
   /* restore cairo context */
   cairo_restore(g->cr);
}

// Assembly:
subq $0x58, %rsp
leaq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x50(%rsp)
movsd %xmm0, 0x48(%rsp)
movsd %xmm1, 0x40(%rsp)
movsd %xmm2, 0x38(%rsp)
movsd %xmm3, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movsd %xmm4, 0x20(%rsp)
movsd %xmm5, 0x18(%rsp)
callq 0x40e60
movq %rax, %rdi
movq 0x50(%rsp), %rsi
callq 0x3e730
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x43a82
movq 0x170587(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x11a60b(%rip), %rsi    # 0x15e066
leaq 0x12439d(%rip), %rdx    # 0x167dff
leaq 0x124d13(%rip), %rcx    # 0x16877c
leaq 0x12493c(%rip), %r8     # 0x1683ac
movl $0x209, %r9d            # imm = 0x209
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x43a84
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xb3b0
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x50(%rax), %xmm0
movsd 0x58(%rax), %xmm1
movsd 0x68(%rax), %xmm2
movaps %xmm0, %xmm3
addsd %xmm3, %xmm3
subsd %xmm3, %xmm2
movsd 0x60(%rax), %xmm3
movaps %xmm1, %xmm4
addsd %xmm4, %xmm4
subsd %xmm4, %xmm3
callq 0xb2c0
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xbb10
movl 0x2c(%rsp), %eax
movl %eax, 0x4(%rsp)
testl %eax, %eax
je 0x43c96
jmp 0x43aea
movl 0x4(%rsp), %eax
subl $0x1, %eax
je 0x43b0a
jmp 0x43af5
movl 0x4(%rsp), %eax
addl $-0x2, %eax
subl $0x2, %eax
jb 0x43e1c
jmp 0x43eb2
movsd 0x38(%rsp), %xmm1
subsd 0x20(%rsp), %xmm1
xorps %xmm0, %xmm0
callq 0x8c360
testb $0x1, %al
jne 0x43b27
jmp 0x43c91
movsd 0x20(%rsp), %xmm1
movsd 0x38(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x48(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
movsd 0x1247c8(%rip), %xmm3   # 0x168328
divsd %xmm3, %xmm2
addsd %xmm2, %xmm1
callq 0xb220
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x48(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movsd 0x12479e(%rip), %xmm2   # 0x168328
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd 0x40(%rsp), %xmm1
callq 0xb740
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x48(%rsp), %xmm0
addsd 0x38(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
movsd 0x124762(%rip), %xmm3   # 0x168328
divsd %xmm3, %xmm2
addsd %xmm2, %xmm1
callq 0xb740
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x48(%rsp), %xmm0
addsd 0x38(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
movsd 0x124726(%rip), %xmm3   # 0x168328
divsd %xmm3, %xmm2
addsd %xmm2, %xmm1
callq 0xb740
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x48(%rsp), %xmm0
addsd 0x38(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
callq 0xb220
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x48(%rsp), %xmm0
addsd 0x38(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
movsd 0x1246ca(%rip), %xmm3   # 0x168328
divsd %xmm3, %xmm2
addsd %xmm2, %xmm1
callq 0xb740
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x48(%rsp), %xmm0
addsd 0x38(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
addsd 0x30(%rsp), %xmm1
callq 0xb740
jmp 0x43eb2
movsd 0x38(%rsp), %xmm1
subsd 0x20(%rsp), %xmm1
xorps %xmm0, %xmm0
callq 0x8c360
testb $0x1, %al
jne 0x43cb3
jmp 0x43e17
movsd 0x20(%rsp), %xmm1
movsd 0x38(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x48(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
callq 0xb220
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x48(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
movsd 0x12461c(%rip), %xmm3   # 0x168328
divsd %xmm3, %xmm2
addsd %xmm2, %xmm1
callq 0xb740
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x48(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
addsd 0x30(%rsp), %xmm1
callq 0xb740
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x48(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
movsd 0x1245c6(%rip), %xmm3   # 0x168328
divsd %xmm3, %xmm2
addsd %xmm2, %xmm1
callq 0xb220
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x48(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
movsd 0x124590(%rip), %xmm3   # 0x168328
divsd %xmm3, %xmm2
addsd %xmm2, %xmm1
callq 0xb740
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x48(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movsd 0x124560(%rip), %xmm2   # 0x168328
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd 0x40(%rsp), %xmm1
callq 0xb740
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x48(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
addsd 0x38(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
movsd 0x12451e(%rip), %xmm3   # 0x168328
divsd %xmm3, %xmm2
addsd %xmm2, %xmm1
callq 0xb740
jmp 0x43eb2
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x48(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
movsd 0x1244e9(%rip), %xmm3   # 0x168328
divsd %xmm3, %xmm2
addsd %xmm2, %xmm1
callq 0xb220
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x48(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movsd 0x1244bf(%rip), %xmm2   # 0x168328
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd 0x40(%rsp), %xmm1
callq 0xb740
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x48(%rsp), %xmm0
addsd 0x38(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
movsd 0x124483(%rip), %xmm3   # 0x168328
divsd %xmm3, %xmm2
addsd %xmm2, %xmm1
callq 0xb740
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x18(%rsp), %xmm0
callq 0xb0a0
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movq 0x10(%rcx), %rdi
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movsd 0x10(%rax), %xmm2
movsd 0x18(%rax), %xmm3
callq 0xb360
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xbb80
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xba10
addq $0x58, %rsp
retq
nopl (%rax)