#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*/ scanf(char *, char *);
int SetInfo() {
  char c;
  printf("Do you want to set for the game?(Default:N)(Y/N):");
  scanf("%c", &c);
  printf("\n");
  if (c == '\n' || c == 'N' || c == 'n')
    return 0;
  else if (c == 'Y' || c == 'y')
    return 1;
  else
    return -1;
}


x86 assembly (clang, -O0):
<SetInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     1177 <SetInfo+0x57>
movsbl -0x5(%rbp),%eax
cmp    $0x4e,%eax
je     1177 <SetInfo+0x57>
movsbl -0x5(%rbp),%eax
cmp    $0x6e,%eax
jne    1183 <SetInfo+0x63>
movl   $0x0,-0x4(%rbp)
jmp    11b0 <SetInfo+0x90>
movsbl -0x5(%rbp),%eax
cmp    $0x59,%eax
je     119d <SetInfo+0x7d>
movsbl -0x5(%rbp),%eax
cmp    $0x79,%eax
jne    11a9 <SetInfo+0x89>
movl   $0x1,-0x4(%rbp)
jmp    11b0 <SetInfo+0x90>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetInfo>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xeee(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1050 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
mov    0x7(%rsp),%cl
cmp    $0xa,%cl
je     117d <SetInfo+0x4d>
cmp    $0x4e,%cl
je     117d <SetInfo+0x4d>
cmp    $0x6e,%cl
je     117d <SetInfo+0x4d>
and    $0xdf,%cl
xor    %eax,%eax
cmp    $0x59,%cl
sete   %al
add    %eax,%eax
add    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"Do you want to set for the game?(Default:N)(Y/N):\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @SetInfo() {
%1 = alloca i32
%2 = alloca i8
%3 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 10
br i1 %8, label %17, label %9
9: ; preds = %0
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 78
br i1 %12, label %17, label %13
13: ; preds = %9
%14 = load i8, i8* %2
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 110
br i1 %16, label %17, label %18
17: ; preds = %13, %9, %0
store i32 0, i32* %1
br label %28
18: ; preds = %13
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 89
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 121
br i1 %25, label %26, label %27
26: ; preds = %22, %18
store i32 1, i32* %1
br label %28
27: ; preds = %22
store i32 -1, i32* %1
br label %28
28: ; preds = %27, %26, %17
%29 = load i32, i32* %1
ret i32 %29
}

LLVM IR (-O2):
@.str = [50 x i8] c"Do you want to set for the game?(Default:N)(Y/N):\00"
@.str.1 = [3 x i8] c"%c\00"
define i32 @SetInfo() {
%1 = alloca i8
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = call i32 @putchar(i32 10)
%5 = load i8, i8* %1
switch i8 %5, label %6 [
i8 110, label %10
i8 78, label %10
i8 10, label %10
]
6: ; preds = %0
%7 = and i8 %5, -33
%8 = icmp eq i8 %7, 89
%9 = select i1 %8, i32 1, i32 -1
br label %10
10: ; preds = %6, %0, %0, %0
%11 = phi i32 [ 0, %0 ], [ 0, %0 ], [ 0, %0 ], [ %9, %6 ]
ret i32 %11
}