#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 */
double getInnerCircleArea(int, double);
double getOuterCircleArea(int, double);
int /*<<< orphan*/ printf(char *, int, double, double);
int /*<<< orphan*/ scanf(char *, int *, double *);
int main(void) {
  int numSide, caseId;
  double polygonArea;
  caseId = 1;
  while (1) {
    scanf("%d %lf", &numSide, &polygonArea);
    if (numSide < 3) {
      break;
    }
    double outerArea = getOuterCircleArea(numSide, polygonArea);
    double innerArea = getInnerCircleArea(numSide, polygonArea);
    double spectatorArea = outerArea - polygonArea;
    double officialArea = polygonArea - innerArea;
    printf("Case %d: %.5lf %.5lf\n", caseId, spectatorArea, officialArea);
    caseId++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
lea    0xea3(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1050 <scanf@plt>
cmpl   $0x3,-0x8(%rbp)
jge    1179 <main+0x39>
jmp    11e2 <main+0xa2>
mov    -0x8(%rbp),%edi
movsd  -0x18(%rbp),%xmm0
call   1060 <getOuterCircleArea@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%edi
movsd  -0x18(%rbp),%xmm0
call   1040 <getInnerCircleArea@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0xc(%rbp),%esi
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
lea    0xe38(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1156 <main+0x16>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20,%rsp
lea    0xeac(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rdx
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
cmp    $0x3,%edi
jl     11ec <main+0xac>
mov    $0x1,%ebx
lea    0xe8b(%rip),%r14
lea    0xe7d(%rip),%r15
lea    0xc(%rsp),%r12
lea    0x10(%rsp),%r13
nopl   (%rax)
movsd  0x10(%rsp),%xmm0
call   1060 <getOuterCircleArea@plt>
movsd  %xmm0,0x18(%rsp)
mov    0xc(%rsp),%edi
movsd  0x10(%rsp),%xmm0
call   1040 <getInnerCircleArea@plt>
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
subsd  %xmm1,%xmm2
subsd  %xmm0,%xmm1
mov    %r14,%rdi
mov    %ebx,%esi
movapd %xmm2,%xmm0
call   1030 <printf@plt>
add    $0x1,%ebx
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
cmp    $0x2,%edi
jg     1190 <main+0x50>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d %lf\00"
@.str.1 = [22 x i8] c"Case %d: %.5lf %.5lf\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
%8 = alloca double
store i32 0, i32* %1
store i32 1, i32* %3
br label %9
9: ; preds = %0, %14
%10 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %2, double* %4)
%11 = load i32, i32* %2
%12 = icmp slt i32 %11, 3
br i1 %12, label %13, label %14
13: ; preds = %9
br label %33
14: ; preds = %9
%15 = load i32, i32* %2
%16 = load double, double* %4
%17 = call double @getOuterCircleArea(i32 %15, double %16)
store double %17, double* %5
%18 = load i32, i32* %2
%19 = load double, double* %4
%20 = call double @getInnerCircleArea(i32 %18, double %19)
store double %20, double* %6
%21 = load double, double* %5
%22 = load double, double* %4
%23 = fsub double %21, %22
store double %23, double* %7
%24 = load double, double* %4
%25 = load double, double* %6
%26 = fsub double %24, %25
store double %26, double* %8
%27 = load i32, i32* %3
%28 = load double, double* %7
%29 = load double, double* %8
%30 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %27, double %28, double %29)
%31 = load i32, i32* %3
%32 = add nsw i32 %31, 1
store i32 %32, i32* %3
br label %9
33: ; preds = %13
ret i32 0
}

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