LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/rdb_visitor.c
// Function: gt_rdb_visitor_class_new
const GtRDBVisitorClass*
gt_rdb_visitor_class_new(size_t size,
                          GtRDBVisitorFreeFunc free,
                          GtRDBVisitorSqliteFunc sqlite_func,
                          GtRDBVisitorMySQLFunc mysql_func)
{
  GtRDBVisitorClass *c_class;
  gt_assert(size);
  c_class = gt_class_alloc(sizeof *c_class);
  c_class->size = size;
  c_class->free = free;
  c_class->sqlite_func = sqlite_func;
  c_class->mysql_func = mysql_func;
  return c_class;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x16cba6
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x20, %edi
callq 0x2f7c10
movq %r12, (%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x5103b
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/rdb_visitor.c
// Function: gt_rdb_visitor_create
GtRDBVisitor* gt_rdb_visitor_create(const GtRDBVisitorClass *rdbvc)
{
  GtRDBVisitor *rdbv;
  gt_assert(rdbvc && rdbvc->size);
  rdbv = gt_calloc(1, rdbvc->size);
  rdbv->c_class = rdbvc;
  return rdbv;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x16cbd7
movq %rdi, %rbx
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x16cbd7
leaq 0x222e86(%rip), %rdx    # 0x38fa49
movl $0x1, %edi
movl $0x35, %ecx
callq 0x10436a
movq %rbx, (%rax)
popq %rbx
retq
callq 0x51072
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/rdb_visitor.c
// Function: gt_rdb_visitor_visit_sqlite
int gt_rdb_visitor_visit_sqlite(GtRDBVisitor *rdbv, GtRDBSqlite *rdbs,
                                GtError *err)
{
  gt_error_check(err);
  gt_assert(rdbv && rdbs && rdbv->c_class);
  if (rdbv->c_class->sqlite_func)
    return rdbv->c_class->sqlite_func(rdbv, rdbs, err);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rdx, %rdx
je 0x16cc14
movq %rbx, %rdi
callq 0xfcc32
testb %al, %al
jne 0x16cc4c
testq %r15, %r15
je 0x16cc47
testq %r14, %r14
je 0x16cc47
movq (%r15), %rax
testq %rax, %rax
je 0x16cc47
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x16cc3f
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmpq *%rax
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
callq 0x51117
callq 0x510e0
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/rdb_visitor.c
// Function: gt_rdb_visitor_visit_mysql
int gt_rdb_visitor_visit_mysql(GtRDBVisitor *rdbv, GtRDBMySQL *rdbm,
                               GtError *err)
{
  gt_error_check(err);
  gt_assert(rdbv && rdbm && rdbv->c_class);
  if (rdbv->c_class->mysql_func)
    return rdbv->c_class->mysql_func(rdbv, rdbm, err);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rdx, %rdx
je 0x16cc70
movq %rbx, %rdi
callq 0xfcc32
testb %al, %al
jne 0x16cca8
testq %r15, %r15
je 0x16cca3
testq %r14, %r14
je 0x16cca3
movq (%r15), %rax
testq %rax, %rax
je 0x16cca3
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x16cc9b
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmpq *%rax
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
callq 0x51185
callq 0x5114e
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/rdb_visitor.c
// Function: gt_rdb_visitor_delete
void gt_rdb_visitor_delete(GtRDBVisitor *rdbv)
{
  if (!rdbv) return;
  gt_assert(rdbv->c_class);
  if (rdbv->c_class->free)
    rdbv->c_class->free(rdbv);
  gt_free(rdbv);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x16cce1
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x16cce3
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x16cccc
movq %rbx, %rdi
callq *%rax
leaq 0x222d76(%rip), %rsi    # 0x38fa49
movq %rbx, %rdi
movl $0x5b, %edx
popq %rbx
jmp 0x1045eb
popq %rbx
retq
callq 0x511bc
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/reconstructalignment.c
// Function: gt_reconstructalignment_trivial_deletion
GtUword gt_reconstructalignment_trivial_deletion(GtAlignment *align,
                                                 GtUword len,
                                                 GtUword gapcost)
{
  GtUword idx;

  for (idx = 0; idx < len; idx ++)
  {
    gt_alignment_add_deletion(align);
  }
  return len * gapcost;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
testq %rsi, %rsi
je 0x16cd0e
movq %rdi, %r15
movq %r14, %r12
movq %r15, %rdi
callq 0x120f4a
decq %r12
jne 0x16cd01
imulq %r14, %rbx
movq %rbx, %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/reconstructalignment.c
// Function: gt_reconstructalignment_trivial_insertion
GtUword gt_reconstructalignment_trivial_insertion(GtAlignment *align,
                                                  GtUword len,
                                                  GtUword gapcost)
{
  GtUword idx;

  for (idx = 0; idx < len; idx ++)
  {
    gt_alignment_add_insertion(align);
  }

  return len * gapcost;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
testq %rsi, %rsi
je 0x16cd47
movq %rdi, %r15
movq %r14, %r12
movq %r15, %rdi
callq 0x120f67
decq %r12
jne 0x16cd3a
imulq %r14, %rbx
movq %rbx, %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/region_node_builder.c
// Function: gt_region_node_builder_add_region
void gt_region_node_builder_add_region(GtRegionNodeBuilder *rnb,
                                       const char *region_name,
                                       GtRange region_range)
{
  GtRange *rangeptr;
  gt_assert(rnb && region_name);
  if ((rangeptr = gt_hashmap_get(rnb->sequence_region_to_range, region_name))) {
    /* sequence region is already defined -> update range */
    *rangeptr = gt_range_join(&region_range, rangeptr);
  }
  else {
    /* sequence region is not already defined -> define it */
    rangeptr = gt_malloc(sizeof (GtRange));
    *rangeptr = region_range;
    gt_hashmap_add(rnb->sequence_region_to_range, gt_cstr_dup(region_name),
                   rangeptr);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, (%rsp)
movq %rcx, 0x8(%rsp)
testq %rdi, %rdi
je 0x16ea38
movq %rsi, %rbx
testq %rsi, %rsi
je 0x16ea38
movq %rdi, %r14
movq (%rdi), %rdi
movq %rbx, %rsi
callq 0x100add
testq %rax, %rax
je 0x16e9f6
movq %rax, %r15
movq %rsp, %rdi
movq %rax, %rsi
callq 0x112343
movq %rax, (%r15)
movq %rdx, 0x8(%r15)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x22195a(%rip), %rsi    # 0x390357
movl $0x10, %edi
movl $0x38, %edx
callq 0x104226
movq %rax, %r15
movups (%rsp), %xmm0
movups %xmm0, (%rax)
movq (%r14), %r14
movq %rbx, %rdi
callq 0xe4290
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x100b18
callq 0x52044
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/region_node_builder.c
// Function: gt_region_node_builder_build
void gt_region_node_builder_build(const GtRegionNodeBuilder *rnb,
                                  GtQueue *genome_nodes)
{
  GT_UNUSED int had_err;
  gt_assert(rnb && genome_nodes);
  had_err = gt_hashmap_foreach(rnb->sequence_region_to_range,
                               build_region_nodes, genome_nodes, NULL);
  gt_assert(!had_err); /* build_region_nodes() is sane */
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x16ea62
movq %rsi, %rdx
testq %rsi, %rsi
je 0x16ea62
movq (%rdi), %rdi
leaq 0x17(%rip), %rsi        # 0x16ea6c
xorl %ecx, %ecx
callq 0x100bc9
testl %eax, %eax
jne 0x16ea67
popq %rax
retq
callq 0x5207b
callq 0x520b2
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/region_node_builder.c
// Function: build_region_nodes
static int build_region_nodes(void *key, void *value, void *data,
                              GT_UNUSED GtError *err)
{
  GtStr *seqid;
  GtRange range;
  GtGenomeNode *gn;
  GtQueue *genome_nodes = (GtQueue*) data;
  gt_error_check(err);
  gt_assert(key && value && data);
  seqid = gt_str_new_cstr(key);
  range = *(GtRange*) value;
  gn = gt_region_node_new(seqid, range.start, range.end);
  gt_queue_add(genome_nodes, gn);
  gt_str_delete(seqid);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rcx, %rcx
je 0x16ea8b
movq %rcx, %rdi
callq 0xfcc32
testb %al, %al
jne 0x16ead4
testq %r15, %r15
je 0x16eacf
testq %r14, %r14
je 0x16eacf
testq %rbx, %rbx
je 0x16eacf
movq %r15, %rdi
callq 0x11acc9
movq %rax, %r15
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rax, %rdi
callq 0x16e820
movq %rbx, %rdi
movq %rax, %rsi
callq 0x10d65b
movq %r15, %rdi
callq 0x11bdbf
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
callq 0x52120
callq 0x520e9
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/regioncov_visitor.c
// Function: gt_regioncov_visitor_class
const GtNodeVisitorClass* gt_regioncov_visitor_class()
{
  static const GtNodeVisitorClass *nvc = NULL;
  gt_class_alloc_lock_enter();
  if (!nvc) {
    nvc = gt_node_visitor_class_new(sizeof (GtRegionCovVisitor),
                                    gt_regioncov_visitor_free,
                                    NULL,
                                    gt_regioncov_visitor_feature_node,
                                    gt_regioncov_visitor_region_node,
                                    NULL,
                                    NULL);
  }
  gt_class_alloc_lock_leave();
  return nvc;
}

// Assembly:
pushq %rax
callq 0xe252f
cmpq $0x0, 0x34fd4e(%rip)    # 0x4be848
jne 0x16eb2f
movq $0x0, (%rsp)
leaq 0x32(%rip), %rsi        # 0x16eb3d
leaq 0x49(%rip), %rcx        # 0x16eb5b
leaq 0x124(%rip), %r8        # 0x16ec3d
movl $0x20, %edi
xorl %edx, %edx
xorl %r9d, %r9d
callq 0x163010
movq %rax, 0x34fd19(%rip)    # 0x4be848
callq 0xe2545
movq 0x34fd0d(%rip), %rax    # 0x4be848
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/regioncov_visitor.c
// Function: gt_regioncov_visitor_feature_node
static int gt_regioncov_visitor_feature_node(GtNodeVisitor *nv,
                                             GtFeatureNode *fn,
                                             GT_UNUSED GtError *err)
{
  GtRange *old_range_ptr, old_range, new_range;
  GtArray *ranges;
  GtRegionCovVisitor *regioncov_visitor;
  gt_error_check(err);
  regioncov_visitor = gt_regioncov_visitor_cast(nv);
  ranges = gt_hashmap_get(regioncov_visitor->region2rangelist,
                       gt_str_get(gt_genome_node_get_seqid((GtGenomeNode*)
                                                           fn)));
  gt_assert(ranges);
  new_range = gt_genome_node_get_range((GtGenomeNode*) fn);
  if (!gt_array_size(ranges))
    gt_array_add(ranges, new_range);
  else {
    old_range_ptr = gt_array_get_last(ranges);
    old_range = *old_range_ptr;
    old_range.end += regioncov_visitor->max_feature_dist;
    if (gt_range_overlap(&old_range, &new_range)) {
      old_range_ptr->end = GT_MAX(old_range_ptr->end, new_range.end);
    }
    else
      gt_array_add(ranges, new_range);
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r15
movq %rdi, %rbx
testq %rdx, %rdx
je 0x16eb7f
movq %rdx, %rdi
callq 0xfcc32
testb %al, %al
jne 0x16ec38
callq 0x16eaec
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1630b1
movq %rax, %r14
movq 0x18(%rax), %rbx
movq %r15, %rdi
callq 0x144635
movq %rax, %rdi
callq 0x11b0a1
movq %rbx, %rdi
movq %rax, %rsi
callq 0x100add
testq %rax, %rax
je 0x16ec33
movq %rax, %rbx
movq %r15, %rdi
callq 0x144679
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq %rbx, %rdi
callq 0xd24e0
testq %rax, %rax
je 0x16ec17
movq %rbx, %rdi
callq 0xd222b
movq %rax, %r15
movups (%rax), %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movq 0x10(%r14), %rax
addq %rax, 0x8(%rdi)
movq %rsp, %rsi
callq 0x112246
testb %al, %al
je 0x16ec17
movq 0x8(%r15), %rax
movq 0x8(%rsp), %rcx
cmpq %rcx, %rax
cmovaq %rax, %rcx
movq %rcx, 0x8(%r15)
jmp 0x16ec27
movq %rsp, %rsi
movl $0x10, %edx
movq %rbx, %rdi
callq 0xd2410
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x521c5
callq 0x5218e
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/regioncov_visitor.c
// Function: gt_regioncov_visitor_region_node
static int gt_regioncov_visitor_region_node(GtNodeVisitor *nv, GtRegionNode *rn,
                                         GT_UNUSED GtError *err)
{
  GtRegionCovVisitor *regioncov_visitor;
  GtArray *rangelist;
  gt_error_check(err);
  regioncov_visitor = gt_regioncov_visitor_cast(nv);
  rangelist = gt_array_new(sizeof (GtRange));
  gt_hashmap_add(regioncov_visitor->region2rangelist,
              gt_cstr_dup(gt_str_get(gt_genome_node_get_seqid((GtGenomeNode*)
                                                              rn))),
              rangelist);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x16ec59
movq %rdx, %rdi
callq 0xfcc32
testb %al, %al
jne 0x16ecab
callq 0x16eaec
movq %rax, %rdi
movq %r14, %rsi
callq 0x1630b1
movq %rax, %r14
movl $0x10, %edi
callq 0xd214c
movq %rax, %r15
movq 0x18(%r14), %r14
movq %rbx, %rdi
callq 0x144635
movq %rax, %rdi
callq 0x11b0a1
movq %rax, %rdi
callq 0xe4290
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x100b18
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
callq 0x521fc
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/regioncov_visitor.c
// Function: gt_regioncov_visitor_new
GtNodeVisitor* gt_regioncov_visitor_new(GtUword max_feature_dist)
{
  GtNodeVisitor *nv = gt_node_visitor_create(gt_regioncov_visitor_class());
  GtRegionCovVisitor *regioncov_visitor = gt_regioncov_visitor_cast(nv);
  regioncov_visitor->max_feature_dist = max_feature_dist;
  regioncov_visitor->region2rangelist =
    gt_hashmap_new(GT_HASH_STRING, gt_free_func, (GtFree) gt_array_delete);
  return nv;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x16eaec
movq %rax, %rdi
callq 0x163080
movq %rax, %r14
callq 0x16eaec
movq %rax, %rdi
movq %r14, %rsi
callq 0x1630b1
movq %rax, %r15
movq %rbx, 0x10(%rax)
leaq -0x6a63c(%rip), %rsi    # 0x1046aa
leaq -0x9c3b5(%rip), %rdx    # 0xd2938
movl $0x1, %edi
callq 0x1008fc
movq %rax, 0x18(%r15)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/regioncov_visitor.c
// Function: gt_regioncov_visitor_show_coverage
void gt_regioncov_visitor_show_coverage(GtNodeVisitor *nv)
{
  GtRegionCovVisitor *regioncov_visitor = gt_regioncov_visitor_cast(nv);
  GT_UNUSED int had_err;
  had_err = gt_hashmap_foreach_in_key_order(regioncov_visitor->region2rangelist,
                                         show_rangelist, NULL, NULL);
  gt_assert(!had_err); /* show_rangelist() is sane */
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x16eaec
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1630b1
movq 0x18(%rax), %rdi
leaq 0x14(%rip), %rsi        # 0x16ed37
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x100bf3
testl %eax, %eax
jne 0x16ed32
popq %rbx
retq
callq 0x52233
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/regioncov_visitor.c
// Function: show_rangelist
static int show_rangelist(void *key, void *value, GT_UNUSED void *data,
                          GT_UNUSED GtError *err)
{
  GtUword i;
  GtArray *rangelist;
  GtRange *rangeptr;
  gt_error_check(err);
  gt_assert(key && value);
  rangelist = (GtArray*) value;
  if (gt_array_size(rangelist)) {
    gt_assert(gt_ranges_are_sorted_and_do_not_overlap(rangelist));
    printf("%s:\n", (char*) key);
    for (i = 0; i < gt_array_size(rangelist); i++) {
      rangeptr = gt_array_get(rangelist, i);
      printf(""GT_WU", "GT_WU"\n", rangeptr->start, rangeptr->end);
    }
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %rcx, %rcx
je 0x16ed57
movq %rcx, %rdi
callq 0xfcc32
testb %al, %al
jne 0x16eddb
testq %r14, %r14
je 0x16edd6
testq %rbx, %rbx
je 0x16edd6
movq %rbx, %rdi
callq 0xd24e0
testq %rax, %rax
je 0x16edce
movq %rbx, %rdi
callq 0x112c21
testb %al, %al
je 0x16ede0
leaq 0x22175c(%rip), %rdi    # 0x3904dd
movq %r14, %rsi
xorl %eax, %eax
callq 0x17070
movq %rbx, %rdi
callq 0xd24e0
testq %rax, %rax
je 0x16edce
leaq 0x221743(%rip), %r14    # 0x3904e2
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd2207
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x17070
incq %r15
movq %rbx, %rdi
callq 0xd24e0
cmpq %rax, %r15
jb 0x16eda2
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
callq 0x522a3
callq 0x5226c
callq 0x522da
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/regular_seqid.c
// Function: gt_regular_seqid_save
void gt_regular_seqid_save(GtStr *seqid, GtStr *description)
{
  GtUword i, len;
  unsigned char *desc, cc;

  gt_assert(seqid && description);

  len  = gt_str_length(description);
  desc = (GtUchar*) gt_str_get(description);

  i = 0;

  if ((len >= 2) && (desc[0] == 'g') && (desc[1] == 'i') && (desc[2] == '|')) {
    /* skip 'gi|' */
    i = 3;
  }
  else if ((len >= 2) && (desc[0] == 'S') && (desc[1] == 'Q') &&
           (desc[2] == ';')) {
    /* skip 'SQ;' */
    i = 3;
  }
  else if ((len >= 3) && (desc[0] == '(') && (desc[1] == 'g') &&
           (desc[2] == 'i') && (desc[3] == '|')) {
    /* skip '(gi|' */
    i = 4;
  }
  else if ((len >= 3) && (desc[0] == 'r') && (desc[1] == 'e') &&
           (desc[2] == 'f') && (desc[3] == '|')) {
    /* skip 'ref|' */
    i = 4;
  }

  for (/* init already done */ ; i < len; i++) {
    cc = desc[i];
    if (cc == ':' || cc == '|' || cc == '\t' || cc == ' ')
      break;
    gt_str_append_char(seqid, desc[i]);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x16eef3
movq %rsi, %r15
testq %rsi, %rsi
je 0x16eef3
movq %rdi, %rbx
movq %r15, %rdi
callq 0x11b0ca
movq %rax, %r14
movq %r15, %rdi
callq 0x11b0a1
movq %rax, %r15
cmpq $0x2, %r14
jb 0x16eeae
movzbl (%r15), %eax
cmpl $0x53, %eax
je 0x16ee4d
cmpl $0x67, %eax
jne 0x16ee61
cmpb $0x69, 0x1(%r15)
jne 0x16ee61
movl $0x3, %r12d
cmpb $0x7c, 0x2(%r15)
jne 0x16ee61
jmp 0x16eeb1
cmpb $0x51, 0x1(%r15)
jne 0x16ee61
movl $0x3, %r12d
cmpb $0x3b, 0x2(%r15)
je 0x16eeb1
cmpq $0x2, %r14
je 0x16eeae
cmpl $0x72, %eax
je 0x16ee8e
cmpl $0x28, %eax
jne 0x16eeae
cmpb $0x67, 0x1(%r15)
jne 0x16eeae
cmpb $0x69, 0x2(%r15)
jne 0x16eeae
movl $0x4, %r12d
cmpb $0x7c, 0x3(%r15)
jne 0x16eeae
jmp 0x16eeb1
cmpb $0x65, 0x1(%r15)
jne 0x16eeae
cmpb $0x66, 0x2(%r15)
jne 0x16eeae
xorl %r12d, %r12d
cmpb $0x7c, 0x3(%r15)
sete %r12b
shll $0x2, %r12d
jmp 0x16eeb1
xorl %r12d, %r12d
cmpq %r14, %r12
jae 0x16eee9
movabsq $0x400000100000200, %r13 # imm = 0x400000100000200
movzbl (%r15,%r12), %eax
cmpq $0x3a, %rax
ja 0x16eed1
btq %rax, %r13
jb 0x16eee9
cmpl $0x7c, %eax
je 0x16eee9
movsbl %al, %esi
movq %rbx, %rdi
callq 0x11af23
incq %r12
cmpq %r12, %r14
jne 0x16eec0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x52311
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/rmq.c
// Function: gt_rmq_delete
void gt_rmq_delete(GtRMQ *rmq)
{
  GtUword i;
  if (!rmq) return;
  gt_free(rmq->type);
  if (rmq->Prec != NULL)
  {
    for (i = 0;
         i < gt_rmq_catalan[GT_RMQ_microblocksize][GT_RMQ_microblocksize];
         i++)
    {
      gt_free(rmq->Prec[i]);
    }
    gt_free(rmq->Prec);
  }
  if (rmq->M != NULL)
  {
    for (i = 0; i < rmq->M_depth; i++)
    {
      gt_free(rmq->M[i]);
    }
    gt_free(rmq->M);
  }
  if (rmq->Mprime != NULL)
  {
    for (i = 0; i < rmq->Mprime_depth; i++)
    {
      gt_free(rmq->Mprime[i]);
    }
    gt_free(rmq->Mprime);
  }
  gt_free(rmq);
}

// Assembly:
testq %rdi, %rdi
je 0x16fbdb
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
leaq 0x220add(%rip), %rsi    # 0x3905b4
movl $0x239, %edx            # imm = 0x239
callq 0x1045eb
cmpq $0x0, 0x38(%rbx)
je 0x16fb28
xorl %r15d, %r15d
leaq 0x220ac2(%rip), %r14    # 0x3905b4
movq 0x38(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
movl $0x240, %edx            # imm = 0x240
callq 0x1045eb
incq %r15
cmpq $0x596, %r15            # imm = 0x596
jne 0x16faf2
movq 0x38(%rbx), %rdi
leaq 0x220a96(%rip), %rsi    # 0x3905b4
movl $0x242, %edx            # imm = 0x242
callq 0x1045eb
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x16fb75
cmpq $0x0, 0x18(%rbx)
je 0x16fb64
xorl %r15d, %r15d
leaq 0x220a72(%rip), %r14    # 0x3905b4
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
movl $0x248, %edx            # imm = 0x248
callq 0x1045eb
incq %r15
cmpq 0x18(%rbx), %r15
jb 0x16fb42
movq 0x10(%rbx), %rdi
leaq 0x220a49(%rip), %rsi    # 0x3905b4
movl $0x24a, %edx            # imm = 0x24A
callq 0x1045eb
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x16fbc2
cmpq $0x0, 0x28(%rbx)
je 0x16fbb1
xorl %r15d, %r15d
leaq 0x220a25(%rip), %r14    # 0x3905b4
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
movl $0x250, %edx            # imm = 0x250
callq 0x1045eb
incq %r15
cmpq 0x28(%rbx), %r15
jb 0x16fb8f
movq 0x20(%rbx), %rdi
leaq 0x2209fc(%rip), %rsi    # 0x3905b4
movl $0x252, %edx            # imm = 0x252
callq 0x1045eb
leaq 0x2209eb(%rip), %rsi    # 0x3905b4
movq %rbx, %rdi
movl $0x254, %edx            # imm = 0x254
popq %rbx
popq %r14
popq %r15
jmp 0x1045eb
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/rmq.c
// Function: gt_rmq_unit_test
int gt_rmq_unit_test(GtError *err)
{
  int had_err = 0;
  GtRMQvaluetype *data;
  GtUword i;
  GtRMQ *rmq;
  gt_error_check(err);

  data = gt_calloc((size_t) GT_RMQ_TESTARRSIZE, sizeof (*data));

  for (i = 0; i < GT_RMQ_TESTARRSIZE; i++)
  {
    data[i] = (GtRMQvaluetype) gt_rand_max(GT_RMQ_TESTMAXVAL);
  }

  rmq = gt_rmq_new(data, GT_RMQ_TESTARRSIZE);

  for (i = 0; i < GT_RMQ_NOFTESTS; i++)
  {
    GtUword start, end, res_naive, res_efficient;
    start = gt_rand_max(GT_RMQ_TESTARRSIZE - GT_RMQ_MAXRANGELENGTH - 2UL);
    end = start + gt_rand_max(GT_RMQ_MAXRANGELENGTH) + 1UL;
    res_naive = gt_rmq_naive(data, GT_RMQ_TESTARRSIZE, start, end);
    res_efficient = gt_rmq_find_min_index(rmq, start, end);
    gt_ensure(data[res_efficient] == data[res_naive]);
  }

  gt_rmq_delete(rmq);
  gt_free(data);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x16fbff
movq %rbx, %rdi
callq 0xfcc32
testb %al, %al
jne 0x16fd3c
movq %rbx, (%rsp)
leaq 0x2209aa(%rip), %rdx    # 0x3905b4
movl $0xf4240, %edi          # imm = 0xF4240
movl $0x4, %esi
movl $0x27a, %ecx            # imm = 0x27A
callq 0x10436a
movq %rax, %r14
xorl %ebx, %ebx
movl $0x989680, %edi         # imm = 0x989680
callq 0x105d85
movl %eax, (%r14,%rbx,4)
incq %rbx
cmpq $0xf4240, %rbx          # imm = 0xF4240
jne 0x16fc23
movl $0xf4240, %esi          # imm = 0xF4240
movq %r14, %rdi
callq 0x16f44e
movq %rax, %r15
xorl %r13d, %r13d
xorl %r12d, %r12d
movl $0xf1b2e, %edi          # imm = 0xF1B2E
callq 0x105d85
movq %rax, %rbx
movl $0x2710, %edi           # imm = 0x2710
callq 0x105d85
leaq (%rbx,%rax), %rdx
incq %rdx
cmpq $0xf423f, %rdx          # imm = 0xF423F
ja 0x16fd37
cmpq %rdx, %rbx
jae 0x16fd37
movq %rbx, %rax
incq %rax
movl (%r14,%rbx,4), %ecx
movq %rbx, %rbp
movl (%r14,%rax,4), %esi
cmpl %ecx, %esi
cmovbl %esi, %ecx
cmovbq %rax, %rbp
incq %rax
cmpq %rdx, %rax
jbe 0x16fc94
movq %r15, %rdi
movq %rbx, %rsi
callq 0x16ef90
testl %r13d, %r13d
jne 0x16fcf3
movl (%r14,%rax,4), %eax
xorl %r13d, %r13d
cmpl (%r14,%rbp,4), %eax
je 0x16fcf9
movq (%rsp), %rdi
leaq 0x1ee76d(%rip), %rsi    # 0x35e43e
leaq 0x22091d(%rip), %rdx    # 0x3905f5
leaq 0x220905(%rip), %rcx    # 0x3905e4
leaq 0x2208ce(%rip), %r8     # 0x3905b4
movl $0x28a, %r9d            # imm = 0x28A
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
incq %r12
cmpq $0x2710, %r12           # imm = 0x2710
jne 0x16fc53
movq %r15, %rdi
callq 0x16fabb
leaq 0x22089c(%rip), %rsi    # 0x3905b4
movq %r14, %rdi
movl $0x28e, %edx            # imm = 0x28E
callq 0x1045eb
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x524d3
callq 0x5249a
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/safe_popen.c
// Function: gt_safe_pclose
int gt_safe_pclose(GT_WIN32_UNUSED GtSafePipe *p) {
#ifndef _WIN32
  int   status;
  pid_t pid = (pid_t) -1;

  if (p->child_pid != (pid_t) -1) {
    do {
      pid = waitpid(p->child_pid, &status, 0);
    } while (pid == (pid_t) -1 && errno == EINTR);
  }
  if (p->read_fd != NULL)
    (void) fclose(p->read_fd);
  if (p->write_fd != NULL)
    (void) fclose(p->write_fd);
  gt_free(p);
  if (pid != (pid_t) -1 && WIFEXITED(status))
    return WEXITSTATUS(status);
  else
    return (pid == (pid_t) -1 ? -1 : 0);
#else
  /* TODO: implement for Windows */
  gt_assert(0);
#endif
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpl $-0x1, 0x10(%rdi)
je 0x16ffb7
leaq 0xc(%rsp), %r14
movl 0x10(%rbx), %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x175f0
cmpl $-0x1, %eax
sete %bpl
jne 0x16ffba
callq 0x17060
cmpl $0x4, (%rax)
je 0x16ff95
jmp 0x16ffba
movb $0x1, %bpl
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x16ffc7
callq 0x17800
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x16ffd5
callq 0x17800
leaq 0x221494(%rip), %rsi    # 0x391470
movq %rbx, %rdi
movl $0x9a, %edx
callq 0x1045eb
testb %bpl, %bpl
jne 0x16fff6
movl 0xc(%rsp), %eax
testb $0x7f, %al
je 0x170005
movzbl %bpl, %eax
negl %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movzbl %ah, %eax
jmp 0x16fffc
nop
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/sam_alignment.c
// Function: gt_sam_alignment_new
GtSamAlignment *gt_sam_alignment_new(GtAlphabet *alphabet)
{
  GtSamAlignment *sam_alignment;
  gt_assert(alphabet != NULL);

  sam_alignment = gt_malloc(sizeof (GtSamAlignment));
  sam_alignment->s_alignment = bam_init1();
  sam_alignment->alphabet = gt_alphabet_ref(alphabet);
  sam_alignment->seq_buffer = NULL;
  sam_alignment->qual_buffer = NULL;
  sam_alignment->s_bufsize = 0;
  sam_alignment->q_bufsize = 0;
  sam_alignment->rightmost = GT_UNDEF_UWORD;
  return sam_alignment;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x17006f
movq %rdi, %rbx
leaq 0x221550(%rip), %rsi    # 0x39156f
movl $0x38, %edi
movl $0x29, %edx
callq 0x104226
movq %rax, %r14
movl $0x1, %edi
movl $0x38, %esi
callq 0x174e0
movq %rax, (%r14)
movq %rbx, %rdi
callq 0xd0a3f
movq %rax, 0x8(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movups %xmm0, 0x20(%r14)
movq $-0x1, 0x30(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x5250c
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/sam_alignment.c
// Function: gt_sam_alignment_clone
GtSamAlignment *gt_sam_alignment_clone(GtSamAlignment *sam_alignment)
{
  GtSamAlignment *clone;
  gt_assert(sam_alignment != NULL);
  clone = gt_sam_alignment_new(sam_alignment->alphabet);
  (void)bam_copy1(clone->s_alignment, sam_alignment->s_alignment);
  clone->rightmost = sam_alignment->rightmost;
  return clone;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x17013c
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x17000c
movq %rax, %r14
movq (%rax), %r12
movq (%rbx), %r13
movq 0x30(%r12), %r15
movl 0x28(%r12), %ebp
movl 0x24(%r13), %eax
cmpl %eax, %ebp
jge 0x1700e3
decl %eax
movl %eax, %ecx
sarl %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x8, %eax
orl %ecx, %eax
movl %eax, %ebp
sarl $0x10, %ebp
orl %eax, %ebp
incl %ebp
movslq %ebp, %rsi
movq %r15, %rdi
callq 0x17ff8
movq %rax, %r15
testq %r15, %r15
je 0x170141
movq 0x30(%r13), %rsi
movslq 0x24(%r13), %rdx
movq %r15, %rdi
callq 0x17660
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups 0x20(%r13), %xmm2
movups %xmm2, 0x20(%r12)
movups %xmm0, (%r12)
movups %xmm1, 0x10(%r12)
movl %ebp, 0x28(%r12)
movq %r15, 0x30(%r12)
movq 0x30(%rbx), %rax
movq %rax, 0x30(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x52543
leaq 0x20c640(%rip), %rdi    # 0x37c788
leaq 0x221787(%rip), %rsi    # 0x3918d6
leaq 0x2217ec(%rip), %rcx    # 0x391942
movl $0x2dc, %edx            # imm = 0x2DC
callq 0x174d0
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/sam_alignment.c
// Function: gt_sam_alignment_delete
void gt_sam_alignment_delete(GtSamAlignment *sam_alignment)
{
  if (sam_alignment != NULL) {
    bam_destroy1(sam_alignment->s_alignment);
    gt_alphabet_delete(sam_alignment->alphabet);
    gt_free(sam_alignment->qual_buffer);
    gt_free(sam_alignment->seq_buffer);
    gt_free(sam_alignment);
  }
}

// Assembly:
testq %rdi, %rdi
je 0x1701ce
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x170185
movq 0x30(%rax), %rdi
callq 0x17fe8
movq (%rbx), %rdi
callq 0x17fe8
movq 0x8(%rbx), %rdi
callq 0xd0e1c
movq 0x18(%rbx), %rdi
leaq 0x2213d6(%rip), %r14    # 0x39156f
movq %r14, %rsi
movl $0x43, %edx
callq 0x1045eb
movq 0x10(%rbx), %rdi
movq %r14, %rsi
movl $0x44, %edx
callq 0x1045eb
movq %rbx, %rdi
movq %r14, %rsi
movl $0x45, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1045eb
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/sam_alignment.c
// Function: gt_sam_alignment_rightmost_pos
GtUword gt_sam_alignment_rightmost_pos(GtSamAlignment *sam_alignment)
{
  gt_assert(sam_alignment != NULL);
  if (sam_alignment->rightmost == GT_UNDEF_UWORD)
  {
    sam_alignment->rightmost = (GtUword)bam_calend(
        &sam_alignment->s_alignment->core,
        bam1_cigar(sam_alignment->s_alignment));
  }
  return sam_alignment->rightmost;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x170233
movq %rdi, %rbx
movq 0x30(%rdi), %rax
cmpq $-0x1, %rax
jne 0x170231
movq (%rbx), %rdi
movzbl 0xb(%rdi), %esi
addq 0x30(%rdi), %rsi
callq 0x241e24
movl %eax, %eax
movq %rax, 0x30(%rbx)
popq %rbx
retq
callq 0x5261f
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/sam_alignment.c
// Function: gt_sam_alignment_sequence_external_buffer
void gt_sam_alignment_sequence_external_buffer(GtSamAlignment *sam_alignment,
    GtUchar **seq_buffer, GtUword *bufsize)
{
  GtUword query_len, idx;
  uint8_t *bam_seq;

  query_len = (GtUword) sam_alignment->s_alignment->core.l_qseq;
  if ((*bufsize) < query_len) {
    (*seq_buffer) = gt_realloc(*seq_buffer, sizeof (**seq_buffer) *
                                   (query_len + 1UL));
    (*bufsize) = query_len;
  }
  gt_assert((*seq_buffer) != NULL);

  bam_seq = bam1_seq(sam_alignment->s_alignment);

  for (idx = 0UL; idx < query_len; idx++) {
    (*seq_buffer)[idx] = bambase2gtbase((uint8_t) bam1_seqi(bam_seq, idx),
                                      sam_alignment->alphabet);
  }
  (*seq_buffer)[query_len] = (GtUchar)'\0';
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, (%rsp)
movq (%rdi), %rax
movslq 0x10(%rax), %r12
movq (%rsi), %rax
cmpq %r12, (%rdx)
jae 0x17029f
movq %rdx, %r15
leaq 0x1(%r12), %rsi
leaq 0x2212e3(%rip), %rdx    # 0x39156f
movq %rax, %rdi
movl $0x8e, %ecx
callq 0x104461
movq %rax, (%rbx)
movq %r12, (%r15)
testq %rax, %rax
je 0x17035b
testl %r12d, %r12d
je 0x170347
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %r13
movq %r13, %rcx
shrq $0x30, %rcx
shlq $0x2, %rcx
addq 0x30(%rax), %rcx
shrl $0x18, %r13d
addq %rcx, %r13
xorl %ebp, %ebp
xorl %r14d, %r14d
movq %r14, %rax
shrq %rax
movb (%r13,%rax), %dl
movl %ebp, %ecx
notb %cl
andb $0x4, %cl
shrb %cl, %dl
andb $0xf, %dl
movq (%rsp), %rax
movq 0x8(%rax), %r15
decb %dl
cmpb $0x8, %dl
jae 0x17031e
movzbl %dl, %eax
movl $0x8b, %ecx
btl %eax, %ecx
jae 0x17031e
shlb $0x3, %dl
movabsq $0x5441414147414341, %rax # imm = 0x5441414147414341
movl %edx, %ecx
shrq %cl, %rax
jmp 0x170326
movq %r15, %rdi
callq 0xd11f1
movsbl %al, %esi
movq %r15, %rdi
callq 0xd185d
movq (%rbx), %rcx
movb %al, (%rcx,%r14)
incq %r14
addb $0x4, %bpl
cmpq %r14, %r12
jne 0x1702d7
movq (%rbx), %rax
movb $0x0, (%rax,%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x526c6
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/sam_alignment.c
// Function: gt_sam_alignment_qualitystring_external_buffer
void gt_sam_alignment_qualitystring_external_buffer(
    GtSamAlignment *sam_alignment, GtUchar **qual_buffer,
    GtUword *bufsize)
{
  GtUword query_len, idx;
  uint8_t *qual;

  gt_assert(qual_buffer != NULL);
  gt_assert(bufsize != NULL);
  query_len = (GtUword) sam_alignment->s_alignment->core.l_qseq;
  if ((*bufsize) < query_len) {
    (*qual_buffer) = gt_realloc((*qual_buffer), sizeof (**qual_buffer) *
        (query_len + 1UL));
    (*bufsize) = query_len;
  }
  gt_assert((*qual_buffer) != NULL);
  qual = bam1_qual(sam_alignment->s_alignment);
  for (idx = 0UL; idx < query_len; idx++) {
    (*qual_buffer)[idx] = (GtUchar)(qual[idx] + PHREDOFFSET);
  }
  (*qual_buffer)[query_len] = (GtUchar)'\0';
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x170424
movq %rdx, %r15
testq %rdx, %rdx
je 0x170429
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movslq 0x10(%rax), %r12
movq (%rsi), %rax
cmpq %r12, (%r15)
jae 0x1703c8
leaq 0x1(%r12), %rsi
leaq 0x2211ba(%rip), %rdx    # 0x39156f
movq %rax, %rdi
movl $0xaf, %ecx
callq 0x104461
movq %rax, (%rbx)
movq %r12, (%r15)
testq %rax, %rax
je 0x17042e
testl %r12d, %r12d
je 0x170413
movq (%r14), %rax
movq 0x8(%rax), %rcx
movq %rcx, %rdx
shrq $0x30, %rdx
shlq $0x2, %rdx
addq 0x30(%rax), %rdx
shrl $0x18, %ecx
movl 0x10(%rax), %eax
incl %eax
sarl %eax
cltq
addq %rcx, %rax
addq %rdx, %rax
xorl %ecx, %ecx
movb (%rax,%rcx), %dl
addb $0x21, %dl
movq (%rbx), %rsi
movb %dl, (%rsi,%rcx)
incq %rcx
cmpq %rcx, %r12
jne 0x1703fc
movq (%rbx), %rax
movb $0x0, (%rax,%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x52771
callq 0x52738
callq 0x526ff
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/sam_query_name_iterator.c
// Function: gt_sam_query_name_iterator_class
const GtCstrIteratorClass* gt_sam_query_name_iterator_class(void)
{
  static const GtCstrIteratorClass *sic = NULL;
  gt_class_alloc_lock_enter();
  if (!sic) {
    sic = gt_cstr_iterator_class_new(sizeof (GtSamQueryNameIterator),
                                     gt_sam_query_name_iterator_next,
                                     gt_sam_query_name_iterator_reset,
                                     gt_sam_query_name_iterator_delete);
  }
  gt_class_alloc_lock_leave();
  return sic;
}

// Assembly:
pushq %rax
callq 0xe252f
cmpq $0x0, 0x34e282(%rip)    # 0x4be850
jne 0x1705f6
leaq 0x2d(%rip), %rsi        # 0x170604
leaq 0x93(%rip), %rdx        # 0x170671
leaq 0xd2(%rip), %rcx        # 0x1706b7
movl $0x20, %edi
callq 0x2fd4b1
movq %rax, 0x34e25a(%rip)    # 0x4be850
callq 0xe2545
movq 0x34e24e(%rip), %rax    # 0x4be850
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/sam_query_name_iterator.c
// Function: gt_sam_query_name_iterator_next
static int gt_sam_query_name_iterator_next(GtCstrIterator *cstr_iterator,
                                      const char **query_name,
                                      GT_UNUSED GtError *err)
{
  int read = 0;
  GtSamQueryNameIterator *sqi = gt_sam_query_name_iterator_cast(cstr_iterator);
  read = gt_samfile_iterator_next(sqi->s_iter, &sqi->alignment);
  while (read > 0 && gt_sam_alignment_is_unmapped(sqi->alignment)) {
    read = gt_samfile_iterator_next(sqi->s_iter, &sqi->alignment);
  }
  if (read > 0) {
    *query_name = gt_sam_alignment_identifier(sqi->alignment);
    return read;
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1705c0
movq %rax, %rdi
movq %r14, %rsi
callq 0x2fd526
movq %rax, %r15
movq 0x18(%rax), %rdi
leaq 0x10(%rax), %r14
movq %r14, %rsi
callq 0x170b0e
xorl %ebp, %ebp
testl %eax, %eax
jle 0x170666
movl %eax, %r12d
movq (%r14), %rdi
callq 0x1704f4
testb %al, %al
je 0x170658
movq 0x18(%r15), %rdi
movq %r14, %rsi
callq 0x170b0e
jmp 0x170637
movl %r12d, %ebp
movq (%r14), %rdi
callq 0x170238
movq %rax, (%rbx)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/sam_query_name_iterator.c
// Function: gt_sam_query_name_iterator_new
GtCstrIterator* gt_sam_query_name_iterator_new(GtSamfileIterator *s_iter,
                                        GtError *err)
{
  GtCstrIterator *cstr_iterator =
    gt_cstr_iterator_create(gt_sam_query_name_iterator_class());
  GtSamQueryNameIterator *sqi = gt_sam_query_name_iterator_cast(cstr_iterator);
  sqi->s_iter = s_iter;
  if (gt_sam_query_name_iterator_reset(cstr_iterator, err) != 0)
    return NULL;
  return cstr_iterator;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1705c0
movq %rax, %rdi
callq 0x2fd4f4
movq %rax, %r15
callq 0x1705c0
movq %rax, %rdi
movq %r15, %rsi
callq 0x2fd526
movq %r14, 0x18(%rax)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x170671
xorl %ecx, %ecx
testl %eax, %eax
cmoveq %r15, %rcx
movq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/samfile_encseq_mapping.c
// Function: gt_samfile_encseq_mapping_seqpos
GtUword gt_samfile_encseq_mapping_seqpos(
    GtSamfileEncseqMapping *samfile_encseq_mapping, int32_t reference_num,
    GtUword reference_seqpos)
{
  GtUword seqnum, seqstartpos;
  gt_assert(samfile_encseq_mapping != NULL);
  seqnum = gt_samfile_encseq_mapping_seqnum(samfile_encseq_mapping,
      reference_num);
  seqstartpos = gt_encseq_seqstartpos(samfile_encseq_mapping->encseq, seqnum);
  return seqstartpos + reference_seqpos;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x1709af
cmpl %esi, 0x10(%rdi)
jle 0x1709b4
movq %rdx, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movslq %esi, %rdx
movq (%rcx,%rdx,8), %rsi
movq %rax, %rdi
callq 0xeb6ee
addq %rbx, %rax
popq %rbx
retq
callq 0x52c14
callq 0x52bdd
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/samfile_iterator.c
// Function: gt_samfile_iterator_new
GtSamfileIterator* gt_samfile_iterator_new(const char *filename,
                                           const char *mode,
                                           void *aux,
                                           GtAlphabet *alphabet,
                                           GtError *err)
{
  GtSamfileIterator *s_iter;
  s_iter = gt_malloc(sizeof (GtSamfileIterator));
  s_iter->ref_count = 0;
  s_iter->filename = gt_cstr_dup(filename);
  s_iter->mode = gt_cstr_dup(mode);
  s_iter->aux = aux;
  s_iter->current_alignment = NULL;
  s_iter->alphabet = gt_alphabet_ref(alphabet);
  s_iter->samfile = samopen(filename, mode, aux);
  if (s_iter->samfile == NULL) {
    gt_error_set(err, "could not open sam/bam file: %s", filename);
    gt_samfile_iterator_delete(s_iter);
    return NULL;
  }
  return s_iter;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
movq %rcx, %rbp
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
leaq 0x2211aa(%rip), %rsi    # 0x391b88
movl $0x38, %edi
movl $0x2e, %edx
callq 0x104226
movq %rax, %rbx
xorl %r14d, %r14d
movq %r14, 0x30(%rax)
movq %r15, %rdi
callq 0xe4290
movq %rax, 0x10(%rbx)
movq %r13, %rdi
callq 0xe4290
movq %rax, 0x18(%rbx)
movq %r12, 0x28(%rbx)
movq %r14, 0x8(%rbx)
movq %rbp, %rdi
callq 0xd0a3f
movq %rax, (%rbx)
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x24759a
movq %rax, 0x20(%rbx)
testq %rax, %rax
jne 0x170a58
leaq 0x221168(%rip), %rsi    # 0x391ba8
movq (%rsp), %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xfcb67
movq %rbx, %rdi
callq 0x170a6a
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/samfile_iterator.c
// Function: gt_samfile_iterator_delete
void gt_samfile_iterator_delete(GtSamfileIterator *s_iter)
{
  if (s_iter != NULL) {
    if (s_iter->ref_count != 0)
      s_iter->ref_count--;
    else {
      samclose(s_iter->samfile);
      gt_free(s_iter->filename);
      gt_free(s_iter->mode);
      gt_alphabet_delete(s_iter->alphabet);
      gt_sam_alignment_delete(s_iter->current_alignment);
      gt_free(s_iter);
    }
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x170a86
movq %rdi, %rbx
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x170a8e
decq %rax
movq %rax, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x20(%rbx), %rdi
callq 0x247a0f
movq 0x10(%rbx), %rdi
leaq 0x2210e6(%rip), %r14    # 0x391b88
movq %r14, %rsi
movl $0x5c, %edx
callq 0x1045eb
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movl $0x5d, %edx
callq 0x1045eb
movq (%rbx), %rdi
callq 0xd0e1c
movq 0x8(%rbx), %rdi
callq 0x170160
movq %rbx, %rdi
movq %r14, %rsi
movl $0x60, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1045eb
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/samfile_iterator.c
// Function: gt_samfile_iterator_next
int gt_samfile_iterator_next(GtSamfileIterator *s_iter,
                             GtSamAlignment **s_alignment)
{
  int read;
  if (s_iter->current_alignment == NULL)
    s_iter->current_alignment = gt_sam_alignment_new(s_iter->alphabet);
  s_iter->current_alignment->rightmost = GT_UNDEF_UWORD;
  read = samread(s_iter->samfile, s_iter->current_alignment->s_alignment);
  if (read > 0) {
    *s_alignment = s_iter->current_alignment;
  }
  else {
    *s_alignment = NULL;
  }
  return read;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
testq %rax, %rax
jne 0x170b2d
movq (%r14), %rdi
callq 0x17000c
movq %rax, 0x8(%r14)
movq $-0x1, 0x30(%rax)
movq 0x20(%r14), %rdi
movq (%rax), %rsi
callq 0x247a55
testl %eax, %eax
jle 0x170b4b
movq 0x8(%r14), %rcx
jmp 0x170b4d
xorl %ecx, %ecx
movq %rcx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/samfile_iterator.c
// Function: gt_samfile_iterator_reset
int gt_samfile_iterator_reset(GtSamfileIterator *s_iter,
                              GtError *err)
{
  gt_assert(s_iter != NULL);
  samclose(s_iter->samfile);
  s_iter->samfile = samopen(s_iter->filename, s_iter->mode, s_iter->aux);
  if (s_iter->samfile == NULL) {
    gt_error_set(err, "could not reopen sam/bam file: %s", s_iter->filename);
    return -1;
  }
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x170bb1
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rdi
callq 0x247a0f
movq 0x10(%r14), %rdi
movq 0x18(%r14), %rsi
movq 0x28(%r14), %rdx
callq 0x24759a
movq %rax, %rcx
movq %rax, 0x20(%r14)
xorl %eax, %eax
testq %rcx, %rcx
jne 0x170ba9
movq 0x10(%r14), %rdx
leaq 0x221048(%rip), %rsi    # 0x391be2
movq %rbx, %rdi
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x52c4d
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/sampling.c
// Function: gt_sampling_new_regular
GtSampling *gt_sampling_new_regular(GtUword rate, off_t first_offset)
{
  GtSampling *sampling = gt_malloc(sizeof (*sampling));
  sampling->method = GT_SAMPLING_REGULAR;
  gt_assert(rate != 0);

  gt_sampling_init_sampling(sampling, rate);

  gt_assert(first_offset % sampling->pagesize == 0);

  sampling->page_sampling = NULL;
  sampling->samplingtab = gt_malloc((size_t) sampling->arraysize *
                                    sizeof (*sampling->samplingtab));
  gt_safe_assign(sampling->samplingtab[0], first_offset);
  return sampling;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x221088(%rip), %rsi    # 0x391c96
movl $0x48, %edi
movl $0x3d, %edx
callq 0x104226
movl $0x0, 0x40(%rax)
testq %r15, %r15
je 0x170c95
movq %rax, %r14
movq $0x1, 0x20(%rax)
movq $0xa, 0x8(%rax)
movq %r15, 0x30(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
callq 0xe3e95
movq %rax, %rcx
movq %rax, 0x28(%r14)
movq %rbx, %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x170c9a
movq $0x0, 0x38(%r14)
movq 0x8(%r14), %rdi
shlq $0x3, %rdi
leaq 0x22101f(%rip), %rsi    # 0x391c96
movl $0x47, %edx
callq 0x104226
movq %rax, (%r14)
testq %rbx, %rbx
js 0x170c9f
movq %rbx, (%rax)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
callq 0x52d91
callq 0x52d2f
callq 0x52d66
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/sampling.c
// Function: gt_sampling_new_page
GtSampling *gt_sampling_new_page(GtUword rate, off_t first_offset)
{
  GtSampling *sampling = gt_sampling_new_regular(rate, first_offset);
  sampling->method = GT_SAMPLING_PAGES;
  gt_assert(rate != 0);

  sampling->page_sampling = gt_malloc((size_t) sampling->arraysize *
                                      sizeof (*sampling->page_sampling));
  sampling->page_sampling[0] = 0;
  return sampling;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x170bfc
movl $0x1, 0x40(%rax)
testq %r14, %r14
je 0x170cee
movq %rax, %rbx
movq 0x8(%rax), %rdi
shlq $0x3, %rdi
leaq 0x220fc8(%rip), %rsi    # 0x391c96
movl $0x53, %edx
callq 0x104226
movq %rax, 0x38(%rbx)
movq $0x0, (%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x52dc8
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/sampling.c
// Function: gt_sampling_write
void gt_sampling_write(GtSampling *sampling, FILE *fp)
{
  gt_assert(sampling);
  gt_assert(fp);

  gt_sampling_io_header_samplingtab(sampling, fp, gt_sampling_xfwrite);
  if (sampling->method == GT_SAMPLING_PAGES)
    gt_sampling_io_page_sampling(sampling, fp, gt_sampling_xfwrite);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x170e32
movq %rsi, %rbx
testq %rsi, %rsi
je 0x170e37
movq %rdi, %r14
leaq 0x20(%rdi), %r15
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x17fa0
cmpq $0x1, %rax
jne 0x170e3c
cmpq $0x0, (%r15)
je 0x170e41
leaq 0x40(%r14), %r12
movl $0x4, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rcx
callq 0x17fa0
cmpq $0x1, %rax
jne 0x170e46
leaq 0x30(%r14), %r13
movl $0x8, %esi
movl $0x1, %edx
movq %r13, %rdi
movq %rbx, %rcx
callq 0x17fa0
cmpq $0x1, %rax
jne 0x170e4b
cmpq $0x0, (%r13)
je 0x170e50
cmpl $0x2, (%r12)
jae 0x170e55
movq (%r14), %rdi
testq %rdi, %rdi
jne 0x170dc8
movq 0x20(%r14), %rdi
movq %rdi, 0x8(%r14)
shlq $0x3, %rdi
leaq 0x220ede(%rip), %rsi    # 0x391c96
movl $0xa7, %edx
callq 0x104226
movq %rax, %rdi
movq %rax, (%r14)
movq (%r15), %r13
movl $0x8, %esi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x17fa0
cmpq %r13, %rax
jne 0x170e5a
cmpl $0x1, (%r12)
jne 0x170e28
movq 0x38(%r14), %rdi
testq %rdi, %rdi
jne 0x170e10
movq 0x8(%r14), %rdi
shlq $0x3, %rdi
leaq 0x220e97(%rip), %rsi    # 0x391c96
movl $0x7e, %edx
callq 0x104226
movq %rax, %rdi
movq %rax, 0x38(%r14)
movq (%r15), %r14
movl $0x8, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x17fa0
cmpq %r14, %rax
jne 0x170e5f
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x52f4c
callq 0x52f13
callq 0x52dff
callq 0x52eda
callq 0x52e14
callq 0x52e29
callq 0x52ea1
callq 0x52e3e
callq 0x52e77
callq 0x52e8c