#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);
int /*<<< orphan*/ scanf(char *, int *, ...);
int main() {
  int t;
  int a, b, i, j;
  int sum;
  scanf("%d", &t);
  for (j = 1; j <= t; j++) {
    sum = 0;
    scanf("%d%d", &a, &b);
    if (!(a & 1))
      a++;
    for (i = a; i <= b; i += 2)
      sum += i;
    printf("Case %d: %d\n", j, sum);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecc(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11d2 <main+0xb2>
movl   $0x0,-0x1c(%rbp)
lea    0xe9e(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1189 <main+0x69>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     11b2 <main+0x92>
mov    -0x14(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x14(%rbp)
jmp    118f <main+0x6f>
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xe46(%rip),%rdi
call   1030 <printf@plt>
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   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xecf(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
jle    11d1 <main+0xb1>
lea    0xeaf(%rip),%r14
lea    0x4(%rsp),%r15
lea    0xc(%rsp),%r12
lea    0xea3(%rip),%rbx
xor    %ebp,%ebp
jmp    1180 <main+0x60>
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
cmp    0x8(%rsp),%ebp
jge    11d1 <main+0xb1>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
test   $0x1,%al
jne    119f <main+0x7f>
add    $0x1,%eax
mov    %eax,0x4(%rsp)
add    $0x1,%ebp
mov    0xc(%rsp),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
jg     1170 <main+0x50>
lea    0x2(%rax),%edx
add    $0x1,%ecx
cmp    %ecx,%edx
cmovg  %edx,%ecx
mov    %eax,%esi
not    %esi
add    %ecx,%esi
shr    %esi
imul   %esi,%edx
lea    -0x1(%rsi),%ecx
imul   %esi,%ecx
and    $0xfffffffe,%ecx
add    %eax,%edx
add    %ecx,%edx
jmp    1170 <main+0x50>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

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