#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 findMax(int *, int);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int numTest, curCase, numStudent, speedArr[100], index;
  scanf("%d", &numTest);
  curCase = 1;
  while (curCase <= numTest) {
    scanf("%d", &numStudent);
    for (index = 0; index < numStudent; index++)
      scanf("%d", &speedArr[index]);
    printf("Case %d: %d\n", curCase, findMax(speedArr, numStudent));
    curCase++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11fd <main+0xcd>
lea    0xe94(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11c3 <main+0x93>
movslq -0x1a4(%rbp),%rax
lea    -0x1a0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe56(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    117f <main+0x4f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x1a8(%rbp)
lea    -0x1a0(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1050 <findMax@plt>
mov    -0x1a8(%rbp),%esi
mov    %eax,%edx
lea    0xe19(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1159 <main+0x29>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1a8,%rsp
lea    0xeb8(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11df <main+0xaf>
mov    $0x1,%r14d
lea    0xe96(%rip),%rbx
lea    0x10(%rsp),%r12
lea    0xe8d(%rip),%r13
jmp    11a3 <main+0x73>
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
call   1050 <findMax@plt>
mov    %r13,%rdi
mov    %r14d,%esi
mov    %eax,%edx
call   1030 <printf@plt>
lea    0x1(%r14),%eax
cmp    0xc(%rsp),%r14d
mov    %eax,%r14d
jge    11df <main+0xaf>
mov    %rbx,%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%esi
test   %esi,%esi
jle    1180 <main+0x50>
mov    %r12,%rbp
xor    %r15d,%r15d
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1040 <scanf@plt>
add    $0x1,%r15
movslq 0x8(%rsp),%rsi
add    $0x4,%rbp
cmp    %rsi,%r15
jl     11c0 <main+0x90>
jmp    1180 <main+0x50>
xor    %eax,%eax
add    $0x1a8,%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 [100 x i32]
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 1, i32* %3
br label %8
8: ; preds = %26, %0
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %34
12: ; preds = %8
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
store i32 0, i32* %6
br label %14
14: ; preds = %23, %12
%15 = load i32, i32* %6
%16 = load i32, i32* %4
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %26
18: ; preds = %14
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [100 x i32], [100 x i32]* %5, i64 0, i64 %20
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %21)
br label %23
23: ; preds = %18
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
store i32 %25, i32* %6
br label %14
26: ; preds = %14
%27 = load i32, i32* %3
%28 = getelementptr inbounds [100 x i32], [100 x i32]* %5, i64 0, i64 0
%29 = load i32, i32* %4
%30 = call i32 @findMax(i32* %28, i32 %29)
%31 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %27, i32 %30)
%32 = load i32, i32* %3
%33 = add nsw i32 %32, 1
store i32 %33, i32* %3
br label %8
34: ; preds = %8
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 [100 x i32]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast [100 x 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 %32, label %10
10: ; preds = %0
%11 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 0
br label %12
12: ; preds = %10, %25
%13 = phi i32 [ 1, %10 ], [ %29, %25 ]
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%15 = load i32, i32* %2
%16 = icmp sgt i32 %15, 0
br i1 %16, label %17, label %25
17: ; preds = %12, %17
%18 = phi i64 [ %21, %17 ], [ 0, %12 ]
%19 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %18
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %19)
%21 = add nuw nsw i64 %18, 1
%22 = load i32, i32* %2
%23 = sext i32 %22 to i64
%24 = icmp slt i64 %21, %23
br i1 %24, label %17, label %25
25: ; preds = %17, %12
%26 = phi i32 [ %15, %12 ], [ %22, %17 ]
%27 = call i32 @findMax(i32* %11, i32 %26)
%28 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %13, i32 %27)
%29 = add nuw nsw i32 %13, 1
%30 = load i32, i32* %1
%31 = icmp slt i32 %13, %30
br i1 %31, label %12, label %32
32: ; preds = %25, %0
ret i32 0
}