void uart_init(void) {
  (*(volatile unsigned int *)0x56000070) &= ~((3 << 2) | (3 << 0));
  (*(volatile unsigned int *)0x56000070) |= (2 << 2) | (2 << 0);
  (*(volatile unsigned int *)0x56000070) &= ~((3 << 14) | (3 << 12));
  (*(volatile unsigned int *)0x56000070) |= (2 << 14) | (2 << 12);
  (*(volatile unsigned int *)0x56000078) &= ~((3 << 2) | (3 << 0));
  (*(volatile unsigned int *)0x56000078) |= (2 << 2) | (2 << 0);
  (*(volatile unsigned int *)0x56000078) &= ~((3 << 14) | (3 << 12));
  (*(volatile unsigned int *)0x56000078) |= (2 << 14) | (2 << 12);
  (*(volatile unsigned char *)0x50000000) = 0x3;
  (*(volatile unsigned int *)0x50000004) = 0x5;
  (*(volatile unsigned char *)0x5000000C) = 0x0;
  (*(volatile unsigned char *)0x50000008) = 0x0;
  (*(volatile unsigned short *)0x50000028) = 34;
  (*(volatile unsigned short *)0x5000002C) = 0xDFDD;
  return;
}


x86 assembly (clang, -O0):
<uart_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x56000070,%eax
mov    (%rax),%ecx
and    $0xfffffff0,%ecx
mov    $0x56000070,%eax
mov    %ecx,(%rax)
mov    $0x56000070,%eax
mov    (%rax),%ecx
or     $0xa,%ecx
mov    $0x56000070,%eax
mov    %ecx,(%rax)
mov    $0x56000070,%eax
mov    (%rax),%ecx
and    $0xffff0fff,%ecx
mov    $0x56000070,%eax
mov    %ecx,(%rax)
mov    $0x56000070,%eax
mov    (%rax),%ecx
or     $0xa000,%ecx
mov    $0x56000070,%eax
mov    %ecx,(%rax)
mov    $0x56000078,%eax
mov    (%rax),%ecx
and    $0xfffffff0,%ecx
mov    $0x56000078,%eax
mov    %ecx,(%rax)
mov    $0x56000078,%eax
mov    (%rax),%ecx
or     $0xa,%ecx
mov    $0x56000078,%eax
mov    %ecx,(%rax)
mov    $0x56000078,%eax
mov    (%rax),%ecx
and    $0xffff0fff,%ecx
mov    $0x56000078,%eax
mov    %ecx,(%rax)
mov    $0x56000078,%eax
mov    (%rax),%ecx
or     $0xa000,%ecx
mov    $0x56000078,%eax
mov    %ecx,(%rax)
mov    $0x50000000,%eax
movb   $0x3,(%rax)
mov    $0x50000004,%eax
movl   $0x5,(%rax)
mov    $0x5000000c,%eax
movb   $0x0,(%rax)
mov    $0x50000008,%eax
movb   $0x0,(%rax)
mov    $0x50000028,%eax
movw   $0x22,(%rax)
mov    $0x5000002c,%eax
movw   $0xdfdd,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_init>:
andl   $0xfffffff0,0x56000070
f0
orl    $0xa,0x56000070
0a
andl   $0xffff0fff,0x56000070
ff 0f ff ff
orl    $0xa000,0x56000070
andl   $0xfffffff0,0x56000078
f0
orl    $0xa,0x56000078
0a
andl   $0xffff0fff,0x56000078
ff 0f ff ff
orl    $0xa000,0x56000078
movb   $0x3,0x50000000
03
movl   $0x5,0x50000004
movb   $0x0,0x5000000c
movb   $0x0,0x50000008
movw   $0x22,0x50000028
movw   $0xdfdd,0x5000002c
50 dd df
ret

