#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 dot(double *, double *);
int /*<<< orphan*/ vec_norm(double *);
void get_d1_d2(long m, long n, long *swapped, double **bp_xyz, double *d1,
               double *d2) {
  double dm[4], dn[4], zave[4], dorg[4];
  long i, idx1, idx2;
  for (i = 1; i <= 3; i++) {
    dorg[i] = bp_xyz[n][i] - bp_xyz[m][i];
    idx1 = swapped[m] ? 6 : 3;
    idx2 = swapped[m] ? 3 : 6;
    dm[i] = bp_xyz[m][i + idx1] - bp_xyz[m][i + idx2];
    idx1 = swapped[n] ? 6 : 3;
    idx2 = swapped[n] ? 3 : 6;
    dn[i] = bp_xyz[n][i + idx1] - bp_xyz[n][i + idx2];
  }
  vec_norm(dm);
  vec_norm(dn);
  *d1 = dot(dm, dn);
  if (*d1 < 0.0 && *d1 > -0.26) {
    *d1 = 1.0;
    *d2 = 3.4;
  } else {
    for (i = 1; i <= 3; i++)
      zave[i] = dm[i] + ((*d1 > 0.0) ? dn[i] : -dn[i]);
    vec_norm(zave);
    *d2 = dot(zave, dorg);
  }
}


