#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, long long);
scalar_t__ scanf(char *, long long *, long long *);
void main() {
  long long a, b;
  int i = 0;
  while (scanf("%lld %lld", &a, &b)) {
    i++;
    if (!a && !b)
      break;
    printf("Case %d: %lld\n", i, a * b * (a - 1) * (b - 1) / 4);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x14(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <scanf@plt>
cmp    $0x0,%rax
je     11b3 <main+0x93>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1171 <main+0x51>
cmpq   $0x0,-0x10(%rbp)
jne    1171 <main+0x51>
jmp    11b3 <main+0x93>
mov    -0x14(%rbp),%esi
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    $0x1,%rcx
imul   %rcx,%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
imul   %rcx,%rax
mov    $0x4,%ecx
cqto
idiv   %rcx
mov    %rax,%rdx
lea    0xe61(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xecc(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
test   %rax,%rax
je     11c7 <main+0xa7>
mov    $0x1,%ebx
lea    0xeb4(%rip),%r14
lea    0xea3(%rip),%r15
lea    0x8(%rsp),%r12
mov    %rsp,%r13
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x8(%rsp),%rcx
mov    (%rsp),%rax
mov    %rcx,%rdx
or     %rax,%rdx
je     11c7 <main+0xa7>
mov    %rax,%rdx
imul   %rcx,%rdx
add    $0xffffffffffffffff,%rcx
add    $0xffffffffffffffff,%rax
imul   %rcx,%rax
imul   %rdx,%rax
lea    0x3(%rax),%rdx
test   %rax,%rax
cmovns %rax,%rdx
sar    $0x2,%rdx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
call   1040 <scanf@plt>
add    $0x1,%ebx
test   %rax,%rax
jne    1170 <main+0x50>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

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