// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_subexp_decode_init
cram_codec *cram_subexp_decode_init(char *data, int size,
				    enum cram_external_type option,
				    int version) {
    cram_codec *c;
    char *cp = data;

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

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

    cp += safe_itf8_get(cp, data + size, &c->subexp.offset);
    cp += safe_itf8_get(cp, data + size, &c->subexp.k);

    if (cp - data != size || c->subexp.k < 0) {
	fprintf(stderr, "Malformed subexp header stream\n");
	free(c);
	return NULL;
    }

    return c;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x240, %edi            # imm = 0x240
callq 0x69d0
testq %rax, %rax
je 0x88e01
movl $0x7, (%rax)
leaq -0x1ba(%rip), %rcx      # 0x88a7c
movq %rcx, 0x18(%rax)
leaq -0x3d(%rip), %rcx       # 0x88c04
movq %rcx, 0x10(%rax)
movslq %ebp, %rcx
cmpl $0x5, %ecx
jge 0x88c6e
testl %ebp, %ebp
jle 0x88c65
movzbl (%rbx), %edi
movl %edi, %edx
shrl $0x4, %edx
leaq 0xff40(%rip), %rsi      # 0x98ba0
cmpl %ebp, (%rsi,%rdx,4)
jle 0x88c71
xorl %edx, %edx
xorl %esi, %esi
jmp 0x88d0a
movb (%rbx), %dil
movzbl %dil, %edx
movl $0x1, %esi
testb %dl, %dl
jns 0x88d0a
movzbl 0x1(%rbx), %esi
cmpb $-0x41, %dil
ja 0x88c9b
andl $0x3f, %edx
shll $0x8, %edx
orl %esi, %edx
movl $0x2, %esi
jmp 0x88d0a
cmpb $-0x21, %dil
ja 0x88cb9
shll $0x8, %esi
movzbl 0x2(%rbx), %edi
andl $0x1f, %edx
shll $0x10, %edx
orl %esi, %edx
orl %edi, %edx
movl $0x3, %esi
jmp 0x88d0a
cmpb $-0x11, %dil
ja 0x88ce2
shll $0x10, %esi
movzbl 0x2(%rbx), %edi
shll $0x8, %edi
movzbl 0x3(%rbx), %r8d
andl $0xf, %edx
shll $0x18, %edx
orl %esi, %edx
orl %edi, %edx
orl %r8d, %edx
movl $0x4, %esi
jmp 0x88d0a
shll $0x1c, %edx
shll $0x14, %esi
orl %edx, %esi
movzbl 0x2(%rbx), %edx
shll $0xc, %edx
orl %esi, %edx
movzbl 0x3(%rbx), %esi
shll $0x4, %esi
orl %edx, %esi
movzbl 0x4(%rbx), %edx
andl $0xf, %edx
orl %esi, %edx
movl $0x5, %esi
movl %edx, 0x30(%rax)
leaq (%rbx,%rsi), %rdx
movq %rcx, %rdi
subq %rsi, %rdi
cmpq $0x5, %rdi
jge 0x88d45
cmpq %rsi, %rcx
jle 0x88d3c
movzbl (%rdx), %r8d
movl %r8d, %esi
shrl $0x4, %esi
leaq 0xfe6d(%rip), %r9       # 0x98ba0
movslq (%r9,%rsi,4), %rsi
cmpq %rsi, %rdi
jge 0x88d48
xorl %esi, %esi
xorl %edi, %edi
jmp 0x88de7
movb (%rdx), %r8b
movzbl %r8b, %esi
movl $0x1, %edi
testb %sil, %sil
jns 0x88de7
movzbl 0x1(%rdx), %edi
cmpb $-0x41, %r8b
ja 0x88d73
andl $0x3f, %esi
shll $0x8, %esi
orl %edi, %esi
movl $0x2, %edi
jmp 0x88de7
cmpb $-0x21, %r8b
ja 0x88d93
shll $0x8, %edi
movzbl 0x2(%rdx), %r8d
andl $0x1f, %esi
shll $0x10, %esi
orl %edi, %esi
orl %r8d, %esi
movl $0x3, %edi
jmp 0x88de7
cmpb $-0x11, %r8b
ja 0x88dbf
shll $0x10, %edi
movzbl 0x2(%rdx), %r8d
shll $0x8, %r8d
movzbl 0x3(%rdx), %r9d
andl $0xf, %esi
shll $0x18, %esi
orl %edi, %esi
orl %r8d, %esi
orl %r9d, %esi
movl $0x4, %edi
jmp 0x88de7
shll $0x1c, %esi
shll $0x14, %edi
orl %esi, %edi
movzbl 0x2(%rdx), %esi
shll $0xc, %esi
orl %edi, %esi
movzbl 0x3(%rdx), %edi
shll $0x4, %edi
orl %esi, %edi
movzbl 0x4(%rdx), %esi
andl $0xf, %esi
orl %edi, %esi
movl $0x5, %edi
movl %esi, 0x34(%rax)
addq %rdi, %rdx
subq %rbx, %rdx
cmpq %rcx, %rdx
jne 0x88df9
testl %esi, %esi
jns 0x88e03
movq %rax, %rdi
callq 0x84f6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq