// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/annotationsketch/canvas_cairo_file.c
// Function: gt_canvas_cairo_file_new
GtCanvas* gt_canvas_cairo_file_new(GtStyle *style,
                                   GtGraphicsOutType output_type,
                                   GtUword width, GtUword height,
                                   GtImageInfo *image_info,
                                   GtError *err)
{
  GtCanvas *canvas;
  GtColor bgcolor = {1.0, 1.0, 1.0, 1.0};
  GtCanvasCairoFile *ccf;
  GtStyleQueryStatus status;
  double margins = 10.0;
  gt_assert(style && width > 0 && height > 0);

  status = gt_style_get_color(style, "format", "background_color", &bgcolor,
                              NULL, err);
  switch (status) {
    case GT_STYLE_QUERY_ERROR:
      return NULL;
    case GT_STYLE_QUERY_NOT_SET:
      bgcolor.red = bgcolor.green = bgcolor.blue = bgcolor.alpha = 1.0;
      break;
    default:
      break;
    }
  if (gt_style_get_num(style,
                       "format", "margins", &margins,
                       NULL, err) == GT_STYLE_QUERY_ERROR) {
    return NULL;
  }

  canvas = gt_canvas_create(gt_canvas_cairo_file_class());
  canvas->pvt->g = gt_graphics_cairo_new(output_type, width, height);
  (void) gt_graphics_set_background_color(canvas->pvt->g, bgcolor);
  (void) 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;
  ccf = canvas_cairo_file_cast(canvas);
  ccf->type = output_type;
  return canvas;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, 0x28(%rsp)
movups 0xa91b1(%rip), %xmm0    # 0xd3740
movaps %xmm0, 0x40(%rsp)
movupd 0xa9194(%rip), %xmm0    # 0xd3730
movapd %xmm0, 0x30(%rsp)
movabsq $0x4024000000000000, %rax # imm = 0x4024000000000000
movq %rax, 0x20(%rsp)
testq %rdi, %rdi
je 0x2a712
movq %rdx, %r12
testq %rdx, %rdx
je 0x2a712
movq %rcx, %r14
testq %rcx, %rcx
je 0x2a712
movq %r9, %rbx
movl %esi, %r15d
movq %rdi, %r13
leaq 0x9fbb4(%rip), %rsi     # 0xca196
leaq 0xa9cd6(%rip), %rdx     # 0xd42bf
xorl %ebp, %ebp
leaq 0x30(%rsp), %rcx
xorl %r8d, %r8d
callq 0x335b5
cmpl $0x2, %eax
je 0x2a700
cmpl $0x1, %eax
jne 0x2a61a
movapd 0xa9022(%rip), %xmm0    # 0xd3630
movapd %xmm0, 0x40(%rsp)
movapd %xmm0, 0x30(%rsp)
leaq 0x9fb75(%rip), %rsi     # 0xca196
leaq 0xa9e00(%rip), %rdx     # 0xd4428
xorl %ebp, %ebp
leaq 0x20(%rsp), %rcx
movq %r13, %rdi
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x33ff8
cmpl $0x2, %eax
je 0x2a700
callq 0x2a4eb
movq %rax, %rdi
callq 0x29e5b
movq %rax, %rbp
movl %r15d, %edi
movl %r12d, %esi
movl %r14d, %edx
callq 0x30b58
movq 0x8(%rbp), %rcx
movq %rax, 0x58(%rcx)
movaps 0x30(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rax, %rdi
callq 0x2ca43
movq 0x8(%rbp), %rax
movq 0x58(%rax), %rdi
movsd 0x20(%rsp), %xmm0
xorps %xmm1, %xmm1
callq 0x2cd71
movsd 0x20(%rsp), %xmm0
movq 0x8(%rbp), %rax
movsd %xmm0, 0x20(%rax)
movq 0x28(%rsp), %rbx
testq %rbx, %rbx
je 0x2a6c5
movq %rbx, %rdi
movl %r14d, %esi
callq 0x30f17
movq 0x8(%rbp), %rax
movq %r13, 0x38(%rax)
movsd 0x18(%rax), %xmm0
addsd 0xa8f6a(%rip), %xmm0    # 0xd3640
movsd %xmm0, 0x18(%rax)
movq %rbx, 0x60(%rax)
movq %r12, 0x28(%rax)
movq %r14, 0x30(%rax)
andq $0x0, 0x50(%rax)
callq 0x2a4eb
movq %rax, %rdi
movq %rbp, %rsi
callq 0x29fae
movl %r15d, 0x10(%rax)
movq %rbp, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10389f(%rip), %rax    # 0x12dfb8
movq (%rax), %rdi
leaq 0x9f943(%rip), %rsi     # 0xca066
leaq 0xa8fc9(%rip), %rdx     # 0xd36f3
leaq 0xa8fe3(%rip), %rcx     # 0xd3714
leaq 0xa8f2d(%rip), %r8      # 0xd3665
pushq $0x6c
popq %r9
xorl %eax, %eax
callq 0xb8c0
callq 0xb300