void TargetResetInit(void) {
  (*(volatile unsigned long *)(0xE01FC000 + 0x080)) = 1;
  (*(volatile unsigned long *)(0xE01FC000 + 0x100)) = 0;
  (*(volatile unsigned long *)(0xE01FC000 + 0x084)) =
      (((12000000 * 5) / 12000000) - 1) | (1 << 5);
  (*(volatile unsigned long *)(0xE01FC000 + 0x08C)) = 0xaa;
  (*(volatile unsigned long *)(0xE01FC000 + 0x08C)) = 0x55;
  while (((*(volatile unsigned long *)(0xE01FC000 + 0x088)) & (1 << 10)) == 0)
    ;
  (*(volatile unsigned long *)(0xE01FC000 + 0x080)) = 3;
  (*(volatile unsigned long *)(0xE01FC000 + 0x08C)) = 0xaa;
  (*(volatile unsigned long *)(0xE01FC000 + 0x08C)) = 0x55;
  (*(volatile unsigned long *)(0xE01FC000 + 0x000)) = 0;
  (*(volatile unsigned long *)(0xE01FC000 + 0x004)) = 3;
  (*(volatile unsigned long *)(0xE01FC000 + 0x000)) = 2;
  return;
}


x86 assembly (clang, -O0):
<TargetResetInit>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe01fc080,%eax
movq   $0x1,(%rax)
mov    $0xe01fc100,%eax
movq   $0x0,(%rax)
mov    $0xe01fc084,%eax
movq   $0x24,(%rax)
mov    $0xe01fc08c,%eax
movq   $0xaa,(%rax)
mov    $0xe01fc08c,%eax
movq   $0x55,(%rax)
mov    $0xe01fc088,%eax
mov    (%rax),%rax
and    $0x400,%rax
cmp    $0x0,%rax
jne    115d <TargetResetInit+0x5d>
jmp    1140 <TargetResetInit+0x40>
mov    $0xe01fc080,%eax
movq   $0x3,(%rax)
mov    $0xe01fc08c,%eax
movq   $0xaa,(%rax)
mov    $0xe01fc08c,%eax
movq   $0x55,(%rax)
mov    $0xe01fc000,%eax
movq   $0x0,(%rax)
mov    $0xe01fc004,%eax
movq   $0x3,(%rax)
mov    $0xe01fc000,%eax
movq   $0x2,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TargetResetInit>:
mov    $0xe01fc08c,%eax
movq   $0x1,-0xc(%rax)
movq   $0x0,0x74(%rax)
movq   $0x24,-0x8(%rax)
movq   $0xaa,(%rax)
movq   $0x55,(%rax)
nopl   0x0(%rax,%rax,1)
testq  $0x400,-0x4(%rax)
je     1130 <TargetResetInit+0x30>
movq   $0x3,-0xc(%rax)
movq   $0xaa,(%rax)
movq   $0x55,(%rax)
movq   $0x0,-0x8c(%rax)
movq   $0x3,-0x88(%rax)
movq   $0x2,-0x8c(%rax)
ret

LLVM IR (-O0):
define void @TargetResetInit() {
store volatile i64 1, i64* inttoptr (i64 3760177280 to i64*)
store volatile i64 0, i64* inttoptr (i64 3760177408 to i64*)
store volatile i64 36, i64* inttoptr (i64 3760177284 to i64*)
store volatile i64 170, i64* inttoptr (i64 3760177292 to i64*)
store volatile i64 85, i64* inttoptr (i64 3760177292 to i64*)
br label %1
1: ; preds = %5, %0
%2 = load volatile i64, i64* inttoptr (i64 3760177288 to i64*)
%3 = and i64 %2, 1024
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
store volatile i64 3, i64* inttoptr (i64 3760177280 to i64*)
store volatile i64 170, i64* inttoptr (i64 3760177292 to i64*)
store volatile i64 85, i64* inttoptr (i64 3760177292 to i64*)
store volatile i64 0, i64* inttoptr (i64 3760177152 to i64*)
store volatile i64 3, i64* inttoptr (i64 3760177156 to i64*)
store volatile i64 2, i64* inttoptr (i64 3760177152 to i64*)
ret void
}

LLVM IR (-O2):
define void @TargetResetInit() {
store volatile i64 1, i64* inttoptr (i64 3760177280 to i64*)
store volatile i64 0, i64* inttoptr (i64 3760177408 to i64*)
store volatile i64 36, i64* inttoptr (i64 3760177284 to i64*)
store volatile i64 170, i64* inttoptr (i64 3760177292 to i64*)
store volatile i64 85, i64* inttoptr (i64 3760177292 to i64*)
br label %1
1: ; preds = %1, %0
%2 = load volatile i64, i64* inttoptr (i64 3760177288 to i64*)
%3 = and i64 %2, 1024
%4 = icmp eq i64 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
store volatile i64 3, i64* inttoptr (i64 3760177280 to i64*)
store volatile i64 170, i64* inttoptr (i64 3760177292 to i64*)
store volatile i64 85, i64* inttoptr (i64 3760177292 to i64*)
store volatile i64 0, i64* inttoptr (i64 3760177152 to i64*)
store volatile i64 3, i64* inttoptr (i64 3760177156 to i64*)
store volatile i64 2, i64* inttoptr (i64 3760177152 to i64*)
ret void
}