#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*/ GPIOPinWrite(int, int, int);
int /*<<< orphan*/ LCD_clean();
int /*<<< orphan*/ LCD_init_gpio();
int /*<<< orphan*/ LCD_write_byte(int, int /*<<< orphan*/);
int SysCtlClockGet();
int /*<<< orphan*/ SysCtlDelay(int);
void LCD_init(void) {
  LCD_init_gpio();
  GPIOPinWrite(0x40004000, 0x00000002, 0x00);
  SysCtlDelay((1) * (SysCtlClockGet() / 3000000));
  ;
  GPIOPinWrite(0x40004000, 0x00000002, 0xff);
  GPIOPinWrite(0x40004000, 0x00000001, 0x00);
  SysCtlDelay((1) * (SysCtlClockGet() / 3000000));
  ;
  GPIOPinWrite(0x40004000, 0x00000001, 0xff);
  SysCtlDelay((1) * (SysCtlClockGet() / 3000000));
  ;
  LCD_write_byte(0x21, 0);
  LCD_write_byte(0xc8, 0);
  LCD_write_byte(0x13, 0);
  LCD_write_byte(0x06, 0);
  LCD_write_byte(0x20, 0);
  LCD_write_byte(0x0c, 0);
  LCD_clean();
}


x86 assembly (clang, -O0):
<LCD_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <LCD_init_gpio@plt>
mov    $0x40004000,%edi
mov    $0x2,%esi
xor    %edx,%edx
call   1080 <GPIOPinWrite@plt>
mov    $0x0,%al
call   1030 <SysCtlClockGet@plt>
mov    $0x2dc6c0,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
shl    $0x0,%edi
call   1070 <SysCtlDelay@plt>
mov    $0x40004000,%edi
mov    $0x2,%esi
mov    $0xff,%edx
call   1080 <GPIOPinWrite@plt>
mov    $0x40004000,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1080 <GPIOPinWrite@plt>
mov    $0x0,%al
call   1030 <SysCtlClockGet@plt>
mov    $0x2dc6c0,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
shl    $0x0,%edi
call   1070 <SysCtlDelay@plt>
mov    $0x40004000,%edi
mov    $0x1,%esi
mov    $0xff,%edx
call   1080 <GPIOPinWrite@plt>
mov    $0x0,%al
call   1030 <SysCtlClockGet@plt>
mov    $0x2dc6c0,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
shl    $0x0,%edi
call   1070 <SysCtlDelay@plt>
mov    $0x21,%edi
xor    %esi,%esi
call   1040 <LCD_write_byte@plt>
mov    $0xc8,%edi
xor    %esi,%esi
call   1040 <LCD_write_byte@plt>
mov    $0x13,%edi
xor    %esi,%esi
call   1040 <LCD_write_byte@plt>
mov    $0x6,%edi
xor    %esi,%esi
call   1040 <LCD_write_byte@plt>
mov    $0x20,%edi
xor    %esi,%esi
call   1040 <LCD_write_byte@plt>
mov    $0xc,%edi
xor    %esi,%esi
call   1040 <LCD_write_byte@plt>
mov    $0x0,%al
call   1060 <LCD_clean@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_init>:
push   %rax
xor    %eax,%eax
call   1050 <LCD_init_gpio@plt>
mov    $0x40004000,%edi
mov    $0x2,%esi
xor    %edx,%edx
call   1080 <GPIOPinWrite@plt>
xor    %eax,%eax
call   1030 <SysCtlClockGet@plt>
cltq
imul   $0x165e9f81,%rax,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x32,%rdi
add    %eax,%edi
call   1070 <SysCtlDelay@plt>
mov    $0x40004000,%edi
mov    $0x2,%esi
mov    $0xff,%edx
call   1080 <GPIOPinWrite@plt>
mov    $0x40004000,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1080 <GPIOPinWrite@plt>
xor    %eax,%eax
call   1030 <SysCtlClockGet@plt>
cltq
imul   $0x165e9f81,%rax,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x32,%rdi
add    %eax,%edi
call   1070 <SysCtlDelay@plt>
mov    $0x40004000,%edi
mov    $0x1,%esi
mov    $0xff,%edx
call   1080 <GPIOPinWrite@plt>
xor    %eax,%eax
call   1030 <SysCtlClockGet@plt>
cltq
imul   $0x165e9f81,%rax,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x32,%rdi
add    %eax,%edi
call   1070 <SysCtlDelay@plt>
mov    $0x21,%edi
xor    %esi,%esi
call   1040 <LCD_write_byte@plt>
mov    $0xc8,%edi
xor    %esi,%esi
call   1040 <LCD_write_byte@plt>
mov    $0x13,%edi
xor    %esi,%esi
call   1040 <LCD_write_byte@plt>
mov    $0x6,%edi
xor    %esi,%esi
call   1040 <LCD_write_byte@plt>
mov    $0x20,%edi
xor    %esi,%esi
call   1040 <LCD_write_byte@plt>
mov    $0xc,%edi
xor    %esi,%esi
call   1040 <LCD_write_byte@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <LCD_clean@plt>

LLVM IR (-O0):
define void @LCD_init() {
%1 = call i32 (...) @LCD_init_gpio()
%2 = call i32 @GPIOPinWrite(i32 1073758208, i32 2, i32 0)
%3 = call i32 (...) @SysCtlClockGet()
%4 = sdiv i32 %3, 3000000
%5 = mul nsw i32 1, %4
%6 = call i32 @SysCtlDelay(i32 %5)
%7 = call i32 @GPIOPinWrite(i32 1073758208, i32 2, i32 255)
%8 = call i32 @GPIOPinWrite(i32 1073758208, i32 1, i32 0)
%9 = call i32 (...) @SysCtlClockGet()
%10 = sdiv i32 %9, 3000000
%11 = mul nsw i32 1, %10
%12 = call i32 @SysCtlDelay(i32 %11)
%13 = call i32 @GPIOPinWrite(i32 1073758208, i32 1, i32 255)
%14 = call i32 (...) @SysCtlClockGet()
%15 = sdiv i32 %14, 3000000
%16 = mul nsw i32 1, %15
%17 = call i32 @SysCtlDelay(i32 %16)
%18 = call i32 @LCD_write_byte(i32 33, i32 0)
%19 = call i32 @LCD_write_byte(i32 200, i32 0)
%20 = call i32 @LCD_write_byte(i32 19, i32 0)
%21 = call i32 @LCD_write_byte(i32 6, i32 0)
%22 = call i32 @LCD_write_byte(i32 32, i32 0)
%23 = call i32 @LCD_write_byte(i32 12, i32 0)
%24 = call i32 (...) @LCD_clean()
ret void
}

LLVM IR (-O2):
define void @LCD_init() {
%1 = tail call i32 (...) @LCD_init_gpio()
%2 = tail call i32 @GPIOPinWrite(i32 1073758208, i32 2, i32 0)
%3 = tail call i32 (...) @SysCtlClockGet()
%4 = sdiv i32 %3, 3000000
%5 = tail call i32 @SysCtlDelay(i32 %4)
%6 = tail call i32 @GPIOPinWrite(i32 1073758208, i32 2, i32 255)
%7 = tail call i32 @GPIOPinWrite(i32 1073758208, i32 1, i32 0)
%8 = tail call i32 (...) @SysCtlClockGet()
%9 = sdiv i32 %8, 3000000
%10 = tail call i32 @SysCtlDelay(i32 %9)
%11 = tail call i32 @GPIOPinWrite(i32 1073758208, i32 1, i32 255)
%12 = tail call i32 (...) @SysCtlClockGet()
%13 = sdiv i32 %12, 3000000
%14 = tail call i32 @SysCtlDelay(i32 %13)
%15 = tail call i32 @LCD_write_byte(i32 33, i32 0)
%16 = tail call i32 @LCD_write_byte(i32 200, i32 0)
%17 = tail call i32 @LCD_write_byte(i32 19, i32 0)
%18 = tail call i32 @LCD_write_byte(i32 6, i32 0)
%19 = tail call i32 @LCD_write_byte(i32 32, i32 0)
%20 = tail call i32 @LCD_write_byte(i32 12, i32 0)
%21 = tail call i32 (...) @LCD_clean()
ret void
}