// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_io.c
// Function: ltf8_decode
int ltf8_decode(cram_fd *fd, int64_t *val_p) {
    int c = hgetc(fd->fp);
    int64_t val = (unsigned char)c;
    if (c == -1)
        return -1;

    if (val < 0x80) {
        *val_p =   val;
        return 1;

    } else if (val < 0xc0) {
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        *val_p = val & (((1LL<<(6+8)))-1);
        return 2;

    } else if (val < 0xe0) {
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        *val_p = val & ((1LL<<(5+2*8))-1);
        return 3;

    } else if (val < 0xf0) {
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        *val_p = val & ((1LL<<(4+3*8))-1);
        return 4;

    } else if (val < 0xf8) {
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        *val_p = val & ((1LL<<(3+4*8))-1);
        return 5;

    } else if (val < 0xfc) {
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        *val_p = val & ((1LL<<(2+5*8))-1);
        return 6;

    } else if (val < 0xfe) {
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        *val_p = val & ((1LL<<(1+6*8))-1);
        return 7;

    } else if (val < 0xff) {
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        *val_p = val & ((1LL<<(7*8))-1);
        return 8;

    } else {
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        val = (val<<8) | (unsigned char)hgetc(fd->fp);
        *val_p = val;
    }

    return 9;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movzbl %al, %eax
movq %rax, -0x28(%rbp)
cmpl $-0x1, -0x1c(%rbp)
jne 0x6d35e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6db0d
cmpq $0x80, -0x28(%rbp)
jge 0x6d37f
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x6db0d
cmpq $0xc0, -0x28(%rbp)
jge 0x6d3cf
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
andq $0x3fff, %rcx           # imm = 0x3FFF
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x6db0d
cmpq $0xe0, -0x28(%rbp)
jge 0x6d447
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x40(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x38(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
andq $0x1fffff, %rcx         # imm = 0x1FFFFF
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0x6db0d
cmpq $0xf0, -0x28(%rbp)
jge 0x6d4eb
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x58(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x50(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x48(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
andq $0xfffffff, %rcx        # imm = 0xFFFFFFF
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0x6db0d
cmpq $0xf8, -0x28(%rbp)
jge 0x6d5ba
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x78(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x70(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x68(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x60(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movabsq $0x7ffffffff, %rcx      # imm = 0x7FFFFFFFF
andq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x6db0d
cmpq $0xfc, -0x28(%rbp)
jge 0x6d6c9
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0xa0(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x98(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x90(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x88(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x80(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movabsq $0x3ffffffffff, %rcx    # imm = 0x3FFFFFFFFFF
andq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x6, -0x4(%rbp)
jmp 0x6db0d
cmpq $0xfe, -0x28(%rbp)
jge 0x6d80c
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0xd0(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0xd0(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0xc8(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0xc8(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0xc0(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0xb8(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0xb0(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0xb0(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0xa8(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movabsq $0x1ffffffffffff, %rcx  # imm = 0x1FFFFFFFFFFFF
andq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x7, -0x4(%rbp)
jmp 0x6db0d
cmpq $0xff, -0x28(%rbp)
jge 0x6d97d
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x108(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x108(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x100(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x100(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0xf8(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0xf8(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0xf0(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0xf0(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0xe8(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0xe8(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0xe0(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0xe0(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0xd8(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0xd8(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movabsq $0xffffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFFF
andq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x8, -0x4(%rbp)
jmp 0x6db0d
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x148(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x148(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x140(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x140(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x138(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x138(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x130(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x130(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x128(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x128(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x120(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x120(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x118(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x118(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x110(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x6cbf0
movl %eax, %ecx
movq -0x110(%rbp), %rax
movzbl %cl, %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x6dafa
jmp 0x6dafc
jmp 0x6dafe
jmp 0x6db00
jmp 0x6db02
jmp 0x6db04
jmp 0x6db06
movl $0x9, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopl (%rax)