LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_const_decode_byte
int cram_const_decode_byte(cram_slice *slice, cram_codec *c,
                           cram_block *in, char *out, int *out_size) {
    int i, n;

    for (i = 0, n = *out_size; i < n; i++)
        out[i] = c->u.xconst.val;

    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)
movl $0x0, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0xe3280
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movb %al, %dl
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xe3258
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_const_decode_int
int cram_const_decode_int(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++)
        out_i[i] = c->u.xconst.val;

    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)
movl $0x0, -0x34(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0xe32e8
movq -0x10(%rbp), %rax
movq 0x60(%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 0xe32c0
xorl %eax, %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_const_decode_long
int cram_const_decode_long(cram_slice *slice, cram_codec *c,
                           cram_block *in, char *out, int *out_size) {
    int64_t *out_i = (int64_t *)out;
    int i, n;

    for (i = 0, n = *out_size; i < n; i++)
        out_i[i] = c->u.xconst.val;

    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)
movl $0x0, -0x34(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0xe3347
movq -0x10(%rbp), %rax
movq 0x60(%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 0xe3320
xorl %eax, %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_const_decode_init
cram_codec *cram_const_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 (!(c = malloc(sizeof(*c))))
        return NULL;

    c->codec  = codec;
    if (codec == E_CONST_BYTE)
        c->decode = cram_const_decode_byte;
    else if (option == E_INT)
        c->decode = cram_const_decode_int;
    else
        c->decode = cram_const_decode_long;
    c->free   = cram_const_decode_free;
    c->size   = cram_const_decode_size;
    c->get_block = NULL;
    c->describe = cram_const_describe;

    c->u.xconst.val = vv->varint_get64s(&cp, data+size, NULL);

    if (cp - data != size) {
        fprintf(stderr, "Malformed const header stream\n");
        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)
movl $0x880, %edi            # imm = 0x880
callq 0x4650
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0xe341b
movq $0x0, -0x8(%rbp)
jmp 0xe350b
movl -0x20(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x2b, -0x20(%rbp)
jne 0xe343b
movq -0x30(%rbp), %rax
leaq -0x205(%rip), %rcx      # 0xe3230
movq %rcx, 0x28(%rax)
jmp 0xe3463
cmpl $0x1, -0x24(%rbp)
jne 0xe3452
movq -0x30(%rbp), %rax
leaq -0x1bc(%rip), %rcx      # 0xe3290
movq %rcx, 0x28(%rax)
jmp 0xe3461
movq -0x30(%rbp), %rax
leaq -0x16d(%rip), %rcx      # 0xe32f0
movq %rcx, 0x28(%rax)
jmp 0xe3463
movq -0x30(%rbp), %rax
leaq -0x11e(%rip), %rcx      # 0xe3350
movq %rcx, 0x20(%rax)
movq -0x30(%rbp), %rax
leaq -0xfd(%rip), %rcx       # 0xe3380
movq %rcx, 0x40(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x30(%rbp), %rax
leaq -0x108(%rip), %rcx      # 0xe3390
movq %rcx, 0x58(%rax)
movq 0x10(%rbp), %rax
movq 0x30(%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
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movslq -0x1c(%rbp), %rcx
cmpq %rcx, %rax
je 0xe3503
movq 0x29b01(%rip), %rax     # 0x10cfe0
movq (%rax), %rdi
leaq 0x15906(%rip), %rsi     # 0xf8def
movb $0x0, %al
callq 0x46d0
movq -0x30(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x8(%rbp)
jmp 0xe350b
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_const_encode_store
int cram_const_encode_store(cram_codec *c, cram_block *b, char *prefix,
                            int version) {
    char tmp[99], *tp = tmp;
    int len = 0;

    if (prefix) {
        size_t l = strlen(prefix);
        BLOCK_APPEND(b, prefix, l);
        len += l;
    }

    tp += c->vv->varint_put64s(tp, NULL, c->u.xconst.val);
    len += c->vv->varint_put32_blk(b, c->codec);
    len += c->vv->varint_put32_blk(b, tp-tmp);
    BLOCK_APPEND(b, tmp, tp-tmp);
    len += tp-tmp;

    return len;

 block_err:
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
leaq -0x90(%rbp), %rax
movq %rax, -0x98(%rbp)
movl $0x0, -0x9c(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xe35be
movq -0x20(%rbp), %rdi
callq 0x41b0
movq %rax, -0xa8(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0xa8(%rbp), %rdx
callq 0xe2300
cmpl $0x0, %eax
jge 0xe35a7
jmp 0xe369e
movq -0xa8(%rbp), %rcx
movslq -0x9c(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x9c(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x50(%rax), %rax
movq -0x98(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x60(%rcx), %rdx
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movl %eax, %ecx
movq -0x98(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x58(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl (%rcx), %esi
callq *%rax
addl -0x9c(%rbp), %eax
movl %eax, -0x9c(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x58(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x98(%rbp), %rcx
leaq -0x90(%rbp), %rdx
subq %rdx, %rcx
movl %ecx, %esi
callq *%rax
addl -0x9c(%rbp), %eax
movl %eax, -0x9c(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x90(%rbp), %rsi
movq -0x98(%rbp), %rdx
leaq -0x90(%rbp), %rax
subq %rax, %rdx
callq 0xe2300
cmpl $0x0, %eax
jge 0xe3672
jmp 0xe369e
movq -0x98(%rbp), %rcx
leaq -0x90(%rbp), %rax
subq %rax, %rcx
movslq -0x9c(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x9c(%rbp)
movl -0x9c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xe36a5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_const_encode_init
cram_codec *cram_const_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 = codec;
    c->free = cram_const_decode_free; // as as decode
    c->encode = cram_const_encode; // a nop
    c->store = cram_const_encode_store;
    c->flush = NULL;
    c->u.e_xconst.val = st->min_val;

    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 0xe36fc
movq $0x0, -0x8(%rbp)
jmp 0xe3759
movl -0x14(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
leaq -0x3c0(%rip), %rcx      # 0xe3350
movq %rcx, 0x20(%rax)
movq -0x38(%rbp), %rax
leaq -0x1ff(%rip), %rcx      # 0xe3520
movq %rcx, 0x30(%rax)
movq -0x38(%rbp), %rax
leaq -0x1ee(%rip), %rcx      # 0xe3540
movq %rcx, 0x38(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x10(%rbp), %rax
movq 0x1010(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x38(%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_beta_decode_long
int cram_beta_decode_long(cram_slice *slice, cram_codec *c, cram_block *in, char *out, int *out_size) {
    int64_t *out_i = (int64_t *)out;
    int i, n = *out_size;

    if (c->u.beta.nbits) {
        if (cram_not_enough_bits(in, c->u.beta.nbits * n))
            return -1;

        for (i = 0; i < n; i++)
            out_i[i] = get_bits_MSB(in, c->u.beta.nbits) - c->u.beta.offset;
    } else {
        for (i = 0; i < n; i++)
            out_i[i] = -c->u.beta.offset;
    }

    return 0;
}

// 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)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0xe3812
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x64(%rax), %esi
imull -0x40(%rbp), %esi
callq 0xe3860
cmpl $0x0, %eax
je 0xe37cc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe384d
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0xe3810
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x64(%rax), %esi
callq 0xe38f0
movq %rax, %rdx
movq -0x18(%rbp), %rax
movslq 0x60(%rax), %rax
subq %rax, %rdx
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xe37d3
jmp 0xe3846
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0xe3844
movq -0x18(%rbp), %rcx
xorl %eax, %eax
subl 0x60(%rcx), %eax
movslq %eax, %rdx
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xe3819
jmp 0xe3846
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.h
// Function: cram_not_enough_bits
static inline int cram_not_enough_bits(cram_block *blk, int nbits) {
    if (nbits < 0 ||
        (blk->byte >= blk->uncomp_size && nbits > 0) ||
        (blk->uncomp_size - blk->byte <= INT32_MAX / 8 + 1 &&
         (blk->uncomp_size - blk->byte) * 8 + blk->bit - 7 < nbits)) {
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0xe38d0
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x14(%rcx), %rcx
cmpq %rcx, %rax
jb 0xe388c
cmpl $0x0, -0x14(%rbp)
jg 0xe38d0
movq -0x10(%rbp), %rax
movslq 0x14(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x30(%rcx), %rax
cmpq $0x10000000, %rax       # imm = 0x10000000
ja 0xe38d9
movq -0x10(%rbp), %rax
movslq 0x14(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x30(%rcx), %rax
shlq $0x3, %rax
movq -0x10(%rbp), %rcx
movslq 0x38(%rcx), %rcx
addq %rcx, %rax
subq $0x7, %rax
movslq -0x14(%rbp), %rcx
cmpq %rcx, %rax
jae 0xe38d9
movl $0x1, -0x4(%rbp)
jmp 0xe38e0
movl $0x0, -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_beta_decode_int
int cram_beta_decode_int(cram_slice *slice, cram_codec *c, cram_block *in, char *out, int *out_size) {
    int32_t *out_i = (int32_t *)out;
    int i, n = *out_size;

    if (c->u.beta.nbits) {
        if (cram_not_enough_bits(in, c->u.beta.nbits * n))
            return -1;

        for (i = 0; i < n; i++)
            out_i[i] = get_bits_MSB(in, c->u.beta.nbits) - c->u.beta.offset;
    } else {
        for (i = 0; i < n; i++)
            out_i[i] = -c->u.beta.offset;
    }

    return 0;
}

// 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)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0xe3e3d
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x64(%rax), %esi
imull -0x40(%rbp), %esi
callq 0xe3860
cmpl $0x0, %eax
je 0xe3df9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe3e74
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0xe3e3b
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x64(%rax), %esi
callq 0xe38f0
movq -0x18(%rbp), %rcx
movslq 0x60(%rcx), %rcx
subq %rcx, %rax
movl %eax, %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 0xe3e00
jmp 0xe3e6d
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0xe3e6b
movq -0x18(%rbp), %rax
xorl %edx, %edx
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 0xe3e44
jmp 0xe3e6d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_beta_decode_char
int cram_beta_decode_char(cram_slice *slice, cram_codec *c, cram_block *in, char *out, int *out_size) {
    int i, n = *out_size;


    if (c->u.beta.nbits) {
        if (cram_not_enough_bits(in, c->u.beta.nbits * n))
            return -1;

        if (out)
            for (i = 0; i < n; i++)
                out[i] = get_bits_MSB(in, c->u.beta.nbits) - c->u.beta.offset;
        else
            for (i = 0; i < n; i++)
                get_bits_MSB(in, c->u.beta.nbits);
    } else {
        if (out)
            for (i = 0; i < n; i++)
                out[i] = -c->u.beta.offset;
    }

    return 0;
}

// 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)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0xe3f51
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x64(%rax), %esi
imull -0x38(%rbp), %esi
callq 0xe3860
cmpl $0x0, %eax
je 0xe3ed8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe3f93
cmpq $0x0, -0x28(%rbp)
je 0xe3f23
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0xe3f21
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x64(%rax), %esi
callq 0xe38f0
movq -0x18(%rbp), %rcx
movslq 0x60(%rcx), %rcx
subq %rcx, %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 0xe3ee6
jmp 0xe3f4f
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0xe3f4d
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x64(%rax), %esi
callq 0xe38f0
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xe3f2a
jmp 0xe3f4f
jmp 0xe3f8c
cmpq $0x0, -0x28(%rbp)
je 0xe3f8a
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0xe3f88
movq -0x18(%rbp), %rcx
xorl %eax, %eax
subl 0x60(%rcx), %eax
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 0xe3f5f
jmp 0xe3f8a
jmp 0xe3f8c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_beta_encode_store
int cram_beta_encode_store(cram_codec *c, cram_block *b,
                           char *prefix, int version) {
    int len = 0, r = 0, n;

    if (prefix) {
        size_t l = strlen(prefix);
        BLOCK_APPEND(b, prefix, l);
        len += l;
    }

    len += (n = c->vv->varint_put32_blk(b, c->codec)); r |= n;
    // codec length
    len += (n = c->vv->varint_put32_blk(b, c->vv->varint_size(c->u.e_beta.offset)
                                         + c->vv->varint_size(c->u.e_beta.nbits)));
    r |= n;
    len += (n = c->vv->varint_put32_blk(b, c->u.e_beta.offset)); r |= n;
    len += (n = c->vv->varint_put32_blk(b, c->u.e_beta.nbits));  r |= n;

    if (r > 0) return len;

 block_err:
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xe4262
movq -0x20(%rbp), %rdi
callq 0x41b0
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0xe2300
cmpl $0x0, %eax
jge 0xe4254
jmp 0xe435c
movq -0x38(%rbp), %rcx
movslq -0x28(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x58(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl (%rcx), %esi
callq *%rax
movl %eax, -0x30(%rbp)
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x30(%rbp), %eax
orl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x58(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x78(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x60(%rcx), %rdi
callq *%rax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x78(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x64(%rcx), %rdi
callq *%rax
movl -0x4c(%rbp), %esi
movq -0x48(%rbp), %rdi
movl %eax, %ecx
movq -0x40(%rbp), %rax
addl %ecx, %esi
callq *%rax
movl %eax, -0x30(%rbp)
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x30(%rbp), %eax
orl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x58(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl 0x60(%rcx), %esi
callq *%rax
movl %eax, -0x30(%rbp)
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x30(%rbp), %eax
orl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x58(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl 0x64(%rcx), %esi
callq *%rax
movl %eax, -0x30(%rbp)
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x30(%rbp), %eax
orl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jle 0xe435a
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xe4363
jmp 0xe435c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
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_beta_encode_long
int cram_beta_encode_long(cram_slice *slice, cram_codec *c,
                          char *in, int in_size) {
    int64_t *syms = (int64_t *)in;
    int i, r = 0;

    for (i = 0; i < in_size; i++)
        r |= store_bits_MSB(c->out, syms[i] + c->u.e_beta.offset,
                            c->u.e_beta.nbits);

    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)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0xe43e1
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x10(%rbp), %rax
movslq 0x60(%rax), %rax
addq %rax, %rsi
movq -0x10(%rbp), %rax
movl 0x64(%rax), %edx
callq 0xe43f0
orl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xe439d
movl -0x30(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_beta_encode_int
int cram_beta_encode_int(cram_slice *slice, cram_codec *c,
                         char *in, int in_size) {
    int *syms = (int *)in;
    int i, r = 0;

    for (i = 0; i < in_size; i++)
        r |= store_bits_MSB(c->out, syms[i] + c->u.e_beta.offset,
                            c->u.e_beta.nbits);

    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)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0xe46ef
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
addl 0x60(%rcx), %eax
movslq %eax, %rsi
movq -0x10(%rbp), %rax
movl 0x64(%rax), %edx
callq 0xe43f0
orl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xe46ad
movl -0x30(%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_beta_encode_char
int cram_beta_encode_char(cram_slice *slice, cram_codec *c,
                          char *in, int in_size) {
    unsigned char *syms = (unsigned char *)in;
    int i, r = 0;

    for (i = 0; i < in_size; i++)
        r |= store_bits_MSB(c->out, syms[i] + c->u.e_beta.offset,
                            c->u.e_beta.nbits);

    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)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0xe4770
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x10(%rbp), %rcx
addl 0x60(%rcx), %eax
movslq %eax, %rsi
movq -0x10(%rbp), %rax
movl 0x64(%rax), %edx
callq 0xe43f0
orl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xe472d
movl -0x30(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_xpack_decode_long
int cram_xpack_decode_long(cram_slice *slice, cram_codec *c, cram_block *in, char *out, int *out_size) {
    int64_t *out_i = (int64_t *)out;
    int i, n = *out_size;

    if (c->u.xpack.nbits) {
        for (i = 0; i < n; i++)
            out_i[i] = c->u.xpack.rmap[get_bits_MSB(in, c->u.xpack.nbits)];
    } else {
        for (i = 0; i < n; i++)
            out_i[i] = c->u.xpack.rmap[0];
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
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 -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x60(%rax)
je 0xe4af4
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0xe4af2
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x60(%rax), %esi
callq 0xe38f0
movq %rax, %rcx
movq -0x40(%rbp), %rax
movl 0x7c(%rax,%rcx,4), %eax
movl %eax, %edx
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 0xe4aae
jmp 0xe4b25
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0xe4b23
movq -0x10(%rbp), %rax
movl 0x7c(%rax), %eax
movl %eax, %edx
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 0xe4afb
jmp 0xe4b25
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_xpack_decode_int
int cram_xpack_decode_int(cram_slice *slice, cram_codec *c, cram_block *in, char *out, int *out_size) {
    int32_t *out_i = (int32_t *)out;
    int i, n = *out_size;

    if (c->u.xpack.nbits) {
        if (cram_not_enough_bits(in, c->u.xpack.nbits * n))
            return -1;

        for (i = 0; i < n; i++)
            out_i[i] = c->u.xpack.rmap[get_bits_MSB(in, c->u.xpack.nbits)];
    } else {
        for (i = 0; i < n; i++)
            out_i[i] = c->u.xpack.rmap[0];
    }

    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)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x60(%rax)
je 0xe4bd3
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x60(%rax), %esi
imull -0x40(%rbp), %esi
callq 0xe3860
cmpl $0x0, %eax
je 0xe4b89
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe4c08
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0xe4bd1
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x60(%rax), %esi
callq 0xe38f0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movl 0x7c(%rax,%rcx,4), %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 0xe4b90
jmp 0xe4c01
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0xe4bff
movq -0x18(%rbp), %rax
movl 0x7c(%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 0xe4bda
jmp 0xe4c01
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_xpack_decode_char
int cram_xpack_decode_char(cram_slice *slice, cram_codec *c, cram_block *in, char *out, int *out_size) {
    // FIXME: we need to ban data-series interleaving in the spec for this to work.

    // Remember this may be called when threaded and multi-slice per container.
    // Hence one cram_codec instance, multiple slices, multiple blocks.
    // We therefore have to cache appropriate block info in slice and not codec.
    //    b = cram_get_block_by_id(slice, c->external.content_id);
    if (c->u.xpack.nval > 1) {
        cram_xpack_decode_expand_char(slice, c);
        cram_block *b = slice->block_by_id[512 + c->codec_id];
        if (!b)
            return -1;

        if (out)
            memcpy(out, b->data + b->byte, *out_size);
        b->byte += *out_size;
    } else {
        memset(out, c->u.xpack.rmap[0], *out_size);
    }

    return 0;
}

// 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)
movq -0x18(%rbp), %rax
cmpl $0x1, 0x78(%rax)
jle 0xe4cbf
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xe4cf0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x18(%rcx), %ecx
addl $0x200, %ecx            # imm = 0x200
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xe4c83
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe4ce0
cmpq $0x0, -0x28(%rbp)
je 0xe4caa
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x38(%rbp), %rax
addq 0x30(%rax), %rsi
movq -0x30(%rbp), %rax
movslq (%rax), %rdx
callq 0x43b0
movq -0x30(%rbp), %rax
movslq (%rax), %rcx
movq -0x38(%rbp), %rax
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
jmp 0xe4cd9
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x7c(%rax), %eax
movq -0x30(%rbp), %rcx
movslq (%rcx), %rdx
movzbl %al, %esi
callq 0x4250
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_xpack_decode_expand_char
static int cram_xpack_decode_expand_char(cram_slice *slice, cram_codec *c) {
    cram_block *b = slice->block_by_id[512 + c->codec_id];
    if (b)
        return 0;

    // get sub-codec data.
    cram_block *sub_b = c->u.xpack.sub_codec->get_block(slice, c->u.xpack.sub_codec);
    if (!sub_b)
        return -1;

    // Allocate local block to expand into
    b = slice->block_by_id[512 + c->codec_id] = cram_new_block(0, 0);
    if (!b)
        return -1;
    int n = sub_b->uncomp_size * 8/c->u.xpack.nbits;
    BLOCK_GROW(b, n);
    b->uncomp_size = n;

    uint8_t p[256];
    int z;
    for (z = 0; z < 256; z++)
        p[z] = c->u.xpack.rmap[z];
    hts_unpack(sub_b->data, sub_b->uncomp_size, b->data, b->uncomp_size,
               8 / c->u.xpack.nbits, p);

    return 0;

 block_err:
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x18(%rcx), %ecx
addl $0x200, %ecx            # imm = 0x200
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xe4d36
movl $0x0, -0x4(%rbp)
jmp 0xe4e7a
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x50(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq 0x70(%rcx), %rsi
callq *%rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xe4d67
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe4e7a
xorl %esi, %esi
movl %esi, %edi
callq 0x6ede0
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq -0x18(%rbp), %rdx
movl 0x18(%rdx), %edx
addl $0x200, %edx            # imm = 0x200
movslq %edx, %rdx
movq %rax, (%rcx,%rdx,8)
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xe4da3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe4e7a
movq -0x28(%rbp), %rax
movl 0x14(%rax), %eax
shll $0x3, %eax
movq -0x18(%rbp), %rcx
cltd
idivl 0x60(%rcx)
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
callq 0xeb970
cmpl $0x0, %eax
jge 0xe4dcf
jmp 0xe4e73
movl -0x2c(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x14(%rax)
movl $0x0, -0x134(%rbp)
cmpl $0x100, -0x134(%rbp)    # imm = 0x100
jge 0xe4e1f
movq -0x18(%rbp), %rax
movslq -0x134(%rbp), %rcx
movl 0x7c(%rax,%rcx,4), %eax
movb %al, %cl
movslq -0x134(%rbp), %rax
movb %cl, -0x130(%rbp,%rax)
movl -0x134(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x134(%rbp)
jmp 0xe4de3
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x28(%rbp), %rax
movslq 0x14(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x140(%rbp)
movq -0x20(%rbp), %rax
movslq 0x14(%rax), %rcx
movq -0x18(%rbp), %r8
movl $0x8, %eax
cltd
idivl 0x60(%r8)
movq -0x140(%rbp), %rdx
movl %eax, %r8d
leaq -0x130(%rbp), %r9
callq 0x8d8b0
movl $0x0, -0x4(%rbp)
jmp 0xe4e7a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_xpack_decode_free
void cram_xpack_decode_free(cram_codec *c) {
    if (!c) return;

    if (c->u.xpack.sub_codec)
        c->u.xpack.sub_codec->free(c->u.xpack.sub_codec);

    //free(slice->block_by_id[512 + c->codec_id]);
    //slice->block_by_id[512 + c->codec_id] = 0;

    free(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xe4ea5
jmp 0xe4ecf
movq -0x8(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0xe4ec6
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x70(%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_decoder_init
cram_codec *cram_decoder_init(cram_block_compression_hdr *hdr,
                              enum cram_encoding codec,
                              char *data, int size,
                              enum cram_external_type option,
                              int version, varint_vec *vv) {
    if (codec >= E_NULL && codec < E_NUM_CODECS && decode_init[codec]) {
        cram_codec *r = decode_init[codec](hdr, data, size, codec,
                                           option, version, vv);
        if (r) {
            r->vv = vv;
            r->codec_id = hdr->ncodecs++;
        }
        return r;
    } else {
        hts_log_error("Unimplemented codec of type %s", cram_encoding2str(codec));
        return NULL;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
cmpl $0x0, -0x14(%rbp)
jb 0xe5306
cmpl $0x36, -0x14(%rbp)
jae 0xe5306
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x2c94e(%rip), %rax     # 0x111be0
cmpq $0x0, (%rax,%rcx,8)
je 0xe5306
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x2c93b(%rip), %rax     # 0x111be0
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
movl -0x14(%rbp), %ecx
movl -0x28(%rbp), %r8d
movl -0x2c(%rbp), %r9d
movq 0x10(%rbp), %r10
movq %r10, (%rsp)
callq *%rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xe52fc
movq 0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x410(%rax), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, 0x410(%rax)
movq -0x38(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe5333
movl -0x14(%rbp), %edi
callq 0xec230
movq %rax, %rcx
movl $0x1, %edi
leaq 0x14144(%rip), %rsi     # 0xf9461
leaq 0x1414f(%rip), %rdx     # 0xf9473
movb $0x0, %al
callq 0x1b030
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_xpack_encode_flush
int cram_xpack_encode_flush(cram_codec *c) {
    // Pack the buffered up data
    int meta_len;
    uint64_t out_len;
    uint8_t out_meta[1024];
    uint8_t *out = hts_pack(BLOCK_DATA(c->out), BLOCK_SIZE(c->out),
                            out_meta, &meta_len, &out_len);

    // We now need to pass this through the next layer of transform
    if (c->u.e_xpack.sub_codec->encode(NULL, // also indicates flush incoming
                                     c->u.e_xpack.sub_codec,
                                     (char *)out, out_len))
        return -1;

    int r = 0;
    if (c->u.e_xpack.sub_codec->flush)
        r = c->u.e_xpack.sub_codec->flush(c->u.e_xpack.sub_codec);

    free(out);
    return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x430, %rsp            # imm = 0x430
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %rsi
leaq -0x420(%rbp), %rdx
leaq -0x14(%rbp), %rcx
leaq -0x20(%rbp), %r8
callq 0x8ce30
movq %rax, -0x428(%rbp)
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x70(%rcx), %rsi
movq -0x428(%rbp), %rdx
movq -0x20(%rbp), %rcx
xorl %edi, %edi
callq *%rax
cmpl $0x0, %eax
je 0xe53b3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe53fd
movl $0x0, -0x42c(%rbp)
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
cmpq $0x0, 0x48(%rax)
je 0xe53e8
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x70(%rcx), %rdi
callq *%rax
movl %eax, -0x42c(%rbp)
movq -0x428(%rbp), %rdi
callq 0x45a0
movl -0x42c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x430, %rsp            # imm = 0x430
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_xpack_encode_long
int cram_xpack_encode_long(cram_slice *slice, cram_codec *c,
                           char *in, int in_size) {
    int64_t *syms = (int64_t *)in;
    int i, r = 0;

    for (i = 0; i < in_size; i++)
        r |= store_bits_MSB(c->out, c->u.e_xpack.map[syms[i]], c->u.e_xpack.nbits);

    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)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0xe5722
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq 0x47c(%rax,%rcx,4), %rsi
movq -0x10(%rbp), %rax
movl 0x60(%rax), %edx
callq 0xe43f0
orl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xe56dd
movl -0x30(%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_xpack_encode_int
int cram_xpack_encode_int(cram_slice *slice, cram_codec *c,
                          char *in, int in_size) {
    int *syms = (int *)in;
    int i, r = 0;

    for (i = 0; i < in_size; i++)
        r |= store_bits_MSB(c->out, c->u.e_xpack.map[syms[i]], c->u.e_xpack.nbits);

    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)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0xe57a2
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movslq 0x47c(%rax,%rcx,4), %rsi
movq -0x10(%rbp), %rax
movl 0x60(%rax), %edx
callq 0xe43f0
orl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xe575d
movl -0x30(%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_xpack_encode_free
void cram_xpack_encode_free(cram_codec *c) {
    if (!c) return;

    if (c->u.e_xpack.sub_codec)
        c->u.e_xpack.sub_codec->free(c->u.e_xpack.sub_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 0xe5815
jmp 0xe584c
movq -0x8(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0xe5836
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x70(%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
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_encoder_init
cram_codec *cram_encoder_init(enum cram_encoding codec,
                              cram_stats *st,
                              enum cram_external_type option,
                              void *dat,
                              int version, varint_vec *vv) {
    if (st && !st->nvals)
        return NULL;

    // cram_stats_encoding assumes integer data, but if option
    // is E_BYTE then tweak the requested encoding.  This ought
    // to be fixed in cram_stats_encoding instead.
    if (option == E_BYTE || option == E_BYTE_ARRAY ||
       option == E_BYTE_ARRAY_BLOCK) {
       if (codec == E_VARINT_SIGNED || codec == E_VARINT_UNSIGNED)
           codec = E_EXTERNAL;
       else if (codec == E_CONST_INT)
           codec = E_CONST_BYTE;
    }

    if (encode_init[codec]) {
        cram_codec *r;
        if ((r = encode_init[codec](st, codec, option, dat, version, vv)))
            r->out = NULL;
        if (!r) {
            hts_log_error("Unable to initialise codec of type %s", cram_encoding2str(codec));
            return NULL;
        }
        r->vv = vv;
        return r;
    } else {
        hts_log_error("Unimplemented codec of type %s", cram_encoding2str(codec));
        abort();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xe5a5f
movq -0x18(%rbp), %rax
cmpl $0x0, 0x100c(%rax)
jne 0xe5a5f
movq $0x0, -0x8(%rbp)
jmp 0xe5b62
cmpl $0x3, -0x1c(%rbp)
je 0xe5a71
cmpl $0x4, -0x1c(%rbp)
je 0xe5a71
cmpl $0x5, -0x1c(%rbp)
jne 0xe5a97
cmpl $0x2a, -0xc(%rbp)
je 0xe5a7d
cmpl $0x29, -0xc(%rbp)
jne 0xe5a86
movl $0x1, -0xc(%rbp)
jmp 0xe5a95
cmpl $0x2c, -0xc(%rbp)
jne 0xe5a93
movl $0x2b, -0xc(%rbp)
jmp 0xe5a95
jmp 0xe5a97
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x2c2ed(%rip), %rax     # 0x111d90
cmpq $0x0, (%rax,%rcx,8)
je 0xe5b38
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x2c2d6(%rip), %rax     # 0x111d90
movq (%rax,%rcx,8), %rax
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movq -0x38(%rbp), %r9
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0xe5aec
movq -0x40(%rbp), %rax
movq $0x0, 0x8(%rax)
cmpq $0x0, -0x40(%rbp)
jne 0xe5b22
movl -0xc(%rbp), %edi
callq 0xec230
movq %rax, %rcx
movl $0x1, %edi
leaq 0x13988(%rip), %rsi     # 0xf9492
leaq 0x13993(%rip), %rdx     # 0xf94a4
movb $0x0, %al
callq 0x1b030
movq $0x0, -0x8(%rbp)
jmp 0xe5b62
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe5b62
movl -0xc(%rbp), %edi
callq 0xec230
movq %rax, %rcx
movl $0x1, %edi
leaq 0x13943(%rip), %rsi     # 0xf9492
leaq 0x1391d(%rip), %rdx     # 0xf9473
movb $0x0, %al
callq 0x1b030
callq 0x4260
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_xdelta_decode_int
int cram_xdelta_decode_int(cram_slice *slice, cram_codec *c, cram_block *in, char *out, int *out_size) {
    // Slow value-by-value method for now
    uint32_t *out32 = (uint32_t *)out;
    int i;
    for (i = 0; i < *out_size; i++) {
        uint32_t v;
        int one = 1;
        if (c->u.e_xdelta.sub_codec->decode(slice, c->u.e_xdelta.sub_codec, in,
                                          (char *)&v, &one) < 0)
            return -1;
        uint32_t d = unzigzag32(v);
        c->u.xdelta.last = out32[i] = d + c->u.xdelta.last;
    }

    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)
movl -0x3c(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl (%rcx), %eax
jge 0xe5c39
movl $0x1, -0x44(%rbp)
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq 0x78(%rcx), %rsi
movq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rcx
leaq -0x44(%rbp), %r8
callq *%rax
cmpl $0x0, %eax
jge 0xe5c01
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe5c40
movl -0x40(%rbp), %edi
callq 0xe5c50
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
movq -0x18(%rbp), %rcx
addq 0x60(%rcx), %rax
movq -0x38(%rbp), %rcx
movslq -0x3c(%rbp), %rdx
movl %eax, (%rcx,%rdx,4)
movl %eax, %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, 0x60(%rax)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xe5bbb
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_xdelta_decode_free
void cram_xdelta_decode_free(cram_codec *c) {
    if (!c) return;

    if (c->u.xdelta.sub_codec)
        c->u.xdelta.sub_codec->free(c->u.xdelta.sub_codec);

    free(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xe5ec5
jmp 0xe5eef
movq -0x8(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0xe5ee6
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), %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_xdelta_encode_free
void cram_xdelta_encode_free(cram_codec *c) {
    if (!c) return;

    if (c->u.e_xdelta.sub_codec)
        c->u.e_xdelta.sub_codec->free(c->u.e_xdelta.sub_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 0xe69a5
jmp 0xe69dc
movq -0x8(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0xe69c6
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
movq 0x8(%rax), %rdi
callq 0x6f940
movq -0x8(%rbp), %rdi
callq 0x45a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)