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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%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    $0x7f008830,%eax
mov    (%rax),%rcx
and    $0xffffffffffffff00,%rcx
mov    $0x7f008830,%eax
mov    %rcx,(%rax)
mov    $0x7f008830,%eax
mov    (%rax),%rcx
or     $0x0,%rcx
mov    $0x7f008830,%eax
mov    %rcx,(%rax)
mov    $0x7f008834,%eax
mov    (%rax),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     11e6 <main+0xe6>
mov    $0x7f008808,%eax
mov    (%rax),%rcx
or     $0x10,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
jmp    11fa <main+0xfa>
mov    $0x7f008808,%eax
mov    (%rax),%rcx
and    $0xffffffffffffffef,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
mov    $0x7f008834,%eax
mov    (%rax),%rax
and    $0x2,%rax
cmp    $0x0,%rax
je     1229 <main+0x129>
mov    $0x7f008808,%eax
mov    (%rax),%rcx
or     $0x20,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
jmp    123d <main+0x13d>
mov    $0x7f008808,%eax
mov    (%rax),%rcx
and    $0xffffffffffffffdf,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
mov    $0x7f008834,%eax
mov    (%rax),%rax
and    $0x4,%rax
cmp    $0x0,%rax
je     126c <main+0x16c>
mov    $0x7f008808,%eax
mov    (%rax),%rcx
or     $0x40,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
jmp    1280 <main+0x180>
mov    $0x7f008808,%eax
mov    (%rax),%rcx
and    $0xffffffffffffffbf,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
mov    $0x7f008834,%eax
mov    (%rax),%rax
and    $0x8,%rax
cmp    $0x0,%rax
je     12b2 <main+0x1b2>
mov    $0x7f008808,%eax
mov    (%rax),%rcx
or     $0x80,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
jmp    12c9 <main+0x1c9>
mov    $0x7f008808,%eax
mov    (%rax),%rcx
and    $0xffffffffffffff7f,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
jmp    11b7 <main+0xb7>

x86 assembly (clang, -O2):
<main>:
andq   $0xffff,0x7f008800
orq    $0x11110000,0x7f008800
orq    $0x10,0x7f008808
7f 10
orq    $0x20,0x7f008808
7f 20
orq    $0x40,0x7f008808
7f 40
orq    $0x80,0x7f008808
andq   $0xffffffffffffff00,0x7f008830
mov    0x7f008830,%rax
7f
mov    %rax,0x7f008830
7f
mov    $0xffffffffffffff7f,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x7f008834,%rcx
7f
mov    0x7f008808,%rdx
7f
and    $0xffffffffffffffef,%rdx
shl    $0x4,%ecx
and    $0x10,%ecx
or     %rdx,%rcx
mov    %rcx,0x7f008808
7f
mov    0x7f008834,%rcx
7f
mov    0x7f008808,%rdx
7f
and    $0xffffffffffffffdf,%rdx
shl    $0x4,%ecx
and    $0x20,%ecx
or     %rdx,%rcx
mov    %rcx,0x7f008808
7f
mov    0x7f008834,%rcx
7f
mov    0x7f008808,%rdx
7f
and    $0xffffffffffffffbf,%rdx
shl    $0x4,%ecx
and    $0x40,%ecx
or     %rdx,%rcx
mov    %rcx,0x7f008808
7f
mov    0x7f008834,%rcx
7f
mov    0x7f008808,%rdx
7f
and    %rax,%rdx
and    $0x8,%ecx
shl    $0x4,%rcx
or     %rdx,%rcx
mov    %rcx,0x7f008808
7f
jmp    1170 <main+0x70>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load volatile i64, i64* inttoptr (i64 2130741248 to i64*)
%3 = and i64 %2, 65535
store volatile i64 %3, i64* inttoptr (i64 2130741248 to i64*)
%4 = load volatile i64, i64* inttoptr (i64 2130741248 to i64*)
%5 = or i64 %4, 286326784
store volatile i64 %5, i64* inttoptr (i64 2130741248 to i64*)
%6 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%7 = or i64 %6, 16
store volatile i64 %7, i64* inttoptr (i64 2130741256 to i64*)
%8 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%9 = or i64 %8, 32
store volatile i64 %9, i64* inttoptr (i64 2130741256 to i64*)
%10 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%11 = or i64 %10, 64
store volatile i64 %11, i64* inttoptr (i64 2130741256 to i64*)
%12 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%13 = or i64 %12, 128
store volatile i64 %13, i64* inttoptr (i64 2130741256 to i64*)
%14 = load volatile i64, i64* inttoptr (i64 2130741296 to i64*)
%15 = and i64 %14, -256
store volatile i64 %15, i64* inttoptr (i64 2130741296 to i64*)
%16 = load volatile i64, i64* inttoptr (i64 2130741296 to i64*)
%17 = or i64 %16, 0
store volatile i64 %17, i64* inttoptr (i64 2130741296 to i64*)
br label %18
18: ; preds = %0, %58
%19 = load volatile i64, i64* inttoptr (i64 2130741300 to i64*)
%20 = and i64 %19, 1
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %18
%23 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%24 = or i64 %23, 16
store volatile i64 %24, i64* inttoptr (i64 2130741256 to i64*)
br label %28
25: ; preds = %18
%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 %28
28: ; preds = %25, %22
%29 = load volatile i64, i64* inttoptr (i64 2130741300 to i64*)
%30 = and i64 %29, 2
%31 = icmp ne i64 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %28
%33 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%34 = or i64 %33, 32
store volatile i64 %34, i64* inttoptr (i64 2130741256 to i64*)
br label %38
35: ; preds = %28
%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 %38
38: ; preds = %35, %32
%39 = load volatile i64, i64* inttoptr (i64 2130741300 to i64*)
%40 = and i64 %39, 4
%41 = icmp ne i64 %40, 0
br i1 %41, label %42, label %45
42: ; preds = %38
%43 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%44 = or i64 %43, 64
store volatile i64 %44, i64* inttoptr (i64 2130741256 to i64*)
br label %48
45: ; preds = %38
%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 %48
48: ; preds = %45, %42
%49 = load volatile i64, i64* inttoptr (i64 2130741300 to i64*)
%50 = and i64 %49, 8
%51 = icmp ne i64 %50, 0
br i1 %51, label %52, label %55
52: ; preds = %48
%53 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%54 = or i64 %53, 128
store volatile i64 %54, i64* inttoptr (i64 2130741256 to i64*)
br label %58
55: ; preds = %48
%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 %58
58: ; preds = %55, %52
br label %18
}

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*)
%13 = load volatile i64, i64* inttoptr (i64 2130741296 to i64*)
%14 = and i64 %13, -256
store volatile i64 %14, i64* inttoptr (i64 2130741296 to i64*)
%15 = load volatile i64, i64* inttoptr (i64 2130741296 to i64*)
store volatile i64 %15, i64* inttoptr (i64 2130741296 to i64*)
br label %16
16: ; preds = %0, %16
%17 = load volatile i64, i64* inttoptr (i64 2130741300 to i64*)
%18 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%19 = and i64 %18, -17
%20 = shl i64 %17, 4
%21 = and i64 %20, 16
%22 = or i64 %19, %21
store volatile i64 %22, i64* inttoptr (i64 2130741256 to i64*)
%23 = load volatile i64, i64* inttoptr (i64 2130741300 to i64*)
%24 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%25 = and i64 %24, -33
%26 = shl i64 %23, 4
%27 = and i64 %26, 32
%28 = or i64 %25, %27
store volatile i64 %28, i64* inttoptr (i64 2130741256 to i64*)
%29 = load volatile i64, i64* inttoptr (i64 2130741300 to i64*)
%30 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%31 = and i64 %30, -65
%32 = shl i64 %29, 4
%33 = and i64 %32, 64
%34 = or i64 %31, %33
store volatile i64 %34, i64* inttoptr (i64 2130741256 to i64*)
%35 = load volatile i64, i64* inttoptr (i64 2130741300 to i64*)
%36 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%37 = and i64 %36, -129
%38 = shl i64 %35, 4
%39 = and i64 %38, 128
%40 = or i64 %37, %39
store volatile i64 %40, i64* inttoptr (i64 2130741256 to i64*)
br label %16
}