#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*/ getch(int /*<<< orphan*/);
int /*<<< orphan*/ instruct();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ thanks();
int main() {
  printf("\t\aWelcome!!\n");
  int i, Guess_num, random_num = 91, result;
  char ch1 = 'H';
  char ch2 = 'h';
  char ch;
  printf("To know how to play this game press 'H'\n");
  scanf("%c", &ch);
  if (ch == ch1 || ch2) {
    instruct();
  }
  for (i = 1; i <= 5; i = i + 1) {
    printf("\nEnter your Guess number>\n");
    scanf("%d", &Guess_num);
    result = random_num - Guess_num;
    if (result > 0) {
      printf("Your Guess number is worng!!It %d higher than your number.\n",
             result + 2);
    } else if (Guess_num == random_num) {
      printf("\aYour Guess is correct.you win^^\n");
      thanks();
      getch(0);
    } else {
      printf("Your Guess number is worng!!It %d lower than your number.\n",
             result * (-1));
    }
  }
  printf("\n\n\aGame is over.You are a looser!!!\tTry again.\n");
  thanks();
  getch(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x5b,-0x10(%rbp)
movb   $0x48,-0x15(%rbp)
movb   $0x68,-0x16(%rbp)
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea5(%rip),%rdi
lea    -0x17(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movsbl -0x17(%rbp),%eax
movsbl -0x15(%rbp),%ecx
cmp    %ecx,%eax
je     11b9 <main+0x69>
movsbl -0x16(%rbp),%eax
cmp    $0x0,%eax
je     11c0 <main+0x70>
mov    $0x0,%al
call   1030 <instruct@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     1274 <main+0x124>
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe6e(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    121d <main+0xcd>
mov    -0x14(%rbp),%esi
add    $0x2,%esi
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1261 <main+0x111>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    124a <main+0xfa>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1070 <thanks@plt>
xor    %edi,%edi
call   1060 <getch@plt>
jmp    125c <main+0x10c>
imul   $0xffffffff,-0x14(%rbp),%esi
lea    0xe60(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1261 <main+0x111>
jmp    1266 <main+0x116>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11c7 <main+0x77>
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1070 <thanks@plt>
xor    %edi,%edi
call   1060 <getch@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf15(%rip),%rdi
call   1030 <puts@plt>
lea    0xf15(%rip),%rdi
call   1030 <puts@plt>
lea    0xe80(%rip),%rdi
lea    0x7(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
xor    %eax,%eax
call   1040 <instruct@plt>
lea    0xf46(%rip),%rdi
call   1030 <puts@plt>
lea    0xe5d(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    (%rsp),%esi
cmp    $0x5a,%esi
jg     11ca <main+0x6a>
mov    $0x5d,%eax
sub    %esi,%eax
lea    0xe40(%rip),%rdi
mov    %eax,%esi
jmp    11f5 <main+0x95>
cmp    $0x5b,%esi
jne    11eb <main+0x8b>
lea    0xf24(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1080 <thanks@plt>
xor    %edi,%edi
call   1070 <getch@plt>
jmp    11fc <main+0x9c>
add    $0xffffffa5,%esi
lea    0xe4d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xdf4(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    (%rsp),%eax
lea    -0x5b(%rax),%esi
cmp    $0x5b,%eax
jge    1234 <main+0xd4>
mov    $0x5d,%esi
sub    %eax,%esi
lea    0xdd4(%rip),%rdi
jmp    1259 <main+0xf9>
jne    1252 <main+0xf2>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1080 <thanks@plt>
xor    %edi,%edi
call   1070 <getch@plt>
jmp    1260 <main+0x100>
lea    0xde9(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe79(%rip),%rdi
call   1030 <puts@plt>
lea    0xd90(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    (%rsp),%eax
lea    -0x5b(%rax),%esi
cmp    $0x5b,%eax
jge    1298 <main+0x138>
mov    $0x5d,%esi
sub    %eax,%esi
lea    0xd70(%rip),%rdi
jmp    12bd <main+0x15d>
jne    12b6 <main+0x156>
lea    0xe59(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1080 <thanks@plt>
xor    %edi,%edi
call   1070 <getch@plt>
jmp    12c4 <main+0x164>
lea    0xd85(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe15(%rip),%rdi
call   1030 <puts@plt>
lea    0xd2c(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    (%rsp),%eax
lea    -0x5b(%rax),%esi
cmp    $0x5b,%eax
jge    12fc <main+0x19c>
mov    $0x5d,%esi
sub    %eax,%esi
lea    0xd0c(%rip),%rdi
jmp    1321 <main+0x1c1>
jne    131a <main+0x1ba>
lea    0xdf5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1080 <thanks@plt>
xor    %edi,%edi
call   1070 <getch@plt>
jmp    1328 <main+0x1c8>
lea    0xd21(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdb1(%rip),%rdi
call   1030 <puts@plt>
lea    0xcc8(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    (%rsp),%eax
lea    -0x5b(%rax),%esi
cmp    $0x5b,%eax
jge    1360 <main+0x200>
mov    $0x5d,%esi
sub    %eax,%esi
lea    0xca8(%rip),%rdi
jmp    1385 <main+0x225>
jne    137e <main+0x21e>
lea    0xd91(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1080 <thanks@plt>
xor    %edi,%edi
call   1070 <getch@plt>
jmp    138c <main+0x22c>
lea    0xcbd(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd1e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1080 <thanks@plt>
xor    %edi,%edi
call   1070 <getch@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"\09\07Welcome!!\0A\00"
@.str.1 = [41 x i8] c"To know how to play this game press 'H'\0A\00"
@.str.2 = [3 x i8] c"%c\00"
@.str.3 = [27 x i8] c"\0AEnter your Guess number>\0A\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [60 x i8] c"Your Guess number is worng!!It %d higher than your number.\0A\00"
@.str.6 = [34 x i8] c"\07Your Guess is correct.you win^^\0A\00"
@.str.7 = [59 x i8] c"Your Guess number is worng!!It %d lower than your number.\0A\00"
@.str.8 = [48 x i8] c"\0A\0A\07Game is over.You are a looser!!!\09Try again.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i32 0, i32* %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i32 91, i32* %4
store i8 72, i8* %6
store i8 104, i8* %7
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %8)
%12 = load i8, i8* %8
%13 = sext i8 %12 to i32
%14 = load i8, i8* %6
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %13, %15
br i1 %16, label %21, label %17
17: ; preds = %0
%18 = load i8, i8* %7
%19 = sext i8 %18 to i32
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %17, %0
%22 = call i32 (...) @instruct()
br label %23
23: ; preds = %21, %17
store i32 1, i32* %2
br label %24
24: ; preds = %53, %23
%25 = load i32, i32* %2
%26 = icmp sle i32 %25, 5
br i1 %26, label %27, label %56
27: ; preds = %24
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%29 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %3)
%30 = load i32, i32* %4
%31 = load i32, i32* %3
%32 = sub nsw i32 %30, %31
store i32 %32, i32* %5
%33 = load i32, i32* %5
%34 = icmp sgt i32 %33, 0
br i1 %34, label %35, label %39
35: ; preds = %27
%36 = load i32, i32* %5
%37 = add nsw i32 %36, 2
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.5, i64 0, i64 0), i32 %37)
br label %52
39: ; preds = %27
%40 = load i32, i32* %3
%41 = load i32, i32* %4
%42 = icmp eq i32 %40, %41
br i1 %42, label %43, label %47
43: ; preds = %39
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0))
%45 = call i32 (...) @thanks()
%46 = call i32 @getch(i32 0)
br label %51
47: ; preds = %39
%48 = load i32, i32* %5
%49 = mul nsw i32 %48, -1
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.7, i64 0, i64 0), i32 %49)
br label %51
51: ; preds = %47, %43
br label %52
52: ; preds = %51, %35
br label %53
53: ; preds = %52
%54 = load i32, i32* %2
%55 = add nsw i32 %54, 1
store i32 %55, i32* %2
br label %24
56: ; preds = %24
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0))
%58 = call i32 (...) @thanks()
%59 = call i32 @getch(i32 0)
%60 = load i32, i32* %1
ret i32 %60
}

LLVM IR (-O2):
@.str.2 = [3 x i8] c"%c\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [60 x i8] c"Your Guess number is worng!!It %d higher than your number.\0A\00"
@.str.7 = [59 x i8] c"Your Guess number is worng!!It %d lower than your number.\0A\00"
@str = [12 x i8] c"\09\07Welcome!!\00"
@str.9 = [40 x i8] c"To know how to play this game press 'H'\00"
@str.10 = [47 x i8] c"\0A\0A\07Game is over.You are a looser!!!\09Try again.\00"
@str.11 = [26 x i8] c"\0AEnter your Guess number>\00"
@str.12 = [33 x i8] c"\07Your Guess is correct.you win^^\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%4 = bitcast i32* %1 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.9, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%7 = call i32 (...) @instruct()
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.11, i64 0, i64 0))
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %1)
%10 = load i32, i32* %1
%11 = add i32 %10, -91
%12 = icmp slt i32 %10, 91
br i1 %12, label %13, label %16
13: ; preds = %0
%14 = sub i32 93, %10
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.5, i64 0, i64 0), i32 %14)
br label %24
16: ; preds = %0
%17 = icmp eq i32 %10, 91
br i1 %17, label %18, label %22
18: ; preds = %16
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.12, i64 0, i64 0))
%20 = call i32 (...) @thanks()
%21 = call i32 @getch(i32 0)
br label %24
22: ; preds = %16
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.7, i64 0, i64 0), i32 %11)
br label %24
24: ; preds = %13, %22, %18
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.11, i64 0, i64 0))
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %1)
%27 = load i32, i32* %1
%28 = add i32 %27, -91
%29 = icmp slt i32 %27, 91
br i1 %29, label %38, label %30
30: ; preds = %24
%31 = icmp eq i32 %27, 91
br i1 %31, label %34, label %32
32: ; preds = %30
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.7, i64 0, i64 0), i32 %28)
br label %41
34: ; preds = %30
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.12, i64 0, i64 0))
%36 = call i32 (...) @thanks()
%37 = call i32 @getch(i32 0)
br label %41
38: ; preds = %24
%39 = sub i32 93, %27
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.5, i64 0, i64 0), i32 %39)
br label %41
41: ; preds = %38, %34, %32
%42 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.11, i64 0, i64 0))
%43 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %1)
%44 = load i32, i32* %1
%45 = add i32 %44, -91
%46 = icmp slt i32 %44, 91
br i1 %46, label %55, label %47
47: ; preds = %41
%48 = icmp eq i32 %44, 91
br i1 %48, label %51, label %49
49: ; preds = %47
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.7, i64 0, i64 0), i32 %45)
br label %58
51: ; preds = %47
%52 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.12, i64 0, i64 0))
%53 = call i32 (...) @thanks()
%54 = call i32 @getch(i32 0)
br label %58
55: ; preds = %41
%56 = sub i32 93, %44
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.5, i64 0, i64 0), i32 %56)
br label %58
58: ; preds = %55, %51, %49
%59 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.11, i64 0, i64 0))
%60 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %1)
%61 = load i32, i32* %1
%62 = add i32 %61, -91
%63 = icmp slt i32 %61, 91
br i1 %63, label %72, label %64
64: ; preds = %58
%65 = icmp eq i32 %61, 91
br i1 %65, label %68, label %66
66: ; preds = %64
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.7, i64 0, i64 0), i32 %62)
br label %75
68: ; preds = %64
%69 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.12, i64 0, i64 0))
%70 = call i32 (...) @thanks()
%71 = call i32 @getch(i32 0)
br label %75
72: ; preds = %58
%73 = sub i32 93, %61
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.5, i64 0, i64 0), i32 %73)
br label %75
75: ; preds = %72, %68, %66
%76 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.11, i64 0, i64 0))
%77 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %1)
%78 = load i32, i32* %1
%79 = add i32 %78, -91
%80 = icmp slt i32 %78, 91
br i1 %80, label %89, label %81
81: ; preds = %75
%82 = icmp eq i32 %78, 91
br i1 %82, label %85, label %83
83: ; preds = %81
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.7, i64 0, i64 0), i32 %79)
br label %92
85: ; preds = %81
%86 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.12, i64 0, i64 0))
%87 = call i32 (...) @thanks()
%88 = call i32 @getch(i32 0)
br label %92
89: ; preds = %75
%90 = sub i32 93, %78
%91 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.5, i64 0, i64 0), i32 %90)
br label %92
92: ; preds = %89, %85, %83
%93 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.10, i64 0, i64 0))
%94 = call i32 (...) @thanks()
%95 = call i32 @getch(i32 0)
ret i32 0
}