// File: 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:
subq $0x468, %rsp            # imm = 0x468
movq %rdi, 0x178(%rsp)
movq %rsi, 0x170(%rsp)
movq %rdx, 0x168(%rsp)
movq %rcx, 0x160(%rsp)
movq %r8, 0x158(%rsp)
movq 0x170(%rsp), %rax
movl $0x20, %ecx
cltd
idivl %ecx
movl %eax, 0x13c(%rsp)
movabsq $-0x61c8864e7a143579, %rax # imm = 0x9E3779B185EBCA87
imulq 0x170(%rsp), %rax
movq %rax, 0x140(%rsp)
movq $0x0, 0x148(%rsp)
movl $0x0, 0x138(%rsp)
cmpl $0x4, 0x138(%rsp)
jge 0x58ac6
movaps 0x140(%rsp), %xmm0
movaps %xmm0, 0x110(%rsp)
movq 0x178(%rsp), %rcx
movl 0x138(%rsp), %eax
shll $0x5, %eax
cltq
movq %rcx, %rsi
addq %rax, %rsi
leaq 0x10(%rcx,%rax), %rdx
movq 0x168(%rsp), %rcx
addq %rax, %rcx
movq 0x158(%rsp), %rax
movq 0x110(%rsp), %r8
movq 0x118(%rsp), %rdi
movq %r8, 0x390(%rsp)
movq %rdi, 0x398(%rsp)
movq %rsi, 0x388(%rsp)
movq %rdx, 0x380(%rsp)
movq %rcx, 0x378(%rsp)
movq %rax, 0x370(%rsp)
movq 0x388(%rsp), %rdx
movq 0x378(%rsp), %rcx
movq 0x370(%rsp), %rax
movq %rdx, 0x440(%rsp)
movq %rcx, 0x438(%rsp)
movq %rax, 0x430(%rsp)
movq 0x440(%rsp), %rax
movq %rax, 0x460(%rsp)
movq 0x460(%rsp), %rdi
callq 0x5fae0
movq %rax, 0x428(%rsp)
movq 0x440(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x458(%rsp)
movq 0x458(%rsp), %rdi
callq 0x5fae0
movq %rax, 0x420(%rsp)
movq 0x428(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x438(%rsp), %rax
movq %rax, 0x450(%rsp)
movq 0x450(%rsp), %rdi
callq 0x5fae0
movq %rax, %rcx
movq 0x80(%rsp), %rax
movq 0x430(%rsp), %rdx
addq %rdx, %rcx
xorq %rcx, %rax
movq %rax, 0x90(%rsp)
movq 0x420(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x438(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x448(%rsp)
movq 0x448(%rsp), %rdi
callq 0x5fae0
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdi
movq 0x430(%rsp), %rcx
subq %rcx, %rax
xorq %rax, %rsi
callq 0x5fb70
movq %rax, %rcx
movq 0x390(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x390(%rsp)
movq 0x380(%rsp), %rax
movq %rax, 0x3d0(%rsp)
movq 0x3d0(%rsp), %rdi
callq 0x5fae0
movq %rax, 0x98(%rsp)
movq 0x380(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x3c8(%rsp)
movq 0x3c8(%rsp), %rdi
callq 0x5fae0
movq 0x98(%rsp), %rcx
addq %rax, %rcx
movq 0x390(%rsp), %rax
xorq %rcx, %rax
movq %rax, 0x390(%rsp)
movq 0x380(%rsp), %rdx
movq 0x378(%rsp), %rcx
addq $0x10, %rcx
movq 0x370(%rsp), %rax
movq %rdx, 0x3f8(%rsp)
movq %rcx, 0x3f0(%rsp)
movq %rax, 0x3e8(%rsp)
movq 0x3f8(%rsp), %rax
movq %rax, 0x418(%rsp)
movq 0x418(%rsp), %rdi
callq 0x5fae0
movq %rax, 0x3e0(%rsp)
movq 0x3f8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x410(%rsp)
movq 0x410(%rsp), %rdi
callq 0x5fae0
movq %rax, 0x3d8(%rsp)
movq 0x3e0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x3f0(%rsp), %rax
movq %rax, 0x408(%rsp)
movq 0x408(%rsp), %rdi
callq 0x5fae0
movq %rax, %rcx
movq 0xa0(%rsp), %rax
movq 0x3e8(%rsp), %rdx
addq %rdx, %rcx
xorq %rcx, %rax
movq %rax, 0xb0(%rsp)
movq 0x3d8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x3f0(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x400(%rsp)
movq 0x400(%rsp), %rdi
callq 0x5fae0
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdi
movq 0x3e8(%rsp), %rcx
subq %rcx, %rax
xorq %rax, %rsi
callq 0x5fb70
movq %rax, %rcx
movq 0x398(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x398(%rsp)
movq 0x388(%rsp), %rax
movq %rax, 0x3c0(%rsp)
movq 0x3c0(%rsp), %rdi
callq 0x5fae0
movq %rax, 0xb8(%rsp)
movq 0x388(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x3b8(%rsp)
movq 0x3b8(%rsp), %rdi
callq 0x5fae0
movq 0xb8(%rsp), %rcx
addq %rax, %rcx
movq 0x398(%rsp), %rax
xorq %rcx, %rax
movq %rax, 0x398(%rsp)
movups 0x390(%rsp), %xmm0
movaps %xmm0, 0x3a0(%rsp)
movq 0x3a0(%rsp), %rcx
movq 0x3a8(%rsp), %rax
movq %rcx, 0x128(%rsp)
movq %rax, 0x130(%rsp)
movq 0x128(%rsp), %rax
movq %rax, 0x140(%rsp)
movq 0x130(%rsp), %rax
movq %rax, 0x148(%rsp)
movl 0x138(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x138(%rsp)
jmp 0x58698
movq 0x140(%rsp), %rdi
callq 0x5fbb0
movq %rax, 0x140(%rsp)
movq 0x148(%rsp), %rdi
callq 0x5fbb0
movq %rax, 0x148(%rsp)
movl $0x4, 0x138(%rsp)
movl 0x138(%rsp), %eax
cmpl 0x13c(%rsp), %eax
jge 0x58f08
movaps 0x140(%rsp), %xmm0
movaps %xmm0, 0xf0(%rsp)
movq 0x178(%rsp), %rax
movl 0x138(%rsp), %ecx
shll $0x5, %ecx
movslq %ecx, %rdx
movq %rax, %rsi
addq %rdx, %rsi
leaq 0x10(%rax,%rdx), %rdx
movq 0x168(%rsp), %rax
addl $-0x80, %ecx
movslq %ecx, %rcx
leaq 0x3(%rax,%rcx), %rcx
movq 0x158(%rsp), %rax
movq 0xf0(%rsp), %r8
movq 0xf8(%rsp), %rdi
movq %r8, 0x2a0(%rsp)
movq %rdi, 0x2a8(%rsp)
movq %rsi, 0x298(%rsp)
movq %rdx, 0x290(%rsp)
movq %rcx, 0x288(%rsp)
movq %rax, 0x280(%rsp)
movq 0x298(%rsp), %rdx
movq 0x288(%rsp), %rcx
movq 0x280(%rsp), %rax
movq %rdx, 0x348(%rsp)
movq %rcx, 0x340(%rsp)
movq %rax, 0x338(%rsp)
movq 0x348(%rsp), %rax
movq %rax, 0x368(%rsp)
movq 0x368(%rsp), %rdi
callq 0x5fae0
movq %rax, 0x330(%rsp)
movq 0x348(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x360(%rsp)
movq 0x360(%rsp), %rdi
callq 0x5fae0
movq %rax, 0x328(%rsp)
movq 0x330(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x340(%rsp), %rax
movq %rax, 0x358(%rsp)
movq 0x358(%rsp), %rdi
callq 0x5fae0
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq 0x338(%rsp), %rdx
addq %rdx, %rcx
xorq %rcx, %rax
movq %rax, 0x50(%rsp)
movq 0x328(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x340(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x350(%rsp)
movq 0x350(%rsp), %rdi
callq 0x5fae0
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdi
movq 0x338(%rsp), %rcx
subq %rcx, %rax
xorq %rax, %rsi
callq 0x5fb70
movq %rax, %rcx
movq 0x2a0(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x2a0(%rsp)
movq 0x290(%rsp), %rax
movq %rax, 0x2d8(%rsp)
movq 0x2d8(%rsp), %rdi
callq 0x5fae0
movq %rax, 0x58(%rsp)
movq 0x290(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x2d0(%rsp)
movq 0x2d0(%rsp), %rdi
callq 0x5fae0
movq 0x58(%rsp), %rcx
addq %rax, %rcx
movq 0x2a0(%rsp), %rax
xorq %rcx, %rax
movq %rax, 0x2a0(%rsp)
movq 0x290(%rsp), %rdx
movq 0x288(%rsp), %rcx
addq $0x10, %rcx
movq 0x280(%rsp), %rax
movq %rdx, 0x300(%rsp)
movq %rcx, 0x2f8(%rsp)
movq %rax, 0x2f0(%rsp)
movq 0x300(%rsp), %rax
movq %rax, 0x320(%rsp)
movq 0x320(%rsp), %rdi
callq 0x5fae0
movq %rax, 0x2e8(%rsp)
movq 0x300(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x318(%rsp)
movq 0x318(%rsp), %rdi
callq 0x5fae0
movq %rax, 0x2e0(%rsp)
movq 0x2e8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x2f8(%rsp), %rax
movq %rax, 0x310(%rsp)
movq 0x310(%rsp), %rdi
callq 0x5fae0
movq %rax, %rcx
movq 0x60(%rsp), %rax
movq 0x2f0(%rsp), %rdx
addq %rdx, %rcx
xorq %rcx, %rax
movq %rax, 0x70(%rsp)
movq 0x2e0(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x2f8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x308(%rsp)
movq 0x308(%rsp), %rdi
callq 0x5fae0
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdi
movq 0x2f0(%rsp), %rcx
subq %rcx, %rax
xorq %rax, %rsi
callq 0x5fb70
movq %rax, %rcx
movq 0x2a8(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x2a8(%rsp)
movq 0x298(%rsp), %rax
movq %rax, 0x2c8(%rsp)
movq 0x2c8(%rsp), %rdi
callq 0x5fae0
movq %rax, 0x78(%rsp)
movq 0x298(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x2c0(%rsp)
movq 0x2c0(%rsp), %rdi
callq 0x5fae0
movq 0x78(%rsp), %rcx
addq %rax, %rcx
movq 0x2a8(%rsp), %rax
xorq %rcx, %rax
movq %rax, 0x2a8(%rsp)
movups 0x2a0(%rsp), %xmm0
movaps %xmm0, 0x2b0(%rsp)
movq 0x2b0(%rsp), %rcx
movq 0x2b8(%rsp), %rax
movq %rcx, 0x100(%rsp)
movq %rax, 0x108(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0x140(%rsp)
movq 0x108(%rsp), %rax
movq %rax, 0x148(%rsp)
movl 0x138(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x138(%rsp)
jmp 0x58afb
movups 0x140(%rsp), %xmm0
movaps %xmm0, 0xd0(%rsp)
movq 0x178(%rsp), %rax
movq 0x170(%rsp), %rcx
leaq -0x10(%rax,%rcx), %rsi
leaq -0x20(%rax,%rcx), %rdx
movq 0x168(%rsp), %rcx
addq $0x67, %rcx
movq 0x158(%rsp), %rax
negq %rax
movq 0xd0(%rsp), %r8
movq 0xd8(%rsp), %rdi
movq %r8, 0x1b0(%rsp)
movq %rdi, 0x1b8(%rsp)
movq %rsi, 0x1a8(%rsp)
movq %rdx, 0x1a0(%rsp)
movq %rcx, 0x198(%rsp)
movq %rax, 0x190(%rsp)
movq 0x1a8(%rsp), %rdx
movq 0x198(%rsp), %rcx
movq 0x190(%rsp), %rax
movq %rdx, 0x258(%rsp)
movq %rcx, 0x250(%rsp)
movq %rax, 0x248(%rsp)
movq 0x258(%rsp), %rax
movq %rax, 0x278(%rsp)
movq 0x278(%rsp), %rdi
callq 0x5fae0
movq %rax, 0x240(%rsp)
movq 0x258(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x270(%rsp)
movq 0x270(%rsp), %rdi
callq 0x5fae0
movq %rax, 0x238(%rsp)
movq 0x240(%rsp), %rax
movq %rax, (%rsp)
movq 0x250(%rsp), %rax
movq %rax, 0x268(%rsp)
movq 0x268(%rsp), %rdi
callq 0x5fae0
movq %rax, %rcx
movq (%rsp), %rax
movq 0x248(%rsp), %rdx
addq %rdx, %rcx
xorq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x238(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x250(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x260(%rsp)
movq 0x260(%rsp), %rdi
callq 0x5fae0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdi
movq 0x248(%rsp), %rcx
subq %rcx, %rax
xorq %rax, %rsi
callq 0x5fb70
movq %rax, %rcx
movq 0x1b0(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x1b0(%rsp)
movq 0x1a0(%rsp), %rax
movq %rax, 0x1e8(%rsp)
movq 0x1e8(%rsp), %rdi
callq 0x5fae0
movq %rax, 0x18(%rsp)
movq 0x1a0(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x1e0(%rsp)
movq 0x1e0(%rsp), %rdi
callq 0x5fae0
movq 0x18(%rsp), %rcx
addq %rax, %rcx
movq 0x1b0(%rsp), %rax
xorq %rcx, %rax
movq %rax, 0x1b0(%rsp)
movq 0x1a0(%rsp), %rdx
movq 0x198(%rsp), %rcx
addq $0x10, %rcx
movq 0x190(%rsp), %rax
movq %rdx, 0x210(%rsp)
movq %rcx, 0x208(%rsp)
movq %rax, 0x200(%rsp)
movq 0x210(%rsp), %rax
movq %rax, 0x230(%rsp)
movq 0x230(%rsp), %rdi
callq 0x5fae0
movq %rax, 0x1f8(%rsp)
movq 0x210(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x228(%rsp)
movq 0x228(%rsp), %rdi
callq 0x5fae0
movq %rax, 0x1f0(%rsp)
movq 0x1f8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x208(%rsp), %rax
movq %rax, 0x220(%rsp)
movq 0x220(%rsp), %rdi
callq 0x5fae0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq 0x200(%rsp), %rdx
addq %rdx, %rcx
xorq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x1f0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x208(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x218(%rsp)
movq 0x218(%rsp), %rdi
callq 0x5fae0
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdi
movq 0x200(%rsp), %rcx
subq %rcx, %rax
xorq %rax, %rsi
callq 0x5fb70
movq %rax, %rcx
movq 0x1b8(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x1b8(%rsp)
movq 0x1a8(%rsp), %rax
movq %rax, 0x1d8(%rsp)
movq 0x1d8(%rsp), %rdi
callq 0x5fae0
movq %rax, 0x38(%rsp)
movq 0x1a8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x1d0(%rsp)
movq 0x1d0(%rsp), %rdi
callq 0x5fae0
movq 0x38(%rsp), %rcx
addq %rax, %rcx
movq 0x1b8(%rsp), %rax
xorq %rcx, %rax
movq %rax, 0x1b8(%rsp)
movups 0x1b0(%rsp), %xmm0
movaps %xmm0, 0x1c0(%rsp)
movq 0x1c0(%rsp), %rcx
movq 0x1c8(%rsp), %rax
movq %rcx, 0xe0(%rsp)
movq %rax, 0xe8(%rsp)
movups 0xe0(%rsp), %xmm0
movaps %xmm0, 0x140(%rsp)
movq 0x140(%rsp), %rax
movq 0x148(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0xc8(%rsp)
movq 0x140(%rsp), %rax
movq 0x148(%rsp), %rcx
movabsq $-0x61c8864e7a143579, %rdx # imm = 0x9E3779B185EBCA87
imulq %rdx, %rax
movabsq $-0x7a1435883d4d519d, %rdx # imm = 0x85EBCA77C2B2AE63
imulq %rdx, %rcx
addq %rcx, %rax
movq 0x170(%rsp), %rcx
movq 0x158(%rsp), %rdx
subq %rdx, %rcx
movabsq $-0x3d4d51c2d82b14b1, %rdx # imm = 0xC2B2AE3D27D4EB4F
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, 0xc0(%rsp)
movq 0xc8(%rsp), %rdi
callq 0x5fbb0
movq %rax, 0x180(%rsp)
movq 0xc0(%rsp), %rdi
callq 0x5fbb0
negq %rax
movq %rax, 0x188(%rsp)
movq 0x180(%rsp), %rax
movq 0x188(%rsp), %rdx
addq $0x468, %rsp            # imm = 0x468
retq
nopw (%rax,%rax)