#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 rotl(int const, int);
uint64_t next(uint64_t s[2]) {
  const uint64_t s0 = s[0];
  uint64_t s1 = s[1];
  const uint64_t result = rotl(s0 * 5, 7) * 9;
  s1 ^= s0;
  s[0] = rotl(s0, 24) ^ s1 ^ (s1 << 16);
  s[1] = rotl(s1, 37);
  return result;
}


x86 assembly (clang, -O0):
<next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x10(%rbp)
imul   $0x5,-0xc(%rbp),%edi
mov    $0x7,%esi
call   1030 <rotl@plt>
imul   $0x9,%eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x18,%esi
call   1030 <rotl@plt>
mov    %eax,%ecx
xor    -0x10(%rbp),%ecx
mov    -0x10(%rbp),%eax
shl    $0x10,%eax
xor    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%edi
mov    $0x25,%esi
call   1030 <rotl@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%ebx
lea    (%rbx,%rbx,4),%edi
mov    0x4(%r14),%ebp
xor    %ebx,%ebp
mov    $0x7,%esi
call   1030 <rotl@plt>
lea    (%rax,%rax,8),%r15d
mov    %ebx,%edi
mov    $0x18,%esi
call   1030 <rotl@plt>
xor    %ebp,%eax
mov    %ebp,%ecx
shl    $0x10,%ecx
xor    %eax,%ecx
mov    %ecx,(%r14)
mov    %ebp,%edi
mov    $0x25,%esi
call   1030 <rotl@plt>
mov    %eax,0x4(%r14)
mov    %r15d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @next(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
store i32 %8, i32* %3
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 1
%11 = load i32, i32* %10
store i32 %11, i32* %4
%12 = load i32, i32* %3
%13 = mul nsw i32 %12, 5
%14 = call i32 @rotl(i32 %13, i32 7)
%15 = mul nsw i32 %14, 9
store i32 %15, i32* %5
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = xor i32 %17, %16
store i32 %18, i32* %4
%19 = load i32, i32* %3
%20 = call i32 @rotl(i32 %19, i32 24)
%21 = load i32, i32* %4
%22 = xor i32 %20, %21
%23 = load i32, i32* %4
%24 = shl i32 %23, 16
%25 = xor i32 %22, %24
%26 = load i32*, i32** %2
%27 = getelementptr inbounds i32, i32* %26, i64 0
store i32 %25, i32* %27
%28 = load i32, i32* %4
%29 = call i32 @rotl(i32 %28, i32 37)
%30 = load i32*, i32** %2
%31 = getelementptr inbounds i32, i32* %30, i64 1
store i32 %29, i32* %31
%32 = load i32, i32* %5
ret i32 %32
}

LLVM IR (-O2):
define i32 @next(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = mul nsw i32 %2, 5
%6 = tail call i32 @rotl(i32 %5, i32 7)
%7 = mul nsw i32 %6, 9
%8 = xor i32 %4, %2
%9 = tail call i32 @rotl(i32 %2, i32 24)
%10 = xor i32 %9, %8
%11 = shl i32 %8, 16
%12 = xor i32 %10, %11
store i32 %12, i32* %0
%13 = tail call i32 @rotl(i32 %8, i32 37)
store i32 %13, i32* %3
ret i32 %7
}