void Hw_PLL_Init(void) {
  (*(volatile unsigned long *)(0x40021000 + 0x0004)) &=
      ~(0xF << 18 | 0x1 << 17 | 0x1 << 16);
  (*(volatile unsigned long *)(0x40021000 + 0x0004)) |= (0x7 << 18 | 0x1 << 16);
  (*(volatile unsigned long *)(0x40021000 + 0x0000)) |= 0x01 << 24;
  while (((*(volatile unsigned long *)(0x40021000 + 0x0000)) & (1 << 25)) == 0)
    ;
  (*(volatile unsigned long *)(0x40021000 + 0x0004)) &= ~0x3;
  (*(volatile unsigned long *)(0x40021000 + 0x0004)) |= 0x2;
  while (((*(volatile unsigned long *)(0x40021000 + 0x0004)) & 0xC) != 0x08)
    ;
  (*(volatile unsigned long *)(0x40021000 + 0x0018)) |=
      0x1 << 14 | 0x1 << 4 | 0x1 << 3 | 0x1 << 2 | 0x1 << 0;
}


x86 assembly (clang, -O0):
<Hw_PLL_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40021004,%eax
mov    (%rax),%rcx
and    $0xffffffffffc0ffff,%rcx
mov    $0x40021004,%eax
mov    %rcx,(%rax)
mov    $0x40021004,%eax
mov    (%rax),%rcx
or     $0x1d0000,%rcx
mov    $0x40021004,%eax
mov    %rcx,(%rax)
mov    $0x40021000,%eax
mov    (%rax),%rcx
or     $0x1000000,%rcx
mov    $0x40021000,%eax
mov    %rcx,(%rax)
mov    $0x40021000,%eax
mov    (%rax),%rax
and    $0x2000000,%rax
cmp    $0x0,%rax
jne    1166 <Hw_PLL_Init+0x66>
jmp    1149 <Hw_PLL_Init+0x49>
mov    $0x40021004,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffc,%rcx
mov    $0x40021004,%eax
mov    %rcx,(%rax)
mov    $0x40021004,%eax
mov    (%rax),%rcx
or     $0x2,%rcx
mov    $0x40021004,%eax
mov    %rcx,(%rax)
mov    $0x40021004,%eax
mov    (%rax),%rax
and    $0xc,%rax
cmp    $0x8,%rax
je     11a9 <Hw_PLL_Init+0xa9>
jmp    118e <Hw_PLL_Init+0x8e>
mov    $0x40021018,%eax
mov    (%rax),%rcx
or     $0x401d,%rcx
mov    $0x40021018,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Hw_PLL_Init>:
andq   $0xffffffffffc0ffff,0x40021004
40 ff ff c0 ff
orq    $0x1d0000,0x40021004
orq    $0x1000000,0x40021000
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
testq  $0x2000000,0x40021000
je     1130 <Hw_PLL_Init+0x30>
andq   $0xfffffffffffffffc,0x40021004
40 fc
orq    $0x2,0x40021004
40 02
mov    0x40021004,%rax
40
and    $0xc,%eax
cmp    $0x8,%eax
jne    1150 <Hw_PLL_Init+0x50>
orq    $0x401d,0x40021018
ret

LLVM IR (-O0):
define void @Hw_PLL_Init() {
%1 = load volatile i64, i64* inttoptr (i64 1073876996 to i64*)
%2 = and i64 %1, -4128769
store volatile i64 %2, i64* inttoptr (i64 1073876996 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 1073876996 to i64*)
%4 = or i64 %3, 1900544
store volatile i64 %4, i64* inttoptr (i64 1073876996 to i64*)
%5 = load volatile i64, i64* inttoptr (i64 1073876992 to i64*)
%6 = or i64 %5, 16777216
store volatile i64 %6, i64* inttoptr (i64 1073876992 to i64*)
br label %7
7: ; preds = %11, %0
%8 = load volatile i64, i64* inttoptr (i64 1073876992 to i64*)
%9 = and i64 %8, 33554432
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7
br label %7
12: ; preds = %7
%13 = load volatile i64, i64* inttoptr (i64 1073876996 to i64*)
%14 = and i64 %13, -4
store volatile i64 %14, i64* inttoptr (i64 1073876996 to i64*)
%15 = load volatile i64, i64* inttoptr (i64 1073876996 to i64*)
%16 = or i64 %15, 2
store volatile i64 %16, i64* inttoptr (i64 1073876996 to i64*)
br label %17
17: ; preds = %21, %12
%18 = load volatile i64, i64* inttoptr (i64 1073876996 to i64*)
%19 = and i64 %18, 12
%20 = icmp ne i64 %19, 8
br i1 %20, label %21, label %22
21: ; preds = %17
br label %17
22: ; preds = %17
%23 = load volatile i64, i64* inttoptr (i64 1073877016 to i64*)
%24 = or i64 %23, 16413
store volatile i64 %24, i64* inttoptr (i64 1073877016 to i64*)
ret void
}

LLVM IR (-O2):
define void @Hw_PLL_Init() {
%1 = load volatile i64, i64* inttoptr (i64 1073876996 to i64*)
%2 = and i64 %1, -4128769
store volatile i64 %2, i64* inttoptr (i64 1073876996 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 1073876996 to i64*)
%4 = or i64 %3, 1900544
store volatile i64 %4, i64* inttoptr (i64 1073876996 to i64*)
%5 = load volatile i64, i64* inttoptr (i64 1073876992 to i64*)
%6 = or i64 %5, 16777216
store volatile i64 %6, i64* inttoptr (i64 1073876992 to i64*)
br label %7
7: ; preds = %7, %0
%8 = load volatile i64, i64* inttoptr (i64 1073876992 to i64*)
%9 = and i64 %8, 33554432
%10 = icmp eq i64 %9, 0
br i1 %10, label %7, label %11
11: ; preds = %7
%12 = load volatile i64, i64* inttoptr (i64 1073876996 to i64*)
%13 = and i64 %12, -4
store volatile i64 %13, i64* inttoptr (i64 1073876996 to i64*)
%14 = load volatile i64, i64* inttoptr (i64 1073876996 to i64*)
%15 = or i64 %14, 2
store volatile i64 %15, i64* inttoptr (i64 1073876996 to i64*)
br label %16
16: ; preds = %16, %11
%17 = load volatile i64, i64* inttoptr (i64 1073876996 to i64*)
%18 = and i64 %17, 12
%19 = icmp eq i64 %18, 8
br i1 %19, label %20, label %16
20: ; preds = %16
%21 = load volatile i64, i64* inttoptr (i64 1073877016 to i64*)
%22 = or i64 %21, 16413
store volatile i64 %22, i64* inttoptr (i64 1073877016 to i64*)
ret void
}