void touchscreen_init() {
  (*(volatile unsigned long *)0x58000000) |= (1 << 14);
  (*(volatile unsigned long *)0x58000000) &= ~(0xff << 6);
  (*(volatile unsigned long *)0x58000000) |= (49 << 6);
  (*(volatile unsigned long *)0x58000000) &= ~(1 << 2);
  (*(volatile unsigned long *)0x4A000008) &= ~(1 << 31);
  (*(volatile unsigned long *)0x4A00001C) &= ~(1 << 9);
  (*(volatile unsigned long *)0x58000004) = 0xd3;
}


x86 assembly (clang, -O0):
<touchscreen_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x58000000,%eax
mov    (%rax),%rcx
or     $0x4000,%rcx
mov    $0x58000000,%eax
mov    %rcx,(%rax)
mov    $0x58000000,%eax
mov    (%rax),%rcx
and    $0xffffffffffffc03f,%rcx
mov    $0x58000000,%eax
mov    %rcx,(%rax)
mov    $0x58000000,%eax
mov    (%rax),%rcx
or     $0xc40,%rcx
mov    $0x58000000,%eax
mov    %rcx,(%rax)
mov    $0x58000000,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffb,%rcx
mov    $0x58000000,%eax
mov    %rcx,(%rax)
mov    $0x4a000008,%eax
mov    (%rax),%rcx
and    $0x7fffffff,%rcx
mov    $0x4a000008,%eax
mov    %rcx,(%rax)
mov    $0x4a00001c,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffdff,%rcx
mov    $0x4a00001c,%eax
mov    %rcx,(%rax)
mov    $0x58000004,%eax
movq   $0xd3,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<touchscreen_init>:
orq    $0x4000,0x58000000
andq   $0xffffffffffffc03f,0x58000000
58 3f c0 ff ff
orq    $0xc40,0x58000000
andq   $0xfffffffffffffffb,0x58000000
58 fb
andq   $0x7fffffff,0x4a000008
4a ff ff ff 7f
andq   $0xfffffffffffffdff,0x4a00001c
4a ff fd ff ff
movq   $0xd3,0x58000004
ret

LLVM IR (-O0):
define void @touchscreen_init() {
%1 = load volatile i64, i64* inttoptr (i64 1476395008 to i64*)
%2 = or i64 %1, 16384
store volatile i64 %2, i64* inttoptr (i64 1476395008 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 1476395008 to i64*)
%4 = and i64 %3, -16321
store volatile i64 %4, i64* inttoptr (i64 1476395008 to i64*)
%5 = load volatile i64, i64* inttoptr (i64 1476395008 to i64*)
%6 = or i64 %5, 3136
store volatile i64 %6, i64* inttoptr (i64 1476395008 to i64*)
%7 = load volatile i64, i64* inttoptr (i64 1476395008 to i64*)
%8 = and i64 %7, -5
store volatile i64 %8, i64* inttoptr (i64 1476395008 to i64*)
%9 = load volatile i64, i64* inttoptr (i64 1241513992 to i64*)
%10 = and i64 %9, 2147483647
store volatile i64 %10, i64* inttoptr (i64 1241513992 to i64*)
%11 = load volatile i64, i64* inttoptr (i64 1241514012 to i64*)
%12 = and i64 %11, -513
store volatile i64 %12, i64* inttoptr (i64 1241514012 to i64*)
store volatile i64 211, i64* inttoptr (i64 1476395012 to i64*)
ret void
}

LLVM IR (-O2):
define void @touchscreen_init() {
%1 = load volatile i64, i64* inttoptr (i64 1476395008 to i64*)
%2 = or i64 %1, 16384
store volatile i64 %2, i64* inttoptr (i64 1476395008 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 1476395008 to i64*)
%4 = and i64 %3, -16321
store volatile i64 %4, i64* inttoptr (i64 1476395008 to i64*)
%5 = load volatile i64, i64* inttoptr (i64 1476395008 to i64*)
%6 = or i64 %5, 3136
store volatile i64 %6, i64* inttoptr (i64 1476395008 to i64*)
%7 = load volatile i64, i64* inttoptr (i64 1476395008 to i64*)
%8 = and i64 %7, -5
store volatile i64 %8, i64* inttoptr (i64 1476395008 to i64*)
%9 = load volatile i64, i64* inttoptr (i64 1241513992 to i64*)
%10 = and i64 %9, 2147483647
store volatile i64 %10, i64* inttoptr (i64 1241513992 to i64*)
%11 = load volatile i64, i64* inttoptr (i64 1241514012 to i64*)
%12 = and i64 %11, -513
store volatile i64 %12, i64* inttoptr (i64 1241514012 to i64*)
store volatile i64 211, i64* inttoptr (i64 1476395012 to i64*)
ret void
}