; LLVM IR from kazulagi/plantFEM :: src/RouteOptimizationClass/TSP_enum_greedy_roop.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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { 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 }
%"class.std::allocator.7" = type { i8 }
%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 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; 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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Points6greedyEv(ptr noundef nonnull align 8 dereferenceable(112) %0) #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  %4 = alloca %"class.std::vector.5", align 8
  %5 = alloca %"class.std::allocator.7", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %19 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #5
  %20 = getelementptr inbounds %class.Points, ptr %19, i32 0, i32 0
  %21 = load i32, ptr %20, align 8, !tbaa !9
  %22 = sext i32 %21 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %22, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %23 unwind label %29

23:                                               ; preds = %1
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 1000000, ptr %8, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !25
  br label %24

24:                                               ; preds = %225, %23
  %25 = load i32, ptr %9, align 4, !tbaa !25
  %26 = load i32, ptr %8, align 4, !tbaa !25
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %33, label %28

28:                                               ; preds = %24
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %228

29:                                               ; preds = %1
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %6, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  br label %229

33:                                               ; preds = %24
  invoke void @_ZN6Points12random_orderERSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(112) %19, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %34 unwind label %41

34:                                               ; preds = %33
  store double 0.000000e+00, ptr %3, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 1, ptr %11, align 4, !tbaa !25
  br label %35

35:                                               ; preds = %137, %34
  %36 = load i32, ptr %11, align 4, !tbaa !25
  %37 = getelementptr inbounds %class.Points, ptr %19, i32 0, i32 0
  %38 = load i32, ptr %37, align 8, !tbaa !9
  %39 = icmp slt i32 %36, %38
  br i1 %39, label %45, label %40

40:                                               ; preds = %35
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %140

41:                                               ; preds = %221, %217, %215, %212, %33
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %6, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  br label %229

45:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %46 = getelementptr inbounds %class.Points, ptr %19, i32 0, i32 3
  %47 = load i32, ptr %11, align 4, !tbaa !25
  %48 = sub nsw i32 %47, 1
  %49 = sext i32 %48 to i64
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %49) #5
  %51 = load i32, ptr %50, align 4, !tbaa !25
  %52 = sext i32 %51 to i64
  %53 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %52) #5
  %54 = load i32, ptr %11, align 4, !tbaa !25
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %55) #5
  %57 = load i32, ptr %56, align 4, !tbaa !25
  %58 = sext i32 %57 to i64
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %58) #5
  %60 = load double, ptr %59, align 8, !tbaa !26
  store double %60, ptr %12, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %61 = load i32, ptr %11, align 4, !tbaa !25
  %62 = sext i32 %61 to i64
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %62) #5
  %64 = load i32, ptr %63, align 4, !tbaa !25
  store i32 %64, ptr %13, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %65 = load i32, ptr %11, align 4, !tbaa !25
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %15, align 4, !tbaa !25
  br label %67

67:                                               ; preds = %111, %45
  %68 = load i32, ptr %15, align 4, !tbaa !25
  %69 = getelementptr inbounds %class.Points, ptr %19, i32 0, i32 0
  %70 = load i32, ptr %69, align 8, !tbaa !9
  %71 = icmp slt i32 %68, %70
  br i1 %71, label %73, label %72

72:                                               ; preds = %67
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %114

73:                                               ; preds = %67
  %74 = load double, ptr %12, align 8, !tbaa !26
  %75 = getelementptr inbounds %class.Points, ptr %19, i32 0, i32 3
  %76 = load i32, ptr %11, align 4, !tbaa !25
  %77 = sub nsw i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %78) #5
  %80 = load i32, ptr %79, align 4, !tbaa !25
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %81) #5
  %83 = load i32, ptr %15, align 4, !tbaa !25
  %84 = sext i32 %83 to i64
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %84) #5
  %86 = load i32, ptr %85, align 4, !tbaa !25
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %87) #5
  %89 = load double, ptr %88, align 8, !tbaa !26
  %90 = fcmp ogt double %74, %89
  br i1 %90, label %91, label %110

91:                                               ; preds = %73
  %92 = getelementptr inbounds %class.Points, ptr %19, i32 0, i32 3
  %93 = load i32, ptr %11, align 4, !tbaa !25
  %94 = sub nsw i32 %93, 1
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %95) #5
  %97 = load i32, ptr %96, align 4, !tbaa !25
  %98 = sext i32 %97 to i64
  %99 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %92, i64 noundef %98) #5
  %100 = load i32, ptr %15, 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) %4, i64 noundef %101) #5
  %103 = load i32, ptr %102, align 4, !tbaa !25
  %104 = sext i32 %103 to i64
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %104) #5
  %106 = load double, ptr %105, align 8, !tbaa !26
  store double %106, ptr %12, align 8, !tbaa !26
  %107 = load i32, ptr %15, align 4, !tbaa !25
  store i32 %107, ptr %13, align 4, !tbaa !25
  %108 = load i32, ptr %14, align 4, !tbaa !25
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %14, align 4, !tbaa !25
  br label %110

