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

/* Variables and functions */
int UINT64_C(int);
uint64_t splitMix64(uint64_t *seed) {
  uint64_t z = (*seed += UINT64_C(0x9E3779B97F4A7C15));
  z = (z ^ (z >> 30)) * UINT64_C(0xBF58476D1CE4E5B9);
  z = (z ^ (z >> 27)) * UINT64_C(0x94D049BB133111EB);
  return z ^ (z >> 31);
}


x86 assembly (clang, -O0):
<splitMix64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x7f4a7c15,%edi
call   1030 <UINT64_C@plt>
mov    -0x8(%rbp),%rcx
add    (%rcx),%eax
mov    %eax,(%rcx)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    $0x1e,%ecx
xor    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    $0x1ce4e5b9,%edi
call   1030 <UINT64_C@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    $0x1b,%ecx
xor    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    $0x133111eb,%edi
call   1030 <UINT64_C@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    $0x1f,%ecx
xor    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<splitMix64>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x7f4a7c15,%edi
call   1030 <UINT64_C@plt>
mov    %eax,%ebp
add    (%rbx),%ebp
mov    %ebp,(%rbx)
mov    %ebp,%eax
sar    $0x1e,%eax
xor    %eax,%ebp
mov    $0x1ce4e5b9,%edi
call   1030 <UINT64_C@plt>
mov    %eax,%ebx
imul   %ebp,%ebx
mov    %ebx,%eax
sar    $0x1b,%eax
xor    %eax,%ebx
mov    $0x133111eb,%edi
call   1030 <UINT64_C@plt>
imul   %ebx,%eax
mov    %eax,%ecx
sar    $0x1f,%ecx
xor    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @splitMix64(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = call i32 @UINT64_C(i32 2135587861)
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
%7 = add nsw i32 %6, %4
store i32 %7, i32* %5
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = load i32, i32* %3
%10 = ashr i32 %9, 30
%11 = xor i32 %8, %10
%12 = call i32 @UINT64_C(i32 484763065)
%13 = mul nsw i32 %11, %12
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = load i32, i32* %3
%16 = ashr i32 %15, 27
%17 = xor i32 %14, %16
%18 = call i32 @UINT64_C(i32 321982955)
%19 = mul nsw i32 %17, %18
store i32 %19, i32* %3
%20 = load i32, i32* %3
%21 = load i32, i32* %3
%22 = ashr i32 %21, 31
%23 = xor i32 %20, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @splitMix64(i32* nocapture %0) {
%2 = tail call i32 @UINT64_C(i32 2135587861)
%3 = load i32, i32* %0
%4 = add nsw i32 %3, %2
store i32 %4, i32* %0
%5 = ashr i32 %4, 30
%6 = xor i32 %5, %4
%7 = tail call i32 @UINT64_C(i32 484763065)
%8 = mul nsw i32 %6, %7
%9 = ashr i32 %8, 27
%10 = xor i32 %9, %8
%11 = tail call i32 @UINT64_C(i32 321982955)
%12 = mul nsw i32 %10, %11
%13 = ashr i32 %12, 31
%14 = xor i32 %13, %12
ret i32 %14
}