// File: /workspace/github_cpp_makefile_star2_O1/BU-DiSC[P]BF-Shared-Hashing/hash/city.cc
// Function: CityHash32(char const*, unsigned long)
uint32 CityHash32(const char *s, size_t len) {
  if (len <= 24) {
    return len <= 12 ?
        (len <= 4 ? Hash32Len0to4(s, len) : Hash32Len5to12(s, len)) :
        Hash32Len13to24(s, len);
  }

  // len > 24
  uint32 h = len, g = c1 * len, f = g;
  uint32 a0 = Rotate32(Fetch32(s + len - 4) * c1, 17) * c2;
  uint32 a1 = Rotate32(Fetch32(s + len - 8) * c1, 17) * c2;
  uint32 a2 = Rotate32(Fetch32(s + len - 16) * c1, 17) * c2;
  uint32 a3 = Rotate32(Fetch32(s + len - 12) * c1, 17) * c2;
  uint32 a4 = Rotate32(Fetch32(s + len - 20) * c1, 17) * c2;
  h ^= a0;
  h = Rotate32(h, 19);
  h = h * 5 + 0xe6546b64;
  h ^= a2;
  h = Rotate32(h, 19);
  h = h * 5 + 0xe6546b64;
  g ^= a1;
  g = Rotate32(g, 19);
  g = g * 5 + 0xe6546b64;
  g ^= a3;
  g = Rotate32(g, 19);
  g = g * 5 + 0xe6546b64;
  f += a4;
  f = Rotate32(f, 19);
  f = f * 5 + 0xe6546b64;
  size_t iters = (len - 1) / 20;
  do {
    uint32 a0 = Rotate32(Fetch32(s) * c1, 17) * c2;
    uint32 a1 = Fetch32(s + 4);
    uint32 a2 = Rotate32(Fetch32(s + 8) * c1, 17) * c2;
    uint32 a3 = Rotate32(Fetch32(s + 12) * c1, 17) * c2;
    uint32 a4 = Fetch32(s + 16);
    h ^= a0;
    h = Rotate32(h, 18);
    h = h * 5 + 0xe6546b64;
    f += a1;
    f = Rotate32(f, 19);
    f = f * c1;
    g += a2;
    g = Rotate32(g, 18);
    g = g * 5 + 0xe6546b64;
    h ^= a3 + a1;
    h = Rotate32(h, 19);
    h = h * 5 + 0xe6546b64;
    g ^= a4;
    g = bswap_32(g) * 5;
    h += a4 * 5;
    h = bswap_32(h);
    f += a0;
    PERMUTE3(f, h, g);
    s += 20;
  } while (--iters != 0);
  g = Rotate32(g, 11) * c1;
  g = Rotate32(g, 17) * c1;
  f = Rotate32(f, 11) * c1;
  f = Rotate32(f, 17) * c1;
  h = Rotate32(h + g, 19);
  h = h * 5 + 0xe6546b64;
  h = Rotate32(h, 17) * c1;
  h = Rotate32(h + f, 19);
  h = h * 5 + 0xe6546b64;
  h = Rotate32(h, 17) * c1;
  return h;
}

