#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__ IsToken(char *);
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *);
scalar_t__ scanf(char *, ...);
int main() {
  int n = 0;
  char sz[51] = {'\0'};
  char *psz = sz;
  char c;
  scanf("%d", &n);
  while ((scanf("%c", &c) && c != '\n'))
    ;
  while (n-- > 0) {
    gets(psz);
    if (IsToken(sz)) {
      printf("yes\n");
    } else {
      printf("no\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x33,%edx
call   1040 <memset@plt>
lea    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
lea    0xe7b(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
lea    0xe6c(%rip),%rdi
lea    -0x49(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x4a(%rbp)
je     11c1 <main+0x71>
movsbl -0x49(%rbp),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x4a(%rbp)
mov    -0x4a(%rbp),%al
test   $0x1,%al
jne    11d1 <main+0x81>
jmp    11d6 <main+0x86>
jmp    1190 <main+0x40>
jmp    11db <main+0x8b>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
jle    122d <main+0xdd>
mov    -0x48(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x40(%rbp),%rdi
call   1060 <IsToken@plt>
cmp    $0x0,%rax
je     121c <main+0xcc>
lea    0xdf4(%rip),%rdi
call   1030 <printf@plt>
jmp    1228 <main+0xd8>
lea    0xde8(%rip),%rdi
call   1030 <printf@plt>
jmp    11db <main+0x8b>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x50,%rsp
movl   $0x0,0xc(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movl   $0x0,0x3f(%rsp)
lea    0xe8e(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xe7e(%rip),%r14
lea    0xb(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
test   %rax,%rax
je     11a9 <main+0x69>
cmpb   $0xa,0xb(%rsp)
jne    1190 <main+0x50>
mov    0xc(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0xc(%rsp)
test   %eax,%eax
jle    11fe <main+0xbe>
lea    0x10(%rsp),%rbx
lea    0xe42(%rip),%r14
lea    0xe3e(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1040 <gets@plt>
mov    %rbx,%rdi
call   1050 <IsToken@plt>
test   %rax,%rax
mov    %r15,%rdi
cmove  %r14,%rdi
call   1030 <puts@plt>
mov    0xc(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0xc(%rsp)
test   %eax,%eax
jg     11d0 <main+0x90>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [5 x i8] c"yes\0A\00"
@.str.3 = [4 x i8] c"no\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [51 x i8]
%4 = alloca i8*
%5 = alloca i8
store i32 0, i32* %1
store i32 0, i32* %2
%6 = bitcast [51 x i8]* %3 to i8*
%7 = getelementptr inbounds [51 x i8], [51 x i8]* %3, i64 0, i64 0
store i8* %7, i8** %4
%8 = call i64 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %9
9: ; preds = %18, %0
%10 = call i64 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i8, i8* %5
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 10
br label %16
16: ; preds = %12, %9
%17 = phi i1 [ false, %9 ], [ %15, %12 ]
br i1 %17, label %18, label %19
18: ; preds = %16
br label %9
19: ; preds = %16
br label %20
20: ; preds = %34, %19
%21 = load i32, i32* %2
%22 = add nsw i32 %21, -1
store i32 %22, i32* %2
%23 = icmp sgt i32 %21, 0
br i1 %23, label %24, label %35
24: ; preds = %20
%25 = load i8*, i8** %4
%26 = call i32 @gets(i8* %25)
%27 = getelementptr inbounds [51 x i8], [51 x i8]* %3, i64 0, i64 0
%28 = call i64 @IsToken(i8* %27)
%29 = icmp ne i64 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %24
%31 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %34
32: ; preds = %24
%33 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %34
34: ; preds = %32, %30
br label %20
35: ; preds = %20
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%c\00"
@str = [3 x i8] c"no\00"
@str.4 = [4 x i8] c"yes\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [51 x i8]
%3 = alloca i8
%4 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%5 = getelementptr inbounds [51 x i8], [51 x i8]* %2, i64 0, i64 0
%6 = call i64 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
br label %7
7: ; preds = %7, %0
%8 = call i64 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%9 = icmp ne i64 %8, 0
%10 = load i8, i8* %3
%11 = icmp ne i8 %10, 10
%12 = select i1 %9, i1 %11, i1 false
br i1 %12, label %7, label %13
13: ; preds = %7
%14 = load i32, i32* %1
%15 = add nsw i32 %14, -1
store i32 %15, i32* %1
%16 = icmp sgt i32 %14, 0
br i1 %16, label %17, label %26
17: ; preds = %13, %17
%18 = call i32 @gets(i8* %5)
%19 = call i64 @IsToken(i8* %5)
%20 = icmp eq i64 %19, 0
%21 = select i1 %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.4, i64 0, i64 0)
%22 = call i32 @puts(i8* dereferenceable(1) %21)
%23 = load i32, i32* %1
%24 = add nsw i32 %23, -1
store i32 %24, i32* %1
%25 = icmp sgt i32 %23, 0
br i1 %25, label %17, label %26
26: ; preds = %17, %13
ret i32 0
}