void lcd_init(void) {
  (*(volatile unsigned int *)0xE0200120) = 0x22222222;
  (*(volatile unsigned int *)0xE0200140) = 0x22222222;
  (*(volatile unsigned int *)0xE0200160) = 0x22222222;
  (*(volatile unsigned int *)0xE0200180) = 0x22222222;
  (*(volatile unsigned int *)0xE02000A0) |= 1 << 4;
  (*(volatile unsigned int *)0xE02000A4) |= 1 << 1;
  (*(volatile unsigned int *)0xe0107008) = 2 << 0;
  (*(volatile unsigned int *)0xF8000000) &=
      ~((3 << 26) | (1 << 18) | (0xff << 6) | (1 << 2));
  (*(volatile unsigned int *)0xF8000000) |= ((5 << 6) | (1 << 4));
  (*(volatile unsigned int *)0xF8000004) &= ~(1 << 7);
  (*(volatile unsigned int *)0xF8000004) |= ((1 << 6) | (1 << 5));
  (*(volatile unsigned int *)0xF8000010) = (13 << 16) | (21 << 8) | (9 << 0);
  (*(volatile unsigned int *)0xF8000014) = (25 << 16) | (209 << 8) | (19 << 0);
  (*(volatile unsigned int *)0xF8000018) = (479 << 11) | (799 << 0);
  (*(volatile unsigned int *)0xF8000020) &= ~(0xf << 2);
  (*(volatile unsigned int *)0xF8000020) |= (0xB << 2) | (1 << 15);
  (*(volatile unsigned int *)0xF8000040) = (0 << 11) | (0 << 0);
  (*(volatile unsigned int *)0xF8000044) = (799 << 11) | (479 << 0);
  (*(volatile unsigned int *)0xF8000048) = (479 + 1) * (799 + 1);
  (*(volatile unsigned int *)0xF80000A0) = (0x3f000000);
  (*(volatile unsigned int *)0xF80000D0) =
      (((799 + 1) * 4 + 0) * (479 + 1)) & (0xffffff);
  (*(volatile unsigned int *)0xF8000034) = 0x1;
  (*(volatile unsigned int *)0xF8000000) |= 0x3;
  (*(volatile unsigned int *)0xF8000020) |= 1;
}


