LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_io.c
// Function: uint7_decode_crc32
static int uint7_decode_crc32(cram_fd *fd, int32_t *val_p, uint32_t *crc) {
    uint8_t b[5], i = 0;
    int c;
    uint32_t v = 0;

#ifdef VARINT2
    b[0] = hgetc(fd->fp);
    if (b[0] < 177) {
    } else if (b[0] < 241) {
        b[1] = hgetc(fd->fp);
    } else if (b[0] < 249) {
        b[1] = hgetc(fd->fp);
        b[2] = hgetc(fd->fp);
    } else {
        int n = b[0]+2, z = 1;
        while (n-- >= 249)
            b[z++] = hgetc(fd->fp);
    }
    i = var_get_u32(b, NULL, &v);
#else
//    // Little endian
//    int s = 0;
//    do {
//        b[i++] = c = hgetc(fd->fp);
//        if (c < 0)
//            return -1;
//        v |= (c & 0x7f) << s;
//      s += 7;
//    } while (i < 5 && (c & 0x80));

    // Big endian, see also htscodecs/varint.h
    do {
        b[i++] = c = hgetc(fd->fp);
        if (c < 0)
            return -1;
        v = (v<<7) | (c & 0x7f);
    } while (i < 5 && (c & 0x80));
#endif
    *crc = crc32(*crc, b, i);

    *val_p = v;
    return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
xorl %r13d, %r13d
xorl %ebp, %ebp
movq (%r15), %rdi
movq 0x8(%rdi), %rax
cmpq %rax, 0x10(%rdi)
jbe 0x57fc7
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
jmp 0x57fcc
callq 0xf054
movb %al, 0x3(%rsp,%r13)
testl %eax, %eax
js 0x5800c
leaq 0x1(%r13), %r12
movl %ebp, %ecx
shll $0x7, %ecx
movl %eax, %ebp
andl $0x7f, %ebp
orl %ecx, %ebp
cmpq $0x3, %r13
ja 0x57ff5
movq %r12, %r13
andl $0x80, %eax
jne 0x57fad
movl (%r14), %edi
leaq 0x3(%rsp), %rsi
movl %r12d, %edx
callq 0x4320
movl %eax, (%r14)
movl %ebp, (%rbx)
jmp 0x58012
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_io.c
// Function: uint7_decode_crc64
static int uint7_decode_crc64(cram_fd *fd, int64_t *val_p, uint32_t *crc) {
    uint8_t b[10], i = 0;
    int c;
    uint64_t v = 0;

#ifdef VARINT2
    b[0] = hgetc(fd->fp);
    if (b[0] < 177) {
    } else if (b[0] < 241) {
        b[1] = hgetc(fd->fp);
    } else if (b[0] < 249) {
        b[1] = hgetc(fd->fp);
        b[2] = hgetc(fd->fp);
    } else {
        int n = b[0]+2, z = 1;
        while (n-- >= 249)
            b[z++] = hgetc(fd->fp);
    }
    i = var_get_u64(b, NULL, &v);
#else
//    // Little endian
//    int s = 0;
//    do {
//        b[i++] = c = hgetc(fd->fp);
//        if (c < 0)
//            return -1;
//        v |= (c & 0x7f) << s;
//      s += 7;
//    } while (i < 10 && (c & 0x80));

    // Big endian, see also htscodecs/varint.h
    do {
        b[i++] = c = hgetc(fd->fp);
        if (c < 0)
            return -1;
        v = (v<<7) | (c & 0x7f);
    } while (i < 5 && (c & 0x80));
#endif
    *crc = crc32(*crc, b, i);

    *val_p = v;
    return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
xorl %ebp, %ebp
xorl %r13d, %r13d
movq (%r15), %rdi
movq 0x8(%rdi), %rax
cmpq %rax, 0x10(%rdi)
jbe 0x58106
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
movzbl (%rax), %eax
jmp 0x5810b
callq 0xf054
movb %al, 0xe(%rsp,%rbp)
testl %eax, %eax
js 0x58150
leaq 0x1(%rbp), %r12
movq %r13, %rcx
shlq $0x7, %rcx
movl %eax, %r13d
andl $0x7f, %r13d
orq %rcx, %r13
cmpq $0x3, %rbp
ja 0x58138
movq %r12, %rbp
andl $0x80, %eax
jne 0x580ec
movl (%r14), %edi
leaq 0xe(%rsp), %rsi
movl %r12d, %edx
callq 0x4320
movl %eax, (%r14)
movq %r13, (%rbx)
jmp 0x58156
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_io.c
// Function: safe_itf8_get
static int64_t safe_itf8_get(char **cp, const char *endp, int *err) {
    const unsigned char *up = (unsigned char *)*cp;

    if (endp && endp - *cp < 5 &&
        (*cp >= endp || endp - *cp < itf8_bytes[up[0]>>4])) {
        if (err) *err = 1;
        return 0;
    }

    if (up[0] < 0x80) {
        (*cp)++;
        return up[0];
    } else if (up[0] < 0xc0) {
        (*cp)+=2;
        return ((up[0] <<8) |  up[1])                           & 0x3fff;
    } else if (up[0] < 0xe0) {
        (*cp)+=3;
        return ((up[0]<<16) | (up[1]<< 8) |  up[2])             & 0x1fffff;
    } else if (up[0] < 0xf0) {
        (*cp)+=4;
        uint32_t uv = (((uint32_t)up[0]<<24) | (up[1]<<16) | (up[2]<<8) | up[3]) & 0x0fffffff;
        return (int32_t)uv;
    } else {
        (*cp)+=5;
        uint32_t uv = (((uint32_t)up[0] & 0x0f)<<28) | (up[1]<<20) | (up[2]<<12) | (up[3]<<4) | (up[4] & 0x0f);
        return (int32_t)uv;
    }
}

// Assembly:
movq (%rdi), %rcx
testq %rsi, %rsi
je 0x581a5
movq %rsi, %rax
subq %rcx, %rax
cmpq $0x4, %rax
jg 0x581a5
cmpq %rsi, %rcx
jae 0x58197
movzbl (%rcx), %esi
shrl $0x4, %esi
leaq 0x452e2(%rip), %r8      # 0x9d470
movslq (%r8,%rsi,4), %rsi
cmpq %rsi, %rax
jge 0x581a5
testq %rdx, %rdx
je 0x581a2
movl $0x1, (%rdx)
xorl %eax, %eax
retq
movb (%rcx), %al
testb %al, %al
js 0x581b6
leaq 0x1(%rcx), %rax
movq %rax, (%rdi)
movzbl (%rcx), %eax
retq
cmpb $-0x41, %al
ja 0x581d0
leaq 0x2(%rcx), %rax
movq %rax, (%rdi)
movzbl (%rcx), %eax
movzbl 0x1(%rcx), %ecx
andl $0x3f, %eax
shll $0x8, %eax
jmp 0x5821d
cmpb $-0x21, %al
ja 0x581f3
leaq 0x3(%rcx), %rax
movq %rax, (%rdi)
movzbl (%rcx), %eax
movzbl 0x1(%rcx), %edx
shll $0x8, %edx
movzbl 0x2(%rcx), %ecx
andl $0x1f, %eax
shll $0x10, %eax
orl %edx, %eax
jmp 0x5821d
cmpb $-0x11, %al
ja 0x58221
leaq 0x4(%rcx), %rax
movq %rax, (%rdi)
movzbl (%rcx), %eax
movzbl 0x1(%rcx), %edx
shll $0x10, %edx
movzbl 0x2(%rcx), %esi
shll $0x8, %esi
movzbl 0x3(%rcx), %ecx
andl $0xf, %eax
shll $0x18, %eax
orl %edx, %eax
orl %esi, %eax
orq %rcx, %rax
retq
leaq 0x5(%rcx), %rax
movq %rax, (%rdi)
movzbl (%rcx), %eax
shll $0x1c, %eax
movzbl 0x1(%rcx), %edx
shll $0x14, %edx
cltq
orq %rdx, %rax
movzbl 0x2(%rcx), %edx
shll $0xc, %edx
orq %rax, %rdx
movzbl 0x3(%rcx), %esi
shll $0x4, %esi
orq %rdx, %rsi
movzbl 0x4(%rcx), %eax
andl $0xf, %eax
orq %rsi, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_io.c
// Function: safe_itf8_put
static inline int itf8_put(char *cp, int32_t val) {
    unsigned char *up = (unsigned char *)cp;
    if        (!(val & ~0x00000007f)) { // 1 byte
        *up = val;
        return 1;
    } else if (!(val & ~0x00003fff)) { // 2 byte
        *up++ = (val >> 8 ) | 0x80;
        *up   = val & 0xff;
        return 2;
    } else if (!(val & ~0x01fffff)) { // 3 byte
        *up++ = (val >> 16) | 0xc0;
        *up++ = (val >> 8 ) & 0xff;
        *up   = val & 0xff;
        return 3;
    } else if (!(val & ~0x0fffffff)) { // 4 byte
        *up++ = (val >> 24) | 0xe0;
        *up++ = (val >> 16) & 0xff;
        *up++ = (val >> 8 ) & 0xff;
        *up   = val & 0xff;
        return 4;
    } else {                           // 5 byte
        *up++ = 0xf0 | ((val>>28) & 0xff);
        *up++ = (val >> 20) & 0xff;
        *up++ = (val >> 12) & 0xff;
        *up++ = (val >> 4 ) & 0xff;
        *up = val & 0x0f;
        return 5;
    }
}

// Assembly:
cmpl $0x7f, %edx
ja 0x58458
movb %dl, (%rdi)
movl $0x1, %eax
retq
movl %edx, %eax
cmpl $0x3fff, %edx           # imm = 0x3FFF
ja 0x58472
shrl $0x8, %eax
orb $-0x80, %al
movb %al, (%rdi)
movb %dl, 0x1(%rdi)
movl $0x2, %eax
retq
cmpl $0x1fffff, %edx         # imm = 0x1FFFFF
ja 0x5848d
shrl $0x10, %eax
orb $-0x40, %al
movb %al, (%rdi)
movb %dh, 0x1(%rdi)
movb %dl, 0x2(%rdi)
movl $0x3, %eax
retq
cmpl $0xfffffff, %edx        # imm = 0xFFFFFFF
ja 0x584b0
shrl $0x18, %eax
orb $-0x20, %al
movb %al, (%rdi)
movl %edx, %eax
shrl $0x10, %eax
movb %al, 0x1(%rdi)
movb %dh, 0x2(%rdi)
movb %dl, 0x3(%rdi)
movl $0x4, %eax
retq
shrl $0x1c, %eax
orb $-0x10, %al
movb %al, (%rdi)
movl %edx, %eax
shrl $0x14, %eax
movb %al, 0x1(%rdi)
movl %edx, %eax
shrl $0xc, %eax
movb %al, 0x2(%rdi)
movl %edx, %eax
shrl $0x4, %eax
movb %al, 0x3(%rdi)
andb $0xf, %dl
movb %dl, 0x4(%rdi)
movl $0x5, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
decl 0x1008(%rdi)
cmpq $0x3ff, %rsi            # imm = 0x3FF
ja 0x58c08
movl (%rbx,%rax,4), %ecx
leal -0x1(%rcx), %edx
movl %edx, (%rbx,%rax,4)
testl %ecx, %ecx
jg 0x58cf0
leaq 0x45a71(%rip), %rdi     # 0x9e661
leaq 0x45a7e(%rip), %rsi     # 0x9e675
leaq 0x45a89(%rip), %rcx     # 0x9e687
movl $0x57, %edx
callq 0x42f0
movq 0x1000(%rbx), %rsi
testq %rsi, %rsi
je 0x58c91
movl (%rsi), %edi
testl %edi, %edi
je 0x58c8b
leal -0x1(%rdi), %r8d
movq %rax, %r9
shrq $0x21, %r9
movl %eax, %ecx
shll $0xb, %ecx
xorl %ecx, %r9d
xorl %eax, %r9d
andl %r8d, %r9d
movq 0x10(%rsi), %r10
movl $0x1, %r11d
movl %r9d, %edx
movl %edx, %ecx
shrl $0x4, %ecx
movl (%r10,%rcx,4), %ebp
leal (%rdx,%rdx), %ecx
andl $0x1e, %ecx
movl %ebp, %r14d
shrl %cl, %r14d
testb $0x2, %r14b
jne 0x58c80
testb $0x1, %r14b
jne 0x58c6e
movq 0x18(%rsi), %r14
movl %edx, %r15d
cmpq %rax, (%r14,%r15,8)
je 0x58c80
addl %r11d, %edx
andl %r8d, %edx
incl %r11d
cmpl %r9d, %edx
jne 0x58c40
movl %edi, %edx
jmp 0x58c8d
shrl %cl, %ebp
testb $0x3, %bpl
cmovnel %edi, %edx
jmp 0x58c8d
xorl %edx, %edx
cmpl %edi, %edx
jne 0x58cb6
leaq 0x45a1a(%rip), %rsi     # 0x9e6b2
leaq 0x45a22(%rip), %rdx     # 0x9e6c1
movl $0x3, %edi
movq %rax, %rcx
xorl %eax, %eax
callq 0x14378
incl 0x1008(%rbx)
jmp 0x58cf0
movq 0x20(%rsi), %rax
movl %edx, %ecx
decl (%rax,%rcx,4)
jne 0x58cf0
cmpl %edx, (%rsi)
je 0x58cf0
movq 0x10(%rsi), %rax
movl %edx, %edi
shrl $0x4, %edi
movl (%rax,%rdi,4), %r8d
addl %edx, %edx
andl $0x1e, %edx
movl %r8d, %r9d
movl %edx, %ecx
shrl %cl, %r9d
testb $0x3, %r9b
jne 0x58cf0
btsl %edx, %r8d
movl %r8d, (%rax,%rdi,4)
decl 0x4(%rsi)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movq 0x60d5d(%rip), %rax     # 0xba0d0
testq %rax, %rax
je 0x59379
retq
pushq %rax
movl $0x38, %edi
callq 0x4680
testq %rax, %rax
je 0x593a8
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rax)
movups %xmm0, (%rax)
movups %xmm0, 0x20(%rax)
movq $0x0, 0x30(%rax)
movl $0x3, 0x1c(%rax)
jmp 0x593aa
xorl %eax, %eax
movq %rax, 0x60d1f(%rip)     # 0xba0d0
testq %rax, %rax
je 0x593c5
movq 0x5fc13(%rip), %rcx     # 0xb8fd0
movq (%rcx), %rcx
movq %rcx, (%rax)
jmp 0x593c7
xorl %eax, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl $0x38, %edi
callq 0x4680
testq %rax, %rax
je 0x59411
movq $0x0, (%rax)
movq %r14, 0x8(%rax)
movslq %ebx, %rcx
movq %rcx, 0x10(%rax)
movq %rcx, 0x20(%rax)
movabsq $0x300000000, %rcx      # imm = 0x300000000
movq %rcx, 0x18(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rax)
jmp 0x59413
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movq 0x60cbe(%rip), %rax     # 0xba0e0
testq %rax, %rax
je 0x59428
retq
pushq %rax
movl $0x38, %edi
callq 0x4680
testq %rax, %rax
je 0x59457
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rax)
movups %xmm0, (%rax)
movups %xmm0, 0x20(%rax)
movq $0x0, 0x30(%rax)
movl $0x3, 0x1c(%rax)
jmp 0x59459
xorl %eax, %eax
movq %rax, 0x60c80(%rip)     # 0xba0e0
testq %rax, %rax
je 0x5947b
movq 0x5fb44(%rip), %rcx     # 0xb8fb0
movq (%rcx), %rcx
movq %rcx, (%rax)
movl $0x2, 0x1c(%rax)
jmp 0x5947d
xorl %eax, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movq 0x60c67(%rip), %rax     # 0xba0f0
testq %rax, %rax
je 0x5948f
retq
pushq %rax
movl $0x38, %edi
callq 0x4680
testq %rax, %rax
je 0x594be
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rax)
movups %xmm0, (%rax)
movups %xmm0, 0x20(%rax)
movq $0x0, 0x30(%rax)
movl $0x3, 0x1c(%rax)
jmp 0x594c0
xorl %eax, %eax
movq %rax, 0x60c29(%rip)     # 0xba0f0
testq %rax, %rax
je 0x594e2
movq 0x5fb05(%rip), %rcx     # 0xb8fd8
movq (%rcx), %rcx
movq %rcx, (%rax)
movl $0x2, 0x1c(%rax)
jmp 0x594e4
xorl %eax, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x59503
callq 0x45c0
movq %r14, 0x8(%rbx)
movslq %ebp, %rax
movq %rax, 0x20(%rbx)
movq %rax, 0x10(%rbx)
movl $0x0, 0x18(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r13
movq %rdi, %r14
movb $0x1, %al
movl %eax, 0xc(%rsp)
movl $0x2000, %ebx           # imm = 0x2000
testq %rsi, %rsi
je 0x597aa
leaq 0x18(%rsp), %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x4420
cmpl $-0x1, %eax
je 0x597aa
movq 0x48(%rsp), %r12
movq %r12, %rdi
callq 0x4680
testq %rax, %rax
je 0x59839
movq %rax, %r15
movq %r13, 0x10(%rsp)
movslq %r12d, %rbx
movl $0x0, 0xc(%rsp)
jmp 0x597b5
movq %r13, 0x10(%rsp)
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %ebp, %ebp
leaq (%rbx,%rbp), %rax
cmpq %r12, %rax
jbe 0x597ec
addq %rbx, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x4840
movq %rax, %r13
movq %rax, %rcx
testq %rax, %rax
jne 0x597e4
movq %r15, %rdi
callq 0x45c0
movq %r15, %rcx
testq %r13, %r13
je 0x59828
movq %rcx, %r15
leaq (%r15,%rbp), %rdi
movq %r12, %rdx
subq %rbp, %rdx
movl $0x1, %esi
movq %r14, %rcx
callq 0x4790
addq %rax, %rbp
movb $0x1, %al
testb %al, %al
je 0x59839
movq %r14, %rdi
callq 0x47d0
testl %eax, %eax
jne 0x5982f
cmpq 0x48(%rsp), %rbp
setb %al
orb 0xc(%rsp), %al
jne 0x597b7
jmp 0x5982f
xorl %eax, %eax
movq %rcx, %r15
jmp 0x59808
movq 0x10(%rsp), %rax
movq %rbp, (%rax)
jmp 0x5983c
xorl %r15d, %r15d
movq %r15, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/mFILE.c
// Function: mfflush
int mfflush(mFILE *mf) {
    if (!mf->fp)
        return 0;

    /* FIXME: only do this when opened in write mode */
    if (mf == m_channel[1] || mf == m_channel[2]) {
        if (mf->flush_pos < mf->size) {
            size_t bytes = mf->size - mf->flush_pos;
            if (fwrite(mf->data + mf->flush_pos, 1, bytes, mf->fp) < bytes)
                return -1;
            if (0 != fflush(mf->fp))
                return -1;
        }

        /* Stdout & stderr are non-seekable streams so throw away the data */
        mf->offset = mf->size = mf->flush_pos = 0;
    }

    /* only flush when opened in write mode */
    if (mf->mode & MF_WRITE) {
        if (mf->flush_pos < mf->size) {
            size_t bytes = mf->size - mf->flush_pos;
            if (!(mf->mode & MF_MODEX)) {
                fseek(mf->fp, mf->flush_pos, SEEK_SET);
            }
            if (fwrite(mf->data + mf->flush_pos, 1, bytes, mf->fp) < bytes)
                return -1;
            if (0 != fflush(mf->fp))
                return -1;
        }
        if (ftell(mf->fp) != -1 &&
            ftruncate(fileno(mf->fp), ftell(mf->fp)) == -1)
            return -1;
        mf->flush_pos = mf->size;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x599af
movq %rdi, %rbx
cmpq %rdi, 0x60815(%rip)     # 0xba0e0
je 0x598d6
cmpq %rbx, 0x6081c(%rip)     # 0xba0f0
jne 0x59924
movq 0x20(%rbx), %r14
movq 0x30(%rbx), %rdi
subq %rdi, %r14
jbe 0x59912
addq 0x8(%rbx), %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0x49b0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq %r14, %rax
jb 0x599b1
movq (%rbx), %rdi
callq 0x45a0
testl %eax, %eax
jne 0x599b1
leaq 0x20(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movl 0x1c(%rbx), %eax
testb $0x2, %al
je 0x599af
movq 0x20(%rbx), %r14
movq 0x30(%rbx), %rsi
subq %rsi, %r14
jbe 0x59978
testb $0x20, %al
jne 0x5994a
movq (%rbx), %rdi
xorl %edx, %edx
callq 0x4540
movq (%rbx), %rcx
movq 0x8(%rbx), %rdi
addq 0x30(%rbx), %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0x49b0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq %r14, %rax
jb 0x599b1
movq (%rbx), %rdi
callq 0x45a0
testl %eax, %eax
jne 0x599b1
movq (%rbx), %rdi
callq 0x4030
cmpq $-0x1, %rax
je 0x599a7
movq (%rbx), %rdi
callq 0x44f0
movl %eax, %ebp
movq (%rbx), %rdi
callq 0x4030
movl %ebp, %edi
movq %rax, %rsi
callq 0x46b0
cmpl $-0x1, %eax
je 0x599b8
movq 0x20(%rbx), %rax
movq %rax, 0x30(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x599b1
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x599e2
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x599d6
callq 0x45c0
movq %rbx, %rdi
callq 0x45c0
xorl %eax, %eax
popq %rbx
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x59a1b
movq %rdi, %r14
callq 0x598b1
testb $0x40, 0x1c(%r14)
jne 0x59a1b
movq (%r14), %rdi
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x59a1b
callq 0x44b0
movq $0x0, (%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x59a4d
movq %rdi, %r14
movq 0x8(%rdi), %rbx
testq %rsi, %rsi
je 0x59a41
movq 0x20(%r14), %rax
movq %rax, (%rsi)
movq %r14, %rdi
callq 0x599e8
testl %eax, %eax
je 0x59a51
xorl %ebx, %ebx
jmp 0x59a61
movq $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x599bf
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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:
cmpl $0x2, %edx
je 0x59a96
cmpl $0x1, %edx
je 0x59a90
testl %edx, %edx
je 0x59a9a
pushq %rax
callq 0x4050
movl $0x16, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
retq
addq %rsi, 0x28(%rdi)
jmp 0x59a9e
addq 0x20(%rdi), %rsi
movq %rsi, 0x28(%rdi)
movl $0x0, 0x18(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
cmpq %rcx, 0x605d8(%rip)     # 0xba0d0
jne 0x59aff
callq 0x59b5a
movq 0x20(%r14), %rbp
movq 0x28(%r14), %rsi
subq %rsi, %rbp
jbe 0x59b49
imulq %rbx, %r15
cmpq %rbp, %r15
movq %rbp, %r13
cmovbq %r15, %r13
testq %rbx, %rbx
je 0x59b49
addq 0x8(%r14), %rsi
movq %r12, %rdi
movq %r13, %rdx
callq 0x43c0
addq %r13, 0x28(%r14)
cmpq %rbp, %r15
jbe 0x59b3f
movl $0x1, 0x18(%r14)
movq %r13, %rax
xorl %edx, %edx
divq %rbx
jmp 0x59b4b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
cmpb $0x0, 0x60597(%rip)     # 0xba0f8
jne 0x59b9d
pushq %rax
movq 0x5f465(%rip), %rax     # 0xb8fd0
movq (%rax), %rdi
movq 0x6055b(%rip), %rdx     # 0xba0d0
addq $0x20, %rdx
xorl %esi, %esi
callq 0x59743
movq 0x60549(%rip), %rcx     # 0xba0d0
movq %rax, 0x8(%rcx)
movl $0x1, 0x1c(%rcx)
movb $0x1, 0x6055f(%rip)     # 0xba0f8
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x1c(%rcx), %eax
testb $0x2, %al
jne 0x59bb7
xorl %ebx, %ebx
jmp 0x59c46
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
testb $0x4, %al
je 0x59bcf
movq 0x20(%r14), %rax
movq %rax, 0x28(%r14)
imulq %rbx, %r15
movq 0x10(%r14), %r13
movq 0x28(%r14), %rdi
leaq (%rdi,%r15), %rax
cmpq %r13, %rax
jbe 0x59c1b
movl $0x400, %ebp            # imm = 0x400
testq %r13, %r13
leaq (%r13,%r13), %r13
cmoveq %rbp, %r13
movq 0x8(%r14), %rdi
movq %r13, %rsi
callq 0x4840
testq %rax, %rax
je 0x59bb0
movq %r13, 0x10(%r14)
movq %rax, 0x8(%r14)
movq 0x28(%r14), %rdi
leaq (%rdi,%r15), %rax
cmpq %r13, %rax
ja 0x59be9
cmpq 0x30(%r14), %rdi
jae 0x59c25
movq %rdi, 0x30(%r14)
addq 0x8(%r14), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x43c0
addq 0x28(%r14), %r15
movq %r15, 0x28(%r14)
cmpq %r15, 0x20(%r14)
jae 0x59c46
movq %r15, 0x20(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
cmpq %rdi, 0x6046d(%rip)     # 0xba0d0
jne 0x59c6a
callq 0x59b5a
movq 0x28(%rbx), %rax
cmpq 0x20(%rbx), %rax
jae 0x59c86
movq 0x8(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x28(%rbx)
movzbl (%rcx,%rax), %eax
jmp 0x59c92
movl $0x1, 0x18(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r14
pushq %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
cmpq %rdx, 0x60400(%rip)     # 0xba0d0
jne 0x59cd7
callq 0x59b5a
movb $0x0, (%rbx)
cmpl $0x2, %ebp
movl $0x1, %eax
cmovgel %ebp, %eax
decl %eax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x59d1e
movq 0x28(%r14), %rdx
cmpq 0x20(%r14), %rdx
jae 0x59d14
movq 0x8(%r14), %rsi
leaq 0x1(%rdx), %rdi
movq %rdi, 0x28(%r14)
movb (%rsi,%rdx), %dl
movb %dl, (%rbx,%rcx)
incq %rcx
cmpb $0xa, %dl
jne 0x59ce9
jmp 0x59d1c
movl $0x1, 0x18(%r14)
movl %ecx, %eax
movslq %eax, %rcx
movb $0x0, (%rbx,%rcx)
xorl %eax, %eax
testl %ecx, %ecx
cmovneq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movl $0x1, %eax
cmpq $0x2, 0x20(%rdi)
jb 0x59d70
movl $0x1, %ecx
movq 0x8(%rdi), %rdx
movb (%rdx,%rcx), %sil
cmpb $0xa, %sil
jne 0x59d60
xorl %r8d, %r8d
cmpb $0xd, -0x1(%rdx,%rcx)
sete %r8b
subq %r8, %rax
movb %sil, (%rdx,%rax)
incq %rcx
incq %rax
cmpq 0x20(%rdi), %rcx
jb 0x59d43
movq %rax, 0x20(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/open_trace_file.c
// Function: find_file_url
mFILE *find_file_url(const char *file, char *url) {
    char *path = NULL, buf[8192];
    mFILE *mf = NULL;
    ssize_t len;
    hFILE *hf = NULL;

    /* Expand %s for the trace name.  Only one digit is allowed between
       The % and s to avoid ambiguity with percent-encoded URLs */

    path = expand_path(file, url, 1);
    if (!path)
        return NULL;

    if (!(hf = hopen(path, "r"))) {
        if (errno != ENOENT)
            hts_log_warning("Failed to open reference \"%s\": %s", path, strerror(errno));
        goto fail;
    }

    if (NULL == (mf = mfcreate(NULL, 0)))
        goto fail;
    while ((len = hread(hf, buf, sizeof(buf))) > 0) {
        if (mfwrite(buf, len, 1, mf) <= 0) {
            hclose_abruptly(hf);
            goto fail;
        }
    }
    if (hclose(hf) < 0 || len < 0) {
        hts_log_warning("Failed to read reference \"%s\": %s", path, strerror(errno));
        goto fail;
    }

    free(path);
    mrewind(mf);
    return mf;

 fail:
    mfdestroy(mf);
    free(path);
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
movl $0x1, %edx
callq 0x5a1b8
testq %rax, %rax
je 0x5a1a0
movq %rax, %rbx
leaq 0x41571(%rip), %rsi     # 0x9b5c4
movq %rax, %rdi
xorl %eax, %eax
callq 0x10014
testq %rax, %rax
je 0x5a10c
movq %rax, %r15
xorl %r14d, %r14d
xorl %edi, %edi
xorl %esi, %esi
callq 0x593cc
testq %rax, %rax
je 0x5a190
movq %rbx, 0x8(%rsp)
movq %rax, %r14
movl $0x2000, %ebp           # imm = 0x2000
leaq 0x10(%rsp), %r12
movq 0x8(%r15), %rsi
movq 0x10(%r15), %rbx
subq %rsi, %rbx
cmpq %rbp, %rbx
movl $0x2000, %r13d          # imm = 0x2000
cmovbq %rbx, %r13
movq %r12, %rdi
movq %r13, %rdx
callq 0x43c0
addq %r13, 0x8(%r15)
cmpq $0x1fff, %rbx           # imm = 0x1FFF
ja 0x5a0dd
testb $0x2, 0x30(%r15)
je 0x5a0dd
movl $0x2000, %edx           # imm = 0x2000
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0xf2cd
movq %rax, %r13
testq %r13, %r13
jle 0x5a11d
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rcx
callq 0x59b9e
testq %rax, %rax
jne 0x5a090
movq %r15, %rdi
callq 0xf730
movq 0x8(%rsp), %rbx
jmp 0x5a190
callq 0x4050
movl (%rax), %edi
cmpl $0x2, %edi
jne 0x5a142
xorl %r14d, %r14d
jmp 0x5a190
movq %r15, %rdi
callq 0xf6d0
testq %r13, %r13
jne 0x5a15f
testl %eax, %eax
js 0x5a15f
movq 0x8(%rsp), %rdi
callq 0x45c0
movq %r14, %rdi
callq 0x59aad
jmp 0x5a1a3
callq 0x4150
leaq 0x44651(%rip), %rsi     # 0x9e79f
leaq 0x44658(%rip), %rdx     # 0x9e7ad
xorl %r14d, %r14d
movl $0x3, %edi
jmp 0x5a183
callq 0x4050
movl (%rax), %edi
callq 0x4150
leaq 0x4462d(%rip), %rsi     # 0x9e79f
leaq 0x44656(%rip), %rdx     # 0x9e7cf
movl $0x3, %edi
movq 0x8(%rsp), %rbx
movq %rbx, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x14378
movq %r14, %rdi
callq 0x599bf
movq %rbx, %rdi
callq 0x45c0
xorl %r14d, %r14d
movq %r14, %rax
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x98, %rsp
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
callq 0x5a1b8
testq %rax, %rax
je 0x5a604
movq %rax, %rbx
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x4420
xorl %r14d, %r14d
testl %eax, %eax
jne 0x5a5fa
movl $0xf000, %eax           # imm = 0xF000
andl 0x20(%rsp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x5a5fa
leaq 0x4421b(%rip), %rsi     # 0x9e80a
movq %rbx, %rdi
callq 0x59851
movq %rax, %r14
movq %rbx, %rdi
callq 0x45c0
jmp 0x5a607
xorl %r14d, %r14d
movq %r14, %rax
addq $0x98, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, (%rsp)
testq %rsi, %rsi
jne 0x5a63e
leaq 0x441bb(%rip), %rdi     # 0x9e7f1
callq 0x4600
movq %rax, %rsi
movq %rsi, %rdi
callq 0x59d7c
testq %rax, %rax
je 0x5a747
movq %rax, %rbp
movb (%rax), %al
testb %al, %al
je 0x5a73f
leaq 0x44196(%rip), %r12     # 0x9e7f9
movq %rbp, %r14
xorl %ebx, %ebx
cmpb $0x7c, %al
sete %bl
addq %r14, %rbx
movl $0x4, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4210
movl $0x4, %r13d
testl %eax, %eax
je 0x5a720
movl $0x5, %edx
movq %rbx, %rdi
leaq 0x440e8(%rip), %rsi     # 0x9e785
callq 0x4210
testl %eax, %eax
je 0x5a720
movl $0x6, %edx
movq %rbx, %rdi
leaq 0x440da(%rip), %rsi     # 0x9e78f
callq 0x4210
testl %eax, %eax
je 0x5a720
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x440cd(%rip), %rsi     # 0x9e79a
callq 0x4210
testl %eax, %eax
je 0x5a720
movq (%rsp), %rdi
movq %rbx, %rsi
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
callq 0x5a1b8
movq %rax, %rbx
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
callq 0x4420
movl 0x20(%rsp), %ecx
andl $0xf000, %ecx           # imm = 0xF000
xorl $0x8000, %ecx           # imm = 0x8000
xorl %r13d, %r13d
orl %eax, %ecx
sete %r13b
movq %rbx, %rdi
cmoveq %rbp, %rdi
cmoveq %rbx, %r15
callq 0x45c0
testb $0x3, %r13b
jne 0x5a74a
movq %r14, %rdi
callq 0x41d0
addq %rax, %r14
incq %r14
movb (%r14), %al
testb %al, %al
jne 0x5a666
movq %rbp, %rdi
callq 0x45c0
xorl %r15d, %r15d
movq %r15, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
movl $0x28, %edi
callq 0x4680
testq %rax, %rax
je 0x5a7d9
addq $0x7, %rbx
movq %rbx, %rcx
andq $-0x8, %rcx
cmpq $0x8, %rbx
movl $0x8, %edx
cmovaeq %rcx, %rdx
movq %rdx, (%rax)
shll $0xa, %edx
decl %edx
movl %edx, %ecx
shrl %ecx
orl %edx, %ecx
movl %ecx, %edx
shrl $0x2, %edx
orl %ecx, %edx
movl %edx, %ecx
shrl $0x4, %ecx
orl %edx, %ecx
movl %ecx, %edx
shrl $0x8, %edx
orl %ecx, %edx
movl %edx, %ecx
shrl $0x10, %ecx
orl %edx, %ecx
incl %ecx
movl $0x100000, %edx         # imm = 0x100000
cmpl %edx, %ecx
cmovgel %edx, %ecx
movslq %ecx, %rcx
movq %rcx, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
jmp 0x5a7db
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x5a80c
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x45c0
incq %r15
addq $0x10, %r14
cmpq 0x10(%rbx), %r15
jb 0x5a7f2
movq 0x18(%rbx), %rdi
callq 0x45c0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x45c0
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x5a843
movq (%rax), %rcx
movq %rcx, 0x20(%rbx)
jmp 0x5a8f3
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x5a875
movq 0x18(%rbx), %rcx
movq %rsi, %rdi
shlq $0x4, %rdi
movq -0x8(%rcx,%rdi), %rax
movq (%rbx), %rdx
addq %rax, %rdx
cmpq 0x8(%rbx), %rdx
jae 0x5a875
addq %rdi, %rcx
addq -0x10(%rcx), %rax
movq %rdx, -0x8(%rcx)
jmp 0x5a8f3
movq (%rbx), %r13
movq 0x8(%rbx), %r15
movq 0x18(%rbx), %rdi
shlq $0x4, %rsi
addq $0x10, %rsi
callq 0x4840
testq %rax, %rax
je 0x5a8db
movq %rax, %r14
xorl %r12d, %r12d
movq %r15, %rax
xorl %edx, %edx
divq %r13
movq %r14, 0x18(%rbx)
movq 0x10(%rbx), %r15
movq %r15, %r13
shlq $0x4, %r13
imulq (%rbx), %rax
movq %rax, %rdi
callq 0x4680
movq %rax, (%r14,%r13)
testq %rax, %rax
je 0x5a8de
addq %r13, %r14
movq $0x0, 0x8(%r14)
incq %r15
movq %r15, 0x10(%rbx)
movq %r14, %r12
jmp 0x5a8de
xorl %r12d, %r12d
testq %r12, %r12
je 0x5a8f1
movq (%rbx), %rax
movq %rax, 0x8(%r12)
movq (%r12), %rax
jmp 0x5a8f3
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
movl $0x20, %edi
callq 0x4680
testq %rax, %rax
je 0x5a943
cmpq $0x401, %rbx            # imm = 0x401
movl $0x400, %ecx            # imm = 0x400
cmovaeq %rbx, %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq %rcx, (%rax)
movq $0x0, 0x18(%rax)
jmp 0x5a945
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x5a976
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x45c0
incq %r15
addq $0x10, %r14
cmpq 0x8(%rbx), %r15
jb 0x5a95c
movq 0x18(%rbx), %rdi
callq 0x45c0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x45c0
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/string_alloc.c
// Function: string_alloc
char *string_alloc(string_alloc_t *a_str, size_t length) {
    string_t *str;
    char *ret;

    if (length <= 0) return NULL;

    // add to last string pool if we have space
    if (a_str->nstrings) {
        str = &a_str->strings[a_str->nstrings - 1];

        if (str->used + length < a_str->max_length) {
            ret = str->str + str->used;
            str->used += length;
            return ret;
        }
    }

    // increase the max length if needs be
    if (length > a_str->max_length) a_str->max_length = length;

    // need a new string pool
    str = new_string_pool(a_str);

    if (NULL == str) return NULL;

    str->used = length;
    return str->str;
}

// Assembly:
testq %rsi, %rsi
je 0x5aa45
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x5a9d6
movq 0x18(%r14), %rdx
movq %rcx, %rdi
shlq $0x4, %rdi
movq -0x8(%rdx,%rdi), %rax
leaq (%rax,%rbx), %rsi
cmpq (%r14), %rsi
jae 0x5a9d6
addq %rdi, %rdx
addq -0x10(%rdx), %rax
movq %rsi, -0x8(%rdx)
jmp 0x5aa5b
cmpq %rbx, (%r14)
jae 0x5a9de
movq %rbx, (%r14)
movq 0x10(%r14), %rax
cmpq %rax, %rcx
jne 0x5aa11
movq %rax, %r15
shrq $0x2, %r15
orq %rax, %r15
incq %r15
movq 0x18(%r14), %rdi
movq %r15, %rsi
shlq $0x4, %rsi
callq 0x4840
testq %rax, %rax
je 0x5aa48
movq %rax, 0x18(%r14)
movq %r15, 0x10(%r14)
movq 0x18(%r14), %r15
movq (%r14), %rdi
movq 0x8(%r14), %r12
movq %r12, %r13
shlq $0x4, %r13
callq 0x4680
movq %rax, (%r15,%r13)
testq %rax, %rax
je 0x5aa48
addq %r13, %r15
movq $0x0, 0x8(%r15)
incq %r12
movq %r12, 0x8(%r14)
jmp 0x5aa4b
xorl %eax, %eax
retq
xorl %r15d, %r15d
testq %r15, %r15
je 0x5aa59
movq %rbx, 0x8(%r15)
movq (%r15), %rax
jmp 0x5aa5b
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/string_alloc.c
// Function: string_ndup
char *string_ndup(string_alloc_t *a_str, const char *instr, size_t len) {
    char *str = string_alloc(a_str, len + 1);

    if (NULL == str) return NULL;

    memcpy(str, instr, len);
    str[len] = 0;

    return str;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
leaq 0x1(%rdx), %rsi
callq 0x5a98c
testq %rax, %rax
je 0x5aae1
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x43c0
movb $0x0, (%r14,%rbx)
jmp 0x5aae4
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/htscodecs/htscodecs/arith_dynamic.c
// Function: arith_compress_bound
unsigned int arith_compress_bound(unsigned int size, int order) {
    int N = (order>>8) & 0xff;
    if (!N) N=4;
    return (order == 0
        ? 1.05*size + 257*3 + 4
        : 1.05*size + 257*257*3 + 4 + 257*3+4) + 5 +
        ((order & X_PACK) ? 1 : 0) +
        ((order & X_RLE) ? 1 + 257*3+4: 0) +
        ((order & X_STRIPE) ? 7 + 5*N: 0);
}

// Assembly:
movl %esi, %eax
movl %edi, %ecx
cvtsi2sd %rcx, %xmm0
mulsd 0x430af(%rip), %xmm0    # 0x9dbb0
testl %esi, %esi
je 0x5ab15
addsd 0x43d03(%rip), %xmm0    # 0x9e810
addsd 0x43063(%rip), %xmm0    # 0x9db78
addsd 0x43cfb(%rip), %xmm0    # 0x9e818
addsd 0x43053(%rip), %xmm0    # 0x9db78
movzbl %ah, %ecx
movl %eax, %edx
shrl $0x7, %edx
andl $0x1, %edx
movl %eax, %esi
shll $0x19, %esi
sarl $0x1f, %esi
andl $0x308, %esi            # imm = 0x308
shll $0x1c, %eax
sarl $0x1f, %eax
addsd 0x43cd4(%rip), %xmm0    # 0x9e820
cvtsi2sd %edx, %xmm1
testl %ecx, %ecx
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
leal 0x7(%rcx,%rcx,4), %ecx
movl $0x1b, %edx
cmovnel %ecx, %edx
addsd %xmm1, %xmm0
andl %eax, %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/htscodecs/htscodecs/varint.h
// Function: var_get_u32
static inline
int var_get_u32(uint8_t *cp, const uint8_t *endp, uint32_t *i) {
    uint8_t *op = cp, c;
    uint32_t j = 0;

    if (!endp || endp - cp >= 6) {
        // Known maximum loop count helps optimiser.
        // NB: this helps considerably at -O3 level, but may harm -O2.
        // (However we optimise for those that want optimal code.)
        int n = 5;
        do {
            c = *cp++;
            j = (j<<7) | (c & 0x7f);
        } while ((c & 0x80) && n-- > 0);
    } else {
        if (cp >= endp) {
            *i = 0;
            return 0;
        }

        if (*cp < 128) {
            *i = *cp;
            return 1;
        }

        do {
            c = *cp++;
            j = (j<<7) | (c & 0x7f);
        } while ((c & 0x80) && cp < endp);
    }

    *i = j;
    return cp-op;
}

// Assembly:
testq %rsi, %rsi
setne %al
movq %rsi, %rcx
subq %rdi, %rcx
cmpq $0x6, %rcx
setl %cl
testb %cl, %al
jne 0x5d8f8
xorl %esi, %esi
xorl %ecx, %ecx
movzbl (%rdi,%rsi), %r8d
movl %ecx, %eax
shll $0x7, %eax
movl %r8d, %ecx
andl $0x7f, %ecx
orl %eax, %ecx
leaq 0x1(%rsi), %rax
testb %r8b, %r8b
jns 0x5d8f0
cmpl $0x5, %esi
movq %rax, %rsi
jne 0x5d8cd
addq %rdi, %rax
movl %ecx, (%rdx)
subl %edi, %eax
retq
cmpq %rsi, %rdi
jae 0x5d90c
movsbl (%rdi), %eax
testl %eax, %eax
js 0x5d915
movl %eax, (%rdx)
movl $0x1, %eax
retq
movl $0x0, (%rdx)
xorl %eax, %eax
retq
xorl %ecx, %ecx
movq %rdi, %rax
movzbl (%rax), %r8d
incq %rax
movl %ecx, %r9d
shll $0x7, %r9d
movl %r8d, %ecx
andl $0x7f, %ecx
orl %r9d, %ecx
testb %r8b, %r8b
jns 0x5d8f3
cmpq %rsi, %rax
jb 0x5d91a
jmp 0x5d8f3