LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_xdelta_encode_init
cram_codec *cram_xdelta_encode_init(cram_stats *st,
                                    enum cram_encoding codec,
                                    enum cram_external_type option,
                                    void *dat,
                                    int version, varint_vec *vv) {
    cram_codec *c;

    if (!(c = malloc(sizeof(*c))))
        return NULL;

    c->codec  = E_XDELTA;
    c->free   = cram_xdelta_encode_free;
    if (option == E_LONG)
        c->encode = cram_xdelta_encode_long;
    else if (option == E_INT)
        c->encode = cram_xdelta_encode_int;
    else
        c->encode = cram_xdelta_encode_char;
    c->store  = cram_xdelta_encode_store;
    c->flush  = cram_xdelta_encode_flush;

    cram_xdelta_encoder *e = (cram_xdelta_encoder *)dat;
    c->u.e_xdelta.word_size = e->word_size;
    c->u.e_xdelta.last = 0;
    c->u.e_xdelta.sub_codec = cram_encoder_init(e->sub_encoding, NULL,
                                                E_BYTE_ARRAY,
                                                e->sub_codec_dat,
                                                version, vv);

    return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movl $0x880, %edi            # imm = 0x880
callq 0x4650
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0xe6a2f
movq $0x0, -0x8(%rbp)
jmp 0xe6aff
movq -0x38(%rbp), %rax
movl $0x35, (%rax)
movq -0x38(%rbp), %rax
leaq -0xb4(%rip), %rcx       # 0xe6990
movq %rcx, 0x20(%rax)
cmpl $0x2, -0x18(%rbp)
jne 0xe6a5f
movq -0x38(%rbp), %rax
leaq -0x349(%rip), %rcx      # 0xe6710
movq %rcx, 0x30(%rax)
jmp 0xe6a87
cmpl $0x1, -0x18(%rbp)
jne 0xe6a76
movq -0x38(%rbp), %rax
leaq -0x340(%rip), %rcx      # 0xe6730
movq %rcx, 0x30(%rax)
jmp 0xe6a85
movq -0x38(%rbp), %rax
leaq -0x331(%rip), %rcx      # 0xe6750
movq %rcx, 0x30(%rax)
jmp 0xe6a87
movq -0x38(%rbp), %rax
leaq -0x532(%rip), %rcx      # 0xe6560
movq %rcx, 0x38(%rax)
movq -0x38(%rbp), %rax
leaq -0x8b1(%rip), %rcx      # 0xe61f0
movq %rcx, 0x48(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movb 0x8(%rax), %cl
movq -0x38(%rbp), %rax
movb %cl, 0x68(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x40(%rbp), %rax
movl 0xc(%rax), %edi
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rcx
movl -0x24(%rbp), %r8d
movq -0x30(%rbp), %r9
xorl %eax, %eax
movl %eax, %esi
movl $0x4, %edx
callq 0xe5a20
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_xrle_decode_free
void cram_xrle_decode_free(cram_codec *c) {
    if (!c) return;

    if (c->u.xrle.len_codec)
        c->u.xrle.len_codec->free(c->u.xrle.len_codec);

    if (c->u.xrle.lit_codec)
        c->u.xrle.lit_codec->free(c->u.xrle.lit_codec);

    free(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xe6ed5
jmp 0xe6f29
movq -0x8(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0xe6ef6
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x78(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0xe6f20
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x80(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rdi
callq 0x45a0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_xrle_encode_char
int cram_xrle_encode_char(cram_slice *slice, cram_codec *c,
                          char *in, int in_size) {
    if (c->u.e_xrle.to_flush) {
        if (!c->out && !(c->out = cram_new_block(0, 0)))
            return -1;
        BLOCK_APPEND(c->out, c->u.e_xrle.to_flush, c->u.e_xrle.to_flush_size);
        c->u.e_xrle.to_flush = NULL;
        c->u.e_xrle.to_flush_size = 0;
    }

    if (c->out && BLOCK_SIZE(c->out) > 0) {
        // Gathering data
        BLOCK_APPEND(c->out, in, in_size);
        return 0;
    }

    // else cache copy of the data we're about to send to flush instead.
    c->u.e_xrle.to_flush = in;
    c->u.e_xrle.to_flush_size = in_size;
    return 0;

 block_err:
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x490(%rax)
je 0xe814e
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xe8103
xorl %esi, %esi
movl %esi, %edi
callq 0x6ede0
movq -0x18(%rbp), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
jne 0xe8103
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe81bb
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x490(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x498(%rax), %rdx
callq 0xe2300
cmpl $0x0, %eax
jge 0xe8130
jmp 0xe81b4
movq -0x18(%rbp), %rax
movq $0x0, 0x490(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x498(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xe818d
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x30(%rax)
jbe 0xe818d
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rsi
movslq -0x24(%rbp), %rdx
callq 0xe2300
cmpl $0x0, %eax
jge 0xe8184
jmp 0xe81b4
movl $0x0, -0x4(%rbp)
jmp 0xe81bb
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x490(%rax)
movslq -0x24(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x498(%rax)
movl $0x0, -0x4(%rbp)
jmp 0xe81bb
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_xrle_encode_free
void cram_xrle_encode_free(cram_codec *c) {
    if (!c) return;

    if (c->u.e_xrle.len_codec)
        c->u.e_xrle.len_codec->free(c->u.e_xrle.len_codec);
    if (c->u.e_xrle.lit_codec)
        c->u.e_xrle.lit_codec->free(c->u.e_xrle.lit_codec);

    cram_free_block(c->out);

    free(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xe81e5
jmp 0xe8246
movq -0x8(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0xe8206
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x78(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0xe8230
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x80(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x6f940
movq -0x8(%rbp), %rdi
callq 0x45a0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: get_one_bits_MSB
static int get_one_bits_MSB(cram_block *block) {
    int n = 0, b;
    if (block->byte >= block->uncomp_size)
        return -1;
    do {
        b = block->data[block->byte] >> block->bit;
        if (--block->bit == -1) {
            block->bit = 7;
            block->byte++;
            if (block->byte == block->uncomp_size && (b&1))
                return -1;
        }
        n++;
    } while (b&1);

    return n-1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x14(%rcx), %rcx
cmpq %rcx, %rax
jb 0xe8620
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe86bb
jmp 0xe8622
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movzbl (%rax,%rcx), %eax
movq -0x10(%rbp), %rcx
movl 0x38(%rcx), %ecx
sarl %cl, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movl 0x38(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x38(%rcx)
cmpl $-0x1, %eax
jne 0xe869a
movq -0x10(%rbp), %rax
movl $0x7, 0x38(%rax)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x14(%rcx), %rcx
cmpq %rcx, %rax
jne 0xe8698
movl -0x18(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xe8698
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe86bb
jmp 0xe869a
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xe8622
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_subexp_describe
int cram_subexp_describe(cram_codec *c, kstring_t *ks) {
    return ksprintf(ks, "SUBEXP(offset=%d,k=%d)",
                    c->u.subexp.offset,
                    c->u.subexp.k)
        < 0 ? -1 : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x60(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x64(%rax), %ecx
leaq 0x10844(%rip), %rsi     # 0xf8f5d
movb $0x0, %al
callq 0xb040
movl %eax, %edx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x0, %edx
cmovll %ecx, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_subexp_decode_init
cram_codec *cram_subexp_decode_init(cram_block_compression_hdr *hdr,
                                    char *data, int size,
                                    enum cram_encoding codec,
                                    enum cram_external_type option,
                                    int version, varint_vec *vv) {
    cram_codec *c;
    char *cp = data;

    if (option != E_INT) {
        hts_log_error("This codec only supports INT encodings");
        return NULL;
    }

    if (!(c = malloc(sizeof(*c))))
        return NULL;

    c->codec  = E_SUBEXP;
    c->decode = cram_subexp_decode;
    c->free   = cram_subexp_decode_free;
    c->describe = cram_subexp_describe;
    c->u.subexp.k = -1;

    c->u.subexp.offset = vv->varint_get32(&cp, data + size, NULL);
    c->u.subexp.k      = vv->varint_get32(&cp, data + size, NULL);

    if (cp - data != size || c->u.subexp.k < 0) {
        hts_log_error("Malformed subexp header stream");
        free(c);
        return NULL;
    }

    return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpl $0x1, -0x24(%rbp)
je 0xe8797
movl $0x1, %edi
leaq 0x107f8(%rip), %rsi     # 0xf8f74
leaq 0x10809(%rip), %rdx     # 0xf8f8c
movb $0x0, %al
callq 0x1b030
movq $0x0, -0x8(%rbp)
jmp 0xe8899
movl $0x880, %edi            # imm = 0x880
callq 0x4650
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0xe87b8
movq $0x0, -0x8(%rbp)
jmp 0xe8899
movq -0x30(%rbp), %rax
movl $0x7, (%rax)
movq -0x30(%rbp), %rax
leaq -0x3ed(%rip), %rcx      # 0xe83e0
movq %rcx, 0x28(%rax)
movq -0x30(%rbp), %rax
leaq -0x11c(%rip), %rcx      # 0xe86c0
movq %rcx, 0x20(%rax)
movq -0x30(%rbp), %rax
leaq -0xfb(%rip), %rcx       # 0xe86f0
movq %rcx, 0x58(%rax)
movq -0x30(%rbp), %rax
movl $0xffffffff, 0x64(%rax) # imm = 0xFFFFFFFF
movq 0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rcx
addq %rcx, %rsi
leaq -0x38(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %edx
callq *%rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x60(%rax)
movq 0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rcx
addq %rcx, %rsi
leaq -0x38(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %edx
callq *%rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x64(%rax)
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movslq -0x1c(%rbp), %rcx
cmpq %rcx, %rax
jne 0xe8864
movq -0x30(%rbp), %rax
cmpl $0x0, 0x64(%rax)
jge 0xe8891
movl $0x1, %edi
leaq 0x10704(%rip), %rsi     # 0xf8f74
leaq 0x1073c(%rip), %rdx     # 0xf8fb3
movb $0x0, %al
callq 0x1b030
movq -0x30(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x8(%rbp)
jmp 0xe8899
movq -0x30(%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/cram_codecs.c
// Function: cram_gamma_decode
int cram_gamma_decode(cram_slice *slice, cram_codec *c, cram_block *in, char *out, int *out_size) {
    int32_t *out_i = (int32_t *)out;
    int i, n;

    for (i = 0, n = *out_size; i < n; i++) {
        int nz = 0;
        int val;
        //while (get_bit_MSB(in) == 0) nz++;
        nz = get_zero_bits_MSB(in);
        if (cram_not_enough_bits(in, nz))
            return -1;
        val = 1;
        while (nz > 0) {
            //val <<= 1; val |= get_bit_MSB(in);
            GET_BIT_MSB(in, val);
            nz--;
        }

        out_i[i] = val - c->u.gamma.offset;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0xe89bd
movl $0x0, -0x44(%rbp)
movq -0x20(%rbp), %rdi
callq 0xe89d0
movl %eax, -0x44(%rbp)
movq -0x20(%rbp), %rdi
movl -0x44(%rbp), %esi
callq 0xe3860
cmpl $0x0, %eax
je 0xe8920
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe89c4
movl $0x1, -0x48(%rbp)
cmpl $0x0, -0x44(%rbp)
jle 0xe899a
movl -0x48(%rbp), %eax
shll %eax
movl %eax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x30(%rcx), %rcx
movzbl (%rax,%rcx), %eax
movq -0x20(%rbp), %rcx
movl 0x38(%rcx), %ecx
sarl %cl, %eax
andl $0x1, %eax
orl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
movq -0x20(%rbp), %rcx
movl 0x38(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x38(%rcx)
cmpl $0x0, %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
movslq %eax, %rcx
movq -0x20(%rbp), %rax
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rax
movl 0x38(%rax), %ecx
andl $0x7, %ecx
movl %ecx, 0x38(%rax)
movl -0x44(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xe8927
movl -0x48(%rbp), %edx
movq -0x18(%rbp), %rax
subl 0x60(%rax), %edx
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xe88e4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_gamma_decode_init
cram_codec *cram_gamma_decode_init(cram_block_compression_hdr *hdr,
                                   char *data, int size,
                                   enum cram_encoding codec,
                                   enum cram_external_type option,
                                   int version, varint_vec *vv) {
    cram_codec *c = NULL;
    char *cp = data;

    if (option != E_INT) {
        hts_log_error("This codec only supports INT encodings");
        return NULL;
    }

    if (size < 1)
        goto malformed;

    if (!(c = malloc(sizeof(*c))))
        return NULL;

    c->codec  = E_GAMMA;
    c->decode = cram_gamma_decode;
    c->free   = cram_gamma_decode_free;
    c->describe = cram_gamma_describe;

    c->u.gamma.offset = vv->varint_get32(&cp, data+size, NULL);

    if (cp - data != size)
        goto malformed;

    return c;

 malformed:
    hts_log_error("Malformed gamma header stream");
    free(c);
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpl $0x1, -0x24(%rbp)
je 0xe8b7f
movl $0x1, %edi
leaq 0x1047f(%rip), %rsi     # 0xf8fe3
leaq 0x10421(%rip), %rdx     # 0xf8f8c
movb $0x0, %al
callq 0x1b030
movq $0x0, -0x8(%rbp)
jmp 0xe8c53
cmpl $0x1, -0x1c(%rbp)
jge 0xe8b8a
jmp 0xe8c28
movl $0x880, %edi            # imm = 0x880
callq 0x4650
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0xe8bab
movq $0x0, -0x8(%rbp)
jmp 0xe8c53
movq -0x30(%rbp), %rax
movl $0x9, (%rax)
movq -0x30(%rbp), %rax
leaq -0x310(%rip), %rcx      # 0xe88b0
movq %rcx, 0x28(%rax)
movq -0x30(%rbp), %rax
leaq -0x11f(%rip), %rcx      # 0xe8ab0
movq %rcx, 0x20(%rax)
movq -0x30(%rbp), %rax
leaq -0xfe(%rip), %rcx       # 0xe8ae0
movq %rcx, 0x58(%rax)
movq 0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rcx
addq %rcx, %rsi
leaq -0x38(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %edx
callq *%rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x60(%rax)
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movslq -0x1c(%rbp), %rcx
cmpq %rcx, %rax
je 0xe8c1e
jmp 0xe8c28
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe8c53
movl $0x1, %edi
leaq 0x103af(%rip), %rsi     # 0xf8fe3
leaq 0x103bf(%rip), %rdx     # 0xf8ffa
movb $0x0, %al
callq 0x1b030
movq -0x30(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_huffman_decode_free
void cram_huffman_decode_free(cram_codec *c) {
    if (!c)
        return;

    if (c->u.huffman.codes)
        free(c->u.huffman.codes);
    free(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xe8c75
jmp 0xe8c96
movq -0x8(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0xe8c8d
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rdi
callq 0x45a0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_huffman_decode_char0
int cram_huffman_decode_char0(cram_slice *slice, cram_codec *c,
                              cram_block *in, char *out, int *out_size) {
    int i, n;

    if (!out)
        return 0;

    /* Special case of 0 length codes */
    for (i = 0, n = *out_size; i < n; i++) {
        out[i] = c->u.huffman.codes[0].symbol;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xe8ce8
movl $0x0, -0x4(%rbp)
jmp 0xe8d2a
movl $0x0, -0x34(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0xe8d23
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
movb %al, %dl
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xe8cf8
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_huffman_decode_int0
int cram_huffman_decode_int0(cram_slice *slice, cram_codec *c,
                             cram_block *in, char *out, int *out_size) {
    int32_t *out_i = (int32_t *)out;
    int i, n;
    const cram_huffman_code * const codes = c->u.huffman.codes;

    /* Special case of 0 length codes */
    for (i = 0, n = *out_size; i < n; i++) {
        out_i[i] = codes[0].symbol;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0xe8f63
movq -0x40(%rbp), %rax
movq (%rax), %rax
movl %eax, %edx
movq -0x30(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xe8f3c
xorl %eax, %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_huffman_decode_long0
int cram_huffman_decode_long0(cram_slice *slice, cram_codec *c,
                              cram_block *in, char *out, int *out_size) {
    int64_t *out_i = (int64_t *)out;
    int i, n;
    const cram_huffman_code * const codes = c->u.huffman.codes;

    /* Special case of 0 length codes */
    for (i = 0, n = *out_size; i < n; i++) {
        out_i[i] = codes[0].symbol;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0xe91a2
movq -0x40(%rbp), %rax
movq (%rax), %rdx
movq -0x30(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xe917c
xorl %eax, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_huffman_describe
int cram_huffman_describe(cram_codec *c, kstring_t *ks) {
    int r = 0, n;
    r |= ksprintf(ks, "HUFFMAN(codes={") < 0;
    for (n = 0; n < c->u.huffman.ncodes; n++) {
        r |= ksprintf(ks, "%s%"PRId64, n?",":"",
                      c->u.huffman.codes[n].symbol);
    }
    r |= ksprintf(ks, "},lengths={") < 0;
    for (n = 0; n < c->u.huffman.ncodes; n++) {
        r |= ksprintf(ks, "%s%d", n?",":"",
                      c->u.huffman.codes[n].len);
    }
    r |= ksprintf(ks, "})") < 0;
    return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xfc76(%rip), %rsi      # 0xf9018
movb $0x0, %al
callq 0xb040
cmpl $0x0, %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x60(%rcx), %eax
jge 0xe941e
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %ecx
leaq 0x6b9a(%rip), %rdx      # 0xeff75
leaq 0x9007(%rip), %rax      # 0xf23e9
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0x18(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
leaq 0xfc22(%rip), %rsi      # 0xf9028
movb $0x0, %al
callq 0xb040
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xe93c1
movq -0x10(%rbp), %rdi
leaq 0xfc05(%rip), %rsi      # 0xf902e
movb $0x0, %al
callq 0xb040
cmpl $0x0, %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x60(%rcx), %eax
jge 0xe94a5
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %ecx
leaq 0x6b13(%rip), %rdx      # 0xeff75
leaq 0x8f80(%rip), %rax      # 0xf23e9
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0x18(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
leaq 0xfbad(%rip), %rsi      # 0xf903a
movb $0x0, %al
callq 0xb040
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xe9448
movq -0x10(%rbp), %rdi
leaq 0xfb8f(%rip), %rsi      # 0xf903f
movb $0x0, %al
callq 0xb040
cmpl $0x0, %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: code_sort
static int code_sort(const void *vp1, const void *vp2) {
    const cram_huffman_code *c1 = (const cram_huffman_code *)vp1;
    const cram_huffman_code *c2 = (const cram_huffman_code *)vp2;

    if (c1->len != c2->len)
        return c1->len - c2->len;
    else
        return c1->symbol < c2->symbol ? -1 : (c1->symbol > c2->symbol ? 1 : 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x28(%rbp), %rcx
cmpl 0x10(%rcx), %eax
je 0xe9b5f
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x28(%rbp), %rcx
subl 0x10(%rcx), %eax
movl %eax, -0x4(%rbp)
jmp 0xe9b9d
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jge 0xe9b79
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x2c(%rbp)
jmp 0xe9b97
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movq -0x28(%rbp), %rax
movq (%rax), %rsi
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovgl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
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/cram_codecs.c
// Function: cram_huffman_encode_free
void cram_huffman_encode_free(cram_codec *c) {
    if (!c)
        return;

    if (c->u.e_huffman.codes)
        free(c->u.e_huffman.codes);
    free(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xea135
jmp 0xea156
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0xea14d
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x45a0
movq -0x8(%rbp), %rdi
callq 0x45a0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_byte_array_len_decode
int cram_byte_array_len_decode(cram_slice *slice, cram_codec *c,
                               cram_block *in, char *out,
                               int *out_size) {
    /* Fetch length */
    int32_t len = 0, one = 1;
    int r;

    r = c->u.byte_array_len.len_codec->decode(slice, c->u.byte_array_len.len_codec,
                                              in, (char *)&len, &one);
    //printf("ByteArray Len=%d\n", len);

    if (!r && c->u.byte_array_len.val_codec && len >= 0) {
        r = c->u.byte_array_len.val_codec->decode(slice,
                                                  c->u.byte_array_len.val_codec,
                                                  in, out, &len);
    } else {
        return -1;
    }

    *out_size = len;

    return r;
}

// 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 %r8, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x1, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq 0x60(%rcx), %rsi
movq -0x20(%rbp), %rdx
leaq -0x34(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq *%rax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jne 0xeaee5
movq -0x18(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0xeaee5
cmpl $0x0, -0x34(%rbp)
jl 0xeaee5
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq 0x68(%rcx), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq -0x34(%rbp), %r8
callq *%rax
movl %eax, -0x3c(%rbp)
jmp 0xeaeee
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xeaefd
movl -0x34(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_byte_array_len_decode_free
void cram_byte_array_len_decode_free(cram_codec *c) {
    if (!c) return;

    if (c->u.byte_array_len.len_codec)
        c->u.byte_array_len.len_codec->free(c->u.byte_array_len.len_codec);

    if (c->u.byte_array_len.val_codec)
        c->u.byte_array_len.val_codec->free(c->u.byte_array_len.val_codec);

    free(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xeaf25
jmp 0xeaf70
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0xeaf46
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x60(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0xeaf67
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x68(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rdi
callq 0x45a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_byte_array_len_describe
int cram_byte_array_len_describe(cram_codec *c, kstring_t *ks) {
    int r = 0;
    r |= ksprintf(ks, "BYTE_ARRAY_LEN(len_codec={") < 0;
    cram_byte_array_len_decoder *l = &c->u.byte_array_len;
    r |=  l->len_codec->describe
        ? l->len_codec->describe(l->len_codec, ks)
        : (ksprintf(ks, "?")<0);
    r |= ksprintf(ks, "},val_codec={") < 0;
    r |=  l->val_codec->describe
        ? l->val_codec->describe(l->val_codec, ks)
        : (ksprintf(ks, "?")<0);
    r |= ksprintf(ks, "}") < 0;

    return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xe334(%rip), %rsi      # 0xf92d6
movb $0x0, %al
callq 0xb040
cmpl $0x0, %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x58(%rax)
je 0xeaff1
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x58(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rdi
movq -0x10(%rbp), %rsi
callq *%rax
movl %eax, -0x24(%rbp)
jmp 0xeb011
movq -0x10(%rbp), %rdi
leaq 0x7521(%rip), %rsi      # 0xf251d
movb $0x0, %al
callq 0xb040
cmpl $0x0, %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xe2cc(%rip), %rsi      # 0xf92f1
movb $0x0, %al
callq 0xb040
cmpl $0x0, %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x58(%rax)
je 0xeb06b
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x58(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x10(%rbp), %rsi
callq *%rax
movl %eax, -0x28(%rbp)
jmp 0xeb08b
movq -0x10(%rbp), %rdi
leaq 0x74a7(%rip), %rsi      # 0xf251d
movb $0x0, %al
callq 0xb040
cmpl $0x0, %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x835c(%rip), %rsi      # 0xf33fb
movb $0x0, %al
callq 0xb040
cmpl $0x0, %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_byte_array_len_encode
int cram_byte_array_len_encode(cram_slice *slice, cram_codec *c,
                               char *in, int in_size) {
    int32_t i32 = in_size;
    int r = 0;

    r |= c->u.e_byte_array_len.len_codec->encode(slice,
                                                 c->u.e_byte_array_len.len_codec,
                                                 (char *)&i32, 1);
    r |= c->u.e_byte_array_len.val_codec->encode(slice,
                                                 c->u.e_byte_array_len.val_codec,
                                                 in, in_size);
    return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x78(%rcx), %rsi
leaq -0x20(%rbp), %rdx
movl $0x1, %ecx
callq *%rax
orl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x80(%rcx), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq *%rax
orl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_byte_array_len_encode_free
void cram_byte_array_len_encode_free(cram_codec *c) {
    if (!c)
        return;

    if (c->u.e_byte_array_len.len_codec)
        c->u.e_byte_array_len.len_codec->free(c->u.e_byte_array_len.len_codec);

    if (c->u.e_byte_array_len.val_codec)
        c->u.e_byte_array_len.val_codec->free(c->u.e_byte_array_len.val_codec);

    free(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xeb3a5
jmp 0xeb3f9
movq -0x8(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0xeb3c6
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x78(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0xeb3f0
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x80(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rdi
callq 0x45a0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_byte_array_len_encode_init
cram_codec *cram_byte_array_len_encode_init(cram_stats *st,
                                            enum cram_encoding codec,
                                            enum cram_external_type option,
                                            void *dat,
                                            int version, varint_vec *vv) {
    cram_codec *c;
    cram_byte_array_len_encoder *e = (cram_byte_array_len_encoder *)dat;

    c = malloc(sizeof(*c));
    if (!c)
        return NULL;
    c->codec = E_BYTE_ARRAY_LEN;
    c->free = cram_byte_array_len_encode_free;
    c->encode = cram_byte_array_len_encode;
    c->store = cram_byte_array_len_encode_store;
    c->flush = NULL;

    c->u.e_byte_array_len.len_codec = cram_encoder_init(e->len_encoding,
                                                        st, E_INT,
                                                        e->len_dat,
                                                        version, vv);
    c->u.e_byte_array_len.val_codec = cram_encoder_init(e->val_encoding,
                                                        NULL, E_BYTE_ARRAY,
                                                        e->val_dat,
                                                        version, vv);

    if (!c->u.e_byte_array_len.len_codec ||
        !c->u.e_byte_array_len.val_codec) {
        cram_byte_array_len_encode_free(c);
        return NULL;
    }

    return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x880, %edi            # imm = 0x880
callq 0x4650
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xeb648
movq $0x0, -0x8(%rbp)
jmp 0xeb721
movq -0x38(%rbp), %rax
movl $0x4, (%rax)
movq -0x38(%rbp), %rax
leaq -0x2cd(%rip), %rcx      # 0xeb390
movq %rcx, 0x20(%rax)
movq -0x38(%rbp), %rax
leaq -0x36c(%rip), %rcx      # 0xeb300
movq %rcx, 0x30(%rax)
movq -0x38(%rbp), %rax
leaq -0x27b(%rip), %rcx      # 0xeb400
movq %rcx, 0x38(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x40(%rbp), %rax
movl (%rax), %edi
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rcx
movl -0x24(%rbp), %r8d
movq -0x30(%rbp), %r9
movl $0x1, %edx
callq 0xe5a20
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x40(%rbp), %rax
movl 0x4(%rax), %edi
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rcx
movl -0x24(%rbp), %r8d
movq -0x30(%rbp), %r9
xorl %eax, %eax
movl %eax, %esi
movl $0x4, %edx
callq 0xe5a20
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0xeb706
movq -0x38(%rbp), %rax
cmpq $0x0, 0x80(%rax)
jne 0xeb719
movq -0x38(%rbp), %rdi
callq 0xeb390
movq $0x0, -0x8(%rbp)
jmp 0xeb721
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_byte_array_stop_describe
int cram_byte_array_stop_describe(cram_codec *c, kstring_t *ks) {
    return ksprintf(ks, "BYTE_ARRAY_STOP(stop=%d,id=%d)",
                    c->u.byte_array_stop.stop,
                    c->u.byte_array_stop.content_id)
        < 0 ? -1 : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movzbl 0x60(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x64(%rax), %ecx
leaq 0xd94c(%rip), %rsi      # 0xf9346
movb $0x0, %al
callq 0xb040
movl %eax, %edx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x0, %edx
cmovll %ecx, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_byte_array_stop_encode
int cram_byte_array_stop_encode(cram_slice *slice, cram_codec *c,
                                char *in, int in_size) {
    BLOCK_APPEND(c->out, in, in_size);
    BLOCK_APPEND_CHAR(c->out, c->u.e_byte_array_stop.stop);
    return 0;

 block_err:
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rsi
movslq -0x24(%rbp), %rdx
callq 0xe2300
cmpl $0x0, %eax
jge 0xebe43
jmp 0xebe68
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movsbl 0x60(%rax), %esi
callq 0xebe80
cmpl $0x0, %eax
jge 0xebe5f
jmp 0xebe68
movl $0x0, -0x4(%rbp)
jmp 0xebe6f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_byte_array_stop_encode_init
cram_codec *cram_byte_array_stop_encode_init(cram_stats *st,
                                             enum cram_encoding codec,
                                             enum cram_external_type option,
                                             void *dat,
                                             int version, varint_vec *vv) {
    cram_codec *c;

    c = malloc(sizeof(*c));
    if (!c)
        return NULL;
    c->codec = E_BYTE_ARRAY_STOP;
    c->free = cram_byte_array_stop_encode_free;
    c->encode = cram_byte_array_stop_encode;
    c->store = cram_byte_array_stop_encode_store;
    c->flush = NULL;

    c->u.e_byte_array_stop.stop = ((int *)dat)[0];
    c->u.e_byte_array_stop.content_id = ((int *)dat)[1];

    return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movl $0x880, %edi            # imm = 0x880
callq 0x4650
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xec1bd
movq $0x0, -0x8(%rbp)
jmp 0xec225
movq -0x38(%rbp), %rax
movl $0x5, (%rax)
movq -0x38(%rbp), %rax
leaq -0x2f2(%rip), %rcx      # 0xebee0
movq %rcx, 0x20(%rax)
movq -0x38(%rbp), %rax
leaq -0x3d1(%rip), %rcx      # 0xebe10
movq %rcx, 0x30(%rax)
movq -0x38(%rbp), %rax
leaq -0x2e0(%rip), %rcx      # 0xebf10
movq %rcx, 0x38(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movb %al, %cl
movq -0x38(%rbp), %rax
movb %cl, 0x60(%rax)
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x64(%rax)
movq -0x38(%rbp), %rax
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/cram_codecs.c
// Function: cram_encoding2str
const char *cram_encoding2str(enum cram_encoding t) {
    switch (t) {
    case E_NULL:            return "NULL";
    case E_EXTERNAL:        return "EXTERNAL";
    case E_GOLOMB:          return "GOLOMB";
    case E_HUFFMAN:         return "HUFFMAN";
    case E_BYTE_ARRAY_LEN:  return "BYTE_ARRAY_LEN";
    case E_BYTE_ARRAY_STOP: return "BYTE_ARRAY_STOP";
    case E_BETA:            return "BETA";
    case E_SUBEXP:          return "SUBEXP";
    case E_GOLOMB_RICE:     return "GOLOMB_RICE";
    case E_GAMMA:           return "GAMMA";

    case E_VARINT_UNSIGNED: return "VARINT_UNSIGNED";
    case E_VARINT_SIGNED:   return "VARINT_SIGNED";
    case E_CONST_BYTE:      return "CONST_BYTE";
    case E_CONST_INT:       return "CONST_INT";

    case E_NUM_CODECS:
    default:                return "?";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x36, %rax
ja 0xec323
movq -0x18(%rbp), %rax
leaq 0xc8a5(%rip), %rcx      # 0xf8af8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x485b(%rip), %rax      # 0xf0abe
movq %rax, -0x8(%rbp)
jmp 0xec32e
leaq 0x9574(%rip), %rax      # 0xf57e7
movq %rax, -0x8(%rbp)
jmp 0xec32e
leaq 0xd15f(%rip), %rax      # 0xf93e2
movq %rax, -0x8(%rbp)
jmp 0xec32e
leaq 0xd156(%rip), %rax      # 0xf93e9
movq %rax, -0x8(%rbp)
jmp 0xec32e
leaq 0xd14e(%rip), %rax      # 0xf93f1
movq %rax, -0x8(%rbp)
jmp 0xec32e
leaq 0xd14d(%rip), %rax      # 0xf9400
movq %rax, -0x8(%rbp)
jmp 0xec32e
leaq 0xd150(%rip), %rax      # 0xf9410
movq %rax, -0x8(%rbp)
jmp 0xec32e
leaq 0xd148(%rip), %rax      # 0xf9415
movq %rax, -0x8(%rbp)
jmp 0xec32e
leaq 0xd142(%rip), %rax      # 0xf941c
movq %rax, -0x8(%rbp)
jmp 0xec32e
leaq 0xd141(%rip), %rax      # 0xf9428
movq %rax, -0x8(%rbp)
jmp 0xec32e
leaq 0xd13a(%rip), %rax      # 0xf942e
movq %rax, -0x8(%rbp)
jmp 0xec32e
leaq 0xd13d(%rip), %rax      # 0xf943e
movq %rax, -0x8(%rbp)
jmp 0xec32e
leaq 0xd13e(%rip), %rax      # 0xf944c
movq %rax, -0x8(%rbp)
jmp 0xec32e
leaq 0xd13c(%rip), %rax      # 0xf9457
movq %rax, -0x8(%rbp)
jmp 0xec32e
jmp 0xec323
leaq 0x61f3(%rip), %rax      # 0xf251d
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_codec_to_id
int cram_codec_to_id(cram_codec *c, int *id2) {
    int bnum1, bnum2 = -2;

    switch (c->codec) {
    case E_CONST_INT:
    case E_CONST_BYTE:
        bnum1 = -2; // no blocks used
        break;

    case E_HUFFMAN:
        bnum1 = c->u.huffman.ncodes == 1 ? -2 : -1;
        break;

    case E_GOLOMB:
    case E_BETA:
    case E_SUBEXP:
    case E_GOLOMB_RICE:
    case E_GAMMA:
        // CORE block
        bnum1 = -1;
        break;

    case E_EXTERNAL:
    case E_VARINT_UNSIGNED:
    case E_VARINT_SIGNED:
        bnum1 = c->u.external.content_id;
        break;

    case E_BYTE_ARRAY_LEN:
        bnum1 = cram_codec_to_id(c->u.byte_array_len.len_codec, NULL);
        bnum2 = cram_codec_to_id(c->u.byte_array_len.val_codec, NULL);
        break;

    case E_BYTE_ARRAY_STOP:
        bnum1 = c->u.byte_array_stop.content_id;
        break;

    case E_NULL:
        bnum1 = -2;
        break;

    default:
        hts_log_error("Unknown codec type %d", c->codec);
        bnum1 = -1;
    }

    if (id2)
        *id2 = bnum2;
    return bnum1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0xfffffffe, -0x18(%rbp) # imm = 0xFFFFFFFE
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x20(%rbp)
subq $0x2c, %rax
ja 0xec3fb
movq -0x20(%rbp), %rax
leaq 0xc85e(%rip), %rcx      # 0xf8bd4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xfffffffe, -0x14(%rbp) # imm = 0xFFFFFFFE
jmp 0xec422
movq -0x8(%rbp), %rax
movl 0x60(%rax), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmpl $0x1, %edx
cmovel %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0xec422
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
jmp 0xec422
movq -0x8(%rbp), %rax
movl 0x60(%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0xec422
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xec340
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xec340
movl %eax, -0x18(%rbp)
jmp 0xec422
movq -0x8(%rbp), %rax
movl 0x64(%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0xec422
movl $0xfffffffe, -0x14(%rbp) # imm = 0xFFFFFFFE
jmp 0xec422
movq -0x8(%rbp), %rax
movl (%rax), %ecx
movl $0x1, %edi
leaq 0xd0bd(%rip), %rsi      # 0xf94ca
leaq 0xd0c7(%rip), %rdx      # 0xf94db
movb $0x0, %al
callq 0x1b030
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
cmpq $0x0, -0x10(%rbp)
je 0xec432
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_codec_describe
int cram_codec_describe(cram_codec *c, kstring_t *ks) {
    if (c && c->describe)
        return c->describe(c, ks);
    else
        return ksprintf(ks, "?");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xecb39
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0xecb39
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
movl %eax, -0x4(%rbp)
jmp 0xecb4e
movq -0x18(%rbp), %rdi
leaq 0x59d9(%rip), %rsi      # 0xf251d
movb $0x0, %al
callq 0xb040
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/giometti[P]mastering_UNIX_programming/chapter_07/fmemopen.c
// Function: dump
void dump(FILE *fp)
{
	int c;
	while ((c = fgetc(fp)) != EOF)
		printf("%c", c);
	printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1070
movl %eax, -0xc(%rbp)
cmpl $-0x1, %eax
je 0x11d0
movl -0xc(%rbp), %esi
leaq 0xe3d(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1050
jmp 0x11ac
leaq 0xe6c(%rip), %rdi       # 0x2043
movb $0x0, %al
callq 0x1050
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/giometti[P]mastering_UNIX_programming/chapter_07/fmemopen.c
// Function: main
int main(void)
{
	FILE *fp;

	fp = fmemopen(buf, BUF_SIZE, "r+");
	if (!fp) {
		perror("fmemopen");
		return -1;
	}

	/* Write something in the stream */
	fprintf(fp, "the buffer is %d bytes long\n", BUF_SIZE);

	/* Rewind the "current position" pointer */
	rewind(fp);

	printf("Data in the stream:\n");
	dump(fp);

	fclose(fp);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
leaq 0x2e6a(%rip), %rdi      # 0x4070
movl $0x100, %esi            # imm = 0x100
leaq 0xdf5(%rip), %rdx       # 0x2007
callq 0x1030
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1237
leaq 0xde1(%rip), %rdi       # 0x200a
callq 0x1090
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x127e
movq -0x10(%rbp), %rdi
leaq 0xdd1(%rip), %rsi       # 0x2013
movl $0x100, %edx            # imm = 0x100
movb $0x0, %al
callq 0x1080
movq -0x10(%rbp), %rdi
callq 0x1060
leaq 0xdd2(%rip), %rdi       # 0x2030
movb $0x0, %al
callq 0x1050
movq -0x10(%rbp), %rdi
callq 0x11a0
movq -0x10(%rbp), %rdi
callq 0x1040
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq