#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, ...);
int /*<<< orphan*/ scanf(char *, int *, ...);
int main() {
  int t, T = 0;
  scanf("%d", &t);
  while (t--) {
    int a, b;
    scanf("%d %d", &a, &b);
    int I, J, K;
    int arrr[100000];
    arrr[0] = 1;
    printf("%d\n", arrr[0]);
    for (I = 0; I < 1000; I++) {
      for (J = 0; J < 1000; J++) {
        for (K = 0; K < 1000; K++) {
          printf("%d", I);
        }
      }
    }
    printf("Casae %d: %d\n", ++T, a + b);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x61aa0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     1236 <main+0x116>
lea    0xe9a(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x1,-0x61aa0(%rbp)
mov    -0x61aa0(%rbp),%esi
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x3e8,-0x18(%rbp)
jge    1214 <main+0xf4>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3e8,-0x1c(%rbp)
jge    1201 <main+0xe1>
movl   $0x0,-0x20(%rbp)
cmpl   $0x3e8,-0x20(%rbp)
jge    11ee <main+0xce>
mov    -0x18(%rbp),%esi
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11c2 <main+0xa2>
jmp    11f3 <main+0xd3>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11ae <main+0x8e>
jmp    1206 <main+0xe6>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    119a <main+0x7a>
mov    -0xc(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0xc(%rbp)
mov    -0x10(%rbp),%edx
add    -0x14(%rbp),%edx
lea    0xddc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    114b <main+0x2b>
xor    %eax,%eax
add    $0x61aa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xece(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
subl   $0x1,0xc(%rsp)
jb     1201 <main+0xe1>
lea    0xeb0(%rip),%rbx
lea    0xeac(%rip),%rbp
xor    %r14d,%r14d
nopl   (%rax)
xor    %r15d,%r15d
lea    0xe96(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xe8e(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xchg   %ax,%ax
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x3e8,%r13d
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0xffffffff,%r13d
jne    11b0 <main+0x90>
add    $0x1,%r12d
cmp    $0x3e8,%r12d
jne    11a0 <main+0x80>
add    $0x1,%r15d
cmp    $0x3e8,%r15d
jne    1190 <main+0x70>
add    $0x1,%r14d
mov    0x10(%rsp),%edx
add    0x14(%rsp),%edx
mov    %rbp,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1030 <printf@plt>
subl   $0x1,0xc(%rsp)
jae    1160 <main+0x40>
xor    %eax,%eax
add    $0x18,%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 = [6 x i8] c"%d %d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@.str.3 = [14 x i8] c"Casae %d: %d\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 [100000 x i32]
store i32 0, i32* %1
store i32 0, i32* %3
%10 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %11
11: ; preds = %46, %0
%12 = load i32, i32* %2
%13 = add nsw i32 %12, -1
store i32 %13, i32* %2
%14 = icmp ne i32 %12, 0
br i1 %14, label %15, label %53
15: ; preds = %11
%16 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %4, i32* %5)
%17 = getelementptr inbounds [100000 x i32], [100000 x i32]* %9, i64 0, i64 0
store i32 1, i32* %17
%18 = getelementptr inbounds [100000 x i32], [100000 x i32]* %9, i64 0, i64 0
%19 = load i32, i32* %18
%20 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %19)
store i32 0, i32* %6
br label %21
21: ; preds = %43, %15
%22 = load i32, i32* %6
%23 = icmp slt i32 %22, 1000
br i1 %23, label %24, label %46
24: ; preds = %21
store i32 0, i32* %7
br label %25
25: ; preds = %39, %24
%26 = load i32, i32* %7
%27 = icmp slt i32 %26, 1000
br i1 %27, label %28, label %42
28: ; preds = %25
store i32 0, i32* %8
br label %29
29: ; preds = %35, %28
%30 = load i32, i32* %8
%31 = icmp slt i32 %30, 1000
br i1 %31, label %32, label %38
32: ; preds = %29
%33 = load i32, i32* %6
%34 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %33)
br label %35
35: ; preds = %32
%36 = load i32, i32* %8
%37 = add nsw i32 %36, 1
store i32 %37, i32* %8
br label %29
38: ; preds = %29
br label %39
39: ; preds = %38
%40 = load i32, i32* %7
%41 = add nsw i32 %40, 1
store i32 %41, i32* %7
br label %25
42: ; preds = %25
br label %43
43: ; preds = %42
%44 = load i32, i32* %6
%45 = add nsw i32 %44, 1
store i32 %45, i32* %6
br label %21
46: ; preds = %21
%47 = load i32, i32* %3
%48 = add nsw i32 %47, 1
store i32 %48, i32* %3
%49 = load i32, i32* %4
%50 = load i32, i32* %5
%51 = add nsw i32 %49, %50
%52 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %48, i32 %51)
br label %11
53: ; preds = %11
ret i32 0
}

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