#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 */
char getchar();
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ *strstr(char *, char *);
int main(void) {
  char s1[100] = {};
  char s2[10] = {};
  int i = 0;
  while ((s1[i] = getchar()) != '\n')
    i++;
  s1[i] = '\0';
  i = 0;
  while ((s2[i] = getchar()) != '\n')
    i++;
  s2[i] = '\0';
  strstr(s1, s2) == NULL ? putchar('N') : putchar('Y');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1040 <memset@plt>
lea    -0x7a(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <memset@plt>
movl   $0x0,-0x80(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
movslq -0x80(%rbp),%rcx
mov    %al,-0x70(%rbp,%rcx,1)
movsbl %al,%eax
cmp    $0xa,%eax
je     11a2 <main+0x62>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    1179 <main+0x39>
movslq -0x80(%rbp),%rax
movb   $0x0,-0x70(%rbp,%rax,1)
movl   $0x0,-0x80(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
movslq -0x80(%rbp),%rcx
mov    %al,-0x7a(%rbp,%rcx,1)
movsbl %al,%eax
cmp    $0xa,%eax
je     11db <main+0x9b>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    11b2 <main+0x72>
movslq -0x80(%rbp),%rax
movb   $0x0,-0x7a(%rbp,%rax,1)
lea    -0x70(%rbp),%rdi
lea    -0x7a(%rbp),%rsi
call   1060 <strstr@plt>
cmp    $0x0,%rax
jne    120a <main+0xca>
mov    $0x4e,%edi
call   1030 <putchar@plt>
jmp    1214 <main+0xd4>
mov    $0x59,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movl   $0x0,0x70(%rsp)
movw   $0x0,0x8(%rsp)
movq   $0x0,(%rsp)
mov    $0xffffffffffffffff,%rbx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %al,0x11(%rsp,%rbx,1)
add    $0x1,%rbx
cmp    $0xa,%al
jne    1180 <main+0x50>
mov    %ebx,%eax
movb   $0x0,0x10(%rsp,%rax,1)
mov    $0xffffffffffffffff,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %al,0x1(%rsp,%rbx,1)
add    $0x1,%rbx
cmp    $0xa,%al
jne    11b0 <main+0x80>
mov    %ebx,%eax
movb   $0x0,(%rsp,%rax,1)
lea    0x10(%rsp),%rdi
mov    %rsp,%rsi
call   1050 <strstr@plt>
test   %rax,%rax
mov    $0x4e,%eax
mov    $0x59,%edi
cmove  %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca [10 x i8]
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [100 x i8]* %2 to i8*
%6 = bitcast [10 x i8]* %3 to i8*
store i32 0, i32* %4
br label %7
7: ; preds = %14, %0
%8 = call signext i8 (...) @getchar()
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %10
store i8 %8, i8* %11
%12 = sext i8 %8 to i32
%13 = icmp ne i32 %12, 10
br i1 %13, label %14, label %17
14: ; preds = %7
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
br label %7
17: ; preds = %7
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %19
store i8 0, i8* %20
store i32 0, i32* %4
br label %21
21: ; preds = %28, %17
%22 = call signext i8 (...) @getchar()
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 %24
store i8 %22, i8* %25
%26 = sext i8 %22 to i32
%27 = icmp ne i32 %26, 10
br i1 %27, label %28, label %31
28: ; preds = %21
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 1
store i32 %30, i32* %4
br label %21
31: ; preds = %21
%32 = load i32, i32* %4
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 %33
store i8 0, i8* %34
%35 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%36 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%37 = call i32* @strstr(i8* %35, i8* %36)
%38 = icmp eq i32* %37, null
br i1 %38, label %39, label %41
39: ; preds = %31
%40 = call i32 @putchar(i8 signext 78)
br label %43
41: ; preds = %31
%42 = call i32 @putchar(i8 signext 89)
br label %43
43: ; preds = %41, %39
%44 = phi i32 [ %40, %39 ], [ %42, %41 ]
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
br label %5
5: ; preds = %5, %0
%6 = phi i64 [ %10, %5 ], [ 0, %0 ]
%7 = tail call signext i8 (...) @getchar()
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %6
store i8 %7, i8* %8
%9 = icmp eq i8 %7, 10
%10 = add nuw i64 %6, 1
br i1 %9, label %11, label %5
11: ; preds = %5
%12 = and i64 %6, 4294967295
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %12
store i8 0, i8* %13
br label %14
14: ; preds = %14, %11
%15 = phi i64 [ %19, %14 ], [ 0, %11 ]
%16 = tail call signext i8 (...) @getchar()
%17 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 %15
store i8 %16, i8* %17
%18 = icmp eq i8 %16, 10
%19 = add nuw i64 %15, 1
br i1 %18, label %20, label %14
20: ; preds = %14
%21 = and i64 %15, 4294967295
%22 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 %21
store i8 0, i8* %22
%23 = call i32* @strstr(i8* %3, i8* %4)
%24 = icmp eq i32* %23, null
%25 = select i1 %24, i8 78, i8 89
%26 = call i32 @putchar(i8 signext %25)
ret i32 0
}