LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/tidy_region_node_stream.c
// Function: tidy_region_node_stream_next
static int tidy_region_node_stream_next(GtNodeStream *ns, GtGenomeNode **gn,
                               GtError *err)
{
  GtTidyRegionNodeStream *ais;
  int had_err = 0;
  gt_error_check(err);
  ais = gt_tidy_region_node_stream_cast(ns);

  if (!ais->queued) {
    /* no nodes in the buffer -> get new nodes */
    while (!(had_err = gt_node_stream_next(ais->in_stream, gn, err)) && *gn) {
      gt_assert(*gn && !had_err);
      had_err = gt_genome_node_accept(*gn, ais->tidy_region_node_visitor, err);
      if (had_err) {
        /* we own the node -> delete it */
        gt_genome_node_delete(*gn);
        *gn = NULL;
        break;
      }
    }
    if (!had_err) {
      ais->queued = true;
    }
  }
  if (!had_err) {
    if (gt_tidy_region_node_visitor_node_buffer_size(
                                               ais->tidy_region_node_visitor)) {
      *gn = gt_tidy_region_node_visitor_get_node(ais->tidy_region_node_visitor);
    }
  }

  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 0x4af64
movq %r14, %rdi
callq 0x34fea
testb %al, %al
jne 0x4afec
callq 0x4aed8
movq %rax, %rdi
movq %r15, %rsi
callq 0x48f0b
movq %rax, %r15
cmpb $0x0, 0x20(%rax)
jne 0x4afbf
movq 0x10(%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x48d7c
testl %eax, %eax
jne 0x4afb6
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4afba
movq 0x18(%r15), %rsi
movq %r14, %rdx
callq 0x41698
testl %eax, %eax
je 0x4af7d
movl %eax, %ebp
movq (%rbx), %rdi
callq 0x4210c
xorl %eax, %eax
jmp 0x4afd8
movl %eax, %ebp
jmp 0x4afdf
movb $0x1, 0x20(%r15)
movq 0x18(%r15), %rdi
callq 0x4b471
testq %rax, %rax
je 0x4afdd
movq 0x18(%r15), %rdi
callq 0x4b48f
xorl %ebp, %ebp
movq %rax, (%rbx)
jmp 0x4afdf
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x14dfe
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/tidy_region_node_stream.c
// Function: gt_tidy_region_node_stream_new
GtNodeStream* gt_tidy_region_node_stream_new(GtNodeStream *in_stream)
{
  GtTidyRegionNodeStream *tidy_region_node_stream;
  GtNodeStream *ns;
  gt_assert(in_stream);
  ns = gt_node_stream_create(gt_tidy_region_node_stream_class(), false);
  tidy_region_node_stream = gt_tidy_region_node_stream_cast(ns);
  tidy_region_node_stream->in_stream = gt_node_stream_ref(in_stream);
  tidy_region_node_stream->tidy_region_node_visitor =
                                              gt_tidy_region_node_visitor_new();
  tidy_region_node_stream->queued = false;
  return ns;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x4b046
movq %rdi, %rbx
callq 0x4aed8
movq %rax, %rdi
xorl %esi, %esi
callq 0x48c80
movq %rax, %r14
callq 0x4aed8
movq %rax, %rdi
movq %r14, %rsi
callq 0x48f0b
movq %rax, %r15
movq %rbx, %rdi
callq 0x48cec
movq %rax, 0x10(%r15)
callq 0x4b41a
movq %rax, 0x18(%r15)
movb $0x0, 0x20(%r15)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
callq 0x14e35
nop
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/tidy_region_node_visitor.c
// Function: gt_tidy_region_node_visitor_class
const GtNodeVisitorClass* gt_tidy_region_node_visitor_class()
{
  static GtNodeVisitorClass *nvc = NULL;
  gt_class_alloc_lock_enter();
  if (!nvc) {
    nvc = gt_node_visitor_class_new(sizeof (GtTidyRegionNodeVisitor),
                                    tidy_region_node_visitor_free,
                                    tidy_region_node_visitor_comment_node,
                                    tidy_region_node_visitor_feature_node,
                                    tidy_region_node_visitor_region_node,
                                    tidy_region_node_visitor_sequence_node,
                                    tidy_region_node_visitor_eof_node);
    gt_node_visitor_class_set_meta_node_func(nvc,
                                            tidy_region_node_visitor_meta_node);
  }
  gt_class_alloc_lock_leave();
  return nvc;
}

// Assembly:
pushq %rax
callq 0x72367
cmpq $0x0, 0x107b26(%rip)    # 0x152b80
jne 0x4b0aa
leaq 0x32b(%rip), %rax       # 0x4b38e
movq %rax, (%rsp)
leaq 0x4a(%rip), %rsi        # 0x4b0b8
leaq 0x6d(%rip), %rdx        # 0x4b0e2
leaq 0xac(%rip), %rcx        # 0x4b128
leaq 0x208(%rip), %r8        # 0x4b28b
leaq 0x2be(%rip), %r9        # 0x4b348
movl $0x20, %edi
callq 0x48f24
movq %rax, 0x107ae5(%rip)    # 0x152b80
leaq 0x332(%rip), %rsi       # 0x4b3d4
movq %rax, %rdi
callq 0x48f84
callq 0x7237d
movq 0x107aca(%rip), %rax    # 0x152b80
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/tidy_region_node_visitor.c
// Function: tidy_region_node_visitor_comment_node
static int tidy_region_node_visitor_comment_node(GtNodeVisitor *nv,
                                                 GtCommentNode *cn,
                                                 GT_UNUSED GtError *err)
{
  GtTidyRegionNodeVisitor *trnv;
  gt_error_check(err);
  trnv = tidy_region_node_visitor_cast(nv);
  gt_queue_add(trnv->node_buffer, cn);
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x4b0fd
movq %rdx, %rdi
callq 0x34fea
testb %al, %al
jne 0x4b123
callq 0x4b04c
movq %rax, %rdi
movq %r14, %rsi
callq 0x48fc5
movq 0x10(%rax), %rdi
movq %rbx, %rsi
callq 0x7c47f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x14e6c
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/tidy_region_node_visitor.c
// Function: tidy_region_node_visitor_region_node
static int tidy_region_node_visitor_region_node(GtNodeVisitor *nv,
                                                GtRegionNode *rn,
                                                GT_UNUSED GtError *err)
{
  GtTidyRegionNodeVisitor *trnv;
  const char *seqid;
  gt_error_check(err);
  trnv = tidy_region_node_visitor_cast(nv);
  seqid = gt_str_get(gt_genome_node_get_seqid((GtGenomeNode*) rn));
  gt_assert(seqid);
  if (!gt_hashmap_get(trnv->region_nodes, seqid)) {
    gt_hashmap_add(trnv->region_nodes, gt_cstr_dup(seqid),
                   gt_genome_node_ref((GtGenomeNode*) rn));
    gt_assert(gt_hashmap_get(trnv->region_nodes, seqid));
  }
  gt_queue_add(trnv->node_buffer, rn);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x4b2af
movq %rdx, %rdi
callq 0x34fea
testb %al, %al
jne 0x4b33e
callq 0x4b04c
movq %rax, %rdi
movq %r14, %rsi
callq 0x48fc5
movq %rax, %r14
movq %rbx, %rdi
callq 0x415a1
movq %rax, %rdi
callq 0x3bb5d
testq %rax, %rax
je 0x4b339
movq %rax, %r15
movq 0x18(%r14), %rdi
movq %rax, %rsi
callq 0x775ed
testq %rax, %rax
jne 0x4b321
movq 0x18(%r14), %r12
movq %r15, %rdi
callq 0x728c0
movq %rax, %r13
movq %rbx, %rdi
callq 0x4130c
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x77628
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0x775ed
testq %rax, %rax
je 0x4b343
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x7c47f
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x14f13
callq 0x14ea5
callq 0x14edc
// File: /workspace/github_c_makefile_star2_O3/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 0x4b363
movq %rdx, %rdi
callq 0x34fea
testb %al, %al
jne 0x4b389
callq 0x4b04c
movq %rax, %rdi
movq %r14, %rsi
callq 0x48fc5
movq 0x10(%rax), %rdi
movq %rbx, %rsi
callq 0x7c47f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x14f4a
// File: /workspace/github_c_makefile_star2_O3/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 0x4b3ef
movq %rdx, %rdi
callq 0x34fea
testb %al, %al
jne 0x4b415
callq 0x4b04c
movq %rax, %rdi
movq %r14, %rsi
callq 0x48fc5
movq 0x10(%rax), %rdi
movq %rbx, %rsi
callq 0x7c47f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x14fba
// File: /workspace/github_c_makefile_star2_O3/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 0x4b04c
movq %rax, %rdi
callq 0x48f94
movq %rax, %rbx
callq 0x4b04c
movq %rax, %rdi
movq %rbx, %rsi
callq 0x48fc5
movq %rax, %r14
callq 0x7c464
movq %rax, 0x10(%r14)
leaq -0x1576b(%rip), %rsi    # 0x35ce6
leaq -0x934c(%rip), %rdx     # 0x4210c
movl $0x1, %edi
callq 0x7740c
movq %rax, 0x18(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4b4dc
movq %rdi, %rbx
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x4b4dc
leaq 0x9ead4(%rip), %rdx     # 0xe9f9c
movl $0x1, %edi
movl $0x1c, %ecx
callq 0x359a6
movq %rbx, (%rax)
popq %rbx
retq
callq 0x14ff3
// File: /workspace/github_c_makefile_star2_O3/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 0x4b5a8
movq %rdi, %rbx
movl 0x8(%rdi), %eax
testl %eax, %eax
je 0x4b5aa
decl %eax
movl %eax, 0x8(%rbx)
popq %rbx
retq
movq (%rbx), %rax
testq %rax, %rax
je 0x4b5d5
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x4b5c0
movq %rbx, %rdi
callq *%rax
leaq 0x9e9d5(%rip), %rsi     # 0xe9f9c
movq %rbx, %rdi
movl $0x5a, %edx
popq %rbx
jmp 0x35c27
callq 0x15174
// File: /workspace/github_c_makefile_star2_O3/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 0x72367
cmpq $0x0, 0x107586(%rip)    # 0x152b88
jne 0x4b623
leaq 0x26(%rip), %rsi        # 0x4b631
leaq 0x49(%rip), %rdx        # 0x4b65b
movl $0x20, %edi
callq 0x48c48
movq %rax, 0x107565(%rip)    # 0x152b88
callq 0x7237d
movq 0x107559(%rip), %rax    # 0x152b88
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4b67c
movq %r14, %rdi
callq 0x34fea
testb %al, %al
jne 0x4b6dc
callq 0x4b5f4
movq %rax, %rdi
movq %r15, %rsi
callq 0x48f0b
movq %rax, %r15
movq 0x10(%rax), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x48d7c
testl %eax, %eax
je 0x4b6c0
movl %eax, %ebp
movq (%rbx), %rdi
callq 0x4210c
movq $0x0, (%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rdi
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x4b6b3
movq 0x18(%r15), %rsi
movq %r14, %rdx
callq 0x41698
testl %eax, %eax
jne 0x4b6a2
jmp 0x4b6b3
callq 0x151e2
// File: /workspace/github_c_makefile_star2_O3/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 0x4b5f4
movq %rax, %r15
movq %r14, %rdi
callq 0x48ef8
movzbl %al, %esi
movq %r15, %rdi
callq 0x48c80
movq %rax, %r15
callq 0x4b5f4
movq %rax, %rdi
movq %r15, %rsi
callq 0x48f0b
movq %rax, %r12
movq %r14, %rdi
callq 0x48cec
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_O3/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 0x4b99c
movq %r14, %rdi
callq 0x34fea
testb %al, %al
jne 0x4ba91
testq %r15, %r15
je 0x4ba8c
leaq 0x9e8de(%rip), %rdx     # 0xea28a
movl $0x1, %edi
movl $0x20, %esi
movl $0x70, %ecx
callq 0x359a6
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x866e4
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x4ba70
movl $0x1, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7740c
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
callq 0x86f89
testq %rax, %rax
je 0x4ba65
xorl %r14d, %r14d
leaq 0x9e9a1(%rip), %r15     # 0xea3a5
leaq 0x9e9a7(%rip), %r12     # 0xea3b2
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x86f71
movq %rax, %r13
movq (%rbx), %rbp
movq %rax, %rdi
movq %r15, %rsi
callq 0x86699
movq %rbp, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x77628
movq %r13, %rdi
movq %r12, %rsi
callq 0x86699
testq %rax, %rax
je 0x4ba54
movq (%rbx), %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x77628
incq %r14
movq 0x8(%rbx), %rdi
callq 0x86f89
cmpq %rax, %r14
jb 0x4ba0b
callq 0x39f34
movq %rax, 0x10(%rbx)
jmp 0x4ba7a
movq %rbx, %rdi
callq 0x4ba96
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x15363
callq 0x1532c
// File: /workspace/github_c_makefile_star2_O3/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 0x4baaf
movq %rdi, %rbx
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x4bab1
decq %rax
movq %rax, 0x18(%rbx)
popq %rbx
retq
movq 0x8(%rbx), %rdi
callq 0x86eec
movq (%rbx), %rdi
callq 0x77bab
movq 0x10(%rbx), %rdi
callq 0x3a17c
leaq 0x9e7b8(%rip), %rsi     # 0xea28a
movq %rbx, %rdi
movl $0x8f, %edx
popq %rbx
jmp 0x35c27
// File: /workspace/github_c_makefile_star2_O3/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 0x4bde3
movq %rdi, %rbx
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x4bde3
leaq 0x9e647(%rip), %r14     # 0xea3ee
movl $0x1, %edi
movq %r14, %rdx
movl $0xa5, %ecx
callq 0x359a6
movq %rax, %r15
movq %rbx, (%rax)
movl $0x1, %edi
movl $0x68, %esi
movq %r14, %rdx
movl $0xa7, %ecx
callq 0x359a6
movq %rax, 0x8(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
callq 0x1540a
// File: /workspace/github_c_makefile_star2_O3/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 0x4be63
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x4be6b
movq 0x58(%rax), %rax
testq %rax, %rax
je 0x4be0a
movq %rbx, %rdi
callq *%rax
movq 0x8(%rbx), %rdi
movq 0x58(%rdi), %rax
testq %rax, %rax
je 0x4be23
movq %rax, %rdi
callq 0x4db51
movq 0x8(%rbx), %rdi
movq 0x50(%rdi), %rax
testq %rax, %rax
je 0x4be38
movq %rax, %rdi
callq 0x713d5
movq 0x8(%rbx), %rdi
leaq 0x9e5af(%rip), %r14     # 0xea3ee
movq %r14, %rsi
movl $0xb5, %edx
callq 0x35c27
movq %rbx, %rdi
movq %r14, %rsi
movl $0xb6, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x35c27
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x15443
// File: /workspace/github_c_makefile_star2_O3/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 0x4bed2
testq %rsi, %rsi
je 0x4bed2
movq (%rdi), %rax
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x4becf
jmpq *%rax
xorl %eax, %eax
retq
pushq %rax
callq 0x15527
// File: /workspace/github_c_makefile_star2_O3/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 0x4bef3
testq %rsi, %rsi
je 0x4bef3
movq (%rdi), %rax
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x4bef0
jmpq *%rax
xorl %eax, %eax
retq
pushq %rax
callq 0x15560
// File: /workspace/github_c_makefile_star2_O3/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 0x4bf1c
testq %rsi, %rsi
je 0x4bf1c
movq 0x8(%rdi), %rax
movq %rsi, 0x40(%rax)
movq (%rdi), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x4bf19
jmpq *%rax
xorl %eax, %eax
retq
pushq %rax
callq 0x15599
// File: /workspace/github_c_makefile_star2_O3/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 0x4bf3d
testq %rsi, %rsi
je 0x4bf3d
movq (%rdi), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x4bf3a
jmpq *%rax
xorl %eax, %eax
retq
pushq %rax
callq 0x155d2
// File: /workspace/github_c_makefile_star2_O3/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 0x4bf5e
testq %rsi, %rsi
je 0x4bf5e
movq (%rdi), %rax
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x4bf5b
jmpq *%rax
xorl %eax, %eax
retq
pushq %rax
callq 0x1560b
// File: /workspace/github_c_makefile_star2_O3/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 0x4bf7f
testq %rsi, %rsi
je 0x4bf7f
movq (%rdi), %rax
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x4bf7c
jmpq *%rax
xorl %eax, %eax
retq
pushq %rax
callq 0x15644
// File: /workspace/github_c_makefile_star2_O3/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 0x4bfa0
testq %rsi, %rsi
je 0x4bfa0
movq (%rdi), %rax
movq 0x38(%rax), %rax
testq %rax, %rax
je 0x4bf9d
jmpq *%rax
xorl %eax, %eax
retq
pushq %rax
callq 0x1567d
// File: /workspace/github_c_makefile_star2_O3/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 0x4bfc1
testq %rsi, %rsi
je 0x4bfc1
movq (%rdi), %rax
movq 0x40(%rax), %rax
testq %rax, %rax
je 0x4bfbe
jmpq *%rax
xorl %eax, %eax
retq
pushq %rax
callq 0x156b6
// File: /workspace/github_c_makefile_star2_O3/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 0x4bfe2
testq %rsi, %rsi
je 0x4bfe2
movq (%rdi), %rax
movq 0x48(%rax), %rax
testq %rax, %rax
je 0x4bfdf
jmpq *%rax
xorl %eax, %eax
retq
pushq %rax
callq 0x156ef
// File: /workspace/github_c_makefile_star2_O3/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 0x4c01b
movq %rbx, %rdi
callq 0x34fea
testb %al, %al
jne 0x4c063
testq %r15, %r15
je 0x4c05e
testq %r14, %r14
je 0x4c05e
movq 0x8(%r15), %rax
movq 0x58(%rax), %rdi
testq %rdi, %rdi
je 0x4c042
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x4e711
leaq 0x9e668(%rip), %rsi     # 0xea6b1
movq %rbx, %rdi
xorl %eax, %eax
callq 0x34f1f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
callq 0x15798
callq 0x15761
// File: /workspace/github_c_makefile_star2_O3/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 0x4c089
testq %rsi, %rsi
je 0x4c089
movq 0x8(%rdi), %rax
movq 0x58(%rax), %rdi
testq %rdi, %rdi
je 0x4c085
callq 0x4e782
xorl %eax, %eax
popq %rcx
retq
callq 0x157cf
// File: /workspace/github_c_makefile_star2_O3/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 0x72367
cmpq $0x0, 0x106af1(%rip)    # 0x152b90
jne 0x4c106
leaq 0x41359(%rip), %rax     # 0x8d401
leaq 0x4109c(%rip), %r10     # 0x8d14b
leaq 0x40629(%rip), %r11     # 0x8c6df
leaq 0x3fe35(%rip), %rbx     # 0x8bef2
leaq 0x3fd64(%rip), %r14     # 0x8be28
leaq 0x3f78d(%rip), %rsi     # 0x8b858
leaq 0x3f826(%rip), %rdx     # 0x8b8f8
leaq 0x3f822(%rip), %rcx     # 0x8b8fb
leaq 0x3fb24(%rip), %r8      # 0x8bc04
leaq 0x3fb91(%rip), %r9      # 0x8bc78
movl $0x18, %edi
pushq $0x0
pushq %rax
pushq %r10
pushq %r11
pushq %rbx
pushq %r14
callq 0x4bae0
addq $0x30, %rsp
movq %rax, 0x106a8a(%rip)    # 0x152b90
callq 0x7237d
movq 0x106a7e(%rip), %rax    # 0x152b90
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4c363
movq %rdx, %r14
testq %rdx, %rdx
je 0x4c363
movq %rcx, %rbx
testq %rcx, %rcx
je 0x4c363
movq %r8, %r15
movq (%r14), %rax
cmpq 0x8(%r14), %rax
jne 0x4c307
leaq 0x9e4b3(%rip), %rsi     # 0xea7ae
movq %r15, %rdi
xorl %eax, %eax
callq 0x34f1f
jmp 0x4c33a
movq %rsi, %r12
movq %rdi, %r13
movl $0x8, %edi
callq 0x6ef7c
movq %rax, %rbp
movq %r13, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %r15, %r8
callq 0x3da20
movq %rbp, %rdi
testl %eax, %eax
je 0x4c34b
callq 0x6f768
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 0x4c368
callq 0x1583d
// File: /workspace/github_c_makefile_star2_O3/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 0x9e40d(%rip), %rdx     # 0xea78f
movl $0x1, %edi
movl $0x68, %esi
movl $0x330, %ecx            # imm = 0x330
callq 0x359a6
movq %rax, %rbx
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7740c
movq %rax, 0x8(%rbx)
movq %r15, 0x28(%rbx)
callq 0x3cf33
movq %rax, 0x60(%rbx)
movups (%r12), %xmm0
movups %xmm0, 0x40(%rbx)
testl %ebp, %ebp
je 0x4c3cd
movq %r14, %rdi
callq 0x6f02b
movq %rax, %r14
movq %r14, 0x30(%rbx)
leaq 0x133(%rip), %rax       # 0x4c50b
movq %rax, 0x58(%rbx)
movl $0x8, %edi
callq 0x6ef7c
movq %rax, 0x38(%rbx)
leaq -0x1670b(%rip), %r14    # 0x35ce6
movl $0x1, %edi
xorl %esi, %esi
movq %r14, %rdx
callq 0x7740c
movq %rax, 0x10(%rbx)
movl $0x1, %edi
xorl %esi, %esi
movq %r14, %rdx
callq 0x7740c
movq %rax, 0x20(%rbx)
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rdx
callq 0x7740c
movq %rax, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4c485
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
callq 0x3cfa5
movq 0x40(%rbx), %r14
movq 0x48(%rbx), %r15
movq 0x60(%rbx), %rdi
callq 0x3cfdb
movq %r14, %rax
movq %r15, %rdx
popq %rbx
popq %r14
popq %r15
retq
callq 0x158af
// File: /workspace/github_c_makefile_star2_O3/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 0x4c4cb
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
callq 0x3cfc0
movq %r15, 0x58(%rbx)
movq %r14, 0x50(%rbx)
movq (%rbx), %rdi
callq 0x77bab
movq $0x0, (%rbx)
movq 0x60(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3cfdb
callq 0x158e8
// File: /workspace/github_c_makefile_star2_O3/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 0x4c506
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
callq 0x3cfc0
leaq 0x22(%rip), %rax        # 0x4c50b
movq %rax, 0x58(%rbx)
movq (%rbx), %rdi
callq 0x77bab
movq $0x0, (%rbx)
movq 0x60(%rbx), %rdi
popq %rbx
jmp 0x3cfdb
callq 0x15921
// File: /workspace/github_c_makefile_star2_O3/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 0x4c587
movq %rsi, %rbx
testq %rsi, %rsi
je 0x4c587
movq %rdi, %r14
movq %rbx, %rdi
callq 0x3bbee
movq %r14, %rdi
callq 0x8aac1
movq %rax, %rdi
callq 0x41572
movq %rax, %rdi
callq 0x707d0
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3b7af
leaq 0x9e23a(%rip), %rsi     # 0xea78f
movq %r15, %rdi
movl $0x29b, %edx            # imm = 0x29B
callq 0x35c27
movq %rbx, %rdi
movl $0x7c, %esi
callq 0x3b9df
movq %r14, %rdi
callq 0x8abe5
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x3b7af
callq 0x1595a
// File: /workspace/github_c_makefile_star2_O3/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 0x4c6c6
movq %rsi, %r14
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
callq 0x3cfc0
movq %rbx, 0x18(%rsp)
movq %r14, 0x10(%rsp)
movq 0x10(%rbx), %rdi
callq 0x7772d
movq 0x20(%rbx), %rdi
callq 0x7772d
movq 0x18(%rbx), %rdi
callq 0x7772d
movq (%rbx), %r14
testq %r14, %r14
jne 0x4c6ac
movq 0x8(%rbx), %rdi
callq 0x7772d
movq 0x30(%rbx), %rdi
callq 0x6f310
testq %rax, %rax
je 0x4c668
xorl %r14d, %r14d
leaq 0xa1b(%rip), %r15       # 0x4d01e
leaq 0x8(%rsp), %r12
movq 0x30(%rbx), %rdi
movq %r14, %rsi
callq 0x6f037
movq (%rax), %r13
movq %r13, 0x8(%rsp)
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x4cc12
testl %eax, %eax
jne 0x4c6a9
movq %r13, %rdi
callq 0x3f8ef
testb %al, %al
je 0x4c657
movq 0x10(%rsp), %rcx
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x40831
testl %eax, %eax
jne 0x4c6a9
incq %r14
movq 0x30(%rbx), %rdi
callq 0x6f310
cmpq %rax, %r14
jb 0x4c608
leaq -0x16989(%rip), %rsi    # 0x35ce6
leaq 0x309(%rip), %rdx       # 0x4c97f
movl $0x1, %edi
callq 0x7740c
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
leaq 0x33d(%rip), %rsi       # 0x4c9cb
leaq -0xb2f8(%rip), %rcx     # 0x4139d
movq %rbx, %rdx
xorl %r8d, %r8d
callq 0x77677
testl %eax, %eax
jne 0x4c6cb
movq (%rbx), %r14
jmp 0x4c6ac
xorl %r14d, %r14d
movq 0x60(%rbx), %rdi
callq 0x3cfdb
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x159cc
callq 0x15993
// File: /workspace/github_c_makefile_star2_O3/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 0x4c6fd
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
callq 0x3cfa5
movq 0x38(%rbx), %r14
movq 0x60(%rbx), %rdi
callq 0x3cfdb
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x15a05
// File: /workspace/github_c_makefile_star2_O3/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 0x4c744
testq %rsi, %rsi
je 0x4c744
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
callq 0x3cfc0
movq 0x38(%rbx), %rdi
leaq 0x8(%rsp), %rsi
movl $0x8, %edx
callq 0x6f240
movq 0x60(%rbx), %rdi
callq 0x3cfdb
addq $0x10, %rsp
popq %rbx
retq
callq 0x15a3e
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rdi
movq 0x18(%rbx), %rdx
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x517d0
movq %rax, %r14
testq %rax, %rax
je 0x4c785
movq 0x8(%rbx), %rdx
movq %rsp, %rsi
movq %r14, %rdi
callq 0x51d09
testl %eax, %eax
je 0x4c7ad
xorl %r15d, %r15d
movl $0x1, 0x20(%rbx)
movq %r14, %rdi
callq 0x51a5f
movq %r15, %rdi
callq 0x4bde8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x8(%rbx), %r9
movq 0x18(%rbx), %rdi
movq (%rsp), %rcx
xorl %r15d, %r15d
movl $0x3e8, %edx            # imm = 0x3E8
movl $0x1, %esi
xorl %r8d, %r8d
callq 0x4c11a
testq %rax, %rax
je 0x4c788
movq %rax, %r12
movq 0x8(%rbx), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x51acd
movq %r12, %r15
testl %eax, %eax
jne 0x4c788
jmp 0x4c78f
// File: /workspace/github_c_makefile_star2_O3/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 0x9e353(%rip), %xmm0    # 0xeab58
movaps %xmm0, (%rsp)
testq %rdi, %rdi
je 0x4c81e
movq %rbx, %rdi
callq 0x34fea
testb %al, %al
jne 0x4c8fd
callq 0x3f477
movq %rax, %r15
callq 0x3ec3d
movq %rax, %r12
leaq 0x18(%rsp), %r14
movq %rax, (%r14)
movq %rbx, %rdi
callq 0x52810
movq %rax, %r13
movq %rax, 0x18(%r14)
movq %rbx, 0x8(%r14)
movl $0x0, 0x20(%r14)
movq %r15, %rdi
callq 0x3f369
movq %r12, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x3d79a
movq %r15, %rdi
callq 0x4210c
leaq 0x9839d(%rip), %rsi     # 0xe4c13
movq %rsp, %rdx
movq %r12, %rdi
movq %r13, %rcx
movq %rbx, %r8
callq 0x4c2c0
movq %rax, 0x10(%r14)
movq %r14, %rdi
callq 0x4c749
cmpl $0x0, 0x20(%r14)
je 0x4c8cd
leaq 0x968b8(%rip), %rsi     # 0xe3159
leaq 0x9e039(%rip), %rdx     # 0xea8e1
leaq 0x9e01d(%rip), %rcx     # 0xea8cc
leaq 0x9ded9(%rip), %r8      # 0xea78f
movq %rbx, %rdi
movl $0x3df, %r9d            # imm = 0x3DF
xorl %eax, %eax
callq 0x34f1f
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x4c8cf
xorl %ebx, %ebx
movq 0x30(%rsp), %rdi
callq 0x53f50
movq 0x28(%rsp), %rdi
callq 0x4c902
movq 0x18(%rsp), %rdi
callq 0x3d69a
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x15a77
// File: /workspace/github_c_makefile_star2_O3/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 0x4c97e
pushq %rbx
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
callq 0x3cfc0
movq 0x30(%rbx), %rdi
callq 0x6f768
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4c92a
callq 0x77bab
movq 0x8(%rbx), %rdi
callq 0x77bab
movq 0x10(%rbx), %rdi
callq 0x77bab
movq 0x20(%rbx), %rdi
callq 0x77bab
movq 0x18(%rbx), %rdi
callq 0x77bab
movq 0x38(%rbx), %rdi
callq 0x6f768
movq 0x60(%rbx), %rdi
callq 0x3cfdb
movq 0x60(%rbx), %rdi
callq 0x3cf83
leaq 0x9de1f(%rip), %rsi     # 0xea78f
movq %rbx, %rdi
movl $0x3f6, %edx            # imm = 0x3F6
popq %rbx
jmp 0x35c27
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4c9ca
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x6f310
testq %rax, %rax
je 0x4c9bb
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6f037
movq (%rax), %rdi
callq 0x8b7c2
incq %r14
movq %rbx, %rdi
callq 0x6f310
cmpq %rax, %r14
jb 0x4c998
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6f768
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4d040
movq %r14, %rdi
callq 0x34fea
testb %al, %al
jne 0x4d0b6
movq %r15, %rdi
callq 0x3f8ef
testb %al, %al
je 0x4d099
movq (%rbx), %r12
movq 0x10(%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x4cc12
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x4d08d
movq %r15, (%rbx)
leaq -0x58(%rip), %rdx       # 0x4d01e
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x40831
testl %eax, %eax
jne 0x4d08d
movq %r12, (%rbx)
xorl %eax, %eax
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 0x4cc12
callq 0x15c06