#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 */

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
unsigned int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
int main(int argc, char **argv) {
  srand(time(0));
  unsigned int x[16];
  for (int i = 0; i < 16; i++)
    x[i] = rand();
  unsigned int *buf = &x[0];
  for (int i = 0; i < 16; i++) {
    *buf = (((*buf) << 24) | (((*buf) & 0xff00) << 8) |
            (((*buf) >> 8) & 0xff00) | ((*buf) >> 24));
    buf++;
  }
  volatile unsigned int y = x[0];
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
movl   $0x0,-0x54(%rbp)
cmpl   $0x10,-0x54(%rbp)
jge    1194 <main+0x54>
mov    $0x0,%al
call   1060 <rand@plt>
mov    %eax,%ecx
movslq -0x54(%rbp),%rax
mov    %ecx,-0x50(%rbp,%rax,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    116b <main+0x2b>
lea    -0x50(%rbp),%rax
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x64(%rbp)
cmpl   $0x10,-0x64(%rbp)
jge    1201 <main+0xc1>
mov    -0x60(%rbp),%rax
mov    (%rax),%ecx
shl    $0x18,%ecx
mov    -0x60(%rbp),%rax
mov    (%rax),%eax
and    $0xff00,%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x60(%rbp),%rax
mov    (%rax),%eax
shr    $0x8,%eax
and    $0xff00,%eax
or     %eax,%ecx
mov    -0x60(%rbp),%rax
mov    (%rax),%eax
shr    $0x18,%eax
or     %eax,%ecx
mov    -0x60(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x60(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x60(%rbp)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    11a3 <main+0x63>
mov    -0x50(%rbp),%eax
mov    %eax,-0x68(%rbp)
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1060 <rand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
bswap  %ebx
mov    %ebx,0xc(%rsp)
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [16 x i32]
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = call i32 @time(i32 0)
%12 = call i32 @srand(i32 %11)
store i32 0, i32* %7
br label %13
13: ; preds = %21, %2
%14 = load i32, i32* %7
%15 = icmp slt i32 %14, 16
br i1 %15, label %16, label %24
16: ; preds = %13
%17 = call i32 (...) @rand()
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [16 x i32], [16 x i32]* %6, i64 0, i64 %19
store i32 %17, i32* %20
br label %21
21: ; preds = %16
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
store i32 %23, i32* %7
br label %13
24: ; preds = %13
%25 = getelementptr inbounds [16 x i32], [16 x i32]* %6, i64 0, i64 0
store i32* %25, i32** %8
store i32 0, i32* %9
br label %26
26: ; preds = %50, %24
%27 = load i32, i32* %9
%28 = icmp slt i32 %27, 16
br i1 %28, label %29, label %53
29: ; preds = %26
%30 = load i32*, i32** %8
%31 = load i32, i32* %30
%32 = shl i32 %31, 24
%33 = load i32*, i32** %8
%34 = load i32, i32* %33
%35 = and i32 %34, 65280
%36 = shl i32 %35, 8
%37 = or i32 %32, %36
%38 = load i32*, i32** %8
%39 = load i32, i32* %38
%40 = lshr i32 %39, 8
%41 = and i32 %40, 65280
%42 = or i32 %37, %41
%43 = load i32*, i32** %8
%44 = load i32, i32* %43
%45 = lshr i32 %44, 24
%46 = or i32 %42, %45
%47 = load i32*, i32** %8
store i32 %46, i32* %47
%48 = load i32*, i32** %8
%49 = getelementptr inbounds i32, i32* %48, i32 1
store i32* %49, i32** %8
br label %50
50: ; preds = %29
%51 = load i32, i32* %9
%52 = add nsw i32 %51, 1
store i32 %52, i32* %9
br label %26
53: ; preds = %26
%54 = getelementptr inbounds [16 x i32], [16 x i32]* %6, i64 0, i64 0
%55 = load i32, i32* %54
store volatile i32 %55, i32* %10
%56 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = tail call i32 @time(i32 0)
%5 = tail call i32 @srand(i32 %4)
%6 = tail call i32 (...) @rand()
%7 = tail call i32 (...) @rand()
%8 = tail call i32 (...) @rand()
%9 = tail call i32 (...) @rand()
%10 = tail call i32 (...) @rand()
%11 = tail call i32 (...) @rand()
%12 = tail call i32 (...) @rand()
%13 = tail call i32 (...) @rand()
%14 = tail call i32 (...) @rand()
%15 = tail call i32 (...) @rand()
%16 = tail call i32 (...) @rand()
%17 = tail call i32 (...) @rand()
%18 = tail call i32 (...) @rand()
%19 = tail call i32 (...) @rand()
%20 = tail call i32 (...) @rand()
%21 = tail call i32 (...) @rand()
%22 = tail call i32 @llvm.bswap.i32(i32 %6)
%23 = bitcast i32* %3 to i8*
store volatile i32 %22, i32* %3
%24 = tail call i32 @exit(i32 0)
unreachable
}