#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 l, w, h, n, i;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d %d %d", &l, &w, &h);
    if (l > 20 || w > 20 || h > 20) {
      printf("Case %d: bad\n", i);
    } else {
      printf("Case %d: good\n", i);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed0(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     11c2 <main+0xa2>
lea    0xea5(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x14,-0x8(%rbp)
jg     118c <main+0x6c>
cmpl   $0x14,-0xc(%rbp)
jg     118c <main+0x6c>
cmpl   $0x14,-0x10(%rbp)
jle    11a0 <main+0x80>
mov    -0x18(%rbp),%esi
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
jmp    11af <main+0x8f>
mov    -0x18(%rbp),%esi
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
jmp    11b4 <main+0x94>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1148 <main+0x28>
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    0xed1(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
jle    11ba <main+0x9a>
mov    $0x1,%ebx
lea    0xeac(%rip),%r14
lea    0x14(%rsp),%r15
lea    0x10(%rsp),%r12
lea    0xc(%rsp),%r13
lea    0xe9f(%rip),%rbp
jmp    1194 <main+0x74>
nopl   0x0(%rax)
cmpl   $0x15,0x10(%rsp)
cmovge %rbp,%rdi
cmpl   $0x15,0x14(%rsp)
cmovge %rbp,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0x1(%rbx),%eax
cmp    0x8(%rsp),%ebx
mov    %eax,%ebx
jge    11ba <main+0x9a>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x15,0xc(%rsp)
mov    %rbp,%rdi
jge    1170 <main+0x50>
lea    0xe5f(%rip),%rdi
jmp    1170 <main+0x50>
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 = [9 x i8] c"%d %d %d\00"
@.str.2 = [14 x i8] c"Case %d: bad\0A\00"
@.str.3 = [15 x i8] c"Case %d: good\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
store i32 1, i32* %6
br label %8
8: ; preds = %29, %0
%9 = load i32, i32* %6
%10 = load i32, i32* %5
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %32
12: ; preds = %8
%13 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%14 = load i32, i32* %2
%15 = icmp sgt i32 %14, 20
br i1 %15, label %22, label %16
16: ; preds = %12
%17 = load i32, i32* %3
%18 = icmp sgt i32 %17, 20
br i1 %18, label %22, label %19
19: ; preds = %16
%20 = load i32, i32* %4
%21 = icmp sgt i32 %20, 20
br i1 %21, label %22, label %25
22: ; preds = %19, %16, %12
%23 = load i32, i32* %6
%24 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %23)
br label %28
25: ; preds = %19
%26 = load i32, i32* %6
%27 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %26)
br label %28
28: ; preds = %25, %22
br label %29
29: ; preds = %28
%30 = load i32, i32* %6
%31 = add nsw i32 %30, 1
store i32 %31, i32* %6
br label %8
32: ; preds = %8
ret i32 0
}

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