#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*/ printf(char *, ...);
scalar_t__ scanf(char *, int *);
int main(int argc, char *argv[]) {
  unsigned int playerNumber = 0;
  signed int chosenNumber = 0;
  unsigned int cpuNumber = 200;
  printf("Please enter a number less than 100:");
  if (scanf("%d", &chosenNumber)) {
    if (chosenNumber > 99) {
      printf("That's not below 100!  You lose!\n");
    } else {
      playerNumber += chosenNumber;
      if (chosenNumber > cpuNumber) {
        printf("You win!");
        printf("Scores: %x, %x", cpuNumber, playerNumber);
      } else {
        printf("You Lose!");
      }
    }
  } else {
    printf("That's not a number silly!");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0xc8,-0x1c(%rbp)
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
cmp    $0x0,%rax
je     11e4 <main+0xc4>
cmpl   $0x63,-0x18(%rbp)
jle    1190 <main+0x70>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11df <main+0xbf>
mov    -0x18(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jbe    11cc <main+0xac>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11da <main+0xba>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11df <main+0xbf>
jmp    11f2 <main+0xd2>
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xebc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
test   %rax,%rax
je     1178 <main+0x48>
mov    0xc(%rsp),%ebx
cmp    $0x64,%ebx
jl     1181 <main+0x51>
lea    0xef4(%rip),%rdi
call   1030 <puts@plt>
jmp    11bc <main+0x8c>
lea    0xecb(%rip),%rdi
jmp    11b5 <main+0x85>
cmp    $0xc9,%ebx
jb     11ae <main+0x7e>
lea    0xe98(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe93(%rip),%rdi
mov    $0xc8,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11bc <main+0x8c>
lea    0xe8b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Please enter a number less than 100:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [34 x i8] c"That's not below 100! You lose!\0A\00"
@.str.3 = [9 x i8] c"You win!\00"
@.str.4 = [15 x i8] c"Scores: %x, %x\00"
@.str.5 = [10 x i8] c"You Lose!\00"
@.str.6 = [27 x i8] c"That's not a number silly!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 200, i32* %8
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%10 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %33
12: ; preds = %2
%13 = load i32, i32* %7
%14 = icmp sgt i32 %13, 99
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
br label %32
17: ; preds = %12
%18 = load i32, i32* %7
%19 = load i32, i32* %6
%20 = add i32 %19, %18
store i32 %20, i32* %6
%21 = load i32, i32* %7
%22 = load i32, i32* %8
%23 = icmp ugt i32 %21, %22
br i1 %23, label %24, label %29
24: ; preds = %17
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%26 = load i32, i32* %8
%27 = load i32, i32* %6
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %26, i32 %27)
br label %31
29: ; preds = %17
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
br label %31
31: ; preds = %29, %24
br label %32
32: ; preds = %31, %15
br label %35
33: ; preds = %2
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
br label %35
35: ; preds = %33, %32
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"Please enter a number less than 100:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.3 = [9 x i8] c"You win!\00"
@.str.4 = [15 x i8] c"Scores: %x, %x\00"
@.str.5 = [10 x i8] c"You Lose!\00"
@.str.6 = [27 x i8] c"That's not a number silly!\00"
@str = [33 x i8] c"That's not below 100! You lose!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%6 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%7 = icmp eq i64 %6, 0
br i1 %7, label %20, label %8
8: ; preds = %2
%9 = load i32, i32* %3
%10 = icmp sgt i32 %9, 99
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
br label %22
13: ; preds = %8
%14 = icmp ugt i32 %9, 200
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 200, i32 %9)
br label %22
18: ; preds = %13
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
br label %22
20: ; preds = %2
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
br label %22
22: ; preds = %11, %18, %15, %20
ret i32 0
}