// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/annotationsketch/graphics_cairo.c
// Function: gt_graphics_cairo_draw_box
void gt_graphics_cairo_draw_box(GtGraphics *gg, double x, double y,
                                double width, double height,
                                GtColor fill_color, ArrowStatus arrow_status,
                                double arrow_width, double stroke_width,
                                GtColor stroke_color, bool dashed)
{
  GtGraphicsCairo *g = gt_graphics_cairo_cast(gg);
  double dashes[]={2.0};
  bool widthdiff_geq0;
  gt_assert(g);

  /* save cairo context */
  cairo_save(g->cr);
  cairo_rectangle(g->cr, rnd_to_nhalf(g->margin_x), g->margin_y,
                  rnd_to_nhalf(g->width-2*g->margin_x),
                  g->height-2*g->margin_y);
  cairo_clip(g->cr);

  widthdiff_geq0 = gt_double_smaller_double(0, width - arrow_width);
  /* construct shape of the box or arrow */
  switch (arrow_status)
  {
    case ARROW_RIGHT:
      cairo_move_to(g->cr, rnd_to_nhalf(x), rnd_to_nhalf(y));
      if (widthdiff_geq0)
        cairo_line_to(g->cr, x + width - arrow_width, rnd_to_nhalf(y));
      cairo_line_to(g->cr, rnd_to_nhalf(x + width),
                           rnd_to_nhalf(y + height / 2));
      if (widthdiff_geq0)
        cairo_line_to(g->cr, x + width - arrow_width, rnd_to_nhalf(y + height));
      cairo_line_to(g->cr, rnd_to_nhalf(x), rnd_to_nhalf(y + height));
      cairo_close_path(g->cr);
      break;
    case ARROW_LEFT:
      cairo_move_to(g->cr, rnd_to_nhalf(x + width), rnd_to_nhalf(y));
      if (widthdiff_geq0) {
        cairo_line_to(g->cr, rnd_to_nhalf(x + arrow_width), rnd_to_nhalf(y));
      }
      cairo_line_to(g->cr, rnd_to_nhalf(x), rnd_to_nhalf(y + height / 2));
      if (widthdiff_geq0) {
        cairo_line_to(g->cr, rnd_to_nhalf(x + arrow_width),
                             rnd_to_nhalf(y + height));
      }
      cairo_line_to(g->cr, rnd_to_nhalf(x + width), rnd_to_nhalf(y + height));
      cairo_close_path(g->cr);
      break;
    case ARROW_BOTH:
      cairo_move_to(g->cr, rnd_to_nhalf(x), rnd_to_nhalf(y + height/2));
      if (gt_double_smaller_double(width, 2*arrow_width))
      {
        cairo_line_to(g->cr, rnd_to_nhalf(x + width/2), rnd_to_nhalf(y));
        cairo_line_to(g->cr, rnd_to_nhalf(x + width),
                             rnd_to_nhalf(y + height/2));
        cairo_line_to(g->cr, rnd_to_nhalf(x + width/2),
                             rnd_to_nhalf(y + height));
      }
      else
      {
        cairo_line_to(g->cr, rnd_to_nhalf(x + arrow_width), rnd_to_nhalf(y));
        cairo_line_to(g->cr, rnd_to_nhalf(x + width - arrow_width),
                             rnd_to_nhalf(y));
        cairo_line_to(g->cr, rnd_to_nhalf(x + width),
                             rnd_to_nhalf(y + height/2));
        cairo_line_to(g->cr, rnd_to_nhalf(x + width - arrow_width),
                             rnd_to_nhalf(y + height));
        cairo_line_to(g->cr, rnd_to_nhalf(x + arrow_width), y + height);
      }
      cairo_close_path(g->cr);
      break;
    case ARROW_NONE:
      cairo_rectangle(g->cr, rnd_to_nhalf(x), rnd_to_nhalf(y), width, height);
   }
   /* fill area */
   cairo_set_source_rgba(g->cr, fill_color.red,
                                fill_color.green,
                                fill_color.blue,
                                fill_color.alpha);
   cairo_fill_preserve(g->cr);
   /* draw outline */
   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);
   if (dashed)
     cairo_set_dash(g->cr, dashes, 1, (double) 0);
   cairo_stroke(g->cr);
   /* restore cairo context */
   cairo_restore(g->cr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edx, %ebp
movsd %xmm5, 0x48(%rsp)
movsd %xmm4, 0x28(%rsp)
movl %esi, %r15d
movsd %xmm3, 0x20(%rsp)
movsd %xmm2, 0x10(%rsp)
movsd %xmm1, 0x18(%rsp)
movsd %xmm0, 0x8(%rsp)
movq %rdi, %rbx
callq 0x2e259
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2c5a1
movq %rax, %rbx
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
movq %rax, 0x50(%rsp)
testq %rbx, %rbx
je 0x2f9d1
leaq 0xb0(%rsp), %r12
leaq 0x90(%rsp), %r13
movq 0x10(%rbx), %rdi
callq 0xb3d0
movq 0x10(%rbx), %r14
movsd 0x50(%rbx), %xmm0
movsd %xmm0, 0x40(%rsp)
addsd 0xa4414(%rip), %xmm0    # 0xd3640
callq 0xbab0
movsd 0xa4407(%rip), %xmm1    # 0xd3640
addsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x58(%rbx), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x68(%rbx), %xmm0
movsd 0x40(%rsp), %xmm2
addsd %xmm2, %xmm2
subsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0xbab0
movapd %xmm0, %xmm2
addsd 0xa43ca(%rip), %xmm2    # 0xd3640
movsd 0x60(%rbx), %xmm3
movsd 0x38(%rsp), %xmm1
movapd %xmm1, %xmm0
addsd %xmm1, %xmm0
subsd %xmm0, %xmm3
movq %r14, %rdi
movsd 0x30(%rsp), %xmm0
callq 0xb2e0
movq 0x10(%rbx), %rdi
callq 0xbb40
movsd 0x10(%rsp), %xmm1
subsd 0x28(%rsp), %xmm1
xorps %xmm0, %xmm0
callq 0x58dba
cmpl $0x3, %r15d
ja 0x2f93a
movl %eax, %r14d
movl %r15d, %eax
leaq 0xa4e59(%rip), %rcx     # 0xd4128
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rbx), %r15
movsd 0x10(%rsp), %xmm1
addsd 0x8(%rsp), %xmm1
movsd 0xa4350(%rip), %xmm0    # 0xd3640
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0xbab0
movsd 0xa433b(%rip), %xmm1    # 0xd3640
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
callq 0xbab0
movapd %xmm0, %xmm1
addsd 0xa4316(%rip), %xmm1    # 0xd3640
movq %r15, %rdi
movsd 0x10(%rsp), %xmm0
movsd %xmm1, 0x30(%rsp)
callq 0xb240
movq 0x10(%rbx), %r15
testb %r14b, %r14b
je 0x2f795
movsd 0x28(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movsd 0xa42e1(%rip), %xmm1    # 0xd3640
addsd %xmm1, %xmm0
callq 0xbab0
addsd 0xa42d0(%rip), %xmm0    # 0xd3640
movsd %xmm0, 0x28(%rsp)
movq %r15, %rdi
movsd 0x30(%rsp), %xmm1
callq 0xb770
movq 0x10(%rbx), %r14
movsd 0x8(%rsp), %xmm0
addsd 0xa42aa(%rip), %xmm0    # 0xd3640
callq 0xbab0
movsd 0xa429d(%rip), %xmm1    # 0xd3640
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x20(%rsp), %xmm0
mulsd %xmm1, %xmm0
addsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
callq 0xbab0
movapd %xmm0, %xmm1
addsd 0xa426e(%rip), %xmm1    # 0xd3640
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
callq 0xb770
movq 0x10(%rbx), %r14
movsd 0x18(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
addsd 0xa4248(%rip), %xmm0    # 0xd3640
callq 0xbab0
movapd %xmm0, %xmm1
addsd 0xa4237(%rip), %xmm1    # 0xd3640
movsd %xmm1, 0x8(%rsp)
movq %r14, %rdi
movsd 0x28(%rsp), %xmm0
callq 0xb770
movsd 0x8(%rsp), %xmm1
jmp 0x2f816
movq 0x10(%rbx), %r14
movsd 0x8(%rsp), %xmm0
movsd 0xa4206(%rip), %xmm1    # 0xd3640
addsd %xmm1, %xmm0
callq 0xbab0
movsd 0xa41f5(%rip), %xmm1    # 0xd3640
addsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x20(%rsp), %xmm0
mulsd %xmm1, %xmm0
addsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
callq 0xbab0
movapd %xmm0, %xmm1
addsd 0xa41c6(%rip), %xmm1    # 0xd3640
movq %r14, %rdi
movsd 0x30(%rsp), %xmm0
movsd %xmm1, 0x30(%rsp)
callq 0xb240
movsd 0x28(%rsp), %xmm1
addsd %xmm1, %xmm1
movsd 0x10(%rsp), %xmm0
callq 0x58dba
movq 0x10(%rbx), %r14
testb %al, %al
je 0x2f673
movsd 0x10(%rsp), %xmm0
movsd 0xa4183(%rip), %xmm1    # 0xd3640
mulsd %xmm1, %xmm0
addsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm0
callq 0xbab0
movsd 0xa4168(%rip), %xmm1    # 0xd3640
addsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
callq 0xbab0
movapd %xmm0, %xmm1
addsd 0xa4143(%rip), %xmm1    # 0xd3640
movq %r14, %rdi
movsd 0x28(%rsp), %xmm0
callq 0xb770
movq 0x10(%rbx), %r14
movsd 0x8(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
addsd 0xa411d(%rip), %xmm0    # 0xd3640
callq 0xbab0
addsd 0xa4110(%rip), %xmm0    # 0xd3640
movq %r14, %rdi
movsd 0x30(%rsp), %xmm1
callq 0xb770
movq 0x10(%rbx), %r14
movsd 0x20(%rsp), %xmm0
addsd 0x18(%rsp), %xmm0
addsd 0xa40ea(%rip), %xmm0    # 0xd3640
callq 0xbab0
movsd 0xa40dd(%rip), %xmm1    # 0xd3640
addsd %xmm0, %xmm1
movq %r14, %rdi
movsd 0x28(%rsp), %xmm0
jmp 0x2f92c
movq 0x10(%rbx), %r14
movsd 0xa40bf(%rip), %xmm1    # 0xd3640
movsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm0
callq 0xbab0
movsd 0xa40a8(%rip), %xmm1    # 0xd3640
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
callq 0xbab0
movsd 0xa4087(%rip), %xmm1    # 0xd3640
addsd %xmm0, %xmm1
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm2
movsd 0x20(%rsp), %xmm3
callq 0xb2e0
jmp 0x2f93a
movq 0x10(%rbx), %r15
movsd 0x8(%rsp), %xmm0
movsd 0xa4052(%rip), %xmm1    # 0xd3640
addsd %xmm1, %xmm0
callq 0xbab0
movsd 0xa4041(%rip), %xmm1    # 0xd3640
addsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
callq 0xbab0
movapd %xmm0, %xmm1
addsd 0xa401c(%rip), %xmm1    # 0xd3640
movq %r15, %rdi
movsd 0x30(%rsp), %xmm0
movsd %xmm1, 0x38(%rsp)
callq 0xb240
testb %r14b, %r14b
je 0x2f825
movq 0x10(%rbx), %rdi
movsd 0x8(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
subsd 0x28(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
callq 0xb770
movsd 0x8(%rsp), %xmm0
jmp 0x2f831
movsd 0x8(%rsp), %xmm0
addsd 0x28(%rsp), %xmm0
movsd 0xa3fb9(%rip), %xmm1    # 0xd3640
addsd %xmm1, %xmm0
callq 0xbab0
movsd 0xa3fa8(%rip), %xmm1    # 0xd3640
addsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
callq 0xbab0
movapd %xmm0, %xmm1
addsd 0xa3f83(%rip), %xmm1    # 0xd3640
movsd %xmm1, 0x40(%rsp)
movq %r14, %rdi
movsd 0x38(%rsp), %xmm0
callq 0xb770
movq 0x10(%rbx), %r14
movsd 0x10(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
subsd 0x28(%rsp), %xmm0
addsd 0xa3f4b(%rip), %xmm0    # 0xd3640
callq 0xbab0
addsd 0xa3f3e(%rip), %xmm0    # 0xd3640
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
movsd 0x40(%rsp), %xmm1
callq 0xb770
movq 0x10(%rbx), %r14
movsd 0x10(%rsp), %xmm0
addsd 0xa3f18(%rip), %xmm0    # 0xd3640
callq 0xbab0
addsd 0xa3f0b(%rip), %xmm0    # 0xd3640
movq %r14, %rdi
movsd 0x30(%rsp), %xmm1
callq 0xb770
movq 0x10(%rbx), %r14
movsd 0x20(%rsp), %xmm0
addsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
addsd 0xa3edf(%rip), %xmm0    # 0xd3640
callq 0xbab0
movsd 0xa3ed2(%rip), %xmm1    # 0xd3640
addsd %xmm0, %xmm1
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
callq 0xb770
movq 0x10(%rbx), %rdi
movsd 0x38(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
jmp 0x2f92c
movsd 0xa3ea3(%rip), %xmm1    # 0xd3640
movsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm0
callq 0xbab0
movsd 0xa3e8c(%rip), %xmm1    # 0xd3640
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x20(%rsp), %xmm0
mulsd %xmm1, %xmm0
addsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
callq 0xbab0
movapd %xmm0, %xmm1
addsd 0xa3e5d(%rip), %xmm1    # 0xd3640
movq %r15, %rdi
movsd 0x8(%rsp), %xmm0
callq 0xb770
movsd 0x18(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
addsd 0xa3e3b(%rip), %xmm0    # 0xd3640
callq 0xbab0
movapd %xmm0, %xmm1
addsd 0xa3e2a(%rip), %xmm1    # 0xd3640
movq 0x10(%rbx), %rdi
movsd 0x10(%rsp), %xmm0
jmp 0x2f92c
movsd 0x8(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
movq 0x10(%rbx), %r15
movsd %xmm0, 0x8(%rsp)
movsd 0xa3dfd(%rip), %xmm1    # 0xd3640
addsd %xmm1, %xmm0
callq 0xbab0
movsd 0xa3dec(%rip), %xmm1    # 0xd3640
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x20(%rsp), %xmm0
mulsd %xmm1, %xmm0
addsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
callq 0xbab0
movapd %xmm0, %xmm1
addsd 0xa3dbd(%rip), %xmm1    # 0xd3640
movq %r15, %rdi
movsd 0x10(%rsp), %xmm0
callq 0xb770
testb %r14b, %r14b
je 0x2f8f5
movq 0x10(%rbx), %r14
movsd 0x8(%rsp), %xmm0
subsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x18(%rsp), %xmm1
addsd 0x20(%rsp), %xmm1
movsd 0xa3d80(%rip), %xmm0    # 0xd3640
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0xbab0
movapd %xmm0, %xmm1
addsd 0xa3d67(%rip), %xmm1    # 0xd3640
movsd %xmm1, 0x10(%rsp)
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
callq 0xb770
movsd 0x10(%rsp), %xmm1
jmp 0x2f922
movsd 0x18(%rsp), %xmm1
addsd 0x20(%rsp), %xmm1
movsd 0xa3d37(%rip), %xmm0    # 0xd3640
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0xbab0
movapd %xmm0, %xmm1
addsd 0xa3d1e(%rip), %xmm1    # 0xd3640
movq 0x10(%rbx), %rdi
movsd 0x30(%rsp), %xmm0
callq 0xb770
movq 0x10(%rbx), %rdi
callq 0xba30
movq 0x10(%rbx), %rdi
movsd (%r13), %xmm0
movsd 0x8(%r13), %xmm1
movsd 0x10(%r13), %xmm2
movsd 0x18(%r13), %xmm3
callq 0xb380
movq 0x10(%rbx), %rdi
callq 0xbc30
movq 0x10(%rbx), %rdi
movsd 0x48(%rsp), %xmm0
callq 0xb0a0
movq 0x10(%rbx), %rdi
movsd (%r12), %xmm0
movsd 0x8(%r12), %xmm1
movsd 0x10(%r12), %xmm2
movsd 0x18(%r12), %xmm3
callq 0xb380
testb %bpl, %bpl
je 0x2f9b0
movq 0x10(%rbx), %rdi
leaq 0x50(%rsp), %rsi
pushq $0x1
popq %rdx
xorps %xmm0, %xmm0
callq 0xbcb0
movq 0x10(%rbx), %rdi
callq 0xbbb0
movq 0x10(%rbx), %rdi
callq 0xba40
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xfe5e0(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x9a684(%rip), %rsi     # 0xca066
leaq 0xa41e6(%rip), %rdx     # 0xd3bcf
leaq 0xa4b13(%rip), %rcx     # 0xd4503
leaq 0xa4775(%rip), %r8      # 0xd416c
movl $0x177, %r9d            # imm = 0x177
xorl %eax, %eax
callq 0xb8c0
callq 0xb300