// File: BU-DiSC[P]BF-Shared-Hashing/hash/city.cc
// Function: CityMurmur(char const*, unsigned long, std::pair<unsigned long, unsigned long>)
static uint128 CityMurmur(const char *s, size_t len, uint128 seed) {
  uint64 a = Uint128Low64(seed);
  uint64 b = Uint128High64(seed);
  uint64 c = 0;
  uint64 d = 0;
  signed long l = len - 16;
  if (l <= 0) {  // len <= 16
    a = ShiftMix(a * k1) * k1;
    c = b * k1 + HashLen0to16(s, len);
    d = ShiftMix(a + (len >= 8 ? Fetch64(s) : c));
  } else {  // len > 16
    c = HashLen16(Fetch64(s + len - 8) + k1, a);
    d = HashLen16(b + len, c + Fetch64(s + len - 16));
    a += d;
    do {
      a ^= ShiftMix(Fetch64(s) * k1) * k1;
      a *= k1;
      b ^= a;
      c ^= ShiftMix(Fetch64(s + 8) * k1) * k1;
      c *= k1;
      d ^= c;
      s += 16;
      l -= 16;
    } while (l > 0);
  }
  a = HashLen16(a, c);
  b = HashLen16(d, b);
  return uint128(a ^ b, HashLen16(b, a));
}

// Assembly:
subq $0x98, %rsp
movq %rdx, 0x78(%rsp)
movq %rcx, 0x80(%rsp)
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x63810
movq %rax, 0x60(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x63820
movq %rax, 0x58(%rsp)
movq $0x0, 0x50(%rsp)
movq $0x0, 0x48(%rsp)
movq 0x68(%rsp), %rax
subq $0x10, %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
jg 0x6314d
movabsq $-0x4b6d499041670d8d, %rdi # imm = 0xB492B66FBE98F273
imulq 0x60(%rsp), %rdi
callq 0x625c0
movabsq $-0x4b6d499041670d8d, %rcx # imm = 0xB492B66FBE98F273
imulq %rcx, %rax
movq %rax, 0x60(%rsp)
movabsq $-0x4b6d499041670d8d, %rax # imm = 0xB492B66FBE98F273
imulq 0x58(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0x61ef0
movq %rax, %rcx
movq 0x20(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x50(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x28(%rsp)
cmpq $0x8, 0x68(%rsp)
jb 0x63127
movq 0x70(%rsp), %rdi
callq 0x62490
movq %rax, 0x18(%rsp)
jmp 0x63131
movq 0x50(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rax
addq %rax, %rdi
callq 0x625c0
movq %rax, 0x48(%rsp)
jmp 0x632b7
movq 0x70(%rsp), %rdi
addq 0x68(%rsp), %rdi
addq $-0x8, %rdi
callq 0x62490
movq %rax, %rdi
movabsq $-0x4b6d499041670d8d, %rax # imm = 0xB492B66FBE98F273
addq %rax, %rdi
movq 0x60(%rsp), %rsi
callq 0x624a0
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rax
addq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rdi
addq 0x68(%rsp), %rdi
addq $-0x10, %rdi
callq 0x62490
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdi
addq %rax, %rsi
callq 0x624a0
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
addq 0x60(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x70(%rsp), %rdi
callq 0x62490
movq %rax, %rdi
movabsq $-0x4b6d499041670d8d, %rax # imm = 0xB492B66FBE98F273
imulq %rax, %rdi
callq 0x625c0
movabsq $-0x4b6d499041670d8d, %rcx # imm = 0xB492B66FBE98F273
imulq %rcx, %rax
xorq 0x60(%rsp), %rax
movq %rax, 0x60(%rsp)
movabsq $-0x4b6d499041670d8d, %rax # imm = 0xB492B66FBE98F273
imulq 0x60(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
xorq 0x58(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x70(%rsp), %rdi
addq $0x8, %rdi
callq 0x62490
movq %rax, %rdi
movabsq $-0x4b6d499041670d8d, %rax # imm = 0xB492B66FBE98F273
imulq %rax, %rdi
callq 0x625c0
movabsq $-0x4b6d499041670d8d, %rcx # imm = 0xB492B66FBE98F273
imulq %rcx, %rax
xorq 0x50(%rsp), %rax
movq %rax, 0x50(%rsp)
movabsq $-0x4b6d499041670d8d, %rax # imm = 0xB492B66FBE98F273
imulq 0x50(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
xorq 0x48(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x70(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x70(%rsp)
movq 0x40(%rsp), %rax
subq $0x10, %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
jg 0x631d1
jmp 0x632b7
movq 0x60(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x624a0
movq %rax, 0x60(%rsp)
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x624a0
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rax
movq 0x58(%rsp), %rcx
xorq %rcx, %rax
movq %rax, 0x38(%rsp)
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x624a0
movq %rax, 0x30(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x63830
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rdx
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)