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

/* Variables and functions */
int /*<<< orphan*/ delay(int);
int _main(void) {
  (*((volatile uint32_t *)(((((uint32_t)0x40000000) + 0x00020000) +
                            0x00001000) +
                           0x14))) |= 1 << 17;
  (*((volatile uint32_t *)(((((uint32_t)0x40000000) + 0x08000000) +
                            0x00000000) +
                           0x00))) |= 1 << 14;
  (*((volatile uint32_t *)(((((uint32_t)0x40000000) + 0x08000000) +
                            0x00000000) +
                           0x04))) &= ~(1 << 7);
  for (;;) {
    (*((volatile uint32_t *)(((((uint32_t)0x40000000) + 0x08000000) +
                              0x00000000) +
                             0x18))) = 1 << 7;
    delay(1000000);
    (*((volatile uint32_t *)(((((uint32_t)0x40000000) + 0x08000000) +
                              0x00000000) +
                             0x18))) = 1 << (7 + 16);
    delay(1000000);
  }
  return 0;
}


x86 assembly (clang, -O0):
<_main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40021014,%eax
mov    (%rax),%ecx
or     $0x20000,%ecx
mov    $0x40021014,%eax
mov    %ecx,(%rax)
mov    $0x48000000,%eax
mov    (%rax),%ecx
or     $0x4000,%ecx
mov    $0x48000000,%eax
mov    %ecx,(%rax)
mov    $0x48000004,%eax
mov    (%rax),%ecx
and    $0xffffff7f,%ecx
mov    $0x48000004,%eax
mov    %ecx,(%rax)
mov    $0x48000018,%eax
movl   $0x80,(%rax)
mov    $0xf4240,%edi
call   1030 <delay@plt>
mov    $0x48000018,%eax
movl   $0x800000,(%rax)
mov    $0xf4240,%edi
call   1030 <delay@plt>
jmp    1150 <_main+0x40>

x86 assembly (clang, -O2):
<_main>:
push   %rax
orl    $0x20000,0x40021014
orl    $0x4000,0x48000000
andl   $0xffffff7f,0x48000004
7f ff ff ff
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movl   $0x80,0x48000018
mov    $0xf4240,%edi
call   1030 <delay@plt>
movl   $0x800000,0x48000018
mov    $0xf4240,%edi
call   1030 <delay@plt>
jmp    1140 <_main+0x30>

LLVM IR (-O0):
define i32 @_main() {
%1 = load volatile i32, i32* inttoptr (i64 1073877012 to i32*)
%2 = or i32 %1, 131072
store volatile i32 %2, i32* inttoptr (i64 1073877012 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 1207959552 to i32*)
%4 = or i32 %3, 16384
store volatile i32 %4, i32* inttoptr (i64 1207959552 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 1207959556 to i32*)
%6 = and i32 %5, -129
store volatile i32 %6, i32* inttoptr (i64 1207959556 to i32*)
br label %7
7: ; preds = %7, %0
store volatile i32 128, i32* inttoptr (i64 1207959576 to i32*)
%8 = call i32 @delay(i32 1000000)
store volatile i32 8388608, i32* inttoptr (i64 1207959576 to i32*)
%9 = call i32 @delay(i32 1000000)
br label %7
}

LLVM IR (-O2):
define i32 @_main() {
%1 = load volatile i32, i32* inttoptr (i64 1073877012 to i32*)
%2 = or i32 %1, 131072
store volatile i32 %2, i32* inttoptr (i64 1073877012 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 1207959552 to i32*)
%4 = or i32 %3, 16384
store volatile i32 %4, i32* inttoptr (i64 1207959552 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 1207959556 to i32*)
%6 = and i32 %5, -129
store volatile i32 %6, i32* inttoptr (i64 1207959556 to i32*)
br label %7
7: ; preds = %7, %0
store volatile i32 128, i32* inttoptr (i64 1207959576 to i32*)
%8 = tail call i32 @delay(i32 1000000)
store volatile i32 8388608, i32* inttoptr (i64 1207959576 to i32*)
%9 = tail call i32 @delay(i32 1000000)
br label %7
}