// File: gpertea[P]gclib/./xxhash.h
// Function: XXH32_endian_align(unsigned char const*, unsigned long, unsigned int, XXH_alignment)
XXH_FORCE_INLINE xxh_u32
XXH32_endian_align(const xxh_u8* input, size_t len, xxh_u32 seed, XXH_alignment align)
{
    const xxh_u8* bEnd = input + len;
    xxh_u32 h32;

#if defined(XXH_ACCEPT_NULL_INPUT_POINTER) && (XXH_ACCEPT_NULL_INPUT_POINTER>=1)
    if (input==NULL) {
        len=0;
        bEnd=input=(const xxh_u8*)(size_t)16;
    }
#endif

    if (len>=16) {
        const xxh_u8* const limit = bEnd - 15;
        xxh_u32 v1 = seed + XXH_PRIME32_1 + XXH_PRIME32_2;
        xxh_u32 v2 = seed + XXH_PRIME32_2;
        xxh_u32 v3 = seed + 0;
        xxh_u32 v4 = seed - XXH_PRIME32_1;

        do {
            v1 = XXH32_round(v1, XXH_get32bits(input)); input += 4;
            v2 = XXH32_round(v2, XXH_get32bits(input)); input += 4;
            v3 = XXH32_round(v3, XXH_get32bits(input)); input += 4;
            v4 = XXH32_round(v4, XXH_get32bits(input)); input += 4;
        } while (input < limit);

        h32 = XXH_rotl32(v1, 1)  + XXH_rotl32(v2, 7)
            + XXH_rotl32(v3, 12) + XXH_rotl32(v4, 18);
    } else {
        h32  = seed + XXH_PRIME32_5;
    }

    h32 += (xxh_u32)len;

    return XXH32_finalize(h32, input, len&15, align);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x10, -0x10(%rbp)
jb 0xf544
movq -0x20(%rbp), %rax
addq $-0xf, %rax
movq %rax, -0x30(%rbp)
movl -0x14(%rbp), %eax
addl $0x9e3779b1, %eax       # imm = 0x9E3779B1
addl $0x85ebca77, %eax       # imm = 0x85EBCA77
movl %eax, -0x34(%rbp)
movl -0x14(%rbp), %eax
addl $0x85ebca77, %eax       # imm = 0x85EBCA77
movl %eax, -0x38(%rbp)
movl -0x14(%rbp), %eax
addl $0x0, %eax
movl %eax, -0x3c(%rbp)
movl -0x14(%rbp), %eax
subl $0x9e3779b1, %eax       # imm = 0x9E3779B1
movl %eax, -0x40(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0xf5b0
movl -0x50(%rbp), %edi
movl %eax, %esi
callq 0xf580
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x8(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0xf5b0
movl -0x4c(%rbp), %edi
movl %eax, %esi
callq 0xf580
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x8(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0xf5b0
movl -0x48(%rbp), %edi
movl %eax, %esi
callq 0xf580
movl %eax, -0x3c(%rbp)
movq -0x8(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x8(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0xf5b0
movl -0x44(%rbp), %edi
movl %eax, %esi
callq 0xf580
movl %eax, -0x40(%rbp)
movq -0x8(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x30(%rbp), %rax
jb 0xf468
movl -0x34(%rbp), %eax
roll %eax
movl -0x38(%rbp), %ecx
roll $0x7, %ecx
addl %ecx, %eax
movl -0x3c(%rbp), %ecx
roll $0xc, %ecx
addl %ecx, %eax
movl -0x40(%rbp), %ecx
roll $0x12, %ecx
addl %ecx, %eax
movl %eax, -0x24(%rbp)
jmp 0xf54f
movl -0x14(%rbp), %eax
addl $0x165667b1, %eax       # imm = 0x165667B1
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
andq $0xf, %rdx
movl -0x18(%rbp), %ecx
callq 0xf5f0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)