void lcd_init(void) {
  (*((volatile unsigned long *)0x7F008100)) = 0xaaaaaaaa;
  (*((volatile unsigned long *)0x7F008120)) = 0xaaaaaaa;
  (*((volatile unsigned long *)0x7F0080A0)) &= ~(0x3 << 28);
  (*((volatile unsigned long *)0x7F0080A0)) |= (1 << 28);
  (*((volatile unsigned long *)0x7F008080)) &= ~(0xf);
  (*((volatile unsigned long *)0x7F008080)) |= (0x1);
  (*((volatile unsigned long *)0x7410800C)) &= ~(1 << 3);
  (*((volatile unsigned long *)0x7F0081A0)) &= ~(0x3);
  (*((volatile unsigned long *)0x7F0081A0)) |= 0x1;
  (*((volatile unsigned long *)0x77100000)) &=
      ~((3 << 26) | (3 << 17) | (0xff << 6) | (3 << 2));
  (*((volatile unsigned long *)0x77100000)) |= ((14 << 6) | (1 << 4));
  (*((volatile unsigned long *)0x77100000)) &= ~(0x3);
  (*((volatile unsigned long *)0x77100004)) &= ~((1 << 7) | (1 << 4));
  (*((volatile unsigned long *)0x77100004)) |= ((1 << 6) | (1 << 5));
  (*((volatile unsigned long *)0x77100010)) = (1 << 16) | (1 << 8) | (9 << 0);
  (*((volatile unsigned long *)0x77100014)) = (1 << 16) | (1 << 8) | (40 << 0);
  (*((volatile unsigned long *)0x77100018)) = (271 << 11) | (479 << 0);
  (*((volatile unsigned long *)0x77100020)) &= ~(0xf << 2);
  (*((volatile unsigned long *)0x77100020)) |= (0xb << 2) | (1 << 0);
  (*((volatile unsigned long *)0x77100040)) = (0 << 11) | (0 << 0);
  (*((volatile unsigned long *)0x77100044)) =
      ((479 + 1) << 11) | ((271 + 1) << 0);
  (*((volatile unsigned long *)0x77100048)) = (271 + 1) * (479 + 1);
  (*((volatile unsigned long *)0x771000A0)) = 0x54000000;
  (*((volatile unsigned long *)0x771000D0)) =
      (((479 + 1) * 4 + 0) * (271 + 1)) & (0xffffff);
  (*((volatile unsigned long *)0x77100100)) = 479 + 1;
}


x86 assembly (clang, -O0):
<lcd_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f008100,%eax
mov    $0xaaaaaaaa,%ecx
mov    %rcx,(%rax)
mov    $0x7f008120,%eax
movq   $0xaaaaaaa,(%rax)
mov    $0x7f0080a0,%eax
mov    (%rax),%rcx
and    $0xffffffffcfffffff,%rcx
mov    $0x7f0080a0,%eax
mov    %rcx,(%rax)
mov    $0x7f0080a0,%eax
mov    (%rax),%rcx
or     $0x10000000,%rcx
mov    $0x7f0080a0,%eax
mov    %rcx,(%rax)
mov    $0x7f008080,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffff0,%rcx
mov    $0x7f008080,%eax
mov    %rcx,(%rax)
mov    $0x7f008080,%eax
mov    (%rax),%rcx
or     $0x1,%rcx
mov    $0x7f008080,%eax
mov    %rcx,(%rax)
mov    $0x7410800c,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffff7,%rcx
mov    $0x7410800c,%eax
mov    %rcx,(%rax)
mov    $0x7f0081a0,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffc,%rcx
mov    $0x7f0081a0,%eax
mov    %rcx,(%rax)
mov    $0x7f0081a0,%eax
mov    (%rax),%rcx
or     $0x1,%rcx
mov    $0x7f0081a0,%eax
mov    %rcx,(%rax)
mov    $0x77100000,%eax
mov    (%rax),%rcx
and    $0xfffffffff3f9c033,%rcx
mov    $0x77100000,%eax
mov    %rcx,(%rax)
mov    $0x77100000,%eax
mov    (%rax),%rcx
or     $0x390,%rcx
mov    $0x77100000,%eax
mov    %rcx,(%rax)
mov    $0x77100000,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffc,%rcx
mov    $0x77100000,%eax
mov    %rcx,(%rax)
mov    $0x77100004,%eax
mov    (%rax),%rcx
and    $0xffffffffffffff6f,%rcx
mov    $0x77100004,%eax
mov    %rcx,(%rax)
mov    $0x77100004,%eax
mov    (%rax),%rcx
or     $0x60,%rcx
mov    $0x77100004,%eax
mov    %rcx,(%rax)
mov    $0x77100010,%eax
movq   $0x10109,(%rax)
mov    $0x77100014,%eax
movq   $0x10128,(%rax)
mov    $0x77100018,%eax
movq   $0x879df,(%rax)
mov    $0x77100020,%eax
mov    (%rax),%rcx
and    $0xffffffffffffffc3,%rcx
mov    $0x77100020,%eax
mov    %rcx,(%rax)
mov    $0x77100020,%eax
mov    (%rax),%rcx
or     $0x2d,%rcx
mov    $0x77100020,%eax
mov    %rcx,(%rax)
mov    $0x77100040,%eax
movq   $0x0,(%rax)
mov    $0x77100044,%eax
movq   $0xf0110,(%rax)
mov    $0x77100048,%eax
movq   $0x1fe00,(%rax)
mov    $0x771000a0,%eax
movq   $0x54000000,(%rax)
mov    $0x771000d0,%eax
movq   $0x7f800,(%rax)
mov    $0x77100100,%eax
movq   $0x1e0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_init>:
mov    $0xaaaaaaaa,%eax
mov    %rax,0x7f008100
7f
movq   $0xaaaaaaa,0x7f008120
7f aa aa aa 0a
andq   $0xffffffffcfffffff,0x7f0080a0
7f ff ff ff cf
orq    $0x10000000,0x7f0080a0
andq   $0xfffffffffffffff0,0x7f008080
7f f0
orq    $0x1,0x7f008080
7f 01
andq   $0xfffffffffffffff7,0x7410800c
74 f7
andq   $0xfffffffffffffffc,0x7f0081a0
7f fc
orq    $0x1,0x7f0081a0
7f 01
andq   $0xfffffffff3f9c033,0x77100000
77 33 c0 f9 f3
orq    $0x390,0x77100000
andq   $0xfffffffffffffffc,0x77100000
77 fc
andq   $0xffffffffffffff6f,0x77100004
77 6f ff ff ff
orq    $0x60,0x77100004
77 60
movq   $0x10109,0x77100010
movq   $0x10128,0x77100014
movq   $0x879df,0x77100018
andq   $0xffffffffffffffc3,0x77100020
77 c3
orq    $0x2d,0x77100020
77 2d
movq   $0x0,0x77100040
movq   $0xf0110,0x77100044
movq   $0x1fe00,0x77100048
movq   $0x54000000,0x771000a0
movq   $0x7f800,0x771000d0
movq   $0x1e0,0x77100100
ret

LLVM IR (-O0):
define void @lcd_init() {
store volatile i64 2863311530, i64* inttoptr (i64 2130739456 to i64*)
store volatile i64 178956970, i64* inttoptr (i64 2130739488 to i64*)
%1 = load volatile i64, i64* inttoptr (i64 2130739360 to i64*)
%2 = and i64 %1, -805306369
store volatile i64 %2, i64* inttoptr (i64 2130739360 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 2130739360 to i64*)
%4 = or i64 %3, 268435456
store volatile i64 %4, i64* inttoptr (i64 2130739360 to i64*)
%5 = load volatile i64, i64* inttoptr (i64 2130739328 to i64*)
%6 = and i64 %5, -16
store volatile i64 %6, i64* inttoptr (i64 2130739328 to i64*)
%7 = load volatile i64, i64* inttoptr (i64 2130739328 to i64*)
%8 = or i64 %7, 1
store volatile i64 %8, i64* inttoptr (i64 2130739328 to i64*)
%9 = load volatile i64, i64* inttoptr (i64 1947238412 to i64*)
%10 = and i64 %9, -9
store volatile i64 %10, i64* inttoptr (i64 1947238412 to i64*)
%11 = load volatile i64, i64* inttoptr (i64 2130739616 to i64*)
%12 = and i64 %11, -4
store volatile i64 %12, i64* inttoptr (i64 2130739616 to i64*)
%13 = load volatile i64, i64* inttoptr (i64 2130739616 to i64*)
%14 = or i64 %13, 1
store volatile i64 %14, i64* inttoptr (i64 2130739616 to i64*)
%15 = load volatile i64, i64* inttoptr (i64 1997537280 to i64*)
%16 = and i64 %15, -201736141
store volatile i64 %16, i64* inttoptr (i64 1997537280 to i64*)
%17 = load volatile i64, i64* inttoptr (i64 1997537280 to i64*)
%18 = or i64 %17, 912
store volatile i64 %18, i64* inttoptr (i64 1997537280 to i64*)
%19 = load volatile i64, i64* inttoptr (i64 1997537280 to i64*)
%20 = and i64 %19, -4
store volatile i64 %20, i64* inttoptr (i64 1997537280 to i64*)
%21 = load volatile i64, i64* inttoptr (i64 1997537284 to i64*)
%22 = and i64 %21, -145
store volatile i64 %22, i64* inttoptr (i64 1997537284 to i64*)
%23 = load volatile i64, i64* inttoptr (i64 1997537284 to i64*)
%24 = or i64 %23, 96
store volatile i64 %24, i64* inttoptr (i64 1997537284 to i64*)
store volatile i64 65801, i64* inttoptr (i64 1997537296 to i64*)
store volatile i64 65832, i64* inttoptr (i64 1997537300 to i64*)
store volatile i64 555487, i64* inttoptr (i64 1997537304 to i64*)
%25 = load volatile i64, i64* inttoptr (i64 1997537312 to i64*)
%26 = and i64 %25, -61
store volatile i64 %26, i64* inttoptr (i64 1997537312 to i64*)
%27 = load volatile i64, i64* inttoptr (i64 1997537312 to i64*)
%28 = or i64 %27, 45
store volatile i64 %28, i64* inttoptr (i64 1997537312 to i64*)
store volatile i64 0, i64* inttoptr (i64 1997537344 to i64*)
store volatile i64 983312, i64* inttoptr (i64 1997537348 to i64*)
store volatile i64 130560, i64* inttoptr (i64 1997537352 to i64*)
store volatile i64 1409286144, i64* inttoptr (i64 1997537440 to i64*)
store volatile i64 522240, i64* inttoptr (i64 1997537488 to i64*)
store volatile i64 480, i64* inttoptr (i64 1997537536 to i64*)
ret void
}

LLVM IR (-O2):
define void @lcd_init() {
store volatile i64 2863311530, i64* inttoptr (i64 2130739456 to i64*)
store volatile i64 178956970, i64* inttoptr (i64 2130739488 to i64*)
%1 = load volatile i64, i64* inttoptr (i64 2130739360 to i64*)
%2 = and i64 %1, -805306369
store volatile i64 %2, i64* inttoptr (i64 2130739360 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 2130739360 to i64*)
%4 = or i64 %3, 268435456
store volatile i64 %4, i64* inttoptr (i64 2130739360 to i64*)
%5 = load volatile i64, i64* inttoptr (i64 2130739328 to i64*)
%6 = and i64 %5, -16
store volatile i64 %6, i64* inttoptr (i64 2130739328 to i64*)
%7 = load volatile i64, i64* inttoptr (i64 2130739328 to i64*)
%8 = or i64 %7, 1
store volatile i64 %8, i64* inttoptr (i64 2130739328 to i64*)
%9 = load volatile i64, i64* inttoptr (i64 1947238412 to i64*)
%10 = and i64 %9, -9
store volatile i64 %10, i64* inttoptr (i64 1947238412 to i64*)
%11 = load volatile i64, i64* inttoptr (i64 2130739616 to i64*)
%12 = and i64 %11, -4
store volatile i64 %12, i64* inttoptr (i64 2130739616 to i64*)
%13 = load volatile i64, i64* inttoptr (i64 2130739616 to i64*)
%14 = or i64 %13, 1
store volatile i64 %14, i64* inttoptr (i64 2130739616 to i64*)
%15 = load volatile i64, i64* inttoptr (i64 1997537280 to i64*)
%16 = and i64 %15, -201736141
store volatile i64 %16, i64* inttoptr (i64 1997537280 to i64*)
%17 = load volatile i64, i64* inttoptr (i64 1997537280 to i64*)
%18 = or i64 %17, 912
store volatile i64 %18, i64* inttoptr (i64 1997537280 to i64*)
%19 = load volatile i64, i64* inttoptr (i64 1997537280 to i64*)
%20 = and i64 %19, -4
store volatile i64 %20, i64* inttoptr (i64 1997537280 to i64*)
%21 = load volatile i64, i64* inttoptr (i64 1997537284 to i64*)
%22 = and i64 %21, -145
store volatile i64 %22, i64* inttoptr (i64 1997537284 to i64*)
%23 = load volatile i64, i64* inttoptr (i64 1997537284 to i64*)
%24 = or i64 %23, 96
store volatile i64 %24, i64* inttoptr (i64 1997537284 to i64*)
store volatile i64 65801, i64* inttoptr (i64 1997537296 to i64*)
store volatile i64 65832, i64* inttoptr (i64 1997537300 to i64*)
store volatile i64 555487, i64* inttoptr (i64 1997537304 to i64*)
%25 = load volatile i64, i64* inttoptr (i64 1997537312 to i64*)
%26 = and i64 %25, -61
store volatile i64 %26, i64* inttoptr (i64 1997537312 to i64*)
%27 = load volatile i64, i64* inttoptr (i64 1997537312 to i64*)
%28 = or i64 %27, 45
store volatile i64 %28, i64* inttoptr (i64 1997537312 to i64*)
store volatile i64 0, i64* inttoptr (i64 1997537344 to i64*)
store volatile i64 983312, i64* inttoptr (i64 1997537348 to i64*)
store volatile i64 130560, i64* inttoptr (i64 1997537352 to i64*)
store volatile i64 1409286144, i64* inttoptr (i64 1997537440 to i64*)
store volatile i64 522240, i64* inttoptr (i64 1997537488 to i64*)
store volatile i64 480, i64* inttoptr (i64 1997537536 to i64*)
ret void
}