; LLVM IR from kazulagi/plantFEM :: src/RouteOptimizationClass/TSP_enum_greedy.ll (ZN6Points6greedyEv)

; 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.Points = type { i32, %"class.std::vector", %"class.std::vector", %"class.std::vector.0", double, %"class.std::vector.5" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<double>, std::allocator<std::vector<double>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<double>, std::allocator<std::vector<double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<double>, std::allocator<std::vector<double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<double>, std::allocator<std::vector<double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Points6greedyEv(ptr noundef nonnull align 8 dereferenceable(112) %0) #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca double, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  %11 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 4
  store double 0.000000e+00, ptr %11, align 8, !tbaa !9
  %12 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 5
  call void @_ZN6Points12random_orderERSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(112) %10, ptr noundef nonnull align 8 dereferenceable(24) %12)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 1, ptr %3, align 4, !tbaa !25
  br label %13

13:                                               ; preds = %123, %1
  %14 = load i32, ptr %3, align 4, !tbaa !25
  %15 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 0
  %16 = load i32, ptr %15, align 8, !tbaa !26
  %17 = icmp slt i32 %14, %16
  br i1 %17, label %19, label %18

18:                                               ; preds = %13
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  br label %126

19:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %20 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 3
  %21 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 5
  %22 = load i32, ptr %3, align 4, !tbaa !25
  %23 = sub nsw i32 %22, 1
  %24 = sext i32 %23 to i64
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %24) #3
  %26 = load i32, ptr %25, align 4, !tbaa !25
  %27 = sext i32 %26 to i64
  %28 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %27) #3
  %29 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 5
  %30 = load i32, ptr %3, align 4, !tbaa !25
  %31 = sext i32 %30 to i64
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %31) #3
  %33 = load i32, ptr %32, align 4, !tbaa !25
  %34 = sext i32 %33 to i64
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %34) #3
  %36 = load double, ptr %35, align 8, !tbaa !27
  store double %36, ptr %5, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %37 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 5
  %38 = load i32, ptr %3, align 4, !tbaa !25
  %39 = sext i32 %38 to i64
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %39) #3
  %41 = load i32, ptr %40, align 4, !tbaa !25
  store i32 %41, ptr %6, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %42 = load i32, ptr %3, align 4, !tbaa !25
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %8, align 4, !tbaa !25
  br label %44

44:                                               ; preds = %92, %19
  %45 = load i32, ptr %8, align 4, !tbaa !25
  %46 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 0
  %47 = load i32, ptr %46, align 8, !tbaa !26
  %48 = icmp slt i32 %45, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %44
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %95

50:                                               ; preds = %44
  %51 = load double, ptr %5, align 8, !tbaa !27
  %52 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 3
  %53 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 5
  %54 = load i32, ptr %3, align 4, !tbaa !25
  %55 = sub nsw i32 %54, 1
  %56 = sext i32 %55 to i64
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %56) #3
  %58 = load i32, ptr %57, align 4, !tbaa !25
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %59) #3
  %61 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 5
  %62 = load i32, ptr %8, align 4, !tbaa !25
  %63 = sext i32 %62 to i64
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %63) #3
  %65 = load i32, ptr %64, align 4, !tbaa !25
  %66 = sext i32 %65 to i64
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %66) #3
  %68 = load double, ptr %67, align 8, !tbaa !27
  %69 = fcmp ogt double %51, %68
  br i1 %69, label %70, label %91

70:                                               ; preds = %50
  %71 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 3
  %72 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 5
  %73 = load i32, ptr %3, align 4, !tbaa !25
  %74 = sub nsw i32 %73, 1
  %75 = sext i32 %74 to i64
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef %75) #3
  %77 = load i32, ptr %76, align 4, !tbaa !25
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %71, i64 noundef %78) #3
  %80 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 5
  %81 = load i32, ptr %8, align 4, !tbaa !25
  %82 = sext i32 %81 to i64
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %80, i64 noundef %82) #3
  %84 = load i32, ptr %83, align 4, !tbaa !25
  %85 = sext i32 %84 to i64
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef %85) #3
  %87 = load double, ptr %86, align 8, !tbaa !27
  store double %87, ptr %5, align 8, !tbaa !27
  %88 = load i32, ptr %8, align 4, !tbaa !25
  store i32 %88, ptr %6, align 4, !tbaa !25
  %89 = load i32, ptr %7, align 4, !tbaa !25
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %7, align 4, !tbaa !25
  br label %91

91:                                               ; preds = %70, %50
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %8, align 4, !tbaa !25
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %8, align 4, !tbaa !25
  br label %44, !llvm.loop !28

95:                                               ; preds = %49
  %96 = load i32, ptr %7, align 4, !tbaa !25
  %97 = icmp sgt i32 %96, 0
  br i1 %97, label %98, label %118

98:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %99 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 5
  %100 = load i32, ptr %6, align 4, !tbaa !25
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %101) #3
  %103 = load i32, ptr %102, align 4, !tbaa !25
  store i32 %103, ptr %9, align 4, !tbaa !25
  %104 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 5
  %105 = load i32, ptr %3, align 4, !tbaa !25
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %104, i64 noundef %106) #3
  %108 = load i32, ptr %107, align 4, !tbaa !25
  %109 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 5
  %110 = load i32, ptr %6, align 4, !tbaa !25
  %111 = sext i32 %110 to i64
  %112 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %109, i64 noundef %111) #3
  store i32 %108, ptr %112, align 4, !tbaa !25
  %113 = load i32, ptr %9, align 4, !tbaa !25
  %114 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 5
  %115 = load i32, ptr %3, align 4, !tbaa !25
  %116 = sext i32 %115 to i64
  %117 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef %116) #3
  store i32 %113, ptr %117, align 4, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %118

118:                                              ; preds = %98, %95
  %119 = load double, ptr %5, align 8, !tbaa !27
  %120 = getelementptr inbounds %class.Points, ptr %10, i32 0, i32 4
  %121 = load double, ptr %120, align 8, !tbaa !9
  %122 = fadd double %121, %119
  store double %122, ptr %120, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  br label %123

123:                                              ; preds = %118
  %124 = load i32, ptr %3, align 4, !tbaa !25
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %3, align 4, !tbaa !25
  br label %13, !llvm.loop !30

126:                                              ; preds = %18
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Points12random_orderERSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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, !20, i64 80}
!10 = !{!"_ZTS6Points", !11, i64 0, !12, i64 8, !12, i64 32, !16, i64 56, !20, i64 80, !21, i64 88}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIdSaIdEE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!"_ZTSSt6vectorIS_IdSaIdEESaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"double", !7, i64 0}
!21 = !{!"_ZTSSt6vectorIiSaIiEE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!11, !11, i64 0}
!26 = !{!10, !11, i64 0}
!27 = !{!20, !20, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}


; 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"

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Points6greedyEv(ptr noundef nonnull align 8 dereferenceable(112) %0) local_unnamed_addr #1 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 80
  store double 0.000000e+00, ptr %2, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %0, i64 88
  tail call void @_ZN6Points12random_orderERSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(24) %3)
  %4 = load i32, ptr %0, align 8, !tbaa !24
  %5 = icmp sgt i32 %4, 1
  br i1 %5, label %.lr.ph36, label %._crit_edge37

.lr.ph36:                                         ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 56
  br label %7

._crit_edge37:                                    ; preds = %._crit_edge.thread, %1
  ret void

7:                                                ; preds = %.lr.ph36, %._crit_edge.thread
  %indvars.iv41 = phi i64 [ 1, %.lr.ph36 ], [ %indvars.iv.next42, %._crit_edge.thread ]
  %indvars.iv = phi i64 [ 2, %.lr.ph36 ], [ %indvars.iv.next, %._crit_edge.thread ]
  %8 = add nsw i64 %indvars.iv41, -1
  %9 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %8) #2
  %10 = load i32, ptr %9, align 4, !tbaa !25
  %11 = sext i32 %10 to i64
  %12 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %11) #2
  %13 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv41) #2
  %14 = load i32, ptr %13, align 4, !tbaa !25
  %15 = sext i32 %14 to i64
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %15) #2
  %17 = load double, ptr %16, align 8, !tbaa !26
  %18 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv41) #2
  %indvars.iv.next42 = add nuw nsw i64 %indvars.iv41, 1
  %19 = load i32, ptr %0, align 8, !tbaa !24
  %20 = sext i32 %19 to i64
  %21 = icmp slt i64 %indvars.iv.next42, %20
  br i1 %21, label %.lr.ph.preheader, label %._crit_edge.thread

.lr.ph.preheader:                                 ; preds = %7
  %22 = load i32, ptr %18, align 4, !tbaa !25
  br label %.lr.ph

._crit_edge:                                      ; preds = %46
  %23 = icmp sgt i32 %.1, 0
  br i1 %23, label %50, label %._crit_edge.thread

.lr.ph:                                           ; preds = %.lr.ph.preheader, %46
  %indvars.iv38 = phi i64 [ %indvars.iv.next39, %46 ], [ %indvars.iv, %.lr.ph.preheader ]
  %.02330 = phi i32 [ %.1, %46 ], [ 0, %.lr.ph.preheader ]
  %.02429 = phi i32 [ %.125, %46 ], [ %22, %.lr.ph.preheader ]
  %.02628 = phi double [ %.127, %46 ], [ %17, %.lr.ph.preheader ]
  %24 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %8) #2
  %25 = load i32, ptr %24, align 4, !tbaa !25
  %26 = sext i32 %25 to i64
  %27 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %26) #2
  %28 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv38) #2
  %29 = load i32, ptr %28, align 4, !tbaa !25
  %30 = sext i32 %29 to i64
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %30) #2
  %32 = load double, ptr %31, align 8, !tbaa !26
  %33 = fcmp ogt double %.02628, %32
  br i1 %33, label %34, label %46

34:                                               ; preds = %.lr.ph
  %35 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %8) #2
  %36 = load i32, ptr %35, align 4, !tbaa !25
  %37 = sext i32 %36 to i64
  %38 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %37) #2
  %39 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv38) #2
  %40 = load i32, ptr %39, align 4, !tbaa !25
  %41 = sext i32 %40 to i64
  %42 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %41) #2
  %43 = load double, ptr %42, align 8, !tbaa !26
  %44 = add nsw i32 %.02330, 1
  %45 = trunc nuw nsw i64 %indvars.iv38 to i32
  br label %46

46:                                               ; preds = %.lr.ph, %34
  %.127 = phi double [ %43, %34 ], [ %.02628, %.lr.ph ]
  %.125 = phi i32 [ %45, %34 ], [ %.02429, %.lr.ph ]
  %.1 = phi i32 [ %44, %34 ], [ %.02330, %.lr.ph ]
  %indvars.iv.next39 = add nuw nsw i64 %indvars.iv38, 1
  %47 = load i32, ptr %0, align 8, !tbaa !24
  %48 = trunc nuw i64 %indvars.iv.next39 to i32
  %49 = icmp sgt i32 %47, %48
  br i1 %49, label %.lr.ph, label %._crit_edge, !llvm.loop !27

50:                                               ; preds = %._crit_edge
  %51 = sext i32 %.125 to i64
  %52 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %51) #2
  %53 = load i32, ptr %52, align 4, !tbaa !25
  %54 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv41) #2
  %55 = load i32, ptr %54, align 4, !tbaa !25
  %56 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %51) #2
  store i32 %55, ptr %56, align 4, !tbaa !25
  %57 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv41) #2
  store i32 %53, ptr %57, align 4, !tbaa !25
  %.pre = load i32, ptr %0, align 8, !tbaa !24
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %7, %50, %._crit_edge
  %.026.lcssa47 = phi double [ %.127, %50 ], [ %.127, %._crit_edge ], [ %17, %7 ]
  %58 = phi i32 [ %.pre, %50 ], [ %47, %._crit_edge ], [ %19, %7 ]
  %59 = load double, ptr %2, align 8, !tbaa !5
  %60 = fadd double %.026.lcssa47, %59
  store double %60, ptr %2, align 8, !tbaa !5
  %61 = sext i32 %58 to i64
  %62 = icmp slt i64 %indvars.iv.next42, %61
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  br i1 %62, label %7, label %._crit_edge37, !llvm.loop !29
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Points12random_orderERSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

attributes #0 = { 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 #1 = { 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 = { 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, !19, i64 80}
!6 = !{!"_ZTS6Points", !7, i64 0, !10, i64 8, !10, i64 32, !15, i64 56, !19, i64 80, !20, i64 88}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIdSaIdEE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTSSt6vectorIS_IdSaIdEESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!19 = !{!"double", !8, i64 0}
!20 = !{!"_ZTSSt6vectorIiSaIiEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!24 = !{!6, !7, i64 0}
!25 = !{!7, !7, i64 0}
!26 = !{!19, !19, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass