LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/../htscodecs/htscodecs/varint.h
// Function: var_put_u32_safe
static inline
int var_put_u32_safe(uint8_t *cp, const uint8_t *endp, uint32_t i) {
    uint8_t *op = cp;
    int s = 0;
    uint32_t X = i;

    // safe method when we're near end of buffer
    do {
        s += 7;
        X >>= 7;
    } while (X);

    if (endp && (endp-cp)*7 < s)
        return 0;

    int n;
    for (n = 0; n < 5; n++) {
        s -= 7;
        *cp++ = ((i>>s) & 0x7f) + (s?128:0);
        if (!s)
            break;
    }

    return cp-op;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
addl $0x7, %eax
movl %eax, -0x2c(%rbp)
movl -0x30(%rbp), %eax
shrl $0x7, %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jne 0x7e0d4
cmpq $0x0, -0x18(%rbp)
je 0x7e114
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
imulq $0x7, %rax, %rax
movslq -0x2c(%rbp), %rcx
cmpq %rcx, %rax
jge 0x7e114
movl $0x0, -0x4(%rbp)
jmp 0x7e17d
movl $0x0, -0x34(%rbp)
cmpl $0x5, -0x34(%rbp)
jge 0x7e16f
movl -0x2c(%rbp), %eax
subl $0x7, %eax
movl %eax, -0x2c(%rbp)
movl -0x1c(%rbp), %eax
movl -0x2c(%rbp), %ecx
shrl %cl, %eax
andl $0x7f, %eax
movl -0x2c(%rbp), %esi
xorl %ecx, %ecx
movl $0x80, %edx
cmpl $0x0, %esi
cmovnel %edx, %ecx
addl %ecx, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
cmpl $0x0, -0x2c(%rbp)
jne 0x7e162
jmp 0x7e16f
jmp 0x7e164
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x7e11b
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/../htscodecs/htscodecs/varint.h
// Function: var_put_u64_safe
static inline
int var_put_u64_safe(uint8_t *cp, const uint8_t *endp, uint64_t i) {
    uint8_t *op = cp;
    int s = 0;
    uint64_t X = i;

    // safe method when we're near end of buffer
    do {
        s += 7;
        X >>= 7;
    } while (X);

    if (endp && (endp-cp)*7 < s)
        return 0;

    int n;
    for (n = 0; n < 10; n++) {
        s -= 7;
        *cp++ = ((i>>s) & 0x7f) + (s?128:0);
        if (!s)
            break;
    }

    return cp-op;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
addl $0x7, %eax
movl %eax, -0x2c(%rbp)
movq -0x38(%rbp), %rax
shrq $0x7, %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x7eae7
cmpq $0x0, -0x18(%rbp)
je 0x7eb2b
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
imulq $0x7, %rax, %rax
movslq -0x2c(%rbp), %rcx
cmpq %rcx, %rax
jge 0x7eb2b
movl $0x0, -0x4(%rbp)
jmp 0x7eb9b
movl $0x0, -0x3c(%rbp)
cmpl $0xa, -0x3c(%rbp)
jge 0x7eb8d
movl -0x2c(%rbp), %eax
subl $0x7, %eax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movl -0x2c(%rbp), %ecx
shrq %cl, %rax
andq $0x7f, %rax
movl -0x2c(%rbp), %esi
xorl %ecx, %ecx
movl $0x80, %edx
cmpl $0x0, %esi
cmovnel %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
cmpl $0x0, -0x2c(%rbp)
jne 0x7eb80
jmp 0x7eb8d
jmp 0x7eb82
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x7eb32
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/../htscodecs/htscodecs/varint.h
// Function: var_size_u64
static inline int var_size_u64(uint64_t v) {
    int i = 0;
    do {
        i++;
        v >>= 7;
    } while (v);
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
shrq $0x7, %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x7ebef
movl -0xc(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_stats.c
// Function: cram_stats_add
int cram_stats_add(cram_stats *st, int64_t val) {
    st->nsamp++;

    //assert(val >= 0);

    if (val < MAX_STAT_VAL && val >= 0) {
        st->freqs[val]++;
    } else {
        khint_t k;
        int r;

        if (!st->h) {
            st->h = kh_init(m_i2i);
            if (!st->h)
                return -1;
        }

        k = kh_put(m_i2i, st->h, val, &r);
        if (r == 0)
            kh_val(st->h, k)++;
        else if (r != -1)
            kh_val(st->h, k) = 1;
        else
            return -1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x1008(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1008(%rax)
cmpq $0x400, -0x18(%rbp)     # imm = 0x400
jge 0x7ec7a
cmpq $0x0, -0x18(%rbp)
jl 0x7ec7a
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x7ed20
movq -0x10(%rbp), %rax
cmpq $0x0, 0x1000(%rax)
jne 0x7ecb4
callq 0x7ed30
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x1000(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x1000(%rax)
jne 0x7ecb2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7ed27
jmp 0x7ecb4
movq -0x10(%rbp), %rax
movq 0x1000(%rax), %rdi
movq -0x18(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x7ed50
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0x7ecf2
movq -0x10(%rbp), %rax
movq 0x1000(%rax), %rax
movq 0x20(%rax), %rax
movl -0x1c(%rbp), %ecx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x7ed1e
cmpl $-0x1, -0x20(%rbp)
je 0x7ed13
movq -0x10(%rbp), %rax
movq 0x1000(%rax), %rax
movq 0x20(%rax), %rax
movl -0x1c(%rbp), %ecx
movl $0x1, (%rax,%rcx,4)
jmp 0x7ed1c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7ed27
jmp 0x7ed1e
jmp 0x7ed20
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_stats.c
// Function: cram_stats_del
void cram_stats_del(cram_stats *st, int64_t val) {
    st->nsamp--;

    //assert(val >= 0);

    if (val < MAX_STAT_VAL && val >= 0) {
        st->freqs[val]--;
        assert(st->freqs[val] >= 0);
    } else if (st->h) {
        khint_t k = kh_get(m_i2i, st->h, val);

        if (k != kh_end(st->h)) {
            if (--kh_val(st->h, k) == 0)
                kh_del(m_i2i, st->h, k);
        } else {
            hts_log_warning("Failed to remove val %"PRId64" from cram_stats", val);
            st->nsamp++;
        }
    } else {
        hts_log_warning("Failed to remove val %"PRId64" from cram_stats", val);
        st->nsamp++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x1008(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x1008(%rax)
cmpq $0x400, -0x10(%rbp)     # imm = 0x400
jge 0x7f139
cmpq $0x0, -0x10(%rbp)
jl 0x7f139
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $-0x1, %edx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jl 0x7f115
jmp 0x7f134
leaq 0x76f10(%rip), %rdi     # 0xf602c
leaq 0x76f1d(%rip), %rsi     # 0xf6040
movl $0x57, %edx
leaq 0x76f23(%rip), %rcx     # 0xf6052
callq 0x42e0
jmp 0x7f211
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1000(%rax)
je 0x7f1de
movq -0x8(%rbp), %rax
movq 0x1000(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x7f220
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x1000(%rcx), %rcx
cmpl (%rcx), %eax
je 0x7f1ab
movq -0x8(%rbp), %rax
movq 0x1000(%rax), %rax
movq 0x20(%rax), %rcx
movl -0x14(%rbp), %eax
movl %eax, %edx
movl (%rcx,%rdx,4), %eax
addl $-0x1, %eax
movl %eax, (%rcx,%rdx,4)
cmpl $0x0, %eax
jne 0x7f1a9
movq -0x8(%rbp), %rax
movq 0x1000(%rax), %rdi
movl -0x14(%rbp), %esi
callq 0x7f370
jmp 0x7f1dc
movq -0x10(%rbp), %rcx
movl $0x3, %edi
leaq 0x76ec2(%rip), %rsi     # 0xf607d
leaq 0x76eca(%rip), %rdx     # 0xf608c
movb $0x0, %al
callq 0x1b030
movq -0x8(%rbp), %rax
movl 0x1008(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1008(%rax)
jmp 0x7f20f
movq -0x10(%rbp), %rcx
movl $0x3, %edi
leaq 0x76e8f(%rip), %rsi     # 0xf607d
leaq 0x76e97(%rip), %rdx     # 0xf608c
movb $0x0, %al
callq 0x1b030
movq -0x8(%rbp), %rax
movl 0x1008(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1008(%rax)
jmp 0x7f211
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/mFILE.c
// Function: mstdin
mFILE *mstdin(void) {
    if (m_channel[0])
        return m_channel[0];

    m_channel[0] = mfcreate(NULL, 0);
    if (NULL == m_channel[0]) return NULL;
    m_channel[0]->fp = stdin;
    return m_channel[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpq $0x0, 0x92aa0(%rip)     # 0x112870
je 0x7fddf
movq 0x92a97(%rip), %rax     # 0x112870
movq %rax, -0x8(%rbp)
jmp 0x7fe25
xorl %eax, %eax
movl %eax, %edi
xorl %esi, %esi
callq 0x7fe30
movq %rax, 0x92a7f(%rip)     # 0x112870
xorl %eax, %eax
cmpq 0x92a76(%rip), %rax     # 0x112870
jne 0x7fe06
movq $0x0, -0x8(%rbp)
jmp 0x7fe25
movq 0x8d1cb(%rip), %rax     # 0x10cfd8
movq (%rax), %rcx
movq 0x92a59(%rip), %rax     # 0x112870
movq %rcx, (%rax)
movq 0x92a4f(%rip), %rax     # 0x112870
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/mFILE.c
// Function: mfcreate
mFILE *mfcreate(char *data, int size) {
    mFILE *mf = (mFILE *)malloc(sizeof(*mf));
    if (NULL == mf) return NULL;
    mf->fp = NULL;
    mf->data = data;
    mf->alloced = size;
    mf->size = size;
    mf->eof = 0;
    mf->offset = 0;
    mf->flush_pos = 0;
    mf->mode = MF_READ | MF_WRITE;
    return mf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x38, %edi
callq 0x4650
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq -0x20(%rbp), %rax
jne 0x7fe5f
movq $0x0, -0x8(%rbp)
jmp 0x7fec4
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movslq -0x14(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movslq -0x14(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x20(%rbp), %rax
movl $0x3, 0x1c(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/mFILE.c
// Function: mstdout
mFILE *mstdout(void) {
    if (m_channel[1])
        return m_channel[1];

    m_channel[1] = mfcreate(NULL, 0);
    if (NULL == m_channel[1]) return NULL;
    m_channel[1]->fp = stdout;
    m_channel[1]->mode = MF_WRITE;
    return m_channel[1];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpq $0x0, 0x92998(%rip)     # 0x112878
je 0x7feef
movq 0x9298f(%rip), %rax     # 0x112878
movq %rax, -0x8(%rbp)
jmp 0x7ff43
xorl %eax, %eax
movl %eax, %edi
xorl %esi, %esi
callq 0x7fe30
movq %rax, 0x92977(%rip)     # 0x112878
xorl %eax, %eax
cmpq 0x9296e(%rip), %rax     # 0x112878
jne 0x7ff16
movq $0x0, -0x8(%rbp)
jmp 0x7ff43
movq 0x8d09b(%rip), %rax     # 0x10cfb8
movq (%rax), %rcx
movq 0x92951(%rip), %rax     # 0x112878
movq %rcx, (%rax)
movq 0x92947(%rip), %rax     # 0x112878
movl $0x2, 0x1c(%rax)
movq 0x92939(%rip), %rax     # 0x112878
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/mFILE.c
// Function: mstderr
mFILE *mstderr(void) {
    if (m_channel[2])
        return m_channel[2];

    m_channel[2] = mfcreate(NULL, 0);
    if (NULL == m_channel[2]) return NULL;
    m_channel[2]->fp = stderr;
    m_channel[2]->mode = MF_WRITE;
    return m_channel[2];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpq $0x0, 0x92920(%rip)     # 0x112880
je 0x7ff6f
movq 0x92917(%rip), %rax     # 0x112880
movq %rax, -0x8(%rbp)
jmp 0x7ffc3
xorl %eax, %eax
movl %eax, %edi
xorl %esi, %esi
callq 0x7fe30
movq %rax, 0x928ff(%rip)     # 0x112880
xorl %eax, %eax
cmpq 0x928f6(%rip), %rax     # 0x112880
jne 0x7ff96
movq $0x0, -0x8(%rbp)
jmp 0x7ffc3
movq 0x8d043(%rip), %rax     # 0x10cfe0
movq (%rax), %rcx
movq 0x928d9(%rip), %rax     # 0x112880
movq %rcx, (%rax)
movq 0x928cf(%rip), %rax     # 0x112880
movl $0x2, 0x1c(%rax)
movq 0x928c1(%rip), %rax     # 0x112880
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/mFILE.c
// Function: mfrecreate
void mfrecreate(mFILE *mf, char *data, int size) {
    if (mf->data)
        free(mf->data);
    mf->data = data;
    mf->size = size;
    mf->alloced = size;
    mf->eof = 0;
    mf->offset = 0;
    mf->flush_pos = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x7fffb
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x45a0
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/mFILE.c
// Function: mfcreate_from
mFILE *mfcreate_from(const char *path, const char *mode_str, FILE *fp) {
    mFILE *mf;

    /* Open using mfreopen() */
    if (NULL == (mf = mfreopen(path, mode_str, fp)))
        return NULL;

    /* Disassociate from the input stream */
    mf->fp = NULL;

    return mf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x800b0
movq %rax, %rcx
movq %rcx, -0x28(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x8008d
movq $0x0, -0x8(%rbp)
jmp 0x800a0
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/mFILE.c
// Function: mfload
static char *mfload(FILE *fp, const char *fn, size_t *size, int binary) {
    struct stat sb;
    char *data = NULL;
    size_t allocated = 0, used = 0;
    int bufsize = 8192;

#ifdef _WIN32
    if (binary)
        _setmode(_fileno(fp), _O_BINARY);
    else
        _setmode(_fileno(fp), _O_TEXT);
#endif

    if (fn && -1 != stat(fn, &sb)) {
        data = malloc(allocated = sb.st_size);
        if (!data)
            return NULL;
        bufsize = sb.st_size;
    } else {
        fn = NULL;
    }

    do {
        size_t len;
        if (used + bufsize > allocated) {
            allocated += bufsize;
            char *datan = realloc(data, allocated);
            if (datan) {
                data = datan;
            } else {
                free(data);
                return NULL;
            }
        }
        len = fread(data + used, 1, allocated - used, fp);
        if (len > 0)
            used += len;
    } while (!feof(fp) && (fn == NULL || used < sb.st_size));

    *size = used;

    return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq $0x0, -0xc0(%rbp)
movq $0x0, -0xc8(%rbp)
movq $0x0, -0xd0(%rbp)
movl $0x2000, -0xd4(%rbp)    # imm = 0x2000
cmpq $0x0, -0x18(%rbp)
je 0x803e7
movq -0x18(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x4410
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
je 0x803e7
movq -0x88(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x4650
movq %rax, -0xc0(%rbp)
cmpq $0x0, -0xc0(%rbp)
jne 0x803d8
movq $0x0, -0x8(%rbp)
jmp 0x80532
movq -0x88(%rbp), %rax
movl %eax, -0xd4(%rbp)
jmp 0x803ef
movq $0x0, -0x18(%rbp)
jmp 0x803f1
movq -0xd0(%rbp), %rax
movslq -0xd4(%rbp), %rcx
addq %rcx, %rax
cmpq -0xc8(%rbp), %rax
jbe 0x8046f
movslq -0xd4(%rbp), %rax
addq -0xc8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0x4820
movq %rax, -0xe8(%rbp)
cmpq $0x0, -0xe8(%rbp)
je 0x80454
movq -0xe8(%rbp), %rax
movq %rax, -0xc0(%rbp)
jmp 0x8046d
movq -0xc0(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x8(%rbp)
jmp 0x80532
jmp 0x8046f
movq -0xc0(%rbp), %rdi
addq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rdx
subq -0xd0(%rbp), %rdx
movq -0x10(%rbp), %rcx
movl $0x1, %esi
callq 0x4770
movq %rax, -0xe0(%rbp)
cmpq $0x0, -0xe0(%rbp)
jbe 0x804bf
movq -0xe0(%rbp), %rax
addq -0xd0(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0x804c1
movq -0x10(%rbp), %rdi
callq 0x47b0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xe9(%rbp)
jne 0x8050b
movb $0x1, %al
cmpq $0x0, -0x18(%rbp)
movb %al, -0xea(%rbp)
je 0x804ff
movq -0xd0(%rbp), %rax
cmpq -0x88(%rbp), %rax
setb %al
movb %al, -0xea(%rbp)
movb -0xea(%rbp), %al
movb %al, -0xe9(%rbp)
movb -0xe9(%rbp), %al
testb $0x1, %al
jne 0x803f1
movq -0xd0(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0xc0(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/mFILE.c
// Function: mfopen
mFILE *mfopen(const char *path, const char *mode) {
    FILE *fp;

    if (NULL == (fp = fopen(path, mode)))
        return NULL;
    return mfreopen(path, mode, fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4590
movq %rax, %rcx
movq %rcx, -0x20(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x80575
movq $0x0, -0x8(%rbp)
jmp 0x8058a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x800b0
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/cram/mFILE.c
// Function: mfclose
int mfclose(mFILE *mf) {
    if (!mf)
        return -1;

    mfflush(mf);

#ifdef HAVE_MMAP
    if ((mf->mode & MF_MMAP) && mf->data) {
        /* Mmaped */
        munmap(mf->data, mf->size);
        mf->data = NULL;
    }
#endif

    if (mf->fp)
        fclose(mf->fp);

    mfdestroy(mf);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x805bc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x805eb
movq -0x10(%rbp), %rdi
callq 0x80600
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x805db
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x44a0
movq -0x10(%rbp), %rdi
callq 0x80800
movl $0x0, -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/cram/mFILE.c
// Function: mfdestroy
int mfdestroy(mFILE *mf) {
    if (!mf)
        return -1;

    if (mf->data)
        free(mf->data);
    free(mf);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x8081c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x80844
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x80834
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x45a0
movq -0x10(%rbp), %rdi
callq 0x45a0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/mFILE.c
// Function: mfdetach
int mfdetach(mFILE *mf) {
    if (!mf)
        return -1;

    mfflush(mf);
    if (mf->mode & MF_MMAP)
        return -1;

    if (mf->fp) {
        fclose(mf->fp);
        mf->fp = NULL;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x8086c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x808b5
movq -0x10(%rbp), %rdi
callq 0x80600
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x8088d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x808b5
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x808ae
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x44a0
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/mFILE.c
// Function: mfsteal
void *mfsteal(mFILE *mf, size_t *size_out) {
    void *data;

    if (!mf) return NULL;

    data = mf->data;

    if (NULL != size_out) *size_out = mf->size;

    if (mfdetach(mf) != 0)
        return NULL;

    mf->data = NULL;
    mfdestroy(mf);

    return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x808e1
movq $0x0, -0x8(%rbp)
jmp 0x80939
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
je 0x80904
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x80850
cmpl $0x0, %eax
je 0x8091c
movq $0x0, -0x8(%rbp)
jmp 0x80939
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0x80800
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/cram/mFILE.c
// Function: mfseek
int mfseek(mFILE *mf, long offset, int whence) {
    switch (whence) {
    case SEEK_SET:
        mf->offset = offset;
        break;
    case SEEK_CUR:
        mf->offset += offset;
        break;
    case SEEK_END:
        mf->offset = mf->size + offset;
        break;
    default:
        errno = EINVAL;
        return -1;
    }

    mf->eof = 0;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
testl %eax, %eax
je 0x80983
jmp 0x8096f
movl -0x20(%rbp), %eax
subl $0x1, %eax
je 0x80991
jmp 0x80979
movl -0x20(%rbp), %eax
subl $0x2, %eax
je 0x809a3
jmp 0x809b9
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x809cd
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
jmp 0x809cd
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
addq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x809cd
callq 0x4050
movl $0x16, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x809df
movq -0x10(%rbp), %rax
movl $0x0, 0x18(%rax)
movl $0x0, -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/cram/mFILE.c
// Function: mfread
size_t mfread(void *ptr, size_t size, size_t nmemb, mFILE *mf) {
    size_t len;
    char *cptr = (char *)ptr;

    if (mf == m_channel[0]) init_mstdin();

    if (mf->size <= mf->offset)
        return 0;

    len = size * nmemb <= mf->size - mf->offset
        ? size * nmemb
        : mf->size - mf->offset;
    if (!size)
        return 0;

    memcpy(cptr, &mf->data[mf->offset], len);
    mf->offset += len;

    if (len != size * nmemb) {
        mf->eof = 1;
    }

    return len / size;
}

// 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 -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
cmpq 0x91d85(%rip), %rax     # 0x112870
jne 0x80af2
callq 0x80bd0
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x28(%rcx), %rax
ja 0x80b11
movq $0x0, -0x8(%rbp)
jmp 0x80bc5
movq -0x18(%rbp), %rax
imulq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq -0x28(%rbp), %rdx
subq 0x28(%rdx), %rcx
cmpq %rcx, %rax
ja 0x80b3e
movq -0x18(%rbp), %rax
imulq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x80b52
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x28(%rbp), %rcx
subq 0x28(%rcx), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x80b6b
movq $0x0, -0x8(%rbp)
jmp 0x80bc5
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x28(%rbp), %rax
addq 0x28(%rax), %rsi
movq -0x30(%rbp), %rdx
callq 0x43b0
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
imulq -0x20(%rbp), %rcx
cmpq %rcx, %rax
je 0x80bb5
movq -0x28(%rbp), %rax
movl $0x1, 0x18(%rax)
movq -0x30(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x18(%rbp)
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/mFILE.c
// Function: init_mstdin
static void init_mstdin(void) {
    static int done_stdin = 0;
    if (done_stdin)
        return;

    m_channel[0]->data = mfload(stdin, NULL, &m_channel[0]->size, 1);
    m_channel[0]->mode = MF_READ;
    done_stdin = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, 0x91cad(%rip)     # 0x112888
je 0x80bdf
jmp 0x80c28
movq 0x8c3f2(%rip), %rax     # 0x10cfd8
movq (%rax), %rdi
movq 0x91c80(%rip), %rdx     # 0x112870
addq $0x20, %rdx
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %ecx
callq 0x80340
movq %rax, %rcx
movq 0x91c64(%rip), %rax     # 0x112870
movq %rcx, 0x8(%rax)
movq 0x91c59(%rip), %rax     # 0x112870
movl $0x1, 0x1c(%rax)
movl $0x1, 0x91c60(%rip)     # 0x112888
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/mFILE.c
// Function: mfwrite
size_t mfwrite(void *ptr, size_t size, size_t nmemb, mFILE *mf) {
    if (!(mf->mode & MF_WRITE))
        return 0;

    /* Append mode => forced all writes to end of file */
    if (mf->mode & MF_APPEND)
        mf->offset = mf->size;

    /* Make sure we have enough room */
    while (size * nmemb + mf->offset > mf->alloced) {
        size_t new_alloced = mf->alloced ? mf->alloced * 2 : 1024;
        void * new_data = realloc(mf->data, new_alloced);
        if (NULL == new_data) return 0;
        mf->alloced = new_alloced;
        mf->data    = new_data;
    }

    /* Record where we need to reflush from */
    if (mf->offset < mf->flush_pos)
        mf->flush_pos = mf->offset;

    /* Copy the data over */
    memcpy(&mf->data[mf->offset], ptr, size * nmemb);
    mf->offset += size * nmemb;
    if (mf->size < mf->offset)
        mf->size = mf->offset;

    return nmemb;
}

// 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 -0x28(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x80c64
movq $0x0, -0x8(%rbp)
jmp 0x80d99
movq -0x28(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x80c83
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x80c85
movq -0x18(%rbp), %rax
imulq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
addq 0x28(%rcx), %rax
movq -0x28(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x80d16
movq -0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x80cbc
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
shlq %rax
movq %rax, -0x40(%rbp)
jmp 0x80cc7
movl $0x400, %eax            # imm = 0x400
movq %rax, -0x40(%rbp)
jmp 0x80cc7
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x4820
movq %rax, -0x38(%rbp)
xorl %eax, %eax
cmpq -0x38(%rbp), %rax
jne 0x80cf9
movq $0x0, -0x8(%rbp)
jmp 0x80d99
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x80c85
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jae 0x80d38
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rax
addq 0x28(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
imulq -0x20(%rbp), %rdx
callq 0x43b0
movq -0x18(%rbp), %rcx
imulq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x28(%rcx), %rax
jae 0x80d91
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/mFILE.c
// Function: mfgetc
int mfgetc(mFILE *mf) {
    if (mf == m_channel[0]) init_mstdin();
    if (mf->offset < mf->size) {
        return (unsigned char)mf->data[mf->offset++];
    }

    mf->eof = 1;
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq 0x91aa9(%rip), %rax     # 0x112870
jne 0x80dce
callq 0x80bd0
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x80e04
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdx
movq 0x28(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x28(%rdx)
movzbl (%rax,%rcx), %eax
movl %eax, -0x4(%rbp)
jmp 0x80e16
movq -0x10(%rbp), %rax
movl $0x1, 0x18(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/mFILE.c
// Function: mungetc
int mungetc(int c, mFILE *mf) {
    if (mf->offset > 0) {
        mf->data[--mf->offset] = c;
        return c;
    }

    mf->eof = 1;
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jbe 0x80e62
movl -0x8(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rsi
movq 0x28(%rsi), %rcx
movq %rcx, %rdi
addq $-0x1, %rdi
movq %rdi, 0x28(%rsi)
movb %dl, -0x1(%rax,%rcx)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x80e74
movq -0x10(%rbp), %rax
movl $0x1, 0x18(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/mFILE.c
// Function: mfgets
char *mfgets(char *s, int size, mFILE *mf) {
    int i;

    if (mf == m_channel[0]) init_mstdin();
    *s = 0;
    for (i = 0; i < size-1;) {
        if (mf->offset < mf->size) {
            s[i] = mf->data[mf->offset++];
            if (s[i++] == '\n')
                break;
        } else {
            mf->eof = 1;
            break;
        }
    }

    s[i] = 0;
    return i ? s : NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq 0x919d2(%rip), %rax     # 0x112870
jne 0x80ea5
callq 0x80bd0
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x80f29
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x80f1a
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rdx
movq 0x28(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x28(%rdx)
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1c(%rbp)
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x80f18
jmp 0x80f29
jmp 0x80f27
movq -0x18(%rbp), %rax
movl $0x1, 0x18(%rax)
jmp 0x80f29
jmp 0x80eb3
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
cmpl $0x0, -0x1c(%rbp)
je 0x80f45
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x80f4d
xorl %eax, %eax
movq %rax, -0x28(%rbp)
jmp 0x80f4d
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/mFILE.c
// Function: mfascii
void mfascii(mFILE *mf) {
    size_t p1, p2;

    for (p1 = p2 = 1; p1 < mf->size; p1++, p2++) {
        if (mf->data[p1] == '\n' && mf->data[p1-1] == '\r') {
            p2--; /* delete the \r */
        }
        mf->data[p2] = mf->data[p1];
    }
    mf->size = p2;

    mf->offset = mf->flush_pos = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq $0x1, -0x18(%rbp)
movq $0x1, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x80ff8
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x80fc0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xd, %eax
jne 0x80fc0
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x80f78
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/open_trace_file.c
// Function: find_file_dir
static mFILE *find_file_dir(const char *file, char *dirname) {
    char *path;
    mFILE *mf = NULL;

    path = expand_path(file, dirname, INT_MAX);
    if (!path)
        return NULL;

    if (is_file(path))
        mf = mfopen(path, "rbm");

    free(path);
    return mf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
callq 0x816d0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x81d3f
movq $0x0, -0x8(%rbp)
jmp 0x81d72
movq -0x20(%rbp), %rdi
callq 0x81f00
cmpl $0x0, %eax
je 0x81d61
movq -0x20(%rbp), %rdi
leaq 0x7447d(%rip), %rsi     # 0xf61d5
callq 0x80540
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x45a0
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/open_trace_file.c
// Function: find_path
char *find_path(const char *file, const char *path) {
    char *newsearch;
    char *ele;
    char *outpath = NULL;

    /* Use path first */
    if (!path)
        path = getenv("RAWDATA");
    if (NULL == (newsearch = tokenise_search_path(path)))
        return NULL;

    for (ele = newsearch; *ele; ele += strlen(ele)+1) {
        char *ele2 = (*ele == '|') ? ele+1 : ele;

        if (!strncmp(ele2, "URL=", 4) ||
            !strncmp(ele2, "http:", 5) ||
            !strncmp(ele2, "https:", 6) ||
            !strncmp(ele2, "ftp:", 4)) {
            continue;
        } else {
            outpath = expand_path(file, ele2, INT_MAX);
            if (is_file(outpath)) {
                free(newsearch);
                return outpath;
            } else {
                free(outpath);
            }
        }
    }

    free(newsearch);

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x81daf
leaq 0x74416(%rip), %rdi     # 0xf61bc
callq 0x45e0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x81020
movq %rax, %rcx
movq %rcx, -0x20(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x81dd3
movq $0x0, -0x8(%rbp)
jmp 0x81eeb
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpb $0x0, (%rax)
je 0x81eda
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7c, %eax
jne 0x81e02
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x81e0a
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
leaq 0x743a7(%rip), %rsi     # 0xf61c4
movl $0x4, %edx
callq 0x4200
cmpl $0x0, %eax
je 0x81e7a
movq -0x38(%rbp), %rdi
leaq 0x74319(%rip), %rsi     # 0xf6150
movl $0x5, %edx
callq 0x4200
cmpl $0x0, %eax
je 0x81e7a
movq -0x38(%rbp), %rdi
leaq 0x74309(%rip), %rsi     # 0xf615a
movl $0x6, %edx
callq 0x4200
cmpl $0x0, %eax
je 0x81e7a
movq -0x38(%rbp), %rdi
leaq 0x742fa(%rip), %rsi     # 0xf6165
movl $0x4, %edx
callq 0x4200
cmpl $0x0, %eax
jne 0x81e7c
jmp 0x81ec0
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
callq 0x816d0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x81f00
cmpl $0x0, %eax
je 0x81eb3
movq -0x20(%rbp), %rdi
callq 0x45a0
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x81eeb
movq -0x30(%rbp), %rdi
callq 0x45a0
jmp 0x81ebe
jmp 0x81ec0
movq -0x28(%rbp), %rdi
callq 0x41b0
addq $0x1, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x81ddb
movq -0x20(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/pooled_alloc.c
// Function: pool_create
pool_alloc_t *pool_create(size_t dsize) {
    pool_alloc_t *p;

    if (NULL == (p = (pool_alloc_t *)malloc(sizeof(*p))))
        return NULL;

    /* Minimum size is a pointer, for free list */
    dsize = (dsize + sizeof(void *) - 1) & ~(sizeof(void *)-1);
    if (dsize < sizeof(void *))
        dsize = sizeof(void *);
    p->dsize = dsize;
    p->psize = MIN(PSIZE, next_power_2(p->dsize*1024));

    p->npools = 0;
    p->pools = NULL;
    p->free  = NULL;

    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x28, %edi
callq 0x4650
movq %rax, %rcx
movq %rcx, -0x18(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x81f91
movq $0x0, -0x8(%rbp)
jmp 0x82035
movq -0x10(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
movq %rax, -0x10(%rbp)
cmpq $0x8, -0x10(%rbp)
jae 0x81fb4
movq $0x8, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0xa, %rax
movl %eax, %edi
callq 0x82040
movl %eax, %ecx
movl $0x100000, %eax         # imm = 0x100000
cmpl %ecx, %eax
jge 0x81fe6
movl $0x100000, %eax         # imm = 0x100000
movl %eax, -0x1c(%rbp)
jmp 0x81ffb
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0xa, %rax
movl %eax, %edi
callq 0x82040
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movslq %eax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/pooled_alloc.c
// Function: next_power_2
static int next_power_2(unsigned int v) {
    v--;
    v |= v >> 1;
    v |= v >> 2;
    v |= v >> 4;
    v |= v >> 8;
    v |= v >> 16;
    v++;

    return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl $0x2, %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl $0x4, %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl $0x8, %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl $0x10, %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/pooled_alloc.c
// Function: pool_destroy
void pool_destroy(pool_alloc_t *p) {
    size_t i;

    for (i = 0; i < p->npools; i++) {
        free(p->pools[i].pool);
    }
    free(p->pools);
    free(p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x820eb
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x45a0
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x820b4
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rdi
callq 0x45a0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/pooled_alloc.c
// Function: pool_alloc
void *pool_alloc(pool_alloc_t *p) {
    pool_t *pool;
    void *ret;

    /* Look on free list */
    if (NULL != p->free) {
        ret = p->free;
        p->free = *((void **)p->free);
        return ret;
    }

    /* Look for space in the last pool */
    if (p->npools) {
        pool = &p->pools[p->npools - 1];
        if (pool->used + p->dsize < p->psize) {
            ret = ((char *) pool->pool) + pool->used;
            pool->used += p->dsize;
            return ret;
        }
    }

    /* Need a new pool */
    pool = new_pool(p);
    if (NULL == pool) return NULL;

    pool->used = p->dsize;
    return pool->pool;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq 0x20(%rcx), %rax
je 0x82154
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x82202
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x821c9
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq $0x1, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
addq (%rcx), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x821c7
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
addq 0x8(%rcx), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x82202
jmp 0x821c9
movq -0x10(%rbp), %rdi
callq 0x82210
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
jne 0x821e8
movq $0x0, -0x8(%rbp)
jmp 0x82202
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/pooled_alloc.c
// Function: new_pool
static pool_t *new_pool(pool_alloc_t *p) {
    size_t n = p->psize / p->dsize;
    pool_t *pool;

    pool = realloc(p->pools, (p->npools + 1) * sizeof(*p->pools));
    if (NULL == pool) return NULL;
    p->pools = pool;
    pool = &p->pools[p->npools];

    pool->pool = malloc(n * p->dsize);
    if (NULL == pool->pool) return NULL;

    pool->used = 0;

    p->npools++;

    return pool;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
xorl %edx, %edx
divq (%rcx)
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
addq $0x1, %rsi
shlq $0x4, %rsi
callq 0x4820
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq -0x20(%rbp), %rax
jne 0x82264
movq $0x0, -0x8(%rbp)
jmp 0x822df
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
imulq (%rax), %rdi
callq 0x4650
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
jne 0x822bb
movq $0x0, -0x8(%rbp)
jmp 0x822df
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/string_alloc.c
// Function: string_pool_create
string_alloc_t *string_pool_create(size_t max_length) {
    string_alloc_t *a_str;

    if (NULL == (a_str = (string_alloc_t *)malloc(sizeof(*a_str)))) {
        return NULL;
    }

    if (max_length < MIN_STR_SIZE) max_length = MIN_STR_SIZE;

    a_str->nstrings    = 0;
    a_str->max_strings = 0;
    a_str->max_length  = max_length;
    a_str->strings     = NULL;

    return a_str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x20, %edi
callq 0x4650
movq %rax, %rcx
movq %rcx, -0x18(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x8234e
movq $0x0, -0x8(%rbp)
jmp 0x82397
cmpq $0x400, -0x10(%rbp)     # imm = 0x400
jae 0x82360
movq $0x400, -0x10(%rbp)     # imm = 0x400
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x18(%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/cram/string_alloc.c
// Function: string_pool_destroy
void string_pool_destroy(string_alloc_t *a_str) {
    size_t i;

    for (i = 0; i < a_str->nstrings; i++) {
        free(a_str->strings[i].str);
    }

    free(a_str->strings);
    free(a_str);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x823fb
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x45a0
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x823c4
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rdi
callq 0x45a0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)