110:                                              ; preds = %91, %73
  br label %111

111:                                              ; preds = %110
  %112 = load i32, ptr %15, align 4, !tbaa !25
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %15, align 4, !tbaa !25
  br label %67, !llvm.loop !27

114:                                              ; preds = %72
  %115 = load i32, ptr %14, align 4, !tbaa !25
  %116 = icmp sgt i32 %115, 0
  br i1 %116, label %117, label %133

117:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %118 = load i32, ptr %13, align 4, !tbaa !25
  %119 = sext i32 %118 to i64
  %120 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %119) #5
  %121 = load i32, ptr %120, align 4, !tbaa !25
  store i32 %121, ptr %16, align 4, !tbaa !25
  %122 = load i32, ptr %11, align 4, !tbaa !25
  %123 = sext i32 %122 to i64
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %123) #5
  %125 = load i32, ptr %124, align 4, !tbaa !25
  %126 = load i32, ptr %13, align 4, !tbaa !25
  %127 = sext i32 %126 to i64
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %127) #5
  store i32 %125, ptr %128, align 4, !tbaa !25
  %129 = load i32, ptr %16, align 4, !tbaa !25
  %130 = load i32, ptr %11, align 4, !tbaa !25
  %131 = sext i32 %130 to i64
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %131) #5
  store i32 %129, ptr %132, align 4, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %133

133:                                              ; preds = %117, %114
  %134 = load double, ptr %12, align 8, !tbaa !26
  %135 = load double, ptr %3, align 8, !tbaa !26
  %136 = fadd double %135, %134
  store double %136, ptr %3, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %137

137:                                              ; preds = %133
  %138 = load i32, ptr %11, align 4, !tbaa !25
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %11, align 4, !tbaa !25
  br label %35, !llvm.loop !29

140:                                              ; preds = %40
  %141 = getelementptr inbounds %class.Points, ptr %19, i32 0, i32 3
  %142 = getelementptr inbounds %class.Points, ptr %19, i32 0, i32 0
  %143 = load i32, ptr %142, align 8, !tbaa !9
  %144 = sub nsw i32 %143, 1
  %145 = sext i32 %144 to i64
  %146 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %145) #5
  %147 = load i32, ptr %146, align 4, !tbaa !25
  %148 = sext i32 %147 to i64
  %149 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %141, i64 noundef %148) #5
  %150 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 0) #5
  %151 = load i32, ptr %150, align 4, !tbaa !25
  %152 = sext i32 %151 to i64
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %149, i64 noundef %152) #5
  %154 = load double, ptr %153, align 8, !tbaa !26
  %155 = load double, ptr %3, align 8, !tbaa !26
  %156 = fadd double %155, %154
  store double %156, ptr %3, align 8, !tbaa !26
  %157 = load i32, ptr %9, align 4, !tbaa !25
  %158 = icmp eq i32 %157, 0
  br i1 %158, label %159, label %181

159:                                              ; preds = %140
  %160 = load double, ptr %3, align 8, !tbaa !26
  %161 = getelementptr inbounds %class.Points, ptr %19, i32 0, i32 4
  store double %160, ptr %161, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !25
  br label %162

162:                                              ; preds = %177, %159
  %163 = load i32, ptr %17, align 4, !tbaa !25
  %164 = getelementptr inbounds %class.Points, ptr %19, i32 0, i32 0
  %165 = load i32, ptr %164, align 8, !tbaa !9
  %166 = icmp slt i32 %163, %165
  br i1 %166, label %168, label %167

167:                                              ; preds = %162
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %180

168:                                              ; preds = %162
  %169 = load i32, ptr %17, align 4, !tbaa !25
  %170 = sext i32 %169 to i64
  %171 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %170) #5
  %172 = load i32, ptr %171, align 4, !tbaa !25
  %173 = getelementptr inbounds %class.Points, ptr %19, i32 0, i32 5
  %174 = load i32, ptr %17, align 4, !tbaa !25
  %175 = sext i32 %174 to i64
  %176 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %173, i64 noundef %175) #5
  store i32 %172, ptr %176, align 4, !tbaa !25
  br label %177

177:                                              ; preds = %168
  %178 = load i32, ptr %17, align 4, !tbaa !25
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %17, align 4, !tbaa !25
  br label %162, !llvm.loop !31

180:                                              ; preds = %167
  br label %181

181:                                              ; preds = %180, %140
  %182 = load double, ptr %3, align 8, !tbaa !26
  %183 = getelementptr inbounds %class.Points, ptr %19, i32 0, i32 4
  %184 = load double, ptr %183, align 8, !tbaa !30
  %185 = fcmp olt double %182, %184
  br i1 %185, label %186, label %208

186:                                              ; preds = %181
  %187 = load double, ptr %3, align 8, !tbaa !26
  %188 = getelementptr inbounds %class.Points, ptr %19, i32 0, i32 4
  store double %187, ptr %188, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !25
  br label %189

189:                                              ; preds = %204, %186
  %190 = load i32, ptr %18, align 4, !tbaa !25
  %191 = getelementptr inbounds %class.Points, ptr %19, i32 0, i32 0
  %192 = load i32, ptr %191, align 8, !tbaa !9
  %193 = icmp slt i32 %190, %192
  br i1 %193, label %195, label %194

194:                                              ; preds = %189
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %207

195:                                              ; preds = %189
  %196 = load i32, ptr %18, align 4, !tbaa !25
  %197 = sext i32 %196 to i64
  %198 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %197) #5
  %199 = load i32, ptr %198, align 4, !tbaa !25
  %200 = getelementptr inbounds %class.Points, ptr %19, i32 0, i32 5
  %201 = load i32, ptr %18, align 4, !tbaa !25
  %202 = sext i32 %201 to i64
  %203 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %200, i64 noundef %202) #5
  store i32 %199, ptr %203, align 4, !tbaa !25
  br label %204

204:                                              ; preds = %195
  %205 = load i32, ptr %18, align 4, !tbaa !25
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %18, align 4, !tbaa !25
  br label %189, !llvm.loop !32

207:                                              ; preds = %194
  br label %208

208:                                              ; preds = %207, %181
  %209 = load i32, ptr %9, align 4, !tbaa !25
  %210 = srem i32 %209, 2000
  %211 = icmp eq i32 %210, 0
  br i1 %211, label %212, label %224

212:                                              ; preds = %208
  %213 = load i32, ptr %9, align 4, !tbaa !25
  %214 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %213)
          to label %215 unwind label %41

215:                                              ; preds = %212
  %216 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %214, ptr noundef @.str)
          to label %217 unwind label %41

217:                                              ; preds = %215
  %218 = getelementptr inbounds %class.Points, ptr %19, i32 0, i32 4
  %219 = load double, ptr %218, align 8, !tbaa !30
  %220 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %216, double noundef %219)
          to label %221 unwind label %41

221:                                              ; preds = %217
  %222 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %220, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %223 unwind label %41

223:                                              ; preds = %221
  br label %224

224:                                              ; preds = %223, %208
  br label %225

225:                                              ; preds = %224
  %226 = load i32, ptr %9, align 4, !tbaa !25
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %9, align 4, !tbaa !25
  br label %24, !llvm.loop !33

228:                                              ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret void

229:                                              ; preds = %41, %29
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %230

230:                                              ; preds = %229
  %231 = load ptr, ptr %6, align 8
  %232 = load i32, ptr %7, align 4
  %233 = insertvalue { ptr, i32 } poison, ptr %231, 0
  %234 = insertvalue { ptr, i32 } %233, i32 %232, 1
  resume { ptr, i32 } %234
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 = { 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 #3 = { "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 = { 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, !11, i64 0}
!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 = !{!20, !20, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}
!30 = !{!10, !20, i64 80}
!31 = distinct !{!31, !28}
!32 = distinct !{!32, !28}
!33 = distinct !{!33, !28}


; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { 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 }
%"class.std::allocator.7" = type { i8 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

declare i32 @__gxx_personality_v0(...)

; 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 #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Points6greedyEv(ptr noundef nonnull align 8 dereferenceable(112) %0) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector.5", align 8
  %3 = alloca %"class.std::allocator.7", align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #5
  %4 = load i32, ptr %0, align 8, !tbaa !5
  %5 = sext i32 %4 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %5, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %6 unwind label %11

6:                                                ; preds = %1
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  %8 = getelementptr inbounds i8, ptr %0, i64 80
  %9 = getelementptr inbounds i8, ptr %0, i64 88
  br label %13

10:                                               ; preds = %116
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  ret void

11:                                               ; preds = %1
  %12 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  br label %118

13:                                               ; preds = %6, %116
  %.05277 = phi i32 [ 0, %6 ], [ %117, %116 ]
  invoke void @_ZN6Points12random_orderERSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %.preheader unwind label %29

.preheader:                                       ; preds = %13
  %14 = load i32, ptr %0, align 8, !tbaa !5
  %15 = icmp sgt i32 %14, 1
  br i1 %15, label %.lr.ph67, label %._crit_edge68

._crit_edge68:                                    ; preds = %._crit_edge.thread, %.preheader
  %.044.lcssa = phi double [ 0.000000e+00, %.preheader ], [ %82, %._crit_edge.thread ]
  %.lcssa = phi i32 [ %14, %.preheader ], [ %81, %._crit_edge.thread ]
  %16 = add nsw i32 %.lcssa, -1
  %17 = sext i32 %16 to i64
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %17) #5
  %19 = load i32, ptr %18, align 4, !tbaa !24
  %20 = sext i32 %19 to i64
  %21 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %20) #5
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #5
  %23 = load i32, ptr %22, align 4, !tbaa !24
  %24 = sext i32 %23 to i64
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %24) #5
  %26 = load double, ptr %25, align 8, !tbaa !25
  %27 = fadd double %.044.lcssa, %26
  %28 = icmp eq i32 %.05277, 0
  br i1 %28, label %85, label %.loopexit58

29:                                               ; preds = %114, %111, %109, %107, %13
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  br label %118

.lr.ph67:                                         ; preds = %.preheader, %._crit_edge.thread
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %._crit_edge.thread ], [ 1, %.preheader ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge.thread ], [ 2, %.preheader ]
  %.04466 = phi double [ %82, %._crit_edge.thread ], [ 0.000000e+00, %.preheader ]
  %31 = add nsw i64 %indvars.iv83, -1
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %31) #5
  %33 = load i32, ptr %32, align 4, !tbaa !24
  %34 = sext i32 %33 to i64
  %35 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %34) #5
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv83) #5
  %37 = load i32, ptr %36, align 4, !tbaa !24
  %38 = sext i32 %37 to i64
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %38) #5
  %40 = load double, ptr %39, align 8, !tbaa !25
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv83) #5
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %42 = load i32, ptr %0, align 8, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = icmp slt i64 %indvars.iv.next84, %43
  br i1 %44, label %.lr.ph.preheader, label %._crit_edge.thread

.lr.ph.preheader:                                 ; preds = %.lr.ph67
  %45 = load i32, ptr %41, align 4, !tbaa !24
  br label %.lr.ph

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

.lr.ph:                                           ; preds = %.lr.ph.preheader, %69
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %69 ], [ %indvars.iv, %.lr.ph.preheader ]
  %.04661 = phi i32 [ %.1, %69 ], [ 0, %.lr.ph.preheader ]
  %.04760 = phi i32 [ %.148, %69 ], [ %45, %.lr.ph.preheader ]
  %.04959 = phi double [ %.150, %69 ], [ %40, %.lr.ph.preheader ]
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %31) #5
  %48 = load i32, ptr %47, align 4, !tbaa !24
  %49 = sext i32 %48 to i64
  %50 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %49) #5
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv80) #5
  %52 = load i32, ptr %51, align 4, !tbaa !24
  %53 = sext i32 %52 to i64
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %50, i64 noundef %53) #5
  %55 = load double, ptr %54, align 8, !tbaa !25
  %56 = fcmp ogt double %.04959, %55
  br i1 %56, label %57, label %69

57:                                               ; preds = %.lr.ph
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %31) #5
  %59 = load i32, ptr %58, align 4, !tbaa !24
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %60) #5
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv80) #5
  %63 = load i32, ptr %62, align 4, !tbaa !24
  %64 = sext i32 %63 to i64
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %64) #5
  %66 = load double, ptr %65, align 8, !tbaa !25
  %67 = add nsw i32 %.04661, 1
  %68 = trunc nuw nsw i64 %indvars.iv80 to i32
  br label %69

69:                                               ; preds = %.lr.ph, %57
  %.150 = phi double [ %66, %57 ], [ %.04959, %.lr.ph ]
  %.148 = phi i32 [ %68, %57 ], [ %.04760, %.lr.ph ]
  %.1 = phi i32 [ %67, %57 ], [ %.04661, %.lr.ph ]
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %70 = load i32, ptr %0, align 8, !tbaa !5
  %71 = trunc nuw i64 %indvars.iv.next81 to i32
  %72 = icmp sgt i32 %70, %71
  br i1 %72, label %.lr.ph, label %._crit_edge, !llvm.loop !26

73:                                               ; preds = %._crit_edge
  %74 = sext i32 %.148 to i64
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %74) #5
  %76 = load i32, ptr %75, align 4, !tbaa !24
  %77 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv83) #5
  %78 = load i32, ptr %77, align 4, !tbaa !24
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %74) #5
  store i32 %78, ptr %79, align 4, !tbaa !24
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv83) #5
  store i32 %76, ptr %80, align 4, !tbaa !24
  %.pre = load i32, ptr %0, align 8, !tbaa !5
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %.lr.ph67, %73, %._crit_edge
  %.049.lcssa95 = phi double [ %.150, %73 ], [ %.150, %._crit_edge ], [ %40, %.lr.ph67 ]
  %81 = phi i32 [ %.pre, %73 ], [ %70, %._crit_edge ], [ %42, %.lr.ph67 ]
  %82 = fadd double %.04466, %.049.lcssa95
  %83 = sext i32 %81 to i64
  %84 = icmp slt i64 %indvars.iv.next84, %83
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  br i1 %84, label %.lr.ph67, label %._crit_edge68, !llvm.loop !28

85:                                               ; preds = %._crit_edge68
  store double %27, ptr %8, align 8, !tbaa !29
  %86 = load i32, ptr %0, align 8, !tbaa !5
  %87 = icmp sgt i32 %86, 0
  br i1 %87, label %.lr.ph73, label %.loopexit58

.lr.ph73:                                         ; preds = %85, %.lr.ph73
  %indvars.iv86 = phi i64 [ %indvars.iv.next87, %.lr.ph73 ], [ 0, %85 ]
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv86) #5
  %89 = load i32, ptr %88, align 4, !tbaa !24
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv86) #5
  store i32 %89, ptr %90, align 4, !tbaa !24
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %91 = load i32, ptr %0, align 8, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = icmp slt i64 %indvars.iv.next87, %92
  br i1 %93, label %.lr.ph73, label %.loopexit58, !llvm.loop !30

.loopexit58:                                      ; preds = %.lr.ph73, %85, %._crit_edge68
  %94 = load double, ptr %8, align 8, !tbaa !29
  %95 = fcmp olt double %27, %94
  br i1 %95, label %96, label %.loopexit

96:                                               ; preds = %.loopexit58
  store double %27, ptr %8, align 8, !tbaa !29
  %97 = load i32, ptr %0, align 8, !tbaa !5
  %98 = icmp sgt i32 %97, 0
  br i1 %98, label %.lr.ph76, label %.loopexit

.lr.ph76:                                         ; preds = %96, %.lr.ph76
  %indvars.iv89 = phi i64 [ %indvars.iv.next90, %.lr.ph76 ], [ 0, %96 ]
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv89) #5
  %100 = load i32, ptr %99, align 4, !tbaa !24
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv89) #5
  store i32 %100, ptr %101, align 4, !tbaa !24
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %102 = load i32, ptr %0, align 8, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = icmp slt i64 %indvars.iv.next90, %103
  br i1 %104, label %.lr.ph76, label %.loopexit, !llvm.loop !31

.loopexit:                                        ; preds = %.lr.ph76, %96, %.loopexit58
  %105 = urem i32 %.05277, 2000
  %106 = icmp eq i32 %105, 0
  br i1 %106, label %107, label %116

107:                                              ; preds = %.loopexit
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.05277)
          to label %109 unwind label %29

109:                                              ; preds = %107
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %108, ptr noundef nonnull @.str)
          to label %111 unwind label %29

111:                                              ; preds = %109
  %112 = load double, ptr %8, align 8, !tbaa !29
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %110, double noundef %112)
          to label %114 unwind label %29

114:                                              ; preds = %111
  %115 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %113, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %116 unwind label %29

116:                                              ; preds = %.loopexit, %114
  %117 = add nuw nsw i32 %.05277, 1
  %exitcond.not = icmp eq i32 %117, 1000000
  br i1 %exitcond.not, label %10, label %13, !llvm.loop !32

118:                                              ; preds = %29, %11
  %.pn = phi { ptr, i32 } [ %30, %29 ], [ %12, %11 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn
}

; 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 #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

attributes #0 = { mustprogress 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 = { 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 #3 = { "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 = { 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, !7, i64 0}
!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 = !{!7, !7, i64 0}
!25 = !{!19, !19, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = !{!6, !19, i64 80}
!30 = distinct !{!30, !27}
!31 = distinct !{!31, !27}
!32 = distinct !{!32, !27}


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