// File: sgielen[P]clife/./xxhash/xxhash.h
// Function: XXH3_len_129to240_128b(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned long)
XXH_NO_INLINE XXH_PUREF XXH128_hash_t
XXH3_len_129to240_128b(const xxh_u8* XXH_RESTRICT input, size_t len,
                       const xxh_u8* XXH_RESTRICT secret, size_t secretSize,
                       XXH64_hash_t seed)
{
    XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize;
    XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX);

    {   XXH128_hash_t acc;
        int const nbRounds = (int)len / 32;
        int i;
        acc.low64 = len * XXH_PRIME64_1;
        acc.high64 = 0;
        for (i=0; i<4; i++) {
            acc = XXH128_mix32B(acc,
                                input  + (32 * i),
                                input  + (32 * i) + 16,
                                secret + (32 * i),
                                seed);
        }
        acc.low64 = XXH3_avalanche(acc.low64);
        acc.high64 = XXH3_avalanche(acc.high64);
        XXH_ASSERT(nbRounds >= 4);
        for (i=4 ; i < nbRounds; i++) {
            acc = XXH128_mix32B(acc,
                                input + (32 * i),
                                input + (32 * i) + 16,
                                secret + XXH3_MIDSIZE_STARTOFFSET + (32 * (i - 4)),
                                seed);
        }
        /* last bytes */
        acc = XXH128_mix32B(acc,
                            input + len - 16,
                            input + len - 32,
                            secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET - 16,
                            0ULL - seed);

        {   XXH128_hash_t h128;
            h128.low64  = acc.low64 + acc.high64;
            h128.high64 = (acc.low64    * XXH_PRIME64_1)
                        + (acc.high64   * XXH_PRIME64_4)
                        + ((len - seed) * XXH_PRIME64_2);
            h128.low64  = XXH3_avalanche(h128.low64);
            h128.high64 = (XXH64_hash_t)0 - XXH3_avalanche(h128.high64);
            return h128;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movq -0x20(%rbp), %rax
movl $0x20, %ecx
cltd
idivl %ecx
movl %eax, -0x54(%rbp)
movabsq $-0x61c8864e7a143579, %rax # imm = 0x9E3779B185EBCA87
imulq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movl $0x0, -0x58(%rbp)
cmpl $0x4, -0x58(%rbp)
jge 0x6e9b
movq -0x50(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rdx
movl -0x58(%rbp), %eax
shll $0x5, %eax
cltq
addq %rax, %rdx
movq -0x18(%rbp), %rcx
movl -0x58(%rbp), %eax
shll $0x5, %eax
cltq
addq %rax, %rcx
addq $0x10, %rcx
movq -0x28(%rbp), %r8
movl -0x58(%rbp), %eax
shll $0x5, %eax
cltq
addq %rax, %r8
movq -0x38(%rbp), %r9
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x7420
movq %rax, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x6e20
movq -0x50(%rbp), %rdi
callq 0x6400
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
callq 0x6400
movq %rax, -0x48(%rbp)
movl $0x4, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x6f59
movq -0x50(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rdx
movl -0x58(%rbp), %eax
shll $0x5, %eax
cltq
addq %rax, %rdx
movq -0x18(%rbp), %rcx
movl -0x58(%rbp), %eax
shll $0x5, %eax
cltq
addq %rax, %rcx
addq $0x10, %rcx
movq -0x28(%rbp), %r8
addq $0x3, %r8
movl -0x58(%rbp), %eax
subl $0x4, %eax
shll $0x5, %eax
cltq
addq %rax, %r8
movq -0x38(%rbp), %r9
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x7420
movq %rax, -0x88(%rbp)
movq %rdx, -0x80(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x6ebc
movups -0x50(%rbp), %xmm0
movaps %xmm0, -0xc0(%rbp)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
leaq -0x10(%rax,%rcx), %rdx
leaq -0x20(%rax,%rcx), %rcx
movq -0x28(%rbp), %r8
addq $0x67, %r8
movq -0x38(%rbp), %r9
negq %r9
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0x7420
movq %rax, -0xa8(%rbp)
movq %rdx, -0xa0(%rbp)
movups -0xa8(%rbp), %xmm0
movaps %xmm0, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
movabsq $-0x61c8864e7a143579, %rdx # imm = 0x9E3779B185EBCA87
imulq %rdx, %rax
movabsq $-0x7a1435883d4d519d, %rdx # imm = 0x85EBCA77C2B2AE63
imulq %rdx, %rcx
addq %rcx, %rax
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rdx
subq %rdx, %rcx
movabsq $-0x3d4d51c2d82b14b1, %rdx # imm = 0xC2B2AE3D27D4EB4F
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6400
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6400
negq %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)