; LLVM IR from venumb/ZSPACE :: cpp/depends/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::sactiveset" = type { i64, i64, %"struct.alglib_impl::ae_vector", i8, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i8, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", i64, %"struct.alglib_impl::ae_vector", i64, i64, i8, i8, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", i64, i64, %"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", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::snnlssolver", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"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", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::snnlssolver" = type { i64, i64, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"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", %"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", %"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", %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

@.str.180 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.181 = external hidden unnamed_addr constant [51 x i8], align 1

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

; Function Attrs: 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_impl16ae_fp_greater_eqEdd(double noundef, double noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef, double noundef) #1

declare noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) #1

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef, double noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef, double noundef) #1

declare noundef double @_ZN11alglib_impl12safeminposrvEdddPNS_8ae_stateE(double noundef, double noundef, double noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl19sasexploredirectionEPNS_10sactivesetEPNS_9ae_vectorEPdPlS4_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #2 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %20 = load ptr, ptr %9, align 8, !tbaa !5
  store double 0.000000e+00, ptr %20, align 8, !tbaa !9
  %21 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 0, ptr %21, align 8, !tbaa !11
  %22 = load ptr, ptr %11, align 8, !tbaa !5
  store double 0.000000e+00, ptr %22, align 8, !tbaa !9
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %23, i32 0, i32 1
  %25 = load i64, ptr %24, align 8, !tbaa !13
  %26 = icmp eq i64 %25, 1
  %27 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %26, ptr noundef @.str.180, ptr noundef %27)
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %28, i32 0, i32 0
  %30 = load i64, ptr %29, align 8, !tbaa !20
  store i64 %30, ptr %13, align 8, !tbaa !11
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %31, i32 0, i32 22
  %33 = load i64, ptr %32, align 8, !tbaa !21
  store i64 %33, ptr %14, align 8, !tbaa !11
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %34, i32 0, i32 23
  %36 = load i64, ptr %35, align 8, !tbaa !22
  store i64 %36, ptr %15, align 8, !tbaa !11
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 -1, ptr %37, align 8, !tbaa !11
  %38 = load ptr, ptr %11, align 8, !tbaa !5
  store double 0.000000e+00, ptr %38, align 8, !tbaa !9
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  store double 1.000000e+50, ptr %39, align 8, !tbaa !9
  store i64 0, ptr %16, align 8, !tbaa !11
  br label %40

40:                                               ; preds = %235, %6
  %41 = load i64, ptr %16, align 8, !tbaa !11
  %42 = load i64, ptr %13, align 8, !tbaa !11
  %43 = sub nsw i64 %42, 1
  %44 = icmp sle i64 %41, %43
  br i1 %44, label %45, label %238

45:                                               ; preds = %40
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %46, i32 0, i32 6
  %48 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %47, i32 0, i32 4
  %49 = load ptr, ptr %48, align 8, !tbaa !23
  %50 = load i64, ptr %16, align 8, !tbaa !11
  %51 = getelementptr inbounds i64, ptr %49, i64 %50
  %52 = load i64, ptr %51, align 8, !tbaa !11
  %53 = icmp sle i64 %52, 0
  br i1 %53, label %54, label %234

54:                                               ; preds = %45
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %55, i32 0, i32 17
  %57 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %56, i32 0, i32 4
  %58 = load ptr, ptr %57, align 8, !tbaa !23
  %59 = load i64, ptr %16, align 8, !tbaa !11
  %60 = getelementptr inbounds i8, ptr %58, i64 %59
  %61 = load i8, ptr %60, align 1, !tbaa !24, !range !25, !noundef !26
  %62 = trunc i8 %61 to i1
  br i1 %62, label %63, label %79

63:                                               ; preds = %54
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %64, i32 0, i32 2
  %66 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %65, i32 0, i32 4
  %67 = load ptr, ptr %66, align 8, !tbaa !23
  %68 = load i64, ptr %16, align 8, !tbaa !11
  %69 = getelementptr inbounds double, ptr %67, i64 %68
  %70 = load double, ptr %69, align 8, !tbaa !9
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %71, i32 0, i32 19
  %73 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %72, i32 0, i32 4
  %74 = load ptr, ptr %73, align 8, !tbaa !23
  %75 = load i64, ptr %16, align 8, !tbaa !11
  %76 = getelementptr inbounds double, ptr %74, i64 %75
  %77 = load double, ptr %76, align 8, !tbaa !9
  %78 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %70, double noundef %77)
  br label %79

79:                                               ; preds = %63, %54
  %80 = phi i1 [ true, %54 ], [ %78, %63 ]
  %81 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %80, ptr noundef @.str.181, ptr noundef %81)
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %82, i32 0, i32 18
  %84 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %83, i32 0, i32 4
  %85 = load ptr, ptr %84, align 8, !tbaa !23
  %86 = load i64, ptr %16, align 8, !tbaa !11
  %87 = getelementptr inbounds i8, ptr %85, i64 %86
  %88 = load i8, ptr %87, align 1, !tbaa !24, !range !25, !noundef !26
  %89 = trunc i8 %88 to i1
  br i1 %89, label %90, label %106

90:                                               ; preds = %79
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %91, i32 0, i32 2
  %93 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %92, i32 0, i32 4
  %94 = load ptr, ptr %93, align 8, !tbaa !23
  %95 = load i64, ptr %16, align 8, !tbaa !11
  %96 = getelementptr inbounds double, ptr %94, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !9
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  %99 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %98, i32 0, i32 20
  %100 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %99, i32 0, i32 4
  %101 = load ptr, ptr %100, align 8, !tbaa !23
  %102 = load i64, ptr %16, align 8, !tbaa !11
  %103 = getelementptr inbounds double, ptr %101, i64 %102
  %104 = load double, ptr %103, align 8, !tbaa !9
  %105 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %97, double noundef %104)
  br label %106

106:                                              ; preds = %90, %79
  %107 = phi i1 [ true, %79 ], [ %105, %90 ]
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %107, ptr noundef @.str.181, ptr noundef %108)
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %109, i32 0, i32 17
  %111 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %110, i32 0, i32 4
  %112 = load ptr, ptr %111, align 8, !tbaa !23
  %113 = load i64, ptr %16, align 8, !tbaa !11
  %114 = getelementptr inbounds i8, ptr %112, i64 %113
  %115 = load i8, ptr %114, align 1, !tbaa !24, !range !25, !noundef !26
  %116 = trunc i8 %115 to i1
  br i1 %116, label %117, label %171

117:                                              ; preds = %106
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %118, i32 0, i32 4
  %120 = load ptr, ptr %119, align 8, !tbaa !23
  %121 = load i64, ptr %16, align 8, !tbaa !11
  %122 = getelementptr inbounds double, ptr %120, i64 %121
  %123 = load double, ptr %122, align 8, !tbaa !9
  %124 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %123, double noundef 0.000000e+00)
  br i1 %124, label %125, label %171

125:                                              ; preds = %117
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = load double, ptr %126, align 8, !tbaa !9
  store double %127, ptr %17, align 8, !tbaa !9
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %128, i32 0, i32 2
  %130 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %129, i32 0, i32 4
  %131 = load ptr, ptr %130, align 8, !tbaa !23
  %132 = load i64, ptr %16, align 8, !tbaa !11
  %133 = getelementptr inbounds double, ptr %131, i64 %132
  %134 = load double, ptr %133, align 8, !tbaa !9
  %135 = load ptr, ptr %7, align 8, !tbaa !5
  %136 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %135, i32 0, i32 19
  %137 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %136, i32 0, i32 4
  %138 = load ptr, ptr %137, align 8, !tbaa !23
  %139 = load i64, ptr %16, align 8, !tbaa !11
  %140 = getelementptr inbounds double, ptr %138, i64 %139
  %141 = load double, ptr %140, align 8, !tbaa !9
  %142 = fsub double %134, %141
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %143, i32 0, i32 4
  %145 = load ptr, ptr %144, align 8, !tbaa !23
  %146 = load i64, ptr %16, align 8, !tbaa !11
  %147 = getelementptr inbounds double, ptr %145, i64 %146
  %148 = load double, ptr %147, align 8, !tbaa !9
  %149 = fneg double %148
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = load double, ptr %150, align 8, !tbaa !9
  %152 = load ptr, ptr %12, align 8, !tbaa !5
  %153 = call noundef double @_ZN11alglib_impl12safeminposrvEdddPNS_8ae_stateE(double noundef %142, double noundef %149, double noundef %151, ptr noundef %152)
  %154 = load ptr, ptr %9, align 8, !tbaa !5
  store double %153, ptr %154, align 8, !tbaa !9
  %155 = load ptr, ptr %9, align 8, !tbaa !5
  %156 = load double, ptr %155, align 8, !tbaa !9
  %157 = load double, ptr %17, align 8, !tbaa !9
  %158 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %156, double noundef %157)
  br i1 %158, label %159, label %170

159:                                              ; preds = %125
  %160 = load i64, ptr %16, align 8, !tbaa !11
  %161 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 %160, ptr %161, align 8, !tbaa !11
  %162 = load ptr, ptr %7, align 8, !tbaa !5
  %163 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %162, i32 0, i32 19
  %164 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %163, i32 0, i32 4
  %165 = load ptr, ptr %164, align 8, !tbaa !23
  %166 = load i64, ptr %16, align 8, !tbaa !11
  %167 = getelementptr inbounds double, ptr %165, i64 %166
  %168 = load double, ptr %167, align 8, !tbaa !9
  %169 = load ptr, ptr %11, align 8, !tbaa !5
  store double %168, ptr %169, align 8, !tbaa !9
  br label %170

170:                                              ; preds = %159, %125
  br label %171

171:                                              ; preds = %170, %117, %106
  %172 = load ptr, ptr %7, align 8, !tbaa !5
  %173 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %172, i32 0, i32 18
  %174 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %173, i32 0, i32 4
  %175 = load ptr, ptr %174, align 8, !tbaa !23
  %176 = load i64, ptr %16, align 8, !tbaa !11
  %177 = getelementptr inbounds i8, ptr %175, i64 %176
  %178 = load i8, ptr %177, align 1, !tbaa !24, !range !25, !noundef !26
  %179 = trunc i8 %178 to i1
  br i1 %179, label %180, label %233

180:                                              ; preds = %171
  %181 = load ptr, ptr %8, align 8, !tbaa !5
  %182 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %181, i32 0, i32 4
  %183 = load ptr, ptr %182, align 8, !tbaa !23
  %184 = load i64, ptr %16, align 8, !tbaa !11
  %185 = getelementptr inbounds double, ptr %183, i64 %184
  %186 = load double, ptr %185, align 8, !tbaa !9
  %187 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %186, double noundef 0.000000e+00)
  br i1 %187, label %188, label %233

188:                                              ; preds = %180
  %189 = load ptr, ptr %9, align 8, !tbaa !5
  %190 = load double, ptr %189, align 8, !tbaa !9
  store double %190, ptr %17, align 8, !tbaa !9
  %191 = load ptr, ptr %7, align 8, !tbaa !5
  %192 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %191, i32 0, i32 20
  %193 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %192, i32 0, i32 4
  %194 = load ptr, ptr %193, align 8, !tbaa !23
  %195 = load i64, ptr %16, align 8, !tbaa !11
  %196 = getelementptr inbounds double, ptr %194, i64 %195
  %197 = load double, ptr %196, align 8, !tbaa !9
  %198 = load ptr, ptr %7, align 8, !tbaa !5
  %199 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %198, i32 0, i32 2
  %200 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %199, i32 0, i32 4
  %201 = load ptr, ptr %200, align 8, !tbaa !23
  %202 = load i64, ptr %16, align 8, !tbaa !11
  %203 = getelementptr inbounds double, ptr %201, i64 %202
  %204 = load double, ptr %203, align 8, !tbaa !9
  %205 = fsub double %197, %204
  %206 = load ptr, ptr %8, align 8, !tbaa !5
  %207 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %206, i32 0, i32 4
  %208 = load ptr, ptr %207, align 8, !tbaa !23
  %209 = load i64, ptr %16, align 8, !tbaa !11
  %210 = getelementptr inbounds double, ptr %208, i64 %209
  %211 = load double, ptr %210, align 8, !tbaa !9
  %212 = load ptr, ptr %9, align 8, !tbaa !5
  %213 = load double, ptr %212, align 8, !tbaa !9
  %214 = load ptr, ptr %12, align 8, !tbaa !5
  %215 = call noundef double @_ZN11alglib_impl12safeminposrvEdddPNS_8ae_stateE(double noundef %205, double noundef %211, double noundef %213, ptr noundef %214)
  %216 = load ptr, ptr %9, align 8, !tbaa !5
  store double %215, ptr %216, align 8, !tbaa !9
  %217 = load ptr, ptr %9, align 8, !tbaa !5
  %218 = load double, ptr %217, align 8, !tbaa !9
  %219 = load double, ptr %17, align 8, !tbaa !9
  %220 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %218, double noundef %219)
  br i1 %220, label %221, label %232

221:                                              ; preds = %188
  %222 = load i64, ptr %16, align 8, !tbaa !11
  %223 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 %222, ptr %223, align 8, !tbaa !11
  %224 = load ptr, ptr %7, align 8, !tbaa !5
  %225 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %224, i32 0, i32 20
  %226 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %225, i32 0, i32 4
  %227 = load ptr, ptr %226, align 8, !tbaa !23
  %228 = load i64, ptr %16, align 8, !tbaa !11
  %229 = getelementptr inbounds double, ptr %227, i64 %228
  %230 = load double, ptr %229, align 8, !tbaa !9
  %231 = load ptr, ptr %11, align 8, !tbaa !5
  store double %230, ptr %231, align 8, !tbaa !9
  br label %232

232:                                              ; preds = %221, %188
  br label %233

233:                                              ; preds = %232, %180, %171
  br label %234

234:                                              ; preds = %233, %45
  br label %235

235:                                              ; preds = %234
  %236 = load i64, ptr %16, align 8, !tbaa !11
  %237 = add nsw i64 %236, 1
  store i64 %237, ptr %16, align 8, !tbaa !11
  br label %40, !llvm.loop !27

238:                                              ; preds = %40
  %239 = load i64, ptr %14, align 8, !tbaa !11
  store i64 %239, ptr %16, align 8, !tbaa !11
  br label %240

240:                                              ; preds = %339, %238
  %241 = load i64, ptr %16, align 8, !tbaa !11
  %242 = load i64, ptr %14, align 8, !tbaa !11
  %243 = load i64, ptr %15, align 8, !tbaa !11
  %244 = add nsw i64 %242, %243
  %245 = sub nsw i64 %244, 1
  %246 = icmp sle i64 %241, %245
  br i1 %246, label %247, label %342

247:                                              ; preds = %240
  %248 = load ptr, ptr %7, align 8, !tbaa !5
  %249 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %248, i32 0, i32 6
  %250 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %249, i32 0, i32 4
  %251 = load ptr, ptr %250, align 8, !tbaa !23
  %252 = load i64, ptr %13, align 8, !tbaa !11
  %253 = load i64, ptr %16, align 8, !tbaa !11
  %254 = add nsw i64 %252, %253
  %255 = getelementptr inbounds i64, ptr %251, i64 %254
  %256 = load i64, ptr %255, align 8, !tbaa !11
  %257 = icmp sle i64 %256, 0
  br i1 %257, label %258, label %338

258:                                              ; preds = %247
  %259 = load ptr, ptr %7, align 8, !tbaa !5
  %260 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %259, i32 0, i32 21
  %261 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %260, i32 0, i32 6
  %262 = load ptr, ptr %261, align 8, !tbaa !23
  %263 = load i64, ptr %16, align 8, !tbaa !11
  %264 = getelementptr inbounds ptr, ptr %262, i64 %263
  %265 = load ptr, ptr %264, align 8, !tbaa !5
  %266 = getelementptr inbounds double, ptr %265, i64 0
  %267 = load ptr, ptr %7, align 8, !tbaa !5
  %268 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %267, i32 0, i32 2
  %269 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %268, i32 0, i32 4
  %270 = load ptr, ptr %269, align 8, !tbaa !23
  %271 = getelementptr inbounds double, ptr %270, i64 0
  %272 = load i64, ptr %13, align 8, !tbaa !11
  %273 = sub nsw i64 %272, 1
  %274 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %273)
  %275 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %266, i64 noundef 1, ptr noundef %271, i64 noundef 1, i64 noundef %274)
  store double %275, ptr %18, align 8, !tbaa !9
  %276 = load double, ptr %18, align 8, !tbaa !9
  %277 = load ptr, ptr %7, align 8, !tbaa !5
  %278 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %277, i32 0, i32 21
  %279 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %278, i32 0, i32 6
  %280 = load ptr, ptr %279, align 8, !tbaa !23
  %281 = load i64, ptr %16, align 8, !tbaa !11
  %282 = getelementptr inbounds ptr, ptr %280, i64 %281
  %283 = load ptr, ptr %282, align 8, !tbaa !5
  %284 = load i64, ptr %13, align 8, !tbaa !11
  %285 = getelementptr inbounds double, ptr %283, i64 %284
  %286 = load double, ptr %285, align 8, !tbaa !9
  %287 = fsub double %276, %286
  store double %287, ptr %18, align 8, !tbaa !9
  %288 = load ptr, ptr %7, align 8, !tbaa !5
  %289 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %288, i32 0, i32 21
  %290 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %289, i32 0, i32 6
  %291 = load ptr, ptr %290, align 8, !tbaa !23
  %292 = load i64, ptr %16, align 8, !tbaa !11
  %293 = getelementptr inbounds ptr, ptr %291, i64 %292
  %294 = load ptr, ptr %293, align 8, !tbaa !5
  %295 = getelementptr inbounds double, ptr %294, i64 0
  %296 = load ptr, ptr %8, align 8, !tbaa !5
  %297 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %296, i32 0, i32 4
  %298 = load ptr, ptr %297, align 8, !tbaa !23
  %299 = getelementptr inbounds double, ptr %298, i64 0
  %300 = load i64, ptr %13, align 8, !tbaa !11
  %301 = sub nsw i64 %300, 1
  %302 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %301)
  %303 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %295, i64 noundef 1, ptr noundef %299, i64 noundef 1, i64 noundef %302)
  store double %303, ptr %19, align 8, !tbaa !9
  %304 = load double, ptr %19, align 8, !tbaa !9
  %305 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %304, double noundef 0.000000e+00)
  br i1 %305, label %306, label %307

306:                                              ; preds = %258
  br label %339

307:                                              ; preds = %258
  %308 = load double, ptr %18, align 8, !tbaa !9
  %309 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %308, double noundef 0.000000e+00)
  br i1 %309, label %310, label %331

310:                                              ; preds = %307
  %311 = load ptr, ptr %9, align 8, !tbaa !5
  %312 = load double, ptr %311, align 8, !tbaa !9
  store double %312, ptr %17, align 8, !tbaa !9
  %313 = load double, ptr %18, align 8, !tbaa !9
  %314 = fneg double %313
  %315 = load double, ptr %19, align 8, !tbaa !9
  %316 = load ptr, ptr %9, align 8, !tbaa !5
  %317 = load double, ptr %316, align 8, !tbaa !9
  %318 = load ptr, ptr %12, align 8, !tbaa !5
  %319 = call noundef double @_ZN11alglib_impl12safeminposrvEdddPNS_8ae_stateE(double noundef %314, double noundef %315, double noundef %317, ptr noundef %318)
  %320 = load ptr, ptr %9, align 8, !tbaa !5
  store double %319, ptr %320, align 8, !tbaa !9
  %321 = load ptr, ptr %9, align 8, !tbaa !5
  %322 = load double, ptr %321, align 8, !tbaa !9
  %323 = load double, ptr %17, align 8, !tbaa !9
  %324 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %322, double noundef %323)
  br i1 %324, label %325, label %330

325:                                              ; preds = %310
  %326 = load i64, ptr %13, align 8, !tbaa !11
  %327 = load i64, ptr %16, align 8, !tbaa !11
  %328 = add nsw i64 %326, %327
  %329 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 %328, ptr %329, align 8, !tbaa !11
  br label %330

330:                                              ; preds = %325, %310
  br label %337

331:                                              ; preds = %307
  %332 = load ptr, ptr %9, align 8, !tbaa !5
  store double 0.000000e+00, ptr %332, align 8, !tbaa !9
  %333 = load i64, ptr %13, align 8, !tbaa !11
  %334 = load i64, ptr %16, align 8, !tbaa !11
  %335 = add nsw i64 %333, %334
  %336 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 %335, ptr %336, align 8, !tbaa !11
  br label %337

337:                                              ; preds = %331, %330
  br label %338

338:                                              ; preds = %337, %247
  br label %339

339:                                              ; preds = %338, %306
  %340 = load i64, ptr %16, align 8, !tbaa !11
  %341 = add nsw i64 %340, 1
  store i64 %341, ptr %16, align 8, !tbaa !11
  br label %240, !llvm.loop !29

342:                                              ; preds = %240
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  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 = { 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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !12, i64 8}
!14 = !{!"_ZTSN11alglib_impl10sactivesetE", !12, i64 0, !12, i64 8, !15, i64 16, !16, i64 80, !15, i64 88, !15, i64 152, !15, i64 216, !16, i64 280, !18, i64 288, !18, i64 368, !18, i64 448, !12, i64 528, !15, i64 536, !12, i64 600, !12, i64 608, !16, i64 616, !16, i64 617, !15, i64 624, !15, i64 688, !15, i64 752, !15, i64 816, !18, i64 880, !12, i64 960, !12, i64 968, !15, i64 976, !15, i64 1040, !15, i64 1104, !15, i64 1168, !15, i64 1232, !15, i64 1296, !19, i64 1360, !15, i64 3000, !15, i64 3064, !15, i64 3128, !18, i64 3192, !15, i64 3272, !15, i64 3336, !15, i64 3400, !18, i64 3464, !18, i64 3544, !15, i64 3624, !15, i64 3688, !15, i64 3752, !18, i64 3816, !15, i64 3896, !15, i64 3960, !15, i64 4024, !15, i64 4088, !15, i64 4152, !15, i64 4216, !15, i64 4280}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !12, i64 0, !12, i64 8, !16, i64 16, !17, i64 24, !7, i64 56}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!18 = !{!"_ZTSN11alglib_impl9ae_matrixE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !16, i64 32, !17, i64 40, !7, i64 72}
!19 = !{!"_ZTSN11alglib_impl11snnlssolverE", !12, i64 0, !12, i64 8, !12, i64 16, !18, i64 24, !15, i64 104, !15, i64 168, !10, i64 232, !12, i64 240, !15, i64 248, !15, i64 312, !18, i64 376, !18, i64 456, !18, i64 536, !15, i64 616, !15, i64 680, !15, i64 744, !15, i64 808, !15, i64 872, !15, i64 936, !15, i64 1000, !15, i64 1064, !15, i64 1128, !15, i64 1192, !15, i64 1256, !15, i64 1320, !15, i64 1384, !15, i64 1448, !15, i64 1512, !15, i64 1576}
!20 = !{!14, !12, i64 0}
!21 = !{!14, !12, i64 960}
!22 = !{!14, !12, i64 968}
!23 = !{!7, !7, i64 0}
!24 = !{!16, !16, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.180 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.181 = external hidden unnamed_addr constant [51 x i8], align 1

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

declare noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef, double noundef) local_unnamed_addr #0

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef, double noundef) local_unnamed_addr #0

declare noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) local_unnamed_addr #0

declare noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef, double noundef) local_unnamed_addr #0

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef, double noundef) local_unnamed_addr #0

declare noundef double @_ZN11alglib_impl12safeminposrvEdddPNS_8ae_stateE(double noundef, double noundef, double noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl19sasexploredirectionEPNS_10sactivesetEPNS_9ae_vectorEPdPlS4_PNS_8ae_stateE(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef %2, ptr nocapture noundef writeonly %3, ptr nocapture noundef writeonly %4, ptr noundef %5) local_unnamed_addr #1 {
  store double 0.000000e+00, ptr %2, align 8, !tbaa !5
  store i64 0, ptr %3, align 8, !tbaa !9
  store double 0.000000e+00, ptr %4, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  %8 = load i64, ptr %7, align 8, !tbaa !11
  %9 = icmp eq i64 %8, 1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef nonnull @.str.180, ptr noundef %5)
  %10 = load i64, ptr %0, align 8, !tbaa !19
  %11 = getelementptr inbounds i8, ptr %0, i64 960
  %12 = load i64, ptr %11, align 8, !tbaa !20
  %13 = getelementptr inbounds i8, ptr %0, i64 968
  %14 = load i64, ptr %13, align 8, !tbaa !21
  store i64 -1, ptr %3, align 8, !tbaa !9
  store double 0.000000e+00, ptr %4, align 8, !tbaa !5
  store double 1.000000e+50, ptr %2, align 8, !tbaa !5
  %.not.not110 = icmp sgt i64 %10, 0
  br i1 %.not.not110, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %6
  %15 = getelementptr inbounds i8, ptr %0, i64 272
  %16 = getelementptr inbounds i8, ptr %0, i64 680
  %17 = getelementptr inbounds i8, ptr %0, i64 72
  %18 = getelementptr inbounds i8, ptr %0, i64 808
  %19 = getelementptr inbounds i8, ptr %0, i64 744
  %20 = getelementptr inbounds i8, ptr %0, i64 872
  %21 = getelementptr inbounds i8, ptr %1, i64 56
  br label %28

.preheader:                                       ; preds = %118, %6
  %22 = add nsw i64 %10, -1
  %23 = add nsw i64 %14, %12
  %.not.not109112 = icmp sgt i64 %14, 0
  br i1 %.not.not109112, label %.lr.ph114, label %._crit_edge

.lr.ph114:                                        ; preds = %.preheader
  %24 = getelementptr inbounds i8, ptr %0, i64 272
  %25 = getelementptr inbounds i8, ptr %0, i64 952
  %26 = getelementptr inbounds i8, ptr %0, i64 72
  %27 = getelementptr inbounds i8, ptr %1, i64 56
  br label %120

28:                                               ; preds = %.lr.ph, %118
  %.0111 = phi i64 [ 0, %.lr.ph ], [ %119, %118 ]
  %29 = load ptr, ptr %15, align 8, !tbaa !22
  %30 = getelementptr inbounds i64, ptr %29, i64 %.0111
  %31 = load i64, ptr %30, align 8, !tbaa !9
  %32 = icmp slt i64 %31, 1
  br i1 %32, label %33, label %118

33:                                               ; preds = %28
  %34 = load ptr, ptr %16, align 8, !tbaa !22
  %35 = getelementptr inbounds i8, ptr %34, i64 %.0111
  %36 = load i8, ptr %35, align 1, !tbaa !23, !range !24, !noundef !25
  %37 = trunc nuw i8 %36 to i1
  br i1 %37, label %38, label %46

38:                                               ; preds = %33
  %39 = load ptr, ptr %17, align 8, !tbaa !22
  %40 = getelementptr inbounds double, ptr %39, i64 %.0111
  %41 = load double, ptr %40, align 8, !tbaa !5
  %42 = load ptr, ptr %18, align 8, !tbaa !22
  %43 = getelementptr inbounds double, ptr %42, i64 %.0111
  %44 = load double, ptr %43, align 8, !tbaa !5
  %45 = tail call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %41, double noundef %44)
  br label %46

46:                                               ; preds = %38, %33
  %47 = phi i1 [ true, %33 ], [ %45, %38 ]
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %47, ptr noundef nonnull @.str.181, ptr noundef %5)
  %48 = load ptr, ptr %19, align 8, !tbaa !22
  %49 = getelementptr inbounds i8, ptr %48, i64 %.0111
  %50 = load i8, ptr %49, align 1, !tbaa !23, !range !24, !noundef !25
  %51 = trunc nuw i8 %50 to i1
  br i1 %51, label %52, label %60

52:                                               ; preds = %46
  %53 = load ptr, ptr %17, align 8, !tbaa !22
  %54 = getelementptr inbounds double, ptr %53, i64 %.0111
  %55 = load double, ptr %54, align 8, !tbaa !5
  %56 = load ptr, ptr %20, align 8, !tbaa !22
  %57 = getelementptr inbounds double, ptr %56, i64 %.0111
  %58 = load double, ptr %57, align 8, !tbaa !5
  %59 = tail call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %55, double noundef %58)
  br label %60

60:                                               ; preds = %52, %46
  %61 = phi i1 [ true, %46 ], [ %59, %52 ]
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %61, ptr noundef nonnull @.str.181, ptr noundef %5)
  %62 = load ptr, ptr %16, align 8, !tbaa !22
  %63 = getelementptr inbounds i8, ptr %62, i64 %.0111
  %64 = load i8, ptr %63, align 1, !tbaa !23, !range !24, !noundef !25
  %65 = trunc nuw i8 %64 to i1
  br i1 %65, label %66, label %90

66:                                               ; preds = %60
  %67 = load ptr, ptr %21, align 8, !tbaa !22
  %68 = getelementptr inbounds double, ptr %67, i64 %.0111
  %69 = load double, ptr %68, align 8, !tbaa !5
  %70 = tail call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %69, double noundef 0.000000e+00)
  br i1 %70, label %71, label %90

71:                                               ; preds = %66
  %72 = load double, ptr %2, align 8, !tbaa !5
  %73 = load ptr, ptr %17, align 8, !tbaa !22
  %74 = getelementptr inbounds double, ptr %73, i64 %.0111
  %75 = load double, ptr %74, align 8, !tbaa !5
  %76 = load ptr, ptr %18, align 8, !tbaa !22
  %77 = getelementptr inbounds double, ptr %76, i64 %.0111
  %78 = load double, ptr %77, align 8, !tbaa !5
  %79 = fsub double %75, %78
  %80 = load ptr, ptr %21, align 8, !tbaa !22
  %81 = getelementptr inbounds double, ptr %80, i64 %.0111
  %82 = load double, ptr %81, align 8, !tbaa !5
  %83 = fneg double %82
  %84 = tail call noundef double @_ZN11alglib_impl12safeminposrvEdddPNS_8ae_stateE(double noundef %79, double noundef %83, double noundef %72, ptr noundef %5)
  store double %84, ptr %2, align 8, !tbaa !5
  %85 = tail call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %84, double noundef %72)
  br i1 %85, label %86, label %90

86:                                               ; preds = %71
  store i64 %.0111, ptr %3, align 8, !tbaa !9
  %87 = load ptr, ptr %18, align 8, !tbaa !22
  %88 = getelementptr inbounds double, ptr %87, i64 %.0111
  %89 = load double, ptr %88, align 8, !tbaa !5
  store double %89, ptr %4, align 8, !tbaa !5
  br label %90

90:                                               ; preds = %71, %86, %66, %60
  %91 = load ptr, ptr %19, align 8, !tbaa !22
  %92 = getelementptr inbounds i8, ptr %91, i64 %.0111
  %93 = load i8, ptr %92, align 1, !tbaa !23, !range !24, !noundef !25
  %94 = trunc nuw i8 %93 to i1
  br i1 %94, label %95, label %118

95:                                               ; preds = %90
  %96 = load ptr, ptr %21, align 8, !tbaa !22
  %97 = getelementptr inbounds double, ptr %96, i64 %.0111
  %98 = load double, ptr %97, align 8, !tbaa !5
  %99 = tail call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %98, double noundef 0.000000e+00)
  br i1 %99, label %100, label %118

100:                                              ; preds = %95
  %101 = load double, ptr %2, align 8, !tbaa !5
  %102 = load ptr, ptr %20, align 8, !tbaa !22
  %103 = getelementptr inbounds double, ptr %102, i64 %.0111
  %104 = load double, ptr %103, align 8, !tbaa !5
  %105 = load ptr, ptr %17, align 8, !tbaa !22
  %106 = getelementptr inbounds double, ptr %105, i64 %.0111
  %107 = load double, ptr %106, align 8, !tbaa !5
  %108 = fsub double %104, %107
  %109 = load ptr, ptr %21, align 8, !tbaa !22
  %110 = getelementptr inbounds double, ptr %109, i64 %.0111
  %111 = load double, ptr %110, align 8, !tbaa !5
  %112 = tail call noundef double @_ZN11alglib_impl12safeminposrvEdddPNS_8ae_stateE(double noundef %108, double noundef %111, double noundef %101, ptr noundef %5)
  store double %112, ptr %2, align 8, !tbaa !5
  %113 = tail call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %112, double noundef %101)
  br i1 %113, label %114, label %118

114:                                              ; preds = %100
  store i64 %.0111, ptr %3, align 8, !tbaa !9
  %115 = load ptr, ptr %20, align 8, !tbaa !22
  %116 = getelementptr inbounds double, ptr %115, i64 %.0111
  %117 = load double, ptr %116, align 8, !tbaa !5
  store double %117, ptr %4, align 8, !tbaa !5
  br label %118

118:                                              ; preds = %28, %100, %114, %95, %90
  %119 = add nuw nsw i64 %.0111, 1
  %exitcond.not = icmp eq i64 %119, %10
  br i1 %exitcond.not, label %.preheader, label %28, !llvm.loop !26

120:                                              ; preds = %.lr.ph114, %151
  %.1113 = phi i64 [ %12, %.lr.ph114 ], [ %152, %151 ]
  %121 = load ptr, ptr %24, align 8, !tbaa !22
  %122 = add nsw i64 %.1113, %10
  %123 = getelementptr inbounds i64, ptr %121, i64 %122
  %124 = load i64, ptr %123, align 8, !tbaa !9
  %125 = icmp slt i64 %124, 1
  br i1 %125, label %126, label %151

126:                                              ; preds = %120
  %127 = load ptr, ptr %25, align 8, !tbaa !22
  %128 = getelementptr inbounds ptr, ptr %127, i64 %.1113
  %129 = load ptr, ptr %128, align 8, !tbaa !28
  %130 = load ptr, ptr %26, align 8, !tbaa !22
  %131 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %22)
  %132 = tail call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %129, i64 noundef 1, ptr noundef %130, i64 noundef 1, i64 noundef %131)
  %133 = load ptr, ptr %25, align 8, !tbaa !22
  %134 = getelementptr inbounds ptr, ptr %133, i64 %.1113
  %135 = load ptr, ptr %134, align 8, !tbaa !28
  %136 = getelementptr inbounds double, ptr %135, i64 %10
  %137 = load double, ptr %136, align 8, !tbaa !5
  %138 = fsub double %132, %137
  %139 = load ptr, ptr %27, align 8, !tbaa !22
  %140 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %22)
  %141 = tail call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %135, i64 noundef 1, ptr noundef %139, i64 noundef 1, i64 noundef %140)
  %142 = tail call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %141, double noundef 0.000000e+00)
  br i1 %142, label %151, label %143

143:                                              ; preds = %126
  %144 = tail call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %138, double noundef 0.000000e+00)
  br i1 %144, label %145, label %150

145:                                              ; preds = %143
  %146 = load double, ptr %2, align 8, !tbaa !5
  %147 = fneg double %138
  %148 = tail call noundef double @_ZN11alglib_impl12safeminposrvEdddPNS_8ae_stateE(double noundef %147, double noundef %141, double noundef %146, ptr noundef %5)
  store double %148, ptr %2, align 8, !tbaa !5
  %149 = tail call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %148, double noundef %146)
  br i1 %149, label %.sink.split, label %151

150:                                              ; preds = %143
  store double 0.000000e+00, ptr %2, align 8, !tbaa !5
  br label %.sink.split

.sink.split:                                      ; preds = %145, %150
  store i64 %122, ptr %3, align 8, !tbaa !9
  br label %151

151:                                              ; preds = %.sink.split, %120, %145, %126
  %152 = add nsw i64 %.1113, 1
  %.not.not109 = icmp slt i64 %152, %23
  br i1 %.not.not109, label %120, label %._crit_edge, !llvm.loop !29

._crit_edge:                                      ; preds = %151, %.preheader
  ret void
}

attributes #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 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" }

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTSN11alglib_impl10sactivesetE", !10, i64 0, !10, i64 8, !13, i64 16, !14, i64 80, !13, i64 88, !13, i64 152, !13, i64 216, !14, i64 280, !17, i64 288, !17, i64 368, !17, i64 448, !10, i64 528, !13, i64 536, !10, i64 600, !10, i64 608, !14, i64 616, !14, i64 617, !13, i64 624, !13, i64 688, !13, i64 752, !13, i64 816, !17, i64 880, !10, i64 960, !10, i64 968, !13, i64 976, !13, i64 1040, !13, i64 1104, !13, i64 1168, !13, i64 1232, !13, i64 1296, !18, i64 1360, !13, i64 3000, !13, i64 3064, !13, i64 3128, !17, i64 3192, !13, i64 3272, !13, i64 3336, !13, i64 3400, !17, i64 3464, !17, i64 3544, !13, i64 3624, !13, i64 3688, !13, i64 3752, !17, i64 3816, !13, i64 3896, !13, i64 3960, !13, i64 4024, !13, i64 4088, !13, i64 4152, !13, i64 4216, !13, i64 4280}
!13 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !14, i64 16, !15, i64 24, !7, i64 56}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !14, i64 32, !15, i64 40, !7, i64 72}
!18 = !{!"_ZTSN11alglib_impl11snnlssolverE", !10, i64 0, !10, i64 8, !10, i64 16, !17, i64 24, !13, i64 104, !13, i64 168, !6, i64 232, !10, i64 240, !13, i64 248, !13, i64 312, !17, i64 376, !17, i64 456, !17, i64 536, !13, i64 616, !13, i64 680, !13, i64 744, !13, i64 808, !13, i64 872, !13, i64 936, !13, i64 1000, !13, i64 1064, !13, i64 1128, !13, i64 1192, !13, i64 1256, !13, i64 1320, !13, i64 1384, !13, i64 1448, !13, i64 1512, !13, i64 1576}
!19 = !{!12, !10, i64 0}
!20 = !{!12, !10, i64 960}
!21 = !{!12, !10, i64 968}
!22 = !{!7, !7, i64 0}
!23 = !{!14, !14, i64 0}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!16, !16, i64 0}
!29 = distinct !{!29, !27}


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