#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*/ menu();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  char choice;
  int eggs, answer = 0, food;
  int infinity = 1;
  menu();
  scanf("%c", &choice);
  if (choice == 'a') {
    for (; infinity;)
      printf("Are you serious?!\n");
  } else if (choice == 'b') {
    printf("\nWhat do you want?(press 1 or 2)\n1.Omelette\n2.Pancakes\n\nMy "
           "choice is:");
    scanf("%d", &eggs);
    printf("\nEggtastic choice!Here is the recipe:\n");
    if (eggs == 1) {
      printf(
          "\n\nCrack the eggs into a mixing bowl. Beat well with a fork.\nHeat "
          "a small knob of butter in a small frying pan, add the eggs.\nUsing "
          "a spatula, ease around the edges of the omelette, then fold it over "
          "in half. \nNow eat your delicious eggs.");
    } else if (eggs == 2) {
      printf("\n\nPut the flour, eggs, milk and a pinch of salt into a bowl or "
             "large jug, then whisk to a smooth batter.Pour it all in a pan "
             "and cook each pancake for 1min per side.Voila!Now eat your "
             "awesome pancakes.");
    } else
      printf("You are not getting a recipe if you can't press only 1 or 2 on "
             "your keyboard!");
  } else if (choice == 'c') {
    printf("\nAre you a zombie?Press 1 if you're a fucking zombie.\n");
    scanf("%d", &answer);
    if (answer == 1)
      printf("\nThen go eat brains!\n");
    else
      printf("\nFor a moment I got quite scared.Go eat salad like a good not "
             "brain eating creature\n");
  } else if (choice == 'd') {
    printf("\nPress 1 or 2 or 3 and I will tell you what to eat\n\n");
    scanf("%d", &food);
    if (food == 1)
      printf("Go eat lutenitza cause lutenitza is lof,lutenitza is life\n");
    else if (food == 2)
      printf("Go eat a steak\n");
    else if (food == 3)
      printf("Go eat dogs you little china man\n");
    else
      printf("You must be really desperate.Go for a shot of vodka\n");
  } else
    printf("\nYou should have entered a/b/c/d.Sorry,dude,no second chance for "
           "you!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0x18(%rbp)
mov    $0x0,%al
call   1030 <menu@plt>
lea    0xea5(%rip),%rdi
lea    -0x5(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jne    1198 <main+0x68>
jmp    1178 <main+0x48>
cmpl   $0x0,-0x18(%rbp)
je     1193 <main+0x63>
lea    0xe7a(%rip),%rdi
call   1040 <printf@plt>
jmp    1178 <main+0x48>
jmp    1324 <main+0x1f4>
movsbl -0x5(%rbp),%eax
cmp    $0x62,%eax
jne    121b <main+0xeb>
lea    0xe6a(%rip),%rdi
call   1040 <printf@plt>
lea    0xea4(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x1,-0xc(%rbp)
jne    11ea <main+0xba>
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
jmp    1216 <main+0xe6>
cmpl   $0x2,-0xc(%rbp)
jne    1205 <main+0xd5>
lea    0xf79(%rip),%rdi
call   1040 <printf@plt>
jmp    1211 <main+0xe1>
lea    0x1032(%rip),%rdi
call   1040 <printf@plt>
jmp    1216 <main+0xe6>
jmp    131f <main+0x1ef>
movsbl -0x5(%rbp),%eax
cmp    $0x63,%eax
jne    1272 <main+0x142>
lea    0x105d(%rip),%rdi
call   1040 <printf@plt>
lea    0xe21(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
cmpl   $0x1,-0x10(%rbp)
jne    1261 <main+0x131>
lea    0x106c(%rip),%rdi
call   1040 <printf@plt>
jmp    126d <main+0x13d>
lea    0x1071(%rip),%rdi
call   1040 <printf@plt>
jmp    131a <main+0x1ea>
movsbl -0x5(%rbp),%eax
cmp    $0x64,%eax
jne    1309 <main+0x1d9>
lea    0x10a8(%rip),%rdi
call   1040 <printf@plt>
lea    0xdca(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
cmpl   $0x1,-0x14(%rbp)
jne    12b8 <main+0x188>
lea    0x10b5(%rip),%rdi
call   1040 <printf@plt>
jmp    1304 <main+0x1d4>
cmpl   $0x2,-0x14(%rbp)
jne    12d3 <main+0x1a3>
lea    0x10d5(%rip),%rdi
call   1040 <printf@plt>
jmp    12ff <main+0x1cf>
cmpl   $0x3,-0x14(%rbp)
jne    12ee <main+0x1be>
lea    0x10ca(%rip),%rdi
call   1040 <printf@plt>
jmp    12fa <main+0x1ca>
lea    0x10db(%rip),%rdi
call   1040 <printf@plt>
jmp    12ff <main+0x1cf>
jmp    1304 <main+0x1d4>
jmp    1315 <main+0x1e5>
lea    0x10f5(%rip),%rdi
call   1040 <printf@plt>
jmp    131a <main+0x1ea>
jmp    131f <main+0x1ef>
jmp    1324 <main+0x1f4>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0x4(%rsp)
xor    %eax,%eax
call   1040 <menu@plt>
lea    0xeb5(%rip),%rdi
lea    0x3(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x3(%rsp),%al
add    $0x9f,%al
cmp    $0x3,%al
ja     1259 <main+0x119>
movzbl %al,%eax
lea    0xe81(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x12b0(%rip),%rbx
nop
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    1190 <main+0x50>
lea    0xe72(%rip),%rdi
call   1050 <printf@plt>
lea    0xeac(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0x1259(%rip),%rdi
call   1030 <puts@plt>
mov    0xc(%rsp),%eax
cmp    $0x2,%eax
je     126b <main+0x12b>
cmp    $0x1,%eax
jne    1279 <main+0x139>
lea    0xe7a(%rip),%rdi
call   1050 <printf@plt>
jmp    12a5 <main+0x165>
lea    0x1187(%rip),%rdi
call   1030 <puts@plt>
lea    0xe5a(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x1,0x4(%rsp)
jne    1262 <main+0x122>
lea    0x11eb(%rip),%rdi
jmp    12a0 <main+0x160>
lea    0x1083(%rip),%rdi
call   1030 <puts@plt>
lea    0xe28(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x8(%rsp),%eax
cmp    $0x3,%eax
je     1287 <main+0x147>
cmp    $0x2,%eax
je     1290 <main+0x150>
cmp    $0x1,%eax
jne    1299 <main+0x159>
lea    0x10e9(%rip),%rdi
jmp    12a0 <main+0x160>
lea    0x1002(%rip),%rdi
jmp    12a0 <main+0x160>
lea    0x1147(%rip),%rdi
jmp    12a0 <main+0x160>
lea    0xed8(%rip),%rdi
call   1050 <printf@plt>
jmp    12a5 <main+0x165>
lea    0xf94(%rip),%rdi
call   1050 <printf@plt>
jmp    12a5 <main+0x165>
lea    0x1082(%rip),%rdi
jmp    12a0 <main+0x160>
lea    0x109a(%rip),%rdi
jmp    12a0 <main+0x160>
lea    0x103c(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [19 x i8] c"Are you serious?!\0A\00"
@.str.2 = [70 x i8] c"\0AWhat do you want?(press 1 or 2)\0A1.Omelette\0A2.Pancakes\0A\0AMy choice is:\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [39 x i8] c"\0AEggtastic choice!Here is the recipe:\0A\00"
@.str.5 = [238 x i8] c"\0A\0ACrack the eggs into a mixing bowl. Beat well with a fork.\0AHeat a small knob of butter in a small frying pan, add the eggs.\0AUsing a spatula, ease around the edges of the omelette, then fold it over in half. \0ANow eat your delicious eggs.\00"
@.str.6 = [202 x i8] c"\0A\0APut the flour, eggs, milk and a pinch of salt into a bowl or large jug, then whisk to a smooth batter.Pour it all in a pan and cook each pancake for 1min per side.Voila!Now eat your awesome pancakes.\00"
@.str.7 = [78 x i8] c"You are not getting a recipe if you can't press only 1 or 2 on your keyboard!\00"
@.str.8 = [55 x i8] c"\0AAre you a zombie?Press 1 if you're a fucking zombie.\0A\00"
@.str.9 = [22 x i8] c"\0AThen go eat brains!\0A\00"
@.str.10 = [85 x i8] c"\0AFor a moment I got quite scared.Go eat salad like a good not brain eating creature\0A\00"
@.str.11 = [53 x i8] c"\0APress 1 or 2 or 3 and I will tell you what to eat\0A\0A\00"
@.str.12 = [59 x i8] c"Go eat lutenitza cause lutenitza is lof,lutenitza is life\0A\00"
@.str.13 = [16 x i8] c"Go eat a steak\0A\00"
@.str.14 = [34 x i8] c"Go eat dogs you little china man\0A\00"
@.str.15 = [53 x i8] c"You must be really desperate.Go for a shot of vodka\0A\00"
@.str.16 = [71 x i8] c"\0AYou should have entered a/b/c/d.Sorry,dude,no second chance for you!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
store i32 1, i32* %6
%7 = call i32 (...) @menu()
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 97
br i1 %11, label %12, label %19
12: ; preds = %0
br label %13
13: ; preds = %16, %12
%14 = load i32, i32* %6
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %13
18: ; preds = %13
br label %85
19: ; preds = %0
%20 = load i8, i8* %2
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 98
br i1 %22, label %23, label %40
23: ; preds = %19
%24 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.2, i64 0, i64 0))
%25 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%26 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
%27 = load i32, i32* %3
%28 = icmp eq i32 %27, 1
br i1 %28, label %29, label %31
29: ; preds = %23
%30 = call i32 @printf(i8* getelementptr inbounds ([238 x i8], [238 x i8]* @.str.5, i64 0, i64 0))
br label %39
31: ; preds = %23
%32 = load i32, i32* %3
%33 = icmp eq i32 %32, 2
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 @printf(i8* getelementptr inbounds ([202 x i8], [202 x i8]* @.str.6, i64 0, i64 0))
br label %38
36: ; preds = %31
%37 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.7, i64 0, i64 0))
br label %38
38: ; preds = %36, %34
br label %39
39: ; preds = %38, %29
br label %84
40: ; preds = %19
%41 = load i8, i8* %2
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 99
br i1 %43, label %44, label %54
44: ; preds = %40
%45 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.8, i64 0, i64 0))
%46 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
%47 = load i32, i32* %4
%48 = icmp eq i32 %47, 1
br i1 %48, label %49, label %51
49: ; preds = %44
%50 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0))
br label %53
51: ; preds = %44
%52 = call i32 @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.10, i64 0, i64 0))
br label %53
53: ; preds = %51, %49
br label %83
54: ; preds = %40
%55 = load i8, i8* %2
%56 = sext i8 %55 to i32
%57 = icmp eq i32 %56, 100
br i1 %57, label %58, label %80
58: ; preds = %54
%59 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.11, i64 0, i64 0))
%60 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %5)
%61 = load i32, i32* %5
%62 = icmp eq i32 %61, 1
br i1 %62, label %63, label %65
63: ; preds = %58
%64 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.12, i64 0, i64 0))
br label %79
65: ; preds = %58
%66 = load i32, i32* %5
%67 = icmp eq i32 %66, 2
br i1 %67, label %68, label %70
68: ; preds = %65
%69 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0))
br label %78
70: ; preds = %65
%71 = load i32, i32* %5
%72 = icmp eq i32 %71, 3
br i1 %72, label %73, label %75
73: ; preds = %70
%74 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.14, i64 0, i64 0))
br label %77
75: ; preds = %70
%76 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.15, i64 0, i64 0))
br label %77
77: ; preds = %75, %73
br label %78
78: ; preds = %77, %68
br label %79
79: ; preds = %78, %63
br label %82
80: ; preds = %54
%81 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.16, i64 0, i64 0))
br label %82
82: ; preds = %80, %79
br label %83
83: ; preds = %82, %53
br label %84
84: ; preds = %83, %39
br label %85
85: ; preds = %84, %18
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.2 = [70 x i8] c"\0AWhat do you want?(press 1 or 2)\0A1.Omelette\0A2.Pancakes\0A\0AMy choice is:\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.5 = [238 x i8] c"\0A\0ACrack the eggs into a mixing bowl. Beat well with a fork.\0AHeat a small knob of butter in a small frying pan, add the eggs.\0AUsing a spatula, ease around the edges of the omelette, then fold it over in half. \0ANow eat your delicious eggs.\00"
@.str.6 = [202 x i8] c"\0A\0APut the flour, eggs, milk and a pinch of salt into a bowl or large jug, then whisk to a smooth batter.Pour it all in a pan and cook each pancake for 1min per side.Voila!Now eat your awesome pancakes.\00"
@.str.7 = [78 x i8] c"You are not getting a recipe if you can't press only 1 or 2 on your keyboard!\00"
@str = [70 x i8] c"\0AYou should have entered a/b/c/d.Sorry,dude,no second chance for you!\00"
@str.17 = [52 x i8] c"\0APress 1 or 2 or 3 and I will tell you what to eat\0A\00"
@str.18 = [52 x i8] c"You must be really desperate.Go for a shot of vodka\00"
@str.19 = [33 x i8] c"Go eat dogs you little china man\00"
@str.20 = [15 x i8] c"Go eat a steak\00"
@str.21 = [58 x i8] c"Go eat lutenitza cause lutenitza is lof,lutenitza is life\00"
@str.22 = [54 x i8] c"\0AAre you a zombie?Press 1 if you're a fucking zombie.\00"
@str.23 = [84 x i8] c"\0AFor a moment I got quite scared.Go eat salad like a good not brain eating creature\00"
@str.24 = [21 x i8] c"\0AThen go eat brains!\00"
@str.25 = [38 x i8] c"\0AEggtastic choice!Here is the recipe:\00"
@str.26 = [18 x i8] c"Are you serious?!\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%7 = bitcast i32* %4 to i8*
%8 = tail call i32 (...) @menu()
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%10 = load i8, i8* %1
switch i8 %10, label %45 [
i8 97, label %11
i8 98, label %13
i8 99, label %24
i8 100, label %33
]
11: ; preds = %0, %11
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.26, i64 0, i64 0))
br label %11
13: ; preds = %0
%14 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @.str.2, i64 0, i64 0))
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.25, i64 0, i64 0))
%17 = load i32, i32* %2
switch i32 %17, label %22 [
i32 1, label %18
i32 2, label %20
]
18: ; preds = %13
%19 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([238 x i8], [238 x i8]* @.str.5, i64 0, i64 0))
br label %47
20: ; preds = %13
%21 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([202 x i8], [202 x i8]* @.str.6, i64 0, i64 0))
br label %47
22: ; preds = %13
%23 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @.str.7, i64 0, i64 0))
br label %47
24: ; preds = %0
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.22, i64 0, i64 0))
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%27 = load i32, i32* %3
%28 = icmp eq i32 %27, 1
br i1 %28, label %29, label %31
29: ; preds = %24
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.24, i64 0, i64 0))
br label %47
31: ; preds = %24
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([84 x i8], [84 x i8]* @str.23, i64 0, i64 0))
br label %47
33: ; preds = %0
%34 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.17, i64 0, i64 0))
%35 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
%36 = load i32, i32* %4
switch i32 %36, label %43 [
i32 1, label %37
i32 2, label %39
i32 3, label %41
]
37: ; preds = %33
%38 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.21, i64 0, i64 0))
br label %47
39: ; preds = %33
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.20, i64 0, i64 0))
br label %47
41: ; preds = %33
%42 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.19, i64 0, i64 0))
br label %47
43: ; preds = %33
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.18, i64 0, i64 0))
br label %47
45: ; preds = %0
%46 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str, i64 0, i64 0))
br label %47
47: ; preds = %20, %22, %18, %45, %39, %43, %41, %37, %29, %31
ret i32 0
}