#![allow(overflowing_literals)]
pub fn hash(str: &str, seed: u32) -> u64 {
let mut h1 = 0xdeadbeef ^ seed as i32;
let mut h2 = 0x41c6ce57 ^ seed as i32;
for ch in str.encode_utf16() {
h1 = (h1 ^ ch as i32).wrapping_mul(2654435761);
h2 = (h2 ^ ch as i32).wrapping_mul(1597334677);
}
h1 = (h1 ^ (h1 as u32 >> 16) as i32).wrapping_mul(2246822507);
h1 ^= (h2 ^ (h2 as u32 >> 13) as i32).wrapping_mul(3266489909);
h2 = (h2 ^ (h2 as u32 >> 16) as i32).wrapping_mul(2246822507);
h2 ^= (h1 ^ (h1 as u32 >> 13) as i32).wrapping_mul(3266489909);
4294967296_u64
.wrapping_mul((2097151_u32 & h2 as u32) as u64)
.wrapping_add((h1 as u32) as u64)
}