LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 0x112691
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
leaq 0x21e34d(%rip), %rsi    # 0x3308f2
movl $0x239, %edx            # imm = 0x239
callq 0x936f9
cmpq $0x0, 0x38(%rbx)
je 0x1125f4
xorl %r15d, %r15d
leaq 0x21e332(%rip), %r14    # 0x3308f2
movq 0x38(%rbx), %rdi
cmpq $0x596, %r15            # imm = 0x596
je 0x1125e3
movq (%rdi,%r15,8), %rdi
movq %r14, %rsi
movl $0x240, %edx            # imm = 0x240
callq 0x936f9
incq %r15
jmp 0x1125c0
leaq 0x21e308(%rip), %rsi    # 0x3308f2
movl $0x242, %edx            # imm = 0x242
callq 0x936f9
cmpq $0x0, 0x10(%rbx)
je 0x112636
xorl %r15d, %r15d
leaq 0x21e2ed(%rip), %r14    # 0x3308f2
movq 0x10(%rbx), %rdi
cmpq 0x18(%rbx), %r15
jae 0x112625
movq (%rdi,%r15,8), %rdi
movq %r14, %rsi
movl $0x248, %edx            # imm = 0x248
callq 0x936f9
incq %r15
jmp 0x112605
leaq 0x21e2c6(%rip), %rsi    # 0x3308f2
movl $0x24a, %edx            # imm = 0x24A
callq 0x936f9
cmpq $0x0, 0x20(%rbx)
je 0x112678
xorl %r15d, %r15d
leaq 0x21e2ab(%rip), %r14    # 0x3308f2
movq 0x20(%rbx), %rdi
cmpq 0x28(%rbx), %r15
jae 0x112667
movq (%rdi,%r15,8), %rdi
movq %r14, %rsi
movl $0x250, %edx            # imm = 0x250
callq 0x936f9
incq %r15
jmp 0x112647
leaq 0x21e284(%rip), %rsi    # 0x3308f2
movl $0x252, %edx            # imm = 0x252
callq 0x936f9
leaq 0x21e273(%rip), %rsi    # 0x3308f2
movq %rbx, %rdi
movl $0x254, %edx            # imm = 0x254
popq %rbx
popq %r14
popq %r15
jmp 0x936f9
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/rmq.c
// Function: gt_rmq_log2fast
static inline GtUword gt_rmq_log2fast(GtUword v)
{
  GtUword c = 0;          /* c will be lg(v) */
  register GtUword t, tt; /* temporaries */

  if ((tt = v >> 16))
  {
    c = (t = v >> 24) ? 24UL + (GtUword) gt_rmq_LogTable256[t]
                      : 16 + (GtUword) gt_rmq_LogTable256[tt & 0xFF];
  } else
  {
    c = (t = v >> 8) ? 8UL + (GtUword) gt_rmq_LogTable256[t]
                     : (GtUword) gt_rmq_LogTable256[v];
  }
  return (GtUword) c;
}

// Assembly:
cmpq $0x10000, %rdi          # imm = 0x10000
jae 0x112883
cmpq $0x100, %rdi            # imm = 0x100
jae 0x1128a1
leaq 0x21ee33(%rip), %rax    # 0x3316b0
movsbq (%rdi,%rax), %rax
retq
cmpq $0x1000000, %rdi        # imm = 0x1000000
jae 0x1128b6
shrq $0x10, %rdi
leaq 0x21ee19(%rip), %rax    # 0x3316b0
movsbq (%rdi,%rax), %rax
addq $0x10, %rax
retq
shrq $0x8, %rdi
leaq 0x21ee04(%rip), %rax    # 0x3316b0
movsbq (%rdi,%rax), %rax
addq $0x8, %rax
retq
shrq $0x18, %rdi
leaq 0x21edef(%rip), %rax    # 0x3316b0
movsbq (%rdi,%rax), %rax
addq $0x18, %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x112b34
leaq 0xc(%rsp), %r14
movl 0x10(%rbx), %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x175c0
cmpl $-0x1, %eax
sete %bpl
jne 0x112b37
callq 0x17060
cmpl $0x4, (%rax)
je 0x112b12
jmp 0x112b37
movb $0x1, %bpl
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x112b44
callq 0x177c0
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x112b52
callq 0x177c0
leaq 0x21ec57(%rip), %rsi    # 0x3317b0
movq %rbx, %rdi
movl $0x9a, %edx
callq 0x936f9
testb %bpl, %bpl
jne 0x112b73
movl 0xc(%rsp), %eax
testb $0x7f, %al
je 0x112b82
movzbl %bpl, %eax
negl %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movzbl %ah, %eax
jmp 0x112b79
nop
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x112be3
movq %rdi, %rbx
leaq 0x21ed13(%rip), %rsi    # 0x3318af
pushq $0x38
popq %r14
pushq $0x29
popq %rdx
movq %r14, %rdi
callq 0x93160
movq %rax, %r15
pushq $0x1
popq %rdi
movq %r14, %rsi
callq 0x174c0
movq %rax, (%r15)
movq %rbx, %rdi
callq 0x5644e
movq %rax, 0x8(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
movups %xmm0, 0x20(%r15)
orq $-0x1, 0x30(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0x32537e(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d241f(%rip), %rsi    # 0x2e5013
leaq 0x2313be(%rip), %rdx    # 0x343fb9
leaq 0x21ec98(%rip), %rcx    # 0x33189a
leaq 0x21eca6(%rip), %r8     # 0x3318af
pushq $0x27
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
// File: /workspace/github_c_makefile_star2_O2/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 0x112ce5
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x112b88
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 0x112c88
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 0x17f58
movq %rax, %r15
testq %r15, %r15
je 0x112d1b
movq 0x30(%r13), %rsi
movslq 0x24(%r13), %rdx
movq %r15, %rdi
callq 0x17630
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
movq 0x32527c(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d231d(%rip), %rsi    # 0x2e5013
leaq 0x21ebcf(%rip), %rdx    # 0x3318cc
leaq 0x21ebde(%rip), %rcx    # 0x3318e2
leaq 0x21eba4(%rip), %r8     # 0x3318af
pushq $0x37
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
leaq 0x209e71(%rip), %rdi    # 0x31cb93
leaq 0x21eeed(%rip), %rsi    # 0x331c16
leaq 0x21ef52(%rip), %rcx    # 0x331c82
movl $0x2dc, %edx            # imm = 0x2DC
callq 0x174b0
// File: /workspace/github_c_makefile_star2_O2/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 0x112da2
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x112d5f
movq 0x30(%rax), %rdi
callq 0x17f48
movq (%rbx), %rdi
callq 0x17f48
movq 0x8(%rbx), %rdi
callq 0x568b5
movq 0x18(%rbx), %rdi
leaq 0x21eb3c(%rip), %r14    # 0x3318af
pushq $0x43
popq %rdx
movq %r14, %rsi
callq 0x936f9
movq 0x10(%rbx), %rdi
pushq $0x44
popq %rdx
movq %r14, %rsi
callq 0x936f9
pushq $0x45
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x936f9
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x112e9a
movq %rdi, %rbx
movq 0x30(%rdi), %rax
cmpq $-0x1, %rax
jne 0x112e98
movq (%rbx), %rdi
movzbl 0xb(%rdi), %esi
addq 0x30(%rdi), %rsi
callq 0x1f49c4
movl %eax, %eax
movq %rax, 0x30(%rbx)
popq %rbx
retq
movq 0x3250c7(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d2168(%rip), %rsi    # 0x2e5013
leaq 0x21ea1a(%rip), %rdx    # 0x3318cc
leaq 0x21ea93(%rip), %rcx    # 0x33194c
leaq 0x21e9ef(%rip), %r8     # 0x3318af
pushq $0x6f
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
// File: /workspace/github_c_makefile_star2_O2/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 %rdi, %r14
movq (%rdi), %rax
movslq 0x10(%rax), %r12
movq (%rsi), %rax
cmpq %r12, (%rdx)
movq %rsi, (%rsp)
jae 0x112f9f
movq %rdx, %r15
leaq 0x1(%r12), %rsi
leaq 0x21e927(%rip), %rdx    # 0x3318af
movq %rax, %rdi
movl $0x8e, %ecx
callq 0x93472
movq (%rsp), %rsi
movq %rax, (%rsi)
movq %r12, (%r15)
testq %rax, %rax
je 0x11304e
movq (%r14), %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 %ebx, %ebx
cmpq %rbx, %r12
je 0x113037
movq %rbx, %rax
shrq %rax
movb (%r13,%rax), %dl
movl %ebp, %ecx
notb %cl
andb $0x4, %cl
shrb %cl, %dl
andb $0xf, %dl
movq 0x8(%r14), %r15
decb %dl
cmpb $0x8, %dl
jae 0x113011
movzbl %dl, %eax
movl $0x8b, %ecx
btl %eax, %ecx
jae 0x113011
shlb $0x3, %dl
movabsq $0x5441414147414341, %rax # imm = 0x5441414147414341
movl %edx, %ecx
shrq %cl, %rax
jmp 0x113019
movq %r15, %rdi
callq 0x56d5a
movsbl %al, %esi
movq %r15, %rdi
callq 0x57552
movq (%rsp), %rsi
movq (%rsi), %rcx
movb %al, (%rcx,%rbx)
incq %rbx
addb $0x4, %bpl
jmp 0x112fc9
movq (%rsi), %rax
movb $0x0, (%rax,%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x324f13(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d1fb4(%rip), %rsi    # 0x2e5013
leaq 0x21e93a(%rip), %rdx    # 0x3319a0
leaq 0x21e949(%rip), %rcx    # 0x3319b6
leaq 0x21e83b(%rip), %r8     # 0x3318af
movl $0x91, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
// File: /workspace/github_c_makefile_star2_O2/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 0x11314b
movq %rdx, %r15
testq %rdx, %rdx
je 0x113179
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movslq 0x10(%rax), %r12
movq (%rsi), %rax
cmpq %r12, (%r15)
jae 0x1130ee
leaq 0x1(%r12), %rsi
leaq 0x21e7d4(%rip), %rdx    # 0x3318af
movq %rax, %rdi
movl $0xaf, %ecx
callq 0x93472
movq %rax, (%rbx)
movq %r12, (%r15)
testq %rax, %rax
je 0x1131a7
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
cmpq %rcx, %r12
je 0x113137
movb (%rax,%rcx), %dl
addb $0x21, %dl
movq (%rbx), %rsi
movb %dl, (%rsi,%rcx)
incq %rcx
jmp 0x113121
movq (%rbx), %rax
movb $0x0, (%rax,%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x324e16(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d1eb7(%rip), %rsi    # 0x2e5013
leaq 0x21e87d(%rip), %rdx    # 0x3319e0
leaq 0x21e88a(%rip), %rcx    # 0x3319f4
leaq 0x21e73e(%rip), %r8     # 0x3318af
movl $0xaa, %r9d
jmp 0x1131d3
movq 0x324de8(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d1e89(%rip), %rsi    # 0x2e5013
leaq 0x21e892(%rip), %rdx    # 0x331a23
leaq 0x21e85c(%rip), %rcx    # 0x3319f4
leaq 0x21e710(%rip), %r8     # 0x3318af
movl $0xab, %r9d
jmp 0x1131d3
movq 0x324dba(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d1e5b(%rip), %rsi    # 0x2e5013
leaq 0x21e874(%rip), %rdx    # 0x331a33
leaq 0x21e82e(%rip), %rcx    # 0x3319f4
leaq 0x21e6e2(%rip), %r8     # 0x3318af
movl $0xb2, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/sam_alignment.c
// Function: gt_sam_alignment_cigar_i_operation
unsigned char gt_sam_alignment_cigar_i_operation(GtSamAlignment *sam_alignment,
                                                 uint16_t i)
{
  gt_assert(sam_alignment != NULL);
  switch ((unsigned char) bam1_cigar(sam_alignment->s_alignment)[i]
                          & BAM_CIGAR_MASK) {
    case BAM_CMATCH:
      return 'M';
    case BAM_CINS:
      return 'I';
    case BAM_CDEL:
      return 'D';
    case BAM_CREF_SKIP:
      return 'N';
    case BAM_CSOFT_CLIP:
      return 'S';
    case BAM_CHARD_CLIP:
      return 'H';
    case BAM_CPAD:
      return 'P';
    case BAM_CEQUAL:
      return '=';
    case BAM_CDIFF:
      return 'X';
    default:
      exit(GT_EXIT_PROGRAMMING_ERROR);
  }
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x1132ba
movq (%rdi), %rax
movzbl 0xb(%rax), %ecx
addq 0x30(%rax), %rcx
movzwl %si, %eax
movl (%rcx,%rax,4), %eax
andl $0xf, %eax
cmpl $0x9, %eax
jae 0x1132f2
leaq 0x21e9f9(%rip), %rcx    # 0x331cae
movb (%rax,%rcx), %al
popq %rcx
retq
movq 0x324ca7(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d1d48(%rip), %rsi    # 0x2e5013
leaq 0x21e5fa(%rip), %rdx    # 0x3318cc
leaq 0x21e7af(%rip), %rcx    # 0x331a88
leaq 0x21e5cf(%rip), %r8     # 0x3318af
movl $0xd1, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
pushq $0x2
popq %rdi
callq 0x178f0
// File: /workspace/github_c_makefile_star2_O2/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 0x69e97
cmpq $0x0, 0x32a18e(%rip)    # 0x43d800
jne 0x113698
leaq 0x2b(%rip), %rsi        # 0x1136a6
leaq 0x85(%rip), %rdx        # 0x113707
leaq 0xf5(%rip), %rcx        # 0x11377e
pushq $0x20
popq %rdi
callq 0x29a1d0
movq %rax, 0x32a168(%rip)    # 0x43d800
callq 0x69ede
movq 0x32a15c(%rip), %rax    # 0x43d800
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x113664
movq %rax, %rdi
movq %r14, %rsi
callq 0x29a2a1
movq %rax, %r15
movq %rax, %r14
addq $0x10, %r14
movq 0x18(%r15), %rdi
movq %r14, %rsi
callq 0x113c62
testl %eax, %eax
jle 0x1136f8
movl %eax, %ebp
movq (%r14), %rdi
callq 0x1133d0
testb %al, %al
jne 0x1136cd
movq (%r14), %rdi
callq 0x112ed0
movq %rax, (%rbx)
jmp 0x1136fa
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x113664
movq %rax, %rdi
callq 0x29a242
movq %rax, %r15
callq 0x113664
movq %rax, %rdi
movq %r15, %rsi
callq 0x29a2a1
movq %r14, 0x18(%rax)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x113707
xorl %ecx, %ecx
testl %eax, %eax
cmoveq %r15, %rcx
movq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x113ab8
cmpl %esi, 0x10(%rdi)
jle 0x113ae6
movq %rdx, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movslq %esi, %rdx
movq (%rcx,%rdx,8), %rsi
movq %rax, %rdi
callq 0x74d9c
addq %rbx, %rax
popq %rbx
retq
movq 0x3244a9(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d154a(%rip), %rsi    # 0x2e5013
leaq 0x21e358(%rip), %rdx    # 0x331e28
leaq 0x21e370(%rip), %rcx    # 0x331e47
leaq 0x21e258(%rip), %r8     # 0x331d36
movl $0x81, %r9d
jmp 0x113b10
movq 0x32447b(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d151c(%rip), %rsi    # 0x2e5013
leaq 0x21e38b(%rip), %rdx    # 0x331e89
leaq 0x21e363(%rip), %rcx    # 0x331e68
leaq 0x21e22a(%rip), %r8     # 0x331d36
pushq $0x78
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
// File: /workspace/github_c_makefile_star2_O2/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, %rbx
movq %rcx, %rbp
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
leaq 0x21e38b(%rip), %rsi    # 0x331ec8
pushq $0x38
popq %rdi
pushq $0x2e
popq %rdx
callq 0x93160
movq %rax, %r14
andq $0x0, 0x30(%rax)
movq %r15, %rdi
callq 0x6c2be
movq %rax, 0x10(%r14)
movq %r13, %rdi
callq 0x6c2be
movq %rax, 0x18(%r14)
movq %r12, 0x28(%r14)
andq $0x0, 0x8(%r14)
movq %rbp, %rdi
callq 0x5644e
movq %rax, (%r14)
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1f7bdc
movq %rax, 0x20(%r14)
testq %rax, %rax
jne 0x113bb2
leaq 0x21e34e(%rip), %rsi    # 0x331ee8
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x89dbb
movq %r14, %rdi
callq 0x113bc4
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x113be0
movq %rdi, %rbx
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x113be8
decq %rax
movq %rax, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x20(%rbx), %rdi
callq 0x1f8059
movq 0x10(%rbx), %rdi
leaq 0x21e2cc(%rip), %r14    # 0x331ec8
pushq $0x5c
popq %rdx
movq %r14, %rsi
callq 0x936f9
movq 0x18(%rbx), %rdi
pushq $0x5d
popq %rdx
movq %r14, %rsi
callq 0x936f9
movq (%rbx), %rdi
callq 0x568b5
movq 0x8(%rbx), %rdi
callq 0x112d3a
pushq $0x60
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x936f9
// File: /workspace/github_c_makefile_star2_O2/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 0x113c81
movq (%r14), %rdi
callq 0x112b88
movq %rax, 0x8(%r14)
orq $-0x1, 0x30(%rax)
movq 0x20(%r14), %rdi
movq (%rax), %rsi
callq 0x1f809f
testl %eax, %eax
jle 0x113c9c
movq 0x8(%r14), %rcx
jmp 0x113c9e
xorl %ecx, %ecx
movq %rcx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x113d00
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rdi
callq 0x1f8059
movq 0x10(%r14), %rdi
movq 0x18(%r14), %rsi
movq 0x28(%r14), %rdx
callq 0x1f7bdc
movq %rax, %rcx
movq %rax, 0x20(%r14)
xorl %eax, %eax
testq %rcx, %rcx
jne 0x113cf8
movq 0x10(%r14), %rdx
leaq 0x21e237(%rip), %rsi    # 0x331f22
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x324261(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d1302(%rip), %rsi    # 0x2e5013
leaq 0x210766(%rip), %rdx    # 0x32447e
leaq 0x21e1e9(%rip), %rcx    # 0x331f08
leaq 0x21e1a2(%rip), %r8     # 0x331ec8
pushq $0x79
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
// File: /workspace/github_c_makefile_star2_O2/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 0x21e1b8(%rip), %rsi    # 0x331fd6
pushq $0x48
popq %rdi
pushq $0x3d
popq %rdx
callq 0x93160
andl $0x0, 0x40(%rax)
testq %r15, %r15
je 0x113e99
movq %rax, %r14
movq $0x1, 0x20(%rax)
movq $0xa, 0x8(%rax)
movq %r15, 0x30(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
callq 0x6be41
movq %rax, %rcx
movq %rax, 0x28(%r14)
movq %rbx, %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x113ec3
andq $0x0, 0x38(%r14)
movq 0x8(%r14), %rdi
shlq $0x3, %rdi
leaq 0x21e159(%rip), %rsi    # 0x331fd6
pushq $0x47
popq %rdx
callq 0x93160
movq %rax, (%r14)
testq %rbx, %rbx
js 0x113ef9
movq %rbx, (%rax)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0x3240c8(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d1169(%rip), %rsi    # 0x2e5013
leaq 0x21e403(%rip), %rdx    # 0x3322b4
leaq 0x21e136(%rip), %rcx    # 0x331fee
leaq 0x21e117(%rip), %r8     # 0x331fd6
pushq $0x3f
jmp 0x113eeb
movq 0x32409e(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d113f(%rip), %rsi    # 0x2e5013
leaq 0x21e12b(%rip), %rdx    # 0x332006
leaq 0x21e10c(%rip), %rcx    # 0x331fee
leaq 0x21e0ed(%rip), %r8     # 0x331fd6
pushq $0x43
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x324068(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d4ead(%rip), %rsi    # 0x2e8db7
leaq 0x21e0c5(%rip), %rdx    # 0x331fd6
pushq $0x48
popq %rcx
xorl %eax, %eax
callq 0x17a50
pushq $0x1
popq %rdi
callq 0x178f0
// File: /workspace/github_c_makefile_star2_O2/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 0x113e0c
movl $0x1, 0x40(%rax)
testq %r14, %r14
je 0x113f68
movq %rax, %rbx
movq 0x8(%rax), %rdi
shlq $0x3, %rdi
leaq 0x21e089(%rip), %rsi    # 0x331fd6
pushq $0x53
popq %rdx
callq 0x93160
movq %rax, 0x38(%rbx)
andq $0x0, (%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x323ff9(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d109a(%rip), %rsi    # 0x2e5013
leaq 0x21e334(%rip), %rdx    # 0x3322b4
leaq 0x21e0a6(%rip), %rcx    # 0x33202d
leaq 0x21e048(%rip), %r8     # 0x331fd6
pushq $0x50
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x113fe9
movq %rsi, %rbx
testq %rsi, %rsi
je 0x114017
movq %rdi, %r14
leaq 0x1e3(%rip), %rdx       # 0x11419c
movq %rbx, %rsi
callq 0x11404f
cmpl $0x1, 0x40(%r14)
jne 0x113fe1
leaq 0x1cd(%rip), %rdx       # 0x11419c
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1141c0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x323f78(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d1019(%rip), %rsi    # 0x2e5013
leaq 0x21e1c7(%rip), %rdx    # 0x3321c8
leaq 0x21e03a(%rip), %rcx    # 0x332042
leaq 0x21dfc7(%rip), %r8     # 0x331fd6
movl $0xae, %r9d
jmp 0x114043
movq 0x323f4a(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d0feb(%rip), %rsi    # 0x2e5013
leaq 0x20f489(%rip), %rdx    # 0x3234b8
leaq 0x21e00c(%rip), %rcx    # 0x332042
leaq 0x21df99(%rip), %r8     # 0x331fd6
movl $0xaf, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/sampling.c
// Function: gt_sampling_io_header_samplingtab
static void gt_sampling_io_header_samplingtab(GtSampling *sampling,
                                           FILE *fp,
                                           SamplingIOFunc io_func)
{
  gt_sampling_io_header(sampling, fp, io_func);
  gt_assert(sampling->method == GT_SAMPLING_REGULAR ||
            sampling->method == GT_SAMPLING_PAGES);

  if (sampling->samplingtab == NULL) {
    sampling->arraysize = sampling->numofsamples;
    sampling->samplingtab = gt_malloc((size_t) sampling->arraysize *
                                        sizeof (*sampling->samplingtab));
  }
  gt_sampling_io_samplingtab(sampling, fp, io_func);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x20(%rdi), %r14
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %rbx, %rcx
callq *%rbp
cmpq $0x0, 0x20(%r15)
je 0x114108
leaq 0x40(%r15), %r12
pushq $0x4
popq %rsi
pushq $0x1
popq %r13
movq %r12, %rdi
movq %r13, %rdx
movq %rbx, %rcx
callq *%rbp
leaq 0x30(%r15), %rdi
pushq $0x8
popq %rsi
movq %r13, %rdx
movq %rbx, %rcx
movq %rbp, %r13
callq *%rbp
cmpq $0x0, 0x30(%r15)
je 0x114136
cmpl $0x2, (%r12)
jae 0x114164
movq (%r15), %rdi
testq %rdi, %rdi
movq %r13, %rax
jne 0x1140ef
movq 0x20(%r15), %rdi
movq %rdi, 0x8(%r15)
shlq $0x3, %rdi
leaq 0x21defa(%rip), %rsi    # 0x331fd6
movl $0xa7, %edx
callq 0x93160
movq %rax, %rdi
movq %r13, %rax
movq %rdi, (%r15)
movq (%r14), %rdx
pushq $0x8
popq %rsi
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movq 0x323e59(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d0efa(%rip), %rsi    # 0x2e5013
leaq 0x21e14f(%rip), %rdx    # 0x33226f
leaq 0x21e164(%rip), %rcx    # 0x33228b
leaq 0x21dea8(%rip), %r8     # 0x331fd6
movl $0x95, %r9d
jmp 0x114190
movq 0x323e2b(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d0ecc(%rip), %rsi    # 0x2e5013
leaq 0x21e153(%rip), %rdx    # 0x3322a1
leaq 0x21e136(%rip), %rcx    # 0x33228b
leaq 0x21de7a(%rip), %r8     # 0x331fd6
movl $0x98, %r9d
jmp 0x114190
movq 0x323dfd(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d0e9e(%rip), %rsi    # 0x2e5013
leaq 0x21e080(%rip), %rdx    # 0x3321fc
leaq 0x21e0ca(%rip), %rcx    # 0x33224d
leaq 0x21de4c(%rip), %r8     # 0x331fd6
movl $0xa2, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/sampling.c
// Function: gt_sampling_io_page_sampling
static inline void gt_sampling_io_page_sampling(GtSampling *sampling,
                                             FILE *fp,
                                             SamplingIOFunc io_func)
{
  if (sampling->page_sampling == NULL) {
    sampling->page_sampling = gt_malloc((size_t) sampling->arraysize *
                                        sizeof (*sampling->page_sampling));
  }
  io_func(sampling->page_sampling,
          sizeof (*sampling->page_sampling),
          (size_t) sampling->numofsamples,
          fp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
jne 0x1141fb
movq 0x8(%r14), %rdi
shlq $0x3, %rdi
leaq 0x21ddf0(%rip), %rsi    # 0x331fd6
pushq $0x7e
popq %rdx
movq %rax, %r15
callq 0x93160
movq %rax, %rdi
movq %r15, %rax
movq %rdi, 0x38(%r14)
movq 0x20(%r14), %rdx
pushq $0x8
popq %rsi
movq %rbx, %rcx
popq %rbx
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/sampling.c
// Function: gt_sampling_read
GtSampling *gt_sampling_read(FILE *fp)
{
  GtSampling *sampling;

  gt_assert(fp);

  sampling = gt_malloc(sizeof (*sampling));
  sampling->samplingtab = NULL;
  sampling->page_sampling = NULL;
  sampling->current_sample_num =
    sampling->current_sample_elementnum = 0;
  sampling->pagesize = gt_pagesize();

  gt_sampling_io_header_samplingtab(sampling, fp, gt_sampling_xfread);
  if (sampling->method == GT_SAMPLING_PAGES)
    gt_sampling_io_page_sampling(sampling, fp, gt_sampling_xfread);
  gt_assert(sampling->arraysize == sampling->numofsamples);

  return sampling;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x114288
movq %rdi, %rbx
leaq 0x21ddb7(%rip), %rsi    # 0x331fd6
pushq $0x48
popq %rdi
movl $0xbc, %edx
callq 0x93160
movq %rax, %r14
andq $0x0, (%rax)
andq $0x0, 0x38(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
callq 0x6be41
movq %rax, 0x28(%r14)
leaq 0x9f(%rip), %rdx        # 0x1142ee
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11404f
cmpl $0x1, 0x40(%r14)
jne 0x114273
leaq 0x86(%rip), %rdx        # 0x1142ee
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1141c0
movq 0x8(%r14), %rax
cmpq 0x20(%r14), %rax
jne 0x1142b6
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x323cd9(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d0d7a(%rip), %rsi    # 0x2e5013
leaq 0x20f218(%rip), %rdx    # 0x3234b8
leaq 0x21ddad(%rip), %rcx    # 0x332054
leaq 0x21dd28(%rip), %r8     # 0x331fd6
movl $0xba, %r9d
jmp 0x1142e2
movq 0x323cab(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d0d4c(%rip), %rsi    # 0x2e5013
leaq 0x21dd97(%rip), %rdx    # 0x332065
leaq 0x21dd7f(%rip), %rcx    # 0x332054
leaq 0x21dcfa(%rip), %r8     # 0x331fd6
movl $0xc6, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/sampling.c
// Function: gt_sampling_xfread
static inline void gt_sampling_xfread(void *ptr,
                                      size_t size,
                                      size_t nmemb,
                                      FILE *stream)
{
  if (nmemb != fread(ptr, size, nmemb, stream)) {
    gt_assert(feof(stream) == 0);
    if (ferror(stream) != 0)
      perror("gt_sampling_xfread could not read from file");
    exit(EXIT_FAILURE);
  };
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
callq 0x17ad0
cmpq %r14, %rax
jne 0x11430a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x17b70
testl %eax, %eax
jne 0x114336
movq %rbx, %rdi
callq 0x17e70
testl %eax, %eax
je 0x11432e
leaq 0x21dfe6(%rip), %rdi    # 0x33230f
callq 0x17660
pushq $0x1
popq %rdi
callq 0x178f0
movq 0x323c2b(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d0ccc(%rip), %rsi    # 0x2e5013
leaq 0x21df9c(%rip), %rdx    # 0x3322ea
leaq 0x21dfa7(%rip), %rcx    # 0x3322fc
leaq 0x21dc7a(%rip), %r8     # 0x331fd6
pushq $0x69
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/sampling.c
// Function: gt_sampling_get_page
void gt_sampling_get_page(GtSampling *sampling,
                          GtUword element_num,
                          GtUword *sampled_element,
                          size_t *position)
{
  gt_assert(sampling != NULL);
  gt_assert(sampled_element != NULL);
  gt_assert(position != NULL);

  switch (sampling->method) {
    case GT_SAMPLING_REGULAR:
      get_regular_page(sampling, element_num, sampled_element, position);
      break;

    case GT_SAMPLING_PAGES:
      get_pagewise_page(sampling, element_num, sampled_element, position);
      break;
  }
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x114438
movq %rdx, %r8
testq %rdx, %rdx
je 0x114469
testq %rcx, %rcx
je 0x114497
movl 0x40(%rdi), %eax
cmpl $0x1, %eax
je 0x1143c0
testl %eax, %eax
jne 0x114436
movq 0x30(%rdi), %r9
movq %rsi, %rax
xorl %edx, %edx
divq %r9
movq %rax, 0x18(%rdi)
imulq %r9, %rax
movq %rax, 0x10(%rdi)
movq %rax, (%r8)
movq 0x18(%rdi), %rax
shlq $0x3, %rax
jmp 0x11442d
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x1144c5
jle 0x1144fd
movq %rax, %rdx
shrq %rdx
pushq $-0x1
popq %r9
movq %rax, %r10
subq %r9, %r10
cmpq $0x2, %r10
jl 0x114409
movq 0x38(%rdi), %r10
cmpq %rsi, (%r10,%rdx,8)
ja 0x1143f8
movq %rdx, %rax
jmp 0x1143fe
movq %rdx, %r9
movq %rax, %rdx
subq %r9, %rdx
sarq %rdx
addq %r9, %rdx
jmp 0x1143dd
xorl %esi, %esi
testq %rdx, %rdx
cmovgq %rdx, %rsi
movq 0x38(%rdi), %rdx
leaq (,%rsi,8), %rax
movq (%rdx,%rsi,8), %rdx
movq %rdx, 0x10(%rdi)
movq %rdx, (%r8)
movq %rsi, 0x18(%rdi)
addq (%rdi), %rax
movq (%rax), %rax
movq %rax, (%rcx)
popq %rax
retq
movq 0x323b29(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d0bca(%rip), %rsi    # 0x2e5013
leaq 0x21dc43(%rip), %rdx    # 0x332093
leaq 0x21dc4d(%rip), %rcx    # 0x3320a4
leaq 0x21db78(%rip), %r8     # 0x331fd6
movl $0x100, %r9d            # imm = 0x100
jmp 0x1144f1
movq 0x323af8(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d0b99(%rip), %rsi    # 0x2e5013
leaq 0x21dc38(%rip), %rdx    # 0x3320b9
leaq 0x21dc1c(%rip), %rcx    # 0x3320a4
leaq 0x21db47(%rip), %r8     # 0x331fd6
movl $0x101, %r9d            # imm = 0x101
jmp 0x1144f1
movq 0x323aca(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d0b6b(%rip), %rsi    # 0x2e5013
leaq 0x242d40(%rip), %rdx    # 0x3571ef
leaq 0x21dbee(%rip), %rcx    # 0x3320a4
leaq 0x21db19(%rip), %r8     # 0x331fd6
movl $0x102, %r9d            # imm = 0x102
jmp 0x1144f1
movq 0x323a9c(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d0b3d(%rip), %rsi    # 0x2e5013
leaq 0x21dd92(%rip), %rdx    # 0x33226f
leaq 0x21de57(%rip), %rcx    # 0x33233b
leaq 0x21daeb(%rip), %r8     # 0x331fd6
movl $0xe1, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x323a64(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d48a9(%rip), %rsi    # 0x2e8db7
leaq 0x21dac1(%rip), %rdx    # 0x331fd6
movl $0xe4, %ecx
xorl %eax, %eax
callq 0x17a50
pushq $0x1
popq %rdi
callq 0x178f0
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/sampling.c
// Function: gt_sampling_get_next_elementnum
GtUword gt_sampling_get_next_elementnum(GtSampling *sampling)
{
  gt_assert(sampling->arraysize == sampling->numofsamples);
  gt_assert(sampling->current_sample_num < sampling->numofsamples);
  if (sampling->current_sample_num + 1 == sampling->numofsamples)
    return 0;
  gt_assert((sampling->current_sample_num + 1) < sampling->arraysize);
  switch (sampling->method) {
    case GT_SAMPLING_REGULAR:
      return sampling->current_sample_elementnum + sampling->sampling_rate;
    case GT_SAMPLING_PAGES:
      return sampling->page_sampling[sampling->current_sample_num + 1];
    default:
      return GT_UNDEF_UWORD;
  }
}

// Assembly:
pushq %rax
movq 0x8(%rdi), %rcx
cmpq 0x20(%rdi), %rcx
jne 0x11457b
movq 0x18(%rdi), %rax
cmpq %rcx, %rax
jae 0x1145a9
leaq 0x1(%rax), %rdx
cmpq %rcx, %rdx
jne 0x11454f
xorl %eax, %eax
jmp 0x114579
jae 0x1145d7
movl 0x40(%rdi), %ecx
cmpl $0x1, %ecx
je 0x11456b
testl %ecx, %ecx
jne 0x114576
movq 0x30(%rdi), %rax
addq 0x10(%rdi), %rax
jmp 0x114579
movq 0x38(%rdi), %rcx
movq 0x8(%rcx,%rax,8), %rax
jmp 0x114579
pushq $-0x1
popq %rax
popq %rcx
retq
movq 0x3239e6(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d0a87(%rip), %rsi    # 0x2e5013
leaq 0x21dad2(%rip), %rdx    # 0x332065
leaq 0x21db37(%rip), %rcx    # 0x3320d1
leaq 0x21da35(%rip), %r8     # 0x331fd6
movl $0x116, %r9d            # imm = 0x116
jmp 0x114603
movq 0x3239b8(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d0a59(%rip), %rsi    # 0x2e5013
leaq 0x21db30(%rip), %rdx    # 0x3320f1
leaq 0x21db09(%rip), %rcx    # 0x3320d1
leaq 0x21da07(%rip), %r8     # 0x331fd6
movl $0x117, %r9d            # imm = 0x117
jmp 0x114603
movq 0x32398a(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d0a2b(%rip), %rsi    # 0x2e5013
leaq 0x21db38(%rip), %rdx    # 0x332127
leaq 0x21dadb(%rip), %rcx    # 0x3320d1
leaq 0x21d9d9(%rip), %r8     # 0x331fd6
movl $0x11a, %r9d            # imm = 0x11A
xorl %eax, %eax
callq 0x17a50
callq 0x17390
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/sampling.c
// Function: gt_sampling_delete
void gt_sampling_delete(GtSampling *sampling)
{
  if (!sampling) return;
  gt_free(sampling->samplingtab);
  gt_free(sampling->page_sampling);
  gt_free(sampling);
}

// Assembly:
testq %rdi, %rdi
je 0x1148f2
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0x21d719(%rip), %r14    # 0x331fd6
movq %r14, %rsi
movl $0x184, %edx            # imm = 0x184
callq 0x936f9
movq 0x38(%rbx), %rdi
movq %r14, %rsi
movl $0x185, %edx            # imm = 0x185
callq 0x936f9
movq %rbx, %rdi
movq %r14, %rsi
movl $0x186, %edx            # imm = 0x186
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x936f9
retq
nop
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/scorehandler.c
// Function: gt_scorehandler_new
GtScoreHandler* gt_scorehandler_new(GtWord matchscore,
                                    GtWord mismatchscore,
                                    GtWord gap_opening,
                                    GtWord gap_extension)
{
  GtScoreHandler *scorehandler = gt_malloc(sizeof *scorehandler);

  scorehandler->scorematrix = NULL;
  scorehandler->mappedsequence = true;
  scorehandler->matchscore = matchscore;
  scorehandler->mismatchscore = mismatchscore;
  scorehandler->gap_opening = gap_opening;
  scorehandler->gap_extension = gap_extension;
  scorehandler->downcase = false;
  return scorehandler;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x21da3e(%rip), %rsi    # 0x33234d
pushq $0x30
popq %rdi
pushq $0x29
popq %rdx
callq 0x93160
andq $0x0, 0x20(%rax)
movw $0x1, 0x28(%rax)
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
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/scorehandler.c
// Function: gt_scorehandler_get_replacement
GtWord gt_scorehandler_get_replacement(const GtScoreHandler *scorehandler,
                                       GtUchar a, GtUchar b)
{
  gt_assert(scorehandler != NULL);
  if (scorehandler->scorematrix == NULL)
  {
    if (scorehandler->mappedsequence)
    {
      return GT_ISSPECIAL(a) || GT_ISSPECIAL(b) || a != b
               ? scorehandler->mismatchscore
               : scorehandler->matchscore;
    }
    if (scorehandler->downcase)
    {
      a = tolower((int) a);
      b = tolower((int) b);
    }
    return a != b ? scorehandler->mismatchscore
                  : scorehandler->matchscore;
  }
  gt_assert(scorehandler->mappedsequence);
  return gt_score_matrix_get_score(scorehandler->scorematrix,a,b);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x114bbc
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movb 0x28(%rbx), %al
testq %rdi, %rdi
je 0x114b66
testb %al, %al
je 0x114be6
movzbl %r14b, %esi
movzbl %bpl, %edx
callq 0xa5323
cltq
jmp 0x114bb7
testb %al, %al
je 0x114b8e
xorl %eax, %eax
cmpb $-0x2, %bpl
setae %al
shll $0x3, %eax
cmpb $-0x2, %r14b
pushq $0x8
popq %rcx
cmovaeq %rcx, %rax
cmpb %bpl, %r14b
cmovneq %rcx, %rax
movq (%rbx,%rax), %rax
jmp 0x114bb7
cmpb $0x1, 0x29(%rbx)
jne 0x114bab
movzbl %r14b, %edi
callq 0x17a80
movl %eax, %r14d
movzbl %bpl, %edi
callq 0x17a80
movl %eax, %ebp
xorl %eax, %eax
cmpb %bpl, %r14b
setne %al
movq (%rbx,%rax,8), %rax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x3233a5(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d0446(%rip), %rsi    # 0x2e5013
leaq 0x21d795(%rip), %rdx    # 0x332369
leaq 0x21d870(%rip), %rcx    # 0x33244b
leaq 0x21d76b(%rip), %r8     # 0x33234d
pushq $0x6c
jmp 0x114c0e
movq 0x32337b(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d041c(%rip), %rsi    # 0x2e5013
leaq 0x21d86d(%rip), %rdx    # 0x33246b
leaq 0x21d846(%rip), %rcx    # 0x33244b
leaq 0x21d741(%rip), %r8     # 0x33234d
pushq $0x7d
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/scorehandler.c
// Function: gt_scorehandler_eval_alignmentscore
GtWord gt_scorehandler_eval_alignmentscore(const GtScoreHandler *scorehandler,
                                           const GtAlignment *alignment,
                                           const GtUchar *characters)
{
  gt_assert(scorehandler && alignment && characters);
  if (scorehandler->scorematrix != NULL)
  {
    return gt_alignment_eval_with_affine_scorematrix(characters, alignment,
                                                   scorehandler->scorematrix,
                                                   scorehandler->gap_opening,
                                                   scorehandler->gap_extension);
  } else
  {
    return gt_alignment_eval_with_mapped_affine_score(characters, alignment,
                                                   scorehandler->matchscore,
                                                   scorehandler->mismatchscore,
                                                   scorehandler->gap_opening,
                                                   scorehandler->gap_extension);
  }
}

// Assembly:
testq %rdi, %rdi
je 0x114df2
testq %rsi, %rsi
je 0x114df2
testq %rdx, %rdx
je 0x114df2
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x114dd8
movq 0x10(%rdi), %rcx
movq 0x18(%rdi), %r8
movq %rdx, %rdi
movq %rax, %rdx
jmp 0xb5b5e
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %r8
movq 0x18(%rdi), %r9
movq %rdx, %rdi
movq %rax, %rdx
jmp 0xb5b2f
pushq %rax
movq 0x32316e(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d020f(%rip), %rsi    # 0x2e5013
leaq 0x21d699(%rip), %rdx    # 0x3324a4
leaq 0x21d6ba(%rip), %rcx    # 0x3324cc
leaq 0x21d534(%rip), %r8     # 0x33234d
movl $0xc4, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
nop