// File: splatlab[P]debgr/hashutil.cc
// Function: kmercounting::HashUtil::MurmurHash64B(void const*, int, unsigned int)
uint64_t HashUtil::MurmurHash64B ( const void * key, int len, unsigned int seed )
	{
		const unsigned int m = 0x5bd1e995;
		const int r = 24;

		unsigned int h1 = seed ^ len;
		unsigned int h2 = 0;

		const unsigned int * data = (const unsigned int *)key;

		while(len >= 8)
		{
			unsigned int k1 = *data++;
			k1 *= m; k1 ^= k1 >> r; k1 *= m;
			h1 *= m; h1 ^= k1;
			len -= 4;

			unsigned int k2 = *data++;
			k2 *= m; k2 ^= k2 >> r; k2 *= m;
			h2 *= m; h2 ^= k2;
			len -= 4;
		}

		if(len >= 4)
		{
			unsigned int k1 = *data++;
			k1 *= m; k1 ^= k1 >> r; k1 *= m;
			h1 *= m; h1 ^= k1;
			len -= 4;
		}

		switch(len)
		{
			case 3: h2 ^= ((unsigned char*)data)[2] << 16;
			case 2: h2 ^= ((unsigned char*)data)[1] << 8;
			case 1: h2 ^= ((unsigned char*)data)[0];
							h2 *= m;
		};

		h1 ^= h2 >> 18; h1 *= m;
		h2 ^= h1 >> 22; h2 *= m;
		h1 ^= h2 >> 17; h1 *= m;
		h2 ^= h1 >> 19; h2 *= m;

		uint64_t h = h1;

		h = (h << 32) | h2;

		return h;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl $0x5bd1e995, -0x14(%rbp) # imm = 0x5BD1E995
movl $0x18, -0x18(%rbp)
movl -0x10(%rbp), %eax
xorl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x8, -0xc(%rbp)
jl 0x24323
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x28(%rbp)
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
imull $0x5bd1e995, -0x2c(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
shrl $0x18, %eax
xorl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
imull $0x5bd1e995, -0x2c(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x2c(%rbp)
imull $0x5bd1e995, -0x1c(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x1c(%rbp)
movl -0x2c(%rbp), %eax
xorl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %eax
subl $0x4, %eax
movl %eax, -0xc(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x28(%rbp)
movl (%rax), %eax
movl %eax, -0x30(%rbp)
imull $0x5bd1e995, -0x30(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
shrl $0x18, %eax
xorl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
imull $0x5bd1e995, -0x30(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x30(%rbp)
imull $0x5bd1e995, -0x20(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x20(%rbp)
movl -0x30(%rbp), %eax
xorl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0xc(%rbp), %eax
subl $0x4, %eax
movl %eax, -0xc(%rbp)
jmp 0x24274
cmpl $0x4, -0xc(%rbp)
jl 0x24379
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x28(%rbp)
movl (%rax), %eax
movl %eax, -0x34(%rbp)
imull $0x5bd1e995, -0x34(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
shrl $0x18, %eax
xorl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
imull $0x5bd1e995, -0x34(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x34(%rbp)
imull $0x5bd1e995, -0x1c(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x1c(%rbp)
movl -0x34(%rbp), %eax
xorl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %eax
subl $0x4, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x44(%rbp)
subl $0x1, %eax
je 0x243bc
jmp 0x24386
movl -0x44(%rbp), %eax
subl $0x2, %eax
je 0x243ab
jmp 0x24390
movl -0x44(%rbp), %eax
subl $0x3, %eax
jne 0x243d3
jmp 0x2439a
movq -0x28(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x10, %eax
xorl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x8, %eax
xorl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
xorl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
imull $0x5bd1e995, -0x20(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
shrl $0x12, %eax
xorl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
imull $0x5bd1e995, -0x1c(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shrl $0x16, %eax
xorl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
imull $0x5bd1e995, -0x20(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
shrl $0x11, %eax
xorl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
imull $0x5bd1e995, -0x1c(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shrl $0x13, %eax
xorl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
imull $0x5bd1e995, -0x20(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
shlq $0x20, %rax
movl -0x20(%rbp), %ecx
orq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)