// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/annotationsketch/graphics_cairo.c
// Function: gt_graphics_cairo_draw_arrowhead
void gt_graphics_cairo_draw_arrowhead(GtGraphics *gg, double x, double y,
                                      GtColor color, ArrowStatus arrow_status)
{
  GtGraphicsCairo *g = gt_graphics_cairo_cast(gg);
  double arrow_height = 8, arrow_width = 5;
  gt_assert(g);
  /* save cairo context */
  cairo_save(g->cr);
  cairo_reset_clip(g->cr);
  cairo_set_source_rgb(g->cr, color.red, color.green, color.blue);
  switch (arrow_status)
  {
    case ARROW_LEFT:
      cairo_move_to(g->cr, x+arrow_width, y);
      cairo_line_to(g->cr, x, y+(arrow_height/2));
      cairo_line_to(g->cr, x+arrow_width, y+arrow_height);
      cairo_close_path(g->cr);
      /* fill area */
      cairo_fill_preserve(g->cr);
      cairo_stroke(g->cr);
      break;
    case ARROW_RIGHT:
      cairo_move_to(g->cr, x, y);
      cairo_line_to(g->cr, x+arrow_width, y+(arrow_height/2));
      cairo_line_to(g->cr, x, y+arrow_height);
      cairo_close_path(g->cr);
      /* fill area */
      cairo_fill_preserve(g->cr);
      cairo_stroke(g->cr);
      break;
    case ARROW_BOTH: /* XXX */
    case ARROW_NONE: break;
  }
  /* restore cairo context */
  cairo_restore(g->cr);
}

// Assembly:
subq $0x48, %rsp
leaq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x40(%rsp)
movsd %xmm0, 0x38(%rsp)
movsd %xmm1, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
callq 0x40e60
movq %rax, %rdi
movq 0x40(%rsp), %rsi
callq 0x3e730
movq %rax, 0x20(%rsp)
movsd 0x124256(%rip), %xmm0   # 0x168338
movsd %xmm0, 0x18(%rsp)
movsd 0x124240(%rip), %xmm0   # 0x168330
movsd %xmm0, 0x10(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x44136
movq 0x16fed3(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x119f57(%rip), %rsi    # 0x15e066
leaq 0x123ce9(%rip), %rdx    # 0x167dff
leaq 0x12469d(%rip), %rcx    # 0x1687ba
leaq 0x124288(%rip), %r8     # 0x1683ac
movl $0x265, %r9d            # imm = 0x265
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x44138
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xb3b0
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xb520
movq 0x8(%rsp), %rax
movq 0x20(%rsp), %rcx
movq 0x10(%rcx), %rdi
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movsd 0x10(%rax), %xmm2
callq 0xb3c0
movl 0x2c(%rsp), %eax
movl %eax, 0x4(%rsp)
testl %eax, %eax
je 0x441a7
jmp 0x44183
movl 0x4(%rsp), %eax
subl $0x1, %eax
je 0x4424c
jmp 0x44192
movl 0x4(%rsp), %eax
addl $-0x2, %eax
subl $0x2, %eax
jb 0x442e8
jmp 0x442ea
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x38(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
callq 0xb220
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x38(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
movsd 0x18(%rsp), %xmm2
movsd 0x12413e(%rip), %xmm3   # 0x168328
divsd %xmm3, %xmm2
addsd %xmm2, %xmm1
callq 0xb740
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x38(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
addsd 0x18(%rsp), %xmm1
callq 0xb740
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xba00
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xbc00
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xbb80
jmp 0x442ea
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x38(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
callq 0xb220
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x38(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
movsd 0x18(%rsp), %xmm2
movsd 0x124099(%rip), %xmm3   # 0x168328
divsd %xmm3, %xmm2
addsd %xmm2, %xmm1
callq 0xb740
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movsd 0x38(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
addsd 0x18(%rsp), %xmm1
callq 0xb740
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xba00
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xbc00
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xbb80
jmp 0x442ea
jmp 0x442ea
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xba10
addq $0x48, %rsp
retq
nopl (%rax)