// File: /workspace/github_cpp_makefile_star2_O1/BU-DiSC[P]BF-Shared-Hashing/hash/xxh3p.h
// Function: XXH3p_len_129to240_128b(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned long)
XXH_NO_INLINE XXH128_hash_t
XXH3p_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 >= XXH3p_SECRET_SIZE_MIN); (void)secretSize;
    XXH_ASSERT(128 < len && len <= XXH3p_MIDSIZE_MAX);

    {   XXH128_hash_t acc;
        int const nbRounds = (int)len / 32;
        int i;
        acc.low64 = len * 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 = XXH3p_avalanche(acc.low64);
        acc.high64 = XXH3p_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+XXH3p_MIDSIZE_STARTOFFSET+(32*(i-4)), seed);
        }
        /* last bytes */
        acc = XXH128_mix32B(acc, input + len - 16, input + len - 32, secret + XXH3p_SECRET_SIZE_MIN - XXH3p_MIDSIZE_LASTOFFSET - 16, 0ULL - seed);

        {   xxh_u64 const low64 = acc.low64 + acc.high64;
            xxh_u64 const high64 = (acc.low64 * PRIME64_1) + (acc.high64 * PRIME64_4) + ((len - seed) * PRIME64_2);
            XXH128_hash_t const h128 = { XXH3p_avalanche(low64), (XXH64_hash_t)0 - XXH3p_avalanche(high64) };
            return h128;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r8
movabsq $-0x61c8864e7a143579, %rax # imm = 0x9E3779B185EBCA87
movq %rsi, %rbx
imulq %rax, %rbx
xorl %r11d, %r11d
xorl %r14d, %r14d
movq (%rdi,%r11), %r15
movq 0x8(%rdi,%r11), %r12
movq (%r8,%r11), %rdx
addq %rcx, %rdx
xorq %r15, %rdx
movq 0x8(%r8,%r11), %rax
movq 0x18(%r8,%r11), %r9
subq %rcx, %rax
xorq %r12, %rax
mulq %rdx
xorq %rax, %rdx
addq %rbx, %rdx
movq 0x10(%rdi,%r11), %rax
movq 0x18(%rdi,%r11), %r13
leaq (%rax,%r13), %rbx
xorq %rdx, %rbx
movq 0x10(%r8,%r11), %rdx
addq %rcx, %rdx
xorq %rax, %rdx
subq %rcx, %r9
xorq %r13, %r9
movq %r9, %rax
mulq %rdx
xorq %rax, %rdx
addq %r14, %rdx
addq %r15, %r12
movq %r12, %r14
xorq %rdx, %r14
addq $0x20, %r11
cmpq $0x80, %r11
jne 0x261eb
movabsq $0x165667b19e3779f9, %r11 # imm = 0x165667B19E3779F9
movq %rbx, %rax
shrq $0x25, %rax
xorq %rbx, %rax
imulq %r11, %rax
movq %rax, %rbx
shrq $0x20, %rbx
xorq %rax, %rbx
movq %r14, %rax
shrq $0x25, %rax
xorq %r14, %rax
imulq %r11, %rax
movq %rax, %r15
shrq $0x20, %r15
xorq %rax, %r15
cmpq $0xa0, %rsi
jb 0x2633b
movl %esi, %eax
shrl $0x5, %eax
cmpl $0x6, %eax
movl $0x5, %r12d
cmovael %eax, %r12d
shll $0x5, %r12d
addq $-0x80, %r12
xorl %r13d, %r13d
movq 0x80(%rdi,%r13), %rbp
movq 0x88(%rdi,%r13), %r14
movq 0x3(%r8,%r13), %rdx
addq %rcx, %rdx
xorq %rbp, %rdx
movq 0xb(%r8,%r13), %rax
movq 0x1b(%r8,%r13), %r9
subq %rcx, %rax
xorq %r14, %rax
mulq %rdx
xorq %rax, %rdx
addq %rbx, %rdx
movq 0x90(%rdi,%r13), %rax
movq 0x98(%rdi,%r13), %r10
leaq (%r10,%rax), %rbx
xorq %rdx, %rbx
movq 0x13(%r8,%r13), %rdx
addq %rcx, %rdx
xorq %rax, %rdx
subq %rcx, %r9
xorq %r10, %r9
movq %r9, %rax
mulq %rdx
xorq %rax, %rdx
addq %r15, %rdx
addq %rbp, %r14
xorq %rdx, %r14
addq $0x20, %r13
movq %r14, %r15
cmpq %r13, %r12
jne 0x262bf
jmp 0x2633e
movq %r15, %r14
movq -0x10(%rdi,%rsi), %r12
movq -0x8(%rdi,%rsi), %r15
movq 0x67(%r8), %rdx
movq 0x77(%r8), %r13
subq %rcx, %rdx
xorq %r12, %rdx
movq 0x6f(%r8), %rax
addq %rcx, %rax
xorq %r15, %rax
mulq %rdx
movq %rdx, %r9
xorq %rax, %r9
addq %rbx, %r9
movq -0x20(%rdi,%rsi), %rax
movq -0x18(%rdi,%rsi), %rdx
leaq (%rdx,%rax), %rdi
xorq %rdi, %r9
subq %rcx, %r13
xorq %rax, %r13
movq 0x7f(%r8), %rax
addq %rcx, %rax
xorq %rdx, %rax
mulq %r13
xorq %rax, %rdx
addq %r14, %rdx
addq %r12, %r15
xorq %r15, %rdx
leaq (%rdx,%r9), %rax
movabsq $-0x61c8864e7a143579, %rdi # imm = 0x9E3779B185EBCA87
imulq %rdi, %r9
movabsq $-0x7a1435883d4d519d, %rdi # imm = 0x85EBCA77C2B2AE63
imulq %rdi, %rdx
subq %rcx, %rsi
movabsq $-0x3d4d51c2d82b14b1, %rcx # imm = 0xC2B2AE3D27D4EB4F
imulq %rsi, %rcx
addq %r9, %rcx
addq %rcx, %rdx
movq %rax, %rcx
shrq $0x25, %rcx
xorq %rax, %rcx
imulq %r11, %rcx
movq %rcx, %rax
shrq $0x20, %rax
xorq %rcx, %rax
movq %rdx, %rcx
shrq $0x25, %rcx
xorq %rcx, %rdx
imulq %r11, %rdx
movq %rdx, %rcx
shrq $0x20, %rcx
xorq %rcx, %rdx
negq %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq