#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 main() {
  char input = 0;
  scanf("%c", &input);
  switch (input) {
  case 'y':
  case 'Y':
    printf("Yes\n");
    break;
  case 'n':
  case 'N':
    printf("No\n");
    break;
  default:
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
lea    0xec6(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x4e,%eax
je     119c <main+0x7c>
jmp    1158 <main+0x38>
mov    -0xc(%rbp),%eax
sub    $0x59,%eax
je     118b <main+0x6b>
jmp    1169 <main+0x49>
mov    -0xc(%rbp),%eax
sub    $0x6e,%eax
je     119c <main+0x7c>
jmp    117a <main+0x5a>
mov    -0xc(%rbp),%eax
sub    $0x79,%eax
jne    11ad <main+0x8d>
jmp    118b <main+0x6b>
lea    0xe71(%rip),%rdi
call   1030 <printf@plt>
jmp    11b2 <main+0x92>
lea    0xe65(%rip),%rdi
call   1030 <printf@plt>
jmp    11b2 <main+0x92>
jmp    11b2 <main+0x92>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movb   $0x0,0x7(%rsp)
lea    0xed3(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
movsbl 0x7(%rsp),%eax
lea    0xec3(%rip),%rdi
cmp    $0x6d,%eax
jg     1154 <main+0x34>
cmp    $0x4e,%eax
je     115e <main+0x3e>
cmp    $0x59,%eax
je     1165 <main+0x45>
jmp    116a <main+0x4a>
cmp    $0x79,%eax
je     1165 <main+0x45>
cmp    $0x6e,%eax
jne    116a <main+0x4a>
lea    0xe9e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [5 x i8] c"Yes\0A\00"
@.str.2 = [4 x i8] c"No\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 0, i8* %2
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %10 [
i32 121, label %6
i32 89, label %6
i32 110, label %8
i32 78, label %8
]
6: ; preds = %0, %0
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %11
8: ; preds = %0, %0
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %11
10: ; preds = %0
br label %11
11: ; preds = %10, %8, %6
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@str = [3 x i8] c"No\00"
@str.3 = [4 x i8] c"Yes\00"
define i32 @main() {
%1 = alloca i8
store i8 0, i8* %1
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
switch i32 %4, label %9 [
i32 121, label %6
i32 89, label %6
i32 110, label %5
i32 78, label %5
]
5: ; preds = %0, %0
br label %6
6: ; preds = %0, %0, %5
%7 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0), %5 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0), %0 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0), %0 ]
%8 = call i32 @puts(i8* dereferenceable(1) %7)
br label %9
9: ; preds = %6, %0
ret i32 0
}