// File: neubig[P]egret/Egret/src/bob-hash.cpp
// Function: hashword2(unsigned int const*, unsigned long, unsigned int*, unsigned int*)
void hashword2 (
const uint32_t *k,                   /* the key, an array of uint32_t values */
size_t          length,               /* the length of the key, in uint32_ts */
uint32_t       *pc,                      /* IN: seed OUT: primary hash value */
uint32_t       *pb)               /* IN: more seed OUT: secondary hash value */
{
  uint32_t a,b,c;

  /* Set up the internal state */
  a = b = c = 0xdeadbeef + ((uint32_t)(length<<2)) + *pc;
  c += *pb;

  /*------------------------------------------------- handle most of the key */
  while (length > 3)
  {
    a += k[0];
    b += k[1];
    c += k[2];
    mix(a,b,c);
    length -= 3;
    k += 3;
  }

  /*------------------------------------------- handle the last 3 uint32_t's */
  switch(length)                     /* all the case statements fall through */
  { 
  case 3 : c+=k[2];
  case 2 : b+=k[1];
  case 1 : a+=k[0];
    final(a,b,c);
  case 0:     /* case 0: nothing left to add */
    break;
  }
  /*------------------------------------------------------ report the result */
  *pc=c; *pb=b;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
shlq $0x2, %rax
addl $0xdeadbeef, %eax       # imm = 0xDEADBEEF
movq -0x18(%rbp), %rcx
addl (%rcx), %eax
movl %eax, -0x2c(%rbp)
movl %eax, -0x28(%rbp)
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpq $0x3, -0x10(%rbp)
jbe 0x3a91a
movq -0x8(%rbp), %rax
movl (%rax), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movl -0x24(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x24(%rbp)
movl -0x2c(%rbp), %eax
shll $0x4, %eax
movl -0x2c(%rbp), %ecx
shrl $0x1c, %ecx
orl %ecx, %eax
xorl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x24(%rbp), %ecx
movl -0x28(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
shll $0x6, %eax
movl -0x24(%rbp), %ecx
shrl $0x1a, %ecx
orl %ecx, %eax
xorl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %ecx
movl -0x2c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
shll $0x8, %eax
movl -0x28(%rbp), %ecx
shrl $0x18, %ecx
orl %ecx, %eax
xorl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x24(%rbp), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x2c(%rbp), %ecx
movl -0x24(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x24(%rbp)
movl -0x2c(%rbp), %eax
shll $0x10, %eax
movl -0x2c(%rbp), %ecx
shrl $0x10, %ecx
orl %ecx, %eax
xorl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x24(%rbp), %ecx
movl -0x28(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
shll $0x13, %eax
movl -0x24(%rbp), %ecx
shrl $0xd, %ecx
orl %ecx, %eax
xorl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %ecx
movl -0x2c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
shll $0x4, %eax
movl -0x28(%rbp), %ecx
shrl $0x1c, %ecx
orl %ecx, %eax
xorl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x24(%rbp), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
subq $0x3, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x8(%rbp)
jmp 0x3a7dc
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
subq $0x3, %rax
ja 0x3aa41
movq -0x38(%rbp), %rax
leaq 0x55869(%rip), %rcx     # 0x901a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
xorl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %ecx
shll $0xe, %ecx
movl -0x28(%rbp), %eax
shrl $0x12, %eax
orl %eax, %ecx
movl -0x2c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
xorl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x2c(%rbp), %ecx
shll $0xb, %ecx
movl -0x2c(%rbp), %eax
shrl $0x15, %eax
orl %eax, %ecx
movl -0x24(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
xorl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %ecx
shll $0x19, %ecx
movl -0x24(%rbp), %eax
shrl $0x7, %eax
orl %eax, %ecx
movl -0x28(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
xorl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %ecx
shll $0x10, %ecx
movl -0x28(%rbp), %eax
shrl $0x10, %eax
orl %eax, %ecx
movl -0x2c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
xorl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x2c(%rbp), %ecx
shll $0x4, %ecx
movl -0x2c(%rbp), %eax
shrl $0x1c, %eax
orl %eax, %ecx
movl -0x24(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
xorl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %ecx
shll $0xe, %ecx
movl -0x24(%rbp), %eax
shrl $0x12, %eax
orl %eax, %ecx
movl -0x28(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
xorl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %ecx
shll $0x18, %ecx
movl -0x28(%rbp), %eax
shrl $0x8, %eax
orl %eax, %ecx
movl -0x2c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3aa41
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0x28(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)