void SysCtlUSBPLLConfigSet(unsigned long ulConfig) {
  unsigned long ulMWRAllow;
  ulMWRAllow = (*((volatile unsigned long *)(0x400FB980)));
  (*((volatile unsigned long *)(0x400FB980))) = 0xA5A5A5A5;
  if ((ulConfig & 0x0000003F) !=
      ((*((volatile unsigned long *)(0x400FB824))) & 0x0000001F)) {
    (*((volatile unsigned long *)(0x400FB824))) =
        (ulConfig & 0x0000003F) |
        ((*((volatile unsigned long *)(0x400FB824))) & ~0x0000001F);
  }
  if ((ulConfig & 0x00000300) !=
      ((*((volatile unsigned long *)(0x400FB824))) & 0x00000300)) {
    (*((volatile unsigned long *)(0x400FB824))) =
        (ulConfig & 0x00000300) |
        ((*((volatile unsigned long *)(0x400FB824))) & ~0x00000300);
  }
  if (((ulConfig & 0x80000000) >> 31) !=
      ((*((volatile unsigned long *)(0x400FB820))) & 0x00000001)) {
    (*((volatile unsigned long *)(0x400FB820))) =
        ((ulConfig & 0x80000000) >> 31) |
        ((*((volatile unsigned long *)(0x400FB820))) & ~0x00000001);
  }
  if (ulConfig & 0x40000000) {
    (*((volatile unsigned long *)(0x400FB820))) =
        0x00000002 |
        ((*((volatile unsigned long *)(0x400FB820))) & ~0x00000004);
    while (!((*((volatile unsigned long *)(0x400FB828))) & 0x00000001))
      ;
    (*((volatile unsigned long *)(0x400FB820))) |= 0x00000004;
  } else {
    (*((volatile unsigned long *)(0x400FB820))) &= ~(0x00000004 | 0x00000002);
  }
  (*((volatile unsigned long *)(0x400FB980))) = ulMWRAllow;
}


x86 assembly (clang, -O0):
<SysCtlUSBPLLConfigSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x400fb980,%eax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    $0x400fb980,%eax
mov    $0xa5a5a5a5,%ecx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
and    $0x3f,%rax
mov    $0x400fb824,%ecx
mov    (%rcx),%rcx
and    $0x1f,%rcx
cmp    %rcx,%rax
je     115d <SysCtlUSBPLLConfigSet+0x5d>
mov    -0x8(%rbp),%rcx
and    $0x3f,%rcx
mov    $0x400fb824,%eax
mov    (%rax),%rax
and    $0xffffffffffffffe0,%rax
or     %rax,%rcx
mov    $0x400fb824,%eax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
and    $0x300,%rax
mov    $0x400fb824,%ecx
mov    (%rcx),%rcx
and    $0x300,%rcx
cmp    %rcx,%rax
je     11a3 <SysCtlUSBPLLConfigSet+0xa3>
mov    -0x8(%rbp),%rcx
and    $0x300,%rcx
mov    $0x400fb824,%eax
mov    (%rax),%rax
and    $0xfffffffffffffcff,%rax
or     %rax,%rcx
mov    $0x400fb824,%eax
mov    %rcx,(%rax)
movabs $0x80000000,%rax
and    -0x8(%rbp),%rax
shr    $0x1f,%rax
mov    $0x400fb820,%ecx
mov    (%rcx),%rcx
and    $0x1,%rcx
cmp    %rcx,%rax
je     11f3 <SysCtlUSBPLLConfigSet+0xf3>
movabs $0x80000000,%rcx
and    -0x8(%rbp),%rcx
shr    $0x1f,%rcx
mov    $0x400fb820,%eax
mov    (%rax),%rax
and    $0xfffffffffffffffe,%rax
or     %rax,%rcx
mov    $0x400fb820,%eax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
and    $0x40000000,%rax
cmp    $0x0,%rax
je     125f <SysCtlUSBPLLConfigSet+0x15f>
mov    $0x400fb820,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffb,%rcx
or     $0x2,%rcx
mov    $0x400fb820,%eax
mov    %rcx,(%rax)
mov    $0x400fb828,%eax
mov    (%rax),%rax
and    $0x1,%rax
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1241 <SysCtlUSBPLLConfigSet+0x141>
jmp    1246 <SysCtlUSBPLLConfigSet+0x146>
jmp    121f <SysCtlUSBPLLConfigSet+0x11f>
mov    $0x400fb820,%eax
mov    (%rax),%rcx
or     $0x4,%rcx
mov    $0x400fb820,%eax
mov    %rcx,(%rax)
jmp    1273 <SysCtlUSBPLLConfigSet+0x173>
mov    $0x400fb820,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffff9,%rcx
mov    $0x400fb820,%eax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rcx
mov    $0x400fb980,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlUSBPLLConfigSet>:
mov    0x400fb980,%rax
40
mov    $0xa5a5a5a5,%ecx
mov    %rcx,0x400fb980
40
mov    %edi,%ecx
and    $0x3f,%ecx
mov    0x400fb824,%rdx
40
and    $0x1f,%edx
cmp    %rdx,%rcx
je     1141 <SysCtlUSBPLLConfigSet+0x41>
mov    0x400fb824,%rdx
40
and    $0xffffffffffffffe0,%rdx
or     %rcx,%rdx
mov    %rdx,0x400fb824
40
mov    %edi,%ecx
and    $0x300,%ecx
mov    0x400fb824,%rdx
40
and    $0x300,%edx
cmp    %rdx,%rcx
je     1176 <SysCtlUSBPLLConfigSet+0x76>
mov    $0xfffffffffffffcff,%rdx
and    0x400fb824,%rdx
40
or     %rcx,%rdx
mov    %rdx,0x400fb824
40
mov    %edi,%ecx
shr    $0x1f,%ecx
mov    0x400fb820,%rdx
40
and    $0x1,%edx
cmp    %rdx,%rcx
je     11a2 <SysCtlUSBPLLConfigSet+0xa2>
mov    0x400fb820,%rdx
40
and    $0xfffffffffffffffe,%rdx
or     %rcx,%rdx
mov    %rdx,0x400fb820
40
mov    0x400fb820,%rcx
40
and    $0xfffffffffffffff9,%rcx
test   $0x40000000,%edi
je     11ea <SysCtlUSBPLLConfigSet+0xea>
or     $0x2,%rcx
mov    %rcx,0x400fb820
40
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
testq  $0x1,0x400fb828
je     11d0 <SysCtlUSBPLLConfigSet+0xd0>
mov    0x400fb820,%rcx
40
or     $0x4,%rcx
mov    %rcx,0x400fb820
40
mov    %rax,0x400fb980
40
ret

LLVM IR (-O0):
define void @SysCtlUSBPLLConfigSet(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load volatile i64, i64* inttoptr (i64 1074772352 to i64*)
store i64 %4, i64* %3
store volatile i64 2779096485, i64* inttoptr (i64 1074772352 to i64*)
%5 = load i64, i64* %2
%6 = and i64 %5, 63
%7 = load volatile i64, i64* inttoptr (i64 1074772004 to i64*)
%8 = and i64 %7, 31
%9 = icmp ne i64 %6, %8
br i1 %9, label %10, label %16
10: ; preds = %1
%11 = load i64, i64* %2
%12 = and i64 %11, 63
%13 = load volatile i64, i64* inttoptr (i64 1074772004 to i64*)
%14 = and i64 %13, -32
%15 = or i64 %12, %14
store volatile i64 %15, i64* inttoptr (i64 1074772004 to i64*)
br label %16
16: ; preds = %10, %1
%17 = load i64, i64* %2
%18 = and i64 %17, 768
%19 = load volatile i64, i64* inttoptr (i64 1074772004 to i64*)
%20 = and i64 %19, 768
%21 = icmp ne i64 %18, %20
br i1 %21, label %22, label %28
22: ; preds = %16
%23 = load i64, i64* %2
%24 = and i64 %23, 768
%25 = load volatile i64, i64* inttoptr (i64 1074772004 to i64*)
%26 = and i64 %25, -769
%27 = or i64 %24, %26
store volatile i64 %27, i64* inttoptr (i64 1074772004 to i64*)
br label %28
28: ; preds = %22, %16
%29 = load i64, i64* %2
%30 = and i64 %29, 2147483648
%31 = lshr i64 %30, 31
%32 = load volatile i64, i64* inttoptr (i64 1074772000 to i64*)
%33 = and i64 %32, 1
%34 = icmp ne i64 %31, %33
br i1 %34, label %35, label %42
35: ; preds = %28
%36 = load i64, i64* %2
%37 = and i64 %36, 2147483648
%38 = lshr i64 %37, 31
%39 = load volatile i64, i64* inttoptr (i64 1074772000 to i64*)
%40 = and i64 %39, -2
%41 = or i64 %38, %40
store volatile i64 %41, i64* inttoptr (i64 1074772000 to i64*)
br label %42
42: ; preds = %35, %28
%43 = load i64, i64* %2
%44 = and i64 %43, 1073741824
%45 = icmp ne i64 %44, 0
br i1 %45, label %46, label %59
46: ; preds = %42
%47 = load volatile i64, i64* inttoptr (i64 1074772000 to i64*)
%48 = and i64 %47, -5
%49 = or i64 2, %48
store volatile i64 %49, i64* inttoptr (i64 1074772000 to i64*)
br label %50
50: ; preds = %55, %46
%51 = load volatile i64, i64* inttoptr (i64 1074772008 to i64*)
%52 = and i64 %51, 1
%53 = icmp ne i64 %52, 0
%54 = xor i1 %53, true
br i1 %54, label %55, label %56
55: ; preds = %50
br label %50
56: ; preds = %50
%57 = load volatile i64, i64* inttoptr (i64 1074772000 to i64*)
%58 = or i64 %57, 4
store volatile i64 %58, i64* inttoptr (i64 1074772000 to i64*)
br label %62
59: ; preds = %42
%60 = load volatile i64, i64* inttoptr (i64 1074772000 to i64*)
%61 = and i64 %60, -7
store volatile i64 %61, i64* inttoptr (i64 1074772000 to i64*)
br label %62
62: ; preds = %59, %56
%63 = load i64, i64* %3
store volatile i64 %63, i64* inttoptr (i64 1074772352 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysCtlUSBPLLConfigSet(i64 %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074772352 to i64*)
store volatile i64 2779096485, i64* inttoptr (i64 1074772352 to i64*)
%3 = and i64 %0, 63
%4 = load volatile i64, i64* inttoptr (i64 1074772004 to i64*)
%5 = and i64 %4, 31
%6 = icmp eq i64 %3, %5
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load volatile i64, i64* inttoptr (i64 1074772004 to i64*)
%9 = and i64 %8, -32
%10 = or i64 %9, %3
store volatile i64 %10, i64* inttoptr (i64 1074772004 to i64*)
br label %11
11: ; preds = %7, %1
%12 = and i64 %0, 768
%13 = load volatile i64, i64* inttoptr (i64 1074772004 to i64*)
%14 = and i64 %13, 768
%15 = icmp eq i64 %12, %14
br i1 %15, label %20, label %16
16: ; preds = %11
%17 = load volatile i64, i64* inttoptr (i64 1074772004 to i64*)
%18 = and i64 %17, -769
%19 = or i64 %18, %12
store volatile i64 %19, i64* inttoptr (i64 1074772004 to i64*)
br label %20
20: ; preds = %16, %11
%21 = lshr i64 %0, 31
%22 = and i64 %21, 1
%23 = load volatile i64, i64* inttoptr (i64 1074772000 to i64*)
%24 = and i64 %23, 1
%25 = icmp eq i64 %22, %24
br i1 %25, label %30, label %26
26: ; preds = %20
%27 = load volatile i64, i64* inttoptr (i64 1074772000 to i64*)
%28 = and i64 %27, -2
%29 = or i64 %28, %22
store volatile i64 %29, i64* inttoptr (i64 1074772000 to i64*)
br label %30
30: ; preds = %26, %20
%31 = and i64 %0, 1073741824
%32 = icmp eq i64 %31, 0
%33 = load volatile i64, i64* inttoptr (i64 1074772000 to i64*)
%34 = and i64 %33, -7
br i1 %32, label %44, label %35
35: ; preds = %30
%36 = or i64 %34, 2
store volatile i64 %36, i64* inttoptr (i64 1074772000 to i64*)
br label %37
37: ; preds = %37, %35
%38 = load volatile i64, i64* inttoptr (i64 1074772008 to i64*)
%39 = and i64 %38, 1
%40 = icmp eq i64 %39, 0
br i1 %40, label %37, label %41
41: ; preds = %37
%42 = load volatile i64, i64* inttoptr (i64 1074772000 to i64*)
%43 = or i64 %42, 4
br label %44
44: ; preds = %30, %41
%45 = phi i64 [ %43, %41 ], [ %34, %30 ]
store volatile i64 %45, i64* inttoptr (i64 1074772000 to i64*)
store volatile i64 %2, i64* inttoptr (i64 1074772352 to i64*)
ret void
}