LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x90d25
pushq %rbx
movq %rdi, %rbx
movq 0x70(%rdi), %rdi
testq %rdi, %rdi
je 0x90d13
callq *0x20(%rdi)
movq 0x8(%rbx), %rdi
callq 0x4f82d
movq %rbx, %rdi
popq %rbx
jmp 0x45c0
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_xpack_encode_init
cram_codec *cram_xpack_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_XPACK;
    c->free   = cram_xpack_encode_free;
    if (option == E_LONG)
        c->encode = cram_xpack_encode_long;
    else if (option == E_INT)
        c->encode = cram_xpack_encode_int;
    else
        c->encode = cram_xpack_encode_char;
    c->store  = cram_xpack_encode_store;
    c->flush  = cram_xpack_encode_flush;

    cram_xpack_encoder *e = (cram_xpack_encoder *)dat;
    c->u.e_xpack.nbits = e->nbits;
    c->u.e_xpack.nval = e->nval;
    c->u.e_xpack.sub_codec = cram_encoder_init(e->sub_encoding, NULL,
                                               E_BYTE_ARRAY, e->sub_codec_dat,
                                               version, vv);

    // Initialise fwd and rev maps
    memcpy(c->u.e_xpack.map, e->map, sizeof(e->map)); // P,A,C,K to 0,1,2,3
    int i, n;
    for (i = n = 0; i < 256; i++)
        if (e->map[i] != -1)
            c->u.e_xpack.rmap[n++] = i;               // 0,1,2,3 to P,A,C,K
    if (n != e->nval) {
        fprintf(stderr, "Incorrectly specified number of map items in PACK\n");
        return NULL;
    }

    return c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movl %r8d, %ebp
movq %rcx, %r14
movl %edx, %r12d
movl $0x880, %edi            # imm = 0x880
callq 0x4680
xorl %r13d, %r13d
testq %rax, %rax
je 0x90e18
movq %rax, %rbx
movl $0x33, (%rax)
cmpl $0x1, %r12d
leaq -0x147(%rip), %rax      # 0x90c20
leaq -0x102(%rip), %rcx      # 0x90c6c
cmoveq %rax, %rcx
leaq -0x7b(%rip), %rax       # 0x90cfe
cmpl $0x2, %r12d
leaq -0x1b0(%rip), %rdx      # 0x90bd4
cmovneq %rcx, %rdx
movq %rax, 0x20(%rbx)
movq %rdx, 0x30(%rbx)
leaq -0x413(%rip), %rax      # 0x90984
movq %rax, 0x38(%rbx)
leaq -0x49a(%rip), %rax      # 0x90908
movq %rax, 0x48(%rbx)
movl (%r14), %eax
movl %eax, 0x60(%rbx)
movl 0x18(%r14), %eax
movl %eax, 0x78(%rbx)
movl 0x4(%r14), %edi
movq 0x8(%r14), %rcx
xorl %esi, %esi
movl $0x4, %edx
movl %ebp, %r8d
movq %r15, %r9
callq 0x90e2c
movq %rax, 0x70(%rbx)
movq %rbx, %rdi
addq $0x47c, %rdi            # imm = 0x47C
leaq 0x41c(%r14), %r15
movl $0x400, %edx            # imm = 0x400
movq %r15, %rsi
callq 0x43c0
xorl %eax, %eax
cmpl $-0x1, (%r15,%rax,4)
je 0x90e02
movslq %r13d, %rcx
incl %r13d
movl %eax, 0x7c(%rbx,%rcx,4)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x90df1
cmpl 0x18(%r14), %r13d
je 0x90e1a
callq 0x4c37
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/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 %r15
pushq %r14
pushq %rbx
movq %r9, %rbx
testq %rsi, %rsi
je 0x90e46
cmpl $0x0, 0x100c(%rsi)
je 0x90ed3
leal -0x3(%rdx), %eax
cmpl $0x2, %eax
ja 0x90e6a
leal -0x29(%rdi), %r9d
movl $0x1, %eax
cmpl $0x2, %r9d
jb 0x90e6c
cmpl $0x2c, %edi
movl $0x2b, %eax
cmovnel %edi, %eax
jmp 0x90e6c
movl %edi, %eax
movl %eax, %r14d
movabsq $0x7e1ffffffff85, %rdi  # imm = 0x7E1FFFFFFFF85
btq %rax, %rdi
jb 0x90edf
leaq 0x27cda(%rip), %rax     # 0xb8b60
movq %rsi, %rdi
movl %r14d, %esi
movq %rbx, %r9
callq *(%rax,%r14,8)
testq %rax, %rax
je 0x90ea9
movq %rax, %r15
movq $0x0, 0x8(%rax)
movq %rbx, 0x10(%rax)
jmp 0x90ed6
movl %r14d, %edi
callq 0x9516d
leaq 0x14a02(%rip), %rsi     # 0xa58ba
leaq 0x14a0d(%rip), %rdx     # 0xa58cc
xorl %r15d, %r15d
movl $0x1, %edi
movq %rax, %rcx
xorl %eax, %eax
callq 0x14378
jmp 0x90ed6
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
movl %r14d, %edi
callq 0x9516d
leaq 0x149cc(%rip), %rsi     # 0xa58ba
leaq 0x149a6(%rip), %rdx     # 0xa589b
movl $0x1, %edi
movq %rax, %rcx
xorl %eax, %eax
callq 0x14378
callq 0x4270
// File: /workspace/github_c_makefile_star2_O1/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:
cmpl $0x0, (%r8)
jle 0x90f7e
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
xorl %ebp, %ebp
movl $0x1, (%rsp)
movq 0x78(%r12), %rsi
movq %r13, %rdi
movq %r15, %rdx
leaq 0x4(%rsp), %rcx
movq %rsp, %r8
callq *0x28(%rsi)
testl %eax, %eax
js 0x90f81
movl 0x4(%rsp), %eax
movl %eax, %ecx
shrl %ecx
andl $0x1, %eax
negl %eax
xorl %ecx, %eax
addl 0x60(%r12), %eax
movl %eax, (%r14,%rbp,4)
movq %rax, 0x60(%r12)
incq %rbp
movslq (%rbx), %rax
cmpq %rax, %rbp
jl 0x90f31
xorl %eax, %eax
jmp 0x90f86
xorl %eax, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_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:
testq %rdi, %rdi
je 0x91145
pushq %rbx
movq %rdi, %rbx
movq 0x78(%rdi), %rdi
testq %rdi, %rdi
je 0x9113c
callq *0x20(%rdi)
movq %rbx, %rdi
popq %rbx
jmp 0x45c0
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_xdelta_encode_char
int cram_xdelta_encode_char(cram_slice *slice, cram_codec *c,
                            char *in, int in_size) {
    char *dat = malloc(in_size*5);
    if (!dat)
        return -1;
    char *cp = dat, *cp_end = dat + in_size*5;

    c->u.e_xdelta.last = 0; // reset for each new array
    if (c->u.e_xdelta.word_size == 2) {
        int i, part;

        part = in_size%2;
        if (part) {
            uint16_t z = in[0];
            c->u.e_xdelta.last = le_int2(z);
            cp += c->vv->varint_put32(cp, cp_end, zigzag16(c->u.e_xdelta.last));
        }

        uint16_t *in16 = (uint16_t *)(in+part);
        for (i = 0; i < in_size/2; i++) {
            uint16_t d = le_int2(in16[i]) - c->u.e_xdelta.last;
            c->u.e_xdelta.last = le_int2(in16[i]);
            cp += c->vv->varint_put32(cp, cp_end, zigzag16(d));
        }
    }
    if (c->u.e_xdelta.sub_codec->encode(slice, c->u.e_xdelta.sub_codec,
                                      (char *)dat, cp-dat)) {
        free(dat);
        return -1;
    }

    free(dat);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r12d
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
leal (%r12,%r12,4), %eax
movslq %eax, %rbp
movq %rbp, %rdi
callq 0x4680
testq %rax, %rax
je 0x91796
movq %rbx, 0x10(%rsp)
movq $0x0, 0x60(%r15)
cmpb $0x2, 0x68(%r15)
movq %rax, 0x8(%rsp)
movq %rax, %r14
jne 0x9176a
movq 0x8(%rsp), %rbx
addq %rbx, %rbp
movl %r12d, %eax
shrl $0x1f, %eax
addl %r12d, %eax
andl $-0x2, %eax
movl %r12d, %ecx
movq %rbx, %r14
subl %eax, %ecx
je 0x91721
movsbq (%r13), %rax
movq %rax, 0x60(%r15)
movl %ecx, %r14d
movq 0x10(%r15), %rcx
leal (%rax,%rax), %edx
sarl $0xf, %eax
xorl %edx, %eax
movzwl %ax, %edx
movq %rbx, %rdi
movq %rbp, %rsi
callq *0x38(%rcx)
movl %r14d, %ecx
cltq
movq %rbx, %r14
addq %rax, %r14
cmpl $0x2, %r12d
jl 0x9176a
movslq %ecx, %rax
addq %rax, %r13
shrl %r12d
xorl %ebx, %ebx
movswq (%r13,%rbx,2), %rax
movzwl 0x60(%r15), %ecx
movq %rax, 0x60(%r15)
subw %cx, %ax
cwtl
movq 0x10(%r15), %rcx
leal (%rax,%rax), %edx
sarl $0xf, %eax
xorl %edx, %eax
movzwl %ax, %edx
movq %r14, %rdi
movq %rbp, %rsi
callq *0x38(%rcx)
cltq
addq %rax, %r14
incq %rbx
cmpq %rbx, %r12
jne 0x91732
movq 0x78(%r15), %rsi
movq 0x8(%rsp), %rbx
subl %ebx, %r14d
movq 0x10(%rsp), %rdi
movq %rbx, %rdx
movl %r14d, %ecx
callq *0x30(%rsi)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x45c0
xorl %eax, %eax
negl %ebp
sbbl %eax, %eax
jmp 0x9179b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_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:
testq %rdi, %rdi
je 0x917d1
pushq %rbx
movq %rdi, %rbx
movq 0x78(%rdi), %rdi
testq %rdi, %rdi
je 0x917bf
callq *0x20(%rdi)
movq 0x8(%rbx), %rdi
callq 0x4f82d
movq %rbx, %rdi
popq %rbx
jmp 0x45c0
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r9, %r14
movl %r8d, %ebp
movq %rcx, %r15
movl %edx, %r12d
movl $0x880, %edi            # imm = 0x880
callq 0x4680
testq %rax, %rax
je 0x9187b
movq %rax, %rbx
movl $0x35, (%rax)
leaq -0x5f(%rip), %rax       # 0x917aa
movq %rax, 0x20(%rbx)
cmpl $0x1, %r12d
leaq -0x19c(%rip), %rax      # 0x9167c
leaq -0x19d(%rip), %rcx      # 0x91682
cmoveq %rax, %rcx
cmpl $0x2, %r12d
leaq -0x1b8(%rip), %rax      # 0x91676
cmovneq %rcx, %rax
movq %rax, 0x30(%rbx)
leaq -0x3aa(%rip), %rax      # 0x91493
movq %rax, 0x38(%rbx)
leaq -0x557(%rip), %rax      # 0x912f1
movq %rax, 0x48(%rbx)
movb 0x8(%r15), %al
movb %al, 0x68(%rbx)
movq $0x0, 0x60(%rbx)
movl 0xc(%r15), %edi
movq 0x10(%r15), %rcx
xorl %esi, %esi
movl $0x4, %edx
movl %ebp, %r8d
movq %r14, %r9
callq 0x90e2c
movq %rax, 0x78(%rbx)
jmp 0x9187d
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x91aef
pushq %rbx
movq %rdi, %rbx
movq 0x78(%rdi), %rdi
testq %rdi, %rdi
je 0x91ad7
callq *0x20(%rdi)
movq 0x80(%rbx), %rdi
testq %rdi, %rdi
je 0x91ae6
callq *0x20(%rdi)
movq %rbx, %rdi
popq %rbx
jmp 0x45c0
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
cmpq $0x0, 0x490(%rsi)
je 0x925a4
cmpq $0x0, 0x8(%r14)
jne 0x92514
xorl %edi, %edi
xorl %esi, %esi
callq 0x4ee42
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x92637
movq %rbx, %r12
movq 0x8(%r14), %rbx
movq 0x490(%r14), %rsi
movq 0x498(%r14), %r15
movq 0x30(%rbx), %r13
addq %r15, %r13
movq 0x28(%rbx), %rax
cmpq %r13, %rax
ja 0x92579
movq %rsi, (%rsp)
leaq 0x320(%rax), %rcx
shrq $0x2, %rcx
addq %rcx, %rax
addq $0x320, %rax            # imm = 0x320
cmpq %r13, %rax
cmovaq %rax, %r13
movq 0x20(%rbx), %rdi
movq %r13, %rsi
callq 0x4840
testq %rax, %rax
je 0x92637
movq %r13, 0x28(%rbx)
movq %rax, 0x20(%rbx)
movq (%rsp), %rsi
leaq 0x490(%r14), %r13
testq %r15, %r15
je 0x92599
movq 0x20(%rbx), %rdi
addq 0x30(%rbx), %rdi
movq %r15, %rdx
callq 0x43c0
addq %r15, 0x30(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
movq %r12, %rbx
movq 0x8(%r14), %r12
testq %r12, %r12
je 0x92621
movq 0x30(%r12), %r15
testq %r15, %r15
je 0x92621
movslq %ebp, %r14
addq %r14, %r15
movq 0x28(%r12), %rax
cmpq %r15, %rax
ja 0x925fe
leaq 0x320(%rax), %rcx
shrq $0x2, %rcx
addq %rcx, %rax
addq $0x320, %rax            # imm = 0x320
cmpq %r15, %rax
cmovaq %rax, %r15
movq 0x20(%r12), %rdi
movq %r15, %rsi
callq 0x4840
testq %rax, %rax
je 0x92637
movq %r15, 0x28(%r12)
movq %rax, 0x20(%r12)
xorl %r15d, %r15d
testl %ebp, %ebp
je 0x9263d
movq 0x20(%r12), %rdi
addq 0x30(%r12), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x43c0
addq %r14, 0x30(%r12)
jmp 0x9263d
movq %rbx, 0x490(%r14)
movslq %ebp, %rax
movq %rax, 0x498(%r14)
xorl %r15d, %r15d
jmp 0x9263d
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_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:
testq %rdi, %rdi
je 0x92685
pushq %rbx
movq %rdi, %rbx
movq 0x78(%rdi), %rdi
testq %rdi, %rdi
je 0x92664
callq *0x20(%rdi)
movq 0x80(%rbx), %rdi
testq %rdi, %rdi
je 0x92673
callq *0x20(%rdi)
movq 0x8(%rbx), %rdi
callq 0x4f82d
movq %rbx, %rdi
popq %rbx
jmp 0x45c0
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_xrle_encode_init
cram_codec *cram_xrle_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_XRLE;
    c->free   = cram_xrle_encode_free;
    if (option == E_LONG)
        c->encode = cram_xrle_encode_long;
    else if (option == E_INT)
        c->encode = cram_xrle_encode_int;
    else
        c->encode = cram_xrle_encode_char;
    c->store  = cram_xrle_encode_store;
    c->flush  = cram_xrle_encode_flush;

    cram_xrle_encoder *e = (cram_xrle_encoder *)dat;

    c->u.e_xrle.len_codec = cram_encoder_init(e->len_encoding, NULL,
                                              E_BYTE, e->len_dat,
                                              version, vv);
    c->u.e_xrle.lit_codec = cram_encoder_init(e->lit_encoding, NULL,
                                              E_BYTE, e->lit_dat,
                                              version, vv);
    c->u.e_xrle.cur_lit = -1;
    c->u.e_xrle.cur_len = -1;
    c->u.e_xrle.to_flush = NULL;
    c->u.e_xrle.to_flush_size = 0;

    memcpy(c->u.e_xrle.rep_score, e->rep_score, 256*sizeof(*c->u.e_xrle.rep_score));

    return c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r9, %r15
movl %r8d, %ebp
movq %rcx, %r14
movl %edx, %r12d
movl $0x880, %edi            # imm = 0x880
callq 0x4680
testq %rax, %rax
je 0x92770
movq %rax, %rbx
movl $0x34, (%rax)
cmpl $0x1, %r12d
leaq -0x1f1(%rip), %rax      # 0x924d0
leaq -0x1f2(%rip), %rcx      # 0x924d6
cmoveq %rax, %rcx
leaq -0x84(%rip), %rax       # 0x9264f
cmpl $0x2, %r12d
leaq -0x214(%rip), %rdx      # 0x924ca
cmovneq %rcx, %rdx
movq %rax, 0x20(%rbx)
movq %rdx, 0x30(%rbx)
leaq -0x5c8(%rip), %rax      # 0x92129
movq %rax, 0x38(%rbx)
leaq -0x9b1(%rip), %rax      # 0x91d4b
movq %rax, 0x48(%rbx)
movl (%r14), %edi
movq 0x8(%r14), %rcx
xorl %esi, %esi
movl $0x3, %edx
movl %ebp, %r8d
movq %r15, %r9
callq 0x90e2c
movq %rax, 0x78(%rbx)
movl 0x4(%r14), %edi
movq 0x10(%r14), %rcx
xorl %esi, %esi
movl $0x3, %edx
movl %ebp, %r8d
movq %r15, %r9
callq 0x90e2c
movq %rax, 0x80(%rbx)
movq $-0x1, 0x88(%rbx)
movq %rbx, %rdi
addq $0x90, %rdi
addq $0x30, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x490(%rbx)
movl $0x400, %edx            # imm = 0x400
movq %r14, %rsi
callq 0x43c0
jmp 0x92772
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rax
movq %rsi, %rax
movl 0x60(%rdi), %edx
movl 0x64(%rdi), %ecx
leaq 0x12a3d(%rip), %rsi     # 0xa5385
movq %rax, %rdi
xorl %eax, %eax
callq 0x9aab
sarl $0x1f, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
cmpl $0x1, %r8d
jne 0x92a24
movl %edx, %ebp
movq %rsi, %r14
movl $0x880, %edi            # imm = 0x880
callq 0x4680
testq %rax, %rax
je 0x92a20
movq %rax, %rbx
movq 0x40(%rsp), %r13
movl $0x7, (%rax)
leaq -0x21f(%rip), %rax      # 0x9277e
movq %rax, 0x28(%rbx)
leaq -0x7b(%rip), %rax       # 0x9292d
movq %rax, 0x20(%rbx)
leaq -0x7c(%rip), %rax       # 0x92937
movq %rax, 0x58(%rbx)
movl $0xffffffff, 0x64(%rbx) # imm = 0xFFFFFFFF
movslq %ebp, %rbp
leaq (%r14,%rbp), %r15
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq *0x18(%r13)
movl %eax, 0x60(%rbx)
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq *0x18(%r13)
movl %eax, 0x64(%rbx)
movq (%r12), %rcx
subq %r14, %rcx
cmpq %rbp, %rcx
setne %cl
testl %eax, %eax
sets %al
orb %cl, %al
cmpb $0x1, %al
jne 0x92a40
leaq 0x12997(%rip), %rsi     # 0xa539c
leaq 0x129cf(%rip), %rdx     # 0xa53db
movl $0x1, %edi
xorl %eax, %eax
callq 0x14378
movq %rbx, %rdi
callq 0x45c0
xorl %ebx, %ebx
jmp 0x92a40
leaq 0x12971(%rip), %rsi     # 0xa539c
leaq 0x12982(%rip), %rdx     # 0xa53b4
xorl %ebx, %ebx
movl $0x1, %edi
xorl %eax, %eax
callq 0x14378
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/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:
movslq (%r8), %r8
testq %r8, %r8
jle 0x92b8a
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rdi
xorl %r9d, %r9d
movq 0x30(%rdx), %r11
movslq 0x14(%rdx), %rax
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
cmpq %rax, %r11
jae 0x92ac7
movq 0x20(%rdx), %rbx
movl 0x38(%rdx), %ecx
movzbl (%rbx,%r11), %ebp
shrl %cl, %ebp
subl $0x1, %ecx
movl %ecx, 0x38(%rdx)
jae 0x92ab6
movl $0x7, 0x38(%rdx)
incq %r11
movq %r11, 0x30(%rdx)
movl $0x7, %ecx
cmpq %rax, %r11
jne 0x92ab6
movl %ebp, %r14d
andl $0x1, %r14d
je 0x92ac1
incl %r10d
testb $0x1, %bpl
je 0x92a86
jmp 0x92ac7
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
testl %r10d, %r10d
js 0x92adf
subq 0x30(%rdx), %rax
setbe %cl
testl %r10d, %r10d
setne %r11b
testb %cl, %r11b
je 0x92ae3
xorl %ecx, %ecx
jmp 0x92b01
cmpq $0x10000000, %rax       # imm = 0x10000000
ja 0x92aff
movslq 0x38(%rdx), %rcx
leaq (%rcx,%rax,8), %rax
addq $-0x7, %rax
movl %r10d, %ecx
cmpq %rcx, %rax
jb 0x92adf
movb $0x1, %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %cl, %cl
je 0x92b81
testl %r10d, %r10d
jle 0x92b61
movq 0x20(%rdx), %rbx
movq 0x30(%rdx), %r14
movl 0x38(%rdx), %r15d
incl %r10d
movl $0x1, %r11d
movzbl (%rbx,%r14), %ebp
xorl %r12d, %r12d
btl %r15d, %ebp
setb %r12b
leal (%r12,%r11,2), %r11d
xorl %r12d, %r12d
testl %r15d, %r15d
leal -0x1(%r15), %ebp
setle %r12b
addq %r12, %r14
movq %r14, 0x30(%rdx)
andl $0x7, %ebp
movl %ebp, 0x38(%rdx)
decl %r10d
movl %ebp, %r15d
cmpl $0x1, %r10d
jg 0x92b24
jmp 0x92b67
movl $0x1, %r11d
subl 0x60(%rsi), %r11d
movl %r11d, (%rdi,%r9,4)
testb %cl, %cl
je 0x92b81
incq %r9
cmpq %r8, %r9
jne 0x92a6c
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, 0x8(%rsp)
cmpl $0x1, %r8d
jne 0x92c3e
movl %edx, %ebp
testl %edx, %edx
jle 0x92c5c
movq %rsi, %r14
movl $0x880, %edi            # imm = 0x880
callq 0x4680
testq %rax, %rax
je 0x92c80
movq %rax, %rbx
movq 0x40(%rsp), %rax
movl $0x9, (%rbx)
leaq -0x1ae(%rip), %rcx      # 0x92a52
movq %rcx, 0x28(%rbx)
leaq -0x7e(%rip), %rcx       # 0x92b8d
movq %rcx, 0x20(%rbx)
leaq -0x7f(%rip), %rcx       # 0x92b97
movq %rcx, 0x58(%rbx)
movl %ebp, %r12d
leaq (%r14,%r12), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
xorl %edx, %edx
callq *0x18(%rax)
movl %eax, 0x60(%rbx)
movq (%r15), %rax
subq %r14, %rax
cmpq %r12, %rax
jne 0x92c5e
jmp 0x92c82
leaq 0x127c6(%rip), %rsi     # 0xa540b
leaq 0x12768(%rip), %rdx     # 0xa53b4
xorl %ebx, %ebx
movl $0x1, %edi
xorl %eax, %eax
callq 0x14378
jmp 0x92c82
xorl %ebx, %ebx
leaq 0x127a6(%rip), %rsi     # 0xa540b
leaq 0x127b6(%rip), %rdx     # 0xa5422
movl $0x1, %edi
xorl %eax, %eax
callq 0x14378
movq %rbx, %rdi
callq 0x45c0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x92cb2
pushq %rbx
movq %rdi, %rbx
movq 0x68(%rdi), %rdi
testq %rdi, %rdi
je 0x92ca9
callq 0x45c0
movq %rbx, %rdi
popq %rbx
jmp 0x45c0
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rcx, %rcx
je 0x92cdb
movslq (%r8), %rax
testq %rax, %rax
jle 0x92cdb
xorl %edx, %edx
movq 0x68(%rsi), %rdi
movb (%rdi), %dil
movb %dil, (%rcx,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0x92cc8
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_huffman_decode_char
int cram_huffman_decode_char(cram_slice *slice, cram_codec *c,
                             cram_block *in, char *out, int *out_size) {
    int i, n, ncodes = c->u.huffman.ncodes;
    const cram_huffman_code * const codes = c->u.huffman.codes;

    for (i = 0, n = *out_size; i < n; i++) {
        int idx = 0;
        int val = 0, len = 0, last_len = 0;

        for (;;) {
            int dlen = codes[idx].len - last_len;
            if (cram_not_enough_bits(in, dlen))
                return -1;

            //val <<= dlen;
            //val  |= get_bits_MSB(in, dlen);
            //last_len = (len += dlen);

            last_len = (len += dlen);
            for (; dlen; dlen--) GET_BIT_MSB(in, val);

            idx = val - codes[idx].p;
            if (idx >= ncodes || idx < 0)
                return -1;

            if (codes[idx].code == val && codes[idx].len == len) {
                if (out) out[i] = codes[idx].symbol;
                break;
            }
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq (%r8), %rax
movq %rax, -0x8(%rsp)
testq %rax, %rax
jle 0x92e31
movq %rcx, -0x10(%rsp)
movl 0x60(%rsi), %edi
movq 0x68(%rsi), %rsi
xorl %r8d, %r8d
xorl %ebx, %ebx
xorl %r9d, %r9d
xorl %r11d, %r11d
xorl %ebp, %ebp
movslq %ebx, %rax
leaq (%rax,%rax,2), %r15
movl 0x10(%rsi,%r15,8), %r13d
movl %r13d, %r14d
subl %ebp, %r14d
movl $0x1, %r10d
js 0x92dc4
movslq 0x14(%rdx), %rax
subq 0x30(%rdx), %rax
setbe %r12b
testl %r14d, %r14d
setne %cl
testb %r12b, %cl
jne 0x92dc4
cmpq $0x10000000, %rax       # imm = 0x10000000
ja 0x92d63
movslq 0x38(%rdx), %rcx
leaq (%rcx,%rax,8), %rax
addq $-0x7, %rax
movl %r14d, %ecx
cmpq %rcx, %rax
jb 0x92dc4
testl %r14d, %r14d
je 0x92da5
movq 0x20(%rdx), %rbx
movq 0x30(%rdx), %r12
movl 0x38(%rdx), %eax
subl %r13d, %ebp
movzbl (%rbx,%r12), %ecx
xorl %r13d, %r13d
btl %eax, %ecx
setb %r13b
leal (%r13,%r9,2), %r9d
xorl %ecx, %ecx
testl %eax, %eax
leal -0x1(%rax), %eax
setle %cl
addq %rcx, %r12
movq %r12, 0x30(%rdx)
andl $0x7, %eax
movl %eax, 0x38(%rdx)
incl %ebp
jne 0x92d76
leaq (%rsi,%r15,8), %rax
addl %r11d, %r14d
movl %r9d, %ebx
subl 0x8(%rax), %ebx
sets %al
cmpl %edi, %ebx
setge %cl
orb %al, %cl
je 0x92dd2
movl %r14d, %r11d
movl %r14d, %ebp
xorl %r15d, %r15d
testl %r10d, %r10d
je 0x92d12
jmp 0x92e18
movl %ebx, %eax
leaq (%rax,%rax,2), %rax
movb $0x1, %r15b
cmpl %r9d, 0xc(%rsi,%rax,8)
jne 0x92e0d
leaq (%rsi,%rax,8), %rax
cmpl %r14d, 0x10(%rax)
jne 0x92e0d
movl $0x5, %r10d
movq -0x10(%rsp), %rcx
testq %rcx, %rcx
je 0x92e02
movb (%rax), %al
movb %al, (%rcx,%r8)
xorl %r15d, %r15d
movl %r14d, %r11d
movl %r14d, %ebp
jmp 0x92dc7
movl %r14d, %r11d
movl %r14d, %ebp
xorl %r10d, %r10d
jmp 0x92dc7
cmpl $0x5, %r10d
je 0x92e23
testb %r15b, %r15b
je 0x92e35
incq %r8
cmpq -0x8(%rsp), %r8
jne 0x92d08
xorl %eax, %eax
jmp 0x92e3a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_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:
movslq (%r8), %rax
testq %rax, %rax
jle 0x92e60
movq 0x68(%rsi), %rdx
movl (%rdx), %edx
xorl %esi, %esi
movl %edx, (%rcx,%rsi,4)
incq %rsi
cmpq %rsi, %rax
jne 0x92e55
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_huffman_decode_int
int cram_huffman_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, ncodes = c->u.huffman.ncodes;
    const cram_huffman_code * const codes = c->u.huffman.codes;

    for (i = 0, n = *out_size; i < n; i++) {
        int idx = 0;
        int val = 0, len = 0, last_len = 0;

        // Now one bit at a time for remaining checks
        for (;;) {
            int dlen = codes[idx].len - last_len;
            if (cram_not_enough_bits(in, dlen))
                return -1;

            //val <<= dlen;
            //val  |= get_bits_MSB(in, dlen);
            //last_len = (len += dlen);

            last_len = (len += dlen);
            for (; dlen; dlen--) GET_BIT_MSB(in, val);

            idx = val - codes[idx].p;
            if (idx >= ncodes || idx < 0)
                return -1;

            if (codes[idx].code == val && codes[idx].len == len) {
                out_i[i] = codes[idx].symbol;
                break;
            }
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, -0x10(%rsp)
movslq (%r8), %rax
movq %rax, -0x8(%rsp)
testq %rax, %rax
jle 0x92fb0
movl 0x60(%rsi), %edi
movq 0x68(%rsi), %rsi
xorl %r8d, %r8d
xorl %ebp, %ebp
xorl %r9d, %r9d
xorl %eax, %eax
xorl %ebx, %ebx
movslq %ebp, %r10
leaq (%r10,%r10,2), %r15
movl 0x10(%rsi,%r15,8), %r14d
movl %r14d, %r11d
subl %ebx, %r11d
movl $0x1, %r10d
js 0x92f48
movslq 0x14(%rdx), %r12
subq 0x30(%rdx), %r12
setbe %r13b
testl %r11d, %r11d
setne %cl
testb %r13b, %cl
jne 0x92f48
cmpq $0x10000000, %r12       # imm = 0x10000000
ja 0x92ee8
movslq 0x38(%rdx), %rcx
leaq (%rcx,%r12,8), %rcx
addq $-0x7, %rcx
movl %r11d, %r12d
cmpq %r12, %rcx
jb 0x92f48
testl %r11d, %r11d
je 0x92f29
movq 0x20(%rdx), %r12
movq 0x30(%rdx), %r13
movl 0x38(%rdx), %ebp
subl %r14d, %ebx
movzbl (%r12,%r13), %ecx
xorl %r14d, %r14d
btl %ebp, %ecx
setb %r14b
leal (%r14,%r9,2), %r9d
xorl %ecx, %ecx
testl %ebp, %ebp
leal -0x1(%rbp), %ebp
setle %cl
addq %rcx, %r13
movq %r13, 0x30(%rdx)
andl $0x7, %ebp
movl %ebp, 0x38(%rdx)
incl %ebx
jne 0x92efb
leaq (%rsi,%r15,8), %rcx
addl %eax, %r11d
movl %r9d, %ebp
subl 0x8(%rcx), %ebp
sets %al
cmpl %edi, %ebp
setge %cl
orb %al, %cl
je 0x92f56
movl %r11d, %eax
movl %r11d, %ebx
xorl %r15d, %r15d
testl %r10d, %r10d
je 0x92e96
jmp 0x92f97
movl %ebp, %eax
leaq (%rax,%rax,2), %rax
movb $0x1, %r15b
cmpl %r9d, 0xc(%rsi,%rax,8)
jne 0x92f8c
leaq (%rsi,%rax,8), %rax
cmpl %r11d, 0x10(%rax)
jne 0x92f8c
movl (%rax), %eax
movq -0x10(%rsp), %rcx
movl %eax, (%rcx,%r8,4)
movl $0x5, %r10d
xorl %r15d, %r15d
movl %r11d, %eax
movl %r11d, %ebx
jmp 0x92f4b
movl %r11d, %eax
movl %r11d, %ebx
xorl %r10d, %r10d
jmp 0x92f4b
cmpl $0x5, %r10d
je 0x92fa2
testb %r15b, %r15b
je 0x92fb4
incq %r8
cmpq -0x8(%rsp), %r8
jne 0x92e8d
xorl %eax, %eax
jmp 0x92fb9
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_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:
movslq (%r8), %rax
testq %rax, %rax
jle 0x92fe1
movq 0x68(%rsi), %rdx
xorl %esi, %esi
movq (%rdx), %rdi
movq %rdi, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0x92fd2
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %r14
leaq 0x122e2(%rip), %rsi     # 0xa5440
movq %rax, (%rsp)
movq %rax, %rdi
xorl %eax, %eax
callq 0x9aab
movl %eax, %ebp
shrl $0x1f, %ebp
cmpl $0x0, 0x60(%r14)
leaq 0x5b50(%rip), %r15      # 0x98ccd
leaq 0x7d34(%rip), %rbx      # 0x9aeb8
jle 0x931c2
xorl %r12d, %r12d
xorl %r13d, %r13d
testq %r13, %r13
movq %rbx, %rdx
cmoveq %r15, %rdx
movq 0x68(%r14), %rax
movq (%rax,%r12), %rcx
movq (%rsp), %rdi
leaq 0x122a7(%rip), %rsi     # 0xa5450
xorl %eax, %eax
callq 0x9aab
orl %eax, %ebp
incq %r13
movslq 0x60(%r14), %rax
addq $0x18, %r12
cmpq %rax, %r13
jl 0x9318c
movq %r15, %r12
leaq 0x1228a(%rip), %rsi     # 0xa5456
movq (%rsp), %rdi
xorl %eax, %eax
callq 0x9aab
movl %eax, %r15d
shrl $0x1f, %r15d
orl %ebp, %r15d
cmpl $0x0, 0x60(%r14)
jle 0x93224
xorl %ebp, %ebp
xorl %r13d, %r13d
testq %rbp, %rbp
movq %rbx, %rdx
cmoveq %r12, %rdx
movq 0x68(%r14), %rax
movl 0x10(%rax,%rbp), %ecx
movq (%rsp), %rdi
leaq 0x12258(%rip), %rsi     # 0xa5462
xorl %eax, %eax
callq 0x9aab
orl %eax, %r15d
incq %r13
movslq 0x60(%r14), %rax
addq $0x18, %rbp
cmpq %rax, %r13
jl 0x931ed
leaq 0x1223c(%rip), %rsi     # 0xa5467
movq (%rsp), %rdi
xorl %eax, %eax
callq 0x9aab
shrl $0x1f, %eax
orl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_huffman_encode_char
int cram_huffman_encode_char(cram_slice *slice, cram_codec *c,
                             char *in, int in_size) {
    int i, code, len, r = 0;
    unsigned char *syms = (unsigned char *)in;

    while (in_size--) {
        int sym = *syms++;
        if (sym >= -1 && sym < MAX_HUFF) {
            i = c->u.e_huffman.val2code[sym+1];
            assert(c->u.e_huffman.codes[i].symbol == sym);
            code = c->u.e_huffman.codes[i].code;
            len  = c->u.e_huffman.codes[i].len;
        } else {
            /* Slow - use a lookup table for when sym < MAX_HUFF? */
            for (i = 0; i < c->u.e_huffman.nvals; i++) {
                if (c->u.e_huffman.codes[i].symbol == sym)
                    break;
            }
            if (i == c->u.e_huffman.nvals)
                return -1;

            code = c->u.e_huffman.codes[i].code;
            len  = c->u.e_huffman.codes[i].len;
        }

        r |= store_bits_MSB(c->out, code, len);
    }

    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
xorl %ebx, %ebx
subl $0x1, %ebp
jb 0x93768
movzbl (%r14), %ecx
testb %cl, %cl
js 0x9370d
movslq 0x70(%r15,%rcx,4), %rdx
movq 0x60(%r15), %rax
leaq (%rdx,%rdx,2), %rdx
cmpq %rcx, (%rax,%rdx,8)
jne 0x93775
leaq (%rax,%rdx,8), %rax
jmp 0x93748
movl 0x68(%r15), %eax
testl %eax, %eax
jle 0x93730
movq 0x60(%r15), %rsi
xorl %edx, %edx
cmpq %rcx, (%rsi)
je 0x93732
incq %rdx
addq $0x18, %rsi
cmpq %rdx, %rax
jne 0x9371b
movl %eax, %edx
jmp 0x93732
xorl %edx, %edx
cmpl %eax, %edx
jne 0x9373a
xorl %eax, %eax
jmp 0x9375c
movl %edx, %eax
leaq (%rax,%rax,2), %rax
shlq $0x3, %rax
addq 0x60(%r15), %rax
movl 0x10(%rax), %edx
movslq 0xc(%rax), %rsi
movq 0x8(%r15), %rdi
callq 0x90016
orl %eax, %ebx
movb $0x1, %al
incq %r14
testb %al, %al
jne 0x936e7
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11db8(%rip), %rdi     # 0xa5534
leaq 0x11dd7(%rip), %rsi     # 0xa555a
leaq 0x11de3(%rip), %rcx     # 0xa556d
movl $0xba9, %edx            # imm = 0xBA9
callq 0x42f0
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_huffman_encode_long
int cram_huffman_encode_long(cram_slice *slice, cram_codec *c,
                             char *in, int in_size) {
    int i, code, len, r = 0;
    int64_t *syms = (int64_t *)in;

    while (in_size--) {
        int sym = *syms++;

        if (sym >= -1 && sym < MAX_HUFF) {
            i = c->u.e_huffman.val2code[sym+1];
            assert(c->u.e_huffman.codes[i].symbol == sym);
            code = c->u.e_huffman.codes[i].code;
            len  = c->u.e_huffman.codes[i].len;
        } else {
            /* Slow - use a lookup table for when sym < MAX_HUFFMAN_SYM? */
            for (i = 0; i < c->u.e_huffman.nvals; i++) {
                if (c->u.e_huffman.codes[i].symbol == sym)
                    break;
            }
            if (i == c->u.e_huffman.nvals)
                return -1;

            code = c->u.e_huffman.codes[i].code;
            len  = c->u.e_huffman.codes[i].len;
        }

        r |= store_bits_MSB(c->out, code, len);
    }

    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
xorl %ebx, %ebx
subl $0x1, %ebp
jb 0x93911
movq (%r14), %rcx
leal 0x1(%rcx), %eax
cmpl $0x81, %eax
jae 0x938ae
leal 0x1(%rcx), %eax
movslq 0x6c(%r15,%rax,4), %rdx
movq 0x60(%r15), %rax
leaq (%rdx,%rdx,2), %rdx
movslq %ecx, %rcx
cmpq %rcx, (%rax,%rdx,8)
jne 0x9391e
leaq (%rax,%rdx,8), %rax
jmp 0x938ec
movl 0x68(%r15), %eax
testl %eax, %eax
jle 0x938d4
movq 0x60(%r15), %rdx
movslq %ecx, %rsi
xorl %ecx, %ecx
cmpq %rsi, (%rdx)
je 0x938d6
incq %rcx
addq $0x18, %rdx
cmpq %rcx, %rax
jne 0x938bf
movl %eax, %ecx
jmp 0x938d6
xorl %ecx, %ecx
cmpl %eax, %ecx
jne 0x938de
xorl %eax, %eax
jmp 0x93900
movl %ecx, %eax
leaq (%rax,%rax,2), %rax
shlq $0x3, %rax
addq 0x60(%r15), %rax
movl 0x10(%rax), %edx
movslq 0xc(%rax), %rsi
movq 0x8(%r15), %rdi
callq 0x90016
orl %eax, %ebx
movb $0x1, %al
addq $0x8, %r14
testb %al, %al
jne 0x93879
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11c0f(%rip), %rdi     # 0xa5534
leaq 0x11c2e(%rip), %rsi     # 0xa555a
leaq 0x11cc5(%rip), %rcx     # 0xa55f8
movl $0xbf3, %edx            # imm = 0xBF3
callq 0x42f0
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x9395d
pushq %rbx
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
testq %rdi, %rdi
je 0x93954
callq 0x45c0
movq %rbx, %rdi
popq %rbx
jmp 0x45c0
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
leaq 0x8(%rsp), %rcx
movl $0x0, (%rcx)
leaq 0xc(%rsp), %r8
movl $0x1, (%r8)
movq 0x60(%rsi), %rsi
callq *0x28(%rsi)
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x9429f
movq 0x68(%r13), %rsi
testq %rsi, %rsi
je 0x9429f
cmpl $0x0, 0x8(%rsp)
js 0x9429f
leaq 0x8(%rsp), %r13
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
movq %r13, %r8
callq *0x28(%rsi)
movl (%r13), %ecx
movl %ecx, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x942d7
pushq %rbx
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
testq %rdi, %rdi
je 0x942c2
callq *0x20(%rdi)
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x942ce
callq *0x20(%rdi)
movq %rbx, %rdi
popq %rbx
jmp 0x45c0
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x11411(%rip), %rsi     # 0xa56fe
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9aab
movl %eax, %ebp
movq 0x60(%r12), %rdi
movq 0x58(%rdi), %rax
testq %rax, %rax
je 0x94311
movq %rbx, %rsi
callq *%rax
movl %eax, %r14d
jmp 0x94329
leaq 0x6cd4(%rip), %rsi      # 0x9afec
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9aab
movl %eax, %r14d
shrl $0x1f, %r14d
leaq 0x113e9(%rip), %rsi     # 0xa5719
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9aab
movl %eax, %r15d
movq 0x68(%r12), %rdi
movq 0x58(%rdi), %rax
testq %rax, %rax
je 0x94355
movq %rbx, %rsi
callq *%rax
movl %eax, %r12d
jmp 0x9436d
leaq 0x6c90(%rip), %rsi      # 0x9afec
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9aab
movl %eax, %r12d
shrl $0x1f, %r12d
orl %ebp, %r15d
shrl $0x1f, %r15d
orl %r14d, %r15d
leaq 0x7a6d(%rip), %rsi      # 0x9bdeb
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9aab
shrl $0x1f, %eax
orl %r12d, %eax
orl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0xc(%rsp), %rdx
movl %ecx, (%rdx)
movq 0x78(%rsi), %rsi
movl $0x1, %ecx
callq *0x30(%rsi)
movl %eax, %ebp
movq 0x80(%r15), %rsi
movq %r12, %rdi
movq %r14, %rdx
movl %ebx, %ecx
callq *0x30(%rsi)
orl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq