; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src (linalg)

; 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_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::sinteger" = type { i64 }
%"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::matinvreport" = type { double, double }

@.str.278 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.279 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.280 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.281 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.282 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.283 = external hidden unnamed_addr constant [42 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN11alglib_impl15rmatrixlurcond1EPNS_9ae_matrixElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN11alglib_impl17rmatrixlurcondinfEPNS_9ae_matrixElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl16rmatrixluinverseEPNS_9ae_matrixEPNS_9ae_vectorElPlPNS_12matinvreportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.alglib_impl::ae_frame", align 8
  %14 = alloca %"struct.alglib_impl::ae_vector", align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca double, align 8
  %19 = alloca %"struct.alglib_impl::sinteger", align 8
  %20 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i64 %2, ptr %9, align 8, !tbaa !9
  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 32, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, 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
  %21 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %21, ptr noundef %13)
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 8, i1 false)
  %22 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 0, ptr %22, align 8, !tbaa !9
  %23 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN11alglib_impl19_matinvreport_clearEPv(ptr noundef %23)
  %24 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %14, i64 noundef 0, i64 noundef 3, ptr noundef %24, i1 noundef zeroext true)
  %25 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14_sinteger_initEPvPNS_8ae_stateEb(ptr noundef %19, ptr noundef %25, i1 noundef zeroext true)
  %26 = load i64, ptr %9, align 8, !tbaa !9
  %27 = icmp sgt i64 %26, 0
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef @.str.278, ptr noundef %28)
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %29, i32 0, i32 1
  %31 = load i64, ptr %30, align 8, !tbaa !11
  %32 = load i64, ptr %9, align 8, !tbaa !9
  %33 = icmp sge i64 %31, %32
  %34 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %33, ptr noundef @.str.279, ptr noundef %34)
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %35, i32 0, i32 0
  %37 = load i64, ptr %36, align 8, !tbaa !15
  %38 = load i64, ptr %9, align 8, !tbaa !9
  %39 = icmp sge i64 %37, %38
  %40 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %39, ptr noundef @.str.280, ptr noundef %40)
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %41, i32 0, i32 0
  %43 = load i64, ptr %42, align 8, !tbaa !16
  %44 = load i64, ptr %9, align 8, !tbaa !9
  %45 = icmp sge i64 %43, %44
  %46 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %45, ptr noundef @.str.281, ptr noundef %46)
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = load i64, ptr %9, align 8, !tbaa !9
  %49 = load i64, ptr %9, align 8, !tbaa !9
  %50 = load ptr, ptr %12, align 8, !tbaa !5
  %51 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %47, i64 noundef %48, i64 noundef %49, ptr noundef %50)
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %51, ptr noundef @.str.282, ptr noundef %52)
  %53 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 1, ptr %53, align 8, !tbaa !9
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %54

54:                                               ; preds = %81, %6
  %55 = load i64, ptr %15, align 8, !tbaa !9
  %56 = load i64, ptr %9, align 8, !tbaa !9
  %57 = sub nsw i64 %56, 1
  %58 = icmp sle i64 %55, %57
  br i1 %58, label %59, label %84

59:                                               ; preds = %54
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %60, i32 0, i32 4
  %62 = load ptr, ptr %61, align 8, !tbaa !18
  %63 = load i64, ptr %15, align 8, !tbaa !9
  %64 = getelementptr inbounds i64, ptr %62, i64 %63
  %65 = load i64, ptr %64, align 8, !tbaa !9
  %66 = load i64, ptr %9, align 8, !tbaa !9
  %67 = sub nsw i64 %66, 1
  %68 = icmp sgt i64 %65, %67
  br i1 %68, label %78, label %69

69:                                               ; preds = %59
  %70 = load ptr, ptr %8, 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 !18
  %73 = load i64, ptr %15, align 8, !tbaa !9
  %74 = getelementptr inbounds i64, ptr %72, i64 %73
  %75 = load i64, ptr %74, align 8, !tbaa !9
  %76 = load i64, ptr %15, align 8, !tbaa !9
  %77 = icmp slt i64 %75, %76
  br i1 %77, label %78, label %80

78:                                               ; preds = %69, %59
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 -1, ptr %79, align 8, !tbaa !9
  br label %80

80:                                               ; preds = %78, %69
  br label %81

81:                                               ; preds = %80
  %82 = load i64, ptr %15, align 8, !tbaa !9
  %83 = add nsw i64 %82, 1
  store i64 %83, ptr %15, align 8, !tbaa !9
  br label %54, !llvm.loop !19

84:                                               ; preds = %54
  %85 = load ptr, ptr %10, align 8, !tbaa !5
  %86 = load i64, ptr %85, align 8, !tbaa !9
  %87 = icmp sgt i64 %86, 0
  %88 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %87, ptr noundef @.str.283, ptr noundef %88)
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = load i64, ptr %9, align 8, !tbaa !9
  %91 = load ptr, ptr %12, align 8, !tbaa !5
  %92 = call noundef double @_ZN11alglib_impl15rmatrixlurcond1EPNS_9ae_matrixElPNS_8ae_stateE(ptr noundef %89, i64 noundef %90, ptr noundef %91)
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = getelementptr inbounds %"struct.alglib_impl::matinvreport", ptr %93, i32 0, i32 0
  store double %92, ptr %94, align 8, !tbaa !21
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = load i64, ptr %9, align 8, !tbaa !9
  %97 = load ptr, ptr %12, align 8, !tbaa !5
  %98 = call noundef double @_ZN11alglib_impl17rmatrixlurcondinfEPNS_9ae_matrixElPNS_8ae_stateE(ptr noundef %95, i64 noundef %96, ptr noundef %97)
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.alglib_impl::matinvreport", ptr %99, i32 0, i32 1
  store double %98, ptr %100, align 8, !tbaa !24
  %101 = load ptr, ptr %11, align 8, !tbaa !5
  %102 = getelementptr inbounds %"struct.alglib_impl::matinvreport", ptr %101, i32 0, i32 0
  %103 = load double, ptr %102, align 8, !tbaa !21
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  %105 = call noundef double @_ZN11alglib_impl14rcondthresholdEPNS_8ae_stateE(ptr noundef %104)
  %106 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %103, double noundef %105)
  br i1 %106, label %114, label %107

107:                                              ; preds = %84
  %108 = load ptr, ptr %11, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.alglib_impl::matinvreport", ptr %108, i32 0, i32 1
  %110 = load double, ptr %109, align 8, !tbaa !24
  %111 = load ptr, ptr %12, align 8, !tbaa !5
  %112 = call noundef double @_ZN11alglib_impl14rcondthresholdEPNS_8ae_stateE(ptr noundef %111)
  %113 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %110, double noundef %112)
  br i1 %113, label %114, label %149

114:                                              ; preds = %107, %84
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %115

115:                                              ; preds = %139, %114
  %116 = load i64, ptr %15, align 8, !tbaa !9
  %117 = load i64, ptr %9, align 8, !tbaa !9
  %118 = sub nsw i64 %117, 1
  %119 = icmp sle i64 %116, %118
  br i1 %119, label %120, label %142

120:                                              ; preds = %115
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %121

121:                                              ; preds = %135, %120
  %122 = load i64, ptr %16, align 8, !tbaa !9
  %123 = load i64, ptr %9, align 8, !tbaa !9
  %124 = sub nsw i64 %123, 1
  %125 = icmp sle i64 %122, %124
  br i1 %125, label %126, label %138

126:                                              ; preds = %121
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %127, i32 0, i32 6
  %129 = load ptr, ptr %128, align 8, !tbaa !18
  %130 = load i64, ptr %15, align 8, !tbaa !9
  %131 = getelementptr inbounds ptr, ptr %129, i64 %130
  %132 = load ptr, ptr %131, align 8, !tbaa !5
  %133 = load i64, ptr %16, align 8, !tbaa !9
  %134 = getelementptr inbounds double, ptr %132, i64 %133
  store double 0.000000e+00, ptr %134, align 8, !tbaa !25
  br label %135

135:                                              ; preds = %126
  %136 = load i64, ptr %16, align 8, !tbaa !9
  %137 = add nsw i64 %136, 1
  store i64 %137, ptr %16, align 8, !tbaa !9
  br label %121, !llvm.loop !26

138:                                              ; preds = %121
  br label %139

139:                                              ; preds = %138
  %140 = load i64, ptr %15, align 8, !tbaa !9
  %141 = add nsw i64 %140, 1
  store i64 %141, ptr %15, align 8, !tbaa !9
  br label %115, !llvm.loop !27

142:                                              ; preds = %115
  %143 = load ptr, ptr %11, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.alglib_impl::matinvreport", ptr %143, i32 0, i32 0
  store double 0.000000e+00, ptr %144, align 8, !tbaa !21
  %145 = load ptr, ptr %11, align 8, !tbaa !5
  %146 = getelementptr inbounds %"struct.alglib_impl::matinvreport", ptr %145, i32 0, i32 1
  store double 0.000000e+00, ptr %146, align 8, !tbaa !24
  %147 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 -3, ptr %147, align 8, !tbaa !9
  %148 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %148)
  store i32 1, ptr %20, align 4
  br label %222

149:                                              ; preds = %107
  %150 = load i64, ptr %9, align 8, !tbaa !9
  %151 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %14, i64 noundef %150, ptr noundef %151)
  %152 = getelementptr inbounds %"struct.alglib_impl::sinteger", ptr %19, i32 0, i32 0
  store i64 1, ptr %152, align 8, !tbaa !28
  %153 = load ptr, ptr %7, align 8, !tbaa !5
  %154 = load i64, ptr %9, align 8, !tbaa !9
  %155 = load ptr, ptr %11, align 8, !tbaa !5
  %156 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_implL26matinv_rmatrixluinverserecEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8sintegerEPNS_12matinvreportEPNS_8ae_stateE(ptr noundef %153, i64 noundef 0, i64 noundef %154, ptr noundef %14, ptr noundef %19, ptr noundef %155, ptr noundef %156)
  %157 = getelementptr inbounds %"struct.alglib_impl::sinteger", ptr %19, i32 0, i32 0
  %158 = load i64, ptr %157, align 8, !tbaa !28
  %159 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 %158, ptr %159, align 8, !tbaa !9
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %160

160:                                              ; preds = %217, %149
  %161 = load i64, ptr %15, align 8, !tbaa !9
  %162 = load i64, ptr %9, align 8, !tbaa !9
  %163 = sub nsw i64 %162, 1
  %164 = icmp sle i64 %161, %163
  br i1 %164, label %165, label %220

165:                                              ; preds = %160
  %166 = load i64, ptr %9, align 8, !tbaa !9
  %167 = sub nsw i64 %166, 2
  store i64 %167, ptr %16, align 8, !tbaa !9
  br label %168

168:                                              ; preds = %213, %165
  %169 = load i64, ptr %16, align 8, !tbaa !9
  %170 = icmp sge i64 %169, 0
  br i1 %170, label %171, label %216

171:                                              ; preds = %168
  %172 = load ptr, ptr %8, align 8, !tbaa !5
  %173 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %172, i32 0, i32 4
  %174 = load ptr, ptr %173, align 8, !tbaa !18
  %175 = load i64, ptr %16, align 8, !tbaa !9
  %176 = getelementptr inbounds i64, ptr %174, i64 %175
  %177 = load i64, ptr %176, align 8, !tbaa !9
  store i64 %177, ptr %17, align 8, !tbaa !9
  %178 = load ptr, ptr %7, align 8, !tbaa !5
  %179 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %178, i32 0, i32 6
  %180 = load ptr, ptr %179, align 8, !tbaa !18
  %181 = load i64, ptr %15, align 8, !tbaa !9
  %182 = getelementptr inbounds ptr, ptr %180, i64 %181
  %183 = load ptr, ptr %182, align 8, !tbaa !5
  %184 = load i64, ptr %16, align 8, !tbaa !9
  %185 = getelementptr inbounds double, ptr %183, i64 %184
  %186 = load double, ptr %185, align 8, !tbaa !25
  store double %186, ptr %18, align 8, !tbaa !25
  %187 = load ptr, ptr %7, align 8, !tbaa !5
  %188 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %187, i32 0, i32 6
  %189 = load ptr, ptr %188, align 8, !tbaa !18
  %190 = load i64, ptr %15, align 8, !tbaa !9
  %191 = getelementptr inbounds ptr, ptr %189, i64 %190
  %192 = load ptr, ptr %191, align 8, !tbaa !5
  %193 = load i64, ptr %17, align 8, !tbaa !9
  %194 = getelementptr inbounds double, ptr %192, i64 %193
  %195 = load double, ptr %194, align 8, !tbaa !25
  %196 = load ptr, ptr %7, align 8, !tbaa !5
  %197 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %196, i32 0, i32 6
  %198 = load ptr, ptr %197, align 8, !tbaa !18
  %199 = load i64, ptr %15, align 8, !tbaa !9
  %200 = getelementptr inbounds ptr, ptr %198, i64 %199
  %201 = load ptr, ptr %200, align 8, !tbaa !5
  %202 = load i64, ptr %16, align 8, !tbaa !9
  %203 = getelementptr inbounds double, ptr %201, i64 %202
  store double %195, ptr %203, align 8, !tbaa !25
  %204 = load double, ptr %18, align 8, !tbaa !25
  %205 = load ptr, ptr %7, align 8, !tbaa !5
  %206 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %205, i32 0, i32 6
  %207 = load ptr, ptr %206, align 8, !tbaa !18
  %208 = load i64, ptr %15, align 8, !tbaa !9
  %209 = getelementptr inbounds ptr, ptr %207, i64 %208
  %210 = load ptr, ptr %209, align 8, !tbaa !5
  %211 = load i64, ptr %17, align 8, !tbaa !9
  %212 = getelementptr inbounds double, ptr %210, i64 %211
  store double %204, ptr %212, align 8, !tbaa !25
  br label %213

213:                                              ; preds = %171
  %214 = load i64, ptr %16, align 8, !tbaa !9
  %215 = add nsw i64 %214, -1
  store i64 %215, ptr %16, align 8, !tbaa !9
  br label %168, !llvm.loop !30

216:                                              ; preds = %168
  br label %217

217:                                              ; preds = %216
  %218 = load i64, ptr %15, align 8, !tbaa !9
  %219 = add nsw i64 %218, 1
  store i64 %219, ptr %15, align 8, !tbaa !9
  br label %160, !llvm.loop !31

220:                                              ; preds = %160
  %221 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %221)
  store i32 0, ptr %20, align 4
  br label %222

222:                                              ; preds = %220, %142
  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 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #4
  %223 = load i32, ptr %20, align 4
  switch i32 %223, label %225 [
    i32 0, label %224
    i32 1, label %224
  ]

224:                                              ; preds = %222, %222
  ret void

225:                                              ; preds = %222
  unreachable
}

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

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) #2

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN11alglib_impl14rcondthresholdEPNS_8ae_stateE(ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl19_matinvreport_clearEPv(ptr noundef) #3

declare void @_ZN11alglib_impl14_sinteger_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) #2

declare noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL26matinv_rmatrixluinverserecEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8sintegerEPNS_12matinvreportEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !13, i64 32, !14, i64 40, !7, i64 72}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!12, !10, i64 0}
!16 = !{!17, !10, i64 0}
!17 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !23, i64 0}
!22 = !{!"_ZTSN11alglib_impl12matinvreportE", !23, i64 0, !23, i64 8}
!23 = !{!"double", !7, i64 0}
!24 = !{!22, !23, i64 8}
!25 = !{!23, !23, i64 0}
!26 = distinct !{!26, !20}
!27 = distinct !{!27, !20}
!28 = !{!29, !10, i64 0}
!29 = !{!"_ZTSN11alglib_impl8sintegerE", !10, i64 0}
!30 = distinct !{!30, !20}
!31 = distinct !{!31, !20}


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

%"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_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::sinteger" = type { i64 }

@.str.278 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.279 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.280 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.281 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.282 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.283 = external hidden unnamed_addr constant [42 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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN11alglib_impl15rmatrixlurcond1EPNS_9ae_matrixElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN11alglib_impl17rmatrixlurcondinfEPNS_9ae_matrixElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl16rmatrixluinverseEPNS_9ae_matrixEPNS_9ae_vectorElPlPNS_12matinvreportEPNS_8ae_stateE(ptr noundef %0, ptr nocapture noundef readonly %1, i64 noundef %2, ptr nocapture noundef writeonly %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #3 {
  %7 = alloca %"struct.alglib_impl::ae_frame", align 8
  %8 = alloca %"struct.alglib_impl::ae_vector", align 8
  %9 = alloca %"struct.alglib_impl::sinteger", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %5, ptr noundef nonnull %7)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %8, i8 0, i64 64, i1 false)
  store i64 0, ptr %9, align 8
  store i64 0, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl19_matinvreport_clearEPv(ptr noundef %4)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %8, i64 noundef 0, i64 noundef 3, ptr noundef %5, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14_sinteger_initEPvPNS_8ae_stateEb(ptr noundef nonnull %9, ptr noundef %5, i1 noundef zeroext true)
  %10 = icmp sgt i64 %2, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %10, ptr noundef nonnull @.str.278, ptr noundef %5)
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = load i64, ptr %11, align 8, !tbaa !9
  %13 = icmp sge i64 %12, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %13, ptr noundef nonnull @.str.279, ptr noundef %5)
  %14 = load i64, ptr %0, align 8, !tbaa !14
  %15 = icmp sge i64 %14, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef nonnull @.str.280, ptr noundef %5)
  %16 = load i64, ptr %1, align 8, !tbaa !15
  %17 = icmp sge i64 %16, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.281, ptr noundef %5)
  %18 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef %2, i64 noundef %2, ptr noundef %5)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %18, ptr noundef nonnull @.str.282, ptr noundef %5)
  store i64 1, ptr %3, align 8, !tbaa !5
  br i1 %10, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %6
  %19 = getelementptr inbounds i8, ptr %1, i64 56
  %xtraiter = and i64 %2, 1
  %20 = icmp eq i64 %2, 1
  br i1 %20, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

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

21:                                               ; preds = %36, %.lr.ph.new
  %22 = phi i64 [ 1, %.lr.ph.new ], [ %37, %36 ]
  %.096 = phi i64 [ 0, %.lr.ph.new ], [ %38, %36 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %36 ]
  %23 = load ptr, ptr %19, align 8, !tbaa !17
  %24 = getelementptr inbounds i64, ptr %23, i64 %.096
  %25 = load i64, ptr %24, align 8, !tbaa !5
  %.not = icmp sge i64 %25, %2
  %26 = icmp slt i64 %25, %.096
  %or.cond = or i1 %.not, %26
  br i1 %or.cond, label %27, label %28

27:                                               ; preds = %21
  store i64 -1, ptr %3, align 8, !tbaa !5
  br label %28

28:                                               ; preds = %21, %27
  %29 = phi i64 [ %22, %21 ], [ -1, %27 ]
  %30 = or disjoint i64 %.096, 1
  %31 = load ptr, ptr %19, align 8, !tbaa !17
  %32 = getelementptr inbounds i64, ptr %31, i64 %30
  %33 = load i64, ptr %32, align 8, !tbaa !5
  %.not.1 = icmp sge i64 %33, %2
  %34 = icmp sle i64 %33, %.096
  %or.cond.1 = or i1 %.not.1, %34
  br i1 %or.cond.1, label %35, label %36

35:                                               ; preds = %28
  store i64 -1, ptr %3, align 8, !tbaa !5
  br label %36

36:                                               ; preds = %35, %28
  %37 = phi i64 [ %29, %28 ], [ -1, %35 ]
  %38 = add nuw nsw i64 %.096, 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 %._crit_edge.loopexit.unr-lcssa, label %21, !llvm.loop !18

._crit_edge.loopexit.unr-lcssa:                   ; preds = %36, %.lr.ph
  %.lcssa.ph = phi i64 [ poison, %.lr.ph ], [ %37, %36 ]
  %.unr = phi i64 [ 1, %.lr.ph ], [ %37, %36 ]
  %.096.unr = phi i64 [ 0, %.lr.ph ], [ %38, %36 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge.loopexit, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa
  %39 = load ptr, ptr %19, align 8, !tbaa !17
  %40 = getelementptr inbounds i64, ptr %39, i64 %.096.unr
  %41 = load i64, ptr %40, align 8, !tbaa !5
  %.not.epil = icmp sge i64 %41, %2
  %42 = icmp slt i64 %41, %.096.unr
  %or.cond.epil = or i1 %.not.epil, %42
  br i1 %or.cond.epil, label %43, label %._crit_edge.loopexit

43:                                               ; preds = %.epil.preheader
  store i64 -1, ptr %3, align 8, !tbaa !5
  br label %._crit_edge.loopexit

._crit_edge.loopexit:                             ; preds = %.epil.preheader, %43, %._crit_edge.loopexit.unr-lcssa
  %.lcssa = phi i64 [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %.unr, %.epil.preheader ], [ -1, %43 ]
  %44 = icmp sgt i64 %.lcssa, 0
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %6
  %45 = phi i1 [ %44, %._crit_edge.loopexit ], [ true, %6 ]
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %45, ptr noundef nonnull @.str.283, ptr noundef %5)
  %46 = call noundef double @_ZN11alglib_impl15rmatrixlurcond1EPNS_9ae_matrixElPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef %2, ptr noundef %5)
  store double %46, ptr %4, align 8, !tbaa !20
  %47 = call noundef double @_ZN11alglib_impl17rmatrixlurcondinfEPNS_9ae_matrixElPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef %2, ptr noundef %5)
  %48 = getelementptr inbounds i8, ptr %4, i64 8
  store double %47, ptr %48, align 8, !tbaa !23
  %49 = load double, ptr %4, align 8, !tbaa !20
  %50 = call noundef double @_ZN11alglib_impl14rcondthresholdEPNS_8ae_stateE(ptr noundef %5)
  %51 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %49, double noundef %50)
  br i1 %51, label %56, label %52

52:                                               ; preds = %._crit_edge
  %53 = load double, ptr %48, align 8, !tbaa !23
  %54 = call noundef double @_ZN11alglib_impl14rcondthresholdEPNS_8ae_stateE(ptr noundef %5)
  %55 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %53, double noundef %54)
  br i1 %55, label %56, label %85

56:                                               ; preds = %52, %._crit_edge
  br i1 %10, label %.preheader.lr.ph, label %._crit_edge112

.preheader.lr.ph:                                 ; preds = %56
  %57 = getelementptr inbounds i8, ptr %0, i64 72
  %xtraiter122 = and i64 %2, 3
  %58 = icmp ult i64 %2, 4
  %unroll_iter124 = and i64 %2, 9223372036854775804
  %lcmp.mod123.not = icmp eq i64 %xtraiter122, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %._crit_edge109.us, %.preheader.lr.ph
  %.1111.us = phi i64 [ 0, %.preheader.lr.ph ], [ %84, %._crit_edge109.us ]
  br i1 %58, label %._crit_edge109.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %.087107.us = phi i64 [ %78, %.preheader.us.new ], [ 0, %.preheader.us ]
  %niter125 = phi i64 [ %niter125.next.3, %.preheader.us.new ], [ 0, %.preheader.us ]
  %59 = load ptr, ptr %57, align 8, !tbaa !17
  %60 = getelementptr inbounds ptr, ptr %59, i64 %.1111.us
  %61 = load ptr, ptr %60, align 8, !tbaa !24
  %62 = getelementptr inbounds double, ptr %61, i64 %.087107.us
  store double 0.000000e+00, ptr %62, align 8, !tbaa !25
  %63 = or disjoint i64 %.087107.us, 1
  %64 = load ptr, ptr %57, align 8, !tbaa !17
  %65 = getelementptr inbounds ptr, ptr %64, i64 %.1111.us
  %66 = load ptr, ptr %65, align 8, !tbaa !24
  %67 = getelementptr inbounds double, ptr %66, i64 %63
  store double 0.000000e+00, ptr %67, align 8, !tbaa !25
  %68 = or disjoint i64 %.087107.us, 2
  %69 = load ptr, ptr %57, align 8, !tbaa !17
  %70 = getelementptr inbounds ptr, ptr %69, i64 %.1111.us
  %71 = load ptr, ptr %70, align 8, !tbaa !24
  %72 = getelementptr inbounds double, ptr %71, i64 %68
  store double 0.000000e+00, ptr %72, align 8, !tbaa !25
  %73 = or disjoint i64 %.087107.us, 3
  %74 = load ptr, ptr %57, align 8, !tbaa !17
  %75 = getelementptr inbounds ptr, ptr %74, i64 %.1111.us
  %76 = load ptr, ptr %75, align 8, !tbaa !24
  %77 = getelementptr inbounds double, ptr %76, i64 %73
  store double 0.000000e+00, ptr %77, align 8, !tbaa !25
  %78 = add nuw nsw i64 %.087107.us, 4
  %niter125.next.3 = add i64 %niter125, 4
  %niter125.ncmp.3 = icmp eq i64 %niter125.next.3, %unroll_iter124
  br i1 %niter125.ncmp.3, label %._crit_edge109.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !26

._crit_edge109.us.unr-lcssa:                      ; preds = %.preheader.us.new, %.preheader.us
  %.087107.us.unr = phi i64 [ 0, %.preheader.us ], [ %78, %.preheader.us.new ]
  br i1 %lcmp.mod123.not, label %._crit_edge109.us, label %.epil.preheader121

.epil.preheader121:                               ; preds = %._crit_edge109.us.unr-lcssa, %.epil.preheader121
  %.087107.us.epil = phi i64 [ %83, %.epil.preheader121 ], [ %.087107.us.unr, %._crit_edge109.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader121 ], [ 0, %._crit_edge109.us.unr-lcssa ]
  %79 = load ptr, ptr %57, align 8, !tbaa !17
  %80 = getelementptr inbounds ptr, ptr %79, i64 %.1111.us
  %81 = load ptr, ptr %80, align 8, !tbaa !24
  %82 = getelementptr inbounds double, ptr %81, i64 %.087107.us.epil
  store double 0.000000e+00, ptr %82, align 8, !tbaa !25
  %83 = add nuw nsw i64 %.087107.us.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter122
  br i1 %epil.iter.cmp.not, label %._crit_edge109.us, label %.epil.preheader121, !llvm.loop !27

._crit_edge109.us:                                ; preds = %.epil.preheader121, %._crit_edge109.us.unr-lcssa
  %84 = add nuw nsw i64 %.1111.us, 1
  %exitcond117.not = icmp eq i64 %84, %2
  br i1 %exitcond117.not, label %._crit_edge112, label %.preheader.us, !llvm.loop !29

._crit_edge112:                                   ; preds = %._crit_edge109.us, %56
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  store i64 -3, ptr %3, align 8, !tbaa !5
  br label %._crit_edge105

85:                                               ; preds = %52
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %2, ptr noundef %5)
  store i64 1, ptr %9, align 8, !tbaa !30
  call void @_ZN11alglib_implL26matinv_rmatrixluinverserecEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8sintegerEPNS_12matinvreportEPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef 0, i64 noundef %2, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %4, ptr noundef %5)
  %86 = load i64, ptr %9, align 8, !tbaa !30
  store i64 %86, ptr %3, align 8, !tbaa !5
  br i1 %10, label %.lr.ph104, label %._crit_edge105

.lr.ph104:                                        ; preds = %85
  %87 = add nsw i64 %2, -2
  %.not113 = icmp eq i64 %2, 1
  %88 = getelementptr inbounds i8, ptr %1, i64 56
  %89 = getelementptr inbounds i8, ptr %0, i64 72
  br i1 %.not113, label %._crit_edge105, label %.lr.ph99.us.preheader

.lr.ph99.us.preheader:                            ; preds = %.lr.ph104
  %90 = and i64 %2, 1
  %lcmp.mod120.not.not = icmp eq i64 %90, 0
  %91 = add nsw i64 %2, -3
  %92 = icmp eq i64 %87, 0
  br label %.lr.ph99.us

.lr.ph99.us:                                      ; preds = %.lr.ph99.us.preheader, %._crit_edge100.us
  %.2102.us = phi i64 [ %138, %._crit_edge100.us ], [ 0, %.lr.ph99.us.preheader ]
  br i1 %lcmp.mod120.not.not, label %.prol.loopexit.unr-lcssa, label %.prol.loopexit

.prol.loopexit.unr-lcssa:                         ; preds = %.lr.ph99.us
  %93 = load ptr, ptr %88, align 8, !tbaa !17
  %94 = getelementptr inbounds i64, ptr %93, i64 %87
  %95 = load i64, ptr %94, align 8, !tbaa !5
  %96 = load ptr, ptr %89, align 8, !tbaa !17
  %97 = getelementptr inbounds ptr, ptr %96, i64 %.2102.us
  %98 = load ptr, ptr %97, align 8, !tbaa !24
  %99 = getelementptr inbounds double, ptr %98, i64 %87
  %100 = load double, ptr %99, align 8, !tbaa !25
  %101 = getelementptr inbounds double, ptr %98, i64 %95
  %102 = load double, ptr %101, align 8, !tbaa !25
  store double %102, ptr %99, align 8, !tbaa !25
  %103 = load ptr, ptr %89, align 8, !tbaa !17
  %104 = getelementptr inbounds ptr, ptr %103, i64 %.2102.us
  %105 = load ptr, ptr %104, align 8, !tbaa !24
  %106 = getelementptr inbounds double, ptr %105, i64 %95
  store double %100, ptr %106, align 8, !tbaa !25
  br label %.prol.loopexit

.prol.loopexit:                                   ; preds = %.prol.loopexit.unr-lcssa, %.lr.ph99.us
  %.18897.us.unr = phi i64 [ %87, %.lr.ph99.us ], [ %91, %.prol.loopexit.unr-lcssa ]
  br i1 %92, label %._crit_edge100.us, label %.lr.ph99.us.new

.lr.ph99.us.new:                                  ; preds = %.prol.loopexit, %.lr.ph99.us.new
  %.18897.us = phi i64 [ %136, %.lr.ph99.us.new ], [ %.18897.us.unr, %.prol.loopexit ]
  %107 = load ptr, ptr %88, align 8, !tbaa !17
  %108 = getelementptr inbounds i64, ptr %107, i64 %.18897.us
  %109 = load i64, ptr %108, align 8, !tbaa !5
  %110 = load ptr, ptr %89, align 8, !tbaa !17
  %111 = getelementptr inbounds ptr, ptr %110, i64 %.2102.us
  %112 = load ptr, ptr %111, align 8, !tbaa !24
  %113 = getelementptr inbounds double, ptr %112, i64 %.18897.us
  %114 = load double, ptr %113, align 8, !tbaa !25
  %115 = getelementptr inbounds double, ptr %112, i64 %109
  %116 = load double, ptr %115, align 8, !tbaa !25
  store double %116, ptr %113, align 8, !tbaa !25
  %117 = load ptr, ptr %89, align 8, !tbaa !17
  %118 = getelementptr inbounds ptr, ptr %117, i64 %.2102.us
  %119 = load ptr, ptr %118, align 8, !tbaa !24
  %120 = getelementptr inbounds double, ptr %119, i64 %109
  store double %114, ptr %120, align 8, !tbaa !25
  %121 = add nsw i64 %.18897.us, -1
  %122 = load ptr, ptr %88, align 8, !tbaa !17
  %123 = getelementptr inbounds i64, ptr %122, i64 %121
  %124 = load i64, ptr %123, align 8, !tbaa !5
  %125 = load ptr, ptr %89, align 8, !tbaa !17
  %126 = getelementptr inbounds ptr, ptr %125, i64 %.2102.us
  %127 = load ptr, ptr %126, align 8, !tbaa !24
  %128 = getelementptr inbounds double, ptr %127, i64 %121
  %129 = load double, ptr %128, align 8, !tbaa !25
  %130 = getelementptr inbounds double, ptr %127, i64 %124
  %131 = load double, ptr %130, align 8, !tbaa !25
  store double %131, ptr %128, align 8, !tbaa !25
  %132 = load ptr, ptr %89, align 8, !tbaa !17
  %133 = getelementptr inbounds ptr, ptr %132, i64 %.2102.us
  %134 = load ptr, ptr %133, align 8, !tbaa !24
  %135 = getelementptr inbounds double, ptr %134, i64 %124
  store double %129, ptr %135, align 8, !tbaa !25
  %136 = add nsw i64 %.18897.us, -2
  %137 = icmp sgt i64 %.18897.us, 1
  br i1 %137, label %.lr.ph99.us.new, label %._crit_edge100.us, !llvm.loop !32

._crit_edge100.us:                                ; preds = %.lr.ph99.us.new, %.prol.loopexit
  %138 = add nuw nsw i64 %.2102.us, 1
  %exitcond115.not = icmp eq i64 %138, %2
  br i1 %exitcond115.not, label %._crit_edge105, label %.lr.ph99.us, !llvm.loop !33

._crit_edge105:                                   ; preds = %._crit_edge100.us, %85, %.lr.ph104, %._crit_edge112
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  ret void
}

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

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN11alglib_impl14rcondthresholdEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl19_matinvreport_clearEPv(ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl14_sinteger_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL26matinv_rmatrixluinverserecEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8sintegerEPNS_12matinvreportEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"_ZTSN11alglib_impl9ae_matrixE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !12, i64 40, !7, i64 72}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!10, !6, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTSN11alglib_impl9ae_vectorE", !6, i64 0, !6, i64 8, !11, i64 16, !12, i64 24, !7, i64 56}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!21, !22, i64 0}
!21 = !{!"_ZTSN11alglib_impl12matinvreportE", !22, i64 0, !22, i64 8}
!22 = !{!"double", !7, i64 0}
!23 = !{!21, !22, i64 8}
!24 = !{!13, !13, i64 0}
!25 = !{!22, !22, i64 0}
!26 = distinct !{!26, !19}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.unroll.disable"}
!29 = distinct !{!29, !19}
!30 = !{!31, !6, i64 0}
!31 = !{!"_ZTSN11alglib_impl8sintegerE", !6, i64 0}
!32 = distinct !{!32, !19}
!33 = distinct !{!33, !19}


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