int main(int argc, char *argv[]) {
  char str[1001];
  while (~scanf("%s", str)) {
    if (check(str)) {
      puts("Accepted");
    } else {
      puts("Wrong Answer");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x400(%rbp),%rsi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
xor    $0xffffffff,%eax
cmp    $0x0,%eax
je     11a7 <main+0x77>
lea    -0x400(%rbp),%rdi
mov    $0x0,%al
call   1050 <check@plt>
cmp    $0x0,%eax
je     1194 <main+0x64>
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
jmp    11a2 <main+0x72>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
jmp    1149 <main+0x19>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x3f8,%rsp
lea    0xebb(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0xffffffff,%eax
je     119c <main+0x6c>
mov    %rsp,%rbx
lea    0xeae(%rip),%r15
lea    0xe9e(%rip),%r12
lea    0xe94(%rip),%r14
nopl   0x0(%rax)
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <check@plt>
test   %eax,%eax
mov    %r12,%rdi
cmove  %r15,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0xffffffff,%eax
jne    1170 <main+0x40>
xor    %eax,%eax
add    $0x3f8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [9 x i8] c"Accepted\00"
@.str.2 = [13 x i8] c"Wrong Answer\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [1001 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %20, %2
%8 = getelementptr inbounds [1001 x i8], [1001 x i8]* %6, i64 0, i64 0
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = xor i32 %9, -1
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %21
12: ; preds = %7
%13 = getelementptr inbounds [1001 x i8], [1001 x i8]* %6, i64 0, i64 0
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @check to i32 (i8*, ...)*)(i8* %13)
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %20
18: ; preds = %12
%19 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
br label %20
20: ; preds = %18, %16
br label %7
21: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [9 x i8] c"Accepted\00"
@.str.2 = [13 x i8] c"Wrong Answer\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1001 x i8]
%4 = getelementptr inbounds [1001 x i8], [1001 x i8]* %3, i64 0, i64 0
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = icmp eq i32 %5, -1
br i1 %6, label %14, label %7
7: ; preds = %2, %7
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @check to i32 (i8*, ...)*)(i8* %4)
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0)
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %10)
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %7
14: ; preds = %7, %2
ret i32 0
}