; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Shapes/R3Mesh.ll (ZNK6R3Mesh13PrincipleAxesEPK7R3PointPd)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.R3Triad = type { [3 x %class.R3Vector] }
%class.R3Vector = type { [3 x double] }
%class.R3Point = type { [3 x double] }

@.str = external hidden unnamed_addr constant [41 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [88 x i8], align 1
@R3xyz_triad = external global %class.R3Triad, align 8
@RN_BIG_EPSILON = external global double, align 8
@.str.6 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [47 x i8], align 1

declare void @_Z7RNAbortPKcz(ptr noundef, ...) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272)) #1 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272), i32 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) #3 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6R3Mesh8CentroidEv(ptr dead_on_unwind noalias writable sret(%class.R3Point) align 8, ptr noundef nonnull align 8 dereferenceable(272)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK6R3Mesh8FaceAreaEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6R3Mesh12FaceCentroidEPK10R3MeshFace(ptr dead_on_unwind noalias writable sret(%class.R3Point) align 8, ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) #4 align 2

declare void @_ZN7R3PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK6R3Mesh13PrincipleAxesEPK7R3PointPd(ptr dead_on_unwind noalias writable sret(%class.R3Triad) align 8 %0, ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %2, ptr noundef %3) #4 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %class.R3Point, align 8
  %10 = alloca double, align 8
  %11 = alloca [9 x double], align 16
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca double, align 8
  %15 = alloca %class.R3Point, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca %class.R3Point, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca [9 x double], align 16
  %28 = alloca [3 x double], align 16
  %29 = alloca [9 x double], align 16
  %30 = alloca [3 x %class.R3Vector], align 16
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca [3 x i32], align 4
  %34 = alloca [3 x i32], align 4
  %35 = alloca i32, align 4
  %36 = alloca ptr, align 8
  %37 = alloca %class.R3Vector, align 8
  %38 = alloca i32, align 4
  %39 = alloca double, align 8
  %40 = alloca i32, align 4
  %41 = alloca %class.R3Vector, align 8
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %42 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #7
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %45, label %47

45:                                               ; preds = %4
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN7R3PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %46)
  br label %48

47:                                               ; preds = %4
  call void @_ZNK6R3Mesh8CentroidEv(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %9, ptr noundef nonnull align 8 dereferenceable(272) %42)
  br label %48

48:                                               ; preds = %47, %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store double 0.000000e+00, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 72, ptr %11) #7
  call void @llvm.memset.p0.i64(ptr align 16 %11, i8 0, i64 72, i1 false)
  %49 = call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %42)
  %50 = icmp sgt i32 %49, 0
  br i1 %50, label %51, label %148

51:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !11
  br label %52

52:                                               ; preds = %144, %51
  %53 = load i32, ptr %12, align 4, !tbaa !11
  %54 = call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %42)
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %147

57:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %58 = load i32, ptr %12, align 4, !tbaa !11
  %59 = call noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272) %42, i32 noundef %58)
  store ptr %59, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %60 = load ptr, ptr %13, align 8, !tbaa !5
  %61 = call noundef double @_ZNK6R3Mesh8FaceAreaEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %42, ptr noundef %60)
  store double %61, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #7
  %62 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZNK6R3Mesh12FaceCentroidEPK10R3MeshFace(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %15, ptr noundef nonnull align 8 dereferenceable(272) %42, ptr noundef %62)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 0)
  %64 = load double, ptr %63, align 8, !tbaa !9
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef 0)
  %66 = load double, ptr %65, align 8, !tbaa !9
  %67 = fsub double %64, %66
  store double %67, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 1)
  %69 = load double, ptr %68, align 8, !tbaa !9
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef 1)
  %71 = load double, ptr %70, align 8, !tbaa !9
  %72 = fsub double %69, %71
  store double %72, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 2)
  %74 = load double, ptr %73, align 8, !tbaa !9
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef 2)
  %76 = load double, ptr %75, align 8, !tbaa !9
  %77 = fsub double %74, %76
  store double %77, ptr %18, align 8, !tbaa !9
  %78 = load double, ptr %14, align 8, !tbaa !9
  %79 = load double, ptr %16, align 8, !tbaa !9
  %80 = fmul double %78, %79
  %81 = load double, ptr %16, align 8, !tbaa !9
  %82 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 0
  %83 = load double, ptr %82, align 16, !tbaa !9
  %84 = call double @llvm.fmuladd.f64(double %80, double %81, double %83)
  store double %84, ptr %82, align 16, !tbaa !9
  %85 = load double, ptr %14, align 8, !tbaa !9
  %86 = load double, ptr %17, align 8, !tbaa !9
  %87 = fmul double %85, %86
  %88 = load double, ptr %17, align 8, !tbaa !9
  %89 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 4
  %90 = load double, ptr %89, align 16, !tbaa !9
  %91 = call double @llvm.fmuladd.f64(double %87, double %88, double %90)
  store double %91, ptr %89, align 16, !tbaa !9
  %92 = load double, ptr %14, align 8, !tbaa !9
  %93 = load double, ptr %18, align 8, !tbaa !9
  %94 = fmul double %92, %93
  %95 = load double, ptr %18, align 8, !tbaa !9
  %96 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 8
  %97 = load double, ptr %96, align 16, !tbaa !9
  %98 = call double @llvm.fmuladd.f64(double %94, double %95, double %97)
  store double %98, ptr %96, align 16, !tbaa !9
  %99 = load double, ptr %14, align 8, !tbaa !9
  %100 = load double, ptr %16, align 8, !tbaa !9
  %101 = fmul double %99, %100
  %102 = load double, ptr %17, align 8, !tbaa !9
  %103 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 1
  %104 = load double, ptr %103, align 8, !tbaa !9
  %105 = call double @llvm.fmuladd.f64(double %101, double %102, double %104)
  store double %105, ptr %103, align 8, !tbaa !9
  %106 = load double, ptr %14, align 8, !tbaa !9
  %107 = load double, ptr %16, align 8, !tbaa !9
  %108 = fmul double %106, %107
  %109 = load double, ptr %17, align 8, !tbaa !9
  %110 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 3
  %111 = load double, ptr %110, align 8, !tbaa !9
  %112 = call double @llvm.fmuladd.f64(double %108, double %109, double %111)
  store double %112, ptr %110, align 8, !tbaa !9
  %113 = load double, ptr %14, align 8, !tbaa !9
  %114 = load double, ptr %16, align 8, !tbaa !9
  %115 = fmul double %113, %114
  %116 = load double, ptr %18, align 8, !tbaa !9
  %117 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 2
  %118 = load double, ptr %117, align 16, !tbaa !9
  %119 = call double @llvm.fmuladd.f64(double %115, double %116, double %118)
  store double %119, ptr %117, align 16, !tbaa !9
  %120 = load double, ptr %14, align 8, !tbaa !9
  %121 = load double, ptr %16, align 8, !tbaa !9
  %122 = fmul double %120, %121
  %123 = load double, ptr %18, align 8, !tbaa !9
  %124 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 6
  %125 = load double, ptr %124, align 16, !tbaa !9
  %126 = call double @llvm.fmuladd.f64(double %122, double %123, double %125)
  store double %126, ptr %124, align 16, !tbaa !9
  %127 = load double, ptr %14, align 8, !tbaa !9
  %128 = load double, ptr %17, align 8, !tbaa !9
  %129 = fmul double %127, %128
  %130 = load double, ptr %18, align 8, !tbaa !9
  %131 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 5
  %132 = load double, ptr %131, align 8, !tbaa !9
  %133 = call double @llvm.fmuladd.f64(double %129, double %130, double %132)
  store double %133, ptr %131, align 8, !tbaa !9
  %134 = load double, ptr %14, align 8, !tbaa !9
  %135 = load double, ptr %17, align 8, !tbaa !9
  %136 = fmul double %134, %135
  %137 = load double, ptr %18, align 8, !tbaa !9
  %138 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 7
  %139 = load double, ptr %138, align 8, !tbaa !9
  %140 = call double @llvm.fmuladd.f64(double %136, double %137, double %139)
  store double %140, ptr %138, align 8, !tbaa !9
  %141 = load double, ptr %14, align 8, !tbaa !9
  %142 = load double, ptr %10, align 8, !tbaa !9
  %143 = fadd double %142, %141
  store double %143, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %144

144:                                              ; preds = %57
  %145 = load i32, ptr %12, align 4, !tbaa !11
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %12, align 4, !tbaa !11
  br label %52, !llvm.loop !13

147:                                              ; preds = %56
  br label %225

148:                                              ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !11
  br label %149

149:                                              ; preds = %221, %148
  %150 = load i32, ptr %19, align 4, !tbaa !11
  %151 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %42)
  %152 = icmp slt i32 %150, %151
  br i1 %152, label %154, label %153

153:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %224

154:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %155 = load i32, ptr %19, align 4, !tbaa !11
  %156 = call noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272) %42, i32 noundef %155)
  store ptr %156, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #7
  %157 = load ptr, ptr %20, align 8, !tbaa !5
  %158 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %42, ptr noundef %157)
  call void @_ZN7R3PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 8 dereferenceable(24) %158)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %159 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %21, i32 noundef 0)
  %160 = load double, ptr %159, align 8, !tbaa !9
  %161 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef 0)
  %162 = load double, ptr %161, align 8, !tbaa !9
  %163 = fsub double %160, %162
  store double %163, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %164 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %21, i32 noundef 1)
  %165 = load double, ptr %164, align 8, !tbaa !9
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef 1)
  %167 = load double, ptr %166, align 8, !tbaa !9
  %168 = fsub double %165, %167
  store double %168, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %169 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %21, i32 noundef 2)
  %170 = load double, ptr %169, align 8, !tbaa !9
  %171 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef 2)
  %172 = load double, ptr %171, align 8, !tbaa !9
  %173 = fsub double %170, %172
  store double %173, ptr %24, align 8, !tbaa !9
  %174 = load double, ptr %22, align 8, !tbaa !9
  %175 = load double, ptr %22, align 8, !tbaa !9
  %176 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 0
  %177 = load double, ptr %176, align 16, !tbaa !9
  %178 = call double @llvm.fmuladd.f64(double %174, double %175, double %177)
  store double %178, ptr %176, align 16, !tbaa !9
  %179 = load double, ptr %23, align 8, !tbaa !9
  %180 = load double, ptr %23, align 8, !tbaa !9
  %181 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 4
  %182 = load double, ptr %181, align 16, !tbaa !9
  %183 = call double @llvm.fmuladd.f64(double %179, double %180, double %182)
  store double %183, ptr %181, align 16, !tbaa !9
  %184 = load double, ptr %24, align 8, !tbaa !9
  %185 = load double, ptr %24, align 8, !tbaa !9
  %186 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 8
  %187 = load double, ptr %186, align 16, !tbaa !9
  %188 = call double @llvm.fmuladd.f64(double %184, double %185, double %187)
  store double %188, ptr %186, align 16, !tbaa !9
  %189 = load double, ptr %22, align 8, !tbaa !9
  %190 = load double, ptr %23, align 8, !tbaa !9
  %191 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 1
  %192 = load double, ptr %191, align 8, !tbaa !9
  %193 = call double @llvm.fmuladd.f64(double %189, double %190, double %192)
  store double %193, ptr %191, align 8, !tbaa !9
  %194 = load double, ptr %22, align 8, !tbaa !9
  %195 = load double, ptr %23, align 8, !tbaa !9
  %196 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 3
  %197 = load double, ptr %196, align 8, !tbaa !9
  %198 = call double @llvm.fmuladd.f64(double %194, double %195, double %197)
  store double %198, ptr %196, align 8, !tbaa !9
  %199 = load double, ptr %22, align 8, !tbaa !9
  %200 = load double, ptr %24, align 8, !tbaa !9
  %201 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 2
  %202 = load double, ptr %201, align 16, !tbaa !9
  %203 = call double @llvm.fmuladd.f64(double %199, double %200, double %202)
  store double %203, ptr %201, align 16, !tbaa !9
  %204 = load double, ptr %22, align 8, !tbaa !9
  %205 = load double, ptr %24, align 8, !tbaa !9
  %206 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 6
  %207 = load double, ptr %206, align 16, !tbaa !9
  %208 = call double @llvm.fmuladd.f64(double %204, double %205, double %207)
  store double %208, ptr %206, align 16, !tbaa !9
  %209 = load double, ptr %23, align 8, !tbaa !9
  %210 = load double, ptr %24, align 8, !tbaa !9
  %211 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 5
  %212 = load double, ptr %211, align 8, !tbaa !9
  %213 = call double @llvm.fmuladd.f64(double %209, double %210, double %212)
  store double %213, ptr %211, align 8, !tbaa !9
  %214 = load double, ptr %23, align 8, !tbaa !9
  %215 = load double, ptr %24, align 8, !tbaa !9
  %216 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 7
  %217 = load double, ptr %216, align 8, !tbaa !9
  %218 = call double @llvm.fmuladd.f64(double %214, double %215, double %217)
  store double %218, ptr %216, align 8, !tbaa !9
  %219 = load double, ptr %10, align 8, !tbaa !9
  %220 = fadd double %219, 1.000000e+00
  store double %220, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %221

221:                                              ; preds = %154
  %222 = load i32, ptr %19, align 4, !tbaa !11
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %19, align 4, !tbaa !11
  br label %149, !llvm.loop !15

224:                                              ; preds = %153
  br label %225

225:                                              ; preds = %224, %147
  %226 = load double, ptr %10, align 8, !tbaa !9
  %227 = fcmp oeq double %226, 0.000000e+00
  br i1 %227, label %228, label %229

228:                                              ; preds = %225
  call void @_ZN7R3TriadC1ERKS_(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(72) @R3xyz_triad)
  store i32 1, ptr %25, align 4
  br label %419

229:                                              ; preds = %225
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 0, ptr %26, align 4, !tbaa !11
  br label %230

230:                                              ; preds = %241, %229
  %231 = load i32, ptr %26, align 4, !tbaa !11
  %232 = icmp slt i32 %231, 9
  br i1 %232, label %234, label %233

233:                                              ; preds = %230
  store i32 8, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %244

234:                                              ; preds = %230
  %235 = load double, ptr %10, align 8, !tbaa !9
  %236 = load i32, ptr %26, align 4, !tbaa !11
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 %237
  %239 = load double, ptr %238, align 8, !tbaa !9
  %240 = fdiv double %239, %235
  store double %240, ptr %238, align 8, !tbaa !9
  br label %241

241:                                              ; preds = %234
  %242 = load i32, ptr %26, align 4, !tbaa !11
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %26, align 4, !tbaa !11
  br label %230, !llvm.loop !16

244:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 72, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #7
  call void @llvm.lifetime.start.p0(i64 72, ptr %29) #7
  %245 = getelementptr inbounds [9 x double], ptr %11, i64 0, i64 0
  %246 = getelementptr inbounds [9 x double], ptr %27, i64 0, i64 0
  %247 = getelementptr inbounds [3 x double], ptr %28, i64 0, i64 0
  %248 = getelementptr inbounds [9 x double], ptr %29, i64 0, i64 0
  call void @_Z14RNSvdDecomposeiiPKdPdS1_S1_(i32 noundef 3, i32 noundef 3, ptr noundef %245, ptr noundef %246, ptr noundef %247, ptr noundef %248)
  call void @llvm.lifetime.start.p0(i64 72, ptr %30) #7
  %249 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i32 0, i32 0
  %250 = getelementptr inbounds %class.R3Vector, ptr %249, i64 3
  br label %251

251:                                              ; preds = %251, %244
  %252 = phi ptr [ %249, %244 ], [ %253, %251 ]
  call void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %252)
  %253 = getelementptr inbounds %class.R3Vector, ptr %252, i64 1
  %254 = icmp eq ptr %253, %250
  br i1 %254, label %255, label %251

255:                                              ; preds = %251
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  store i32 0, ptr %31, align 4, !tbaa !11
  br label %256

256:                                              ; preds = %282, %255
  %257 = load i32, ptr %31, align 4, !tbaa !11
  %258 = icmp slt i32 %257, 3
  br i1 %258, label %260, label %259

259:                                              ; preds = %256
  store i32 11, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %285

260:                                              ; preds = %256
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  store i32 0, ptr %32, align 4, !tbaa !11
  br label %261

261:                                              ; preds = %278, %260
  %262 = load i32, ptr %32, align 4, !tbaa !11
  %263 = icmp slt i32 %262, 3
  br i1 %263, label %265, label %264

264:                                              ; preds = %261
  store i32 14, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %281

265:                                              ; preds = %261
  %266 = load i32, ptr %31, align 4, !tbaa !11
  %267 = mul nsw i32 3, %266
  %268 = load i32, ptr %32, align 4, !tbaa !11
  %269 = add nsw i32 %267, %268
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [9 x double], ptr %29, i64 0, i64 %270
  %272 = load double, ptr %271, align 8, !tbaa !9
  %273 = load i32, ptr %31, align 4, !tbaa !11
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i64 0, i64 %274
  %276 = load i32, ptr %32, align 4, !tbaa !11
  %277 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R3VectorixEi(ptr noundef nonnull align 8 dereferenceable(24) %275, i32 noundef %276)
  store double %272, ptr %277, align 8, !tbaa !9
  br label %278

278:                                              ; preds = %265
  %279 = load i32, ptr %32, align 4, !tbaa !11
  %280 = add nsw i32 %279, 1
  store i32 %280, ptr %32, align 4, !tbaa !11
  br label %261, !llvm.loop !17

281:                                              ; preds = %264
  br label %282

282:                                              ; preds = %281
  %283 = load i32, ptr %31, align 4, !tbaa !11
  %284 = add nsw i32 %283, 1
  store i32 %284, ptr %31, align 4, !tbaa !11
  br label %256, !llvm.loop !18

285:                                              ; preds = %259
  call void @llvm.lifetime.start.p0(i64 12, ptr %33) #7
  call void @llvm.memset.p0.i64(ptr align 4 %33, i8 0, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %34) #7
  call void @llvm.memset.p0.i64(ptr align 4 %34, i8 0, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  store i32 0, ptr %35, align 4, !tbaa !11
  br label %286

286:                                              ; preds = %324, %285
  %287 = load i32, ptr %35, align 4, !tbaa !11
  %288 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %42)
  %289 = icmp slt i32 %287, %288
  br i1 %289, label %291, label %290

290:                                              ; preds = %286
  store i32 17, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  br label %327

291:                                              ; preds = %286
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #7
  %292 = load i32, ptr %35, align 4, !tbaa !11
  %293 = call noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272) %42, i32 noundef %292)
  store ptr %293, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %37) #7
  %294 = load ptr, ptr %36, align 8, !tbaa !5
  %295 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %42, ptr noundef %294)
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %37, ptr noundef nonnull align 8 dereferenceable(24) %295, ptr noundef nonnull align 8 dereferenceable(24) %9)
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #7
  store i32 0, ptr %38, align 4, !tbaa !11
  br label %296

296:                                              ; preds = %320, %291
  %297 = load i32, ptr %38, align 4, !tbaa !11
  %298 = icmp slt i32 %297, 2
  br i1 %298, label %300, label %299

299:                                              ; preds = %296
  store i32 20, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #7
  br label %323

300:                                              ; preds = %296
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  %301 = load i32, ptr %38, align 4, !tbaa !11
  %302 = sext i32 %301 to i64
  %303 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i64 0, i64 %302
  %304 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %303, ptr noundef nonnull align 8 dereferenceable(24) %37)
  store double %304, ptr %39, align 8, !tbaa !9
  %305 = load double, ptr %39, align 8, !tbaa !9
  %306 = fcmp ogt double %305, 0.000000e+00
  br i1 %306, label %307, label %313

307:                                              ; preds = %300
  %308 = load i32, ptr %38, align 4, !tbaa !11
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds [3 x i32], ptr %33, i64 0, i64 %309
  %311 = load i32, ptr %310, align 4, !tbaa !11
  %312 = add nsw i32 %311, 1
  store i32 %312, ptr %310, align 4, !tbaa !11
  br label %319

313:                                              ; preds = %300
  %314 = load i32, ptr %38, align 4, !tbaa !11
  %315 = sext i32 %314 to i64
  %316 = getelementptr inbounds [3 x i32], ptr %34, i64 0, i64 %315
  %317 = load i32, ptr %316, align 4, !tbaa !11
  %318 = add nsw i32 %317, 1
  store i32 %318, ptr %316, align 4, !tbaa !11
  br label %319

319:                                              ; preds = %313, %307
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  br label %320

320:                                              ; preds = %319
  %321 = load i32, ptr %38, align 4, !tbaa !11
  %322 = add nsw i32 %321, 1
  store i32 %322, ptr %38, align 4, !tbaa !11
  br label %296, !llvm.loop !19

323:                                              ; preds = %299
  call void @llvm.lifetime.end.p0(i64 24, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  br label %324

324:                                              ; preds = %323
  %325 = load i32, ptr %35, align 4, !tbaa !11
  %326 = add nsw i32 %325, 1
  store i32 %326, ptr %35, align 4, !tbaa !11
  br label %286, !llvm.loop !20

327:                                              ; preds = %290
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #7
  store i32 0, ptr %40, align 4, !tbaa !11
  br label %328

328:                                              ; preds = %347, %327
  %329 = load i32, ptr %40, align 4, !tbaa !11
  %330 = icmp slt i32 %329, 2
  br i1 %330, label %332, label %331

331:                                              ; preds = %328
  store i32 23, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #7
  br label %350

332:                                              ; preds = %328
  %333 = load i32, ptr %40, align 4, !tbaa !11
  %334 = sext i32 %333 to i64
  %335 = getelementptr inbounds [3 x i32], ptr %33, i64 0, i64 %334
  %336 = load i32, ptr %335, align 4, !tbaa !11
  %337 = load i32, ptr %40, align 4, !tbaa !11
  %338 = sext i32 %337 to i64
  %339 = getelementptr inbounds [3 x i32], ptr %34, i64 0, i64 %338
  %340 = load i32, ptr %339, align 4, !tbaa !11
  %341 = icmp slt i32 %336, %340
  br i1 %341, label %342, label %346

342:                                              ; preds = %332
  %343 = load i32, ptr %40, align 4, !tbaa !11
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i64 0, i64 %344
  call void @_ZN8R3Vector4FlipEv(ptr noundef nonnull align 8 dereferenceable(24) %345)
  br label %346

346:                                              ; preds = %342, %332
  br label %347

347:                                              ; preds = %346
  %348 = load i32, ptr %40, align 4, !tbaa !11
  %349 = add nsw i32 %348, 1
  store i32 %349, ptr %40, align 4, !tbaa !11
  br label %328, !llvm.loop !21

350:                                              ; preds = %331
  call void @llvm.lifetime.start.p0(i64 24, ptr %41) #7
  %351 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i64 0, i64 0
  %352 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i64 0, i64 1
  call void @_ZrmRK8R3VectorS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %41, ptr noundef nonnull align 8 dereferenceable(24) %351, ptr noundef nonnull align 8 dereferenceable(24) %352)
  %353 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i64 0, i64 2
  %354 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %353, ptr noundef nonnull align 8 dereferenceable(24) %41)
  call void @llvm.lifetime.end.p0(i64 24, ptr %41) #7
  %355 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i64 0, i64 0
  %356 = call noundef double @_ZNK8R3Vector6LengthEv(ptr noundef nonnull align 8 dereferenceable(24) %355)
  %357 = load double, ptr @RN_BIG_EPSILON, align 8, !tbaa !9
  %358 = call noundef i32 @_Z9RNIsEqualddd(double noundef %356, double noundef 1.000000e+00, double noundef %357)
  %359 = icmp ne i32 %358, 0
  br i1 %359, label %361, label %360

360:                                              ; preds = %350
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.6, i32 noundef 308, ptr noundef @.str.2)
  br label %361

361:                                              ; preds = %360, %350
  %362 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i64 0, i64 1
  %363 = call noundef double @_ZNK8R3Vector6LengthEv(ptr noundef nonnull align 8 dereferenceable(24) %362)
  %364 = load double, ptr @RN_BIG_EPSILON, align 8, !tbaa !9
  %365 = call noundef i32 @_Z9RNIsEqualddd(double noundef %363, double noundef 1.000000e+00, double noundef %364)
  %366 = icmp ne i32 %365, 0
  br i1 %366, label %368, label %367

367:                                              ; preds = %361
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.7, i32 noundef 309, ptr noundef @.str.2)
  br label %368

368:                                              ; preds = %367, %361
  %369 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i64 0, i64 2
  %370 = call noundef double @_ZNK8R3Vector6LengthEv(ptr noundef nonnull align 8 dereferenceable(24) %369)
  %371 = load double, ptr @RN_BIG_EPSILON, align 8, !tbaa !9
  %372 = call noundef i32 @_Z9RNIsEqualddd(double noundef %370, double noundef 1.000000e+00, double noundef %371)
  %373 = icmp ne i32 %372, 0
  br i1 %373, label %375, label %374

374:                                              ; preds = %368
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.8, i32 noundef 310, ptr noundef @.str.2)
  br label %375

375:                                              ; preds = %374, %368
  %376 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i64 0, i64 0
  %377 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i64 0, i64 1
  %378 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %376, ptr noundef nonnull align 8 dereferenceable(24) %377)
  %379 = load double, ptr @RN_BIG_EPSILON, align 8, !tbaa !9
  %380 = call noundef i32 @_Z8RNIsZerodd(double noundef %378, double noundef %379)
  %381 = icmp ne i32 %380, 0
  br i1 %381, label %383, label %382

382:                                              ; preds = %375
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.9, i32 noundef 311, ptr noundef @.str.2)
  br label %383

383:                                              ; preds = %382, %375
  %384 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i64 0, i64 1
  %385 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i64 0, i64 2
  %386 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %384, ptr noundef nonnull align 8 dereferenceable(24) %385)
  %387 = load double, ptr @RN_BIG_EPSILON, align 8, !tbaa !9
  %388 = call noundef i32 @_Z8RNIsZerodd(double noundef %386, double noundef %387)
  %389 = icmp ne i32 %388, 0
  br i1 %389, label %391, label %390

390:                                              ; preds = %383
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.10, i32 noundef 312, ptr noundef @.str.2)
  br label %391

391:                                              ; preds = %390, %383
  %392 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i64 0, i64 0
  %393 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i64 0, i64 2
  %394 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %392, ptr noundef nonnull align 8 dereferenceable(24) %393)
  %395 = load double, ptr @RN_BIG_EPSILON, align 8, !tbaa !9
  %396 = call noundef i32 @_Z8RNIsZerodd(double noundef %394, double noundef %395)
  %397 = icmp ne i32 %396, 0
  br i1 %397, label %399, label %398

398:                                              ; preds = %391
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.11, i32 noundef 313, ptr noundef @.str.2)
  br label %399

399:                                              ; preds = %398, %391
  %400 = load ptr, ptr %8, align 8, !tbaa !5
  %401 = icmp ne ptr %400, null
  br i1 %401, label %402, label %415

402:                                              ; preds = %399
  %403 = getelementptr inbounds [3 x double], ptr %28, i64 0, i64 0
  %404 = load double, ptr %403, align 16, !tbaa !9
  %405 = load ptr, ptr %8, align 8, !tbaa !5
  %406 = getelementptr inbounds double, ptr %405, i64 0
  store double %404, ptr %406, align 8, !tbaa !9
  %407 = getelementptr inbounds [3 x double], ptr %28, i64 0, i64 1
  %408 = load double, ptr %407, align 8, !tbaa !9
  %409 = load ptr, ptr %8, align 8, !tbaa !5
  %410 = getelementptr inbounds double, ptr %409, i64 1
  store double %408, ptr %410, align 8, !tbaa !9
  %411 = getelementptr inbounds [3 x double], ptr %28, i64 0, i64 2
  %412 = load double, ptr %411, align 16, !tbaa !9
  %413 = load ptr, ptr %8, align 8, !tbaa !5
  %414 = getelementptr inbounds double, ptr %413, i64 2
  store double %412, ptr %414, align 8, !tbaa !9
  br label %415

415:                                              ; preds = %402, %399
  %416 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i64 0, i64 0
  %417 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i64 0, i64 1
  %418 = getelementptr inbounds [3 x %class.R3Vector], ptr %30, i64 0, i64 2
  call void @_ZN7R3TriadC1ERK8R3VectorS2_S2_(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(24) %416, ptr noundef nonnull align 8 dereferenceable(24) %417, ptr noundef nonnull align 8 dereferenceable(24) %418)
  store i32 1, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %27) #7
  br label %419

419:                                              ; preds = %415, %228
  call void @llvm.lifetime.end.p0(i64 72, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #1 align 2

declare void @_ZN7R3TriadC1ERKS_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #0

declare void @_Z14RNSvdDecomposeiiPKdPdS1_S1_(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

declare void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R3VectorixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #1 align 2

declare void @_ZmiRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0

declare noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0

declare void @_ZN8R3Vector4FlipEv(ptr noundef nonnull align 8 dereferenceable(24)) #0

declare void @_ZrmRK8R3VectorS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z9RNIsEqualddd(double noundef, double noundef, double noundef) #1

declare noundef double @_ZNK8R3Vector6LengthEv(ptr noundef nonnull align 8 dereferenceable(24)) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z8RNIsZerodd(double noundef, double noundef) #1

declare void @_ZN7R3TriadC1ERK8R3VectorS2_S2_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.R3Triad = type { [3 x %class.R3Vector] }
%class.R3Vector = type { [3 x double] }
%class.R3Point = type { [3 x double] }

@.str = external hidden unnamed_addr constant [41 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [88 x i8], align 1
@R3xyz_triad = external global %class.R3Triad, align 8
@RN_BIG_EPSILON = external local_unnamed_addr global double, align 8
@.str.6 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [47 x i8], align 1

declare void @_Z7RNAbortPKcz(ptr noundef, ...) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6R3Mesh8CentroidEv(ptr dead_on_unwind noalias writable sret(%class.R3Point) align 8, ptr noundef nonnull align 8 dereferenceable(272)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK6R3Mesh8FaceAreaEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6R3Mesh12FaceCentroidEPK10R3MeshFace(ptr dead_on_unwind noalias writable sret(%class.R3Point) align 8, ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) local_unnamed_addr #4 align 2

declare void @_ZN7R3PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK6R3Mesh13PrincipleAxesEPK7R3PointPd(ptr dead_on_unwind noalias writable sret(%class.R3Triad) align 8 %0, ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %2, ptr noundef writeonly %3) local_unnamed_addr #4 align 2 {
  %5 = alloca %class.R3Point, align 8
  %6 = alloca [9 x double], align 16
  %7 = alloca %class.R3Point, align 8
  %8 = alloca %class.R3Point, align 8
  %9 = alloca [9 x double], align 16
  %10 = alloca [3 x double], align 16
  %11 = alloca [9 x double], align 16
  %12 = alloca [3 x %class.R3Vector], align 16
  %13 = alloca %class.R3Vector, align 8
  %14 = alloca %class.R3Vector, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %16, label %15

15:                                               ; preds = %4
  call void @_ZN7R3PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %2)
  br label %17

16:                                               ; preds = %4
  call void @_ZNK6R3Mesh8CentroidEv(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %5, ptr noundef nonnull align 8 dereferenceable(272) %1)
  br label %17

17:                                               ; preds = %16, %15
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %6) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(72) %6, i8 0, i64 72, i1 false)
  %18 = call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %1)
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.preheader112, label %.preheader113

.preheader113:                                    ; preds = %17
  %20 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %1)
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph, label %.loopexit.thread

.preheader112:                                    ; preds = %17
  %22 = call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %1)
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph119, label %.loopexit.thread

.lr.ph119:                                        ; preds = %.preheader112, %.lr.ph119
  %24 = phi double [ %53, %.lr.ph119 ], [ 0.000000e+00, %.preheader112 ]
  %.091118 = phi double [ %65, %.lr.ph119 ], [ 0.000000e+00, %.preheader112 ]
  %.093117 = phi i32 [ %66, %.lr.ph119 ], [ 0, %.preheader112 ]
  %25 = phi <2 x double> [ %55, %.lr.ph119 ], [ zeroinitializer, %.preheader112 ]
  %26 = phi <2 x double> [ %57, %.lr.ph119 ], [ zeroinitializer, %.preheader112 ]
  %27 = phi <2 x double> [ %61, %.lr.ph119 ], [ zeroinitializer, %.preheader112 ]
  %28 = phi <2 x double> [ %64, %.lr.ph119 ], [ zeroinitializer, %.preheader112 ]
  %29 = call noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272) %1, i32 noundef %.093117)
  %30 = call noundef double @_ZNK6R3Mesh8FaceAreaEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %29)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #8
  call void @_ZNK6R3Mesh12FaceCentroidEPK10R3MeshFace(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %7, ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %29)
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef 0)
  %32 = load double, ptr %31, align 8, !tbaa !5
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 0)
  %34 = load double, ptr %33, align 8, !tbaa !5
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef 1)
  %36 = load double, ptr %35, align 8, !tbaa !5
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 1)
  %38 = load double, ptr %37, align 8, !tbaa !5
  %39 = insertelement <2 x double> poison, double %32, i64 0
  %40 = insertelement <2 x double> %39, double %36, i64 1
  %41 = insertelement <2 x double> poison, double %34, i64 0
  %42 = insertelement <2 x double> %41, double %38, i64 1
  %43 = fsub <2 x double> %40, %42
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef 2)
  %45 = load double, ptr %44, align 8, !tbaa !5
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 2)
  %47 = load double, ptr %46, align 8, !tbaa !5
  %48 = fsub double %45, %47
  %49 = insertelement <2 x double> poison, double %30, i64 0
  %50 = shufflevector <2 x double> %49, <2 x double> poison, <2 x i32> zeroinitializer
  %51 = fmul <2 x double> %50, %43
  %52 = fmul double %30, %48
  %53 = call double @llvm.fmuladd.f64(double %52, double %48, double %24)
  %54 = shufflevector <2 x double> %51, <2 x double> poison, <2 x i32> zeroinitializer
  %55 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %54, <2 x double> %43, <2 x double> %25)
  %56 = insertelement <2 x double> %43, double %48, i64 0
  %57 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %54, <2 x double> %56, <2 x double> %26)
  %58 = shufflevector <2 x double> %51, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %59 = shufflevector <2 x double> %43, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %60 = insertelement <2 x double> %59, double %48, i64 1
  %61 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %58, <2 x double> %60, <2 x double> %27)
  %62 = insertelement <2 x double> poison, double %48, i64 0
  %63 = shufflevector <2 x double> %62, <2 x double> poison, <2 x i32> zeroinitializer
  %64 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %51, <2 x double> %63, <2 x double> %28)
  %65 = fadd double %.091118, %30
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  %66 = add nuw nsw i32 %.093117, 1
  %67 = call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %1)
  %68 = icmp slt i32 %66, %67
  br i1 %68, label %.lr.ph119, label %.loopexit, !llvm.loop !9

.lr.ph:                                           ; preds = %.preheader113, %.lr.ph
  %69 = phi double [ %89, %.lr.ph ], [ 0.000000e+00, %.preheader113 ]
  %.1116 = phi double [ %106, %.lr.ph ], [ 0.000000e+00, %.preheader113 ]
  %.098115 = phi i32 [ %107, %.lr.ph ], [ 0, %.preheader113 ]
  %70 = phi <2 x double> [ %96, %.lr.ph ], [ zeroinitializer, %.preheader113 ]
  %71 = phi <2 x double> [ %99, %.lr.ph ], [ zeroinitializer, %.preheader113 ]
  %72 = phi <2 x double> [ %102, %.lr.ph ], [ zeroinitializer, %.preheader113 ]
  %73 = phi <2 x double> [ %105, %.lr.ph ], [ zeroinitializer, %.preheader113 ]
  %74 = call noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272) %1, i32 noundef %.098115)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #8
  %75 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %74)
  call void @_ZN7R3PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %75)
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 0)
  %77 = load double, ptr %76, align 8, !tbaa !5
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 0)
  %79 = load double, ptr %78, align 8, !tbaa !5
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 1)
  %81 = load double, ptr %80, align 8, !tbaa !5
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 1)
  %83 = load double, ptr %82, align 8, !tbaa !5
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 2)
  %85 = load double, ptr %84, align 8, !tbaa !5
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 2)
  %87 = load double, ptr %86, align 8, !tbaa !5
  %88 = fsub double %85, %87
  %89 = call double @llvm.fmuladd.f64(double %88, double %88, double %69)
  %90 = insertelement <2 x double> poison, double %77, i64 0
  %91 = insertelement <2 x double> %90, double %81, i64 1
  %92 = insertelement <2 x double> poison, double %79, i64 0
  %93 = insertelement <2 x double> %92, double %83, i64 1
  %94 = fsub <2 x double> %91, %93
  %95 = shufflevector <2 x double> %94, <2 x double> poison, <2 x i32> zeroinitializer
  %96 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %95, <2 x double> %94, <2 x double> %70)
  %97 = extractelement <2 x double> %96, i64 0
  store double %97, ptr %6, align 16, !tbaa !5
  %98 = insertelement <2 x double> %94, double %88, i64 0
  %99 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %95, <2 x double> %98, <2 x double> %71)
  %100 = shufflevector <2 x double> %94, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %101 = insertelement <2 x double> %100, double %88, i64 1
  %102 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %100, <2 x double> %101, <2 x double> %72)
  %103 = insertelement <2 x double> poison, double %88, i64 0
  %104 = shufflevector <2 x double> %103, <2 x double> poison, <2 x i32> zeroinitializer
  %105 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %94, <2 x double> %104, <2 x double> %73)
  %106 = fadd double %.1116, 1.000000e+00
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #8
  %107 = add nuw nsw i32 %.098115, 1
  %108 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %1)
  %109 = icmp slt i32 %107, %108
  br i1 %109, label %.lr.ph, label %.loopexit, !llvm.loop !11

.loopexit:                                        ; preds = %.lr.ph, %.lr.ph119
  %110 = phi double [ %53, %.lr.ph119 ], [ %89, %.lr.ph ]
  %.2 = phi double [ %65, %.lr.ph119 ], [ %106, %.lr.ph ]
  %111 = phi <2 x double> [ %55, %.lr.ph119 ], [ %96, %.lr.ph ]
  %112 = phi <2 x double> [ %57, %.lr.ph119 ], [ %99, %.lr.ph ]
  %113 = phi <2 x double> [ %61, %.lr.ph119 ], [ %102, %.lr.ph ]
  %114 = phi <2 x double> [ %64, %.lr.ph119 ], [ %105, %.lr.ph ]
  %115 = fcmp oeq double %.2, 0.000000e+00
  br i1 %115, label %.loopexit.thread, label %.preheader111.preheader

.preheader111.preheader:                          ; preds = %.loopexit
  %116 = insertelement <2 x double> poison, double %.2, i64 0
  %117 = shufflevector <2 x double> %116, <2 x double> poison, <2 x i32> zeroinitializer
  %118 = fdiv <2 x double> %111, %117
  store <2 x double> %118, ptr %6, align 16, !tbaa !5
  %119 = getelementptr inbounds i8, ptr %6, i64 16
  %120 = fdiv <2 x double> %112, %117
  store <2 x double> %120, ptr %119, align 16, !tbaa !5
  %121 = getelementptr inbounds i8, ptr %6, i64 32
  %122 = fdiv <2 x double> %113, %117
  store <2 x double> %122, ptr %121, align 16, !tbaa !5
  %123 = getelementptr inbounds i8, ptr %6, i64 48
  %124 = fdiv <2 x double> %114, %117
  store <2 x double> %124, ptr %123, align 16, !tbaa !5
  %125 = getelementptr inbounds i8, ptr %6, i64 64
  %126 = fdiv double %110, %.2
  store double %126, ptr %125, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %11) #8
  call void @_Z14RNSvdDecomposeiiPKdPdS1_S1_(i32 noundef 3, i32 noundef 3, ptr noundef nonnull %6, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %12) #8
  call void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %.ptr.1 = getelementptr inbounds i8, ptr %12, i64 24
  call void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %.ptr.2 = getelementptr inbounds i8, ptr %12, i64 48
  call void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  %127 = load double, ptr %11, align 16, !tbaa !5
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R3VectorixEi(ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef 0)
  store double %127, ptr %128, align 8, !tbaa !5
  %129 = getelementptr inbounds i8, ptr %11, i64 8
  %130 = load double, ptr %129, align 8, !tbaa !5
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R3VectorixEi(ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef 1)
  store double %130, ptr %131, align 8, !tbaa !5
  %132 = getelementptr inbounds i8, ptr %11, i64 16
  %133 = load double, ptr %132, align 16, !tbaa !5
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R3VectorixEi(ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef 2)
  store double %133, ptr %134, align 8, !tbaa !5
  %135 = getelementptr inbounds i8, ptr %11, i64 24
  %136 = load double, ptr %135, align 8, !tbaa !5
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R3VectorixEi(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, i32 noundef 0)
  store double %136, ptr %137, align 8, !tbaa !5
  %138 = getelementptr inbounds i8, ptr %11, i64 32
  %139 = load double, ptr %138, align 16, !tbaa !5
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R3VectorixEi(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, i32 noundef 1)
  store double %139, ptr %140, align 8, !tbaa !5
  %141 = getelementptr inbounds i8, ptr %11, i64 40
  %142 = load double, ptr %141, align 8, !tbaa !5
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R3VectorixEi(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, i32 noundef 2)
  store double %142, ptr %143, align 8, !tbaa !5
  %144 = getelementptr inbounds i8, ptr %11, i64 48
  %145 = load double, ptr %144, align 16, !tbaa !5
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R3VectorixEi(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2, i32 noundef 0)
  store double %145, ptr %146, align 8, !tbaa !5
  %147 = getelementptr inbounds i8, ptr %11, i64 56
  %148 = load double, ptr %147, align 8, !tbaa !5
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R3VectorixEi(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2, i32 noundef 1)
  store double %148, ptr %149, align 8, !tbaa !5
  %150 = getelementptr inbounds i8, ptr %11, i64 64
  %151 = load double, ptr %150, align 16, !tbaa !5
  %152 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R3VectorixEi(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2, i32 noundef 2)
  store double %151, ptr %152, align 8, !tbaa !5
  %153 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %1)
  %154 = icmp sgt i32 %153, 0
  br i1 %154, label %.lr.ph126, label %.thread

.loopexit.thread:                                 ; preds = %.preheader113, %.preheader112, %.loopexit
  call void @_ZN7R3TriadC1ERKS_(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(72) @R3xyz_triad)
  br label %210

.preheader:                                       ; preds = %.lr.ph126
  %155 = icmp ult i32 %.sroa.0139.2, %.sroa.0.2
  br i1 %155, label %169, label %170

.lr.ph126:                                        ; preds = %.preheader111.preheader, %.lr.ph126
  %.sroa.6141.1 = phi i32 [ %.sroa.6141.2, %.lr.ph126 ], [ 0, %.preheader111.preheader ]
  %.sroa.0.1 = phi i32 [ %.sroa.0.2, %.lr.ph126 ], [ 0, %.preheader111.preheader ]
  %.sroa.6.1 = phi i32 [ %.sroa.6.2, %.lr.ph126 ], [ 0, %.preheader111.preheader ]
  %.sroa.0139.1 = phi i32 [ %.sroa.0139.2, %.lr.ph126 ], [ 0, %.preheader111.preheader ]
  %.094125 = phi i32 [ %166, %.lr.ph126 ], [ 0, %.preheader111.preheader ]
  %156 = call noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272) %1, i32 noundef %.094125)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #8
  %157 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %1, ptr noundef %156)
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %157, ptr noundef nonnull align 8 dereferenceable(24) %5)
  %158 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %13)
  %159 = fcmp ule double %158, 0.000000e+00
  %160 = zext i1 %159 to i32
  %.sroa.0.2 = add nuw nsw i32 %.sroa.0.1, %160
  %not. = xor i1 %159, true
  %161 = zext i1 %not. to i32
  %.sroa.0139.2 = add nuw nsw i32 %.sroa.0139.1, %161
  %162 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(24) %13)
  %163 = fcmp ogt double %162, 0.000000e+00
  %164 = zext i1 %163 to i32
  %.sroa.6141.2 = add nuw nsw i32 %.sroa.6141.1, %164
  %not.175 = xor i1 %163, true
  %165 = zext i1 %not.175 to i32
  %.sroa.6.2 = add nuw nsw i32 %.sroa.6.1, %165
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  %166 = add nuw nsw i32 %.094125, 1
  %167 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %1)
  %168 = icmp slt i32 %166, %167
  br i1 %168, label %.lr.ph126, label %.preheader, !llvm.loop !12

169:                                              ; preds = %.preheader
  call void @_ZN8R3Vector4FlipEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  br label %170

170:                                              ; preds = %.preheader, %169
  %171 = icmp ult i32 %.sroa.6141.2, %.sroa.6.2
  br i1 %171, label %172, label %.thread

172:                                              ; preds = %170
  call void @_ZN8R3Vector4FlipEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  br label %.thread

.thread:                                          ; preds = %.preheader111.preheader, %172, %170
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #8
  call void @_ZrmRK8R3VectorS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %173 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2, ptr noundef nonnull align 8 dereferenceable(24) %14)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #8
  %174 = call noundef double @_ZNK8R3Vector6LengthEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %175 = load double, ptr @RN_BIG_EPSILON, align 8, !tbaa !5
  %176 = call noundef i32 @_Z9RNIsEqualddd(double noundef %174, double noundef 1.000000e+00, double noundef %175)
  %.not102 = icmp eq i32 %176, 0
  br i1 %.not102, label %177, label %178

177:                                              ; preds = %.thread
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.6, i32 noundef 308, ptr noundef nonnull @.str.2)
  br label %178

178:                                              ; preds = %177, %.thread
  %179 = call noundef double @_ZNK8R3Vector6LengthEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %180 = load double, ptr @RN_BIG_EPSILON, align 8, !tbaa !5
  %181 = call noundef i32 @_Z9RNIsEqualddd(double noundef %179, double noundef 1.000000e+00, double noundef %180)
  %.not103 = icmp eq i32 %181, 0
  br i1 %.not103, label %182, label %183

182:                                              ; preds = %178
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.7, i32 noundef 309, ptr noundef nonnull @.str.2)
  br label %183

183:                                              ; preds = %182, %178
  %184 = call noundef double @_ZNK8R3Vector6LengthEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  %185 = load double, ptr @RN_BIG_EPSILON, align 8, !tbaa !5
  %186 = call noundef i32 @_Z9RNIsEqualddd(double noundef %184, double noundef 1.000000e+00, double noundef %185)
  %.not104 = icmp eq i32 %186, 0
  br i1 %.not104, label %187, label %188

187:                                              ; preds = %183
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.8, i32 noundef 310, ptr noundef nonnull @.str.2)
  br label %188

188:                                              ; preds = %187, %183
  %189 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %190 = load double, ptr @RN_BIG_EPSILON, align 8, !tbaa !5
  %191 = call noundef i32 @_Z8RNIsZerodd(double noundef %189, double noundef %190)
  %.not105 = icmp eq i32 %191, 0
  br i1 %.not105, label %192, label %193

192:                                              ; preds = %188
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.9, i32 noundef 311, ptr noundef nonnull @.str.2)
  br label %193

193:                                              ; preds = %192, %188
  %194 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  %195 = load double, ptr @RN_BIG_EPSILON, align 8, !tbaa !5
  %196 = call noundef i32 @_Z8RNIsZerodd(double noundef %194, double noundef %195)
  %.not106 = icmp eq i32 %196, 0
  br i1 %.not106, label %197, label %198

197:                                              ; preds = %193
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.10, i32 noundef 312, ptr noundef nonnull @.str.2)
  br label %198

198:                                              ; preds = %197, %193
  %199 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  %200 = load double, ptr @RN_BIG_EPSILON, align 8, !tbaa !5
  %201 = call noundef i32 @_Z8RNIsZerodd(double noundef %199, double noundef %200)
  %.not107 = icmp eq i32 %201, 0
  br i1 %.not107, label %202, label %203

202:                                              ; preds = %198
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.11, i32 noundef 313, ptr noundef nonnull @.str.2)
  br label %203

203:                                              ; preds = %202, %198
  %.not108 = icmp eq ptr %3, null
  br i1 %.not108, label %209, label %204

204:                                              ; preds = %203
  %205 = load <2 x double>, ptr %10, align 16, !tbaa !5
  store <2 x double> %205, ptr %3, align 8, !tbaa !5
  %206 = getelementptr inbounds i8, ptr %10, i64 16
  %207 = load double, ptr %206, align 16, !tbaa !5
  %208 = getelementptr inbounds i8, ptr %3, i64 16
  store double %207, ptr %208, align 8, !tbaa !5
  br label %209

209:                                              ; preds = %204, %203
  call void @_ZN7R3TriadC1ERK8R3VectorS2_S2_(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %9) #8
  br label %210

210:                                              ; preds = %209, %.loopexit.thread
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  ret void
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN7R3PointixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #1 align 2

declare void @_ZN7R3TriadC1ERKS_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #0

declare void @_Z14RNSvdDecomposeiiPKdPdS1_S1_(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @_ZN8R3VectorC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN8R3VectorixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #1 align 2

declare void @_ZmiRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

declare noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

declare void @_ZN8R3Vector4FlipEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

declare void @_ZrmRK8R3VectorS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZN8R3VectoraSERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z9RNIsEqualddd(double noundef, double noundef, double noundef) local_unnamed_addr #1

declare noundef double @_ZNK8R3Vector6LengthEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z8RNIsZerodd(double noundef, double noundef) local_unnamed_addr #1

declare void @_ZN7R3TriadC1ERK8R3VectorS2_S2_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #7

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass