// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/gt_sketch_page.c
// Function: draw_header
static void draw_header(cairo_t *cr, const char *text, GT_UNUSED const char *fn,
                        const char *seqid, GT_UNUSED GtUword pagenum,
                        GT_UNUSED double width, GT_UNUSED double height,
                        double theight)
{
  cairo_text_extents_t ext;
  time_t t;
  char buffer[BUFSIZ];
  struct tm *tmp;
  double xpos = TEXT_SPACER;
  cairo_save(cr);
  t = time(NULL);
  tmp = localtime(&t);
  cairo_set_font_size(cr, theight);
  if (tmp)
  {
    (void) strftime(buffer, BUFSIZ, TIME_DATE_FORMAT, tmp);
    cairo_text_extents(cr, buffer, &ext);
    cairo_move_to(cr, width - TEXT_SPACER - ext.width, TEXT_SPACER
                    + theight);
    cairo_set_source_rgba(cr, 0,0,0,1);
    cairo_show_text(cr, buffer);
  }
  cairo_text_extents(cr, text, &ext);
  cairo_move_to(cr, xpos, TEXT_SPACER + theight);
  cairo_set_source_rgba(cr, 0,0,0,1);
  cairo_show_text(cr, text);
  xpos += ext.width+3;
  cairo_move_to(cr, xpos, TEXT_SPACER + theight);
  cairo_set_source_rgba(cr, 0.7, 0.7, 0.7, 1);
  cairo_show_text(cr, ", sequence region: ");
  cairo_text_extents(cr, ", sequence region: ", &ext);
  xpos += ext.width + 10;
  cairo_set_source_rgba(cr, 0,0,0,1);
  cairo_show_text(cr, seqid);
  xpos = TEXT_SPACER;
  cairo_move_to(cr, xpos, height - 2*TEXT_SPACER - theight);
  (void) snprintf(buffer, BUFSIZ, "Page "GT_WU"", pagenum+1);
  cairo_show_text(cr, buffer);
  cairo_restore(cr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2058, %rsp           # imm = 0x2058
movsd %xmm2, (%rsp)
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
callq 0x174a0
xorl %edi, %edi
callq 0x17740
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
callq 0x17550
movq %rax, %rbp
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x17aa0
testq %rbp, %rbp
je 0x226ed1
leaq 0x1a7f52(%rip), %rdx    # 0x3cedad
leaq 0x50(%rsp), %r13
movl $0x2000, %esi           # imm = 0x2000
movq %r13, %rdi
movq %rbp, %rcx
callq 0x17650
leaq 0x20(%rsp), %rbp
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x17bf0
movsd 0x8(%rsp), %xmm0
addsd 0x1a7bef(%rip), %xmm0   # 0x3cea80
subsd 0x10(%rbp), %xmm0
movsd 0x15e1f2(%rip), %xmm1   # 0x385090
addsd (%rsp), %xmm1
movq %rbx, %rdi
callq 0x172b0
movsd 0x128375(%rip), %xmm3   # 0x34f228
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %rbx, %rdi
callq 0x17440
movq %rbx, %rdi
movq %r13, %rsi
callq 0x17140
leaq 0x20(%rsp), %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x17bf0
movsd 0x15e1a4(%rip), %xmm0   # 0x385090
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movq %rbx, %rdi
callq 0x172b0
movsd 0x12831d(%rip), %xmm3   # 0x34f228
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %rbx, %rdi
callq 0x17440
movq %rbx, %rdi
movq %r12, %rsi
callq 0x17140
movsd 0x10(%r13), %xmm0
addsd 0x1a3209(%rip), %xmm0   # 0x3ca140
addsd 0x15e151(%rip), %xmm0   # 0x385090
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm1
callq 0x172b0
movsd 0x1a7b33(%rip), %xmm0   # 0x3cea88
movq %rbx, %rdi
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
movsd 0x1282c2(%rip), %xmm3   # 0x34f228
callq 0x17440
leaq 0x1a7e4d(%rip), %r12    # 0x3cedbf
movq %rbx, %rdi
movq %r12, %rsi
callq 0x17140
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x17bf0
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %rbx, %rdi
movsd 0x128289(%rip), %xmm3   # 0x34f228
callq 0x17440
movq %rbx, %rdi
movq %r15, %rsi
callq 0x17140
movsd 0x10(%rsp), %xmm1
addsd 0x1a7ab3(%rip), %xmm1   # 0x3cea70
subsd (%rsp), %xmm1
movq %rbx, %rdi
movsd 0x15e0c3(%rip), %xmm0   # 0x385090
callq 0x172b0
incq %r14
leaq 0x1a7df7(%rip), %rdx    # 0x3cedd3
leaq 0x50(%rsp), %r15
movl $0x2000, %esi           # imm = 0x2000
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x17c60
movq %rbx, %rdi
movq %r15, %rsi
callq 0x17140
movq %rbx, %rdi
callq 0x17cc0
addq $0x2058, %rsp           # imm = 0x2058
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq