// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x2f9a
movl $0x0, -0x4(%rbp)
jmp 0x3280
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movl 0x48(%rax), %eax
addq -0x20(%rbp), %rax
cmpq $0x20, %rax
jae 0x3008
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
movq -0x10(%rbp), %rax
movl 0x48(%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 0x48(%rax), %ecx
movl %ecx, 0x48(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x3280
movq -0x10(%rbp), %rax
cmpl $0x0, 0x48(%rax)
je 0x3131
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
movq -0x10(%rbp), %rax
movl 0x48(%rax), %eax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rcx
movl $0x20, %eax
subl 0x48(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x25d0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x32e0
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x3290
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
addq $0x8, %rdi
callq 0x32e0
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x3290
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
addq $0x10, %rdi
callq 0x32e0
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x3290
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
addq $0x18, %rdi
callq 0x32e0
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x3290
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movl $0x20, %ecx
subl 0x48(%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0x48(%rax)
movq -0x28(%rbp), %rax
addq $0x20, %rax
cmpq -0x30(%rbp), %rax
ja 0x323f
movq -0x30(%rbp), %rax
addq $-0x20, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x28(%rbp), %rdi
callq 0x32e0
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x3290
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x28(%rbp), %rdi
callq 0x32e0
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x3290
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rdi
callq 0x32e0
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0x3290
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rdi
callq 0x32e0
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x3290
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
jbe 0x314f
jmp 0x323f
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x3279
movq -0x10(%rbp), %rdi
addq $0x28, %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, 0x48(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)