unsigned int KISS32(void) {
  static unsigned int x = 123456789, y = 362436069, z = 21288629, w = 14921776,
                      c = 0;
  unsigned int t;
  x += 545925293;
  y ^= (y << 13);
  y ^= (y >> 17);
  y ^= (y << 5);
  t = z + w + c;
  z = w;
  c = (t >> 31);
  w = t & 2147483647;
  return (x + y + w);
}


x86 assembly (clang, -O0):
<KISS32>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f16(%rip),%eax
add    $0x208a28ad,%eax
mov    %eax,0x2f0b(%rip)
mov    0x2f09(%rip),%eax
shl    $0xd,%eax
xor    0x2f00(%rip),%eax
mov    %eax,0x2efa(%rip)
mov    0x2ef4(%rip),%eax
shr    $0x11,%eax
xor    0x2eeb(%rip),%eax
mov    %eax,0x2ee5(%rip)
mov    0x2edf(%rip),%eax
shl    $0x5,%eax
xor    0x2ed6(%rip),%eax
mov    %eax,0x2ed0(%rip)
mov    0x2ece(%rip),%eax
add    0x2ecc(%rip),%eax
add    0x2ece(%rip),%eax
mov    %eax,-0x4(%rbp)
mov    0x2ebd(%rip),%eax
mov    %eax,0x2eb3(%rip)
mov    -0x4(%rbp),%eax
shr    $0x1f,%eax
mov    %eax,0x2eb3(%rip)
mov    -0x4(%rbp),%eax
and    $0x7fffffff,%eax
mov    %eax,0x2e9d(%rip)
mov    0x2e8b(%rip),%eax
add    0x2e89(%rip),%eax
add    0x2e8b(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<KISS32>:
mov    0x2f1a(%rip),%eax
lea    0x208a28ad(%rax),%ecx
mov    %ecx,0x2f0e(%rip)
mov    0x2f0c(%rip),%ecx
mov    %ecx,%edx
shl    $0xd,%edx
xor    %ecx,%edx
mov    %edx,%ecx
shr    $0x11,%ecx
xor    %edx,%ecx
mov    %ecx,%edx
shl    $0x5,%edx
xor    %ecx,%edx
mov    0x2ef9(%rip),%ecx
mov    0x2eef(%rip),%esi
add    %ecx,%esi
add    0x2ef3(%rip),%esi
mov    %edx,0x2edd(%rip)
mov    %ecx,0x2edb(%rip)
mov    %esi,%ecx
shr    $0x1f,%ecx
mov    %ecx,0x2edc(%rip)
and    $0x7fffffff,%esi
mov    %esi,0x2ec8(%rip)
add    %edx,%eax
add    $0x208a28ad,%eax
add    %esi,%eax
ret

LLVM IR (-O0):
@KISS32.x = internal global i32 123456789
@KISS32.y = internal global i32 362436069
@KISS32.z = internal global i32 21288629
@KISS32.w = internal global i32 14921776
@KISS32.c = internal global i32 0
define i32 @KISS32() {
%1 = alloca i32
%2 = load i32, i32* @KISS32.x
%3 = add i32 %2, 545925293
store i32 %3, i32* @KISS32.x
%4 = load i32, i32* @KISS32.y
%5 = shl i32 %4, 13
%6 = load i32, i32* @KISS32.y
%7 = xor i32 %6, %5
store i32 %7, i32* @KISS32.y
%8 = load i32, i32* @KISS32.y
%9 = lshr i32 %8, 17
%10 = load i32, i32* @KISS32.y
%11 = xor i32 %10, %9
store i32 %11, i32* @KISS32.y
%12 = load i32, i32* @KISS32.y
%13 = shl i32 %12, 5
%14 = load i32, i32* @KISS32.y
%15 = xor i32 %14, %13
store i32 %15, i32* @KISS32.y
%16 = load i32, i32* @KISS32.z
%17 = load i32, i32* @KISS32.w
%18 = add i32 %16, %17
%19 = load i32, i32* @KISS32.c
%20 = add i32 %18, %19
store i32 %20, i32* %1
%21 = load i32, i32* @KISS32.w
store i32 %21, i32* @KISS32.z
%22 = load i32, i32* %1
%23 = lshr i32 %22, 31
store i32 %23, i32* @KISS32.c
%24 = load i32, i32* %1
%25 = and i32 %24, 2147483647
store i32 %25, i32* @KISS32.w
%26 = load i32, i32* @KISS32.x
%27 = load i32, i32* @KISS32.y
%28 = add i32 %26, %27
%29 = load i32, i32* @KISS32.w
%30 = add i32 %28, %29
ret i32 %30
}

LLVM IR (-O2):
@KISS32.x = internal unnamed_addr global i32 123456789
@KISS32.y = internal unnamed_addr global i32 362436069
@KISS32.z = internal unnamed_addr global i32 21288629
@KISS32.w = internal unnamed_addr global i32 14921776
@KISS32.c = internal unnamed_addr global i32 0
define i32 @KISS32() {
%1 = load i32, i32* @KISS32.x
%2 = add i32 %1, 545925293
store i32 %2, i32* @KISS32.x
%3 = load i32, i32* @KISS32.y
%4 = shl i32 %3, 13
%5 = xor i32 %4, %3
%6 = lshr i32 %5, 17
%7 = xor i32 %6, %5
%8 = shl i32 %7, 5
%9 = xor i32 %8, %7
store i32 %9, i32* @KISS32.y
%10 = load i32, i32* @KISS32.z
%11 = load i32, i32* @KISS32.w
%12 = add i32 %11, %10
%13 = load i32, i32* @KISS32.c
%14 = add i32 %12, %13
store i32 %11, i32* @KISS32.z
%15 = lshr i32 %14, 31
store i32 %15, i32* @KISS32.c
%16 = and i32 %14, 2147483647
store i32 %16, i32* @KISS32.w
%17 = add i32 %9, %2
%18 = add i32 %17, %16
ret i32 %18
}