x86 assembly (clang, -O0):
<lcd_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe0200120,%eax
movl   $0x22222222,(%rax)
mov    $0xe0200140,%eax
movl   $0x22222222,(%rax)
mov    $0xe0200160,%eax
movl   $0x22222222,(%rax)
mov    $0xe0200180,%eax
movl   $0x22222222,(%rax)
mov    $0xe02000a0,%eax
mov    (%rax),%ecx
or     $0x10,%ecx
mov    $0xe02000a0,%eax
mov    %ecx,(%rax)
mov    $0xe02000a4,%eax
mov    (%rax),%ecx
or     $0x2,%ecx
mov    $0xe02000a4,%eax
mov    %ecx,(%rax)
mov    $0xe0107008,%eax
movl   $0x2,(%rax)
mov    $0xf8000000,%eax
mov    (%rax),%ecx
and    $0xf3fbc03b,%ecx
mov    $0xf8000000,%eax
mov    %ecx,(%rax)
mov    $0xf8000000,%eax
mov    (%rax),%ecx
or     $0x150,%ecx
mov    $0xf8000000,%eax
mov    %ecx,(%rax)
mov    $0xf8000004,%eax
mov    (%rax),%ecx
and    $0xffffff7f,%ecx
mov    $0xf8000004,%eax
mov    %ecx,(%rax)
mov    $0xf8000004,%eax
mov    (%rax),%ecx
or     $0x60,%ecx
mov    $0xf8000004,%eax
mov    %ecx,(%rax)
mov    $0xf8000010,%eax
movl   $0xd1509,(%rax)
mov    $0xf8000014,%eax
movl   $0x19d113,(%rax)
mov    $0xf8000018,%eax
movl   $0xefb1f,(%rax)
mov    $0xf8000020,%eax
mov    (%rax),%ecx
and    $0xffffffc3,%ecx
mov    $0xf8000020,%eax
mov    %ecx,(%rax)
mov    $0xf8000020,%eax
mov    (%rax),%ecx
or     $0x802c,%ecx
mov    $0xf8000020,%eax
mov    %ecx,(%rax)
mov    $0xf8000040,%eax
movl   $0x0,(%rax)
mov    $0xf8000044,%eax
movl   $0x18f9df,(%rax)
mov    $0xf8000048,%eax
movl   $0x5dc00,(%rax)
mov    $0xf80000a0,%eax
movl   $0x3f000000,(%rax)
mov    $0xf80000d0,%eax
movl   $0x177000,(%rax)
mov    $0xf8000034,%eax
movl   $0x1,(%rax)
mov    $0xf8000000,%eax
mov    (%rax),%ecx
or     $0x3,%ecx
mov    $0xf8000000,%eax
mov    %ecx,(%rax)
mov    $0xf8000020,%eax
mov    (%rax),%ecx
or     $0x1,%ecx
mov    $0xf8000020,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_init>:
mov    $0xf8000000,%eax
movl   $0x22222222,-0x17dffee0(%rax)
22 22 22
movl   $0x22222222,-0x17dffec0(%rax)
22 22 22
movl   $0x22222222,-0x17dffea0(%rax)
22 22 22
movl   $0x22222222,-0x17dffe80(%rax)
22 22 22
orl    $0x10,-0x17dfff60(%rax)
orl    $0x2,-0x17dfff5c(%rax)
movl   $0x2,-0x17ef8ff8(%rax)
andl   $0xf3fbc03b,(%rax)
orl    $0x150,(%rax)
andl   $0xffffff7f,0x4(%rax)
orl    $0x60,0x4(%rax)
movl   $0xd1509,0x10(%rax)
movl   $0x19d113,0x14(%rax)
movl   $0xefb1f,0x18(%rax)
andl   $0xffffffc3,0x20(%rax)
orl    $0x802c,0x20(%rax)
movl   $0x0,0x40(%rax)
movl   $0x18f9df,0x44(%rax)
movl   $0x5dc00,0x48(%rax)
movl   $0x3f000000,0xa0(%rax)
movl   $0x177000,0xd0(%rax)
movl   $0x1,0x34(%rax)
orl    $0x3,(%rax)
orl    $0x1,0x20(%rax)
ret

LLVM IR (-O0):
define void @lcd_init() {
store volatile i32 572662306, i32* inttoptr (i64 3760193824 to i32*)
store volatile i32 572662306, i32* inttoptr (i64 3760193856 to i32*)
store volatile i32 572662306, i32* inttoptr (i64 3760193888 to i32*)
store volatile i32 572662306, i32* inttoptr (i64 3760193920 to i32*)
%1 = load volatile i32, i32* inttoptr (i64 3760193696 to i32*)
%2 = or i32 %1, 16
store volatile i32 %2, i32* inttoptr (i64 3760193696 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 3760193700 to i32*)
%4 = or i32 %3, 2
store volatile i32 %4, i32* inttoptr (i64 3760193700 to i32*)
store volatile i32 2, i32* inttoptr (i64 3759173640 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 4160749568 to i32*)
%6 = and i32 %5, -201605061
store volatile i32 %6, i32* inttoptr (i64 4160749568 to i32*)
%7 = load volatile i32, i32* inttoptr (i64 4160749568 to i32*)
%8 = or i32 %7, 336
store volatile i32 %8, i32* inttoptr (i64 4160749568 to i32*)
%9 = load volatile i32, i32* inttoptr (i64 4160749572 to i32*)
%10 = and i32 %9, -129
store volatile i32 %10, i32* inttoptr (i64 4160749572 to i32*)
%11 = load volatile i32, i32* inttoptr (i64 4160749572 to i32*)
%12 = or i32 %11, 96
store volatile i32 %12, i32* inttoptr (i64 4160749572 to i32*)
store volatile i32 857353, i32* inttoptr (i64 4160749584 to i32*)
store volatile i32 1691923, i32* inttoptr (i64 4160749588 to i32*)
store volatile i32 981791, i32* inttoptr (i64 4160749592 to i32*)
%13 = load volatile i32, i32* inttoptr (i64 4160749600 to i32*)
%14 = and i32 %13, -61
store volatile i32 %14, i32* inttoptr (i64 4160749600 to i32*)
%15 = load volatile i32, i32* inttoptr (i64 4160749600 to i32*)
%16 = or i32 %15, 32812
store volatile i32 %16, i32* inttoptr (i64 4160749600 to i32*)
store volatile i32 0, i32* inttoptr (i64 4160749632 to i32*)
store volatile i32 1636831, i32* inttoptr (i64 4160749636 to i32*)
store volatile i32 384000, i32* inttoptr (i64 4160749640 to i32*)
store volatile i32 1056964608, i32* inttoptr (i64 4160749728 to i32*)
store volatile i32 1536000, i32* inttoptr (i64 4160749776 to i32*)
store volatile i32 1, i32* inttoptr (i64 4160749620 to i32*)
%17 = load volatile i32, i32* inttoptr (i64 4160749568 to i32*)
%18 = or i32 %17, 3
store volatile i32 %18, i32* inttoptr (i64 4160749568 to i32*)
%19 = load volatile i32, i32* inttoptr (i64 4160749600 to i32*)
%20 = or i32 %19, 1
store volatile i32 %20, i32* inttoptr (i64 4160749600 to i32*)
ret void
}

LLVM IR (-O2):
define void @lcd_init() {
store volatile i32 572662306, i32* inttoptr (i64 3760193824 to i32*)
store volatile i32 572662306, i32* inttoptr (i64 3760193856 to i32*)
store volatile i32 572662306, i32* inttoptr (i64 3760193888 to i32*)
store volatile i32 572662306, i32* inttoptr (i64 3760193920 to i32*)
%1 = load volatile i32, i32* inttoptr (i64 3760193696 to i32*)
%2 = or i32 %1, 16
store volatile i32 %2, i32* inttoptr (i64 3760193696 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 3760193700 to i32*)
%4 = or i32 %3, 2
store volatile i32 %4, i32* inttoptr (i64 3760193700 to i32*)
store volatile i32 2, i32* inttoptr (i64 3759173640 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 4160749568 to i32*)
%6 = and i32 %5, -201605061
store volatile i32 %6, i32* inttoptr (i64 4160749568 to i32*)
%7 = load volatile i32, i32* inttoptr (i64 4160749568 to i32*)
%8 = or i32 %7, 336
store volatile i32 %8, i32* inttoptr (i64 4160749568 to i32*)
%9 = load volatile i32, i32* inttoptr (i64 4160749572 to i32*)
%10 = and i32 %9, -129
store volatile i32 %10, i32* inttoptr (i64 4160749572 to i32*)
%11 = load volatile i32, i32* inttoptr (i64 4160749572 to i32*)
%12 = or i32 %11, 96
store volatile i32 %12, i32* inttoptr (i64 4160749572 to i32*)
store volatile i32 857353, i32* inttoptr (i64 4160749584 to i32*)
store volatile i32 1691923, i32* inttoptr (i64 4160749588 to i32*)
store volatile i32 981791, i32* inttoptr (i64 4160749592 to i32*)
%13 = load volatile i32, i32* inttoptr (i64 4160749600 to i32*)
%14 = and i32 %13, -61
store volatile i32 %14, i32* inttoptr (i64 4160749600 to i32*)
%15 = load volatile i32, i32* inttoptr (i64 4160749600 to i32*)
%16 = or i32 %15, 32812
store volatile i32 %16, i32* inttoptr (i64 4160749600 to i32*)
store volatile i32 0, i32* inttoptr (i64 4160749632 to i32*)
store volatile i32 1636831, i32* inttoptr (i64 4160749636 to i32*)
store volatile i32 384000, i32* inttoptr (i64 4160749640 to i32*)
store volatile i32 1056964608, i32* inttoptr (i64 4160749728 to i32*)
store volatile i32 1536000, i32* inttoptr (i64 4160749776 to i32*)
store volatile i32 1, i32* inttoptr (i64 4160749620 to i32*)
%17 = load volatile i32, i32* inttoptr (i64 4160749568 to i32*)
%18 = or i32 %17, 3
store volatile i32 %18, i32* inttoptr (i64 4160749568 to i32*)
%19 = load volatile i32, i32* inttoptr (i64 4160749600 to i32*)
%20 = or i32 %19, 1
store volatile i32 %20, i32* inttoptr (i64 4160749600 to i32*)
ret void
}