#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*/ nokia_lcd_clear();
int /*<<< orphan*/ nokia_lcd_render();
int /*<<< orphan*/ nokia_lcd_set_cursor(int /*<<< orphan*/, int);
int /*<<< orphan*/ nokia_lcd_write_string(char *, int);
void print_hello() {
  nokia_lcd_clear();
  nokia_lcd_write_string("328P with 5110 ", 1);
  nokia_lcd_set_cursor(0, 15);
  nokia_lcd_write_string("GameBoy", 2);
  nokia_lcd_set_cursor(0, 40);
  nokia_lcd_write_string("By tigercosmos", 1);
  nokia_lcd_render();
}


x86 assembly (clang, -O0):
<print_hello>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <nokia_lcd_clear@plt>
lea    0xeae(%rip),%rdi
mov    $0x1,%esi
call   1060 <nokia_lcd_write_string@plt>
xor    %edi,%edi
mov    $0xf,%esi
call   1040 <nokia_lcd_set_cursor@plt>
lea    0xea1(%rip),%rdi
mov    $0x2,%esi
call   1060 <nokia_lcd_write_string@plt>
xor    %edi,%edi
mov    $0x28,%esi
call   1040 <nokia_lcd_set_cursor@plt>
lea    0xe8c(%rip),%rdi
mov    $0x1,%esi
call   1060 <nokia_lcd_write_string@plt>
mov    $0x0,%al
call   1030 <nokia_lcd_render@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hello>:
push   %rax
xor    %eax,%eax
call   1050 <nokia_lcd_clear@plt>
lea    0xeb1(%rip),%rdi
mov    $0x1,%esi
call   1060 <nokia_lcd_write_string@plt>
xor    %edi,%edi
mov    $0xf,%esi
call   1040 <nokia_lcd_set_cursor@plt>
lea    0xea4(%rip),%rdi
mov    $0x2,%esi
call   1060 <nokia_lcd_write_string@plt>
xor    %edi,%edi
mov    $0x28,%esi
call   1040 <nokia_lcd_set_cursor@plt>
lea    0xe8f(%rip),%rdi
mov    $0x1,%esi
call   1060 <nokia_lcd_write_string@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <nokia_lcd_render@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"328P with 5110 \00"
@.str.1 = [8 x i8] c"GameBoy\00"
@.str.2 = [15 x i8] c"By tigercosmos\00"
define void @print_hello() {
%1 = call i32 (...) @nokia_lcd_clear()
%2 = call i32 @nokia_lcd_write_string(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = call i32 @nokia_lcd_set_cursor(i32 0, i32 15)
%4 = call i32 @nokia_lcd_write_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 2)
%5 = call i32 @nokia_lcd_set_cursor(i32 0, i32 40)
%6 = call i32 @nokia_lcd_write_string(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 1)
%7 = call i32 (...) @nokia_lcd_render()
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"328P with 5110 \00"
@.str.1 = [8 x i8] c"GameBoy\00"
@.str.2 = [15 x i8] c"By tigercosmos\00"
define void @print_hello() {
%1 = tail call i32 (...) @nokia_lcd_clear()
%2 = tail call i32 @nokia_lcd_write_string(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 @nokia_lcd_set_cursor(i32 0, i32 15)
%4 = tail call i32 @nokia_lcd_write_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 2)
%5 = tail call i32 @nokia_lcd_set_cursor(i32 0, i32 40)
%6 = tail call i32 @nokia_lcd_write_string(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 1)
%7 = tail call i32 (...) @nokia_lcd_render()
ret void
}