// File: shuhaosun[P]Splitter-Windowed-CountMin/./BOBHash32.h
// Function: BOBHash32::run(char const*, unsigned int)
uint BOBHash32::run(const char * str, uint len)
{
	//register ub4 a,b,c,len;
	uint a,b,c;
	uint initval = 0;
	/* Set up the internal state */
	//len = length;
	a = b = 0x9e3779b9;  /* the golden ratio; an arbitrary value */
	c = prime32[this->prime32Num];         /* the previous hash value */

	/*---------------------------------------- handle most of the key */
	while (len >= 12)
	{
		a += (str[0] +((uint)str[1]<<8) +((uint)str[2]<<16) +((uint)str[3]<<24));
		b += (str[4] +((uint)str[5]<<8) +((uint)str[6]<<16) +((uint)str[7]<<24));
		c += (str[8] +((uint)str[9]<<8) +((uint)str[10]<<16)+((uint)str[11]<<24));
		mix(a,b,c);
		str += 12; len -= 12;
	}

	/*------------------------------------- handle the last 11 bytes */
	c += len;
	switch(len)              /* all the case statements fall through */
	{
		case 11: c+=((uint)str[10]<<24);
		case 10: c+=((uint)str[9]<<16);
		case 9 : c+=((uint)str[8]<<8);
		/* the first byte of c is reserved for the length */
		case 8 : b+=((uint)str[7]<<24);
		case 7 : b+=((uint)str[6]<<16);
		case 6 : b+=((uint)str[5]<<8);
		case 5 : b+=str[4];
		case 4 : a+=((uint)str[3]<<24);
		case 3 : a+=((uint)str[2]<<16);
		case 2 : a+=((uint)str[1]<<8);
		case 1 : a+=str[0];
		/* case 0: nothing left to add */
	}
	mix(a,b,c);
	/*-------------------------------------------- report the result */
	return c;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl %edx, -0x14(%rsp)
movq -0x8(%rsp), %rax
movl $0x0, -0x24(%rsp)
movl $0x9e3779b9, -0x1c(%rsp) # imm = 0x9E3779B9
movl $0x9e3779b9, -0x18(%rsp) # imm = 0x9E3779B9
movl (%rax), %eax
movl %eax, %ecx
leaq 0x6d7a(%rip), %rax      # 0x9200
movl (%rax,%rcx,4), %eax
movl %eax, -0x20(%rsp)
cmpl $0xc, -0x14(%rsp)
jb 0x26e9
movq -0x10(%rsp), %rax
movsbl (%rax), %eax
movq -0x10(%rsp), %rcx
movsbl 0x1(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x10(%rsp), %rcx
movsbl 0x2(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movq -0x10(%rsp), %rcx
movsbl 0x3(%rcx), %ecx
shll $0x18, %ecx
addl %ecx, %eax
addl -0x18(%rsp), %eax
movl %eax, -0x18(%rsp)
movq -0x10(%rsp), %rax
movsbl 0x4(%rax), %eax
movq -0x10(%rsp), %rcx
movsbl 0x5(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x10(%rsp), %rcx
movsbl 0x6(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movq -0x10(%rsp), %rcx
movsbl 0x7(%rcx), %ecx
shll $0x18, %ecx
addl %ecx, %eax
addl -0x1c(%rsp), %eax
movl %eax, -0x1c(%rsp)
movq -0x10(%rsp), %rax
movsbl 0x8(%rax), %eax
movq -0x10(%rsp), %rcx
movsbl 0x9(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x10(%rsp), %rcx
movsbl 0xa(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movq -0x10(%rsp), %rcx
movsbl 0xb(%rcx), %ecx
shll $0x18, %ecx
addl %ecx, %eax
addl -0x20(%rsp), %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %ecx
movl -0x18(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rsp)
movl -0x20(%rsp), %ecx
movl -0x18(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rsp)
movl -0x20(%rsp), %eax
shrl $0xd, %eax
xorl -0x18(%rsp), %eax
movl %eax, -0x18(%rsp)
movl -0x20(%rsp), %ecx
movl -0x1c(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rsp)
movl -0x18(%rsp), %ecx
movl -0x1c(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rsp)
movl -0x18(%rsp), %eax
shll $0x8, %eax
xorl -0x1c(%rsp), %eax
movl %eax, -0x1c(%rsp)
movl -0x18(%rsp), %ecx
movl -0x20(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %ecx
movl -0x20(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %eax
shrl $0xd, %eax
xorl -0x20(%rsp), %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %ecx
movl -0x18(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rsp)
movl -0x20(%rsp), %ecx
movl -0x18(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rsp)
movl -0x20(%rsp), %eax
shrl $0xc, %eax
xorl -0x18(%rsp), %eax
movl %eax, -0x18(%rsp)
movl -0x20(%rsp), %ecx
movl -0x1c(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rsp)
movl -0x18(%rsp), %ecx
movl -0x1c(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rsp)
movl -0x18(%rsp), %eax
shll $0x10, %eax
xorl -0x1c(%rsp), %eax
movl %eax, -0x1c(%rsp)
movl -0x18(%rsp), %ecx
movl -0x20(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %ecx
movl -0x20(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %eax
shrl $0x5, %eax
xorl -0x20(%rsp), %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %ecx
movl -0x18(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rsp)
movl -0x20(%rsp), %ecx
movl -0x18(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rsp)
movl -0x20(%rsp), %eax
shrl $0x3, %eax
xorl -0x18(%rsp), %eax
movl %eax, -0x18(%rsp)
movl -0x20(%rsp), %ecx
movl -0x1c(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rsp)
movl -0x18(%rsp), %ecx
movl -0x1c(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rsp)
movl -0x18(%rsp), %eax
shll $0xa, %eax
xorl -0x1c(%rsp), %eax
movl %eax, -0x1c(%rsp)
movl -0x18(%rsp), %ecx
movl -0x20(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %ecx
movl -0x20(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %eax
shrl $0xf, %eax
xorl -0x20(%rsp), %eax
movl %eax, -0x20(%rsp)
movq -0x10(%rsp), %rax
addq $0xc, %rax
movq %rax, -0x10(%rsp)
movl -0x14(%rsp), %eax
subl $0xc, %eax
movl %eax, -0x14(%rsp)
jmp 0x248d
movl -0x14(%rsp), %ecx
movl -0x20(%rsp), %eax
addl %ecx, %eax
movl %eax, -0x20(%rsp)
movl -0x14(%rsp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x30(%rsp)
subl $0xa, %eax
ja 0x27f7
movq -0x30(%rsp), %rax
leaq 0x38eb(%rip), %rcx      # 0x6004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rsp), %rax
movsbl 0xa(%rax), %eax
shll $0x18, %eax
addl -0x20(%rsp), %eax
movl %eax, -0x20(%rsp)
movq -0x10(%rsp), %rax
movsbl 0x9(%rax), %eax
shll $0x10, %eax
addl -0x20(%rsp), %eax
movl %eax, -0x20(%rsp)
movq -0x10(%rsp), %rax
movsbl 0x8(%rax), %eax
shll $0x8, %eax
addl -0x20(%rsp), %eax
movl %eax, -0x20(%rsp)
movq -0x10(%rsp), %rax
movsbl 0x7(%rax), %eax
shll $0x18, %eax
addl -0x1c(%rsp), %eax
movl %eax, -0x1c(%rsp)
movq -0x10(%rsp), %rax
movsbl 0x6(%rax), %eax
shll $0x10, %eax
addl -0x1c(%rsp), %eax
movl %eax, -0x1c(%rsp)
movq -0x10(%rsp), %rax
movsbl 0x5(%rax), %eax
shll $0x8, %eax
addl -0x1c(%rsp), %eax
movl %eax, -0x1c(%rsp)
movq -0x10(%rsp), %rax
movsbl 0x4(%rax), %eax
addl -0x1c(%rsp), %eax
movl %eax, -0x1c(%rsp)
movq -0x10(%rsp), %rax
movsbl 0x3(%rax), %eax
shll $0x18, %eax
addl -0x18(%rsp), %eax
movl %eax, -0x18(%rsp)
movq -0x10(%rsp), %rax
movsbl 0x2(%rax), %eax
shll $0x10, %eax
addl -0x18(%rsp), %eax
movl %eax, -0x18(%rsp)
movq -0x10(%rsp), %rax
movsbl 0x1(%rax), %eax
shll $0x8, %eax
addl -0x18(%rsp), %eax
movl %eax, -0x18(%rsp)
movq -0x10(%rsp), %rax
movsbl (%rax), %eax
addl -0x18(%rsp), %eax
movl %eax, -0x18(%rsp)
movl -0x1c(%rsp), %ecx
movl -0x18(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rsp)
movl -0x20(%rsp), %ecx
movl -0x18(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rsp)
movl -0x20(%rsp), %eax
shrl $0xd, %eax
xorl -0x18(%rsp), %eax
movl %eax, -0x18(%rsp)
movl -0x20(%rsp), %ecx
movl -0x1c(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rsp)
movl -0x18(%rsp), %ecx
movl -0x1c(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rsp)
movl -0x18(%rsp), %eax
shll $0x8, %eax
xorl -0x1c(%rsp), %eax
movl %eax, -0x1c(%rsp)
movl -0x18(%rsp), %ecx
movl -0x20(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %ecx
movl -0x20(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %eax
shrl $0xd, %eax
xorl -0x20(%rsp), %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %ecx
movl -0x18(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rsp)
movl -0x20(%rsp), %ecx
movl -0x18(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rsp)
movl -0x20(%rsp), %eax
shrl $0xc, %eax
xorl -0x18(%rsp), %eax
movl %eax, -0x18(%rsp)
movl -0x20(%rsp), %ecx
movl -0x1c(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rsp)
movl -0x18(%rsp), %ecx
movl -0x1c(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rsp)
movl -0x18(%rsp), %eax
shll $0x10, %eax
xorl -0x1c(%rsp), %eax
movl %eax, -0x1c(%rsp)
movl -0x18(%rsp), %ecx
movl -0x20(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %ecx
movl -0x20(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %eax
shrl $0x5, %eax
xorl -0x20(%rsp), %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %ecx
movl -0x18(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rsp)
movl -0x20(%rsp), %ecx
movl -0x18(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rsp)
movl -0x20(%rsp), %eax
shrl $0x3, %eax
xorl -0x18(%rsp), %eax
movl %eax, -0x18(%rsp)
movl -0x20(%rsp), %ecx
movl -0x1c(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rsp)
movl -0x18(%rsp), %ecx
movl -0x1c(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rsp)
movl -0x18(%rsp), %eax
shll $0xa, %eax
xorl -0x1c(%rsp), %eax
movl %eax, -0x1c(%rsp)
movl -0x18(%rsp), %ecx
movl -0x20(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %ecx
movl -0x20(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %eax
shrl $0xf, %eax
xorl -0x20(%rsp), %eax
movl %eax, -0x20(%rsp)
movl -0x20(%rsp), %eax
retq
nop