void baud_max() {
  while (!((*(volatile unsigned int *)((0x14) + 0x4000C000)) & (1 << 6)))
    ;
  (*(volatile unsigned int *)(0x400FC1A8)) |= 1 << 6;
  (*(volatile unsigned int *)((0x00) + 0x400fC080)) &= ~(1 << 1);
  (*(volatile unsigned int *)((0x0C) + 0x400fC080)) = 0xaa;
  (*(volatile unsigned int *)((0x0C) + 0x400fC080)) = 0x55;
  (*(volatile unsigned int *)((0x00) + 0x400fC080)) &= ~(1 << 0);
  (*(volatile unsigned int *)((0x0C) + 0x400fC080)) = 0xaa;
  (*(volatile unsigned int *)((0x0C) + 0x400fC080)) = 0x55;
  (*(volatile unsigned int *)((0x04) + 0x400fC080)) =
      (69 - 1) + ((2 - 1) << 16);
  (*(volatile unsigned int *)((0x0C) + 0x400fC080)) = 0xaa;
  (*(volatile unsigned int *)((0x0C) + 0x400fC080)) = 0x55;
  (*(volatile unsigned int *)(0x400FC104)) = (23 - 1);
  (*(volatile unsigned int *)((0x00) + 0x400fC080)) = (1 << 0);
  (*(volatile unsigned int *)((0x0C) + 0x400fC080)) = 0xaa;
  (*(volatile unsigned int *)((0x0C) + 0x400fC080)) = 0x55;
  while (!((*(volatile unsigned int *)((0x08) + 0x400fC080)) & (1 << 26)))
    ;
  (*(volatile unsigned int *)((0x00) + 0x400fC080)) = (1 << 1) | (1 << 0);
  (*(volatile unsigned int *)((0x0C) + 0x400fC080)) = 0xaa;
  (*(volatile unsigned int *)((0x0C) + 0x400fC080)) = 0x55;
  (*(volatile unsigned int *)((0x28) + 0x4000C000)) = (1 << 4) | 0;
  (*(volatile unsigned int *)((0x0C) + 0x4000C000)) |= 1 << 7;
  (*(volatile unsigned int *)((0x04) + 0x4000C000)) = 0;
  (*(volatile unsigned int *)((0x00) + 0x4000C000)) = 1;
  (*(volatile unsigned int *)((0x0C) + 0x4000C000)) &= ~(1 << 7);
  (*(volatile unsigned int *)((0x08) + 0x4000C000)) = 0x7;
}


x86 assembly (clang, -O0):
<baud_max>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <baud_max+0x9>
mov    $0x4000c014,%eax
mov    (%rax),%eax
and    $0x40,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1128 <baud_max+0x28>
jmp    112d <baud_max+0x2d>
jmp    1109 <baud_max+0x9>
mov    $0x400fc1a8,%eax
mov    (%rax),%ecx
or     $0x40,%ecx
mov    $0x400fc1a8,%eax
mov    %ecx,(%rax)
mov    $0x400fc080,%eax
mov    (%rax),%ecx
and    $0xfffffffd,%ecx
mov    $0x400fc080,%eax
mov    %ecx,(%rax)
mov    $0x400fc08c,%eax
movl   $0xaa,(%rax)
mov    $0x400fc08c,%eax
movl   $0x55,(%rax)
mov    $0x400fc080,%eax
mov    (%rax),%ecx
and    $0xfffffffe,%ecx
mov    $0x400fc080,%eax
mov    %ecx,(%rax)
mov    $0x400fc08c,%eax
movl   $0xaa,(%rax)
mov    $0x400fc08c,%eax
movl   $0x55,(%rax)
mov    $0x400fc084,%eax
movl   $0x10044,(%rax)
mov    $0x400fc08c,%eax
movl   $0xaa,(%rax)
mov    $0x400fc08c,%eax
movl   $0x55,(%rax)
mov    $0x400fc104,%eax
movl   $0x16,(%rax)
mov    $0x400fc080,%eax
movl   $0x1,(%rax)
mov    $0x400fc08c,%eax
movl   $0xaa,(%rax)
mov    $0x400fc08c,%eax
movl   $0x55,(%rax)
mov    $0x400fc088,%eax
mov    (%rax),%eax
and    $0x4000000,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    11fa <baud_max+0xfa>
jmp    11ff <baud_max+0xff>
jmp    11d9 <baud_max+0xd9>
mov    $0x400fc080,%eax
movl   $0x3,(%rax)
mov    $0x400fc08c,%eax
movl   $0xaa,(%rax)
mov    $0x400fc08c,%eax
movl   $0x55,(%rax)
mov    $0x4000c028,%eax
movl   $0x10,(%rax)
mov    $0x4000c00c,%eax
mov    (%rax),%ecx
or     $0x80,%ecx
mov    $0x4000c00c,%eax
mov    %ecx,(%rax)
mov    $0x4000c004,%eax
movl   $0x0,(%rax)
mov    $0x4000c000,%eax
movl   $0x1,(%rax)
mov    $0x4000c00c,%eax
mov    (%rax),%ecx
and    $0xffffff7f,%ecx
mov    $0x4000c00c,%eax
mov    %ecx,(%rax)
mov    $0x4000c008,%eax
movl   $0x7,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<baud_max>:
testl  $0x40,0x4000c014
je     1100 <baud_max>
orl    $0x40,0x400fc1a8
40
andl   $0xfffffffd,0x400fc080
fd
movl   $0xaa,0x400fc08c
movl   $0x55,0x400fc08c
andl   $0xfffffffe,0x400fc080
fe
movl   $0xaa,0x400fc08c
movl   $0x55,0x400fc08c
movl   $0x10044,0x400fc084
movl   $0xaa,0x400fc08c
movl   $0x55,0x400fc08c
movl   $0x16,0x400fc104
movl   $0x1,0x400fc080
movl   $0xaa,0x400fc08c
movl   $0x55,0x400fc08c
xchg   %ax,%ax
testl  $0x4000000,0x400fc088
je     11a0 <baud_max+0xa0>
movl   $0x3,0x400fc080
movl   $0xaa,0x400fc08c
movl   $0x55,0x400fc08c
movl   $0x10,0x4000c028
orl    $0x80,0x4000c00c
movl   $0x0,0x4000c004
movl   $0x1,0x4000c000
andl   $0xffffff7f,0x4000c00c
7f ff ff ff
movl   $0x7,0x4000c008
ret

LLVM IR (-O0):
define void @baud_max() {
br label %1
1: ; preds = %6, %0
%2 = load volatile i32, i32* inttoptr (i64 1073790996 to i32*)
%3 = and i32 %2, 64
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
br i1 %5, label %6, label %7
6: ; preds = %1
br label %1
7: ; preds = %1
%8 = load volatile i32, i32* inttoptr (i64 1074774440 to i32*)
%9 = or i32 %8, 64
store volatile i32 %9, i32* inttoptr (i64 1074774440 to i32*)
%10 = load volatile i32, i32* inttoptr (i64 1074774144 to i32*)
%11 = and i32 %10, -3
store volatile i32 %11, i32* inttoptr (i64 1074774144 to i32*)
store volatile i32 170, i32* inttoptr (i64 1074774156 to i32*)
store volatile i32 85, i32* inttoptr (i64 1074774156 to i32*)
%12 = load volatile i32, i32* inttoptr (i64 1074774144 to i32*)
%13 = and i32 %12, -2
store volatile i32 %13, i32* inttoptr (i64 1074774144 to i32*)
store volatile i32 170, i32* inttoptr (i64 1074774156 to i32*)
store volatile i32 85, i32* inttoptr (i64 1074774156 to i32*)
store volatile i32 65604, i32* inttoptr (i64 1074774148 to i32*)
store volatile i32 170, i32* inttoptr (i64 1074774156 to i32*)
store volatile i32 85, i32* inttoptr (i64 1074774156 to i32*)
store volatile i32 22, i32* inttoptr (i64 1074774276 to i32*)
store volatile i32 1, i32* inttoptr (i64 1074774144 to i32*)
store volatile i32 170, i32* inttoptr (i64 1074774156 to i32*)
store volatile i32 85, i32* inttoptr (i64 1074774156 to i32*)
br label %14
14: ; preds = %19, %7
%15 = load volatile i32, i32* inttoptr (i64 1074774152 to i32*)
%16 = and i32 %15, 67108864
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
br i1 %18, label %19, label %20
19: ; preds = %14
br label %14
20: ; preds = %14
store volatile i32 3, i32* inttoptr (i64 1074774144 to i32*)
store volatile i32 170, i32* inttoptr (i64 1074774156 to i32*)
store volatile i32 85, i32* inttoptr (i64 1074774156 to i32*)
store volatile i32 16, i32* inttoptr (i64 1073791016 to i32*)
%21 = load volatile i32, i32* inttoptr (i64 1073790988 to i32*)
%22 = or i32 %21, 128
store volatile i32 %22, i32* inttoptr (i64 1073790988 to i32*)
store volatile i32 0, i32* inttoptr (i64 1073790980 to i32*)
store volatile i32 1, i32* inttoptr (i64 1073790976 to i32*)
%23 = load volatile i32, i32* inttoptr (i64 1073790988 to i32*)
%24 = and i32 %23, -129
store volatile i32 %24, i32* inttoptr (i64 1073790988 to i32*)
store volatile i32 7, i32* inttoptr (i64 1073790984 to i32*)
ret void
}

LLVM IR (-O2):
define void @baud_max() {
br label %1
1: ; preds = %1, %0
%2 = load volatile i32, i32* inttoptr (i64 1073790996 to i32*)
%3 = and i32 %2, 64
%4 = icmp eq i32 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
%6 = load volatile i32, i32* inttoptr (i64 1074774440 to i32*)
%7 = or i32 %6, 64
store volatile i32 %7, i32* inttoptr (i64 1074774440 to i32*)
%8 = load volatile i32, i32* inttoptr (i64 1074774144 to i32*)
%9 = and i32 %8, -3
store volatile i32 %9, i32* inttoptr (i64 1074774144 to i32*)
store volatile i32 170, i32* inttoptr (i64 1074774156 to i32*)
store volatile i32 85, i32* inttoptr (i64 1074774156 to i32*)
%10 = load volatile i32, i32* inttoptr (i64 1074774144 to i32*)
%11 = and i32 %10, -2
store volatile i32 %11, i32* inttoptr (i64 1074774144 to i32*)
store volatile i32 170, i32* inttoptr (i64 1074774156 to i32*)
store volatile i32 85, i32* inttoptr (i64 1074774156 to i32*)
store volatile i32 65604, i32* inttoptr (i64 1074774148 to i32*)
store volatile i32 170, i32* inttoptr (i64 1074774156 to i32*)
store volatile i32 85, i32* inttoptr (i64 1074774156 to i32*)
store volatile i32 22, i32* inttoptr (i64 1074774276 to i32*)
store volatile i32 1, i32* inttoptr (i64 1074774144 to i32*)
store volatile i32 170, i32* inttoptr (i64 1074774156 to i32*)
store volatile i32 85, i32* inttoptr (i64 1074774156 to i32*)
br label %12
12: ; preds = %12, %5
%13 = load volatile i32, i32* inttoptr (i64 1074774152 to i32*)
%14 = and i32 %13, 67108864
%15 = icmp eq i32 %14, 0
br i1 %15, label %12, label %16
16: ; preds = %12
store volatile i32 3, i32* inttoptr (i64 1074774144 to i32*)
store volatile i32 170, i32* inttoptr (i64 1074774156 to i32*)
store volatile i32 85, i32* inttoptr (i64 1074774156 to i32*)
store volatile i32 16, i32* inttoptr (i64 1073791016 to i32*)
%17 = load volatile i32, i32* inttoptr (i64 1073790988 to i32*)
%18 = or i32 %17, 128
store volatile i32 %18, i32* inttoptr (i64 1073790988 to i32*)
store volatile i32 0, i32* inttoptr (i64 1073790980 to i32*)
store volatile i32 1, i32* inttoptr (i64 1073790976 to i32*)
%19 = load volatile i32, i32* inttoptr (i64 1073790988 to i32*)
%20 = and i32 %19, -129
store volatile i32 %20, i32* inttoptr (i64 1073790988 to i32*)
store volatile i32 7, i32* inttoptr (i64 1073790984 to i32*)
ret void
}