#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 main() {
  int number = 0;
  (*(volatile unsigned long *)0x7F008800) &=
      ~((0xf << (4 * 4)) + (0xf << (5 * 4)) + (0xf << (6 * 4)) +
        (0xf << (7 * 4)));
  (*(volatile unsigned long *)0x7F008800) |=
      ((1 << (4 * 4)) + (1 << (5 * 4)) + (1 << (6 * 4)) + (1 << (7 * 4)));
  ((*(volatile unsigned long *)0x7F008808) |= (1 << 4));
  ((*(volatile unsigned long *)0x7F008808) |= (1 << 5));
  ((*(volatile unsigned long *)0x7F008808) |= (1 << 6));
  ((*(volatile unsigned long *)0x7F008808) |= (1 << 7));
  while (1) {
    number++;
    if (number > 0xf)
      number = 0;
    if (number & (1 << 0))
      ((*(volatile unsigned long *)0x7F008808) &= ~(1 << 4));
    else
      ((*(volatile unsigned long *)0x7F008808) |= (1 << 4));
    if (number & (1 << 1))
      ((*(volatile unsigned long *)0x7F008808) &= ~(1 << 5));
    else
      ((*(volatile unsigned long *)0x7F008808) |= (1 << 5));
    if (number & (1 << 2))
      ((*(volatile unsigned long *)0x7F008808) &= ~(1 << 6));
    else
      ((*(volatile unsigned long *)0x7F008808) |= (1 << 6));
    if (number & (1 << 3))
      ((*(volatile unsigned long *)0x7F008808) &= ~(1 << 7));
    else
      ((*(volatile unsigned long *)0x7F008808) |= (1 << 7));
    delay();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x7f008800,%eax
mov    (%rax),%rcx
and    $0xffff,%rcx
mov    $0x7f008800,%eax
mov    %rcx,(%rax)
mov    $0x7f008800,%eax
mov    (%rax),%rcx
or     $0x11110000,%rcx
mov    $0x7f008800,%eax
mov    %rcx,(%rax)
mov    $0x7f008808,%eax
mov    (%rax),%rcx
or     $0x10,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
mov    $0x7f008808,%eax
mov    (%rax),%rcx
or     $0x20,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
mov    $0x7f008808,%eax
mov    (%rax),%rcx
or     $0x40,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
mov    $0x7f008808,%eax
mov    (%rax),%rcx
or     $0x80,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xf,-0x8(%rbp)
jle    11c1 <main+0xb1>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     11e9 <main+0xd9>
mov    $0x7f008808,%eax
mov    (%rax),%rcx
and    $0xffffffffffffffef,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
jmp    11fd <main+0xed>
mov    $0x7f008808,%eax
mov    (%rax),%rcx
or     $0x10,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1225 <main+0x115>
mov    $0x7f008808,%eax
mov    (%rax),%rcx
and    $0xffffffffffffffdf,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
jmp    1239 <main+0x129>
mov    $0x7f008808,%eax
mov    (%rax),%rcx
or     $0x20,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     1261 <main+0x151>
mov    $0x7f008808,%eax
mov    (%rax),%rcx
and    $0xffffffffffffffbf,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
jmp    1275 <main+0x165>
mov    $0x7f008808,%eax
mov    (%rax),%rcx
or     $0x40,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     12a0 <main+0x190>
mov    $0x7f008808,%eax
mov    (%rax),%rcx
and    $0xffffffffffffff7f,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
jmp    12b7 <main+0x1a7>
mov    $0x7f008808,%eax
mov    (%rax),%rcx
or     $0x80,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
mov    $0x0,%al
call   1030 <delay@plt>
jmp    11a7 <main+0x97>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
andq   $0xffff,0x7f008800
orq    $0x11110000,0x7f008800
orq    $0x10,0x7f008808
7f 10
orq    $0x20,0x7f008808
7f 20
orq    $0x40,0x7f008808
7f 40
orq    $0x80,0x7f008808
xor    %r14d,%r14d
mov    $0xffffffffffffff7f,%rbx
xor    %eax,%eax
nop
lea    0x1(%rax),%ebp
cmp    $0xf,%eax
cmovge %r14d,%ebp
mov    0x7f008808,%rcx
7f
and    $0xffffffffffffffef,%rcx
mov    %ebp,%eax
shl    $0x4,%eax
not    %eax
mov    %eax,%edx
and    $0x10,%edx
or     %rcx,%rdx
mov    %rdx,0x7f008808
7f
mov    0x7f008808,%rcx
7f
and    $0xffffffffffffffdf,%rcx
mov    %eax,%edx
and    $0x20,%edx
or     %rcx,%rdx
mov    %rdx,0x7f008808
7f
mov    0x7f008808,%rcx
7f
and    $0xffffffffffffffbf,%rcx
mov    %eax,%edx
and    $0x40,%edx
or     %rcx,%rdx
mov    %rdx,0x7f008808
7f
mov    0x7f008808,%rcx
7f
and    %rbx,%rcx
and    $0x80,%eax
or     %rcx,%rax
mov    %rax,0x7f008808
7f
xor    %eax,%eax
call   1030 <delay@plt>
mov    %ebp,%eax
jmp    1160 <main+0x50>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load volatile i64, i64* inttoptr (i64 2130741248 to i64*)
%4 = and i64 %3, 65535
store volatile i64 %4, i64* inttoptr (i64 2130741248 to i64*)
%5 = load volatile i64, i64* inttoptr (i64 2130741248 to i64*)
%6 = or i64 %5, 286326784
store volatile i64 %6, i64* inttoptr (i64 2130741248 to i64*)
%7 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%8 = or i64 %7, 16
store volatile i64 %8, i64* inttoptr (i64 2130741256 to i64*)
%9 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%10 = or i64 %9, 32
store volatile i64 %10, i64* inttoptr (i64 2130741256 to i64*)
%11 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%12 = or i64 %11, 64
store volatile i64 %12, i64* inttoptr (i64 2130741256 to i64*)
%13 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%14 = or i64 %13, 128
store volatile i64 %14, i64* inttoptr (i64 2130741256 to i64*)
br label %15
15: ; preds = %0, %61
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
%18 = load i32, i32* %2
%19 = icmp sgt i32 %18, 15
br i1 %19, label %20, label %21
20: ; preds = %15
store i32 0, i32* %2
br label %21
21: ; preds = %20, %15
%22 = load i32, i32* %2
%23 = and i32 %22, 1
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %21
%26 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%27 = and i64 %26, -17
store volatile i64 %27, i64* inttoptr (i64 2130741256 to i64*)
br label %31
28: ; preds = %21
%29 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%30 = or i64 %29, 16
store volatile i64 %30, i64* inttoptr (i64 2130741256 to i64*)
br label %31
31: ; preds = %28, %25
%32 = load i32, i32* %2
%33 = and i32 %32, 2
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %38
35: ; preds = %31
%36 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%37 = and i64 %36, -33
store volatile i64 %37, i64* inttoptr (i64 2130741256 to i64*)
br label %41
38: ; preds = %31
%39 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%40 = or i64 %39, 32
store volatile i64 %40, i64* inttoptr (i64 2130741256 to i64*)
br label %41
41: ; preds = %38, %35
%42 = load i32, i32* %2
%43 = and i32 %42, 4
%44 = icmp ne i32 %43, 0
br i1 %44, label %45, label %48
45: ; preds = %41
%46 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%47 = and i64 %46, -65
store volatile i64 %47, i64* inttoptr (i64 2130741256 to i64*)
br label %51
48: ; preds = %41
%49 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%50 = or i64 %49, 64
store volatile i64 %50, i64* inttoptr (i64 2130741256 to i64*)
br label %51
51: ; preds = %48, %45
%52 = load i32, i32* %2
%53 = and i32 %52, 8
%54 = icmp ne i32 %53, 0
br i1 %54, label %55, label %58
55: ; preds = %51
%56 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%57 = and i64 %56, -129
store volatile i64 %57, i64* inttoptr (i64 2130741256 to i64*)
br label %61
58: ; preds = %51
%59 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%60 = or i64 %59, 128
store volatile i64 %60, i64* inttoptr (i64 2130741256 to i64*)
br label %61
61: ; preds = %58, %55
%62 = call i32 (...) @delay()
br label %15
}

