void clock_init(void) {
  (*((volatile unsigned long *)0x7E00F000)) = 0xffff;
  (*((volatile unsigned long *)0x7E00F004)) = 0xffff;
  (*((volatile unsigned long *)0x7E00F008)) = 0xffff;
  (*((volatile unsigned long *)0x7e00f900)) &= ~0xc0;
  while (((*((volatile unsigned long *)0x7e00f900)) & 0xf00) != 0)
    ;
  (*((volatile unsigned long *)0x7E00F020)) =
      (0) | (0 << 4) | (1 << 8) | (1 << 9) | (3 << 12);
  (*((volatile unsigned long *)0x7E00F00C)) =
      ((1 << 31) | (266 << 16) | (3 << 8) | (1));
  (*((volatile unsigned long *)0x7E00F010)) =
      ((1 << 31) | (266 << 16) | (3 << 8) | (1));
  (*((volatile unsigned long *)0x7E00F01C)) = 0x03;
}


x86 assembly (clang, -O0):
<clock_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7e00f000,%eax
movq   $0xffff,(%rax)
mov    $0x7e00f004,%eax
movq   $0xffff,(%rax)
mov    $0x7e00f008,%eax
movq   $0xffff,(%rax)
mov    $0x7e00f900,%eax
mov    (%rax),%rcx
and    $0xffffffffffffff3f,%rcx
mov    $0x7e00f900,%eax
mov    %rcx,(%rax)
mov    $0x7e00f900,%eax
mov    (%rax),%rax
and    $0xf00,%rax
cmp    $0x0,%rax
je     115c <clock_init+0x5c>
jmp    113f <clock_init+0x3f>
mov    $0x7e00f020,%eax
movq   $0x3300,(%rax)
mov    $0x7e00f00c,%eax
movq   $0xffffffff810a0301,(%rax)
mov    $0x7e00f010,%eax
movq   $0xffffffff810a0301,(%rax)
mov    $0x7e00f01c,%eax
movq   $0x3,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clock_init>:
movq   $0xffff,0x7e00f000
movq   $0xffff,0x7e00f004
movq   $0xffff,0x7e00f008
andq   $0xffffffffffffff3f,0x7e00f900
7e 3f ff ff ff
testq  $0xf00,0x7e00f900
jne    1130 <clock_init+0x30>
movq   $0x3300,0x7e00f020
movq   $0xffffffff810a0301,0x7e00f00c
7e 01 03 0a 81
movq   $0xffffffff810a0301,0x7e00f010
7e 01 03 0a 81
movq   $0x3,0x7e00f01c
ret

LLVM IR (-O0):
define void @clock_init() {
store volatile i64 65535, i64* inttoptr (i64 2113990656 to i64*)
store volatile i64 65535, i64* inttoptr (i64 2113990660 to i64*)
store volatile i64 65535, i64* inttoptr (i64 2113990664 to i64*)
%1 = load volatile i64, i64* inttoptr (i64 2113992960 to i64*)
%2 = and i64 %1, -193
store volatile i64 %2, i64* inttoptr (i64 2113992960 to i64*)
br label %3
3: ; preds = %7, %0
%4 = load volatile i64, i64* inttoptr (i64 2113992960 to i64*)
%5 = and i64 %4, 3840
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
store volatile i64 13056, i64* inttoptr (i64 2113990688 to i64*)
store volatile i64 -2130050303, i64* inttoptr (i64 2113990668 to i64*)
store volatile i64 -2130050303, i64* inttoptr (i64 2113990672 to i64*)
store volatile i64 3, i64* inttoptr (i64 2113990684 to i64*)
ret void
}

LLVM IR (-O2):
define void @clock_init() {
store volatile i64 65535, i64* inttoptr (i64 2113990656 to i64*)
store volatile i64 65535, i64* inttoptr (i64 2113990660 to i64*)
store volatile i64 65535, i64* inttoptr (i64 2113990664 to i64*)
%1 = load volatile i64, i64* inttoptr (i64 2113992960 to i64*)
%2 = and i64 %1, -193
store volatile i64 %2, i64* inttoptr (i64 2113992960 to i64*)
br label %3
3: ; preds = %3, %0
%4 = load volatile i64, i64* inttoptr (i64 2113992960 to i64*)
%5 = and i64 %4, 3840
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %3
7: ; preds = %3
store volatile i64 13056, i64* inttoptr (i64 2113990688 to i64*)
store volatile i64 -2130050303, i64* inttoptr (i64 2113990668 to i64*)
store volatile i64 -2130050303, i64* inttoptr (i64 2113990672 to i64*)
store volatile i64 3, i64* inttoptr (i64 2113990684 to i64*)
ret void
}