#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, double);
int /*<<< orphan*/ scanf(char *, int *, ...);
int main() {
  int n, c, d, i;
  double ans, F;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d %d", &c, &d);
    F = (c / (double)5) * 9 + 32;
    ans = ((((F + d) - 32) / 9) * 5);
    printf("Case %d: %.2lf\n", i, ans);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee5(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11f1 <main+0xd1>
lea    0xebd(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xe89(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe85(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe81(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe62(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe4e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe3a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x14(%rbp),%esi
movsd  -0x20(%rbp),%xmm0
lea    0xe40(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1148 <main+0x28>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xef0(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    11d9 <main+0xb9>
lea    0xecf(%rip),%r14
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%r12
lea    0xec4(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%ebp
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
xorps  %xmm1,%xmm1
cvtsi2sdl 0xc(%rsp),%xmm1
movsd  0xe6c(%rip),%xmm2
divsd  %xmm2,%xmm1
movsd  0xe68(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  0xe64(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdl 0x8(%rsp),%xmm0
addsd  %xmm1,%xmm0
addsd  0xe57(%rip),%xmm0
divsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm0
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
cmp    0x4(%rsp),%ebp
jl     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 = [16 x i8] c"Case %d: %.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
%7 = alloca double
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* %5
br label %9
9: ; preds = %29, %0
%10 = load i32, i32* %5
%11 = load i32, i32* %2
%12 = icmp sle i32 %10, %11
br i1 %12, label %13, label %32
13: ; preds = %9
%14 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %3, i32* %4)
%15 = load i32, i32* %3
%16 = sitofp i32 %15 to double
%17 = fdiv double %16, 5.000000e+00
%18 = call double @llvm.fmuladd.f64(double %17, double 9.000000e+00, double 3.200000e+01)
store double %18, double* %7
%19 = load double, double* %7
%20 = load i32, i32* %4
%21 = sitofp i32 %20 to double
%22 = fadd double %19, %21
%23 = fsub double %22, 3.200000e+01
%24 = fdiv double %23, 9.000000e+00
%25 = fmul double %24, 5.000000e+00
store double %25, double* %6
%26 = load i32, i32* %5
%27 = load double, double* %6
%28 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %26, double %27)
br label %29
29: ; preds = %13
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 1
store i32 %31, i32* %5
br label %9
32: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [16 x i8] c"Case %d: %.2lf\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 %27, label %10
10: ; preds = %0, %10
%11 = phi i32 [ %24, %10 ], [ 1, %0 ]
%12 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%13 = load i32, i32* %2
%14 = sitofp i32 %13 to double
%15 = fdiv double %14, 5.000000e+00
%16 = call double @llvm.fmuladd.f64(double %15, double 9.000000e+00, double 3.200000e+01)
%17 = load i32, i32* %3
%18 = sitofp i32 %17 to double
%19 = fadd double %16, %18
%20 = fadd double %19, -3.200000e+01
%21 = fdiv double %20, 9.000000e+00
%22 = fmul double %21, 5.000000e+00
%23 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %11, double %22)
%24 = add nuw nsw i32 %11, 1
%25 = load i32, i32* %1
%26 = icmp slt i32 %11, %25
br i1 %26, label %10, label %27
27: ; preds = %10, %0
ret i32 0
}