// File: /workspace/github_cpp_makefile_star2_O1/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 0x2609
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 0x25fb
addq %r15, %r14
testq %rax, %rax
je 0x2560
leaq (%rbx,%rax), %rdi
addq $0x18, %rdi
movl $0x10, %r12d
movl $0x10, %edx
subl %eax, %edx
movq %r15, %rsi
callq 0x2120
imull $0x85ebca77, 0x18(%rbx), %eax # imm = 0x85EBCA77
addl 0x8(%rbx), %eax
roll $0xd, %eax
imull $0x9e3779b1, %eax, %eax # imm = 0x9E3779B1
movl %eax, 0x8(%rbx)
imull $0x85ebca77, 0x1c(%rbx), %eax # imm = 0x85EBCA77
addl 0xc(%rbx), %eax
roll $0xd, %eax
imull $0x9e3779b1, %eax, %eax # imm = 0x9E3779B1
movl %eax, 0xc(%rbx)
imull $0x85ebca77, 0x20(%rbx), %eax # imm = 0x85EBCA77
addl 0x10(%rbx), %eax
roll $0xd, %eax
imull $0x9e3779b1, %eax, %eax # imm = 0x9E3779B1
movl %eax, 0x10(%rbx)
imull $0x85ebca77, 0x24(%rbx), %eax # imm = 0x85EBCA77
addl 0x14(%rbx), %eax
roll $0xd, %eax
imull $0x9e3779b1, %eax, %eax # imm = 0x9E3779B1
movl %eax, 0x14(%rbx)
subl 0x28(%rbx), %r12d
addq %r12, %r15
movl $0x0, 0x28(%rbx)
leaq -0x10(%r14), %rax
cmpq %rax, %r15
ja 0x25e1
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 0x2575
cmpq %r14, %r15
jae 0x25fe
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