double g456distsq(double v1[6], double v2[6]) {
  double vtemp;
  double xdot;
  int ii;
  double dist;
  xdot = 0.;
  for (ii = 0; ii < 6; ii++) {
    vtemp = v1[ii] - v2[ii];
    xdot = xdot + vtemp * vtemp;
  }
  dist = (xdot + 4. * (((((((((0.) < (v1[3] * v2[3] + v1[4] * v2[4]))
                                 ? (0.)
                                 : (v1[3] * v2[3] + v1[4] * v2[4]))) <
                           (v1[3] * v2[3] + v1[5] * v2[5]))
                              ? ((((0.) < (v1[3] * v2[3] + v1[4] * v2[4]))
                                      ? (0.)
                                      : (v1[3] * v2[3] + v1[4] * v2[4])))
                              : (v1[3] * v2[3] + v1[5] * v2[5]))) <
                        (v1[4] * v2[4] + v1[5] * v2[5]))
                           ? (((((((0.) < (v1[3] * v2[3] + v1[4] * v2[4]))
                                      ? (0.)
                                      : (v1[3] * v2[3] + v1[4] * v2[4]))) <
                                (v1[3] * v2[3] + v1[5] * v2[5]))
                                   ? ((((0.) < (v1[3] * v2[3] + v1[4] * v2[4]))
                                           ? (0.)
                                           : (v1[3] * v2[3] + v1[4] * v2[4])))
                                   : (v1[3] * v2[3] + v1[5] * v2[5])))
                           : (v1[4] * v2[4] + v1[5] * v2[5])));
  return dist;
}


x86 assembly (clang, -O0):
<g456distsq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x6,-0x24(%rbp)
jge    116e <g456distsq+0x6e>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    111b <g456distsq+0x1b>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11be <g456distsq+0xbe>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    11ef <g456distsq+0xef>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm3
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm2
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm2
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    12b0 <g456distsq+0x1b0>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1270 <g456distsq+0x170>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    12a1 <g456distsq+0x1a1>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    12e1 <g456distsq+0x1e1>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm3
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm2
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm2
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    1494 <g456distsq+0x394>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1362 <g456distsq+0x262>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1393 <g456distsq+0x293>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm3
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm2
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm2
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    1454 <g456distsq+0x354>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1414 <g456distsq+0x314>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    1445 <g456distsq+0x345>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    1485 <g456distsq+0x385>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    14c5 <g456distsq+0x3c5>
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x28(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
movsd  0xb29(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<g456distsq>:
movsd  (%rdi),%xmm14
movsd  0x8(%rdi),%xmm5
movsd  (%rsi),%xmm0
movsd  %xmm0,-0x8(%rsp)
movsd  0x8(%rsi),%xmm9
movsd  0x10(%rdi),%xmm15
movsd  0x10(%rsi),%xmm10
movsd  0x18(%rdi),%xmm3
movsd  0x18(%rsi),%xmm11
movsd  0x20(%rdi),%xmm2
movsd  0x20(%rsi),%xmm12
movsd  0x28(%rdi),%xmm1
movsd  0x28(%rsi),%xmm13
movapd %xmm2,%xmm6
mulsd  %xmm12,%xmm6
movapd %xmm3,%xmm7
mulsd  %xmm11,%xmm7
movapd %xmm7,%xmm4
addsd  %xmm6,%xmm4
movapd %xmm1,%xmm0
mulsd  %xmm13,%xmm0
addsd  %xmm0,%xmm7
addsd  %xmm6,%xmm0
xorpd  %xmm6,%xmm6
minsd  %xmm4,%xmm6
ucomisd %xmm6,%xmm7
xorpd  %xmm8,%xmm8
jbe    11af <g456distsq+0xaf>
ucomisd %xmm6,%xmm0
cmpnltsd %xmm0,%xmm6
andpd  %xmm0,%xmm6
jbe    11a9 <g456distsq+0xa9>
cmpltsd %xmm4,%xmm8
andpd  %xmm8,%xmm6
andnpd %xmm4,%xmm8
orpd   %xmm8,%xmm6
movapd %xmm6,%xmm0
jmp    11b9 <g456distsq+0xb9>
ucomisd %xmm7,%xmm0
jbe    11b9 <g456distsq+0xb9>
movapd %xmm7,%xmm0
subsd  %xmm13,%xmm1
subsd  %xmm12,%xmm2
subsd  %xmm11,%xmm3
subsd  %xmm10,%xmm15
subsd  %xmm9,%xmm5
subsd  -0x8(%rsp),%xmm14
mulsd  %xmm14,%xmm14
xorpd  %xmm4,%xmm4
addsd  %xmm14,%xmm4
mulsd  %xmm5,%xmm5
addsd  %xmm4,%xmm5
mulsd  %xmm15,%xmm15
addsd  %xmm5,%xmm15
mulsd  %xmm3,%xmm3
addsd  %xmm15,%xmm3
mulsd  %xmm2,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
mulsd  0xde6(%rip),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @g456distsq(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca double
%7 = alloca i32
%8 = alloca double
store double* %0, double** %3
store double* %1, double** %4
store double 0.000000e+00, double* %6
store i32 0, i32* %7
br label %9
9: ; preds = %28, %2
%10 = load i32, i32* %7
%11 = icmp slt i32 %10, 6
br i1 %11, label %12, label %31
12: ; preds = %9
%13 = load double*, double** %3
%14 = load i32, i32* %7
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds double, double* %13, i64 %15
%17 = load double, double* %16
%18 = load double*, double** %4
%19 = load i32, i32* %7
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds double, double* %18, i64 %20
%22 = load double, double* %21
%23 = fsub double %17, %22
store double %23, double* %5
%24 = load double, double* %6
%25 = load double, double* %5
%26 = load double, double* %5
%27 = call double @llvm.fmuladd.f64(double %25, double %26, double %24)
store double %27, double* %6
br label %28
28: ; preds = %12
%29 = load i32, i32* %7
%30 = add nsw i32 %29, 1
store i32 %30, i32* %7
br label %9
31: ; preds = %9
%32 = load double, double* %6
%33 = load double*, double** %3
%34 = getelementptr inbounds double, double* %33, i64 3
%35 = load double, double* %34
%36 = load double*, double** %4
%37 = getelementptr inbounds double, double* %36, i64 3
%38 = load double, double* %37
%39 = load double*, double** %3
%40 = getelementptr inbounds double, double* %39, i64 4
%41 = load double, double* %40
%42 = load double*, double** %4
%43 = getelementptr inbounds double, double* %42, i64 4
%44 = load double, double* %43
%45 = fmul double %41, %44
%46 = call double @llvm.fmuladd.f64(double %35, double %38, double %45)
%47 = fcmp olt double 0.000000e+00, %46
br i1 %47, label %48, label %49
48: ; preds = %31
br label %64
49: ; preds = %31
%50 = load double*, double** %3
%51 = getelementptr inbounds double, double* %50, i64 3
%52 = load double, double* %51
%53 = load double*, double** %4
%54 = getelementptr inbounds double, double* %53, i64 3
%55 = load double, double* %54
%56 = load double*, double** %3
%57 = getelementptr inbounds double, double* %56, i64 4
%58 = load double, double* %57
%59 = load double*, double** %4
%60 = getelementptr inbounds double, double* %59, i64 4
%61 = load double, double* %60
%62 = fmul double %58, %61
%63 = call double @llvm.fmuladd.f64(double %52, double %55, double %62)
br label %64
64: ; preds = %49, %48
%65 = phi double [ 0.000000e+00, %48 ], [ %63, %49 ]
%66 = load double*, double** %3
%67 = getelementptr inbounds double, double* %66, i64 3
%68 = load double, double* %67
%69 = load double*, double** %4
%70 = getelementptr inbounds double, double* %69, i64 3
%71 = load double, double* %70
%72 = load double*, double** %3
%73 = getelementptr inbounds double, double* %72, i64 5
%74 = load double, double* %73
%75 = load double*, double** %4
%76 = getelementptr inbounds double, double* %75, i64 5
%77 = load double, double* %76
%78 = fmul double %74, %77
%79 = call double @llvm.fmuladd.f64(double %68, double %71, double %78)
%80 = fcmp olt double %65, %79
br i1 %80, label %81, label %115
81: ; preds = %64
%82 = load double*, double** %3
%83 = getelementptr inbounds double, double* %82, i64 3
%84 = load double, double* %83
%85 = load double*, double** %4
%86 = getelementptr inbounds double, double* %85, i64 3
%87 = load double, double* %86
%88 = load double*, double** %3
%89 = getelementptr inbounds double, double* %88, i64 4
%90 = load double, double* %89
%91 = load double*, double** %4
%92 = getelementptr inbounds double, double* %91, i64 4
%93 = load double, double* %92
%94 = fmul double %90, %93
%95 = call double @llvm.fmuladd.f64(double %84, double %87, double %94)
%96 = fcmp olt double 0.000000e+00, %95
br i1 %96, label %97, label %98
97: ; preds = %81
br label %113
98: ; preds = %81
%99 = load double*, double** %3
%100 = getelementptr inbounds double, double* %99, i64 3
%101 = load double, double* %100
%102 = load double*, double** %4
%103 = getelementptr inbounds double, double* %102, i64 3
%104 = load double, double* %103
%105 = load double*, double** %3
%106 = getelementptr inbounds double, double* %105, i64 4
%107 = load double, double* %106
%108 = load double*, double** %4
%109 = getelementptr inbounds double, double* %108, i64 4
%110 = load double, double* %109
%111 = fmul double %107, %110
%112 = call double @llvm.fmuladd.f64(double %101, double %104, double %111)
br label %113
113: ; preds = %98, %97
%114 = phi double [ 0.000000e+00, %97 ], [ %112, %98 ]
br label %130
115: ; preds = %64
%116 = load double*, double** %3
%117 = getelementptr inbounds double, double* %116, i64 3
%118 = load double, double* %117
%119 = load double*, double** %4
%120 = getelementptr inbounds double, double* %119, i64 3
%121 = load double, double* %120
%122 = load double*, double** %3
%123 = getelementptr inbounds double, double* %122, i64 5
%124 = load double, double* %123
%125 = load double*, double** %4
%126 = getelementptr inbounds double, double* %125, i64 5
%127 = load double, double* %126
%128 = fmul double %124, %127
%129 = call double @llvm.fmuladd.f64(double %118, double %121, double %128)
br label %130
130: ; preds = %115, %113
%131 = phi double [ %114, %113 ], [ %129, %115 ]
%132 = load double*, double** %3
%133 = getelementptr inbounds double, double* %132, i64 4
%134 = load double, double* %133
%135 = load double*, double** %4
%136 = getelementptr inbounds double, double* %135, i64 4
%137 = load double, double* %136
%138 = load double*, double** %3
%139 = getelementptr inbounds double, double* %138, i64 5
%140 = load double, double* %139
%141 = load double*, double** %4
%142 = getelementptr inbounds double, double* %141, i64 5
%143 = load double, double* %142
%144 = fmul double %140, %143
%145 = call double @llvm.fmuladd.f64(double %134, double %137, double %144)
%146 = fcmp olt double %131, %145
br i1 %146, label %147, label %247
147: ; preds = %130
%148 = load double*, double** %3
%149 = getelementptr inbounds double, double* %148, i64 3
%150 = load double, double* %149
%151 = load double*, double** %4
%152 = getelementptr inbounds double, double* %151, i64 3
%153 = load double, double* %152
%154 = load double*, double** %3
%155 = getelementptr inbounds double, double* %154, i64 4
%156 = load double, double* %155
%157 = load double*, double** %4
%158 = getelementptr inbounds double, double* %157, i64 4
%159 = load double, double* %158
%160 = fmul double %156, %159
%161 = call double @llvm.fmuladd.f64(double %150, double %153, double %160)
%162 = fcmp olt double 0.000000e+00, %161
br i1 %162, label %163, label %164
163: ; preds = %147
br label %179
164: ; preds = %147
%165 = load double*, double** %3
%166 = getelementptr inbounds double, double* %165, i64 3
%167 = load double, double* %166
%168 = load double*, double** %4
%169 = getelementptr inbounds double, double* %168, i64 3
%170 = load double, double* %169
%171 = load double*, double** %3
%172 = getelementptr inbounds double, double* %171, i64 4
%173 = load double, double* %172
%174 = load double*, double** %4
%175 = getelementptr inbounds double, double* %174, i64 4
%176 = load double, double* %175
%177 = fmul double %173, %176
%178 = call double @llvm.fmuladd.f64(double %167, double %170, double %177)
br label %179
179: ; preds = %164, %163
%180 = phi double [ 0.000000e+00, %163 ], [ %178, %164 ]
%181 = load double*, double** %3
%182 = getelementptr inbounds double, double* %181, i64 3
%183 = load double, double* %182
%184 = load double*, double** %4
%185 = getelementptr inbounds double, double* %184, i64 3
%186 = load double, double* %185
%187 = load double*, double** %3
%188 = getelementptr inbounds double, double* %187, i64 5
%189 = load double, double* %188
%190 = load double*, double** %4
%191 = getelementptr inbounds double, double* %190, i64 5
%192 = load double, double* %191
%193 = fmul double %189, %192
%194 = call double @llvm.fmuladd.f64(double %183, double %186, double %193)
%195 = fcmp olt double %180, %194
br i1 %195, label %196, label %230
196: ; preds = %179
%197 = load double*, double** %3
%198 = getelementptr inbounds double, double* %197, i64 3
%199 = load double, double* %198
%200 = load double*, double** %4
%201 = getelementptr inbounds double, double* %200, i64 3
%202 = load double, double* %201
%203 = load double*, double** %3
%204 = getelementptr inbounds double, double* %203, i64 4
%205 = load double, double* %204
%206 = load double*, double** %4
%207 = getelementptr inbounds double, double* %206, i64 4
%208 = load double, double* %207
%209 = fmul double %205, %208
%210 = call double @llvm.fmuladd.f64(double %199, double %202, double %209)
%211 = fcmp olt double 0.000000e+00, %210
br i1 %211, label %212, label %213
212: ; preds = %196
br label %228
213: ; preds = %196
%214 = load double*, double** %3
%215 = getelementptr inbounds double, double* %214, i64 3
%216 = load double, double* %215
%217 = load double*, double** %4
%218 = getelementptr inbounds double, double* %217, i64 3
%219 = load double, double* %218
%220 = load double*, double** %3
%221 = getelementptr inbounds double, double* %220, i64 4
%222 = load double, double* %221
%223 = load double*, double** %4
%224 = getelementptr inbounds double, double* %223, i64 4
%225 = load double, double* %224
%226 = fmul double %222, %225
%227 = call double @llvm.fmuladd.f64(double %216, double %219, double %226)
br label %228
228: ; preds = %213, %212
%229 = phi double [ 0.000000e+00, %212 ], [ %227, %213 ]
br label %245
230: ; preds = %179
%231 = load double*, double** %3
%232 = getelementptr inbounds double, double* %231, i64 3
%233 = load double, double* %232
%234 = load double*, double** %4
%235 = getelementptr inbounds double, double* %234, i64 3
%236 = load double, double* %235
%237 = load double*, double** %3
%238 = getelementptr inbounds double, double* %237, i64 5
%239 = load double, double* %238
%240 = load double*, double** %4
%241 = getelementptr inbounds double, double* %240, i64 5
%242 = load double, double* %241
%243 = fmul double %239, %242
%244 = call double @llvm.fmuladd.f64(double %233, double %236, double %243)
br label %245
245: ; preds = %230, %228
%246 = phi double [ %229, %228 ], [ %244, %230 ]
br label %262
247: ; preds = %130
%248 = load double*, double** %3
%249 = getelementptr inbounds double, double* %248, i64 4
%250 = load double, double* %249
%251 = load double*, double** %4
%252 = getelementptr inbounds double, double* %251, i64 4
%253 = load double, double* %252
%254 = load double*, double** %3
%255 = getelementptr inbounds double, double* %254, i64 5
%256 = load double, double* %255
%257 = load double*, double** %4
%258 = getelementptr inbounds double, double* %257, i64 5
%259 = load double, double* %258
%260 = fmul double %256, %259
%261 = call double @llvm.fmuladd.f64(double %250, double %253, double %260)
br label %262
262: ; preds = %247, %245
%263 = phi double [ %246, %245 ], [ %261, %247 ]
%264 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %263, double %32)
store double %264, double* %8
%265 = load double, double* %8
ret double %265
}

LLVM IR (-O2):
define double @g456distsq(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %0, i64 2
%10 = load double, double* %9
%11 = getelementptr inbounds double, double* %1, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %0, i64 3
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %1, i64 3
%16 = load double, double* %15
%17 = getelementptr inbounds double, double* %0, i64 4
%18 = load double, double* %17
%19 = getelementptr inbounds double, double* %1, i64 4
%20 = load double, double* %19
%21 = getelementptr inbounds double, double* %0, i64 5
%22 = load double, double* %21
%23 = getelementptr inbounds double, double* %1, i64 5
%24 = load double, double* %23
%25 = fmul double %18, %20
%26 = tail call double @llvm.fmuladd.f64(double %14, double %16, double %25)
%27 = fcmp ogt double %26, 0.000000e+00
%28 = select i1 %27, double 0.000000e+00, double %26
%29 = fmul double %22, %24
%30 = tail call double @llvm.fmuladd.f64(double %14, double %16, double %29)
%31 = fcmp olt double %28, %30
%32 = tail call double @llvm.fmuladd.f64(double %18, double %20, double %29)
br i1 %31, label %33, label %38
33: ; preds = %2
%34 = fcmp uge double %28, %32
%35 = or i1 %34, %27
%36 = select i1 %34, double %32, double 0.000000e+00
%37 = select i1 %35, double %36, double %26
br label %41
38: ; preds = %2
%39 = fcmp olt double %30, %32
br i1 %39, label %40, label %41
40: ; preds = %38
br label %41
41: ; preds = %33, %40, %38
%42 = phi double [ %32, %38 ], [ %30, %40 ], [ %37, %33 ]
%43 = fsub double %22, %24
%44 = fsub double %18, %20
%45 = fsub double %14, %16
%46 = fsub double %10, %12
%47 = fsub double %6, %8
%48 = fsub double %3, %4
%49 = tail call double @llvm.fmuladd.f64(double %48, double %48, double 0.000000e+00)
%50 = tail call double @llvm.fmuladd.f64(double %47, double %47, double %49)
%51 = tail call double @llvm.fmuladd.f64(double %46, double %46, double %50)
%52 = tail call double @llvm.fmuladd.f64(double %45, double %45, double %51)
%53 = tail call double @llvm.fmuladd.f64(double %44, double %44, double %52)
%54 = tail call double @llvm.fmuladd.f64(double %43, double %43, double %53)
%55 = tail call double @llvm.fmuladd.f64(double %42, double 4.000000e+00, double %54)
ret double %55
}