// File: /workspace/github_c_makefile_star2_O3/Cyan4973[P]FiniteStateEntropy/programs/xxhash.c
// Function: XXH64
XXH_PUBLIC_API unsigned long long XXH64 (const void* input, size_t len, unsigned long long seed)
{
#if 0
    /* Simple version, good for code maintenance, but unfortunately slow for small inputs */
    XXH64_CREATESTATE_STATIC(state);
    XXH64_reset(state, seed);
    XXH64_update(state, input, len);
    return XXH64_digest(state);
#else
    XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN;

    if (XXH_FORCE_ALIGN_CHECK) {
        if ((((size_t)input) & 7)==0) {  /* Input is aligned, let's leverage the speed advantage */
            if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT)
                return XXH64_endian_align(input, len, seed, XXH_littleEndian, XXH_aligned);
            else
                return XXH64_endian_align(input, len, seed, XXH_bigEndian, XXH_aligned);
    }   }

    if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT)
        return XXH64_endian_align(input, len, seed, XXH_littleEndian, XXH_unaligned);
    else
        return XXH64_endian_align(input, len, seed, XXH_bigEndian, XXH_unaligned);
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movabsq $-0x3d4d51c2d82b14b1, %rax # imm = 0xC2B2AE3D27D4EB4F
movabsq $-0x61c8864e7a143579, %rcx # imm = 0x9E3779B185EBCA87
movabsq $-0x7a1435883d4d519d, %r10 # imm = 0x85EBCA77C2B2AE63
movabsq $0x27d4eb2f165667c5, %r14 # imm = 0x27D4EB2F165667C5
leaq (%rdi,%rsi), %r9
cmpq $0x20, %rsi
jb 0x56f6
leaq -0x20(%r9), %r8
movabsq $0x60ea27eeadc0b5d6, %rbp # imm = 0x60EA27EEADC0B5D6
addq %rdx, %rbp
leaq (%rdx,%rax), %r13
movabsq $0x61c8864e7a143579, %r12 # imm = 0x61C8864E7A143579
addq %rdx, %r12
movq (%rdi), %r15
imulq %rax, %r15
addq %rbp, %r15
rolq $0x1f, %r15
movq %r15, %rbp
imulq %rcx, %rbp
movq 0x8(%rdi), %r14
imulq %rax, %r14
addq %r13, %r14
rolq $0x1f, %r14
movq %r14, %r13
movq 0x10(%rdi), %rbx
imulq %rax, %rbx
addq %rdx, %rbx
rolq $0x1f, %rbx
imulq %rcx, %r13
movq %rbx, %rdx
imulq %rcx, %rdx
movq 0x18(%rdi), %r11
imulq %rax, %r11
addq %r12, %r11
rolq $0x1f, %r11
movq %r11, %r12
imulq %rcx, %r12
addq $0x20, %rdi
cmpq %r8, %rdi
jbe 0x5610
rolq %rbp
rolq $0x7, %r13
rolq $0xc, %rdx
rolq $0x12, %r12
addq %rbp, %r13
addq %rdx, %r12
addq %r13, %r12
movabsq $-0x210ca4fef0869357, %rdx # imm = 0xDEF35B010F796CA9
imulq %rdx, %r15
rolq $0x1f, %r15
imulq %rcx, %r15
xorq %r12, %r15
imulq %rcx, %r15
addq %r10, %r15
imulq %rdx, %r14
rolq $0x1f, %r14
imulq %rcx, %r14
xorq %r15, %r14
imulq %rcx, %r14
imulq %rdx, %rbx
rolq $0x1f, %rbx
addq %r10, %r14
imulq %rcx, %rbx
xorq %r14, %rbx
imulq %rcx, %rbx
addq %r10, %rbx
imulq %rdx, %r11
rolq $0x1f, %r11
imulq %rcx, %r11
xorq %rbx, %r11
imulq %rcx, %r11
addq %r10, %r11
movabsq $0x27d4eb2f165667c5, %r14 # imm = 0x27D4EB2F165667C5
jmp 0x56fc
addq %r14, %rdx
movq %rdx, %r11
addq %rsi, %r11
leaq 0x8(%rdi), %rdx
cmpq %r9, %rdx
jbe 0x5710
movq %r11, %rdx
movq %rdi, %rbx
jmp 0x5740
movq (%rdi), %rdx
imulq %rax, %rdx
rolq $0x1f, %rdx
imulq %rcx, %rdx
xorq %r11, %rdx
rolq $0x1b, %rdx
imulq %rcx, %rdx
addq %r10, %rdx
leaq 0x8(%rdi), %rbx
addq $0x10, %rdi
movq %rdx, %r11
cmpq %r9, %rdi
movq %rbx, %rdi
jbe 0x5710
movabsq $0x165667b19e3779f9, %rdi # imm = 0x165667B19E3779F9
leaq 0x4(%rbx), %r8
cmpq %r9, %r8
jbe 0x5758
movq %rbx, %r8
jmp 0x5770
movl (%rbx), %r10d
imulq %rcx, %r10
xorq %rdx, %r10
rolq $0x17, %r10
imulq %rax, %r10
addq %rdi, %r10
movq %r10, %rdx
cmpq %r9, %r8
jae 0x5795
movzbl (%r8), %r10d
imulq %r14, %r10
xorq %rdx, %r10
rolq $0xb, %r10
imulq %rcx, %r10
incq %r8
movq %r10, %rdx
cmpq %r9, %r8
jb 0x5775
jmp 0x5798
movq %rdx, %r10
movq %r10, %rcx
shrq $0x21, %rcx
xorq %r10, %rcx
imulq %rax, %rcx
movq %rcx, %rdx
shrq $0x1d, %rdx
xorq %rcx, %rdx
imulq %rdi, %rdx
movq %rdx, %rax
shrq $0x20, %rax
xorq %rdx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq