// File: /workspace/github_cpp_makefile_star2_O1/sgielen[P]clife/./xxhash/xxhash.h
// Function: XXH3_digest_long(unsigned long*, XXH3_state_s const*, unsigned char const*)
XXH_FORCE_INLINE void
XXH3_digest_long (XXH64_hash_t* acc,
                  const XXH3_state_t* state,
                  const unsigned char* secret)
{
    /*
     * Digest on a local copy. This way, the state remains unaltered, and it can
     * continue ingesting more input afterwards.
     */
    XXH_memcpy(acc, state->acc, sizeof(state->acc));
    if (state->bufferedSize >= XXH_STRIPE_LEN) {
        size_t const nbStripes = (state->bufferedSize - 1) / XXH_STRIPE_LEN;
        size_t nbStripesSoFar = state->nbStripesSoFar;
        XXH3_consumeStripes(acc,
                           &nbStripesSoFar, state->nbStripesPerBlock,
                            state->buffer, nbStripes,
                            secret, state->secretLimit,
                            XXH3_accumulate_512, XXH3_scrambleAcc);
        /* last stripe */
        XXH3_accumulate_512(acc,
                            state->buffer + state->bufferedSize - XXH_STRIPE_LEN,
                            secret + state->secretLimit - XXH_SECRET_LASTACC_START);
    } else {  /* bufferedSize < XXH_STRIPE_LEN */
        xxh_u8 lastStripe[XXH_STRIPE_LEN];
        size_t const catchupSize = XXH_STRIPE_LEN - state->bufferedSize;
        XXH_ASSERT(state->bufferedSize > 0);  /* there is always some input buffered */
        XXH_memcpy(lastStripe, state->buffer + sizeof(state->buffer) - catchupSize, catchupSize);
        XXH_memcpy(lastStripe + catchupSize, state->buffer, state->bufferedSize);
        XXH3_accumulate_512(acc,
                            lastStripe,
                            secret + state->secretLimit - XXH_SECRET_LASTACC_START);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movdqu (%rsi), %xmm0
movdqu 0x10(%rsi), %xmm1
movdqu 0x20(%rsi), %xmm2
movups 0x30(%rsi), %xmm3
movups %xmm3, 0x30(%rdi)
movdqu %xmm2, 0x20(%rdi)
movdqu %xmm1, 0x10(%rdi)
movdqu %xmm0, (%rdi)
movl 0x200(%rsi), %r12d
cmpq $0x40, %r12
jb 0x3aae
decl %r12d
shrl $0x6, %r12d
movq 0x208(%r15), %rax
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x100(%r15), %rcx
movq 0x218(%r15), %rdx
movq 0x220(%r15), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r12, %r8
movq %r14, %r9
callq 0x50c7
movl 0x200(%r15), %eax
addq %r15, %rax
addq $0xc0, %rax
movq 0x220(%r15), %rcx
addq %r14, %rcx
addq $-0x7, %rcx
xorl %edx, %edx
movdqu (%rax,%rdx), %xmm0
movdqu (%rcx,%rdx), %xmm1
pxor %xmm0, %xmm1
pshufd $0xf5, %xmm1, %xmm2     # xmm2 = xmm1[1,1,3,3]
pmuludq %xmm1, %xmm2
pshufd $0x4e, %xmm0, %xmm0     # xmm0 = xmm0[2,3,0,1]
paddq (%rbx,%rdx), %xmm0
paddq %xmm2, %xmm0
movdqa %xmm0, (%rbx,%rdx)
addq $0x10, %rdx
cmpq $0x40, %rdx
jne 0x3a78
jmp 0x3b2d
leaq 0x200(%r15), %rsi
movl $0x40, %r13d
subq %r12, %r13
leaq 0x100(%r15), %rbp
subq %r13, %rsi
leaq 0x10(%rsp), %rdi
movq %r13, %rdx
callq 0x2120
leaq (%rsp,%r13), %rdi
addq $0x10, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x2120
movq 0x220(%r15), %rax
addq %r14, %rax
addq $-0x7, %rax
xorl %ecx, %ecx
movdqa 0x10(%rsp,%rcx), %xmm0
movdqu (%rax,%rcx), %xmm1
pxor %xmm0, %xmm1
pshufd $0xf5, %xmm1, %xmm2     # xmm2 = xmm1[1,1,3,3]
pmuludq %xmm1, %xmm2
pshufd $0x4e, %xmm0, %xmm0     # xmm0 = xmm0[2,3,0,1]
paddq (%rbx,%rcx), %xmm0
paddq %xmm2, %xmm0
movdqa %xmm0, (%rbx,%rcx)
addq $0x10, %rcx
cmpq $0x40, %rcx
jne 0x3af8
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq