LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/regidx.c
// Function: regidx_destroy
void regidx_destroy(regidx_t *idx)
{
    int i, j;
    if (!idx) return;
    for (i=0; i<idx->nseq; i++)
    {
        reglist_t *list = &idx->seq[i];
        if ( idx->free )
        {
            for (j=0; j<list->nreg; j++)
                idx->free((char *)list->dat + idx->payload_size*j);
        }
        free(list->dat);
        free(list->reg);
        free(list->idx);
    }
    free(idx->seq_names);
    free(idx->seq);
    free(idx->str.s);
    free(idx->payload);
    khash_str2int_destroy_free(idx->seq2regs);
    free(idx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x2e878
jmp 0x2e971
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x2e927
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x2e8f3
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x2e8f1
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x20(%rcx), %rdi
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
imull -0x10(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %rdi
callq *%rax
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2e8b7
jmp 0x2e8f3
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x45a0
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x45a0
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x45a0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2e87f
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2ef00
movq -0x8(%rbp), %rdi
callq 0x45a0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/./htslib/khash_str2int.h
// Function: khash_str2int_destroy_free
static inline void khash_str2int_destroy_free(void *_hash)
{
    khash_t(str2int) *hash = (khash_t(str2int)*)_hash;
    khint_t k;
    if (hash == 0) return;
    for (k = 0; k < kh_end(hash); ++k)
        if (kh_exist(hash, k)) free((char*)kh_key(hash, k));
    kh_destroy(str2int, hash);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x2ef1d
jmp 0x2ef7e
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jae 0x2ef75
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x14(%rbp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x2ef68
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x45a0
jmp 0x2ef6a
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2ef24
movq -0x10(%rbp), %rdi
callq 0x30950
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/regidx.c
// Function: regitr_init
regitr_t *regitr_init(regidx_t *regidx)
{
    regitr_t *regitr = (regitr_t*) calloc(1,sizeof(regitr_t));
    if (!regitr) return NULL;
    regitr->itr  = (itr_t_*) calloc(1,sizeof(itr_t_));
    if (!regitr->itr) {
        free(regitr);
        return NULL;
    }
    itr_t_ *itr = (itr_t_*) regitr->itr;
    itr->ridx = regidx;
    itr->list = NULL;
    return regitr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x1, %edi
movl $0x28, %esi
callq 0x42f0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x2f9b0
movq $0x0, -0x8(%rbp)
jmp 0x2fa14
movl $0x1, %edi
movl $0x30, %esi
callq 0x42f0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x2f9e8
movq -0x18(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x8(%rbp)
jmp 0x2fa14
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/regidx.c
// Function: regitr_copy
void regitr_copy(regitr_t *dst, regitr_t *src)
{
    itr_t_ *dst_itr = (itr_t_*) dst->itr;
    itr_t_ *src_itr = (itr_t_*) src->itr;
    *dst_itr = *src_itr;
    *dst = *src;
    dst->itr = dst_itr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0x30, %edx
callq 0x43b0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x28, %edx
callq 0x43b0
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/region.c
// Function: reg_destroy
static void reg_destroy(reghash_t *h) {

    khint_t k;

    if (!h)
        return;

    for (k = 0; k < kh_end(h); ++k) {
        if (kh_exist(h, k)) {
            free(kh_val(h, k).a);
        }
    }
    kh_destroy(reg, h);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x31245
jmp 0x312ad
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jae 0x312a4
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0xc(%rbp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x31297
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x45a0
jmp 0x31299
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3124c
movq -0x8(%rbp), %rdi
callq 0x31dd0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/region.c
// Function: hts_reglist_free
void hts_reglist_free(hts_reglist_t *reglist, int count) {

    int i;
    if(reglist) {
        for (i = 0; i < count; i++) {
            if (reglist[i].intervals)
                free(reglist[i].intervals);
        }
        free(reglist);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x31329
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x31320
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x31313
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x45a0
jmp 0x31315
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x312dd
movq -0x8(%rbp), %rdi
callq 0x45a0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/region.c
// Function: compare_hts_pair_pos_t
static int compare_hts_pair_pos_t (const void *av, const void *bv)
{
    hts_pair_pos_t *a = (hts_pair_pos_t *) av;
    hts_pair_pos_t *b = (hts_pair_pos_t *) bv;
    if (a->beg < b->beg) return -1;
    if (a->beg > b->beg) return  1;
    if (a->end < b->end) return -1;
    if (a->end > b->end) return  1;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jge 0x31d75
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x31dcb
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jle 0x31d8e
movl $0x1, -0x4(%rbp)
jmp 0x31dcb
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0x31da9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x31dcb
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jle 0x31dc4
movl $0x1, -0x4(%rbp)
jmp 0x31dcb
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_hdr_init
sam_hdr_t *sam_hdr_init(void)
{
    sam_hdr_t *bh = (sam_hdr_t*)calloc(1, sizeof(sam_hdr_t));
    if (bh == NULL) return NULL;

    bh->cigar_tab = bam_cigar_table;
    return bh;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, %edi
movl $0x48, %esi
callq 0x42f0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x31e4c
movq $0x0, -0x8(%rbp)
jmp 0x31e63
movq -0x10(%rbp), %rax
leaq 0xbf939(%rip), %rcx     # 0xf1790
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_hdr_destroy
void sam_hdr_destroy(sam_hdr_t *bh)
{
    int32_t i;

    if (bh == NULL) return;

    if (bh->ref_count > 0) {
        --bh->ref_count;
        return;
    }

    if (bh->target_name) {
        for (i = 0; i < bh->n_targets; ++i)
            free(bh->target_name[i]);
        free(bh->target_name);
        free(bh->target_len);
    }
    free(bh->text);
    if (bh->hrecs)
        sam_hrecs_free(bh->hrecs);
    if (bh->sdict)
        kh_destroy(s2i, (khash_t(s2i) *) bh->sdict);
    free(bh);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x31e88
jmp 0x31f41
movq -0x8(%rbp), %rax
cmpl $0x0, 0x40(%rax)
jbe 0x31ea4
movq -0x8(%rbp), %rax
movl 0x40(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x40(%rax)
jmp 0x31f41
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x31efb
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x31ee1
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x45a0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x31eb6
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x31f20
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0xd7b50
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x31f38
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x173b0
movq -0x8(%rbp), %rdi
callq 0x45a0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_hdr_dup_sdict
int sam_hdr_dup_sdict(const sam_hdr_t *h0, sam_hdr_t *h)
{
    const khash_t(s2i) *src_long_refs = (khash_t(s2i) *) h0->sdict;
    khash_t(s2i) *dest_long_refs = kh_init(s2i);
    int i;
    if (!dest_long_refs) return -1;

    for (i = 0; i < h->n_targets; i++) {
        int ret;
        khiter_t ksrc, kdest;
        if (h->target_len[i] < UINT32_MAX) continue;
        ksrc = kh_get(s2i, src_long_refs, h->target_name[i]);
        if (ksrc == kh_end(src_long_refs)) continue;
        kdest = kh_put(s2i, dest_long_refs, h->target_name[i], &ret);
        if (ret < 0) {
            kh_destroy(s2i, dest_long_refs);
            return -1;
        }
        kh_val(dest_long_refs, kdest) = kh_val(src_long_refs, ksrc);
    }

    h->sdict = dest_long_refs;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x20(%rbp)
callq 0x17390
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x31f88
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x32052
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x3203f
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x2c(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
jae 0x31fb2
jmp 0x32031
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x17480
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x31fdb
jmp 0x32031
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq -0x30(%rbp), %rdx
callq 0x17b30
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x30(%rbp)
jge 0x32013
movq -0x28(%rbp), %rdi
callq 0x173b0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x32052
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x34(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x38(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x31f8f
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: bam_destroy1
void bam_destroy1(bam1_t *b)
{
    if (b == 0) return;
    if ((bam_get_mempolicy(b) & BAM_USER_OWNS_DATA) == 0) {
        free(b->data);
        if ((bam_get_mempolicy(b) & BAM_USER_OWNS_STRUCT) != 0) {
            // In case of reuse
            b->data = NULL;
            b->m_data = 0;
            b->l_data = 0;
        }
    }

    if ((bam_get_mempolicy(b) & BAM_USER_OWNS_STRUCT) == 0)
        free(b);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x33005
jmp 0x33072
movq -0x8(%rbp), %rdi
callq 0x32fa0
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x33058
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rdi
callq 0x32fa0
andl $0x1, %eax
cmpl $0x0, %eax
je 0x33056
movq -0x8(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x44(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x40(%rax)
jmp 0x33058
movq -0x8(%rbp), %rdi
callq 0x32fa0
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x33072
movq -0x8(%rbp), %rdi
callq 0x45a0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: bam_copy1
bam1_t *bam_copy1(bam1_t *bdst, const bam1_t *bsrc)
{
    if (realloc_bam_data(bdst, bsrc->l_data) < 0) return NULL;
    memcpy(bdst->data, bsrc->data, bsrc->l_data); // copy var-len data
    memcpy(&bdst->core, &bsrc->core, sizeof(bsrc->core)); // copy the rest
    bdst->l_data = bsrc->l_data;
    bdst->id = bsrc->id;
    return bdst;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movslq 0x40(%rax), %rsi
callq 0x33110
cmpl $0x0, %eax
jge 0x330b0
movq $0x0, -0x8(%rbp)
jmp 0x33105
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x18(%rbp), %rax
movslq 0x40(%rax), %rdx
callq 0x43b0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x30, %edx
callq 0x43b0
movq -0x18(%rbp), %rax
movl 0x40(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: bam_dup1
bam1_t *bam_dup1(const bam1_t *bsrc)
{
    if (bsrc == NULL) return NULL;
    bam1_t *bdst = bam_init1();
    if (bdst == NULL) return NULL;
    if (bam_copy1(bdst, bsrc) == NULL) {
        bam_destroy1(bdst);
        return NULL;
    }
    return bdst;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x3317d
movq $0x0, -0x8(%rbp)
jmp 0x331c5
callq 0x32db0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x33197
movq $0x0, -0x8(%rbp)
jmp 0x331c5
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x33080
cmpq $0x0, %rax
jne 0x331bd
movq -0x18(%rbp), %rdi
callq 0x32ff0
movq $0x0, -0x8(%rbp)
jmp 0x331c5
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: bam_cigar2rqlens
static void bam_cigar2rqlens(int n_cigar, const uint32_t *cigar,
                             hts_pos_t *rlen, hts_pos_t *qlen)
{
    int k;
    *rlen = *qlen = 0;
    for (k = 0; k < n_cigar; ++k) {
        int type = bam_cigar_type(bam_cigar_op(cigar[k]));
        int len = bam_cigar_oplen(cigar[k]);
        if (type & 1) *qlen += len;
        if (type & 2) *rlen += len;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x33835
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
andl $0xf, %ecx
shll %ecx
movl $0x3c1a7, %eax          # imm = 0x3C1A7
sarl %cl, %eax
andl $0x3, %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %eax
shrl $0x4, %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x3380f
movslq -0x2c(%rbp), %rcx
movq -0x20(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movl -0x28(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x33828
movslq -0x2c(%rbp), %rcx
movq -0x18(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x3382a
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x337c0
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: subtract_check_underflow
static int subtract_check_underflow(size_t length, size_t *limit)
{
    if (length <= *limit) {
        *limit -= length;
        return 0;
    }

    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
ja 0x33873
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rax
movq (%rax), %rcx
subq %rdx, %rcx
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x3387a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: bam_cigar2qlen
hts_pos_t bam_cigar2qlen(int n_cigar, const uint32_t *cigar)
{
    int k;
    hts_pos_t l;
    for (k = l = 0; k < n_cigar; ++k)
        if (bam_cigar_type(bam_cigar_op(cigar[k]))&1)
            l += bam_cigar_oplen(cigar[k]);
    return l;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x339a9
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
andl $0xf, %ecx
shll %ecx
movl $0x3c1a7, %eax          # imm = 0x3C1A7
sarl %cl, %eax
andl $0x3, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x3399c
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
shrl $0x4, %eax
movl %eax, %eax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x3399e
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3395a
movq -0x20(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: bam_cigar2rlen
hts_pos_t bam_cigar2rlen(int n_cigar, const uint32_t *cigar)
{
    int k;
    hts_pos_t l;
    for (k = l = 0; k < n_cigar; ++k)
        if (bam_cigar_type(bam_cigar_op(cigar[k]))&2)
            l += bam_cigar_oplen(cigar[k]);
    return l;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x33a19
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
andl $0xf, %ecx
shll %ecx
movl $0x3c1a7, %eax          # imm = 0x3C1A7
sarl %cl, %eax
andl $0x3, %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x33a0c
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
shrl $0x4, %eax
movl %eax, %eax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x33a0e
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x339ca
movq -0x20(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/./htslib/bgzf.h
// Function: bgzf_read_small
static inline ssize_t bgzf_read_small(BGZF *fp, void *data, size_t length) {
    // A block length of 0 implies current block isn't loaded (see
    // bgzf_seek_common).  That gives negative available so careful on types
    if ((ssize_t)length < fp->block_length - fp->block_offset) {
        // Short cut the common and easy mode
        memcpy((uint8_t *)data,
               (uint8_t *)fp->uncompressed_block + fp->block_offset,
               length);
        fp->block_offset += length;
        fp->uncompressed_address += length;
        return length;
    } else {
        return bgzf_read(fp, data, length);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
movq -0x10(%rbp), %rdx
subl 0x10(%rdx), %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x3406a
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x10(%rbp), %rax
movslq 0x10(%rax), %rax
addq %rax, %rsi
movq -0x20(%rbp), %rdx
callq 0x43b0
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq 0x10(%rax), %rcx
addq %rdx, %rcx
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3407f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xe620
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: fixup_missing_qname_nul
static int fixup_missing_qname_nul(bam1_t *b) {
    bam1_core_t *c = &b->core;

    // Note this is called before c->l_extranul is added to c->l_qname
    if (c->l_extranul > 0) {
        b->data[c->l_qname++] = '\0';
        c->l_extranul--;
    } else {
        if (b->l_data > INT_MAX - 4) return -1;
        if (realloc_bam_data(b, b->l_data + 4) < 0) return -1;
        b->l_data += 4;
        b->data[c->l_qname++] = '\0';
        c->l_extranul = 3;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzbl 0xf(%rax), %eax
cmpl $0x0, %eax
jle 0x34132
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x18(%rbp), %rdx
movw 0x12(%rdx), %cx
movw %cx, %si
addw $0x1, %si
movw %si, 0x12(%rdx)
movzwl %cx, %ecx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
movb 0xf(%rax), %cl
addb $-0x1, %cl
movb %cl, 0xf(%rax)
jmp 0x341a3
movq -0x10(%rbp), %rax
cmpl $0x7ffffffb, 0x40(%rax) # imm = 0x7FFFFFFB
jle 0x34148
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x341aa
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
addl $0x4, %eax
movslq %eax, %rsi
callq 0x33110
cmpl $0x0, %eax
jge 0x3416c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x341aa
movq -0x10(%rbp), %rax
movl 0x40(%rax), %ecx
addl $0x4, %ecx
movl %ecx, 0x40(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x18(%rbp), %rdx
movw 0x12(%rdx), %cx
movw %cx, %si
addw $0x1, %si
movw %si, 0x12(%rdx)
movzwl %cx, %ecx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
movb $0x3, 0xf(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/./htslib/bgzf.h
// Function: bgzf_write_small
static inline
ssize_t bgzf_write_small(BGZF *fp, const void *data, size_t length) {
    if (fp->is_compressed
        && (size_t) (BGZF_BLOCK_SIZE - fp->block_offset) > length) {
        // Short cut the common and easy mode
        memcpy((uint8_t *)fp->uncompressed_block + fp->block_offset,
               data, length);
        fp->block_offset += length;
        return length;
    } else {
        return bgzf_write(fp, data, length);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x34b65
movq -0x10(%rbp), %rcx
movl $0xff00, %eax           # imm = 0xFF00
subl 0x10(%rcx), %eax
cltq
cmpq -0x20(%rbp), %rax
jbe 0x34b65
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x10(%rbp), %rax
movslq 0x10(%rax), %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x43b0
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq 0x10(%rax), %rcx
addq %rdx, %rcx
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x34b7a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xffb0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_index_build3
int sam_index_build3(const char *fn, const char *fnidx, int min_shift, int nthreads)
{
    hts_idx_t *idx;
    htsFile *fp;
    int ret = 0;

    if ((fp = hts_open(fn, "r")) == 0) return -2;
    if (nthreads)
        hts_set_threads(fp, nthreads);

    switch (fp->format.format) {
    case cram:

        ret = cram_index_build(fp->fp.cram, fn, fnidx);
        break;

    case bam:
    case sam:
        if (fp->format.compression != bgzf) {
            hts_log_error("%s file \"%s\" not BGZF compressed",
                          fp->format.format == bam ? "BAM" : "SAM", fn);
            ret = -1;
            break;
        }
        idx = sam_index(fp, min_shift);
        if (idx) {
            ret = hts_idx_save_as(idx, fn, fnidx, (min_shift > 0)? HTS_FMT_CSI : HTS_FMT_BAI);
            if (ret < 0) ret = -4;
            hts_idx_destroy(idx);
        }
        else ret = -1;
        break;

    default:
        ret = -3;
        break;
    }
    hts_close(fp);

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xbdd49(%rip), %rsi     # 0xf2af1
callq 0x1b150
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x34dc3
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x34ed5
cmpl $0x0, -0x20(%rbp)
je 0x34dd5
movq -0x30(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x1d900
movq -0x30(%rbp), %rax
movl 0x4c(%rax), %eax
movl %eax, -0x38(%rbp)
addl $-0x3, %eax
subl $0x2, %eax
jb 0x34e14
jmp 0x34de9
movl -0x38(%rbp), %eax
subl $0x6, %eax
jne 0x34ebf
jmp 0x34df7
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x6bd10
movl %eax, -0x34(%rbp)
jmp 0x34ec6
movq -0x30(%rbp), %rax
cmpl $0x2, 0x54(%rax)
je 0x34e61
movq -0x30(%rbp), %rax
movl 0x4c(%rax), %edx
leaq 0xbb1de(%rip), %rcx     # 0xf000a
leaq 0xbb1db(%rip), %rax     # 0xf000e
cmpl $0x4, %edx
cmoveq %rax, %rcx
movq -0x10(%rbp), %r8
movl $0x1, %edi
leaq 0xbcfce(%rip), %rsi     # 0xf1e18
leaq 0xbcfd8(%rip), %rdx     # 0xf1e29
movb $0x0, %al
callq 0x1b030
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
jmp 0x34ec6
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x34ee0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x34eb6
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %r8d
movl $0x1, %ecx
xorl %eax, %eax
cmpl $0x0, %r8d
cmovgl %eax, %ecx
callq 0x20460
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0x34eab
movl $0xfffffffc, -0x34(%rbp) # imm = 0xFFFFFFFC
movq -0x28(%rbp), %rdi
callq 0x1d560
jmp 0x34ebd
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
jmp 0x34ec6
movl $0xfffffffd, -0x34(%rbp) # imm = 0xFFFFFFFD
movq -0x30(%rbp), %rdi
callq 0x1d270
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_idx_save
int sam_idx_save(htsFile *fp) {
    if (fp->format.format == bam || fp->format.format == bcf ||
        fp->format.format == vcf || fp->format.format == sam) {
        int ret;
        if ((ret = sam_state_destroy(fp)) < 0) {
            errno = -ret;
            return -1;
        }
        if (!fp->is_bgzf || bgzf_flush(fp->fp.bgzf) < 0)
            return -1;
        hts_idx_amend_last(fp->idx, bgzf_tell(fp->fp.bgzf));

        if (hts_idx_finish(fp->idx, bgzf_tell(fp->fp.bgzf)) < 0)
            return -1;

        return hts_idx_save_but_not_close(fp->idx, fp->fnidx, hts_idx_fmt(fp->idx));

    } else if (fp->format.format == cram) {
        // flushed and closed by cram_close
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x4, 0x4c(%rax)
je 0x35458
movq -0x10(%rbp), %rax
cmpl $0x9, 0x4c(%rax)
je 0x35458
movq -0x10(%rbp), %rax
cmpl $0x8, 0x4c(%rax)
je 0x35458
movq -0x10(%rbp), %rax
cmpl $0x3, 0x4c(%rax)
jne 0x35561
movq -0x10(%rbp), %rdi
callq 0x35580
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jge 0x35487
xorl %eax, %eax
subl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
callq 0x4050
movl -0x18(%rbp), %ecx
movl %ecx, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x35576
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x354aa
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0xf820
cmpl $0x0, %eax
jge 0x354b6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x35576
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x18(%rax), %rsi
shlq $0x10, %rsi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x10(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
cltq
orq %rax, %rsi
callq 0x202c0
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x18(%rax), %rsi
shlq $0x10, %rsi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x10(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
cltq
orq %rax, %rsi
callq 0x1ee60
cmpl $0x0, %eax
jge 0x35528
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x35576
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x20330
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl %eax, %edx
callq 0x206b0
movl %eax, -0x4(%rbp)
jmp 0x35576
movq -0x10(%rbp), %rax
cmpl $0x6, 0x4c(%rax)
jne 0x3556d
jmp 0x3556d
jmp 0x3556f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_passes_filter
int sam_passes_filter(const sam_hdr_t *h, const bam1_t *b, hts_filter_t *filt)
{
    hb_pair hb = {h, b};
    hts_expr_val_t res = HTS_EXPR_VAL_INIT;
    if (hts_filter_eval2(filt, &hb, bam_sym_lookup, &res)) {
        hts_log_error("Couldn't process filter expression");
        hts_expr_val_free(&res);
        return -1;
    }

    int t = res.is_true;
    hts_expr_val_free(&res);

    return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x58(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x4250
movq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq 0x5d(%rip), %rdx        # 0x35a20
leaq -0x58(%rbp), %rcx
callq 0x29bb0
cmpl $0x0, %eax
je 0x359fd
movl $0x1, %edi
leaq 0xbc46d(%rip), %rsi     # 0xf1e4a
leaq 0xbc478(%rip), %rdx     # 0xf1e5c
movb $0x0, %al
callq 0x1b030
leaq -0x58(%rbp), %rdi
callq 0x36cf0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x35a13
movsbl -0x57(%rbp), %eax
movl %eax, -0x5c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x36cf0
movl -0x5c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: index_load
static hts_idx_t *index_load(htsFile *fp, const char *fn, const char *fnidx, int flags)
{
    switch (fp->format.format) {
    case bam:
    case sam:
        return hts_idx_load3(fn, fnidx, HTS_FMT_BAI, flags);

    case cram: {
        if (cram_index_load(fp->fp.cram, fn, fnidx) < 0) return NULL;

        // Cons up a fake "index" just pointing at the associated cram_fd:
        hts_cram_idx_t *idx = malloc(sizeof (hts_cram_idx_t));
        if (idx == NULL) return NULL;
        idx->fmt = HTS_FMT_CRAI;
        idx->cram = fp->fp.cram;
        return (hts_idx_t *) idx;
        }

    default:
        return NULL; // TODO Would use tbx_index_load if it returned hts_idx_t
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rax
movl 0x4c(%rax), %eax
movl %eax, -0x34(%rbp)
addl $-0x3, %eax
subl $0x2, %eax
jb 0x36d88
jmp 0x36d7b
movl -0x34(%rbp), %eax
subl $0x6, %eax
je 0x36da3
jmp 0x36e0a
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %ecx
movl $0x1, %edx
callq 0x25d80
movq %rax, -0x8(%rbp)
jmp 0x36e12
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x6a180
cmpl $0x0, %eax
jge 0x36dc7
movq $0x0, -0x8(%rbp)
jmp 0x36e12
movl $0x10, %edi
callq 0x4650
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x36de6
movq $0x0, -0x8(%rbp)
jmp 0x36e12
movq -0x30(%rbp), %rax
movl $0x3, (%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x36e12
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_itr_queryi
hts_itr_t *sam_itr_queryi(const hts_idx_t *idx, int tid, hts_pos_t beg, hts_pos_t end)
{
    const hts_cram_idx_t *cidx = (const hts_cram_idx_t *) idx;
    if (idx == NULL)
        return hts_itr_query(NULL, tid, beg, end, sam_readrec_rest);
    else if (cidx->fmt == HTS_FMT_CRAI)
        return cram_itr_query(idx, tid, beg, end, sam_readrec);
    else
        return hts_itr_query(idx, tid, beg, end, sam_readrec);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x36ec7
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edi
leaq 0x64(%rip), %r8         # 0x36f20
callq 0x20e00
movq %rax, -0x8(%rbp)
jmp 0x36f10
movq -0x30(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x36ef1
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0x25a(%rip), %r8        # 0x37140
callq 0x36f80
movq %rax, -0x8(%rbp)
jmp 0x36f10
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0x239(%rip), %r8        # 0x37140
callq 0x20e00
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_readrec_rest
static int sam_readrec_rest(BGZF *ignored, void *fpv, void *bv, int *tid, hts_pos_t *beg, hts_pos_t *end)
{
    htsFile *fp = (htsFile *)fpv;
    bam1_t *b = bv;
    fp->line.l = 0;
    int ret = sam_read1(fp, fp->bam_header, b);
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x38(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x78(%rax), %rsi
movq -0x40(%rbp), %rdx
callq 0x3ca10
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_readrec
static int sam_readrec(BGZF *ignored, void *fpv, void *bv, int *tid, hts_pos_t *beg, hts_pos_t *end)
{
    htsFile *fp = (htsFile *)fpv;
    bam1_t *b = bv;
    fp->line.l = 0;
    int ret = sam_read1(fp, fp->bam_header, b);
    if (ret >= 0) {
        *tid = b->core.tid;
        *beg = b->core.pos;
        *end = bam_endpos(b);
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x38(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x78(%rax), %rsi
movq -0x40(%rbp), %rdx
callq 0x3ca10
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jl 0x371c8
movq -0x40(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x40(%rbp), %rax
movq (%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rdi
callq 0x33a20
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl -0x44(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_itr_querys
hts_itr_t *sam_itr_querys(const hts_idx_t *idx, sam_hdr_t *hdr, const char *region)
{
    const hts_cram_idx_t *cidx = (const hts_cram_idx_t *) idx;
    return hts_itr_querys(idx, region, (hts_name2id_f)(bam_name2id), hdr,
                          cidx->fmt == HTS_FMT_CRAI ? cram_itr_query : hts_itr_query,
                          sam_readrec);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movl (%rax), %edx
leaq -0x16415(%rip), %r8     # 0x20e00
leaq -0x29c(%rip), %rax      # 0x36f80
cmpl $0x3, %edx
cmoveq %rax, %r8
leaq -0x44aa(%rip), %rdx     # 0x32d80
leaq -0xf1(%rip), %r9        # 0x37140
callq 0x23f20
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_itr_regarray
hts_itr_t *sam_itr_regarray(const hts_idx_t *idx, sam_hdr_t *hdr, char **regarray, unsigned int regcount)
{
    const hts_cram_idx_t *cidx = (const hts_cram_idx_t *) idx;
    hts_reglist_t *r_list = NULL;
    int r_count = 0;

    if (!cidx || !hdr)
        return NULL;

    hts_itr_t *itr = NULL;
    if (cidx->fmt == HTS_FMT_CRAI) {
        r_list = hts_reglist_create(regarray, regcount, &r_count, cidx->cram, cram_name2id);
        if (!r_list)
            return NULL;
        itr = hts_itr_regions(idx, r_list, r_count, cram_name2id, cidx->cram,
                   hts_itr_multi_cram, cram_readrec, cram_pseek, cram_ptell);
    } else {
        r_list = hts_reglist_create(regarray, regcount, &r_count, hdr, (hts_name2id_f)(bam_name2id));
        if (!r_list)
            return NULL;
        itr = hts_itr_regions(idx, r_list, r_count, (hts_name2id_f)(bam_name2id), hdr,
                   hts_itr_multi_bam, sam_readrec, bam_pseek, bam_ptell);
    }

    if (!itr)
        hts_reglist_free(r_list, r_count);

    return itr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x3727c
cmpq $0x0, -0x18(%rbp)
jne 0x37289
movq $0x0, -0x8(%rbp)
jmp 0x373b8
movq $0x0, -0x48(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x37324
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
leaq -0x3c(%rbp), %rdx
leaq 0x118(%rip), %r8        # 0x373d0
callq 0x30a00
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x372d5
movq $0x0, -0x8(%rbp)
jmp 0x373b8
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x3c(%rbp), %edx
movq -0x30(%rbp), %rax
movq 0x8(%rax), %r8
leaq 0xe1(%rip), %rcx        # 0x373d0
leaq -0x14726(%rip), %r9     # 0x22bd0
leaq 0x103(%rip), %r11       # 0x37400
leaq 0x21c(%rip), %r10       # 0x37520
leaq 0x305(%rip), %rax       # 0x37610
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x24010
movq %rax, -0x48(%rbp)
jmp 0x3739d
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x18(%rbp), %rcx
leaq -0x3c(%rbp), %rdx
leaq -0x45ba(%rip), %r8      # 0x32d80
callq 0x30a00
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x37354
movq $0x0, -0x8(%rbp)
jmp 0x373b8
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x3c(%rbp), %edx
movq -0x18(%rbp), %r8
leaq -0x45ea(%rip), %rcx     # 0x32d80
leaq -0x15171(%rip), %r9     # 0x22200
leaq -0x238(%rip), %r11      # 0x37140
leaq 0x361(%rip), %r10       # 0x376e0
leaq 0x39a(%rip), %rax       # 0x37720
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x24010
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x373b0
movq -0x38(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0x312c0
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: cram_readrec
static int cram_readrec(BGZF *ignored, void *fpv, void *bv, int *tid, hts_pos_t *beg, hts_pos_t *end)
{
    htsFile *fp = fpv;
    bam1_t *b = bv;
    int pass_filter, ret;

    do {
        ret = cram_get_bam_seq(fp->fp.cram, &b);
        if (ret < 0)
            return cram_eof(fp->fp.cram) ? -1 : -2;

        if (bam_tag2cigar(b, 1, 1) < 0)
            return -2;

        *tid = b->core.tid;
        *beg = b->core.pos;
        *end = bam_endpos(b);

        if (fp->filter) {
            pass_filter = sam_passes_filter(fp->bam_header, b, fp->filter);
            if (pass_filter < 0)
                return -2;
        } else {
            pass_filter = 1;
        }
    } while (pass_filter == 0);

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rdi
leaq -0x48(%rbp), %rsi
callq 0x59560
movl %eax, -0x50(%rbp)
cmpl $0x0, -0x50(%rbp)
jge 0x37471
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x79f40
movl %eax, %edx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x37517
movq -0x48(%rbp), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0x34230
cmpl $0x0, %eax
jge 0x37492
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x37517
movq -0x48(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x48(%rbp), %rax
movq (%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rdi
callq 0x33a20
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0x374fe
movq -0x40(%rbp), %rax
movq 0x78(%rax), %rdi
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rax
movq 0x80(%rax), %rdx
callq 0x35980
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
jge 0x374fc
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x37517
jmp 0x37505
movl $0x1, -0x4c(%rbp)
jmp 0x37507
cmpl $0x0, -0x4c(%rbp)
je 0x37430
movl -0x50(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: cram_pseek
static int cram_pseek(void *fp, int64_t offset, int whence)
{
    cram_fd *fd =  (cram_fd *)fp;

    if ((0 != cram_seek(fd, offset, SEEK_SET))
     && (0 != cram_seek(fd, offset - fd->first_container, SEEK_CUR)))
        return -1;

    fd->curr_position = offset;

    if (fd->ctr) {
        cram_free_container(fd->ctr);
        if (fd->ctr_mt && fd->ctr_mt != fd->ctr)
            cram_free_container(fd->ctr_mt);

        fd->ctr = NULL;
        fd->ctr_mt = NULL;
        fd->ooc = 0;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x79840
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x37580
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rax
subq 0x8880(%rax), %rsi
movl $0x1, %edx
callq 0x79840
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x37580
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x375fe
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8888(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x375f7
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x74a70
movq -0x28(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x375d1
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x38(%rcx), %rax
je 0x375d1
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x74a70
movq -0x28(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x8978(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: cram_ptell
static int64_t cram_ptell(void *fp)
{
    cram_fd *fd = (cram_fd *)fp;
    cram_container *c;
    cram_slice *s;
    int64_t ret = -1L;

    if (fd) {
        if ((c = fd->ctr) != NULL) {
            if ((s = c->slice) != NULL && s->max_rec) {
                if ((c->curr_slice + s->curr_rec/s->max_rec) >= (c->max_slice + 1))
                    fd->curr_position += c->offset + c->length;
            }
        }
        ret = fd->curr_position;
    }

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq $-0x1, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x376d2
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x376c3
movq -0x18(%rbp), %rax
movq 0x90(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x376c1
movq -0x20(%rbp), %rax
cmpl $0x0, 0xe0(%rax)
je 0x376c1
movq -0x18(%rbp), %rax
movl 0x5c(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movl 0xe4(%rax), %eax
movq -0x20(%rbp), %rcx
cltd
idivl 0xe0(%rcx)
movl %eax, %ecx
movl -0x2c(%rbp), %eax
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movl 0x58(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jl 0x376bf
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x18(%rbp), %rax
movslq (%rax), %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
addq 0x8888(%rax), %rcx
movq %rcx, 0x8888(%rax)
jmp 0x376c1
jmp 0x376c3
movq -0x10(%rbp), %rax
movq 0x8888(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: bam_ptell
static int64_t bam_ptell(void *fp)
{
    BGZF *fd = (BGZF *)fp;
    if (!fd)
        return -1L;

    return bgzf_tell(fd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x37741
movq $-0x1, -0x8(%rbp)
jmp 0x37764
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
shlq $0x10, %rax
movq -0x18(%rbp), %rcx
movl 0x10(%rcx), %ecx
andl $0xffff, %ecx           # imm = 0xFFFF
movslq %ecx, %rcx
orq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)