; LLVM IR from Dimandragon/non-parametric-dsp :: alglib-cpp/src (optimization)

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

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_smart_ptr" = type { ptr, ptr, i8, i8, i64, ptr, ptr, %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::xquadraticconstraints" = type { i64, %"struct.alglib_impl::ae_obj_array", %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::ae_obj_array" = type { i64, i64, i8, ptr, ptr, ptr, ptr, %"struct.alglib_impl::ae_lock", %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_lock" = type { ptr, %"struct.alglib_impl::ae_dyn_block", i8 }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::xquadraticconstraint" = type { i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::sparsematrix", double, double, i8 }
%"struct.alglib_impl::sparsematrix" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, i64, i64, i64, i64 }

@.str.416 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.417 = external hidden unnamed_addr constant [41 x i8], align 1

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

declare noundef ptr @_ZN11alglib_impl9ae_mallocEmPNS_8ae_stateE(i64 noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) #1

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) #1

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #1

declare void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isneginfEdPNS_8ae_stateE(double noundef, ptr noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isposinfEdPNS_8ae_stateE(double noundef, ptr noundef) #1

declare void @_ZN11alglib_impl6rgrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) #1

declare void @_ZN11alglib_impl7iallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) #1

declare void @_ZN11alglib_impl22sparsecreatecrsinplaceEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) #1

declare void @_ZN11alglib_impl10isetallocvEllPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef, ptr noundef) #1

declare void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #1

declare void @_ZN11alglib_impl26_xquadraticconstraint_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) #1

declare void @_ZN11alglib_impl19ae_smart_ptr_assignEPNS_12ae_smart_ptrEPvbblPFvS2_PKvPNS_8ae_stateEbEPFvS2_E(ptr noundef, ptr noundef, i1 noundef zeroext, i1 noundef zeroext, i64 noundef, ptr noundef, ptr noundef) #1

declare void @_ZN11alglib_impl31_xquadraticconstraint_init_copyEPvPKvPNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #1

declare void @_ZN11alglib_impl29_xquadraticconstraint_destroyEPv(ptr noundef) #1

declare noundef i64 @_ZN11alglib_impl28ae_obj_array_append_transferEPNS_12ae_obj_arrayEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) #1

declare void @_ZN11alglib_impl6igrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl14xqcaddqc2denseEPNS_21xquadraticconstraintsEPKNS_9ae_matrixEbPKNS_9ae_vectorEddbPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i1 noundef zeroext %2, ptr noundef %3, double noundef %4, double noundef %5, i1 noundef zeroext %6, ptr noundef %7) #3 {
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca i8, align 1
  %16 = alloca ptr, align 8
  %17 = alloca %"struct.alglib_impl::ae_frame", align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca double, align 8
  %25 = alloca ptr, align 8
  %26 = alloca %"struct.alglib_impl::ae_smart_ptr", align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  %27 = zext i1 %2 to i8
  store i8 %27, ptr %11, align 1, !tbaa !9
  store ptr %3, ptr %12, align 8, !tbaa !5
  store double %4, ptr %13, align 8, !tbaa !11
  store double %5, ptr %14, align 8, !tbaa !11
  %28 = zext i1 %6 to i8
  store i8 %28, ptr %15, align 1, !tbaa !9
  store ptr %7, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %26) #4
  %29 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %29, ptr noundef %17)
  call void @llvm.memset.p0.i64(ptr align 8 %26, i8 0, i64 80, i1 false)
  %30 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef %26, ptr noundef %25, ptr noundef %30, i1 noundef zeroext true)
  %31 = load double, ptr %13, align 8, !tbaa !11
  %32 = load ptr, ptr %16, align 8, !tbaa !5
  %33 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %31, ptr noundef %32)
  br i1 %33, label %38, label %34

34:                                               ; preds = %8
  %35 = load double, ptr %13, align 8, !tbaa !11
  %36 = load ptr, ptr %16, align 8, !tbaa !5
  %37 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isneginfEdPNS_8ae_stateE(double noundef %35, ptr noundef %36)
  br label %38

38:                                               ; preds = %34, %8
  %39 = phi i1 [ true, %8 ], [ %37, %34 ]
  %40 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %39, ptr noundef @.str.416, ptr noundef %40)
  %41 = load double, ptr %14, align 8, !tbaa !11
  %42 = load ptr, ptr %16, align 8, !tbaa !5
  %43 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %41, ptr noundef %42)
  br i1 %43, label %48, label %44

44:                                               ; preds = %38
  %45 = load double, ptr %14, align 8, !tbaa !11
  %46 = load ptr, ptr %16, align 8, !tbaa !5
  %47 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isposinfEdPNS_8ae_stateE(double noundef %45, ptr noundef %46)
  br label %48

48:                                               ; preds = %44, %38
  %49 = phi i1 [ true, %38 ], [ %47, %44 ]
  %50 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %49, ptr noundef @.str.417, ptr noundef %50)
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraints", ptr %51, i32 0, i32 0
  %53 = load i64, ptr %52, align 8, !tbaa !13
  store i64 %53, ptr %23, align 8, !tbaa !20
  %54 = load ptr, ptr %16, align 8, !tbaa !5
  %55 = call noundef ptr @_ZN11alglib_impl9ae_mallocEmPNS_8ae_stateE(i64 noundef 528, ptr noundef %54)
  store ptr %55, ptr %25, align 8, !tbaa !5
  %56 = load ptr, ptr %25, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %56, i8 0, i64 528, i1 false)
  %57 = load ptr, ptr %25, align 8, !tbaa !5
  %58 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl26_xquadraticconstraint_initEPvPNS_8ae_stateEb(ptr noundef %57, ptr noundef %58, i1 noundef zeroext false)
  %59 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_smart_ptr_assignEPNS_12ae_smart_ptrEPvbblPFvS2_PKvPNS_8ae_stateEbEPFvS2_E(ptr noundef %26, ptr noundef %59, i1 noundef zeroext true, i1 noundef zeroext true, i64 noundef 528, ptr noundef @_ZN11alglib_impl31_xquadraticconstraint_init_copyEPvPKvPNS_8ae_stateEb, ptr noundef @_ZN11alglib_impl29_xquadraticconstraint_destroyEPv)
  %60 = load i64, ptr %23, align 8, !tbaa !20
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraints", ptr %61, i32 0, i32 2
  %63 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl10isetallocvEllPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %60, i64 noundef 0, ptr noundef %62, ptr noundef %63)
  store i64 0, ptr %18, align 8, !tbaa !20
  br label %64

64:                                               ; preds = %85, %48
  %65 = load i64, ptr %18, align 8, !tbaa !20
  %66 = load i64, ptr %23, align 8, !tbaa !20
  %67 = sub nsw i64 %66, 1
  %68 = icmp sle i64 %65, %67
  br i1 %68, label %69, label %88

69:                                               ; preds = %64
  %70 = load ptr, ptr %12, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %70, i32 0, i32 4
  %72 = load ptr, ptr %71, align 8, !tbaa !21
  %73 = load i64, ptr %18, align 8, !tbaa !20
  %74 = getelementptr inbounds double, ptr %72, i64 %73
  %75 = load double, ptr %74, align 8, !tbaa !11
  %76 = fcmp une double %75, 0.000000e+00
  br i1 %76, label %77, label %84

77:                                               ; preds = %69
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraints", ptr %78, i32 0, i32 2
  %80 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %79, i32 0, i32 4
  %81 = load ptr, ptr %80, align 8, !tbaa !21
  %82 = load i64, ptr %18, align 8, !tbaa !20
  %83 = getelementptr inbounds i64, ptr %81, i64 %82
  store i64 1, ptr %83, align 8, !tbaa !20
  br label %84

84:                                               ; preds = %77, %69
  br label %85

85:                                               ; preds = %84
  %86 = load i64, ptr %18, align 8, !tbaa !20
  %87 = add nsw i64 %86, 1
  store i64 %87, ptr %18, align 8, !tbaa !20
  br label %64, !llvm.loop !22

88:                                               ; preds = %64
  store i64 0, ptr %18, align 8, !tbaa !20
  br label %89

89:                                               ; preds = %138, %88
  %90 = load i64, ptr %18, align 8, !tbaa !20
  %91 = load i64, ptr %23, align 8, !tbaa !20
  %92 = sub nsw i64 %91, 1
  %93 = icmp sle i64 %90, %92
  br i1 %93, label %94, label %141

94:                                               ; preds = %89
  %95 = load i8, ptr %11, align 1, !tbaa !9, !range !24, !noundef !25
  %96 = trunc i8 %95 to i1
  br i1 %96, label %97, label %101

97:                                               ; preds = %94
  %98 = load i64, ptr %18, align 8, !tbaa !20
  store i64 %98, ptr %20, align 8, !tbaa !20
  %99 = load i64, ptr %23, align 8, !tbaa !20
  %100 = sub nsw i64 %99, 1
  store i64 %100, ptr %21, align 8, !tbaa !20
  br label %103

101:                                              ; preds = %94
  store i64 0, ptr %20, align 8, !tbaa !20
  %102 = load i64, ptr %18, align 8, !tbaa !20
  store i64 %102, ptr %21, align 8, !tbaa !20
  br label %103

103:                                              ; preds = %101, %97
  %104 = load i64, ptr %20, align 8, !tbaa !20
  store i64 %104, ptr %19, align 8, !tbaa !20
  br label %105

105:                                              ; preds = %134, %103
  %106 = load i64, ptr %19, align 8, !tbaa !20
  %107 = load i64, ptr %21, align 8, !tbaa !20
  %108 = icmp sle i64 %106, %107
  br i1 %108, label %109, label %137

109:                                              ; preds = %105
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %110, i32 0, i32 6
  %112 = load ptr, ptr %111, align 8, !tbaa !21
  %113 = load i64, ptr %18, align 8, !tbaa !20
  %114 = getelementptr inbounds ptr, ptr %112, i64 %113
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  %116 = load i64, ptr %19, align 8, !tbaa !20
  %117 = getelementptr inbounds double, ptr %115, i64 %116
  %118 = load double, ptr %117, align 8, !tbaa !11
  %119 = fcmp une double %118, 0.000000e+00
  br i1 %119, label %120, label %133

120:                                              ; preds = %109
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraints", ptr %121, i32 0, i32 2
  %123 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %122, i32 0, i32 4
  %124 = load ptr, ptr %123, align 8, !tbaa !21
  %125 = load i64, ptr %18, align 8, !tbaa !20
  %126 = getelementptr inbounds i64, ptr %124, i64 %125
  store i64 1, ptr %126, align 8, !tbaa !20
  %127 = load ptr, ptr %9, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraints", ptr %127, i32 0, i32 2
  %129 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %128, i32 0, i32 4
  %130 = load ptr, ptr %129, align 8, !tbaa !21
  %131 = load i64, ptr %19, align 8, !tbaa !20
  %132 = getelementptr inbounds i64, ptr %130, i64 %131
  store i64 1, ptr %132, align 8, !tbaa !20
  br label %133

133:                                              ; preds = %120, %109
  br label %134

134:                                              ; preds = %133
  %135 = load i64, ptr %19, align 8, !tbaa !20
  %136 = add nsw i64 %135, 1
  store i64 %136, ptr %19, align 8, !tbaa !20
  br label %105, !llvm.loop !26

137:                                              ; preds = %105
  br label %138

138:                                              ; preds = %137
  %139 = load i64, ptr %18, align 8, !tbaa !20
  %140 = add nsw i64 %139, 1
  store i64 %140, ptr %18, align 8, !tbaa !20
  br label %89, !llvm.loop !27

141:                                              ; preds = %89
  %142 = load ptr, ptr %25, align 8, !tbaa !5
  %143 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %142, i32 0, i32 0
  store i64 0, ptr %143, align 8, !tbaa !28
  store i64 0, ptr %18, align 8, !tbaa !20
  br label %144

144:                                              ; preds = %182, %141
  %145 = load i64, ptr %18, align 8, !tbaa !20
  %146 = load i64, ptr %23, align 8, !tbaa !20
  %147 = sub nsw i64 %146, 1
  %148 = icmp sle i64 %145, %147
  br i1 %148, label %149, label %185

149:                                              ; preds = %144
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraints", ptr %150, i32 0, i32 2
  %152 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %151, i32 0, i32 4
  %153 = load ptr, ptr %152, align 8, !tbaa !21
  %154 = load i64, ptr %18, align 8, !tbaa !20
  %155 = getelementptr inbounds i64, ptr %153, i64 %154
  %156 = load i64, ptr %155, align 8, !tbaa !20
  %157 = icmp ne i64 %156, 0
  br i1 %157, label %158, label %181

158:                                              ; preds = %149
  %159 = load ptr, ptr %25, align 8, !tbaa !5
  %160 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %159, i32 0, i32 0
  %161 = load i64, ptr %160, align 8, !tbaa !28
  %162 = add nsw i64 %161, 1
  %163 = load ptr, ptr %25, align 8, !tbaa !5
  %164 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %163, i32 0, i32 1
  %165 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl6igrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %162, ptr noundef %164, ptr noundef %165)
  %166 = load i64, ptr %18, align 8, !tbaa !20
  %167 = load ptr, ptr %25, align 8, !tbaa !5
  %168 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %167, i32 0, i32 1
  %169 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %168, i32 0, i32 4
  %170 = load ptr, ptr %169, align 8, !tbaa !21
  %171 = load ptr, ptr %25, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %171, i32 0, i32 0
  %173 = load i64, ptr %172, align 8, !tbaa !28
  %174 = getelementptr inbounds i64, ptr %170, i64 %173
  store i64 %166, ptr %174, align 8, !tbaa !20
  %175 = load ptr, ptr %25, align 8, !tbaa !5
  %176 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %175, i32 0, i32 0
  %177 = load i64, ptr %176, align 8, !tbaa !28
  %178 = add nsw i64 %177, 1
  %179 = load ptr, ptr %25, align 8, !tbaa !5
  %180 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %179, i32 0, i32 0
  store i64 %178, ptr %180, align 8, !tbaa !28
  br label %181

181:                                              ; preds = %158, %149
  br label %182

182:                                              ; preds = %181
  %183 = load i64, ptr %18, align 8, !tbaa !20
  %184 = add nsw i64 %183, 1
  store i64 %184, ptr %18, align 8, !tbaa !20
  br label %144, !llvm.loop !31

185:                                              ; preds = %144
  %186 = load i8, ptr %15, align 1, !tbaa !9, !range !24, !noundef !25
  %187 = trunc i8 %186 to i1
  %188 = load ptr, ptr %25, align 8, !tbaa !5
  %189 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %188, i32 0, i32 6
  %190 = zext i1 %187 to i8
  store i8 %190, ptr %189, align 8, !tbaa !32
  %191 = load double, ptr %13, align 8, !tbaa !11
  %192 = load ptr, ptr %25, align 8, !tbaa !5
  %193 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %192, i32 0, i32 4
  store double %191, ptr %193, align 8, !tbaa !33
  %194 = load double, ptr %14, align 8, !tbaa !11
  %195 = load ptr, ptr %25, align 8, !tbaa !5
  %196 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %195, i32 0, i32 5
  store double %194, ptr %196, align 8, !tbaa !34
  %197 = load ptr, ptr %25, align 8, !tbaa !5
  %198 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %197, i32 0, i32 0
  %199 = load i64, ptr %198, align 8, !tbaa !28
  %200 = icmp sgt i64 %199, 0
  br i1 %200, label %201, label %396

201:                                              ; preds = %185
  %202 = load ptr, ptr %25, align 8, !tbaa !5
  %203 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %202, i32 0, i32 0
  %204 = load i64, ptr %203, align 8, !tbaa !28
  %205 = load ptr, ptr %25, align 8, !tbaa !5
  %206 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %205, i32 0, i32 2
  %207 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %204, ptr noundef %206, ptr noundef %207)
  store i64 0, ptr %18, align 8, !tbaa !20
  br label %208

208:                                              ; preds = %234, %201
  %209 = load i64, ptr %18, align 8, !tbaa !20
  %210 = load ptr, ptr %25, align 8, !tbaa !5
  %211 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %210, i32 0, i32 0
  %212 = load i64, ptr %211, align 8, !tbaa !28
  %213 = sub nsw i64 %212, 1
  %214 = icmp sle i64 %209, %213
  br i1 %214, label %215, label %237

215:                                              ; preds = %208
  %216 = load ptr, ptr %12, align 8, !tbaa !5
  %217 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %216, i32 0, i32 4
  %218 = load ptr, ptr %217, align 8, !tbaa !21
  %219 = load ptr, ptr %25, align 8, !tbaa !5
  %220 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %219, i32 0, i32 1
  %221 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %220, i32 0, i32 4
  %222 = load ptr, ptr %221, align 8, !tbaa !21
  %223 = load i64, ptr %18, align 8, !tbaa !20
  %224 = getelementptr inbounds i64, ptr %222, i64 %223
  %225 = load i64, ptr %224, align 8, !tbaa !20
  %226 = getelementptr inbounds double, ptr %218, i64 %225
  %227 = load double, ptr %226, align 8, !tbaa !11
  %228 = load ptr, ptr %25, align 8, !tbaa !5
  %229 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %228, i32 0, i32 2
  %230 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %229, i32 0, i32 4
  %231 = load ptr, ptr %230, align 8, !tbaa !21
  %232 = load i64, ptr %18, align 8, !tbaa !20
  %233 = getelementptr inbounds double, ptr %231, i64 %232
  store double %227, ptr %233, align 8, !tbaa !11
  br label %234

234:                                              ; preds = %215
  %235 = load i64, ptr %18, align 8, !tbaa !20
  %236 = add nsw i64 %235, 1
  store i64 %236, ptr %18, align 8, !tbaa !20
  br label %208, !llvm.loop !35

237:                                              ; preds = %208
  %238 = load ptr, ptr %25, align 8, !tbaa !5
  %239 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %238, i32 0, i32 0
  %240 = load i64, ptr %239, align 8, !tbaa !28
  %241 = load ptr, ptr %25, align 8, !tbaa !5
  %242 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %241, i32 0, i32 3
  %243 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %242, i32 0, i32 6
  store i64 %240, ptr %243, align 8, !tbaa !36
  %244 = load ptr, ptr %25, align 8, !tbaa !5
  %245 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %244, i32 0, i32 0
  %246 = load i64, ptr %245, align 8, !tbaa !28
  %247 = load ptr, ptr %25, align 8, !tbaa !5
  %248 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %247, i32 0, i32 3
  %249 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %248, i32 0, i32 7
  store i64 %246, ptr %249, align 8, !tbaa !37
  %250 = load ptr, ptr %25, align 8, !tbaa !5
  %251 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %250, i32 0, i32 0
  %252 = load i64, ptr %251, align 8, !tbaa !28
  %253 = add nsw i64 %252, 1
  %254 = load ptr, ptr %25, align 8, !tbaa !5
  %255 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %254, i32 0, i32 3
  %256 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %255, i32 0, i32 2
  %257 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl7iallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %253, ptr noundef %256, ptr noundef %257)
  %258 = load ptr, ptr %25, align 8, !tbaa !5
  %259 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %258, i32 0, i32 3
  %260 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %259, i32 0, i32 2
  %261 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %260, i32 0, i32 4
  %262 = load ptr, ptr %261, align 8, !tbaa !21
  %263 = getelementptr inbounds i64, ptr %262, i64 0
  store i64 0, ptr %263, align 8, !tbaa !20
  store i64 0, ptr %18, align 8, !tbaa !20
  br label %264

264:                                              ; preds = %389, %237
  %265 = load i64, ptr %18, align 8, !tbaa !20
  %266 = load ptr, ptr %25, align 8, !tbaa !5
  %267 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %266, i32 0, i32 0
  %268 = load i64, ptr %267, align 8, !tbaa !28
  %269 = sub nsw i64 %268, 1
  %270 = icmp sle i64 %265, %269
  br i1 %270, label %271, label %392

271:                                              ; preds = %264
  %272 = load ptr, ptr %25, align 8, !tbaa !5
  %273 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %272, i32 0, i32 3
  %274 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %273, i32 0, i32 2
  %275 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %274, i32 0, i32 4
  %276 = load ptr, ptr %275, align 8, !tbaa !21
  %277 = load i64, ptr %18, align 8, !tbaa !20
  %278 = getelementptr inbounds i64, ptr %276, i64 %277
  %279 = load i64, ptr %278, align 8, !tbaa !20
  store i64 %279, ptr %22, align 8, !tbaa !20
  %280 = load i64, ptr %22, align 8, !tbaa !20
  %281 = load ptr, ptr %25, align 8, !tbaa !5
  %282 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %281, i32 0, i32 0
  %283 = load i64, ptr %282, align 8, !tbaa !28
  %284 = add nsw i64 %280, %283
  %285 = load ptr, ptr %25, align 8, !tbaa !5
  %286 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %285, i32 0, i32 3
  %287 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %286, i32 0, i32 1
  %288 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl6igrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %284, ptr noundef %287, ptr noundef %288)
  %289 = load i64, ptr %22, align 8, !tbaa !20
  %290 = load ptr, ptr %25, align 8, !tbaa !5
  %291 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %290, i32 0, i32 0
  %292 = load i64, ptr %291, align 8, !tbaa !28
  %293 = add nsw i64 %289, %292
  %294 = load ptr, ptr %25, align 8, !tbaa !5
  %295 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %294, i32 0, i32 3
  %296 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %295, i32 0, i32 0
  %297 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl6rgrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %293, ptr noundef %296, ptr noundef %297)
  store i64 0, ptr %19, align 8, !tbaa !20
  br label %298

298:                                              ; preds = %376, %271
  %299 = load i64, ptr %19, align 8, !tbaa !20
  %300 = load i64, ptr %18, align 8, !tbaa !20
  %301 = icmp sle i64 %299, %300
  br i1 %301, label %302, label %379

302:                                              ; preds = %298
  %303 = load i8, ptr %11, align 1, !tbaa !9, !range !24, !noundef !25
  %304 = trunc i8 %303 to i1
  br i1 %304, label %305, label %327

305:                                              ; preds = %302
  %306 = load ptr, ptr %10, align 8, !tbaa !5
  %307 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %306, i32 0, i32 6
  %308 = load ptr, ptr %307, align 8, !tbaa !21
  %309 = load ptr, ptr %25, align 8, !tbaa !5
  %310 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %309, i32 0, i32 1
  %311 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %310, i32 0, i32 4
  %312 = load ptr, ptr %311, align 8, !tbaa !21
  %313 = load i64, ptr %19, align 8, !tbaa !20
  %314 = getelementptr inbounds i64, ptr %312, i64 %313
  %315 = load i64, ptr %314, align 8, !tbaa !20
  %316 = getelementptr inbounds ptr, ptr %308, i64 %315
  %317 = load ptr, ptr %316, align 8, !tbaa !5
  %318 = load ptr, ptr %25, align 8, !tbaa !5
  %319 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %318, i32 0, i32 1
  %320 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %319, i32 0, i32 4
  %321 = load ptr, ptr %320, align 8, !tbaa !21
  %322 = load i64, ptr %18, align 8, !tbaa !20
  %323 = getelementptr inbounds i64, ptr %321, i64 %322
  %324 = load i64, ptr %323, align 8, !tbaa !20
  %325 = getelementptr inbounds double, ptr %317, i64 %324
  %326 = load double, ptr %325, align 8, !tbaa !11
  store double %326, ptr %24, align 8, !tbaa !11
  br label %349

327:                                              ; preds = %302
  %328 = load ptr, ptr %10, align 8, !tbaa !5
  %329 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %328, i32 0, i32 6
  %330 = load ptr, ptr %329, align 8, !tbaa !21
  %331 = load ptr, ptr %25, align 8, !tbaa !5
  %332 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %331, i32 0, i32 1
  %333 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %332, i32 0, i32 4
  %334 = load ptr, ptr %333, align 8, !tbaa !21
  %335 = load i64, ptr %18, align 8, !tbaa !20
  %336 = getelementptr inbounds i64, ptr %334, i64 %335
  %337 = load i64, ptr %336, align 8, !tbaa !20
  %338 = getelementptr inbounds ptr, ptr %330, i64 %337
  %339 = load ptr, ptr %338, align 8, !tbaa !5
  %340 = load ptr, ptr %25, align 8, !tbaa !5
  %341 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %340, i32 0, i32 1
  %342 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %341, i32 0, i32 4
  %343 = load ptr, ptr %342, align 8, !tbaa !21
  %344 = load i64, ptr %19, align 8, !tbaa !20
  %345 = getelementptr inbounds i64, ptr %343, i64 %344
  %346 = load i64, ptr %345, align 8, !tbaa !20
  %347 = getelementptr inbounds double, ptr %339, i64 %346
  %348 = load double, ptr %347, align 8, !tbaa !11
  store double %348, ptr %24, align 8, !tbaa !11
  br label %349

349:                                              ; preds = %327, %305
  %350 = load double, ptr %24, align 8, !tbaa !11
  %351 = fcmp une double %350, 0.000000e+00
  br i1 %351, label %356, label %352

352:                                              ; preds = %349
  %353 = load i64, ptr %19, align 8, !tbaa !20
  %354 = load i64, ptr %18, align 8, !tbaa !20
  %355 = icmp eq i64 %353, %354
  br i1 %355, label %356, label %375

356:                                              ; preds = %352, %349
  %357 = load i64, ptr %19, align 8, !tbaa !20
  %358 = load ptr, ptr %25, align 8, !tbaa !5
  %359 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %358, i32 0, i32 3
  %360 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %359, i32 0, i32 1
  %361 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %360, i32 0, i32 4
  %362 = load ptr, ptr %361, align 8, !tbaa !21
  %363 = load i64, ptr %22, align 8, !tbaa !20
  %364 = getelementptr inbounds i64, ptr %362, i64 %363
  store i64 %357, ptr %364, align 8, !tbaa !20
  %365 = load double, ptr %24, align 8, !tbaa !11
  %366 = load ptr, ptr %25, align 8, !tbaa !5
  %367 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %366, i32 0, i32 3
  %368 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %367, i32 0, i32 0
  %369 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %368, i32 0, i32 4
  %370 = load ptr, ptr %369, align 8, !tbaa !21
  %371 = load i64, ptr %22, align 8, !tbaa !20
  %372 = getelementptr inbounds double, ptr %370, i64 %371
  store double %365, ptr %372, align 8, !tbaa !11
  %373 = load i64, ptr %22, align 8, !tbaa !20
  %374 = add nsw i64 %373, 1
  store i64 %374, ptr %22, align 8, !tbaa !20
  br label %375

375:                                              ; preds = %356, %352
  br label %376

376:                                              ; preds = %375
  %377 = load i64, ptr %19, align 8, !tbaa !20
  %378 = add nsw i64 %377, 1
  store i64 %378, ptr %19, align 8, !tbaa !20
  br label %298, !llvm.loop !38

379:                                              ; preds = %298
  %380 = load i64, ptr %22, align 8, !tbaa !20
  %381 = load ptr, ptr %25, align 8, !tbaa !5
  %382 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %381, i32 0, i32 3
  %383 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %382, i32 0, i32 2
  %384 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %383, i32 0, i32 4
  %385 = load ptr, ptr %384, align 8, !tbaa !21
  %386 = load i64, ptr %18, align 8, !tbaa !20
  %387 = add nsw i64 %386, 1
  %388 = getelementptr inbounds i64, ptr %385, i64 %387
  store i64 %380, ptr %388, align 8, !tbaa !20
  br label %389

389:                                              ; preds = %379
  %390 = load i64, ptr %18, align 8, !tbaa !20
  %391 = add nsw i64 %390, 1
  store i64 %391, ptr %18, align 8, !tbaa !20
  br label %264, !llvm.loop !39

392:                                              ; preds = %264
  %393 = load ptr, ptr %25, align 8, !tbaa !5
  %394 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraint", ptr %393, i32 0, i32 3
  %395 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl22sparsecreatecrsinplaceEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %394, ptr noundef %395)
  br label %396

396:                                              ; preds = %392, %185
  %397 = load ptr, ptr %9, align 8, !tbaa !5
  %398 = getelementptr inbounds %"struct.alglib_impl::xquadraticconstraints", ptr %397, i32 0, i32 1
  %399 = load ptr, ptr %16, align 8, !tbaa !5
  %400 = call noundef i64 @_ZN11alglib_impl28ae_obj_array_append_transferEPNS_12ae_obj_arrayEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef %398, ptr noundef %26, ptr noundef %399)
  %401 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %401)
  call void @llvm.lifetime.end.p0(i64 80, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #4
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN11alglib_impl21xquadraticconstraintsE", !15, i64 0, !16, i64 8, !19, i64 144}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSN11alglib_impl12ae_obj_arrayE", !15, i64 0, !15, i64 8, !10, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !17, i64 56, !18, i64 104}
!17 = !{!"_ZTSN11alglib_impl7ae_lockE", !6, i64 0, !18, i64 8, !10, i64 40}
!18 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!19 = !{!"_ZTSN11alglib_impl9ae_vectorE", !15, i64 0, !15, i64 8, !10, i64 16, !18, i64 24, !7, i64 56}
!20 = !{!15, !15, i64 0}
!21 = !{!7, !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = distinct !{!26, !23}
!27 = distinct !{!27, !23}
!28 = !{!29, !15, i64 0}
!29 = !{!"_ZTSN11alglib_impl20xquadraticconstraintE", !15, i64 0, !19, i64 8, !19, i64 72, !30, i64 136, !12, i64 504, !12, i64 512, !10, i64 520}
!30 = !{!"_ZTSN11alglib_impl12sparsematrixE", !19, i64 0, !19, i64 64, !19, i64 128, !19, i64 192, !19, i64 256, !15, i64 320, !15, i64 328, !15, i64 336, !15, i64 344, !15, i64 352, !15, i64 360}
!31 = distinct !{!31, !23}
!32 = !{!29, !10, i64 520}
!33 = !{!29, !12, i64 504}
!34 = !{!29, !12, i64 512}
!35 = distinct !{!35, !23}
!36 = !{!29, !15, i64 464}
!37 = !{!29, !15, i64 472}
!38 = distinct !{!38, !23}
!39 = distinct !{!39, !23}


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

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_smart_ptr" = type { ptr, ptr, i8, i8, i64, ptr, ptr, %"struct.alglib_impl::ae_dyn_block" }

@.str.416 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.417 = external hidden unnamed_addr constant [41 x i8], align 1

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

declare noundef ptr @_ZN11alglib_impl9ae_mallocEmPNS_8ae_stateE(i64 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isneginfEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isposinfEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl6rgrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl7iallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl22sparsecreatecrsinplaceEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl10isetallocvEllPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

declare void @_ZN11alglib_impl26_xquadraticconstraint_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

declare void @_ZN11alglib_impl19ae_smart_ptr_assignEPNS_12ae_smart_ptrEPvbblPFvS2_PKvPNS_8ae_stateEbEPFvS2_E(ptr noundef, ptr noundef, i1 noundef zeroext, i1 noundef zeroext, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl31_xquadraticconstraint_init_copyEPvPKvPNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #1

declare void @_ZN11alglib_impl29_xquadraticconstraint_destroyEPv(ptr noundef) #1

declare noundef i64 @_ZN11alglib_impl28ae_obj_array_append_transferEPNS_12ae_obj_arrayEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl6igrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl14xqcaddqc2denseEPNS_21xquadraticconstraintsEPKNS_9ae_matrixEbPKNS_9ae_vectorEddbPNS_8ae_stateE(ptr noundef %0, ptr nocapture noundef readonly %1, i1 noundef zeroext %2, ptr nocapture noundef readonly %3, double noundef %4, double noundef %5, i1 noundef zeroext %6, ptr noundef %7) local_unnamed_addr #3 {
  %9 = alloca %"struct.alglib_impl::ae_frame", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.alglib_impl::ae_smart_ptr", align 8
  %12 = zext i1 %6 to i8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %11) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %7, ptr noundef nonnull %9)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %11, i8 0, i64 80, i1 false)
  call void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef nonnull %11, ptr noundef nonnull %10, ptr noundef %7, i1 noundef zeroext true)
  %13 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %4, ptr noundef %7)
  br i1 %13, label %16, label %14

14:                                               ; preds = %8
  %15 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isneginfEdPNS_8ae_stateE(double noundef %4, ptr noundef %7)
  br label %16

16:                                               ; preds = %14, %8
  %17 = phi i1 [ true, %8 ], [ %15, %14 ]
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.416, ptr noundef %7)
  %18 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %5, ptr noundef %7)
  br i1 %18, label %21, label %19

19:                                               ; preds = %16
  %20 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isposinfEdPNS_8ae_stateE(double noundef %5, ptr noundef %7)
  br label %21

21:                                               ; preds = %19, %16
  %22 = phi i1 [ true, %16 ], [ %20, %19 ]
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %22, ptr noundef nonnull @.str.417, ptr noundef %7)
  %23 = load i64, ptr %0, align 8, !tbaa !5
  %24 = call noundef ptr @_ZN11alglib_impl9ae_mallocEmPNS_8ae_stateE(i64 noundef 528, ptr noundef %7)
  store ptr %24, ptr %10, align 8, !tbaa !16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(528) %24, i8 0, i64 528, i1 false)
  call void @_ZN11alglib_impl26_xquadraticconstraint_initEPvPNS_8ae_stateEb(ptr noundef %24, ptr noundef %7, i1 noundef zeroext false)
  %25 = load ptr, ptr %10, align 8, !tbaa !16
  call void @_ZN11alglib_impl19ae_smart_ptr_assignEPNS_12ae_smart_ptrEPvbblPFvS2_PKvPNS_8ae_stateEbEPFvS2_E(ptr noundef nonnull %11, ptr noundef %25, i1 noundef zeroext true, i1 noundef zeroext true, i64 noundef 528, ptr noundef nonnull @_ZN11alglib_impl31_xquadraticconstraint_init_copyEPvPKvPNS_8ae_stateEb, ptr noundef nonnull @_ZN11alglib_impl29_xquadraticconstraint_destroyEPv)
  %26 = getelementptr inbounds i8, ptr %0, i64 144
  call void @_ZN11alglib_impl10isetallocvEllPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %23, i64 noundef 0, ptr noundef nonnull %26, ptr noundef %7)
  %.not.not108 = icmp sgt i64 %23, 0
  br i1 %.not.not108, label %.lr.ph, label %._crit_edge116.thread

.lr.ph:                                           ; preds = %21
  %27 = getelementptr inbounds i8, ptr %3, i64 56
  %28 = getelementptr inbounds i8, ptr %0, i64 200
  %xtraiter = and i64 %23, 1
  %29 = icmp eq i64 %23, 1
  br i1 %29, label %.preheader.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %23, 9223372036854775806
  br label %54

.preheader.unr-lcssa:                             ; preds = %71, %.lr.ph
  %.090109.unr = phi i64 [ 0, %.lr.ph ], [ %72, %71 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader.unr-lcssa
  %30 = load ptr, ptr %27, align 8, !tbaa !17
  %31 = getelementptr inbounds double, ptr %30, i64 %.090109.unr
  %32 = load double, ptr %31, align 8, !tbaa !18
  %33 = fcmp une double %32, 0.000000e+00
  br i1 %33, label %34, label %.preheader

34:                                               ; preds = %.epil.preheader
  %35 = load ptr, ptr %28, align 8, !tbaa !17
  %36 = getelementptr inbounds i64, ptr %35, i64 %.090109.unr
  store i64 1, ptr %36, align 8, !tbaa !20
  br label %.preheader

.preheader:                                       ; preds = %.epil.preheader, %34, %.preheader.unr-lcssa
  %37 = add nsw i64 %23, -1
  br i1 %.not.not108, label %.lr.ph115, label %._crit_edge116.thread

.lr.ph115:                                        ; preds = %.preheader
  %38 = getelementptr inbounds i8, ptr %1, i64 72
  %39 = getelementptr inbounds i8, ptr %0, i64 200
  br i1 %2, label %.lr.ph112.us.preheader, label %.lr.ph112

.lr.ph112.us.preheader:                           ; preds = %.lr.ph115, %._crit_edge.us
  %.1114.us = phi i64 [ %53, %._crit_edge.us ], [ 0, %.lr.ph115 ]
  br label %.lr.ph112.us

.lr.ph112.us:                                     ; preds = %.lr.ph112.us.preheader, %51
  %.095111.us = phi i64 [ %52, %51 ], [ %.1114.us, %.lr.ph112.us.preheader ]
  %40 = load ptr, ptr %38, align 8, !tbaa !17
  %41 = getelementptr inbounds ptr, ptr %40, i64 %.1114.us
  %42 = load ptr, ptr %41, align 8, !tbaa !16
  %43 = getelementptr inbounds double, ptr %42, i64 %.095111.us
  %44 = load double, ptr %43, align 8, !tbaa !18
  %45 = fcmp une double %44, 0.000000e+00
  br i1 %45, label %46, label %51

46:                                               ; preds = %.lr.ph112.us
  %47 = load ptr, ptr %39, align 8, !tbaa !17
  %48 = getelementptr inbounds i64, ptr %47, i64 %.1114.us
  store i64 1, ptr %48, align 8, !tbaa !20
  %49 = load ptr, ptr %39, align 8, !tbaa !17
  %50 = getelementptr inbounds i64, ptr %49, i64 %.095111.us
  store i64 1, ptr %50, align 8, !tbaa !20
  br label %51

51:                                               ; preds = %46, %.lr.ph112.us
  %52 = add nuw nsw i64 %.095111.us, 1
  %.not104.us.not = icmp slt i64 %.095111.us, %37
  br i1 %.not104.us.not, label %.lr.ph112.us, label %._crit_edge.us, !llvm.loop !21

._crit_edge.us:                                   ; preds = %51
  %53 = add nuw nsw i64 %.1114.us, 1
  %exitcond144.not = icmp eq i64 %53, %23
  br i1 %exitcond144.not, label %._crit_edge116, label %.lr.ph112.us.preheader, !llvm.loop !23

54:                                               ; preds = %71, %.lr.ph.new
  %.090109 = phi i64 [ 0, %.lr.ph.new ], [ %72, %71 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %71 ]
  %55 = load ptr, ptr %27, align 8, !tbaa !17
  %56 = getelementptr inbounds double, ptr %55, i64 %.090109
  %57 = load double, ptr %56, align 8, !tbaa !18
  %58 = fcmp une double %57, 0.000000e+00
  br i1 %58, label %59, label %62

59:                                               ; preds = %54
  %60 = load ptr, ptr %28, align 8, !tbaa !17
  %61 = getelementptr inbounds i64, ptr %60, i64 %.090109
  store i64 1, ptr %61, align 8, !tbaa !20
  br label %62

62:                                               ; preds = %54, %59
  %63 = or disjoint i64 %.090109, 1
  %64 = load ptr, ptr %27, align 8, !tbaa !17
  %65 = getelementptr inbounds double, ptr %64, i64 %63
  %66 = load double, ptr %65, align 8, !tbaa !18
  %67 = fcmp une double %66, 0.000000e+00
  br i1 %67, label %68, label %71

68:                                               ; preds = %62
  %69 = load ptr, ptr %28, align 8, !tbaa !17
  %70 = getelementptr inbounds i64, ptr %69, i64 %63
  store i64 1, ptr %70, align 8, !tbaa !20
  br label %71

71:                                               ; preds = %68, %62
  %72 = add nuw nsw i64 %.090109, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader.unr-lcssa, label %54, !llvm.loop !24

.lr.ph112:                                        ; preds = %.lr.ph115, %._crit_edge
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge ], [ 1, %.lr.ph115 ]
  %.1114 = phi i64 [ %112, %._crit_edge ], [ 0, %.lr.ph115 ]
  %xtraiter167 = and i64 %indvars.iv, 1
  %73 = icmp eq i64 %.1114, 0
  br i1 %73, label %._crit_edge.unr-lcssa, label %.lr.ph112.new

.lr.ph112.new:                                    ; preds = %.lr.ph112
  %unroll_iter169 = and i64 %indvars.iv, -2
  br label %74

74:                                               ; preds = %99, %.lr.ph112.new
  %.095111 = phi i64 [ 0, %.lr.ph112.new ], [ %100, %99 ]
  %niter170 = phi i64 [ 0, %.lr.ph112.new ], [ %niter170.next.1, %99 ]
  %75 = load ptr, ptr %38, align 8, !tbaa !17
  %76 = getelementptr inbounds ptr, ptr %75, i64 %.1114
  %77 = load ptr, ptr %76, align 8, !tbaa !16
  %78 = getelementptr inbounds double, ptr %77, i64 %.095111
  %79 = load double, ptr %78, align 8, !tbaa !18
  %80 = fcmp une double %79, 0.000000e+00
  br i1 %80, label %81, label %86

81:                                               ; preds = %74
  %82 = load ptr, ptr %39, align 8, !tbaa !17
  %83 = getelementptr inbounds i64, ptr %82, i64 %.1114
  store i64 1, ptr %83, align 8, !tbaa !20
  %84 = load ptr, ptr %39, align 8, !tbaa !17
  %85 = getelementptr inbounds i64, ptr %84, i64 %.095111
  store i64 1, ptr %85, align 8, !tbaa !20
  br label %86

86:                                               ; preds = %74, %81
  %87 = or disjoint i64 %.095111, 1
  %88 = load ptr, ptr %38, align 8, !tbaa !17
  %89 = getelementptr inbounds ptr, ptr %88, i64 %.1114
  %90 = load ptr, ptr %89, align 8, !tbaa !16
  %91 = getelementptr inbounds double, ptr %90, i64 %87
  %92 = load double, ptr %91, align 8, !tbaa !18
  %93 = fcmp une double %92, 0.000000e+00
  br i1 %93, label %94, label %99

94:                                               ; preds = %86
  %95 = load ptr, ptr %39, align 8, !tbaa !17
  %96 = getelementptr inbounds i64, ptr %95, i64 %.1114
  store i64 1, ptr %96, align 8, !tbaa !20
  %97 = load ptr, ptr %39, align 8, !tbaa !17
  %98 = getelementptr inbounds i64, ptr %97, i64 %87
  store i64 1, ptr %98, align 8, !tbaa !20
  br label %99

99:                                               ; preds = %94, %86
  %100 = add nuw nsw i64 %.095111, 2
  %niter170.next.1 = add i64 %niter170, 2
  %niter170.ncmp.1 = icmp eq i64 %niter170.next.1, %unroll_iter169
  br i1 %niter170.ncmp.1, label %._crit_edge.unr-lcssa, label %74, !llvm.loop !21

._crit_edge.unr-lcssa:                            ; preds = %99, %.lr.ph112
  %.095111.unr = phi i64 [ 0, %.lr.ph112 ], [ %100, %99 ]
  %lcmp.mod168.not = icmp eq i64 %xtraiter167, 0
  br i1 %lcmp.mod168.not, label %._crit_edge, label %.epil.preheader166

.epil.preheader166:                               ; preds = %._crit_edge.unr-lcssa
  %101 = load ptr, ptr %38, align 8, !tbaa !17
  %102 = getelementptr inbounds ptr, ptr %101, i64 %.1114
  %103 = load ptr, ptr %102, align 8, !tbaa !16
  %104 = getelementptr inbounds double, ptr %103, i64 %.095111.unr
  %105 = load double, ptr %104, align 8, !tbaa !18
  %106 = fcmp une double %105, 0.000000e+00
  br i1 %106, label %107, label %._crit_edge

107:                                              ; preds = %.epil.preheader166
  %108 = load ptr, ptr %39, align 8, !tbaa !17
  %109 = getelementptr inbounds i64, ptr %108, i64 %.1114
  store i64 1, ptr %109, align 8, !tbaa !20
  %110 = load ptr, ptr %39, align 8, !tbaa !17
  %111 = getelementptr inbounds i64, ptr %110, i64 %.095111.unr
  store i64 1, ptr %111, align 8, !tbaa !20
  br label %._crit_edge

._crit_edge:                                      ; preds = %.epil.preheader166, %107, %._crit_edge.unr-lcssa
  %112 = add nuw nsw i64 %.1114, 1
  %indvars.iv.next = add nuw i64 %indvars.iv, 1
  %exitcond143.not = icmp eq i64 %112, %23
  br i1 %exitcond143.not, label %._crit_edge116, label %.lr.ph112, !llvm.loop !23

._crit_edge116.thread:                            ; preds = %.preheader, %21
  %113 = load ptr, ptr %10, align 8, !tbaa !16
  store i64 0, ptr %113, align 8, !tbaa !25
  br label %._crit_edge121.thread

._crit_edge116:                                   ; preds = %._crit_edge, %._crit_edge.us
  %114 = load ptr, ptr %10, align 8, !tbaa !16
  store i64 0, ptr %114, align 8, !tbaa !25
  br i1 %.not.not108, label %.lr.ph120, label %._crit_edge121.thread

.lr.ph120:                                        ; preds = %._crit_edge116
  %115 = getelementptr inbounds i8, ptr %0, i64 200
  br label %116

116:                                              ; preds = %.lr.ph120, %132
  %117 = phi i64 [ 0, %.lr.ph120 ], [ %133, %132 ]
  %118 = phi ptr [ %114, %.lr.ph120 ], [ %134, %132 ]
  %.2118 = phi i64 [ 0, %.lr.ph120 ], [ %135, %132 ]
  %119 = load ptr, ptr %115, align 8, !tbaa !17
  %120 = getelementptr inbounds i64, ptr %119, i64 %.2118
  %121 = load i64, ptr %120, align 8, !tbaa !20
  %.not103 = icmp eq i64 %121, 0
  br i1 %.not103, label %132, label %122

122:                                              ; preds = %116
  %123 = add nsw i64 %117, 1
  %124 = getelementptr inbounds i8, ptr %118, i64 8
  call void @_ZN11alglib_impl6igrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %123, ptr noundef nonnull %124, ptr noundef %7)
  %125 = load ptr, ptr %10, align 8, !tbaa !16
  %126 = getelementptr inbounds i8, ptr %125, i64 64
  %127 = load ptr, ptr %126, align 8, !tbaa !17
  %128 = load i64, ptr %125, align 8, !tbaa !25
  %129 = getelementptr inbounds i64, ptr %127, i64 %128
  store i64 %.2118, ptr %129, align 8, !tbaa !20
  %130 = load i64, ptr %125, align 8, !tbaa !25
  %131 = add nsw i64 %130, 1
  store i64 %131, ptr %125, align 8, !tbaa !25
  br label %132

132:                                              ; preds = %116, %122
  %133 = phi i64 [ %117, %116 ], [ %131, %122 ]
  %134 = phi ptr [ %118, %116 ], [ %125, %122 ]
  %135 = add nuw nsw i64 %.2118, 1
  %exitcond145.not = icmp eq i64 %135, %23
  br i1 %exitcond145.not, label %._crit_edge121, label %116, !llvm.loop !28

._crit_edge121.thread:                            ; preds = %._crit_edge116, %._crit_edge116.thread
  %.ph = phi ptr [ %113, %._crit_edge116.thread ], [ %114, %._crit_edge116 ]
  %136 = getelementptr inbounds i8, ptr %.ph, i64 520
  store i8 %12, ptr %136, align 8, !tbaa !29
  %137 = getelementptr inbounds i8, ptr %.ph, i64 504
  store double %4, ptr %137, align 8, !tbaa !30
  %138 = getelementptr inbounds i8, ptr %.ph, i64 512
  store double %5, ptr %138, align 8, !tbaa !31
  br label %248

._crit_edge121:                                   ; preds = %132
  %139 = getelementptr inbounds i8, ptr %134, i64 520
  store i8 %12, ptr %139, align 8, !tbaa !29
  %140 = getelementptr inbounds i8, ptr %134, i64 504
  store double %4, ptr %140, align 8, !tbaa !30
  %141 = getelementptr inbounds i8, ptr %134, i64 512
  store double %5, ptr %141, align 8, !tbaa !31
  %142 = icmp sgt i64 %133, 0
  br i1 %142, label %143, label %248

143:                                              ; preds = %._crit_edge121
  %144 = getelementptr inbounds i8, ptr %134, i64 72
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %133, ptr noundef nonnull %144, ptr noundef %7)
  %145 = load ptr, ptr %10, align 8, !tbaa !16
  %146 = load i64, ptr %145, align 8, !tbaa !25
  %.not.not101122 = icmp sgt i64 %146, 0
  br i1 %.not.not101122, label %.lr.ph125, label %._crit_edge126

.lr.ph125:                                        ; preds = %143
  %147 = getelementptr inbounds i8, ptr %3, i64 56
  %148 = getelementptr inbounds i8, ptr %145, i64 64
  %149 = getelementptr inbounds i8, ptr %145, i64 128
  %xtraiter172 = and i64 %146, 1
  %150 = icmp eq i64 %146, 1
  br i1 %150, label %._crit_edge126.loopexit.unr-lcssa, label %.lr.ph125.new

.lr.ph125.new:                                    ; preds = %.lr.ph125
  %unroll_iter174 = and i64 %146, 9223372036854775806
  br label %151

151:                                              ; preds = %151, %.lr.ph125.new
  %.3123 = phi i64 [ 0, %.lr.ph125.new ], [ %169, %151 ]
  %niter175 = phi i64 [ 0, %.lr.ph125.new ], [ %niter175.next.1, %151 ]
  %152 = load ptr, ptr %147, align 8, !tbaa !17
  %153 = load ptr, ptr %148, align 8, !tbaa !17
  %154 = getelementptr inbounds i64, ptr %153, i64 %.3123
  %155 = load i64, ptr %154, align 8, !tbaa !20
  %156 = getelementptr inbounds double, ptr %152, i64 %155
  %157 = load double, ptr %156, align 8, !tbaa !18
  %158 = load ptr, ptr %149, align 8, !tbaa !17
  %159 = getelementptr inbounds double, ptr %158, i64 %.3123
  store double %157, ptr %159, align 8, !tbaa !18
  %160 = or disjoint i64 %.3123, 1
  %161 = load ptr, ptr %147, align 8, !tbaa !17
  %162 = load ptr, ptr %148, align 8, !tbaa !17
  %163 = getelementptr inbounds i64, ptr %162, i64 %160
  %164 = load i64, ptr %163, align 8, !tbaa !20
  %165 = getelementptr inbounds double, ptr %161, i64 %164
  %166 = load double, ptr %165, align 8, !tbaa !18
  %167 = load ptr, ptr %149, align 8, !tbaa !17
  %168 = getelementptr inbounds double, ptr %167, i64 %160
  store double %166, ptr %168, align 8, !tbaa !18
  %169 = add nuw nsw i64 %.3123, 2
  %niter175.next.1 = add i64 %niter175, 2
  %niter175.ncmp.1 = icmp eq i64 %niter175.next.1, %unroll_iter174
  br i1 %niter175.ncmp.1, label %._crit_edge126.loopexit.unr-lcssa, label %151, !llvm.loop !32

._crit_edge126.loopexit.unr-lcssa:                ; preds = %151, %.lr.ph125
  %.3123.unr = phi i64 [ 0, %.lr.ph125 ], [ %169, %151 ]
  %lcmp.mod173.not = icmp eq i64 %xtraiter172, 0
  br i1 %lcmp.mod173.not, label %._crit_edge126, label %._crit_edge126.loopexit.epilog-lcssa

._crit_edge126.loopexit.epilog-lcssa:             ; preds = %._crit_edge126.loopexit.unr-lcssa
  %170 = load ptr, ptr %147, align 8, !tbaa !17
  %171 = load ptr, ptr %148, align 8, !tbaa !17
  %172 = getelementptr inbounds i64, ptr %171, i64 %.3123.unr
  %173 = load i64, ptr %172, align 8, !tbaa !20
  %174 = getelementptr inbounds double, ptr %170, i64 %173
  %175 = load double, ptr %174, align 8, !tbaa !18
  %176 = load ptr, ptr %149, align 8, !tbaa !17
  %177 = getelementptr inbounds double, ptr %176, i64 %.3123.unr
  store double %175, ptr %177, align 8, !tbaa !18
  br label %._crit_edge126

._crit_edge126:                                   ; preds = %._crit_edge126.loopexit.epilog-lcssa, %._crit_edge126.loopexit.unr-lcssa, %143
  %178 = getelementptr inbounds i8, ptr %145, i64 464
  store i64 %146, ptr %178, align 8, !tbaa !33
  %179 = getelementptr inbounds i8, ptr %145, i64 472
  store i64 %146, ptr %179, align 8, !tbaa !34
  %180 = add nsw i64 %146, 1
  %181 = getelementptr inbounds i8, ptr %145, i64 264
  call void @_ZN11alglib_impl7iallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %180, ptr noundef nonnull %181, ptr noundef %7)
  %182 = load ptr, ptr %10, align 8, !tbaa !16
  %183 = getelementptr inbounds i8, ptr %182, i64 320
  %184 = load ptr, ptr %183, align 8, !tbaa !17
  store i64 0, ptr %184, align 8, !tbaa !20
  %185 = load i64, ptr %182, align 8, !tbaa !25
  %.not.not102132 = icmp sgt i64 %185, 0
  br i1 %.not.not102132, label %.lr.ph135, label %._crit_edge136

.lr.ph135:                                        ; preds = %._crit_edge126
  %186 = getelementptr inbounds i8, ptr %1, i64 72
  br label %187

187:                                              ; preds = %.lr.ph135, %.split131.us
  %indvars.iv147 = phi i64 [ 1, %.lr.ph135 ], [ %indvars.iv.next148, %.split131.us ]
  %188 = phi i64 [ %185, %.lr.ph135 ], [ %246, %.split131.us ]
  %189 = phi ptr [ %182, %.lr.ph135 ], [ %200, %.split131.us ]
  %.4133 = phi i64 [ 0, %.lr.ph135 ], [ %244, %.split131.us ]
  %190 = getelementptr inbounds i8, ptr %189, i64 320
  %191 = load ptr, ptr %190, align 8, !tbaa !17
  %192 = getelementptr inbounds i64, ptr %191, i64 %.4133
  %193 = load i64, ptr %192, align 8, !tbaa !20
  %194 = add nsw i64 %193, %188
  %195 = getelementptr inbounds i8, ptr %189, i64 200
  call void @_ZN11alglib_impl6igrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %194, ptr noundef nonnull %195, ptr noundef %7)
  %196 = load ptr, ptr %10, align 8, !tbaa !16
  %197 = load i64, ptr %196, align 8, !tbaa !25
  %198 = add nsw i64 %197, %193
  %199 = getelementptr inbounds i8, ptr %196, i64 136
  call void @_ZN11alglib_impl6rgrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %198, ptr noundef nonnull %199, ptr noundef %7)
  %200 = load ptr, ptr %10, align 8
  %201 = getelementptr inbounds i8, ptr %200, i64 64
  %202 = getelementptr inbounds i8, ptr %200, i64 256
  %203 = getelementptr inbounds i8, ptr %200, i64 192
  br i1 %2, label %.split.us, label %.split

.split.us:                                        ; preds = %187, %221
  %.091129.us = phi i64 [ %.192.us, %221 ], [ %193, %187 ]
  %.196128.us = phi i64 [ %222, %221 ], [ 0, %187 ]
  %204 = load ptr, ptr %186, align 8, !tbaa !17
  %205 = load ptr, ptr %201, align 8, !tbaa !17
  %206 = getelementptr inbounds i64, ptr %205, i64 %.196128.us
  %207 = load i64, ptr %206, align 8, !tbaa !20
  %208 = getelementptr inbounds ptr, ptr %204, i64 %207
  %209 = load ptr, ptr %208, align 8, !tbaa !16
  %210 = getelementptr inbounds i64, ptr %205, i64 %.4133
  %211 = load i64, ptr %210, align 8, !tbaa !20
  %212 = getelementptr inbounds double, ptr %209, i64 %211
  %.0.us = load double, ptr %212, align 8, !tbaa !18
  %213 = fcmp une double %.0.us, 0.000000e+00
  %214 = icmp eq i64 %.196128.us, %.4133
  %or.cond.us = or i1 %214, %213
  br i1 %or.cond.us, label %215, label %221

215:                                              ; preds = %.split.us
  %216 = load ptr, ptr %202, align 8, !tbaa !17
  %217 = getelementptr inbounds i64, ptr %216, i64 %.091129.us
  store i64 %.196128.us, ptr %217, align 8, !tbaa !20
  %218 = load ptr, ptr %203, align 8, !tbaa !17
  %219 = getelementptr inbounds double, ptr %218, i64 %.091129.us
  store double %.0.us, ptr %219, align 8, !tbaa !18
  %220 = add nsw i64 %.091129.us, 1
  br label %221

221:                                              ; preds = %215, %.split.us
  %.192.us = phi i64 [ %220, %215 ], [ %.091129.us, %.split.us ]
  %222 = add nuw nsw i64 %.196128.us, 1
  %exitcond150.not = icmp eq i64 %222, %indvars.iv147
  br i1 %exitcond150.not, label %.split131.us, label %.split.us, !llvm.loop !35

.split:                                           ; preds = %187, %240
  %.091129 = phi i64 [ %.192, %240 ], [ %193, %187 ]
  %.196128 = phi i64 [ %241, %240 ], [ 0, %187 ]
  %223 = load ptr, ptr %186, align 8, !tbaa !17
  %224 = load ptr, ptr %201, align 8, !tbaa !17
  %225 = getelementptr inbounds i64, ptr %224, i64 %.4133
  %226 = load i64, ptr %225, align 8, !tbaa !20
  %227 = getelementptr inbounds ptr, ptr %223, i64 %226
  %228 = load ptr, ptr %227, align 8, !tbaa !16
  %229 = getelementptr inbounds i64, ptr %224, i64 %.196128
  %230 = load i64, ptr %229, align 8, !tbaa !20
  %231 = getelementptr inbounds double, ptr %228, i64 %230
  %.0 = load double, ptr %231, align 8, !tbaa !18
  %232 = fcmp une double %.0, 0.000000e+00
  %233 = icmp eq i64 %.196128, %.4133
  %or.cond = or i1 %233, %232
  br i1 %or.cond, label %234, label %240

234:                                              ; preds = %.split
  %235 = load ptr, ptr %202, align 8, !tbaa !17
  %236 = getelementptr inbounds i64, ptr %235, i64 %.091129
  store i64 %.196128, ptr %236, align 8, !tbaa !20
  %237 = load ptr, ptr %203, align 8, !tbaa !17
  %238 = getelementptr inbounds double, ptr %237, i64 %.091129
  store double %.0, ptr %238, align 8, !tbaa !18
  %239 = add nsw i64 %.091129, 1
  br label %240

240:                                              ; preds = %.split, %234
  %.192 = phi i64 [ %239, %234 ], [ %.091129, %.split ]
  %241 = add nuw nsw i64 %.196128, 1
  %exitcond149.not = icmp eq i64 %241, %indvars.iv147
  br i1 %exitcond149.not, label %.split131.us, label %.split, !llvm.loop !35

.split131.us:                                     ; preds = %240, %221
  %.us-phi = phi i64 [ %.192.us, %221 ], [ %.192, %240 ]
  %242 = getelementptr inbounds i8, ptr %200, i64 320
  %243 = load ptr, ptr %242, align 8, !tbaa !17
  %244 = add nuw nsw i64 %.4133, 1
  %245 = getelementptr inbounds i64, ptr %243, i64 %244
  store i64 %.us-phi, ptr %245, align 8, !tbaa !20
  %246 = load i64, ptr %200, align 8, !tbaa !25
  %.not.not102 = icmp slt i64 %244, %246
  %indvars.iv.next148 = add nuw i64 %indvars.iv147, 1
  br i1 %.not.not102, label %187, label %._crit_edge136, !llvm.loop !36

._crit_edge136:                                   ; preds = %.split131.us, %._crit_edge126
  %.lcssa = phi ptr [ %182, %._crit_edge126 ], [ %200, %.split131.us ]
  %247 = getelementptr inbounds i8, ptr %.lcssa, i64 136
  call void @_ZN11alglib_impl22sparsecreatecrsinplaceEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef nonnull %247, ptr noundef %7)
  br label %248

248:                                              ; preds = %._crit_edge121.thread, %._crit_edge136, %._crit_edge121
  %249 = getelementptr inbounds i8, ptr %0, i64 8
  %250 = call noundef i64 @_ZN11alglib_impl28ae_obj_array_append_transferEPNS_12ae_obj_arrayEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef nonnull %249, ptr noundef nonnull %11, ptr noundef %7)
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %7)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  ret void
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN11alglib_impl21xquadraticconstraintsE", !7, i64 0, !10, i64 8, !15, i64 144}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN11alglib_impl12ae_obj_arrayE", !7, i64 0, !7, i64 8, !11, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !13, i64 56, !14, i64 104}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"_ZTSN11alglib_impl7ae_lockE", !12, i64 0, !14, i64 8, !11, i64 40}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !11, i64 16, !14, i64 24, !8, i64 56}
!16 = !{!12, !12, i64 0}
!17 = !{!8, !8, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !8, i64 0}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}
!25 = !{!26, !7, i64 0}
!26 = !{!"_ZTSN11alglib_impl20xquadraticconstraintE", !7, i64 0, !15, i64 8, !15, i64 72, !27, i64 136, !19, i64 504, !19, i64 512, !11, i64 520}
!27 = !{!"_ZTSN11alglib_impl12sparsematrixE", !15, i64 0, !15, i64 64, !15, i64 128, !15, i64 192, !15, i64 256, !7, i64 320, !7, i64 328, !7, i64 336, !7, i64 344, !7, i64 352, !7, i64 360}
!28 = distinct !{!28, !22}
!29 = !{!26, !11, i64 520}
!30 = !{!26, !19, i64 504}
!31 = !{!26, !19, i64 512}
!32 = distinct !{!32, !22}
!33 = !{!26, !7, i64 464}
!34 = !{!26, !7, i64 472}
!35 = distinct !{!35, !22}
!36 = distinct !{!36, !22}


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