// File: /workspace/github_cpp_makefile_star2_O3/sgielen[P]clife/./xxhash/xxhash.h
// Function: XXH32_update
XXH_PUBLIC_API XXH_errorcode
XXH32_update(XXH32_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_32 += (XXH32_hash_t)len;
        state->large_len |= (XXH32_hash_t)((len>=16) | (state->total_len_32>=16));

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

        if (state->memsize) {   /* some data left from previous update */
            XXH_memcpy((xxh_u8*)(state->mem32) + state->memsize, input, 16-state->memsize);
            {   const xxh_u32* p32 = state->mem32;
                state->v[0] = XXH32_round(state->v[0], XXH_readLE32(p32)); p32++;
                state->v[1] = XXH32_round(state->v[1], XXH_readLE32(p32)); p32++;
                state->v[2] = XXH32_round(state->v[2], XXH_readLE32(p32)); p32++;
                state->v[3] = XXH32_round(state->v[3], XXH_readLE32(p32));
            }
            p += 16-state->memsize;
            state->memsize = 0;
        }

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

            do {
                state->v[0] = XXH32_round(state->v[0], XXH_readLE32(p)); p+=4;
                state->v[1] = XXH32_round(state->v[1], XXH_readLE32(p)); p+=4;
                state->v[2] = XXH32_round(state->v[2], XXH_readLE32(p)); p+=4;
                state->v[3] = XXH32_round(state->v[3], XXH_readLE32(p)); p+=4;
            } while (p<=limit);

        }

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

    return XXH_OK;
}

// Assembly:
testq %rsi, %rsi
je 0x261c
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl (%rdi), %eax
addl %r14d, %eax
movl %eax, (%rdi)
cmpq $0x10, %rdx
setae %cl
cmpl $0x10, %eax
setae %al
orb %cl, %al
movzbl %al, %eax
orl %eax, 0x4(%rdi)
movl 0x28(%rdi), %eax
leaq (%rax,%rdx), %rcx
cmpq $0xf, %rcx
ja 0x24d1
leaq (%rbx,%rax), %rdi
addq $0x18, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2120
movl 0x28(%rbx), %eax
addl %r14d, %eax
jmp 0x260e
addq %r15, %r14
testq %rax, %rax
je 0x2573
leaq (%rbx,%rax), %rdi
addq $0x18, %rdi
movl $0x10, %r12d
movl $0x10, %edx
subl %eax, %edx
movq %r15, %rsi
callq 0x2120
movdqu 0x8(%rbx), %xmm0
movdqu 0x18(%rbx), %xmm1
movdqa 0x4b04(%rip), %xmm2     # 0x7010
pshufd $0xf5, %xmm1, %xmm3     # xmm3 = xmm1[1,1,3,3]
pmuludq %xmm2, %xmm1
pshufd $0xe8, %xmm1, %xmm1     # xmm1 = xmm1[0,2,2,3]
pmuludq %xmm2, %xmm3
pshufd $0xe8, %xmm3, %xmm2     # xmm2 = xmm3[0,2,2,3]
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
paddd %xmm0, %xmm1
movdqa %xmm1, %xmm0
psrld $0x13, %xmm0
pslld $0xd, %xmm1
por %xmm0, %xmm1
movdqa 0x4adb(%rip), %xmm0     # 0x7020
pshufd $0xf5, %xmm1, %xmm2     # xmm2 = xmm1[1,1,3,3]
pmuludq %xmm0, %xmm1
pshufd $0xe8, %xmm1, %xmm1     # xmm1 = xmm1[0,2,2,3]
pmuludq %xmm0, %xmm2
pshufd $0xe8, %xmm2, %xmm0     # xmm0 = xmm2[0,2,2,3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movdqu %xmm1, 0x8(%rbx)
subl 0x28(%rbx), %r12d
addq %r12, %r15
movl $0x0, 0x28(%rbx)
leaq -0x10(%r14), %rax
cmpq %rax, %r15
ja 0x25f4
movl 0x8(%rbx), %ecx
movl 0xc(%rbx), %edx
movl 0x10(%rbx), %esi
movl 0x14(%rbx), %edi
imull $0x85ebca77, (%r15), %r8d # imm = 0x85EBCA77
addl %ecx, %r8d
roll $0xd, %r8d
imull $0x9e3779b1, %r8d, %ecx # imm = 0x9E3779B1
movl %ecx, 0x8(%rbx)
imull $0x85ebca77, 0x4(%r15), %r8d # imm = 0x85EBCA77
addl %edx, %r8d
roll $0xd, %r8d
imull $0x9e3779b1, %r8d, %edx # imm = 0x9E3779B1
movl %edx, 0xc(%rbx)
imull $0x85ebca77, 0x8(%r15), %r8d # imm = 0x85EBCA77
addl %esi, %r8d
roll $0xd, %r8d
imull $0x9e3779b1, %r8d, %esi # imm = 0x9E3779B1
movl %esi, 0x10(%rbx)
imull $0x85ebca77, 0xc(%r15), %r8d # imm = 0x85EBCA77
addl %edi, %r8d
roll $0xd, %r8d
imull $0x9e3779b1, %r8d, %edi # imm = 0x9E3779B1
movl %edi, 0x14(%rbx)
addq $0x10, %r15
cmpq %rax, %r15
jbe 0x2588
cmpq %r14, %r15
jae 0x2611
leaq 0x18(%rbx), %rdi
subq %r15, %r14
movq %r15, %rsi
movq %r14, %rdx
callq 0x2120
movl %r14d, %eax
movl %eax, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
xorl %eax, %eax
retq