// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_byte_array_stop_decode_init
cram_codec *cram_byte_array_stop_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;
    unsigned char *cp = (unsigned char *)data;
    int err = 0;

    if (size < (CRAM_MAJOR_VERS(version) == 1 ? 5 : 2))
        goto malformed;

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

    c->codec  = E_BYTE_ARRAY_STOP;
    switch (option) {
    case E_BYTE_ARRAY_BLOCK:
        c->decode = cram_byte_array_stop_decode_block;
        break;
    case E_BYTE_ARRAY:
        c->decode = cram_byte_array_stop_decode_char;
        break;
    default:
        hts_log_error("The byte_array_stop codec only supports BYTE_ARRAYs");
        free(c);
        return NULL;
    }
    c->free   = cram_byte_array_stop_decode_free;
    c->describe = cram_byte_array_stop_describe;

    c->u.byte_array_stop.stop = *cp++;
    if (CRAM_MAJOR_VERS(version) == 1) {
        c->u.byte_array_stop.content_id = cp[0] + (cp[1]<<8) + (cp[2]<<16)
            + ((unsigned int) cp[3]<<24);
        cp += 4;
    } else {
        c->u.byte_array_stop.content_id = vv->varint_get32((char **)&cp, data+size, &err);
    }

    if ((char *)cp - data != size || err)
        goto malformed;

    return c;

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r15d
andl $0x0, 0x14(%rsp)
movq %rsi, 0x8(%rsp)
andl $0xffffff00, %r15d      # imm = 0xFFFFFF00
xorl %eax, %eax
cmpl $0x100, %r15d           # imm = 0x100
sete %al
leal (%rax,%rax,2), %eax
addl $0x2, %eax
cmpl %edx, %eax
jle 0x7428d
xorl %ebx, %ebx
leaq 0x1058b(%rip), %rsi     # 0x847fd
leaq 0x105d9(%rip), %rdx     # 0x84852
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x110c6
movq %rbx, %rdi
callq 0x45c0
jmp 0x742c6
movl %r8d, %r12d
movl %edx, %ebp
movq %rsi, %r14
movl $0x880, %edi            # imm = 0x880
callq 0x4680
testq %rax, %rax
je 0x742c6
movq %rax, %rbx
movl $0x5, (%rax)
cmpl $0x5, %r12d
je 0x742da
cmpl $0x4, %r12d
jne 0x7436d
leaq 0xbc(%rip), %rax        # 0x74380
jmp 0x742e1
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x242(%rip), %rax      # 0x7409f
leaq 0x1(%r14), %rcx
movq %rax, 0x28(%rbx)
leaq -0xe5(%rip), %rax       # 0x7420b
movq %rax, 0x20(%rbx)
leaq -0xeb(%rip), %rax       # 0x74210
movq %rax, 0x58(%rbx)
movq %rcx, 0x8(%rsp)
movb (%r14), %al
movb %al, 0x60(%rbx)
cmpl $0x100, %r15d           # imm = 0x100
jne 0x74327
movl 0x1(%r14), %eax
leaq 0x5(%r14), %rcx
movq %rcx, 0x8(%rsp)
movl %ebp, %r13d
xorl %edx, %edx
jmp 0x74351
movq 0x50(%rsp), %rax
movl %ebp, %r13d
leaq (%r14,%r13), %rsi
leaq 0x8(%rsp), %r15
leaq 0x14(%rsp), %r12
movq %r15, %rdi
movq %r12, %rdx
callq *0x18(%rax)
movq (%r15), %rcx
cmpl $0x0, (%r12)
setne %dl
movl %eax, 0x64(%rbx)
subq %r14, %rcx
cmpq %r13, %rcx
jne 0x7426b
testb %dl, %dl
je 0x742c8
jmp 0x7426b
leaq 0x10489(%rip), %rsi     # 0x847fd
leaq 0x104a3(%rip), %rdx     # 0x8481e
jmp 0x74279