; LLVM IR from optframe/optframe :: Examples/PN/src (ConstructiveGreedyHalfSum)

; 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::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload.base", [7 x i8] }
%"struct.std::_Optional_payload.base" = type { %"struct.std::_Optional_payload_base.base" }
%"struct.std::_Optional_payload_base.base" = type { %"union.std::_Optional_payload_base<optframe::CopySolution<std::vector<bool>, int>>::_Storage", i8 }
%"union.std::_Optional_payload_base<optframe::CopySolution<std::vector<bool>, int>>::_Storage" = type { %"class.optframe::CopySolution" }
%"class.optframe::CopySolution" = type <{ %"class.optframe::Component.base", [7 x i8], %"class.std::vector.4", i32, [4 x i8] }>
%"class.optframe::Component.base" = type <{ ptr, ptr, ptr, i32, i8, i8, i8, i8, i8 }>
%"class.std::vector.4" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.9" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.PN::ConstructiveGreedyHalfSum" = type { %"class.optframe::Constructive.base", ptr }
%"class.optframe::Constructive.base" = type { %"class.optframe::Component.base" }
%"class.PN::ProblemInstance" = type { %"class.optframe::Component.base", i32, %"class.std::vector" }
%"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 }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2PN25ConstructiveGreedyHalfSum16generateSolutionEd(ptr dead_on_unwind noalias writable sret(%"class.std::optional") align 8 %0, ptr noundef nonnull align 8 dereferenceable(48) %1, double noundef %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca %"class.std::vector.4", align 8
  %8 = alloca %"class.std::allocator.9", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::_Bit_reference", align 8
  %19 = alloca i32, align 4
  %20 = alloca %"struct.std::_Bit_reference", align 8
  %21 = alloca %"struct.std::_Bit_reference", align 8
  %22 = alloca %"class.optframe::CopySolution", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store double %2, ptr %6, align 8, !tbaa !9
  %23 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr %7) #4
  %24 = getelementptr inbounds %"class.PN::ConstructiveGreedyHalfSum", ptr %23, i32 0, i32 1
  %25 = load ptr, ptr %24, align 8, !tbaa !11
  %26 = getelementptr inbounds %"class.PN::ProblemInstance", ptr %25, i32 0, i32 2
  %27 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #4
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %7, i64 noundef %27, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %28 unwind label %53

28:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store double 0.000000e+00, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store double 0.000000e+00, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store double 0.000000e+00, ptr %13, align 8, !tbaa !9
  %29 = getelementptr inbounds %"class.PN::ConstructiveGreedyHalfSum", ptr %23, i32 0, i32 1
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  %31 = getelementptr inbounds %"class.PN::ProblemInstance", ptr %30, i32 0, i32 2
  %32 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #4
  %33 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %32, ptr %33, align 8
  %34 = getelementptr inbounds %"class.PN::ConstructiveGreedyHalfSum", ptr %23, i32 0, i32 1
  %35 = load ptr, ptr %34, align 8, !tbaa !11
  %36 = getelementptr inbounds %"class.PN::ProblemInstance", ptr %35, i32 0, i32 2
  %37 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #4
  %38 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %37, ptr %38, align 8
  %39 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8
  %41 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  %42 = load ptr, ptr %41, align 8
  invoke void @_ZSt14random_shuffleIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEEvT_S7_(ptr %40, ptr %42)
          to label %43 unwind label %57

43:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !17
  br label %44

44:                                               ; preds = %71, %43
  %45 = load i32, ptr %16, align 4, !tbaa !17
  %46 = getelementptr inbounds %"class.PN::ConstructiveGreedyHalfSum", ptr %23, i32 0, i32 1
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  %48 = getelementptr inbounds %"class.PN::ProblemInstance", ptr %47, i32 0, i32 2
  %49 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #4
  %50 = trunc i64 %49 to i32
  %51 = icmp slt i32 %45, %50
  br i1 %51, label %61, label %52

52:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %74

53:                                               ; preds = %3
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %9, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #4
  br label %202

57:                                               ; preds = %28
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %9, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %10, align 4
  br label %201

61:                                               ; preds = %44
  %62 = getelementptr inbounds %"class.PN::ConstructiveGreedyHalfSum", ptr %23, i32 0, i32 1
  %63 = load ptr, ptr %62, align 8, !tbaa !11
  %64 = getelementptr inbounds %"class.PN::ProblemInstance", ptr %63, i32 0, i32 2
  %65 = load i32, ptr %16, align 4, !tbaa !17
  %66 = sext i32 %65 to i64
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef %66) #4
  %68 = load double, ptr %67, align 8, !tbaa !9
  %69 = load double, ptr %11, align 8, !tbaa !9
  %70 = fadd double %69, %68
  store double %70, ptr %11, align 8, !tbaa !9
  br label %71

71:                                               ; preds = %61
  %72 = load i32, ptr %16, align 4, !tbaa !17
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %16, align 4, !tbaa !17
  br label %44, !llvm.loop !19

74:                                               ; preds = %52
  %75 = load double, ptr %11, align 8, !tbaa !9
  %76 = fdiv double %75, 2.000000e+00
  store double %76, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !17
  br label %77

77:                                               ; preds = %93, %74
  %78 = load double, ptr %12, align 8, !tbaa !9
  %79 = getelementptr inbounds %"class.PN::ConstructiveGreedyHalfSum", ptr %23, i32 0, i32 1
  %80 = load ptr, ptr %79, align 8, !tbaa !11
  %81 = getelementptr inbounds %"class.PN::ProblemInstance", ptr %80, i32 0, i32 2
  %82 = load i32, ptr %17, align 4, !tbaa !17
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %83) #4
  %85 = load double, ptr %84, align 8, !tbaa !9
  %86 = fadd double %78, %85
  %87 = load double, ptr %11, align 8, !tbaa !9
  %88 = fcmp ole double %86, %87
  br i1 %88, label %89, label %114

89:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #4
  %90 = load i32, ptr %17, align 4, !tbaa !17
  %91 = sext i32 %90 to i64
  %92 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %7, i64 noundef %91)
          to label %93 unwind label %110

93:                                               ; preds = %89
  %94 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 0
  %95 = extractvalue { ptr, i64 } %92, 0
  store ptr %95, ptr %94, align 8
  %96 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 1
  %97 = extractvalue { ptr, i64 } %92, 1
  store i64 %97, ptr %96, align 8
  %98 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %18, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #4
  %99 = getelementptr inbounds %"class.PN::ConstructiveGreedyHalfSum", ptr %23, i32 0, i32 1
  %100 = load ptr, ptr %99, align 8, !tbaa !11
  %101 = getelementptr inbounds %"class.PN::ProblemInstance", ptr %100, i32 0, i32 2
  %102 = load i32, ptr %17, align 4, !tbaa !17
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef %103) #4
  %105 = load double, ptr %104, align 8, !tbaa !9
  %106 = load double, ptr %12, align 8, !tbaa !9
  %107 = fadd double %106, %105
  store double %107, ptr %12, align 8, !tbaa !9
  %108 = load i32, ptr %17, align 4, !tbaa !17
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %17, align 4, !tbaa !17
  br label %77, !llvm.loop !21

110:                                              ; preds = %89
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %9, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #4
  br label %200

114:                                              ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %115 = load i32, ptr %17, align 4, !tbaa !17
  store i32 %115, ptr %19, align 4, !tbaa !17
  br label %116

116:                                              ; preds = %184, %114
  %117 = load i32, ptr %19, align 4, !tbaa !17
  %118 = getelementptr inbounds %"class.PN::ConstructiveGreedyHalfSum", ptr %23, i32 0, i32 1
  %119 = load ptr, ptr %118, align 8, !tbaa !11
  %120 = getelementptr inbounds %"class.PN::ProblemInstance", ptr %119, i32 0, i32 2
  %121 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %120) #4
  %122 = trunc i64 %121 to i32
  %123 = icmp slt i32 %117, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %188

125:                                              ; preds = %116
  %126 = load double, ptr %12, align 8, !tbaa !9
  %127 = getelementptr inbounds %"class.PN::ConstructiveGreedyHalfSum", ptr %23, i32 0, i32 1
  %128 = load ptr, ptr %127, align 8, !tbaa !11
  %129 = getelementptr inbounds %"class.PN::ProblemInstance", ptr %128, i32 0, i32 2
  %130 = load i32, ptr %19, align 4, !tbaa !17
  %131 = sext i32 %130 to i64
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %129, i64 noundef %131) #4
  %133 = load double, ptr %132, align 8, !tbaa !9
  %134 = fadd double %126, %133
  %135 = load double, ptr %11, align 8, !tbaa !9
  %136 = fcmp ole double %134, %135
  br i1 %136, label %137, label %160

137:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #4
  %138 = load i32, ptr %19, align 4, !tbaa !17
  %139 = sext i32 %138 to i64
  %140 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %7, i64 noundef %139)
          to label %141 unwind label %156

141:                                              ; preds = %137
  %142 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 0
  %143 = extractvalue { ptr, i64 } %140, 0
  store ptr %143, ptr %142, align 8
  %144 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 1
  %145 = extractvalue { ptr, i64 } %140, 1
  store i64 %145, ptr %144, align 8
  %146 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %20, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  %147 = getelementptr inbounds %"class.PN::ConstructiveGreedyHalfSum", ptr %23, i32 0, i32 1
  %148 = load ptr, ptr %147, align 8, !tbaa !11
  %149 = getelementptr inbounds %"class.PN::ProblemInstance", ptr %148, i32 0, i32 2
  %150 = load i32, ptr %19, align 4, !tbaa !17
  %151 = sext i32 %150 to i64
  %152 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %149, i64 noundef %151) #4
  %153 = load double, ptr %152, align 8, !tbaa !9
  %154 = load double, ptr %12, align 8, !tbaa !9
  %155 = fadd double %154, %153
  store double %155, ptr %12, align 8, !tbaa !9
  br label %183

156:                                              ; preds = %137
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %9, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  br label %187

160:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #4
  %161 = load i32, ptr %19, align 4, !tbaa !17
  %162 = sext i32 %161 to i64
  %163 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %7, i64 noundef %162)
          to label %164 unwind label %179

164:                                              ; preds = %160
  %165 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 0
  %166 = extractvalue { ptr, i64 } %163, 0
  store ptr %166, ptr %165, align 8
  %167 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 1
  %168 = extractvalue { ptr, i64 } %163, 1
  store i64 %168, ptr %167, align 8
  %169 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %21, i1 noundef zeroext false) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #4
  %170 = getelementptr inbounds %"class.PN::ConstructiveGreedyHalfSum", ptr %23, i32 0, i32 1
  %171 = load ptr, ptr %170, align 8, !tbaa !11
  %172 = getelementptr inbounds %"class.PN::ProblemInstance", ptr %171, i32 0, i32 2
  %173 = load i32, ptr %19, align 4, !tbaa !17
  %174 = sext i32 %173 to i64
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %172, i64 noundef %174) #4
  %176 = load double, ptr %175, align 8, !tbaa !9
  %177 = load double, ptr %13, align 8, !tbaa !9
  %178 = fadd double %177, %176
  store double %178, ptr %13, align 8, !tbaa !9
  br label %183

179:                                              ; preds = %160
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %9, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #4
  br label %187

183:                                              ; preds = %164, %141
  br label %184

184:                                              ; preds = %183
  %185 = load i32, ptr %19, align 4, !tbaa !17
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %19, align 4, !tbaa !17
  br label %116, !llvm.loop !22

187:                                              ; preds = %179, %156
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %200

188:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 88, ptr %22) #4
  invoke void @_ZN8optframe12CopySolutionISt6vectorIbSaIbEEiEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(84) %22, ptr noundef nonnull align 8 dereferenceable(40) %7)
          to label %189 unwind label %191

189:                                              ; preds = %188
  invoke void @_ZSt13make_optionalIRN8optframe12CopySolutionISt6vectorIbSaIbEEiEEENSt9enable_ifIX18is_constructible_vINSt5decayIT_E4typeES9_EESt8optionalISB_EE4typeEOS9_(ptr dead_on_unwind writable sret(%"class.std::optional") align 8 %0, ptr noundef nonnull align 8 dereferenceable(84) %22)
          to label %190 unwind label %195

190:                                              ; preds = %189
  call void @_ZN8optframe12CopySolutionISt6vectorIbSaIbEEiED2Ev(ptr noundef nonnull align 8 dereferenceable(84) %22) #4
  call void @llvm.lifetime.end.p0(i64 88, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #4
  ret void

191:                                              ; preds = %188
  %192 = landingpad { ptr, i32 }
          cleanup
  %193 = extractvalue { ptr, i32 } %192, 0
  store ptr %193, ptr %9, align 8
  %194 = extractvalue { ptr, i32 } %192, 1
  store i32 %194, ptr %10, align 4
  br label %199

195:                                              ; preds = %189
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %9, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %10, align 4
  call void @_ZN8optframe12CopySolutionISt6vectorIbSaIbEEiED2Ev(ptr noundef nonnull align 8 dereferenceable(84) %22) #4
  br label %199

199:                                              ; preds = %195, %191
  call void @llvm.lifetime.end.p0(i64 88, ptr %22) #4
  br label %200

200:                                              ; preds = %199, %187, %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %201

201:                                              ; preds = %200, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #4
  br label %202

202:                                              ; preds = %201, %53
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #4
  br label %203

203:                                              ; preds = %202
  %204 = load ptr, ptr %9, align 8
  %205 = load i32, ptr %10, align 4
  %206 = insertvalue { ptr, i32 } poison, ptr %204, 0
  %207 = insertvalue { ptr, i32 } %206, i32 %205, 1
  resume { ptr, i32 } %207
}

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

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

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

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

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

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

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

; 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 uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8optframe12CopySolutionISt6vectorIbSaIbEEiEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(84), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt13make_optionalIRN8optframe12CopySolutionISt6vectorIbSaIbEEiEEENSt9enable_ifIX18is_constructible_vINSt5decayIT_E4typeES9_EESt8optionalISB_EE4typeEOS9_(ptr dead_on_unwind noalias writable sret(%"class.std::optional") align 8, ptr noundef nonnull align 8 dereferenceable(84)) #0

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 40}
!12 = !{!"_ZTSN2PN25ConstructiveGreedyHalfSumE", !13, i64 0, !6, i64 40}
!13 = !{!"_ZTSN8optframe12ConstructiveINS_12CopySolutionISt6vectorIbSaIbEEiEEEE", !14, i64 0}
!14 = !{!"_ZTSN8optframe9ComponentE", !6, i64 8, !6, i64 16, !15, i64 24, !16, i64 28, !16, i64 29, !16, i64 30, !16, i64 31, !16, i64 32}
!15 = !{!"_ZTSN6modlog8LogLevelE", !7, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = distinct !{!22, !20}


; 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::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload.base", [7 x i8] }
%"struct.std::_Optional_payload.base" = type { %"struct.std::_Optional_payload_base.base" }
%"struct.std::_Optional_payload_base.base" = type { %"union.std::_Optional_payload_base<optframe::CopySolution<std::vector<bool>, int>>::_Storage", i8 }
%"union.std::_Optional_payload_base<optframe::CopySolution<std::vector<bool>, int>>::_Storage" = type { %"class.optframe::CopySolution" }
%"class.optframe::CopySolution" = type <{ %"class.optframe::Component.base", [7 x i8], %"class.std::vector.4", i32, [4 x i8] }>
%"class.optframe::Component.base" = type <{ ptr, ptr, ptr, i32, i8, i8, i8, i8, i8 }>
%"class.std::vector.4" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.9" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2PN25ConstructiveGreedyHalfSum16generateSolutionEd(ptr dead_on_unwind noalias writable sret(%"class.std::optional") align 8 %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(48) %1, double noundef %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector.4", align 8
  %5 = alloca %"class.std::allocator.9", align 1
  %6 = alloca %"struct.std::_Bit_reference", align 8
  %7 = alloca %"struct.std::_Bit_reference", align 8
  %8 = alloca %"struct.std::_Bit_reference", align 8
  %9 = alloca %"class.optframe::CopySolution", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #4
  %10 = getelementptr inbounds i8, ptr %1, i64 40
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %11, i64 40
  %13 = tail call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #4
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %13, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %14 unwind label %33

14:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  %15 = load ptr, ptr %10, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %15, i64 40
  %17 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  %18 = load ptr, ptr %10, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %18, i64 40
  %20 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #4
  invoke void @_ZSt14random_shuffleIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEEvT_S7_(ptr %17, ptr %20)
          to label %.preheader49 unwind label %35

.preheader49:                                     ; preds = %14
  %21 = load ptr, ptr %10, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %21, i64 40
  %23 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #4
  %24 = trunc i64 %23 to i32
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %26 = fmul double %41, 5.000000e-01
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader49
  %.040.lcssa = phi double [ 0.000000e+00, %.preheader49 ], [ %26, %._crit_edge.loopexit ]
  %27 = load ptr, ptr %10, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 40
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef 0) #4
  %30 = load double, ptr %29, align 8, !tbaa !14
  %31 = fcmp ugt double %30, %.040.lcssa
  br i1 %31, label %.preheader, label %.lr.ph57

.lr.ph57:                                         ; preds = %._crit_edge
  %32 = getelementptr inbounds i8, ptr %6, i64 8
  br label %56

33:                                               ; preds = %3
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  br label %121

35:                                               ; preds = %14
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %120

.lr.ph:                                           ; preds = %.preheader49, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader49 ]
  %.04052 = phi double [ %41, %.lr.ph ], [ 0.000000e+00, %.preheader49 ]
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %37, i64 40
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %indvars.iv) #4
  %40 = load double, ptr %39, align 8, !tbaa !14
  %41 = fadd double %.04052, %40
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %42, i64 40
  %44 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #4
  %sext = shl i64 %44, 32
  %45 = ashr exact i64 %sext, 32
  %46 = icmp slt i64 %indvars.iv.next, %45
  br i1 %46, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !16

.preheader.loopexit:                              ; preds = %58
  %47 = trunc nuw i64 %indvars.iv.next69 to i32
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %._crit_edge
  %.037.lcssa = phi double [ 0.000000e+00, %._crit_edge ], [ %66, %.preheader.loopexit ]
  %.027.lcssa = phi i32 [ 0, %._crit_edge ], [ %47, %.preheader.loopexit ]
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %48, i64 40
  %50 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %49) #4
  %51 = trunc i64 %50 to i32
  %52 = icmp slt i32 %.027.lcssa, %51
  br i1 %52, label %.lr.ph63, label %._crit_edge64

.lr.ph63:                                         ; preds = %.preheader
  %53 = getelementptr inbounds i8, ptr %7, i64 8
  %54 = getelementptr inbounds i8, ptr %8, i64 8
  %55 = zext i32 %.027.lcssa to i64
  br label %75

56:                                               ; preds = %.lr.ph57, %58
  %indvars.iv68 = phi i64 [ 0, %.lr.ph57 ], [ %indvars.iv.next69, %58 ]
  %.03754 = phi double [ 0.000000e+00, %.lr.ph57 ], [ %66, %58 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #4
  %57 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %indvars.iv68)
          to label %58 unwind label %73

58:                                               ; preds = %56
  %59 = extractvalue { ptr, i64 } %57, 0
  store ptr %59, ptr %6, align 8
  %60 = extractvalue { ptr, i64 } %57, 1
  store i64 %60, ptr %32, align 8
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %6, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %62, i64 40
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %63, i64 noundef %indvars.iv68) #4
  %65 = load double, ptr %64, align 8, !tbaa !14
  %66 = fadd double %.03754, %65
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %67, i64 40
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %68, i64 noundef %indvars.iv.next69) #4
  %70 = load double, ptr %69, align 8, !tbaa !14
  %71 = fadd double %66, %70
  %72 = fcmp ugt double %71, %.040.lcssa
  br i1 %72, label %.preheader.loopexit, label %56, !llvm.loop !18

73:                                               ; preds = %56
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  br label %120

._crit_edge64:                                    ; preds = %106, %.preheader
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %9) #4
  invoke void @_ZN8optframe12CopySolutionISt6vectorIbSaIbEEiEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(84) %9, ptr noundef nonnull align 8 dereferenceable(40) %4)
          to label %113 unwind label %115

75:                                               ; preds = %.lr.ph63, %106
  %indvars.iv71 = phi i64 [ %55, %.lr.ph63 ], [ %indvars.iv.next72, %106 ]
  %.13860 = phi double [ %.037.lcssa, %.lr.ph63 ], [ %.239, %106 ]
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %76, i64 40
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %77, i64 noundef %indvars.iv71) #4
  %79 = load double, ptr %78, align 8, !tbaa !14
  %80 = fadd double %.13860, %79
  %81 = fcmp ugt double %80, %.040.lcssa
  br i1 %81, label %95, label %82

82:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  %83 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %indvars.iv71)
          to label %84 unwind label %93

84:                                               ; preds = %82
  %85 = extractvalue { ptr, i64 } %83, 0
  store ptr %85, ptr %7, align 8
  %86 = extractvalue { ptr, i64 } %83, 1
  store i64 %86, ptr %53, align 8
  %87 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %7, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = getelementptr inbounds i8, ptr %88, i64 40
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %indvars.iv71) #4
  %91 = load double, ptr %90, align 8, !tbaa !14
  %92 = fadd double %.13860, %91
  br label %106

93:                                               ; preds = %82
  %94 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  br label %120

95:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #4
  %96 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %indvars.iv71)
          to label %97 unwind label %104

97:                                               ; preds = %95
  %98 = extractvalue { ptr, i64 } %96, 0
  store ptr %98, ptr %8, align 8
  %99 = extractvalue { ptr, i64 } %96, 1
  store i64 %99, ptr %54, align 8
  %100 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %8, i1 noundef zeroext false) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  %101 = load ptr, ptr %10, align 8, !tbaa !5
  %102 = getelementptr inbounds i8, ptr %101, i64 40
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %102, i64 noundef %indvars.iv71) #4
  br label %106

104:                                              ; preds = %95
  %105 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  br label %120

106:                                              ; preds = %84, %97
  %.239 = phi double [ %92, %84 ], [ %.13860, %97 ]
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = getelementptr inbounds i8, ptr %107, i64 40
  %109 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %108) #4
  %110 = trunc i64 %109 to i32
  %111 = trunc nuw i64 %indvars.iv.next72 to i32
  %112 = icmp slt i32 %111, %110
  br i1 %112, label %75, label %._crit_edge64, !llvm.loop !19

113:                                              ; preds = %._crit_edge64
  invoke void @_ZSt13make_optionalIRN8optframe12CopySolutionISt6vectorIbSaIbEEiEEENSt9enable_ifIX18is_constructible_vINSt5decayIT_E4typeES9_EESt8optionalISB_EE4typeEOS9_(ptr dead_on_unwind writable sret(%"class.std::optional") align 8 %0, ptr noundef nonnull align 8 dereferenceable(84) %9)
          to label %114 unwind label %117

114:                                              ; preds = %113
  call void @_ZN8optframe12CopySolutionISt6vectorIbSaIbEEiED2Ev(ptr noundef nonnull align 8 dereferenceable(84) %9) #4
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %9) #4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #4
  ret void

115:                                              ; preds = %._crit_edge64
  %116 = landingpad { ptr, i32 }
          cleanup
  br label %119

117:                                              ; preds = %113
  %118 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN8optframe12CopySolutionISt6vectorIbSaIbEEiED2Ev(ptr noundef nonnull align 8 dereferenceable(84) %9) #4
  br label %119

119:                                              ; preds = %117, %115
  %.pn = phi { ptr, i32 } [ %118, %117 ], [ %116, %115 ]
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %9) #4
  br label %120

120:                                              ; preds = %73, %119, %104, %93, %35
  %.pn45.pn = phi { ptr, i32 } [ %36, %35 ], [ %74, %73 ], [ %.pn, %119 ], [ %94, %93 ], [ %105, %104 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #4
  br label %121

121:                                              ; preds = %120, %33
  %.pn45.pn.pn = phi { ptr, i32 } [ %.pn45.pn, %120 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn45.pn.pn
}

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

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

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

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

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

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

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

; 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 uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8optframe12CopySolutionISt6vectorIbSaIbEEiEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(84), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt13make_optionalIRN8optframe12CopySolutionISt6vectorIbSaIbEEiEEENSt9enable_ifIX18is_constructible_vINSt5decayIT_E4typeES9_EESt8optionalISB_EE4typeEOS9_(ptr dead_on_unwind noalias writable sret(%"class.std::optional") align 8, ptr noundef nonnull align 8 dereferenceable(84)) local_unnamed_addr #0

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 #4 = { 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, !9, i64 40}
!6 = !{!"_ZTSN2PN25ConstructiveGreedyHalfSumE", !7, i64 0, !9, i64 40}
!7 = !{!"_ZTSN8optframe12ConstructiveINS_12CopySolutionISt6vectorIbSaIbEEiEEEE", !8, i64 0}
!8 = !{!"_ZTSN8optframe9ComponentE", !9, i64 8, !9, i64 16, !12, i64 24, !13, i64 28, !13, i64 29, !13, i64 30, !13, i64 31, !13, i64 32}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTSN6modlog8LogLevelE", !10, i64 0}
!13 = !{!"bool", !10, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !10, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


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