// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/../htscodecs/htscodecs/varint.h
// Function: var_put_u64
static inline
int var_put_u64(uint8_t *cp, const uint8_t *endp, uint64_t i) {
    if (endp && (endp-cp) < 10)
        return var_put_u64_safe(cp, endp, i);

    // maximum of 10 bytes written
    if (i < (1<<7)) {
        *cp = i;
        return 1;
    } else if (i < (1<<14)) {
        *cp++ = ((i>> 7) & 0x7f) | 128;
        *cp++ =   i      & 0x7f;
        return 2;
    } else if (i < (1<<21)) {
        *cp++ = ((i>>14) & 0x7f) | 128;
        *cp++ = ((i>> 7) & 0x7f) | 128;
        *cp++ =   i      & 0x7f;
        return 3;
    } else if (i < (1<<28)) {
        *cp++ = ((i>>21) & 0x7f) | 128;
        *cp++ = ((i>>14) & 0x7f) | 128;
        *cp++ = ((i>> 7) & 0x7f) | 128;
        *cp++ =   i      & 0x7f;
        return 4;
    } else if (i < (1ULL<<35)) {
        *cp++ = ((i>>28) & 0x7f) | 128;
        *cp++ = ((i>>21) & 0x7f) | 128;
        *cp++ = ((i>>14) & 0x7f) | 128;
        *cp++ = ((i>> 7) & 0x7f) | 128;
        *cp++ =   i      & 0x7f;
        return 5;
    } else if (i < (1ULL<<42)) {
        *cp++ = ((i>>35) & 0x7f) | 128;
        *cp++ = ((i>>28) & 0x7f) | 128;
        *cp++ = ((i>>21) & 0x7f) | 128;
        *cp++ = ((i>>14) & 0x7f) | 128;
        *cp++ = ((i>> 7) & 0x7f) | 128;
        *cp++ =   i      & 0x7f;
        return 6;
    } else if (i < (1ULL<<49)) {
        *cp++ = ((i>>42) & 0x7f) | 128;
        *cp++ = ((i>>35) & 0x7f) | 128;
        *cp++ = ((i>>28) & 0x7f) | 128;
        *cp++ = ((i>>21) & 0x7f) | 128;
        *cp++ = ((i>>14) & 0x7f) | 128;
        *cp++ = ((i>> 7) & 0x7f) | 128;
        *cp++ =   i      & 0x7f;
        return 7;
    } else if (i < (1ULL<<56)) {
        *cp++ = ((i>>49) & 0x7f) | 128;
        *cp++ = ((i>>42) & 0x7f) | 128;
        *cp++ = ((i>>35) & 0x7f) | 128;
        *cp++ = ((i>>28) & 0x7f) | 128;
        *cp++ = ((i>>21) & 0x7f) | 128;
        *cp++ = ((i>>14) & 0x7f) | 128;
        *cp++ = ((i>> 7) & 0x7f) | 128;
        *cp++ =   i      & 0x7f;
        return 8;
    } else if (i < (1ULL<<63)) {
        *cp++ = ((i>>56) & 0x7f) | 128;
        *cp++ = ((i>>49) & 0x7f) | 128;
        *cp++ = ((i>>42) & 0x7f) | 128;
        *cp++ = ((i>>35) & 0x7f) | 128;
        *cp++ = ((i>>28) & 0x7f) | 128;
        *cp++ = ((i>>21) & 0x7f) | 128;
        *cp++ = ((i>>14) & 0x7f) | 128;
        *cp++ = ((i>> 7) & 0x7f) | 128;
        *cp++ =   i      & 0x7f;
        return 9;
    } else {
        *cp++ = ((i>>63) & 0x7f) | 128;
        *cp++ = ((i>>56) & 0x7f) | 128;
        *cp++ = ((i>>49) & 0x7f) | 128;
        *cp++ = ((i>>42) & 0x7f) | 128;
        *cp++ = ((i>>35) & 0x7f) | 128;
        *cp++ = ((i>>28) & 0x7f) | 128;
        *cp++ = ((i>>21) & 0x7f) | 128;
        *cp++ = ((i>>14) & 0x7f) | 128;
        *cp++ = ((i>> 7) & 0x7f) | 128;
        *cp++ =   i      & 0x7f;
    }

    return 10;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x7e215
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
cmpq $0xa, %rax
jge 0x7e215
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x7eac0
movl %eax, -0x4(%rbp)
jmp 0x7eaa8
cmpq $0x80, -0x20(%rbp)
jae 0x7e237
movq -0x20(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7eaa8
cmpq $0x4000, -0x20(%rbp)    # imm = 0x4000
jae 0x7e28d
movq -0x20(%rbp), %rax
shrq $0x7, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
andq $0x7f, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x7eaa8
cmpq $0x200000, -0x20(%rbp)  # imm = 0x200000
jae 0x7e308
movq -0x20(%rbp), %rax
shrq $0xe, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x7, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
andq $0x7f, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0x7eaa8
cmpq $0x10000000, -0x20(%rbp) # imm = 0x10000000
jae 0x7e3ac
movq -0x20(%rbp), %rax
shrq $0x15, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0xe, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x7, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
andq $0x7f, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0x7eaa8
movabsq $0x800000000, %rax      # imm = 0x800000000
cmpq %rax, -0x20(%rbp)
jae 0x7e47b
movq -0x20(%rbp), %rax
shrq $0x1c, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x15, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0xe, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x7, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
andq $0x7f, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x7eaa8
movabsq $0x40000000000, %rax    # imm = 0x40000000000
cmpq %rax, -0x20(%rbp)
jae 0x7e56f
movq -0x20(%rbp), %rax
shrq $0x23, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x1c, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x15, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0xe, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x7, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
andq $0x7f, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movl $0x6, -0x4(%rbp)
jmp 0x7eaa8
movabsq $0x2000000000000, %rax  # imm = 0x2000000000000
cmpq %rax, -0x20(%rbp)
jae 0x7e688
movq -0x20(%rbp), %rax
shrq $0x2a, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x23, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x1c, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x15, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0xe, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x7, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
andq $0x7f, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movl $0x7, -0x4(%rbp)
jmp 0x7eaa8
movabsq $0x100000000000000, %rax # imm = 0x100000000000000
cmpq %rax, -0x20(%rbp)
jae 0x7e7c6
movq -0x20(%rbp), %rax
shrq $0x31, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x2a, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x23, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x1c, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x15, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0xe, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x7, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
andq $0x7f, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movl $0x8, -0x4(%rbp)
jmp 0x7eaa8
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, -0x20(%rbp)
jae 0x7e929
movq -0x20(%rbp), %rax
shrq $0x38, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x31, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x2a, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x23, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x1c, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x15, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0xe, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x7, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
andq $0x7f, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movl $0x9, -0x4(%rbp)
jmp 0x7eaa8
movq -0x20(%rbp), %rax
shrq $0x3f, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x38, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x31, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x2a, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x23, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x1c, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x15, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0xe, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
shrq $0x7, %rax
andq $0x7f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
andq $0x7f, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x7ea93
jmp 0x7ea95
jmp 0x7ea97
jmp 0x7ea99
jmp 0x7ea9b
jmp 0x7ea9d
jmp 0x7ea9f
jmp 0x7eaa1
movl $0xa, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)