#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 a, b, c;
  int svr;
  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 %d %d", &a, &b, &c);
    if (a > b) {
      if (a > c)
        svr = (b > c) ? b : c;
      else
        svr = a;
    } else {
      if (b > c)
        svr = (a > c) ? a : c;
      else
        svr = b;
    }
    printf("Case %d: %d\n", i + 1, svr);
  }
  fclose(stdin);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     119f <main+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe72(%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    0x2e22(%rip),%rax
mov    (%rax),%esi
call   1070 <access@plt>
cmp    $0x0,%rax
je     11df <main+0x7f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe49(%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    0x2dfa(%rip),%rax
mov    (%rax),%edx
lea    0xe46(%rip),%rsi
call   1050 <freopen@plt>
lea    0xe42(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    12ea <main+0x18a>
lea    0xe17(%rip),%rdi
lea    -0x1c(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x24(%rbp),%rcx
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    1286 <main+0x126>
mov    -0x1c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jle    127b <main+0x11b>
mov    -0x20(%rbp),%eax
cmp    -0x24(%rbp),%eax
jle    126a <main+0x10a>
mov    -0x20(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    1270 <main+0x110>
mov    -0x24(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    1281 <main+0x121>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    12c5 <main+0x165>
mov    -0x20(%rbp),%eax
cmp    -0x24(%rbp),%eax
jle    12ba <main+0x15a>
mov    -0x1c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jle    12a9 <main+0x149>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x30(%rbp)
jmp    12af <main+0x14f>
mov    -0x24(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    12c0 <main+0x160>
mov    -0x20(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    12c5 <main+0x165>
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x28(%rbp),%edx
lea    0xd73(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1215 <main+0xb5>
mov    0x2cf7(%rip),%rax
mov    (%rax),%edi
call   1030 <fclose@plt>
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    $0x18,%rsp
mov    %rsi,%rbx
cmp    $0x2,%edi
jne    126c <main+0x10c>
mov    0x8(%rbx),%rdi
mov    0x2e4b(%rip),%rax
mov    (%rax),%esi
call   1070 <access@plt>
mov    0x8(%rbx),%rcx
test   %rax,%rax
jne    1278 <main+0x118>
mov    0x2e48(%rip),%rax
mov    (%rax),%edx
lea    0xe94(%rip),%rsi
mov    %rcx,%rdi
call   1050 <freopen@plt>
lea    0xe8d(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
jle    124d <main+0xed>
lea    0xe69(%rip),%r14
lea    0x14(%rsp),%r15
lea    0x10(%rsp),%r12
lea    0xc(%rsp),%r13
lea    0xe5c(%rip),%rbx
xor    %ebp,%ebp
jmp    1207 <main+0xa7>
mov    %eax,%edx
add    $0x1,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    0x8(%rsp),%ebp
jge    124d <main+0xed>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x14(%rsp),%ecx
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%eax
cmp    %esi,%ecx
jle    1240 <main+0xe0>
mov    %ecx,%edx
cmp    %eax,%ecx
jle    11f2 <main+0x92>
cmp    %eax,%esi
cmovg  %esi,%eax
jmp    11f0 <main+0x90>
nopw   0x0(%rax,%rax,1)
mov    %esi,%edx
cmp    %eax,%esi
jle    11f2 <main+0x92>
cmp    %eax,%ecx
cmovg  %ecx,%eax
jmp    11f0 <main+0x90>
mov    0x2d94(%rip),%rax
mov    (%rax),%edi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%rbx),%rsi
lea    0xd8a(%rip),%rdi
jmp    1282 <main+0x122>
lea    0xd98(%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 = [9 x i8] c"%d %d %d\00"
@.str.5 = [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 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 (i8*, 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 = %88, %33
%41 = load i32, i32* %6
%42 = load i32, i32* %7
%43 = icmp slt i32 %41, %42
br i1 %43, label %44, label %91
44: ; preds = %40
%45 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32* %8, i32* %9, i32* %10)
%46 = load i32, i32* %8
%47 = load i32, i32* %9
%48 = icmp sgt i32 %46, %47
br i1 %48, label %49, label %66
49: ; preds = %44
%50 = load i32, i32* %8
%51 = load i32, i32* %10
%52 = icmp sgt i32 %50, %51
br i1 %52, label %53, label %63
53: ; preds = %49
%54 = load i32, i32* %9
%55 = load i32, i32* %10
%56 = icmp sgt i32 %54, %55
br i1 %56, label %57, label %59
57: ; preds = %53
%58 = load i32, i32* %9
br label %61
59: ; preds = %53
%60 = load i32, i32* %10
br label %61
61: ; preds = %59, %57
%62 = phi i32 [ %58, %57 ], [ %60, %59 ]
store i32 %62, i32* %11
br label %65
63: ; preds = %49
%64 = load i32, i32* %8
store i32 %64, i32* %11
br label %65
65: ; preds = %63, %61
br label %83
66: ; preds = %44
%67 = load i32, i32* %9
%68 = load i32, i32* %10
%69 = icmp sgt i32 %67, %68
br i1 %69, label %70, label %80
70: ; preds = %66
%71 = load i32, i32* %8
%72 = load i32, i32* %10
%73 = icmp sgt i32 %71, %72
br i1 %73, label %74, label %76
74: ; preds = %70
%75 = load i32, i32* %8
br label %78
76: ; preds = %70
%77 = load i32, i32* %10
br label %78
78: ; preds = %76, %74
%79 = phi i32 [ %75, %74 ], [ %77, %76 ]
store i32 %79, i32* %11
br label %82
80: ; preds = %66
%81 = load i32, i32* %9
store i32 %81, i32* %11
br label %82
82: ; preds = %80, %78
br label %83
83: ; preds = %82, %65
%84 = load i32, i32* %6
%85 = add nsw i32 %84, 1
%86 = load i32, i32* %11
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %85, i32 %86)
br label %88
88: ; preds = %83
%89 = load i32, i32* %6
%90 = add nsw i32 %89, 1
store i32 %90, i32* %6
br label %40
91: ; preds = %40
%92 = load i32, i32* @stdin
%93 = call i32 @fclose(i32 %92)
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 = [9 x i8] c"%d %d %d\00"
@.str.5 = [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 i32
%6 = alloca i32
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = bitcast i32* %5 to i8*
%10 = bitcast i32* %6 to i8*
%11 = icmp eq i32 %0, 2
br i1 %11, label %16, label %12
12: ; preds = %2
%13 = load i8*, i8** %1
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = tail call i32 @exit(i32 -1)
unreachable
16: ; preds = %2
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = load i8*, i8** %17
%19 = load i32, i32* @F_OK
%20 = tail call i64 @access(i8* %18, i32 %19)
%21 = icmp eq i64 %20, 0
%22 = load i8*, i8** %17
br i1 %21, label %26, label %23
23: ; preds = %16
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %22)
%25 = tail call i32 @exit(i32 -1)
unreachable
26: ; preds = %16
%27 = load i32, i32* @stdin
%28 = tail call i32 @freopen(i8* %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 %27)
%29 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%30 = load i32, i32* %3
%31 = icmp sgt i32 %30, 0
br i1 %31, label %32, label %55
32: ; preds = %26, %49
%33 = phi i32 [ %51, %49 ], [ 0, %26 ]
%34 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32* %4, i32* %5, i32* %6)
%35 = load i32, i32* %4
%36 = load i32, i32* %5
%37 = icmp sgt i32 %35, %36
%38 = load i32, i32* %6
br i1 %37, label %39, label %44
39: ; preds = %32
%40 = icmp sgt i32 %35, %38
br i1 %40, label %41, label %49
41: ; preds = %39
%42 = icmp sgt i32 %36, %38
%43 = select i1 %42, i32 %36, i32 %38
br label %49
44: ; preds = %32
%45 = icmp sgt i32 %36, %38
br i1 %45, label %46, label %49
46: ; preds = %44
%47 = icmp sgt i32 %35, %38
%48 = select i1 %47, i32 %35, i32 %38
br label %49
49: ; preds = %44, %39, %46, %41
%50 = phi i32 [ %43, %41 ], [ %48, %46 ], [ %35, %39 ], [ %36, %44 ]
%51 = add nuw nsw i32 %33, 1
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %51, i32 %50)
%53 = load i32, i32* %3
%54 = icmp slt i32 %51, %53
br i1 %54, label %32, label %55
55: ; preds = %49, %26
%56 = load i32, i32* @stdin
%57 = call i32 @fclose(i32 %56)
ret i32 0
}