#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 */
scalar_t__ powf(float, int);
int /*<<< orphan*/ printf(char *, float, float, float);
int /*<<< orphan*/ scanf(char *, ...);
float sqrt(scalar_t__);
int main() {
  int i;
  int count;
  float x[3], y[3];
  float xpoint, ypoint;
  float r;
  scanf("%d", &count);
  for (i = 0; i < count; i++) {
    scanf("%f %f %f %f %f %f", &x[0], &y[0], &x[1], &y[1], &x[2], &y[2]);
    xpoint = (x[0] + x[1] + x[2]) / 3;
    ypoint = (y[0] + y[1] + y[2]) / 3;
    r = sqrt(powf(x[0] - xpoint, 2) + powf(y[0] - ypoint, 2));
    printf("%f %f %f\n", xpoint, ypoint, r);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeae(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1254 <main+0x114>
lea    -0x18(%rbp),%rsi
lea    -0x24(%rbp),%rdx
lea    -0x18(%rbp),%rcx
add    $0x4,%rcx
lea    -0x24(%rbp),%r8
add    $0x4,%r8
lea    -0x18(%rbp),%r9
add    $0x8,%r9
lea    -0x24(%rbp),%rax
add    $0x8,%rax
lea    0xe64(%rip),%rdi
mov    %rax,(%rsp)
mov    $0x0,%al
call   1050 <scanf@plt>
movss  -0x18(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  0xe3b(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x24(%rbp),%xmm0
addss  -0x20(%rbp),%xmm0
addss  -0x1c(%rbp),%xmm0
movss  0xe1b(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x18(%rbp),%xmm0
subss  -0x28(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <powf@plt>
mov    %rax,-0x38(%rbp)
movss  -0x24(%rbp),%xmm0
subss  -0x2c(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <powf@plt>
mov    -0x38(%rbp),%rdi
add    %rax,%rdi
call   1060 <sqrt@plt>
movss  %xmm0,-0x30(%rbp)
movss  -0x28(%rbp),%xmm0
movss  -0x2c(%rbp),%xmm1
movss  -0x30(%rbp),%xmm2
lea    0xdd8(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1168 <main+0x28>
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    $0x38,%rsp
lea    0xeaf(%rip),%rdi
lea    0x18(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0x18(%rsp)
jle    1257 <main+0x117>
lea    0xe94(%rip),%r13
lea    0x2c(%rsp),%rbx
lea    0x1c(%rsp),%rbp
lea    0xe95(%rip),%r14
xor    %r12d,%r12d
nopw   0x0(%rax,%rax,1)
lea    0x24(%rsp),%rax
mov    %rax,(%rsp)
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
lea    0x30(%rsp),%rcx
lea    0x20(%rsp),%r8
lea    0x34(%rsp),%r9
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0x2c(%rsp),%xmm0
movss  0x30(%rsp),%xmm2
addss  %xmm0,%xmm2
addss  0x34(%rsp),%xmm2
movss  0xe2a(%rip),%xmm1
divss  %xmm1,%xmm2
movaps %xmm2,%xmm3
movss  %xmm2,0x28(%rsp)
movss  0x1c(%rsp),%xmm2
addss  0x20(%rsp),%xmm2
addss  0x24(%rsp),%xmm2
divss  %xmm1,%xmm2
movss  %xmm2,0x14(%rsp)
subss  %xmm3,%xmm0
mov    $0x2,%edi
call   1030 <powf@plt>
mov    %rax,%r15
movss  0x1c(%rsp),%xmm0
subss  0x14(%rsp),%xmm0
mov    $0x2,%edi
call   1030 <powf@plt>
add    %rax,%r15
mov    %r15,%rdi
call   1060 <sqrt@plt>
movaps %xmm0,%xmm2
mov    %r14,%rdi
movss  0x28(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
call   1040 <printf@plt>
add    $0x1,%r12d
cmp    0x18(%rsp),%r12d
jl     1190 <main+0x50>
xor    %eax,%eax
add    $0x38,%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 = [18 x i8] c"%f %f %f %f %f %f\00"
@.str.2 = [10 x i8] c"%f %f %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [3 x float]
%5 = alloca [3 x float]
%6 = alloca float
%7 = alloca float
%8 = alloca float
store i32 0, i32* %1
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
store i32 0, i32* %2
br label %10
10: ; preds = %56, %0
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %59
14: ; preds = %10
%15 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 0
%16 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 0
%17 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 1
%18 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 1
%19 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 2
%20 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 2
%21 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), float* %15, float* %16, float* %17, float* %18, float* %19, float* %20)
%22 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 0
%23 = load float, float* %22
%24 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 1
%25 = load float, float* %24
%26 = fadd float %23, %25
%27 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 2
%28 = load float, float* %27
%29 = fadd float %26, %28
%30 = fdiv float %29, 3.000000e+00
store float %30, float* %6
%31 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 0
%32 = load float, float* %31
%33 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 1
%34 = load float, float* %33
%35 = fadd float %32, %34
%36 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 2
%37 = load float, float* %36
%38 = fadd float %35, %37
%39 = fdiv float %38, 3.000000e+00
store float %39, float* %7
%40 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 0
%41 = load float, float* %40
%42 = load float, float* %6
%43 = fsub float %41, %42
%44 = call i64 @powf(float %43, i32 2)
%45 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 0
%46 = load float, float* %45
%47 = load float, float* %7
%48 = fsub float %46, %47
%49 = call i64 @powf(float %48, i32 2)
%50 = add nsw i64 %44, %49
%51 = call float @sqrt(i64 %50)
store float %51, float* %8
%52 = load float, float* %6
%53 = load float, float* %7
%54 = load float, float* %8
%55 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), float %52, float %53, float %54)
br label %56
56: ; preds = %14
%57 = load i32, i32* %2
%58 = add nsw i32 %57, 1
store i32 %58, i32* %2
br label %10
59: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [18 x i8] c"%f %f %f %f %f %f\00"
@.str.2 = [10 x i8] c"%f %f %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x float]
%3 = alloca [3 x float]
%4 = bitcast i32* %1 to i8*
%5 = bitcast [3 x float]* %2 to i8*
%6 = bitcast [3 x float]* %3 to i8*
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %1
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %43
10: ; preds = %0
%11 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 0
%12 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 0
%13 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 1
%14 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 1
%15 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 2
%16 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 2
br label %17
17: ; preds = %10, %17
%18 = phi i32 [ 0, %10 ], [ %40, %17 ]
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), float* %11, float* %12, float* %13, float* %14, float* %15, float* %16)
%20 = load float, float* %11
%21 = load float, float* %13
%22 = fadd float %20, %21
%23 = load float, float* %15
%24 = fadd float %22, %23
%25 = fdiv float %24, 3.000000e+00
%26 = load float, float* %12
%27 = load float, float* %14
%28 = fadd float %26, %27
%29 = load float, float* %16
%30 = fadd float %28, %29
%31 = fdiv float %30, 3.000000e+00
%32 = fsub float %20, %25
%33 = call i64 @powf(float %32, i32 2)
%34 = load float, float* %12
%35 = fsub float %34, %31
%36 = call i64 @powf(float %35, i32 2)
%37 = add nsw i64 %36, %33
%38 = call float @sqrt(i64 %37)
%39 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), float %25, float %31, float %38)
%40 = add nuw nsw i32 %18, 1
%41 = load i32, i32* %1
%42 = icmp slt i32 %40, %41
br i1 %42, label %17, label %43
43: ; preds = %17, %0
ret i32 0
}