// File: /workspace/github_cpp_makefile_star2_O2/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, %r14
imulq %rax, %r14
xorl %r11d, %r11d
xorl %ebx, %ebx
cmpq $0x80, %r11
je 0x1f932
movq (%rdi,%r11), %r12
movq 0x8(%rdi,%r11), %r15
movq (%r8,%r11), %rdx
addq %rcx, %rdx
xorq %r12, %rdx
movq 0x8(%r8,%r11), %rax
subq %rcx, %rax
xorq %r15, %rax
mulq %rdx
movq 0x18(%r8,%r11), %r9
xorq %rax, %rdx
addq %rdx, %r14
movq 0x10(%rdi,%r11), %rax
movq 0x18(%rdi,%r11), %rdx
movq 0x10(%r8,%r11), %r10
addq %rcx, %r10
xorq %rax, %r10
leaq (%rdx,%rax), %r13
subq %rcx, %r9
xorq %rdx, %r9
movq %r9, %rax
mulq %r10
xorq %r13, %r14
xorq %rax, %rdx
addq %rdx, %rbx
addq %r12, %r15
xorq %r15, %rbx
addq $0x20, %r11
jmp 0x1f8c3
movabsq $0x165667b19e3779f9, %rdx # imm = 0x165667B19E3779F9
movl %esi, %r15d
shrl $0x5, %r15d
movq %r14, %rax
shrq $0x25, %rax
xorq %r14, %rax
imulq %rdx, %rax
movq %rax, %r14
shrq $0x20, %r14
xorq %rax, %r14
movq %rbx, %rax
shrq $0x25, %rax
xorq %rbx, %rax
imulq %rdx, %rax
movq %rax, %rbx
shrq $0x20, %rbx
xorq %rax, %rbx
movabsq $0x4, %r12
xorl %r13d, %r13d
cmpq %r15, %r12
jae 0x1f9fc
movq 0x80(%rdi,%r13), %r10
movq 0x88(%rdi,%r13), %rbp
movq 0x3(%r8,%r13), %rdx
addq %rcx, %rdx
xorq %r10, %rdx
movq 0xb(%r8,%r13), %rax
movq 0x1b(%r8,%r13), %r9
subq %rcx, %rax
xorq %rbp, %rax
mulq %rdx
xorq %rax, %rdx
addq %rdx, %r14
movq 0x90(%rdi,%r13), %rax
movq 0x98(%rdi,%r13), %rdx
leaq (%rdx,%rax), %r11
xorq %r11, %r14
movq 0x13(%r8,%r13), %r11
addq %rcx, %r11
xorq %rax, %r11
subq %rcx, %r9
xorq %rdx, %r9
movq %r9, %rax
mulq %r11
xorq %rax, %rdx
addq %rdx, %rbx
addq %r10, %rbp
xorq %rbp, %rbx
incq %r12
addq $0x20, %r13
jmp 0x1f980
movq -0x10(%rdi,%rsi), %r12
movq -0x8(%rdi,%rsi), %r15
movq 0x67(%r8), %rdx
movq 0x77(%r8), %r10
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 %r14, %r9
movq -0x20(%rdi,%rsi), %rax
movq -0x18(%rdi,%rsi), %rdx
leaq (%rdx,%rax), %rdi
xorq %rdi, %r9
subq %rcx, %r10
xorq %rax, %r10
movq 0x7f(%r8), %rax
addq %rcx, %rax
xorq %rdx, %rax
mulq %r10
xorq %rax, %rdx
addq %rbx, %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
movabsq $0x165667b19e3779f9, %rsi # imm = 0x165667B19E3779F9
imulq %rsi, %rcx
movq %rcx, %rax
shrq $0x20, %rax
xorq %rcx, %rax
movq %rdx, %rcx
shrq $0x25, %rcx
xorq %rcx, %rdx
imulq %rsi, %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