#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 */
void geom_circum_tri2d(const double a[2], const double b[2], const double c[2],
                       double circumcenter[2], double *xi, double *eta) {
  double xba, yba, xca, yca;
  double balength, calength;
  double denominator;
  double xcirca, ycirca;
  xba = b[0] - a[0];
  yba = b[1] - a[1];
  xca = c[0] - a[0];
  yca = c[1] - a[1];
  balength = xba * xba + yba * yba;
  calength = xca * xca + yca * yca;
  denominator = 0.5 / (xba * yca - yba * xca);
  xcirca = (yca * balength - yba * calength) * denominator;
  ycirca = (xba * calength - xca * balength) * denominator;
  circumcenter[0] = xcirca;
  circumcenter[1] = ycirca;
  if (xi != (double *)NULL) {
    *xi = (xcirca * yca - ycirca * xca) * (2.0 * denominator);
    *eta = (ycirca * xba - xcirca * yba) * (2.0 * denominator);
  }
}


x86 assembly (clang, -O0):
<geom_circum_tri2d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe0f(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x70(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x78(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
cmpq   $0x0,-0x28(%rbp)
je     1332 <geom_circum_tri2d+0x232>
movsd  -0x70(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xd33(%rip),%xmm1
mulsd  -0x68(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x78(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xce7(%rip),%xmm1
mulsd  -0x68(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom_circum_tri2d>:
movupd (%rdi),%xmm2
movsd  0x8(%rsi),%xmm0
movhpd (%rdx),%xmm0
shufpd $0x1,%xmm2,%xmm2
movsd  0x8(%rdx),%xmm1
movhpd (%rsi),%xmm1
subpd  %xmm2,%xmm0
subpd  %xmm2,%xmm1
movapd %xmm0,%xmm4
unpcklpd %xmm1,%xmm4
mulpd  %xmm4,%xmm4
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
movapd %xmm0,%xmm3
unpckhpd %xmm0,%xmm3
movapd %xmm1,%xmm5
unpckhpd %xmm0,%xmm5
mulpd  %xmm5,%xmm5
addpd  %xmm4,%xmm5
movapd 0xea9(%rip),%xmm4
xorpd  %xmm0,%xmm4
mulsd  %xmm3,%xmm4
movapd %xmm2,%xmm6
mulsd  %xmm1,%xmm6
addsd  %xmm4,%xmm6
movsd  0xe9d(%rip),%xmm4
divsd  %xmm6,%xmm4
movapd %xmm1,%xmm6
mulpd  %xmm5,%xmm6
shufpd $0x1,%xmm5,%xmm5
mulpd  %xmm0,%xmm5
subpd  %xmm5,%xmm6
movapd %xmm4,%xmm5
unpcklpd %xmm4,%xmm5
mulpd  %xmm6,%xmm5
movupd %xmm5,(%rcx)
test   %r8,%r8
je     11d7 <geom_circum_tri2d+0xd7>
movapd %xmm5,%xmm6
unpckhpd %xmm5,%xmm6
mulsd  %xmm6,%xmm3
mulsd  %xmm5,%xmm1
subsd  %xmm3,%xmm1
addsd  %xmm4,%xmm4
mulsd  %xmm4,%xmm1
movsd  %xmm1,(%r8)
mulsd  %xmm5,%xmm0
mulsd  %xmm2,%xmm6
subsd  %xmm0,%xmm6
mulsd  %xmm4,%xmm6
movsd  %xmm6,(%r9)
ret

LLVM IR (-O0):
define void @geom_circum_tri2d(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
store double* %0, double** %7
store double* %1, double** %8
store double* %2, double** %9
store double* %3, double** %10
store double* %4, double** %11
store double* %5, double** %12
%22 = load double*, double** %8
%23 = getelementptr inbounds double, double* %22, i64 0
%24 = load double, double* %23
%25 = load double*, double** %7
%26 = getelementptr inbounds double, double* %25, i64 0
%27 = load double, double* %26
%28 = fsub double %24, %27
store double %28, double* %13
%29 = load double*, double** %8
%30 = getelementptr inbounds double, double* %29, i64 1
%31 = load double, double* %30
%32 = load double*, double** %7
%33 = getelementptr inbounds double, double* %32, i64 1
%34 = load double, double* %33
%35 = fsub double %31, %34
store double %35, double* %14
%36 = load double*, double** %9
%37 = getelementptr inbounds double, double* %36, i64 0
%38 = load double, double* %37
%39 = load double*, double** %7
%40 = getelementptr inbounds double, double* %39, i64 0
%41 = load double, double* %40
%42 = fsub double %38, %41
store double %42, double* %15
%43 = load double*, double** %9
%44 = getelementptr inbounds double, double* %43, i64 1
%45 = load double, double* %44
%46 = load double*, double** %7
%47 = getelementptr inbounds double, double* %46, i64 1
%48 = load double, double* %47
%49 = fsub double %45, %48
store double %49, double* %16
%50 = load double, double* %13
%51 = load double, double* %13
%52 = load double, double* %14
%53 = load double, double* %14
%54 = fmul double %52, %53
%55 = call double @llvm.fmuladd.f64(double %50, double %51, double %54)
store double %55, double* %17
%56 = load double, double* %15
%57 = load double, double* %15
%58 = load double, double* %16
%59 = load double, double* %16
%60 = fmul double %58, %59
%61 = call double @llvm.fmuladd.f64(double %56, double %57, double %60)
store double %61, double* %18
%62 = load double, double* %13
%63 = load double, double* %16
%64 = load double, double* %14
%65 = load double, double* %15
%66 = fmul double %64, %65
%67 = fneg double %66
%68 = call double @llvm.fmuladd.f64(double %62, double %63, double %67)
%69 = fdiv double 5.000000e-01, %68
store double %69, double* %19
%70 = load double, double* %16
%71 = load double, double* %17
%72 = load double, double* %14
%73 = load double, double* %18
%74 = fmul double %72, %73
%75 = fneg double %74
%76 = call double @llvm.fmuladd.f64(double %70, double %71, double %75)
%77 = load double, double* %19
%78 = fmul double %76, %77
store double %78, double* %20
%79 = load double, double* %13
%80 = load double, double* %18
%81 = load double, double* %15
%82 = load double, double* %17
%83 = fmul double %81, %82
%84 = fneg double %83
%85 = call double @llvm.fmuladd.f64(double %79, double %80, double %84)
%86 = load double, double* %19
%87 = fmul double %85, %86
store double %87, double* %21
%88 = load double, double* %20
%89 = load double*, double** %10
%90 = getelementptr inbounds double, double* %89, i64 0
store double %88, double* %90
%91 = load double, double* %21
%92 = load double*, double** %10
%93 = getelementptr inbounds double, double* %92, i64 1
store double %91, double* %93
%94 = load double*, double** %11
%95 = icmp ne double* %94, null
br i1 %95, label %96, label %119
96: ; preds = %6
%97 = load double, double* %20
%98 = load double, double* %16
%99 = load double, double* %21
%100 = load double, double* %15
%101 = fmul double %99, %100
%102 = fneg double %101
%103 = call double @llvm.fmuladd.f64(double %97, double %98, double %102)
%104 = load double, double* %19
%105 = fmul double 2.000000e+00, %104
%106 = fmul double %103, %105
%107 = load double*, double** %11
store double %106, double* %107
%108 = load double, double* %21
%109 = load double, double* %13
%110 = load double, double* %20
%111 = load double, double* %14
%112 = fmul double %110, %111
%113 = fneg double %112
%114 = call double @llvm.fmuladd.f64(double %108, double %109, double %113)
%115 = load double, double* %19
%116 = fmul double 2.000000e+00, %115
%117 = fmul double %114, %116
%118 = load double*, double** %12
store double %117, double* %118
br label %119
119: ; preds = %96, %6
ret void
}

LLVM IR (-O2):
define void @geom_circum_tri2d(double* nocapture %0, double* nocapture %1, double* nocapture %2, double* nocapture writeonly %3, double* writeonly %4, double* nocapture writeonly %5) {
%7 = load double, double* %1
%8 = getelementptr inbounds double, double* %1, i64 1
%9 = load double, double* %8
%10 = bitcast double* %0 to <2 x double>*
%11 = load <2 x double>, <2 x double>* %10
%12 = shufflevector <2 x double> %11, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%13 = load double, double* %2
%14 = insertelement <2 x double> poison, double %9, i64 0
%15 = insertelement <2 x double> %14, double %13, i64 1
%16 = fsub <2 x double> %15, %12
%17 = getelementptr inbounds double, double* %2, i64 1
%18 = load double, double* %17
%19 = insertelement <2 x double> poison, double %18, i64 0
%20 = insertelement <2 x double> %19, double %7, i64 1
%21 = fsub <2 x double> %20, %12
%22 = extractelement <2 x double> %21, i64 0
%23 = shufflevector <2 x double> %16, <2 x double> %21, <2 x i32> <i32 0, i32 2>
%24 = fmul <2 x double> %23, %23
%25 = extractelement <2 x double> %21, i64 1
%26 = extractelement <2 x double> %16, i64 1
%27 = shufflevector <2 x double> %21, <2 x double> %16, <2 x i32> <i32 1, i32 3>
%28 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %27, <2 x double> %27, <2 x double> %24)
%29 = fneg <2 x double> %16
%30 = extractelement <2 x double> %29, i64 0
%31 = fmul double %26, %30
%32 = tail call double @llvm.fmuladd.f64(double %25, double %22, double %31)
%33 = fdiv double 5.000000e-01, %32
%34 = shufflevector <2 x double> %28, <2 x double> undef, <2 x i32> <i32 1, i32 0>
%35 = fmul <2 x double> %34, %29
%36 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %21, <2 x double> %28, <2 x double> %35)
%37 = insertelement <2 x double> poison, double %33, i64 0
%38 = shufflevector <2 x double> %37, <2 x double> poison, <2 x i32> zeroinitializer
%39 = fmul <2 x double> %38, %36
%40 = bitcast double* %3 to <2 x double>*
store <2 x double> %39, <2 x double>* %40
%41 = icmp eq double* %4, null
br i1 %41, label %55, label %42
42: ; preds = %6
%43 = extractelement <2 x double> %16, i64 0
%44 = extractelement <2 x double> %39, i64 1
%45 = fneg double %44
%46 = fmul double %26, %45
%47 = extractelement <2 x double> %39, i64 0
%48 = tail call double @llvm.fmuladd.f64(double %47, double %22, double %46)
%49 = fmul double %33, 2.000000e+00
%50 = fmul double %49, %48
store double %50, double* %4
%51 = fneg double %47
%52 = fmul double %43, %51
%53 = tail call double @llvm.fmuladd.f64(double %44, double %25, double %52)
%54 = fmul double %49, %53
store double %54, double* %5
br label %55
55: ; preds = %42, %6
ret void
}