LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r15
testq %rdi, %rdi
setne %al
testq %rdx, %rdx
setne %cl
andb %al, %cl
testq %r15, %r15
setne %al
testb %al, %cl
je 0x28d76
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0x28d99
movq %r14, (%rbx)
cmpb $0x2a, (%r14)
jne 0x28d9f
incq %r14
movq %r14, (%rbx)
jmp 0x28e08
leaq 0x6ee1b(%rip), %rsi     # 0x97b98
leaq 0x6ee24(%rip), %rdx     # 0x97ba8
movl $0x1, %edi
xorl %eax, %eax
callq 0x13de5
movq $-0x1, %rax
jmp 0x28e0a
cmpb $0x2a, (%r14)
je 0x28e08
movq %r14, %rdi
callq 0x28e27
testl %eax, %eax
je 0x28e08
movl %eax, %r12d
movq (%r13), %rsi
cmpq %r12, (%r15)
jae 0x28dd9
leaq (,%r12,4), %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x4840
testq %rax, %rax
je 0x28e14
movq %rax, %rsi
movq %rax, (%r13)
movq %r12, (%r15)
movq %r14, %rdi
movl %r12d, %edx
callq 0x28e92
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
sbbq %rax, %rax
orq %r12, %rax
testq %rbx, %rbx
je 0x28e0a
testl %ecx, %ecx
je 0x28e0a
movslq %ecx, %rax
addq %rax, %r14
movq %r14, (%rbx)
movq %r12, %rax
jmp 0x28e0a
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x6ed7d(%rip), %rsi     # 0x97b98
leaq 0x6ed9d(%rip), %rdx     # 0x97bbf
jmp 0x28d84
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
xorl %ebx, %ebx
movzbl (%r14), %r15d
testl %r15d, %r15d
je 0x28e59
cmpl $0x9, %r15d
je 0x28e59
callq 0x4510
movq (%rax), %rax
movb 0x1(%rax,%r15,2), %al
andb $0x8, %al
cmpb $0x1, %al
adcl $0x0, %ebx
incq %r14
jmp 0x28e31
testl %ebx, %ebx
je 0x28e6e
cmpl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
jb 0x28e8a
leaq 0x6f7ff(%rip), %rdx     # 0x9866b
jmp 0x28e75
leaq 0x6f7e2(%rip), %rdx     # 0x98657
leaq 0x6f7cf(%rip), %rsi     # 0x9864b
xorl %ebx, %ebx
movl $0x1, %edi
xorl %eax, %eax
callq 0x13de5
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %edx, %edx
je 0x28f79
movl %edx, %eax
xorl %ecx, %ecx
leaq 0x6e561(%rip), %rdx     # 0x97410
movq %rdi, %r9
xorl %r8d, %r8d
cmpb $0x2b, (%r9)
sete %r8b
leaq (%r9,%r8), %r14
leaq (%r9,%r8), %rbx
addq $0x8, %rbx
xorl %r15d, %r15d
xorl %r10d, %r10d
movb (%r14,%r15), %r11b
leal -0x30(%r11), %ebp
cmpb $0x9, %bpl
ja 0x28f43
movzbl %r11b, %r11d
leaq (%r10,%r10,4), %r10
leaq (%r11,%r10,2), %r10
addq $-0x30, %r10
incq %r15
cmpl $0x8, %r15d
jne 0x28ecf
movb (%rbx), %r11b
movzbl %r11b, %r14d
leal -0x3a(%r14), %ebp
cmpl $-0xa, %ebp
jb 0x28f49
addl $-0x30, %r14d
cmpq $0x1999999, %r10        # imm = 0x1999999
jb 0x28f1b
jne 0x28f7d
cmpl $0x6, %r14d
jae 0x28f7d
movl %r14d, %r11d
leaq (%r10,%r10,4), %r10
leaq (%r11,%r10,2), %r10
movzbl 0x9(%r9,%r8), %r11d
leal -0x30(%r11), %r14d
incq %r8
cmpl $0xa, %r14d
jb 0x28f0a
leaq (%r9,%r8), %rbx
addq $0x8, %rbx
jmp 0x28f49
addq %r15, %r14
movq %r14, %rbx
cmpq %r9, %rbx
je 0x28fb8
movzbl %r11b, %r8d
movsbl (%r8,%rdx), %r8d
testl %r8d, %r8d
js 0x28fdb
shll $0x4, %r10d
incq %rbx
orl %r8d, %r10d
movl %r10d, (%rsi,%rcx,4)
incq %rcx
movq %rbx, %r9
cmpq %rax, %rcx
jne 0x28eb2
subl %edi, %ebx
jmp 0x28ff7
movzbl 0x9(%r9,%r8), %eax
addl $-0x30, %eax
incq %r8
cmpl $0xa, %eax
jb 0x28f7d
cmpq $-0x8, %r8
je 0x28fb8
incl %ecx
addl $0x9, %r8d
leaq 0x6ec3a(%rip), %rsi     # 0x97bdb
leaq 0x6f706(%rip), %rdx     # 0x986ae
xorl %ebx, %ebx
movl $0x1, %edi
xorl %eax, %eax
callq 0x13de5
jmp 0x28ff7
incl %ecx
leaq 0x6ec1a(%rip), %rsi     # 0x97bdb
leaq 0x6f6bd(%rip), %rdx     # 0x98685
xorl %ebx, %ebx
movl $0x1, %edi
movq %r9, %r8
xorl %eax, %eax
callq 0x13de5
jmp 0x28ff7
leaq 0x6ebf9(%rip), %rsi     # 0x97bdb
leaq 0x6f6f1(%rip), %rdx     # 0x986da
xorl %ebx, %ebx
movl $0x1, %edi
xorl %eax, %eax
callq 0x13de5
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rdi, %rdi
je 0x29245
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x29238
movl 0x1c(%rbx), %eax
testl %eax, %eax
jle 0x29233
movl $0x38, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rcx
movq (%rcx,%r14), %rdi
testq %rdi, %rdi
je 0x29220
callq 0x45c0
movl 0x1c(%rbx), %eax
incq %r15
movslq %eax, %rcx
addq $0x50, %r14
cmpq %rcx, %r15
jl 0x2920b
movq 0x10(%rbx), %rdi
callq 0x45c0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x45c0
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebp, %ebp
cmpq $0x0, 0x40(%rdi)
jne 0x29317
movq %rdi, %rbx
movl 0x4c(%rdi), %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x2930a
movq %rsi, %r14
movl $0x1, %edi
movl $0xe0, %esi
callq 0x4300
testq %rax, %rax
je 0x2930a
movq %rax, %r15
movq %rbx, 0xd8(%rax)
movq %rax, 0x40(%rbx)
leaq 0x18(%rax), %rdi
xorl %esi, %esi
callq 0x4780
leaq 0x78(%r15), %rdi
xorl %esi, %esi
callq 0x4780
movq %r15, %rdi
addq $0xa0, %rdi
xorl %esi, %esi
callq 0x45d0
movq (%r14), %rdi
movq %rdi, 0x8(%r15)
movl 0x8(%r14), %esi
testl %esi, %esi
jne 0x292d8
callq 0x36af4
movl %eax, %esi
addl %eax, %esi
movq 0x8(%r15), %rdi
xorl %ebp, %ebp
xorl %edx, %edx
callq 0x361a9
movq %rax, 0x40(%r15)
testq %rax, %rax
je 0x29324
cmpl $0x2, 0x54(%rbx)
jne 0x29317
movq 0x38(%rbx), %rdi
movq (%r14), %rsi
movl 0x8(%r14), %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xc26c
movq $0x0, 0x40(%rbx)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x24298
jmp 0x29312
// File: /workspace/github_c_makefile_star2_O3/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:
testl %esi, %esi
jle 0x29371
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, %edi
callq 0x364c9
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
addl %ebp, %ebp
movl %ebp, 0x8(%rsi)
movq %rbx, %rdi
callq 0x29246
testl %eax, %eax
js 0x2936a
movq 0x40(%rbx), %rax
movl $0x1, 0x10(%rax)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq 0x40(%rdi), %r15
testq %r15, %r15
je 0x29400
movq %rdi, %rbx
movq 0x70(%r15), %r14
testq %r14, %r14
je 0x293b1
movq 0x18(%r14), %rdi
callq 0x45c0
movq 0x10(%r14), %rdi
callq 0x45c0
movq 0x20(%r14), %rdi
callq 0x45c0
movq %r14, %rdi
callq 0x45c0
movq 0x10(%r15), %rdi
callq 0x45c0
xorl %r14d, %r14d
movq %r14, 0x10(%r15)
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movq 0x40(%r15), %rdi
callq 0x45c0
movq %r14, 0x40(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r15)
movq 0x58(%r15), %rdi
callq 0x45c0
movq %r14, 0x58(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%r15)
movq 0x40(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x45c0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x2df3a
testq %rax, %rax
je 0x2bef5
movq %rax, %rbx
movzbl -0x2(%rbx), %eax
movsbl (%r15), %ecx
cmpl %ecx, %eax
jne 0x2bee2
movzbl -0x1(%rbx), %eax
movsbl 0x1(%r15), %ecx
cmpl %ecx, %eax
je 0x2bf00
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2df88
movq %rax, %rbx
testq %rax, %rax
jne 0x2bec9
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0x38(%r14), %r15
movslq 0x40(%r14), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x2ce89
testq %rax, %rax
je 0x2bf2b
movzbl (%rbx), %ecx
cmpl $0x5a, %ecx
je 0x2bf25
cmpl $0x48, %ecx
jne 0x2bef7
cmpb $0x0, -0x1(%rax)
je 0x2bef7
movzwl 0x10(%r14), %r8d
leaq 0x6be70(%rip), %rsi     # 0x97da7
leaq 0x6be42(%rip), %rdx     # 0x97d80
xorl %ebx, %ebx
movl $0x1, %edi
movq %r15, %rcx
xorl %eax, %eax
callq 0x13de5
callq 0x4050
movl $0x16, (%rax)
jmp 0x2bef7
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq %rsi, %rbx
cmpq %rsi, %rdi
jae 0x2ceb9
movzbl (%rdi), %ecx
movl $0x1, %edx
xorl %eax, %eax
cmpl $0x59, %ecx
jg 0x2cec1
leal -0x41(%rcx), %esi
cmpl $0x8, %esi
ja 0x2cf1f
leaq 0x6a474(%rip), %r8      # 0x97324
movslq (%r8,%rsi,4), %rsi
addq %r8, %rsi
jmpq *%rsi
movq %rbx, %rax
jmp 0x2cf48
leal -0x63(%rcx), %esi
cmpl $0x6, %esi
ja 0x2cee0
leaq 0x6a478(%rip), %rcx     # 0x97348
movslq (%rcx,%rsi,4), %rsi
addq %rcx, %rsi
jmpq *%rsi
movl $0x4, %edx
jmp 0x2cf30
cmpl $0x5a, %ecx
je 0x2ceec
cmpl $0x73, %ecx
je 0x2cf24
jmp 0x2cf48
leaq 0x1(%rdi), %rax
cmpq $0x42, %rcx
je 0x2cf4a
cmpl $0x5a, %ecx
je 0x2cf00
cmpl $0x48, %ecx
jne 0x2cf37
movq %rbx, %rdx
subq %rax, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x4550
movq %rax, %rcx
incq %rax
testq %rcx, %rcx
cmoveq %rbx, %rax
jmp 0x2cf48
cmpl $0x53, %ecx
jne 0x2cf48
movl $0x2, %edx
jmp 0x2cf30
movl $0x8, %edx
leaq 0x1(%rdi), %rax
movq %rdx, %rcx
subq %rax, %rbx
xorl %eax, %eax
cmpq %rcx, %rbx
leaq 0x1(%rdi,%rcx), %rcx
cmovgeq %rcx, %rax
popq %rbx
retq
movq %rbx, %rcx
subq %rax, %rcx
cmpq $0x5, %rcx
jge 0x2cf5a
xorl %eax, %eax
jmp 0x2cf48
movzbl (%rax), %edx
movl $0x1, %ecx
xorl %eax, %eax
cmpl $0x59, %edx
jg 0x2cf81
leal -0x41(%rdx), %esi
cmpl $0x8, %esi
ja 0x2cfb0
leaq 0x6a3ec(%rip), %r8      # 0x97364
movslq (%r8,%rsi,4), %rsi
addq %r8, %rsi
jmpq *%rsi
leal -0x63(%rdx), %esi
cmpl $0x6, %esi
ja 0x2cfa0
leaq 0x6a3f8(%rip), %rdx     # 0x97388
movslq (%rdx,%rsi,4), %rsi
addq %rdx, %rsi
jmpq *%rsi
movl $0x4, %ecx
jmp 0x2cfc1
cmpl $0x5a, %edx
je 0x2cfac
cmpl $0x73, %edx
je 0x2cfb5
jmp 0x2cf48
movl %edx, %ecx
jmp 0x2cfc1
cmpl $0x53, %edx
jne 0x2cf48
movl $0x2, %ecx
jmp 0x2cfc1
movl $0x8, %ecx
leaq 0x6(%rdi), %rax
subq %rax, %rbx
imull 0x2(%rdi), %ecx
xorl %eax, %eax
cmpq %rcx, %rbx
leaq 0x6(%rdi,%rcx), %rcx
jmp 0x2cf44
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/./htslib/kstring.h
// Function: ks_resize
static inline int ks_resize(kstring_t *s, size_t size)
{
	if (s->m < size) {
	    char *tmp;
	    size = (size > (SIZE_MAX>>2)) ? size : size + (size >> 1);
	    tmp = (char*)realloc(s->s, size);
	    if (!tmp)
	        return -1;
	    s->s = tmp;
	    s->m = size;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %ebx, %ebx
cmpq %rsi, 0x8(%rdi)
jae 0x2d02a
movq %rdi, %r14
movq %rsi, %rax
shrq $0x3e, %rax
movq %rsi, %rcx
shrq %rcx
xorl %ebx, %ebx
testq %rax, %rax
movl $0x0, %r15d
cmoveq %rcx, %r15
addq %rsi, %r15
movq 0x10(%rdi), %rdi
movq %r15, %rsi
callq 0x4840
testq %rax, %rax
je 0x2d025
movq %rax, 0x10(%r14)
movq %r15, 0x8(%r14)
jmp 0x2d02a
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
testq %rdi, %rdi
je 0x2de40
movq %rdi, %rbx
cmpq $0x0, (%rdi)
jne 0x2de42
movq 0x10(%rbx), %rdi
callq 0x45c0
movq 0x28(%rbx), %rdi
callq 0x291e5
movq %rbx, %rdi
popq %rbx
jmp 0x45c0
popq %rbx
retq
leaq 0x6aa03(%rip), %rdi     # 0x9884c
leaq 0x69ed6(%rip), %rsi     # 0x97d26
leaq 0x6aa06(%rip), %rcx     # 0x9885d
movl $0xd5c, %edx            # imm = 0xD5C
callq 0x42f0
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x40(%rdi), %eax
testl %eax, %eax
js 0x2df1b
movl %ecx, %r15d
movl %edx, %ebp
leal 0x3(%r15), %r13d
addl %eax, %r13d
setb %cl
sets %dl
orb %cl, %dl
je 0x2de9f
callq 0x4050
movl $0xc, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2df0c
movq %r8, %r14
movq %rsi, %r12
movq %rdi, %rbx
cmpl %r13d, 0x44(%rdi)
jae 0x2dec0
movl %r13d, %esi
movq %rbx, %rdi
callq 0x22a64
testl %eax, %eax
js 0x2de98
movl 0x40(%rbx), %eax
movb (%r12), %cl
movq 0x38(%rbx), %rdx
cltq
movb %cl, (%rdx,%rax)
movb 0x1(%r12), %al
movq 0x38(%rbx), %rcx
movslq 0x40(%rbx), %rdx
movb %al, 0x1(%rcx,%rdx)
movq 0x38(%rbx), %rax
movslq 0x40(%rbx), %rcx
movb %bpl, 0x2(%rax,%rcx)
movq 0x38(%rbx), %rax
movslq 0x40(%rbx), %rcx
leaq (%rax,%rcx), %rdi
addq $0x3, %rdi
movslq %r15d, %rdx
movq %r14, %rsi
callq 0x43c0
movl %r13d, 0x40(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x69df5(%rip), %rdi     # 0x97d17
leaq 0x69dfd(%rip), %rsi     # 0x97d26
leaq 0x69dfc(%rip), %rcx     # 0x97d2c
movl $0x12ed, %edx           # imm = 0x12ED
callq 0x42f0
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x38(%rdi), %r14
movslq 0x40(%rdi), %r12
addq %r14, %r12
movq %r12, %rbx
testq %rsi, %rsi
je 0x2dfb4
movq %rsi, %rdi
movq %r12, %rsi
callq 0x2ce89
movq %rax, %rbx
testq %rbx, %rbx
je 0x2dfd1
subq %rbx, %r12
cmpq $0x2, %r12
jg 0x2e002
callq 0x4050
movl $0x2, (%rax)
xorl %ebx, %ebx
jmp 0x2e006
movzwl 0x10(%r15), %r8d
leaq 0x69d96(%rip), %rsi     # 0x97d73
leaq 0x69d9c(%rip), %rdx     # 0x97d80
xorl %ebx, %ebx
movl $0x1, %edi
movq %r14, %rcx
xorl %eax, %eax
callq 0x13de5
callq 0x4050
movl $0x16, (%rax)
jmp 0x2e006
addq $0x2, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq 0x38(%rdi), %r12
movslq 0x40(%rdi), %r13
leaq (%r12,%r13), %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x2ce89
testq %rax, %rax
je 0x2e088
leaq -0x2(%rbx), %rdi
movl %edi, %ecx
subl %eax, %ecx
addl %r13d, %ecx
movl %ecx, 0x40(%r15)
cmpq %r14, %rax
jae 0x2e0b9
subq %rax, %r14
movq %rax, %rsi
movq %r14, %rdx
callq 0x4830
jmp 0x2e0c6
movzwl 0x10(%r15), %r8d
leaq 0x69d1f(%rip), %rsi     # 0x97db3
leaq 0x69ce5(%rip), %rdx     # 0x97d80
xorl %ebx, %ebx
movl $0x1, %edi
movq %r12, %rcx
xorl %eax, %eax
callq 0x13de5
callq 0x4050
movl $0x16, (%rax)
jmp 0x2e0c6
callq 0x4050
movl $0x2, (%rax)
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movss %xmm0, 0x4(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2beb1
testq %rax, %rax
je 0x2e5c2
movq %rax, %r15
movzbl (%rax), %eax
cmpl $0x64, %eax
je 0x2e5f8
cmpl $0x66, %eax
je 0x2e617
callq 0x4050
movl $0x16, (%rax)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x2e629
callq 0x4050
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x2, (%rax)
jne 0x2e629
movslq 0x40(%rbx), %rcx
cmpq $-0x7, %rcx
setb %dl
leaq 0x7(%rcx), %rsi
testq $-0x80000000, %rsi      # imm = 0x80000000
sete %dil
testb %dil, %dl
jne 0x2e636
movl $0xc, (%rax)
jmp 0x2e629
leaq 0x5(%r15), %rdi
movq %r15, %rsi
addq $0x9, %rsi
movslq 0x40(%rbx), %rdx
subq %rsi, %rdx
addq 0x38(%rbx), %rdx
callq 0x4830
addl $-0x4, 0x40(%rbx)
movb $0x66, (%r15)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x1(%r15)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl 0x44(%rbx), %eax
cmpq %rax, %rsi
jbe 0x2e64e
movq %rbx, %rdi
callq 0x22a64
testl %eax, %eax
js 0x2e629
movslq 0x40(%rbx), %rcx
movq 0x38(%rbx), %rax
movb (%r14), %dl
movb %dl, (%rax,%rcx)
movb 0x1(%r14), %dl
movb %dl, 0x1(%rax,%rcx)
movb $0x66, 0x2(%rax,%rcx)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x3(%rax,%rcx)
addl $0x7, 0x40(%rbx)
jmp 0x2e627
// File: /workspace/github_c_makefile_star2_O3/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:
movzbl (%rdi), %eax
cmpl $0x62, %eax
jle 0x2e93e
leal -0x63(%rax), %ecx
cmpl $0x6, %ecx
ja 0x2e953
leaq 0x68aba(%rip), %rax     # 0x973e8
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movsbq 0x1(%rdi), %rax
jmp 0x2e98e
cmpl $0x43, %eax
je 0x2e985
cmpl $0x49, %eax
je 0x2e98b
cmpl $0x53, %eax
jne 0x2e95f
movzwl 0x1(%rdi), %eax
jmp 0x2e98e
cmpl $0x73, %eax
jne 0x2e95f
movswq 0x1(%rdi), %rax
jmp 0x2e98e
pushq %rax
callq 0x4050
movl $0x16, (%rax)
xorl %eax, %eax
addq $0x8, %rsp
jmp 0x2e98e
movslq 0x1(%rdi), %rax
jmp 0x2e98e
movsd 0x1(%rdi), %xmm0
retq
cvtss2sd 0x1(%rdi), %xmm0
retq
movzbl 0x1(%rdi), %eax
jmp 0x2e98e
movl 0x1(%rdi), %eax
cvtsi2sd %rax, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movq %rdi, %rax
movzbl (%rdi), %ecx
cmpl $0x5a, %ecx
je 0x2e9c0
cmpl $0x48, %ecx
jne 0x2e9c4
incq %rax
retq
pushq %rax
callq 0x4050
movl $0x16, (%rax)
xorl %eax, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: bam_auxB_len
uint32_t bam_auxB_len(const uint8_t *s)
{
    if (s[0] != 'B') {
        errno = EINVAL;
        return 0;
    }
    return le_to_u32(s + 2);
}

// Assembly:
cmpb $0x42, (%rdi)
jne 0x2e9e0
movl 0x2(%rdi), %eax
retq
pushq %rax
callq 0x4050
movl $0x16, (%rax)
xorl %eax, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: bam_auxB2i
int64_t bam_auxB2i(const uint8_t *s, uint32_t idx)
{
    uint32_t len = bam_auxB_len(s);
    if (idx >= len) {
        errno = ERANGE;
        return 0;
    }
    return get_int_aux_val(s[1], s + 6, idx);
}

// Assembly:
pushq %rax
cmpb $0x42, (%rdi)
jne 0x2ea1f
cmpl %esi, 0x2(%rdi)
jbe 0x2ea2c
movzbl 0x1(%rdi), %eax
cmpl $0x62, %eax
jg 0x2ea3b
cmpl $0x43, %eax
je 0x2ea54
cmpl $0x49, %eax
je 0x2ea74
cmpl $0x53, %eax
jne 0x2ea67
addl %esi, %esi
movzwl 0x6(%rdi,%rsi), %eax
jmp 0x2ea39
callq 0x4050
movl $0x16, (%rax)
jmp 0x2ea31
callq 0x4050
movl $0x22, (%rax)
xorl %eax, %eax
popq %rcx
retq
cmpl $0x73, %eax
je 0x2ea5d
cmpl $0x69, %eax
je 0x2ea7d
cmpl $0x63, %eax
jne 0x2ea67
movl %esi, %eax
movsbq 0x6(%rdi,%rax), %rax
jmp 0x2ea39
movl %esi, %eax
movzbl 0x6(%rdi,%rax), %eax
jmp 0x2ea39
addl %esi, %esi
movswq 0x6(%rdi,%rsi), %rax
jmp 0x2ea39
callq 0x4050
movl $0x16, (%rax)
jmp 0x2ea37
shll $0x2, %esi
movl 0x6(%rdi,%rsi), %eax
jmp 0x2ea39
shll $0x2, %esi
movslq 0x6(%rdi,%rsi), %rax
jmp 0x2ea39
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: bam_auxB2f
double bam_auxB2f(const uint8_t *s, uint32_t idx)
{
    uint32_t len = bam_auxB_len(s);
    if (idx >= len) {
        errno = ERANGE;
        return 0.0;
    }
    if (s[1] == 'f') return le_to_float(s + 6 + 4 * idx);
    else return get_int_aux_val(s[1], s + 6, idx);
}

// Assembly:
pushq %rax
cmpb $0x42, (%rdi)
jne 0x2eab8
cmpl %esi, 0x2(%rdi)
jbe 0x2eac5
movzbl 0x1(%rdi), %eax
cmpl $0x62, %eax
jle 0x2ead5
cmpl $0x68, %eax
jg 0x2eaed
cmpl $0x63, %eax
je 0x2eb19
cmpl $0x66, %eax
jne 0x2eb0a
shll $0x2, %esi
cvtss2sd 0x6(%rdi,%rsi), %xmm0
jmp 0x2eb39
callq 0x4050
movl $0x16, (%rax)
jmp 0x2eaca
callq 0x4050
movl $0x22, (%rax)
xorps %xmm0, %xmm0
jmp 0x2eb39
cmpl $0x43, %eax
je 0x2eb01
cmpl $0x49, %eax
je 0x2eb2d
cmpl $0x53, %eax
jne 0x2eb0a
addl %esi, %esi
movzwl 0x6(%rdi,%rsi), %eax
jmp 0x2eb34
cmpl $0x69, %eax
je 0x2eb23
cmpl $0x73, %eax
jne 0x2eb0a
addl %esi, %esi
movswq 0x6(%rdi,%rsi), %rax
jmp 0x2eb34
movl %esi, %eax
movzbl 0x6(%rdi,%rax), %eax
jmp 0x2eb34
callq 0x4050
movl $0x16, (%rax)
xorl %eax, %eax
jmp 0x2eb34
movl %esi, %eax
movsbq 0x6(%rdi,%rax), %rax
jmp 0x2eb34
shll $0x2, %esi
movslq 0x6(%rdi,%rsi), %rax
jmp 0x2eb34
shll $0x2, %esi
movl 0x6(%rdi,%rsi), %eax
cvtsi2sd %rax, %xmm0
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: bam_plp_init
bam_plp_t bam_plp_init(bam_plp_auto_f func, void *data)
{
    bam_plp_t iter;
    iter = (bam_plp_t)calloc(1, sizeof(struct bam_plp_s));
    iter->mp = mp_init();
    iter->head = iter->tail = mp_alloc(iter->mp);
    iter->max_tid = iter->max_pos = -1;
    iter->maxcnt = 8000;
    if (func) {
        iter->func = func;
        iter->data = data;
        iter->b = bam_init1();
    }
    return iter;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x80, %esi
callq 0x4300
movq %rax, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x4300
movq %rax, (%rbx)
movl $0x1, (%rax)
movl $0x1, %edi
movl $0x88, %esi
callq 0x4300
movq %rax, 0x10(%rbx)
movq %rax, 0x8(%rbx)
movq $-0x1, 0x28(%rbx)
movl $0xffffffff, 0x1c(%rbx) # imm = 0xFFFFFFFF
movl $0x1f40, 0x3c(%rbx)     # imm = 0x1F40
testq %r15, %r15
je 0x2fb24
movq %r15, 0x58(%rbx)
movq %r14, 0x60(%rbx)
movl $0x1, %edi
movl $0x50, %esi
callq 0x4300
movq %rax, 0x50(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: bam_plp_destroy
void bam_plp_destroy(bam_plp_t iter)
{
    lbnode_t *p, *pnext;
    if ( iter->overlaps ) kh_destroy(olap_hash, iter->overlaps);
    for (p = iter->head; p != NULL; p = pnext) {
        if (iter->plp_destruct && p != iter->tail)
            iter->plp_destruct(iter->data, &p->b, &p->cd);
        pnext = p->next;
        mp_free(iter->mp, p);
    }
    mp_destroy(iter->mp);
    if (iter->b) bam_destroy1(iter->b);
    free(iter->plp);
    free(iter);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x68(%rdi), %r14
testq %r14, %r14
je 0x2fbb2
movq 0x18(%r14), %rdi
callq 0x45c0
movq 0x10(%r14), %rdi
callq 0x45c0
movq 0x20(%r14), %rdi
callq 0x45c0
movq %r14, %rdi
callq 0x45c0
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x2fc4c
movl $0x100, %ebp            # imm = 0x100
movq 0x78(%rbx), %rax
testq %rax, %rax
je 0x2fbe3
cmpq 0x10(%rbx), %r14
je 0x2fbe3
movq 0x60(%rbx), %rdi
leaq 0x80(%r14), %rdx
movq %r14, %rsi
callq *%rax
movq 0x78(%r14), %r15
movq (%rbx), %r12
decl (%r12)
movq $0x0, 0x78(%r14)
movl 0x4(%r12), %ecx
cmpl 0x8(%r12), %ecx
jne 0x2fc2c
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
cmovel %ebp, %eax
movl %eax, 0x8(%r12)
movq 0x10(%r12), %rdi
movslq %eax, %rsi
shlq $0x3, %rsi
callq 0x4840
movq %rax, 0x10(%r12)
movl 0x4(%r12), %ecx
jmp 0x2fc31
movq 0x10(%r12), %rax
leal 0x1(%rcx), %edx
movl %edx, 0x4(%r12)
movslq %ecx, %rcx
movq %r14, (%rax,%rcx,8)
movq %r15, %r14
testq %r15, %r15
jne 0x2fbc4
movq (%rbx), %r14
cmpl $0x0, 0x4(%r14)
jle 0x2fc83
xorl %r15d, %r15d
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rax
movq 0x38(%rax), %rdi
callq 0x45c0
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x45c0
incq %r15
movslq 0x4(%r14), %rax
cmpq %rax, %r15
jl 0x2fc59
movq 0x10(%r14), %rdi
callq 0x45c0
movq %r14, %rdi
callq 0x45c0
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x2fca2
callq 0x22b2b
movq 0x48(%rbx), %rdi
callq 0x45c0
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x45c0
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: mp_free
static inline void mp_free(mempool_t *mp, lbnode_t *p)
{
    --mp->cnt; p->next = 0; // clear lbnode_t::next here
    if (mp->n == mp->max) {
        mp->max = mp->max? mp->max<<1 : 256;
        mp->buf = (lbnode_t**)realloc(mp->buf, sizeof(lbnode_t*) * mp->max);
    }
    mp->buf[mp->n++] = p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
decl (%rdi)
movq $0x0, 0x78(%rsi)
movl 0x4(%rdi), %ecx
cmpl 0x8(%rdi), %ecx
jne 0x2fd02
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
movl $0x100, %ecx            # imm = 0x100
cmovnel %eax, %ecx
movl %ecx, 0x8(%r14)
movq 0x10(%r14), %rdi
movslq %ecx, %rsi
shlq $0x3, %rsi
callq 0x4840
movq %rax, 0x10(%r14)
movl 0x4(%r14), %ecx
jmp 0x2fd06
movq 0x10(%r14), %rax
leal 0x1(%rcx), %edx
movl %edx, 0x4(%r14)
movslq %ecx, %rcx
movq %rbx, (%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: overlap_remove
static void overlap_remove(bam_plp_t iter, const bam1_t *b)
{
    if ( !iter->overlaps ) return;

    khiter_t kitr;
    if ( b )
    {
        kitr = kh_get(olap_hash, iter->overlaps, bam_get_qname(b));
        if ( kitr!=kh_end(iter->overlaps) )
            kh_del(olap_hash, iter->overlaps, kitr);
    }
    else
    {
        // remove all
        for (kitr = kh_begin(iter->overlaps); kitr<kh_end(iter->overlaps); kitr++)
            if ( kh_exist(iter->overlaps, kitr) ) kh_del(olap_hash, iter->overlaps, kitr);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rdi, %rdi
je 0x30571
movq %rdi, %r11
testq %rsi, %rsi
je 0x30465
movl (%r11), %eax
testl %eax, %eax
je 0x304b1
movq 0x38(%rsi), %r14
movq %rax, 0x10(%rsp)
leal -0x1(%rax), %edx
movb (%r14), %cl
testb %cl, %cl
je 0x304b9
leaq 0x1(%r14), %rax
movl $0x811c9dc5, %r12d      # imm = 0x811C9DC5
movzbl %cl, %ecx
xorl %r12d, %ecx
imull $0x1000193, %ecx, %r12d # imm = 0x1000193
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x3044d
jmp 0x304bf
movl (%r11), %esi
testl %esi, %esi
je 0x30571
movq 0x10(%r11), %rax
xorl %edx, %edx
xorl %edi, %edi
movl %edi, %r8d
shrl $0x4, %r8d
movl (%rax,%r8,4), %r9d
movl %edx, %ecx
andl $0x1e, %ecx
movl %r9d, %r10d
shrl %cl, %r10d
testb $0x3, %r10b
jne 0x304a3
btsl %ecx, %r9d
movl %r9d, (%rax,%r8,4)
decl 0x4(%r11)
movl (%r11), %esi
incl %edi
addl $0x2, %edx
cmpl %esi, %edi
jb 0x30478
jmp 0x30571
xorl %r15d, %r15d
jmp 0x30540
movl $0x811c9dc5, %r12d      # imm = 0x811C9DC5
andl %edx, %r12d
movq 0x10(%r11), %rsi
movl $0x1, %r13d
movl %r12d, %r15d
movq %r11, 0x20(%rsp)
movl %edx, 0xc(%rsp)
movq %rsi, 0x18(%rsp)
movl %r15d, %eax
shrl $0x4, %eax
movl (%rsi,%rax,4), %ebx
leal (%r15,%r15), %ebp
andl $0x1e, %ebp
movl %ebx, %eax
movl %ebp, %ecx
shrl %cl, %eax
testb $0x2, %al
jne 0x30530
testb $0x1, %al
jne 0x30520
movq 0x18(%r11), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rdi
movq %r14, %rsi
callq 0x46c0
movq 0x18(%rsp), %rsi
movl 0xc(%rsp), %edx
movq 0x20(%rsp), %r11
testl %eax, %eax
je 0x30530
addl %r13d, %r15d
andl %edx, %r15d
incl %r13d
cmpl %r12d, %r15d
jne 0x304dd
jmp 0x30571
movl %ebp, %ecx
shrl %cl, %ebx
testb $0x3, %bl
movq 0x10(%rsp), %rax
cmovnel %eax, %r15d
cmpl %eax, %r15d
je 0x30571
movq 0x10(%r11), %rax
movl %r15d, %edx
shrl $0x4, %edx
movl (%rax,%rdx,4), %esi
addl %r15d, %r15d
andl $0x1e, %r15d
movl %esi, %edi
movl %r15d, %ecx
shrl %cl, %edi
testb $0x3, %dil
jne 0x30571
btsl %r15d, %esi
movl %esi, (%rax,%rdx,4)
decl 0x4(%r11)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: bam_plp_next
const bam_pileup1_t *bam_plp_next(bam_plp_t iter, int *_tid, int *_pos, int *_n_plp)
{
    hts_pos_t pos64 = 0;
    const bam_pileup1_t *p = bam_plp64_next(iter, _tid, &pos64, _n_plp);
    if (pos64 < INT_MAX) {
        *_pos = pos64;
    } else {
        hts_log_error("Position %"PRId64" too large", pos64);
        *_pos = INT_MAX;
        iter->error = 1;
        *_n_plp = -1;
        return NULL;
    }
    return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r15
leaq 0x8(%rsp), %r13
movq $0x0, (%r13)
movq %r13, %rdx
callq 0x2fd26
movq (%r13), %rcx
cmpq $0x7ffffffe, %rcx       # imm = 0x7FFFFFFE
jg 0x305bf
movq %rax, %r12
movl %ecx, (%rbx)
jmp 0x305f1
leaq 0x67947(%rip), %rsi     # 0x97f0d
leaq 0x661d3(%rip), %rdx     # 0x967a0
xorl %r12d, %r12d
movl $0x1, %edi
xorl %eax, %eax
callq 0x13de5
movl $0x7fffffff, (%rbx)     # imm = 0x7FFFFFFF
movl $0x1, 0x38(%r15)
movl $0xffffffff, (%r14)     # imm = 0xFFFFFFFF
movq %r12, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: bam_plp64_auto
const bam_pileup1_t *bam_plp64_auto(bam_plp_t iter, int *_tid, hts_pos_t *_pos, int *_n_plp)
{
    const bam_pileup1_t *plp;
    if (iter->func == 0 || iter->error) { *_n_plp = -1; return 0; }
    if ((plp = bam_plp64_next(iter, _tid, _pos, _n_plp)) != 0) return plp;
    else { // no pileup line can be obtained; read alignments
        *_n_plp = 0;
        if (iter->is_eof) return 0;
        int ret;
        while ( (ret=iter->func(iter->data, iter->b)) >= 0) {
            if (bam_plp_push(iter, iter->b) < 0) {
                *_n_plp = -1;
                return 0;
            }
            if ((plp = bam_plp64_next(iter, _tid, _pos, _n_plp)) != 0) return plp;
            // otherwise no pileup line can be returned; read the next alignment.
        }
        if ( ret < -1 ) { iter->error = ret; *_n_plp = -1; return 0; }
        if (bam_plp_push(iter, 0) < 0) {
            *_n_plp = -1;
            return 0;
        }
        if ((plp = bam_plp64_next(iter, _tid, _pos, _n_plp)) != 0) return plp;
        return 0;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
cmpq $0x0, 0x58(%rdi)
je 0x31434
movq %rdi, %r15
cmpl $0x0, 0x38(%rdi)
je 0x31448
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rdx, %r14
movq %rsi, %r12
movq %r15, %rdi
movq %rbx, %rcx
callq 0x2fd26
testq %rax, %rax
jne 0x3143c
movl $0x0, (%rbx)
cmpl $0x0, 0x30(%r15)
jne 0x3143a
jmp 0x31493
movq 0x50(%r15), %rsi
movq %r15, %rdi
callq 0x30602
testl %eax, %eax
js 0x31434
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x2fd26
testq %rax, %rax
jne 0x3143c
movq 0x50(%r15), %rsi
movq 0x60(%r15), %rdi
callq *0x58(%r15)
testl %eax, %eax
jns 0x3146d
cmpl $-0x1, %eax
je 0x314ae
movl %eax, 0x38(%r15)
jmp 0x31434
cmpl $0x0, 0x38(%r15)
jne 0x31434
movl $0x1, 0x30(%r15)
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2fd26
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: bam_plp_auto
const bam_pileup1_t *bam_plp_auto(bam_plp_t iter, int *_tid, int *_pos, int *_n_plp)
{
    hts_pos_t pos64 = 0;
    const bam_pileup1_t *p = bam_plp64_auto(iter, _tid, &pos64, _n_plp);
    if (pos64 < INT_MAX) {
        *_pos = pos64;
    } else {
        hts_log_error("Position %"PRId64" too large", pos64);
        *_pos = INT_MAX;
        iter->error = 1;
        *_n_plp = -1;
        return NULL;
    }
    return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r15
leaq 0x8(%rsp), %r13
movq $0x0, (%r13)
movq %r13, %rdx
callq 0x31419
movq (%r13), %rcx
cmpq $0x7ffffffe, %rcx       # imm = 0x7FFFFFFE
jg 0x3151c
movq %rax, %r12
movl %ecx, (%rbx)
jmp 0x3154e
leaq 0x66a64(%rip), %rsi     # 0x97f87
leaq 0x65276(%rip), %rdx     # 0x967a0
xorl %r12d, %r12d
movl $0x1, %edi
xorl %eax, %eax
callq 0x13de5
movl $0x7fffffff, (%rbx)     # imm = 0x7FFFFFFF
movl $0x1, 0x38(%r15)
movl $0xffffffff, (%r14)     # imm = 0xFFFFFFFF
movq %r12, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: bam_plp_reset
void bam_plp_reset(bam_plp_t iter)
{
    overlap_remove(iter, NULL);
    iter->max_tid = iter->max_pos = -1;
    iter->tid = iter->pos = 0;
    iter->is_eof = 0;
    while (iter->head != iter->tail) {
        lbnode_t *p = iter->head;
        iter->head = p->next;
        mp_free(iter->mp, p);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x68(%rdi), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x30406
movq $-0x1, 0x28(%rbx)
movl $0xffffffff, 0x1c(%rbx) # imm = 0xFFFFFFFF
movq $0x0, 0x20(%rbx)
movl %r14d, 0x18(%rbx)
movl %r14d, 0x30(%rbx)
movq 0x8(%rbx), %r14
cmpq 0x10(%rbx), %r14
je 0x31607
movl $0x100, %ebp            # imm = 0x100
movq 0x78(%r14), %rax
movq %rax, 0x8(%rbx)
movq (%rbx), %r15
decl (%r15)
movq $0x0, 0x78(%r14)
movl 0x4(%r15), %ecx
cmpl 0x8(%r15), %ecx
jne 0x315eb
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
cmovel %ebp, %eax
movl %eax, 0x8(%r15)
movq 0x10(%r15), %rdi
movslq %eax, %rsi
shlq $0x3, %rsi
callq 0x4840
movq %rax, 0x10(%r15)
movl 0x4(%r15), %ecx
jmp 0x315ef
movq 0x10(%r15), %rax
leal 0x1(%rcx), %edx
movl %edx, 0x4(%r15)
movslq %ecx, %rcx
movq %r14, (%rax,%rcx,8)
movq 0x8(%rbx), %r14
cmpq 0x10(%rbx), %r14
jne 0x315a5
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: bam_mplp_init
bam_mplp_t bam_mplp_init(int n, bam_plp_auto_f func, void **data)
{
    int i;
    bam_mplp_t iter;
    iter = (bam_mplp_t)calloc(1, sizeof(struct bam_mplp_s));
    iter->pos = (hts_pos_t*)calloc(n, sizeof(hts_pos_t));
    iter->tid = (int32_t*)calloc(n, sizeof(int32_t));
    iter->n_plp = (int*)calloc(n, sizeof(int));
    iter->plp = (const bam_pileup1_t**)calloc(n, sizeof(bam_pileup1_t*));
    iter->iter = (bam_plp_t*)calloc(n, sizeof(bam_plp_t));
    iter->n = n;
    iter->min_pos = HTS_POS_MAX;
    iter->min_tid = (uint32_t)-1;
    for (i = 0; i < n; ++i) {
        iter->iter[i] = bam_plp_init(func, data[i]);
        iter->pos[i] = iter->min_pos;
        iter->tid[i] = iter->min_tid;
    }
    return iter;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl %edi, %ebp
movl $0x1, %edi
movl $0x38, %esi
callq 0x4300
movq %rax, %r14
movl %ebp, %ebx
movslq %ebp, %rbp
movl $0x8, %esi
movq %rbp, %rdi
callq 0x4300
movq %rax, %r12
movq %rax, 0x18(%r14)
movl $0x4, %esi
movq %rbp, %rdi
callq 0x4300
movq %rax, %r13
movq %rax, 0x8(%r14)
movl $0x4, %esi
movq %rbp, %rdi
callq 0x4300
movq %rax, 0x28(%r14)
movl $0x8, %esi
movq %rbp, %rdi
callq 0x4300
movq %rax, 0x30(%r14)
movl $0x8, %esi
movq %rbp, %rdi
callq 0x4300
movq %rax, %r15
movabsq $0x7fffffff7fffffff, %rax # imm = 0x7FFFFFFF7FFFFFFF
movq %r15, 0x20(%r14)
movl %ebp, (%r14)
movq %rax, 0x10(%r14)
movq %r14, (%rsp)
movl $0xffffffff, 0x4(%r14)  # imm = 0xFFFFFFFF
testl %ebp, %ebp
jle 0x316fc
movl %ebx, %ebp
xorl %ebx, %ebx
movq %rax, %r14
movq 0x10(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movq 0x8(%rsp), %rdi
callq 0x2faa2
movq %rax, (%r15,%rbx,8)
movq %r14, %rax
movq %r14, (%r12,%rbx,8)
movl $0xffffffff, (%r13,%rbx,4) # imm = 0xFFFFFFFF
incq %rbx
cmpq %rbx, %rbp
jne 0x316ca
movq (%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: bam_mplp_init_overlaps
int bam_mplp_init_overlaps(bam_mplp_t iter)
{
    int i, r = 0;
    for (i = 0; i < iter->n; ++i)
        r |= bam_plp_init_overlaps(iter->iter[i]);
    return r == 0 ? 0 : -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movslq (%rdi), %rbx
testq %rbx, %rbx
jle 0x3175d
movq 0x20(%rdi), %r14
xorl %r15d, %r15d
xorl %ebp, %ebp
movq (%r14,%r15,8), %r12
movl $0x1, %edi
movl $0x28, %esi
callq 0x4300
cmpq $0x1, %rax
movl $0x0, %ecx
sbbl %ecx, %ecx
movq %rax, 0x68(%r12)
orl %ecx, %ebp
incq %r15
cmpq %r15, %rbx
jne 0x31728
xorl %eax, %eax
negl %ebp
sbbl %eax, %eax
jmp 0x3175f
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: bam_mplp_auto
int bam_mplp_auto(bam_mplp_t iter, int *_tid, int *_pos, int *n_plp, const bam_pileup1_t **plp)
{
    hts_pos_t pos64 = 0;
    int ret = bam_mplp64_auto(iter, _tid, &pos64, n_plp, plp);
    if (ret >= 0) {
        if (pos64 < INT_MAX) {
            *_pos = pos64;
        } else {
            hts_log_error("Position %"PRId64" too large", pos64);
            *_pos = INT_MAX;
            return -1;
        }
    }
    return ret;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
callq 0x317e9
testl %eax, %eax
js 0x319f2
movq 0x8(%rsp), %rcx
cmpq $0x7ffffffe, %rcx       # imm = 0x7FFFFFFE
jle 0x319f0
leaq 0x665c1(%rip), %rsi     # 0x97f94
leaq 0x64dc6(%rip), %rdx     # 0x967a0
movl $0x1, %edi
xorl %eax, %eax
callq 0x13de5
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, (%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: bam_mplp_reset
void bam_mplp_reset(bam_mplp_t iter)
{
    int i;
    iter->min_pos = HTS_POS_MAX;
    iter->min_tid = (uint32_t)-1;
    for (i = 0; i < iter->n; ++i) {
        bam_plp_reset(iter->iter[i]);
        iter->pos[i] = HTS_POS_MAX;
        iter->tid[i] = (uint32_t)-1;
        iter->n_plp[i] = 0;
        iter->plp[i] = NULL;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movabsq $0x7fffffff7fffffff, %r14 # imm = 0x7FFFFFFF7FFFFFFF
movq %r14, 0x10(%rdi)
movl $0xffffffff, 0x4(%rdi)  # imm = 0xFFFFFFFF
cmpl $0x0, (%rdi)
jle 0x31a61
movq %rdi, %rbx
xorl %r15d, %r15d
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x3155f
movq 0x18(%rbx), %rax
movq %r14, (%rax,%r15,8)
movq 0x8(%rbx), %rax
movl $0xffffffff, (%rax,%r15,4) # imm = 0xFFFFFFFF
movq 0x28(%rbx), %rax
movl $0x0, (%rax,%r15,4)
movq 0x30(%rbx), %rax
movq $0x0, (%rax,%r15,8)
incq %r15
movslq (%rbx), %rax
cmpq %rax, %r15
jl 0x31a1d
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: warn_if_known_stderr
static void warn_if_known_stderr(const char *line) {
    if (strstr(line, "M::bwa_idx_load_from_disk") != NULL)
        known_stderr("bwa", "Use `bwa mem -o file.sam ...` or `bwa sampe -f file.sam ...` instead of `bwa ... > file.sam`");
    else if (strstr(line, "M::mem_pestat") != NULL)
        known_stderr("bwa", "Use `bwa mem -o file.sam ...` instead of `bwa mem ... > file.sam`");
    else if (strstr(line, "loaded/built the index") != NULL)
        known_stderr("minimap2", "Use `minimap2 -o file.sam ...` instead of `minimap2 ... > file.sam`");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x66889(%rip), %rsi     # 0x9833d
callq 0x40e0
leaq 0x66897(%rip), %rbx     # 0x98357
testq %rax, %rax
je 0x31ace
leaq 0x6688f(%rip), %r14     # 0x9835b
jmp 0x31b0d
leaq 0x668e3(%rip), %rsi     # 0x983b8
movq %r14, %rdi
callq 0x40e0
testq %rax, %rax
je 0x31aeb
leaq 0x668dd(%rip), %r14     # 0x983c6
jmp 0x31b0d
leaq 0x66916(%rip), %rsi     # 0x98408
movq %r14, %rdi
callq 0x40e0
testq %rax, %rax
je 0x31b4b
leaq 0x66922(%rip), %r14     # 0x98428
leaq 0x66912(%rip), %rbx     # 0x9841f
leaq 0x66958(%rip), %r15     # 0x9846c
leaq 0x6695e(%rip), %rdx     # 0x98479
movl $0x3, %edi
movq %r15, %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x13de5
leaq 0x6699a(%rip), %rdx     # 0x984ce
movl $0x3, %edi
movq %r15, %rsi
movq %r14, %rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x13de5
popq %rbx
popq %r14
popq %r15
retq