// File: sgielen[P]clife/./xxhash/xxhash.h
// Function: XXH64_endian_align(unsigned char const*, unsigned long, unsigned long, XXH_alignment)
XXH_FORCE_INLINE XXH_PUREF xxh_u64
XXH64_endian_align(const xxh_u8* input, size_t len, xxh_u64 seed, XXH_alignment align)
{
    xxh_u64 h64;
    if (input==NULL) XXH_ASSERT(len == 0);

    if (len>=32) {
        const xxh_u8* const bEnd = input + len;
        const xxh_u8* const limit = bEnd - 31;
        xxh_u64 v1 = seed + XXH_PRIME64_1 + XXH_PRIME64_2;
        xxh_u64 v2 = seed + XXH_PRIME64_2;
        xxh_u64 v3 = seed + 0;
        xxh_u64 v4 = seed - XXH_PRIME64_1;

        do {
            v1 = XXH64_round(v1, XXH_get64bits(input)); input+=8;
            v2 = XXH64_round(v2, XXH_get64bits(input)); input+=8;
            v3 = XXH64_round(v3, XXH_get64bits(input)); input+=8;
            v4 = XXH64_round(v4, XXH_get64bits(input)); input+=8;
        } while (input<limit);

        h64 = XXH_rotl64(v1, 1) + XXH_rotl64(v2, 7) + XXH_rotl64(v3, 12) + XXH_rotl64(v4, 18);
        h64 = XXH64_mergeRound(h64, v1);
        h64 = XXH64_mergeRound(h64, v2);
        h64 = XXH64_mergeRound(h64, v3);
        h64 = XXH64_mergeRound(h64, v4);

    } else {
        h64  = seed + XXH_PRIME64_5;
    }

    h64 += (xxh_u64) len;

    return XXH64_finalize(h64, input, len, align);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x2c83
jmp 0x2c83
cmpq $0x20, -0x10(%rbp)
jb 0x2e38
movq -0x8(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $-0x1f, %rax
movq %rax, -0x38(%rbp)
movabsq $-0x61c8864e7a143579, %rax # imm = 0x9E3779B185EBCA87
addq -0x18(%rbp), %rax
movabsq $-0x3d4d51c2d82b14b1, %rcx # imm = 0xC2B2AE3D27D4EB4F
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movabsq $-0x3d4d51c2d82b14b1, %rax # imm = 0xC2B2AE3D27D4EB4F
addq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
addq $0x0, %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movabsq $-0x61c8864e7a143579, %rcx # imm = 0x9E3779B185EBCA87
subq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x5d30
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x3290
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x5d30
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x3290
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x5d30
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0x3290
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x5d30
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x3290
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x38(%rbp), %rax
jb 0x2cf8
movq -0x40(%rbp), %rax
rolq %rax
movq -0x48(%rbp), %rcx
rolq $0x7, %rcx
addq %rcx, %rax
movq -0x50(%rbp), %rcx
rolq $0xc, %rcx
addq %rcx, %rax
movq -0x58(%rbp), %rcx
rolq $0x12, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x3400
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x3400
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x3400
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x3400
movq %rax, -0x28(%rbp)
jmp 0x2e4a
movabsq $0x27d4eb2f165667c5, %rax # imm = 0x27D4EB2F165667C5
addq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x3460
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)