#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 acos(double);
int /*<<< orphan*/ printf(char *, int, double);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int case_num, i;
  double pi = 2 * acos(0.0);
  scanf("%d", &case_num);
  for (i = 1; i <= case_num; i++) {
    double r;
    scanf("%lf", &r);
    double a, b;
    a = pi * r * r;
    b = 4 * r * r;
    printf("Case %d: %.2f\n", i, b - a);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
call   1040 <acos@plt>
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    0xeae(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11dc <main+0xac>
lea    0xe8c(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe5a(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0xc(%rbp),%esi
movsd  -0x30(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
lea    0xe46(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116c <main+0x3c>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x28,%rsp
xorpd  %xmm0,%xmm0
call   1040 <acos@plt>
mov    %eax,%ebx
lea    0xec4(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    11d4 <main+0xa4>
add    %ebx,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movapd 0xe90(%rip),%xmm1
unpcklpd %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
lea    0xe92(%rip),%r14
lea    0x8(%rsp),%r15
lea    0xe8a(%rip),%rbx
xor    %ebp,%ebp
nop
add    $0x1,%ebp
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x8(%rsp),%xmm1
unpcklpd %xmm1,%xmm1
movapd %xmm1,%xmm0
mulpd  0x10(%rsp),%xmm0
mulpd  %xmm1,%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
subsd  %xmm1,%xmm0
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
cmp    0x4(%rsp),%ebp
jl     1190 <main+0x60>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [15 x i8] c"Case %d: %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = bitcast i32* %1 to i8*
%4 = tail call i32 @acos(double 0.000000e+00)
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 1
br i1 %7, label %28, label %8
8: ; preds = %0
%9 = shl nsw i32 %4, 1
%10 = sitofp i32 %9 to double
%11 = bitcast double* %2 to i8*
%12 = insertelement <2 x double> <double 4.000000e+00, double poison>, double %10, i64 1
br label %13
13: ; preds = %8, %13
%14 = phi i32 [ 1, %8 ], [ %25, %13 ]
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%16 = load double, double* %2
%17 = insertelement <2 x double> poison, double %16, i64 0
%18 = shufflevector <2 x double> %17, <2 x double> poison, <2 x i32> zeroinitializer
%19 = fmul <2 x double> %18, %12
%20 = fmul <2 x double> %18, %19
%21 = shufflevector <2 x double> %20, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%22 = fsub <2 x double> %20, %21
%23 = extractelement <2 x double> %22, i64 0
%24 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %14, double %23)
%25 = add nuw nsw i32 %14, 1
%26 = load i32, i32* %1
%27 = icmp slt i32 %14, %26
br i1 %27, label %13, label %28
28: ; preds = %13, %0
ret i32 0
}