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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.alglib_impl::sparsematrix" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, i64, i64, i64, i64 }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%union.anon.1 = type { ptr }

@.str.177 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.178 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.179 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.180 = external hidden unnamed_addr constant [134 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl9sparsemtvEPKNS_12sparsematrixEPKNS_9ae_vectorEPS3_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %25, i32 0, i32 5
  %27 = load i64, ptr %26, align 8, !tbaa !9
  %28 = icmp eq i64 %27, 1
  br i1 %28, label %34, label %29

29:                                               ; preds = %4
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %30, i32 0, i32 5
  %32 = load i64, ptr %31, align 8, !tbaa !9
  %33 = icmp eq i64 %32, 2
  br label %34

34:                                               ; preds = %29, %4
  %35 = phi i1 [ true, %4 ], [ %33, %29 ]
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %35, ptr noundef @.str.178, ptr noundef %36)
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %37, i32 0, i32 0
  %39 = load i64, ptr %38, align 8, !tbaa !15
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %40, i32 0, i32 6
  %42 = load i64, ptr %41, align 8, !tbaa !16
  %43 = icmp sge i64 %39, %42
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %43, ptr noundef @.str.179, ptr noundef %44)
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %45, i32 0, i32 7
  %47 = load i64, ptr %46, align 8, !tbaa !17
  store i64 %47, ptr %18, align 8, !tbaa !18
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %48, i32 0, i32 6
  %50 = load i64, ptr %49, align 8, !tbaa !16
  store i64 %50, ptr %19, align 8, !tbaa !18
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = load i64, ptr %18, align 8, !tbaa !18
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %51, i64 noundef %52, ptr noundef %53)
  store i64 0, ptr %9, align 8, !tbaa !18
  br label %54

54:                                               ; preds = %65, %34
  %55 = load i64, ptr %9, align 8, !tbaa !18
  %56 = load i64, ptr %18, align 8, !tbaa !18
  %57 = sub nsw i64 %56, 1
  %58 = icmp sle i64 %55, %57
  br i1 %58, label %59, label %68

59:                                               ; preds = %54
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %60, i32 0, i32 4
  %62 = load ptr, ptr %61, align 8, !tbaa !19
  %63 = load i64, ptr %9, align 8, !tbaa !18
  %64 = getelementptr inbounds double, ptr %62, i64 %63
  store double 0.000000e+00, ptr %64, align 8, !tbaa !20
  br label %65

65:                                               ; preds = %59
  %66 = load i64, ptr %9, align 8, !tbaa !18
  %67 = add nsw i64 %66, 1
  store i64 %67, ptr %9, align 8, !tbaa !18
  br label %54, !llvm.loop !22

68:                                               ; preds = %54
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %69, i32 0, i32 5
  %71 = load i64, ptr %70, align 8, !tbaa !9
  %72 = icmp eq i64 %71, 1
  br i1 %72, label %73, label %173

73:                                               ; preds = %68
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %74, i32 0, i32 9
  %76 = load i64, ptr %75, align 8, !tbaa !24
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %77, i32 0, i32 2
  %79 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %78, i32 0, i32 4
  %80 = load ptr, ptr %79, align 8, !tbaa !19
  %81 = load i64, ptr %19, align 8, !tbaa !18
  %82 = getelementptr inbounds i64, ptr %80, i64 %81
  %83 = load i64, ptr %82, align 8, !tbaa !18
  %84 = icmp eq i64 %76, %83
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %84, ptr noundef @.str.180, ptr noundef %85)
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %86, i32 0, i32 6
  %88 = load i64, ptr %87, align 8, !tbaa !16
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %89, i32 0, i32 7
  %91 = load i64, ptr %90, align 8, !tbaa !17
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %92, i32 0, i32 0
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %94, i32 0, i32 1
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %96, i32 0, i32 2
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  %101 = call noundef zeroext i1 @_ZN11alglib_impl16sparsegemvcrsmklEllldPKNS_9ae_vectorES2_S2_S2_ldPS0_lPNS_8ae_stateE(i64 noundef 1, i64 noundef %88, i64 noundef %91, double noundef 1.000000e+00, ptr noundef %93, ptr noundef %95, ptr noundef %97, ptr noundef %98, i64 noundef 0, double noundef 0.000000e+00, ptr noundef %99, i64 noundef 0, ptr noundef %100)
  br i1 %101, label %102, label %103

102:                                              ; preds = %73
  store i32 1, ptr %24, align 4
  br label %304

103:                                              ; preds = %73
  store i64 0, ptr %9, align 8, !tbaa !18
  br label %104

104:                                              ; preds = %169, %103
  %105 = load i64, ptr %9, align 8, !tbaa !18
  %106 = load i64, ptr %19, align 8, !tbaa !18
  %107 = sub nsw i64 %106, 1
  %108 = icmp sle i64 %105, %107
  br i1 %108, label %109, label %172

109:                                              ; preds = %104
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %110, i32 0, i32 2
  %112 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %111, i32 0, i32 4
  %113 = load ptr, ptr %112, align 8, !tbaa !19
  %114 = load i64, ptr %9, align 8, !tbaa !18
  %115 = getelementptr inbounds i64, ptr %113, i64 %114
  %116 = load i64, ptr %115, align 8, !tbaa !18
  store i64 %116, ptr %11, align 8, !tbaa !18
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %117, i32 0, i32 2
  %119 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %118, i32 0, i32 4
  %120 = load ptr, ptr %119, align 8, !tbaa !19
  %121 = load i64, ptr %9, align 8, !tbaa !18
  %122 = add nsw i64 %121, 1
  %123 = getelementptr inbounds i64, ptr %120, i64 %122
  %124 = load i64, ptr %123, align 8, !tbaa !18
  store i64 %124, ptr %12, align 8, !tbaa !18
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %125, i32 0, i32 4
  %127 = load ptr, ptr %126, align 8, !tbaa !19
  %128 = load i64, ptr %9, align 8, !tbaa !18
  %129 = getelementptr inbounds double, ptr %127, i64 %128
  %130 = load double, ptr %129, align 8, !tbaa !20
  store double %130, ptr %16, align 8, !tbaa !20
  %131 = load i64, ptr %11, align 8, !tbaa !18
  store i64 %131, ptr %10, align 8, !tbaa !18
  br label %132

132:                                              ; preds = %165, %109
  %133 = load i64, ptr %10, align 8, !tbaa !18
  %134 = load i64, ptr %12, align 8, !tbaa !18
  %135 = sub nsw i64 %134, 1
  %136 = icmp sle i64 %133, %135
  br i1 %136, label %137, label %168

137:                                              ; preds = %132
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %138, i32 0, i32 1
  %140 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %139, i32 0, i32 4
  %141 = load ptr, ptr %140, align 8, !tbaa !19
  %142 = load i64, ptr %10, align 8, !tbaa !18
  %143 = getelementptr inbounds i64, ptr %141, i64 %142
  %144 = load i64, ptr %143, align 8, !tbaa !18
  store i64 %144, ptr %13, align 8, !tbaa !18
  %145 = load ptr, ptr %7, align 8, !tbaa !5
  %146 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %145, i32 0, i32 4
  %147 = load ptr, ptr %146, align 8, !tbaa !19
  %148 = load i64, ptr %13, align 8, !tbaa !18
  %149 = getelementptr inbounds double, ptr %147, i64 %148
  %150 = load double, ptr %149, align 8, !tbaa !20
  %151 = load double, ptr %16, align 8, !tbaa !20
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  %153 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %152, i32 0, i32 0
  %154 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %153, i32 0, i32 4
  %155 = load ptr, ptr %154, align 8, !tbaa !19
  %156 = load i64, ptr %10, align 8, !tbaa !18
  %157 = getelementptr inbounds double, ptr %155, i64 %156
  %158 = load double, ptr %157, align 8, !tbaa !20
  %159 = call double @llvm.fmuladd.f64(double %151, double %158, double %150)
  %160 = load ptr, ptr %7, align 8, !tbaa !5
  %161 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %160, i32 0, i32 4
  %162 = load ptr, ptr %161, align 8, !tbaa !19
  %163 = load i64, ptr %13, align 8, !tbaa !18
  %164 = getelementptr inbounds double, ptr %162, i64 %163
  store double %159, ptr %164, align 8, !tbaa !20
  br label %165

165:                                              ; preds = %137
  %166 = load i64, ptr %10, align 8, !tbaa !18
  %167 = add nsw i64 %166, 1
  store i64 %167, ptr %10, align 8, !tbaa !18
  br label %132, !llvm.loop !25

168:                                              ; preds = %132
  br label %169

169:                                              ; preds = %168
  %170 = load i64, ptr %9, align 8, !tbaa !18
  %171 = add nsw i64 %170, 1
  store i64 %171, ptr %9, align 8, !tbaa !18
  br label %104, !llvm.loop !26

