#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*/ delay(int);
int /*<<< orphan*/ enableGPIO1Clocks();
void main(void) {
  int x;
  enableGPIO1Clocks();
  (*((volatile unsigned int *)(0x4804C000 + 0x134))) &= ~(0xf << 21);
  for (x = 0; x < 16; x++) {
    (*((volatile unsigned int *)(0x4804C000 + 0x190))) = 0xffffff;
    (*((volatile unsigned int *)(0x4804C000 + 0x194))) = (x << 21);
    delay(0x3fffff);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <enableGPIO1Clocks@plt>
mov    $0x4804c134,%eax
mov    (%rax),%ecx
and    $0xfe1fffff,%ecx
mov    $0x4804c134,%eax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1184 <main+0x64>
mov    $0x4804c190,%eax
movl   $0xffffff,(%rax)
mov    -0x4(%rbp),%ecx
shl    $0x15,%ecx
mov    $0x4804c194,%eax
mov    %ecx,(%rax)
mov    $0x3fffff,%edi
call   1030 <delay@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    114a <main+0x2a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <enableGPIO1Clocks@plt>
andl   $0xfe1fffff,0x4804c134
ff ff 1f fe
movl   $0xffffff,0x4804c190
movl   $0x0,0x4804c194
mov    $0x3fffff,%edi
call   1030 <delay@plt>
movl   $0xffffff,0x4804c190
movl   $0x200000,0x4804c194
mov    $0x3fffff,%edi
call   1030 <delay@plt>
movl   $0xffffff,0x4804c190
movl   $0x400000,0x4804c194
mov    $0x3fffff,%edi
call   1030 <delay@plt>
movl   $0xffffff,0x4804c190
movl   $0x600000,0x4804c194
mov    $0x3fffff,%edi
call   1030 <delay@plt>
movl   $0xffffff,0x4804c190
movl   $0x800000,0x4804c194
mov    $0x3fffff,%edi
call   1030 <delay@plt>
movl   $0xffffff,0x4804c190
movl   $0xa00000,0x4804c194
mov    $0x3fffff,%edi
call   1030 <delay@plt>
movl   $0xffffff,0x4804c190
movl   $0xc00000,0x4804c194
mov    $0x3fffff,%edi
call   1030 <delay@plt>
movl   $0xffffff,0x4804c190
movl   $0xe00000,0x4804c194
mov    $0x3fffff,%edi
call   1030 <delay@plt>
movl   $0xffffff,0x4804c190
movl   $0x1000000,0x4804c194
mov    $0x3fffff,%edi
call   1030 <delay@plt>
movl   $0xffffff,0x4804c190
movl   $0x1200000,0x4804c194
mov    $0x3fffff,%edi
call   1030 <delay@plt>
movl   $0xffffff,0x4804c190
movl   $0x1400000,0x4804c194
mov    $0x3fffff,%edi
call   1030 <delay@plt>
movl   $0xffffff,0x4804c190
movl   $0x1600000,0x4804c194
mov    $0x3fffff,%edi
call   1030 <delay@plt>
movl   $0xffffff,0x4804c190
movl   $0x1800000,0x4804c194
mov    $0x3fffff,%edi
call   1030 <delay@plt>
movl   $0xffffff,0x4804c190
movl   $0x1a00000,0x4804c194
mov    $0x3fffff,%edi
call   1030 <delay@plt>
movl   $0xffffff,0x4804c190
movl   $0x1c00000,0x4804c194
mov    $0x3fffff,%edi
call   1030 <delay@plt>
movl   $0xffffff,0x4804c190
movl   $0x1e00000,0x4804c194
mov    $0x3fffff,%edi
pop    %rax
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = call i32 (...) @enableGPIO1Clocks()
%3 = load volatile i32, i32* inttoptr (i64 1208271156 to i32*)
%4 = and i32 %3, -31457281
store volatile i32 %4, i32* inttoptr (i64 1208271156 to i32*)
store i32 0, i32* %1
br label %5
5: ; preds = %12, %0
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 16
br i1 %7, label %8, label %15
8: ; preds = %5
store volatile i32 16777215, i32* inttoptr (i64 1208271248 to i32*)
%9 = load i32, i32* %1
%10 = shl i32 %9, 21
store volatile i32 %10, i32* inttoptr (i64 1208271252 to i32*)
%11 = call i32 @delay(i32 4194303)
br label %12
12: ; preds = %8
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
br label %5
15: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @enableGPIO1Clocks()
%2 = load volatile i32, i32* inttoptr (i64 1208271156 to i32*)
%3 = and i32 %2, -31457281
store volatile i32 %3, i32* inttoptr (i64 1208271156 to i32*)
store volatile i32 16777215, i32* inttoptr (i64 1208271248 to i32*)
store volatile i32 0, i32* inttoptr (i64 1208271252 to i32*)
%4 = tail call i32 @delay(i32 4194303)
store volatile i32 16777215, i32* inttoptr (i64 1208271248 to i32*)
store volatile i32 2097152, i32* inttoptr (i64 1208271252 to i32*)
%5 = tail call i32 @delay(i32 4194303)
store volatile i32 16777215, i32* inttoptr (i64 1208271248 to i32*)
store volatile i32 4194304, i32* inttoptr (i64 1208271252 to i32*)
%6 = tail call i32 @delay(i32 4194303)
store volatile i32 16777215, i32* inttoptr (i64 1208271248 to i32*)
store volatile i32 6291456, i32* inttoptr (i64 1208271252 to i32*)
%7 = tail call i32 @delay(i32 4194303)
store volatile i32 16777215, i32* inttoptr (i64 1208271248 to i32*)
store volatile i32 8388608, i32* inttoptr (i64 1208271252 to i32*)
%8 = tail call i32 @delay(i32 4194303)
store volatile i32 16777215, i32* inttoptr (i64 1208271248 to i32*)
store volatile i32 10485760, i32* inttoptr (i64 1208271252 to i32*)
%9 = tail call i32 @delay(i32 4194303)
store volatile i32 16777215, i32* inttoptr (i64 1208271248 to i32*)
store volatile i32 12582912, i32* inttoptr (i64 1208271252 to i32*)
%10 = tail call i32 @delay(i32 4194303)
store volatile i32 16777215, i32* inttoptr (i64 1208271248 to i32*)
store volatile i32 14680064, i32* inttoptr (i64 1208271252 to i32*)
%11 = tail call i32 @delay(i32 4194303)
store volatile i32 16777215, i32* inttoptr (i64 1208271248 to i32*)
store volatile i32 16777216, i32* inttoptr (i64 1208271252 to i32*)
%12 = tail call i32 @delay(i32 4194303)
store volatile i32 16777215, i32* inttoptr (i64 1208271248 to i32*)
store volatile i32 18874368, i32* inttoptr (i64 1208271252 to i32*)
%13 = tail call i32 @delay(i32 4194303)
store volatile i32 16777215, i32* inttoptr (i64 1208271248 to i32*)
store volatile i32 20971520, i32* inttoptr (i64 1208271252 to i32*)
%14 = tail call i32 @delay(i32 4194303)
store volatile i32 16777215, i32* inttoptr (i64 1208271248 to i32*)
store volatile i32 23068672, i32* inttoptr (i64 1208271252 to i32*)
%15 = tail call i32 @delay(i32 4194303)
store volatile i32 16777215, i32* inttoptr (i64 1208271248 to i32*)
store volatile i32 25165824, i32* inttoptr (i64 1208271252 to i32*)
%16 = tail call i32 @delay(i32 4194303)
store volatile i32 16777215, i32* inttoptr (i64 1208271248 to i32*)
store volatile i32 27262976, i32* inttoptr (i64 1208271252 to i32*)
%17 = tail call i32 @delay(i32 4194303)
store volatile i32 16777215, i32* inttoptr (i64 1208271248 to i32*)
store volatile i32 29360128, i32* inttoptr (i64 1208271252 to i32*)
%18 = tail call i32 @delay(i32 4194303)
store volatile i32 16777215, i32* inttoptr (i64 1208271248 to i32*)
store volatile i32 31457280, i32* inttoptr (i64 1208271252 to i32*)
%19 = tail call i32 @delay(i32 4194303)
ret void
}