#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 /*<<< orphan*/ printf(char *, ...);
int scanf(char *, double *, double *, double *);
int sqrt(double);
int main() {
  double m1, m2, m3, a, t = 0;
  while (t < 1000 && scanf("%lf %lf %lf", &m1, &m2, &m3) == 3) {
    t++;
    a = sqrt(((m1 + m2 + m3) / 2) * (((m1 + m2 + m3) / 2) - m1) *
             (((m1 + m2 + m3) / 2) - m2) * (((m1 + m2 + m3) / 2) - m3)) *
        4 / 3;
    if (a > 0)
      printf("%.3lf\n", a);
    else
      printf("-1.000\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xor    %eax,%eax
movsd  0xeaf(%rip),%xmm0
ucomisd -0x30(%rbp),%xmm0
mov    %al,-0x31(%rbp)
jbe    1180 <main+0x50>
lea    0xeb2(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <scanf@plt>
cmp    $0x3,%eax
sete   %al
mov    %al,-0x31(%rbp)
mov    -0x31(%rbp),%al
test   $0x1,%al
jne    1190 <main+0x60>
jmp    127f <main+0x14f>
movsd  0xe78(%rip),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  0xe4f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
addsd  -0x18(%rbp),%xmm1
addsd  -0x20(%rbp),%xmm1
movsd  0xe34(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
addsd  -0x18(%rbp),%xmm1
addsd  -0x20(%rbp),%xmm1
movsd  0xe10(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
addsd  -0x18(%rbp),%xmm1
addsd  -0x20(%rbp),%xmm1
movsd  0xdec(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
shl    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    126c <main+0x13c>
movsd  -0x28(%rbp),%xmm0
lea    0xdc4(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    127a <main+0x14a>
lea    0xdb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1147 <main+0x17>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    $0x3e8,%ebp
lea    0xeae(%rip),%r14
lea    0x10(%rsp),%r15
lea    0x8(%rsp),%r12
mov    %rsp,%rbx
lea    0xea6(%rip),%r13
jmp    1185 <main+0x45>
lea    0xea4(%rip),%rdi
call   1030 <puts@plt>
add    $0xffffffff,%ebp
je     1220 <main+0xe0>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %rbx,%rcx
call   1050 <scanf@plt>
cmp    $0x3,%eax
jne    1220 <main+0xe0>
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
movapd %xmm1,%xmm0
addsd  %xmm2,%xmm0
movsd  (%rsp),%xmm3
addsd  %xmm3,%xmm0
mulsd  0xe3c(%rip),%xmm0
movapd %xmm0,%xmm4
subsd  %xmm1,%xmm4
mulsd  %xmm0,%xmm4
movapd %xmm0,%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm4,%xmm1
subsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm0
call   1060 <sqrt@plt>
test   %eax,%eax
jle    1170 <main+0x30>
shl    $0x2,%eax
cltq
imul   $0x55555556,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    1185 <main+0x45>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [7 x i8] c"%.3lf\0A\00"
@.str.2 = [8 x i8] c"-1.000\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store i32 0, i32* %1
store double 0.000000e+00, double* %6
br label %7
7: ; preds = %62, %0
%8 = load double, double* %6
%9 = fcmp olt double %8, 1.000000e+03
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4)
%12 = icmp eq i32 %11, 3
br label %13
13: ; preds = %10, %7
%14 = phi i1 [ false, %7 ], [ %12, %10 ]
br i1 %14, label %15, label %63
15: ; preds = %13
%16 = load double, double* %6
%17 = fadd double %16, 1.000000e+00
store double %17, double* %6
%18 = load double, double* %2
%19 = load double, double* %3
%20 = fadd double %18, %19
%21 = load double, double* %4
%22 = fadd double %20, %21
%23 = fdiv double %22, 2.000000e+00
%24 = load double, double* %2
%25 = load double, double* %3
%26 = fadd double %24, %25
%27 = load double, double* %4
%28 = fadd double %26, %27
%29 = fdiv double %28, 2.000000e+00
%30 = load double, double* %2
%31 = fsub double %29, %30
%32 = fmul double %23, %31
%33 = load double, double* %2
%34 = load double, double* %3
%35 = fadd double %33, %34
%36 = load double, double* %4
%37 = fadd double %35, %36
%38 = fdiv double %37, 2.000000e+00
%39 = load double, double* %3
%40 = fsub double %38, %39
%41 = fmul double %32, %40
%42 = load double, double* %2
%43 = load double, double* %3
%44 = fadd double %42, %43
%45 = load double, double* %4
%46 = fadd double %44, %45
%47 = fdiv double %46, 2.000000e+00
%48 = load double, double* %4
%49 = fsub double %47, %48
%50 = fmul double %41, %49
%51 = call i32 @sqrt(double %50)
%52 = mul nsw i32 %51, 4
%53 = sdiv i32 %52, 3
%54 = sitofp i32 %53 to double
store double %54, double* %5
%55 = load double, double* %5
%56 = fcmp ogt double %55, 0.000000e+00
br i1 %56, label %57, label %60
57: ; preds = %15
%58 = load double, double* %5
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %58)
br label %62
60: ; preds = %15
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %62
62: ; preds = %60, %57
br label %7
63: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [7 x i8] c"%.3lf\0A\00"
@str = [7 x i8] c"-1.000\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*
br label %7
7: ; preds = %0, %34
%8 = phi i32 [ 0, %0 ], [ %12, %34 ]
%9 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%10 = icmp eq i32 %9, 3
br i1 %10, label %11, label %36
11: ; preds = %7
%12 = add nuw nsw i32 %8, 1
%13 = load double, double* %1
%14 = load double, double* %2
%15 = fadd double %13, %14
%16 = load double, double* %3
%17 = fadd double %15, %16
%18 = fmul double %17, 5.000000e-01
%19 = fsub double %18, %13
%20 = fmul double %18, %19
%21 = fsub double %18, %14
%22 = fmul double %21, %20
%23 = fsub double %18, %16
%24 = fmul double %23, %22
%25 = call i32 @sqrt(double %24)
%26 = icmp sgt i32 %25, 0
br i1 %26, label %27, label %32
27: ; preds = %11
%28 = shl nsw i32 %25, 2
%29 = sdiv i32 %28, 3
%30 = sitofp i32 %29 to double
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %30)
br label %34
32: ; preds = %11
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
br label %34
34: ; preds = %32, %27
%35 = icmp eq i32 %12, 1000
br i1 %35, label %36, label %7
36: ; preds = %34, %7
ret i32 0
}