172:                                              ; preds = %104
  store i32 1, ptr %24, align 4
  br label %304

173:                                              ; preds = %68
  %174 = load ptr, ptr %5, align 8, !tbaa !5
  %175 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %174, i32 0, i32 5
  %176 = load i64, ptr %175, align 8, !tbaa !9
  %177 = icmp eq i64 %176, 2
  br i1 %177, label %178, label %303

178:                                              ; preds = %173
  %179 = load ptr, ptr %5, align 8, !tbaa !5
  %180 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %179, i32 0, i32 6
  %181 = load i64, ptr %180, align 8, !tbaa !16
  %182 = load ptr, ptr %5, align 8, !tbaa !5
  %183 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %182, i32 0, i32 7
  %184 = load i64, ptr %183, align 8, !tbaa !17
  %185 = icmp eq i64 %181, %184
  %186 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %185, ptr noundef @.str.177, ptr noundef %186)
  store i64 0, ptr %9, align 8, !tbaa !18
  br label %187

187:                                              ; preds = %298, %178
  %188 = load i64, ptr %9, align 8, !tbaa !18
  %189 = load i64, ptr %18, align 8, !tbaa !18
  %190 = sub nsw i64 %189, 1
  %191 = icmp sle i64 %188, %190
  br i1 %191, label %192, label %301

192:                                              ; preds = %187
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  %194 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %193, i32 0, i32 2
  %195 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %194, i32 0, i32 4
  %196 = load ptr, ptr %195, align 8, !tbaa !19
  %197 = load i64, ptr %9, align 8, !tbaa !18
  %198 = getelementptr inbounds i64, ptr %196, i64 %197
  %199 = load i64, ptr %198, align 8, !tbaa !18
  store i64 %199, ptr %20, align 8, !tbaa !18
  %200 = load ptr, ptr %5, align 8, !tbaa !5
  %201 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %200, i32 0, i32 2
  %202 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %201, i32 0, i32 4
  %203 = load ptr, ptr %202, align 8, !tbaa !19
  %204 = load i64, ptr %9, align 8, !tbaa !18
  %205 = add nsw i64 %204, 1
  %206 = getelementptr inbounds i64, ptr %203, i64 %205
  %207 = load i64, ptr %206, align 8, !tbaa !18
  store i64 %207, ptr %21, align 8, !tbaa !18
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %208, i32 0, i32 3
  %210 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %209, i32 0, i32 4
  %211 = load ptr, ptr %210, align 8, !tbaa !19
  %212 = load i64, ptr %9, align 8, !tbaa !18
  %213 = getelementptr inbounds i64, ptr %211, i64 %212
  %214 = load i64, ptr %213, align 8, !tbaa !18
  store i64 %214, ptr %22, align 8, !tbaa !18
  %215 = load ptr, ptr %5, align 8, !tbaa !5
  %216 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %215, i32 0, i32 4
  %217 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %216, i32 0, i32 4
  %218 = load ptr, ptr %217, align 8, !tbaa !19
  %219 = load i64, ptr %9, align 8, !tbaa !18
  %220 = getelementptr inbounds i64, ptr %218, i64 %219
  %221 = load i64, ptr %220, align 8, !tbaa !18
  store i64 %221, ptr %23, align 8, !tbaa !18
  %222 = load i64, ptr %22, align 8, !tbaa !18
  %223 = icmp sgt i64 %222, 0
  br i1 %223, label %224, label %243

224:                                              ; preds = %192
  %225 = load i64, ptr %20, align 8, !tbaa !18
  store i64 %225, ptr %11, align 8, !tbaa !18
  %226 = load i64, ptr %9, align 8, !tbaa !18
  %227 = load i64, ptr %22, align 8, !tbaa !18
  %228 = sub nsw i64 %226, %227
  store i64 %228, ptr %14, align 8, !tbaa !18
  %229 = load ptr, ptr %6, align 8, !tbaa !5
  %230 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %229, i32 0, i32 4
  %231 = load ptr, ptr %230, align 8, !tbaa !19
  %232 = load i64, ptr %9, align 8, !tbaa !18
  %233 = getelementptr inbounds double, ptr %231, i64 %232
  %234 = load double, ptr %233, align 8, !tbaa !20
  store double %234, ptr %16, align 8, !tbaa !20
  %235 = load i64, ptr %22, align 8, !tbaa !18
  %236 = load double, ptr %16, align 8, !tbaa !20
  %237 = load ptr, ptr %5, align 8, !tbaa !5
  %238 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %237, i32 0, i32 0
  %239 = load i64, ptr %11, align 8, !tbaa !18
  %240 = load ptr, ptr %7, align 8, !tbaa !5
  %241 = load i64, ptr %14, align 8, !tbaa !18
  %242 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl6raddvxEldPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %235, double noundef %236, ptr noundef %238, i64 noundef %239, ptr noundef %240, i64 noundef %241, ptr noundef %242)
  br label %243

243:                                              ; preds = %224, %192
  %244 = load ptr, ptr %5, align 8, !tbaa !5
  %245 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %244, i32 0, i32 0
  %246 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %245, i32 0, i32 4
  %247 = load ptr, ptr %246, align 8, !tbaa !19
  %248 = load i64, ptr %20, align 8, !tbaa !18
  %249 = load i64, ptr %22, align 8, !tbaa !18
  %250 = add nsw i64 %248, %249
  %251 = getelementptr inbounds double, ptr %247, i64 %250
  %252 = load double, ptr %251, align 8, !tbaa !20
  %253 = load ptr, ptr %6, align 8, !tbaa !5
  %254 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %253, i32 0, i32 4
  %255 = load ptr, ptr %254, align 8, !tbaa !19
  %256 = load i64, ptr %9, align 8, !tbaa !18
  %257 = getelementptr inbounds double, ptr %255, i64 %256
  %258 = load double, ptr %257, align 8, !tbaa !20
  %259 = fmul double %252, %258
  store double %259, ptr %16, align 8, !tbaa !20
  %260 = load i64, ptr %23, align 8, !tbaa !18
  %261 = icmp sgt i64 %260, 0
  br i1 %261, label %262, label %291

262:                                              ; preds = %243
  %263 = load i64, ptr %21, align 8, !tbaa !18
  %264 = load i64, ptr %23, align 8, !tbaa !18
  %265 = sub nsw i64 %263, %264
  store i64 %265, ptr %11, align 8, !tbaa !18
  %266 = load i64, ptr %21, align 8, !tbaa !18
  %267 = sub nsw i64 %266, 1
  store i64 %267, ptr %12, align 8, !tbaa !18
  %268 = load i64, ptr %9, align 8, !tbaa !18
  %269 = load i64, ptr %23, align 8, !tbaa !18
  %270 = sub nsw i64 %268, %269
  store i64 %270, ptr %14, align 8, !tbaa !18
  %271 = load i64, ptr %9, align 8, !tbaa !18
  %272 = sub nsw i64 %271, 1
  store i64 %272, ptr %15, align 8, !tbaa !18
  %273 = load ptr, ptr %5, align 8, !tbaa !5
  %274 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %273, i32 0, i32 0
  %275 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %274, i32 0, i32 4
  %276 = load ptr, ptr %275, align 8, !tbaa !19
  %277 = load i64, ptr %11, align 8, !tbaa !18
  %278 = getelementptr inbounds double, ptr %276, i64 %277
  %279 = load ptr, ptr %6, align 8, !tbaa !5
  %280 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %279, i32 0, i32 4
  %281 = load ptr, ptr %280, align 8, !tbaa !19
  %282 = load i64, ptr %14, align 8, !tbaa !18
  %283 = getelementptr inbounds double, ptr %281, i64 %282
  %284 = load i64, ptr %11, align 8, !tbaa !18
  %285 = load i64, ptr %12, align 8, !tbaa !18
  %286 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %284, i64 noundef %285)
  %287 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %278, i64 noundef 1, ptr noundef %283, i64 noundef 1, i64 noundef %286)
  store double %287, ptr %17, align 8, !tbaa !20
  %288 = load double, ptr %16, align 8, !tbaa !20
  %289 = load double, ptr %17, align 8, !tbaa !20
  %290 = fadd double %288, %289
  store double %290, ptr %16, align 8, !tbaa !20
  br label %291

291:                                              ; preds = %262, %243
  %292 = load double, ptr %16, align 8, !tbaa !20
  %293 = load ptr, ptr %7, align 8, !tbaa !5
  %294 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %293, i32 0, i32 4
  %295 = load ptr, ptr %294, align 8, !tbaa !19
  %296 = load i64, ptr %9, align 8, !tbaa !18
  %297 = getelementptr inbounds double, ptr %295, i64 %296
  store double %292, ptr %297, align 8, !tbaa !20
  br label %298

298:                                              ; preds = %291
  %299 = load i64, ptr %9, align 8, !tbaa !18
  %300 = add nsw i64 %299, 1
  store i64 %300, ptr %9, align 8, !tbaa !18
  br label %187, !llvm.loop !27

301:                                              ; preds = %187
  %302 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl8touchintEPlPNS_8ae_stateE(ptr noundef %15, ptr noundef %302)
  store i32 1, ptr %24, align 4
  br label %304

303:                                              ; preds = %173
  store i32 0, ptr %24, align 4
  br label %304

304:                                              ; preds = %303, %301, %172, %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %305 = load i32, ptr %24, align 4
  switch i32 %305, label %307 [
    i32 0, label %306
    i32 1, label %306
  ]

306:                                              ; preds = %304, %304
  ret void

307:                                              ; preds = %304
  unreachable
}

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

declare void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #1

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

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

declare noundef zeroext i1 @_ZN11alglib_impl16sparsegemvcrsmklEllldPKNS_9ae_vectorES2_S2_S2_ldPS0_lPNS_8ae_stateE(i64 noundef, i64 noundef, i64 noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, double noundef, ptr noundef, i64 noundef, ptr noundef) #1

declare void @_ZN11alglib_impl6raddvxEldPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef, double noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef) #1

declare void @_ZN11alglib_impl8touchintEPlPNS_8ae_stateE(ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !12, i64 320}
!10 = !{!"_ZTSN11alglib_impl12sparsematrixE", !11, i64 0, !11, i64 64, !11, i64 128, !11, i64 192, !11, i64 256, !12, i64 320, !12, i64 328, !12, i64 336, !12, i64 344, !12, i64 352, !12, i64 360}
!11 = !{!"_ZTSN11alglib_impl9ae_vectorE", !12, i64 0, !12, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!12 = !{!"long", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!11, !12, i64 0}
!16 = !{!10, !12, i64 328}
!17 = !{!10, !12, i64 336}
!18 = !{!12, !12, i64 0}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"double", !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!10, !12, i64 352}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}
!27 = distinct !{!27, !23}


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

@.str.177 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.178 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.179 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.180 = external hidden unnamed_addr constant [134 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl9sparsemtvEPKNS_12sparsematrixEPKNS_9ae_vectorEPS3_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #2 {
  %5 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %6 = getelementptr inbounds i8, ptr %0, i64 320
  %7 = load i64, ptr %6, align 8, !tbaa !5
  %8 = add i64 %7, -1
  %spec.select = icmp ult i64 %8, 2
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %spec.select, ptr noundef nonnull @.str.178, ptr noundef %3)
  %9 = load i64, ptr %1, align 8, !tbaa !14
  %10 = getelementptr inbounds i8, ptr %0, i64 328
  %11 = load i64, ptr %10, align 8, !tbaa !15
  %12 = icmp sge i64 %9, %11
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.179, ptr noundef %3)
  %13 = getelementptr inbounds i8, ptr %0, i64 336
  %14 = load i64, ptr %13, align 8, !tbaa !16
  %15 = load i64, ptr %10, align 8, !tbaa !15
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %2, i64 noundef %14, ptr noundef %3)
  %.not.not113 = icmp sgt i64 %14, 0
  br i1 %.not.not113, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %4
  %16 = getelementptr inbounds i8, ptr %2, i64 56
  %xtraiter = and i64 %14, 3
  %17 = icmp ult i64 %14, 4
  br i1 %17, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %14, 9223372036854775804
  br label %18

18:                                               ; preds = %18, %.lr.ph.new
  %.0114 = phi i64 [ 0, %.lr.ph.new ], [ %30, %18 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %18 ]
  %19 = load ptr, ptr %16, align 8, !tbaa !17
  %20 = getelementptr inbounds double, ptr %19, i64 %.0114
  store double 0.000000e+00, ptr %20, align 8, !tbaa !18
  %21 = or disjoint i64 %.0114, 1
  %22 = load ptr, ptr %16, align 8, !tbaa !17
  %23 = getelementptr inbounds double, ptr %22, i64 %21
  store double 0.000000e+00, ptr %23, align 8, !tbaa !18
  %24 = or disjoint i64 %.0114, 2
  %25 = load ptr, ptr %16, align 8, !tbaa !17
  %26 = getelementptr inbounds double, ptr %25, i64 %24
  store double 0.000000e+00, ptr %26, align 8, !tbaa !18
  %27 = or disjoint i64 %.0114, 3
  %28 = load ptr, ptr %16, align 8, !tbaa !17
  %29 = getelementptr inbounds double, ptr %28, i64 %27
  store double 0.000000e+00, ptr %29, align 8, !tbaa !18
  %30 = add nuw nsw i64 %.0114, 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_edge.loopexit.unr-lcssa, label %18, !llvm.loop !20

._crit_edge.loopexit.unr-lcssa:                   ; preds = %18, %.lr.ph
  %.0114.unr = phi i64 [ 0, %.lr.ph ], [ %30, %18 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader
  %.0114.epil = phi i64 [ %33, %.epil.preheader ], [ %.0114.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %31 = load ptr, ptr %16, align 8, !tbaa !17
  %32 = getelementptr inbounds double, ptr %31, i64 %.0114.epil
  store double 0.000000e+00, ptr %32, align 8, !tbaa !18
  %33 = add nuw nsw i64 %.0114.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_edge, label %.epil.preheader, !llvm.loop !22

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %4
  %34 = load i64, ptr %6, align 8, !tbaa !5
  switch i64 %34, label %.loopexit112 [
    i64 1, label %35
    i64 2, label %97
  ]

35:                                               ; preds = %._crit_edge
  %36 = getelementptr inbounds i8, ptr %0, i64 352
  %37 = load i64, ptr %36, align 8, !tbaa !24
  %38 = getelementptr inbounds i8, ptr %0, i64 128
  %39 = getelementptr inbounds i8, ptr %0, i64 184
  %40 = load ptr, ptr %39, align 8, !tbaa !17
  %41 = getelementptr inbounds i64, ptr %40, i64 %15
  %42 = load i64, ptr %41, align 8, !tbaa !25
  %43 = icmp eq i64 %37, %42
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %43, ptr noundef nonnull @.str.180, ptr noundef %3)
  %44 = load i64, ptr %10, align 8, !tbaa !15
  %45 = load i64, ptr %13, align 8, !tbaa !16
  %46 = getelementptr inbounds i8, ptr %0, i64 64
  %47 = tail call noundef zeroext i1 @_ZN11alglib_impl16sparsegemvcrsmklEllldPKNS_9ae_vectorES2_S2_S2_ldPS0_lPNS_8ae_stateE(i64 noundef 1, i64 noundef %44, i64 noundef %45, double noundef 1.000000e+00, ptr noundef nonnull %0, ptr noundef nonnull %46, ptr noundef nonnull %38, ptr noundef nonnull %1, i64 noundef 0, double noundef 0.000000e+00, ptr noundef %2, i64 noundef 0, ptr noundef %3)
  %.not.not110124 = icmp slt i64 %15, 1
  %or.cond.not = select i1 %47, i1 true, i1 %.not.not110124
  br i1 %or.cond.not, label %.loopexit112, label %.lr.ph126

.lr.ph126:                                        ; preds = %35
  %48 = getelementptr inbounds i8, ptr %1, i64 56
  %49 = getelementptr inbounds i8, ptr %0, i64 120
  %50 = getelementptr inbounds i8, ptr %2, i64 56
  %51 = getelementptr inbounds i8, ptr %0, i64 56
  br label %52

.loopexit:                                        ; preds = %.lr.ph123.prol.loopexit, %.lr.ph123, %52
  %exitcond129.not = icmp eq i64 %56, %15
  br i1 %exitcond129.not, label %.loopexit112, label %52, !llvm.loop !26

52:                                               ; preds = %.lr.ph126, %.loopexit
  %.1125 = phi i64 [ 0, %.lr.ph126 ], [ %56, %.loopexit ]
  %53 = load ptr, ptr %39, align 8, !tbaa !17
  %54 = getelementptr inbounds i64, ptr %53, i64 %.1125
  %55 = load i64, ptr %54, align 8, !tbaa !25
  %56 = add nuw nsw i64 %.1125, 1
  %57 = getelementptr inbounds i64, ptr %53, i64 %56
  %58 = load i64, ptr %57, align 8, !tbaa !25
  %59 = load ptr, ptr %48, align 8, !tbaa !17
  %60 = getelementptr inbounds double, ptr %59, i64 %.1125
  %61 = load double, ptr %60, align 8, !tbaa !18
  %.not.not111120 = icmp slt i64 %55, %58
  br i1 %.not.not111120, label %.lr.ph123.preheader, label %.loopexit

.lr.ph123.preheader:                              ; preds = %52
  %62 = sub i64 %58, %55
  %.neg = add i64 %55, 1
  %xtraiter130 = and i64 %62, 1
  %lcmp.mod131.not = icmp eq i64 %xtraiter130, 0
  br i1 %lcmp.mod131.not, label %.lr.ph123.prol.loopexit, label %.lr.ph123.prol

.lr.ph123.prol:                                   ; preds = %.lr.ph123.preheader
  %63 = load ptr, ptr %49, align 8, !tbaa !17
  %64 = getelementptr inbounds i64, ptr %63, i64 %55
  %65 = load i64, ptr %64, align 8, !tbaa !25
  %66 = load ptr, ptr %50, align 8, !tbaa !17
  %67 = getelementptr inbounds double, ptr %66, i64 %65
  %68 = load double, ptr %67, align 8, !tbaa !18
  %69 = load ptr, ptr %51, align 8, !tbaa !17
  %70 = getelementptr inbounds double, ptr %69, i64 %55
  %71 = load double, ptr %70, align 8, !tbaa !18
  %72 = tail call double @llvm.fmuladd.f64(double %61, double %71, double %68)
  store double %72, ptr %67, align 8, !tbaa !18
  %73 = add nsw i64 %55, 1
  br label %.lr.ph123.prol.loopexit

.lr.ph123.prol.loopexit:                          ; preds = %.lr.ph123.prol, %.lr.ph123.preheader
  %.0102121.unr = phi i64 [ %55, %.lr.ph123.preheader ], [ %73, %.lr.ph123.prol ]
  %74 = icmp eq i64 %58, %.neg
  br i1 %74, label %.loopexit, label %.lr.ph123

.lr.ph123:                                        ; preds = %.lr.ph123.prol.loopexit, %.lr.ph123
  %.0102121 = phi i64 [ %96, %.lr.ph123 ], [ %.0102121.unr, %.lr.ph123.prol.loopexit ]
  %75 = load ptr, ptr %49, align 8, !tbaa !17
  %76 = getelementptr inbounds i64, ptr %75, i64 %.0102121
  %77 = load i64, ptr %76, align 8, !tbaa !25
  %78 = load ptr, ptr %50, align 8, !tbaa !17
  %79 = getelementptr inbounds double, ptr %78, i64 %77
  %80 = load double, ptr %79, align 8, !tbaa !18
  %81 = load ptr, ptr %51, align 8, !tbaa !17
  %82 = getelementptr inbounds double, ptr %81, i64 %.0102121
  %83 = load double, ptr %82, align 8, !tbaa !18
  %84 = tail call double @llvm.fmuladd.f64(double %61, double %83, double %80)
  store double %84, ptr %79, align 8, !tbaa !18
  %85 = add nsw i64 %.0102121, 1
  %86 = load ptr, ptr %49, align 8, !tbaa !17
  %87 = getelementptr inbounds i64, ptr %86, i64 %85
  %88 = load i64, ptr %87, align 8, !tbaa !25
  %89 = load ptr, ptr %50, align 8, !tbaa !17
  %90 = getelementptr inbounds double, ptr %89, i64 %88
  %91 = load double, ptr %90, align 8, !tbaa !18
  %92 = load ptr, ptr %51, align 8, !tbaa !17
  %93 = getelementptr inbounds double, ptr %92, i64 %85
  %94 = load double, ptr %93, align 8, !tbaa !18
  %95 = tail call double @llvm.fmuladd.f64(double %61, double %94, double %91)
  store double %95, ptr %90, align 8, !tbaa !18
  %96 = add nsw i64 %.0102121, 2
  %exitcond128.not.1 = icmp eq i64 %96, %58
  br i1 %exitcond128.not.1, label %.loopexit, label %.lr.ph123, !llvm.loop !27

97:                                               ; preds = %._crit_edge
  %98 = load i64, ptr %10, align 8, !tbaa !15
  %99 = load i64, ptr %13, align 8, !tbaa !16
  %100 = icmp eq i64 %98, %99
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %100, ptr noundef nonnull @.str.177, ptr noundef %3)
  br i1 %.not.not113, label %.lr.ph118, label %._crit_edge119

.lr.ph118:                                        ; preds = %97
  %101 = getelementptr inbounds i8, ptr %0, i64 184
  %102 = getelementptr inbounds i8, ptr %0, i64 248
  %103 = getelementptr inbounds i8, ptr %0, i64 312
  %104 = getelementptr inbounds i8, ptr %1, i64 56
  %105 = getelementptr inbounds i8, ptr %0, i64 56
  %106 = getelementptr inbounds i8, ptr %2, i64 56
  br label %107

107:                                              ; preds = %.lr.ph118, %146
  %.2116 = phi i64 [ 0, %.lr.ph118 ], [ %111, %146 ]
  %108 = load ptr, ptr %101, align 8, !tbaa !17
  %109 = getelementptr inbounds i64, ptr %108, i64 %.2116
  %110 = load i64, ptr %109, align 8, !tbaa !25
  %111 = add nuw nsw i64 %.2116, 1
  %112 = getelementptr inbounds i64, ptr %108, i64 %111
  %113 = load i64, ptr %112, align 8, !tbaa !25
  %114 = load ptr, ptr %102, align 8, !tbaa !17
  %115 = getelementptr inbounds i64, ptr %114, i64 %.2116
  %116 = load i64, ptr %115, align 8, !tbaa !25
  %117 = load ptr, ptr %103, align 8, !tbaa !17
  %118 = getelementptr inbounds i64, ptr %117, i64 %.2116
  %119 = load i64, ptr %118, align 8, !tbaa !25
  %120 = icmp sgt i64 %116, 0
  br i1 %120, label %121, label %126

121:                                              ; preds = %107
  %122 = sub nsw i64 %.2116, %116
  %123 = load ptr, ptr %104, align 8, !tbaa !17
  %124 = getelementptr inbounds double, ptr %123, i64 %.2116
  %125 = load double, ptr %124, align 8, !tbaa !18
  tail call void @_ZN11alglib_impl6raddvxEldPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %116, double noundef %125, ptr noundef nonnull %0, i64 noundef %110, ptr noundef %2, i64 noundef %122, ptr noundef %3)
  br label %126

126:                                              ; preds = %121, %107
  %127 = load ptr, ptr %105, align 8, !tbaa !17
  %128 = getelementptr double, ptr %127, i64 %110
  %129 = getelementptr double, ptr %128, i64 %116
  %130 = load double, ptr %129, align 8, !tbaa !18
  %131 = load ptr, ptr %104, align 8, !tbaa !17
  %132 = getelementptr inbounds double, ptr %131, i64 %.2116
  %133 = load double, ptr %132, align 8, !tbaa !18
  %134 = fmul double %130, %133
  %135 = icmp sgt i64 %119, 0
  br i1 %135, label %136, label %146

136:                                              ; preds = %126
  %137 = sub nsw i64 %113, %119
  %138 = add nsw i64 %113, -1
  %139 = sub nsw i64 %.2116, %119
  %140 = add nsw i64 %.2116, -1
  store i64 %140, ptr %5, align 8, !tbaa !25
  %141 = getelementptr inbounds double, ptr %127, i64 %137
  %142 = getelementptr inbounds double, ptr %131, i64 %139
  %143 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %137, i64 noundef %138)
  %144 = tail call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %141, i64 noundef 1, ptr noundef %142, i64 noundef 1, i64 noundef %143)
  %145 = fadd double %134, %144
  br label %146

146:                                              ; preds = %136, %126
  %.0103 = phi double [ %145, %136 ], [ %134, %126 ]
  %147 = load ptr, ptr %106, align 8, !tbaa !17
  %148 = getelementptr inbounds double, ptr %147, i64 %.2116
  store double %.0103, ptr %148, align 8, !tbaa !18
  %exitcond127.not = icmp eq i64 %111, %14
  br i1 %exitcond127.not, label %._crit_edge119, label %107, !llvm.loop !28

._crit_edge119:                                   ; preds = %146, %97
  call void @_ZN11alglib_impl8touchintEPlPNS_8ae_stateE(ptr noundef nonnull %5, ptr noundef %3)
  br label %.loopexit112

.loopexit112:                                     ; preds = %.loopexit, %._crit_edge, %35, %._crit_edge119
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  ret void
}

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

declare void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

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

declare noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN11alglib_impl16sparsegemvcrsmklEllldPKNS_9ae_vectorES2_S2_S2_ldPS0_lPNS_8ae_stateE(i64 noundef, i64 noundef, i64 noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, double noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl6raddvxEldPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef, double noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl8touchintEPlPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #1

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


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