// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/annotationsketch/canvas_cairo_context.c
// Function: gt_canvas_cairo_context_new
GtCanvas* gt_canvas_cairo_context_new(GtStyle *style, cairo_t *context,
                                      double offsetpos,
                                      GtUword width,
                                      GtUword height,
                                      GtImageInfo *image_info,
                                      GtError *err)
{
  GtCanvas *canvas;
  GtCanvasCairoContext *ccc;
  double margins = 10.0;
  gt_assert(style && width > 0 && height > 0);
  if (gt_style_get_num(style,
                       "format", "margins", &margins,
                       NULL, err) == GT_STYLE_QUERY_ERROR) {
    return NULL;
  }
  canvas = gt_canvas_create(gt_canvas_cairo_context_class());
  canvas->pvt->y += offsetpos;
  canvas->pvt->g = gt_graphics_cairo_new_from_context(context,
                                                      width,
                                                      height+offsetpos);
  gt_graphics_set_margins(canvas->pvt->g, margins, 0);
  canvas->pvt->margins = margins;
  if (image_info)
    gt_image_info_set_height(image_info, height);
  canvas->pvt->sty = style;
  canvas->pvt->y += 0.5;
  canvas->pvt->ii = image_info;
  canvas->pvt->width = width;
  canvas->pvt->height = height;
  canvas->pvt->bt = NULL;
  ccc = canvas_cairo_context_cast(canvas);
  ccc->context = context;
  return canvas;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movsd %xmm0, 0x10(%rsp)
movabsq $0x4024000000000000, %rax # imm = 0x4024000000000000
movq %rax, 0x8(%rsp)
testq %rdi, %rdi
je 0x2d115c
movq %rdx, %r12
testq %rdx, %rdx
je 0x2d115c
movq %rcx, %r14
testq %rcx, %rcx
je 0x2d115c
movq %r8, %r15
movq %rsi, %rbx
movq %rdi, %r13
leaq 0x2aab4(%rip), %rsi     # 0x2fbb0a
leaq 0xb5e63(%rip), %rdx     # 0x386ec0
xorl %ebp, %ebp
leaq 0x8(%rsp), %rcx
xorl %r8d, %r8d
callq 0x1d7bd0
cmpl $0x2, %eax
je 0x2d114a
callq 0x2d0f78
movq %rax, %rdi
callq 0x1cdb57
movq %rax, %rbp
movq 0x8(%rax), %rax
movsd 0x18(%rax), %xmm0
movsd 0x10(%rsp), %xmm2
addsd %xmm2, %xmm0
movsd %xmm0, 0x18(%rax)
movq %r14, %xmm0
punpckldq 0x16836(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1683e(%rip), %xmm0    # 0x2e78f0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
addsd %xmm2, %xmm1
cvttsd2si %xmm1, %rdx
movq %rbx, %rdi
movl %r12d, %esi
callq 0x2d4f6b
movq 0x8(%rbp), %rcx
movq %rax, 0x58(%rcx)
movsd 0x8(%rsp), %xmm0
xorpd %xmm1, %xmm1
movq %rax, %rdi
callq 0x1d0e39
movsd 0x8(%rsp), %xmm0
movq 0x8(%rbp), %rax
movsd %xmm0, 0x20(%rax)
testq %r15, %r15
je 0x2d110f
movq %r15, %rdi
movl %r14d, %esi
callq 0x1d3db7
movq 0x8(%rbp), %rax
movq %r13, 0x38(%rax)
movsd 0x18(%rax), %xmm0
addsd 0x24d38(%rip), %xmm0    # 0x2f5e58
movsd %xmm0, 0x18(%rax)
movq %r15, 0x60(%rax)
movq %r12, 0x28(%rax)
movq %r14, 0x30(%rax)
andq $0x0, 0x50(%rax)
callq 0x2d0f78
movq %rax, %rdi
movq %rbp, %rsi
callq 0x1cdcaa
movq %rbx, 0x10(%rax)
movq %rbp, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x166e05(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x13ea6(%rip), %rsi     # 0x2e5013
leaq 0xb5539(%rip), %rdx     # 0x3866ad
leaq 0xb5553(%rip), %rcx     # 0x3866ce
leaq 0xb5568(%rip), %r8      # 0x3866ea
pushq $0x4b
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
nop