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

; 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::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::lsfitreport" = type { i64, double, i64, i64, double, double, double, double, double, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double }

@.str.542 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.543 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.544 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.545 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.546 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.547 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.548 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.549 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.550 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.551 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.552 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.553 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.554 = external hidden unnamed_addr constant [56 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
define dso_local void @_ZN11alglib_impl13lsfitlinearwcEPKNS_9ae_vectorES2_PKNS_9ae_matrixES5_lllPS0_PNS_11lsfitreportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, i64 noundef %5, i64 noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) #3 {
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca %"struct.alglib_impl::ae_frame", align 8
  %22 = alloca %"struct.alglib_impl::ae_vector", align 8
  %23 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca %"struct.alglib_impl::ae_vector", align 8
  %27 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %28 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %29 = alloca %"struct.alglib_impl::ae_vector", align 8
  %30 = alloca %"struct.alglib_impl::ae_vector", align 8
  %31 = alloca double, align 8
  %32 = alloca i32, align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %2, ptr %13, align 8, !tbaa !5
  store ptr %3, ptr %14, align 8, !tbaa !5
  store i64 %4, ptr %15, align 8, !tbaa !9
  store i64 %5, ptr %16, align 8, !tbaa !9
  store i64 %6, ptr %17, align 8, !tbaa !9
  store ptr %7, ptr %18, align 8, !tbaa !5
  store ptr %8, ptr %19, align 8, !tbaa !5
  store ptr %9, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 80, 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 64, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  %33 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %33, ptr noundef %21)
  call void @llvm.memset.p0.i64(ptr align 8 %22, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %23, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %26, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %27, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %28, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %29, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %30, i8 0, i64 64, i1 false)
  %34 = load ptr, ptr %11, align 8, !tbaa !5
  %35 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %22, ptr noundef %34, ptr noundef %35, i1 noundef zeroext true)
  %36 = load ptr, ptr %14, align 8, !tbaa !5
  %37 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef %23, ptr noundef %36, ptr noundef %37, i1 noundef zeroext true)
  %38 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %38)
  %39 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl18_lsfitreport_clearEPv(ptr noundef %39)
  %40 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %26, i64 noundef 0, i64 noundef 3, ptr noundef %40, i1 noundef zeroext true)
  %41 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %27, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %41, i1 noundef zeroext true)
  %42 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %28, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %42, i1 noundef zeroext true)
  %43 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %29, i64 noundef 0, i64 noundef 3, ptr noundef %43, i1 noundef zeroext true)
  %44 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %30, i64 noundef 0, i64 noundef 3, ptr noundef %44, i1 noundef zeroext true)
  %45 = load i64, ptr %15, align 8, !tbaa !9
  %46 = icmp sge i64 %45, 1
  %47 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %46, ptr noundef @.str.542, ptr noundef %47)
  %48 = load i64, ptr %16, align 8, !tbaa !9
  %49 = icmp sge i64 %48, 1
  %50 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %49, ptr noundef @.str.543, ptr noundef %50)
  %51 = load i64, ptr %17, align 8, !tbaa !9
  %52 = icmp sge i64 %51, 0
  %53 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %52, ptr noundef @.str.544, ptr noundef %53)
  %54 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %22, i32 0, i32 0
  %55 = load i64, ptr %54, align 8, !tbaa !11
  %56 = load i64, ptr %15, align 8, !tbaa !9
  %57 = icmp sge i64 %55, %56
  %58 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %57, ptr noundef @.str.545, ptr noundef %58)
  %59 = load i64, ptr %15, align 8, !tbaa !9
  %60 = load ptr, ptr %20, align 8, !tbaa !5
  %61 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %22, i64 noundef %59, ptr noundef %60)
  %62 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %61, ptr noundef @.str.546, ptr noundef %62)
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %63, i32 0, i32 0
  %65 = load i64, ptr %64, align 8, !tbaa !11
  %66 = load i64, ptr %15, align 8, !tbaa !9
  %67 = icmp sge i64 %65, %66
  %68 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %67, ptr noundef @.str.547, ptr noundef %68)
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = load i64, ptr %15, align 8, !tbaa !9
  %71 = load ptr, ptr %20, align 8, !tbaa !5
  %72 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %69, i64 noundef %70, ptr noundef %71)
  %73 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %72, ptr noundef @.str.548, ptr noundef %73)
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %74, i32 0, i32 0
  %76 = load i64, ptr %75, align 8, !tbaa !15
  %77 = load i64, ptr %15, align 8, !tbaa !9
  %78 = icmp sge i64 %76, %77
  %79 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %78, ptr noundef @.str.549, ptr noundef %79)
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %80, i32 0, i32 1
  %82 = load i64, ptr %81, align 8, !tbaa !17
  %83 = load i64, ptr %16, align 8, !tbaa !9
  %84 = icmp sge i64 %82, %83
  %85 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %84, ptr noundef @.str.550, ptr noundef %85)
  %86 = load ptr, ptr %13, align 8, !tbaa !5
  %87 = load i64, ptr %15, align 8, !tbaa !9
  %88 = load i64, ptr %16, align 8, !tbaa !9
  %89 = load ptr, ptr %20, align 8, !tbaa !5
  %90 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %86, i64 noundef %87, i64 noundef %88, ptr noundef %89)
  %91 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %90, ptr noundef @.str.551, ptr noundef %91)
  %92 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %23, i32 0, i32 0
  %93 = load i64, ptr %92, align 8, !tbaa !15
  %94 = load i64, ptr %17, align 8, !tbaa !9
  %95 = icmp sge i64 %93, %94
  %96 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %95, ptr noundef @.str.552, ptr noundef %96)
  %97 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %23, i32 0, i32 1
  %98 = load i64, ptr %97, align 8, !tbaa !17
  %99 = load i64, ptr %16, align 8, !tbaa !9
  %100 = add nsw i64 %99, 1
  %101 = icmp sge i64 %98, %100
  br i1 %101, label %105, label %102

102:                                              ; preds = %10
  %103 = load i64, ptr %17, align 8, !tbaa !9
  %104 = icmp eq i64 %103, 0
  br label %105

105:                                              ; preds = %102, %10
  %106 = phi i1 [ true, %10 ], [ %104, %102 ]
  %107 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %106, ptr noundef @.str.553, ptr noundef %107)
  %108 = load i64, ptr %17, align 8, !tbaa !9
  %109 = load i64, ptr %16, align 8, !tbaa !9
  %110 = add nsw i64 %109, 1
  %111 = load ptr, ptr %20, align 8, !tbaa !5
  %112 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %23, i64 noundef %108, i64 noundef %110, ptr noundef %111)
  %113 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %112, ptr noundef @.str.554, ptr noundef %113)
  %114 = load i64, ptr %17, align 8, !tbaa !9
  %115 = load i64, ptr %16, align 8, !tbaa !9
  %116 = icmp sge i64 %114, %115
  br i1 %116, label %117, label %121

117:                                              ; preds = %105
  %118 = load ptr, ptr %19, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %118, i32 0, i32 0
  store i64 -3, ptr %119, align 8, !tbaa !18
  %120 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %120)
  store i32 1, ptr %32, align 4
  br label %348

121:                                              ; preds = %105
  %122 = load i64, ptr %17, align 8, !tbaa !9
  %123 = icmp eq i64 %122, 0
  br i1 %123, label %124, label %132

124:                                              ; preds = %121
  %125 = load ptr, ptr %12, align 8, !tbaa !5
  %126 = load ptr, ptr %13, align 8, !tbaa !5
  %127 = load i64, ptr %15, align 8, !tbaa !9
  %128 = load i64, ptr %16, align 8, !tbaa !9
  %129 = load ptr, ptr %18, align 8, !tbaa !5
  %130 = load ptr, ptr %19, align 8, !tbaa !5
  %131 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_implL25lsfit_lsfitlinearinternalEPKNS_9ae_vectorES2_PKNS_9ae_matrixEllPS0_PNS_11lsfitreportEPNS_8ae_stateE(ptr noundef %22, ptr noundef %125, ptr noundef %126, i64 noundef %127, i64 noundef %128, ptr noundef %129, ptr noundef %130, ptr noundef %131)
  br label %346

132:                                              ; preds = %121
  %133 = load i64, ptr %17, align 8, !tbaa !9
  %134 = load i64, ptr %16, align 8, !tbaa !9
  %135 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl9rmatrixlqEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %23, i64 noundef %133, i64 noundef %134, ptr noundef %26, ptr noundef %135)
  %136 = load i64, ptr %17, align 8, !tbaa !9
  %137 = load i64, ptr %16, align 8, !tbaa !9
  %138 = load i64, ptr %16, align 8, !tbaa !9
  %139 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl16rmatrixlqunpackqEPKNS_9ae_matrixEllPKNS_9ae_vectorElPS0_PNS_8ae_stateE(ptr noundef %23, i64 noundef %136, i64 noundef %137, ptr noundef %26, i64 noundef %138, ptr noundef %27, ptr noundef %139)
  store i64 0, ptr %24, align 8, !tbaa !9
  br label %140

140:                                              ; preds = %165, %132
  %141 = load i64, ptr %24, align 8, !tbaa !9
  %142 = load i64, ptr %17, align 8, !tbaa !9
  %143 = sub nsw i64 %142, 1
  %144 = icmp sle i64 %141, %143
  br i1 %144, label %145, label %168

145:                                              ; preds = %140
  %146 = load i64, ptr %24, align 8, !tbaa !9
  %147 = add nsw i64 %146, 1
  store i64 %147, ptr %25, align 8, !tbaa !9
  br label %148

148:                                              ; preds = %161, %145
  %149 = load i64, ptr %25, align 8, !tbaa !9
  %150 = load i64, ptr %16, align 8, !tbaa !9
  %151 = sub nsw i64 %150, 1
  %152 = icmp sle i64 %149, %151
  br i1 %152, label %153, label %164

153:                                              ; preds = %148
  %154 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %23, i32 0, i32 6
  %155 = load ptr, ptr %154, align 8, !tbaa !21
  %156 = load i64, ptr %24, align 8, !tbaa !9
  %157 = getelementptr inbounds ptr, ptr %155, i64 %156
  %158 = load ptr, ptr %157, align 8, !tbaa !5
  %159 = load i64, ptr %25, align 8, !tbaa !9
  %160 = getelementptr inbounds double, ptr %158, i64 %159
  store double 0.000000e+00, ptr %160, align 8, !tbaa !22
  br label %161

161:                                              ; preds = %153
  %162 = load i64, ptr %25, align 8, !tbaa !9
  %163 = add nsw i64 %162, 1
  store i64 %163, ptr %25, align 8, !tbaa !9
  br label %148, !llvm.loop !23

164:                                              ; preds = %148
  br label %165

165:                                              ; preds = %164
  %166 = load i64, ptr %24, align 8, !tbaa !9
  %167 = add nsw i64 %166, 1
  store i64 %167, ptr %24, align 8, !tbaa !9
  br label %140, !llvm.loop !25

168:                                              ; preds = %140
  %169 = load i64, ptr %17, align 8, !tbaa !9
  %170 = load ptr, ptr %20, align 8, !tbaa !5
  %171 = call noundef double @_ZN11alglib_impl17rmatrixlurcondinfEPKNS_9ae_matrixElPNS_8ae_stateE(ptr noundef %23, i64 noundef %169, ptr noundef %170)
  %172 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %171, double noundef 5.000000e-13)
  br i1 %172, label %173, label %177

173:                                              ; preds = %168
  %174 = load ptr, ptr %19, align 8, !tbaa !5
  %175 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %174, i32 0, i32 0
  store i64 -3, ptr %175, align 8, !tbaa !18
  %176 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %176)
  store i32 1, ptr %32, align 4
  br label %348

177:                                              ; preds = %168
  %178 = load i64, ptr %17, align 8, !tbaa !9
  %179 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %29, i64 noundef %178, ptr noundef %179)
  store i64 0, ptr %24, align 8, !tbaa !9
  br label %180

180:                                              ; preds = %227, %177
  %181 = load i64, ptr %24, align 8, !tbaa !9
  %182 = load i64, ptr %17, align 8, !tbaa !9
  %183 = sub nsw i64 %182, 1
  %184 = icmp sle i64 %181, %183
  br i1 %184, label %185, label %230

185:                                              ; preds = %180
  %186 = load i64, ptr %24, align 8, !tbaa !9
  %187 = icmp sgt i64 %186, 0
  br i1 %187, label %188, label %202

188:                                              ; preds = %185
  %189 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %23, i32 0, i32 6
  %190 = load ptr, ptr %189, align 8, !tbaa !21
  %191 = load i64, ptr %24, align 8, !tbaa !9
  %192 = getelementptr inbounds ptr, ptr %190, i64 %191
  %193 = load ptr, ptr %192, align 8, !tbaa !5
  %194 = getelementptr inbounds double, ptr %193, i64 0
  %195 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %29, i32 0, i32 4
  %196 = load ptr, ptr %195, align 8, !tbaa !21
  %197 = getelementptr inbounds double, ptr %196, i64 0
  %198 = load i64, ptr %24, align 8, !tbaa !9
  %199 = sub nsw i64 %198, 1
  %200 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %199)
  %201 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %194, i64 noundef 1, ptr noundef %197, i64 noundef 1, i64 noundef %200)
  store double %201, ptr %31, align 8, !tbaa !22
  br label %203

202:                                              ; preds = %185
  store double 0.000000e+00, ptr %31, align 8, !tbaa !22
  br label %203

203:                                              ; preds = %202, %188
  %204 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %23, i32 0, i32 6
  %205 = load ptr, ptr %204, align 8, !tbaa !21
  %206 = load i64, ptr %24, align 8, !tbaa !9
  %207 = getelementptr inbounds ptr, ptr %205, i64 %206
  %208 = load ptr, ptr %207, align 8, !tbaa !5
  %209 = load i64, ptr %16, align 8, !tbaa !9
  %210 = getelementptr inbounds double, ptr %208, i64 %209
  %211 = load double, ptr %210, align 8, !tbaa !22
  %212 = load double, ptr %31, align 8, !tbaa !22
  %213 = fsub double %211, %212
  %214 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %23, i32 0, i32 6
  %215 = load ptr, ptr %214, align 8, !tbaa !21
  %216 = load i64, ptr %24, align 8, !tbaa !9
  %217 = getelementptr inbounds ptr, ptr %215, i64 %216
  %218 = load ptr, ptr %217, align 8, !tbaa !5
  %219 = load i64, ptr %24, align 8, !tbaa !9
  %220 = getelementptr inbounds double, ptr %218, i64 %219
  %221 = load double, ptr %220, align 8, !tbaa !22
  %222 = fdiv double %213, %221
  %223 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %29, i32 0, i32 4
  %224 = load ptr, ptr %223, align 8, !tbaa !21
  %225 = load i64, ptr %24, align 8, !tbaa !9
  %226 = getelementptr inbounds double, ptr %224, i64 %225
  store double %222, ptr %226, align 8, !tbaa !22
  br label %227

227:                                              ; preds = %203
  %228 = load i64, ptr %24, align 8, !tbaa !9
  %229 = add nsw i64 %228, 1
  store i64 %229, ptr %24, align 8, !tbaa !9
  br label %180, !llvm.loop !26

230:                                              ; preds = %180
  %231 = load i64, ptr %16, align 8, !tbaa !9
  %232 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %30, i64 noundef %231, ptr noundef %232)
  store i64 0, ptr %24, align 8, !tbaa !9
  br label %233

233:                                              ; preds = %243, %230
  %234 = load i64, ptr %24, align 8, !tbaa !9
  %235 = load i64, ptr %16, align 8, !tbaa !9
  %236 = sub nsw i64 %235, 1
  %237 = icmp sle i64 %234, %236
  br i1 %237, label %238, label %246

238:                                              ; preds = %233
  %239 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %30, i32 0, i32 4
  %240 = load ptr, ptr %239, align 8, !tbaa !21
  %241 = load i64, ptr %24, align 8, !tbaa !9
  %242 = getelementptr inbounds double, ptr %240, i64 %241
  store double 0.000000e+00, ptr %242, align 8, !tbaa !22
  br label %243

243:                                              ; preds = %238
  %244 = load i64, ptr %24, align 8, !tbaa !9
  %245 = add nsw i64 %244, 1
  store i64 %245, ptr %24, align 8, !tbaa !9
  br label %233, !llvm.loop !27

246:                                              ; preds = %233
  store i64 0, ptr %24, align 8, !tbaa !9
  br label %247

247:                                              ; preds = %271, %246
  %248 = load i64, ptr %24, align 8, !tbaa !9
  %249 = load i64, ptr %17, align 8, !tbaa !9
  %250 = sub nsw i64 %249, 1
  %251 = icmp sle i64 %248, %250
  br i1 %251, label %252, label %274

252:                                              ; preds = %247
  %253 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %29, i32 0, i32 4
  %254 = load ptr, ptr %253, align 8, !tbaa !21
  %255 = load i64, ptr %24, align 8, !tbaa !9
  %256 = getelementptr inbounds double, ptr %254, i64 %255
  %257 = load double, ptr %256, align 8, !tbaa !22
  store double %257, ptr %31, align 8, !tbaa !22
  %258 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %30, i32 0, i32 4
  %259 = load ptr, ptr %258, align 8, !tbaa !21
  %260 = getelementptr inbounds double, ptr %259, i64 0
  %261 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %27, i32 0, i32 6
  %262 = load ptr, ptr %261, align 8, !tbaa !21
  %263 = load i64, ptr %24, align 8, !tbaa !9
  %264 = getelementptr inbounds ptr, ptr %262, i64 %263
  %265 = load ptr, ptr %264, align 8, !tbaa !5
  %266 = getelementptr inbounds double, ptr %265, i64 0
  %267 = load i64, ptr %16, align 8, !tbaa !9
  %268 = sub nsw i64 %267, 1
  %269 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %268)
  %270 = load double, ptr %31, align 8, !tbaa !22
  call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %260, i64 noundef 1, ptr noundef %266, i64 noundef 1, i64 noundef %269, double noundef %270)
  br label %271

271:                                              ; preds = %252
  %272 = load i64, ptr %24, align 8, !tbaa !9
  %273 = add nsw i64 %272, 1
  store i64 %273, ptr %24, align 8, !tbaa !9
  br label %247, !llvm.loop !28

274:                                              ; preds = %247
  %275 = load i64, ptr %15, align 8, !tbaa !9
  %276 = load i64, ptr %16, align 8, !tbaa !9
  %277 = load ptr, ptr %20, align 8, !tbaa !5
  %278 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %275, i64 noundef %276, ptr noundef %277)
  %279 = add nsw i64 %278, 1
  %280 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %29, i64 noundef %279, ptr noundef %280)
  %281 = load i64, ptr %15, align 8, !tbaa !9
  %282 = load i64, ptr %16, align 8, !tbaa !9
  %283 = load i64, ptr %17, align 8, !tbaa !9
  %284 = sub nsw i64 %282, %283
  %285 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %28, i64 noundef %281, i64 noundef %284, ptr noundef %285)
  %286 = load ptr, ptr %13, align 8, !tbaa !5
  %287 = load i64, ptr %15, align 8, !tbaa !9
  %288 = sub nsw i64 %287, 1
  %289 = load i64, ptr %16, align 8, !tbaa !9
  %290 = sub nsw i64 %289, 1
  %291 = load i64, ptr %16, align 8, !tbaa !9
  %292 = sub nsw i64 %291, 1
  %293 = load i64, ptr %15, align 8, !tbaa !9
  %294 = sub nsw i64 %293, 1
  %295 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl20matrixvectormultiplyEPKNS_9ae_matrixEllllbPKNS_9ae_vectorElldPS3_lldPNS_8ae_stateE(ptr noundef %286, i64 noundef 0, i64 noundef %288, i64 noundef 0, i64 noundef %290, i1 noundef zeroext false, ptr noundef %30, i64 noundef 0, i64 noundef %292, double noundef -1.000000e+00, ptr noundef %22, i64 noundef 0, i64 noundef %294, double noundef 1.000000e+00, ptr noundef %295)
  %296 = load i64, ptr %15, align 8, !tbaa !9
  %297 = load i64, ptr %16, align 8, !tbaa !9
  %298 = load i64, ptr %17, align 8, !tbaa !9
  %299 = sub nsw i64 %297, %298
  %300 = load i64, ptr %16, align 8, !tbaa !9
  %301 = load ptr, ptr %13, align 8, !tbaa !5
  %302 = load i64, ptr %17, align 8, !tbaa !9
  %303 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl11rmatrixgemmEllldPKNS_9ae_matrixElllS2_llldPS0_llPNS_8ae_stateE(i64 noundef %296, i64 noundef %299, i64 noundef %300, double noundef 1.000000e+00, ptr noundef %301, i64 noundef 0, i64 noundef 0, i64 noundef 0, ptr noundef %27, i64 noundef %302, i64 noundef 0, i64 noundef 1, double noundef 0.000000e+00, ptr noundef %28, i64 noundef 0, i64 noundef 0, ptr noundef %303)
  %304 = load ptr, ptr %12, align 8, !tbaa !5
  %305 = load i64, ptr %15, align 8, !tbaa !9
  %306 = load i64, ptr %16, align 8, !tbaa !9
  %307 = load i64, ptr %17, align 8, !tbaa !9
  %308 = sub nsw i64 %306, %307
  %309 = load ptr, ptr %19, align 8, !tbaa !5
  %310 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_implL25lsfit_lsfitlinearinternalEPKNS_9ae_vectorES2_PKNS_9ae_matrixEllPS0_PNS_11lsfitreportEPNS_8ae_stateE(ptr noundef %22, ptr noundef %304, ptr noundef %28, i64 noundef %305, i64 noundef %308, ptr noundef %29, ptr noundef %309, ptr noundef %310)
  %311 = load ptr, ptr %19, align 8, !tbaa !5
  %312 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %311, i32 0, i32 1
  store double -1.000000e+00, ptr %312, align 8, !tbaa !29
  %313 = load ptr, ptr %19, align 8, !tbaa !5
  %314 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %313, i32 0, i32 0
  %315 = load i64, ptr %314, align 8, !tbaa !18
  %316 = icmp sle i64 %315, 0
  br i1 %316, label %317, label %319

317:                                              ; preds = %274
  %318 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %318)
  store i32 1, ptr %32, align 4
  br label %348

319:                                              ; preds = %274
  %320 = load ptr, ptr %18, align 8, !tbaa !5
  %321 = load i64, ptr %16, align 8, !tbaa !9
  %322 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %320, i64 noundef %321, ptr noundef %322)
  %323 = load ptr, ptr %18, align 8, !tbaa !5
  %324 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %323, i32 0, i32 4
  %325 = load ptr, ptr %324, align 8, !tbaa !21
  %326 = getelementptr inbounds double, ptr %325, i64 0
  %327 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %30, i32 0, i32 4
  %328 = load ptr, ptr %327, align 8, !tbaa !21
  %329 = getelementptr inbounds double, ptr %328, i64 0
  %330 = load i64, ptr %16, align 8, !tbaa !9
  %331 = sub nsw i64 %330, 1
  %332 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %331)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %326, i64 noundef 1, ptr noundef %329, i64 noundef 1, i64 noundef %332)
  %333 = load i64, ptr %17, align 8, !tbaa !9
  %334 = load i64, ptr %16, align 8, !tbaa !9
  %335 = sub nsw i64 %334, 1
  %336 = load i64, ptr %16, align 8, !tbaa !9
  %337 = sub nsw i64 %336, 1
  %338 = load i64, ptr %16, align 8, !tbaa !9
  %339 = load i64, ptr %17, align 8, !tbaa !9
  %340 = sub nsw i64 %338, %339
  %341 = sub nsw i64 %340, 1
  %342 = load ptr, ptr %18, align 8, !tbaa !5
  %343 = load i64, ptr %16, align 8, !tbaa !9
  %344 = sub nsw i64 %343, 1
  %345 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl20matrixvectormultiplyEPKNS_9ae_matrixEllllbPKNS_9ae_vectorElldPS3_lldPNS_8ae_stateE(ptr noundef %27, i64 noundef %333, i64 noundef %335, i64 noundef 0, i64 noundef %337, i1 noundef zeroext true, ptr noundef %29, i64 noundef 0, i64 noundef %341, double noundef 1.000000e+00, ptr noundef %342, i64 noundef 0, i64 noundef %344, double noundef 1.000000e+00, ptr noundef %345)
  br label %346

346:                                              ; preds = %319, %124
  %347 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %347)
  store i32 0, ptr %32, align 4
  br label %348

348:                                              ; preds = %346, %317, %173, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 64, 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 80, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #4
  %349 = load i32, ptr %32, align 4
  switch i32 %349, label %351 [
    i32 0, label %350
    i32 1, label %350
  ]

350:                                              ; preds = %348, %348
  ret void

351:                                              ; preds = %348
  unreachable
}

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

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

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #2

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

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

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_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

declare noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) #2

declare void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef, ptr 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 noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 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_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #2

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

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

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

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

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

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

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

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

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

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

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_vectorE", !10, i64 0, !10, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!16, !10, i64 0}
!16 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !13, i64 32, !14, i64 40, !7, i64 72}
!17 = !{!16, !10, i64 8}
!18 = !{!19, !10, i64 0}
!19 = !{!"_ZTSN11alglib_impl11lsfitreportE", !10, i64 0, !20, i64 8, !10, i64 16, !10, i64 24, !20, i64 32, !20, i64 40, !20, i64 48, !20, i64 56, !20, i64 64, !16, i64 72, !12, i64 152, !12, i64 216, !12, i64 280, !20, i64 344}
!20 = !{!"double", !7, i64 0}
!21 = !{!7, !7, i64 0}
!22 = !{!20, !20, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}
!26 = distinct !{!26, !24}
!27 = distinct !{!27, !24}
!28 = distinct !{!28, !24}
!29 = !{!19, !20, i64 8}


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

@.str.542 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.543 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.544 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.545 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.546 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.547 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.548 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.549 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.550 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.551 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.552 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.553 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.554 = external hidden unnamed_addr constant [56 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
define dso_local void @_ZN11alglib_impl13lsfitlinearwcEPKNS_9ae_vectorES2_PKNS_9ae_matrixES5_lllPS0_PNS_11lsfitreportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, i64 noundef %5, i64 noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) local_unnamed_addr #3 {
  %11 = alloca %"struct.alglib_impl::ae_frame", align 8
  %12 = alloca %"struct.alglib_impl::ae_vector", align 8
  %13 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %14 = alloca %"struct.alglib_impl::ae_vector", align 8
  %15 = alloca %"struct.alglib_impl::ae_matrix", 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
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %16) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %17) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %18) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %9, ptr noundef nonnull %11)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %12, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %13, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %14, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %15, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %16, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %17, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %18, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %12, ptr noundef %0, ptr noundef %9, i1 noundef zeroext true)
  call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %13, ptr noundef %3, ptr noundef %9, i1 noundef zeroext true)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %7)
  call void @_ZN11alglib_impl18_lsfitreport_clearEPv(ptr noundef %8)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %14, i64 noundef 0, i64 noundef 3, ptr noundef %9, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %15, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %9, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %16, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %9, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %17, i64 noundef 0, i64 noundef 3, ptr noundef %9, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %18, i64 noundef 0, i64 noundef 3, ptr noundef %9, i1 noundef zeroext true)
  %19 = icmp sgt i64 %4, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef nonnull @.str.542, ptr noundef %9)
  %20 = icmp sgt i64 %5, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %20, ptr noundef nonnull @.str.543, ptr noundef %9)
  %21 = icmp sgt i64 %6, -1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %21, ptr noundef nonnull @.str.544, ptr noundef %9)
  %22 = load i64, ptr %12, align 8, !tbaa !5
  %23 = icmp sge i64 %22, %4
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %23, ptr noundef nonnull @.str.545, ptr noundef %9)
  %24 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %12, i64 noundef %4, ptr noundef %9)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %24, ptr noundef nonnull @.str.546, ptr noundef %9)
  %25 = load i64, ptr %1, align 8, !tbaa !5
  %26 = icmp sge i64 %25, %4
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %26, ptr noundef nonnull @.str.547, ptr noundef %9)
  %27 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %1, i64 noundef %4, ptr noundef %9)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef nonnull @.str.548, ptr noundef %9)
  %28 = load i64, ptr %2, align 8, !tbaa !13
  %29 = icmp sge i64 %28, %4
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %29, ptr noundef nonnull @.str.549, ptr noundef %9)
  %30 = getelementptr inbounds i8, ptr %2, i64 8
  %31 = load i64, ptr %30, align 8, !tbaa !15
  %32 = icmp sge i64 %31, %5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %32, ptr noundef nonnull @.str.550, ptr noundef %9)
  %33 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %2, i64 noundef %4, i64 noundef %5, ptr noundef %9)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %33, ptr noundef nonnull @.str.551, ptr noundef %9)
  %34 = load i64, ptr %13, align 8, !tbaa !13
  %35 = icmp sge i64 %34, %6
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %35, ptr noundef nonnull @.str.552, ptr noundef %9)
  %36 = getelementptr inbounds i8, ptr %13, i64 8
  %37 = load i64, ptr %36, align 8, !tbaa !15
  %38 = add nsw i64 %5, 1
  %39 = icmp sgt i64 %37, %5
  %40 = icmp eq i64 %6, 0
  %41 = or i1 %40, %39
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %41, ptr noundef nonnull @.str.553, ptr noundef %9)
  %42 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %13, i64 noundef %6, i64 noundef %38, ptr noundef %9)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %42, ptr noundef nonnull @.str.554, ptr noundef %9)
  %.not = icmp slt i64 %6, %5
  br i1 %.not, label %44, label %43

43:                                               ; preds = %10
  store i64 -3, ptr %8, align 8, !tbaa !16
  br label %141

44:                                               ; preds = %10
  br i1 %40, label %45, label %46

45:                                               ; preds = %44
  call void @_ZN11alglib_implL25lsfit_lsfitlinearinternalEPKNS_9ae_vectorES2_PKNS_9ae_matrixEllPS0_PNS_11lsfitreportEPNS_8ae_stateE(ptr noundef nonnull %12, ptr noundef nonnull %1, ptr noundef nonnull %2, i64 noundef %4, i64 noundef %5, ptr noundef %7, ptr noundef %8, ptr noundef %9)
  br label %141

46:                                               ; preds = %44
  call void @_ZN11alglib_impl9rmatrixlqEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %13, i64 noundef %6, i64 noundef %5, ptr noundef nonnull %14, ptr noundef %9)
  call void @_ZN11alglib_impl16rmatrixlqunpackqEPKNS_9ae_matrixEllPKNS_9ae_vectorElPS0_PNS_8ae_stateE(ptr noundef nonnull %13, i64 noundef %6, i64 noundef %5, ptr noundef nonnull %14, i64 noundef %5, ptr noundef nonnull %15, ptr noundef %9)
  %.not158.not166 = icmp sgt i64 %6, 0
  br i1 %.not158.not166, label %.lr.ph168, label %._crit_edge

.lr.ph168:                                        ; preds = %46
  %47 = getelementptr inbounds i8, ptr %13, i64 72
  %xtraiter = and i64 %6, 1
  %48 = icmp eq i64 %6, 1
  br i1 %48, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph168.new

.lr.ph168.new:                                    ; preds = %.lr.ph168
  %unroll_iter = and i64 %6, 9223372036854775806
  br label %55

.loopexit:                                        ; preds = %.lr.ph, %55
  %49 = add nuw nsw i64 %.0153167, 2
  %.not163.not164.1 = icmp slt i64 %49, %5
  br i1 %.not163.not164.1, label %.lr.ph.1, label %.loopexit.1

.lr.ph.1:                                         ; preds = %.loopexit, %.lr.ph.1
  %.0152165.1 = phi i64 [ %54, %.lr.ph.1 ], [ %49, %.loopexit ]
  %50 = load ptr, ptr %47, align 8, !tbaa !19
  %51 = getelementptr inbounds ptr, ptr %50, i64 %56
  %52 = load ptr, ptr %51, align 8, !tbaa !20
  %53 = getelementptr inbounds double, ptr %52, i64 %.0152165.1
  store double 0.000000e+00, ptr %53, align 8, !tbaa !21
  %54 = add nuw nsw i64 %.0152165.1, 1
  %.not163.not.1 = icmp slt i64 %54, %5
  br i1 %.not163.not.1, label %.lr.ph.1, label %.loopexit.1, !llvm.loop !22

.loopexit.1:                                      ; preds = %.lr.ph.1, %.loopexit
  %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 %55, !llvm.loop !24

55:                                               ; preds = %.loopexit.1, %.lr.ph168.new
  %.0153167 = phi i64 [ 0, %.lr.ph168.new ], [ %49, %.loopexit.1 ]
  %niter = phi i64 [ 0, %.lr.ph168.new ], [ %niter.next.1, %.loopexit.1 ]
  %56 = or disjoint i64 %.0153167, 1
  %.not163.not164 = icmp slt i64 %56, %5
  br i1 %.not163.not164, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %55, %.lr.ph
  %.0152165 = phi i64 [ %61, %.lr.ph ], [ %56, %55 ]
  %57 = load ptr, ptr %47, align 8, !tbaa !19
  %58 = getelementptr inbounds ptr, ptr %57, i64 %.0153167
  %59 = load ptr, ptr %58, align 8, !tbaa !20
  %60 = getelementptr inbounds double, ptr %59, i64 %.0152165
  store double 0.000000e+00, ptr %60, align 8, !tbaa !21
  %61 = add nuw nsw i64 %.0152165, 1
  %.not163.not = icmp slt i64 %61, %5
  br i1 %.not163.not, label %.lr.ph, label %.loopexit, !llvm.loop !22

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.loopexit.1, %.lr.ph168
  %.0153167.unr = phi i64 [ 0, %.lr.ph168 ], [ %49, %.loopexit.1 ]
  %lcmp.mod.not = icmp ne i64 %xtraiter, 0
  %62 = add nuw nsw i64 %.0153167.unr, 1
  %.not163.not164.epil = icmp slt i64 %62, %5
  %or.cond = select i1 %lcmp.mod.not, i1 %.not163.not164.epil, i1 false
  br i1 %or.cond, label %.lr.ph.epil, label %._crit_edge

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %.0152165.epil = phi i64 [ %67, %.lr.ph.epil ], [ %62, %._crit_edge.loopexit.unr-lcssa ]
  %63 = load ptr, ptr %47, align 8, !tbaa !19
  %64 = getelementptr inbounds ptr, ptr %63, i64 %.0153167.unr
  %65 = load ptr, ptr %64, align 8, !tbaa !20
  %66 = getelementptr inbounds double, ptr %65, i64 %.0152165.epil
  store double 0.000000e+00, ptr %66, align 8, !tbaa !21
  %67 = add nuw nsw i64 %.0152165.epil, 1
  %.not163.not.epil = icmp slt i64 %67, %5
  br i1 %.not163.not.epil, label %.lr.ph.epil, label %._crit_edge, !llvm.loop !22

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %46
  %68 = call noundef double @_ZN11alglib_impl17rmatrixlurcondinfEPKNS_9ae_matrixElPNS_8ae_stateE(ptr noundef nonnull %13, i64 noundef %6, ptr noundef %9)
  %69 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %68, double noundef 5.000000e-13)
  br i1 %69, label %70, label %71

70:                                               ; preds = %._crit_edge
  store i64 -3, ptr %8, align 8, !tbaa !16
  br label %141

71:                                               ; preds = %._crit_edge
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %17, i64 noundef %6, ptr noundef %9)
  br i1 %.not158.not166, label %72, label %._crit_edge173

72:                                               ; preds = %71
  %73 = getelementptr inbounds i8, ptr %13, i64 72
  %74 = getelementptr inbounds i8, ptr %17, i64 56
  %.pre189 = load ptr, ptr %74, align 8, !tbaa !19
  %.pre = load ptr, ptr %73, align 8, !tbaa !19
  %.pre186 = load ptr, ptr %.pre, align 8, !tbaa !20
  %.pre188 = load double, ptr %.pre186, align 8, !tbaa !21
  %.phi.trans.insert = getelementptr inbounds double, ptr %.pre186, i64 %5
  %.pre187 = load double, ptr %.phi.trans.insert, align 8, !tbaa !21
  %75 = fdiv double %.pre187, %.pre188
  store double %75, ptr %.pre189, align 8, !tbaa !21
  %exitcond182.peel.not = icmp eq i64 %6, 1
  br i1 %exitcond182.peel.not, label %._crit_edge173, label %.peel.next

.peel.next:                                       ; preds = %72, %.peel.next
  %.1170 = phi i64 [ %94, %.peel.next ], [ 1, %72 ]
  %76 = load ptr, ptr %73, align 8, !tbaa !19
  %77 = getelementptr inbounds ptr, ptr %76, i64 %.1170
  %78 = load ptr, ptr %77, align 8, !tbaa !20
  %79 = load ptr, ptr %74, align 8, !tbaa !19
  %80 = add nsw i64 %.1170, -1
  %81 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %80)
  %82 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %78, i64 noundef 1, ptr noundef %79, i64 noundef 1, i64 noundef %81)
  %83 = load ptr, ptr %73, align 8, !tbaa !19
  %84 = getelementptr inbounds ptr, ptr %83, i64 %.1170
  %85 = load ptr, ptr %84, align 8, !tbaa !20
  %86 = getelementptr inbounds double, ptr %85, i64 %5
  %87 = load double, ptr %86, align 8, !tbaa !21
  %88 = fsub double %87, %82
  %89 = getelementptr inbounds double, ptr %85, i64 %.1170
  %90 = load double, ptr %89, align 8, !tbaa !21
  %91 = fdiv double %88, %90
  %92 = load ptr, ptr %74, align 8, !tbaa !19
  %93 = getelementptr inbounds double, ptr %92, i64 %.1170
  store double %91, ptr %93, align 8, !tbaa !21
  %94 = add nuw nsw i64 %.1170, 1
  %exitcond182.not = icmp eq i64 %94, %6
  br i1 %exitcond182.not, label %._crit_edge173, label %.peel.next, !llvm.loop !25

._crit_edge173:                                   ; preds = %.peel.next, %72, %71
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %18, i64 noundef %5, ptr noundef %9)
  br i1 %20, label %.lr.ph177, label %.preheader

.lr.ph177:                                        ; preds = %._crit_edge173
  %95 = getelementptr inbounds i8, ptr %18, i64 56
  %xtraiter192 = and i64 %5, 3
  %96 = icmp ult i64 %5, 4
  br i1 %96, label %.preheader.loopexit.unr-lcssa, label %.lr.ph177.new

.lr.ph177.new:                                    ; preds = %.lr.ph177
  %unroll_iter194 = and i64 %5, 9223372036854775804
  br label %104

.preheader.loopexit.unr-lcssa:                    ; preds = %104, %.lr.ph177
  %.2175.unr = phi i64 [ 0, %.lr.ph177 ], [ %116, %104 ]
  %lcmp.mod193.not = icmp eq i64 %xtraiter192, 0
  br i1 %lcmp.mod193.not, label %.preheader, label %.epil.preheader191

.epil.preheader191:                               ; preds = %.preheader.loopexit.unr-lcssa, %.epil.preheader191
  %.2175.epil = phi i64 [ %99, %.epil.preheader191 ], [ %.2175.unr, %.preheader.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader191 ], [ 0, %.preheader.loopexit.unr-lcssa ]
  %97 = load ptr, ptr %95, align 8, !tbaa !19
  %98 = getelementptr inbounds double, ptr %97, i64 %.2175.epil
  store double 0.000000e+00, ptr %98, align 8, !tbaa !21
  %99 = add nuw nsw i64 %.2175.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter192
  br i1 %epil.iter.cmp.not, label %.preheader, label %.epil.preheader191, !llvm.loop !27

.preheader:                                       ; preds = %.preheader.loopexit.unr-lcssa, %.epil.preheader191, %._crit_edge173
  %100 = add nsw i64 %5, -1
  br i1 %.not158.not166, label %.lr.ph180, label %._crit_edge181

.lr.ph180:                                        ; preds = %.preheader
  %101 = getelementptr inbounds i8, ptr %17, i64 56
  %102 = getelementptr inbounds i8, ptr %18, i64 56
  %103 = getelementptr inbounds i8, ptr %15, i64 72
  br label %117

104:                                              ; preds = %104, %.lr.ph177.new
  %.2175 = phi i64 [ 0, %.lr.ph177.new ], [ %116, %104 ]
  %niter195 = phi i64 [ 0, %.lr.ph177.new ], [ %niter195.next.3, %104 ]
  %105 = load ptr, ptr %95, align 8, !tbaa !19
  %106 = getelementptr inbounds double, ptr %105, i64 %.2175
  store double 0.000000e+00, ptr %106, align 8, !tbaa !21
  %107 = or disjoint i64 %.2175, 1
  %108 = load ptr, ptr %95, align 8, !tbaa !19
  %109 = getelementptr inbounds double, ptr %108, i64 %107
  store double 0.000000e+00, ptr %109, align 8, !tbaa !21
  %110 = or disjoint i64 %.2175, 2
  %111 = load ptr, ptr %95, align 8, !tbaa !19
  %112 = getelementptr inbounds double, ptr %111, i64 %110
  store double 0.000000e+00, ptr %112, align 8, !tbaa !21
  %113 = or disjoint i64 %.2175, 3
  %114 = load ptr, ptr %95, align 8, !tbaa !19
  %115 = getelementptr inbounds double, ptr %114, i64 %113
  store double 0.000000e+00, ptr %115, align 8, !tbaa !21
  %116 = add nuw nsw i64 %.2175, 4
  %niter195.next.3 = add i64 %niter195, 4
  %niter195.ncmp.3 = icmp eq i64 %niter195.next.3, %unroll_iter194
  br i1 %niter195.ncmp.3, label %.preheader.loopexit.unr-lcssa, label %104, !llvm.loop !29

117:                                              ; preds = %.lr.ph180, %117
  %.3179 = phi i64 [ 0, %.lr.ph180 ], [ %126, %117 ]
  %118 = load ptr, ptr %101, align 8, !tbaa !19
  %119 = getelementptr inbounds double, ptr %118, i64 %.3179
  %120 = load double, ptr %119, align 8, !tbaa !21
  %121 = load ptr, ptr %102, align 8, !tbaa !19
  %122 = load ptr, ptr %103, align 8, !tbaa !19
  %123 = getelementptr inbounds ptr, ptr %122, i64 %.3179
  %124 = load ptr, ptr %123, align 8, !tbaa !20
  %125 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %100)
  call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %121, i64 noundef 1, ptr noundef %124, i64 noundef 1, i64 noundef %125, double noundef %120)
  %126 = add nuw nsw i64 %.3179, 1
  %exitcond185.not = icmp eq i64 %126, %6
  br i1 %exitcond185.not, label %._crit_edge181, label %117, !llvm.loop !30

._crit_edge181:                                   ; preds = %117, %.preheader
  %127 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %4, i64 noundef %5, ptr noundef %9)
  %128 = add nsw i64 %127, 1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %17, i64 noundef %128, ptr noundef %9)
  %129 = sub nsw i64 %5, %6
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %16, i64 noundef %4, i64 noundef %129, ptr noundef %9)
  %130 = add nsw i64 %4, -1
  call void @_ZN11alglib_impl20matrixvectormultiplyEPKNS_9ae_matrixEllllbPKNS_9ae_vectorElldPS3_lldPNS_8ae_stateE(ptr noundef nonnull %2, i64 noundef 0, i64 noundef %130, i64 noundef 0, i64 noundef %100, i1 noundef zeroext false, ptr noundef nonnull %18, i64 noundef 0, i64 noundef %100, double noundef -1.000000e+00, ptr noundef nonnull %12, i64 noundef 0, i64 noundef %130, double noundef 1.000000e+00, ptr noundef %9)
  call void @_ZN11alglib_impl11rmatrixgemmEllldPKNS_9ae_matrixElllS2_llldPS0_llPNS_8ae_stateE(i64 noundef %4, i64 noundef %129, i64 noundef %5, double noundef 1.000000e+00, ptr noundef nonnull %2, i64 noundef 0, i64 noundef 0, i64 noundef 0, ptr noundef nonnull %15, i64 noundef %6, i64 noundef 0, i64 noundef 1, double noundef 0.000000e+00, ptr noundef nonnull %16, i64 noundef 0, i64 noundef 0, ptr noundef %9)
  call void @_ZN11alglib_implL25lsfit_lsfitlinearinternalEPKNS_9ae_vectorES2_PKNS_9ae_matrixEllPS0_PNS_11lsfitreportEPNS_8ae_stateE(ptr noundef nonnull %12, ptr noundef nonnull %1, ptr noundef nonnull %16, i64 noundef %4, i64 noundef %129, ptr noundef nonnull %17, ptr noundef %8, ptr noundef %9)
  %131 = getelementptr inbounds i8, ptr %8, i64 8
  store double -1.000000e+00, ptr %131, align 8, !tbaa !31
  %132 = load i64, ptr %8, align 8, !tbaa !16
  %133 = icmp slt i64 %132, 1
  br i1 %133, label %141, label %134

134:                                              ; preds = %._crit_edge181
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %7, i64 noundef %5, ptr noundef %9)
  %135 = getelementptr inbounds i8, ptr %7, i64 56
  %136 = load ptr, ptr %135, align 8, !tbaa !19
  %137 = getelementptr inbounds i8, ptr %18, i64 56
  %138 = load ptr, ptr %137, align 8, !tbaa !19
  %139 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %100)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %136, i64 noundef 1, ptr noundef %138, i64 noundef 1, i64 noundef %139)
  %140 = add nsw i64 %129, -1
  call void @_ZN11alglib_impl20matrixvectormultiplyEPKNS_9ae_matrixEllllbPKNS_9ae_vectorElldPS3_lldPNS_8ae_stateE(ptr noundef nonnull %15, i64 noundef %6, i64 noundef %100, i64 noundef 0, i64 noundef %100, i1 noundef zeroext true, ptr noundef nonnull %17, i64 noundef 0, i64 noundef %140, double noundef 1.000000e+00, ptr noundef %7, i64 noundef 0, i64 noundef %100, double noundef 1.000000e+00, ptr noundef %9)
  br label %141

141:                                              ; preds = %45, %134, %._crit_edge181, %70, %43
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %9)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  ret void
}

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

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

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(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_impl9ae_v_moveEPdlPKdll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

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_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

declare noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef, ptr 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 noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 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_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) 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 noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

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

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

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

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

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

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

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

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

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_vectorE", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !8, i64 56}
!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 = !{!14, !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !11, i64 40, !8, i64 72}
!15 = !{!14, !7, i64 8}
!16 = !{!17, !7, i64 0}
!17 = !{!"_ZTSN11alglib_impl11lsfitreportE", !7, i64 0, !18, i64 8, !7, i64 16, !7, i64 24, !18, i64 32, !18, i64 40, !18, i64 48, !18, i64 56, !18, i64 64, !14, i64 72, !6, i64 152, !6, i64 216, !6, i64 280, !18, i64 344}
!18 = !{!"double", !8, i64 0}
!19 = !{!8, !8, i64 0}
!20 = !{!12, !12, i64 0}
!21 = !{!18, !18, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23, !26}
!26 = !{!"llvm.loop.peeled.count", i32 1}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.unroll.disable"}
!29 = distinct !{!29, !23}
!30 = distinct !{!30, !23}
!31 = !{!17, !18, i64 8}


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