#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 */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int a = 0, b = 0, n = 0, i = 0, teste = 0;
  char na[11], nb[11];
  while (1) {
    teste++;
    a = 0;
    b = 0;
    n = 0;
    i = 0;
    for (i; i < 11; i++)
      na[i] = '\0';
    i = 0;
    for (i; i < 11; i++)
      nb[i] = '\0';
    i = 0;
    scanf("%d", &n);
    if (n == 0)
      break;
    printf("Teste %d\n", teste);
    scanf("%s", na);
    scanf("%s", nb);
    for (i; i < n; i++) {
      a = 0;
      b = 0;
      scanf("%d %d", &a, &b);
      if ((a + b) % 2 == 0)
        printf("%s\n", na);
      else
        printf("%s\n", nb);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xb,-0x14(%rbp)
jge    1198 <main+0x78>
movslq -0x14(%rbp),%rax
movb   $0x0,-0x23(%rbp,%rax,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1177 <main+0x57>
movl   $0x0,-0x14(%rbp)
cmpl   $0xb,-0x14(%rbp)
jge    11c0 <main+0xa0>
movslq -0x14(%rbp),%rax
movb   $0x0,-0x2e(%rbp,%rax,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    119f <main+0x7f>
movl   $0x0,-0x14(%rbp)
lea    0xe42(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x0,-0x10(%rbp)
jne    11e8 <main+0xc8>
jmp    12a5 <main+0x185>
mov    -0x18(%rbp),%esi
lea    0xe0e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x23(%rbp),%rsi
lea    0xe06(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    -0x2e(%rbp),%rsi
lea    0xdf4(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    12a0 <main+0x180>
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xdcf(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    127b <main+0x15b>
lea    -0x23(%rbp),%rsi
lea    0xda4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    128d <main+0x16d>
lea    -0x2e(%rbp),%rsi
lea    0xd8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1292 <main+0x172>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    121d <main+0xfd>
jmp    1152 <main+0x32>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
movq   $0x0,0x28(%rsp)
movl   $0x0,0x2f(%rsp)
movq   $0x0,0x18(%rsp)
movl   $0x0,0x1f(%rsp)
lea    0xe91(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
je     12aa <main+0x17a>
mov    $0x1,%r13d
lea    0x28(%rsp),%rbx
lea    0xe65(%rip),%rbp
lea    0x14(%rsp),%r14
lea    0x10(%rsp),%r15
jmp    121c <main+0xec>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
movq   $0x0,0x28(%rsp)
movl   $0x0,0x2f(%rsp)
movq   $0x0,0x18(%rsp)
movl   $0x0,0x1f(%rsp)
add    $0x1,%r13d
lea    0xe0b(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
je     12aa <main+0x17a>
lea    0xddd(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdd6(%rip),%r12
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r12,%rdi
lea    0x18(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11c0 <main+0x90>
xor    %r12d,%r12d
jmp    1274 <main+0x144>
call   1030 <puts@plt>
add    $0x1,%r12d
cmp    0xc(%rsp),%r12d
jge    11c0 <main+0x90>
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x10(%rsp),%eax
add    0x14(%rsp),%eax
mov    %rbx,%rdi
test   $0x1,%al
je     1260 <main+0x130>
lea    0x18(%rsp),%rdi
jmp    1260 <main+0x130>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [10 x i8] c"Teste %d\0A\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [6 x i8] c"%d %d\00"
@.str.4 = [4 x i8] c"%s\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 [11 x i8]
%8 = alloca [11 x i8]
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
br label %9
9: ; preds = %0, %69
%10 = load i32, i32* %6
%11 = add nsw i32 %10, 1
store i32 %11, i32* %6
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
%12 = load i32, i32* %5
br label %13
13: ; preds = %20, %9
%14 = load i32, i32* %5
%15 = icmp slt i32 %14, 11
br i1 %15, label %16, label %23
16: ; preds = %13
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [11 x i8], [11 x i8]* %7, i64 0, i64 %18
store i8 0, i8* %19
br label %20
20: ; preds = %16
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %13
23: ; preds = %13
store i32 0, i32* %5
%24 = load i32, i32* %5
br label %25
25: ; preds = %32, %23
%26 = load i32, i32* %5
%27 = icmp slt i32 %26, 11
br i1 %27, label %28, label %35
28: ; preds = %25
%29 = load i32, i32* %5
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [11 x i8], [11 x i8]* %8, i64 0, i64 %30
store i8 0, i8* %31
br label %32
32: ; preds = %28
%33 = load i32, i32* %5
%34 = add nsw i32 %33, 1
store i32 %34, i32* %5
br label %25
35: ; preds = %25
store i32 0, i32* %5
%36 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%37 = load i32, i32* %4
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %40
39: ; preds = %35
br label %70
40: ; preds = %35
%41 = load i32, i32* %6
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %41)
%43 = getelementptr inbounds [11 x i8], [11 x i8]* %7, i64 0, i64 0
%44 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %43)
%45 = getelementptr inbounds [11 x i8], [11 x i8]* %8, i64 0, i64 0
%46 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %45)
%47 = load i32, i32* %5
br label %48
48: ; preds = %66, %40
%49 = load i32, i32* %5
%50 = load i32, i32* %4
%51 = icmp slt i32 %49, %50
br i1 %51, label %52, label %69
52: ; preds = %48
store i32 0, i32* %2
store i32 0, i32* %3
%53 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32* %2, i32* %3)
%54 = load i32, i32* %2
%55 = load i32, i32* %3
%56 = add nsw i32 %54, %55
%57 = srem i32 %56, 2
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %62
59: ; preds = %52
%60 = getelementptr inbounds [11 x i8], [11 x i8]* %7, i64 0, i64 0
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %60)
br label %65
62: ; preds = %52
%63 = getelementptr inbounds [11 x i8], [11 x i8]* %8, i64 0, i64 0
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %63)
br label %65
65: ; preds = %62, %59
br label %66
66: ; preds = %65
%67 = load i32, i32* %5
%68 = add nsw i32 %67, 1
store i32 %68, i32* %5
br label %48
69: ; preds = %48
br label %9
70: ; preds = %39
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [10 x i8] c"Teste %d\0A\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [11 x i8]
%5 = getelementptr inbounds [11 x i8], [11 x i8]* %4, i64 0, i64 0
%6 = alloca [11 x i8]
%7 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 0
%8 = bitcast i32* %1 to i8*
%9 = bitcast i32* %2 to i8*
%10 = bitcast i32* %3 to i8*
%11 = getelementptr inbounds [11 x i8], [11 x i8]* %4, i64 0, i64 0
%12 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 0
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%14 = load i32, i32* %3
%15 = icmp eq i32 %14, 0
br i1 %15, label %41, label %21
16: ; preds = %28, %21
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%17 = add nuw nsw i32 %22, 1
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%19 = load i32, i32* %3
%20 = icmp eq i32 %19, 0
br i1 %20, label %41, label %21
21: ; preds = %0, %16
%22 = phi i32 [ %17, %16 ], [ 1, %0 ]
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %22)
%24 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %11)
%25 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %12)
%26 = load i32, i32* %3
%27 = icmp sgt i32 %26, 0
br i1 %27, label %28, label %16
28: ; preds = %21, %28
%29 = phi i32 [ %38, %28 ], [ 0, %21 ]
store i32 0, i32* %1
store i32 0, i32* %2
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32* %1, i32* %2)
%31 = load i32, i32* %1
%32 = load i32, i32* %2
%33 = add nsw i32 %32, %31
%34 = and i32 %33, 1
%35 = icmp eq i32 %34, 0
%36 = select i1 %35, i8* %11, i8* %12
%37 = call i32 @puts(i8* %36)
%38 = add nuw nsw i32 %29, 1
%39 = load i32, i32* %3
%40 = icmp slt i32 %38, %39
br i1 %40, label %28, label %16
41: ; preds = %16, %0
ret i32 0
}