; LLVM IR from cvanaret/Uno :: uno/ingredients/inequality_handling_methods/interior_point_methods/PrimalDualInte_463fe902 (5b83c7e6)

; 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.uno::Range" = type { %"class.uno::Collection", i64, i64 }
%"class.uno::Collection" = type { ptr }
%"class.uno::Collection<unsigned long>::iterator" = type { ptr, i64 }
%"class.uno::PrimalDualInteriorPointProblem" = type { %"class.uno::OptimizationProblem", ptr, double, double }
%"class.uno::OptimizationProblem" = type { ptr, ptr, i64, i64 }
%"class.uno::Iterate" = type <{ i64, i64, %"class.uno::Vector", %"class.uno::Multipliers", %"class.uno::Multipliers", double, %"struct.uno::Evaluations", i8, i8, i8, i8, [4 x i8], double, %"class.uno::DualResiduals", %"class.uno::DualResiduals", %"struct.uno::ProgressMeasures", i32, [4 x i8] }>
%"class.uno::Vector" = type { %"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 }
%"class.uno::Multipliers" = type { %"class.uno::Vector", %"class.uno::Vector", %"class.uno::Vector" }
%"struct.uno::Evaluations" = type { double, %"class.std::vector", %"class.uno::SparseVector", %"class.uno::RectangularMatrix" }
%"class.uno::SparseVector" = type { %"class.std::vector.3", %"class.std::vector", i64 }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.uno::RectangularMatrix" = type { %"class.std::vector.8" }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<uno::SparseVector<double>, std::allocator<uno::SparseVector<double>>>::_Vector_impl" }
%"struct.std::_Vector_base<uno::SparseVector<double>, std::allocator<uno::SparseVector<double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<uno::SparseVector<double>, std::allocator<uno::SparseVector<double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<uno::SparseVector<double>, std::allocator<uno::SparseVector<double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.uno::DualResiduals" = type { double, double, double, double, %"class.uno::LagrangianGradient" }
%"class.uno::LagrangianGradient" = type { %"class.uno::Vector", %"class.uno::Vector" }
%"struct.uno::ProgressMeasures" = type { double, %"class.std::function", double }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3uno30PrimalDualInteriorPointProblem27evaluate_objective_gradientERNS_7IterateERNS_12SparseVectorIdEE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(532) %1, ptr noundef nonnull align 8 dereferenceable(56) %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.uno::Range", align 8
  %9 = alloca %"class.uno::Collection<unsigned long>::iterator", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.uno::Collection<unsigned long>::iterator", align 8
  %13 = alloca i64, align 8
  %14 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %15 = load ptr, ptr %4, align 8
  %16 = getelementptr inbounds %"class.uno::PrimalDualInteriorPointProblem", ptr %15, i32 0, i32 1
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = load ptr, ptr %17, align 8, !tbaa !14
  %21 = getelementptr inbounds ptr, ptr %20, i64 3
  %22 = load ptr, ptr %21, align 8
  call void %22(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(532) %18, ptr noundef nonnull align 8 dereferenceable(56) %19)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #5
  %23 = getelementptr inbounds %"class.uno::PrimalDualInteriorPointProblem", ptr %15, i32 0, i32 1
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = getelementptr inbounds %"class.uno::OptimizationProblem", ptr %24, i32 0, i32 2
  %26 = load i64, ptr %25, align 8, !tbaa !16
  call void @_ZN3uno5RangeILNS_14RangeDirectionE0EEC2Em(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %26)
  store ptr %8, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = invoke { ptr, i64 } @_ZNK3uno10CollectionImE5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %29 unwind label %45

29:                                               ; preds = %3
  %30 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 0
  %31 = extractvalue { ptr, i64 } %28, 0
  store ptr %31, ptr %30, align 8
  %32 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 1
  %33 = extractvalue { ptr, i64 } %28, 1
  store i64 %33, ptr %32, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #5
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = invoke { ptr, i64 } @_ZNK3uno10CollectionImE3endEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %36 unwind label %49

36:                                               ; preds = %29
  %37 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 0
  %38 = extractvalue { ptr, i64 } %35, 0
  store ptr %38, ptr %37, align 8
  %39 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 1
  %40 = extractvalue { ptr, i64 } %35, 1
  store i64 %40, ptr %39, align 8
  br label %41

41:                                               ; preds = %173, %36
  %42 = invoke noundef zeroext i1 @_ZN3unoneERKNS_10CollectionImE8iteratorES4_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %43 unwind label %49

43:                                               ; preds = %41
  br i1 %42, label %53, label %44

44:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @_ZN3uno10CollectionImED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %177

45:                                               ; preds = %3
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %10, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %11, align 4
  br label %176

49:                                               ; preds = %171, %41, %29
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %10, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %11, align 4
  br label %175

53:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %54 = invoke noundef i64 @_ZNK3uno10CollectionImE8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %55 unwind label %105

55:                                               ; preds = %53
  store i64 %54, ptr %13, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store double 0.000000e+00, ptr %14, align 8, !tbaa !18
  %56 = getelementptr inbounds %"class.uno::PrimalDualInteriorPointProblem", ptr %15, i32 0, i32 1
  %57 = load ptr, ptr %56, align 8, !tbaa !9
  %58 = load i64, ptr %13, align 8, !tbaa !17
  %59 = load ptr, ptr %57, align 8, !tbaa !14
  %60 = getelementptr inbounds ptr, ptr %59, i64 8
  %61 = load ptr, ptr %60, align 8
  %62 = invoke noundef double %61(ptr noundef nonnull align 8 dereferenceable(32) %57, i64 noundef %58)
          to label %63 unwind label %109

63:                                               ; preds = %55
  %64 = invoke noundef zeroext i1 @_ZN3uno9is_finiteIdEEbT_(double noundef %62)
          to label %65 unwind label %109

65:                                               ; preds = %63
  br i1 %64, label %66, label %114

66:                                               ; preds = %65
  %67 = getelementptr inbounds %"class.uno::PrimalDualInteriorPointProblem", ptr %15, i32 0, i32 2
  %68 = load double, ptr %67, align 8, !tbaa !19
  %69 = fneg double %68
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %"class.uno::Iterate", ptr %70, i32 0, i32 2
  %72 = load i64, ptr %13, align 8, !tbaa !17
  %73 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3uno6VectorIdEixEm(ptr noundef nonnull align 8 dereferenceable(24) %71, i64 noundef %72)
          to label %74 unwind label %109

74:                                               ; preds = %66
  %75 = load double, ptr %73, align 8, !tbaa !18
  %76 = getelementptr inbounds %"class.uno::PrimalDualInteriorPointProblem", ptr %15, i32 0, i32 1
  %77 = load ptr, ptr %76, align 8, !tbaa !9
  %78 = load i64, ptr %13, align 8, !tbaa !17
  %79 = load ptr, ptr %77, align 8, !tbaa !14
  %80 = getelementptr inbounds ptr, ptr %79, i64 8
  %81 = load ptr, ptr %80, align 8
  %82 = invoke noundef double %81(ptr noundef nonnull align 8 dereferenceable(32) %77, i64 noundef %78)
          to label %83 unwind label %109

83:                                               ; preds = %74
  %84 = fsub double %75, %82
  %85 = fdiv double %69, %84
  %86 = load double, ptr %14, align 8, !tbaa !18
  %87 = fadd double %86, %85
  store double %87, ptr %14, align 8, !tbaa !18
  %88 = getelementptr inbounds %"class.uno::PrimalDualInteriorPointProblem", ptr %15, i32 0, i32 1
  %89 = load ptr, ptr %88, align 8, !tbaa !9
  %90 = load i64, ptr %13, align 8, !tbaa !17
  %91 = load ptr, ptr %89, align 8, !tbaa !14
  %92 = getelementptr inbounds ptr, ptr %91, i64 9
  %93 = load ptr, ptr %92, align 8
  %94 = invoke noundef double %93(ptr noundef nonnull align 8 dereferenceable(32) %89, i64 noundef %90)
          to label %95 unwind label %109

95:                                               ; preds = %83
  %96 = invoke noundef zeroext i1 @_ZN3uno9is_finiteIdEEbT_(double noundef %94)
          to label %97 unwind label %109

97:                                               ; preds = %95
  br i1 %96, label %113, label %98

98:                                               ; preds = %97
  %99 = getelementptr inbounds %"class.uno::PrimalDualInteriorPointProblem", ptr %15, i32 0, i32 3
  %100 = load double, ptr %99, align 8, !tbaa !20
  %101 = getelementptr inbounds %"class.uno::PrimalDualInteriorPointProblem", ptr %15, i32 0, i32 2
  %102 = load double, ptr %101, align 8, !tbaa !19
  %103 = load double, ptr %14, align 8, !tbaa !18
  %104 = call double @llvm.fmuladd.f64(double %100, double %102, double %103)
  store double %104, ptr %14, align 8, !tbaa !18
  br label %113

105:                                              ; preds = %53
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %10, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %11, align 4
  br label %174

109:                                              ; preds = %166, %154, %142, %133, %125, %122, %114, %95, %83, %74, %66, %63, %55
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %10, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %174

113:                                              ; preds = %98, %97
  br label %114

114:                                              ; preds = %113, %65
  %115 = getelementptr inbounds %"class.uno::PrimalDualInteriorPointProblem", ptr %15, i32 0, i32 1
  %116 = load ptr, ptr %115, align 8, !tbaa !9
  %117 = load i64, ptr %13, align 8, !tbaa !17
  %118 = load ptr, ptr %116, align 8, !tbaa !14
  %119 = getelementptr inbounds ptr, ptr %118, i64 9
  %120 = load ptr, ptr %119, align 8
  %121 = invoke noundef double %120(ptr noundef nonnull align 8 dereferenceable(32) %116, i64 noundef %117)
          to label %122 unwind label %109

122:                                              ; preds = %114
  %123 = invoke noundef zeroext i1 @_ZN3uno9is_finiteIdEEbT_(double noundef %121)
          to label %124 unwind label %109

124:                                              ; preds = %122
  br i1 %123, label %125, label %166

125:                                              ; preds = %124
  %126 = getelementptr inbounds %"class.uno::PrimalDualInteriorPointProblem", ptr %15, i32 0, i32 2
  %127 = load double, ptr %126, align 8, !tbaa !19
  %128 = fneg double %127
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = getelementptr inbounds %"class.uno::Iterate", ptr %129, i32 0, i32 2
  %131 = load i64, ptr %13, align 8, !tbaa !17
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3uno6VectorIdEixEm(ptr noundef nonnull align 8 dereferenceable(24) %130, i64 noundef %131)
          to label %133 unwind label %109

133:                                              ; preds = %125
  %134 = load double, ptr %132, align 8, !tbaa !18
  %135 = getelementptr inbounds %"class.uno::PrimalDualInteriorPointProblem", ptr %15, i32 0, i32 1
  %136 = load ptr, ptr %135, align 8, !tbaa !9
  %137 = load i64, ptr %13, align 8, !tbaa !17
  %138 = load ptr, ptr %136, align 8, !tbaa !14
  %139 = getelementptr inbounds ptr, ptr %138, i64 9
  %140 = load ptr, ptr %139, align 8
  %141 = invoke noundef double %140(ptr noundef nonnull align 8 dereferenceable(32) %136, i64 noundef %137)
          to label %142 unwind label %109

142:                                              ; preds = %133
  %143 = fsub double %134, %141
  %144 = fdiv double %128, %143
  %145 = load double, ptr %14, align 8, !tbaa !18
  %146 = fadd double %145, %144
  store double %146, ptr %14, align 8, !tbaa !18
  %147 = getelementptr inbounds %"class.uno::PrimalDualInteriorPointProblem", ptr %15, i32 0, i32 1
  %148 = load ptr, ptr %147, align 8, !tbaa !9
  %149 = load i64, ptr %13, align 8, !tbaa !17
  %150 = load ptr, ptr %148, align 8, !tbaa !14
  %151 = getelementptr inbounds ptr, ptr %150, i64 8
  %152 = load ptr, ptr %151, align 8
  %153 = invoke noundef double %152(ptr noundef nonnull align 8 dereferenceable(32) %148, i64 noundef %149)
          to label %154 unwind label %109

154:                                              ; preds = %142
  %155 = invoke noundef zeroext i1 @_ZN3uno9is_finiteIdEEbT_(double noundef %153)
          to label %156 unwind label %109

156:                                              ; preds = %154
  br i1 %155, label %165, label %157

157:                                              ; preds = %156
  %158 = getelementptr inbounds %"class.uno::PrimalDualInteriorPointProblem", ptr %15, i32 0, i32 3
  %159 = load double, ptr %158, align 8, !tbaa !20
  %160 = getelementptr inbounds %"class.uno::PrimalDualInteriorPointProblem", ptr %15, i32 0, i32 2
  %161 = load double, ptr %160, align 8, !tbaa !19
  %162 = load double, ptr %14, align 8, !tbaa !18
  %163 = fneg double %159
  %164 = call double @llvm.fmuladd.f64(double %163, double %161, double %162)
  store double %164, ptr %14, align 8, !tbaa !18
  br label %165

165:                                              ; preds = %157, %156
  br label %166

166:                                              ; preds = %165, %124
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = load i64, ptr %13, align 8, !tbaa !17
  %169 = load double, ptr %14, align 8, !tbaa !18
  invoke void @_ZN3uno12SparseVectorIdE6insertEmd(ptr noundef nonnull align 8 dereferenceable(56) %167, i64 noundef %168, double noundef %169)
          to label %170 unwind label %109

170:                                              ; preds = %166
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %171

171:                                              ; preds = %170
  %172 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN3uno10CollectionImE8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %173 unwind label %49

173:                                              ; preds = %171
  br label %41

174:                                              ; preds = %109, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %175

175:                                              ; preds = %174, %49
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  br label %176

176:                                              ; preds = %175, %45
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @_ZN3uno10CollectionImED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %178

177:                                              ; preds = %44
  ret void

178:                                              ; preds = %176
  %179 = load ptr, ptr %10, align 8
  %180 = load i32, ptr %11, align 4
  %181 = insertvalue { ptr, i32 } poison, ptr %179, 0
  %182 = insertvalue { ptr, i32 } %181, i32 %180, 1
  resume { ptr, i32 } %182
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNK3uno10CollectionImE5beginEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNK3uno10CollectionImE3endEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK3uno10CollectionImE8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3uno9is_finiteIdEEbT_(double noundef) #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3uno12SparseVectorIdE6insertEmd(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef, double noundef) #0 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: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN3uno10CollectionImE8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3uno10CollectionImED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 32}
!10 = !{!"_ZTSN3uno30PrimalDualInteriorPointProblemE", !11, i64 0, !6, i64 32, !13, i64 40, !13, i64 48}
!11 = !{!"_ZTSN3uno19OptimizationProblemE", !6, i64 8, !12, i64 16, !12, i64 24}
!12 = !{!"long", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"vtable pointer", !8, i64 0}
!16 = !{!11, !12, i64 16}
!17 = !{!12, !12, i64 0}
!18 = !{!13, !13, i64 0}
!19 = !{!10, !13, i64 40}
!20 = !{!10, !13, i64 48}


; 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.uno::Range" = type { %"class.uno::Collection", i64, i64 }
%"class.uno::Collection" = type { ptr }
%"class.uno::Collection<unsigned long>::iterator" = type { ptr, i64 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3uno30PrimalDualInteriorPointProblem27evaluate_objective_gradientERNS_7IterateERNS_12SparseVectorIdEE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(532) %1, ptr noundef nonnull align 8 dereferenceable(56) %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.uno::Range", align 8
  %5 = alloca %"class.uno::Collection<unsigned long>::iterator", align 8
  %6 = alloca %"class.uno::Collection<unsigned long>::iterator", align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 32
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = load ptr, ptr %8, align 8, !tbaa !13
  %10 = getelementptr inbounds i8, ptr %9, i64 24
  %11 = load ptr, ptr %10, align 8
  tail call void %11(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(532) %1, ptr noundef nonnull align 8 dereferenceable(56) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  %12 = load ptr, ptr %7, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 16
  %14 = load i64, ptr %13, align 8, !tbaa !15
  call void @_ZN3uno5RangeILNS_14RangeDirectionE0EEC2Em(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %14)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %15 = invoke { ptr, i64 } @_ZNK3uno10CollectionImE5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %16 unwind label %31

16:                                               ; preds = %3
  %17 = extractvalue { ptr, i64 } %15, 0
  store ptr %17, ptr %5, align 8
  %18 = getelementptr inbounds i8, ptr %5, i64 8
  %19 = extractvalue { ptr, i64 } %15, 1
  store i64 %19, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %20 = invoke { ptr, i64 } @_ZNK3uno10CollectionImE3endEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %21 unwind label %.loopexit.split-lp

21:                                               ; preds = %16
  %22 = extractvalue { ptr, i64 } %20, 0
  store ptr %22, ptr %6, align 8
  %23 = getelementptr inbounds i8, ptr %6, i64 8
  %24 = extractvalue { ptr, i64 } %20, 1
  store i64 %24, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr %0, i64 40
  %26 = getelementptr inbounds i8, ptr %1, i64 16
  %27 = getelementptr inbounds i8, ptr %0, i64 48
  br label %28

28:                                               ; preds = %109, %21
  %29 = call noundef zeroext i1 @_ZN3unoneERKNS_10CollectionImE8iteratorES4_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %6)
  br i1 %29, label %33, label %30

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

31:                                               ; preds = %3
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %112

.loopexit:                                        ; preds = %109
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %111

.loopexit.split-lp:                               ; preds = %16
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %111

33:                                               ; preds = %28
  %34 = invoke noundef i64 @_ZNK3uno10CollectionImE8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %35 unwind label %69

35:                                               ; preds = %33
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = load ptr, ptr %36, align 8, !tbaa !13
  %38 = getelementptr inbounds i8, ptr %37, i64 64
  %39 = load ptr, ptr %38, align 8
  %40 = invoke noundef double %39(ptr noundef nonnull align 8 dereferenceable(32) %36, i64 noundef %34)
          to label %41 unwind label %71

41:                                               ; preds = %35
  %42 = invoke noundef zeroext i1 @_ZN3uno9is_finiteIdEEbT_(double noundef %40)
          to label %43 unwind label %71

43:                                               ; preds = %41
  br i1 %42, label %44, label %73

44:                                               ; preds = %43
  %45 = load double, ptr %25, align 8, !tbaa !16
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3uno6VectorIdEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %34)
  %47 = load double, ptr %46, align 8, !tbaa !17
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = load ptr, ptr %48, align 8, !tbaa !13
  %50 = getelementptr inbounds i8, ptr %49, i64 64
  %51 = load ptr, ptr %50, align 8
  %52 = invoke noundef double %51(ptr noundef nonnull align 8 dereferenceable(32) %48, i64 noundef %34)
          to label %53 unwind label %71

53:                                               ; preds = %44
  %54 = fsub double %47, %52
  %55 = fdiv double %45, %54
  %56 = fsub double 0.000000e+00, %55
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = load ptr, ptr %57, align 8, !tbaa !13
  %59 = getelementptr inbounds i8, ptr %58, i64 72
  %60 = load ptr, ptr %59, align 8
  %61 = invoke noundef double %60(ptr noundef nonnull align 8 dereferenceable(32) %57, i64 noundef %34)
          to label %62 unwind label %71

62:                                               ; preds = %53
  %63 = invoke noundef zeroext i1 @_ZN3uno9is_finiteIdEEbT_(double noundef %61)
          to label %64 unwind label %71

64:                                               ; preds = %62
  br i1 %63, label %73, label %65

65:                                               ; preds = %64
  %66 = load double, ptr %27, align 8, !tbaa !18
  %67 = load double, ptr %25, align 8, !tbaa !16
  %68 = call double @llvm.fmuladd.f64(double %66, double %67, double %56)
  br label %73

69:                                               ; preds = %33
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %111

71:                                               ; preds = %108, %100, %91, %82, %79, %73, %62, %53, %44, %41, %35
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %111

73:                                               ; preds = %64, %65, %43
  %.0 = phi double [ %56, %64 ], [ %68, %65 ], [ 0.000000e+00, %43 ]
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = load ptr, ptr %74, align 8, !tbaa !13
  %76 = getelementptr inbounds i8, ptr %75, i64 72
  %77 = load ptr, ptr %76, align 8
  %78 = invoke noundef double %77(ptr noundef nonnull align 8 dereferenceable(32) %74, i64 noundef %34)
          to label %79 unwind label %71

79:                                               ; preds = %73
  %80 = invoke noundef zeroext i1 @_ZN3uno9is_finiteIdEEbT_(double noundef %78)
          to label %81 unwind label %71

81:                                               ; preds = %79
  br i1 %80, label %82, label %108

82:                                               ; preds = %81
  %83 = load double, ptr %25, align 8, !tbaa !16
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3uno6VectorIdEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %34)
  %85 = load double, ptr %84, align 8, !tbaa !17
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = load ptr, ptr %86, align 8, !tbaa !13
  %88 = getelementptr inbounds i8, ptr %87, i64 72
  %89 = load ptr, ptr %88, align 8
  %90 = invoke noundef double %89(ptr noundef nonnull align 8 dereferenceable(32) %86, i64 noundef %34)
          to label %91 unwind label %71

91:                                               ; preds = %82
  %92 = fsub double %85, %90
  %93 = fdiv double %83, %92
  %94 = fsub double %.0, %93
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = load ptr, ptr %95, align 8, !tbaa !13
  %97 = getelementptr inbounds i8, ptr %96, i64 64
  %98 = load ptr, ptr %97, align 8
  %99 = invoke noundef double %98(ptr noundef nonnull align 8 dereferenceable(32) %95, i64 noundef %34)
          to label %100 unwind label %71

100:                                              ; preds = %91
  %101 = invoke noundef zeroext i1 @_ZN3uno9is_finiteIdEEbT_(double noundef %99)
          to label %102 unwind label %71

102:                                              ; preds = %100
  br i1 %101, label %108, label %103

103:                                              ; preds = %102
  %104 = load double, ptr %27, align 8, !tbaa !18
  %105 = load double, ptr %25, align 8, !tbaa !16
  %106 = fneg double %104
  %107 = call double @llvm.fmuladd.f64(double %106, double %105, double %94)
  br label %108

108:                                              ; preds = %102, %103, %81
  %.1 = phi double [ %94, %102 ], [ %107, %103 ], [ %.0, %81 ]
  invoke void @_ZN3uno12SparseVectorIdE6insertEmd(ptr noundef nonnull align 8 dereferenceable(56) %2, i64 noundef %34, double noundef %.1)
          to label %109 unwind label %71

109:                                              ; preds = %108
  %110 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN3uno10CollectionImE8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %28 unwind label %.loopexit

111:                                              ; preds = %.loopexit, %.loopexit.split-lp, %69, %71
  %.pn29 = phi { ptr, i32 } [ %72, %71 ], [ %70, %69 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %112

112:                                              ; preds = %111, %31
  %.pn29.pn = phi { ptr, i32 } [ %.pn29, %111 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @_ZN3uno10CollectionImED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn29.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: inlinehint mustprogress uwtable
declare dso_local void @_ZN3uno5RangeILNS_14RangeDirectionE0EEC2Em(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNK3uno10CollectionImE5beginEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNK3uno10CollectionImE3endEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK3uno10CollectionImE8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3uno9is_finiteIdEEbT_(double noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3uno12SparseVectorIdE6insertEmd(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef, double noundef) local_unnamed_addr #0 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: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN3uno10CollectionImE8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3uno10CollectionImED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !8, i64 32}
!6 = !{!"_ZTSN3uno30PrimalDualInteriorPointProblemE", !7, i64 0, !8, i64 32, !12, i64 40, !12, i64 48}
!7 = !{!"_ZTSN3uno19OptimizationProblemE", !8, i64 8, !11, i64 16, !11, i64 24}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"long", !9, i64 0}
!12 = !{!"double", !9, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !10, i64 0}
!15 = !{!7, !11, i64 16}
!16 = !{!6, !12, i64 40}
!17 = !{!12, !12, i64 0}
!18 = !{!6, !12, i64 48}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass