// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/cram/cram_io.h
// Function: append_uint64
static inline unsigned char *append_uint64(unsigned char *cp, uint64_t i) {
    uint64_t j;

    if (i <= 0xffffffff)
        return append_uint32(cp, i);

    if ((j = i/1000000000) > 1000000000) {
        cp = append_uint32(cp, j/1000000000);
        j %= 1000000000;
        cp = append_sub32(cp, j);
    } else {
        cp = append_uint32(cp, i / 1000000000);
    }
    cp = append_sub32(cp, i % 1000000000);

    return cp;
}

// Assembly:
movq %rsi, %rax
shrq $0x20, %rax
jne 0x3d7f1
jmp 0x3e7d0
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rax
shrq $0x9, %rax
movabsq $0x44b82fa09b5a53, %rcx # imm = 0x44B82FA09B5A53
mulq %rcx
movq %rdx, %rbx
shrq $0xb, %rbx
imulq $0x3b9aca00, %rbx, %rax # imm = 0x3B9ACA00
movq %rsi, %r14
subq %rax, %r14
movabsq $0xde0b6b3e2feca00, %rax # imm = 0xDE0B6B3E2FECA00
cmpq %rax, %rsi
jb 0x3d939
shrq $0x12, %rsi
movabsq $0x49c97747490f, %rcx   # imm = 0x49C97747490F
movq %rsi, %rax
mulq %rcx
shrl $0x18, %edx
movl %edx, %esi
callq 0x3e7d0
movq %rax, %rcx
movabsq $0x44b82fa0a, %rdx      # imm = 0x44B82FA0A
movq %rbx, %rax
mulq %rdx
imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00
subq %rax, %rbx
imulq $0x2af31dc5, %rbx, %rax # imm = 0x2AF31DC5
shrq $0x38, %rax
imull $0x5f5e100, %eax, %edx  # imm = 0x5F5E100
orb $0x30, %al
movb %al, (%rcx)
subl %edx, %ebx
imulq $0x6b5fca7, %rbx, %rax  # imm = 0x6B5FCA7
shrq $0x32, %rax
imull $0x989680, %eax, %edx   # imm = 0x989680
orb $0x30, %al
movb %al, 0x1(%rcx)
subl %edx, %ebx
imulq $0x10c6f7b, %rbx, %rax  # imm = 0x10C6F7B
shrq $0x2c, %rax
leal 0x30(%rax), %edx
movb %dl, 0x2(%rcx)
imull $0xf4240, %eax, %eax    # imm = 0xF4240
subl %eax, %ebx
imulq $0xa7c5b, %rbx, %rax    # imm = 0xA7C5B
shrq $0x24, %rax
imull $0x186a0, %eax, %edx    # imm = 0x186A0
orb $0x30, %al
movb %al, 0x3(%rcx)
subl %edx, %ebx
imulq $0x68db9, %rbx, %rax    # imm = 0x68DB9
shrq $0x20, %rax
imull $0x2710, %eax, %edx     # imm = 0x2710
orb $0x30, %al
movb %al, 0x4(%rcx)
subl %edx, %ebx
imull $0x20c5, %ebx, %eax     # imm = 0x20C5
shrl $0x17, %eax
leal 0x30(%rax), %edx
movb %dl, 0x5(%rcx)
imull $0x3e8, %eax, %eax      # imm = 0x3E8
subl %eax, %ebx
movl $0xffff, %eax           # imm = 0xFFFF
movl %ebx, %edx
andl %eax, %edx
imull $0x290, %edx, %edx      # imm = 0x290
shrl $0x10, %edx
imull $0x64, %edx, %esi
orb $0x30, %dl
movb %dl, 0x6(%rcx)
subl %esi, %ebx
imull $0x67, %ebx, %edx
andl %eax, %edx
shrl $0xa, %edx
movl %edx, %eax
orb $0x30, %al
movb %al, 0x7(%rcx)
addl %edx, %edx
leal (%rdx,%rdx,4), %eax
subb %al, %bl
orb $0x30, %bl
movb %bl, 0x8(%rcx)
addq $0x9, %rcx
jmp 0x3d943
movl %ebx, %esi
callq 0x3e7d0
movq %rax, %rcx
movl %r14d, %eax
imulq $0x55e63b89, %rax, %rax # imm = 0x55E63B89
shrq $0x39, %rax
imull $0x5f5e100, %eax, %edx  # imm = 0x5F5E100
orb $0x30, %al
movb %al, (%rcx)
subl %edx, %r14d
imulq $0x6b5fca7, %r14, %rax  # imm = 0x6B5FCA7
shrq $0x32, %rax
imull $0x989680, %eax, %edx   # imm = 0x989680
orb $0x30, %al
movb %al, 0x1(%rcx)
subl %edx, %r14d
imulq $0x10c6f7b, %r14, %rax  # imm = 0x10C6F7B
shrq $0x2c, %rax
leal 0x30(%rax), %edx
movb %dl, 0x2(%rcx)
imull $0xf4240, %eax, %eax    # imm = 0xF4240
subl %eax, %r14d
imulq $0xa7c5b, %r14, %rax    # imm = 0xA7C5B
shrq $0x24, %rax
imull $0x186a0, %eax, %edx    # imm = 0x186A0
orb $0x30, %al
movb %al, 0x3(%rcx)
subl %edx, %r14d
imulq $0x68db9, %r14, %rax    # imm = 0x68DB9
shrq $0x20, %rax
imull $0x2710, %eax, %edx     # imm = 0x2710
orb $0x30, %al
movb %al, 0x4(%rcx)
subl %edx, %r14d
imull $0x20c5, %r14d, %eax    # imm = 0x20C5
shrl $0x17, %eax
leal 0x30(%rax), %edx
movb %dl, 0x5(%rcx)
imull $0x3e8, %eax, %eax      # imm = 0x3E8
subl %eax, %r14d
movl $0xffff, %eax           # imm = 0xFFFF
movl %r14d, %edx
andl %eax, %edx
imull $0x290, %edx, %edx      # imm = 0x290
shrl $0x10, %edx
imull $0x64, %edx, %esi
orb $0x30, %dl
movb %dl, 0x6(%rcx)
subl %esi, %r14d
imull $0x67, %r14d, %edx
andl %eax, %edx
shrl $0xa, %edx
movl %edx, %eax
orb $0x30, %al
movb %al, 0x7(%rcx)
addl %edx, %edx
leal (%rdx,%rdx,4), %eax
subb %al, %r14b
orb $0x30, %r14b
movb %r14b, 0x8(%rcx)
addq $0x9, %rcx
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq