#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*/ ev3_circle_lcd(int, int, int, int);
int /*<<< orphan*/ ev3_circle_lcd_out(int, int, int, int);
int /*<<< orphan*/ ev3_clear_lcd();
int /*<<< orphan*/ ev3_ellipse_lcd(int, int, int, int, int);
int /*<<< orphan*/ ev3_ellipse_lcd_out(int, int, int, int, int);
int /*<<< orphan*/ ev3_init_lcd();
int /*<<< orphan*/ ev3_line_lcd(int, int, int, int, int);
int /*<<< orphan*/ ev3_quit_lcd();
int /*<<< orphan*/ ev3_rectangle_lcd(int, int, int, int, int);
int /*<<< orphan*/ ev3_rectangle_lcd_out(int, int, int, int, int);
int /*<<< orphan*/ ev3_text_lcd_large(int, int, char *);
int /*<<< orphan*/ ev3_text_lcd_normal(int, int, char *);
int /*<<< orphan*/ ev3_text_lcd_small(int, int, char *);
int /*<<< orphan*/ ev3_text_lcd_tiny(int, int, char *);
int main(int argc, char **argv) {
  ev3_init_lcd();
  ev3_clear_lcd();
  ev3_circle_lcd(50, 30, 20, 1);
  ev3_circle_lcd(70, 30, 20, 0);
  ev3_circle_lcd_out(50, 30, 25, 1);
  ev3_rectangle_lcd(90, 30, 20, 10, 1);
  ev3_rectangle_lcd(100, 35, 5, 5, 0);
  ev3_rectangle_lcd_out(100, 35, 15, 15, 1);
  ev3_ellipse_lcd(140, 20, 30, 15, 1);
  ev3_ellipse_lcd_out(140, 25, 30, 25, 1);
  ev3_line_lcd(40, 10, 70, 50, 1);
  ev3_line_lcd(5, 5, 5, 128 - 5, 1);
  ev3_text_lcd_large(5, 60, "Large text!");
  ev3_text_lcd_normal(5, 80, "Normal text!");
  ev3_text_lcd_small(5, 90, "Small text!");
  ev3_text_lcd_tiny(5, 100, "Tiny text!");
  ev3_quit_lcd();
  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 <ev3_init_lcd@plt>
mov    $0x0,%al
call   10e0 <ev3_clear_lcd@plt>
mov    $0x32,%edi
mov    $0x1e,%esi
mov    $0x14,%edx
mov    $0x1,%ecx
call   10b0 <ev3_circle_lcd@plt>
mov    $0x46,%edi
mov    $0x1e,%esi
mov    $0x14,%edx
xor    %ecx,%ecx
call   10b0 <ev3_circle_lcd@plt>
mov    $0x32,%edi
mov    $0x1e,%esi
mov    $0x19,%edx
mov    $0x1,%ecx
call   10c0 <ev3_circle_lcd_out@plt>
mov    $0x5a,%edi
mov    $0x1e,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
mov    $0x1,%r8d
call   1040 <ev3_rectangle_lcd@plt>
mov    $0x64,%edi
mov    $0x23,%esi
mov    $0x5,%ecx
xor    %r8d,%r8d
mov    %ecx,%edx
call   1040 <ev3_rectangle_lcd@plt>
mov    $0x64,%edi
mov    $0x23,%esi
mov    $0xf,%ecx
mov    $0x1,%r8d
mov    %ecx,%edx
call   1030 <ev3_rectangle_lcd_out@plt>
mov    $0x8c,%edi
mov    $0x14,%esi
mov    $0x1e,%edx
mov    $0xf,%ecx
mov    $0x1,%r8d
call   10f0 <ev3_ellipse_lcd@plt>
mov    $0x8c,%edi
mov    $0x19,%ecx
mov    $0x1e,%edx
mov    $0x1,%r8d
mov    %ecx,%esi
call   1070 <ev3_ellipse_lcd_out@plt>
mov    $0x28,%edi
mov    $0xa,%esi
mov    $0x46,%edx
mov    $0x32,%ecx
mov    $0x1,%r8d
call   1080 <ev3_line_lcd@plt>
mov    $0x5,%edx
mov    $0x7b,%ecx
mov    $0x1,%r8d
mov    %edx,%edi
mov    %edx,%esi
call   1080 <ev3_line_lcd@plt>
mov    $0x5,%edi
mov    $0x3c,%esi
lea    0xcdc(%rip),%rdx
call   10a0 <ev3_text_lcd_large@plt>
mov    $0x5,%edi
mov    $0x50,%esi
lea    0xcd2(%rip),%rdx
call   1090 <ev3_text_lcd_normal@plt>
mov    $0x5,%edi
mov    $0x5a,%esi
lea    0xcc9(%rip),%rdx
call   1050 <ev3_text_lcd_small@plt>
mov    $0x5,%edi
mov    $0x64,%esi
lea    0xcbf(%rip),%rdx
call   1100 <ev3_text_lcd_tiny@plt>
mov    $0x0,%al
call   10d0 <ev3_quit_lcd@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <ev3_init_lcd@plt>
xor    %eax,%eax
call   10e0 <ev3_clear_lcd@plt>
mov    $0x32,%edi
mov    $0x1e,%esi
mov    $0x14,%edx
mov    $0x1,%ecx
call   10b0 <ev3_circle_lcd@plt>
mov    $0x46,%edi
mov    $0x1e,%esi
mov    $0x14,%edx
xor    %ecx,%ecx
call   10b0 <ev3_circle_lcd@plt>
mov    $0x32,%edi
mov    $0x1e,%esi
mov    $0x19,%edx
mov    $0x1,%ecx
call   10c0 <ev3_circle_lcd_out@plt>
mov    $0x5a,%edi
mov    $0x1e,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
mov    $0x1,%r8d
call   1040 <ev3_rectangle_lcd@plt>
mov    $0x64,%edi
mov    $0x23,%esi
mov    $0x5,%edx
mov    $0x5,%ecx
xor    %r8d,%r8d
call   1040 <ev3_rectangle_lcd@plt>
mov    $0x64,%edi
mov    $0x23,%esi
mov    $0xf,%edx
mov    $0xf,%ecx
mov    $0x1,%r8d
call   1030 <ev3_rectangle_lcd_out@plt>
mov    $0x8c,%edi
mov    $0x14,%esi
mov    $0x1e,%edx
mov    $0xf,%ecx
mov    $0x1,%r8d
call   10f0 <ev3_ellipse_lcd@plt>
mov    $0x8c,%edi
mov    $0x19,%esi
mov    $0x1e,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1070 <ev3_ellipse_lcd_out@plt>
mov    $0x28,%edi
mov    $0xa,%esi
mov    $0x46,%edx
mov    $0x32,%ecx
mov    $0x1,%r8d
call   1080 <ev3_line_lcd@plt>
mov    $0x5,%edi
mov    $0x5,%esi
mov    $0x5,%edx
mov    $0x7b,%ecx
mov    $0x1,%r8d
call   1080 <ev3_line_lcd@plt>
lea    0xcec(%rip),%rdx
mov    $0x5,%edi
mov    $0x3c,%esi
call   10a0 <ev3_text_lcd_large@plt>
lea    0xce2(%rip),%rdx
mov    $0x5,%edi
mov    $0x50,%esi
call   1090 <ev3_text_lcd_normal@plt>
lea    0xcd9(%rip),%rdx
mov    $0x5,%edi
mov    $0x5a,%esi
call   1050 <ev3_text_lcd_small@plt>
lea    0xccf(%rip),%rdx
mov    $0x5,%edi
mov    $0x64,%esi
call   1100 <ev3_text_lcd_tiny@plt>
xor    %eax,%eax
call   10d0 <ev3_quit_lcd@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Large text!\00"
@.str.1 = [13 x i8] c"Normal text!\00"
@.str.2 = [12 x i8] c"Small text!\00"
@.str.3 = [11 x i8] c"Tiny text!\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 = call i32 (...) @ev3_init_lcd()
%7 = call i32 (...) @ev3_clear_lcd()
%8 = call i32 @ev3_circle_lcd(i32 50, i32 30, i32 20, i32 1)
%9 = call i32 @ev3_circle_lcd(i32 70, i32 30, i32 20, i32 0)
%10 = call i32 @ev3_circle_lcd_out(i32 50, i32 30, i32 25, i32 1)
%11 = call i32 @ev3_rectangle_lcd(i32 90, i32 30, i32 20, i32 10, i32 1)
%12 = call i32 @ev3_rectangle_lcd(i32 100, i32 35, i32 5, i32 5, i32 0)
%13 = call i32 @ev3_rectangle_lcd_out(i32 100, i32 35, i32 15, i32 15, i32 1)
%14 = call i32 @ev3_ellipse_lcd(i32 140, i32 20, i32 30, i32 15, i32 1)
%15 = call i32 @ev3_ellipse_lcd_out(i32 140, i32 25, i32 30, i32 25, i32 1)
%16 = call i32 @ev3_line_lcd(i32 40, i32 10, i32 70, i32 50, i32 1)
%17 = call i32 @ev3_line_lcd(i32 5, i32 5, i32 5, i32 123, i32 1)
%18 = call i32 @ev3_text_lcd_large(i32 5, i32 60, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%19 = call i32 @ev3_text_lcd_normal(i32 5, i32 80, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%20 = call i32 @ev3_text_lcd_small(i32 5, i32 90, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%21 = call i32 @ev3_text_lcd_tiny(i32 5, i32 100, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%22 = call i32 (...) @ev3_quit_lcd()
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Large text!\00"
@.str.1 = [13 x i8] c"Normal text!\00"
@.str.2 = [12 x i8] c"Small text!\00"
@.str.3 = [11 x i8] c"Tiny text!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @ev3_init_lcd()
%4 = tail call i32 (...) @ev3_clear_lcd()
%5 = tail call i32 @ev3_circle_lcd(i32 50, i32 30, i32 20, i32 1)
%6 = tail call i32 @ev3_circle_lcd(i32 70, i32 30, i32 20, i32 0)
%7 = tail call i32 @ev3_circle_lcd_out(i32 50, i32 30, i32 25, i32 1)
%8 = tail call i32 @ev3_rectangle_lcd(i32 90, i32 30, i32 20, i32 10, i32 1)
%9 = tail call i32 @ev3_rectangle_lcd(i32 100, i32 35, i32 5, i32 5, i32 0)
%10 = tail call i32 @ev3_rectangle_lcd_out(i32 100, i32 35, i32 15, i32 15, i32 1)
%11 = tail call i32 @ev3_ellipse_lcd(i32 140, i32 20, i32 30, i32 15, i32 1)
%12 = tail call i32 @ev3_ellipse_lcd_out(i32 140, i32 25, i32 30, i32 25, i32 1)
%13 = tail call i32 @ev3_line_lcd(i32 40, i32 10, i32 70, i32 50, i32 1)
%14 = tail call i32 @ev3_line_lcd(i32 5, i32 5, i32 5, i32 123, i32 1)
%15 = tail call i32 @ev3_text_lcd_large(i32 5, i32 60, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%16 = tail call i32 @ev3_text_lcd_normal(i32 5, i32 80, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%17 = tail call i32 @ev3_text_lcd_small(i32 5, i32 90, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%18 = tail call i32 @ev3_text_lcd_tiny(i32 5, i32 100, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%19 = tail call i32 (...) @ev3_quit_lcd()
ret i32 0
}