#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 unsigned int uint64_t;
typedef unsigned int uint32_t;

/* Variables and functions */
unsigned int UINT64_C(int);
uint32_t KISS2func(void) {
  static uint64_t mwc64 = ((((uint64_t)(7654321)) << 32u) | (521288629));
  static uint32_t cong = 123456789;
  static uint32_t shr3 = 362436000;
  return ((mwc64 = UINT64_C(698769069) * (uint32_t)mwc64 + (mwc64 >> 32u),
           (uint32_t)mwc64) +
          (cong = 69069u * cong + 12345u) +
          (shr3 ^= (shr3 << 13), shr3 ^= (shr3 >> 17), shr3 ^= (shr3 << 5)));
}


x86 assembly (clang, -O0):
<KISS2func>:
push   %rbp
mov    %rsp,%rbp
mov    $0x29a65ead,%edi
call   1030 <UINT64_C@plt>
imul   0x2f03(%rip),%eax
mov    0x2efd(%rip),%edx
mov    $0x20,%ecx
shr    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
mov    %eax,0x2eec(%rip)
mov    0x2ee6(%rip),%eax
imul   $0x10dcd,0x2ee0(%rip),%ecx
add    $0x3039,%ecx
mov    %ecx,0x2ed4(%rip)
add    %ecx,%eax
mov    0x2ed0(%rip),%ecx
shl    $0xd,%ecx
xor    0x2ec7(%rip),%ecx
mov    %ecx,0x2ec1(%rip)
mov    0x2ebb(%rip),%ecx
shr    $0x11,%ecx
xor    0x2eb2(%rip),%ecx
mov    %ecx,0x2eac(%rip)
mov    0x2ea6(%rip),%ecx
shl    $0x5,%ecx
xor    0x2e9d(%rip),%ecx
mov    %ecx,0x2e97(%rip)
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<KISS2func>:
push   %rax
mov    $0x29a65ead,%edi
call   1030 <UINT64_C@plt>
imul   $0x10dcd,0x2f03(%rip),%eax
add    $0x3039,%eax
mov    %eax,0x2ef8(%rip)
mov    0x2ef6(%rip),%eax
mov    %eax,%ecx
shl    $0xd,%ecx
xor    %eax,%ecx
mov    %ecx,%eax
shr    $0x11,%eax
xor    %ecx,%eax
mov    %eax,%ecx
shl    $0x5,%ecx
xor    %eax,%ecx
mov    %ecx,0x2edb(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@KISS2func.mwc64 = internal global i32 -1626195019
@KISS2func.cong = internal global i32 123456789
@KISS2func.shr3 = internal global i32 362436000
define i32 @KISS2func() {
%1 = call i32 @UINT64_C(i32 698769069)
%2 = load i32, i32* @KISS2func.mwc64
%3 = mul i32 %1, %2
%4 = load i32, i32* @KISS2func.mwc64
%5 = lshr i32 %4, 32
%6 = add i32 %3, %5
store i32 %6, i32* @KISS2func.mwc64
%7 = load i32, i32* @KISS2func.mwc64
%8 = load i32, i32* @KISS2func.cong
%9 = mul i32 69069, %8
%10 = add i32 %9, 12345
store i32 %10, i32* @KISS2func.cong
%11 = add i32 %7, %10
%12 = load i32, i32* @KISS2func.shr3
%13 = shl i32 %12, 13
%14 = load i32, i32* @KISS2func.shr3
%15 = xor i32 %14, %13
store i32 %15, i32* @KISS2func.shr3
%16 = load i32, i32* @KISS2func.shr3
%17 = lshr i32 %16, 17
%18 = load i32, i32* @KISS2func.shr3
%19 = xor i32 %18, %17
store i32 %19, i32* @KISS2func.shr3
%20 = load i32, i32* @KISS2func.shr3
%21 = shl i32 %20, 5
%22 = load i32, i32* @KISS2func.shr3
%23 = xor i32 %22, %21
store i32 %23, i32* @KISS2func.shr3
%24 = add i32 %11, %23
ret i32 %24
}

LLVM IR (-O2):
@KISS2func.cong = internal unnamed_addr global i32 123456789
@KISS2func.shr3 = internal unnamed_addr global i32 362436000
define i32 @KISS2func() {
%1 = tail call i32 @UINT64_C(i32 698769069)
%2 = load i32, i32* @KISS2func.cong
%3 = mul i32 %2, 69069
%4 = add i32 %3, 12345
store i32 %4, i32* @KISS2func.cong
%5 = load i32, i32* @KISS2func.shr3
%6 = shl i32 %5, 13
%7 = xor i32 %6, %5
%8 = lshr i32 %7, 17
%9 = xor i32 %8, %7
%10 = shl i32 %9, 5
%11 = xor i32 %10, %9
store i32 %11, i32* @KISS2func.shr3
ret i32 poison
}