#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ system(char *);
void OptionsMenuFunc() {
  printf("\n");
  printf("The goal of Mastermind is to guess the secret code picked by the "
         "Mastermind.\n");
  printf("\n");
  printf("The seceret code is made up of 4 random colours(numbers),\n");
  printf("from the 7 colours of the rainbow.\n");
  printf("You are allowed up to 15 attempts at guessing the code.\n");
  printf("Every '*' you see means you have choosen,\n");
  printf("one colour correctly and its the right place.\n");
  printf("Every 'o' you see means that you have,\n");
  printf("one colour correct but in the wrong place.\n");
  printf("\n");
  printf("\t\nCan you beat the Mastermind!!!\n");
  printf("\n");
  fflush(stdin);
  system("pause");
}


x86 assembly (clang, -O0):
<OptionsMenuFunc>:
push   %rbp
mov    %rsp,%rbp
lea    0x1079(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
lea    0x1061(%rip),%rdi
call   1040 <printf@plt>
lea    0xeef(%rip),%rdi
call   1040 <printf@plt>
lea    0xf1e(%rip),%rdi
call   1040 <printf@plt>
lea    0xf36(%rip),%rdi
call   1040 <printf@plt>
lea    0xf63(%rip),%rdi
call   1040 <printf@plt>
lea    0xf82(%rip),%rdi
call   1040 <printf@plt>
lea    0xfa5(%rip),%rdi
call   1040 <printf@plt>
lea    0xfc1(%rip),%rdi
call   1040 <printf@plt>
lea    0x1001(%rip),%rdi
call   1040 <printf@plt>
lea    0xfd5(%rip),%rdi
call   1040 <printf@plt>
lea    0xfe9(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e11(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
lea    0xfd1(%rip),%rdi
call   1030 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OptionsMenuFunc>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeb4(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeeb(%rip),%rdi
call   1040 <puts@plt>
lea    0xf19(%rip),%rdi
call   1040 <puts@plt>
lea    0xf30(%rip),%rdi
call   1040 <puts@plt>
lea    0xf5c(%rip),%rdi
call   1040 <puts@plt>
lea    0xf7a(%rip),%rdi
call   1040 <puts@plt>
lea    0xf9c(%rip),%rdi
call   1040 <puts@plt>
lea    0xfb7(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xfcc(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e0c(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
lea    0xe16(%rip),%rdi
pop    %rax
jmp    1050 <system@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [78 x i8] c"The goal of Mastermind is to guess the secret code picked by the Mastermind.\0A\00"
@.str.2 = [59 x i8] c"The seceret code is made up of 4 random colours(numbers),\0A\00"
@.str.3 = [36 x i8] c"from the 7 colours of the rainbow.\0A\00"
@.str.4 = [57 x i8] c"You are allowed up to 15 attempts at guessing the code.\0A\00"
@.str.5 = [43 x i8] c"Every '*' you see means you have choosen,\0A\00"
@.str.6 = [47 x i8] c"one colour correctly and its the right place.\0A\00"
@.str.7 = [40 x i8] c"Every 'o' you see means that you have,\0A\00"
@.str.8 = [44 x i8] c"one colour correct but in the wrong place.\0A\00"
@.str.9 = [34 x i8] c"\09\0ACan you beat the Mastermind!!!\0A\00"
@stdin = global i32 0
@.str.10 = [6 x i8] c"pause\00"
define void @OptionsMenuFunc() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%14 = load i32, i32* @stdin
%15 = call i32 @fflush(i32 %14)
%16 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
@.str.10 = [6 x i8] c"pause\00"
@str = [77 x i8] c"The goal of Mastermind is to guess the secret code picked by the Mastermind.\00"
@str.11 = [58 x i8] c"The seceret code is made up of 4 random colours(numbers),\00"
@str.12 = [35 x i8] c"from the 7 colours of the rainbow.\00"
@str.13 = [56 x i8] c"You are allowed up to 15 attempts at guessing the code.\00"
@str.14 = [42 x i8] c"Every '*' you see means you have choosen,\00"
@str.15 = [46 x i8] c"one colour correctly and its the right place.\00"
@str.16 = [39 x i8] c"Every 'o' you see means that you have,\00"
@str.17 = [43 x i8] c"one colour correct but in the wrong place.\00"
@str.18 = [33 x i8] c"\09\0ACan you beat the Mastermind!!!\00"
define void @OptionsMenuFunc() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.11, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.12, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.13, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.14, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.15, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.16, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.17, i64 0, i64 0))
%11 = tail call i32 @putchar(i32 10)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.18, i64 0, i64 0))
%13 = tail call i32 @putchar(i32 10)
%14 = load i32, i32* @stdin
%15 = tail call i32 @fflush(i32 %14)
%16 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
ret void
}