// File: /workspace/github_c_makefile_star2_O1/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 0x892c5
movl $0x7, (%rax)
leaq -0x1e1(%rip), %rcx      # 0x88f21
movq %rcx, 0x18(%rax)
leaq -0x3d(%rip), %rcx       # 0x890d0
movq %rcx, 0x10(%rax)
movl $0xffffffff, 0x34(%rax) # imm = 0xFFFFFFFF
movslq %ebp, %rcx
cmpl $0x4, %ecx
jg 0x8913f
testl %ebp, %ebp
jle 0x89136
movzbl (%rbx), %edx
shrl $0x4, %edx
leaq 0xf97f(%rip), %rsi      # 0x98ab0
cmpl %ebp, (%rsi,%rdx,4)
jle 0x8913f
xorl %edx, %edx
xorl %esi, %esi
jmp 0x891d4
movzbl (%rbx), %edx
movl $0x1, %esi
testb %dl, %dl
jns 0x891d4
movzbl 0x1(%rbx), %esi
cmpb $-0x41, %dl
ja 0x89167
andl $0x3f, %edx
shll $0x8, %edx
orl %esi, %edx
movl $0x2, %esi
jmp 0x891d4
cmpb $-0x21, %dl
ja 0x89184
shll $0x8, %esi
movzbl 0x2(%rbx), %edi
andl $0x1f, %edx
shll $0x10, %edx
orl %esi, %edx
orl %edi, %edx
movl $0x3, %esi
jmp 0x891d4
cmpb $-0x11, %dl
ja 0x891ac
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 0x891d4
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 $0x4, %rdi
jg 0x8920b
cmpq %rsi, %rcx
jle 0x89202
movzbl (%rdx), %esi
shrl $0x4, %esi
leaq 0xf8b7(%rip), %r8       # 0x98ab0
movslq (%r8,%rsi,4), %rsi
cmpq %rsi, %rdi
jge 0x8920b
xorl %esi, %esi
xorl %edi, %edi
jmp 0x892a9
movzbl (%rdx), %esi
movl $0x1, %edi
testb %sil, %sil
jns 0x892a9
movzbl 0x1(%rdx), %edi
cmpb $-0x41, %sil
ja 0x89235
andl $0x3f, %esi
shll $0x8, %esi
orl %edi, %esi
movl $0x2, %edi
jmp 0x892a9
cmpb $-0x21, %sil
ja 0x89255
shll $0x8, %edi
movzbl 0x2(%rdx), %r8d
andl $0x1f, %esi
shll $0x10, %esi
orl %edi, %esi
orl %r8d, %esi
movl $0x3, %edi
jmp 0x892a9
cmpb $-0x11, %sil
ja 0x89281
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 0x892a9
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 0x892bd
cmpl $0x0, 0x34(%rax)
jns 0x892c7
movq %rax, %rdi
callq 0x85d2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq