; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Shapes (R3Align)

; 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.R3Vector = type { [3 x double] }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7RNArrayIP7R3PointEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z12R3AlignErrorRK7RNArrayIP7R3PointES4_RK8R4MatrixRKS0_S9_ddPKd(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(128) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, double noundef %5, double noundef %6, ptr noundef %7) #2 {
  %9 = alloca double, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca i32, align 4
  %23 = alloca double, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca %class.R3Vector, align 8
  %27 = alloca %class.R3Vector, align 8
  %28 = alloca %class.R3Vector, align 8
  %29 = alloca %class.R3Vector, align 8
  %30 = alloca %class.R3Vector, align 8
  %31 = alloca %class.R3Vector, align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store ptr %2, ptr %12, align 8, !tbaa !5
  store ptr %3, ptr %13, align 8, !tbaa !5
  store ptr %4, ptr %14, align 8, !tbaa !5
  store double %5, ptr %15, align 8, !tbaa !9
  store double %6, ptr %16, align 8, !tbaa !9
  store ptr %7, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  %33 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %32)
  store i32 %33, ptr %18, align 4, !tbaa !11
  %34 = load ptr, ptr %11, align 8, !tbaa !5
  %35 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %34)
  %36 = load i32, ptr %18, align 4, !tbaa !11
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %38, label %41

38:                                               ; preds = %8
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  %40 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %39)
  store i32 %40, ptr %18, align 4, !tbaa !11
  br label %41

41:                                               ; preds = %38, %8
  %42 = load i32, ptr %18, align 4, !tbaa !11
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %45

44:                                               ; preds = %41
  store double -1.000000e+00, ptr %9, align 8
  store i32 1, ptr %19, align 4
  br label %96

45:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  store double 0.000000e+00, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  store double 0.000000e+00, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !11
  br label %46

46:                                               ; preds = %83, %45
  %47 = load i32, ptr %22, align 4, !tbaa !11
  %48 = load i32, ptr %18, align 4, !tbaa !11
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  store i32 2, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %86

51:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %52 = load ptr, ptr %17, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %54, label %60

54:                                               ; preds = %51
  %55 = load ptr, ptr %17, align 8, !tbaa !5
  %56 = load i32, ptr %22, align 4, !tbaa !11
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds double, ptr %55, i64 %57
  %59 = load double, ptr %58, align 8, !tbaa !9
  br label %61

60:                                               ; preds = %51
  br label %61

61:                                               ; preds = %60, %54
  %62 = phi double [ %59, %54 ], [ 1.000000e+00, %60 ]
  store double %62, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = load i32, ptr %22, align 4, !tbaa !11
  %65 = call noundef ptr @_ZNK7RNArrayIP7R3PointEixEi(ptr noundef nonnull align 8 dereferenceable(16) %63, i32 noundef %64)
  store ptr %65, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = load i32, ptr %22, align 4, !tbaa !11
  %68 = call noundef ptr @_ZNK7RNArrayIP7R3PointEixEi(ptr noundef nonnull align 8 dereferenceable(16) %66, i32 noundef %67)
  store ptr %68, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %27) #6
  %69 = load ptr, ptr %24, align 8, !tbaa !5
  %70 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %27, ptr noundef nonnull align 8 dereferenceable(24) %69, ptr noundef nonnull align 8 dereferenceable(24) %70)
  %71 = load double, ptr %15, align 8, !tbaa !9
  call void @_ZdvRK8R3Vectord(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %26, ptr noundef nonnull align 8 dereferenceable(24) %27, double noundef %71)
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %29) #6
  %72 = load ptr, ptr %25, align 8, !tbaa !5
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %29, ptr noundef nonnull align 8 dereferenceable(24) %72, ptr noundef nonnull align 8 dereferenceable(24) %73)
  %74 = load double, ptr %16, align 8, !tbaa !9
  call void @_ZdvRK8R3Vectord(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %28, ptr noundef nonnull align 8 dereferenceable(24) %29, double noundef %74)
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %31) #6
  %75 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZmlRK8R4MatrixRK8R3Vector(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %31, ptr noundef nonnull align 8 dereferenceable(128) %75, ptr noundef nonnull align 8 dereferenceable(24) %28)
  call void @_ZmiRK8R3VectorS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %30, ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(24) %31)
  call void @llvm.lifetime.end.p0(i64 24, ptr %31) #6
  %76 = load double, ptr %23, align 8, !tbaa !9
  %77 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %30, ptr noundef nonnull align 8 dereferenceable(24) %30)
  %78 = load double, ptr %20, align 8, !tbaa !9
  %79 = call double @llvm.fmuladd.f64(double %76, double %77, double %78)
  store double %79, ptr %20, align 8, !tbaa !9
  %80 = load double, ptr %23, align 8, !tbaa !9
  %81 = load double, ptr %21, align 8, !tbaa !9
  %82 = fadd double %81, %80
  store double %82, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %83

83:                                               ; preds = %61
  %84 = load i32, ptr %22, align 4, !tbaa !11
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %22, align 4, !tbaa !11
  br label %46, !llvm.loop !13

86:                                               ; preds = %50
  %87 = load double, ptr %21, align 8, !tbaa !9
  %88 = fcmp oeq double %87, 0.000000e+00
  br i1 %88, label %89, label %90

89:                                               ; preds = %86
  store double -1.000000e+00, ptr %9, align 8
  store i32 1, ptr %19, align 4
  br label %95

90:                                               ; preds = %86
  %91 = load double, ptr %20, align 8, !tbaa !9
  %92 = load double, ptr %21, align 8, !tbaa !9
  %93 = fdiv double %91, %92
  %94 = call double @sqrt(double noundef %93) #6
  store double %94, ptr %9, align 8
  store i32 1, ptr %19, align 4
  br label %95

95:                                               ; preds = %90, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %96

96:                                               ; preds = %95, %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  %97 = load double, ptr %9, align 8
  ret double %97
}

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

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)) #4

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

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { "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 = { nounwind "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 #6 = { 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"}


; 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.R3Vector = type { [3 x double] }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7RNArrayIP7R3PointEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z12R3AlignErrorRK7RNArrayIP7R3PointES4_RK8R4MatrixRKS0_S9_ddPKd(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(128) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, double noundef %5, double noundef %6, ptr noundef readonly %7) local_unnamed_addr #2 {
  %9 = alloca %class.R3Vector, align 8
  %10 = alloca %class.R3Vector, align 8
  %11 = alloca %class.R3Vector, align 8
  %12 = alloca %class.R3Vector, align 8
  %13 = alloca %class.R3Vector, align 8
  %14 = alloca %class.R3Vector, align 8
  %15 = tail call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %16 = tail call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %17 = icmp slt i32 %16, %15
  br i1 %17, label %18, label %20

18:                                               ; preds = %8
  %19 = tail call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  br label %20

20:                                               ; preds = %18, %8
  %.029 = phi i32 [ %19, %18 ], [ %15, %8 ]
  %21 = icmp sgt i32 %.029, 0
  br i1 %21, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %20
  %.not = icmp eq ptr %7, null
  br i1 %.not, label %.lr.ph.split.us, label %.lr.ph.split.preheader

.lr.ph.split.preheader:                           ; preds = %.lr.ph
  %wide.trip.count = zext nneg i32 %.029 to i64
  br label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %.lr.ph.split.us
  %.03037.us = phi i32 [ %27, %.lr.ph.split.us ], [ 0, %.lr.ph ]
  %.03136.us = phi double [ %26, %.lr.ph.split.us ], [ 0.000000e+00, %.lr.ph ]
  %.03235.us = phi double [ %25, %.lr.ph.split.us ], [ 0.000000e+00, %.lr.ph ]
  %22 = call noundef ptr @_ZNK7RNArrayIP7R3PointEixEi(ptr noundef nonnull align 8 dereferenceable(16) %0, i32 noundef %.03037.us)
  %23 = call noundef ptr @_ZNK7RNArrayIP7R3PointEixEi(ptr noundef nonnull align 8 dereferenceable(16) %1, i32 noundef %.03037.us)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(24) %3)
  call void @_ZdvRK8R3Vectord(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %10, double noundef %5)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %4)
  call void @_ZdvRK8R3Vectord(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %12, double noundef %6)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #6
  call void @_ZmlRK8R4MatrixRK8R3Vector(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %14, ptr noundef nonnull align 8 dereferenceable(128) %2, ptr noundef nonnull align 8 dereferenceable(24) %11)
  call void @_ZmiRK8R3VectorS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %14)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  %24 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %13)
  %25 = fadd double %24, %.03235.us
  %26 = fadd double %.03136.us, 1.000000e+00
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  %27 = add nuw nsw i32 %.03037.us, 1
  %exitcond45.not = icmp eq i32 %27, %.029
  br i1 %exitcond45.not, label %._crit_edge, label %.lr.ph.split.us, !llvm.loop !5

._crit_edge:                                      ; preds = %.lr.ph.split, %.lr.ph.split.us
  %.032.lcssa = phi double [ %25, %.lr.ph.split.us ], [ %35, %.lr.ph.split ]
  %.031.lcssa = phi double [ %26, %.lr.ph.split.us ], [ %36, %.lr.ph.split ]
  %28 = fcmp oeq double %.031.lcssa, 0.000000e+00
  br i1 %28, label %._crit_edge.thread, label %37

.lr.ph.split:                                     ; preds = %.lr.ph.split.preheader, %.lr.ph.split
  %indvars.iv = phi i64 [ 0, %.lr.ph.split.preheader ], [ %indvars.iv.next, %.lr.ph.split ]
  %.03136 = phi double [ 0.000000e+00, %.lr.ph.split.preheader ], [ %36, %.lr.ph.split ]
  %.03235 = phi double [ 0.000000e+00, %.lr.ph.split.preheader ], [ %35, %.lr.ph.split ]
  %29 = getelementptr inbounds double, ptr %7, i64 %indvars.iv
  %30 = load double, ptr %29, align 8, !tbaa !7
  %31 = trunc nuw nsw i64 %indvars.iv to i32
  %32 = call noundef ptr @_ZNK7RNArrayIP7R3PointEixEi(ptr noundef nonnull align 8 dereferenceable(16) %0, i32 noundef %31)
  %33 = call noundef ptr @_ZNK7RNArrayIP7R3PointEixEi(ptr noundef nonnull align 8 dereferenceable(16) %1, i32 noundef %31)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef nonnull align 8 dereferenceable(24) %3)
  call void @_ZdvRK8R3Vectord(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %10, double noundef %5)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull align 8 dereferenceable(24) %4)
  call void @_ZdvRK8R3Vectord(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %12, double noundef %6)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #6
  call void @_ZmlRK8R4MatrixRK8R3Vector(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %14, ptr noundef nonnull align 8 dereferenceable(128) %2, ptr noundef nonnull align 8 dereferenceable(24) %11)
  call void @_ZmiRK8R3VectorS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %14)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  %34 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %13)
  %35 = call double @llvm.fmuladd.f64(double %30, double %34, double %.03235)
  %36 = fadd double %.03136, %30
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.split, !llvm.loop !5

37:                                               ; preds = %._crit_edge
  %38 = fdiv double %.032.lcssa, %.031.lcssa
  %39 = call double @sqrt(double noundef %38) #6
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %37, %._crit_edge, %20
  %.1 = phi double [ -1.000000e+00, %20 ], [ %39, %37 ], [ -1.000000e+00, %._crit_edge ]
  ret double %.1
}

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

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 #4

declare void @_ZmiRK8R3VectorS1_(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 #4

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { "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 nofree nounwind willreturn memory(write) "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 #6 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"double", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}


; Effective O3 passes: GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass