#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 /*<<< orphan*/ value;
typedef int /*<<< orphan*/ uint64_t;
typedef uintptr_t uint32_t;

/* Variables and functions */
int UINT32_MAX;
int htole64(int /*<<< orphan*/);
int /*<<< orphan*/ rgph_murmur32s_finalise(int, uintptr_t *);
int /*<<< orphan*/ rgph_murmur32s_mix(int, uintptr_t *, int);
uint32_t rgph_u32_murmur32s_u64(uint64_t value, uintptr_t seed) {
  uint32_t h[1] = {seed};
  rgph_murmur32s_mix(htole64(value) & UINT32_MAX, h, 0);
  rgph_murmur32s_mix(htole64(value) >> 32, h, 0);
  rgph_murmur32s_mix(0, h, 1);
  rgph_murmur32s_finalise(sizeof(value), h);
  return h[0];
}


x86 assembly (clang, -O0):
<rgph_u32_murmur32s_u64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <htole64@plt>
mov    %eax,%edi
mov    0x2ea0(%rip),%rax
and    (%rax),%edi
lea    -0x18(%rbp),%rsi
xor    %edx,%edx
call   1030 <rgph_murmur32s_mix@plt>
mov    -0x4(%rbp),%edi
call   1040 <htole64@plt>
mov    %eax,%edi
mov    $0x20,%ecx
sar    %cl,%edi
lea    -0x18(%rbp),%rsi
xor    %edx,%edx
call   1030 <rgph_murmur32s_mix@plt>
lea    -0x18(%rbp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1030 <rgph_murmur32s_mix@plt>
lea    -0x18(%rbp),%rsi
mov    $0x4,%edi
call   1050 <rgph_murmur32s_finalise@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgph_u32_murmur32s_u64>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %rsi,(%rsp)
call   1040 <htole64@plt>
mov    0x2eb2(%rip),%rcx
and    (%rcx),%eax
mov    %rsp,%r14
mov    %eax,%edi
mov    %r14,%rsi
xor    %edx,%edx
call   1030 <rgph_murmur32s_mix@plt>
mov    %ebx,%edi
call   1040 <htole64@plt>
mov    %r14,%rsi
xor    %edx,%edx
call   1030 <rgph_murmur32s_mix@plt>
xor    %edi,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <rgph_murmur32s_mix@plt>
mov    $0x4,%edi
mov    %r14,%rsi
call   1050 <rgph_murmur32s_finalise@plt>
mov    (%rsp),%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@UINT32_MAX = global i32 0
define i64 @rgph_u32_murmur32s_u64(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca [1 x i64]
store i32 %0, i32* %3
store i64 %1, i64* %4
%6 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%7 = load i64, i64* %4
store i64 %7, i64* %6
%8 = load i32, i32* %3
%9 = call i32 @htole64(i32 %8)
%10 = load i32, i32* @UINT32_MAX
%11 = and i32 %9, %10
%12 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%13 = call i32 @rgph_murmur32s_mix(i32 %11, i64* %12, i32 0)
%14 = load i32, i32* %3
%15 = call i32 @htole64(i32 %14)
%16 = ashr i32 %15, 32
%17 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%18 = call i32 @rgph_murmur32s_mix(i32 %16, i64* %17, i32 0)
%19 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%20 = call i32 @rgph_murmur32s_mix(i32 0, i64* %19, i32 1)
%21 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%22 = call i32 @rgph_murmur32s_finalise(i32 4, i64* %21)
%23 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%24 = load i64, i64* %23
ret i64 %24
}

LLVM IR (-O2):
@UINT32_MAX = global i32 0
define i64 @rgph_u32_murmur32s_u64(i32 %0, i64 %1) {
%3 = alloca [1 x i64]
%4 = bitcast [1 x i64]* %3 to i8*
%5 = getelementptr inbounds [1 x i64], [1 x i64]* %3, i64 0, i64 0
store i64 %1, i64* %5
%6 = tail call i32 @htole64(i32 %0)
%7 = load i32, i32* @UINT32_MAX
%8 = and i32 %7, %6
%9 = call i32 @rgph_murmur32s_mix(i32 %8, i64* %5, i32 0)
%10 = call i32 @htole64(i32 %0)
%11 = call i32 @rgph_murmur32s_mix(i32 poison, i64* %5, i32 0)
%12 = call i32 @rgph_murmur32s_mix(i32 0, i64* %5, i32 1)
%13 = call i32 @rgph_murmur32s_finalise(i32 4, i64* %5)
%14 = load i64, i64* %5
ret i64 %14
}