#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 uint8_t;

/* Variables and functions */
int /*<<< orphan*/ delay();
int /*<<< orphan*/ pll_init(int, int);
int main(void) {
  (*(volatile unsigned long *)(0xE01FC000 + 0x000)) = 2;
  uint8_t pll_cfg = 0x23;
  pll_init(pll_cfg, 0x00);
  (*(volatile unsigned long *)(0xE0028000 + 0x18)) |= (1 << 16);
  while (1) {
    (*(volatile unsigned long *)(0xE0028000 + 0x14)) |= (1 << 16);
    delay();
    (*(volatile unsigned long *)(0xE0028000 + 0x1C)) |= (1 << 16);
    delay();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xe01fc000,%eax
movq   $0x2,(%rax)
movl   $0x23,-0x8(%rbp)
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1040 <pll_init@plt>
mov    $0xe0028018,%eax
mov    (%rax),%rcx
or     $0x10000,%rcx
mov    $0xe0028018,%eax
mov    %rcx,(%rax)
mov    $0xe0028014,%eax
mov    (%rax),%rcx
or     $0x10000,%rcx
mov    %rcx,-0x18(%rbp)
mov    $0xe0028014,%eax
mov    %rcx,(%rax)
mov    $0x0,%al
call   1030 <delay@plt>
mov    $0xe002801c,%eax
mov    (%rax),%rcx
or     $0x10000,%rcx
mov    %rcx,-0x10(%rbp)
mov    $0xe002801c,%eax
mov    %rcx,(%rax)
mov    $0x0,%al
call   1030 <delay@plt>
jmp    1163 <main+0x43>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xe0028014,%ebx
movq   $0x2,0x1d3fec(%rbx)
mov    $0x23,%edi
xor    %esi,%esi
call   1040 <pll_init@plt>
orq    $0x10000,0x4(%rbx)
cs nopw 0x0(%rax,%rax,1)
nop
orq    $0x10000,(%rbx)
xor    %eax,%eax
call   1030 <delay@plt>
orq    $0x10000,0x8(%rbx)
xor    %eax,%eax
call   1030 <delay@plt>
jmp    1150 <main+0x30>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store volatile i64 2, i64* inttoptr (i64 3760177152 to i64*)
store i32 35, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @pll_init(i32 %3, i32 0)
%5 = load volatile i64, i64* inttoptr (i64 3758260248 to i64*)
%6 = or i64 %5, 65536
store volatile i64 %6, i64* inttoptr (i64 3758260248 to i64*)
br label %7
7: ; preds = %0, %7
%8 = load volatile i64, i64* inttoptr (i64 3758260244 to i64*)
%9 = or i64 %8, 65536
store volatile i64 %9, i64* inttoptr (i64 3758260244 to i64*)
%10 = call i32 (...) @delay()
%11 = load volatile i64, i64* inttoptr (i64 3758260252 to i64*)
%12 = or i64 %11, 65536
store volatile i64 %12, i64* inttoptr (i64 3758260252 to i64*)
%13 = call i32 (...) @delay()
br label %7
}

LLVM IR (-O2):
define i32 @main() {
store volatile i64 2, i64* inttoptr (i64 3760177152 to i64*)
%1 = tail call i32 @pll_init(i32 35, i32 0)
%2 = load volatile i64, i64* inttoptr (i64 3758260248 to i64*)
%3 = or i64 %2, 65536
store volatile i64 %3, i64* inttoptr (i64 3758260248 to i64*)
br label %4
4: ; preds = %4, %0
%5 = load volatile i64, i64* inttoptr (i64 3758260244 to i64*)
%6 = or i64 %5, 65536
store volatile i64 %6, i64* inttoptr (i64 3758260244 to i64*)
%7 = tail call i32 (...) @delay()
%8 = load volatile i64, i64* inttoptr (i64 3758260252 to i64*)
%9 = or i64 %8, 65536
store volatile i64 %9, i64* inttoptr (i64 3758260252 to i64*)
%10 = tail call i32 (...) @delay()
br label %4
}