// File: /workspace/github_c_makefile_star2_O0/0x0203[P]schack_poc/./nuklear.h
// Function: nk_murmur_hash
NK_API nk_hash
nk_murmur_hash(const void * key, int len, nk_hash seed)
{
    /* 32-Bit MurmurHash3: https://code.google.com/p/smhasher/wiki/MurmurHash3*/
    #define NK_ROTL(x,r) ((x) << (r) | ((x) >> (32 - r)))
    union {const nk_uint *i; const nk_byte *b;} conv = {0};
    const nk_byte *data = (const nk_byte*)key;
    const int nblocks = len/4;
    nk_uint h1 = seed;
    const nk_uint c1 = 0xcc9e2d51;
    const nk_uint c2 = 0x1b873593;
    const nk_byte *tail;
    const nk_uint *blocks;
    nk_uint k1;
    int i;

    /* body */
    if (!key) return 0;
    conv.b = (data + nblocks*4);
    blocks = (const nk_uint*)conv.i;
    for (i = -nblocks; i; ++i) {
        k1 = blocks[i];
        k1 *= c1;
        k1 = NK_ROTL(k1,15);
        k1 *= c2;

        h1 ^= k1;
        h1 = NK_ROTL(h1,13);
        h1 = h1*5+0xe6546b64;
    }

    /* tail */
    tail = (const nk_byte*)(data + nblocks*4);
    k1 = 0;
    switch (len & 3) {
    case 3: k1 ^= (nk_uint)(tail[2] << 16); /* fallthrough */
    case 2: k1 ^= (nk_uint)(tail[1] << 8u); /* fallthrough */
    case 1: k1 ^= tail[0];
            k1 *= c1;
            k1 = NK_ROTL(k1,15);
            k1 *= c2;
            h1 ^= k1;
            break;
    default: break;
    }

    /* finalization */
    h1 ^= (nk_uint)len;
    /* fmix32 */
    h1 ^= h1 >> 16;
    h1 *= 0x85ebca6b;
    h1 ^= h1 >> 13;
    h1 *= 0xc2b2ae35;
    h1 ^= h1 >> 16;

    #undef NK_ROTL
    return h1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x3070
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, -0x2c(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x30(%rbp)
movl $0xcc9e2d51, -0x34(%rbp) # imm = 0xCC9E2D51
movl $0x1b873593, -0x38(%rbp) # imm = 0x1B873593
cmpq $0x0, -0x10(%rbp)
jne 0x4b0f
movl $0x0, -0x4(%rbp)
jmp 0x4c84
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
xorl %eax, %eax
subl -0x2c(%rbp), %eax
movl %eax, -0x50(%rbp)
cmpl $0x0, -0x50(%rbp)
je 0x4b9d
movq -0x48(%rbp), %rax
movslq -0x50(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x4c(%rbp)
imull $0xcc9e2d51, -0x4c(%rbp), %eax # imm = 0xCC9E2D51
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
shll $0xf, %eax
movl -0x4c(%rbp), %ecx
shrl $0x11, %ecx
orl %ecx, %eax
movl %eax, -0x4c(%rbp)
imull $0x1b873593, -0x4c(%rbp), %eax # imm = 0x1B873593
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
xorl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
shll $0xd, %eax
movl -0x30(%rbp), %ecx
shrl $0x13, %ecx
orl %ecx, %eax
movl %eax, -0x30(%rbp)
imull $0x5, -0x30(%rbp), %eax
addl $0xe6546b64, %eax       # imm = 0xE6546B64
movl %eax, -0x30(%rbp)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x4b33
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x14(%rbp), %eax
andl $0x3, %eax
movl %eax, -0x54(%rbp)
subl $0x1, %eax
je 0x4bfe
jmp 0x4bc8
movl -0x54(%rbp), %eax
subl $0x2, %eax
je 0x4bed
jmp 0x4bd2
movl -0x54(%rbp), %eax
subl $0x3, %eax
jne 0x4c3b
jmp 0x4bdc
movq -0x40(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x10, %eax
xorl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x40(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x8, %eax
xorl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x40(%rbp), %rax
movzbl (%rax), %eax
xorl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
imull $0xcc9e2d51, -0x4c(%rbp), %eax # imm = 0xCC9E2D51
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
shll $0xf, %eax
movl -0x4c(%rbp), %ecx
shrl $0x11, %ecx
orl %ecx, %eax
movl %eax, -0x4c(%rbp)
imull $0x1b873593, -0x4c(%rbp), %eax # imm = 0x1B873593
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
xorl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x4c3d
jmp 0x4c3d
movl -0x14(%rbp), %eax
xorl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
shrl $0x10, %eax
xorl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
imull $0x85ebca6b, -0x30(%rbp), %eax # imm = 0x85EBCA6B
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
shrl $0xd, %eax
xorl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
imull $0xc2b2ae35, -0x30(%rbp), %eax # imm = 0xC2B2AE35
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
shrl $0x10, %eax
xorl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)