#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 *);
int /*<<< orphan*/ rpsFunction();
int /*<<< orphan*/ rpslsFunction();
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char classicExtended;
  int selection = 0;
  printf("Do you want to play (C)lassic or (E)xtended version?\n");
  printf("Please choose C or E: ");
  scanf("%c", &classicExtended);
  selection = (int)classicExtended;
  if ((selection == 99) || (selection == 67)) {
    rpsFunction();
  }
  if ((selection == 101) || (selection == 69)) {
    rpslsFunction();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
call   1040 <printf@plt>
lea    0xed8(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1060 <scanf@plt>
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x63,-0xc(%rbp)
je     1199 <main+0x59>
cmpl   $0x43,-0xc(%rbp)
jne    11a0 <main+0x60>
mov    $0x0,%al
call   1050 <rpsFunction@plt>
cmpl   $0x65,-0xc(%rbp)
je     11b4 <main+0x74>
cmpl   $0x45,-0xc(%rbp)
jne    11bb <main+0x7b>
mov    $0x0,%al
call   1030 <rpslsFunction@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec2(%rip),%rdi
call   1040 <puts@plt>
lea    0xe9c(%rip),%rdi
call   1050 <printf@plt>
lea    0xea7(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1070 <scanf@plt>
mov    0x7(%rsp),%al
and    $0xdf,%al
cmp    $0x45,%al
je     1191 <main+0x41>
cmp    $0x43,%al
jne    1198 <main+0x48>
xor    %eax,%eax
call   1060 <rpsFunction@plt>
jmp    1198 <main+0x48>
xor    %eax,%eax
call   1030 <rpslsFunction@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [54 x i8] c"Do you want to play (C)lassic or (E)xtended version?\0A\00"
@.str.1 = [23 x i8] c"Please choose C or E: \00"
@.str.2 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
%4 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 99
br i1 %10, label %14, label %11
11: ; preds = %0
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 67
br i1 %13, label %14, label %16
14: ; preds = %11, %0
%15 = call i32 (...) @rpsFunction()
br label %16
16: ; preds = %14, %11
%17 = load i32, i32* %3
%18 = icmp eq i32 %17, 101
br i1 %18, label %22, label %19
19: ; preds = %16
%20 = load i32, i32* %3
%21 = icmp eq i32 %20, 69
br i1 %21, label %22, label %24
22: ; preds = %19, %16
%23 = call i32 (...) @rpslsFunction()
br label %24
24: ; preds = %22, %19
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [23 x i8] c"Please choose C or E: \00"
@.str.2 = [3 x i8] c"%c\00"
@str = [53 x i8] c"Do you want to play (C)lassic or (E)xtended version?\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %1)
%5 = load i8, i8* %1
%6 = and i8 %5, -33
switch i8 %6, label %11 [
i8 67, label %7
i8 69, label %9
]
7: ; preds = %0
%8 = call i32 (...) @rpsFunction()
br label %11
9: ; preds = %0
%10 = call i32 (...) @rpslsFunction()
br label %11
11: ; preds = %0, %7, %9
ret i32 0
}