#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 scanf(char *, int *, int *, int *);
int main(void) {
  int a, b, c, kase = 0;
  while (scanf("%d %d %d", &a, &b, &c) == 3) {
    int i;
    for (i = 10; i <= 100; i++)
      if (i % 3 == a && i % 5 == b && i % 7 == c) {
        if (kase)
          printf("\n");
        printf("Case %d: %d\n", kase, i);
        kase++;
        break;
      } else if (i == 100) {
        printf("Case %d: No answer\n", kase);
        kase++;
      }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
cmp    $0x3,%eax
jne    121f <main+0xff>
movl   $0xa,-0x18(%rbp)
cmpl   $0x64,-0x18(%rbp)
jg     121a <main+0xfa>
mov    -0x18(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    -0x8(%rbp),%edx
jne    11de <main+0xbe>
mov    -0x18(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    -0xc(%rbp),%edx
jne    11de <main+0xbe>
mov    -0x18(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    -0x10(%rbp),%edx
jne    11de <main+0xbe>
cmpl   $0x0,-0x14(%rbp)
je     11bc <main+0x9c>
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe40(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    121a <main+0xfa>
cmpl   $0x64,-0x18(%rbp)
jne    1202 <main+0xe2>
mov    -0x14(%rbp),%esi
lea    0xe24(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1207 <main+0xe7>
jmp    120c <main+0xec>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    115e <main+0x3e>
jmp    1136 <main+0x16>
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    0xebb(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
cmp    $0x3,%eax
jne    1265 <main+0x135>
mov    $0xcccccccd,%r15d
mov    $0xaaaaaaab,%r12d
lea    0xc(%rsp),%r13
xor    %r14d,%r14d
jmp    11b7 <main+0x87>
nopl   0x0(%rax,%rax,1)
lea    0xe8f(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r14d
lea    0xe64(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    %r13,%rcx
call   1050 <scanf@plt>
cmp    $0x3,%eax
jne    1265 <main+0x135>
xor    %eax,%eax
sub    0xc(%rsp),%eax
xor    %ecx,%ecx
sub    0x10(%rsp),%ecx
xor    %ebx,%ebx
sub    0x14(%rsp),%ebx
mov    $0xa,%ebp
xchg   %ax,%ax
mov    %ebp,%esi
mov    %rsi,%rdi
imul   %r12,%rdi
shr    $0x21,%rdi
lea    (%rdi,%rdi,2),%edi
mov    %ebx,%edx
sub    %edi,%edx
add    %ebp,%edx
jne    1230 <main+0x100>
mov    %rsi,%rdx
imul   %r15,%rdx
shr    $0x22,%rdx
lea    (%rdx,%rdx,4),%edx
mov    %ecx,%edi
sub    %edx,%edi
add    %ebp,%edi
jne    1230 <main+0x100>
imul   $0x24924925,%rsi,%rdx
shr    $0x20,%rdx
mov    %ebp,%esi
sub    %edx,%esi
shr    %esi
add    %edx,%esi
shr    $0x2,%esi
lea    0x0(,%rsi,8),%edx
sub    %edx,%esi
add    %eax,%esi
add    %ebp,%esi
je     123e <main+0x10e>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    $0x64,%ebp
je     1180 <main+0x50>
add    $0x1,%ebp
jmp    11d0 <main+0xa0>
test   %r14d,%r14d
je     124d <main+0x11d>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xdb5(%rip),%rdi
mov    %r14d,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1191 <main+0x61>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [13 x i8] c"Case %d: %d\0A\00"
@.str.3 = [20 x i8] c"Case %d: No answer\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
store i32 0, i32* %5
br label %7
7: ; preds = %53, %0
%8 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%9 = icmp eq i32 %8, 3
br i1 %9, label %10, label %54
10: ; preds = %7
store i32 10, i32* %6
br label %11
11: ; preds = %50, %10
%12 = load i32, i32* %6
%13 = icmp sle i32 %12, 100
br i1 %13, label %14, label %53
14: ; preds = %11
%15 = load i32, i32* %6
%16 = srem i32 %15, 3
%17 = load i32, i32* %2
%18 = icmp eq i32 %16, %17
br i1 %18, label %19, label %40
19: ; preds = %14
%20 = load i32, i32* %6
%21 = srem i32 %20, 5
%22 = load i32, i32* %3
%23 = icmp eq i32 %21, %22
br i1 %23, label %24, label %40
24: ; preds = %19
%25 = load i32, i32* %6
%26 = srem i32 %25, 7
%27 = load i32, i32* %4
%28 = icmp eq i32 %26, %27
br i1 %28, label %29, label %40
29: ; preds = %24
%30 = load i32, i32* %5
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %29
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %34
34: ; preds = %32, %29
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %35, i32 %36)
%38 = load i32, i32* %5
%39 = add nsw i32 %38, 1
store i32 %39, i32* %5
br label %53
40: ; preds = %24, %19, %14
%41 = load i32, i32* %6
%42 = icmp eq i32 %41, 100
br i1 %42, label %43, label %48
43: ; preds = %40
%44 = load i32, i32* %5
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %44)
%46 = load i32, i32* %5
%47 = add nsw i32 %46, 1
store i32 %47, i32* %5
br label %48
48: ; preds = %43, %40
br label %49
49: ; preds = %48
br label %50
50: ; preds = %49
%51 = load i32, i32* %6
%52 = add nsw i32 %51, 1
store i32 %52, i32* %6
br label %11
53: ; preds = %34, %11
br label %7
54: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
@.str.2 = [13 x i8] c"Case %d: %d\0A\00"
@.str.3 = [20 x i8] c"Case %d: No answer\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 ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = icmp eq i32 %7, 3
br i1 %8, label %9, label %44
9: ; preds = %0, %40
%10 = phi i32 [ %41, %40 ], [ 0, %0 ]
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = load i32, i32* %3
br label %14
14: ; preds = %36, %9
%15 = phi i32 [ 10, %9 ], [ %37, %36 ]
%16 = trunc i32 %15 to i8
%17 = urem i8 %16, 3
%18 = zext i8 %17 to i32
%19 = icmp eq i32 %11, %18
br i1 %19, label %20, label %34
20: ; preds = %14
%21 = urem i8 %16, 5
%22 = zext i8 %21 to i32
%23 = icmp eq i32 %12, %22
br i1 %23, label %24, label %34
24: ; preds = %20
%25 = urem i8 %16, 7
%26 = zext i8 %25 to i32
%27 = icmp eq i32 %13, %26
br i1 %27, label %28, label %34
28: ; preds = %24
%29 = icmp eq i32 %10, 0
br i1 %29, label %32, label %30
30: ; preds = %28
%31 = call i32 @putchar(i32 10)
br label %32
32: ; preds = %30, %28
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %10, i32 %15)
br label %40
34: ; preds = %24, %20, %14
%35 = icmp eq i32 %15, 100
br i1 %35, label %38, label %36
36: ; preds = %34
%37 = add nuw nsw i32 %15, 1
br label %14
38: ; preds = %34
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %10)
br label %40
40: ; preds = %38, %32
%41 = add nuw nsw i32 %10, 1
%42 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%43 = icmp eq i32 %42, 3
br i1 %43, label %9, label %44
44: ; preds = %40, %0
ret i32 0
}