LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/tidy_region_node_visitor.c
// Function: tidy_region_node_visitor_sequence_node
static int tidy_region_node_visitor_sequence_node(GtNodeVisitor *nv,
                                                  GtSequenceNode *sn,
                                                  GT_UNUSED GtError *err)
{
  GtTidyRegionNodeVisitor *trnv;
  gt_error_check(err);
  trnv = tidy_region_node_visitor_cast(nv);
  gt_queue_add(trnv->node_buffer, sn);
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x4bfba
movq %rdx, %rdi
callq 0x3566a
testb %al, %al
jne 0x4bfe0
callq 0x4bca8
movq %rax, %rdi
movq %r14, %rsi
callq 0x49c1d
movq 0x10(%rax), %rdi
movq %rbx, %rsi
callq 0x7c043
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x15065
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/tidy_region_node_visitor.c
// Function: tidy_region_node_visitor_eof_node
static int tidy_region_node_visitor_eof_node(GtNodeVisitor *nv,
                                             GtEOFNode *en,
                                             GT_UNUSED GtError *err)
{
  GtTidyRegionNodeVisitor *trnv;
  gt_error_check(err);
  trnv = tidy_region_node_visitor_cast(nv);
  gt_queue_add(trnv->node_buffer, en);
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x4c000
movq %rdx, %rdi
callq 0x3566a
testb %al, %al
jne 0x4c026
callq 0x4bca8
movq %rax, %rdi
movq %r14, %rsi
callq 0x49c1d
movq 0x10(%rax), %rdi
movq %rbx, %rsi
callq 0x7c043
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x1509c
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/tidy_region_node_visitor.c
// Function: tidy_region_node_visitor_meta_node
static int tidy_region_node_visitor_meta_node(GtNodeVisitor *nv,
                                              GtMetaNode *mn,
                                              GT_UNUSED GtError *err)
{
  GtTidyRegionNodeVisitor *trnv;
  gt_error_check(err);
  trnv = tidy_region_node_visitor_cast(nv);
  gt_queue_add(trnv->node_buffer, mn);
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x4c046
movq %rdx, %rdi
callq 0x3566a
testb %al, %al
jne 0x4c06c
callq 0x4bca8
movq %rax, %rdi
movq %r14, %rsi
callq 0x49c1d
movq 0x10(%rax), %rdi
movq %rbx, %rsi
callq 0x7c043
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x150d5
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/tidy_region_node_visitor.c
// Function: gt_tidy_region_node_visitor_new
GtNodeVisitor* gt_tidy_region_node_visitor_new(void)
{
  GtNodeVisitor *nv;
  GtTidyRegionNodeVisitor *tidy_region_node_visitor;
  nv = gt_node_visitor_create(gt_tidy_region_node_visitor_class());
  tidy_region_node_visitor = tidy_region_node_visitor_cast(nv);
  tidy_region_node_visitor->node_buffer = gt_queue_new();
  tidy_region_node_visitor->region_nodes = gt_hashmap_new(GT_HASH_STRING,
                                                gt_free_func,
                                                (GtFree) gt_genome_node_delete);
  return nv;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x4bca8
movq %rax, %rdi
callq 0x49bec
movq %rax, %rbx
callq 0x4bca8
movq %rax, %rdi
movq %rbx, %rsi
callq 0x49c1d
movq %rax, %r14
callq 0x7c028
movq %rax, 0x10(%r14)
leaq -0x15d49(%rip), %rsi    # 0x3635f
leaq -0x95d1(%rip), %rdx     # 0x42ade
movl $0x1, %edi
callq 0x76f28
movq %rax, 0x18(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/type_checker.c
// Function: gt_type_checker_create
GtTypeChecker* gt_type_checker_create(const GtTypeCheckerClass
                                       *type_checker_class)
{
  GtTypeChecker *type_checker;
  gt_assert(type_checker_class && type_checker_class->size);
  type_checker = gt_calloc(1, type_checker_class->size);
  type_checker->c_class = type_checker_class;
  return type_checker;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x4c130
movq %rdi, %rbx
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x4c130
leaq 0x9ded2(%rip), %rdx     # 0xe9fee
movl $0x1, %edi
movl $0x1c, %ecx
callq 0x3601f
movq %rbx, (%rax)
popq %rbx
retq
callq 0x1510e
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/type_checker.c
// Function: gt_type_checker_delete
void gt_type_checker_delete(GtTypeChecker *type_checker)
{
  if (!type_checker) return;
  if (type_checker->reference_count) {
    type_checker->reference_count--;
    return;
  }
  gt_assert(type_checker->c_class);
  if (type_checker->c_class->free)
    type_checker->c_class->free(type_checker);
  gt_free(type_checker);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x4c1fc
movq %rdi, %rbx
movl 0x8(%rdi), %eax
testl %eax, %eax
je 0x4c1fe
decl %eax
movl %eax, 0x8(%rbx)
popq %rbx
retq
movq (%rbx), %rax
testq %rax, %rax
je 0x4c229
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x4c214
movq %rbx, %rdi
callq *%rax
leaq 0x9ddd3(%rip), %rsi     # 0xe9fee
movq %rbx, %rdi
movl $0x5a, %edx
popq %rbx
jmp 0x362a0
callq 0x1528f
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/visitor_stream.c
// Function: gt_visitor_stream_class
const GtNodeStreamClass* gt_visitor_stream_class(void)
{
  static const GtNodeStreamClass *nsc = NULL;
  gt_class_alloc_lock_enter();
  if (!nsc) {
    nsc = gt_node_stream_class_new(sizeof (GtVisitorStream),
                                   visitor_stream_free,
                                   visitor_stream_next);
  }
  gt_class_alloc_lock_leave();
  return nsc;
}

// Assembly:
pushq %rax
callq 0x71d9b
cmpq $0x0, 0x106932(%rip)    # 0x152b88
jne 0x4c277
leaq 0x26(%rip), %rsi        # 0x4c285
leaq 0x49(%rip), %rdx        # 0x4c2af
movl $0x20, %edi
callq 0x498b0
movq %rax, 0x106911(%rip)    # 0x152b88
callq 0x71db1
movq 0x106905(%rip), %rax    # 0x152b88
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/visitor_stream.c
// Function: visitor_stream_next
static int visitor_stream_next(GtNodeStream *ns, GtGenomeNode **gn,
                               GtError *err)
{
  GtVisitorStream *visitor_stream;
  int had_err;
  gt_error_check(err);
  visitor_stream = visitor_stream_cast(ns);
  had_err = gt_node_stream_next(visitor_stream->in_stream, gn, err);
  if (!had_err && *gn)
    had_err = gt_genome_node_accept(*gn, visitor_stream->visitor, err);
  if (had_err) {
    /* we own the node -> delete it */
    gt_genome_node_delete(*gn);
    *gn = NULL;
  }
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
testq %rdx, %rdx
je 0x4c2d0
movq %r14, %rdi
callq 0x3566a
testb %al, %al
jne 0x4c332
callq 0x4c248
movq %rax, %rdi
movq %r15, %rsi
callq 0x49b60
movq %rax, %r15
movq 0x10(%rax), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x499e4
movl %eax, %ebp
testl %eax, %eax
jne 0x4c312
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4c310
movq 0x18(%r15), %rsi
movq %r14, %rdx
callq 0x42036
movl %eax, %ebp
jmp 0x4c312
xorl %ebp, %ebp
testl %ebp, %ebp
je 0x4c325
movq (%rbx), %rdi
callq 0x42ade
movq $0x0, (%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x152fd
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/visitor_stream.c
// Function: gt_visitor_stream_new
GtNodeStream* gt_visitor_stream_new(GtNodeStream *in_stream,
                                    GtNodeVisitor *visitor)
{
  GtVisitorStream *visitor_stream;
  GtNodeStream *ns;
  ns = gt_node_stream_create(gt_visitor_stream_class(),
                             gt_node_stream_is_sorted(in_stream));
  visitor_stream = visitor_stream_cast(ns);
  visitor_stream->in_stream = gt_node_stream_ref(in_stream);
  visitor_stream->visitor = visitor;
  return ns;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4c248
movq %rax, %r15
movq %r14, %rdi
callq 0x49b4d
movzbl %al, %esi
movq %r15, %rdi
callq 0x498e8
movq %rax, %r15
callq 0x4c248
movq %rax, %rdi
movq %r15, %rsi
callq 0x49b60
movq %rax, %r12
movq %r14, %rdi
callq 0x49954
movq %rax, 0x10(%r12)
movq %rbx, 0x18(%r12)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/xrf_checker.c
// Function: gt_xrf_checker_new
GtXRFChecker* gt_xrf_checker_new(const char *file_path, GtError *err)
{
  GtXRFChecker *xrc;
  GtUword i;
  gt_error_check(err);
  gt_assert(file_path);

  xrc = gt_calloc(1UL, sizeof (GtXRFChecker));
  xrc->xpt = gt_xrf_abbr_parse_tree_new(file_path, err);
  if (!xrc->xpt) {
    gt_xrf_checker_delete(xrc);
    return NULL;
  }
  xrc->abbrvs = gt_hashmap_new(GT_HASH_STRING, NULL, NULL);
  for (i = 0; i < gt_xrf_abbr_parse_tree_num_of_entries(xrc->xpt); i++) {
    const GtXRFAbbrEntry *e = gt_xrf_abbr_parse_tree_get_entry(xrc->xpt, i);
    const char *synonym;
    gt_hashmap_add(xrc->abbrvs,
                   (void*) gt_xrf_abbr_entry_get_value(e, "abbreviation"),
                   (void*) e);
    if ((synonym = gt_xrf_abbr_entry_get_value(e, "synonym"))) {
      gt_hashmap_add(xrc->abbrvs, (void*) synonym, (void*) e);
    }
  }
  xrc->splitter = gt_splitter_new();
  return xrc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
testq %rsi, %rsi
je 0x4c61f
movq %r14, %rdi
callq 0x3566a
testb %al, %al
jne 0x4c714
testq %r15, %r15
je 0x4c70f
leaq 0x9dcad(%rip), %rdx     # 0xea2dc
movl $0x1, %edi
movl $0x20, %esi
movl $0x70, %ecx
callq 0x3601f
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x86bb0
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x4c6f3
movl $0x1, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x76f28
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
callq 0x87467
testq %rax, %rax
je 0x4c6e8
xorl %r14d, %r14d
leaq 0x9dd70(%rip), %r15     # 0xea3f7
leaq 0x9dd76(%rip), %r12     # 0xea404
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8744f
movq %rax, %r13
movq (%rbx), %rbp
movq %rax, %rdi
movq %r15, %rsi
callq 0x86b65
movq %rbp, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x77144
movq %r13, %rdi
movq %r12, %rsi
callq 0x86b65
testq %rax, %rax
je 0x4c6d7
movq (%rbx), %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x77144
incq %r14
movq 0x8(%rbx), %rdi
callq 0x87467
cmpq %rax, %r14
jb 0x4c68e
callq 0x3a794
movq %rax, 0x10(%rbx)
jmp 0x4c6fd
movq %rbx, %rdi
callq 0x4c719
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x154b5
callq 0x1547e
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/xrf_checker.c
// Function: gt_xrf_checker_delete
void gt_xrf_checker_delete(GtXRFChecker *xrc)
{
  if (!xrc) return;
  if (xrc->reference_count) {
    xrc->reference_count--;
    return;
  }
  gt_xrf_abbr_parse_tree_delete(xrc->xpt);
  gt_hashmap_delete(xrc->abbrvs);
  gt_splitter_delete(xrc->splitter);
  gt_free(xrc);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x4c732
movq %rdi, %rbx
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x4c734
decq %rax
movq %rax, 0x18(%rbx)
popq %rbx
retq
movq 0x8(%rbx), %rdi
callq 0x873ca
movq (%rbx), %rdi
callq 0x77675
movq 0x10(%rbx), %rdi
callq 0x3a9dc
leaq 0x9db87(%rip), %rsi     # 0xea2dc
movq %rbx, %rdi
movl $0x8f, %edx
popq %rbx
jmp 0x362a0
nop
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/canvas.c
// Function: gt_canvas_class_new
const GtCanvasClass* gt_canvas_class_new(size_t size,
                                         GtCanvasVisitLayoutFunc la_visit_pre,
                                         GtCanvasVisitLayoutFunc la_visit_post,
                                         GtCanvasVisitTrackFunc t_visit_pre,
                                         GtCanvasVisitTrackFunc t_visit_post,
                                         GtCanvasVisitLineFunc l_visit_pre,
                                         GtCanvasVisitLineFunc l_visit_post,
                                         GtCanvasVisitBlockFunc b_visit,
                                         GtCanvasVisitElementFunc e_visit,
                                         GtCanvasVisitCustomTrackFunc ct_visit,
                                         GtCanvasDrawRulerFunc draw_ruler_func,
                                         GtCanvasFreeFunc free)
{
  GtCanvasClass *c_class = gt_class_alloc(sizeof *c_class);
  c_class->size = size;
  c_class->visit_layout_pre   = la_visit_pre;
  c_class->visit_layout_post  = la_visit_post;
  c_class->visit_track_pre    = t_visit_pre;
  c_class->visit_track_post   = t_visit_post;
  c_class->visit_line_pre     = l_visit_pre;
  c_class->visit_line_post    = l_visit_post;
  c_class->visit_block        = b_visit;
  c_class->visit_element      = e_visit;
  c_class->visit_ct           = ct_visit;
  c_class->draw_ruler_func    = draw_ruler_func;
  c_class->free = free;
  return c_class;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movl $0x60, %edi
callq 0x71ca4
movq %rbp, (%rax)
movq %r13, 0x8(%rax)
movq %r12, 0x10(%rax)
movq %r15, 0x18(%rax)
movq %r14, 0x20(%rax)
movq %rbx, 0x28(%rax)
movaps 0x40(%rsp), %xmm0
movups %xmm0, 0x30(%rax)
movaps 0x50(%rsp), %xmm0
movups %xmm0, 0x40(%rax)
movaps 0x60(%rsp), %xmm0
movups %xmm0, 0x50(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/canvas.c
// Function: gt_canvas_create
GtCanvas* gt_canvas_create(const GtCanvasClass *cc)
{
  GtCanvas *c;
  gt_assert(cc && cc->size);
  c = gt_calloc(1, cc->size);
  c->c_class = cc;
  c->pvt = gt_calloc(1, sizeof (GtCanvasMembers));
  return c;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x4ca79
movq %rdi, %rbx
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x4ca79
leaq 0x9da01(%rip), %r14     # 0xea43e
movl $0x1, %edi
movq %r14, %rdx
movl $0xa5, %ecx
callq 0x3601f
movq %rax, %r15
movq %rbx, (%rax)
movl $0x1, %edi
movl $0x68, %esi
movq %r14, %rdx
movl $0xa7, %ecx
callq 0x3601f
movq %rax, 0x8(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
callq 0x1555c
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/canvas.c
// Function: gt_canvas_delete
void gt_canvas_delete(GtCanvas *canvas)
{
  if (!canvas) return;
  gt_assert(canvas->c_class);
  if (canvas->c_class->free)
    canvas->c_class->free(canvas);
  if (canvas->pvt->g)
    gt_graphics_delete(canvas->pvt->g);
  if (canvas->pvt->bt)
    gt_bittab_delete(canvas->pvt->bt);
  gt_free(canvas->pvt);
  gt_free(canvas);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4caf3
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x4cafb
movq 0x58(%rax), %rax
testq %rax, %rax
je 0x4caa0
movq %rbx, %rdi
callq *%rax
movq 0x8(%rbx), %rax
movq 0x58(%rax), %rdi
testq %rdi, %rdi
je 0x4cab2
callq 0x4e7fd
movq 0x8(%rbx), %rax
movq 0x50(%rax), %rdi
testq %rdi, %rdi
je 0x4cac4
callq 0x70e34
movq 0x8(%rbx), %rdi
leaq 0x9d96f(%rip), %r14     # 0xea43e
movq %r14, %rsi
movl $0xb5, %edx
callq 0x362a0
movq %rbx, %rdi
movq %r14, %rsi
movl $0xb6, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x362a0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x15595
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/canvas.c
// Function: gt_canvas_visit_layout_pre
int gt_canvas_visit_layout_pre(GtCanvas *canvas, GtLayout* layout, GtError *err)
{
  gt_assert(canvas && layout);
  if (canvas->c_class->visit_layout_pre)
    return canvas->c_class->visit_layout_pre(canvas, layout, err);
  else
    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x4cb62
testq %rsi, %rsi
je 0x4cb62
movq (%rdi), %rax
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x4cb5f
jmpq *%rax
xorl %eax, %eax
retq
pushq %rax
callq 0x15679
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/canvas.c
// Function: gt_canvas_visit_layout_post
int gt_canvas_visit_layout_post(GtCanvas *canvas, GtLayout* layout,
                                GtError *err)
{
  gt_assert(canvas && layout);
  if (canvas->c_class->visit_layout_post)
    return canvas->c_class->visit_layout_post(canvas, layout, err);
  else
    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x4cb83
testq %rsi, %rsi
je 0x4cb83
movq (%rdi), %rax
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x4cb80
jmpq *%rax
xorl %eax, %eax
retq
pushq %rax
callq 0x156b2
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/canvas.c
// Function: gt_canvas_visit_track_pre
int gt_canvas_visit_track_pre(GtCanvas *canvas, GtTrack *track, GtError *err)
{
  gt_assert(canvas && track);
  canvas->pvt->current_track = track;
  if (canvas->c_class->visit_track_pre)
    return canvas->c_class->visit_track_pre(canvas, track, err);
  else
    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x4cbac
testq %rsi, %rsi
je 0x4cbac
movq 0x8(%rdi), %rax
movq %rsi, 0x40(%rax)
movq (%rdi), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x4cba9
jmpq *%rax
xorl %eax, %eax
retq
pushq %rax
callq 0x156eb
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/canvas.c
// Function: gt_canvas_visit_track_post
int gt_canvas_visit_track_post(GtCanvas *canvas, GtTrack *track, GtError *err)
{
  gt_assert(canvas && track);
  if (canvas->c_class->visit_track_post)
    return canvas->c_class->visit_track_post(canvas, track, err);
  else
    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x4cbcd
testq %rsi, %rsi
je 0x4cbcd
movq (%rdi), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x4cbca
jmpq *%rax
xorl %eax, %eax
retq
pushq %rax
callq 0x15724
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/canvas.c
// Function: gt_canvas_visit_line_pre
int gt_canvas_visit_line_pre(GtCanvas *canvas, GtLine *line, GtError *err)
{
  gt_assert(canvas && line);
  if (canvas->c_class->visit_line_pre)
    return canvas->c_class->visit_line_pre(canvas, line, err);
  else
    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x4cbee
testq %rsi, %rsi
je 0x4cbee
movq (%rdi), %rax
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x4cbeb
jmpq *%rax
xorl %eax, %eax
retq
pushq %rax
callq 0x1575d
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/canvas.c
// Function: gt_canvas_visit_line_post
int gt_canvas_visit_line_post(GtCanvas *canvas, GtLine *line, GtError *err)
{
  gt_assert(canvas && line);
  if (canvas->c_class->visit_line_post)
    return canvas->c_class->visit_line_post(canvas, line, err);
  else
    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x4cc0f
testq %rsi, %rsi
je 0x4cc0f
movq (%rdi), %rax
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x4cc0c
jmpq *%rax
xorl %eax, %eax
retq
pushq %rax
callq 0x15796
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/canvas.c
// Function: gt_canvas_visit_block
int gt_canvas_visit_block(GtCanvas *canvas, GtBlock *block, GtError *err)
{
  gt_assert(canvas && block);
  if (canvas->c_class->visit_block)
    return canvas->c_class->visit_block(canvas, block, err);
  else
    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x4cc30
testq %rsi, %rsi
je 0x4cc30
movq (%rdi), %rax
movq 0x38(%rax), %rax
testq %rax, %rax
je 0x4cc2d
jmpq *%rax
xorl %eax, %eax
retq
pushq %rax
callq 0x157cf
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/canvas.c
// Function: gt_canvas_visit_element
int gt_canvas_visit_element(GtCanvas *canvas, GtElement *element, GtError *err)
{
  gt_assert(canvas && element);
  if (canvas->c_class->visit_element)
    return canvas->c_class->visit_element(canvas, element, err);
  else
    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x4cc51
testq %rsi, %rsi
je 0x4cc51
movq (%rdi), %rax
movq 0x40(%rax), %rax
testq %rax, %rax
je 0x4cc4e
jmpq *%rax
xorl %eax, %eax
retq
pushq %rax
callq 0x15808
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/canvas.c
// Function: gt_canvas_visit_custom_track
int gt_canvas_visit_custom_track(GtCanvas *canvas, GtCustomTrack *ct,
                                 GtError *err)
{
  gt_assert(canvas && ct);
  if (canvas->c_class->visit_ct)
    return canvas->c_class->visit_ct(canvas, ct, err);
  else
    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x4cc72
testq %rsi, %rsi
je 0x4cc72
movq (%rdi), %rax
movq 0x48(%rax), %rax
testq %rax, %rax
je 0x4cc6f
jmpq *%rax
xorl %eax, %eax
retq
pushq %rax
callq 0x15841
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/canvas_cairo_file.c
// Function: gt_canvas_cairo_file_to_file
int gt_canvas_cairo_file_to_file(GtCanvasCairoFile *canvas,
                                 const char *filename, GtError *err)
{
  int had_err = 0;
  GtCanvas *c = (GtCanvas*) canvas;
  gt_error_check(err);
  gt_assert(canvas && filename);
  /* write out result file */
  if (c->pvt->g)
    had_err = gt_graphics_save_to_file(c->pvt->g, filename, err);
  else
  {
    /* XXX: shouldn't this be an assertion? */
    gt_error_set(err, "No graphics has been created yet!");
    had_err = -1;
  }

  return had_err;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rdx, %rdx
je 0x4ccab
movq %rbx, %rdi
callq 0x3566a
testb %al, %al
jne 0x4ccf3
testq %r15, %r15
je 0x4ccee
testq %r14, %r14
je 0x4ccee
movq 0x8(%r15), %rax
movq 0x58(%rax), %rdi
testq %rdi, %rdi
je 0x4ccd2
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x4f3bd
leaq 0x9da28(%rip), %rsi     # 0xea701
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
callq 0x158ea
callq 0x158b3
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/canvas_cairo_file.c
// Function: gt_canvas_cairo_file_to_stream
int gt_canvas_cairo_file_to_stream(GtCanvasCairoFile *canvas, GtStr *stream)
{
  int had_err = 0;
  GtCanvas *c = (GtCanvas*) canvas;
  gt_assert(canvas && stream);

  /* write out result file */
  if (c->pvt->g)
    gt_graphics_save_to_stream(c->pvt->g, stream);

  return had_err;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x4cd19
testq %rsi, %rsi
je 0x4cd19
movq 0x8(%rdi), %rax
movq 0x58(%rax), %rdi
testq %rdi, %rdi
je 0x4cd15
callq 0x4f42e
xorl %eax, %eax
popq %rcx
retq
callq 0x15921
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/canvas_cairo_file.c
// Function: gt_canvas_cairo_file_class
const GtCanvasClass* gt_canvas_cairo_file_class(void)
{
  static const GtCanvasClass *canvas_class = NULL;
  gt_class_alloc_lock_enter();
  if (!canvas_class) {
    canvas_class = gt_canvas_class_new(sizeof (GtCanvasCairoFile),
                                       gt_canvas_cairo_visit_layout_pre,
                                       gt_canvas_cairo_visit_layout_post,
                                       gt_canvas_cairo_visit_track_pre,
                                       gt_canvas_cairo_visit_track_post,
                                       gt_canvas_cairo_visit_line_pre,
                                       gt_canvas_cairo_visit_line_post,
                                       gt_canvas_cairo_visit_block,
                                       gt_canvas_cairo_visit_element,
                                       gt_canvas_cairo_visit_custom_track,
                                       gt_canvas_cairo_draw_ruler,
                                       NULL);
  }
  gt_class_alloc_lock_leave();
  return canvas_class;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x71d9b
cmpq $0x0, 0x105e61(%rip)    # 0x152b90
jne 0x4cd96
leaq 0x40be7(%rip), %rax     # 0x8d91f
leaq 0x4092a(%rip), %r10     # 0x8d669
leaq 0x3feb2(%rip), %r11     # 0x8cbf8
leaq 0x3f6ba(%rip), %rbx     # 0x8c407
leaq 0x3f5e9(%rip), %r14     # 0x8c33d
leaq 0x3f00d(%rip), %rsi     # 0x8bd68
leaq 0x3f0a6(%rip), %rdx     # 0x8be08
leaq 0x3f0a2(%rip), %rcx     # 0x8be0b
leaq 0x3f3a4(%rip), %r8      # 0x8c114
leaq 0x3f411(%rip), %r9      # 0x8c188
movl $0x18, %edi
pushq $0x0
pushq %rax
pushq %r10
pushq %r11
pushq %rbx
pushq %r14
callq 0x4c764
addq $0x30, %rsp
movq %rax, 0x105dfa(%rip)    # 0x152b90
callq 0x71db1
movq 0x105dee(%rip), %rax    # 0x152b90
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/diagram.c
// Function: gt_diagram_new
GtDiagram* gt_diagram_new(GtFeatureIndex *feature_index, const char *seqid,
                          const GtRange *range, GtStyle *style,
                          GtError *err)
{
  GtDiagram *diagram;
  int had_err = 0;
  GtArray *features = NULL;
  gt_assert(seqid && range && style);
  if (range->start == range->end)
  {
    gt_error_set(err, "range start must not be equal to range end");
    return NULL;
  }
  features = gt_array_new(sizeof (GtGenomeNode*));
  had_err = gt_feature_index_get_features_for_range(feature_index, features,
                                                    seqid, range, err);
  if (had_err)
  {
    gt_array_delete(features);
    return NULL;
  }
  diagram = gt_diagram_new_generic(features, range, style, false);
  return diagram;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x4cff3
movq %rdx, %r14
testq %rdx, %rdx
je 0x4cff3
movq %rcx, %rbx
testq %rcx, %rcx
je 0x4cff3
movq %r8, %r15
movq (%r14), %rax
cmpq 0x8(%r14), %rax
jne 0x4cf97
leaq 0x9d873(%rip), %rsi     # 0xea7fe
movq %r15, %rdi
xorl %eax, %eax
callq 0x3559f
jmp 0x4cfca
movq %rsi, %r12
movq %rdi, %r13
movl $0x8, %edi
callq 0x6e93c
movq %rax, %rbp
movq %r13, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %r15, %r8
callq 0x3e39c
movq %rbp, %rdi
testl %eax, %eax
je 0x4cfdb
callq 0x6f134
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4cff8
callq 0x1598f
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/diagram.c
// Function: gt_diagram_new_generic
static GtDiagram* gt_diagram_new_generic(GtArray *features,
                                         const GtRange *range,
                                         GtStyle *style,
                                         bool ref_features)
{
  GtDiagram *diagram;
  diagram = gt_calloc(1, sizeof (GtDiagram));
  diagram->nodeinfo = gt_hashmap_new(GT_HASH_DIRECT, NULL, NULL);
  diagram->style = style;
  diagram->lock = gt_rwlock_new();
  diagram->range = *range;
  if (ref_features)
    diagram->features = gt_array_ref(features);
  else
    diagram->features = features;
  diagram->select_func = default_track_selector;
  diagram->custom_tracks = gt_array_new(sizeof (GtCustomTrack*));
  /* init caches */
  diagram->collapsingtypes = gt_hashmap_new(GT_HASH_STRING, NULL, gt_free_func);
  diagram->groupedtypes = gt_hashmap_new(GT_HASH_STRING, NULL, gt_free_func);
  diagram->caption_display_status = gt_hashmap_new(GT_HASH_DIRECT, NULL,
                                                   gt_free_func);
  return diagram;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq 0x9d7cd(%rip), %rdx     # 0xea7df
movl $0x1, %edi
movl $0x68, %esi
movl $0x330, %ecx            # imm = 0x330
callq 0x3601f
movq %rax, %rbx
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x76f28
movq %rax, 0x8(%rbx)
movq %r15, 0x28(%rbx)
callq 0x3d8a7
movq %rax, 0x60(%rbx)
movups (%r12), %xmm0
movups %xmm0, 0x40(%rbx)
testl %ebp, %ebp
je 0x4d05d
movq %r14, %rdi
callq 0x6e9eb
movq %rax, %r14
movq %r14, 0x30(%rbx)
leaq 0x133(%rip), %rax       # 0x4d19b
movq %rax, 0x58(%rbx)
movl $0x8, %edi
callq 0x6e93c
movq %rax, 0x38(%rbx)
leaq -0x16d22(%rip), %r14    # 0x3635f
movl $0x1, %edi
xorl %esi, %esi
movq %r14, %rdx
callq 0x76f28
movq %rax, 0x10(%rbx)
movl $0x1, %edi
xorl %esi, %esi
movq %r14, %rdx
callq 0x76f28
movq %rax, 0x20(%rbx)
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rdx
callq 0x76f28
movq %rax, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/diagram.c
// Function: gt_diagram_get_range
GtRange gt_diagram_get_range(const GtDiagram *diagram)
{
  GtRange rng;
  gt_assert(diagram);
  gt_rwlock_rdlock(diagram->lock);
  rng = diagram->range;
  gt_rwlock_unlock(diagram->lock);
  return rng;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x4d115
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
callq 0x3d919
movq 0x40(%rbx), %r14
movq 0x48(%rbx), %r15
movq 0x60(%rbx), %rdi
callq 0x3d94f
movq %r14, %rax
movq %r15, %rdx
popq %rbx
popq %r14
popq %r15
retq
callq 0x15a01
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/diagram.c
// Function: gt_diagram_set_track_selector_func
void gt_diagram_set_track_selector_func(GtDiagram *diagram,
                                        GtTrackSelectorFunc bsfunc,
                                        void *ptr)
{
  gt_assert(diagram);
  gt_rwlock_wrlock(diagram->lock);
  /* register selector function and attached pointer */
  diagram->select_func = bsfunc;
  diagram->ptr = ptr;
  /* this could change track assignment -> discard current blocks and requeue */
  gt_hashmap_delete(diagram->blocks);
  diagram->blocks = NULL;
  gt_rwlock_unlock(diagram->lock);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x4d15b
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
callq 0x3d934
movq %r15, 0x58(%rbx)
movq %r14, 0x50(%rbx)
movq (%rbx), %rdi
callq 0x77675
movq $0x0, (%rbx)
movq 0x60(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3d94f
callq 0x15a3a
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/diagram.c
// Function: gt_diagram_reset_track_selector_func
void gt_diagram_reset_track_selector_func(GtDiagram *diagram)
{
  gt_assert(diagram);
  gt_rwlock_wrlock(diagram->lock);
  diagram->select_func = default_track_selector;
  gt_hashmap_delete(diagram->blocks);
  diagram->blocks = NULL;
  gt_rwlock_unlock(diagram->lock);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x4d196
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
callq 0x3d934
leaq 0x22(%rip), %rax        # 0x4d19b
movq %rax, 0x58(%rbx)
movq (%rbx), %rdi
callq 0x77675
movq $0x0, (%rbx)
movq 0x60(%rbx), %rdi
popq %rbx
jmp 0x3d94f
callq 0x15a73
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/diagram.c
// Function: default_track_selector
static void default_track_selector(GtBlock *block, GtStr *result,
                                   GT_UNUSED void *data)
{
  GtGenomeNode *top;
  char *basename;
  gt_assert(block && result);
  gt_str_reset(result);
  top = (GtGenomeNode*) gt_block_get_top_level_feature(block);
  /* we take the basename of the filename to have nicer output in the
     generated graphic. this might lead to ``collapsed'' tracks, if two files
     with different paths have the same basename. */
  basename = gt_basename(gt_genome_node_get_filename(top));
  gt_str_append_cstr(result, basename);
  gt_free(basename);
  gt_str_append_char(result, GT_FILENAME_TYPE_SEPARATOR);
  gt_str_append_cstr(result, gt_block_get_type(block));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x4d217
movq %rsi, %rbx
testq %rsi, %rsi
je 0x4d217
movq %rdi, %r14
movq %rbx, %rdi
callq 0x3c49c
movq %r14, %rdi
callq 0x8afdd
movq %rax, %rdi
callq 0x41f10
movq %rax, %rdi
callq 0x701b4
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3c067
leaq 0x9d5fa(%rip), %rsi     # 0xea7df
movq %r15, %rdi
movl $0x29b, %edx            # imm = 0x29B
callq 0x362a0
movq %rbx, %rdi
movl $0x7c, %esi
callq 0x3c28d
movq %r14, %rdi
callq 0x8b101
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x3c067
callq 0x15aac
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/diagram.c
// Function: gt_diagram_get_blocks
GtHashmap* gt_diagram_get_blocks(GtDiagram *diagram, GtError *err)
{
  GtHashmap *ret;
  int had_err = 0;
  gt_assert(diagram);
  gt_rwlock_wrlock(diagram->lock);
  had_err = gt_diagram_build((GtDiagram*) diagram, err);
  if (had_err)
    ret = NULL;
  else
    ret = diagram->blocks;
  gt_rwlock_unlock(diagram->lock);
  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
testq %rdi, %rdi
je 0x4d358
movq %rsi, %r14
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
callq 0x3d934
movq %rbx, 0x18(%rsp)
movq %r14, 0x10(%rsp)
movq 0x10(%rbx), %rdi
callq 0x77249
movq 0x20(%rbx), %rdi
callq 0x77249
movq 0x18(%rbx), %rdi
callq 0x77249
cmpq $0x0, (%rbx)
jne 0x4d336
movq 0x8(%rbx), %rdi
callq 0x77249
movq 0x30(%rbx), %rdi
callq 0x6ecda
testq %rax, %rax
je 0x4d2fa
xorl %r14d, %r14d
leaq 0xa20(%rip), %r15       # 0x4dcb1
leaq 0x8(%rsp), %r12
movq 0x30(%rbx), %rdi
movq %r14, %rsi
callq 0x6e9fa
movq (%rax), %r13
movq %r13, 0x8(%rsp)
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x4d899
testl %eax, %eax
jne 0x4d353
movq %r13, %rdi
callq 0x40251
testb %al, %al
je 0x4d2e9
movq 0x10(%rsp), %rcx
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x411ba
testl %eax, %eax
jne 0x4d353
incq %r14
movq 0x30(%rbx), %rdi
callq 0x6ecda
cmpq %rax, %r14
jb 0x4d296
leaq -0x16fa2(%rip), %rsi    # 0x3635f
leaq 0x30c(%rip), %rdx       # 0x4d614
movl $0x1, %edi
callq 0x76f28
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
leaq 0x340(%rip), %rsi       # 0x4d660
leaq -0xb5f6(%rip), %rcx     # 0x41d31
movq %rbx, %rdx
xorl %r8d, %r8d
callq 0x77193
testl %eax, %eax
jne 0x4d35d
movq (%rbx), %r14
movq 0x60(%rbx), %rdi
callq 0x3d94f
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
xorl %r14d, %r14d
jmp 0x4d339
callq 0x15b1e
callq 0x15ae5
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/diagram.c
// Function: gt_diagram_get_custom_tracks
GtArray* gt_diagram_get_custom_tracks(const GtDiagram *diagram)
{
  GtArray *ret;
  gt_assert(diagram);
  gt_rwlock_rdlock(diagram->lock);
  ret = diagram->custom_tracks;
  gt_rwlock_unlock(diagram->lock);
  return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4d38f
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
callq 0x3d919
movq 0x38(%rbx), %r14
movq 0x60(%rbx), %rdi
callq 0x3d94f
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x15b57
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/diagram.c
// Function: gt_diagram_add_custom_track
void gt_diagram_add_custom_track(GtDiagram *diagram, GtCustomTrack* ctrack)
{
  gt_assert(diagram && ctrack);
  gt_rwlock_wrlock(diagram->lock);
  gt_array_add(diagram->custom_tracks, ctrack);
  gt_rwlock_unlock(diagram->lock);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, 0x8(%rsp)
testq %rdi, %rdi
je 0x4d3d6
testq %rsi, %rsi
je 0x4d3d6
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
callq 0x3d934
movq 0x38(%rbx), %rdi
leaq 0x8(%rsp), %rsi
movl $0x8, %edx
callq 0x6ec0e
movq 0x60(%rbx), %rdi
callq 0x3d94f
addq $0x10, %rsp
popq %rbx
retq
callq 0x15b90
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/diagram.c
// Function: gt_diagram_unit_test_sketch_func
void* gt_diagram_unit_test_sketch_func(void *data)
{
  int had_err = 0;
  GtLayout *l = NULL;
  GtUword height;
  GtCanvas *c = NULL;
  GtDiagramTestShared *sh = (GtDiagramTestShared*) data;

  l = gt_layout_new(sh->d, 1000, sh->sty, sh->err);
  if (!l)
    had_err = -1;
  if (!had_err)
    had_err = gt_layout_get_height(l, &height, sh->err);
  if (!had_err) {
    c = gt_canvas_cairo_file_new(sh->sty, GT_GRAPHICS_PNG, 1000,
                                 height, NULL, sh->err);
    if (!c)
      had_err = -1;
  }
  if (!had_err) {
    had_err = gt_layout_sketch(l, c, sh->err);
  }
  if (had_err)
    sh->errstatus = 1;
  gt_layout_delete(l);
  gt_canvas_delete(c);
  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rdi
movq 0x18(%rbx), %rdx
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x52450
movq %rax, %r14
testq %rax, %rax
je 0x4d41a
movq 0x8(%rbx), %rdx
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x52984
testl %eax, %eax
je 0x4d421
xorl %r15d, %r15d
xorl %eax, %eax
jmp 0x4d449
movq 0x8(%rbx), %r9
movq 0x18(%rbx), %rdi
movq 0x8(%rsp), %rcx
movl $0x3e8, %edx            # imm = 0x3E8
movl $0x1, %esi
xorl %r8d, %r8d
callq 0x4cdaa
movq %rax, %r15
testq %rax, %rax
setne %al
testb %al, %al
je 0x4d460
movq 0x8(%rbx), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x52748
testl %eax, %eax
je 0x4d467
movl $0x1, 0x20(%rbx)
movq %r14, %rdi
callq 0x526da
movq %r15, %rdi
callq 0x4ca7e
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/diagram.c
// Function: gt_diagram_unit_test
int gt_diagram_unit_test(GtError *err)
{
  int had_err = 0;
  GtGenomeNode *gn;
  GtDiagramTestShared sh;
  GtRange testrng = {100, 10000};
  gt_error_check(err);

  gn = gt_feature_node_new_standard_gene();
  sh.fi = gt_feature_index_memory_new();
  sh.sty = gt_style_new(err);
  sh.err = err;
  sh.errstatus = 0;
  gt_feature_index_add_feature_node(sh.fi, gt_feature_node_cast(gn), err);
  gt_genome_node_delete(gn);
  sh.d = gt_diagram_new(sh.fi, "ctg123", &testrng, sh.sty, err);

  /* removed the multithreading test for now until it is fixed */
  gt_diagram_unit_test_sketch_func(&sh);
  gt_ensure(sh.errstatus == 0);

  gt_style_delete(sh.sty);
  gt_diagram_delete(sh.d);
  gt_feature_index_delete(sh.fi);

  return had_err;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movups 0x9d70e(%rip), %xmm0    # 0xeaba8
movaps %xmm0, (%rsp)
testq %rdi, %rdi
je 0x4d4b3
movq %rbx, %rdi
callq 0x3566a
testb %al, %al
jne 0x4d592
callq 0x3fde7
movq %rax, %r15
callq 0x3f595
movq %rax, %r12
leaq 0x18(%rsp), %r14
movq %rax, (%r14)
movq %rbx, %rdi
callq 0x53488
movq %rax, %r13
movq %rax, 0x18(%r14)
movq %rbx, 0x8(%r14)
movl $0x0, 0x20(%r14)
movq %r15, %rdi
callq 0x3fcd9
movq %r12, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x3e116
movq %r15, %rdi
callq 0x42ade
leaq 0x97728(%rip), %rsi     # 0xe4c33
movq %rsp, %rdx
movq %r12, %rdi
movq %r13, %rcx
movq %rbx, %r8
callq 0x4cf50
movq %rax, 0x10(%r14)
movq %r14, %rdi
callq 0x4d3db
cmpl $0x0, 0x20(%r14)
je 0x4d562
leaq 0x95c43(%rip), %rsi     # 0xe3179
leaq 0x9d3f4(%rip), %rdx     # 0xea931
leaq 0x9d3d8(%rip), %rcx     # 0xea91c
leaq 0x9d294(%rip), %r8      # 0xea7df
movq %rbx, %rdi
movl $0x3df, %r9d            # imm = 0x3DF
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x4d564
xorl %ebx, %ebx
movq 0x30(%rsp), %rdi
callq 0x54be4
movq 0x28(%rsp), %rdi
callq 0x4d597
movq 0x18(%rsp), %rdi
callq 0x3e016
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x15bc9
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/diagram.c
// Function: gt_diagram_delete
void gt_diagram_delete(GtDiagram *diagram)
{
  if (!diagram) return;
  gt_rwlock_wrlock(diagram->lock);
  gt_array_delete(diagram->features);
  if (diagram->blocks)
    gt_hashmap_delete(diagram->blocks);
  gt_hashmap_delete(diagram->nodeinfo);
  gt_hashmap_delete(diagram->collapsingtypes);
  gt_hashmap_delete(diagram->groupedtypes);
  gt_hashmap_delete(diagram->caption_display_status);
  gt_array_delete(diagram->custom_tracks);
  gt_rwlock_unlock(diagram->lock);
  gt_rwlock_delete(diagram->lock);
  gt_free(diagram);
}

// Assembly:
testq %rdi, %rdi
je 0x4d613
pushq %rbx
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
callq 0x3d934
movq 0x30(%rbx), %rdi
callq 0x6f134
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4d5bf
callq 0x77675
movq 0x8(%rbx), %rdi
callq 0x77675
movq 0x10(%rbx), %rdi
callq 0x77675
movq 0x20(%rbx), %rdi
callq 0x77675
movq 0x18(%rbx), %rdi
callq 0x77675
movq 0x38(%rbx), %rdi
callq 0x6f134
movq 0x60(%rbx), %rdi
callq 0x3d94f
movq 0x60(%rbx), %rdi
callq 0x3d8f7
leaq 0x9d1da(%rip), %rsi     # 0xea7df
movq %rbx, %rdi
movl $0x3f6, %edx            # imm = 0x3F6
popq %rbx
jmp 0x362a0
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/diagram.c
// Function: blocklist_delete
static void blocklist_delete(void *value)
{
  GtUword i;
  GtArray *a;
  if (!value) return;
  a = (GtArray*) value;
  for (i = 0; i < gt_array_size(a); i++)
    gt_block_delete(*(GtBlock**) gt_array_get(a, i));
  gt_array_delete(a);
}

// Assembly:
testq %rdi, %rdi
je 0x4d65f
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x6ecda
testq %rax, %rax
je 0x4d650
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6e9fa
movq (%rax), %rdi
callq 0x8bcd2
incq %r14
movq %rbx, %rdi
callq 0x6ecda
cmpq %rax, %r14
jb 0x4d62d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6f134
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/diagram.c
// Function: visit_child
static int visit_child(GtFeatureNode* fn, void *nti, GtError *err)
{
  NodeTraverseInfo* gt_genome_node_info;
  int had_err = 0;
  gt_genome_node_info = (NodeTraverseInfo*) nti;
  gt_error_check(err);

  if (gt_feature_node_has_children(fn))
  {
    GtFeatureNode *oldparent = gt_genome_node_info->parent;
    had_err = process_node(gt_genome_node_info->diagram, fn,
                           gt_genome_node_info->parent, err);
    if (!had_err) {
      gt_genome_node_info->parent = fn;
      had_err = gt_feature_node_traverse_direct_children(fn,
                                                         gt_genome_node_info,
                                                         visit_child, err);
    }
    if (!had_err) {
      gt_genome_node_info->parent = oldparent;
    }
  }
  else
  {
    had_err = process_node(gt_genome_node_info->diagram, fn,
                           gt_genome_node_info->parent, err);
  }
  return had_err;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
testq %rdx, %rdx
je 0x4dcd3
movq %r14, %rdi
callq 0x3566a
testb %al, %al
jne 0x4dd47
movq %r15, %rdi
callq 0x40251
testb %al, %al
je 0x4dd2a
movq (%rbx), %r12
movq 0x10(%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x4d899
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x4dd17
movq %r15, (%rbx)
leaq -0x58(%rip), %rdx       # 0x4dcb1
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x411ba
testl %eax, %eax
jne 0x4dd1e
movq %r12, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq (%rbx), %rdx
movq 0x10(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4d899
callq 0x15d58
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/diagram.c
// Function: add_recursive
static void add_recursive(GtDiagram *d, GtFeatureNode *node,
                          GtFeatureNode* parent,
                          GtFeatureNode *original_node)
{
  NodeInfoElement *ni;
  GtFeatureNode *rep = GT_UNDEF_REPR;
  gt_assert(d && node && original_node);
  if (!parent) return;
  ni = nodeinfo_get(d, node);
  if (gt_feature_node_is_multi(original_node)) {
    rep = gt_feature_node_get_multi_representative(original_node);
  }
    /* end of recursion, insert into target block */
  if (parent == node) {
    GtBlock *block ;
    block = nodeinfo_find_block(ni,
                                gt_feature_node_get_type(node),
                                rep);
    if (!block) {
      block = gt_block_new_from_node(node);
      nodeinfo_add_block(ni,
                         gt_feature_node_get_type(node),
                         rep,
                         block);
    }
    gt_block_insert_element(block, original_node);
    gt_log_log("add %s to target %s", gt_feature_node_get_type(original_node),
                                      gt_block_get_type(block));
  }
  else
  {
    /* not at target type block yet, set up reverse entry and follow */
    NodeInfoElement *parent_ni;
    /* set up reverse entry */
    ni->parent = parent;
    parent_ni = gt_hashmap_get(d->nodeinfo, parent);
    if (parent_ni) {
      gt_log_log("recursion: %s -> %s", gt_feature_node_get_type(node),
                                        gt_feature_node_get_type(parent));
      add_recursive(d, parent, parent_ni->parent, original_node);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
testq %r12, %r12
je 0x4dde1
movq %r15, %rdi
movq %r14, %rsi
callq 0x4e38a
movq %rax, %rbp
movq %rbx, %rdi
callq 0x40432
movq $-0x1, %r13
testb %al, %al
je 0x4dd94
movq %rbx, %rdi
callq 0x40571
movq %rax, %r13
cmpq %r14, %r12
je 0x4ddf0
movq %r12, (%rbp)
movq 0x8(%r15), %rdi
movq %r12, %rsi
callq 0x77109
testq %rax, %rax
je 0x4dde1
movq %rax, %r13
movq %r14, %rdi
callq 0x40276
movq %rax, %r14
movq %r12, %rdi
callq 0x40276
leaq 0x9cc3f(%rip), %rdi     # 0xeaa0a
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x35a32
movq %r12, %r14
movq (%r13), %r12
jmp 0x4dd63
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x40276
movq %rbp, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x4e406
movq %rax, %r15
testq %rax, %rax
jne 0x4de32
movq %r14, %rdi
callq 0x8ad69
movq %rax, %r15
movq %r14, %rdi
callq 0x40276
movq %rbp, %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x4e43c
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8adcd
movq %rbx, %rdi
callq 0x40276
movq %rax, %rbx
movq %r15, %rdi
callq 0x8b101
leaq 0x9cb9f(%rip), %rdi     # 0xea9f6
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x35a32