#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 acos(int);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *, double *, double *);
main() {
  double a, b, c, pi;
  pi = acos(-1);
  scanf("%lf %lf %lf", &a, &b, &c);
  double x = 0, y = 0;
  if (c > b)
    x = c - b;
  if (c > a)
    y = c - a;
  printf("%e\n", pi * c * c * 3.0 / 4.0 + pi * x * x / 4 + pi * y * y / 4);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xffffffff,%edi
call   1040 <acos@plt>
movsd  %xmm0,-0x28(%rbp)
lea    0xebb(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1050 <scanf@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1195 <main+0x65>
movsd  -0x20(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11b4 <main+0x84>
movsd  -0x20(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  0xe3d(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe29(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
movsd  0xe0e(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
movsd  0xdef(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
lea    0xdfc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
mov    $0xffffffff,%edi
call   1040 <acos@plt>
movaps %xmm0,0x20(%rsp)
lea    0xee6(%rip),%rdi
lea    0x18(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1050 <scanf@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movapd %xmm0,%xmm2
subsd  %xmm1,%xmm2
cmpltsd %xmm0,%xmm1
andpd  %xmm2,%xmm1
movsd  0x18(%rsp),%xmm2
movapd %xmm0,%xmm3
subsd  %xmm2,%xmm3
cmpltsd %xmm0,%xmm2
movapd 0x20(%rsp),%xmm5
movapd %xmm5,%xmm4
mulsd  %xmm0,%xmm4
unpcklpd %xmm5,%xmm0
mulsd  %xmm1,%xmm5
mulsd  %xmm1,%xmm5
mulsd  0xe50(%rip),%xmm5
andpd  %xmm3,%xmm2
unpcklpd %xmm2,%xmm4
mulpd  %xmm0,%xmm4
movapd 0xe4c(%rip),%xmm0
unpcklpd %xmm2,%xmm0
mulpd  %xmm4,%xmm0
mulpd  0xe4c(%rip),%xmm0
addsd  %xmm0,%xmm5
unpckhpd %xmm0,%xmm0
addsd  %xmm5,%xmm0
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [4 x i8] c"%e\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store i32 0, i32* %1
%8 = call double @acos(i32 -1)
store double %8, double* %5
%9 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4)
store double 0.000000e+00, double* %6
store double 0.000000e+00, double* %7
%10 = load double, double* %4
%11 = load double, double* %3
%12 = fcmp ogt double %10, %11
br i1 %12, label %13, label %17
13: ; preds = %0
%14 = load double, double* %4
%15 = load double, double* %3
%16 = fsub double %14, %15
store double %16, double* %6
br label %17
17: ; preds = %13, %0
%18 = load double, double* %4
%19 = load double, double* %2
%20 = fcmp ogt double %18, %19
br i1 %20, label %21, label %25
21: ; preds = %17
%22 = load double, double* %4
%23 = load double, double* %2
%24 = fsub double %22, %23
store double %24, double* %7
br label %25
25: ; preds = %21, %17
%26 = load double, double* %5
%27 = load double, double* %4
%28 = fmul double %26, %27
%29 = load double, double* %4
%30 = fmul double %28, %29
%31 = fmul double %30, 3.000000e+00
%32 = fdiv double %31, 4.000000e+00
%33 = load double, double* %5
%34 = load double, double* %6
%35 = fmul double %33, %34
%36 = load double, double* %6
%37 = fmul double %35, %36
%38 = fdiv double %37, 4.000000e+00
%39 = fadd double %32, %38
%40 = load double, double* %5
%41 = load double, double* %7
%42 = fmul double %40, %41
%43 = load double, double* %7
%44 = fmul double %42, %43
%45 = fdiv double %44, 4.000000e+00
%46 = fadd double %39, %45
%47 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %46)
%48 = load i32, i32* %1
ret i32 %48
}

LLVM IR (-O2):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [4 x i8] c"%e\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = tail call double @acos(i32 -1)
%8 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%9 = load double, double* %3
%10 = load double, double* %2
%11 = fcmp ogt double %9, %10
%12 = fsub double %9, %10
%13 = select i1 %11, double %12, double 0.000000e+00
%14 = load double, double* %1
%15 = fcmp ogt double %9, %14
%16 = fsub double %9, %14
%17 = select i1 %15, double %16, double 0.000000e+00
%18 = fmul double %7, %9
%19 = fmul double %7, %13
%20 = fmul double %13, %19
%21 = fmul double %20, 2.500000e-01
%22 = insertelement <2 x double> poison, double %9, i64 0
%23 = insertelement <2 x double> %22, double %7, i64 1
%24 = insertelement <2 x double> poison, double %18, i64 0
%25 = insertelement <2 x double> %24, double %17, i64 1
%26 = fmul <2 x double> %23, %25
%27 = insertelement <2 x double> <double 3.000000e+00, double poison>, double %17, i64 1
%28 = fmul <2 x double> %27, %26
%29 = fmul <2 x double> %28, <double 2.500000e-01, double 2.500000e-01>
%30 = extractelement <2 x double> %29, i64 0
%31 = fadd double %30, %21
%32 = extractelement <2 x double> %29, i64 1
%33 = fadd double %31, %32
%34 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %33)
ret i32 0
}