#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*/ exit(int /*<<< orphan*/);
char getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void Print() {
  printf("\tWelcome to the mini Snake game.(press any key to continue)\n");
  getchar();
  system("clear");
  printf("\tGame instructions:\n");
  printf("\n-> Use arrow keys to move the snake.\n\n-> You will be provided "
         "foods at the several coordinates of the screen which you have to "
         "eat. Everytime you eat a food the length of the snake will be "
         "increased by 1 element and thus the score.\n\n-> Here you are "
         "provided with three lives. Your life will decrease as you hit the "
         "wall or snake's body.\n\n-> YOu can pause the game in its middle by "
         "pressing any key. To continue the paused game press any other key "
         "once again\n\n-> If you want to exit press 'q'. \n");
  printf("\n\nPress any key to play game...");
  if (getchar() == 'q')
    exit(0);
}


x86 assembly (clang, -O0):
<Print>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
lea    0xedf(%rip),%rdi
call   1030 <system@plt>
lea    0xed9(%rip),%rdi
call   1040 <printf@plt>
lea    0xee2(%rip),%rdi
call   1040 <printf@plt>
lea    0x10c6(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
movsbl %al,%eax
cmp    $0x71,%eax
jne    11a1 <Print+0x61>
xor    %edi,%edi
call   1060 <exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Print>:
push   %rax
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
lea    0xe95(%rip),%rdi
call   1040 <system@plt>
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
lea    0xef3(%rip),%rdi
call   1030 <puts@plt>
lea    0xe77(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
cmp    $0x71,%al
je     11a1 <Print+0x51>
pop    %rax
ret
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [61 x i8] c"\09Welcome to the mini Snake game.(press any key to continue)\0A\00"
@.str.1 = [6 x i8] c"clear\00"
@.str.2 = [21 x i8] c"\09Game instructions:\0A\00"
@.str.3 = [496 x i8] c"\0A-> Use arrow keys to move the snake.\0A\0A-> You will be provided foods at the several coordinates of the screen which you have to eat. Everytime you eat a food the length of the snake will be increased by 1 element and thus the score.\0A\0A-> Here you are provided with three lives. Your life will decrease as you hit the wall or snake's body.\0A\0A-> YOu can pause the game in its middle by pressing any key. To continue the paused game press any other key once again\0A\0A-> If you want to exit press 'q'. \0A\00"
@.str.4 = [32 x i8] c"\0A\0APress any key to play game...\00"
define void @Print() {
%1 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%2 = call signext i8 (...) @getchar()
%3 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([496 x i8], [496 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
%7 = call signext i8 (...) @getchar()
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 113
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 @exit(i32 0)
unreachable
12: ; preds = %0
ret void
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"clear\00"
@.str.4 = [32 x i8] c"\0A\0APress any key to play game...\00"
@str = [60 x i8] c"\09Welcome to the mini Snake game.(press any key to continue)\00"
@str.5 = [20 x i8] c"\09Game instructions:\00"
@str.6 = [495 x i8] c"\0A-> Use arrow keys to move the snake.\0A\0A-> You will be provided foods at the several coordinates of the screen which you have to eat. Everytime you eat a food the length of the snake will be increased by 1 element and thus the score.\0A\0A-> Here you are provided with three lives. Your life will decrease as you hit the wall or snake's body.\0A\0A-> YOu can pause the game in its middle by pressing any key. To continue the paused game press any other key once again\0A\0A-> If you want to exit press 'q'. \00"
define void @Print() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str, i64 0, i64 0))
%2 = tail call signext i8 (...) @getchar()
%3 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.5, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([495 x i8], [495 x i8]* @str.6, i64 0, i64 0))
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call signext i8 (...) @getchar()
%8 = icmp eq i8 %7, 113
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = tail call i32 @exit(i32 0)
unreachable
11: ; preds = %0
ret void
}