#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 atan(double);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int L;
  float pi = atan(1.0) * 4.0;
  scanf("%d", &L);
  while (L != 0) {
    printf("%.2lf\n", (L * L) / (2.0f * pi));
    scanf("%d", &L);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec1(%rip),%xmm0
call   1040 <atan@plt>
movsd  0xeac(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
lea    0xeac(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
je     11bc <main+0x8c>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  0xe82(%rip),%xmm1
mulss  -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
lea    0xe75(%rip),%rdi
call   1030 <printf@plt>
lea    0xe66(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
jmp    1171 <main+0x41>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movsd  0xebf(%rip),%xmm0
call   1040 <atan@plt>
lea    0xebf(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
je     11b1 <main+0x81>
lea    0xea9(%rip),%r14
lea    0xe9f(%rip),%r15
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
imul   %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
divss  0xe76(%rip),%xmm0
cvttss2si %xmm0,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jne    1180 <main+0x50>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call double @atan(double 1.000000e+00)
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 0
br i1 %6, label %17, label %7
7: ; preds = %0, %7
%8 = phi i32 [ %15, %7 ], [ %5, %0 ]
%9 = mul nsw i32 %8, %8
%10 = sitofp i32 %9 to float
%11 = fdiv float %10, 0x401921FB60000000
%12 = fptosi float %11 to i32
%13 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%15 = load i32, i32* %1
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %7
17: ; preds = %7, %0
ret i32 0
}