#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, double);
scalar_t__ scanf(char *, double *, double *);
double sin(double);
int main() {
  double r, n, A;
  while (scanf("%lf %lf\n", &r, &n) != EOF) {
    A = sin(2.0 * 3.14159265358979 / n) / 2.0 * r * r * n;
    printf("%.3lf\n", A);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1050 <scanf@plt>
mov    0x2e8e(%rip),%rcx
cmp    (%rcx),%rax
je     11ab <main+0x7b>
movsd  0xe9d(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
call   1040 <sin@plt>
movsd  0xe83(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xecc(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x2e90(%rip),%r13
cmp    0x0(%r13),%rax
je     11c9 <main+0x99>
lea    0xeb4(%rip),%r14
lea    0xea4(%rip),%r15
lea    0x8(%rsp),%r12
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0xe78(%rip),%xmm0
divsd  (%rsp),%xmm0
call   1040 <sin@plt>
mulsd  0xe6e(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  (%rsp),%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1050 <scanf@plt>
cmp    0x0(%r13),%rax
jne    1180 <main+0x50>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%lf %lf\0A\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%.3lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
br label %5
5: ; preds = %9, %0
%6 = call i64 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double* %2, double* %3)
%7 = load i64, i64* @EOF
%8 = icmp ne i64 %6, %7
br i1 %8, label %9, label %22
9: ; preds = %5
%10 = load double, double* %3
%11 = fdiv double 0x401921FB54442D11, %10
%12 = call double @sin(double %11)
%13 = fdiv double %12, 2.000000e+00
%14 = load double, double* %2
%15 = fmul double %13, %14
%16 = load double, double* %2
%17 = fmul double %15, %16
%18 = load double, double* %3
%19 = fmul double %17, %18
store double %19, double* %4
%20 = load double, double* %4
%21 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %20)
br label %5
22: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%lf %lf\0A\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%.3lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i64 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %22, label %8
8: ; preds = %0, %8
%9 = load double, double* %2
%10 = fdiv double 0x401921FB54442D11, %9
%11 = call double @sin(double %10)
%12 = fmul double %11, 5.000000e-01
%13 = load double, double* %1
%14 = fmul double %12, %13
%15 = fmul double %13, %14
%16 = load double, double* %2
%17 = fmul double %16, %15
%18 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %17)
%19 = call i64 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%20 = load i64, i64* @EOF
%21 = icmp eq i64 %19, %20
br i1 %21, label %22, label %8
22: ; preds = %8, %0
ret i32 0
}