LLVM IR (-O0):
define void @uart_init() {
%1 = load volatile i32, i32* inttoptr (i64 1442840688 to i32*)
%2 = and i32 %1, -16
store volatile i32 %2, i32* inttoptr (i64 1442840688 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 1442840688 to i32*)
%4 = or i32 %3, 10
store volatile i32 %4, i32* inttoptr (i64 1442840688 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 1442840688 to i32*)
%6 = and i32 %5, -61441
store volatile i32 %6, i32* inttoptr (i64 1442840688 to i32*)
%7 = load volatile i32, i32* inttoptr (i64 1442840688 to i32*)
%8 = or i32 %7, 40960
store volatile i32 %8, i32* inttoptr (i64 1442840688 to i32*)
%9 = load volatile i32, i32* inttoptr (i64 1442840696 to i32*)
%10 = and i32 %9, -16
store volatile i32 %10, i32* inttoptr (i64 1442840696 to i32*)
%11 = load volatile i32, i32* inttoptr (i64 1442840696 to i32*)
%12 = or i32 %11, 10
store volatile i32 %12, i32* inttoptr (i64 1442840696 to i32*)
%13 = load volatile i32, i32* inttoptr (i64 1442840696 to i32*)
%14 = and i32 %13, -61441
store volatile i32 %14, i32* inttoptr (i64 1442840696 to i32*)
%15 = load volatile i32, i32* inttoptr (i64 1442840696 to i32*)
%16 = or i32 %15, 40960
store volatile i32 %16, i32* inttoptr (i64 1442840696 to i32*)
store volatile i8 3, i8* inttoptr (i64 1342177280 to i8*)
store volatile i32 5, i32* inttoptr (i64 1342177284 to i32*)
store volatile i8 0, i8* inttoptr (i64 1342177292 to i8*)
store volatile i8 0, i8* inttoptr (i64 1342177288 to i8*)
store volatile i16 34, i16* inttoptr (i64 1342177320 to i16*)
store volatile i16 -8227, i16* inttoptr (i64 1342177324 to i16*)
ret void
}

LLVM IR (-O2):
define void @uart_init() {
%1 = load volatile i32, i32* inttoptr (i64 1442840688 to i32*)
%2 = and i32 %1, -16
store volatile i32 %2, i32* inttoptr (i64 1442840688 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 1442840688 to i32*)
%4 = or i32 %3, 10
store volatile i32 %4, i32* inttoptr (i64 1442840688 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 1442840688 to i32*)
%6 = and i32 %5, -61441
store volatile i32 %6, i32* inttoptr (i64 1442840688 to i32*)
%7 = load volatile i32, i32* inttoptr (i64 1442840688 to i32*)
%8 = or i32 %7, 40960
store volatile i32 %8, i32* inttoptr (i64 1442840688 to i32*)
%9 = load volatile i32, i32* inttoptr (i64 1442840696 to i32*)
%10 = and i32 %9, -16
store volatile i32 %10, i32* inttoptr (i64 1442840696 to i32*)
%11 = load volatile i32, i32* inttoptr (i64 1442840696 to i32*)
%12 = or i32 %11, 10
store volatile i32 %12, i32* inttoptr (i64 1442840696 to i32*)
%13 = load volatile i32, i32* inttoptr (i64 1442840696 to i32*)
%14 = and i32 %13, -61441
store volatile i32 %14, i32* inttoptr (i64 1442840696 to i32*)
%15 = load volatile i32, i32* inttoptr (i64 1442840696 to i32*)
%16 = or i32 %15, 40960
store volatile i32 %16, i32* inttoptr (i64 1442840696 to i32*)
store volatile i8 3, i8* inttoptr (i64 1342177280 to i8*)
store volatile i32 5, i32* inttoptr (i64 1342177284 to i32*)
store volatile i8 0, i8* inttoptr (i64 1342177292 to i8*)
store volatile i8 0, i8* inttoptr (i64 1342177288 to i8*)
store volatile i16 34, i16* inttoptr (i64 1342177320 to i16*)
store volatile i16 -8227, i16* inttoptr (i64 1342177324 to i16*)
ret void
}