#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 uint32_t;

/* Variables and functions */
uint32_t hashfn_uint32_rj(uint32_t key) {
  key += (key << 12);
  key ^= (key >> 22);
  key += (key << 4);
  key ^= (key >> 9);
  key += (key << 10);
  key ^= (key >> 2);
  key += (key << 7);
  key ^= (key >> 12);
  return key;
}


x86 assembly (clang, -O0):
<hashfn_uint32_rj>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xc,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x16,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x4,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x9,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xa,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x7,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xc,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashfn_uint32_rj>:
mov    %edi,%eax
shl    $0xc,%eax
add    %edi,%eax
mov    %eax,%ecx
sar    $0x16,%ecx
xor    %eax,%ecx
mov    %ecx,%eax
shl    $0x4,%eax
add    %ecx,%eax
mov    %eax,%ecx
sar    $0x9,%ecx
xor    %eax,%ecx
mov    %ecx,%eax
shl    $0xa,%eax
add    %ecx,%eax
mov    %eax,%ecx
sar    $0x2,%ecx
xor    %eax,%ecx
mov    %ecx,%edx
shl    $0x7,%edx
add    %ecx,%edx
mov    %edx,%eax
sar    $0xc,%eax
xor    %edx,%eax
ret

LLVM IR (-O0):
define i32 @hashfn_uint32_rj(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 12
%5 = load i32, i32* %2
%6 = add nsw i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = ashr i32 %7, 22
%9 = load i32, i32* %2
%10 = xor i32 %9, %8
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = shl i32 %11, 4
%13 = load i32, i32* %2
%14 = add nsw i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = ashr i32 %15, 9
%17 = load i32, i32* %2
%18 = xor i32 %17, %16
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = shl i32 %19, 10
%21 = load i32, i32* %2
%22 = add nsw i32 %21, %20
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = ashr i32 %23, 2
%25 = load i32, i32* %2
%26 = xor i32 %25, %24
store i32 %26, i32* %2
%27 = load i32, i32* %2
%28 = shl i32 %27, 7
%29 = load i32, i32* %2
%30 = add nsw i32 %29, %28
store i32 %30, i32* %2
%31 = load i32, i32* %2
%32 = ashr i32 %31, 12
%33 = load i32, i32* %2
%34 = xor i32 %33, %32
store i32 %34, i32* %2
%35 = load i32, i32* %2
ret i32 %35
}

LLVM IR (-O2):
define i32 @hashfn_uint32_rj(i32 %0) {
%2 = mul i32 %0, 4097
%3 = ashr i32 %2, 22
%4 = xor i32 %3, %2
%5 = mul i32 %4, 17
%6 = ashr i32 %5, 9
%7 = xor i32 %6, %5
%8 = mul i32 %7, 1025
%9 = ashr i32 %8, 2
%10 = xor i32 %9, %8
%11 = mul i32 %10, 129
%12 = ashr i32 %11, 12
%13 = xor i32 %12, %11
ret i32 %13
}