LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl $0xffffffff, 0x10(%rsp) # imm = 0xFFFFFFFF
movq 0x18(%rsp), %rax
cmpl $-0x1, 0x10(%rax)
je 0x1cdd3c
jmp 0x1cdcfe
movq 0x18(%rsp), %rax
movl 0x10(%rax), %edi
leaq 0x14(%rsp), %rsi
xorl %edx, %edx
callq 0x195a0
movl %eax, 0x10(%rsp)
xorl %eax, %eax
cmpl $-0x1, 0x10(%rsp)
movb %al, 0xf(%rsp)
jne 0x1cdd32
callq 0x19060
cmpl $0x4, (%rax)
sete %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x1cdcfe
jmp 0x1cdd3c
movq 0x18(%rsp), %rax
cmpq $0x0, (%rax)
je 0x1cdd54
movq 0x18(%rsp), %rax
movq (%rax), %rdi
callq 0x19780
movq 0x18(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1cdd6e
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x19780
movq 0x18(%rsp), %rdi
leaq 0x395f16(%rip), %rsi    # 0x563c90
movl $0x9a, %edx
callq 0xe88c0
cmpl $-0x1, 0x10(%rsp)
je 0x1cdda9
movl 0x14(%rsp), %eax
andl $0x7f, %eax
cmpl $0x0, %eax
jne 0x1cdda9
movl 0x14(%rsp), %eax
andl $0xff00, %eax           # imm = 0xFF00
sarl $0x8, %eax
movl %eax, 0x24(%rsp)
jmp 0x1cddbe
movl 0x10(%rsp), %edx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $-0x1, %edx
cmovel %ecx, %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x1cde19
movq 0x46e1b8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x348221(%rip), %rsi    # 0x516013
leaq 0x3a8597(%rip), %rdx    # 0x576390
leaq 0x395fc0(%rip), %rcx    # 0x563dc0
leaq 0x395fce(%rip), %r8     # 0x563dd5
movl $0x27, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1cde1b
movl $0x38, %edi
leaq 0x395fae(%rip), %rsi    # 0x563dd5
movl $0x29, %edx
callq 0xe80f0
movq %rax, 0x8(%rsp)
movl $0x1, %edi
movl $0x38, %esi
callq 0x194a0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rdi
callq 0x7dc50
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x8(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x8(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x8(%rsp), %rax
movq $0x0, 0x28(%rax)
movq 0x8(%rsp), %rax
movq $-0x1, 0x30(%rax)
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x1cdf09
movq 0x46e0c8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x348131(%rip), %rsi    # 0x516013
leaq 0x395f09(%rip), %rdx    # 0x563df2
leaq 0x395f18(%rip), %rcx    # 0x563e08
leaq 0x395ede(%rip), %r8     # 0x563dd5
movl $0x37, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1cdf0b
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x1cddd0
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rsi
callq 0x1cdf50
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/samtools-0.1.18/samtools/bam.h
// Function: bam_copy1
static inline bam1_t *bam_copy1(bam1_t *bdst, const bam1_t *bsrc)
{
	uint8_t *data = bdst->data;
	int m_data = bdst->m_data;   // backup data and m_data
	if (m_data < bsrc->data_len) { // double the capacity
		m_data = bsrc->data_len; kroundup32(m_data);
		data = (uint8_t*)realloc(data, m_data);
	}
        assert(data != NULL);
	memcpy(data, bsrc->data, bsrc->data_len); // copy var-len data
	*bdst = *bsrc; // copy the rest
	// restore the backup
	bdst->m_data = m_data;
	bdst->data = data;
	return bdst;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movl 0x28(%rax), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl 0x24(%rcx), %eax
jge 0x1ce00a
movq 0x18(%rsp), %rax
movl 0x24(%rax), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
sarl %eax
orl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
sarl $0x2, %eax
orl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
sarl $0x4, %eax
orl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
sarl $0x8, %eax
orl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
sarl $0x10, %eax
orl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rdi
movslq 0xc(%rsp), %rsi
callq 0x19f00
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x1ce014
jmp 0x1ce033
leaq 0x380d18(%rip), %rdi    # 0x54ed33
leaq 0x39611a(%rip), %rsi    # 0x56413c
movl $0x2dc, %edx            # imm = 0x2DC
leaq 0x39617a(%rip), %rcx    # 0x5641a8
callq 0x19490
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rsi
movq 0x18(%rsp), %rax
movslq 0x24(%rax), %rdx
callq 0x19610
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl $0x38, %edx
callq 0x19610
movl 0xc(%rsp), %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0x28(%rax)
movq 0x10(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rax
movq %rdi, (%rsp)
cmpq $0x0, (%rsp)
je 0x1ce11a
jmp 0x1ce09e
movq (%rsp), %rax
cmpq $0x0, (%rax)
je 0x1ce0c4
movq (%rsp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rdi
callq 0x19ef0
movq (%rsp), %rax
movq (%rax), %rdi
callq 0x19ef0
jmp 0x1ce0c6
movq (%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x7e3d0
movq (%rsp), %rax
movq 0x18(%rax), %rdi
leaq 0x395cf3(%rip), %rsi    # 0x563dd5
movl $0x43, %edx
callq 0xe88c0
movq (%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0x395cda(%rip), %rsi    # 0x563dd5
movl $0x44, %edx
callq 0xe88c0
movq (%rsp), %rdi
leaq 0x395cc5(%rip), %rsi    # 0x563dd5
movl $0x45, %edx
callq 0xe88c0
popq %rax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rax
movq %rdi, (%rsp)
cmpq $0x0, (%rsp)
jne 0x1ce284
movq 0x46dd4d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x347db6(%rip), %rsi    # 0x516013
leaq 0x395b8e(%rip), %rdx    # 0x563df2
leaq 0x395c07(%rip), %rcx    # 0x563e72
leaq 0x395b63(%rip), %r8     # 0x563dd5
movl $0x6f, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1ce286
movq (%rsp), %rax
cmpq $-0x1, 0x30(%rax)
jne 0x1ce2ce
movq (%rsp), %rax
movq (%rax), %rdi
movq (%rsp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rsi
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
shrq $0x18, %rax
andq $0xff, %rax
cltq
addq %rax, %rsi
callq 0x3655d0
movl %eax, %eax
movl %eax, %ecx
movq (%rsp), %rax
movq %rcx, 0x30(%rax)
movq (%rsp), %rax
movq 0x30(%rax), %rax
popq %rcx
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq (%rax), %rax
movslq 0x10(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rax
cmpq 0x18(%rsp), %rax
jae 0x1ce411
movq 0x28(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
addq $0x1, %rsi
shlq $0x0, %rsi
leaq 0x3959e6(%rip), %rdx    # 0x563dd5
movl $0x8e, %ecx
callq 0xe8540
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
jmp 0x1ce413
movq 0x28(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x1ce456
movq 0x46db7b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x347be4(%rip), %rsi    # 0x516013
leaq 0x395a90(%rip), %rdx    # 0x563ec6
leaq 0x395a9f(%rip), %rcx    # 0x563edc
leaq 0x395991(%rip), %r8     # 0x563dd5
movl $0x91, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1ce458
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rax
movq 0x30(%rsp), %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %rcx
shrq $0x30, %rcx
shll $0x2, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq 0x30(%rsp), %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %rcx
shrq $0x18, %rcx
andq $0xff, %rcx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x1ce512
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
shrq %rcx
movzbl (%rax,%rcx), %eax
movq 0x10(%rsp), %rdx
andq $0x1, %rdx
movl $0x1, %ecx
subq %rdx, %rcx
shlq $0x2, %rcx
sarl %cl, %eax
andl $0xf, %eax
movq 0x30(%rsp), %rcx
movq 0x8(%rcx), %rsi
movzbl %al, %edi
callq 0x1ce530
movb %al, %dl
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x1ce4a8
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rsp), %rcx
movb $0x0, (%rax,%rcx)
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/sam_alignment.c
// Function: bambase2gtbase
static GtUchar bambase2gtbase(uint8_t base, GtAlphabet *alphabet)
{
  switch (base)
  {
    case BAMBASEA:
      return gt_alphabet_encode(alphabet, 'A');
    case BAMBASEC:
      return gt_alphabet_encode(alphabet, 'C');
    case BAMBASEG:
      return gt_alphabet_encode(alphabet, 'G');
    case BAMBASET:
      return gt_alphabet_encode(alphabet, 'T');
    default:
      return gt_alphabet_encode(alphabet,
                                (char) gt_alphabet_wildcard_show(alphabet));
  }
}

// Assembly:
subq $0x28, %rsp
movb %dil, %al
movb %al, 0x26(%rsp)
movq %rsi, 0x18(%rsp)
movzbl 0x26(%rsp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x10(%rsp)
subl $0x7, %eax
ja 0x1ce5bc
movq 0x10(%rsp), %rax
leaq 0x39581d(%rip), %rcx    # 0x563d7c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%rsp), %rdi
movl $0x41, %esi
callq 0x7f6f0
movb %al, 0x27(%rsp)
jmp 0x1ce5e1
movq 0x18(%rsp), %rdi
movl $0x43, %esi
callq 0x7f6f0
movb %al, 0x27(%rsp)
jmp 0x1ce5e1
movq 0x18(%rsp), %rdi
movl $0x47, %esi
callq 0x7f6f0
movb %al, 0x27(%rsp)
jmp 0x1ce5e1
movq 0x18(%rsp), %rdi
movl $0x54, %esi
callq 0x7f6f0
movb %al, 0x27(%rsp)
jmp 0x1ce5e1
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0x7e9d0
movq 0x8(%rsp), %rdi
movsbl %al, %esi
callq 0x7f6f0
movb %al, 0x27(%rsp)
movb 0x27(%rsp), %al
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movw %si, %ax
movq %rdi, 0x18(%rsp)
movw %ax, 0x16(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x1ce991
movq 0x46d640(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3476a9(%rip), %rsi    # 0x516013
leaq 0x395481(%rip), %rdx    # 0x563df2
leaq 0x395636(%rip), %rcx    # 0x563fae
leaq 0x395456(%rip), %r8     # 0x563dd5
movl $0xd1, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1ce993
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movq 0x30(%rcx), %rax
movzbl 0xb(%rcx), %ecx
addq %rcx, %rax
movzwl 0x16(%rsp), %ecx
movl (%rax,%rcx,4), %eax
andl $0xf, %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x8, %eax
ja 0x1cea11
movq 0x8(%rsp), %rax
leaq 0x3953d3(%rip), %rcx    # 0x563d9c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x4d, 0x27(%rsp)
jmp 0x1cea1b
movb $0x49, 0x27(%rsp)
jmp 0x1cea1b
movb $0x44, 0x27(%rsp)
jmp 0x1cea1b
movb $0x4e, 0x27(%rsp)
jmp 0x1cea1b
movb $0x53, 0x27(%rsp)
jmp 0x1cea1b
movb $0x48, 0x27(%rsp)
jmp 0x1cea1b
movb $0x50, 0x27(%rsp)
jmp 0x1cea1b
movb $0x3d, 0x27(%rsp)
jmp 0x1cea1b
movb $0x58, 0x27(%rsp)
jmp 0x1cea1b
movl $0x2, %edi
callq 0x19890
movb 0x27(%rsp), %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/sam_alignment.c
// Function: gt_sam_alignment_is_paired
bool gt_sam_alignment_is_paired(GtSamAlignment *sam_alignment)
{
  gt_assert(sam_alignment != NULL);
  if (sam_alignment->s_alignment->core.flag & BAM_FPAIRED)
    return true;
  else
    return false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1cead9
movq 0x46d4f8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x347561(%rip), %rsi    # 0x516013
leaq 0x395339(%rip), %rdx    # 0x563df2
leaq 0x395527(%rip), %rcx    # 0x563fe7
leaq 0x39530e(%rip), %r8     # 0x563dd5
movl $0xf3, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1ceadb
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
andq $0xffff, %rax           # imm = 0xFFFF
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1ceb00
movb $0x1, 0x17(%rsp)
jmp 0x1ceb05
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/sam_alignment.c
// Function: gt_sam_alignment_is_proper_paired
bool gt_sam_alignment_is_proper_paired(GtSamAlignment *sam_alignment)
{
  gt_assert(sam_alignment != NULL);
  if (sam_alignment->s_alignment->core.flag & BAM_FPROPER_PAIR)
    return true;
  else
    return false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1ceb59
movq 0x46d478(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3474e1(%rip), %rsi    # 0x516013
leaq 0x3952b9(%rip), %rdx    # 0x563df2
leaq 0x3954c2(%rip), %rcx    # 0x564002
leaq 0x39528e(%rip), %r8     # 0x563dd5
movl $0xfc, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1ceb5b
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
andq $0xffff, %rax           # imm = 0xFFFF
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1ceb80
movb $0x1, 0x17(%rsp)
jmp 0x1ceb85
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/sam_alignment.c
// Function: gt_sam_alignment_is_unmapped
bool gt_sam_alignment_is_unmapped(GtSamAlignment *sam_alignment)
{
  gt_assert(sam_alignment != NULL);
  if (sam_alignment->s_alignment->core.flag & BAM_FUNMAP)
    return true;
  else
    return false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1cebd9
movq 0x46d3f8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x347461(%rip), %rsi    # 0x516013
leaq 0x395239(%rip), %rdx    # 0x563df2
leaq 0x395464(%rip), %rcx    # 0x564024
leaq 0x39520e(%rip), %r8     # 0x563dd5
movl $0x105, %r9d            # imm = 0x105
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1cebdb
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
andq $0xffff, %rax           # imm = 0xFFFF
andl $0x4, %eax
cmpl $0x0, %eax
je 0x1cec00
movb $0x1, 0x17(%rsp)
jmp 0x1cec05
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/sam_alignment.c
// Function: gt_sam_alignment_mate_is_unmapped
bool gt_sam_alignment_mate_is_unmapped(GtSamAlignment *sam_alignment)
{
  gt_assert(sam_alignment != NULL);
  if (sam_alignment->s_alignment->core.flag & BAM_FMUNMAP)
    return true;
  else
    return false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1cec59
movq 0x46d378(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3473e1(%rip), %rsi    # 0x516013
leaq 0x3951b9(%rip), %rdx    # 0x563df2
leaq 0x395401(%rip), %rcx    # 0x564041
leaq 0x39518e(%rip), %r8     # 0x563dd5
movl $0x10e, %r9d            # imm = 0x10E
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1cec5b
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
andq $0xffff, %rax           # imm = 0xFFFF
andl $0x8, %eax
cmpl $0x0, %eax
je 0x1cec80
movb $0x1, 0x17(%rsp)
jmp 0x1cec85
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/sam_alignment.c
// Function: gt_sam_alignment_is_reverse
bool gt_sam_alignment_is_reverse(GtSamAlignment *sam_alignment)
{
  gt_assert(sam_alignment != NULL);
  if (sam_alignment->s_alignment->core.flag & BAM_FREVERSE)
    return true;
  else
    return false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1cecd9
movq 0x46d2f8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x347361(%rip), %rsi    # 0x516013
leaq 0x395139(%rip), %rdx    # 0x563df2
leaq 0x3953a3(%rip), %rcx    # 0x564063
leaq 0x39510e(%rip), %r8     # 0x563dd5
movl $0x117, %r9d            # imm = 0x117
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1cecdb
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
andq $0xffff, %rax           # imm = 0xFFFF
andl $0x10, %eax
cmpl $0x0, %eax
je 0x1ced00
movb $0x1, 0x17(%rsp)
jmp 0x1ced05
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/sam_alignment.c
// Function: gt_sam_alignment_mate_is_reverse
bool gt_sam_alignment_mate_is_reverse(GtSamAlignment *sam_alignment)
{
  gt_assert(sam_alignment != NULL);
  if (sam_alignment->s_alignment->core.flag & BAM_FMREVERSE)
    return true;
  else
    return false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1ced59
movq 0x46d278(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3472e1(%rip), %rsi    # 0x516013
leaq 0x3950b9(%rip), %rdx    # 0x563df2
leaq 0x39533f(%rip), %rcx    # 0x56407f
leaq 0x39508e(%rip), %r8     # 0x563dd5
movl $0x120, %r9d            # imm = 0x120
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1ced5b
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
andq $0xffff, %rax           # imm = 0xFFFF
andl $0x20, %eax
cmpl $0x0, %eax
je 0x1ced80
movb $0x1, 0x17(%rsp)
jmp 0x1ced85
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/sam_alignment.c
// Function: gt_sam_alignment_is_read1
bool gt_sam_alignment_is_read1(GtSamAlignment *sam_alignment)
{
  gt_assert(sam_alignment != NULL);
  if (sam_alignment->s_alignment->core.flag & BAM_FREAD1)
    return true;
  else
    return false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1cedd9
movq 0x46d1f8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x347261(%rip), %rsi    # 0x516013
leaq 0x395039(%rip), %rdx    # 0x563df2
leaq 0x3952e0(%rip), %rcx    # 0x5640a0
leaq 0x39500e(%rip), %r8     # 0x563dd5
movl $0x129, %r9d            # imm = 0x129
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1ceddb
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
andq $0xffff, %rax           # imm = 0xFFFF
andl $0x40, %eax
cmpl $0x0, %eax
je 0x1cee00
movb $0x1, 0x17(%rsp)
jmp 0x1cee05
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/sam_alignment.c
// Function: gt_sam_alignment_is_read2
bool gt_sam_alignment_is_read2(GtSamAlignment *sam_alignment)
{
  gt_assert(sam_alignment != NULL);
  if (sam_alignment->s_alignment->core.flag & BAM_FREAD2)
    return true;
  else
    return false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1cee59
movq 0x46d178(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3471e1(%rip), %rsi    # 0x516013
leaq 0x394fb9(%rip), %rdx    # 0x563df2
leaq 0x39527a(%rip), %rcx    # 0x5640ba
leaq 0x394f8e(%rip), %r8     # 0x563dd5
movl $0x132, %r9d            # imm = 0x132
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1cee5b
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
andq $0xffff, %rax           # imm = 0xFFFF
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1cee82
movb $0x1, 0x17(%rsp)
jmp 0x1cee87
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/sam_alignment.c
// Function: gt_sam_alignment_is_secondary
bool gt_sam_alignment_is_secondary(GtSamAlignment *sam_alignment)
{
  gt_assert(sam_alignment != NULL);
  if (sam_alignment->s_alignment->core.flag & BAM_FSECONDARY)
    return true;
  else
    return false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1ceee9
movq 0x46d0e8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x347151(%rip), %rsi    # 0x516013
leaq 0x394f29(%rip), %rdx    # 0x563df2
leaq 0x395204(%rip), %rcx    # 0x5640d4
leaq 0x394efe(%rip), %r8     # 0x563dd5
movl $0x13b, %r9d            # imm = 0x13B
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1ceeeb
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
andq $0xffff, %rax           # imm = 0xFFFF
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x1cef12
movb $0x1, 0x17(%rsp)
jmp 0x1cef17
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/sam_alignment.c
// Function: gt_sam_alignment_has_qc_failure
bool gt_sam_alignment_has_qc_failure(GtSamAlignment *sam_alignment)
{
  gt_assert(sam_alignment != NULL);
  if (sam_alignment->s_alignment->core.flag & BAM_FQCFAIL)
    return true;
  else
    return false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1cef79
movq 0x46d058(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3470c1(%rip), %rsi    # 0x516013
leaq 0x394e99(%rip), %rdx    # 0x563df2
leaq 0x395192(%rip), %rcx    # 0x5640f2
leaq 0x394e6e(%rip), %r8     # 0x563dd5
movl $0x144, %r9d            # imm = 0x144
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1cef7b
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
andq $0xffff, %rax           # imm = 0xFFFF
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x1cefa2
movb $0x1, 0x17(%rsp)
jmp 0x1cefa7
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/sam_alignment.c
// Function: gt_sam_alignment_is_optical_pcr_duplicate
bool
gt_sam_alignment_is_optical_pcr_duplicate(GtSamAlignment *sam_alignment)
{
  gt_assert(sam_alignment != NULL);
  if (sam_alignment->s_alignment->core.flag & BAM_FDUP)
    return true;
  else
    return false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1cf009
movq 0x46cfc8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x347031(%rip), %rsi    # 0x516013
leaq 0x394e09(%rip), %rdx    # 0x563df2
leaq 0x395122(%rip), %rcx    # 0x564112
leaq 0x394dde(%rip), %r8     # 0x563dd5
movl $0x14e, %r9d            # imm = 0x14E
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1cf00b
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
andq $0xffff, %rax           # imm = 0xFFFF
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x1cf032
movb $0x1, 0x17(%rsp)
jmp 0x1cf037
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 0x9f220
cmpq $0x0, 0x473e52(%rip)    # 0x642eb0
jne 0x1cf086
movl $0x20, %edi
leaq 0x34(%rip), %rsi        # 0x1cf0a0
leaq 0xfd(%rip), %rdx        # 0x1cf170
leaq 0x186(%rip), %rcx       # 0x1cf200
callq 0x48ebe0
movq %rax, 0x473e2a(%rip)    # 0x642eb0
callq 0x9f280
movq 0x473e1e(%rip), %rax    # 0x642eb0
popq %rcx
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
callq 0x1cf050
movq %rax, %rdi
movq 0x28(%rsp), %rsi
callq 0x48ed30
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x8(%rsp), %rsi
addq $0x10, %rsi
callq 0x1cfa30
movl %eax, 0x14(%rsp)
xorl %eax, %eax
cmpl $0x0, 0x14(%rsp)
movb %al, 0x7(%rsp)
jle 0x1cf10c
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1ceb90
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x1cf116
jmp 0x1cf133
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x8(%rsp), %rsi
addq $0x10, %rsi
callq 0x1cfa30
movl %eax, 0x14(%rsp)
jmp 0x1cf0ed
cmpl $0x0, 0x14(%rsp)
jle 0x1cf15d
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x1ce2e0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl 0x14(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x1cf165
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
callq 0x1cf050
movq %rax, %rdi
callq 0x48ec90
movq %rax, 0x8(%rsp)
callq 0x1cf050
movq %rax, %rdi
movq 0x8(%rsp), %rsi
callq 0x48ed30
movq %rax, (%rsp)
movq 0x18(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x1cf170
cmpl $0x0, %eax
je 0x1cf2a2
movq $0x0, 0x20(%rsp)
jmp 0x1cf2ac
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdx, 0x10(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x1cf702
movq 0x46c8cf(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x346938(%rip), %rsi    # 0x516013
leaq 0x394c63(%rip), %rdx    # 0x564345
leaq 0x394c7b(%rip), %rcx    # 0x564364
leaq 0x394b63(%rip), %r8     # 0x564253
movl $0x81, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1cf704
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x1cf740
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rsp), %rsi
callq 0xb0530
movq %rax, (%rsp)
movq (%rsp), %rax
addq 0x10(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq %r8, 0x8(%rsp)
movl $0x38, %edi
leaq 0x394bbc(%rip), %rsi    # 0x5643e5
movl $0x2e, %edx
callq 0xe80f0
movq %rax, (%rsp)
movq (%rsp), %rax
movq $0x0, 0x30(%rax)
movq 0x28(%rsp), %rdi
callq 0xa2db0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x20(%rsp), %rdi
callq 0xa2db0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x18(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x28(%rax)
movq (%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x10(%rsp), %rdi
callq 0x7dc50
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, (%rax)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x36ba90
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x20(%rax)
movq (%rsp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x1cf8f0
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rdx
leaq 0x394b30(%rip), %rsi    # 0x564405
movb $0x0, %al
callq 0xd88c0
movq (%rsp), %rdi
callq 0x1cf910
movq $0x0, 0x30(%rsp)
jmp 0x1cf8f9
movq (%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rax
movq %rdi, (%rsp)
cmpq $0x0, (%rsp)
je 0x1cf9ac
movq (%rsp), %rax
cmpq $0x0, 0x30(%rax)
je 0x1cf93d
movq (%rsp), %rax
movq 0x30(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x30(%rax)
jmp 0x1cf9aa
movq (%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x36c210
movq (%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0x394a8c(%rip), %rsi    # 0x5643e5
movl $0x5c, %edx
callq 0xe88c0
movq (%rsp), %rax
movq 0x18(%rax), %rdi
leaq 0x394a73(%rip), %rsi    # 0x5643e5
movl $0x5d, %edx
callq 0xe88c0
movq (%rsp), %rax
movq (%rax), %rdi
callq 0x7e3d0
movq (%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x1ce090
movq (%rsp), %rdi
leaq 0x394a45(%rip), %rsi    # 0x5643e5
movl $0x60, %edx
callq 0xe88c0
jmp 0x1cf9ac
popq %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/samfile_iterator.c
// Function: gt_samfile_iterator_new_bam
GtSamfileIterator* gt_samfile_iterator_new_bam(const char *filename,
                                               GtAlphabet *alphabet,
                                               GtError *err)
{
  return gt_samfile_iterator_new(filename,
                                 "rb",
                                 NULL,
                                 alphabet,
                                 err);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdx, (%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rcx
movq (%rsp), %r8
leaq 0x3a850e(%rip), %rsi    # 0x577ee5
xorl %eax, %eax
movl %eax, %edx
callq 0x1cf800
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/samfile_iterator.c
// Function: gt_samfile_iterator_new_sam
GtSamfileIterator* gt_samfile_iterator_new_sam(const char *filename,
                                               GtAlphabet *alphabet,
                                               const char *auxfilename,
                                               GtError *err)
{
  return gt_samfile_iterator_new(filename,
                                 "r",
                                 (void *) auxfilename,
                                 alphabet,
                                 err);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %r8
leaq 0x35c5b7(%rip), %rsi    # 0x52bfda
callq 0x1cf800
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x1cfa63
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0x1cddd0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq $-0x1, 0x30(%rax)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rsi
callq 0x36c290
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
jle 0x1cfaac
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
jmp 0x1cfab8
movq 0x8(%rsp), %rax
movq $0x0, (%rax)
movl 0x4(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq %rsi, (%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1cfb1d
movq 0x46c4b4(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x34651d(%rip), %rsi    # 0x516013
leaq 0x386ccb(%rip), %rdx    # 0x5567c8
leaq 0x394921(%rip), %rcx    # 0x564425
leaq 0x3948da(%rip), %r8     # 0x5643e5
movl $0x79, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1cfb1f
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x36c210
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rsi
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rdx
callq 0x36ba90
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x8(%rsp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x1cfb8a
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdx
leaq 0x3948c6(%rip), %rsi    # 0x56443f
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x1cfb92
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl $0x48, %edi
leaq 0x3947f9(%rip), %rsi    # 0x5644f3
movl $0x3d, %edx
callq 0xe80f0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movl $0x0, 0x40(%rax)
cmpq $0x0, 0x30(%rsp)
jne 0x1cfd55
movq 0x46c27c(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3462e5(%rip), %rsi    # 0x516013
leaq 0x394a9c(%rip), %rdx    # 0x5647d1
leaq 0x3947cf(%rip), %rcx    # 0x56450b
leaq 0x3947b0(%rip), %r8     # 0x5644f3
movl $0x3f, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1cfd57
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x1cfea0
movq 0x28(%rsp), %rax
movq 0x20(%rsp), %rcx
xorl %edx, %edx
divq 0x28(%rcx)
cmpq $0x0, %rdx
je 0x1cfdb4
movq 0x46c21d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x346286(%rip), %rsi    # 0x516013
leaq 0x39478f(%rip), %rdx    # 0x564523
leaq 0x394770(%rip), %rcx    # 0x56450b
leaq 0x394751(%rip), %r8     # 0x5644f3
movl $0x43, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1cfdb6
movq 0x20(%rsp), %rax
movq $0x0, 0x38(%rax)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
shlq $0x3, %rdi
leaq 0x39471c(%rip), %rsi    # 0x5644f3
movl $0x47, %edx
callq 0xe80f0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
jne 0x1cfe45
cmpq $0x1, 0x18(%rsp)
setl %al
andb $0x1, %al
movzbl %al, %eax
cmpq $0x1, 0x10(%rsp)
setb %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x1cfe45
movq 0x10(%rsp), %rcx
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
xorl %eax, %eax
movl %eax, 0x8(%rsp)
jmp 0x1cfe50
movl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x1cfe50
movl 0x8(%rsp), %eax
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
je 0x1cfe8d
movq 0x46c13a(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3481b5(%rip), %rsi    # 0x518025
leaq 0x39467c(%rip), %rdx    # 0x5644f3
movl $0x48, %ecx
movb $0x0, %al
callq 0x199f0
movl $0x1, %edi
callq 0x19890
jmp 0x1cfe8f
movq 0x20(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/sampling.c
// Function: gt_sampling_init_sampling
static void gt_sampling_init_sampling(GtSampling *sampling,
                                   GtUword rate)
{
  sampling->numofsamples = 1UL;
  sampling->arraysize = 10UL;
  sampling->sampling_rate = rate;
  sampling->current_sample_elementnum = 0;
  sampling->current_sample_num = 0;
  sampling->pagesize = gt_pagesize();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq $0x1, 0x20(%rax)
movq 0x10(%rsp), %rax
movq $0xa, 0x8(%rax)
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x18(%rax)
callq 0xa2640
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x28(%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x1cfce0
movq %rax, (%rsp)
movq (%rsp), %rax
movl $0x1, 0x40(%rax)
cmpq $0x0, 0x10(%rsp)
jne 0x1cff7c
movq 0x46c055(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3460be(%rip), %rsi    # 0x516013
leaq 0x394875(%rip), %rdx    # 0x5647d1
leaq 0x3945e7(%rip), %rcx    # 0x56454a
leaq 0x394589(%rip), %r8     # 0x5644f3
movl $0x50, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1cff7e
movq (%rsp), %rax
movq 0x8(%rax), %rdi
shlq $0x3, %rdi
leaq 0x394562(%rip), %rsi    # 0x5644f3
movl $0x53, %edx
callq 0xe80f0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x38(%rax)
movq (%rsp), %rax
movq 0x38(%rax), %rax
movq $0x0, (%rax)
movq (%rsp), %rax
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x1d000e
movq 0x46bfc3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x34602c(%rip), %rsi    # 0x516013
leaq 0x3946f7(%rip), %rdx    # 0x5646e5
leaq 0x39456a(%rip), %rcx    # 0x56455f
leaq 0x3944f7(%rip), %r8     # 0x5644f3
movl $0xae, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1d0010
jmp 0x1d0012
cmpq $0x0, 0x8(%rsp)
jne 0x1d0052
movq 0x46bf7f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x345fe8(%rip), %rsi    # 0x516013
leaq 0x385719(%rip), %rdx    # 0x55574b
leaq 0x394526(%rip), %rcx    # 0x56455f
leaq 0x3944b3(%rip), %r8     # 0x5644f3
movl $0xaf, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1d0054
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
leaq 0x10b(%rip), %rdx       # 0x1d0170
callq 0x1d0090
movq 0x10(%rsp), %rax
cmpl $0x1, 0x40(%rax)
jne 0x1d008b
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
leaq 0xea(%rip), %rdx        # 0x1d0170
callq 0x1d01e0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdx, (%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq (%rsp), %rdx
callq 0x1d0e70
movq 0x10(%rsp), %rax
cmpl $0x0, 0x40(%rax)
je 0x1d0103
movq 0x10(%rsp), %rax
cmpl $0x1, 0x40(%rax)
je 0x1d0103
movq 0x46bece(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x345f37(%rip), %rsi    # 0x516013
leaq 0x394636(%rip), %rdx    # 0x564719
leaq 0x394680(%rip), %rcx    # 0x56476a
leaq 0x394402(%rip), %r8     # 0x5644f3
movl $0xa2, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1d0105
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x1d014b
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
shlq $0x3, %rdi
leaq 0x3943bd(%rip), %rsi    # 0x5644f3
movl $0xa7, %edx
callq 0xe80f0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq (%rsp), %rdx
callq 0x1d0f70
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)