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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272), i32 noundef) #0 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) #2 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272), i32 noundef) #0 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)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK6R3Mesh8FaceAreaEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) #0 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) #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZNK6R3Mesh13AverageRadiusEPK7R3Point(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %1) #3 align 2 {
  %3 = alloca double, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %class.R3Point, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca double, align 8
  %12 = alloca %class.R3Point, align 8
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %18 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #6
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %21, label %23

21:                                               ; preds = %2
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN7R3PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %22)
  br label %24

23:                                               ; preds = %2
  call void @_ZNK6R3Mesh8CentroidEv(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %6, ptr noundef nonnull align 8 dereferenceable(272) %18)
  br label %24

24:                                               ; preds = %23, %21
  %25 = call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %18)
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %27, label %58

27:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store double 0.000000e+00, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store double 0.000000e+00, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !11
  br label %28

28:                                               ; preds = %46, %27
  %29 = load i32, ptr %9, align 4, !tbaa !11
  %30 = call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %18)
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %49

33:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %34 = load i32, ptr %9, align 4, !tbaa !11
  %35 = call noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272) %18, i32 noundef %34)
  store ptr %35, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = call noundef double @_ZNK6R3Mesh8FaceAreaEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %18, ptr noundef %36)
  store double %37, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #6
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZNK6R3Mesh12FaceCentroidEPK10R3MeshFace(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %12, ptr noundef nonnull align 8 dereferenceable(272) %18, ptr noundef %38)
  %39 = load double, ptr %11, align 8, !tbaa !9
  %40 = call noundef double @_Z10R3DistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %6)
  %41 = load double, ptr %8, align 8, !tbaa !9
  %42 = call double @llvm.fmuladd.f64(double %39, double %40, double %41)
  store double %42, ptr %8, align 8, !tbaa !9
  %43 = load double, ptr %11, align 8, !tbaa !9
  %44 = load double, ptr %7, align 8, !tbaa !9
  %45 = fadd double %44, %43
  store double %45, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %46

46:                                               ; preds = %33
  %47 = load i32, ptr %9, align 4, !tbaa !11
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %9, align 4, !tbaa !11
  br label %28, !llvm.loop !13

49:                                               ; preds = %32
  %50 = load double, ptr %7, align 8, !tbaa !9
  %51 = fcmp oeq double %50, 0.000000e+00
  br i1 %51, label %52, label %53

52:                                               ; preds = %49
  store double 0.000000e+00, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %57

53:                                               ; preds = %49
  %54 = load double, ptr %8, align 8, !tbaa !9
  %55 = load double, ptr %7, align 8, !tbaa !9
  %56 = fdiv double %54, %55
  store double %56, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %57

57:                                               ; preds = %53, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %86

58:                                               ; preds = %24
  %59 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %18)
  %60 = icmp sgt i32 %59, 0
  br i1 %60, label %61, label %84

61:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store double 0.000000e+00, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !11
  br label %62

62:                                               ; preds = %76, %61
  %63 = load i32, ptr %15, align 4, !tbaa !11
  %64 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %18)
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %79

67:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %68 = load i32, ptr %15, align 4, !tbaa !11
  %69 = call noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272) %18, i32 noundef %68)
  store ptr %69, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %70 = load ptr, ptr %16, align 8, !tbaa !5
  %71 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %18, ptr noundef %70)
  store ptr %71, ptr %17, align 8, !tbaa !5
  %72 = load ptr, ptr %17, align 8, !tbaa !5
  %73 = call noundef double @_Z10R3DistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %72, ptr noundef nonnull align 8 dereferenceable(24) %6)
  %74 = load double, ptr %14, align 8, !tbaa !9
  %75 = fadd double %74, %73
  store double %75, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %76

76:                                               ; preds = %67
  %77 = load i32, ptr %15, align 4, !tbaa !11
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %15, align 4, !tbaa !11
  br label %62, !llvm.loop !15

79:                                               ; preds = %66
  %80 = load double, ptr %14, align 8, !tbaa !9
  %81 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %18)
  %82 = sitofp i32 %81 to double
  %83 = fdiv double %80, %82
  store double %83, ptr %3, align 8
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %86

84:                                               ; preds = %58
  br label %85

85:                                               ; preds = %84
  store double 0.000000e+00, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %86

86:                                               ; preds = %85, %79, %57
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  %87 = load double, ptr %3, align 8
  ret double %87
}

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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"}
!15 = distinct !{!15, !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.R3Point = type { [3 x double] }

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272), i32 noundef) local_unnamed_addr #0 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 #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272)) local_unnamed_addr #0 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 #0 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 #3 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 #0 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 #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZNK6R3Mesh13AverageRadiusEPK7R3Point(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %1) local_unnamed_addr #3 align 2 {
  %3 = alloca %class.R3Point, align 8
  %4 = alloca %class.R3Point, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %6, label %5

5:                                                ; preds = %2
  call void @_ZN7R3PointC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %1)
  br label %7

6:                                                ; preds = %2
  call void @_ZNK6R3Mesh8CentroidEv(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %3, ptr noundef nonnull align 8 dereferenceable(272) %0)
  br label %7

7:                                                ; preds = %6, %5
  %8 = call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %0)
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.preheader, label %22

.preheader:                                       ; preds = %7
  %10 = call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %0)
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph34, label %._crit_edge35

._crit_edge35:                                    ; preds = %.lr.ph34, %.preheader
  %.025.lcssa = phi double [ 0.000000e+00, %.preheader ], [ %17, %.lr.ph34 ]
  %.022.lcssa = phi double [ 0.000000e+00, %.preheader ], [ %18, %.lr.ph34 ]
  %12 = fcmp oeq double %.022.lcssa, 0.000000e+00
  %13 = fdiv double %.025.lcssa, %.022.lcssa
  %.0 = select i1 %12, double 0.000000e+00, double %13
  br label %37

.lr.ph34:                                         ; preds = %.preheader, %.lr.ph34
  %.02233 = phi double [ %18, %.lr.ph34 ], [ 0.000000e+00, %.preheader ]
  %.02532 = phi double [ %17, %.lr.ph34 ], [ 0.000000e+00, %.preheader ]
  %.02631 = phi i32 [ %19, %.lr.ph34 ], [ 0, %.preheader ]
  %14 = call noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272) %0, i32 noundef %.02631)
  %15 = call noundef double @_ZNK6R3Mesh8FaceAreaEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %14)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  call void @_ZNK6R3Mesh12FaceCentroidEPK10R3MeshFace(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %4, ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %14)
  %16 = call noundef double @_Z10R3DistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %3)
  %17 = call double @llvm.fmuladd.f64(double %15, double %16, double %.02532)
  %18 = fadd double %.02233, %15
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  %19 = add nuw nsw i32 %.02631, 1
  %20 = call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %0)
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %.lr.ph34, label %._crit_edge35, !llvm.loop !5

22:                                               ; preds = %7
  %23 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %0)
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.preheader28, label %37

.preheader28:                                     ; preds = %22
  %25 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %0)
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.preheader28
  %.024.lcssa = phi double [ 0.000000e+00, %.preheader28 ], [ %33, %.lr.ph ]
  %27 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %0)
  %28 = sitofp i32 %27 to double
  %29 = fdiv double %.024.lcssa, %28
  br label %37

.lr.ph:                                           ; preds = %.preheader28, %.lr.ph
  %.02330 = phi i32 [ %34, %.lr.ph ], [ 0, %.preheader28 ]
  %.02429 = phi double [ %33, %.lr.ph ], [ 0.000000e+00, %.preheader28 ]
  %30 = call noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272) %0, i32 noundef %.02330)
  %31 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %30)
  %32 = call noundef double @_Z10R3DistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr noundef nonnull align 8 dereferenceable(24) %3)
  %33 = fadd double %.02429, %32
  %34 = add nuw nsw i32 %.02330, 1
  %35 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %0)
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %.lr.ph, label %._crit_edge, !llvm.loop !7

37:                                               ; preds = %22, %._crit_edge, %._crit_edge35
  %.1 = phi double [ %.0, %._crit_edge35 ], [ %29, %._crit_edge ], [ 0.000000e+00, %22 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  ret double %.1
}

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

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

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


; Effective O3 passes: GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass