#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 */
double sqrt(double);
int circum_(double *v1, double *v2, double *v3, double *c__, int *ier) {
  static int i__;
  static double e1[3], e2[3], cu[3], cnorm;
  --c__;
  --v3;
  --v2;
  --v1;
  for (i__ = 1; i__ <= 3; ++i__) {
    e1[i__ - 1] = v2[i__] - v1[i__];
    e2[i__ - 1] = v3[i__] - v1[i__];
  }
  cu[0] = e1[1] * e2[2] - e1[2] * e2[1];
  cu[1] = e1[2] * e2[0] - e1[0] * e2[2];
  cu[2] = e1[0] * e2[1] - e1[1] * e2[0];
  cnorm = cu[0] * cu[0] + cu[1] * cu[1] + cu[2] * cu[2];
  if (cnorm != 0.) {
    cnorm = sqrt(cnorm);
    for (i__ = 1; i__ <= 3; ++i__) {
      c__[i__] = cu[i__ - 1] / cnorm;
    }
    *ier = 0;
  } else {
    *ier = 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<circum_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x20(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x8(%rbp)
movl   $0x1,0x2eda(%rip)
cmpl   $0x3,0x2ed3(%rip)
jg     11f7 <circum_+0xe7>
mov    -0x10(%rbp),%rax
movslq 0x2ec2(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq 0x2eb2(%rip),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    0x2ea7(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2eaa(%rip),%rax
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq 0x2e8a(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq 0x2e7a(%rip),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    0x2e6f(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2e92(%rip),%rax
movsd  %xmm0,(%rax,%rcx,8)
mov    0x2e57(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2e4e(%rip)
jmp    1166 <circum_+0x56>
movsd  0x2e59(%rip),%xmm0
movsd  0x2e79(%rip),%xmm2
movsd  0x2e51(%rip),%xmm1
mulsd  0x2e61(%rip),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2e52(%rip)
movsd  0x2e1a(%rip),%xmm0
movsd  0x2e22(%rip),%xmm2
movsd  0x2dfa(%rip),%xmm1
mulsd  0x2e22(%rip),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2e13(%rip)
movsd  0x2dc3(%rip),%xmm0
movsd  0x2de3(%rip),%xmm2
movsd  0x2dbb(%rip),%xmm1
mulsd  0x2dcb(%rip),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2dd4(%rip)
movsd  0x2dbc(%rip),%xmm1
movsd  0x2db4(%rip),%xmm2
movsd  0x2db4(%rip),%xmm0
mulsd  0x2dac(%rip),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x2da4(%rip),%xmm0
movsd  0x2d9c(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2d94(%rip)
movsd  0x2d8c(%rip),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1334 <circum_+0x224>
jp     1334 <circum_+0x224>
jmp    13b3 <circum_+0x2a3>
movsd  0x2d6c(%rip),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,0x2d5f(%rip)
movl   $0x1,0x2ced(%rip)
cmpl   $0x3,0x2ce6(%rip)
jg     13a4 <circum_+0x294>
mov    0x2cda(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2d1d(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
divsd  0x2d28(%rip),%xmm0
mov    -0x20(%rbp),%rax
movslq 0x2cb5(%rip),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x2caa(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ca1(%rip)
jmp    1353 <circum_+0x243>
mov    -0x28(%rbp),%rax
movl   $0x0,(%rax)
jmp    13bd <circum_+0x2ad>
mov    -0x28(%rbp),%rax
movl   $0x1,(%rax)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<circum_>:
push   %r14
push   %rbx
push   %rax
mov    %r8,%r14
movsd  (%rsi),%xmm2
movsd  0x8(%rsi),%xmm1
movsd  (%rdi),%xmm3
movsd  0x8(%rdi),%xmm4
subsd  %xmm3,%xmm2
movsd  (%rdx),%xmm5
movsd  0x8(%rdx),%xmm0
subsd  %xmm3,%xmm5
subsd  %xmm4,%xmm1
subsd  %xmm4,%xmm0
movsd  0x10(%rsi),%xmm3
movsd  0x10(%rdi),%xmm4
subsd  %xmm4,%xmm3
movsd  0x10(%rdx),%xmm6
subsd  %xmm4,%xmm6
movapd %xmm0,%xmm4
mulsd  %xmm3,%xmm4
movapd %xmm1,%xmm7
mulsd  %xmm6,%xmm7
subsd  %xmm4,%xmm7
movsd  %xmm7,0x2ecb(%rip)
mulsd  %xmm2,%xmm6
mulsd  %xmm5,%xmm3
subsd  %xmm6,%xmm3
movsd  %xmm3,0x2ec7(%rip)
mulsd  %xmm5,%xmm1
mulsd  %xmm2,%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,0x2ec3(%rip)
mulsd  %xmm3,%xmm3
mulsd  %xmm7,%xmm7
addsd  %xmm3,%xmm7
mulsd  %xmm0,%xmm0
addsd  %xmm7,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11bd <circum_+0xad>
jnp    11c8 <circum_+0xb8>
mov    %rcx,%rbx
jb     11cf <circum_+0xbf>
sqrtsd %xmm0,%xmm0
jmp    11d4 <circum_+0xc4>
mov    $0x1,%eax
jmp    1203 <circum_+0xf3>
call   1030 <sqrt@plt>
movsd  0x2e64(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx)
movsd  0x2e64(%rip),%xmm1
movhpd 0x2e6c(%rip),%xmm1
unpcklpd %xmm0,%xmm0
divpd  %xmm0,%xmm1
movupd %xmm1,0x8(%rbx)
xor    %eax,%eax
mov    %eax,(%r14)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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