#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ pmp_master_write(int);
int /*<<< orphan*/ pmp_set_address(int /*<<< orphan*/);
int /*<<< orphan*/ udelay(int);
void lcd_init(void) {
  *(volatile unsigned *)(0xBF800000 + (0x7000)) =
      0x8000 | 0x0100 | 0x0200 | 0x0001 | 0x0002;
  *(volatile unsigned *)(0xBF800000 + (0x7010)) =
      0x0300 | ((4) << 6) | ((15) << 2) | ((4) << 0);
  *(volatile unsigned *)(0xBF800000 + (0x7050)) = 0x0001;
  udelay(30000);
  pmp_set_address(0);
  pmp_master_write(0x38);
  udelay(50);
  pmp_master_write(0x0c);
  udelay(50);
  pmp_master_write(0x01);
  udelay(2000);
  pmp_master_write(0x06);
  udelay(2000);
}


x86 assembly (clang, -O0):
<lcd_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xbf807000,%eax
movl   $0x8303,(%rax)
mov    $0xbf807010,%eax
movl   $0x33c,(%rax)
mov    $0xbf807050,%eax
movl   $0x1,(%rax)
mov    $0x7530,%edi
call   1050 <udelay@plt>
xor    %edi,%edi
call   1040 <pmp_set_address@plt>
mov    $0x38,%edi
call   1030 <pmp_master_write@plt>
mov    $0x32,%edi
call   1050 <udelay@plt>
mov    $0xc,%edi
call   1030 <pmp_master_write@plt>
mov    $0x32,%edi
call   1050 <udelay@plt>
mov    $0x1,%edi
call   1030 <pmp_master_write@plt>
mov    $0x7d0,%edi
call   1050 <udelay@plt>
mov    $0x6,%edi
call   1030 <pmp_master_write@plt>
mov    $0x7d0,%edi
call   1050 <udelay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_init>:
push   %rax
mov    $0xbf807000,%eax
movl   $0x8303,(%rax)
movl   $0x33c,0x10(%rax)
movl   $0x1,0x50(%rax)
mov    $0x7530,%edi
call   1050 <udelay@plt>
xor    %edi,%edi
call   1040 <pmp_set_address@plt>
mov    $0x38,%edi
call   1030 <pmp_master_write@plt>
mov    $0x32,%edi
call   1050 <udelay@plt>
mov    $0xc,%edi
call   1030 <pmp_master_write@plt>
mov    $0x32,%edi
call   1050 <udelay@plt>
mov    $0x1,%edi
call   1030 <pmp_master_write@plt>
mov    $0x7d0,%edi
call   1050 <udelay@plt>
mov    $0x6,%edi
call   1030 <pmp_master_write@plt>
mov    $0x7d0,%edi
pop    %rax
jmp    1050 <udelay@plt>

LLVM IR (-O0):
define void @lcd_init() {
store volatile i32 33539, i32* inttoptr (i64 3212865536 to i32*)
store volatile i32 828, i32* inttoptr (i64 3212865552 to i32*)
store volatile i32 1, i32* inttoptr (i64 3212865616 to i32*)
%1 = call i32 @udelay(i32 30000)
%2 = call i32 @pmp_set_address(i32 0)
%3 = call i32 @pmp_master_write(i32 56)
%4 = call i32 @udelay(i32 50)
%5 = call i32 @pmp_master_write(i32 12)
%6 = call i32 @udelay(i32 50)
%7 = call i32 @pmp_master_write(i32 1)
%8 = call i32 @udelay(i32 2000)
%9 = call i32 @pmp_master_write(i32 6)
%10 = call i32 @udelay(i32 2000)
ret void
}

LLVM IR (-O2):
define void @lcd_init() {
store volatile i32 33539, i32* inttoptr (i64 3212865536 to i32*)
store volatile i32 828, i32* inttoptr (i64 3212865552 to i32*)
store volatile i32 1, i32* inttoptr (i64 3212865616 to i32*)
%1 = tail call i32 @udelay(i32 30000)
%2 = tail call i32 @pmp_set_address(i32 0)
%3 = tail call i32 @pmp_master_write(i32 56)
%4 = tail call i32 @udelay(i32 50)
%5 = tail call i32 @pmp_master_write(i32 12)
%6 = tail call i32 @udelay(i32 50)
%7 = tail call i32 @pmp_master_write(i32 1)
%8 = tail call i32 @udelay(i32 2000)
%9 = tail call i32 @pmp_master_write(i32 6)
%10 = tail call i32 @udelay(i32 2000)
ret void
}