#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 */
typedef int /*<<< orphan*/ b;
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ getchar();
int gets(char *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
scalar_t__ strcmp(char *, char *);
int strlen(char *);
int main() {
  int i, j, n, len1, len2, temp, k;
  char a[5005], b[5005], c[5005];
  scanf("%d", &n);
  getchar();
  while (n--) {
    gets(c);
    memset(a, '0', sizeof(a));
    memset(b, '0', sizeof(b));
    len1 = 0;
    while (gets(c), strcmp(c, "END") != 0) {
      k = strlen(c);
      for (i = 0; i <= k; i++) {
        a[len1] = c[i];
        len1++;
      }
    }
    gets(c);
    len2 = 0;
    while (gets(c), strcmp(c, "END") != 0) {
      k = strlen(c);
      for (i = 0; i <= k; i++) {
        b[len2] = c[i];
        len2++;
      }
    }
    temp = 0;
    for (i = 0, j = 0; i <= len1 && j <= len2;) {
      if (a[i] != b[j])
        if (a[i] == ' ' || a[i] == '\t' || a[i] == '\0') {
          i++;
          temp = 1;
        } else if (b[j] == ' ' || b[j] == '\t' || b[j] == '\0') {
          j++;
          temp = 1;
        } else {
          temp = 2;
          break;
        }
      else {
        i++;
        j++;
      }
    }
    if (temp == 0)
      printf("Accepted\n");
    if (temp == 1)
      printf("Presentation Error\n");
    if (temp == 2)
      printf("Wrong Answer\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3ae0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe77(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1090 <scanf@plt>
mov    $0x0,%al
call   1070 <getchar@plt>
mov    -0x10(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x10(%rbp)
cmp    $0x0,%eax
je     1480 <main+0x310>
lea    -0x3ad0(%rbp),%rdi
call   1080 <gets@plt>
lea    -0x13b0(%rbp),%rdi
mov    $0x30,%esi
mov    $0x138d,%edx
call   1050 <memset@plt>
lea    -0x2740(%rbp),%rdi
mov    $0x30,%esi
mov    $0x138d,%edx
call   1050 <memset@plt>
movl   $0x0,-0x14(%rbp)
lea    -0x3ad0(%rbp),%rdi
call   1080 <gets@plt>
lea    -0x3ad0(%rbp),%rdi
lea    0xdfd(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     1269 <main+0xf9>
lea    -0x3ad0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     1264 <main+0xf4>
movslq -0x8(%rbp),%rax
mov    -0x3ad0(%rbp,%rax,1),%cl
movslq -0x14(%rbp),%rax
mov    %cl,-0x13b0(%rbp,%rax,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    122b <main+0xbb>
jmp    11ec <main+0x7c>
lea    -0x3ad0(%rbp),%rdi
call   1080 <gets@plt>
movl   $0x0,-0x18(%rbp)
lea    -0x3ad0(%rbp),%rdi
call   1080 <gets@plt>
lea    -0x3ad0(%rbp),%rdi
lea    0xd6d(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     12f9 <main+0x189>
lea    -0x3ad0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     12f4 <main+0x184>
movslq -0x8(%rbp),%rax
mov    -0x3ad0(%rbp,%rax,1),%cl
movslq -0x18(%rbp),%rax
mov    %cl,-0x2740(%rbp,%rax,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12bb <main+0x14b>
jmp    127c <main+0x10c>
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0x14(%rbp),%ecx
mov    %al,-0x3ad1(%rbp)
jg     1331 <main+0x1c1>
mov    -0xc(%rbp),%eax
cmp    -0x18(%rbp),%eax
setle  %al
mov    %al,-0x3ad1(%rbp)
mov    -0x3ad1(%rbp),%al
test   $0x1,%al
jne    1344 <main+0x1d4>
jmp    1439 <main+0x2c9>
movslq -0x8(%rbp),%rax
movsbl -0x13b0(%rbp,%rax,1),%eax
ff
movslq -0xc(%rbp),%rcx
movsbl -0x2740(%rbp,%rcx,1),%ecx
ff
cmp    %ecx,%eax
je     1422 <main+0x2b2>
movslq -0x8(%rbp),%rax
movsbl -0x13b0(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
je     13a3 <main+0x233>
movslq -0x8(%rbp),%rax
movsbl -0x13b0(%rbp,%rax,1),%eax
ff
cmp    $0x9,%eax
je     13a3 <main+0x233>
movslq -0x8(%rbp),%rax
movsbl -0x13b0(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
jne    13b8 <main+0x248>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
movl   $0x1,-0x1c(%rbp)
jmp    141d <main+0x2ad>
movslq -0xc(%rbp),%rax
movsbl -0x2740(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
je     13f7 <main+0x287>
movslq -0xc(%rbp),%rax
movsbl -0x2740(%rbp,%rax,1),%eax
ff
cmp    $0x9,%eax
je     13f7 <main+0x287>
movslq -0xc(%rbp),%rax
movsbl -0x2740(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
jne    140c <main+0x29c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x1c(%rbp)
jmp    1418 <main+0x2a8>
movl   $0x2,-0x1c(%rbp)
jmp    1439 <main+0x2c9>
jmp    141d <main+0x2ad>
jmp    1434 <main+0x2c4>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    130e <main+0x19e>
cmpl   $0x0,-0x1c(%rbp)
jne    144f <main+0x2df>
lea    0xbbd(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x1,-0x1c(%rbp)
jne    1465 <main+0x2f5>
lea    0xbb1(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x2,-0x1c(%rbp)
jne    147b <main+0x30b>
lea    0xbaf(%rip),%rdi
call   1040 <printf@plt>
jmp    1199 <main+0x29>
xor    %eax,%eax
add    $0x3ae0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3ac8,%rsp
lea    0xe68(%rip),%rdi
lea    0xc(%rsp),%rsi
call   10a0 <scanf@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
subl   $0x1,0xc(%rsp)
jae    11c4 <main+0x44>
xor    %eax,%eax
add    $0x3ac8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x2730(%rsp),%r13
lea    0xe30(%rip),%r12
jmp    11ec <main+0x6c>
lea    0xe2b(%rip),%rdi
nopl   0x0(%rax)
call   1030 <puts@plt>
subl   $0x1,0xc(%rsp)
jb     11b0 <main+0x30>
mov    %r13,%rdi
call   1090 <gets@plt>
lea    0x13a0(%rsp),%rdi
mov    $0x30,%esi
mov    $0x138d,%edx
call   1050 <memset@plt>
lea    0x10(%rsp),%rdi
mov    $0x30,%esi
mov    $0x138d,%edx
call   1050 <memset@plt>
mov    %r13,%rdi
call   1090 <gets@plt>
mov    %r13,%rdi
mov    %r12,%rsi
call   1060 <strcmp@plt>
xor    %r15d,%r15d
mov    $0x0,%r14d
test   %rax,%rax
je     12a0 <main+0x120>
xor    %r14d,%r14d
jmp    1268 <main+0xe8>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r13,%rdi
call   1090 <gets@plt>
mov    %r13,%rdi
mov    %r12,%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     12a0 <main+0x120>
mov    %r13,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
js     1250 <main+0xd0>
mov    %eax,%ebx
movslq %r14d,%rbp
lea    (%rsp,%rbp,1),%rdi
add    $0x13a0,%rdi
mov    %eax,%edx
add    $0x1,%rdx
mov    %r13,%rsi
call   1080 <memcpy@plt>
lea    (%rbx,%rbp,1),%r14d
add    $0x1,%r14d
jmp    1250 <main+0xd0>
nopl   0x0(%rax)
mov    %r13,%rdi
call   1090 <gets@plt>
mov    %r13,%rdi
call   1090 <gets@plt>
mov    %r13,%rdi
mov    %r12,%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1320 <main+0x1a0>
xor    %r15d,%r15d
jmp    12e8 <main+0x168>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r13,%rdi
call   1090 <gets@plt>
mov    %r13,%rdi
mov    %r12,%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1320 <main+0x1a0>
mov    %r13,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
js     12d0 <main+0x150>
mov    %eax,%ebx
movslq %r15d,%rbp
lea    (%rsp,%rbp,1),%rdi
add    $0x10,%rdi
mov    %eax,%edx
add    $0x1,%rdx
mov    %r13,%rsi
call   1080 <memcpy@plt>
lea    (%rbx,%rbp,1),%r15d
add    $0x1,%r15d
jmp    12d0 <main+0x150>
nopl   0x0(%rax)
lea    0xd00(%rip),%rdi
test   %r14d,%r14d
js     11e0 <main+0x60>
lea    0xcf0(%rip),%rdi
test   %r15d,%r15d
js     11e0 <main+0x60>
xor    %esi,%esi
xor    %eax,%eax
xor    %ecx,%ecx
movabs $0x100000201,%rbp
jmp    1370 <main+0x1f0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ecx
add    $0x1,%eax
cmp    %r14d,%ecx
jg     13bd <main+0x23d>
cmp    %r15d,%eax
jg     13bd <main+0x23d>
movslq %ecx,%rdx
movzbl 0x13a0(%rsp,%rdx,1),%edx
movslq %eax,%rdi
movzbl 0x10(%rsp,%rdi,1),%ebx
cmp    %bl,%dl
je     1360 <main+0x1e0>
cmp    $0x20,%dl
ja     139a <main+0x21a>
movzbl %dl,%edx
bt     %rdx,%rbp
jae    139a <main+0x21a>
add    $0x1,%ecx
jmp    13b3 <main+0x233>
cmp    $0x20,%bl
ja     11d5 <main+0x55>
movzbl %bl,%edx
bt     %rdx,%rbp
jae    11d5 <main+0x55>
add    $0x1,%eax
mov    $0x1,%esi
cmp    %r14d,%ecx
jle    136b <main+0x1eb>
cmp    $0x2,%esi
ja     11e5 <main+0x65>
movslq %esi,%rax
lea    0xc60(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    11e0 <main+0x60>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"END\00"
@.str.2 = [10 x i8] c"Accepted\0A\00"
@.str.3 = [20 x i8] c"Presentation Error\0A\00"
@.str.4 = [14 x i8] c"Wrong Answer\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [5005 x i8]
%10 = alloca [5005 x i8]
%11 = alloca [5005 x i8]
store i32 0, i32* %1
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%13 = call i32 (...) @getchar()
br label %14
14: ; preds = %177, %0
%15 = load i32, i32* %4
%16 = add nsw i32 %15, -1
store i32 %16, i32* %4
%17 = icmp ne i32 %15, 0
br i1 %17, label %18, label %178
18: ; preds = %14
%19 = getelementptr inbounds [5005 x i8], [5005 x i8]* %11, i64 0, i64 0
%20 = call i32 @gets(i8* %19)
%21 = getelementptr inbounds [5005 x i8], [5005 x i8]* %9, i64 0, i64 0
%22 = call i32 @memset(i8* %21, i32 48, i32 5005)
%23 = getelementptr inbounds [5005 x i8], [5005 x i8]* %10, i64 0, i64 0
%24 = call i32 @memset(i8* %23, i32 48, i32 5005)
store i32 0, i32* %5
br label %25
25: ; preds = %51, %18
%26 = getelementptr inbounds [5005 x i8], [5005 x i8]* %11, i64 0, i64 0
%27 = call i32 @gets(i8* %26)
%28 = getelementptr inbounds [5005 x i8], [5005 x i8]* %11, i64 0, i64 0
%29 = call i64 @strcmp(i8* %28, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%30 = icmp ne i64 %29, 0
br i1 %30, label %31, label %52
31: ; preds = %25
%32 = getelementptr inbounds [5005 x i8], [5005 x i8]* %11, i64 0, i64 0
%33 = call i32 @strlen(i8* %32)
store i32 %33, i32* %8
store i32 0, i32* %2
br label %34
34: ; preds = %48, %31
%35 = load i32, i32* %2
%36 = load i32, i32* %8
%37 = icmp sle i32 %35, %36
br i1 %37, label %38, label %51
38: ; preds = %34
%39 = load i32, i32* %2
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [5005 x i8], [5005 x i8]* %11, i64 0, i64 %40
%42 = load i8, i8* %41
%43 = load i32, i32* %5
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [5005 x i8], [5005 x i8]* %9, i64 0, i64 %44
store i8 %42, i8* %45
%46 = load i32, i32* %5
%47 = add nsw i32 %46, 1
store i32 %47, i32* %5
br label %48
48: ; preds = %38
%49 = load i32, i32* %2
%50 = add nsw i32 %49, 1
store i32 %50, i32* %2
br label %34
51: ; preds = %34
br label %25
52: ; preds = %25
%53 = getelementptr inbounds [5005 x i8], [5005 x i8]* %11, i64 0, i64 0
%54 = call i32 @gets(i8* %53)
store i32 0, i32* %6
br label %55
55: ; preds = %81, %52
%56 = getelementptr inbounds [5005 x i8], [5005 x i8]* %11, i64 0, i64 0
%57 = call i32 @gets(i8* %56)
%58 = getelementptr inbounds [5005 x i8], [5005 x i8]* %11, i64 0, i64 0
%59 = call i64 @strcmp(i8* %58, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%60 = icmp ne i64 %59, 0
br i1 %60, label %61, label %82
61: ; preds = %55
%62 = getelementptr inbounds [5005 x i8], [5005 x i8]* %11, i64 0, i64 0
%63 = call i32 @strlen(i8* %62)
store i32 %63, i32* %8
store i32 0, i32* %2
br label %64
64: ; preds = %78, %61
%65 = load i32, i32* %2
%66 = load i32, i32* %8
%67 = icmp sle i32 %65, %66
br i1 %67, label %68, label %81
68: ; preds = %64
%69 = load i32, i32* %2
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [5005 x i8], [5005 x i8]* %11, i64 0, i64 %70
%72 = load i8, i8* %71
%73 = load i32, i32* %6
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [5005 x i8], [5005 x i8]* %10, i64 0, i64 %74
store i8 %72, i8* %75
%76 = load i32, i32* %6
%77 = add nsw i32 %76, 1
store i32 %77, i32* %6
br label %78
78: ; preds = %68
%79 = load i32, i32* %2
%80 = add nsw i32 %79, 1
store i32 %80, i32* %2
br label %64
81: ; preds = %64
br label %55
82: ; preds = %55
store i32 0, i32* %7
store i32 0, i32* %2
store i32 0, i32* %3
br label %83
83: ; preds = %161, %82
%84 = load i32, i32* %2
%85 = load i32, i32* %5
%86 = icmp sle i32 %84, %85
br i1 %86, label %87, label %91
87: ; preds = %83
%88 = load i32, i32* %3
%89 = load i32, i32* %6
%90 = icmp sle i32 %88, %89
br label %91
91: ; preds = %87, %83
%92 = phi i1 [ false, %83 ], [ %90, %87 ]
br i1 %92, label %93, label %162
93: ; preds = %91
%94 = load i32, i32* %2
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [5005 x i8], [5005 x i8]* %9, i64 0, i64 %95
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
%99 = load i32, i32* %3
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [5005 x i8], [5005 x i8]* %10, i64 0, i64 %100
%102 = load i8, i8* %101
%103 = sext i8 %102 to i32
%104 = icmp ne i32 %98, %103
br i1 %104, label %105, label %156
105: ; preds = %93
%106 = load i32, i32* %2
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [5005 x i8], [5005 x i8]* %9, i64 0, i64 %107
%109 = load i8, i8* %108
%110 = sext i8 %109 to i32
%111 = icmp eq i32 %110, 32
br i1 %111, label %126, label %112
112: ; preds = %105
%113 = load i32, i32* %2
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds [5005 x i8], [5005 x i8]* %9, i64 0, i64 %114
%116 = load i8, i8* %115
%117 = sext i8 %116 to i32
%118 = icmp eq i32 %117, 9
br i1 %118, label %126, label %119
119: ; preds = %112
%120 = load i32, i32* %2
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds [5005 x i8], [5005 x i8]* %9, i64 0, i64 %121
%123 = load i8, i8* %122
%124 = sext i8 %123 to i32
%125 = icmp eq i32 %124, 0
br i1 %125, label %126, label %129
126: ; preds = %119, %112, %105
%127 = load i32, i32* %2
%128 = add nsw i32 %127, 1
store i32 %128, i32* %2
store i32 1, i32* %7
br label %155
129: ; preds = %119
%130 = load i32, i32* %3
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds [5005 x i8], [5005 x i8]* %10, i64 0, i64 %131
%133 = load i8, i8* %132
%134 = sext i8 %133 to i32
%135 = icmp eq i32 %134, 32
br i1 %135, label %150, label %136
136: ; preds = %129
%137 = load i32, i32* %3
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds [5005 x i8], [5005 x i8]* %10, i64 0, i64 %138
%140 = load i8, i8* %139
%141 = sext i8 %140 to i32
%142 = icmp eq i32 %141, 9
br i1 %142, label %150, label %143
143: ; preds = %136
%144 = load i32, i32* %3
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds [5005 x i8], [5005 x i8]* %10, i64 0, i64 %145
%147 = load i8, i8* %146
%148 = sext i8 %147 to i32
%149 = icmp eq i32 %148, 0
br i1 %149, label %150, label %153
150: ; preds = %143, %136, %129
%151 = load i32, i32* %3
%152 = add nsw i32 %151, 1
store i32 %152, i32* %3
store i32 1, i32* %7
br label %154
153: ; preds = %143
store i32 2, i32* %7
br label %162
154: ; preds = %150
br label %155
155: ; preds = %154, %126
br label %161
156: ; preds = %93
%157 = load i32, i32* %2
%158 = add nsw i32 %157, 1
store i32 %158, i32* %2
%159 = load i32, i32* %3
%160 = add nsw i32 %159, 1
store i32 %160, i32* %3
br label %161
161: ; preds = %156, %155
br label %83
162: ; preds = %153, %91
%163 = load i32, i32* %7
%164 = icmp eq i32 %163, 0
br i1 %164, label %165, label %167
165: ; preds = %162
%166 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %167
167: ; preds = %165, %162
%168 = load i32, i32* %7
%169 = icmp eq i32 %168, 1
br i1 %169, label %170, label %172
170: ; preds = %167
%171 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
br label %172
172: ; preds = %170, %167
%173 = load i32, i32* %7
%174 = icmp eq i32 %173, 2
br i1 %174, label %175, label %177
175: ; preds = %172
%176 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
br label %177
177: ; preds = %175, %172
br label %14
178: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"END\00"
@str = [13 x i8] c"Wrong Answer\00"
@str.5 = [19 x i8] c"Presentation Error\00"
@str.6 = [9 x i8] c"Accepted\00"
@reltable.main = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @str.6 to i64), i64 ptrtoint ([3 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @str.5 to i64), i64 ptrtoint ([3 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @str to i64), i64 ptrtoint ([3 x i32]* @reltable.main to i64)) to i32)]
define i32 @main() {
%1 = alloca i32
%2 = alloca [5005 x i8]
%3 = alloca [5005 x i8]
%4 = alloca [5005 x i8]
%5 = getelementptr inbounds [5005 x i8], [5005 x i8]* %4, i64 0, i64 0
%6 = bitcast i32* %1 to i8*
%7 = getelementptr inbounds [5005 x i8], [5005 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [5005 x i8], [5005 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [5005 x i8], [5005 x i8]* %4, i64 0, i64 0
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%11 = call i32 (...) @getchar()
%12 = load i32, i32* %1
%13 = add nsw i32 %12, -1
store i32 %13, i32* %1
%14 = icmp eq i32 %12, 0
br i1 %14, label %105, label %15
15: ; preds = %0, %101
%16 = call i32 @gets(i8* %9)
%17 = call i32 @memset(i8* %7, i32 48, i32 5005)
%18 = call i32 @memset(i8* %8, i32 48, i32 5005)
%19 = call i32 @gets(i8* %9)
%20 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %38, label %27
22: ; preds = %31, %27
%23 = phi i32 [ %28, %27 ], [ %37, %31 ]
%24 = call i32 @gets(i8* %9)
%25 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %38, label %27
27: ; preds = %15, %22
%28 = phi i32 [ %23, %22 ], [ 0, %15 ]
%29 = call i32 @strlen(i8* %9)
%30 = icmp slt i32 %29, 0
br i1 %30, label %22, label %31
31: ; preds = %27
%32 = sext i32 %28 to i64
%33 = getelementptr [5005 x i8], [5005 x i8]* %2, i64 0, i64 %32
%34 = zext i32 %29 to i64
%35 = add nuw nsw i64 %34, 1
%36 = add i32 %28, 1
%37 = add i32 %36, %29
br label %22
38: ; preds = %22, %15
%39 = phi i32 [ 0, %15 ], [ %23, %22 ]
%40 = call i32 @gets(i8* %9)
%41 = call i32 @gets(i8* %9)
%42 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%43 = icmp eq i64 %42, 0
br i1 %43, label %49, label %54
44: ; preds = %58, %54
%45 = phi i32 [ %55, %54 ], [ %64, %58 ]
%46 = call i32 @gets(i8* %9)
%47 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %54
49: ; preds = %44, %38
%50 = phi i32 [ 0, %38 ], [ %45, %44 ]
%51 = icmp sgt i32 %39, -1
%52 = icmp sgt i32 %50, -1
%53 = select i1 %51, i1 %52, i1 false
br i1 %53, label %65, label %98
54: ; preds = %38, %44
%55 = phi i32 [ %45, %44 ], [ 0, %38 ]
%56 = call i32 @strlen(i8* %9)
%57 = icmp slt i32 %56, 0
br i1 %57, label %44, label %58
58: ; preds = %54
%59 = sext i32 %55 to i64
%60 = getelementptr [5005 x i8], [5005 x i8]* %3, i64 0, i64 %59
%61 = zext i32 %56 to i64
%62 = add nuw nsw i64 %61, 1
%63 = add i32 %55, 1
%64 = add i32 %63, %56
br label %44
65: ; preds = %49, %85
%66 = phi i32 [ %88, %85 ], [ 0, %49 ]
%67 = phi i32 [ %87, %85 ], [ 0, %49 ]
%68 = phi i32 [ %86, %85 ], [ 0, %49 ]
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [5005 x i8], [5005 x i8]* %2, i64 0, i64 %69
%71 = load i8, i8* %70
%72 = sext i32 %67 to i64
%73 = getelementptr inbounds [5005 x i8], [5005 x i8]* %3, i64 0, i64 %72
%74 = load i8, i8* %73
%75 = icmp eq i8 %71, %74
br i1 %75, label %82, label %76
76: ; preds = %65
switch i8 %71, label %79 [
i8 32, label %77
i8 9, label %77
i8 0, label %77
]
77: ; preds = %76, %76, %76
%78 = add nsw i32 %68, 1
br label %85
79: ; preds = %76
switch i8 %74, label %98 [
i8 32, label %80
i8 9, label %80
i8 0, label %80
]
80: ; preds = %79, %79, %79
%81 = add nsw i32 %67, 1
br label %85
82: ; preds = %65
%83 = add nsw i32 %68, 1
%84 = add nsw i32 %67, 1
br label %85
85: ; preds = %77, %80, %82
%86 = phi i32 [ %78, %77 ], [ %68, %80 ], [ %83, %82 ]
%87 = phi i32 [ %67, %77 ], [ %81, %80 ], [ %84, %82 ]
%88 = phi i32 [ 1, %77 ], [ 1, %80 ], [ %66, %82 ]
%89 = icmp sle i32 %86, %39
%90 = icmp sle i32 %87, %50
%91 = select i1 %89, i1 %90, i1 false
br i1 %91, label %65, label %92
92: ; preds = %85
%93 = icmp ult i32 %88, 3
br i1 %93, label %94, label %101
94: ; preds = %92
%95 = sext i32 %88 to i64
%96 = shl i64 %95, 2
%97 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.main to i8*), i64 %96)
br label %98
98: ; preds = %79, %94, %49
%99 = phi i8* [ getelementptr inbounds ([9 x i8], [9 x i8]* @str.6, i64 0, i64 0), %49 ], [ %97, %94 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0), %79 ]
%100 = call i32 @puts(i8* dereferenceable(1) %99)
br label %101
101: ; preds = %92, %98
%102 = load i32, i32* %1
%103 = add nsw i32 %102, -1
store i32 %103, i32* %1
%104 = icmp eq i32 %102, 0
br i1 %104, label %105, label %15
105: ; preds = %101, %0
ret i32 0
}