// File: /workspace/github_cpp_makefile_star2_O1/BU-DiSC[P]BF-Shared-Hashing/hash/xxh3p.h
// Function: XXH3p_len_129to240_64b(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned long)
XXH_NO_INLINE XXH64_hash_t
XXH3p_len_129to240_64b(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);

    #define XXH3p_MIDSIZE_STARTOFFSET 3
    #define XXH3p_MIDSIZE_LASTOFFSET  17

    {   xxh_u64 acc = len * PRIME64_1;
        int const nbRounds = (int)len / 16;
        int i;
        for (i=0; i<8; i++) {
            acc += XXH3p_mix16B(input+(16*i), secret+(16*i), seed);
        }
        acc = XXH3p_avalanche(acc);
        XXH_ASSERT(nbRounds >= 8);
        for (i=8 ; i < nbRounds; i++) {
            acc += XXH3p_mix16B(input+(16*i), secret+(16*(i-8)) + XXH3p_MIDSIZE_STARTOFFSET, seed);
        }
        /* last bytes */
        acc += XXH3p_mix16B(input + len - 16, secret + XXH3p_SECRET_SIZE_MIN - XXH3p_MIDSIZE_LASTOFFSET, seed);
        return XXH3p_avalanche(acc);
    }
}

// Assembly:
pushq %rbx
movq %rdx, %r8
movabsq $-0x61c8864e7a143579, %rax # imm = 0x9E3779B185EBCA87
imulq %rsi, %rax
movq %rax, %xmm0
movq %rcx, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
xorl %r11d, %r11d
movdqu (%rdi,%r11), %xmm2
movdqu 0x10(%rdi,%r11), %xmm3
movdqa %xmm2, %xmm4
punpcklqdq %xmm3, %xmm4    # xmm4 = xmm4[0],xmm3[0]
punpckhqdq %xmm3, %xmm2    # xmm2 = xmm2[1],xmm3[1]
movdqu (%r8,%r11), %xmm3
movdqu 0x10(%r8,%r11), %xmm5
movdqa %xmm3, %xmm6
punpcklqdq %xmm5, %xmm6    # xmm6 = xmm6[0],xmm5[0]
punpckhqdq %xmm5, %xmm3    # xmm3 = xmm3[1],xmm5[1]
paddq %xmm1, %xmm6
pxor %xmm4, %xmm6
psubq %xmm1, %xmm3
pxor %xmm2, %xmm3
pshufd $0xee, %xmm6, %xmm2     # xmm2 = xmm6[2,3,2,3]
movq %xmm2, %rbx
movq %xmm6, %rdx
pshufd $0xee, %xmm3, %xmm2     # xmm2 = xmm3[2,3,2,3]
movq %xmm3, %rax
mulq %rdx
movq %rax, %r9
movq %rdx, %r10
movq %xmm2, %rax
mulq %rbx
xorq %rax, %rdx
xorq %r9, %r10
movq %r10, %xmm2
movq %rdx, %xmm3
punpcklqdq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0]
paddq %xmm2, %xmm0
addq $0x20, %r11
cmpq $0x80, %r11
jne 0x25003
movabsq $0x165667b19e3779f9, %r9 # imm = 0x165667B19E3779F9
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
paddq %xmm0, %xmm1
movq %xmm1, %rax
movq %rax, %rdx
shrq $0x25, %rdx
xorq %rax, %rdx
imulq %r9, %rdx
movq %rdx, %r10
shrq $0x20, %r10
xorq %rdx, %r10
cmpq $0x90, %rsi
jb 0x2511f
movl %esi, %eax
shrl $0x4, %eax
cmpl $0xa, %eax
movl $0x9, %r11d
cmovael %eax, %r11d
shll $0x4, %r11d
addq $-0x80, %r11
xorl %ebx, %ebx
movq 0x3(%r8,%rbx), %rdx
addq %rcx, %rdx
xorq 0x80(%rdi,%rbx), %rdx
movq 0xb(%r8,%rbx), %rax
subq %rcx, %rax
xorq 0x88(%rdi,%rbx), %rax
mulq %rdx
xorq %rax, %rdx
addq %rdx, %r10
addq $0x10, %rbx
cmpq %rbx, %r11
jne 0x250ed
movq 0x77(%r8), %rdx
addq %rcx, %rdx
xorq -0x10(%rdi,%rsi), %rdx
movq 0x7f(%r8), %rax
subq %rcx, %rax
xorq -0x8(%rdi,%rsi), %rax
mulq %rdx
xorq %rdx, %rax
addq %r10, %rax
movq %rax, %rcx
shrq $0x25, %rcx
xorq %rcx, %rax
imulq %r9, %rax
movq %rax, %rcx
shrq $0x20, %rcx
xorq %rcx, %rax
popq %rbx
retq