// File: /workspace/github_cpp_makefile_star2_O2/sgielen[P]clife/./xxhash/xxhash.h
// Function: XXH64_update
XXH_PUBLIC_API XXH_errorcode
XXH64_update (XXH64_state_t* state, const void* input, size_t len)
{
    if (input==NULL) {
        XXH_ASSERT(len == 0);
        return XXH_OK;
    }

    {   const xxh_u8* p = (const xxh_u8*)input;
        const xxh_u8* const bEnd = p + len;

        state->total_len += len;

        if (state->memsize + len < 32) {  /* fill in tmp buffer */
            XXH_memcpy(((xxh_u8*)state->mem64) + state->memsize, input, len);
            state->memsize += (xxh_u32)len;
            return XXH_OK;
        }

        if (state->memsize) {   /* tmp buffer is full */
            XXH_memcpy(((xxh_u8*)state->mem64) + state->memsize, input, 32-state->memsize);
            state->v[0] = XXH64_round(state->v[0], XXH_readLE64(state->mem64+0));
            state->v[1] = XXH64_round(state->v[1], XXH_readLE64(state->mem64+1));
            state->v[2] = XXH64_round(state->v[2], XXH_readLE64(state->mem64+2));
            state->v[3] = XXH64_round(state->v[3], XXH_readLE64(state->mem64+3));
            p += 32 - state->memsize;
            state->memsize = 0;
        }

        if (p+32 <= bEnd) {
            const xxh_u8* const limit = bEnd - 32;

            do {
                state->v[0] = XXH64_round(state->v[0], XXH_readLE64(p)); p+=8;
                state->v[1] = XXH64_round(state->v[1], XXH_readLE64(p)); p+=8;
                state->v[2] = XXH64_round(state->v[2], XXH_readLE64(p)); p+=8;
                state->v[3] = XXH64_round(state->v[3], XXH_readLE64(p)); p+=8;
            } while (p<=limit);

        }

        if (p < bEnd) {
            XXH_memcpy(state->mem64, p, (size_t)(bEnd-p));
            state->memsize = (unsigned)(bEnd-p);
        }
    }

    return XXH_OK;
}

// Assembly:
testq %rsi, %rsi
je 0x2a43
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
addq %rdx, (%rdi)
movl 0x48(%rdi), %eax
leaq (%rax,%rdx), %rcx
cmpq $0x1f, %rcx
ja 0x28e6
leaq (%r14,%rax), %rdi
addq $0x28, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2110
addl 0x48(%r14), %ebx
jmp 0x2a31
addq %r15, %rbx
movabsq $-0x3d4d51c2d82b14b1, %r12 # imm = 0xC2B2AE3D27D4EB4F
movabsq $-0x61c8864e7a143579, %r13 # imm = 0x9E3779B185EBCA87
testq %rax, %rax
je 0x2989
leaq (%r14,%rax), %rdi
addq $0x28, %rdi
pushq $0x20
popq %rbp
movl %ebp, %edx
subl %eax, %edx
movq %r15, %rsi
callq 0x2110
movq 0x28(%r14), %rax
imulq %r12, %rax
addq 0x8(%r14), %rax
rolq $0x1f, %rax
imulq %r13, %rax
movq %rax, 0x8(%r14)
movq 0x30(%r14), %rax
imulq %r12, %rax
addq 0x10(%r14), %rax
rolq $0x1f, %rax
imulq %r13, %rax
movq %rax, 0x10(%r14)
movq 0x38(%r14), %rax
imulq %r12, %rax
addq 0x18(%r14), %rax
rolq $0x1f, %rax
imulq %r13, %rax
movq %rax, 0x18(%r14)
movq 0x40(%r14), %rax
imulq %r12, %rax
addq 0x20(%r14), %rax
rolq $0x1f, %rax
imulq %r13, %rax
movq %rax, 0x20(%r14)
subl 0x48(%r14), %ebp
addq %rbp, %r15
andl $0x0, 0x48(%r14)
leaq 0x20(%r15), %rax
cmpq %rbx, %rax
ja 0x2a1a
leaq -0x20(%rbx), %rax
movq 0x8(%r14), %rdi
movq 0x10(%r14), %r8
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rcx
movq (%r15), %rdx
imulq %r12, %rdx
addq %rdi, %rdx
rolq $0x1f, %rdx
imulq %r13, %rdx
movq %rdx, 0x8(%r14)
movq 0x8(%r15), %rdi
imulq %r12, %rdi
addq %r8, %rdi
rolq $0x1f, %rdi
imulq %r13, %rdi
movq %rdi, 0x10(%r14)
movq 0x10(%r15), %r8
imulq %r12, %r8
addq %rsi, %r8
rolq $0x1f, %r8
imulq %r13, %r8
movq %r8, 0x18(%r14)
movq 0x18(%r15), %rsi
imulq %r12, %rsi
addq %rcx, %rsi
rolq $0x1f, %rsi
imulq %r13, %rsi
movq %rsi, 0x20(%r14)
addq $0x20, %r15
movq %rsi, %rcx
movq %r8, %rsi
movq %rdi, %r8
movq %rdx, %rdi
cmpq %rax, %r15
jbe 0x29aa
cmpq %rbx, %r15
jae 0x2a35
leaq 0x28(%r14), %rdi
subq %r15, %rbx
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2110
movl %ebx, 0x48(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq