// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x26a7
movl $0x0, -0x4(%rbp)
jmp 0x299c
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
cmpq $0x10, -0x20(%rbp)
setae %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
cmpl $0x10, (%rax)
setae %al
andb $0x1, %al
movzbl %al, %eax
orl %eax, %ecx
movq -0x10(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
addq -0x20(%rbp), %rax
cmpq $0x10, %rax
jae 0x273d
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x25d0
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
addl 0x28(%rax), %ecx
movl %ecx, 0x28(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x299c
movq -0x10(%rbp), %rax
cmpl $0x0, 0x28(%rax)
je 0x2862
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rcx
movl $0x10, %eax
subl 0x28(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x25d0
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x38(%rbp), %rdi
callq 0x29e0
movl -0x50(%rbp), %edi
movl %eax, %esi
callq 0x29b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x38(%rbp), %rdi
callq 0x29e0
movl -0x4c(%rbp), %edi
movl %eax, %esi
callq 0x29b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x38(%rbp), %rdi
callq 0x29e0
movl -0x48(%rbp), %edi
movl %eax, %esi
callq 0x29b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rdi
callq 0x29e0
movl -0x44(%rbp), %edi
movl %eax, %esi
callq 0x29b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movl $0x10, %ecx
subl 0x28(%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
addq $-0x10, %rcx
cmpq %rcx, %rax
ja 0x295b
movq -0x30(%rbp), %rax
addq $-0x10, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x60(%rbp)
movq -0x28(%rbp), %rdi
callq 0x29e0
movl -0x60(%rbp), %edi
movl %eax, %esi
callq 0x29b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x28(%rbp), %rdi
callq 0x29e0
movl -0x5c(%rbp), %edi
movl %eax, %esi
callq 0x29b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x58(%rbp)
movq -0x28(%rbp), %rdi
callq 0x29e0
movl -0x58(%rbp), %edi
movl %eax, %esi
callq 0x29b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x54(%rbp)
movq -0x28(%rbp), %rdi
callq 0x29e0
movl -0x54(%rbp), %edi
movl %eax, %esi
callq 0x29b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x40(%rbp), %rax
jbe 0x2883
jmp 0x295b
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x2995
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rax
subq %rax, %rdx
callq 0x25d0
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x28(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)