#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);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, t, i, j, a, b = 0;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &t);
    for (j = 1; j <= t; j++) {
      scanf("%d", &a);
      if (a > b) {
        b = a;
      }
    }
    printf("Case %d: %d\n", i, b);
    b = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11d8 <main+0xb8>
lea    0xea0(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11b1 <main+0x91>
lea    0xe7d(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jle    119e <main+0x7e>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    11a3 <main+0x83>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1170 <main+0x50>
mov    -0x10(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xe45(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    114d <main+0x2d>
xor    %eax,%eax
add    $0x20,%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    0xecb(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x10(%rsp)
jle    11d1 <main+0xb1>
mov    $0x1,%r14d
lea    0xea9(%rip),%rbx
lea    0xea5(%rip),%r12
lea    0x14(%rsp),%r13
jmp    118d <main+0x6d>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %ebp,%ebp
mov    %r12,%rdi
mov    %r14d,%esi
mov    %ebp,%edx
call   1030 <printf@plt>
lea    0x1(%r14),%eax
cmp    0x10(%rsp),%r14d
mov    %eax,%r14d
jge    11d1 <main+0xb1>
mov    %rbx,%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1170 <main+0x50>
xor    %r15d,%r15d
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r13,%rsi
call   1040 <scanf@plt>
mov    0x14(%rsp),%eax
cmp    %ebp,%eax
cmovg  %eax,%ebp
add    $0x1,%r15d
cmp    0xc(%rsp),%r15d
jl     11b0 <main+0x90>
jmp    1172 <main+0x52>
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 = [13 x i8] c"Case %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
store i32 0, i32* %1
store i32 0, i32* %7
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 1, i32* %4
br label %9
9: ; preds = %34, %0
%10 = load i32, i32* %4
%11 = load i32, i32* %2
%12 = icmp sle i32 %10, %11
br i1 %12, label %13, label %37
13: ; preds = %9
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
store i32 1, i32* %5
br label %15
15: ; preds = %27, %13
%16 = load i32, i32* %5
%17 = load i32, i32* %3
%18 = icmp sle i32 %16, %17
br i1 %18, label %19, label %30
19: ; preds = %15
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%21 = load i32, i32* %6
%22 = load i32, i32* %7
%23 = icmp sgt i32 %21, %22
br i1 %23, label %24, label %26
24: ; preds = %19
%25 = load i32, i32* %6
store i32 %25, i32* %7
br label %26
26: ; preds = %24, %19
br label %27
27: ; preds = %26
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
store i32 %29, i32* %5
br label %15
30: ; preds = %15
%31 = load i32, i32* %4
%32 = load i32, i32* %7
%33 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %31, i32 %32)
store i32 0, i32* %7
br label %34
34: ; preds = %30
%35 = load i32, i32* %4
%36 = add nsw i32 %35, 1
store i32 %36, i32* %4
br label %9
37: ; preds = %9
ret i32 0
}

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