#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*/ gba_printf(int, int, int, char *);
int /*<<< orphan*/ is_key_down(int);
int /*<<< orphan*/ m4_draw_rect_fill(int, int, int, int, int);
int /*<<< orphan*/ poll_key();
void show_title_screen() {
  m4_draw_rect_fill(50, 10, 55, 40, 1);
  m4_draw_rect_fill(55, 10, 70, 15, 1);
  m4_draw_rect_fill(70, 10, 75, 25, 1);
  m4_draw_rect_fill(55, 20, 70, 25, 1);
  m4_draw_rect_fill(80, 10, 85, 25, 1);
  m4_draw_rect_fill(100, 10, 105, 25, 1);
  m4_draw_rect_fill(80, 10, 105, 15, 1);
  m4_draw_rect_fill(80, 20, 105, 25, 1);
  m4_draw_rect_fill(110, 10, 115, 25, 1);
  m4_draw_rect_fill(130, 10, 135, 25, 1);
  m4_draw_rect_fill(110, 10, 135, 15, 1);
  m4_draw_rect_fill(140, 10, 145, 25, 1);
  m4_draw_rect_fill(145, 10, 160, 15, 1);
  m4_draw_rect_fill(160, 10, 165, 40, 1);
  m4_draw_rect_fill(145, 20, 160, 25, 1);
  m4_draw_rect_fill(140, 35, 160, 40, 1);
  gba_printf(5, 50, 1, "You are the player on the left with");
  gba_printf(5, 60, 1, "the blue paddle. The computer is on");
  gba_printf(5, 70, 1, "the right with the red paddle. Your");
  gba_printf(5, 80, 1, "goal is to bounce the ball past the");
  gba_printf(5, 90, 1, "computer's paddle, scoring a point.");
  gba_printf(5, 100, 1, "Beware! The computer will also try to");
  gba_printf(5, 110, 1, "bounce the ball past your paddle!");
  gba_printf(10, 140, 2, "Press the Start button to begin.");
  do {
    poll_key();
  } while (!is_key_down(0x8));
}


x86 assembly (clang, -O0):
<show_title_screen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x32,%edi
mov    $0xa,%esi
mov    $0x37,%edx
mov    $0x28,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x37,%edi
mov    $0xa,%esi
mov    $0x46,%edx
mov    $0xf,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x46,%edi
mov    $0xa,%esi
mov    $0x4b,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x37,%edi
mov    $0x14,%esi
mov    $0x46,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x50,%edi
mov    $0xa,%esi
mov    $0x55,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x64,%edi
mov    $0xa,%esi
mov    $0x69,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x50,%edi
mov    $0xa,%esi
mov    $0x69,%edx
mov    $0xf,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x50,%edi
mov    $0x14,%esi
mov    $0x69,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x6e,%edi
mov    $0xa,%esi
mov    $0x73,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x82,%edi
mov    $0xa,%esi
mov    $0x87,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x6e,%edi
mov    $0xa,%esi
mov    $0x87,%edx
mov    $0xf,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x8c,%edi
mov    $0xa,%esi
mov    $0x91,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x91,%edi
mov    $0xa,%esi
mov    $0xa0,%edx
mov    $0xf,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0xa0,%edi
mov    $0xa,%esi
mov    $0xa5,%edx
mov    $0x28,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x91,%edi
mov    $0x14,%esi
mov    $0xa0,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x8c,%edi
mov    $0x23,%esi
mov    $0xa0,%edx
mov    $0x28,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x5,%edi
mov    $0x32,%esi
mov    $0x1,%edx
lea    0xcb6(%rip),%rcx
call   1040 <gba_printf@plt>
mov    $0x5,%edi
mov    $0x3c,%esi
mov    $0x1,%edx
lea    0xcbf(%rip),%rcx
call   1040 <gba_printf@plt>
mov    $0x5,%edi
mov    $0x46,%esi
mov    $0x1,%edx
lea    0xcc8(%rip),%rcx
call   1040 <gba_printf@plt>
mov    $0x5,%edi
mov    $0x50,%esi
mov    $0x1,%edx
lea    0xcd1(%rip),%rcx
call   1040 <gba_printf@plt>
mov    $0x5,%edi
mov    $0x5a,%esi
mov    $0x1,%edx
lea    0xcda(%rip),%rcx
call   1040 <gba_printf@plt>
mov    $0x5,%edi
mov    $0x64,%esi
mov    $0x1,%edx
lea    0xce3(%rip),%rcx
call   1040 <gba_printf@plt>
mov    $0x5,%edi
mov    $0x6e,%esi
mov    $0x1,%edx
lea    0xcee(%rip),%rcx
call   1040 <gba_printf@plt>
mov    $0xa,%edi
mov    $0x8c,%esi
mov    $0x2,%edx
lea    0xcf5(%rip),%rcx
call   1040 <gba_printf@plt>
mov    $0x0,%al
call   1050 <poll_key@plt>
mov    $0x8,%edi
call   1030 <is_key_down@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    140c <show_title_screen+0x2cc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_title_screen>:
push   %rax
mov    $0x32,%edi
mov    $0xa,%esi
mov    $0x37,%edx
mov    $0x28,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x37,%edi
mov    $0xa,%esi
mov    $0x46,%edx
mov    $0xf,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x46,%edi
mov    $0xa,%esi
mov    $0x4b,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x37,%edi
mov    $0x14,%esi
mov    $0x46,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x50,%edi
mov    $0xa,%esi
mov    $0x55,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x64,%edi
mov    $0xa,%esi
mov    $0x69,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x50,%edi
mov    $0xa,%esi
mov    $0x69,%edx
mov    $0xf,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x50,%edi
mov    $0x14,%esi
mov    $0x69,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x6e,%edi
mov    $0xa,%esi
mov    $0x73,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x82,%edi
mov    $0xa,%esi
mov    $0x87,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x6e,%edi
mov    $0xa,%esi
mov    $0x87,%edx
mov    $0xf,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x8c,%edi
mov    $0xa,%esi
mov    $0x91,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x91,%edi
mov    $0xa,%esi
mov    $0xa0,%edx
mov    $0xf,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0xa0,%edi
mov    $0xa,%esi
mov    $0xa5,%edx
mov    $0x28,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x91,%edi
mov    $0x14,%esi
mov    $0xa0,%edx
mov    $0x19,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
mov    $0x8c,%edi
mov    $0x23,%esi
mov    $0xa0,%edx
mov    $0x28,%ecx
mov    $0x1,%r8d
call   1060 <m4_draw_rect_fill@plt>
lea    0xcc8(%rip),%rcx
mov    $0x5,%edi
mov    $0x32,%esi
mov    $0x1,%edx
call   1040 <gba_printf@plt>
lea    0xcd1(%rip),%rcx
mov    $0x5,%edi
mov    $0x3c,%esi
mov    $0x1,%edx
call   1040 <gba_printf@plt>
lea    0xcda(%rip),%rcx
mov    $0x5,%edi
mov    $0x46,%esi
mov    $0x1,%edx
call   1040 <gba_printf@plt>
lea    0xce3(%rip),%rcx
mov    $0x5,%edi
mov    $0x50,%esi
mov    $0x1,%edx
call   1040 <gba_printf@plt>
lea    0xcec(%rip),%rcx
mov    $0x5,%edi
mov    $0x5a,%esi
mov    $0x1,%edx
call   1040 <gba_printf@plt>
lea    0xcf5(%rip),%rcx
mov    $0x5,%edi
mov    $0x64,%esi
mov    $0x1,%edx
call   1040 <gba_printf@plt>
lea    0xd00(%rip),%rcx
mov    $0x5,%edi
mov    $0x6e,%esi
mov    $0x1,%edx
call   1040 <gba_printf@plt>
lea    0xd07(%rip),%rcx
mov    $0xa,%edi
mov    $0x8c,%esi
mov    $0x2,%edx
call   1040 <gba_printf@plt>
nopl   0x0(%rax)
xor    %eax,%eax
call   1050 <poll_key@plt>
mov    $0x8,%edi
call   1030 <is_key_down@plt>
test   %eax,%eax
je     1410 <show_title_screen+0x2d0>
pop    %rax
ret

LLVM IR (-O0):
@.str = [36 x i8] c"You are the player on the left with\00"
@.str.1 = [36 x i8] c"the blue paddle. The computer is on\00"
@.str.2 = [36 x i8] c"the right with the red paddle. Your\00"
@.str.3 = [36 x i8] c"goal is to bounce the ball past the\00"
@.str.4 = [36 x i8] c"computer's paddle, scoring a point.\00"
@.str.5 = [38 x i8] c"Beware! The computer will also try to\00"
@.str.6 = [34 x i8] c"bounce the ball past your paddle!\00"
@.str.7 = [33 x i8] c"Press the Start button to begin.\00"
define void @show_title_screen() {
%1 = call i32 @m4_draw_rect_fill(i32 50, i32 10, i32 55, i32 40, i32 1)
%2 = call i32 @m4_draw_rect_fill(i32 55, i32 10, i32 70, i32 15, i32 1)
%3 = call i32 @m4_draw_rect_fill(i32 70, i32 10, i32 75, i32 25, i32 1)
%4 = call i32 @m4_draw_rect_fill(i32 55, i32 20, i32 70, i32 25, i32 1)
%5 = call i32 @m4_draw_rect_fill(i32 80, i32 10, i32 85, i32 25, i32 1)
%6 = call i32 @m4_draw_rect_fill(i32 100, i32 10, i32 105, i32 25, i32 1)
%7 = call i32 @m4_draw_rect_fill(i32 80, i32 10, i32 105, i32 15, i32 1)
%8 = call i32 @m4_draw_rect_fill(i32 80, i32 20, i32 105, i32 25, i32 1)
%9 = call i32 @m4_draw_rect_fill(i32 110, i32 10, i32 115, i32 25, i32 1)
%10 = call i32 @m4_draw_rect_fill(i32 130, i32 10, i32 135, i32 25, i32 1)
%11 = call i32 @m4_draw_rect_fill(i32 110, i32 10, i32 135, i32 15, i32 1)
%12 = call i32 @m4_draw_rect_fill(i32 140, i32 10, i32 145, i32 25, i32 1)
%13 = call i32 @m4_draw_rect_fill(i32 145, i32 10, i32 160, i32 15, i32 1)
%14 = call i32 @m4_draw_rect_fill(i32 160, i32 10, i32 165, i32 40, i32 1)
%15 = call i32 @m4_draw_rect_fill(i32 145, i32 20, i32 160, i32 25, i32 1)
%16 = call i32 @m4_draw_rect_fill(i32 140, i32 35, i32 160, i32 40, i32 1)
%17 = call i32 @gba_printf(i32 5, i32 50, i32 1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @gba_printf(i32 5, i32 60, i32 1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 @gba_printf(i32 5, i32 70, i32 1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%20 = call i32 @gba_printf(i32 5, i32 80, i32 1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%21 = call i32 @gba_printf(i32 5, i32 90, i32 1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%22 = call i32 @gba_printf(i32 5, i32 100, i32 1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0))
%23 = call i32 @gba_printf(i32 5, i32 110, i32 1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0))
%24 = call i32 @gba_printf(i32 10, i32 140, i32 2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
br label %25
25: ; preds = %27, %0
%26 = call i32 (...) @poll_key()
br label %27
27: ; preds = %25
%28 = call i32 @is_key_down(i32 8)
%29 = icmp ne i32 %28, 0
%30 = xor i1 %29, true
br i1 %30, label %25, label %31
31: ; preds = %27
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"You are the player on the left with\00"
@.str.1 = [36 x i8] c"the blue paddle. The computer is on\00"
@.str.2 = [36 x i8] c"the right with the red paddle. Your\00"
@.str.3 = [36 x i8] c"goal is to bounce the ball past the\00"
@.str.4 = [36 x i8] c"computer's paddle, scoring a point.\00"
@.str.5 = [38 x i8] c"Beware! The computer will also try to\00"
@.str.6 = [34 x i8] c"bounce the ball past your paddle!\00"
@.str.7 = [33 x i8] c"Press the Start button to begin.\00"
define void @show_title_screen() {
%1 = tail call i32 @m4_draw_rect_fill(i32 50, i32 10, i32 55, i32 40, i32 1)
%2 = tail call i32 @m4_draw_rect_fill(i32 55, i32 10, i32 70, i32 15, i32 1)
%3 = tail call i32 @m4_draw_rect_fill(i32 70, i32 10, i32 75, i32 25, i32 1)
%4 = tail call i32 @m4_draw_rect_fill(i32 55, i32 20, i32 70, i32 25, i32 1)
%5 = tail call i32 @m4_draw_rect_fill(i32 80, i32 10, i32 85, i32 25, i32 1)
%6 = tail call i32 @m4_draw_rect_fill(i32 100, i32 10, i32 105, i32 25, i32 1)
%7 = tail call i32 @m4_draw_rect_fill(i32 80, i32 10, i32 105, i32 15, i32 1)
%8 = tail call i32 @m4_draw_rect_fill(i32 80, i32 20, i32 105, i32 25, i32 1)
%9 = tail call i32 @m4_draw_rect_fill(i32 110, i32 10, i32 115, i32 25, i32 1)
%10 = tail call i32 @m4_draw_rect_fill(i32 130, i32 10, i32 135, i32 25, i32 1)
%11 = tail call i32 @m4_draw_rect_fill(i32 110, i32 10, i32 135, i32 15, i32 1)
%12 = tail call i32 @m4_draw_rect_fill(i32 140, i32 10, i32 145, i32 25, i32 1)
%13 = tail call i32 @m4_draw_rect_fill(i32 145, i32 10, i32 160, i32 15, i32 1)
%14 = tail call i32 @m4_draw_rect_fill(i32 160, i32 10, i32 165, i32 40, i32 1)
%15 = tail call i32 @m4_draw_rect_fill(i32 145, i32 20, i32 160, i32 25, i32 1)
%16 = tail call i32 @m4_draw_rect_fill(i32 140, i32 35, i32 160, i32 40, i32 1)
%17 = tail call i32 @gba_printf(i32 5, i32 50, i32 1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%18 = tail call i32 @gba_printf(i32 5, i32 60, i32 1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%19 = tail call i32 @gba_printf(i32 5, i32 70, i32 1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%20 = tail call i32 @gba_printf(i32 5, i32 80, i32 1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%21 = tail call i32 @gba_printf(i32 5, i32 90, i32 1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%22 = tail call i32 @gba_printf(i32 5, i32 100, i32 1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0))
%23 = tail call i32 @gba_printf(i32 5, i32 110, i32 1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0))
%24 = tail call i32 @gba_printf(i32 10, i32 140, i32 2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
br label %25
25: ; preds = %25, %0
%26 = tail call i32 (...) @poll_key()
%27 = tail call i32 @is_key_down(i32 8)
%28 = icmp eq i32 %27, 0
br i1 %28, label %25, label %29
29: ; preds = %25
ret void
}