LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_itr_regions
hts_itr_t *sam_itr_regions(const hts_idx_t *idx, sam_hdr_t *hdr, hts_reglist_t *reglist, unsigned int regcount)
{
    const hts_cram_idx_t *cidx = (const hts_cram_idx_t *) idx;

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

    if (cidx->fmt == HTS_FMT_CRAI)
        return hts_itr_regions(idx, reglist, regcount, cram_name2id, cidx->cram,
                   hts_itr_multi_cram, cram_readrec, cram_pseek, cram_ptell);
    else
        return hts_itr_regions(idx, reglist, regcount, (hts_name2id_f)(bam_name2id), hdr,
                   hts_itr_multi_bam, sam_readrec, bam_pseek, bam_ptell);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %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)
cmpq $0x0, -0x30(%rbp)
je 0x377a4
cmpq $0x0, -0x18(%rbp)
je 0x377a4
cmpq $0x0, -0x20(%rbp)
jne 0x377b1
movq $0x0, -0x8(%rbp)
jmp 0x37852
movq -0x30(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x37809
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
movq -0x30(%rbp), %rax
movq 0x8(%rax), %r8
leaq -0x404(%rip), %rcx      # 0x373d0
leaq -0x14c0b(%rip), %r9     # 0x22bd0
leaq -0x3e2(%rip), %r11      # 0x37400
leaq -0x2c9(%rip), %r10      # 0x37520
leaq -0x1e0(%rip), %rax      # 0x37610
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x24010
movq %rax, -0x8(%rbp)
jmp 0x37852
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
movq -0x18(%rbp), %r8
leaq -0x4a9f(%rip), %rcx     # 0x32d80
leaq -0x15626(%rip), %r9     # 0x22200
leaq -0x6ed(%rip), %r11      # 0x37140
leaq -0x154(%rip), %r10      # 0x376e0
leaq -0x11b(%rip), %rax      # 0x37720
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x24010
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_hdr_parse
sam_hdr_t *sam_hdr_parse(size_t l_text, const char *text)
{
    sam_hdr_t *bh = sam_hdr_init();
    if (!bh) return NULL;

    if (sam_hdr_add_lines(bh, text, l_text) != 0) {
        sam_hdr_destroy(bh);
        return NULL;
    }

    return bh;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
callq 0x31e20
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x3788a
movq $0x0, -0x8(%rbp)
jmp 0x378bb
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0xd8d30
cmpl $0x0, %eax
je 0x378b3
movq -0x20(%rbp), %rdi
callq 0x31e70
movq $0x0, -0x8(%rbp)
jmp 0x378bb
movq -0x20(%rbp), %rax
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_hdr_read
sam_hdr_t *sam_hdr_read(htsFile *fp)
{
    if (!fp) {
        errno = EINVAL;
        return NULL;
    }

    switch (fp->format.format) {
    case bam:
        return sam_hdr_sanitise(bam_hdr_read(fp->fp.bgzf));

    case cram:
        return sam_hdr_sanitise(sam_hdr_dup(fp->fp.cram->header));

    case sam:
        return sam_hdr_create(fp);

    case fastq_format:
    case fasta_format:
        return sam_hdr_init();

    case empty_format:
        errno = EPIPE;
        return NULL;

    default:
        errno = EFTYPE;
        return NULL;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x378fb
callq 0x4050
movl $0x16, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x379a0
movq -0x10(%rbp), %rax
movl 0x4c(%rax), %eax
addl $-0x3, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0xe, %eax
ja 0x3798d
movq -0x18(%rbp), %rax
leaq 0xb9ac9(%rip), %rcx     # 0xf13e4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x32360
movq %rax, %rdi
callq 0x379b0
movq %rax, -0x8(%rbp)
jmp 0x379a0
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x32060
movq %rax, %rdi
callq 0x379b0
movq %rax, -0x8(%rbp)
jmp 0x379a0
movq -0x10(%rbp), %rdi
callq 0x37c40
movq %rax, -0x8(%rbp)
jmp 0x379a0
callq 0x31e20
movq %rax, -0x8(%rbp)
jmp 0x379a0
callq 0x4050
movl $0x20, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x379a0
callq 0x4050
movl $0x8, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_hdr_change_HD
int sam_hdr_change_HD(sam_hdr_t *h, const char *key, const char *val)
{
    if (!h || !key)
        return -1;

    if (!h->hrecs)
        return old_sam_hdr_change_HD(h, key, val);

    if (val) {
        if (sam_hdr_update_line(h, "HD", NULL, NULL, key, val, NULL) != 0)
            return -1;
    } else {
        if (sam_hdr_remove_tag_id(h, "HD", NULL, NULL, key) != 0)
            return -1;
    }
    return sam_hdr_rebuild(h);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x39122
cmpq $0x0, -0x18(%rbp)
jne 0x3912e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x391c6
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x3914f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x391d0
movl %eax, -0x4(%rbp)
jmp 0x391c6
cmpq $0x0, -0x20(%rbp)
je 0x3918f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %r8
movq -0x20(%rbp), %r9
leaq 0xb9867(%rip), %rsi     # 0xf29d0
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
movq $0x0, (%rsp)
movb $0x0, %al
callq 0xda4f0
cmpl $0x0, %eax
je 0x3918d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x391c6
jmp 0x391ba
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %r8
leaq 0xb9832(%rip), %rsi     # 0xf29d0
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xdd5f0
cmpl $0x0, %eax
je 0x391b8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x391c6
jmp 0x391ba
movq -0x10(%rbp), %rdi
callq 0xd85e0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/./sam_internal.h
// Function: possibly_expand_bam_data
static inline int possibly_expand_bam_data(bam1_t *b, size_t bytes) {
    size_t new_len = (size_t) b->l_data + bytes;

    if (new_len > INT32_MAX || new_len < bytes) { // Too big or overflow
        errno = ENOMEM;
        return -1;
    }
    if (new_len <= b->m_data) return 0;
    return sam_realloc_bam_data(b, new_len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movslq 0x40(%rax), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x7fffffff, -0x20(%rbp) # imm = 0x7FFFFFFF
ja 0x3a384
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x3a398
callq 0x4050
movl $0xc, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3a3c1
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x44(%rcx), %ecx
cmpq %rcx, %rax
ja 0x3a3b1
movl $0x0, -0x4(%rbp)
jmp 0x3a3c1
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x32dd0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: parse_sam_flag
static inline unsigned int parse_sam_flag(char *v, char **rv, int *overflow) {
    if (*v >= '1' && *v <= '9') {
        return hts_str2uint(v, rv, 16, overflow);
    }
    else if (*v == '0') {
        // handle single-digit "0" directly; otherwise it's hex or octal
        if (v[1] == '\t') { *rv = v+1; return 0; }
        else {
            unsigned long val = strtoul(v, rv, 0);
            if (val > 65535) { *overflow = 1; return 65535; }
            return val;
        }
    }
    else {
        // TODO implement symbolic flag letters
        *rv = v;
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x31, %eax
jl 0x3a417
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jg 0x3a417
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rcx
movl $0x10, %edx
callq 0x3a4a0
movl %eax, -0x4(%rbp)
jmp 0x3a493
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jne 0x3a481
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x9, %eax
jne 0x3a448
movq -0x10(%rbp), %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x3a493
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x4110
movq %rax, -0x28(%rbp)
cmpq $0xffff, -0x28(%rbp)    # imm = 0xFFFF
jbe 0x3a478
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movl $0xffff, -0x4(%rbp)     # imm = 0xFFFF
jmp 0x3a493
movq -0x28(%rbp), %rax
movl %eax, -0x4(%rbp)
jmp 0x3a493
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_parse_cigar
ssize_t sam_parse_cigar(const char *in, char **end, uint32_t **a_cigar, size_t *a_mem) {
    size_t n_cigar = 0;
    int diff;

    if (!in || !a_cigar || !a_mem) {
        hts_log_error("NULL pointer arguments");
        return -1;
    }
    if (end) *end = (char *)in;

    if (*in == '*') {
        if (end) (*end)++;
        return 0;
    }
    n_cigar = read_ncigar(in);
    if (!n_cigar) return 0;
    if (n_cigar > *a_mem) {
        uint32_t *a_tmp = realloc(*a_cigar, n_cigar*sizeof(**a_cigar));
        if (a_tmp) {
            *a_cigar = a_tmp;
            *a_mem = n_cigar;
        } else {
            hts_log_error("Memory allocation error");
            return -1;
        }
    }

    if (!(diff = parse_cigar(in, *a_cigar, n_cigar))) return -1;
    if (end) *end = (char *)in+diff;

    return n_cigar;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3b835
cmpq $0x0, -0x20(%rbp)
je 0x3b835
cmpq $0x0, -0x28(%rbp)
jne 0x3b85c
movl $0x1, %edi
leaq 0xb686f(%rip), %rsi     # 0xf20b0
leaq 0xb6878(%rip), %rdx     # 0xf20c0
movb $0x0, %al
callq 0x1b030
movq $-0x1, -0x8(%rbp)
jmp 0x3b972
cmpq $0x0, -0x18(%rbp)
je 0x3b86e
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0x3b89c
cmpq $0x0, -0x18(%rbp)
je 0x3b88f
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x3b972
movq -0x10(%rbp), %rdi
callq 0x3b980
movl %eax, %eax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x3b8bf
movq $0x0, -0x8(%rbp)
jmp 0x3b972
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x3b929
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x30(%rbp), %rsi
shlq $0x2, %rsi
callq 0x4820
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x3b903
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
jmp 0x3b927
movl $0x1, %edi
leaq 0xb67a1(%rip), %rsi     # 0xf20b0
leaq 0xb67c1(%rip), %rdx     # 0xf20d7
movb $0x0, %al
callq 0x1b030
movq $-0x1, -0x8(%rbp)
jmp 0x3b972
jmp 0x3b929
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movq -0x30(%rbp), %rax
movl %eax, %edx
callq 0x3ba50
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jne 0x3b951
movq $-0x1, -0x8(%rbp)
jmp 0x3b972
cmpq $0x0, -0x18(%rbp)
je 0x3b96a
movq -0x10(%rbp), %rcx
movslq -0x34(%rbp), %rax
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -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: read_ncigar
static uint32_t read_ncigar(const char *q) {
    uint32_t n_cigar = 0;
    for (; *q && *q != '\t'; ++q)
        if (!isdigit_c(*q)) ++n_cigar;
    if (!n_cigar) {
        hts_log_error("No CIGAR operations");
        return 0;
    }
    if (n_cigar >= 2147483647) {
        hts_log_error("Too many CIGAR operations");
        return 0;
    }

    return n_cigar;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x15(%rbp)
je 0x3b9b4
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
setne %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
testb $0x1, %al
jne 0x3b9bd
jmp 0x3b9e7
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x469f0
cmpl $0x0, %eax
jne 0x3b9d7
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3b9d9
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x3b993
cmpl $0x0, -0x14(%rbp)
jne 0x3ba10
movl $0x1, %edi
leaq 0xb7178(%rip), %rsi     # 0xf2b71
leaq 0xb717d(%rip), %rdx     # 0xf2b7d
movb $0x0, %al
callq 0x1b030
movl $0x0, -0x4(%rbp)
jmp 0x3ba42
cmpl $0x7fffffff, -0x14(%rbp) # imm = 0x7FFFFFFF
jb 0x3ba3c
movl $0x1, %edi
leaq 0xb714c(%rip), %rsi     # 0xf2b71
leaq 0xb7165(%rip), %rdx     # 0xf2b91
movb $0x0, %al
callq 0x1b030
movl $0x0, -0x4(%rbp)
jmp 0x3ba42
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: parse_cigar
static int parse_cigar(const char *in, uint32_t *a_cigar, uint32_t n_cigar) {
    int i, overflow = 0;
    const char *p = in;
    for (i = 0; i < n_cigar; i++) {
        uint32_t len;
        int op;
        char *q;
        len = hts_str2uint(p, &q, 28, &overflow)<<BAM_CIGAR_SHIFT;
        if (q == p) {
            hts_log_error("CIGAR length invalid at position %d (%s)", (int)(i+1), p);
            return 0;
        }
        if (overflow) {
            hts_log_error("CIGAR length too long at position %d (%.*s)", (int)(i+1), (int)(q-p+1), p);
            return 0;
        }
        p = q;
        op = bam_cigar_table[(unsigned char)*p++];
        if (op < 0) {
            hts_log_error("Unrecognized CIGAR operator");
            return 0;
        }
        a_cigar[i] = len;
        a_cigar[i] |= op;
    }

    return p-in;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x3bba4
movq -0x30(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movl $0x1c, %edx
leaq -0x24(%rbp), %rcx
callq 0x3a4a0
shlq $0x4, %rax
movl %eax, -0x34(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x3badc
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movq -0x30(%rbp), %r8
movl $0x1, %edi
leaq 0xb6631(%rip), %rsi     # 0xf20f3
leaq 0xb70e2(%rip), %rdx     # 0xf2bab
movb $0x0, %al
callq 0x1b030
movl $0x0, -0x4(%rbp)
jmp 0x3bbb2
cmpl $0x0, -0x24(%rbp)
je 0x3bb24
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rdx
subq %rdx, %rax
addq $0x1, %rax
movl %eax, %r8d
movq -0x30(%rbp), %r9
movl $0x1, %edi
leaq 0xb65e9(%rip), %rsi     # 0xf20f3
leaq 0xb70c3(%rip), %rdx     # 0xf2bd4
movb $0x0, %al
callq 0x1b030
movl $0x0, -0x4(%rbp)
jmp 0x3bbb2
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0xb5c49(%rip), %rax     # 0xf1790
movsbl (%rax,%rcx), %eax
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
jge 0x3bb77
movl $0x1, %edi
leaq 0xb6593(%rip), %rsi     # 0xf20f3
leaq 0xb7099(%rip), %rdx     # 0xf2c00
movb $0x0, %al
callq 0x1b030
movl $0x0, -0x4(%rbp)
jmp 0x3bbb2
movl -0x34(%rbp), %edx
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x38(%rbp), %edx
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
orl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x3ba79
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movl %eax, -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: sam_free_sp_bams
static void sam_free_sp_bams(sp_bams *b) {
    if (!b)
        return;

    if (b->bams) {
        int i;
        for (i = 0; i < b->abams; i++) {
            if (b->bams[i].data)
                free(b->bams[i].data);
        }
        free(b->bams);
    }
    free(b);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x3be75
jmp 0x3beec
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x3bee3
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jge 0x3bed6
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x38(%rax)
je 0x3bec9
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq 0x38(%rax), %rdi
callq 0x45a0
jmp 0x3becb
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3be87
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rdi
callq 0x45a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_set_thread_pool
int sam_set_thread_pool(htsFile *fp, htsThreadPool *p) {
    if (fp->state)
        return 0;

    if (!(fp->state = sam_state_create(fp)))
        return -1;
    SAM_state *fd = (SAM_state *)fp->state;

    pthread_mutex_init(&fd->lines_m, NULL);
    pthread_mutex_init(&fd->command_m, NULL);
    pthread_cond_init(&fd->command_c, NULL);
    fd->p = p->pool;
    int qsize = p->qsize;
    if (!qsize)
        qsize = 2*hts_tpool_size(fd->p);
    fd->q = hts_tpool_process_init(fd->p, qsize, 0);
    if (!fd->q) {
        sam_state_destroy(fp);
        return -1;
    }

    if (fp->format.compression == bgzf)
        return bgzf_thread_pool(fp->fp.bgzf, p->pool, p->qsize);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x3bf47
movl $0x0, -0x4(%rbp)
jmp 0x3c048
movq -0x10(%rbp), %rdi
callq 0x3c060
movq -0x10(%rbp), %rcx
movq %rax, 0x40(%rcx)
cmpq $0x0, %rax
jne 0x3bf6a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3c048
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4760
movq -0x20(%rbp), %rdi
addq $0x78, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4760
movq -0x20(%rbp), %rdi
addq $0xa0, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x45b0
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x3bfdd
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x4e270
shll %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0x24(%rbp), %esi
xorl %edx, %edx
callq 0x4d480
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x3c017
movq -0x10(%rbp), %rdi
callq 0x35580
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3c048
movq -0x10(%rbp), %rax
cmpl $0x2, 0x54(%rax)
jne 0x3c041
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %edx
callq 0xec20
movl %eax, -0x4(%rbp)
jmp 0x3c048
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_state_create
static SAM_state *sam_state_create(htsFile *fp) {
    // Ideally sam_open wouldn't be a #define to hts_open but instead would
    // be a redirect call with an additional 'S' mode.  This in turn would
    // correctly set the designed format to sam instead of a generic
    // text_format.
    if (fp->format.format != sam && fp->format.format != text_format)
        return NULL;

    SAM_state *fd = calloc(1, sizeof(*fd));
    if (!fd)
        return NULL;

    fp->state = fd;
    fd->fp = fp;

    return fd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x3, 0x4c(%rax)
je 0x3c08a
movq -0x10(%rbp), %rax
cmpl $0x2, 0x4c(%rax)
je 0x3c08a
movq $0x0, -0x8(%rbp)
jmp 0x3c0d1
movl $0x1, %edi
movl $0xe0, %esi
callq 0x42f0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x3c0ae
movq $0x0, -0x8(%rbp)
jmp 0x3c0d1
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0xd8(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_set_threads
int sam_set_threads(htsFile *fp, int nthreads) {
    if (nthreads <= 0)
        return 0;

    htsThreadPool p;
    p.pool = hts_tpool_init(nthreads);
    p.qsize = nthreads*2;

    int ret = sam_set_thread_pool(fp, &p);
    if (ret < 0)
        return ret;

    SAM_state *fd = (SAM_state *)fp->state;
    fd->own_pool = 1;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jg 0x3c0fe
movl $0x0, -0x4(%rbp)
jmp 0x3c14e
movl -0x14(%rbp), %edi
callq 0x4daa0
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %eax
shll %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x3bf20
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jge 0x3c130
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3c14e
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl $0x1, 0x10(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: fastq_state_destroy
void fastq_state_destroy(htsFile *fp) {
    if (fp->state) {
        fastq_state *x = (fastq_state *)fp->state;
        if (x->tags)
            kh_destroy(tag, x->tags);
        ks_free(&x->name);
        ks_free(&x->seq);
        ks_free(&x->qual);
        free(fp->state);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x3c1cb
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0x3c19b
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x3c1e0
movq -0x10(%rbp), %rdi
callq 0x3c230
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
callq 0x3c230
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
callq 0x3c230
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x45a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: fastq_state_init
static fastq_state *fastq_state_init(int name_char) {
    fastq_state *x = (fastq_state *)calloc(1, sizeof(*x));
    if (!x)
        return NULL;
    strcpy(x->BC, "BC");
    x->nprefix = name_char;

    return x;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl $0x1, %edi
movl $0x80, %esi
callq 0x42f0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x3c65f
movq $0x0, -0x8(%rbp)
jmp 0x3c687
movq -0x18(%rbp), %rdi
addq $0x6c, %rdi
leaq 0xb65ae(%rip), %rsi     # 0xf2c1c
callq 0x4450
movl -0xc(%rbp), %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x78(%rax)
movq -0x18(%rbp), %rax
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_read1_bam
static inline int sam_read1_bam(htsFile *fp, sam_hdr_t *h, bam1_t *b) {
    int ret = bam_read1(fp->fp.bgzf, b);
    if (h && ret >= 0) {
        if (b->core.tid  >= h->n_targets || b->core.tid  < -1 ||
            b->core.mtid >= h->n_targets || b->core.mtid < -1) {
            errno = ERANGE;
            return -3;
        }
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x33aa0
movl %eax, -0x24(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3cc1d
cmpl $0x0, -0x24(%rbp)
jl 0x3cc1d
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x3cc07
movq -0x20(%rbp), %rax
cmpl $-0x1, 0x8(%rax)
jl 0x3cc07
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x3cc07
movq -0x20(%rbp), %rax
cmpl $-0x1, 0x1c(%rax)
jge 0x3cc1b
callq 0x4050
movl $0x22, (%rax)
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
jmp 0x3cc23
jmp 0x3cc1d
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: sam_read1_cram
static inline int sam_read1_cram(htsFile *fp, sam_hdr_t *h, bam1_t **b) {
    int 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;

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x59560
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x3cc82
movq -0x10(%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 0x3cca9
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0x34230
cmpl $0x0, %eax
jge 0x3cca3
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x3cca9
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: bam_aux_get
uint8_t *bam_aux_get(const bam1_t *b, const char tag[2])
{
    uint8_t *s;
    for (s = bam_aux_first(b); s; s = bam_aux_next(b, s))
        if (s[-2] == tag[0] && s[-1] == tag[1]) {
            // Check the tag value is valid and complete
            uint8_t *e = skip_aux(s, b->data + b->l_data);
            if (e == NULL) goto bad_aux;
            if ((*s == 'Z' || *s == 'H') && *(e - 1) != '\0') goto bad_aux;

            return s;
        }

    // errno now as set by bam_aux_first()/bam_aux_next()
    return NULL;

 bad_aux:
    hts_log_error("Corrupted aux data for read %s flag %d",
                  bam_get_qname(b), b->core.flag);
    errno = EINVAL;
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x40ba0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x3e821
movq -0x20(%rbp), %rax
movzbl -0x2(%rax), %eax
movq -0x18(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x3e809
movq -0x20(%rbp), %rax
movzbl -0x1(%rax), %eax
movq -0x18(%rbp), %rcx
movsbl 0x1(%rcx), %ecx
cmpl %ecx, %eax
jne 0x3e809
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x10(%rbp), %rax
movslq 0x40(%rax), %rax
addq %rax, %rsi
callq 0x3f5a0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x3e7d8
jmp 0x3e82b
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x5a, %eax
je 0x3e7f0
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x48, %eax
jne 0x3e7ff
movq -0x28(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x0, %eax
je 0x3e7ff
jmp 0x3e82b
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3e869
jmp 0x3e80b
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x40c50
movq %rax, -0x20(%rbp)
jmp 0x3e77d
movq $0x0, -0x8(%rbp)
jmp 0x3e869
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x10(%rbp), %rax
movzwl 0x10(%rax), %r8d
movl $0x1, %edi
leaq 0xb3a7d(%rip), %rsi     # 0xf22c5
leaq 0xb3a4f(%rip), %rdx     # 0xf229e
movb $0x0, %al
callq 0x1b030
callq 0x4050
movl $0x16, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/./htslib/kstring.h
// Function: kputc_
static inline int kputc_(int c, kstring_t *s)
{
	if (ks_resize(s, s->l + 1) < 0)
		return EOF;
	s->s[s->l++] = c;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
addq $0x1, %rsi
callq 0x3f730
cmpl $0x0, %eax
jge 0x3eaa1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3eac9
movl -0x8(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movb %dl, (%rax,%rcx)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: skip_aux
static inline uint8_t *skip_aux(uint8_t *s, uint8_t *end)
{
    int size;
    uint32_t n;
    if (s >= end) return end;
    size = aux_type2size(*s); ++s; // skip type
    switch (size) {
    case 'Z':
    case 'H':
        s = memchr(s, 0, end-s);
        return s ? s+1 : end;
    case 'B':
        if (end - s < 5) return NULL;
        size = aux_type2size(*s); ++s;
        n = le_to_u32(s);
        s += 4;
        if (size == 0 || end - s < size * n) return NULL;
        return s + size * n;
    case 0:
        return NULL;
    default:
        if (end - s < size) return NULL;
        return s + size;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0x3f5c7
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3f71e
movq -0x10(%rbp), %rax
movzbl (%rax), %edi
callq 0x41940
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
incq %rax
movq %rax, -0x10(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
testl %eax, %eax
je 0x3f6e7
jmp 0x3f5f1
movl -0x24(%rbp), %eax
subl $0x42, %eax
je 0x3f657
jmp 0x3f5fb
movl -0x24(%rbp), %eax
subl $0x48, %eax
je 0x3f613
jmp 0x3f605
movl -0x24(%rbp), %eax
subl $0x5a, %eax
jne 0x3f6f1
jmp 0x3f613
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
subq %rax, %rdx
xorl %esi, %esi
callq 0x4530
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3f642
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x3f64a
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3f71e
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
cmpq $0x5, %rax
jge 0x3f675
movq $0x0, -0x8(%rbp)
jmp 0x3f71e
movq -0x10(%rbp), %rax
movzbl (%rax), %edi
callq 0x41940
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x32820
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x10(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x3f6c7
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movl -0x1c(%rbp), %ecx
imull -0x20(%rbp), %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jge 0x3f6d1
movq $0x0, -0x8(%rbp)
jmp 0x3f71e
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
imull -0x20(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x3f71e
movq $0x0, -0x8(%rbp)
jmp 0x3f71e
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movslq -0x1c(%rbp), %rcx
cmpq %rcx, %rax
jge 0x3f70f
movq $0x0, -0x8(%rbp)
jmp 0x3f71e
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: cleanup_sp_lines
static void cleanup_sp_lines(void *arg) {
    sp_lines *gl = (sp_lines *)arg;
    if (!gl) return;

    // Should always be true for lines passed to / from thread workers.
    assert(gl->next == NULL);

    free(gl->data);
    sam_free_sp_bams(gl->bams);
    free(gl);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x409fd
jmp 0x40a4b
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x40a09
jmp 0x40a28
leaq 0xb236e(%rip), %rdi     # 0xf2d7e
leaq 0xb182d(%rip), %rsi     # 0xf2244
movl $0xd5c, %edx            # imm = 0xD5C
leaq 0xb236c(%rip), %rcx     # 0xf2d8f
callq 0x42e0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x45a0
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x3be60
movq -0x10(%rbp), %rdi
callq 0x45a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: bam_aux_append
int bam_aux_append(bam1_t *b, const char tag[2], char type, int len, const uint8_t *data)
{
    uint32_t new_len;

    assert(b->l_data >= 0);
    new_len = b->l_data + 3 + len;
    if (new_len > INT32_MAX || new_len < b->l_data) goto nomem;

    if (realloc_bam_data(b, new_len) < 0) return -1;

    b->data[b->l_data] = tag[0];
    b->data[b->l_data + 1] = tag[1];
    b->data[b->l_data + 2] = type;

#ifdef HTS_LITTLE_ENDIAN
    memcpy(b->data + b->l_data + 3, data, len);
#else
    if (aux_to_le(type, b->data + b->l_data + 3, data, len) != 0) {
        errno = EINVAL;
        return -1;
    }
#endif

    b->l_data = new_len;

    return 0;

 nomem:
    errno = ENOMEM;
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movl %ecx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x40(%rax)
jl 0x40a88
jmp 0x40aa7
leaq 0xb17a6(%rip), %rdi     # 0xf2235
leaq 0xb17ae(%rip), %rsi     # 0xf2244
movl $0x12ed, %edx           # imm = 0x12ED
leaq 0xb17a8(%rip), %rcx     # 0xf224a
callq 0x42e0
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
addl $0x3, %eax
addl -0x20(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x7fffffff, -0x2c(%rbp) # imm = 0x7FFFFFFF
ja 0x40acc
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x40(%rcx), %eax
jae 0x40ad1
jmp 0x40b7a
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %eax
movl %eax, %esi
callq 0x33110
cmpl $0x0, %eax
jge 0x40af0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x40b8c
movq -0x18(%rbp), %rax
movb (%rax), %dl
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x40(%rcx), %rcx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
movb 0x1(%rax), %dl
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x40(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movb -0x19(%rbp), %dl
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x40(%rcx), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rax
movslq 0x40(%rax), %rax
addq %rax, %rdi
addq $0x3, %rdi
movq -0x28(%rbp), %rsi
movslq -0x20(%rbp), %rdx
callq 0x43b0
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x40(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x40b8c
callq 0x4050
movl $0xc, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: bam_aux_first
uint8_t *bam_aux_first(const bam1_t *b)
{
    uint8_t *s = bam_get_aux(b);
    uint8_t *end = b->data + b->l_data;
    if (end - s <= 2) { errno = ENOENT; return NULL; }
    return s+2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x14(%rcx), %ecx
shll $0x2, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movzwl 0x12(%rcx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
addl $0x1, %ecx
sarl %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movslq 0x18(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x40(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jg 0x40c2f
callq 0x4050
movl $0x2, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x40c3b
movq -0x18(%rbp), %rax
addq $0x2, %rax
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: bam_aux_next
uint8_t *bam_aux_next(const bam1_t *b, const uint8_t *s)
{
    uint8_t *end = b->data + b->l_data;
    uint8_t *next = s? skip_aux((uint8_t *) s, end) : end;
    if (next == NULL) goto bad_aux;
    if (end - next <= 2) { errno = ENOENT; return NULL; }
    return next+2;

 bad_aux:
    hts_log_error("Corrupted aux data for read %s flag %d",
                  bam_get_qname(b), b->core.flag);
    errno = EINVAL;
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x40(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x40c91
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x3f5a0
movq %rax, -0x30(%rbp)
jmp 0x40c99
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x40caa
jmp 0x40cde
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jg 0x40cd0
callq 0x4050
movl $0x2, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x40d1c
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
jmp 0x40d1c
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x10(%rbp), %rax
movzwl 0x10(%rax), %r8d
movl $0x1, %edi
leaq 0xb1596(%rip), %rsi     # 0xf2291
leaq 0xb159c(%rip), %rdx     # 0xf229e
movb $0x0, %al
callq 0x1b030
callq 0x4050
movl $0x16, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: bam_aux_remove
uint8_t *bam_aux_remove(bam1_t *b, uint8_t *s)
{
    uint8_t *end = b->data + b->l_data;
    uint8_t *next = skip_aux(s, end);
    if (next == NULL) goto bad_aux;

    b->l_data -= next - (s-2);
    if (next >= end) { errno = ENOENT; return NULL; }

    memmove(s-2, next, end - next);
    return s;

 bad_aux:
    hts_log_error("Corrupted aux data for read %s flag %d",
                  bam_get_qname(b), b->core.flag);
    errno = EINVAL;
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x40(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x3f5a0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x40dd1
jmp 0x40e33
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
addq $-0x2, %rax
subq %rax, %rdx
movq -0x10(%rbp), %rax
movslq 0x40(%rax), %rcx
subq %rdx, %rcx
movl %ecx, 0x40(%rax)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x40e0d
callq 0x4050
movl $0x2, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x40e71
movq -0x18(%rbp), %rdi
addq $-0x2, %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rax
subq %rax, %rdx
callq 0x4810
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x40e71
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x10(%rbp), %rax
movzwl 0x10(%rax), %r8d
movl $0x1, %edi
leaq 0xb1481(%rip), %rsi     # 0xf22d1
leaq 0xb1447(%rip), %rdx     # 0xf229e
movb $0x0, %al
callq 0x1b030
callq 0x4050
movl $0x16, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: bam_aux_update_float
int bam_aux_update_float(bam1_t *b, const char tag[2], float val)
{
    uint8_t *s = bam_aux_get(b, tag);
    int shrink = 0, new = 0;

    if (s) { // Tag present - what was it?
        switch (*s) {
            case 'f': break;
            case 'd': shrink = 1; break;
            default: errno = EINVAL; return -1;  // Not a float
        }
    } else {
        if (errno == ENOENT) {  // Tag doesn't exist - add a new one
            new = 1;
        }  else { // Invalid aux data, give up.
            return -1;
        }
    }

    if (new) { // Ensure there's room
        if (possibly_expand_bam_data(b, 3 + 4) < 0)
            return -1;
        s = b->data + b->l_data;
        *s++ = tag[0];
        *s++ = tag[1];
    } else if (shrink) { // Convert non-standard double tag to float
        memmove(s + 5, s + 9, b->l_data - ((s + 9) - b->data));
        b->l_data -= 4;
    }
    *s++ = 'f';
    float_to_le(val, s);
    if (new) b->l_data += 7;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3e760
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x4150a
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x34(%rbp)
subl $0x64, %eax
je 0x414e8
jmp 0x414dc
movl -0x34(%rbp), %eax
subl $0x66, %eax
jne 0x414f1
jmp 0x414e6
jmp 0x41508
movl $0x1, -0x2c(%rbp)
jmp 0x41508
callq 0x4050
movl $0x16, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4161a
jmp 0x4152b
callq 0x4050
cmpl $0x2, (%rax)
jne 0x4151d
movl $0x1, -0x30(%rbp)
jmp 0x41529
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4161a
jmp 0x4152b
cmpl $0x0, -0x30(%rbp)
je 0x41598
movq -0x10(%rbp), %rdi
movl $0x7, %esi
callq 0x3a350
cmpl $0x0, %eax
jge 0x41550
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4161a
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x40(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movb (%rax), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movb 0x1(%rax), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
jmp 0x415e0
cmpl $0x0, -0x2c(%rbp)
je 0x415de
movq -0x28(%rbp), %rdi
addq $0x5, %rdi
movq -0x28(%rbp), %rsi
addq $0x9, %rsi
movq -0x10(%rbp), %rax
movslq 0x40(%rax), %rdx
movq -0x28(%rbp), %rax
addq $0x9, %rax
movq -0x10(%rbp), %rcx
movq 0x38(%rcx), %rcx
subq %rcx, %rax
subq %rax, %rdx
callq 0x4810
movq -0x10(%rbp), %rax
movl 0x40(%rax), %ecx
subl $0x4, %ecx
movl %ecx, 0x40(%rax)
jmp 0x415e0
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x66, (%rax)
movss -0x1c(%rbp), %xmm0
movq -0x28(%rbp), %rdi
callq 0x41630
cmpl $0x0, -0x30(%rbp)
je 0x41613
movq -0x10(%rbp), %rax
movl 0x40(%rax), %ecx
addl $0x7, %ecx
movl %ecx, 0x40(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: aux_type2size
static inline int aux_type2size(uint8_t type)
{
    switch (type) {
    case 'A': case 'c': case 'C':
        return 1;
    case 's': case 'S':
        return 2;
    case 'i': case 'I': case 'f':
        return 4;
    case 'd':
        return 8;
    case 'Z': case 'H': case 'B':
        return type;
    default:
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x5(%rbp)
movzbl -0x5(%rbp), %eax
addl $-0x41, %eax
movl %eax, %ecx
movq %rcx, -0x10(%rbp)
subl $0x32, %eax
ja 0x4199d
movq -0x10(%rbp), %rax
leaq 0xafc55(%rip), %rcx     # 0xf15bc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, -0x4(%rbp)
jmp 0x419a4
movl $0x2, -0x4(%rbp)
jmp 0x419a4
movl $0x4, -0x4(%rbp)
jmp 0x419a4
movl $0x8, -0x4(%rbp)
jmp 0x419a4
movzbl -0x5(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x419a4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: get_int_aux_val
static inline int64_t get_int_aux_val(uint8_t type, const uint8_t *s,
                                      uint32_t idx)
{
    switch (type) {
        case 'c': return le_to_i8(s + idx);
        case 'C': return s[idx];
        case 's': return le_to_i16(s + 2 * idx);
        case 'S': return le_to_u16(s + 2 * idx);
        case 'i': return le_to_i32(s + 4 * idx);
        case 'I': return le_to_u32(s + 4 * idx);
        default:
            errno = EINVAL;
            return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dil, %al
movb %al, -0x9(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movzbl -0x9(%rbp), %eax
addl $-0x43, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x30, %eax
ja 0x41ad0
movq -0x28(%rbp), %rax
leaq 0xafc62(%rip), %rcx     # 0xf1688
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %eax
addq %rax, %rdi
callq 0x47bf0
movsbq %al, %rax
movq %rax, -0x8(%rbp)
jmp 0x41ae3
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movq %rax, -0x8(%rbp)
jmp 0x41ae3
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %eax
shll %eax
movl %eax, %eax
addq %rax, %rdi
callq 0x47b40
movswq %ax, %rax
movq %rax, -0x8(%rbp)
jmp 0x41ae3
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %eax
shll %eax
movl %eax, %eax
addq %rax, %rdi
callq 0x47b20
movzwl %ax, %eax
movq %rax, -0x8(%rbp)
jmp 0x41ae3
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %eax
shll $0x2, %eax
movl %eax, %eax
addq %rax, %rdi
callq 0x34090
cltq
movq %rax, -0x8(%rbp)
jmp 0x41ae3
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %eax
shll $0x2, %eax
movl %eax, %eax
addq %rax, %rdi
callq 0x32820
movl %eax, %eax
movq %rax, -0x8(%rbp)
jmp 0x41ae3
callq 0x4050
movl $0x16, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: bam_aux2f
double bam_aux2f(const uint8_t *s)
{
    int type;
    type = *s++;
    if (type == 'd') return le_to_double(s);
    else if (type == 'f') return le_to_float(s);
    else return get_int_aux_val(type, s, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $0x64, -0x14(%rbp)
jne 0x41b27
movq -0x10(%rbp), %rdi
callq 0x41b70
movsd %xmm0, -0x8(%rbp)
jmp 0x41b5c
cmpl $0x66, -0x14(%rbp)
jne 0x41b41
movq -0x10(%rbp), %rdi
callq 0x41ba0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x41b5c
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rsi
xorl %edx, %edx
movzbl %al, %edi
callq 0x419f0
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: bam_aux2A
char bam_aux2A(const uint8_t *s)
{
    int type;
    type = *s++;
    if (type == 'A') return *(char*)s;
    errno = EINVAL;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $0x41, -0x14(%rbp)
jne 0x41c02
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x1(%rbp)
jmp 0x41c11
callq 0x4050
movl $0x16, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/sam.c
// Function: bam_aux2Z
char *bam_aux2Z(const uint8_t *s)
{
    int type;
    type = *s++;
    if (type == 'Z' || type == 'H') return (char*)s;
    errno = EINVAL;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $0x5a, -0x14(%rbp)
je 0x41c4d
cmpl $0x48, -0x14(%rbp)
jne 0x41c57
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x41c6a
callq 0x4050
movl $0x16, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)