#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 a, b, t, sum, i = 0;
  scanf("%d", &t);
  while (i < t) {
    i++;
    sum = 0;
    scanf("%d %d", &a, &b);
    if (a % 2 == 0)
      a++;
    for (; a <= b; a += 2)
      sum += a;
    printf("Case %d: %d\n", i, sum);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x18(%rbp)
lea    0xec6(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11d6 <main+0xb6>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xe95(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1197 <main+0x77>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    119c <main+0x7c>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11bf <main+0x9f>
mov    -0x8(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    119c <main+0x7c>
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe3a(%rip),%rdi
call   1030 <printf@plt>
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    0xed0(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
jle    11df <main+0xbf>
lea    0xeaf(%rip),%r14
lea    0x4(%rsp),%r15
lea    0xc(%rsp),%r12
lea    0xea4(%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    11df <main+0xbf>
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),%esi
add    $0x1,%ecx
cmp    %ecx,%esi
cmovg  %esi,%ecx
mov    %eax,%edi
not    %edi
add    %ecx,%edi
mov    %edi,%ecx
shr    %ecx
imul   %ecx,%esi
add    %eax,%esi
lea    -0x1(%rcx),%edx
imul   %ecx,%edx
and    $0xfffffffe,%edx
add    %esi,%edx
and    $0xfffffffe,%edi
add    %edi,%eax
add    $0x2,%eax
mov    %eax,0x4(%rsp)
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 = [6 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
store i32 0, i32* %1
store i32 0, i32* %6
%7 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
br label %8
8: ; preds = %34, %0
%9 = load i32, i32* %6
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %38
12: ; preds = %8
%13 = load i32, i32* %6
%14 = add nsw i32 %13, 1
store i32 %14, i32* %6
store i32 0, i32* %5
%15 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%16 = load i32, i32* %2
%17 = srem i32 %16, 2
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %12
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
store i32 %21, i32* %2
br label %22
22: ; preds = %19, %12
br label %23
23: ; preds = %31, %22
%24 = load i32, i32* %2
%25 = load i32, i32* %3
%26 = icmp sle i32 %24, %25
br i1 %26, label %27, label %34
27: ; preds = %23
%28 = load i32, i32* %2
%29 = load i32, i32* %5
%30 = add nsw i32 %29, %28
store i32 %30, i32* %5
br label %31
31: ; preds = %27
%32 = load i32, i32* %2
%33 = add nsw i32 %32, 2
store i32 %33, i32* %2
br label %23
34: ; preds = %23
%35 = load i32, i32* %6
%36 = load i32, i32* %5
%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 %8
38: ; preds = %8
ret i32 0
}

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