; 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_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, 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 }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::linearmodel" = type { %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::lrreport" = type { %"struct.alglib_impl::ae_matrix", double, double, double, double, double, double, i64, %"struct.alglib_impl::ae_vector" }

@.str.324 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.325 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.326 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.327 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.328 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.329 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.330 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.331 = external hidden unnamed_addr constant [19 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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl9lrbuildzsEPKNS_9ae_matrixEPKNS_9ae_vectorEllPNS_11linearmodelEPNS_8lrreportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #3 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"struct.alglib_impl::ae_frame", align 8
  %16 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %17 = alloca %"struct.alglib_impl::ae_vector", align 8
  %18 = alloca %"struct.alglib_impl::ae_vector", align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca double, align 8
  %22 = alloca i64, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i64 %2, ptr %10, align 8, !tbaa !9
  store i64 %3, ptr %11, align 8, !tbaa !9
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  %27 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %27, ptr noundef %15)
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %17, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 64, i1 false)
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl18_linearmodel_clearEPv(ptr noundef %28)
  %29 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl15_lrreport_clearEPv(ptr noundef %29)
  %30 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %16, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %30, i1 noundef zeroext true)
  %31 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %17, i64 noundef 0, i64 noundef 3, ptr noundef %31, i1 noundef zeroext true)
  %32 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %18, i64 noundef 0, i64 noundef 3, ptr noundef %32, i1 noundef zeroext true)
  %33 = load i64, ptr %11, align 8, !tbaa !9
  %34 = icmp sge i64 %33, 1
  %35 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %34, ptr noundef @.str.324, ptr noundef %35)
  %36 = load i64, ptr %10, align 8, !tbaa !9
  %37 = load i64, ptr %11, align 8, !tbaa !9
  %38 = add nsw i64 %37, 1
  %39 = icmp sgt i64 %36, %38
  %40 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %39, ptr noundef @.str.325, ptr noundef %40)
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %41, i32 0, i32 0
  %43 = load i64, ptr %42, align 8, !tbaa !11
  %44 = load i64, ptr %10, align 8, !tbaa !9
  %45 = icmp sge i64 %43, %44
  %46 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %45, ptr noundef @.str.326, ptr noundef %46)
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %47, i32 0, i32 1
  %49 = load i64, ptr %48, align 8, !tbaa !15
  %50 = load i64, ptr %11, align 8, !tbaa !9
  %51 = add nsw i64 %50, 1
  %52 = icmp sge i64 %49, %51
  %53 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %52, ptr noundef @.str.327, ptr noundef %53)
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %54, i32 0, i32 0
  %56 = load i64, ptr %55, align 8, !tbaa !16
  %57 = load i64, ptr %10, align 8, !tbaa !9
  %58 = icmp sge i64 %56, %57
  %59 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %58, ptr noundef @.str.328, ptr noundef %59)
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = load i64, ptr %10, align 8, !tbaa !9
  %62 = load i64, ptr %11, align 8, !tbaa !9
  %63 = add nsw i64 %62, 1
  %64 = load ptr, ptr %14, align 8, !tbaa !5
  %65 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %60, i64 noundef %61, i64 noundef %63, ptr noundef %64)
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %65, ptr noundef @.str.329, ptr noundef %66)
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = load i64, ptr %10, align 8, !tbaa !9
  %69 = load ptr, ptr %14, align 8, !tbaa !5
  %70 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %67, i64 noundef %68, ptr noundef %69)
  %71 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %70, ptr noundef @.str.330, ptr noundef %71)
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %72

72:                                               ; preds = %86, %7
  %73 = load i64, ptr %19, align 8, !tbaa !9
  %74 = load i64, ptr %10, align 8, !tbaa !9
  %75 = sub nsw i64 %74, 1
  %76 = icmp sle i64 %73, %75
  br i1 %76, label %77, label %89

77:                                               ; preds = %72
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %78, i32 0, i32 4
  %80 = load ptr, ptr %79, align 8, !tbaa !18
  %81 = load i64, ptr %19, align 8, !tbaa !9
  %82 = getelementptr inbounds double, ptr %80, i64 %81
  %83 = load double, ptr %82, align 8, !tbaa !19
  %84 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %83, double noundef 0.000000e+00)
  %85 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %84, ptr noundef @.str.331, ptr noundef %85)
  br label %86

86:                                               ; preds = %77
  %87 = load i64, ptr %19, align 8, !tbaa !9
  %88 = add nsw i64 %87, 1
  store i64 %88, ptr %19, align 8, !tbaa !9
  br label %72, !llvm.loop !21

89:                                               ; preds = %72
  %90 = load i64, ptr %10, align 8, !tbaa !9
  %91 = sub nsw i64 %90, 1
  %92 = add nsw i64 %91, 1
  %93 = load i64, ptr %11, align 8, !tbaa !9
  %94 = add nsw i64 %93, 1
  %95 = add nsw i64 %94, 1
  %96 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %16, i64 noundef %92, i64 noundef %95, ptr noundef %96)
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %97

97:                                               ; preds = %143, %89
  %98 = load i64, ptr %19, align 8, !tbaa !9
  %99 = load i64, ptr %10, align 8, !tbaa !9
  %100 = sub nsw i64 %99, 1
  %101 = icmp sle i64 %98, %100
  br i1 %101, label %102, label %146

102:                                              ; preds = %97
  %103 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %16, i32 0, i32 6
  %104 = load ptr, ptr %103, align 8, !tbaa !18
  %105 = load i64, ptr %19, align 8, !tbaa !9
  %106 = getelementptr inbounds ptr, ptr %104, i64 %105
  %107 = load ptr, ptr %106, align 8, !tbaa !5
  %108 = getelementptr inbounds double, ptr %107, i64 0
  %109 = load ptr, ptr %8, 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 !18
  %112 = load i64, ptr %19, 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 i64, ptr %11, align 8, !tbaa !9
  %117 = sub nsw i64 %116, 1
  %118 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %117)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %108, i64 noundef 1, ptr noundef %115, i64 noundef 1, i64 noundef %118)
  %119 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %16, i32 0, i32 6
  %120 = load ptr, ptr %119, align 8, !tbaa !18
  %121 = load i64, ptr %19, align 8, !tbaa !9
  %122 = getelementptr inbounds ptr, ptr %120, i64 %121
  %123 = load ptr, ptr %122, align 8, !tbaa !5
  %124 = load i64, ptr %11, align 8, !tbaa !9
  %125 = getelementptr inbounds double, ptr %123, i64 %124
  store double 0.000000e+00, ptr %125, align 8, !tbaa !19
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %126, i32 0, i32 6
  %128 = load ptr, ptr %127, align 8, !tbaa !18
  %129 = load i64, ptr %19, align 8, !tbaa !9
  %130 = getelementptr inbounds ptr, ptr %128, i64 %129
  %131 = load ptr, ptr %130, align 8, !tbaa !5
  %132 = load i64, ptr %11, align 8, !tbaa !9
  %133 = getelementptr inbounds double, ptr %131, i64 %132
  %134 = load double, ptr %133, align 8, !tbaa !19
  %135 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %16, i32 0, i32 6
  %136 = load ptr, ptr %135, align 8, !tbaa !18
  %137 = load i64, ptr %19, align 8, !tbaa !9
  %138 = getelementptr inbounds ptr, ptr %136, i64 %137
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  %140 = load i64, ptr %11, align 8, !tbaa !9
  %141 = add nsw i64 %140, 1
  %142 = getelementptr inbounds double, ptr %139, i64 %141
  store double %134, ptr %142, align 8, !tbaa !19
  br label %143

143:                                              ; preds = %102
  %144 = load i64, ptr %19, align 8, !tbaa !9
  %145 = add nsw i64 %144, 1
  store i64 %145, ptr %19, align 8, !tbaa !9
  br label %97, !llvm.loop !23

146:                                              ; preds = %97
  %147 = load i64, ptr %10, align 8, !tbaa !9
  %148 = sub nsw i64 %147, 1
  %149 = add nsw i64 %148, 1
  %150 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %17, i64 noundef %149, ptr noundef %150)
  %151 = load i64, ptr %11, align 8, !tbaa !9
  %152 = sub nsw i64 %151, 1
  %153 = add nsw i64 %152, 1
  %154 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %18, i64 noundef %153, ptr noundef %154)
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %155

155:                                              ; preds = %236, %146
  %156 = load i64, ptr %20, align 8, !tbaa !9
  %157 = load i64, ptr %11, align 8, !tbaa !9
  %158 = sub nsw i64 %157, 1
  %159 = icmp sle i64 %156, %158
  br i1 %159, label %160, label %239

160:                                              ; preds = %155
  %161 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %162 = load ptr, ptr %161, align 8, !tbaa !18
  %163 = getelementptr inbounds double, ptr %162, i64 0
  %164 = load ptr, ptr %8, align 8, !tbaa !5
  %165 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %164, i32 0, i32 6
  %166 = load ptr, ptr %165, align 8, !tbaa !18
  %167 = getelementptr inbounds ptr, ptr %166, i64 0
  %168 = load ptr, ptr %167, align 8, !tbaa !5
  %169 = load i64, ptr %20, align 8, !tbaa !9
  %170 = getelementptr inbounds double, ptr %168, i64 %169
  %171 = load ptr, ptr %8, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %171, i32 0, i32 2
  %173 = load i64, ptr %172, align 8, !tbaa !24
  %174 = load i64, ptr %10, align 8, !tbaa !9
  %175 = sub nsw i64 %174, 1
  %176 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %175)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %163, i64 noundef 1, ptr noundef %170, i64 noundef %173, i64 noundef %176)
  %177 = load i64, ptr %10, align 8, !tbaa !9
  %178 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl13samplemomentsEPKNS_9ae_vectorElPdS3_S3_S3_PNS_8ae_stateE(ptr noundef %17, i64 noundef %177, ptr noundef %23, ptr noundef %24, ptr noundef %25, ptr noundef %26, ptr noundef %178)
  %179 = load double, ptr %23, align 8, !tbaa !19
  %180 = load ptr, ptr %14, align 8, !tbaa !5
  %181 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %179, ptr noundef %180)
  %182 = load double, ptr %24, align 8, !tbaa !19
  %183 = load ptr, ptr %14, align 8, !tbaa !5
  %184 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %182, ptr noundef %183)
  %185 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %181, double noundef %184)
  br i1 %185, label %186, label %192

186:                                              ; preds = %160
  %187 = load double, ptr %23, align 8, !tbaa !19
  %188 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %189 = load ptr, ptr %188, align 8, !tbaa !18
  %190 = load i64, ptr %20, align 8, !tbaa !9
  %191 = getelementptr inbounds double, ptr %189, i64 %190
  store double %187, ptr %191, align 8, !tbaa !19
  br label %204

192:                                              ; preds = %160
  %193 = load double, ptr %24, align 8, !tbaa !19
  %194 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %193, double noundef 0.000000e+00)
  br i1 %194, label %195, label %196

195:                                              ; preds = %192
  store double 1.000000e+00, ptr %24, align 8, !tbaa !19
  br label %196

196:                                              ; preds = %195, %192
  %197 = load double, ptr %24, align 8, !tbaa !19
  %198 = load ptr, ptr %14, align 8, !tbaa !5
  %199 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %197, ptr noundef %198)
  %200 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %201 = load ptr, ptr %200, align 8, !tbaa !18
  %202 = load i64, ptr %20, align 8, !tbaa !9
  %203 = getelementptr inbounds double, ptr %201, i64 %202
  store double %199, ptr %203, align 8, !tbaa !19
  br label %204

204:                                              ; preds = %196, %186
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %205

205:                                              ; preds = %232, %204
  %206 = load i64, ptr %19, align 8, !tbaa !9
  %207 = load i64, ptr %10, align 8, !tbaa !9
  %208 = sub nsw i64 %207, 1
  %209 = icmp sle i64 %206, %208
  br i1 %209, label %210, label %235

210:                                              ; preds = %205
  %211 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %16, i32 0, i32 6
  %212 = load ptr, ptr %211, align 8, !tbaa !18
  %213 = load i64, ptr %19, align 8, !tbaa !9
  %214 = getelementptr inbounds ptr, ptr %212, i64 %213
  %215 = load ptr, ptr %214, align 8, !tbaa !5
  %216 = load i64, ptr %20, align 8, !tbaa !9
  %217 = getelementptr inbounds double, ptr %215, i64 %216
  %218 = load double, ptr %217, align 8, !tbaa !19
  %219 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %220 = load ptr, ptr %219, align 8, !tbaa !18
  %221 = load i64, ptr %20, align 8, !tbaa !9
  %222 = getelementptr inbounds double, ptr %220, i64 %221
  %223 = load double, ptr %222, align 8, !tbaa !19
  %224 = fdiv double %218, %223
  %225 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %16, i32 0, i32 6
  %226 = load ptr, ptr %225, align 8, !tbaa !18
  %227 = load i64, ptr %19, align 8, !tbaa !9
  %228 = getelementptr inbounds ptr, ptr %226, i64 %227
  %229 = load ptr, ptr %228, align 8, !tbaa !5
  %230 = load i64, ptr %20, align 8, !tbaa !9
  %231 = getelementptr inbounds double, ptr %229, i64 %230
  store double %224, ptr %231, align 8, !tbaa !19
  br label %232

232:                                              ; preds = %210
  %233 = load i64, ptr %19, align 8, !tbaa !9
  %234 = add nsw i64 %233, 1
  store i64 %234, ptr %19, align 8, !tbaa !9
  br label %205, !llvm.loop !25

235:                                              ; preds = %205
  br label %236

236:                                              ; preds = %235
  %237 = load i64, ptr %20, align 8, !tbaa !9
  %238 = add nsw i64 %237, 1
  store i64 %238, ptr %20, align 8, !tbaa !9
  br label %155, !llvm.loop !26

239:                                              ; preds = %155
  %240 = load ptr, ptr %9, align 8, !tbaa !5
  %241 = load i64, ptr %10, align 8, !tbaa !9
  %242 = load i64, ptr %11, align 8, !tbaa !9
  %243 = add nsw i64 %242, 1
  %244 = load ptr, ptr %12, align 8, !tbaa !5
  %245 = load ptr, ptr %13, align 8, !tbaa !5
  %246 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_implL17linreg_lrinternalEPKNS_9ae_matrixEPKNS_9ae_vectorEllPNS_11linearmodelEPNS_8lrreportEPNS_8ae_stateE(ptr noundef %16, ptr noundef %240, i64 noundef %241, i64 noundef %243, ptr noundef %244, ptr noundef %245, ptr noundef %246)
  %247 = load ptr, ptr %12, align 8, !tbaa !5
  %248 = getelementptr inbounds %"struct.alglib_impl::linearmodel", ptr %247, i32 0, i32 0
  %249 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %248, i32 0, i32 4
  %250 = load ptr, ptr %249, align 8, !tbaa !18
  %251 = getelementptr inbounds double, ptr %250, i64 3
  %252 = load double, ptr %251, align 8, !tbaa !19
  %253 = load ptr, ptr %14, align 8, !tbaa !5
  %254 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %252, ptr noundef %253)
  store i64 %254, ptr %22, align 8, !tbaa !9
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %255

255:                                              ; preds = %316, %239
  %256 = load i64, ptr %20, align 8, !tbaa !9
  %257 = load i64, ptr %11, align 8, !tbaa !9
  %258 = sub nsw i64 %257, 1
  %259 = icmp sle i64 %256, %258
  br i1 %259, label %260, label %319

260:                                              ; preds = %255
  %261 = load ptr, ptr %12, align 8, !tbaa !5
  %262 = getelementptr inbounds %"struct.alglib_impl::linearmodel", ptr %261, i32 0, i32 0
  %263 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %262, i32 0, i32 4
  %264 = load ptr, ptr %263, align 8, !tbaa !18
  %265 = load i64, ptr %22, align 8, !tbaa !9
  %266 = load i64, ptr %20, align 8, !tbaa !9
  %267 = add nsw i64 %265, %266
  %268 = getelementptr inbounds double, ptr %264, i64 %267
  %269 = load double, ptr %268, align 8, !tbaa !19
  %270 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %271 = load ptr, ptr %270, align 8, !tbaa !18
  %272 = load i64, ptr %20, align 8, !tbaa !9
  %273 = getelementptr inbounds double, ptr %271, i64 %272
  %274 = load double, ptr %273, align 8, !tbaa !19
  %275 = fdiv double %269, %274
  %276 = load ptr, ptr %12, align 8, !tbaa !5
  %277 = getelementptr inbounds %"struct.alglib_impl::linearmodel", ptr %276, i32 0, i32 0
  %278 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %277, i32 0, i32 4
  %279 = load ptr, ptr %278, align 8, !tbaa !18
  %280 = load i64, ptr %22, align 8, !tbaa !9
  %281 = load i64, ptr %20, align 8, !tbaa !9
  %282 = add nsw i64 %280, %281
  %283 = getelementptr inbounds double, ptr %279, i64 %282
  store double %275, ptr %283, align 8, !tbaa !19
  %284 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %285 = load ptr, ptr %284, align 8, !tbaa !18
  %286 = load i64, ptr %20, align 8, !tbaa !9
  %287 = getelementptr inbounds double, ptr %285, i64 %286
  %288 = load double, ptr %287, align 8, !tbaa !19
  %289 = fdiv double 1.000000e+00, %288
  store double %289, ptr %21, align 8, !tbaa !19
  %290 = load ptr, ptr %13, align 8, !tbaa !5
  %291 = getelementptr inbounds %"struct.alglib_impl::lrreport", ptr %290, i32 0, i32 0
  %292 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %291, i32 0, i32 6
  %293 = load ptr, ptr %292, align 8, !tbaa !18
  %294 = load i64, ptr %20, align 8, !tbaa !9
  %295 = getelementptr inbounds ptr, ptr %293, i64 %294
  %296 = load ptr, ptr %295, align 8, !tbaa !5
  %297 = getelementptr inbounds double, ptr %296, i64 0
  %298 = load i64, ptr %11, align 8, !tbaa !9
  %299 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %298)
  %300 = load double, ptr %21, align 8, !tbaa !19
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %297, i64 noundef 1, i64 noundef %299, double noundef %300)
  %301 = load ptr, ptr %13, align 8, !tbaa !5
  %302 = getelementptr inbounds %"struct.alglib_impl::lrreport", ptr %301, i32 0, i32 0
  %303 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %302, i32 0, i32 6
  %304 = load ptr, ptr %303, align 8, !tbaa !18
  %305 = getelementptr inbounds ptr, ptr %304, i64 0
  %306 = load ptr, ptr %305, align 8, !tbaa !5
  %307 = load i64, ptr %20, align 8, !tbaa !9
  %308 = getelementptr inbounds double, ptr %306, i64 %307
  %309 = load ptr, ptr %13, align 8, !tbaa !5
  %310 = getelementptr inbounds %"struct.alglib_impl::lrreport", ptr %309, i32 0, i32 0
  %311 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %310, i32 0, i32 2
  %312 = load i64, ptr %311, align 8, !tbaa !27
  %313 = load i64, ptr %11, align 8, !tbaa !9
  %314 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %313)
  %315 = load double, ptr %21, align 8, !tbaa !19
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %308, i64 noundef %312, i64 noundef %314, double noundef %315)
  br label %316

316:                                              ; preds = %260
  %317 = load i64, ptr %20, align 8, !tbaa !9
  %318 = add nsw i64 %317, 1
  store i64 %318, ptr %20, align 8, !tbaa !9
  br label %255, !llvm.loop !29

319:                                              ; preds = %255
  %320 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %320)
  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
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #4
  ret void
}

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

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

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

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

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

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

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

declare noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef, ptr noundef) #2

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

declare noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef, ptr noundef) #2

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

declare void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef, i64 noundef, i64 noundef, double noundef) #2

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL17linreg_lrinternalEPKNS_9ae_matrixEPKNS_9ae_vectorEllPNS_11linearmodelEPNS_8lrreportEPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, i64 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 0}
!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 8}
!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 = !{!20, !20, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = !{!12, !10, i64 16}
!25 = distinct !{!25, !22}
!26 = distinct !{!26, !22}
!27 = !{!28, !10, i64 16}
!28 = !{!"_ZTSN11alglib_impl8lrreportE", !12, i64 0, !20, i64 80, !20, i64 88, !20, i64 96, !20, i64 104, !20, i64 112, !20, i64 120, !10, i64 128, !17, i64 136}
!29 = distinct !{!29, !22}


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

@.str.324 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.325 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.326 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.327 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.328 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.329 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.330 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.331 = external hidden unnamed_addr constant [19 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl9lrbuildzsEPKNS_9ae_matrixEPKNS_9ae_vectorEllPNS_11linearmodelEPNS_8lrreportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #3 {
  %8 = alloca %"struct.alglib_impl::ae_frame", align 8
  %9 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %10 = alloca %"struct.alglib_impl::ae_vector", align 8
  %11 = alloca %"struct.alglib_impl::ae_vector", align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %6, ptr noundef nonnull %8)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %9, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %10, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %11, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl18_linearmodel_clearEPv(ptr noundef %4)
  call void @_ZN11alglib_impl15_lrreport_clearEPv(ptr noundef %5)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %9, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %6, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %10, i64 noundef 0, i64 noundef 3, ptr noundef %6, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %11, i64 noundef 0, i64 noundef 3, ptr noundef %6, i1 noundef zeroext true)
  %16 = icmp sgt i64 %3, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef nonnull @.str.324, ptr noundef %6)
  %17 = add nsw i64 %3, 1
  %18 = icmp slt i64 %17, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %18, ptr noundef nonnull @.str.325, ptr noundef %6)
  %19 = load i64, ptr %0, align 8, !tbaa !5
  %20 = icmp sge i64 %19, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %20, ptr noundef nonnull @.str.326, ptr noundef %6)
  %21 = getelementptr inbounds i8, ptr %0, i64 8
  %22 = load i64, ptr %21, align 8, !tbaa !13
  %23 = icmp sgt i64 %22, %3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %23, ptr noundef nonnull @.str.327, ptr noundef %6)
  %24 = load i64, ptr %1, align 8, !tbaa !14
  %25 = icmp sge i64 %24, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %25, ptr noundef nonnull @.str.328, ptr noundef %6)
  %26 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef %2, i64 noundef %17, ptr noundef %6)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %26, ptr noundef nonnull @.str.329, ptr noundef %6)
  %27 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %1, i64 noundef %2, ptr noundef %6)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef nonnull @.str.330, ptr noundef %6)
  %.not.not114 = icmp sgt i64 %2, 0
  br i1 %.not.not114, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %7
  %28 = add nsw i64 %3, 2
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %2, i64 noundef %28, ptr noundef %6)
  br label %._crit_edge120

.lr.ph:                                           ; preds = %7
  %29 = getelementptr inbounds i8, ptr %1, i64 56
  br label %30

30:                                               ; preds = %.lr.ph, %30
  %.0115 = phi i64 [ 0, %.lr.ph ], [ %35, %30 ]
  %31 = load ptr, ptr %29, align 8, !tbaa !16
  %32 = getelementptr inbounds double, ptr %31, i64 %.0115
  %33 = load double, ptr %32, align 8, !tbaa !17
  %34 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %33, double noundef 0.000000e+00)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %34, ptr noundef nonnull @.str.331, ptr noundef %6)
  %35 = add nuw nsw i64 %.0115, 1
  %exitcond.not = icmp eq i64 %35, %2
  br i1 %exitcond.not, label %._crit_edge, label %30, !llvm.loop !19

._crit_edge:                                      ; preds = %30
  %36 = add nsw i64 %3, 2
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %2, i64 noundef %36, ptr noundef %6)
  br i1 %.not.not114, label %.lr.ph119, label %._crit_edge120

.lr.ph119:                                        ; preds = %._crit_edge
  %37 = getelementptr inbounds i8, ptr %9, i64 72
  %38 = getelementptr inbounds i8, ptr %0, i64 72
  %39 = add nsw i64 %3, -1
  br label %40

40:                                               ; preds = %.lr.ph119, %40
  %.1117 = phi i64 [ 0, %.lr.ph119 ], [ %61, %40 ]
  %41 = load ptr, ptr %37, align 8, !tbaa !16
  %42 = getelementptr inbounds ptr, ptr %41, i64 %.1117
  %43 = load ptr, ptr %42, align 8, !tbaa !21
  %44 = load ptr, ptr %38, align 8, !tbaa !16
  %45 = getelementptr inbounds ptr, ptr %44, i64 %.1117
  %46 = load ptr, ptr %45, align 8, !tbaa !21
  %47 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %39)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %43, i64 noundef 1, ptr noundef %46, i64 noundef 1, i64 noundef %47)
  %48 = load ptr, ptr %37, align 8, !tbaa !16
  %49 = getelementptr inbounds ptr, ptr %48, i64 %.1117
  %50 = load ptr, ptr %49, align 8, !tbaa !21
  %51 = getelementptr inbounds double, ptr %50, i64 %3
  store double 0.000000e+00, ptr %51, align 8, !tbaa !17
  %52 = load ptr, ptr %38, align 8, !tbaa !16
  %53 = getelementptr inbounds ptr, ptr %52, i64 %.1117
  %54 = load ptr, ptr %53, align 8, !tbaa !21
  %55 = getelementptr inbounds double, ptr %54, i64 %3
  %56 = load double, ptr %55, align 8, !tbaa !17
  %57 = load ptr, ptr %37, align 8, !tbaa !16
  %58 = getelementptr inbounds ptr, ptr %57, i64 %.1117
  %59 = load ptr, ptr %58, align 8, !tbaa !21
  %60 = getelementptr inbounds double, ptr %59, i64 %17
  store double %56, ptr %60, align 8, !tbaa !17
  %61 = add nuw nsw i64 %.1117, 1
  %exitcond136.not = icmp eq i64 %61, %2
  br i1 %exitcond136.not, label %._crit_edge120, label %40, !llvm.loop !22

._crit_edge120:                                   ; preds = %40, %._crit_edge.thread, %._crit_edge
  %62 = add nsw i64 %2, -1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %2, ptr noundef %6)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %3, ptr noundef %6)
  br i1 %16, label %.lr.ph129, label %._crit_edge130

.lr.ph129:                                        ; preds = %._crit_edge120
  %63 = getelementptr inbounds i8, ptr %10, i64 56
  %64 = getelementptr inbounds i8, ptr %0, i64 72
  %65 = getelementptr inbounds i8, ptr %0, i64 16
  %66 = getelementptr inbounds i8, ptr %11, i64 56
  %67 = getelementptr inbounds i8, ptr %9, i64 72
  %xtraiter = and i64 %2, 1
  %68 = icmp eq i64 %2, 1
  %unroll_iter = and i64 %2, 9223372036854775806
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %69

69:                                               ; preds = %.lr.ph129, %._crit_edge125
  %.0106127 = phi i64 [ 0, %.lr.ph129 ], [ %122, %._crit_edge125 ]
  %70 = load ptr, ptr %63, align 8, !tbaa !16
  %71 = load ptr, ptr %64, align 8, !tbaa !16
  %72 = load ptr, ptr %71, align 8, !tbaa !21
  %73 = getelementptr inbounds double, ptr %72, i64 %.0106127
  %74 = load i64, ptr %65, align 8, !tbaa !23
  %75 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %62)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %70, i64 noundef 1, ptr noundef %73, i64 noundef %74, i64 noundef %75)
  call void @_ZN11alglib_impl13samplemomentsEPKNS_9ae_vectorElPdS3_S3_S3_PNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %2, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef %6)
  %76 = load double, ptr %12, align 8, !tbaa !17
  %77 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %76, ptr noundef %6)
  %78 = load double, ptr %13, align 8, !tbaa !17
  %79 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %78, ptr noundef %6)
  %80 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %77, double noundef %79)
  br i1 %80, label %81, label %83

81:                                               ; preds = %69
  %82 = load double, ptr %12, align 8, !tbaa !17
  br label %90

83:                                               ; preds = %69
  %84 = load double, ptr %13, align 8, !tbaa !17
  %85 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %84, double noundef 0.000000e+00)
  br i1 %85, label %86, label %._crit_edge140

._crit_edge140:                                   ; preds = %83
  %.pre = load double, ptr %13, align 8, !tbaa !17
  br label %87

86:                                               ; preds = %83
  store double 1.000000e+00, ptr %13, align 8, !tbaa !17
  br label %87

87:                                               ; preds = %._crit_edge140, %86
  %88 = phi double [ %.pre, %._crit_edge140 ], [ 1.000000e+00, %86 ]
  %89 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %88, ptr noundef %6)
  br label %90

90:                                               ; preds = %87, %81
  %.sink = phi double [ %89, %87 ], [ %82, %81 ]
  %91 = load ptr, ptr %66, align 8, !tbaa !16
  %92 = getelementptr inbounds double, ptr %91, i64 %.0106127
  store double %.sink, ptr %92, align 8, !tbaa !17
  br i1 %.not.not114, label %.lr.ph124.preheader, label %._crit_edge125

.lr.ph124.preheader:                              ; preds = %90
  br i1 %68, label %._crit_edge125.loopexit.unr-lcssa, label %.lr.ph124

.lr.ph124:                                        ; preds = %.lr.ph124.preheader, %.lr.ph124
  %.2122 = phi i64 [ %112, %.lr.ph124 ], [ 0, %.lr.ph124.preheader ]
  %niter = phi i64 [ %niter.next.1, %.lr.ph124 ], [ 0, %.lr.ph124.preheader ]
  %93 = load ptr, ptr %67, align 8, !tbaa !16
  %94 = getelementptr inbounds ptr, ptr %93, i64 %.2122
  %95 = load ptr, ptr %94, align 8, !tbaa !21
  %96 = getelementptr inbounds double, ptr %95, i64 %.0106127
  %97 = load double, ptr %96, align 8, !tbaa !17
  %98 = load ptr, ptr %66, align 8, !tbaa !16
  %99 = getelementptr inbounds double, ptr %98, i64 %.0106127
  %100 = load double, ptr %99, align 8, !tbaa !17
  %101 = fdiv double %97, %100
  store double %101, ptr %96, align 8, !tbaa !17
  %102 = or disjoint i64 %.2122, 1
  %103 = load ptr, ptr %67, align 8, !tbaa !16
  %104 = getelementptr inbounds ptr, ptr %103, i64 %102
  %105 = load ptr, ptr %104, align 8, !tbaa !21
  %106 = getelementptr inbounds double, ptr %105, i64 %.0106127
  %107 = load double, ptr %106, align 8, !tbaa !17
  %108 = load ptr, ptr %66, align 8, !tbaa !16
  %109 = getelementptr inbounds double, ptr %108, i64 %.0106127
  %110 = load double, ptr %109, align 8, !tbaa !17
  %111 = fdiv double %107, %110
  store double %111, ptr %106, align 8, !tbaa !17
  %112 = add nuw nsw i64 %.2122, 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_edge125.loopexit.unr-lcssa, label %.lr.ph124, !llvm.loop !24

._crit_edge125.loopexit.unr-lcssa:                ; preds = %.lr.ph124, %.lr.ph124.preheader
  %.2122.unr = phi i64 [ 0, %.lr.ph124.preheader ], [ %112, %.lr.ph124 ]
  br i1 %lcmp.mod.not, label %._crit_edge125, label %.lr.ph124.epil

.lr.ph124.epil:                                   ; preds = %._crit_edge125.loopexit.unr-lcssa
  %113 = load ptr, ptr %67, align 8, !tbaa !16
  %114 = getelementptr inbounds ptr, ptr %113, i64 %.2122.unr
  %115 = load ptr, ptr %114, align 8, !tbaa !21
  %116 = getelementptr inbounds double, ptr %115, i64 %.0106127
  %117 = load double, ptr %116, align 8, !tbaa !17
  %118 = load ptr, ptr %66, align 8, !tbaa !16
  %119 = getelementptr inbounds double, ptr %118, i64 %.0106127
  %120 = load double, ptr %119, align 8, !tbaa !17
  %121 = fdiv double %117, %120
  store double %121, ptr %116, align 8, !tbaa !17
  br label %._crit_edge125

._crit_edge125:                                   ; preds = %.lr.ph124.epil, %._crit_edge125.loopexit.unr-lcssa, %90
  %122 = add nuw nsw i64 %.0106127, 1
  %exitcond138.not = icmp eq i64 %122, %3
  br i1 %exitcond138.not, label %._crit_edge130, label %69, !llvm.loop !25

._crit_edge130:                                   ; preds = %._crit_edge125, %._crit_edge120
  call void @_ZN11alglib_implL17linreg_lrinternalEPKNS_9ae_matrixEPKNS_9ae_vectorEllPNS_11linearmodelEPNS_8lrreportEPNS_8ae_stateE(ptr noundef nonnull %9, ptr noundef nonnull %1, i64 noundef %2, i64 noundef %17, ptr noundef %4, ptr noundef %5, ptr noundef %6)
  %123 = getelementptr inbounds i8, ptr %4, i64 56
  %124 = load ptr, ptr %123, align 8, !tbaa !16
  %125 = getelementptr inbounds i8, ptr %124, i64 24
  %126 = load double, ptr %125, align 8, !tbaa !17
  %127 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %126, ptr noundef %6)
  br i1 %16, label %.lr.ph134, label %._crit_edge135

.lr.ph134:                                        ; preds = %._crit_edge130
  %128 = getelementptr inbounds i8, ptr %11, i64 56
  %129 = getelementptr inbounds i8, ptr %5, i64 72
  %130 = getelementptr inbounds i8, ptr %5, i64 16
  br label %131

131:                                              ; preds = %.lr.ph134, %131
  %.1107132 = phi i64 [ 0, %.lr.ph134 ], [ %153, %131 ]
  %132 = load ptr, ptr %123, align 8, !tbaa !16
  %133 = getelementptr double, ptr %132, i64 %127
  %134 = getelementptr double, ptr %133, i64 %.1107132
  %135 = load double, ptr %134, align 8, !tbaa !17
  %136 = load ptr, ptr %128, align 8, !tbaa !16
  %137 = getelementptr inbounds double, ptr %136, i64 %.1107132
  %138 = load double, ptr %137, align 8, !tbaa !17
  %139 = fdiv double %135, %138
  store double %139, ptr %134, align 8, !tbaa !17
  %140 = load ptr, ptr %128, align 8, !tbaa !16
  %141 = getelementptr inbounds double, ptr %140, i64 %.1107132
  %142 = load double, ptr %141, align 8, !tbaa !17
  %143 = fdiv double 1.000000e+00, %142
  %144 = load ptr, ptr %129, align 8, !tbaa !16
  %145 = getelementptr inbounds ptr, ptr %144, i64 %.1107132
  %146 = load ptr, ptr %145, align 8, !tbaa !21
  %147 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %3)
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %146, i64 noundef 1, i64 noundef %147, double noundef %143)
  %148 = load ptr, ptr %129, align 8, !tbaa !16
  %149 = load ptr, ptr %148, align 8, !tbaa !21
  %150 = getelementptr inbounds double, ptr %149, i64 %.1107132
  %151 = load i64, ptr %130, align 8, !tbaa !26
  %152 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %3)
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %150, i64 noundef %151, i64 noundef %152, double noundef %143)
  %153 = add nuw nsw i64 %.1107132, 1
  %exitcond139.not = icmp eq i64 %153, %3
  br i1 %exitcond139.not, label %._crit_edge135, label %131, !llvm.loop !28

._crit_edge135:                                   ; preds = %131, %._crit_edge130
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #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_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) 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 noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) 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_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

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

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

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

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

declare noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #2

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

declare noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL17linreg_lrinternalEPKNS_9ae_matrixEPKNS_9ae_vectorEllPNS_11linearmodelEPNS_8lrreportEPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, i64 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, !7, i64 0}
!6 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !11, i64 40, !8, i64 72}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!6, !7, i64 8}
!14 = !{!15, !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !8, i64 56}
!16 = !{!8, !8, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !8, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!12, !12, i64 0}
!22 = distinct !{!22, !20}
!23 = !{!6, !7, i64 16}
!24 = distinct !{!24, !20}
!25 = distinct !{!25, !20}
!26 = !{!27, !7, i64 16}
!27 = !{!"_ZTSN11alglib_impl8lrreportE", !6, i64 0, !18, i64 80, !18, i64 88, !18, i64 96, !18, i64 104, !18, i64 112, !18, i64 120, !7, i64 128, !15, i64 136}
!28 = distinct !{!28, !20}


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