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

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

@.str.340 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.341 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.342 = external hidden unnamed_addr constant [13 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 double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr noundef) #1

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl7lrlinesEPKNS_9ae_matrixEPKNS_9ae_vectorElPdS6_S6_S6_S6_S6_S6_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10) #3 {
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i64, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  %32 = alloca double, align 8
  %33 = alloca i32, align 4
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store i64 %2, ptr %14, align 8, !tbaa !9
  store ptr %3, ptr %15, align 8, !tbaa !5
  store ptr %4, ptr %16, align 8, !tbaa !5
  store ptr %5, ptr %17, align 8, !tbaa !5
  store ptr %6, ptr %18, align 8, !tbaa !5
  store ptr %7, ptr %19, align 8, !tbaa !5
  store ptr %8, ptr %20, align 8, !tbaa !5
  store ptr %9, ptr %21, align 8, !tbaa !5
  store ptr %10, ptr %22, align 8, !tbaa !5
  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 8, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #4
  %34 = load ptr, ptr %15, align 8, !tbaa !5
  store double 0.000000e+00, ptr %34, align 8, !tbaa !11
  %35 = load ptr, ptr %16, align 8, !tbaa !5
  store double 0.000000e+00, ptr %35, align 8, !tbaa !11
  %36 = load ptr, ptr %17, align 8, !tbaa !5
  store double 0.000000e+00, ptr %36, align 8, !tbaa !11
  %37 = load ptr, ptr %18, align 8, !tbaa !5
  store double 0.000000e+00, ptr %37, align 8, !tbaa !11
  %38 = load ptr, ptr %19, align 8, !tbaa !5
  store double 0.000000e+00, ptr %38, align 8, !tbaa !11
  %39 = load ptr, ptr %20, align 8, !tbaa !5
  store double 0.000000e+00, ptr %39, align 8, !tbaa !11
  %40 = load ptr, ptr %21, align 8, !tbaa !5
  store double 0.000000e+00, ptr %40, align 8, !tbaa !11
  %41 = load i64, ptr %14, align 8, !tbaa !9
  %42 = icmp slt i64 %41, 2
  br i1 %42, label %43, label %45

43:                                               ; preds = %11
  %44 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef @.str.340, ptr noundef %44)
  store i32 1, ptr %33, align 4
  br label %324

45:                                               ; preds = %11
  store i64 0, ptr %23, align 8, !tbaa !9
  br label %46

46:                                               ; preds = %62, %45
  %47 = load i64, ptr %23, align 8, !tbaa !9
  %48 = load i64, ptr %14, align 8, !tbaa !9
  %49 = sub nsw i64 %48, 1
  %50 = icmp sle i64 %47, %49
  br i1 %50, label %51, label %65

51:                                               ; preds = %46
  %52 = load ptr, ptr %13, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %52, i32 0, i32 4
  %54 = load ptr, ptr %53, align 8, !tbaa !13
  %55 = load i64, ptr %23, align 8, !tbaa !9
  %56 = getelementptr inbounds double, ptr %54, i64 %55
  %57 = load double, ptr %56, align 8, !tbaa !11
  %58 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %57, double noundef 0.000000e+00)
  br i1 %58, label %59, label %61

59:                                               ; preds = %51
  %60 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef @.str.341, ptr noundef %60)
  store i32 1, ptr %33, align 4
  br label %324

61:                                               ; preds = %51
  br label %62

62:                                               ; preds = %61
  %63 = load i64, ptr %23, align 8, !tbaa !9
  %64 = add nsw i64 %63, 1
  store i64 %64, ptr %23, align 8, !tbaa !9
  br label %46, !llvm.loop !14

65:                                               ; preds = %46
  store double 0.000000e+00, ptr %24, align 8, !tbaa !11
  store double 0.000000e+00, ptr %25, align 8, !tbaa !11
  store double 0.000000e+00, ptr %27, align 8, !tbaa !11
  store double 0.000000e+00, ptr %26, align 8, !tbaa !11
  store i64 0, ptr %23, align 8, !tbaa !9
  br label %66

66:                                               ; preds = %122, %65
  %67 = load i64, ptr %23, align 8, !tbaa !9
  %68 = load i64, ptr %14, align 8, !tbaa !9
  %69 = sub nsw i64 %68, 1
  %70 = icmp sle i64 %67, %69
  br i1 %70, label %71, label %125

71:                                               ; preds = %66
  %72 = load ptr, ptr %13, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %72, i32 0, i32 4
  %74 = load ptr, ptr %73, align 8, !tbaa !13
  %75 = load i64, ptr %23, align 8, !tbaa !9
  %76 = getelementptr inbounds double, ptr %74, i64 %75
  %77 = load double, ptr %76, align 8, !tbaa !11
  %78 = load ptr, ptr %22, align 8, !tbaa !5
  %79 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %77, ptr noundef %78)
  store double %79, ptr %31, align 8, !tbaa !11
  %80 = load double, ptr %24, align 8, !tbaa !11
  %81 = load double, ptr %31, align 8, !tbaa !11
  %82 = fdiv double 1.000000e+00, %81
  %83 = fadd double %80, %82
  store double %83, ptr %24, align 8, !tbaa !11
  %84 = load double, ptr %25, align 8, !tbaa !11
  %85 = load ptr, ptr %12, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %85, i32 0, i32 6
  %87 = load ptr, ptr %86, align 8, !tbaa !13
  %88 = load i64, ptr %23, align 8, !tbaa !9
  %89 = getelementptr inbounds ptr, ptr %87, i64 %88
  %90 = load ptr, ptr %89, align 8, !tbaa !5
  %91 = getelementptr inbounds double, ptr %90, i64 0
  %92 = load double, ptr %91, align 8, !tbaa !11
  %93 = load double, ptr %31, align 8, !tbaa !11
  %94 = fdiv double %92, %93
  %95 = fadd double %84, %94
  store double %95, ptr %25, align 8, !tbaa !11
  %96 = load double, ptr %27, align 8, !tbaa !11
  %97 = load ptr, ptr %12, align 8, !tbaa !5
  %98 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %97, i32 0, i32 6
  %99 = load ptr, ptr %98, align 8, !tbaa !13
  %100 = load i64, ptr %23, align 8, !tbaa !9
  %101 = getelementptr inbounds ptr, ptr %99, i64 %100
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  %103 = getelementptr inbounds double, ptr %102, i64 1
  %104 = load double, ptr %103, align 8, !tbaa !11
  %105 = load double, ptr %31, align 8, !tbaa !11
  %106 = fdiv double %104, %105
  %107 = fadd double %96, %106
  store double %107, ptr %27, align 8, !tbaa !11
  %108 = load double, ptr %26, align 8, !tbaa !11
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %109, i32 0, i32 6
  %111 = load ptr, ptr %110, align 8, !tbaa !13
  %112 = load i64, ptr %23, align 8, !tbaa !9
  %113 = getelementptr inbounds ptr, ptr %111, i64 %112
  %114 = load ptr, ptr %113, align 8, !tbaa !5
  %115 = getelementptr inbounds double, ptr %114, i64 0
  %116 = load double, ptr %115, align 8, !tbaa !11
  %117 = load ptr, ptr %22, align 8, !tbaa !5
  %118 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %116, ptr noundef %117)
  %119 = load double, ptr %31, align 8, !tbaa !11
  %120 = fdiv double %118, %119
  %121 = fadd double %108, %120
  store double %121, ptr %26, align 8, !tbaa !11
  br label %122

122:                                              ; preds = %71
  %123 = load i64, ptr %23, align 8, !tbaa !9
  %124 = add nsw i64 %123, 1
  store i64 %124, ptr %23, align 8, !tbaa !9
  br label %66, !llvm.loop !16

125:                                              ; preds = %66
  %126 = load double, ptr %25, align 8, !tbaa !11
  %127 = load ptr, ptr %22, align 8, !tbaa !5
  %128 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %126, ptr noundef %127)
  %129 = load double, ptr %24, align 8, !tbaa !11
  %130 = load double, ptr %26, align 8, !tbaa !11
  %131 = fsub double %129, %130
  %132 = load ptr, ptr %22, align 8, !tbaa !5
  %133 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %131, ptr noundef %132)
  %134 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %128, double %133)
  %135 = load ptr, ptr %22, align 8, !tbaa !5
  %136 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %134, ptr noundef %135)
  store double %136, ptr %31, align 8, !tbaa !11
  %137 = load double, ptr %24, align 8, !tbaa !11
  %138 = load double, ptr %26, align 8, !tbaa !11
  %139 = fadd double %137, %138
  %140 = load double, ptr %31, align 8, !tbaa !11
  %141 = fadd double %139, %140
  %142 = fmul double 5.000000e-01, %141
  store double %142, ptr %29, align 8, !tbaa !11
  %143 = load double, ptr %24, align 8, !tbaa !11
  %144 = load double, ptr %26, align 8, !tbaa !11
  %145 = fadd double %143, %144
  %146 = load double, ptr %31, align 8, !tbaa !11
  %147 = fsub double %145, %146
  %148 = fmul double 5.000000e-01, %147
  store double %148, ptr %30, align 8, !tbaa !11
  %149 = load double, ptr %29, align 8, !tbaa !11
  %150 = load double, ptr %30, align 8, !tbaa !11
  %151 = load ptr, ptr %22, align 8, !tbaa !5
  %152 = call noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef %149, double noundef %150, ptr noundef %151)
  %153 = load double, ptr %29, align 8, !tbaa !11
  %154 = load double, ptr %30, align 8, !tbaa !11
  %155 = load ptr, ptr %22, align 8, !tbaa !5
  %156 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %153, double noundef %154, ptr noundef %155)
  %157 = fmul double 5.000000e-13, %156
  %158 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %152, double noundef %157)
  br i1 %158, label %159, label %161

159:                                              ; preds = %125
  %160 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef @.str.342, ptr noundef %160)
  store i32 1, ptr %33, align 4
  br label %324

161:                                              ; preds = %125
  %162 = load ptr, ptr %15, align 8, !tbaa !5
  store double 0.000000e+00, ptr %162, align 8, !tbaa !11
  %163 = load ptr, ptr %16, align 8, !tbaa !5
  store double 0.000000e+00, ptr %163, align 8, !tbaa !11
  store double 0.000000e+00, ptr %28, align 8, !tbaa !11
  store i64 0, ptr %23, align 8, !tbaa !9
  br label %164

164:                                              ; preds = %215, %161
  %165 = load i64, ptr %23, align 8, !tbaa !9
  %166 = load i64, ptr %14, align 8, !tbaa !9
  %167 = sub nsw i64 %166, 1
  %168 = icmp sle i64 %165, %167
  br i1 %168, label %169, label %218

169:                                              ; preds = %164
  %170 = load ptr, ptr %12, align 8, !tbaa !5
  %171 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %170, i32 0, i32 6
  %172 = load ptr, ptr %171, align 8, !tbaa !13
  %173 = load i64, ptr %23, align 8, !tbaa !9
  %174 = getelementptr inbounds ptr, ptr %172, i64 %173
  %175 = load ptr, ptr %174, align 8, !tbaa !5
  %176 = getelementptr inbounds double, ptr %175, i64 0
  %177 = load double, ptr %176, align 8, !tbaa !11
  %178 = load double, ptr %25, align 8, !tbaa !11
  %179 = load double, ptr %24, align 8, !tbaa !11
  %180 = fdiv double %178, %179
  %181 = fsub double %177, %180
  %182 = load ptr, ptr %13, align 8, !tbaa !5
  %183 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %182, i32 0, i32 4
  %184 = load ptr, ptr %183, align 8, !tbaa !13
  %185 = load i64, ptr %23, align 8, !tbaa !9
  %186 = getelementptr inbounds double, ptr %184, i64 %185
  %187 = load double, ptr %186, align 8, !tbaa !11
  %188 = fdiv double %181, %187
  store double %188, ptr %31, align 8, !tbaa !11
  %189 = load ptr, ptr %16, align 8, !tbaa !5
  %190 = load double, ptr %189, align 8, !tbaa !11
  %191 = load double, ptr %31, align 8, !tbaa !11
  %192 = load ptr, ptr %12, align 8, !tbaa !5
  %193 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %192, i32 0, i32 6
  %194 = load ptr, ptr %193, align 8, !tbaa !13
  %195 = load i64, ptr %23, align 8, !tbaa !9
  %196 = getelementptr inbounds ptr, ptr %194, i64 %195
  %197 = load ptr, ptr %196, align 8, !tbaa !5
  %198 = getelementptr inbounds double, ptr %197, i64 1
  %199 = load double, ptr %198, align 8, !tbaa !11
  %200 = fmul double %191, %199
  %201 = load ptr, ptr %13, align 8, !tbaa !5
  %202 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %201, i32 0, i32 4
  %203 = load ptr, ptr %202, align 8, !tbaa !13
  %204 = load i64, ptr %23, align 8, !tbaa !9
  %205 = getelementptr inbounds double, ptr %203, i64 %204
  %206 = load double, ptr %205, align 8, !tbaa !11
  %207 = fdiv double %200, %206
  %208 = fadd double %190, %207
  %209 = load ptr, ptr %16, align 8, !tbaa !5
  store double %208, ptr %209, align 8, !tbaa !11
  %210 = load double, ptr %28, align 8, !tbaa !11
  %211 = load double, ptr %31, align 8, !tbaa !11
  %212 = load ptr, ptr %22, align 8, !tbaa !5
  %213 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %211, ptr noundef %212)
  %214 = fadd double %210, %213
  store double %214, ptr %28, align 8, !tbaa !11
  br label %215

215:                                              ; preds = %169
  %216 = load i64, ptr %23, align 8, !tbaa !9
  %217 = add nsw i64 %216, 1
  store i64 %217, ptr %23, align 8, !tbaa !9
  br label %164, !llvm.loop !17

218:                                              ; preds = %164
  %219 = load ptr, ptr %16, align 8, !tbaa !5
  %220 = load double, ptr %219, align 8, !tbaa !11
  %221 = load double, ptr %28, align 8, !tbaa !11
  %222 = fdiv double %220, %221
  %223 = load ptr, ptr %16, align 8, !tbaa !5
  store double %222, ptr %223, align 8, !tbaa !11
  %224 = load double, ptr %27, align 8, !tbaa !11
  %225 = load double, ptr %25, align 8, !tbaa !11
  %226 = load ptr, ptr %16, align 8, !tbaa !5
  %227 = load double, ptr %226, align 8, !tbaa !11
  %228 = fneg double %225
  %229 = call double @llvm.fmuladd.f64(double %228, double %227, double %224)
  %230 = load double, ptr %24, align 8, !tbaa !11
  %231 = fdiv double %229, %230
  %232 = load ptr, ptr %15, align 8, !tbaa !5
  store double %231, ptr %232, align 8, !tbaa !11
  %233 = load i64, ptr %14, align 8, !tbaa !9
  %234 = icmp sgt i64 %233, 2
  br i1 %234, label %235, label %289

235:                                              ; preds = %218
  store double 0.000000e+00, ptr %32, align 8, !tbaa !11
  store i64 0, ptr %23, align 8, !tbaa !9
  br label %236

236:                                              ; preds = %276, %235
  %237 = load i64, ptr %23, align 8, !tbaa !9
  %238 = load i64, ptr %14, align 8, !tbaa !9
  %239 = sub nsw i64 %238, 1
  %240 = icmp sle i64 %237, %239
  br i1 %240, label %241, label %279

241:                                              ; preds = %236
  %242 = load double, ptr %32, align 8, !tbaa !11
  %243 = load ptr, ptr %12, align 8, !tbaa !5
  %244 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %243, i32 0, i32 6
  %245 = load ptr, ptr %244, align 8, !tbaa !13
  %246 = load i64, ptr %23, align 8, !tbaa !9
  %247 = getelementptr inbounds ptr, ptr %245, i64 %246
  %248 = load ptr, ptr %247, align 8, !tbaa !5
  %249 = getelementptr inbounds double, ptr %248, i64 1
  %250 = load double, ptr %249, align 8, !tbaa !11
  %251 = load ptr, ptr %15, align 8, !tbaa !5
  %252 = load double, ptr %251, align 8, !tbaa !11
  %253 = fsub double %250, %252
  %254 = load ptr, ptr %16, align 8, !tbaa !5
  %255 = load double, ptr %254, align 8, !tbaa !11
  %256 = load ptr, ptr %12, align 8, !tbaa !5
  %257 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %256, i32 0, i32 6
  %258 = load ptr, ptr %257, align 8, !tbaa !13
  %259 = load i64, ptr %23, align 8, !tbaa !9
  %260 = getelementptr inbounds ptr, ptr %258, i64 %259
  %261 = load ptr, ptr %260, align 8, !tbaa !5
  %262 = getelementptr inbounds double, ptr %261, i64 0
  %263 = load double, ptr %262, align 8, !tbaa !11
  %264 = fneg double %255
  %265 = call double @llvm.fmuladd.f64(double %264, double %263, double %253)
  %266 = load ptr, ptr %13, align 8, !tbaa !5
  %267 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %266, i32 0, i32 4
  %268 = load ptr, ptr %267, align 8, !tbaa !13
  %269 = load i64, ptr %23, align 8, !tbaa !9
  %270 = getelementptr inbounds double, ptr %268, i64 %269
  %271 = load double, ptr %270, align 8, !tbaa !11
  %272 = fdiv double %265, %271
  %273 = load ptr, ptr %22, align 8, !tbaa !5
  %274 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %272, ptr noundef %273)
  %275 = fadd double %242, %274
  store double %275, ptr %32, align 8, !tbaa !11
  br label %276

276:                                              ; preds = %241
  %277 = load i64, ptr %23, align 8, !tbaa !9
  %278 = add nsw i64 %277, 1
  store i64 %278, ptr %23, align 8, !tbaa !9
  br label %236, !llvm.loop !18

279:                                              ; preds = %236
  %280 = load i64, ptr %14, align 8, !tbaa !9
  %281 = sub nsw i64 %280, 2
  %282 = sitofp i64 %281 to double
  %283 = fdiv double %282, 2.000000e+00
  %284 = load double, ptr %32, align 8, !tbaa !11
  %285 = fdiv double %284, 2.000000e+00
  %286 = load ptr, ptr %22, align 8, !tbaa !5
  %287 = call noundef double @_ZN11alglib_impl16incompletegammacEddPNS_8ae_stateE(double noundef %283, double noundef %285, ptr noundef %286)
  %288 = load ptr, ptr %21, align 8, !tbaa !5
  store double %287, ptr %288, align 8, !tbaa !11
  br label %291

289:                                              ; preds = %218
  %290 = load ptr, ptr %21, align 8, !tbaa !5
  store double 1.000000e+00, ptr %290, align 8, !tbaa !11
  br label %291

291:                                              ; preds = %289, %279
  %292 = load double, ptr %25, align 8, !tbaa !11
  %293 = load ptr, ptr %22, align 8, !tbaa !5
  %294 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %292, ptr noundef %293)
  %295 = load double, ptr %24, align 8, !tbaa !11
  %296 = load double, ptr %28, align 8, !tbaa !11
  %297 = fmul double %295, %296
  %298 = fdiv double %294, %297
  %299 = fadd double 1.000000e+00, %298
  %300 = load double, ptr %24, align 8, !tbaa !11
  %301 = fdiv double %299, %300
  %302 = load ptr, ptr %17, align 8, !tbaa !5
  store double %301, ptr %302, align 8, !tbaa !11
  %303 = load double, ptr %28, align 8, !tbaa !11
  %304 = fdiv double 1.000000e+00, %303
  %305 = load ptr, ptr %18, align 8, !tbaa !5
  store double %304, ptr %305, align 8, !tbaa !11
  %306 = load double, ptr %25, align 8, !tbaa !11
  %307 = fneg double %306
  %308 = load double, ptr %24, align 8, !tbaa !11
  %309 = load double, ptr %28, align 8, !tbaa !11
  %310 = fmul double %308, %309
  %311 = fdiv double %307, %310
  %312 = load ptr, ptr %19, align 8, !tbaa !5
  store double %311, ptr %312, align 8, !tbaa !11
  %313 = load ptr, ptr %19, align 8, !tbaa !5
  %314 = load double, ptr %313, align 8, !tbaa !11
  %315 = load ptr, ptr %17, align 8, !tbaa !5
  %316 = load double, ptr %315, align 8, !tbaa !11
  %317 = load ptr, ptr %18, align 8, !tbaa !5
  %318 = load double, ptr %317, align 8, !tbaa !11
  %319 = fmul double %316, %318
  %320 = load ptr, ptr %22, align 8, !tbaa !5
  %321 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %319, ptr noundef %320)
  %322 = fdiv double %314, %321
  %323 = load ptr, ptr %20, align 8, !tbaa !5
  store double %322, ptr %323, align 8, !tbaa !11
  store i32 0, ptr %33, align 4
  br label %324

324:                                              ; preds = %291, %159, %59, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, 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
  %325 = load i32, ptr %33, align 4
  switch i32 %325, label %327 [
    i32 0, label %326
    i32 1, label %326
  ]

326:                                              ; preds = %324, %324
  ret void

327:                                              ; preds = %324
  unreachable
}

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

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 nosync nounwind speculatable willreturn memory(none) }
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, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}


; 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.340 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.341 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.342 = external hidden unnamed_addr constant [13 x i8], align 1

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

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

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

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

declare noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef, double noundef, ptr 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_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl7lrlinesEPKNS_9ae_matrixEPKNS_9ae_vectorElPdS6_S6_S6_S6_S6_S6_PNS_8ae_stateE(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, i64 noundef %2, ptr nocapture noundef %3, ptr nocapture noundef %4, ptr nocapture noundef %5, ptr nocapture noundef %6, ptr nocapture noundef writeonly %7, ptr nocapture noundef writeonly %8, ptr nocapture noundef writeonly %9, ptr noundef %10) local_unnamed_addr #2 {
  store double 0.000000e+00, ptr %3, align 8, !tbaa !5
  store double 0.000000e+00, ptr %4, align 8, !tbaa !5
  store double 0.000000e+00, ptr %5, align 8, !tbaa !5
  store double 0.000000e+00, ptr %6, align 8, !tbaa !5
  store double 0.000000e+00, ptr %7, align 8, !tbaa !5
  store double 0.000000e+00, ptr %8, align 8, !tbaa !5
  store double 0.000000e+00, ptr %9, align 8, !tbaa !5
  %12 = icmp slt i64 %2, 2
  br i1 %12, label %14, label %.preheader131

.preheader131:                                    ; preds = %11
  %13 = getelementptr inbounds i8, ptr %1, i64 56
  br label %18

14:                                               ; preds = %11
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef nonnull @.str.340, ptr noundef %10)
  br label %127

15:                                               ; preds = %18
  %16 = add nuw nsw i64 %.0119132, 1
  %exitcond.not = icmp eq i64 %16, %2
  br i1 %exitcond.not, label %.lr.ph, label %18, !llvm.loop !9

.lr.ph:                                           ; preds = %15
  %17 = getelementptr inbounds i8, ptr %0, i64 72
  br label %24

18:                                               ; preds = %.preheader131, %15
  %.0119132 = phi i64 [ 0, %.preheader131 ], [ %16, %15 ]
  %19 = load ptr, ptr %13, align 8, !tbaa !11
  %20 = getelementptr inbounds double, ptr %19, i64 %.0119132
  %21 = load double, ptr %20, align 8, !tbaa !5
  %22 = tail call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %21, double noundef 0.000000e+00)
  br i1 %22, label %23, label %15

23:                                               ; preds = %18
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef nonnull @.str.341, ptr noundef %10)
  br label %127

24:                                               ; preds = %.lr.ph, %24
  %.1138 = phi i64 [ 0, %.lr.ph ], [ %44, %24 ]
  %25 = phi <4 x double> [ zeroinitializer, %.lr.ph ], [ %43, %24 ]
  %26 = load ptr, ptr %13, align 8, !tbaa !11
  %27 = getelementptr inbounds double, ptr %26, i64 %.1138
  %28 = load double, ptr %27, align 8, !tbaa !5
  %29 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %28, ptr noundef %10)
  %30 = load ptr, ptr %17, align 8, !tbaa !11
  %31 = getelementptr inbounds ptr, ptr %30, i64 %.1138
  %32 = load ptr, ptr %31, align 8, !tbaa !12
  %33 = load double, ptr %32, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %32, i64 8
  %35 = load double, ptr %34, align 8, !tbaa !5
  %36 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %33, ptr noundef %10)
  %37 = insertelement <4 x double> <double 1.000000e+00, double poison, double poison, double poison>, double %35, i64 1
  %38 = insertelement <4 x double> %37, double %36, i64 2
  %39 = insertelement <4 x double> %38, double %33, i64 3
  %40 = insertelement <4 x double> poison, double %29, i64 0
  %41 = shufflevector <4 x double> %40, <4 x double> poison, <4 x i32> zeroinitializer
  %42 = fdiv <4 x double> %39, %41
  %43 = fadd <4 x double> %25, %42
  %44 = add nuw nsw i64 %.1138, 1
  %exitcond160.not = icmp eq i64 %44, %2
  br i1 %exitcond160.not, label %._crit_edge, label %24, !llvm.loop !14

._crit_edge:                                      ; preds = %24
  %45 = extractelement <4 x double> %43, i64 3
  %46 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %45, ptr noundef %10)
  %47 = extractelement <4 x double> %43, i64 0
  %48 = extractelement <4 x double> %43, i64 2
  %49 = fsub double %47, %48
  %50 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %49, ptr noundef %10)
  %51 = tail call double @llvm.fmuladd.f64(double %46, double 4.000000e+00, double %50)
  %52 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %51, ptr noundef %10)
  %53 = fadd double %48, %47
  %54 = fadd double %53, %52
  %55 = fmul double %54, 5.000000e-01
  %56 = fsub double %53, %52
  %57 = fmul double %56, 5.000000e-01
  %58 = tail call noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef %55, double noundef %57, ptr noundef %10)
  %59 = tail call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %55, double noundef %57, ptr noundef %10)
  %60 = fmul double %59, 5.000000e-13
  %61 = tail call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %58, double noundef %60)
  br i1 %61, label %62, label %.lr.ph146

62:                                               ; preds = %._crit_edge
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef nonnull @.str.342, ptr noundef %10)
  br label %127

.lr.ph146:                                        ; preds = %._crit_edge
  store double 0.000000e+00, ptr %3, align 8, !tbaa !5
  store double 0.000000e+00, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %0, i64 72
  %64 = fdiv double %45, %47
  %smax = tail call i64 @llvm.smax.i64(i64 %2, i64 1)
  br label %65

65:                                               ; preds = %.lr.ph146, %65
  %.2144 = phi i64 [ 0, %.lr.ph146 ], [ %83, %65 ]
  %.0121143 = phi double [ 0.000000e+00, %.lr.ph146 ], [ %82, %65 ]
  %66 = load ptr, ptr %63, align 8, !tbaa !11
  %67 = getelementptr inbounds ptr, ptr %66, i64 %.2144
  %68 = load ptr, ptr %67, align 8, !tbaa !12
  %69 = load double, ptr %68, align 8, !tbaa !5
  %70 = fsub double %69, %64
  %71 = load ptr, ptr %13, align 8, !tbaa !11
  %72 = getelementptr inbounds double, ptr %71, i64 %.2144
  %73 = load double, ptr %72, align 8, !tbaa !5
  %74 = fdiv double %70, %73
  %75 = load double, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds i8, ptr %68, i64 8
  %77 = load double, ptr %76, align 8, !tbaa !5
  %78 = fmul double %74, %77
  %79 = fdiv double %78, %73
  %80 = fadd double %75, %79
  store double %80, ptr %4, align 8, !tbaa !5
  %81 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %74, ptr noundef %10)
  %82 = fadd double %.0121143, %81
  %83 = add nuw nsw i64 %.2144, 1
  %exitcond161.not = icmp eq i64 %83, %smax
  br i1 %exitcond161.not, label %._crit_edge147, label %65, !llvm.loop !15

._crit_edge147:                                   ; preds = %65
  %.pre = load double, ptr %4, align 8, !tbaa !5
  %84 = fdiv double %.pre, %82
  store double %84, ptr %4, align 8, !tbaa !5
  %85 = fneg double %45
  %86 = extractelement <4 x double> %43, i64 1
  %87 = tail call double @llvm.fmuladd.f64(double %85, double %84, double %86)
  %88 = fdiv double %87, %47
  store double %88, ptr %3, align 8, !tbaa !5
  %.not = icmp eq i64 %2, 2
  br i1 %.not, label %114, label %.lr.ph152

.lr.ph152:                                        ; preds = %._crit_edge147
  %89 = getelementptr inbounds i8, ptr %0, i64 72
  %smax162 = tail call i64 @llvm.smax.i64(i64 %2, i64 1)
  br label %90

90:                                               ; preds = %.lr.ph152, %90
  %.0151 = phi double [ 0.000000e+00, %.lr.ph152 ], [ %107, %90 ]
  %.3150 = phi i64 [ 0, %.lr.ph152 ], [ %108, %90 ]
  %91 = load ptr, ptr %89, align 8, !tbaa !11
  %92 = getelementptr inbounds ptr, ptr %91, i64 %.3150
  %93 = load ptr, ptr %92, align 8, !tbaa !12
  %94 = getelementptr inbounds i8, ptr %93, i64 8
  %95 = load double, ptr %94, align 8, !tbaa !5
  %96 = load double, ptr %3, align 8, !tbaa !5
  %97 = fsub double %95, %96
  %98 = load double, ptr %4, align 8, !tbaa !5
  %99 = load double, ptr %93, align 8, !tbaa !5
  %100 = fneg double %98
  %101 = tail call double @llvm.fmuladd.f64(double %100, double %99, double %97)
  %102 = load ptr, ptr %13, align 8, !tbaa !11
  %103 = getelementptr inbounds double, ptr %102, i64 %.3150
  %104 = load double, ptr %103, align 8, !tbaa !5
  %105 = fdiv double %101, %104
  %106 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %105, ptr noundef %10)
  %107 = fadd double %.0151, %106
  %108 = add nuw nsw i64 %.3150, 1
  %exitcond163.not = icmp eq i64 %108, %smax162
  br i1 %exitcond163.not, label %._crit_edge153, label %90, !llvm.loop !16

._crit_edge153:                                   ; preds = %90
  %109 = add nsw i64 %2, -2
  %110 = uitofp nneg i64 %109 to double
  %111 = fmul double %110, 5.000000e-01
  %112 = fmul double %107, 5.000000e-01
  %113 = tail call noundef double @_ZN11alglib_impl16incompletegammacEddPNS_8ae_stateE(double noundef %111, double noundef %112, ptr noundef %10)
  br label %114

114:                                              ; preds = %._crit_edge147, %._crit_edge153
  %storemerge = phi double [ %113, %._crit_edge153 ], [ 1.000000e+00, %._crit_edge147 ]
  store double %storemerge, ptr %9, align 8, !tbaa !5
  %115 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %45, ptr noundef %10)
  %116 = fmul double %47, %82
  %117 = fdiv double %115, %116
  %118 = fadd double %117, 1.000000e+00
  %119 = fdiv double %118, %47
  store double %119, ptr %5, align 8, !tbaa !5
  %120 = fdiv double 1.000000e+00, %82
  store double %120, ptr %6, align 8, !tbaa !5
  %121 = fdiv double %85, %116
  store double %121, ptr %7, align 8, !tbaa !5
  %122 = load double, ptr %5, align 8, !tbaa !5
  %123 = load double, ptr %6, align 8, !tbaa !5
  %124 = fmul double %122, %123
  %125 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %124, ptr noundef %10)
  %126 = fdiv double %121, %125
  store double %126, ptr %8, align 8, !tbaa !5
  br label %127

127:                                              ; preds = %114, %62, %23, %14
  ret void
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #3

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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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