// Assembly:
cmpq $0x18, %rsi
ja 0x27e6d
cmpq $0xc, %rsi
ja 0x28088
cmpq $0x4, %rsi
ja 0x28193
testq %rsi, %rsi
je 0x28222
movl $0x9, %ecx
xorl %eax, %eax
xorl %edx, %edx
movsbl (%rdi,%rdx), %r8d
imull $0xcc9e2d51, %eax, %eax # imm = 0xCC9E2D51
addl %r8d, %eax
xorl %eax, %ecx
incq %rdx
cmpq %rdx, %rsi
jne 0x27e50
jmp 0x28229
pushq %rbp
pushq %rbx
imull $0xcc9e2d51, %esi, %eax # imm = 0xCC9E2D51
movl -0x4(%rdi,%rsi), %ecx
imull $0xcc9e2d51, %ecx, %edx # imm = 0xCC9E2D51
shrl $0x11, %edx
imull $0x16a88000, %ecx, %ecx # imm = 0x16A88000
orl %edx, %ecx
imull $0x1b873593, %ecx, %ecx # imm = 0x1B873593
movl -0x8(%rdi,%rsi), %edx
imull $0xcc9e2d51, %edx, %r8d # imm = 0xCC9E2D51
shrl $0x11, %r8d
imull $0x16a88000, %edx, %edx # imm = 0x16A88000
orl %r8d, %edx
imull $0x1b873593, %edx, %edx # imm = 0x1B873593
movl -0x14(%rdi,%rsi), %r8d
movl -0x10(%rdi,%rsi), %r9d
imull $0xcc9e2d51, %r9d, %r10d # imm = 0xCC9E2D51
shrl $0x11, %r10d
imull $0x16a88000, %r9d, %r9d # imm = 0x16A88000
orl %r10d, %r9d
imull $0x1b873593, %r9d, %r11d # imm = 0x1B873593
movl -0xc(%rdi,%rsi), %r9d
imull $0xcc9e2d51, %r9d, %r10d # imm = 0xCC9E2D51
shrl $0x11, %r10d
imull $0x16a88000, %r9d, %r9d # imm = 0x16A88000
orl %r10d, %r9d
imull $0x1b873593, %r9d, %r10d # imm = 0x1B873593
imull $0xcc9e2d51, %r8d, %r9d # imm = 0xCC9E2D51
shrl $0x11, %r9d
imull $0x16a88000, %r8d, %r8d # imm = 0x16A88000
orl %r9d, %r8d
imull $0x1b873593, %r8d, %r9d # imm = 0x1B873593
xorl %esi, %ecx
roll $0xd, %ecx
leal (%rcx,%rcx,4), %ecx
movl $0xe6546b64, %r8d       # imm = 0xE6546B64
addl %r8d, %ecx
xorl %r11d, %ecx
roll $0xd, %ecx
leal (%rcx,%rcx,4), %ecx
xorl %eax, %edx
roll $0xd, %edx
addl %r8d, %ecx
leal (%rdx,%rdx,4), %edx
addl %r8d, %edx
xorl %r10d, %edx
roll $0xd, %edx
leal (%rdx,%rdx,4), %r10d
addl %r8d, %r10d
addl %eax, %r9d
roll $0xd, %r9d
leal (%r9,%r9,4), %r9d
addl %r8d, %r9d
decq %rsi
movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD
movq %rsi, %rax
mulq %rdx
shrq $0x4, %rdx
movl (%rdi), %eax
movl 0x4(%rdi), %r11d
imull $0xcc9e2d51, %eax, %esi # imm = 0xCC9E2D51
shrl $0x11, %esi
imull $0x16a88000, %eax, %eax # imm = 0x16A88000
orl %esi, %eax
imull $0x1b873593, %eax, %eax # imm = 0x1B873593
movl 0x8(%rdi), %esi
imull $0xcc9e2d51, %esi, %ebx # imm = 0xCC9E2D51
shrl $0x11, %ebx
imull $0x16a88000, %esi, %esi # imm = 0x16A88000
orl %ebx, %esi
imull $0x1b873593, %esi, %esi # imm = 0x1B873593
addl %r10d, %esi
movl 0xc(%rdi), %r10d
imull $0xcc9e2d51, %r10d, %ebx # imm = 0xCC9E2D51
shrl $0x11, %ebx
imull $0x16a88000, %r10d, %r10d # imm = 0x16A88000
orl %ebx, %r10d
imull $0x1b873593, %r10d, %r10d # imm = 0x1B873593
movl 0x10(%rdi), %ebx
xorl %eax, %ecx
roll $0xe, %ecx
leal (%rcx,%rcx,4), %ebp
addl %r11d, %r9d
roll $0xd, %r9d
addl %r8d, %ebp
imull $0xcc9e2d51, %r9d, %ecx # imm = 0xCC9E2D51
roll $0xe, %esi
leal (%rsi,%rsi,4), %esi
addl %r8d, %esi
addl %r11d, %r10d
xorl %ebp, %r10d
roll $0xd, %r10d
xorl %ebx, %esi
bswapl %esi
leal (%rsi,%rsi,4), %r9d
addl %ebx, %r10d
leal (%r10,%r10,4), %r10d
addl %r8d, %r10d
bswapl %r10d
addl %eax, %ecx
addq $0x14, %rdi
decq %rdx
jne 0x27f6b
roll $0x15, %r10d
imull $0xcc9e2d51, %r10d, %eax # imm = 0xCC9E2D51
shrl $0x11, %eax
imull $0x16a88000, %r10d, %edx # imm = 0x16A88000
orl %eax, %edx
imull $0xcc9e2d51, %edx, %eax # imm = 0xCC9E2D51
shrl $0xb, %r9d
shll $0x15, %esi
leal (%rsi,%rsi,4), %edx
orl %r9d, %edx
imull $0xcc9e2d51, %edx, %esi # imm = 0xCC9E2D51
shrl $0x11, %esi
imull $0x16a88000, %edx, %edx # imm = 0x16A88000
addl %ecx, %eax
roll $0xd, %eax
orl %esi, %edx
leal (%rax,%rax,4), %eax
movl $0xe6546b64, %ecx       # imm = 0xE6546B64
addl %ecx, %eax
roll $0xf, %eax
addl %edx, %eax
imull $0xcc9e2d51, %eax, %edx # imm = 0xCC9E2D51
shrl $0x13, %edx
imull $0xc5aa2000, %eax, %eax # imm = 0xC5AA2000
orl %edx, %eax
leal (%rax,%rax,4), %eax
addl %ecx, %eax
roll $0xf, %eax
imull $0xcc9e2d51, %eax, %eax # imm = 0xCC9E2D51
popq %rbx
popq %rbp
retq
movq %rsi, %rcx
shrq %rcx
movl (%rdi), %eax
movl 0x4(%rdi), %r9d
movl -0x4(%rdi,%rcx), %r10d
movl (%rdi,%rcx), %edx
movl -0x8(%rdi,%rsi), %r8d
imull $0xcc9e2d51, %r10d, %ecx # imm = 0xCC9E2D51
shrl $0x11, %ecx
imull $0x16a88000, %r10d, %r10d # imm = 0x16A88000
orl %ecx, %r10d
imull $0x1b873593, %r10d, %ecx # imm = 0x1B873593
xorl %esi, %ecx
roll $0xd, %ecx
leal (%rcx,%rcx,4), %r10d
imull $0xcc9e2d51, %r9d, %ecx # imm = 0xCC9E2D51
shrl $0x11, %ecx
imull $0x16a88000, %r9d, %r9d # imm = 0x16A88000
orl %ecx, %r9d
movl $0xe6546b64, %ecx       # imm = 0xE6546B64
addl %ecx, %r10d
imull $0x1b873593, %r9d, %r9d # imm = 0x1B873593
xorl %r10d, %r9d
roll $0xd, %r9d
leal (%r9,%r9,4), %r9d
addl %ecx, %r9d
imull $0xcc9e2d51, %r8d, %r10d # imm = 0xCC9E2D51
shrl $0x11, %r10d
imull $0x16a88000, %r8d, %r8d # imm = 0x16A88000
orl %r10d, %r8d
imull $0x1b873593, %r8d, %r8d # imm = 0x1B873593
xorl %r9d, %r8d
roll $0xd, %r8d
leal (%r8,%r8,4), %r8d
addl %ecx, %r8d
imull $0xcc9e2d51, %edx, %r9d # imm = 0xCC9E2D51
shrl $0x11, %r9d
imull $0x16a88000, %edx, %edx # imm = 0x16A88000
orl %r9d, %edx
imull $0x1b873593, %edx, %edx # imm = 0x1B873593
xorl %r8d, %edx
roll $0xd, %edx
leal (%rdx,%rdx,4), %edx
addl %ecx, %edx
imull $0xcc9e2d51, %eax, %r8d # imm = 0xCC9E2D51
shrl $0x11, %r8d
imull $0x16a88000, %eax, %eax # imm = 0x16A88000
orl %r8d, %eax
imull $0x1b873593, %eax, %eax # imm = 0x1B873593
xorl %edx, %eax
roll $0xd, %eax
movl -0x4(%rdi,%rsi), %edx
leal (%rax,%rax,4), %eax
addl %ecx, %eax
imull $0xcc9e2d51, %edx, %esi # imm = 0xCC9E2D51
shrl $0x11, %esi
imull $0x16a88000, %edx, %edx # imm = 0x16A88000
orl %esi, %edx
imull $0x1b873593, %edx, %edx # imm = 0x1B873593
xorl %eax, %edx
roll $0xd, %edx
leal (%rdx,%rdx,4), %eax
addl %ecx, %eax
jmp 0x28270
leal (%rsi,%rsi,4), %eax
movl (%rdi), %ecx
addl %esi, %ecx
imull $0xcc9e2d51, %ecx, %edx # imm = 0xCC9E2D51
shrl $0x11, %edx
imull $0x16a88000, %ecx, %ecx # imm = 0x16A88000
orl %edx, %ecx
movl -0x4(%rdi,%rsi), %edx
addl %eax, %edx
shrl %esi
andl $0x4, %esi
imull $0x1b873593, %ecx, %ecx # imm = 0x1B873593
xorl %eax, %ecx
roll $0xd, %ecx
movl (%rdi,%rsi), %esi
leal (%rcx,%rcx,4), %ecx
movl $0xe6546b64, %eax       # imm = 0xE6546B64
addl %eax, %ecx
imull $0xcc9e2d51, %edx, %edi # imm = 0xCC9E2D51
shrl $0x11, %edi
imull $0x16a88000, %edx, %edx # imm = 0x16A88000
orl %edi, %edx
imull $0x1b873593, %edx, %edx # imm = 0x1B873593
xorl %ecx, %edx
roll $0xd, %edx
addl $0x9, %esi
leal (%rdx,%rdx,4), %ecx
addl %eax, %ecx
imull $0xcc9e2d51, %esi, %edx # imm = 0xCC9E2D51
shrl $0x11, %edx
imull $0x16a88000, %esi, %esi # imm = 0x16A88000
orl %edx, %esi
imull $0x1b873593, %esi, %edx # imm = 0x1B873593
xorl %ecx, %edx
roll $0xd, %edx
leal (%rdx,%rdx,4), %ecx
addl %eax, %ecx
movl %ecx, %eax
shrl $0x10, %eax
xorl %ecx, %eax
imull $0x85ebca6b, %eax, %eax # imm = 0x85EBCA6B
jmp 0x2827d
xorl %eax, %eax
movl $0x9, %ecx
imull $0xcc9e2d51, %esi, %edx # imm = 0xCC9E2D51
shrl $0x11, %edx
imull $0x16a88000, %esi, %esi # imm = 0x16A88000
orl %edx, %esi
imull $0x1b873593, %esi, %edx # imm = 0x1B873593
xorl %ecx, %edx
roll $0xd, %edx
leal (%rdx,%rdx,4), %ecx
movl $0xe6546b64, %edx       # imm = 0xE6546B64
addl %edx, %ecx
imull $0xcc9e2d51, %eax, %esi # imm = 0xCC9E2D51
shrl $0x11, %esi
imull $0x16a88000, %eax, %eax # imm = 0x16A88000
orl %esi, %eax
imull $0x1b873593, %eax, %eax # imm = 0x1B873593
xorl %ecx, %eax
roll $0xd, %eax
leal (%rax,%rax,4), %eax
addl %edx, %eax
movl %eax, %ecx
shrl $0x10, %ecx
xorl %eax, %ecx
imull $0x85ebca6b, %ecx, %eax # imm = 0x85EBCA6B
movl %eax, %ecx
shrl $0xd, %ecx
xorl %eax, %ecx
imull $0xc2b2ae35, %ecx, %ecx # imm = 0xC2B2AE35
movl %ecx, %eax
shrl $0x10, %eax
xorl %ecx, %eax
retq