int main() {
  unsigned long dwDat;
  (*(volatile unsigned long *)0x56000050) &=
      ~((3 << (4 * 2)) | (3 << (5 * 2)) | (3 << (6 * 2)));
  (*(volatile unsigned long *)0x56000050) |=
      (1 << (4 * 2)) | (1 << (5 * 2)) | (1 << (6 * 2));
  (*(volatile unsigned long *)0x56000050) &= ~((3 << (0 * 2)) | (3 << (2 * 2)));
  (*(volatile unsigned long *)0x56000050) |= (0 << (0 * 2)) | (0 << (2 * 2));
  (*(volatile unsigned long *)0x56000060) &= ~(3 << (3 * 2));
  (*(volatile unsigned long *)0x56000060) |= (0 << (3 * 2));
  while (1) {
    dwDat = (*(volatile unsigned long *)0x56000054);
    if (dwDat & (1 << 0))
      (*(volatile unsigned long *)0x56000054) |= (1 << 4);
    else
      (*(volatile unsigned long *)0x56000054) &= ~(1 << 4);
    if (dwDat & (1 << 2))
      (*(volatile unsigned long *)0x56000054) |= (1 << 5);
    else
      (*(volatile unsigned long *)0x56000054) &= ~(1 << 5);
    dwDat = (*(volatile unsigned long *)0x56000064);
    if (dwDat & (1 << 3))
      (*(volatile unsigned long *)0x56000054) |= (1 << 6);
    else
      (*(volatile unsigned long *)0x56000054) &= ~(1 << 6);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x56000050,%eax
mov    (%rax),%rcx
and    $0xffffffffffffc0ff,%rcx
mov    $0x56000050,%eax
mov    %rcx,(%rax)
mov    $0x56000050,%eax
mov    (%rax),%rcx
or     $0x1500,%rcx
mov    $0x56000050,%eax
mov    %rcx,(%rax)
mov    $0x56000050,%eax
mov    (%rax),%rcx
and    $0xffffffffffffffcc,%rcx
mov    $0x56000050,%eax
mov    %rcx,(%rax)
mov    $0x56000050,%eax
mov    (%rax),%rcx
or     $0x0,%rcx
mov    $0x56000050,%eax
mov    %rcx,(%rax)
mov    $0x56000060,%eax
mov    (%rax),%rcx
and    $0xffffffffffffff3f,%rcx
mov    $0x56000060,%eax
mov    %rcx,(%rax)
mov    $0x56000060,%eax
mov    (%rax),%rcx
or     $0x0,%rcx
mov    $0x56000060,%eax
mov    %rcx,(%rax)
mov    $0x56000054,%eax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     11c3 <main+0xc3>
mov    $0x56000054,%eax
mov    (%rax),%rcx
or     $0x10,%rcx
mov    $0x56000054,%eax
mov    %rcx,(%rax)
jmp    11d7 <main+0xd7>
mov    $0x56000054,%eax
mov    (%rax),%rcx
and    $0xffffffffffffffef,%rcx
mov    $0x56000054,%eax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
and    $0x4,%rax
cmp    $0x0,%rax
je     1202 <main+0x102>
mov    $0x56000054,%eax
mov    (%rax),%rcx
or     $0x20,%rcx
mov    $0x56000054,%eax
mov    %rcx,(%rax)
jmp    1216 <main+0x116>
mov    $0x56000054,%eax
mov    (%rax),%rcx
and    $0xffffffffffffffdf,%rcx
mov    $0x56000054,%eax
mov    %rcx,(%rax)
mov    $0x56000064,%eax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x8,%rax
cmp    $0x0,%rax
je     124d <main+0x14d>
mov    $0x56000054,%eax
mov    (%rax),%rcx
or     $0x40,%rcx
mov    $0x56000054,%eax
mov    %rcx,(%rax)
jmp    1261 <main+0x161>
mov    $0x56000054,%eax
mov    (%rax),%rcx
and    $0xffffffffffffffbf,%rcx
mov    $0x56000054,%eax
mov    %rcx,(%rax)
jmp    118c <main+0x8c>

x86 assembly (clang, -O2):
<main>:
andq   $0xffffffffffffc0ff,0x56000050
56 ff c0 ff ff
orq    $0x1500,0x56000050
andq   $0xffffffffffffffcc,0x56000050
56 cc
mov    0x56000050,%rax
56
mov    %rax,0x56000050
56
andq   $0xffffffffffffff3f,0x56000060
56 3f ff ff ff
mov    0x56000060,%rax
56
mov    %rax,0x56000060
56
nopl   (%rax)
mov    0x56000054,%rax
56
mov    0x56000054,%rcx
56
and    $0xffffffffffffffef,%rcx
mov    %eax,%edx
shl    $0x4,%edx
and    $0x10,%edx
or     %rcx,%rdx
mov    %rdx,0x56000054
56
mov    0x56000054,%rcx
56
and    $0xffffffffffffffdf,%rcx
and    $0x4,%eax
lea    (%rcx,%rax,8),%rax
mov    %rax,0x56000054
56
mov    0x56000064,%rax
56
mov    0x56000054,%rcx
56
and    $0xffffffffffffffbf,%rcx
and    $0x8,%eax
lea    (%rcx,%rax,8),%rax
mov    %rax,0x56000054
56
jmp    1150 <main+0x50>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = load volatile i64, i64* inttoptr (i64 1442840656 to i64*)
%4 = and i64 %3, -16129
store volatile i64 %4, i64* inttoptr (i64 1442840656 to i64*)
%5 = load volatile i64, i64* inttoptr (i64 1442840656 to i64*)
%6 = or i64 %5, 5376
store volatile i64 %6, i64* inttoptr (i64 1442840656 to i64*)
%7 = load volatile i64, i64* inttoptr (i64 1442840656 to i64*)
%8 = and i64 %7, -52
store volatile i64 %8, i64* inttoptr (i64 1442840656 to i64*)
%9 = load volatile i64, i64* inttoptr (i64 1442840656 to i64*)
%10 = or i64 %9, 0
store volatile i64 %10, i64* inttoptr (i64 1442840656 to i64*)
%11 = load volatile i64, i64* inttoptr (i64 1442840672 to i64*)
%12 = and i64 %11, -193
store volatile i64 %12, i64* inttoptr (i64 1442840672 to i64*)
%13 = load volatile i64, i64* inttoptr (i64 1442840672 to i64*)
%14 = or i64 %13, 0
store volatile i64 %14, i64* inttoptr (i64 1442840672 to i64*)
br label %15
15: ; preds = %0, %47
%16 = load volatile i64, i64* inttoptr (i64 1442840660 to i64*)
store i64 %16, i64* %2
%17 = load i64, i64* %2
%18 = and i64 %17, 1
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %15
%21 = load volatile i64, i64* inttoptr (i64 1442840660 to i64*)
%22 = or i64 %21, 16
store volatile i64 %22, i64* inttoptr (i64 1442840660 to i64*)
br label %26
23: ; preds = %15
%24 = load volatile i64, i64* inttoptr (i64 1442840660 to i64*)
%25 = and i64 %24, -17
store volatile i64 %25, i64* inttoptr (i64 1442840660 to i64*)
br label %26
26: ; preds = %23, %20
%27 = load i64, i64* %2
%28 = and i64 %27, 4
%29 = icmp ne i64 %28, 0
br i1 %29, label %30, label %33
30: ; preds = %26
%31 = load volatile i64, i64* inttoptr (i64 1442840660 to i64*)
%32 = or i64 %31, 32
store volatile i64 %32, i64* inttoptr (i64 1442840660 to i64*)
br label %36
33: ; preds = %26
%34 = load volatile i64, i64* inttoptr (i64 1442840660 to i64*)
%35 = and i64 %34, -33
store volatile i64 %35, i64* inttoptr (i64 1442840660 to i64*)
br label %36
36: ; preds = %33, %30
%37 = load volatile i64, i64* inttoptr (i64 1442840676 to i64*)
store i64 %37, i64* %2
%38 = load i64, i64* %2
%39 = and i64 %38, 8
%40 = icmp ne i64 %39, 0
br i1 %40, label %41, label %44
41: ; preds = %36
%42 = load volatile i64, i64* inttoptr (i64 1442840660 to i64*)
%43 = or i64 %42, 64
store volatile i64 %43, i64* inttoptr (i64 1442840660 to i64*)
br label %47
44: ; preds = %36
%45 = load volatile i64, i64* inttoptr (i64 1442840660 to i64*)
%46 = and i64 %45, -65
store volatile i64 %46, i64* inttoptr (i64 1442840660 to i64*)
br label %47
47: ; preds = %44, %41
br label %15
}

LLVM IR (-O2):
define i32 @main() {
%1 = load volatile i64, i64* inttoptr (i64 1442840656 to i64*)
%2 = and i64 %1, -16129
store volatile i64 %2, i64* inttoptr (i64 1442840656 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 1442840656 to i64*)
%4 = or i64 %3, 5376
store volatile i64 %4, i64* inttoptr (i64 1442840656 to i64*)
%5 = load volatile i64, i64* inttoptr (i64 1442840656 to i64*)
%6 = and i64 %5, -52
store volatile i64 %6, i64* inttoptr (i64 1442840656 to i64*)
%7 = load volatile i64, i64* inttoptr (i64 1442840656 to i64*)
store volatile i64 %7, i64* inttoptr (i64 1442840656 to i64*)
%8 = load volatile i64, i64* inttoptr (i64 1442840672 to i64*)
%9 = and i64 %8, -193
store volatile i64 %9, i64* inttoptr (i64 1442840672 to i64*)
%10 = load volatile i64, i64* inttoptr (i64 1442840672 to i64*)
store volatile i64 %10, i64* inttoptr (i64 1442840672 to i64*)
br label %11
11: ; preds = %11, %0
%12 = load volatile i64, i64* inttoptr (i64 1442840660 to i64*)
%13 = load volatile i64, i64* inttoptr (i64 1442840660 to i64*)
%14 = and i64 %13, -17
%15 = shl i64 %12, 4
%16 = and i64 %15, 16
%17 = or i64 %14, %16
store volatile i64 %17, i64* inttoptr (i64 1442840660 to i64*)
%18 = load volatile i64, i64* inttoptr (i64 1442840660 to i64*)
%19 = and i64 %18, -33
%20 = shl i64 %12, 3
%21 = and i64 %20, 32
%22 = or i64 %19, %21
store volatile i64 %22, i64* inttoptr (i64 1442840660 to i64*)
%23 = load volatile i64, i64* inttoptr (i64 1442840676 to i64*)
%24 = load volatile i64, i64* inttoptr (i64 1442840660 to i64*)
%25 = and i64 %24, -65
%26 = shl i64 %23, 3
%27 = and i64 %26, 64
%28 = or i64 %25, %27
store volatile i64 %28, i64* inttoptr (i64 1442840660 to i64*)
br label %11
}