#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 *, double);
scalar_t__ scanf(char *, double *, double *, double *);
double sqrt(double);
int main(void) {
  double a, b, c, r;
  while (scanf("%lf %lf %lf", &a, &b, &c) > 0) {
    if (a < 0.0000000001 || b < 0.0000000001 || c < 0.0000000001)
      r = 0;
    else
      r = 0.5 * sqrt((b + c - a) * (a + c - b) * ((a + b - c) / (a + b + c)));
    printf("The radius of the round table is: %.3lf\n", r);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <scanf@plt>
cmp    $0x0,%rax
jle    121e <main+0xee>
movsd  0xe97(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
ja     119a <main+0x6a>
movsd  0xe84(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
ja     119a <main+0x6a>
movsd  0xe71(%rip),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    11a7 <main+0x77>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1208 <main+0xd8>
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
addsd  -0x20(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
addsd  -0x18(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
addsd  -0x18(%rbp),%xmm2
addsd  -0x20(%rbp),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xe09(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xe08(%rip),%rdi
call   1030 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20,%rsp
lea    0xed4(%rip),%rdi
lea    0x18(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1040 <scanf@plt>
test   %rax,%rax
jle    123e <main+0x10e>
movsd  0xe97(%rip),%xmm4
lea    0xeb4(%rip),%r14
lea    0xea1(%rip),%r15
lea    0x18(%rsp),%r12
lea    0x10(%rsp),%r13
lea    0x8(%rsp),%rbx
jmp    11c3 <main+0x93>
nopl   0x0(%rax,%rax,1)
call   1050 <sqrt@plt>
mulsd  0xe6b(%rip),%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %rbx,%rcx
call   1040 <scanf@plt>
movsd  0xe42(%rip),%xmm4
test   %rax,%rax
jle    123e <main+0x10e>
movsd  0x18(%rsp),%xmm1
ucomisd %xmm1,%xmm4
xorpd  %xmm0,%xmm0
ja     119d <main+0x6d>
movsd  0x10(%rsp),%xmm2
ucomisd %xmm2,%xmm4
xorpd  %xmm0,%xmm0
ja     119d <main+0x6d>
movsd  0x8(%rsp),%xmm3
ucomisd %xmm3,%xmm4
xorpd  %xmm0,%xmm0
ja     119d <main+0x6d>
movapd %xmm2,%xmm0
addsd  %xmm3,%xmm0
subsd  %xmm1,%xmm0
movapd %xmm1,%xmm4
addsd  %xmm3,%xmm4
subsd  %xmm2,%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
subsd  %xmm3,%xmm0
addsd  %xmm3,%xmm1
divsd  %xmm1,%xmm0
mulsd  %xmm4,%xmm0
ucomisd 0xde1(%rip),%xmm0
jb     1190 <main+0x60>
sqrtsd %xmm0,%xmm0
jmp    1195 <main+0x65>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [41 x i8] c"The radius of the round table is: %.3lf\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 = call i64 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%8 = icmp sgt i64 %7, 0
br i1 %8, label %9, label %36
9: ; preds = %0, %31
%10 = load double, double* %1
%11 = fcmp olt double %10, 1.000000e-10
%12 = load double, double* %2
%13 = fcmp olt double %12, 1.000000e-10
%14 = select i1 %11, i1 true, i1 %13
%15 = load double, double* %3
%16 = fcmp olt double %15, 1.000000e-10
%17 = select i1 %14, i1 true, i1 %16
br i1 %17, label %31, label %18
18: ; preds = %9
%19 = fadd double %12, %15
%20 = fsub double %19, %10
%21 = fadd double %10, %15
%22 = fsub double %21, %12
%23 = fmul double %20, %22
%24 = fadd double %10, %12
%25 = fsub double %24, %15
%26 = fadd double %24, %15
%27 = fdiv double %25, %26
%28 = fmul double %27, %23
%29 = call double @sqrt(double %28)
%30 = fmul double %29, 5.000000e-01
br label %31
31: ; preds = %9, %18
%32 = phi double [ %30, %18 ], [ 0.000000e+00, %9 ]
%33 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), double %32)
%34 = call i64 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%35 = icmp sgt i64 %34, 0
br i1 %35, label %9, label %36
36: ; preds = %31, %0
ret i32 0
}