#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*/ lcd_display_char_col_row(unsigned char, int, int, int, int);
int /*<<< orphan*/ lcd_display_char_px(unsigned char, int, int, int, int);
int /*<<< orphan*/ lcd_display_string_col_row(char *, int, int, int, int);
int /*<<< orphan*/ lcd_init(int);
void main() {
  lcd_init(0X001F);
  unsigned char ch_asc = 'A';
  lcd_display_char_col_row(ch_asc, 0XFFFF, 0X0000, 0, 0);
  ch_asc = 'Z';
  lcd_display_char_col_row(ch_asc, 0X0000, 0XFFFF, 29, 19);
  ch_asc = 'a';
  lcd_display_char_px(ch_asc, 0X07E0, 0XF800, 0, 320 - 16);
  ch_asc = 'b';
  lcd_display_char_px(ch_asc, 0XF800, 0X07E0, 240 - 8, 0);
  char mystring[15] = "Hello World!";
  lcd_display_string_col_row(mystring, 0XFFE0, 0XF800, 8, 5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1f,%edi
call   1030 <lcd_init@plt>
movb   $0x41,-0x1(%rbp)
mov    $0xffff,%esi
xor    %r8d,%r8d
movzbl -0x1(%rbp),%edi
mov    %r8d,%edx
mov    %r8d,%ecx
call   1040 <lcd_display_char_col_row@plt>
movb   $0x5a,-0x1(%rbp)
xor    %esi,%esi
mov    $0xffff,%edx
mov    $0x1d,%ecx
mov    $0x13,%r8d
movzbl -0x1(%rbp),%edi
call   1040 <lcd_display_char_col_row@plt>
movb   $0x61,-0x1(%rbp)
mov    $0x7e0,%esi
mov    $0xf800,%edx
xor    %ecx,%ecx
mov    $0x130,%r8d
movzbl -0x1(%rbp),%edi
call   1050 <lcd_display_char_px@plt>
movb   $0x62,-0x1(%rbp)
mov    $0xf800,%esi
mov    $0x7e0,%edx
mov    $0xe8,%ecx
xor    %r8d,%r8d
movzbl -0x1(%rbp),%edi
call   1050 <lcd_display_char_px@plt>
mov    0xe2f(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xe2d(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xe27(%rip),%ax
mov    %ax,-0x4(%rbp)
mov    0xe1f(%rip),%al
mov    %al,-0x2(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0xffe0,%esi
mov    $0xf800,%edx
mov    $0x8,%ecx
mov    $0x5,%r8d
call   1060 <lcd_display_string_col_row@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    $0x1f,%edi
call   1030 <lcd_init@plt>
mov    $0x41,%edi
mov    $0xffff,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <lcd_display_char_col_row@plt>
mov    $0x5a,%edi
xor    %esi,%esi
mov    $0xffff,%edx
mov    $0x1d,%ecx
mov    $0x13,%r8d
call   1040 <lcd_display_char_col_row@plt>
mov    $0x61,%edi
mov    $0x7e0,%esi
mov    $0xf800,%edx
xor    %ecx,%ecx
mov    $0x130,%r8d
call   1050 <lcd_display_char_px@plt>
mov    $0x62,%edi
mov    $0xf800,%esi
mov    $0x7e0,%edx
mov    $0xe8,%ecx
xor    %r8d,%r8d
call   1050 <lcd_display_char_px@plt>
movabs $0x21646c726f,%rax
mov    %rax,0xf(%rsp)
movabs $0x6f57206f6c6c6548,%rax
20 57 6f
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
mov    $0xffe0,%esi
mov    $0xf800,%edx
mov    $0x8,%ecx
mov    $0x5,%r8d
call   1060 <lcd_display_string_col_row@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.mystring = [15 x i8] c"Hello World!\00\00\00"
define void @main() {
%1 = alloca i8
%2 = alloca [15 x i8]
%3 = call i32 @lcd_init(i32 31)
store i8 65, i8* %1
%4 = load i8, i8* %1
%5 = call i32 @lcd_display_char_col_row(i8 zeroext %4, i32 65535, i32 0, i32 0, i32 0)
store i8 90, i8* %1
%6 = load i8, i8* %1
%7 = call i32 @lcd_display_char_col_row(i8 zeroext %6, i32 0, i32 65535, i32 29, i32 19)
store i8 97, i8* %1
%8 = load i8, i8* %1
%9 = call i32 @lcd_display_char_px(i8 zeroext %8, i32 2016, i32 63488, i32 0, i32 304)
store i8 98, i8* %1
%10 = load i8, i8* %1
%11 = call i32 @lcd_display_char_px(i8 zeroext %10, i32 63488, i32 2016, i32 232, i32 0)
%12 = bitcast [15 x i8]* %2 to i8*
%13 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%14 = call i32 @lcd_display_string_col_row(i8* %13, i32 65504, i32 63488, i32 8, i32 5)
ret void
}

LLVM IR (-O2):
@__const.main.mystring = [15 x i8] c"Hello World!\00\00\00"
define void @main() {
%1 = alloca [15 x i8]
%2 = tail call i32 @lcd_init(i32 31)
%3 = tail call i32 @lcd_display_char_col_row(i8 zeroext 65, i32 65535, i32 0, i32 0, i32 0)
%4 = tail call i32 @lcd_display_char_col_row(i8 zeroext 90, i32 0, i32 65535, i32 29, i32 19)
%5 = tail call i32 @lcd_display_char_px(i8 zeroext 97, i32 2016, i32 63488, i32 0, i32 304)
%6 = tail call i32 @lcd_display_char_px(i8 zeroext 98, i32 63488, i32 2016, i32 232, i32 0)
%7 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%8 = call i32 @lcd_display_string_col_row(i8* %7, i32 65504, i32 63488, i32 8, i32 5)
ret void
}