; LLVM IR from venumb/ZSPACE :: cpp/depends/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 }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl13pcabuildbasisEPNS_9ae_matrixEllPlPNS_9ae_vectorES1_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #1 {
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, 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_matrix", align 8
  %18 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %19 = alloca %"struct.alglib_impl::ae_vector", align 8
  %20 = alloca %"struct.alglib_impl::ae_vector", align 8
  %21 = alloca i64, 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
  %27 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i64 %1, ptr %9, align 8, !tbaa !9
  store i64 %2, ptr %10, align 8, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !5
  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 80, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 64, 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
  %28 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %28, 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 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 64, i1 false)
  %29 = load ptr, ptr %11, align 8, !tbaa !5
  store i64 0, ptr %29, align 8, !tbaa !9
  %30 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %30)
  %31 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %31)
  %32 = 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 %32, i1 noundef zeroext true)
  %33 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %17, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %33, i1 noundef zeroext true)
  %34 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %18, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %34, i1 noundef zeroext true)
  %35 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %19, i64 noundef 0, i64 noundef 3, ptr noundef %35, i1 noundef zeroext true)
  %36 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %20, i64 noundef 0, i64 noundef 3, ptr noundef %36, i1 noundef zeroext true)
  %37 = load i64, ptr %9, align 8, !tbaa !9
  %38 = icmp slt i64 %37, 0
  br i1 %38, label %42, label %39

39:                                               ; preds = %7
  %40 = load i64, ptr %10, align 8, !tbaa !9
  %41 = icmp slt i64 %40, 1
  br i1 %41, label %42, label %45

42:                                               ; preds = %39, %7
  %43 = load ptr, ptr %11, align 8, !tbaa !5
  store i64 -1, ptr %43, align 8, !tbaa !9
  %44 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %44)
  store i32 1, ptr %27, align 4
  br label %283

45:                                               ; preds = %39
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  store i64 1, ptr %46, align 8, !tbaa !9
  %47 = load i64, ptr %9, align 8, !tbaa !9
  %48 = icmp eq i64 %47, 0
  br i1 %48, label %49, label %115

49:                                               ; preds = %45
  %50 = load ptr, ptr %12, align 8, !tbaa !5
  %51 = load i64, ptr %10, align 8, !tbaa !9
  %52 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %50, i64 noundef %51, ptr noundef %52)
  %53 = load ptr, ptr %13, align 8, !tbaa !5
  %54 = load i64, ptr %10, align 8, !tbaa !9
  %55 = load i64, ptr %10, align 8, !tbaa !9
  %56 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %53, i64 noundef %54, i64 noundef %55, ptr noundef %56)
  store i64 0, ptr %21, align 8, !tbaa !9
  br label %57

57:                                               ; preds = %68, %49
  %58 = load i64, ptr %21, align 8, !tbaa !9
  %59 = load i64, ptr %10, align 8, !tbaa !9
  %60 = sub nsw i64 %59, 1
  %61 = icmp sle i64 %58, %60
  br i1 %61, label %62, label %71

62:                                               ; preds = %57
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %63, i32 0, i32 4
  %65 = load ptr, ptr %64, align 8, !tbaa !11
  %66 = load i64, ptr %21, align 8, !tbaa !9
  %67 = getelementptr inbounds double, ptr %65, i64 %66
  store double 0.000000e+00, ptr %67, align 8, !tbaa !12
  br label %68

68:                                               ; preds = %62
  %69 = load i64, ptr %21, align 8, !tbaa !9
  %70 = add nsw i64 %69, 1
  store i64 %70, ptr %21, align 8, !tbaa !9
  br label %57, !llvm.loop !14

71:                                               ; preds = %57
  store i64 0, ptr %21, align 8, !tbaa !9
  br label %72

72:                                               ; preds = %110, %71
  %73 = load i64, ptr %21, 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 %113

77:                                               ; preds = %72
  store i64 0, ptr %22, align 8, !tbaa !9
  br label %78

78:                                               ; preds = %106, %77
  %79 = load i64, ptr %22, align 8, !tbaa !9
  %80 = load i64, ptr %10, align 8, !tbaa !9
  %81 = sub nsw i64 %80, 1
  %82 = icmp sle i64 %79, %81
  br i1 %82, label %83, label %109

83:                                               ; preds = %78
  %84 = load i64, ptr %21, align 8, !tbaa !9
  %85 = load i64, ptr %22, align 8, !tbaa !9
  %86 = icmp eq i64 %84, %85
  br i1 %86, label %87, label %96

87:                                               ; preds = %83
  %88 = load ptr, ptr %13, align 8, !tbaa !5
  %89 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %88, i32 0, i32 6
  %90 = load ptr, ptr %89, align 8, !tbaa !11
  %91 = load i64, ptr %21, align 8, !tbaa !9
  %92 = getelementptr inbounds ptr, ptr %90, i64 %91
  %93 = load ptr, ptr %92, align 8, !tbaa !5
  %94 = load i64, ptr %22, align 8, !tbaa !9
  %95 = getelementptr inbounds double, ptr %93, i64 %94
  store double 1.000000e+00, ptr %95, align 8, !tbaa !12
  br label %105

96:                                               ; preds = %83
  %97 = load ptr, ptr %13, align 8, !tbaa !5
  %98 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %97, i32 0, i32 6
  %99 = load ptr, ptr %98, align 8, !tbaa !11
  %100 = load i64, ptr %21, align 8, !tbaa !9
  %101 = getelementptr inbounds ptr, ptr %99, i64 %100
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  %103 = load i64, ptr %22, align 8, !tbaa !9
  %104 = getelementptr inbounds double, ptr %102, i64 %103
  store double 0.000000e+00, ptr %104, align 8, !tbaa !12
  br label %105

105:                                              ; preds = %96, %87
  br label %106

106:                                              ; preds = %105
  %107 = load i64, ptr %22, align 8, !tbaa !9
  %108 = add nsw i64 %107, 1
  store i64 %108, ptr %22, align 8, !tbaa !9
  br label %78, !llvm.loop !16

109:                                              ; preds = %78
  br label %110

110:                                              ; preds = %109
  %111 = load i64, ptr %21, align 8, !tbaa !9
  %112 = add nsw i64 %111, 1
  store i64 %112, ptr %21, align 8, !tbaa !9
  br label %72, !llvm.loop !17

113:                                              ; preds = %72
  %114 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %114)
  store i32 1, ptr %27, align 4
  br label %283

115:                                              ; preds = %45
  %116 = load i64, ptr %10, align 8, !tbaa !9
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %19, i64 noundef %116, ptr noundef %117)
  %118 = load i64, ptr %9, align 8, !tbaa !9
  %119 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %20, i64 noundef %118, ptr noundef %119)
  store i64 0, ptr %22, align 8, !tbaa !9
  br label %120

120:                                              ; preds = %149, %115
  %121 = load i64, ptr %22, align 8, !tbaa !9
  %122 = load i64, ptr %10, align 8, !tbaa !9
  %123 = sub nsw i64 %122, 1
  %124 = icmp sle i64 %121, %123
  br i1 %124, label %125, label %152

125:                                              ; preds = %120
  %126 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %20, i32 0, i32 4
  %127 = load ptr, ptr %126, align 8, !tbaa !11
  %128 = getelementptr inbounds double, ptr %127, i64 0
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %129, i32 0, i32 6
  %131 = load ptr, ptr %130, align 8, !tbaa !11
  %132 = getelementptr inbounds ptr, ptr %131, i64 0
  %133 = load ptr, ptr %132, align 8, !tbaa !5
  %134 = load i64, ptr %22, align 8, !tbaa !9
  %135 = getelementptr inbounds double, ptr %133, i64 %134
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %136, i32 0, i32 2
  %138 = load i64, ptr %137, align 8, !tbaa !18
  %139 = load i64, ptr %9, align 8, !tbaa !9
  %140 = sub nsw i64 %139, 1
  %141 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %140)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %128, i64 noundef 1, ptr noundef %135, i64 noundef %138, i64 noundef %141)
  %142 = load i64, ptr %9, align 8, !tbaa !9
  %143 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl13samplemomentsEPNS_9ae_vectorElPdS2_S2_S2_PNS_8ae_stateE(ptr noundef %20, i64 noundef %142, ptr noundef %23, ptr noundef %24, ptr noundef %25, ptr noundef %26, ptr noundef %143)
  %144 = load double, ptr %23, align 8, !tbaa !12
  %145 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %146 = load ptr, ptr %145, align 8, !tbaa !11
  %147 = load i64, ptr %22, align 8, !tbaa !9
  %148 = getelementptr inbounds double, ptr %146, i64 %147
  store double %144, ptr %148, align 8, !tbaa !12
  br label %149

149:                                              ; preds = %125
  %150 = load i64, ptr %22, align 8, !tbaa !9
  %151 = add nsw i64 %150, 1
  store i64 %151, ptr %22, align 8, !tbaa !9
  br label %120, !llvm.loop !22

152:                                              ; preds = %120
  %153 = load i64, ptr %9, align 8, !tbaa !9
  %154 = load i64, ptr %10, align 8, !tbaa !9
  %155 = load ptr, ptr %14, align 8, !tbaa !5
  %156 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %153, i64 noundef %154, ptr noundef %155)
  %157 = load i64, ptr %10, align 8, !tbaa !9
  %158 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %16, i64 noundef %156, i64 noundef %157, ptr noundef %158)
  store i64 0, ptr %21, align 8, !tbaa !9
  br label %159

159:                                              ; preds = %193, %152
  %160 = load i64, ptr %21, align 8, !tbaa !9
  %161 = load i64, ptr %9, align 8, !tbaa !9
  %162 = sub nsw i64 %161, 1
  %163 = icmp sle i64 %160, %162
  br i1 %163, label %164, label %196

164:                                              ; preds = %159
  %165 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %16, i32 0, i32 6
  %166 = load ptr, ptr %165, align 8, !tbaa !11
  %167 = load i64, ptr %21, align 8, !tbaa !9
  %168 = getelementptr inbounds ptr, ptr %166, i64 %167
  %169 = load ptr, ptr %168, align 8, !tbaa !5
  %170 = getelementptr inbounds double, ptr %169, i64 0
  %171 = load ptr, ptr %8, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %171, i32 0, i32 6
  %173 = load ptr, ptr %172, align 8, !tbaa !11
  %174 = load i64, ptr %21, align 8, !tbaa !9
  %175 = getelementptr inbounds ptr, ptr %173, i64 %174
  %176 = load ptr, ptr %175, align 8, !tbaa !5
  %177 = getelementptr inbounds double, ptr %176, i64 0
  %178 = load i64, ptr %10, align 8, !tbaa !9
  %179 = sub nsw i64 %178, 1
  %180 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %179)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %170, i64 noundef 1, ptr noundef %177, i64 noundef 1, i64 noundef %180)
  %181 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %16, i32 0, i32 6
  %182 = load ptr, ptr %181, align 8, !tbaa !11
  %183 = load i64, ptr %21, align 8, !tbaa !9
  %184 = getelementptr inbounds ptr, ptr %182, i64 %183
  %185 = load ptr, ptr %184, align 8, !tbaa !5
  %186 = getelementptr inbounds double, ptr %185, i64 0
  %187 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %188 = load ptr, ptr %187, align 8, !tbaa !11
  %189 = getelementptr inbounds double, ptr %188, i64 0
  %190 = load i64, ptr %10, align 8, !tbaa !9
  %191 = sub nsw i64 %190, 1
  %192 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %191)
  call void @_ZN11alglib_impl8ae_v_subEPdlPKdll(ptr noundef %186, i64 noundef 1, ptr noundef %189, i64 noundef 1, i64 noundef %192)
  br label %193

193:                                              ; preds = %164
  %194 = load i64, ptr %21, align 8, !tbaa !9
  %195 = add nsw i64 %194, 1
  store i64 %195, ptr %21, align 8, !tbaa !9
  br label %159, !llvm.loop !23

196:                                              ; preds = %159
  %197 = load i64, ptr %9, align 8, !tbaa !9
  store i64 %197, ptr %21, align 8, !tbaa !9
  br label %198

198:                                              ; preds = %221, %196
  %199 = load i64, ptr %21, align 8, !tbaa !9
  %200 = load i64, ptr %10, align 8, !tbaa !9
  %201 = sub nsw i64 %200, 1
  %202 = icmp sle i64 %199, %201
  br i1 %202, label %203, label %224

203:                                              ; preds = %198
  store i64 0, ptr %22, align 8, !tbaa !9
  br label %204

204:                                              ; preds = %217, %203
  %205 = load i64, ptr %22, align 8, !tbaa !9
  %206 = load i64, ptr %10, align 8, !tbaa !9
  %207 = sub nsw i64 %206, 1
  %208 = icmp sle i64 %205, %207
  br i1 %208, label %209, label %220

209:                                              ; preds = %204
  %210 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %16, i32 0, i32 6
  %211 = load ptr, ptr %210, align 8, !tbaa !11
  %212 = load i64, ptr %21, align 8, !tbaa !9
  %213 = getelementptr inbounds ptr, ptr %211, i64 %212
  %214 = load ptr, ptr %213, align 8, !tbaa !5
  %215 = load i64, ptr %22, align 8, !tbaa !9
  %216 = getelementptr inbounds double, ptr %214, i64 %215
  store double 0.000000e+00, ptr %216, align 8, !tbaa !12
  br label %217

217:                                              ; preds = %209
  %218 = load i64, ptr %22, align 8, !tbaa !9
  %219 = add nsw i64 %218, 1
  store i64 %219, ptr %22, align 8, !tbaa !9
  br label %204, !llvm.loop !24

220:                                              ; preds = %204
  br label %221

221:                                              ; preds = %220
  %222 = load i64, ptr %21, align 8, !tbaa !9
  %223 = add nsw i64 %222, 1
  store i64 %223, ptr %21, align 8, !tbaa !9
  br label %198, !llvm.loop !25

224:                                              ; preds = %198
  %225 = load i64, ptr %9, align 8, !tbaa !9
  %226 = load i64, ptr %10, align 8, !tbaa !9
  %227 = load ptr, ptr %14, align 8, !tbaa !5
  %228 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %225, i64 noundef %226, ptr noundef %227)
  %229 = load i64, ptr %10, align 8, !tbaa !9
  %230 = load ptr, ptr %12, align 8, !tbaa !5
  %231 = load ptr, ptr %14, align 8, !tbaa !5
  %232 = call noundef zeroext i1 @_ZN11alglib_impl10rmatrixsvdEPNS_9ae_matrixElllllPNS_9ae_vectorES1_S1_PNS_8ae_stateE(ptr noundef %16, i64 noundef %228, i64 noundef %229, i64 noundef 0, i64 noundef 1, i64 noundef 2, ptr noundef %230, ptr noundef %17, ptr noundef %18, ptr noundef %231)
  br i1 %232, label %236, label %233

233:                                              ; preds = %224
  %234 = load ptr, ptr %11, align 8, !tbaa !5
  store i64 -4, ptr %234, align 8, !tbaa !9
  %235 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %235)
  store i32 1, ptr %27, align 4
  br label %283

236:                                              ; preds = %224
  %237 = load i64, ptr %9, align 8, !tbaa !9
  %238 = icmp ne i64 %237, 1
  br i1 %238, label %239, label %267

239:                                              ; preds = %236
  store i64 0, ptr %21, align 8, !tbaa !9
  br label %240

240:                                              ; preds = %263, %239
  %241 = load i64, ptr %21, align 8, !tbaa !9
  %242 = load i64, ptr %10, align 8, !tbaa !9
  %243 = sub nsw i64 %242, 1
  %244 = icmp sle i64 %241, %243
  br i1 %244, label %245, label %266

245:                                              ; preds = %240
  %246 = load ptr, ptr %12, align 8, !tbaa !5
  %247 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %246, i32 0, i32 4
  %248 = load ptr, ptr %247, align 8, !tbaa !11
  %249 = load i64, ptr %21, align 8, !tbaa !9
  %250 = getelementptr inbounds double, ptr %248, i64 %249
  %251 = load double, ptr %250, align 8, !tbaa !12
  %252 = load ptr, ptr %14, align 8, !tbaa !5
  %253 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %251, ptr noundef %252)
  %254 = load i64, ptr %9, align 8, !tbaa !9
  %255 = sub nsw i64 %254, 1
  %256 = sitofp i64 %255 to double
  %257 = fdiv double %253, %256
  %258 = load ptr, ptr %12, align 8, !tbaa !5
  %259 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %258, i32 0, i32 4
  %260 = load ptr, ptr %259, align 8, !tbaa !11
  %261 = load i64, ptr %21, align 8, !tbaa !9
  %262 = getelementptr inbounds double, ptr %260, i64 %261
  store double %257, ptr %262, align 8, !tbaa !12
  br label %263

263:                                              ; preds = %245
  %264 = load i64, ptr %21, align 8, !tbaa !9
  %265 = add nsw i64 %264, 1
  store i64 %265, ptr %21, align 8, !tbaa !9
  br label %240, !llvm.loop !26

266:                                              ; preds = %240
  br label %267

267:                                              ; preds = %266, %236
  %268 = load ptr, ptr %13, align 8, !tbaa !5
  %269 = load i64, ptr %10, align 8, !tbaa !9
  %270 = load i64, ptr %10, align 8, !tbaa !9
  %271 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %268, i64 noundef %269, i64 noundef %270, ptr noundef %271)
  %272 = load i64, ptr %10, align 8, !tbaa !9
  %273 = sub nsw i64 %272, 1
  %274 = load i64, ptr %10, align 8, !tbaa !9
  %275 = sub nsw i64 %274, 1
  %276 = load ptr, ptr %13, align 8, !tbaa !5
  %277 = load i64, ptr %10, align 8, !tbaa !9
  %278 = sub nsw i64 %277, 1
  %279 = load i64, ptr %10, align 8, !tbaa !9
  %280 = sub nsw i64 %279, 1
  %281 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl16copyandtransposeEPNS_9ae_matrixEllllS1_llllPNS_8ae_stateE(ptr noundef %18, i64 noundef 0, i64 noundef %273, i64 noundef 0, i64 noundef %275, ptr noundef %276, i64 noundef 0, i64 noundef %278, i64 noundef 0, i64 noundef %280, ptr noundef %281)
  %282 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %282)
  store i32 0, ptr %27, align 4
  br label %283

283:                                              ; preds = %267, %233, %113, %42
  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 64, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 80, 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
  %284 = load i32, ptr %27, align 4
  switch i32 %284, label %286 [
    i32 0, label %285
    i32 1, label %285
  ]

285:                                              ; preds = %283, %283
  ret void

286:                                              ; preds = %283
  unreachable
}

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

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

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #3

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) #3

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #3

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

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

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

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

declare void @_ZN11alglib_impl13samplemomentsEPNS_9ae_vectorElPdS2_S2_S2_PNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

declare void @_ZN11alglib_impl8ae_v_subEPdlPKdll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) #3

declare noundef zeroext i1 @_ZN11alglib_impl10rmatrixsvdEPNS_9ae_matrixElllllPNS_9ae_vectorES1_S1_PNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr noundef) #3

declare void @_ZN11alglib_impl16copyandtransposeEPNS_9ae_matrixEllllS1_llllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef) #3

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


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

%"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 }

; 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 uwtable
define dso_local void @_ZN11alglib_impl13pcabuildbasisEPNS_9ae_matrixEllPlPNS_9ae_vectorES1_PNS_8ae_stateE(ptr nocapture noundef readonly %0, i64 noundef %1, i64 noundef %2, ptr nocapture noundef writeonly %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #1 {
  %8 = alloca %"struct.alglib_impl::ae_frame", align 8
  %9 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %10 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %11 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %12 = alloca %"struct.alglib_impl::ae_vector", align 8
  %13 = alloca %"struct.alglib_impl::ae_vector", align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #5
  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(80) %10, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %11, i8 0, i64 80, i1 false)
  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(64) %13, i8 0, i64 64, i1 false)
  store i64 0, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %4)
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(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_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %10, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %6, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %11, 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 %12, 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 %13, i64 noundef 0, i64 noundef 3, ptr noundef %6, i1 noundef zeroext true)
  %18 = icmp slt i64 %1, 0
  %19 = icmp slt i64 %2, 1
  %or.cond = or i1 %18, %19
  br i1 %or.cond, label %20, label %21

20:                                               ; preds = %7
  store i64 -1, ptr %3, align 8, !tbaa !5
  br label %._crit_edge154

21:                                               ; preds = %7
  store i64 1, ptr %3, align 8, !tbaa !5
  %22 = icmp eq i64 %1, 0
  br i1 %22, label %.lr.ph147, label %.lr.ph

.lr.ph147:                                        ; preds = %21
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %4, i64 noundef %2, ptr noundef %6)
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %5, i64 noundef %2, i64 noundef %2, ptr noundef %6)
  %23 = getelementptr inbounds i8, ptr %4, i64 56
  %24 = add nsw i64 %2, -1
  %xtraiter166 = and i64 %2, 3
  %25 = icmp ult i64 %24, 3
  br i1 %25, label %.preheader.lr.ph.unr-lcssa, label %.lr.ph147.new

.lr.ph147.new:                                    ; preds = %.lr.ph147
  %unroll_iter169 = and i64 %2, 9223372036854775804
  br label %49

.preheader.lr.ph.unr-lcssa:                       ; preds = %49, %.lr.ph147
  %.0108145.unr = phi i64 [ 0, %.lr.ph147 ], [ %61, %49 ]
  %lcmp.mod168.not = icmp eq i64 %xtraiter166, 0
  br i1 %lcmp.mod168.not, label %.preheader.lr.ph, label %.epil.preheader165

.epil.preheader165:                               ; preds = %.preheader.lr.ph.unr-lcssa, %.epil.preheader165
  %.0108145.epil = phi i64 [ %28, %.epil.preheader165 ], [ %.0108145.unr, %.preheader.lr.ph.unr-lcssa ]
  %epil.iter167 = phi i64 [ %epil.iter167.next, %.epil.preheader165 ], [ 0, %.preheader.lr.ph.unr-lcssa ]
  %26 = load ptr, ptr %23, align 8, !tbaa !9
  %27 = getelementptr inbounds double, ptr %26, i64 %.0108145.epil
  store double 0.000000e+00, ptr %27, align 8, !tbaa !10
  %28 = add nuw nsw i64 %.0108145.epil, 1
  %epil.iter167.next = add i64 %epil.iter167, 1
  %epil.iter167.cmp.not = icmp eq i64 %epil.iter167.next, %xtraiter166
  br i1 %epil.iter167.cmp.not, label %.preheader.lr.ph, label %.epil.preheader165, !llvm.loop !12

.preheader.lr.ph:                                 ; preds = %.epil.preheader165, %.preheader.lr.ph.unr-lcssa
  %29 = getelementptr inbounds i8, ptr %5, i64 72
  %xtraiter172 = and i64 %2, 1
  %30 = icmp eq i64 %24, 0
  %unroll_iter175 = and i64 %2, 9223372036854775806
  %lcmp.mod174.not = icmp eq i64 %xtraiter172, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %._crit_edge151.us, %.preheader.lr.ph
  %.1109153.us = phi i64 [ 0, %.preheader.lr.ph ], [ %48, %._crit_edge151.us ]
  br i1 %30, label %._crit_edge151.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %.0149.us = phi i64 [ %42, %.preheader.us.new ], [ 0, %.preheader.us ]
  %niter176 = phi i64 [ %niter176.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %31 = icmp eq i64 %.1109153.us, %.0149.us
  %32 = load ptr, ptr %29, align 8, !tbaa !9
  %33 = getelementptr inbounds ptr, ptr %32, i64 %.1109153.us
  %34 = load ptr, ptr %33, align 8, !tbaa !14
  %. = select i1 %31, double 1.000000e+00, double 0.000000e+00
  %35 = getelementptr inbounds double, ptr %34, i64 %.0149.us
  store double %., ptr %35, align 8, !tbaa !10
  %36 = or disjoint i64 %.0149.us, 1
  %37 = icmp eq i64 %.1109153.us, %36
  %38 = load ptr, ptr %29, align 8, !tbaa !9
  %39 = getelementptr inbounds ptr, ptr %38, i64 %.1109153.us
  %40 = load ptr, ptr %39, align 8, !tbaa !14
  %..1 = select i1 %37, double 1.000000e+00, double 0.000000e+00
  %41 = getelementptr inbounds double, ptr %40, i64 %36
  store double %..1, ptr %41, align 8, !tbaa !10
  %42 = add nuw nsw i64 %.0149.us, 2
  %niter176.next.1 = add i64 %niter176, 2
  %niter176.ncmp.1 = icmp eq i64 %niter176.next.1, %unroll_iter175
  br i1 %niter176.ncmp.1, label %._crit_edge151.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !16

._crit_edge151.us.unr-lcssa:                      ; preds = %.preheader.us.new, %.preheader.us
  %.0149.us.unr = phi i64 [ 0, %.preheader.us ], [ %42, %.preheader.us.new ]
  br i1 %lcmp.mod174.not, label %._crit_edge151.us, label %._crit_edge151.us.epilog-lcssa

._crit_edge151.us.epilog-lcssa:                   ; preds = %._crit_edge151.us.unr-lcssa
  %43 = icmp eq i64 %.1109153.us, %.0149.us.unr
  %44 = load ptr, ptr %29, align 8, !tbaa !9
  %45 = getelementptr inbounds ptr, ptr %44, i64 %.1109153.us
  %46 = load ptr, ptr %45, align 8, !tbaa !14
  %..epil = select i1 %43, double 1.000000e+00, double 0.000000e+00
  %47 = getelementptr inbounds double, ptr %46, i64 %.0149.us.unr
  store double %..epil, ptr %47, align 8, !tbaa !10
  br label %._crit_edge151.us

._crit_edge151.us:                                ; preds = %._crit_edge151.us.unr-lcssa, %._crit_edge151.us.epilog-lcssa
  %48 = add nuw nsw i64 %.1109153.us, 1
  %exitcond163.not = icmp eq i64 %48, %2
  br i1 %exitcond163.not, label %._crit_edge154, label %.preheader.us, !llvm.loop !18

49:                                               ; preds = %49, %.lr.ph147.new
  %.0108145 = phi i64 [ 0, %.lr.ph147.new ], [ %61, %49 ]
  %niter170 = phi i64 [ 0, %.lr.ph147.new ], [ %niter170.next.3, %49 ]
  %50 = load ptr, ptr %23, align 8, !tbaa !9
  %51 = getelementptr inbounds double, ptr %50, i64 %.0108145
  store double 0.000000e+00, ptr %51, align 8, !tbaa !10
  %52 = or disjoint i64 %.0108145, 1
  %53 = load ptr, ptr %23, align 8, !tbaa !9
  %54 = getelementptr inbounds double, ptr %53, i64 %52
  store double 0.000000e+00, ptr %54, align 8, !tbaa !10
  %55 = or disjoint i64 %.0108145, 2
  %56 = load ptr, ptr %23, align 8, !tbaa !9
  %57 = getelementptr inbounds double, ptr %56, i64 %55
  store double 0.000000e+00, ptr %57, align 8, !tbaa !10
  %58 = or disjoint i64 %.0108145, 3
  %59 = load ptr, ptr %23, align 8, !tbaa !9
  %60 = getelementptr inbounds double, ptr %59, i64 %58
  store double 0.000000e+00, ptr %60, align 8, !tbaa !10
  %61 = add nuw nsw i64 %.0108145, 4
  %niter170.next.3 = add i64 %niter170, 4
  %niter170.ncmp.3 = icmp eq i64 %niter170.next.3, %unroll_iter169
  br i1 %niter170.ncmp.3, label %.preheader.lr.ph.unr-lcssa, label %49, !llvm.loop !19

.lr.ph:                                           ; preds = %21
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %12, i64 noundef %2, ptr noundef %6)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %13, i64 noundef %1, ptr noundef %6)
  %62 = getelementptr inbounds i8, ptr %13, i64 56
  %63 = getelementptr inbounds i8, ptr %0, i64 72
  %64 = getelementptr inbounds i8, ptr %0, i64 16
  %65 = add nsw i64 %1, -1
  %66 = getelementptr inbounds i8, ptr %12, i64 56
  br label %67

67:                                               ; preds = %.lr.ph, %67
  %.1129 = phi i64 [ 0, %.lr.ph ], [ %77, %67 ]
  %68 = load ptr, ptr %62, align 8, !tbaa !9
  %69 = load ptr, ptr %63, align 8, !tbaa !9
  %70 = load ptr, ptr %69, align 8, !tbaa !14
  %71 = getelementptr inbounds double, ptr %70, i64 %.1129
  %72 = load i64, ptr %64, align 8, !tbaa !20
  %73 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %65)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %68, i64 noundef 1, ptr noundef %71, i64 noundef %72, i64 noundef %73)
  call void @_ZN11alglib_impl13samplemomentsEPNS_9ae_vectorElPdS2_S2_S2_PNS_8ae_stateE(ptr noundef nonnull %13, i64 noundef %1, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef %6)
  %74 = load double, ptr %14, align 8, !tbaa !10
  %75 = load ptr, ptr %66, align 8, !tbaa !9
  %76 = getelementptr inbounds double, ptr %75, i64 %.1129
  store double %74, ptr %76, align 8, !tbaa !10
  %77 = add nuw nsw i64 %.1129, 1
  %exitcond.not = icmp eq i64 %77, %2
  br i1 %exitcond.not, label %.lr.ph133, label %67, !llvm.loop !24

.lr.ph133:                                        ; preds = %67
  %78 = add nsw i64 %2, -1
  %79 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %1, i64 noundef %2, ptr noundef %6)
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %79, i64 noundef %2, ptr noundef %6)
  %80 = getelementptr inbounds i8, ptr %9, i64 72
  %81 = getelementptr inbounds i8, ptr %0, i64 72
  %82 = getelementptr inbounds i8, ptr %12, i64 56
  %smax = call i64 @llvm.smax.i64(i64 %1, i64 1)
  br label %113

.preheader126:                                    ; preds = %113
  %83 = add nsw i64 %1, -1
  %.not.not117138 = icmp slt i64 %1, %2
  br i1 %.not.not117138, label %.preheader125.us.preheader, label %._crit_edge140

.preheader125.us.preheader:                       ; preds = %.preheader126
  %84 = getelementptr inbounds i8, ptr %9, i64 72
  %85 = add nsw i64 %2, -1
  %xtraiter = and i64 %2, 3
  %86 = icmp ult i64 %85, 3
  %unroll_iter = and i64 %2, 9223372036854775804
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader125.us

.preheader125.us:                                 ; preds = %.preheader125.us.preheader, %._crit_edge137.us
  %.3139.us = phi i64 [ %112, %._crit_edge137.us ], [ %1, %.preheader125.us.preheader ]
  br i1 %86, label %._crit_edge137.us.unr-lcssa, label %.preheader125.us.new

.preheader125.us.new:                             ; preds = %.preheader125.us, %.preheader125.us.new
  %.2135.us = phi i64 [ %106, %.preheader125.us.new ], [ 0, %.preheader125.us ]
  %niter = phi i64 [ %niter.next.3, %.preheader125.us.new ], [ 0, %.preheader125.us ]
  %87 = load ptr, ptr %84, align 8, !tbaa !9
  %88 = getelementptr inbounds ptr, ptr %87, i64 %.3139.us
  %89 = load ptr, ptr %88, align 8, !tbaa !14
  %90 = getelementptr inbounds double, ptr %89, i64 %.2135.us
  store double 0.000000e+00, ptr %90, align 8, !tbaa !10
  %91 = or disjoint i64 %.2135.us, 1
  %92 = load ptr, ptr %84, align 8, !tbaa !9
  %93 = getelementptr inbounds ptr, ptr %92, i64 %.3139.us
  %94 = load ptr, ptr %93, align 8, !tbaa !14
  %95 = getelementptr inbounds double, ptr %94, i64 %91
  store double 0.000000e+00, ptr %95, align 8, !tbaa !10
  %96 = or disjoint i64 %.2135.us, 2
  %97 = load ptr, ptr %84, align 8, !tbaa !9
  %98 = getelementptr inbounds ptr, ptr %97, i64 %.3139.us
  %99 = load ptr, ptr %98, align 8, !tbaa !14
  %100 = getelementptr inbounds double, ptr %99, i64 %96
  store double 0.000000e+00, ptr %100, align 8, !tbaa !10
  %101 = or disjoint i64 %.2135.us, 3
  %102 = load ptr, ptr %84, align 8, !tbaa !9
  %103 = getelementptr inbounds ptr, ptr %102, i64 %.3139.us
  %104 = load ptr, ptr %103, align 8, !tbaa !14
  %105 = getelementptr inbounds double, ptr %104, i64 %101
  store double 0.000000e+00, ptr %105, align 8, !tbaa !10
  %106 = add nuw nsw i64 %.2135.us, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge137.us.unr-lcssa, label %.preheader125.us.new, !llvm.loop !25

._crit_edge137.us.unr-lcssa:                      ; preds = %.preheader125.us.new, %.preheader125.us
  %.2135.us.unr = phi i64 [ 0, %.preheader125.us ], [ %106, %.preheader125.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge137.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge137.us.unr-lcssa, %.epil.preheader
  %.2135.us.epil = phi i64 [ %111, %.epil.preheader ], [ %.2135.us.unr, %._crit_edge137.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge137.us.unr-lcssa ]
  %107 = load ptr, ptr %84, align 8, !tbaa !9
  %108 = getelementptr inbounds ptr, ptr %107, i64 %.3139.us
  %109 = load ptr, ptr %108, align 8, !tbaa !14
  %110 = getelementptr inbounds double, ptr %109, i64 %.2135.us.epil
  store double 0.000000e+00, ptr %110, align 8, !tbaa !10
  %111 = add nuw nsw i64 %.2135.us.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge137.us, label %.epil.preheader, !llvm.loop !26

._crit_edge137.us:                                ; preds = %.epil.preheader, %._crit_edge137.us.unr-lcssa
  %112 = add nuw nsw i64 %.3139.us, 1
  %exitcond159.not = icmp eq i64 %112, %2
  br i1 %exitcond159.not, label %._crit_edge140, label %.preheader125.us, !llvm.loop !27

113:                                              ; preds = %.lr.ph133, %113
  %.2110131 = phi i64 [ 0, %.lr.ph133 ], [ %126, %113 ]
  %114 = load ptr, ptr %80, align 8, !tbaa !9
  %115 = getelementptr inbounds ptr, ptr %114, i64 %.2110131
  %116 = load ptr, ptr %115, align 8, !tbaa !14
  %117 = load ptr, ptr %81, align 8, !tbaa !9
  %118 = getelementptr inbounds ptr, ptr %117, i64 %.2110131
  %119 = load ptr, ptr %118, align 8, !tbaa !14
  %120 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %78)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %116, i64 noundef 1, ptr noundef %119, i64 noundef 1, i64 noundef %120)
  %121 = load ptr, ptr %80, align 8, !tbaa !9
  %122 = getelementptr inbounds ptr, ptr %121, i64 %.2110131
  %123 = load ptr, ptr %122, align 8, !tbaa !14
  %124 = load ptr, ptr %82, align 8, !tbaa !9
  %125 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %78)
  call void @_ZN11alglib_impl8ae_v_subEPdlPKdll(ptr noundef %123, i64 noundef 1, ptr noundef %124, i64 noundef 1, i64 noundef %125)
  %126 = add nuw nsw i64 %.2110131, 1
  %exitcond157.not = icmp eq i64 %126, %smax
  br i1 %exitcond157.not, label %.preheader126, label %113, !llvm.loop !28

._crit_edge140:                                   ; preds = %._crit_edge137.us, %.preheader126
  %127 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %1, i64 noundef %2, ptr noundef %6)
  %128 = call noundef zeroext i1 @_ZN11alglib_impl10rmatrixsvdEPNS_9ae_matrixElllllPNS_9ae_vectorES1_S1_PNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %127, i64 noundef %2, i64 noundef 0, i64 noundef 1, i64 noundef 2, ptr noundef %4, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef %6)
  br i1 %128, label %130, label %129

129:                                              ; preds = %._crit_edge140
  store i64 -4, ptr %3, align 8, !tbaa !5
  br label %._crit_edge154

130:                                              ; preds = %._crit_edge140
  %.not.not = icmp eq i64 %1, 1
  br i1 %.not.not, label %.loopexit, label %.lr.ph143

.lr.ph143:                                        ; preds = %130
  %131 = getelementptr inbounds i8, ptr %4, i64 56
  %132 = uitofp nneg i64 %83 to double
  br label %133

133:                                              ; preds = %.lr.ph143, %133
  %.4142 = phi i64 [ 0, %.lr.ph143 ], [ %141, %133 ]
  %134 = load ptr, ptr %131, align 8, !tbaa !9
  %135 = getelementptr inbounds double, ptr %134, i64 %.4142
  %136 = load double, ptr %135, align 8, !tbaa !10
  %137 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %136, ptr noundef %6)
  %138 = fdiv double %137, %132
  %139 = load ptr, ptr %131, align 8, !tbaa !9
  %140 = getelementptr inbounds double, ptr %139, i64 %.4142
  store double %138, ptr %140, align 8, !tbaa !10
  %141 = add nuw nsw i64 %.4142, 1
  %exitcond160.not = icmp eq i64 %141, %2
  br i1 %exitcond160.not, label %.loopexit, label %133, !llvm.loop !29

.loopexit:                                        ; preds = %133, %130
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %5, i64 noundef %2, i64 noundef %2, ptr noundef %6)
  call void @_ZN11alglib_impl16copyandtransposeEPNS_9ae_matrixEllllS1_llllPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef 0, i64 noundef %78, i64 noundef 0, i64 noundef %78, ptr noundef %5, i64 noundef 0, i64 noundef %78, i64 noundef 0, i64 noundef %78, ptr noundef %6)
  br label %._crit_edge154

._crit_edge154:                                   ; preds = %._crit_edge151.us, %.loopexit, %129, %20
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  ret void
}

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

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

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) local_unnamed_addr #3

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 #3

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #3

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

declare void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

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

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

declare void @_ZN11alglib_impl13samplemomentsEPNS_9ae_vectorElPdS2_S2_S2_PNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare void @_ZN11alglib_impl8ae_v_subEPdlPKdll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN11alglib_impl10rmatrixsvdEPNS_9ae_matrixElllllPNS_9ae_vectorES1_S1_PNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare void @_ZN11alglib_impl16copyandtransposeEPNS_9ae_matrixEllllS1_llllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.unroll.disable"}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = !{!21, !6, i64 16}
!21 = !{!"_ZTSN11alglib_impl9ae_matrixE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !22, i64 32, !23, i64 40, !7, i64 72}
!22 = !{!"bool", !7, i64 0}
!23 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!24 = distinct !{!24, !17}
!25 = distinct !{!25, !17}
!26 = distinct !{!26, !13}
!27 = distinct !{!27, !17}
!28 = distinct !{!28, !17}
!29 = distinct !{!29, !17}


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