#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*/ PSTR(char *);
int /*<<< orphan*/ lcd_clear();
int /*<<< orphan*/ lcd_deinit();
int /*<<< orphan*/ lcd_flash();
int /*<<< orphan*/ lcd_init();
int /*<<< orphan*/ lcd_paint_string_5x8_p(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ lcd_set_pixel(int, int, int);
int main(int argn, char **argv) {
  (void)argn;
  (void)argv;
  lcd_init();
  lcd_clear();
  lcd_paint_string_5x8_p(7, 1, PSTR("Hello!"));
  lcd_set_pixel(0, 0, (1));
  lcd_set_pixel(0, 15, (1));
  lcd_set_pixel(60, 0, (1));
  lcd_set_pixel(60, 15, (1));
  lcd_flash();
  lcd_deinit();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <lcd_init@plt>
mov    $0x0,%al
call   1070 <lcd_clear@plt>
lea    0xe65(%rip),%rdi
call   1040 <PSTR@plt>
mov    %eax,%edx
mov    $0x7,%edi
mov    $0x1,%esi
call   1030 <lcd_paint_string_5x8_p@plt>
xor    %esi,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   1090 <lcd_set_pixel@plt>
xor    %edi,%edi
mov    $0xf,%esi
mov    $0x1,%edx
call   1090 <lcd_set_pixel@plt>
mov    $0x3c,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1090 <lcd_set_pixel@plt>
mov    $0x3c,%edi
mov    $0xf,%esi
mov    $0x1,%edx
call   1090 <lcd_set_pixel@plt>
mov    $0x0,%al
call   1050 <lcd_flash@plt>
mov    $0x0,%al
call   1080 <lcd_deinit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <lcd_init@plt>
xor    %eax,%eax
call   1070 <lcd_clear@plt>
lea    0xe7a(%rip),%rdi
call   1040 <PSTR@plt>
mov    $0x7,%edi
mov    $0x1,%esi
mov    %eax,%edx
call   1030 <lcd_paint_string_5x8_p@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1090 <lcd_set_pixel@plt>
xor    %edi,%edi
mov    $0xf,%esi
mov    $0x1,%edx
call   1090 <lcd_set_pixel@plt>
mov    $0x3c,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1090 <lcd_set_pixel@plt>
mov    $0x3c,%edi
mov    $0xf,%esi
mov    $0x1,%edx
call   1090 <lcd_set_pixel@plt>
xor    %eax,%eax
call   1050 <lcd_flash@plt>
xor    %eax,%eax
call   1080 <lcd_deinit@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Hello!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 (...) @lcd_init()
%9 = call i32 (...) @lcd_clear()
%10 = call i32 @PSTR(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @lcd_paint_string_5x8_p(i32 7, i32 1, i32 %10)
%12 = call i32 @lcd_set_pixel(i32 0, i32 0, i32 1)
%13 = call i32 @lcd_set_pixel(i32 0, i32 15, i32 1)
%14 = call i32 @lcd_set_pixel(i32 60, i32 0, i32 1)
%15 = call i32 @lcd_set_pixel(i32 60, i32 15, i32 1)
%16 = call i32 (...) @lcd_flash()
%17 = call i32 (...) @lcd_deinit()
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"Hello!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @lcd_init()
%4 = tail call i32 (...) @lcd_clear()
%5 = tail call i32 @PSTR(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @lcd_paint_string_5x8_p(i32 7, i32 1, i32 %5)
%7 = tail call i32 @lcd_set_pixel(i32 0, i32 0, i32 1)
%8 = tail call i32 @lcd_set_pixel(i32 0, i32 15, i32 1)
%9 = tail call i32 @lcd_set_pixel(i32 60, i32 0, i32 1)
%10 = tail call i32 @lcd_set_pixel(i32 60, i32 15, i32 1)
%11 = tail call i32 (...) @lcd_flash()
%12 = tail call i32 (...) @lcd_deinit()
ret i32 0
}