int atime(void) {
  unsigned long i = 0;
  (*(volatile unsigned *)0x56000010) = 0X0;
  (*(volatile unsigned *)0x56000018) = 0X0;
  (*(volatile unsigned *)0x56000010) =
      (1 << (5 * 2)) | (1 << (6 * 2)) | (1 << (7 * 2)) | (1 << (8 * 2));
  while (1) {
    i = (*(volatile unsigned *)0x56000054);
    if (i & (1 << 0))
      (*(volatile unsigned *)0x56000014) |= (1 << 5);
    else
      (*(volatile unsigned *)0x56000014) &= ~(1 << 5);
    if (i & (1 << 1))
      (*(volatile unsigned *)0x56000014) |= (1 << 6);
    else
      (*(volatile unsigned *)0x56000014) &= ~(1 << 6);
    if (i & (1 << 2))
      (*(volatile unsigned *)0x56000014) |= (1 << 7);
    else
      (*(volatile unsigned *)0x56000014) &= ~(1 << 7);
    if (i & (1 << 4))
      (*(volatile unsigned *)0x56000014) |= (1 << 8);
    else
      (*(volatile unsigned *)0x56000014) &= ~(1 << 8);
  }
  return 0;
}


x86 assembly (clang, -O0):
<atime>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    $0x56000010,%eax
movl   $0x0,(%rax)
mov    $0x56000018,%eax
movl   $0x0,(%rax)
mov    $0x56000010,%eax
movl   $0x15400,(%rax)
mov    $0x56000054,%eax
mov    (%rax),%eax
mov    %eax,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1162 <atime+0x62>
mov    $0x56000014,%eax
mov    (%rax),%ecx
or     $0x20,%ecx
mov    $0x56000014,%eax
mov    %ecx,(%rax)
jmp    1173 <atime+0x73>
mov    $0x56000014,%eax
mov    (%rax),%ecx
and    $0xffffffdf,%ecx
mov    $0x56000014,%eax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
and    $0x2,%rax
cmp    $0x0,%rax
je     119b <atime+0x9b>
mov    $0x56000014,%eax
mov    (%rax),%ecx
or     $0x40,%ecx
mov    $0x56000014,%eax
mov    %ecx,(%rax)
jmp    11ac <atime+0xac>
mov    $0x56000014,%eax
mov    (%rax),%ecx
and    $0xffffffbf,%ecx
mov    $0x56000014,%eax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
and    $0x4,%rax
cmp    $0x0,%rax
je     11d7 <atime+0xd7>
mov    $0x56000014,%eax
mov    (%rax),%ecx
or     $0x80,%ecx
mov    $0x56000014,%eax
mov    %ecx,(%rax)
jmp    11eb <atime+0xeb>
mov    $0x56000014,%eax
mov    (%rax),%ecx
and    $0xffffff7f,%ecx
mov    $0x56000014,%eax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
and    $0x10,%rax
cmp    $0x0,%rax
je     1216 <atime+0x116>
mov    $0x56000014,%eax
mov    (%rax),%ecx
or     $0x100,%ecx
mov    $0x56000014,%eax
mov    %ecx,(%rax)
jmp    122a <atime+0x12a>
mov    $0x56000014,%eax
mov    (%rax),%ecx
and    $0xfffffeff,%ecx
mov    $0x56000014,%eax
mov    %ecx,(%rax)
jmp    112d <atime+0x2d>

x86 assembly (clang, -O2):
<atime>:
movl   $0x0,0x56000010
movl   $0x0,0x56000018
movl   $0x15400,0x56000010
mov    $0xffffff7f,%r8d
mov    $0xfffffeff,%ecx
nopl   0x0(%rax)
mov    0x56000054,%eax
mov    0x56000014,%esi
and    $0xffffffdf,%esi
mov    %eax,%edx
shl    $0x5,%edx
mov    %edx,%edi
and    $0x20,%edi
or     %esi,%edi
mov    %edi,0x56000014
mov    0x56000014,%esi
and    $0xffffffbf,%esi
mov    %edx,%edi
and    $0x40,%edi
or     %esi,%edi
mov    %edi,0x56000014
mov    0x56000014,%esi
and    %r8d,%esi
and    $0x80,%edx
or     %esi,%edx
mov    %edx,0x56000014
mov    0x56000014,%edx
and    %ecx,%edx
and    $0x10,%eax
shl    $0x4,%eax
or     %edx,%eax
mov    %eax,0x56000014
jmp    1130 <atime+0x30>

LLVM IR (-O0):
define i32 @atime() {
%1 = alloca i64
store i64 0, i64* %1
store volatile i32 0, i32* inttoptr (i64 1442840592 to i32*)
store volatile i32 0, i32* inttoptr (i64 1442840600 to i32*)
store volatile i32 87040, i32* inttoptr (i64 1442840592 to i32*)
br label %2
2: ; preds = %0, %44
%3 = load volatile i32, i32* inttoptr (i64 1442840660 to i32*)
%4 = zext i32 %3 to i64
store i64 %4, i64* %1
%5 = load i64, i64* %1
%6 = and i64 %5, 1
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load volatile i32, i32* inttoptr (i64 1442840596 to i32*)
%10 = or i32 %9, 32
store volatile i32 %10, i32* inttoptr (i64 1442840596 to i32*)
br label %14
11: ; preds = %2
%12 = load volatile i32, i32* inttoptr (i64 1442840596 to i32*)
%13 = and i32 %12, -33
store volatile i32 %13, i32* inttoptr (i64 1442840596 to i32*)
br label %14
14: ; preds = %11, %8
%15 = load i64, i64* %1
%16 = and i64 %15, 2
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %14
%19 = load volatile i32, i32* inttoptr (i64 1442840596 to i32*)
%20 = or i32 %19, 64
store volatile i32 %20, i32* inttoptr (i64 1442840596 to i32*)
br label %24
21: ; preds = %14
%22 = load volatile i32, i32* inttoptr (i64 1442840596 to i32*)
%23 = and i32 %22, -65
store volatile i32 %23, i32* inttoptr (i64 1442840596 to i32*)
br label %24
24: ; preds = %21, %18
%25 = load i64, i64* %1
%26 = and i64 %25, 4
%27 = icmp ne i64 %26, 0
br i1 %27, label %28, label %31
28: ; preds = %24
%29 = load volatile i32, i32* inttoptr (i64 1442840596 to i32*)
%30 = or i32 %29, 128
store volatile i32 %30, i32* inttoptr (i64 1442840596 to i32*)
br label %34
31: ; preds = %24
%32 = load volatile i32, i32* inttoptr (i64 1442840596 to i32*)
%33 = and i32 %32, -129
store volatile i32 %33, i32* inttoptr (i64 1442840596 to i32*)
br label %34
34: ; preds = %31, %28
%35 = load i64, i64* %1
%36 = and i64 %35, 16
%37 = icmp ne i64 %36, 0
br i1 %37, label %38, label %41
38: ; preds = %34
%39 = load volatile i32, i32* inttoptr (i64 1442840596 to i32*)
%40 = or i32 %39, 256
store volatile i32 %40, i32* inttoptr (i64 1442840596 to i32*)
br label %44
41: ; preds = %34
%42 = load volatile i32, i32* inttoptr (i64 1442840596 to i32*)
%43 = and i32 %42, -257
store volatile i32 %43, i32* inttoptr (i64 1442840596 to i32*)
br label %44
44: ; preds = %41, %38
br label %2
}

LLVM IR (-O2):
define i32 @atime() {
store volatile i32 0, i32* inttoptr (i64 1442840592 to i32*)
store volatile i32 0, i32* inttoptr (i64 1442840600 to i32*)
store volatile i32 87040, i32* inttoptr (i64 1442840592 to i32*)
br label %1
1: ; preds = %1, %0
%2 = load volatile i32, i32* inttoptr (i64 1442840660 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 1442840596 to i32*)
%4 = and i32 %3, -33
%5 = shl i32 %2, 5
%6 = and i32 %5, 32
%7 = or i32 %4, %6
store volatile i32 %7, i32* inttoptr (i64 1442840596 to i32*)
%8 = load volatile i32, i32* inttoptr (i64 1442840596 to i32*)
%9 = and i32 %8, -65
%10 = shl i32 %2, 5
%11 = and i32 %10, 64
%12 = or i32 %9, %11
store volatile i32 %12, i32* inttoptr (i64 1442840596 to i32*)
%13 = load volatile i32, i32* inttoptr (i64 1442840596 to i32*)
%14 = and i32 %13, -129
%15 = shl i32 %2, 5
%16 = and i32 %15, 128
%17 = or i32 %14, %16
store volatile i32 %17, i32* inttoptr (i64 1442840596 to i32*)
%18 = load volatile i32, i32* inttoptr (i64 1442840596 to i32*)
%19 = and i32 %18, -257
%20 = shl i32 %2, 4
%21 = and i32 %20, 256
%22 = or i32 %19, %21
store volatile i32 %22, i32* inttoptr (i64 1442840596 to i32*)
br label %1
}