#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 SQ(double);
scalar_t__ area(double, double, double);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, ...);
double sqrt(int);
int main() {
  double a[6], u, U, v, V, w, W, vol, S;
  int n, i;
  scanf("%d", &n);
  while (n--) {
    S = 0;
    for (i = 0; i < 6; ++i) {
      scanf("%lf", &a[i]);
    }
    u = a[2];
    U = a[3];
    v = a[4];
    V = a[1];
    w = a[5];
    W = a[0];
    S += area(a[2], a[1], a[5]);
    S += area(a[0], a[2], a[4]);
    S += area(a[0], a[1], a[3]);
    S += area(a[3], a[4], a[5]);
    vol = sqrt((4 * SQ(u) * SQ(v) * SQ(w) - SQ(u) * SQ(SQ(v) + SQ(w) - SQ(U)) -
                SQ(v) * SQ(SQ(w) + SQ(u) - SQ(V)) -
                SQ(w) * SQ(SQ(u) + SQ(v) - SQ(W)) +
                (SQ(v) + SQ(w) - SQ(U)) * (SQ(w) + SQ(u) - SQ(V)) *
                    (SQ(u) + SQ(v) - SQ(W)))) /
          12.0;
    printf("%.4lf\n", vol * 3.0 / S);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xea7(%rip),%rdi
lea    -0x84(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x84(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x84(%rbp)
cmp    $0x0,%eax
je     155e <main+0x40e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
movl   $0x0,-0x88(%rbp)
cmpl   $0x6,-0x88(%rbp)
jge    11e4 <main+0x94>
movslq -0x88(%rbp),%rax
lea    -0x40(%rbp),%rsi
shl    $0x3,%rax
add    %rax,%rsi
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    11a3 <main+0x53>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1040 <area@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1040 <area@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
call   1040 <area@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1040 <area@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1060 <SQ@plt>
shl    $0x2,%eax
mov    %eax,-0xe4(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ecx
mov    -0xe4(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0xe0(%rbp)
movsd  -0x68(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ecx
mov    -0xe0(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0xd0(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,-0xd4(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,-0xdc(%rbp)
movsd  -0x68(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ecx
mov    -0xdc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xd8(%rbp)
movsd  -0x50(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ecx
mov    -0xd8(%rbp),%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
call   1060 <SQ@plt>
mov    -0xd4(%rbp),%ecx
mov    %eax,%edx
mov    -0xd0(%rbp),%eax
imul   %edx,%ecx
sub    %ecx,%eax
mov    %eax,-0xc0(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,-0xc4(%rbp)
movsd  -0x68(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,-0xcc(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ecx
mov    -0xcc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc8(%rbp)
movsd  -0x60(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ecx
mov    -0xc8(%rbp),%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
call   1060 <SQ@plt>
mov    -0xc4(%rbp),%ecx
mov    %eax,%edx
mov    -0xc0(%rbp),%eax
imul   %edx,%ecx
sub    %ecx,%eax
mov    %eax,-0xb0(%rbp)
movsd  -0x68(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,-0xb4(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,-0xbc(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ecx
mov    -0xbc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xb8(%rbp)
movsd  -0x70(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ecx
mov    -0xb8(%rbp),%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
call   1060 <SQ@plt>
mov    -0xb4(%rbp),%ecx
mov    %eax,%edx
mov    -0xb0(%rbp),%eax
imul   %edx,%ecx
sub    %ecx,%eax
mov    %eax,-0x90(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,-0xac(%rbp)
movsd  -0x68(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ecx
mov    -0xac(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xa8(%rbp)
movsd  -0x50(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ecx
mov    -0xa8(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x9c(%rbp)
movsd  -0x68(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,-0xa4(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ecx
mov    -0xa4(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xa0(%rbp)
movsd  -0x60(%rbp),%xmm0
call   1060 <SQ@plt>
mov    -0xa0(%rbp),%ecx
mov    %eax,%edx
mov    -0x9c(%rbp),%eax
sub    %edx,%ecx
imul   %ecx,%eax
mov    %eax,-0x8c(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,-0x98(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ecx
mov    -0x98(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x94(%rbp)
movsd  -0x70(%rbp),%xmm0
call   1060 <SQ@plt>
mov    -0x94(%rbp),%ecx
mov    -0x90(%rbp),%edi
mov    %eax,%edx
mov    -0x8c(%rbp),%eax
sub    %edx,%ecx
imul   %ecx,%eax
add    %eax,%edi
call   1070 <sqrt@plt>
movsd  0xad6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xabd(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
divsd  -0x80(%rbp),%xmm0
lea    0xac3(%rip),%rdi
call   1030 <printf@plt>
jmp    1177 <main+0x27>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
lea    0xeab(%rip),%rdi
lea    0x24(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
subl   $0x1,0x24(%rsp)
jb     1486 <main+0x336>
nopl   0x0(%rax)
lea    0xe8c(%rip),%rbx
mov    %rbx,%rdi
lea    0x30(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rbx,%rdi
lea    0x38(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rbx,%rdi
lea    0x40(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rbx,%rdi
lea    0x48(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rbx,%rdi
lea    0x50(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rbx,%rdi
lea    0x58(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x40(%rsp),%xmm3
movsd  %xmm3,0x10(%rsp)
movsd  0x48(%rsp),%xmm0
movsd  %xmm0,0x60(%rsp)
movsd  0x50(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x70(%rsp)
movsd  0x38(%rsp),%xmm1
movsd  %xmm1,0x68(%rsp)
movsd  0x58(%rsp),%xmm2
movsd  %xmm2,0x8(%rsp)
movaps %xmm3,%xmm0
call   1040 <area@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,(%rsp)
movsd  0x30(%rsp),%xmm0
movsd  0x40(%rsp),%xmm1
movsd  0x50(%rsp),%xmm2
call   1040 <area@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x30(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
movsd  0x48(%rsp),%xmm2
call   1040 <area@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x48(%rsp),%xmm0
movsd  0x50(%rsp),%xmm1
movsd  0x58(%rsp),%xmm2
call   1040 <area@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%r12d
movsd  0x18(%rsp),%xmm0
call   1060 <SQ@plt>
imul   %eax,%r12d
movsd  0x8(%rsp),%xmm0
call   1060 <SQ@plt>
imul   %eax,%r12d
shl    $0x2,%r12d
movsd  0x10(%rsp),%xmm0
call   1060 <SQ@plt>
mov    %eax,0x2c(%rsp)
movsd  0x18(%rsp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ebp
add    %ebx,%ebp
movsd  0x60(%rsp),%xmm0
call   1060 <SQ@plt>
sub    %eax,%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
call   1060 <SQ@plt>
mov    %eax,%r13d
movsd  0x18(%rsp),%xmm0
call   1060 <SQ@plt>
mov    %eax,0x28(%rsp)
movsd  0x8(%rsp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ebp
movsd  0x10(%rsp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ebx
add    %ebp,%ebx
movsd  0x68(%rsp),%xmm0
call   1060 <SQ@plt>
sub    %eax,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
call   1060 <SQ@plt>
mov    %eax,%r15d
movsd  0x8(%rsp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ebp
movsd  0x10(%rsp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ebx
movsd  0x18(%rsp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%r14d
add    %ebx,%r14d
movsd  0x70(%rsp),%xmm0
call   1060 <SQ@plt>
sub    %eax,%r14d
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
call   1060 <SQ@plt>
imul   0x2c(%rsp),%r13d
imul   0x28(%rsp),%r15d
add    %r13d,%r15d
imul   %ebp,%eax
add    %r15d,%eax
sub    %eax,%r12d
movsd  0x18(%rsp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
call   1060 <SQ@plt>
add    %eax,%ebp
movsd  0x60(%rsp),%xmm0
call   1060 <SQ@plt>
sub    %eax,%ebp
movsd  0x8(%rsp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ebx
movsd  0x10(%rsp),%xmm0
call   1060 <SQ@plt>
add    %eax,%ebx
movsd  0x68(%rsp),%xmm0
call   1060 <SQ@plt>
sub    %eax,%ebx
imul   %ebp,%ebx
movsd  0x10(%rsp),%xmm0
call   1060 <SQ@plt>
mov    %eax,%ebp
movsd  0x18(%rsp),%xmm0
call   1060 <SQ@plt>
add    %eax,%ebp
movsd  0x70(%rsp),%xmm0
call   1060 <SQ@plt>
sub    %eax,%ebp
imul   %ebx,%ebp
add    %r12d,%ebp
mov    %ebp,%edi
call   1070 <sqrt@plt>
divsd  0xb9e(%rip),%xmm0
mulsd  0xb9e(%rip),%xmm0
divsd  (%rsp),%xmm0
lea    0xba1(%rip),%rdi
call   1030 <printf@plt>
subl   $0x1,0x24(%rsp)
jae    1180 <main+0x30>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [7 x i8] c"%.4lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x double]
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca i32
%12 = alloca i32
store i32 0, i32* %1
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %11)
br label %14
14: ; preds = %30, %0
%15 = load i32, i32* %11
%16 = add nsw i32 %15, -1
store i32 %16, i32* %11
%17 = icmp ne i32 %15, 0
br i1 %17, label %18, label %168
18: ; preds = %14
store double 0.000000e+00, double* %10
store i32 0, i32* %12
br label %19
19: ; preds = %27, %18
%20 = load i32, i32* %12
%21 = icmp slt i32 %20, 6
br i1 %21, label %22, label %30
22: ; preds = %19
%23 = load i32, i32* %12
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 %24
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %25)
br label %27
27: ; preds = %22
%28 = load i32, i32* %12
%29 = add nsw i32 %28, 1
store i32 %29, i32* %12
br label %19
30: ; preds = %19
%31 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 2
%32 = load double, double* %31
store double %32, double* %3
%33 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 3
%34 = load double, double* %33
store double %34, double* %4
%35 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 4
%36 = load double, double* %35
store double %36, double* %5
%37 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 1
%38 = load double, double* %37
store double %38, double* %6
%39 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 5
%40 = load double, double* %39
store double %40, double* %7
%41 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 0
%42 = load double, double* %41
store double %42, double* %8
%43 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 2
%44 = load double, double* %43
%45 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 1
%46 = load double, double* %45
%47 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 5
%48 = load double, double* %47
%49 = call i64 @area(double %44, double %46, double %48)
%50 = sitofp i64 %49 to double
%51 = load double, double* %10
%52 = fadd double %51, %50
store double %52, double* %10
%53 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 0
%54 = load double, double* %53
%55 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 2
%56 = load double, double* %55
%57 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 4
%58 = load double, double* %57
%59 = call i64 @area(double %54, double %56, double %58)
%60 = sitofp i64 %59 to double
%61 = load double, double* %10
%62 = fadd double %61, %60
store double %62, double* %10
%63 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 0
%64 = load double, double* %63
%65 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 1
%66 = load double, double* %65
%67 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 3
%68 = load double, double* %67
%69 = call i64 @area(double %64, double %66, double %68)
%70 = sitofp i64 %69 to double
%71 = load double, double* %10
%72 = fadd double %71, %70
store double %72, double* %10
%73 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 3
%74 = load double, double* %73
%75 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 4
%76 = load double, double* %75
%77 = getelementptr inbounds [6 x double], [6 x double]* %2, i64 0, i64 5
%78 = load double, double* %77
%79 = call i64 @area(double %74, double %76, double %78)
%80 = sitofp i64 %79 to double
%81 = load double, double* %10
%82 = fadd double %81, %80
store double %82, double* %10
%83 = load double, double* %3
%84 = call i32 @SQ(double %83)
%85 = mul nsw i32 4, %84
%86 = load double, double* %5
%87 = call i32 @SQ(double %86)
%88 = mul nsw i32 %85, %87
%89 = load double, double* %7
%90 = call i32 @SQ(double %89)
%91 = mul nsw i32 %88, %90
%92 = load double, double* %3
%93 = call i32 @SQ(double %92)
%94 = load double, double* %5
%95 = call i32 @SQ(double %94)
%96 = load double, double* %7
%97 = call i32 @SQ(double %96)
%98 = add nsw i32 %95, %97
%99 = load double, double* %4
%100 = call i32 @SQ(double %99)
%101 = sub nsw i32 %98, %100
%102 = sitofp i32 %101 to double
%103 = call i32 @SQ(double %102)
%104 = mul nsw i32 %93, %103
%105 = sub nsw i32 %91, %104
%106 = load double, double* %5
%107 = call i32 @SQ(double %106)
%108 = load double, double* %7
%109 = call i32 @SQ(double %108)
%110 = load double, double* %3
%111 = call i32 @SQ(double %110)
%112 = add nsw i32 %109, %111
%113 = load double, double* %6
%114 = call i32 @SQ(double %113)
%115 = sub nsw i32 %112, %114
%116 = sitofp i32 %115 to double
%117 = call i32 @SQ(double %116)
%118 = mul nsw i32 %107, %117
%119 = sub nsw i32 %105, %118
%120 = load double, double* %7
%121 = call i32 @SQ(double %120)
%122 = load double, double* %3
%123 = call i32 @SQ(double %122)
%124 = load double, double* %5
%125 = call i32 @SQ(double %124)
%126 = add nsw i32 %123, %125
%127 = load double, double* %8
%128 = call i32 @SQ(double %127)
%129 = sub nsw i32 %126, %128
%130 = sitofp i32 %129 to double
%131 = call i32 @SQ(double %130)
%132 = mul nsw i32 %121, %131
%133 = sub nsw i32 %119, %132
%134 = load double, double* %5
%135 = call i32 @SQ(double %134)
%136 = load double, double* %7
%137 = call i32 @SQ(double %136)
%138 = add nsw i32 %135, %137
%139 = load double, double* %4
%140 = call i32 @SQ(double %139)
%141 = sub nsw i32 %138, %140
%142 = load double, double* %7
%143 = call i32 @SQ(double %142)
%144 = load double, double* %3
%145 = call i32 @SQ(double %144)
%146 = add nsw i32 %143, %145
%147 = load double, double* %6
%148 = call i32 @SQ(double %147)
%149 = sub nsw i32 %146, %148
%150 = mul nsw i32 %141, %149
%151 = load double, double* %3
%152 = call i32 @SQ(double %151)
%153 = load double, double* %5
%154 = call i32 @SQ(double %153)
%155 = add nsw i32 %152, %154
%156 = load double, double* %8
%157 = call i32 @SQ(double %156)
%158 = sub nsw i32 %155, %157
%159 = mul nsw i32 %150, %158
%160 = add nsw i32 %133, %159
%161 = call double @sqrt(i32 %160)
%162 = fdiv double %161, 1.200000e+01
store double %162, double* %9
%163 = load double, double* %9
%164 = fmul double %163, 3.000000e+00
%165 = load double, double* %10
%166 = fdiv double %164, %165
%167 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %166)
br label %14
168: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [7 x i8] c"%.4lf\0A\00"
define i32 @main() {
%1 = alloca [6 x double]
%2 = alloca i32
%3 = bitcast [6 x double]* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = add nsw i32 %6, -1
store i32 %7, i32* %2
%8 = icmp eq i32 %6, 0
br i1 %8, label %111, label %9
9: ; preds = %0
%10 = getelementptr inbounds [6 x double], [6 x double]* %1, i64 0, i64 2
%11 = getelementptr inbounds [6 x double], [6 x double]* %1, i64 0, i64 3
%12 = getelementptr inbounds [6 x double], [6 x double]* %1, i64 0, i64 4
%13 = getelementptr inbounds [6 x double], [6 x double]* %1, i64 0, i64 1
%14 = getelementptr inbounds [6 x double], [6 x double]* %1, i64 0, i64 5
%15 = getelementptr inbounds [6 x double], [6 x double]* %1, i64 0, i64 0
br label %16
16: ; preds = %9, %16
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %15)
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %13)
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %10)
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %11)
%21 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %12)
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %14)
%23 = load double, double* %10
%24 = load double, double* %11
%25 = load double, double* %12
%26 = load double, double* %13
%27 = load double, double* %14
%28 = load double, double* %15
%29 = call i64 @area(double %23, double %26, double %27)
%30 = sitofp i64 %29 to double
%31 = load double, double* %15
%32 = load double, double* %10
%33 = load double, double* %12
%34 = call i64 @area(double %31, double %32, double %33)
%35 = sitofp i64 %34 to double
%36 = fadd double %30, %35
%37 = load double, double* %15
%38 = load double, double* %13
%39 = load double, double* %11
%40 = call i64 @area(double %37, double %38, double %39)
%41 = sitofp i64 %40 to double
%42 = fadd double %36, %41
%43 = load double, double* %11
%44 = load double, double* %12
%45 = load double, double* %14
%46 = call i64 @area(double %43, double %44, double %45)
%47 = sitofp i64 %46 to double
%48 = fadd double %42, %47
%49 = call i32 @SQ(double %23)
%50 = shl nsw i32 %49, 2
%51 = call i32 @SQ(double %25)
%52 = mul nsw i32 %50, %51
%53 = call i32 @SQ(double %27)
%54 = mul nsw i32 %52, %53
%55 = call i32 @SQ(double %23)
%56 = call i32 @SQ(double %25)
%57 = call i32 @SQ(double %27)
%58 = add nsw i32 %57, %56
%59 = call i32 @SQ(double %24)
%60 = sub i32 %58, %59
%61 = sitofp i32 %60 to double
%62 = call i32 @SQ(double %61)
%63 = call i32 @SQ(double %25)
%64 = call i32 @SQ(double %27)
%65 = call i32 @SQ(double %23)
%66 = add nsw i32 %65, %64
%67 = call i32 @SQ(double %26)
%68 = sub i32 %66, %67
%69 = sitofp i32 %68 to double
%70 = call i32 @SQ(double %69)
%71 = call i32 @SQ(double %27)
%72 = call i32 @SQ(double %23)
%73 = call i32 @SQ(double %25)
%74 = add nsw i32 %73, %72
%75 = call i32 @SQ(double %28)
%76 = sub i32 %74, %75
%77 = sitofp i32 %76 to double
%78 = call i32 @SQ(double %77)
%79 = mul i32 %62, %55
%80 = mul i32 %70, %63
%81 = mul i32 %78, %71
%82 = call i32 @SQ(double %25)
%83 = call i32 @SQ(double %27)
%84 = add nsw i32 %83, %82
%85 = call i32 @SQ(double %24)
%86 = sub i32 %84, %85
%87 = call i32 @SQ(double %27)
%88 = call i32 @SQ(double %23)
%89 = add nsw i32 %88, %87
%90 = call i32 @SQ(double %26)
%91 = sub i32 %89, %90
%92 = mul nsw i32 %91, %86
%93 = call i32 @SQ(double %23)
%94 = call i32 @SQ(double %25)
%95 = add nsw i32 %94, %93
%96 = call i32 @SQ(double %28)
%97 = sub i32 %95, %96
%98 = mul nsw i32 %92, %97
%99 = add i32 %80, %79
%100 = add i32 %99, %81
%101 = sub i32 %54, %100
%102 = add i32 %101, %98
%103 = call double @sqrt(i32 %102)
%104 = fdiv double %103, 1.200000e+01
%105 = fmul double %104, 3.000000e+00
%106 = fdiv double %105, %48
%107 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %106)
%108 = load i32, i32* %2
%109 = add nsw i32 %108, -1
store i32 %109, i32* %2
%110 = icmp eq i32 %108, 0
br i1 %110, label %111, label %16
111: ; preds = %16, %0
ret i32 0
}