#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 */
scalar_t__ isSubsequence(char *, char *);
int /*<<< orphan*/ printf(char *);
scalar_t__ scanf(char *, char *, char *);
int main(void) {
  char strOne[500000 + 1], strTwo[500000 + 1];
  while (scanf("%s %s", strOne, strTwo) > 0) {
    if (isSubsequence(strOne, strTwo))
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf4260,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x7a130(%rbp),%rsi
lea    -0xf4260(%rbp),%rdx
lea    0xea9(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x0,%rax
jle    11a5 <main+0x75>
lea    -0x7a130(%rbp),%rdi
lea    -0xf4260(%rbp),%rsi
call   1050 <isSubsequence@plt>
cmp    $0x0,%rax
je     1194 <main+0x64>
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
jmp    11a0 <main+0x70>
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0xf4260,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf4260,%rsp
lea    0xeb9(%rip),%rdi
lea    0x7a130(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
test   %rax,%rax
jle    11ad <main+0x7d>
lea    0x7a130(%rsp),%r14
mov    %rsp,%rbx
lea    0xe98(%rip),%r12
lea    0xe94(%rip),%r13
lea    0xe84(%rip),%r15
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <isSubsequence@plt>
test   %rax,%rax
mov    %r13,%rdi
cmove  %r12,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
test   %rax,%rax
jg     1180 <main+0x50>
xor    %eax,%eax
add    $0xf4260,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s %s\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 [500001 x i8]
%3 = alloca [500001 x i8]
store i32 0, i32* %1
br label %4
4: ; preds = %18, %0
%5 = getelementptr inbounds [500001 x i8], [500001 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [500001 x i8], [500001 x i8]* %3, i64 0, i64 0
%7 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
%8 = icmp sgt i64 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %4
%10 = getelementptr inbounds [500001 x i8], [500001 x i8]* %2, i64 0, i64 0
%11 = getelementptr inbounds [500001 x i8], [500001 x i8]* %3, i64 0, i64 0
%12 = call i64 @isSubsequence(i8* %10, i8* %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %18
16: ; preds = %9
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %18
18: ; preds = %16, %14
br label %4
19: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s %s\00"
@str = [3 x i8] c"No\00"
@str.3 = [4 x i8] c"Yes\00"
define i32 @main() {
%1 = alloca [500001 x i8]
%2 = alloca [500001 x i8]
%3 = getelementptr inbounds [500001 x i8], [500001 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [500001 x i8], [500001 x i8]* %2, i64 0, i64 0
%5 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %0, %7
%8 = call i64 @isSubsequence(i8* %3, i8* %4)
%9 = icmp eq i64 %8, 0
%10 = select i1 %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0)
%11 = call i32 @puts(i8* dereferenceable(1) %10)
%12 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
%13 = icmp sgt i64 %12, 0
br i1 %13, label %7, label %14
14: ; preds = %7, %0
ret i32 0
}