; LLVM IR from VeloxChem/VeloxChem :: src/dft_func/GridPartitioner.ll (ZNK16CGridPartitioner16estimateMedianP2EPKdi)

; 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::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::allocator.0" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = 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::initializer_list.23" = type { ptr, i64 }
%"class.std::allocator.20" = type { i8 }
%"class.std::initializer_list.24" = type { ptr, i64 }

@constinit = external hidden constant [5 x i32], align 4
@constinit.1 = external hidden constant [5 x double], align 8
@constinit.2 = external hidden constant [5 x double], align 8

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZNK16CGridPartitioner16estimateMedianP2EPKdi(ptr noundef nonnull align 8 dereferenceable(28) %0, ptr noundef %1, i32 noundef %2) #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"class.std::allocator.0", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.std::vector.18", align 8
  %15 = alloca %"class.std::initializer_list.23", align 8
  %16 = alloca [5 x i32], align 4
  %17 = alloca %"class.std::allocator.20", align 1
  %18 = alloca %"class.std::vector", align 8
  %19 = alloca %"class.std::initializer_list.24", align 8
  %20 = alloca [5 x double], align 8
  %21 = alloca %"class.std::allocator.0", align 1
  %22 = alloca %"class.std::vector", align 8
  %23 = alloca %"class.std::initializer_list.24", align 8
  %24 = alloca [5 x double], align 8
  %25 = alloca %"class.std::allocator.0", align 1
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca double, align 8
  %33 = alloca i32, align 4
  %34 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %35 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store double 5.000000e-01, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #6
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds double, ptr %37, i64 5
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  invoke void @_ZNSt6vectorIdSaIdEEC2IPKdvEET_S5_RKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef %36, ptr noundef %38, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %39 unwind label %75

39:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  %40 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %41 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %40, ptr %41, align 8
  %42 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %43 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %42, ptr %43, align 8
  %44 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8
  %46 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEEvT_S7_(ptr %45, ptr %47)
          to label %48 unwind label %79

48:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 20, ptr %16) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 @constinit, i64 20, i1 false), !tbaa.struct !13
  %49 = getelementptr inbounds %"class.std::initializer_list.23", ptr %15, i32 0, i32 0
  store ptr %16, ptr %49, align 8, !tbaa !15
  %50 = getelementptr inbounds %"class.std::initializer_list.23", ptr %15, i32 0, i32 1
  store i64 5, ptr %50, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  %51 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8
  %53 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %54 = load i64, ptr %53, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr %52, i64 %54, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %55 unwind label %83

55:                                               ; preds = %48
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 20, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr %20) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 @constinit.1, i64 40, i1 false), !tbaa.struct !19
  %56 = getelementptr inbounds %"class.std::initializer_list.24", ptr %19, i32 0, i32 0
  store ptr %20, ptr %56, align 8, !tbaa !20
  %57 = getelementptr inbounds %"class.std::initializer_list.24", ptr %19, i32 0, i32 1
  store i64 5, ptr %57, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  %58 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8
  %60 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 1
  %61 = load i64, ptr %60, align 8
  invoke void @_ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr %59, i64 %61, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %62 unwind label %87

62:                                               ; preds = %55
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr %24) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 @constinit.2, i64 40, i1 false), !tbaa.struct !19
  %63 = getelementptr inbounds %"class.std::initializer_list.24", ptr %23, i32 0, i32 0
  store ptr %24, ptr %63, align 8, !tbaa !20
  %64 = getelementptr inbounds %"class.std::initializer_list.24", ptr %23, i32 0, i32 1
  store i64 5, ptr %64, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #6
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #6
  %65 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8
  %67 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 1
  %68 = load i64, ptr %67, align 8
  invoke void @_ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr %66, i64 %68, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %69 unwind label %91

69:                                               ; preds = %62
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  store i32 5, ptr %26, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %411, %69
  %71 = load i32, ptr %26, align 4, !tbaa !9
  %72 = load i32, ptr %6, align 4, !tbaa !9
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %95, label %74

74:                                               ; preds = %70
  store i32 2, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %414

75:                                               ; preds = %3
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %10, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  br label %420

79:                                               ; preds = %39
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %10, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %11, align 4
  br label %419

83:                                               ; preds = %48
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %10, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 20, ptr %16) #6
  br label %418

87:                                               ; preds = %55
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %10, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #6
  br label %417

91:                                               ; preds = %62
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %10, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  br label %417

95:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  store i32 -1, ptr %28, align 4, !tbaa !9
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = load i32, ptr %26, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds double, ptr %96, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !11
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #6
  %102 = load double, ptr %101, align 8, !tbaa !11
  %103 = fcmp olt double %100, %102
  br i1 %103, label %104, label %111

104:                                              ; preds = %95
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = load i32, ptr %26, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds double, ptr %105, i64 %107
  %109 = load double, ptr %108, align 8, !tbaa !11
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #6
  store double %109, ptr %110, align 8, !tbaa !11
  store i32 0, ptr %28, align 4, !tbaa !9
  br label %162

111:                                              ; preds = %95
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = load i32, ptr %26, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds double, ptr %112, i64 %114
  %116 = load double, ptr %115, align 8, !tbaa !11
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 1) #6
  %118 = load double, ptr %117, align 8, !tbaa !11
  %119 = fcmp olt double %116, %118
  br i1 %119, label %120, label %121

120:                                              ; preds = %111
  store i32 0, ptr %28, align 4, !tbaa !9
  br label %161

121:                                              ; preds = %111
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = load i32, ptr %26, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds double, ptr %122, i64 %124
  %126 = load double, ptr %125, align 8, !tbaa !11
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 2) #6
  %128 = load double, ptr %127, align 8, !tbaa !11
  %129 = fcmp olt double %126, %128
  br i1 %129, label %130, label %131

130:                                              ; preds = %121
  store i32 1, ptr %28, align 4, !tbaa !9
  br label %160

131:                                              ; preds = %121
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = load i32, ptr %26, align 4, !tbaa !9
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds double, ptr %132, i64 %134
  %136 = load double, ptr %135, align 8, !tbaa !11
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 3) #6
  %138 = load double, ptr %137, align 8, !tbaa !11
  %139 = fcmp olt double %136, %138
  br i1 %139, label %140, label %141

140:                                              ; preds = %131
  store i32 2, ptr %28, align 4, !tbaa !9
  br label %159

141:                                              ; preds = %131
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  %143 = load i32, ptr %26, align 4, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds double, ptr %142, i64 %144
  %146 = load double, ptr %145, align 8, !tbaa !11
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 4) #6
  %148 = load double, ptr %147, align 8, !tbaa !11
  %149 = fcmp olt double %146, %148
  br i1 %149, label %150, label %151

150:                                              ; preds = %141
  store i32 3, ptr %28, align 4, !tbaa !9
  br label %158

151:                                              ; preds = %141
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  %153 = load i32, ptr %26, align 4, !tbaa !9
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds double, ptr %152, i64 %154
  %156 = load double, ptr %155, align 8, !tbaa !11
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 4) #6
  store double %156, ptr %157, align 8, !tbaa !11
  store i32 3, ptr %28, align 4, !tbaa !9
  br label %158

158:                                              ; preds = %151, %150
  br label %159

159:                                              ; preds = %158, %140
  br label %160

160:                                              ; preds = %159, %130
  br label %161

161:                                              ; preds = %160, %120
  br label %162

162:                                              ; preds = %161, %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  %163 = load i32, ptr %28, align 4, !tbaa !9
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %29, align 4, !tbaa !9
  br label %165

165:                                              ; preds = %175, %162
  %166 = load i32, ptr %29, align 4, !tbaa !9
  %167 = icmp slt i32 %166, 5
  br i1 %167, label %169, label %168

168:                                              ; preds = %165
  store i32 5, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %178

169:                                              ; preds = %165
  %170 = load i32, ptr %29, align 4, !tbaa !9
  %171 = sext i32 %170 to i64
  %172 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %171) #6
  %173 = load i32, ptr %172, align 4, !tbaa !9
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %172, align 4, !tbaa !9
  br label %175

175:                                              ; preds = %169
  %176 = load i32, ptr %29, align 4, !tbaa !9
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %29, align 4, !tbaa !9
  br label %165, !llvm.loop !23

178:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 0, ptr %30, align 4, !tbaa !9
  br label %179

179:                                              ; preds = %193, %178
  %180 = load i32, ptr %30, align 4, !tbaa !9
  %181 = icmp slt i32 %180, 5
  br i1 %181, label %183, label %182

182:                                              ; preds = %179
  store i32 8, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %196

183:                                              ; preds = %179
  %184 = load i32, ptr %30, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %185) #6
  %187 = load double, ptr %186, align 8, !tbaa !11
  %188 = load i32, ptr %30, align 4, !tbaa !9
  %189 = sext i32 %188 to i64
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %189) #6
  %191 = load double, ptr %190, align 8, !tbaa !11
  %192 = fadd double %191, %187
  store double %192, ptr %190, align 8, !tbaa !11
  br label %193

193:                                              ; preds = %183
  %194 = load i32, ptr %30, align 4, !tbaa !9
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %30, align 4, !tbaa !9
  br label %179, !llvm.loop !25

196:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  store i32 1, ptr %31, align 4, !tbaa !9
  br label %197

197:                                              ; preds = %407, %196
  %198 = load i32, ptr %31, align 4, !tbaa !9
  %199 = icmp slt i32 %198, 4
  br i1 %199, label %201, label %200

200:                                              ; preds = %197
  store i32 11, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %410

201:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  %202 = load i32, ptr %31, align 4, !tbaa !9
  %203 = sext i32 %202 to i64
  %204 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %203) #6
  %205 = load double, ptr %204, align 8, !tbaa !11
  %206 = load i32, ptr %31, align 4, !tbaa !9
  %207 = sext i32 %206 to i64
  %208 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %207) #6
  %209 = load i32, ptr %208, align 4, !tbaa !9
  %210 = sitofp i32 %209 to double
  %211 = fsub double %205, %210
  store double %211, ptr %32, align 8, !tbaa !11
  %212 = load double, ptr %32, align 8, !tbaa !11
  %213 = fcmp oge double %212, 1.000000e+00
  br i1 %213, label %214, label %227

214:                                              ; preds = %201
  %215 = load i32, ptr %31, align 4, !tbaa !9
  %216 = add nsw i32 %215, 1
  %217 = sext i32 %216 to i64
  %218 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %217) #6
  %219 = load i32, ptr %218, align 4, !tbaa !9
  %220 = load i32, ptr %31, align 4, !tbaa !9
  %221 = sext i32 %220 to i64
  %222 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %221) #6
  %223 = load i32, ptr %222, align 4, !tbaa !9
  %224 = sub nsw i32 %219, %223
  %225 = sitofp i32 %224 to double
  %226 = fcmp ogt double %225, 1.000000e+00
  br i1 %226, label %243, label %227

227:                                              ; preds = %214, %201
  %228 = load double, ptr %32, align 8, !tbaa !11
  %229 = fcmp ole double %228, -1.000000e+00
  br i1 %229, label %230, label %406

230:                                              ; preds = %227
  %231 = load i32, ptr %31, align 4, !tbaa !9
  %232 = sub nsw i32 %231, 1
  %233 = sext i32 %232 to i64
  %234 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %233) #6
  %235 = load i32, ptr %234, align 4, !tbaa !9
  %236 = load i32, ptr %31, align 4, !tbaa !9
  %237 = sext i32 %236 to i64
  %238 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %237) #6
  %239 = load i32, ptr %238, align 4, !tbaa !9
  %240 = sub nsw i32 %235, %239
  %241 = sitofp i32 %240 to double
  %242 = fcmp olt double %241, -1.000000e+00
  br i1 %242, label %243, label %406

243:                                              ; preds = %230, %214
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  store i32 0, ptr %33, align 4, !tbaa !9
  %244 = load double, ptr %32, align 8, !tbaa !11
  %245 = fcmp ogt double %244, 0.000000e+00
  br i1 %245, label %246, label %247

246:                                              ; preds = %243
  store i32 1, ptr %33, align 4, !tbaa !9
  br label %252

247:                                              ; preds = %243
  %248 = load double, ptr %32, align 8, !tbaa !11
  %249 = fcmp olt double %248, 0.000000e+00
  br i1 %249, label %250, label %251

250:                                              ; preds = %247
  store i32 -1, ptr %33, align 4, !tbaa !9
  br label %251

251:                                              ; preds = %250, %247
  br label %252

252:                                              ; preds = %251, %246
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  %253 = load i32, ptr %31, align 4, !tbaa !9
  %254 = sext i32 %253 to i64
  %255 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %254) #6
  %256 = load double, ptr %255, align 8, !tbaa !11
  %257 = load i32, ptr %33, align 4, !tbaa !9
  %258 = sitofp i32 %257 to double
  %259 = load i32, ptr %31, align 4, !tbaa !9
  %260 = add nsw i32 %259, 1
  %261 = sext i32 %260 to i64
  %262 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %261) #6
  %263 = load i32, ptr %262, align 4, !tbaa !9
  %264 = load i32, ptr %31, align 4, !tbaa !9
  %265 = sub nsw i32 %264, 1
  %266 = sext i32 %265 to i64
  %267 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %266) #6
  %268 = load i32, ptr %267, align 4, !tbaa !9
  %269 = sub nsw i32 %263, %268
  %270 = sitofp i32 %269 to double
  %271 = fdiv double %258, %270
  %272 = load i32, ptr %31, align 4, !tbaa !9
  %273 = sext i32 %272 to i64
  %274 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %273) #6
  %275 = load i32, ptr %274, align 4, !tbaa !9
  %276 = load i32, ptr %31, align 4, !tbaa !9
  %277 = sub nsw i32 %276, 1
  %278 = sext i32 %277 to i64
  %279 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %278) #6
  %280 = load i32, ptr %279, align 4, !tbaa !9
  %281 = sub nsw i32 %275, %280
  %282 = load i32, ptr %33, align 4, !tbaa !9
  %283 = add nsw i32 %281, %282
  %284 = sitofp i32 %283 to double
  %285 = load i32, ptr %31, align 4, !tbaa !9
  %286 = add nsw i32 %285, 1
  %287 = sext i32 %286 to i64
  %288 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %287) #6
  %289 = load double, ptr %288, align 8, !tbaa !11
  %290 = load i32, ptr %31, align 4, !tbaa !9
  %291 = sext i32 %290 to i64
  %292 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %291) #6
  %293 = load double, ptr %292, align 8, !tbaa !11
  %294 = fsub double %289, %293
  %295 = fmul double %284, %294
  %296 = load i32, ptr %31, align 4, !tbaa !9
  %297 = add nsw i32 %296, 1
  %298 = sext i32 %297 to i64
  %299 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %298) #6
  %300 = load i32, ptr %299, align 4, !tbaa !9
  %301 = load i32, ptr %31, align 4, !tbaa !9
  %302 = sext i32 %301 to i64
  %303 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %302) #6
  %304 = load i32, ptr %303, align 4, !tbaa !9
  %305 = sub nsw i32 %300, %304
  %306 = sitofp i32 %305 to double
  %307 = fdiv double %295, %306
  %308 = load i32, ptr %31, align 4, !tbaa !9
  %309 = add nsw i32 %308, 1
  %310 = sext i32 %309 to i64
  %311 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %310) #6
  %312 = load i32, ptr %311, align 4, !tbaa !9
  %313 = load i32, ptr %31, align 4, !tbaa !9
  %314 = sext i32 %313 to i64
  %315 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %314) #6
  %316 = load i32, ptr %315, align 4, !tbaa !9
  %317 = sub nsw i32 %312, %316
  %318 = load i32, ptr %33, align 4, !tbaa !9
  %319 = sub nsw i32 %317, %318
  %320 = sitofp i32 %319 to double
  %321 = load i32, ptr %31, align 4, !tbaa !9
  %322 = sext i32 %321 to i64
  %323 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %322) #6
  %324 = load double, ptr %323, align 8, !tbaa !11
  %325 = load i32, ptr %31, align 4, !tbaa !9
  %326 = sub nsw i32 %325, 1
  %327 = sext i32 %326 to i64
  %328 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %327) #6
  %329 = load double, ptr %328, align 8, !tbaa !11
  %330 = fsub double %324, %329
  %331 = fmul double %320, %330
  %332 = load i32, ptr %31, align 4, !tbaa !9
  %333 = sext i32 %332 to i64
  %334 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %333) #6
  %335 = load i32, ptr %334, align 4, !tbaa !9
  %336 = load i32, ptr %31, align 4, !tbaa !9
  %337 = sub nsw i32 %336, 1
  %338 = sext i32 %337 to i64
  %339 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %338) #6
  %340 = load i32, ptr %339, align 4, !tbaa !9
  %341 = sub nsw i32 %335, %340
  %342 = sitofp i32 %341 to double
  %343 = fdiv double %331, %342
  %344 = fadd double %307, %343
  %345 = call double @llvm.fmuladd.f64(double %271, double %344, double %256)
  store double %345, ptr %34, align 8, !tbaa !11
  %346 = load i32, ptr %31, align 4, !tbaa !9
  %347 = sub nsw i32 %346, 1
  %348 = sext i32 %347 to i64
  %349 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %348) #6
  %350 = load double, ptr %349, align 8, !tbaa !11
  %351 = load double, ptr %34, align 8, !tbaa !11
  %352 = fcmp olt double %350, %351
  br i1 %352, label %353, label %366

353:                                              ; preds = %252
  %354 = load double, ptr %34, align 8, !tbaa !11
  %355 = load i32, ptr %31, align 4, !tbaa !9
  %356 = add nsw i32 %355, 1
  %357 = sext i32 %356 to i64
  %358 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %357) #6
  %359 = load double, ptr %358, align 8, !tbaa !11
  %360 = fcmp olt double %354, %359
  br i1 %360, label %361, label %366

361:                                              ; preds = %353
  %362 = load double, ptr %34, align 8, !tbaa !11
  %363 = load i32, ptr %31, align 4, !tbaa !9
  %364 = sext i32 %363 to i64
  %365 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %364) #6
  store double %362, ptr %365, align 8, !tbaa !11
  br label %399

366:                                              ; preds = %353, %252
  %367 = load i32, ptr %33, align 4, !tbaa !9
  %368 = sitofp i32 %367 to double
  %369 = load i32, ptr %31, align 4, !tbaa !9
  %370 = load i32, ptr %33, align 4, !tbaa !9
  %371 = add nsw i32 %369, %370
  %372 = sext i32 %371 to i64
  %373 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %372) #6
  %374 = load double, ptr %373, align 8, !tbaa !11
  %375 = load i32, ptr %31, align 4, !tbaa !9
  %376 = sext i32 %375 to i64
  %377 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %376) #6
  %378 = load double, ptr %377, align 8, !tbaa !11
  %379 = fsub double %374, %378
  %380 = fmul double %368, %379
  %381 = load i32, ptr %31, align 4, !tbaa !9
  %382 = load i32, ptr %33, align 4, !tbaa !9
  %383 = add nsw i32 %381, %382
  %384 = sext i32 %383 to i64
  %385 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %384) #6
  %386 = load i32, ptr %385, align 4, !tbaa !9
  %387 = load i32, ptr %31, align 4, !tbaa !9
  %388 = sext i32 %387 to i64
  %389 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %388) #6
  %390 = load i32, ptr %389, align 4, !tbaa !9
  %391 = sub nsw i32 %386, %390
  %392 = sitofp i32 %391 to double
  %393 = fdiv double %380, %392
  %394 = load i32, ptr %31, align 4, !tbaa !9
  %395 = sext i32 %394 to i64
  %396 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %395) #6
  %397 = load double, ptr %396, align 8, !tbaa !11
  %398 = fadd double %397, %393
  store double %398, ptr %396, align 8, !tbaa !11
  br label %399

399:                                              ; preds = %366, %361
  %400 = load i32, ptr %33, align 4, !tbaa !9
  %401 = load i32, ptr %31, align 4, !tbaa !9
  %402 = sext i32 %401 to i64
  %403 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %402) #6
  %404 = load i32, ptr %403, align 4, !tbaa !9
  %405 = add nsw i32 %404, %400
  store i32 %405, ptr %403, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  br label %406

406:                                              ; preds = %399, %230, %227
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  br label %407

407:                                              ; preds = %406
  %408 = load i32, ptr %31, align 4, !tbaa !9
  %409 = add nsw i32 %408, 1
  store i32 %409, ptr %31, align 4, !tbaa !9
  br label %197, !llvm.loop !26

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

411:                                              ; preds = %410
  %412 = load i32, ptr %26, align 4, !tbaa !9
  %413 = add nsw i32 %412, 1
  store i32 %413, ptr %26, align 4, !tbaa !9
  br label %70, !llvm.loop !27

414:                                              ; preds = %74
  %415 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 2) #6
  %416 = load double, ptr %415, align 8, !tbaa !11
  store i32 1, ptr %27, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret double %416

417:                                              ; preds = %91, %87
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  br label %418

418:                                              ; preds = %417, %83
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  br label %419

419:                                              ; preds = %418, %79
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  br label %420

420:                                              ; preds = %419, %75
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %421

421:                                              ; preds = %420
  %422 = load ptr, ptr %10, align 8
  %423 = load i32, ptr %11, align 4
  %424 = insertvalue { ptr, i32 } poison, ptr %422, 0
  %425 = insertvalue { ptr, i32 } %424, i32 %423, 1
  resume { ptr, i32 } %425
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEEvT_S7_(ptr, ptr) #4

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

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

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 #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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{i64 0, i64 20, !14}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTSSt16initializer_listIiE", !6, i64 0, !17, i64 8}
!17 = !{!"long", !7, i64 0}
!18 = !{!16, !17, i64 8}
!19 = !{i64 0, i64 40, !14}
!20 = !{!21, !6, i64 0}
!21 = !{!"_ZTSSt16initializer_listIdE", !6, i64 0, !17, i64 8}
!22 = !{!21, !17, i64 8}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}
!26 = distinct !{!26, !24}
!27 = distinct !{!27, !24}


; 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::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::allocator.0" = type { i8 }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = 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.20" = type { i8 }

@constinit = external hidden local_unnamed_addr constant [5 x i32], align 4
@constinit.1 = external hidden local_unnamed_addr constant [5 x double], align 8
@constinit.2 = external hidden local_unnamed_addr constant [5 x double], align 8

declare i32 @__gxx_personality_v0(...)

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZNK16CGridPartitioner16estimateMedianP2EPKdi(ptr nocapture noundef nonnull readnone align 8 dereferenceable(28) %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator.0", align 1
  %6 = alloca %"class.std::vector.18", align 8
  %7 = alloca [5 x i32], align 4
  %8 = alloca %"class.std::allocator.20", align 1
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca [5 x double], align 8
  %11 = alloca %"class.std::allocator.0", align 1
  %12 = alloca %"class.std::vector", align 8
  %13 = alloca [5 x double], align 8
  %14 = alloca %"class.std::allocator.0", align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  %15 = getelementptr inbounds i8, ptr %1, i64 40
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt6vectorIdSaIdEEC2IPKdvEET_S5_RKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef %1, ptr noundef nonnull %15, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %16 unwind label %26

16:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  %17 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %18 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEEvT_S7_(ptr %17, ptr %18)
          to label %19 unwind label %28

19:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %7) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(20) %7, ptr noundef nonnull align 4 dereferenceable(20) @constinit, i64 20, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr nonnull %7, i64 5, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %20 unwind label %30

20:                                               ; preds = %19
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %10, ptr noundef nonnull align 8 dereferenceable(40) @constinit.1, i64 40, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  invoke void @_ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr nonnull %10, i64 5, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %21 unwind label %32

21:                                               ; preds = %20
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %13) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %13, ptr noundef nonnull align 8 dereferenceable(40) @constinit.2, i64 40, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #6
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  invoke void @_ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr nonnull %13, i64 5, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %22 unwind label %34

22:                                               ; preds = %21
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #6
  %23 = icmp sgt i32 %2, 5
  br i1 %23, label %.lr.ph.preheader, label %._crit_edge

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

._crit_edge:                                      ; preds = %93, %22
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 2) #6
  %25 = load double, ptr %24, align 8, !tbaa !10
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  ret double %25

26:                                               ; preds = %3
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  br label %221

28:                                               ; preds = %16
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %220

30:                                               ; preds = %19
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %7) #6
  br label %219

32:                                               ; preds = %20
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #6
  br label %218

34:                                               ; preds = %21
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  br label %218

.lr.ph:                                           ; preds = %.lr.ph.preheader, %93
  %indvars.iv114 = phi i64 [ 5, %.lr.ph.preheader ], [ %indvars.iv.next115, %93 ]
  %36 = getelementptr inbounds double, ptr %1, i64 %indvars.iv114
  %37 = load double, ptr %36, align 8, !tbaa !10
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 0) #6
  %39 = load double, ptr %38, align 8, !tbaa !10
  %40 = fcmp olt double %37, %39
  %41 = load double, ptr %36, align 8, !tbaa !10
  br i1 %40, label %.sink.split, label %42

42:                                               ; preds = %.lr.ph
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 1) #6
  %44 = load double, ptr %43, align 8, !tbaa !10
  %45 = fcmp olt double %41, %44
  br i1 %45, label %.preheader120, label %46

46:                                               ; preds = %42
  %47 = load double, ptr %36, align 8, !tbaa !10
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 2) #6
  %49 = load double, ptr %48, align 8, !tbaa !10
  %50 = fcmp olt double %47, %49
  br i1 %50, label %.preheader120, label %51

51:                                               ; preds = %46
  %52 = load double, ptr %36, align 8, !tbaa !10
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 3) #6
  %54 = load double, ptr %53, align 8, !tbaa !10
  %55 = fcmp olt double %52, %54
  br i1 %55, label %.preheader120, label %56

56:                                               ; preds = %51
  %57 = load double, ptr %36, align 8, !tbaa !10
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 4) #6
  %59 = load double, ptr %58, align 8, !tbaa !10
  %60 = fcmp olt double %57, %59
  br i1 %60, label %.preheader120, label %61

61:                                               ; preds = %56
  %62 = load double, ptr %36, align 8, !tbaa !10
  br label %.sink.split

.sink.split:                                      ; preds = %.lr.ph, %61
  %.sink119 = phi i64 [ 4, %61 ], [ 0, %.lr.ph ]
  %.sink = phi double [ %62, %61 ], [ %41, %.lr.ph ]
  %.089.ph = phi i64 [ 4, %61 ], [ 1, %.lr.ph ]
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.sink119) #6
  store double %.sink, ptr %63, align 8, !tbaa !10
  br label %.preheader120

.preheader120:                                    ; preds = %.sink.split, %56, %51, %46, %42
  %indvars.iv.ph = phi i64 [ %.089.ph, %.sink.split ], [ 4, %56 ], [ 3, %51 ], [ 2, %46 ], [ 1, %42 ]
  br label %64

64:                                               ; preds = %.preheader120, %64
  %indvars.iv = phi i64 [ %indvars.iv.next, %64 ], [ %indvars.iv.ph, %.preheader120 ]
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #6
  %66 = load i32, ptr %65, align 4, !tbaa !12
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %65, align 4, !tbaa !12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 5
  br i1 %exitcond.not, label %.preheader99.preheader, label %64, !llvm.loop !14

.preheader99.preheader:                           ; preds = %64
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 0) #6
  %69 = load double, ptr %68, align 8, !tbaa !10
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef 0) #6
  %71 = load double, ptr %70, align 8, !tbaa !10
  %72 = fadd double %69, %71
  store double %72, ptr %70, align 8, !tbaa !10
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 1) #6
  %74 = load double, ptr %73, align 8, !tbaa !10
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef 1) #6
  %76 = load double, ptr %75, align 8, !tbaa !10
  %77 = fadd double %74, %76
  store double %77, ptr %75, align 8, !tbaa !10
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 2) #6
  %79 = load double, ptr %78, align 8, !tbaa !10
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef 2) #6
  %81 = load double, ptr %80, align 8, !tbaa !10
  %82 = fadd double %79, %81
  store double %82, ptr %80, align 8, !tbaa !10
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 3) #6
  %84 = load double, ptr %83, align 8, !tbaa !10
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef 3) #6
  %86 = load double, ptr %85, align 8, !tbaa !10
  %87 = fadd double %84, %86
  store double %87, ptr %85, align 8, !tbaa !10
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 4) #6
  %89 = load double, ptr %88, align 8, !tbaa !10
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef 4) #6
  %91 = load double, ptr %90, align 8, !tbaa !10
  %92 = fadd double %89, %91
  store double %92, ptr %90, align 8, !tbaa !10
  br label %.preheader

93:                                               ; preds = %217
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %exitcond117.not = icmp eq i64 %indvars.iv.next115, %wide.trip.count
  br i1 %exitcond117.not, label %._crit_edge, label %.lr.ph, !llvm.loop !16

.preheader:                                       ; preds = %.preheader99.preheader, %217
  %indvars.iv110 = phi i64 [ 1, %.preheader99.preheader ], [ %indvars.iv.next111, %217 ]
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv110) #6
  %95 = load double, ptr %94, align 8, !tbaa !10
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv110) #6
  %97 = load i32, ptr %96, align 4, !tbaa !12
  %98 = sitofp i32 %97 to double
  %99 = fsub double %95, %98
  %100 = fcmp ult double %99, 1.000000e+00
  br i1 %100, label %109, label %101

101:                                              ; preds = %.preheader
  %102 = add nuw nsw i64 %indvars.iv110, 1
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %102) #6
  %104 = load i32, ptr %103, align 4, !tbaa !12
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv110) #6
  %106 = load i32, ptr %105, align 4, !tbaa !12
  %107 = sub nsw i32 %104, %106
  %108 = icmp sgt i32 %107, 1
  br i1 %108, label %119, label %109

109:                                              ; preds = %101, %.preheader
  %110 = fcmp ugt double %99, -1.000000e+00
  br i1 %110, label %217, label %111

111:                                              ; preds = %109
  %112 = add nsw i64 %indvars.iv110, -1
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %112) #6
  %114 = load i32, ptr %113, align 4, !tbaa !12
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv110) #6
  %116 = load i32, ptr %115, align 4, !tbaa !12
  %117 = sub nsw i32 %114, %116
  %118 = icmp slt i32 %117, -1
  br i1 %118, label %119, label %217

119:                                              ; preds = %111, %101
  %120 = fcmp ogt double %99, 0.000000e+00
  br i1 %120, label %124, label %121

121:                                              ; preds = %119
  %122 = fcmp olt double %99, 0.000000e+00
  br i1 %122, label %123, label %124

123:                                              ; preds = %121
  br label %124

124:                                              ; preds = %119, %121, %123
  %.081 = phi i32 [ -1, %123 ], [ 0, %121 ], [ 1, %119 ]
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv110) #6
  %126 = load double, ptr %125, align 8, !tbaa !10
  %127 = sitofp i32 %.081 to double
  %128 = add nuw nsw i64 %indvars.iv110, 1
  %129 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %128) #6
  %130 = load i32, ptr %129, align 4, !tbaa !12
  %131 = add nsw i64 %indvars.iv110, -1
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %131) #6
  %133 = load i32, ptr %132, align 4, !tbaa !12
  %134 = sub nsw i32 %130, %133
  %135 = sitofp i32 %134 to double
  %136 = fdiv double %127, %135
  %137 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv110) #6
  %138 = load i32, ptr %137, align 4, !tbaa !12
  %139 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %131) #6
  %140 = load i32, ptr %139, align 4, !tbaa !12
  %141 = add i32 %138, %.081
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %128) #6
  %143 = load double, ptr %142, align 8, !tbaa !10
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv110) #6
  %145 = load double, ptr %144, align 8, !tbaa !10
  %146 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %128) #6
  %147 = load i32, ptr %146, align 4, !tbaa !12
  %148 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv110) #6
  %149 = load i32, ptr %148, align 4, !tbaa !12
  %150 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %128) #6
  %151 = load i32, ptr %150, align 4, !tbaa !12
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv110) #6
  %153 = load i32, ptr %152, align 4, !tbaa !12
  %154 = add i32 %.081, %153
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv110) #6
  %156 = load double, ptr %155, align 8, !tbaa !10
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %131) #6
  %158 = load double, ptr %157, align 8, !tbaa !10
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv110) #6
  %160 = load i32, ptr %159, align 4, !tbaa !12
  %161 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %131) #6
  %162 = load i32, ptr %161, align 4, !tbaa !12
  %163 = insertelement <2 x i32> poison, i32 %141, i64 0
  %164 = insertelement <2 x i32> %163, i32 %151, i64 1
  %165 = insertelement <2 x i32> poison, i32 %140, i64 0
  %166 = insertelement <2 x i32> %165, i32 %154, i64 1
  %167 = sub <2 x i32> %164, %166
  %168 = sitofp <2 x i32> %167 to <2 x double>
  %169 = insertelement <2 x double> poison, double %143, i64 0
  %170 = insertelement <2 x double> %169, double %156, i64 1
  %171 = insertelement <2 x double> poison, double %145, i64 0
  %172 = insertelement <2 x double> %171, double %158, i64 1
  %173 = fsub <2 x double> %170, %172
  %174 = fmul <2 x double> %173, %168
  %175 = insertelement <2 x i32> poison, i32 %147, i64 0
  %176 = insertelement <2 x i32> %175, i32 %160, i64 1
  %177 = insertelement <2 x i32> poison, i32 %149, i64 0
  %178 = insertelement <2 x i32> %177, i32 %162, i64 1
  %179 = sub nsw <2 x i32> %176, %178
  %180 = sitofp <2 x i32> %179 to <2 x double>
  %181 = fdiv <2 x double> %174, %180
  %shift = shufflevector <2 x double> %181, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %182 = fadd <2 x double> %181, %shift
  %183 = extractelement <2 x double> %182, i64 0
  %184 = call double @llvm.fmuladd.f64(double %136, double %183, double %126)
  %185 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %131) #6
  %186 = load double, ptr %185, align 8, !tbaa !10
  %187 = fcmp olt double %186, %184
  br i1 %187, label %188, label %194

188:                                              ; preds = %124
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %128) #6
  %190 = load double, ptr %189, align 8, !tbaa !10
  %191 = fcmp olt double %184, %190
  br i1 %191, label %192, label %194

192:                                              ; preds = %188
  %193 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv110) #6
  store double %184, ptr %193, align 8, !tbaa !10
  br label %213

194:                                              ; preds = %188, %124
  %195 = sext i32 %.081 to i64
  %196 = add nsw i64 %indvars.iv110, %195
  %197 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %196) #6
  %198 = load double, ptr %197, align 8, !tbaa !10
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv110) #6
  %200 = load double, ptr %199, align 8, !tbaa !10
  %201 = fsub double %198, %200
  %202 = fmul double %201, %127
  %203 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %196) #6
  %204 = load i32, ptr %203, align 4, !tbaa !12
  %205 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv110) #6
  %206 = load i32, ptr %205, align 4, !tbaa !12
  %207 = sub nsw i32 %204, %206
  %208 = sitofp i32 %207 to double
  %209 = fdiv double %202, %208
  %210 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv110) #6
  %211 = load double, ptr %210, align 8, !tbaa !10
  %212 = fadd double %211, %209
  store double %212, ptr %210, align 8, !tbaa !10
  br label %213

213:                                              ; preds = %194, %192
  %214 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv110) #6
  %215 = load i32, ptr %214, align 4, !tbaa !12
  %216 = add nsw i32 %215, %.081
  store i32 %216, ptr %214, align 4, !tbaa !12
  br label %217

217:                                              ; preds = %213, %111, %109
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %exitcond113.not = icmp eq i64 %indvars.iv.next111, 4
  br i1 %exitcond113.not, label %93, label %.preheader, !llvm.loop !17

218:                                              ; preds = %34, %32
  %.pn = phi { ptr, i32 } [ %35, %34 ], [ %33, %32 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  br label %219

219:                                              ; preds = %218, %30
  %.pn.pn = phi { ptr, i32 } [ %.pn, %218 ], [ %31, %30 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  br label %220

220:                                              ; preds = %219, %28
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %219 ], [ %29, %28 ]
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  br label %221

221:                                              ; preds = %220, %26
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %220 ], [ %27, %26 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn.pn.pn.pn
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEEvT_S7_(ptr, ptr) local_unnamed_addr #4

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

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 #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 = !{i64 0, i64 20, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 0, i64 40, !6}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,VectorCombinePass