void baud_max() {
  while (!((*(volatile unsigned int *)((0x14) + 0x40008000)) & (1 << 6)))
    ;
  (*(volatile unsigned int *)(0x40048078)) = 1;
  (*(volatile unsigned int *)(0x40048098)) = 1;
  (*(volatile unsigned int *)((0x28) + 0x40008000)) = (1 << 4) | 0;
  (*(volatile unsigned int *)((0x0C) + 0x40008000)) |= 1 << 7;
  (*(volatile unsigned int *)((0x04) + 0x40008000)) = 0;
  (*(volatile unsigned int *)((0x00) + 0x40008000)) = 1;
  (*(volatile unsigned int *)((0x0C) + 0x40008000)) &= ~(1 << 7);
  (*(volatile unsigned int *)((0x08) + 0x40008000)) = 0x7;
}


x86 assembly (clang, -O0):
<baud_max>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <baud_max+0x9>
mov    $0x40008014,%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    $0x40048078,%eax
movl   $0x1,(%rax)
mov    $0x40048098,%eax
movl   $0x1,(%rax)
mov    $0x40008028,%eax
movl   $0x10,(%rax)
mov    $0x4000800c,%eax
mov    (%rax),%ecx
or     $0x80,%ecx
mov    $0x4000800c,%eax
mov    %ecx,(%rax)
mov    $0x40008004,%eax
movl   $0x0,(%rax)
mov    $0x40008000,%eax
movl   $0x1,(%rax)
mov    $0x4000800c,%eax
mov    (%rax),%ecx
and    $0xffffff7f,%ecx
mov    $0x4000800c,%eax
mov    %ecx,(%rax)
mov    $0x40008008,%eax
movl   $0x7,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<baud_max>:
testl  $0x40,0x40008014
je     1100 <baud_max>
movl   $0x1,0x40048078
movl   $0x1,0x40048098
movl   $0x10,0x40008028
orl    $0x80,0x4000800c
movl   $0x0,0x40008004
movl   $0x1,0x40008000
andl   $0xffffff7f,0x4000800c
7f ff ff ff
movl   $0x7,0x40008008
ret

LLVM IR (-O0):
define void @baud_max() {
br label %1
1: ; preds = %6, %0
%2 = load volatile i32, i32* inttoptr (i64 1073774612 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
store volatile i32 1, i32* inttoptr (i64 1074036856 to i32*)
store volatile i32 1, i32* inttoptr (i64 1074036888 to i32*)
store volatile i32 16, i32* inttoptr (i64 1073774632 to i32*)
%8 = load volatile i32, i32* inttoptr (i64 1073774604 to i32*)
%9 = or i32 %8, 128
store volatile i32 %9, i32* inttoptr (i64 1073774604 to i32*)
store volatile i32 0, i32* inttoptr (i64 1073774596 to i32*)
store volatile i32 1, i32* inttoptr (i64 1073774592 to i32*)
%10 = load volatile i32, i32* inttoptr (i64 1073774604 to i32*)
%11 = and i32 %10, -129
store volatile i32 %11, i32* inttoptr (i64 1073774604 to i32*)
store volatile i32 7, i32* inttoptr (i64 1073774600 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 1073774612 to i32*)
%3 = and i32 %2, 64
%4 = icmp eq i32 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
store volatile i32 1, i32* inttoptr (i64 1074036856 to i32*)
store volatile i32 1, i32* inttoptr (i64 1074036888 to i32*)
store volatile i32 16, i32* inttoptr (i64 1073774632 to i32*)
%6 = load volatile i32, i32* inttoptr (i64 1073774604 to i32*)
%7 = or i32 %6, 128
store volatile i32 %7, i32* inttoptr (i64 1073774604 to i32*)
store volatile i32 0, i32* inttoptr (i64 1073774596 to i32*)
store volatile i32 1, i32* inttoptr (i64 1073774592 to i32*)
%8 = load volatile i32, i32* inttoptr (i64 1073774604 to i32*)
%9 = and i32 %8, -129
store volatile i32 %9, i32* inttoptr (i64 1073774604 to i32*)
store volatile i32 7, i32* inttoptr (i64 1073774600 to i32*)
ret void
}