#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
uint64_t rehash(void *key) {
  uint64_t i_key = (uint64_t)key;
  uint32_t hi_bits = (uint32_t)(i_key >> 32);
  uint32_t lo_bits = (uint32_t)(i_key);
  hi_bits ^= ((hi_bits >> 15)) ^ ((hi_bits >> 23));
  hi_bits ^= (hi_bits >> 7) ^ (hi_bits >> 5);
  lo_bits ^= ((lo_bits >> 15)) ^ ((lo_bits >> 23));
  lo_bits ^= (lo_bits >> 7) ^ (lo_bits >> 5);
  return (i_key & 0xffffffff00000000L) | ((hi_bits) ^ (lo_bits));
}


x86 assembly (clang, -O0):
<rehash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
sar    $0xf,%eax
mov    -0x10(%rbp),%ecx
sar    $0x17,%ecx
xor    %ecx,%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sar    $0x7,%eax
mov    -0x10(%rbp),%ecx
sar    $0x5,%ecx
xor    %ecx,%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
sar    $0xf,%eax
mov    -0x14(%rbp),%ecx
sar    $0x17,%ecx
xor    %ecx,%eax
xor    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sar    $0x7,%eax
mov    -0x14(%rbp),%ecx
sar    $0x5,%ecx
xor    %ecx,%eax
xor    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
movslq -0xc(%rbp),%rax
movabs $0xffffffff00000000,%rcx
ff ff ff
and    %rcx,%rax
mov    -0x10(%rbp),%ecx
xor    -0x14(%rbp),%ecx
movslq %ecx,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rehash>:
ret

LLVM IR (-O0):
define i32 @rehash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = ptrtoint i8* %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = ashr i32 %8, 32
store i32 %9, i32* %4
%10 = load i32, i32* %3
store i32 %10, i32* %5
%11 = load i32, i32* %4
%12 = ashr i32 %11, 15
%13 = load i32, i32* %4
%14 = ashr i32 %13, 23
%15 = xor i32 %12, %14
%16 = load i32, i32* %4
%17 = xor i32 %16, %15
store i32 %17, i32* %4
%18 = load i32, i32* %4
%19 = ashr i32 %18, 7
%20 = load i32, i32* %4
%21 = ashr i32 %20, 5
%22 = xor i32 %19, %21
%23 = load i32, i32* %4
%24 = xor i32 %23, %22
store i32 %24, i32* %4
%25 = load i32, i32* %5
%26 = ashr i32 %25, 15
%27 = load i32, i32* %5
%28 = ashr i32 %27, 23
%29 = xor i32 %26, %28
%30 = load i32, i32* %5
%31 = xor i32 %30, %29
store i32 %31, i32* %5
%32 = load i32, i32* %5
%33 = ashr i32 %32, 7
%34 = load i32, i32* %5
%35 = ashr i32 %34, 5
%36 = xor i32 %33, %35
%37 = load i32, i32* %5
%38 = xor i32 %37, %36
store i32 %38, i32* %5
%39 = load i32, i32* %3
%40 = sext i32 %39 to i64
%41 = and i64 %40, -4294967296
%42 = load i32, i32* %4
%43 = load i32, i32* %5
%44 = xor i32 %42, %43
%45 = sext i32 %44 to i64
%46 = or i64 %41, %45
%47 = trunc i64 %46 to i32
ret i32 %47
}

LLVM IR (-O2):
define i32 @rehash(i8* nocapture readnone %0) {
ret i32 poison
}