// File: sgielen[P]clife/./xxhash/xxhash.h
// Function: XXH3_len_17to128_128b(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned long)
XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t
XXH3_len_17to128_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(16 < len && len <= 128);

    {   XXH128_hash_t acc;
        acc.low64 = len * XXH_PRIME64_1;
        acc.high64 = 0;

#if XXH_SIZE_OPT >= 1
        {
            /* Smaller, but slightly slower. */
            size_t i = (len - 1) / 32;
            do {
                acc = XXH128_mix32B(acc, input+16*i, input+len-16*(i+1), secret+32*i, seed);
            } while (i-- != 0);
        }
#else
        if (len > 32) {
            if (len > 64) {
                if (len > 96) {
                    acc = XXH128_mix32B(acc, input+48, input+len-64, secret+96, seed);
                }
                acc = XXH128_mix32B(acc, input+32, input+len-48, secret+64, seed);
            }
            acc = XXH128_mix32B(acc, input+16, input+len-32, secret+32, seed);
        }
        acc = XXH128_mix32B(acc, input, input+len-16, secret, seed);
#endif
        {   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 $0xd0, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movabsq $-0x61c8864e7a143579, %rax # imm = 0x9E3779B185EBCA87
imulq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
cmpq $0x20, -0x20(%rbp)
jbe 0x6cfa
cmpq $0x40, -0x20(%rbp)
jbe 0x6c8d
cmpq $0x60, -0x20(%rbp)
jbe 0x6c2c
movq -0x50(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rdx
addq $0x30, %rdx
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
addq $-0x40, %rcx
movq -0x28(%rbp), %r8
addq $0x60, %r8
movq -0x38(%rbp), %r9
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x7420
movq %rax, -0x60(%rbp)
movq %rdx, -0x58(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rdx
addq $0x20, %rdx
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
addq $-0x30, %rcx
movq -0x28(%rbp), %r8
addq $0x40, %r8
movq -0x38(%rbp), %r9
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x7420
movq %rax, -0x80(%rbp)
movq %rdx, -0x78(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x18(%rbp), %rdx
addq $0x10, %rdx
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
addq $-0x20, %rcx
movq -0x28(%rbp), %r8
addq $0x20, %r8
movq -0x38(%rbp), %r9
movq -0xb0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0x7420
movq %rax, -0xa0(%rbp)
movq %rdx, -0x98(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x48(%rbp)
movups -0x50(%rbp), %xmm0
movaps %xmm0, -0xd0(%rbp)
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rax
leaq -0x10(%rdx,%rax), %rcx
movq -0x28(%rbp), %r8
movq -0x38(%rbp), %r9
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0x7420
movq %rax, -0xc0(%rbp)
movq %rdx, -0xb8(%rbp)
movups -0xc0(%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 $0xd0, %rsp
popq %rbp
retq
nopw (%rax,%rax)