LLVM IR (-O2):
define i32 @main() {
%1 = load volatile i64, i64* inttoptr (i64 2130741248 to i64*)
%2 = and i64 %1, 65535
store volatile i64 %2, i64* inttoptr (i64 2130741248 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 2130741248 to i64*)
%4 = or i64 %3, 286326784
store volatile i64 %4, i64* inttoptr (i64 2130741248 to i64*)
%5 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%6 = or i64 %5, 16
store volatile i64 %6, i64* inttoptr (i64 2130741256 to i64*)
%7 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%8 = or i64 %7, 32
store volatile i64 %8, i64* inttoptr (i64 2130741256 to i64*)
%9 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%10 = or i64 %9, 64
store volatile i64 %10, i64* inttoptr (i64 2130741256 to i64*)
%11 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%12 = or i64 %11, 128
store volatile i64 %12, i64* inttoptr (i64 2130741256 to i64*)
br label %13
13: ; preds = %13, %0
%14 = phi i32 [ 0, %0 ], [ %17, %13 ]
%15 = add nsw i32 %14, 1
%16 = icmp sgt i32 %14, 14
%17 = select i1 %16, i32 0, i32 %15
%18 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%19 = and i64 %18, -17
%20 = shl i32 %17, 4
%21 = and i32 %20, 16
%22 = xor i32 %21, 16
%23 = zext i32 %22 to i64
%24 = or i64 %19, %23
store volatile i64 %24, i64* inttoptr (i64 2130741256 to i64*)
%25 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%26 = and i64 %25, -33
%27 = shl i32 %17, 4
%28 = and i32 %27, 32
%29 = xor i32 %28, 32
%30 = zext i32 %29 to i64
%31 = or i64 %26, %30
store volatile i64 %31, i64* inttoptr (i64 2130741256 to i64*)
%32 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%33 = and i64 %32, -65
%34 = shl i32 %17, 4
%35 = and i32 %34, 64
%36 = xor i32 %35, 64
%37 = zext i32 %36 to i64
%38 = or i64 %33, %37
store volatile i64 %38, i64* inttoptr (i64 2130741256 to i64*)
%39 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%40 = and i64 %39, -129
%41 = shl i32 %17, 4
%42 = and i32 %41, 128
%43 = xor i32 %42, 128
%44 = zext i32 %43 to i64
%45 = or i64 %40, %44
store volatile i64 %45, i64* inttoptr (i64 2130741256 to i64*)
%46 = tail call i32 (...) @delay()
br label %13
}