#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*/ F_OK;
scalar_t__ access(char *, int /*<<< orphan*/);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/);
int /*<<< orphan*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ stdin;
int main(int argc, char **argv) {
  int i, case_num;
  int n;
  int speed[100];
  int max_speed;
  int k;
  if (argc != 2) {
    printf("Usage: %s INPUT_FILE\n\n", argv[0]);
    exit(-1);
  }
  if (access(argv[1], F_OK)) {
    printf("Error: INPUT_FILE %s does not exist\n\n", argv[1]);
    exit(-1);
  }
  freopen(argv[1], "r", stdin);
  scanf("%d", &case_num);
  for (i = 0; i < case_num; ++i) {
    scanf("%d", &n);
    max_speed = 0;
    for (k = 0; k < n; ++k) {
      scanf("%d", &speed[k]);
      if (speed[k] > max_speed)
        max_speed = speed[k];
    }
    printf("Case %d: %d\n", i + 1, max_speed);
  }
  fclose(stdin);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11a2 <main+0x42>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0x2e1f(%rip),%rax
mov    (%rax),%esi
call   1070 <access@plt>
cmp    $0x0,%rax
je     11e2 <main+0x82>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0x2df7(%rip),%rax
mov    (%rax),%edx
lea    0xe43(%rip),%rsi
call   1050 <freopen@plt>
lea    0xe39(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <scanf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    12e5 <main+0x185>
lea    0xe16(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1060 <scanf@plt>
movl   $0x0,-0x1b4(%rbp)
movl   $0x0,-0x1b8(%rbp)
mov    -0x1b8(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12bd <main+0x15d>
movslq -0x1b8(%rbp),%rax
lea    -0x1b0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xdce(%rip),%rdi
call   1060 <scanf@plt>
movslq -0x1b8(%rbp),%rax
mov    -0x1b0(%rbp,%rax,4),%eax
cmp    -0x1b4(%rbp),%eax
jle    12a4 <main+0x144>
movslq -0x1b8(%rbp),%rax
mov    -0x1b0(%rbp,%rax,4),%eax
mov    %eax,-0x1b4(%rbp)
jmp    12a9 <main+0x149>
mov    -0x1b8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1b8(%rbp)
jmp    1246 <main+0xe6>
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x1b4(%rbp),%edx
lea    0xd72(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1216 <main+0xb6>
mov    0x2cfc(%rip),%rax
mov    (%rax),%edi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1a8,%rsp
mov    %rsi,%rbx
cmp    $0x2,%edi
jne    1278 <main+0x118>
mov    0x8(%rbx),%rdi
mov    0x2e48(%rip),%rax
mov    (%rax),%esi
call   1070 <access@plt>
mov    0x8(%rbx),%rcx
test   %rax,%rax
jne    1284 <main+0x124>
mov    0x2e45(%rip),%rax
mov    (%rax),%edx
lea    0xe91(%rip),%rsi
mov    %rcx,%rdi
call   1050 <freopen@plt>
lea    0xe84(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1256 <main+0xf6>
lea    0xe68(%rip),%r13
lea    0xe64(%rip),%r15
xor    %r12d,%r12d
jmp    120a <main+0xaa>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r12d
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    0xc(%rsp),%r12d
jge    1256 <main+0xf6>
mov    %r13,%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
mov    $0x0,%ebp
jle    11f0 <main+0x90>
xor    %r14d,%r14d
lea    0x10(%rsp),%rbx
xor    %ebp,%ebp
nopl   (%rax)
mov    %r13,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    (%rbx),%eax
cmp    %ebp,%eax
cmovg  %eax,%ebp
add    $0x1,%r14
movslq 0x8(%rsp),%rax
add    $0x4,%rbx
cmp    %rax,%r14
jl     1230 <main+0xd0>
jmp    11f0 <main+0x90>
mov    0x2d8b(%rip),%rax
mov    (%rax),%edi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x1a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%rbx),%rsi
lea    0xd7e(%rip),%rdi
jmp    128e <main+0x12e>
lea    0xd8c(%rip),%rdi
mov    %rcx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Usage: %s INPUT_FILE\0A\0A\00"
@F_OK = global i32 0
@.str.1 = [38 x i8] c"Error: INPUT_FILE %s does not exist\0A\0A\00"
@.str.2 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [13 x i8] c"Case %d: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [100 x i32]
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 2
br i1 %13, label %14, label %20
14: ; preds = %2
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 0
%17 = load i8*, i8** %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %17)
%19 = call i32 @exit(i32 -1)
unreachable
20: ; preds = %2
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = load i32, i32* @F_OK
%25 = call i64 @access(i8* %23, i32 %24)
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %33
27: ; preds = %20
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 1
%30 = load i8*, i8** %29
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %30)
%32 = call i32 @exit(i32 -1)
unreachable
33: ; preds = %20
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 1
%36 = load i8*, i8** %35
%37 = load i32, i32* @stdin
%38 = call i32 @freopen(i8* %36, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 %37)
%39 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %7)
store i32 0, i32* %6
br label %40
40: ; preds = %75, %33
%41 = load i32, i32* %6
%42 = load i32, i32* %7
%43 = icmp slt i32 %41, %42
br i1 %43, label %44, label %78
44: ; preds = %40
%45 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %8)
store i32 0, i32* %10
store i32 0, i32* %11
br label %46
46: ; preds = %67, %44
%47 = load i32, i32* %11
%48 = load i32, i32* %8
%49 = icmp slt i32 %47, %48
br i1 %49, label %50, label %70
50: ; preds = %46
%51 = load i32, i32* %11
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [100 x i32], [100 x i32]* %9, i64 0, i64 %52
%54 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %53)
%55 = load i32, i32* %11
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [100 x i32], [100 x i32]* %9, i64 0, i64 %56
%58 = load i32, i32* %57
%59 = load i32, i32* %10
%60 = icmp sgt i32 %58, %59
br i1 %60, label %61, label %66
61: ; preds = %50
%62 = load i32, i32* %11
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [100 x i32], [100 x i32]* %9, i64 0, i64 %63
%65 = load i32, i32* %64
store i32 %65, i32* %10
br label %66
66: ; preds = %61, %50
br label %67
67: ; preds = %66
%68 = load i32, i32* %11
%69 = add nsw i32 %68, 1
store i32 %69, i32* %11
br label %46
70: ; preds = %46
%71 = load i32, i32* %6
%72 = add nsw i32 %71, 1
%73 = load i32, i32* %10
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %72, i32 %73)
br label %75
75: ; preds = %70
%76 = load i32, i32* %6
%77 = add nsw i32 %76, 1
store i32 %77, i32* %6
br label %40
78: ; preds = %40
%79 = load i32, i32* @stdin
%80 = call i32 @fclose(i32 %79)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"Usage: %s INPUT_FILE\0A\0A\00"
@F_OK = global i32 0
@.str.1 = [38 x i8] c"Error: INPUT_FILE %s does not exist\0A\0A\00"
@.str.2 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [13 x i8] c"Case %d: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [100 x i32]
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast [100 x i32]* %5 to i8*
%9 = icmp eq i32 %0, 2
br i1 %9, label %14, label %10
10: ; preds = %2
%11 = load i8*, i8** %1
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = tail call i32 @exit(i32 -1)
unreachable
14: ; preds = %2
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = load i32, i32* @F_OK
%18 = tail call i64 @access(i8* %16, i32 %17)
%19 = icmp eq i64 %18, 0
%20 = load i8*, i8** %15
br i1 %19, label %24, label %21
21: ; preds = %14
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %20)
%23 = tail call i32 @exit(i32 -1)
unreachable
24: ; preds = %14
%25 = load i32, i32* @stdin
%26 = tail call i32 @freopen(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 %25)
%27 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%28 = load i32, i32* %3
%29 = icmp sgt i32 %28, 0
br i1 %29, label %30, label %53
30: ; preds = %24, %47
%31 = phi i32 [ %49, %47 ], [ 0, %24 ]
%32 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
%33 = load i32, i32* %4
%34 = icmp sgt i32 %33, 0
br i1 %34, label %35, label %47
35: ; preds = %30, %35
%36 = phi i64 [ %43, %35 ], [ 0, %30 ]
%37 = phi i32 [ %42, %35 ], [ 0, %30 ]
%38 = getelementptr inbounds [100 x i32], [100 x i32]* %5, i64 0, i64 %36
%39 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %38)
%40 = load i32, i32* %38
%41 = icmp sgt i32 %40, %37
%42 = select i1 %41, i32 %40, i32 %37
%43 = add nuw nsw i64 %36, 1
%44 = load i32, i32* %4
%45 = sext i32 %44 to i64
%46 = icmp slt i64 %43, %45
br i1 %46, label %35, label %47
47: ; preds = %35, %30
%48 = phi i32 [ 0, %30 ], [ %42, %35 ]
%49 = add nuw nsw i32 %31, 1
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %49, i32 %48)
%51 = load i32, i32* %3
%52 = icmp slt i32 %49, %51
br i1 %52, label %30, label %53
53: ; preds = %47, %24
%54 = load i32, i32* @stdin
%55 = call i32 @fclose(i32 %54)
ret i32 0
}