#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 /*<<< orphan*/ scanf(char *, int *, int *);
int main(void) {
  int S, B, caseId;
  caseId = 1;
  while (1) {
    scanf("%d %d", &B, &S);
    if (S == 0 && B == 0)
      break;
    printf("Case %d: ", caseId);
    if (B == 1)
      printf(":-\\\n");
    else {
      if (S < B)
        printf(":-(\n");
      else
        printf(":-|\n");
    }
    caseId++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    1163 <main+0x43>
cmpl   $0x0,-0xc(%rbp)
jne    1163 <main+0x43>
jmp    11d1 <main+0xb1>
mov    -0x10(%rbp),%esi
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x1,-0xc(%rbp)
jne    1191 <main+0x71>
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c3 <main+0xa3>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11b0 <main+0x90>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11be <main+0x9e>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c3 <main+0xa3>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xebe(%rip),%rdi
mov    %rsp,%rsi
lea    0x4(%rsp),%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
or     (%rsp),%eax
je     11cb <main+0x9b>
mov    $0x1,%ebx
lea    0xeac(%rip),%r14
lea    0xead(%rip),%rbp
lea    0xe8e(%rip),%r15
mov    %rsp,%r12
lea    0x4(%rsp),%r13
nopw   0x0(%rax,%rax,1)
lea    0xe7f(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rsp),%eax
cmp    %eax,0x4(%rsp)
mov    %r14,%rdi
lea    0xe73(%rip),%rcx
cmovl  %rcx,%rdi
cmp    $0x1,%eax
cmove  %rbp,%rdi
call   1030 <puts@plt>
add    $0x1,%ebx
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
or     (%rsp),%eax
jne    1180 <main+0x50>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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