#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 hash_code(uint32_t a) {
  uint32_t hash = 0x811C9DC5;
  const unsigned char *c = (const unsigned char *)&a;
  hash ^= *(c++);
  hash *= 0x01000193;
  hash ^= *(c++);
  hash *= 0x01000193;
  hash ^= *(c++);
  hash *= 0x01000193;
  hash ^= *(c++);
  hash *= 0x01000193;
  return hash;
}


x86 assembly (clang, -O0):
<hash_code>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x811c9dc5,-0x8(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movzbl (%rax),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
imul   $0x1000193,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movzbl (%rax),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
imul   $0x1000193,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movzbl (%rax),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
imul   $0x1000193,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movzbl (%rax),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
imul   $0x1000193,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_code>:
mov    %edi,%ecx
mov    %edi,%eax
movzbl %cl,%edx
movzbl %ch,%esi
shr    $0x10,%ecx
shr    $0x18,%eax
xor    $0x811c9dc5,%edx
imul   $0x1000193,%edx,%edx
xor    %edx,%esi
imul   $0x1000193,%esi,%edx
movzbl %cl,%ecx
xor    %edx,%ecx
imul   $0x1000193,%ecx,%ecx
xor    %eax,%ecx
imul   $0x1000193,%ecx,%eax
ret

LLVM IR (-O0):
define i32 @hash_code(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %2
store i32 -2128831035, i32* %3
%5 = bitcast i32* %2 to i8*
store i8* %5, i8** %4
%6 = load i8*, i8** %4
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %4
%8 = load i8, i8* %6
%9 = zext i8 %8 to i32
%10 = load i32, i32* %3
%11 = xor i32 %10, %9
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = mul nsw i32 %12, 16777619
store i32 %13, i32* %3
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %4
%16 = load i8, i8* %14
%17 = zext i8 %16 to i32
%18 = load i32, i32* %3
%19 = xor i32 %18, %17
store i32 %19, i32* %3
%20 = load i32, i32* %3
%21 = mul nsw i32 %20, 16777619
store i32 %21, i32* %3
%22 = load i8*, i8** %4
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %4
%24 = load i8, i8* %22
%25 = zext i8 %24 to i32
%26 = load i32, i32* %3
%27 = xor i32 %26, %25
store i32 %27, i32* %3
%28 = load i32, i32* %3
%29 = mul nsw i32 %28, 16777619
store i32 %29, i32* %3
%30 = load i8*, i8** %4
%31 = getelementptr inbounds i8, i8* %30, i32 1
store i8* %31, i8** %4
%32 = load i8, i8* %30
%33 = zext i8 %32 to i32
%34 = load i32, i32* %3
%35 = xor i32 %34, %33
store i32 %35, i32* %3
%36 = load i32, i32* %3
%37 = mul nsw i32 %36, 16777619
store i32 %37, i32* %3
%38 = load i32, i32* %3
ret i32 %38
}

LLVM IR (-O2):
define i32 @hash_code(i32 %0) {
%2 = lshr i32 %0, 8
%3 = lshr i32 %0, 16
%4 = lshr i32 %0, 24
%5 = and i32 %0, 255
%6 = xor i32 %5, -2128831035
%7 = mul nsw i32 %6, 16777619
%8 = and i32 %2, 255
%9 = xor i32 %7, %8
%10 = mul nsw i32 %9, 16777619
%11 = and i32 %3, 255
%12 = xor i32 %10, %11
%13 = mul nsw i32 %12, 16777619
%14 = xor i32 %13, %4
%15 = mul nsw i32 %14, 16777619
ret i32 %15
}