x86 assembly (clang, -O0):
<get_d1_d2>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movq   $0x1,-0xb8(%rbp)
cmpq   $0x3,-0xb8(%rbp)
03
jg     12e1 <get_d1_d2+0x1c1>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0xb8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0xb8(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0xb8(%rbp),%rax
movsd  %xmm0,-0xb0(%rbp,%rax,8)
ff ff
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    $0x3,%eax
mov    $0x6,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
cltq
mov    %rax,-0xc0(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    $0x6,%eax
mov    $0x3,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
cltq
mov    %rax,-0xc8(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0xb8(%rbp),%rcx
add    -0xc0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0xb8(%rbp),%rcx
add    -0xc8(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0xb8(%rbp),%rax
movsd  %xmm0,-0x50(%rbp,%rax,8)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    $0x3,%eax
mov    $0x6,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
cltq
mov    %rax,-0xc0(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    $0x6,%eax
mov    $0x3,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
cltq
mov    %rax,-0xc8(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0xb8(%rbp),%rcx
add    -0xc0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0xb8(%rbp),%rcx
add    -0xc8(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0xb8(%rbp),%rax
movsd  %xmm0,-0x70(%rbp,%rax,8)
mov    -0xb8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xb8(%rbp)
jmp    114e <get_d1_d2+0x2e>
lea    -0x50(%rbp),%rdi
call   1040 <vec_norm@plt>
lea    -0x70(%rbp),%rdi
call   1040 <vec_norm@plt>
lea    -0x50(%rbp),%rdi
lea    -0x70(%rbp),%rsi
call   1030 <dot@plt>
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jbe    1358 <get_d1_d2+0x238>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xcd7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1358 <get_d1_d2+0x238>
mov    -0x28(%rbp),%rax
movsd  0xcd1(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
movsd  0xcb9(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    1443 <get_d1_d2+0x323>
movq   $0x1,-0xb8(%rbp)
cmpq   $0x3,-0xb8(%rbp)
03
jg     141c <get_d1_d2+0x2fc>
mov    -0xb8(%rbp),%rax
movsd  -0x50(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    13b5 <get_d1_d2+0x295>
mov    -0xb8(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    13e1 <get_d1_d2+0x2c1>
mov    -0xb8(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
movsd  -0xd8(%rbp),%xmm1
ff
addsd  %xmm1,%xmm0
mov    -0xb8(%rbp),%rax
movsd  %xmm0,-0x90(%rbp,%rax,8)
ff ff
mov    -0xb8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xb8(%rbp)
jmp    1363 <get_d1_d2+0x243>
lea    -0x90(%rbp),%rdi
call   1040 <vec_norm@plt>
lea    -0x90(%rbp),%rdi
lea    -0xb0(%rbp),%rsi
call   1030 <dot@plt>
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_d1_d2>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %r9,%r14
mov    %r8,%r15
mov    (%rcx,%rsi,8),%r9
mov    (%rcx,%rdi,8),%r8
lea    0x18(%r8),%rax
lea    0x30(%r8),%rcx
cmpq   $0x0,(%rdx,%rdi,8)
mov    %rcx,%rbx
cmove  %rax,%rbx
cmove  %rcx,%rax
lea    0x18(%r9),%rdi
lea    0x30(%r9),%rcx
cmpq   $0x0,(%rdx,%rsi,8)
movsd  0x8(%r9),%xmm0
subsd  0x8(%r8),%xmm0
movsd  %xmm0,0x48(%rsp)
movsd  0x8(%rbx),%xmm0
subsd  0x8(%rax),%xmm0
movsd  %xmm0,0x28(%rsp)
mov    %rcx,%rdx
cmove  %rdi,%rdx
cmove  %rcx,%rdi
movsd  0x8(%rdx),%xmm0
subsd  0x8(%rdi),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%r9),%xmm0
subsd  0x10(%r8),%xmm0
movsd  %xmm0,0x50(%rsp)
movsd  0x10(%rbx),%xmm0
subsd  0x10(%rax),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x10(%rdx),%xmm0
subsd  0x10(%rdi),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%r9),%xmm0
subsd  0x18(%r8),%xmm0
movsd  %xmm0,0x58(%rsp)
movsd  0x18(%rbx),%xmm0
subsd  0x18(%rax),%xmm0
movsd  %xmm0,0x38(%rsp)
movsd  0x18(%rdx),%xmm0
subsd  0x18(%rdi),%xmm0
movsd  %xmm0,0x18(%rsp)
lea    0x20(%rsp),%r12
mov    %r12,%rdi
call   1040 <vec_norm@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <vec_norm@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1030 <dot@plt>
movsd  %xmm0,(%r15)
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    1258 <get_d1_d2+0x138>
ucomisd 0xdc4(%rip),%xmm0
jbe    1258 <get_d1_d2+0x138>
movabs $0x3ff0000000000000,%rax
mov    %rax,(%r15)
movsd  0xdb5(%rip),%xmm0
jmp    12dc <get_d1_d2+0x1bc>
ucomisd %xmm1,%xmm0
movsd  0x28(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
jbe    128e <get_d1_d2+0x16e>
movhpd 0x30(%rsp),%xmm0
movhpd 0x10(%rsp),%xmm1
addpd  %xmm0,%xmm1
movupd %xmm1,0x68(%rsp)
movsd  0x38(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
jmp    12b8 <get_d1_d2+0x198>
movhpd 0x30(%rsp),%xmm0
movhpd 0x10(%rsp),%xmm1
subpd  %xmm1,%xmm0
movupd %xmm0,0x68(%rsp)
movsd  0x38(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
xorpd  0xd58(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x78(%rsp)
lea    0x60(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <vec_norm@plt>
lea    0x40(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <dot@plt>
movsd  %xmm0,(%r14)
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @get_d1_d2(i64 %0, i64 %1, i64* nocapture %2, double** nocapture %3, double* nocapture %4, double* nocapture writeonly %5) {
%7 = alloca [4 x double]
%8 = alloca [4 x double]
%9 = alloca [4 x double]
%10 = alloca [4 x double]
%11 = bitcast [4 x double]* %7 to i8*
%12 = bitcast [4 x double]* %8 to i8*
%13 = bitcast [4 x double]* %9 to i8*
%14 = bitcast [4 x double]* %10 to i8*
%15 = getelementptr inbounds double*, double** %3, i64 %1
%16 = load double*, double** %15
%17 = getelementptr inbounds double*, double** %3, i64 %0
%18 = load double*, double** %17
%19 = getelementptr inbounds i64, i64* %2, i64 %0
%20 = load i64, i64* %19
%21 = icmp eq i64 %20, 0
%22 = select i1 %21, i64 3, i64 6
%23 = select i1 %21, i64 6, i64 3
%24 = getelementptr inbounds i64, i64* %2, i64 %1
%25 = load i64, i64* %24
%26 = icmp eq i64 %25, 0
%27 = select i1 %26, i64 3, i64 6
%28 = select i1 %26, i64 6, i64 3
%29 = getelementptr inbounds double, double* %16, i64 1
%30 = load double, double* %29
%31 = getelementptr inbounds double, double* %18, i64 1
%32 = load double, double* %31
%33 = fsub double %30, %32
%34 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 1
store double %33, double* %34
%35 = add nuw nsw i64 %22, 1
%36 = getelementptr inbounds double, double* %18, i64 %35
%37 = load double, double* %36
%38 = add nuw nsw i64 %23, 1
%39 = getelementptr inbounds double, double* %18, i64 %38
%40 = load double, double* %39
%41 = fsub double %37, %40
%42 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 1
store double %41, double* %42
%43 = add nuw nsw i64 %27, 1
%44 = getelementptr inbounds double, double* %16, i64 %43
%45 = load double, double* %44
%46 = add nuw nsw i64 %28, 1
%47 = getelementptr inbounds double, double* %16, i64 %46
%48 = load double, double* %47
%49 = fsub double %45, %48
%50 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 1
store double %49, double* %50
%51 = getelementptr inbounds double, double* %16, i64 2
%52 = load double, double* %51
%53 = getelementptr inbounds double, double* %18, i64 2
%54 = load double, double* %53
%55 = fsub double %52, %54
%56 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 2
store double %55, double* %56
%57 = add nuw nsw i64 %22, 2
%58 = getelementptr inbounds double, double* %18, i64 %57
%59 = load double, double* %58
%60 = add nuw nsw i64 %23, 2
%61 = getelementptr inbounds double, double* %18, i64 %60
%62 = load double, double* %61
%63 = fsub double %59, %62
%64 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 2
store double %63, double* %64
%65 = add nuw nsw i64 %27, 2
%66 = getelementptr inbounds double, double* %16, i64 %65
%67 = load double, double* %66
%68 = add nuw nsw i64 %28, 2
%69 = getelementptr inbounds double, double* %16, i64 %68
%70 = load double, double* %69
%71 = fsub double %67, %70
%72 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 2
store double %71, double* %72
%73 = getelementptr inbounds double, double* %16, i64 3
%74 = load double, double* %73
%75 = getelementptr inbounds double, double* %18, i64 3
%76 = load double, double* %75
%77 = fsub double %74, %76
%78 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 3
store double %77, double* %78
%79 = add nuw nsw i64 %22, 3
%80 = getelementptr inbounds double, double* %18, i64 %79
%81 = load double, double* %80
%82 = add nuw nsw i64 %23, 3
%83 = getelementptr inbounds double, double* %18, i64 %82
%84 = load double, double* %83
%85 = fsub double %81, %84
%86 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 3
store double %85, double* %86
%87 = add nuw nsw i64 %27, 3
%88 = getelementptr inbounds double, double* %16, i64 %87
%89 = load double, double* %88
%90 = add nuw nsw i64 %28, 3
%91 = getelementptr inbounds double, double* %16, i64 %90
%92 = load double, double* %91
%93 = fsub double %89, %92
%94 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 3
store double %93, double* %94
%95 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 0
%96 = call i32 @vec_norm(double* %95)
%97 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 0
%98 = call i32 @vec_norm(double* %97)
%99 = call double @dot(double* %95, double* %97)
store double %99, double* %4
%100 = fcmp olt double %99, 0.000000e+00
%101 = fcmp ogt double %99, -2.600000e-01
%102 = and i1 %100, %101
br i1 %102, label %107, label %103
103: ; preds = %6
%104 = fcmp ogt double %99, 0.000000e+00
%105 = load double, double* %42
%106 = load double, double* %50
br i1 %104, label %121, label %108
107: ; preds = %6
store double 1.000000e+00, double* %4
br label %142
108: ; preds = %103
%109 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 1
%110 = load double, double* %64
%111 = load double, double* %72
%112 = insertelement <2 x double> poison, double %105, i64 0
%113 = insertelement <2 x double> %112, double %110, i64 1
%114 = insertelement <2 x double> poison, double %106, i64 0
%115 = insertelement <2 x double> %114, double %111, i64 1
%116 = fsub <2 x double> %113, %115
%117 = bitcast double* %109 to <2 x double>*
store <2 x double> %116, <2 x double>* %117
%118 = load double, double* %86
%119 = load double, double* %94
%120 = fneg double %119
br label %133
121: ; preds = %103
%122 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 1
%123 = load double, double* %64
%124 = load double, double* %72
%125 = insertelement <2 x double> poison, double %105, i64 0
%126 = insertelement <2 x double> %125, double %123, i64 1
%127 = insertelement <2 x double> poison, double %106, i64 0
%128 = insertelement <2 x double> %127, double %124, i64 1
%129 = fadd <2 x double> %126, %128
%130 = bitcast double* %122 to <2 x double>*
store <2 x double> %129, <2 x double>* %130
%131 = load double, double* %86
%132 = load double, double* %94
br label %133
133: ; preds = %121, %108
%134 = phi double [ %131, %121 ], [ %118, %108 ]
%135 = phi double [ %132, %121 ], [ %120, %108 ]
%136 = fadd double %134, %135
%137 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 3
store double %136, double* %137
%138 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 0
%139 = call i32 @vec_norm(double* %138)
%140 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 0
%141 = call double @dot(double* %138, double* %140)
br label %142
142: ; preds = %133, %107
%143 = phi double [ %141, %133 ], [ 3.400000e+00, %107 ]
store double %143, double* %5
ret void
}