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

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

@.str.497 = external hidden unnamed_addr constant [62 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl24normalizesparselcinplaceEPNS_12sparsematrixElPNS_9ae_vectorES3_lbS3_bPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, i1 noundef zeroext %5, ptr noundef %6, i1 noundef zeroext %7, ptr noundef %8) #3 {
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i8, align 1
  %16 = alloca ptr, align 8
  %17 = alloca i8, align 1
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, 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
  store ptr %0, ptr %10, align 8, !tbaa !5
  store i64 %1, ptr %11, align 8, !tbaa !9
  store ptr %2, ptr %12, align 8, !tbaa !5
  store ptr %3, ptr %13, align 8, !tbaa !5
  store i64 %4, ptr %14, align 8, !tbaa !9
  %26 = zext i1 %5 to i8
  store i8 %26, ptr %15, align 1, !tbaa !11
  store ptr %6, ptr %16, align 8, !tbaa !5
  %27 = zext i1 %7 to i8
  store i8 %27, ptr %17, align 1, !tbaa !11
  store ptr %8, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %28 = load i64, ptr %11, align 8, !tbaa !9
  %29 = icmp eq i64 %28, 0
  br i1 %29, label %49, label %30

30:                                               ; preds = %9
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %31, i32 0, i32 5
  %33 = load i64, ptr %32, align 8, !tbaa !13
  %34 = icmp eq i64 %33, 1
  br i1 %34, label %35, label %47

35:                                               ; preds = %30
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %36, i32 0, i32 6
  %38 = load i64, ptr %37, align 8, !tbaa !17
  %39 = load i64, ptr %11, align 8, !tbaa !9
  %40 = icmp eq i64 %38, %39
  br i1 %40, label %41, label %47

41:                                               ; preds = %35
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %42, i32 0, i32 7
  %44 = load i64, ptr %43, align 8, !tbaa !18
  %45 = load i64, ptr %14, align 8, !tbaa !9
  %46 = icmp eq i64 %44, %45
  br label %47

47:                                               ; preds = %41, %35, %30
  %48 = phi i1 [ false, %35 ], [ false, %30 ], [ %46, %41 ]
  br label %49

49:                                               ; preds = %47, %9
  %50 = phi i1 [ true, %9 ], [ %48, %47 ]
  %51 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %50, ptr noundef @.str.497, ptr noundef %51)
  %52 = load i8, ptr %17, align 1, !tbaa !11, !range !19, !noundef !20
  %53 = trunc i8 %52 to i1
  br i1 %53, label %54, label %58

54:                                               ; preds = %49
  %55 = load i64, ptr %11, align 8, !tbaa !9
  %56 = load ptr, ptr %16, align 8, !tbaa !5
  %57 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %55, ptr noundef %56, ptr noundef %57)
  br label %58

58:                                               ; preds = %54, %49
  store double 0.000000e+00, ptr %25, align 8, !tbaa !21
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %59

59:                                               ; preds = %183, %58
  %60 = load i64, ptr %19, align 8, !tbaa !9
  %61 = load i64, ptr %11, align 8, !tbaa !9
  %62 = sub nsw i64 %61, 1
  %63 = icmp sle i64 %60, %62
  br i1 %63, label %64, label %186

64:                                               ; preds = %59
  store double 0.000000e+00, ptr %24, align 8, !tbaa !21
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %65, i32 0, i32 2
  %67 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %66, i32 0, i32 4
  %68 = load ptr, ptr %67, align 8, !tbaa !23
  %69 = load i64, ptr %19, align 8, !tbaa !9
  %70 = getelementptr inbounds i64, ptr %68, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !9
  store i64 %71, ptr %21, align 8, !tbaa !9
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %72, i32 0, i32 2
  %74 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %73, i32 0, i32 4
  %75 = load ptr, ptr %74, align 8, !tbaa !23
  %76 = load i64, ptr %19, align 8, !tbaa !9
  %77 = add nsw i64 %76, 1
  %78 = getelementptr inbounds i64, ptr %75, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !9
  %80 = sub nsw i64 %79, 1
  store i64 %80, ptr %22, align 8, !tbaa !9
  %81 = load i64, ptr %21, align 8, !tbaa !9
  store i64 %81, ptr %20, align 8, !tbaa !9
  br label %82

82:                                               ; preds = %98, %64
  %83 = load i64, ptr %20, align 8, !tbaa !9
  %84 = load i64, ptr %22, align 8, !tbaa !9
  %85 = icmp sle i64 %83, %84
  br i1 %85, label %86, label %101

86:                                               ; preds = %82
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %87, i32 0, i32 0
  %89 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %88, i32 0, i32 4
  %90 = load ptr, ptr %89, align 8, !tbaa !23
  %91 = load i64, ptr %20, align 8, !tbaa !9
  %92 = getelementptr inbounds double, ptr %90, i64 %91
  %93 = load double, ptr %92, align 8, !tbaa !21
  store double %93, ptr %23, align 8, !tbaa !21
  %94 = load double, ptr %24, align 8, !tbaa !21
  %95 = load double, ptr %23, align 8, !tbaa !21
  %96 = load double, ptr %23, align 8, !tbaa !21
  %97 = call double @llvm.fmuladd.f64(double %95, double %96, double %94)
  store double %97, ptr %24, align 8, !tbaa !21
  br label %98

98:                                               ; preds = %86
  %99 = load i64, ptr %20, align 8, !tbaa !9
  %100 = add nsw i64 %99, 1
  store i64 %100, ptr %20, align 8, !tbaa !9
  br label %82, !llvm.loop !24

101:                                              ; preds = %82
  %102 = load double, ptr %24, align 8, !tbaa !21
  %103 = load ptr, ptr %18, align 8, !tbaa !5
  %104 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %102, ptr noundef %103)
  store double %104, ptr %24, align 8, !tbaa !21
  %105 = load double, ptr %25, align 8, !tbaa !21
  %106 = load double, ptr %24, align 8, !tbaa !21
  %107 = load ptr, ptr %18, align 8, !tbaa !5
  %108 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %105, double noundef %106, ptr noundef %107)
  store double %108, ptr %25, align 8, !tbaa !21
  %109 = load i8, ptr %15, align 1, !tbaa !11, !range !19, !noundef !20
  %110 = trunc i8 %109 to i1
  br i1 %110, label %111, label %115

111:                                              ; preds = %101
  %112 = load double, ptr %24, align 8, !tbaa !21
  %113 = load ptr, ptr %18, align 8, !tbaa !5
  %114 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %112, double noundef 1.000000e+00, ptr noundef %113)
  store double %114, ptr %24, align 8, !tbaa !21
  br label %115

115:                                              ; preds = %111, %101
  %116 = load i8, ptr %17, align 1, !tbaa !11, !range !19, !noundef !20
  %117 = trunc i8 %116 to i1
  br i1 %117, label %118, label %125

118:                                              ; preds = %115
  %119 = load double, ptr %24, align 8, !tbaa !21
  %120 = load ptr, ptr %16, align 8, !tbaa !5
  %121 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %120, i32 0, i32 4
  %122 = load ptr, ptr %121, align 8, !tbaa !23
  %123 = load i64, ptr %19, align 8, !tbaa !9
  %124 = getelementptr inbounds double, ptr %122, i64 %123
  store double %119, ptr %124, align 8, !tbaa !21
  br label %125

125:                                              ; preds = %118, %115
  %126 = load double, ptr %24, align 8, !tbaa !21
  %127 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %126, double noundef 0.000000e+00)
  br i1 %127, label %128, label %182

128:                                              ; preds = %125
  %129 = load double, ptr %24, align 8, !tbaa !21
  %130 = fdiv double 1.000000e+00, %129
  store double %130, ptr %24, align 8, !tbaa !21
  %131 = load i64, ptr %21, align 8, !tbaa !9
  store i64 %131, ptr %20, align 8, !tbaa !9
  br label %132

132:                                              ; preds = %152, %128
  %133 = load i64, ptr %20, align 8, !tbaa !9
  %134 = load i64, ptr %22, align 8, !tbaa !9
  %135 = icmp sle i64 %133, %134
  br i1 %135, label %136, label %155

136:                                              ; preds = %132
  %137 = load ptr, ptr %10, align 8, !tbaa !5
  %138 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %137, i32 0, i32 0
  %139 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %138, i32 0, i32 4
  %140 = load ptr, ptr %139, align 8, !tbaa !23
  %141 = load i64, ptr %20, align 8, !tbaa !9
  %142 = getelementptr inbounds double, ptr %140, i64 %141
  %143 = load double, ptr %142, align 8, !tbaa !21
  %144 = load double, ptr %24, align 8, !tbaa !21
  %145 = fmul double %143, %144
  %146 = load ptr, ptr %10, align 8, !tbaa !5
  %147 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %146, i32 0, i32 0
  %148 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %147, i32 0, i32 4
  %149 = load ptr, ptr %148, align 8, !tbaa !23
  %150 = load i64, ptr %20, align 8, !tbaa !9
  %151 = getelementptr inbounds double, ptr %149, i64 %150
  store double %145, ptr %151, align 8, !tbaa !21
  br label %152

152:                                              ; preds = %136
  %153 = load i64, ptr %20, align 8, !tbaa !9
  %154 = add nsw i64 %153, 1
  store i64 %154, ptr %20, align 8, !tbaa !9
  br label %132, !llvm.loop !26

155:                                              ; preds = %132
  %156 = load ptr, ptr %12, align 8, !tbaa !5
  %157 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %156, i32 0, i32 4
  %158 = load ptr, ptr %157, align 8, !tbaa !23
  %159 = load i64, ptr %19, align 8, !tbaa !9
  %160 = getelementptr inbounds double, ptr %158, i64 %159
  %161 = load double, ptr %160, align 8, !tbaa !21
  %162 = load double, ptr %24, align 8, !tbaa !21
  %163 = fmul double %161, %162
  %164 = load ptr, ptr %12, align 8, !tbaa !5
  %165 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %164, i32 0, i32 4
  %166 = load ptr, ptr %165, align 8, !tbaa !23
  %167 = load i64, ptr %19, align 8, !tbaa !9
  %168 = getelementptr inbounds double, ptr %166, i64 %167
  store double %163, ptr %168, align 8, !tbaa !21
  %169 = load ptr, ptr %13, align 8, !tbaa !5
  %170 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %169, i32 0, i32 4
  %171 = load ptr, ptr %170, align 8, !tbaa !23
  %172 = load i64, ptr %19, align 8, !tbaa !9
  %173 = getelementptr inbounds double, ptr %171, i64 %172
  %174 = load double, ptr %173, align 8, !tbaa !21
  %175 = load double, ptr %24, align 8, !tbaa !21
  %176 = fmul double %174, %175
  %177 = load ptr, ptr %13, align 8, !tbaa !5
  %178 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %177, i32 0, i32 4
  %179 = load ptr, ptr %178, align 8, !tbaa !23
  %180 = load i64, ptr %19, align 8, !tbaa !9
  %181 = getelementptr inbounds double, ptr %179, i64 %180
  store double %176, ptr %181, align 8, !tbaa !21
  br label %182

182:                                              ; preds = %155, %125
  br label %183

183:                                              ; preds = %182
  %184 = load i64, ptr %19, align 8, !tbaa !9
  %185 = add nsw i64 %184, 1
  store i64 %185, ptr %19, align 8, !tbaa !9
  br label %59, !llvm.loop !27

186:                                              ; preds = %59
  %187 = load i8, ptr %15, align 1, !tbaa !11, !range !19, !noundef !20
  %188 = trunc i8 %187 to i1
  br i1 %188, label %189, label %338

189:                                              ; preds = %186
  store double 0.000000e+00, ptr %25, align 8, !tbaa !21
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %190

190:                                              ; preds = %240, %189
  %191 = load i64, ptr %19, align 8, !tbaa !9
  %192 = load i64, ptr %11, align 8, !tbaa !9
  %193 = sub nsw i64 %192, 1
  %194 = icmp sle i64 %191, %193
  br i1 %194, label %195, label %243

195:                                              ; preds = %190
  store double 0.000000e+00, ptr %24, align 8, !tbaa !21
  %196 = load ptr, ptr %10, align 8, !tbaa !5
  %197 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %196, i32 0, i32 2
  %198 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %197, i32 0, i32 4
  %199 = load ptr, ptr %198, align 8, !tbaa !23
  %200 = load i64, ptr %19, align 8, !tbaa !9
  %201 = getelementptr inbounds i64, ptr %199, i64 %200
  %202 = load i64, ptr %201, align 8, !tbaa !9
  store i64 %202, ptr %21, align 8, !tbaa !9
  %203 = load ptr, ptr %10, align 8, !tbaa !5
  %204 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %203, i32 0, i32 2
  %205 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %204, i32 0, i32 4
  %206 = load ptr, ptr %205, align 8, !tbaa !23
  %207 = load i64, ptr %19, align 8, !tbaa !9
  %208 = add nsw i64 %207, 1
  %209 = getelementptr inbounds i64, ptr %206, i64 %208
  %210 = load i64, ptr %209, align 8, !tbaa !9
  %211 = sub nsw i64 %210, 1
  store i64 %211, ptr %22, align 8, !tbaa !9
  %212 = load i64, ptr %21, align 8, !tbaa !9
  store i64 %212, ptr %20, align 8, !tbaa !9
  br label %213

213:                                              ; preds = %229, %195
  %214 = load i64, ptr %20, align 8, !tbaa !9
  %215 = load i64, ptr %22, align 8, !tbaa !9
  %216 = icmp sle i64 %214, %215
  br i1 %216, label %217, label %232

217:                                              ; preds = %213
  %218 = load ptr, ptr %10, align 8, !tbaa !5
  %219 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %218, i32 0, i32 0
  %220 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %219, i32 0, i32 4
  %221 = load ptr, ptr %220, align 8, !tbaa !23
  %222 = load i64, ptr %20, align 8, !tbaa !9
  %223 = getelementptr inbounds double, ptr %221, i64 %222
  %224 = load double, ptr %223, align 8, !tbaa !21
  store double %224, ptr %23, align 8, !tbaa !21
  %225 = load double, ptr %24, align 8, !tbaa !21
  %226 = load double, ptr %23, align 8, !tbaa !21
  %227 = load double, ptr %23, align 8, !tbaa !21
  %228 = call double @llvm.fmuladd.f64(double %226, double %227, double %225)
  store double %228, ptr %24, align 8, !tbaa !21
  br label %229

229:                                              ; preds = %217
  %230 = load i64, ptr %20, align 8, !tbaa !9
  %231 = add nsw i64 %230, 1
  store i64 %231, ptr %20, align 8, !tbaa !9
  br label %213, !llvm.loop !28

232:                                              ; preds = %213
  %233 = load double, ptr %24, align 8, !tbaa !21
  %234 = load ptr, ptr %18, align 8, !tbaa !5
  %235 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %233, ptr noundef %234)
  store double %235, ptr %24, align 8, !tbaa !21
  %236 = load double, ptr %25, align 8, !tbaa !21
  %237 = load double, ptr %24, align 8, !tbaa !21
  %238 = load ptr, ptr %18, align 8, !tbaa !5
  %239 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %236, double noundef %237, ptr noundef %238)
  store double %239, ptr %25, align 8, !tbaa !21
  br label %240

240:                                              ; preds = %232
  %241 = load i64, ptr %19, align 8, !tbaa !9
  %242 = add nsw i64 %241, 1
  store i64 %242, ptr %19, align 8, !tbaa !9
  br label %190, !llvm.loop !29

243:                                              ; preds = %190
  %244 = load double, ptr %25, align 8, !tbaa !21
  %245 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %244, double noundef 1.000000e+00)
  br i1 %245, label %246, label %337

246:                                              ; preds = %243
  %247 = load double, ptr %25, align 8, !tbaa !21
  %248 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %247, double noundef 0.000000e+00)
  br i1 %248, label %249, label %337

249:                                              ; preds = %246
  %250 = load i8, ptr %17, align 1, !tbaa !11, !range !19, !noundef !20
  %251 = trunc i8 %250 to i1
  br i1 %251, label %252, label %257

252:                                              ; preds = %249
  %253 = load i64, ptr %11, align 8, !tbaa !9
  %254 = load double, ptr %25, align 8, !tbaa !21
  %255 = load ptr, ptr %16, align 8, !tbaa !5
  %256 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl5rmulvEldPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %253, double noundef %254, ptr noundef %255, ptr noundef %256)
  br label %257

257:                                              ; preds = %252, %249
  %258 = load double, ptr %25, align 8, !tbaa !21
  %259 = fdiv double 1.000000e+00, %258
  store double %259, ptr %24, align 8, !tbaa !21
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %260

260:                                              ; preds = %333, %257
  %261 = load i64, ptr %19, align 8, !tbaa !9
  %262 = load i64, ptr %11, align 8, !tbaa !9
  %263 = sub nsw i64 %262, 1
  %264 = icmp sle i64 %261, %263
  br i1 %264, label %265, label %336

265:                                              ; preds = %260
  %266 = load ptr, ptr %10, align 8, !tbaa !5
  %267 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %266, i32 0, i32 2
  %268 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %267, i32 0, i32 4
  %269 = load ptr, ptr %268, align 8, !tbaa !23
  %270 = load i64, ptr %19, align 8, !tbaa !9
  %271 = getelementptr inbounds i64, ptr %269, i64 %270
  %272 = load i64, ptr %271, align 8, !tbaa !9
  store i64 %272, ptr %21, align 8, !tbaa !9
  %273 = load ptr, ptr %10, align 8, !tbaa !5
  %274 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %273, i32 0, i32 2
  %275 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %274, i32 0, i32 4
  %276 = load ptr, ptr %275, align 8, !tbaa !23
  %277 = load i64, ptr %19, align 8, !tbaa !9
  %278 = add nsw i64 %277, 1
  %279 = getelementptr inbounds i64, ptr %276, i64 %278
  %280 = load i64, ptr %279, align 8, !tbaa !9
  %281 = sub nsw i64 %280, 1
  store i64 %281, ptr %22, align 8, !tbaa !9
  %282 = load i64, ptr %21, align 8, !tbaa !9
  store i64 %282, ptr %20, align 8, !tbaa !9
  br label %283

283:                                              ; preds = %303, %265
  %284 = load i64, ptr %20, align 8, !tbaa !9
  %285 = load i64, ptr %22, align 8, !tbaa !9
  %286 = icmp sle i64 %284, %285
  br i1 %286, label %287, label %306

287:                                              ; preds = %283
  %288 = load ptr, ptr %10, align 8, !tbaa !5
  %289 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %288, i32 0, i32 0
  %290 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %289, i32 0, i32 4
  %291 = load ptr, ptr %290, align 8, !tbaa !23
  %292 = load i64, ptr %20, align 8, !tbaa !9
  %293 = getelementptr inbounds double, ptr %291, i64 %292
  %294 = load double, ptr %293, align 8, !tbaa !21
  %295 = load double, ptr %24, align 8, !tbaa !21
  %296 = fmul double %294, %295
  %297 = load ptr, ptr %10, align 8, !tbaa !5
  %298 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %297, i32 0, i32 0
  %299 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %298, i32 0, i32 4
  %300 = load ptr, ptr %299, align 8, !tbaa !23
  %301 = load i64, ptr %20, align 8, !tbaa !9
  %302 = getelementptr inbounds double, ptr %300, i64 %301
  store double %296, ptr %302, align 8, !tbaa !21
  br label %303

303:                                              ; preds = %287
  %304 = load i64, ptr %20, align 8, !tbaa !9
  %305 = add nsw i64 %304, 1
  store i64 %305, ptr %20, align 8, !tbaa !9
  br label %283, !llvm.loop !30

306:                                              ; preds = %283
  %307 = load ptr, ptr %12, align 8, !tbaa !5
  %308 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %307, i32 0, i32 4
  %309 = load ptr, ptr %308, align 8, !tbaa !23
  %310 = load i64, ptr %19, align 8, !tbaa !9
  %311 = getelementptr inbounds double, ptr %309, i64 %310
  %312 = load double, ptr %311, align 8, !tbaa !21
  %313 = load double, ptr %24, align 8, !tbaa !21
  %314 = fmul double %312, %313
  %315 = load ptr, ptr %12, align 8, !tbaa !5
  %316 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %315, i32 0, i32 4
  %317 = load ptr, ptr %316, align 8, !tbaa !23
  %318 = load i64, ptr %19, align 8, !tbaa !9
  %319 = getelementptr inbounds double, ptr %317, i64 %318
  store double %314, ptr %319, align 8, !tbaa !21
  %320 = load ptr, ptr %13, align 8, !tbaa !5
  %321 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %320, i32 0, i32 4
  %322 = load ptr, ptr %321, align 8, !tbaa !23
  %323 = load i64, ptr %19, align 8, !tbaa !9
  %324 = getelementptr inbounds double, ptr %322, i64 %323
  %325 = load double, ptr %324, align 8, !tbaa !21
  %326 = load double, ptr %24, align 8, !tbaa !21
  %327 = fmul double %325, %326
  %328 = load ptr, ptr %13, align 8, !tbaa !5
  %329 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %328, i32 0, i32 4
  %330 = load ptr, ptr %329, align 8, !tbaa !23
  %331 = load i64, ptr %19, align 8, !tbaa !9
  %332 = getelementptr inbounds double, ptr %330, i64 %331
  store double %327, ptr %332, align 8, !tbaa !21
  br label %333

333:                                              ; preds = %306
  %334 = load i64, ptr %19, align 8, !tbaa !9
  %335 = add nsw i64 %334, 1
  store i64 %335, ptr %19, align 8, !tbaa !9
  br label %260, !llvm.loop !31

336:                                              ; preds = %260
  br label %337

337:                                              ; preds = %336, %246, %243
  br label %338

338:                                              ; preds = %337, %186
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  ret void
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !10, i64 320}
!14 = !{!"_ZTSN11alglib_impl12sparsematrixE", !15, i64 0, !15, i64 64, !15, i64 128, !15, i64 192, !15, i64 256, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !12, i64 16, !16, i64 24, !7, i64 56}
!16 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!14, !10, i64 328}
!18 = !{!14, !10, i64 336}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!22, !22, i64 0}
!22 = !{!"double", !7, i64 0}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !25}
!29 = distinct !{!29, !25}
!30 = distinct !{!30, !25}
!31 = distinct !{!31, !25}


; 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.497 = external hidden unnamed_addr constant [62 x i8], align 1

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

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

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

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

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

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

declare void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @_ZN11alglib_impl5rmulvEldPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, double noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl24normalizesparselcinplaceEPNS_12sparsematrixElPNS_9ae_vectorES3_lbS3_bPNS_8ae_stateE(ptr nocapture noundef readonly %0, i64 noundef %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readonly %3, i64 noundef %4, i1 noundef zeroext %5, ptr noundef %6, i1 noundef zeroext %7, ptr noundef %8) local_unnamed_addr #2 {
  %10 = icmp eq i64 %1, 0
  br i1 %10, label %23, label %11

11:                                               ; preds = %9
  %12 = getelementptr inbounds i8, ptr %0, i64 320
  %13 = load i64, ptr %12, align 8, !tbaa !5
  %14 = icmp eq i64 %13, 1
  br i1 %14, label %15, label %23

15:                                               ; preds = %11
  %16 = getelementptr inbounds i8, ptr %0, i64 328
  %17 = load i64, ptr %16, align 8, !tbaa !14
  %18 = icmp eq i64 %17, %1
  br i1 %18, label %19, label %23

19:                                               ; preds = %15
  %20 = getelementptr inbounds i8, ptr %0, i64 336
  %21 = load i64, ptr %20, align 8, !tbaa !15
  %22 = icmp eq i64 %21, %4
  br label %23

23:                                               ; preds = %11, %15, %19, %9
  %24 = phi i1 [ true, %9 ], [ false, %15 ], [ false, %11 ], [ %22, %19 ]
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %24, ptr noundef nonnull @.str.497, ptr noundef %8)
  br i1 %7, label %25, label %26

25:                                               ; preds = %23
  tail call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %1, ptr noundef %6, ptr noundef %8)
  br label %26

26:                                               ; preds = %25, %23
  %.not.not140 = icmp sgt i64 %1, 0
  br i1 %.not.not140, label %.lr.ph144, label %._crit_edge145.thread

.lr.ph144:                                        ; preds = %26
  %27 = getelementptr inbounds i8, ptr %0, i64 184
  %28 = getelementptr inbounds i8, ptr %0, i64 56
  %29 = getelementptr inbounds i8, ptr %6, i64 56
  %30 = getelementptr inbounds i8, ptr %2, i64 56
  %31 = getelementptr inbounds i8, ptr %3, i64 56
  br label %32

32:                                               ; preds = %.lr.ph144, %106
  %.0142 = phi double [ 0.000000e+00, %.lr.ph144 ], [ %59, %106 ]
  %.0120141 = phi i64 [ 0, %.lr.ph144 ], [ %36, %106 ]
  %33 = load ptr, ptr %27, align 8, !tbaa !16
  %34 = getelementptr inbounds i64, ptr %33, i64 %.0120141
  %35 = load i64, ptr %34, align 8, !tbaa !17
  %36 = add nuw nsw i64 %.0120141, 1
  %37 = getelementptr inbounds i64, ptr %33, i64 %36
  %38 = load i64, ptr %37, align 8, !tbaa !17
  %.not.not130132 = icmp slt i64 %35, %38
  br i1 %.not.not130132, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %32
  %39 = load ptr, ptr %28, align 8, !tbaa !16
  %40 = sub i64 %38, %35
  %xtraiter = and i64 %40, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.prol.loopexit, label %.prol.preheader

.prol.preheader:                                  ; preds = %.lr.ph, %.prol.preheader
  %.0115134.prol = phi double [ %43, %.prol.preheader ], [ 0.000000e+00, %.lr.ph ]
  %.0117133.prol = phi i64 [ %44, %.prol.preheader ], [ %35, %.lr.ph ]
  %prol.iter = phi i64 [ %prol.iter.next, %.prol.preheader ], [ 0, %.lr.ph ]
  %41 = getelementptr inbounds double, ptr %39, i64 %.0117133.prol
  %42 = load double, ptr %41, align 8, !tbaa !18
  %43 = tail call double @llvm.fmuladd.f64(double %42, double %42, double %.0115134.prol)
  %44 = add nsw i64 %.0117133.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.prol.loopexit, label %.prol.preheader, !llvm.loop !20

.prol.loopexit:                                   ; preds = %.prol.preheader, %.lr.ph
  %.lcssa181.unr = phi double [ poison, %.lr.ph ], [ %43, %.prol.preheader ]
  %.0115134.unr = phi double [ 0.000000e+00, %.lr.ph ], [ %43, %.prol.preheader ]
  %.0117133.unr = phi i64 [ %35, %.lr.ph ], [ %44, %.prol.preheader ]
  %45 = sub i64 %35, %38
  %46 = icmp ugt i64 %45, -4
  br i1 %46, label %._crit_edge, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.prol.loopexit
  %invariant.gep = getelementptr i8, ptr %39, i64 8
  %invariant.gep202 = getelementptr i8, ptr %39, i64 16
  %invariant.gep204 = getelementptr i8, ptr %39, i64 24
  br label %47

47:                                               ; preds = %47, %.lr.ph.new
  %.0115134 = phi double [ %.0115134.unr, %.lr.ph.new ], [ %56, %47 ]
  %.0117133 = phi i64 [ %.0117133.unr, %.lr.ph.new ], [ %57, %47 ]
  %48 = getelementptr inbounds double, ptr %39, i64 %.0117133
  %49 = load double, ptr %48, align 8, !tbaa !18
  %50 = tail call double @llvm.fmuladd.f64(double %49, double %49, double %.0115134)
  %gep = getelementptr double, ptr %invariant.gep, i64 %.0117133
  %51 = load double, ptr %gep, align 8, !tbaa !18
  %52 = tail call double @llvm.fmuladd.f64(double %51, double %51, double %50)
  %gep203 = getelementptr double, ptr %invariant.gep202, i64 %.0117133
  %53 = load double, ptr %gep203, align 8, !tbaa !18
  %54 = tail call double @llvm.fmuladd.f64(double %53, double %53, double %52)
  %gep205 = getelementptr double, ptr %invariant.gep204, i64 %.0117133
  %55 = load double, ptr %gep205, align 8, !tbaa !18
  %56 = tail call double @llvm.fmuladd.f64(double %55, double %55, double %54)
  %57 = add nsw i64 %.0117133, 4
  %exitcond.not.3 = icmp eq i64 %57, %38
  br i1 %exitcond.not.3, label %._crit_edge, label %47, !llvm.loop !22

._crit_edge:                                      ; preds = %.prol.loopexit, %47, %32
  %.0115.lcssa = phi double [ 0.000000e+00, %32 ], [ %.lcssa181.unr, %.prol.loopexit ], [ %56, %47 ]
  %58 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %.0115.lcssa, ptr noundef %8)
  %59 = tail call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.0142, double noundef %58, ptr noundef %8)
  br i1 %5, label %60, label %62

60:                                               ; preds = %._crit_edge
  %61 = tail call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %58, double noundef 1.000000e+00, ptr noundef %8)
  br label %62

62:                                               ; preds = %60, %._crit_edge
  %.1116 = phi double [ %61, %60 ], [ %58, %._crit_edge ]
  br i1 %7, label %63, label %66

63:                                               ; preds = %62
  %64 = load ptr, ptr %29, align 8, !tbaa !16
  %65 = getelementptr inbounds double, ptr %64, i64 %.0120141
  store double %.1116, ptr %65, align 8, !tbaa !18
  br label %66

66:                                               ; preds = %63, %62
  %67 = tail call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %.1116, double noundef 0.000000e+00)
  br i1 %67, label %68, label %106

68:                                               ; preds = %66
  %69 = fdiv double 1.000000e+00, %.1116
  br i1 %.not.not130132, label %.lr.ph138.preheader, label %._crit_edge139

.lr.ph138.preheader:                              ; preds = %68
  %70 = sub i64 %38, %35
  %xtraiter182 = and i64 %70, 3
  %lcmp.mod183.not = icmp eq i64 %xtraiter182, 0
  br i1 %lcmp.mod183.not, label %.lr.ph138.prol.loopexit, label %.lr.ph138.prol

.lr.ph138.prol:                                   ; preds = %.lr.ph138.preheader, %.lr.ph138.prol
  %.1118136.prol = phi i64 [ %75, %.lr.ph138.prol ], [ %35, %.lr.ph138.preheader ]
  %prol.iter184 = phi i64 [ %prol.iter184.next, %.lr.ph138.prol ], [ 0, %.lr.ph138.preheader ]
  %71 = load ptr, ptr %28, align 8, !tbaa !16
  %72 = getelementptr inbounds double, ptr %71, i64 %.1118136.prol
  %73 = load double, ptr %72, align 8, !tbaa !18
  %74 = fmul double %69, %73
  store double %74, ptr %72, align 8, !tbaa !18
  %75 = add nsw i64 %.1118136.prol, 1
  %prol.iter184.next = add i64 %prol.iter184, 1
  %prol.iter184.cmp.not = icmp eq i64 %prol.iter184.next, %xtraiter182
  br i1 %prol.iter184.cmp.not, label %.lr.ph138.prol.loopexit, label %.lr.ph138.prol, !llvm.loop !24

.lr.ph138.prol.loopexit:                          ; preds = %.lr.ph138.prol, %.lr.ph138.preheader
  %.1118136.unr = phi i64 [ %35, %.lr.ph138.preheader ], [ %75, %.lr.ph138.prol ]
  %76 = sub i64 %35, %38
  %77 = icmp ugt i64 %76, -4
  br i1 %77, label %._crit_edge139, label %.lr.ph138

.lr.ph138:                                        ; preds = %.lr.ph138.prol.loopexit, %.lr.ph138
  %.1118136 = phi i64 [ %97, %.lr.ph138 ], [ %.1118136.unr, %.lr.ph138.prol.loopexit ]
  %78 = load ptr, ptr %28, align 8, !tbaa !16
  %79 = getelementptr inbounds double, ptr %78, i64 %.1118136
  %80 = load double, ptr %79, align 8, !tbaa !18
  %81 = fmul double %69, %80
  store double %81, ptr %79, align 8, !tbaa !18
  %82 = load ptr, ptr %28, align 8, !tbaa !16
  %83 = getelementptr double, ptr %82, i64 %.1118136
  %84 = getelementptr i8, ptr %83, i64 8
  %85 = load double, ptr %84, align 8, !tbaa !18
  %86 = fmul double %69, %85
  store double %86, ptr %84, align 8, !tbaa !18
  %87 = load ptr, ptr %28, align 8, !tbaa !16
  %88 = getelementptr double, ptr %87, i64 %.1118136
  %89 = getelementptr i8, ptr %88, i64 16
  %90 = load double, ptr %89, align 8, !tbaa !18
  %91 = fmul double %69, %90
  store double %91, ptr %89, align 8, !tbaa !18
  %92 = load ptr, ptr %28, align 8, !tbaa !16
  %93 = getelementptr double, ptr %92, i64 %.1118136
  %94 = getelementptr i8, ptr %93, i64 24
  %95 = load double, ptr %94, align 8, !tbaa !18
  %96 = fmul double %69, %95
  store double %96, ptr %94, align 8, !tbaa !18
  %97 = add nsw i64 %.1118136, 4
  %exitcond170.not.3 = icmp eq i64 %97, %38
  br i1 %exitcond170.not.3, label %._crit_edge139, label %.lr.ph138, !llvm.loop !25

._crit_edge139:                                   ; preds = %.lr.ph138.prol.loopexit, %.lr.ph138, %68
  %98 = load ptr, ptr %30, align 8, !tbaa !16
  %99 = getelementptr inbounds double, ptr %98, i64 %.0120141
  %100 = load double, ptr %99, align 8, !tbaa !18
  %101 = fmul double %69, %100
  store double %101, ptr %99, align 8, !tbaa !18
  %102 = load ptr, ptr %31, align 8, !tbaa !16
  %103 = getelementptr inbounds double, ptr %102, i64 %.0120141
  %104 = load double, ptr %103, align 8, !tbaa !18
  %105 = fmul double %69, %104
  store double %105, ptr %103, align 8, !tbaa !18
  br label %106

106:                                              ; preds = %66, %._crit_edge139
  %exitcond171.not = icmp eq i64 %36, %1
  br i1 %exitcond171.not, label %._crit_edge145, label %32, !llvm.loop !26

._crit_edge145:                                   ; preds = %106
  br i1 %5, label %.preheader, label %.loopexit

._crit_edge145.thread:                            ; preds = %26
  br i1 %5, label %._crit_edge157, label %.loopexit

.preheader:                                       ; preds = %._crit_edge145
  br i1 %.not.not140, label %.lr.ph156, label %._crit_edge157

.lr.ph156:                                        ; preds = %.preheader
  %107 = getelementptr inbounds i8, ptr %0, i64 184
  %108 = getelementptr inbounds i8, ptr %0, i64 56
  br label %109

109:                                              ; preds = %.lr.ph156, %._crit_edge151
  %.1155 = phi double [ 0.000000e+00, %.lr.ph156 ], [ %136, %._crit_edge151 ]
  %.1121154 = phi i64 [ 0, %.lr.ph156 ], [ %113, %._crit_edge151 ]
  %110 = load ptr, ptr %107, align 8, !tbaa !16
  %111 = getelementptr inbounds i64, ptr %110, i64 %.1121154
  %112 = load i64, ptr %111, align 8, !tbaa !17
  %113 = add nuw nsw i64 %.1121154, 1
  %114 = getelementptr inbounds i64, ptr %110, i64 %113
  %115 = load i64, ptr %114, align 8, !tbaa !17
  %.not.not129146 = icmp slt i64 %112, %115
  br i1 %.not.not129146, label %.lr.ph150, label %._crit_edge151

.lr.ph150:                                        ; preds = %109
  %116 = load ptr, ptr %108, align 8, !tbaa !16
  %117 = sub i64 %115, %112
  %xtraiter187 = and i64 %117, 3
  %lcmp.mod188.not = icmp eq i64 %xtraiter187, 0
  br i1 %lcmp.mod188.not, label %.prol.loopexit186, label %.prol.preheader185

.prol.preheader185:                               ; preds = %.lr.ph150, %.prol.preheader185
  %.2148.prol = phi double [ %120, %.prol.preheader185 ], [ 0.000000e+00, %.lr.ph150 ]
  %.2119147.prol = phi i64 [ %121, %.prol.preheader185 ], [ %112, %.lr.ph150 ]
  %prol.iter189 = phi i64 [ %prol.iter189.next, %.prol.preheader185 ], [ 0, %.lr.ph150 ]
  %118 = getelementptr inbounds double, ptr %116, i64 %.2119147.prol
  %119 = load double, ptr %118, align 8, !tbaa !18
  %120 = tail call double @llvm.fmuladd.f64(double %119, double %119, double %.2148.prol)
  %121 = add nsw i64 %.2119147.prol, 1
  %prol.iter189.next = add i64 %prol.iter189, 1
  %prol.iter189.cmp.not = icmp eq i64 %prol.iter189.next, %xtraiter187
  br i1 %prol.iter189.cmp.not, label %.prol.loopexit186, label %.prol.preheader185, !llvm.loop !27

.prol.loopexit186:                                ; preds = %.prol.preheader185, %.lr.ph150
  %.lcssa.unr = phi double [ poison, %.lr.ph150 ], [ %120, %.prol.preheader185 ]
  %.2148.unr = phi double [ 0.000000e+00, %.lr.ph150 ], [ %120, %.prol.preheader185 ]
  %.2119147.unr = phi i64 [ %112, %.lr.ph150 ], [ %121, %.prol.preheader185 ]
  %122 = sub i64 %112, %115
  %123 = icmp ugt i64 %122, -4
  br i1 %123, label %._crit_edge151, label %.lr.ph150.new

.lr.ph150.new:                                    ; preds = %.prol.loopexit186
  %invariant.gep206 = getelementptr i8, ptr %116, i64 8
  %invariant.gep208 = getelementptr i8, ptr %116, i64 16
  %invariant.gep210 = getelementptr i8, ptr %116, i64 24
  br label %124

124:                                              ; preds = %124, %.lr.ph150.new
  %.2148 = phi double [ %.2148.unr, %.lr.ph150.new ], [ %133, %124 ]
  %.2119147 = phi i64 [ %.2119147.unr, %.lr.ph150.new ], [ %134, %124 ]
  %125 = getelementptr inbounds double, ptr %116, i64 %.2119147
  %126 = load double, ptr %125, align 8, !tbaa !18
  %127 = tail call double @llvm.fmuladd.f64(double %126, double %126, double %.2148)
  %gep207 = getelementptr double, ptr %invariant.gep206, i64 %.2119147
  %128 = load double, ptr %gep207, align 8, !tbaa !18
  %129 = tail call double @llvm.fmuladd.f64(double %128, double %128, double %127)
  %gep209 = getelementptr double, ptr %invariant.gep208, i64 %.2119147
  %130 = load double, ptr %gep209, align 8, !tbaa !18
  %131 = tail call double @llvm.fmuladd.f64(double %130, double %130, double %129)
  %gep211 = getelementptr double, ptr %invariant.gep210, i64 %.2119147
  %132 = load double, ptr %gep211, align 8, !tbaa !18
  %133 = tail call double @llvm.fmuladd.f64(double %132, double %132, double %131)
  %134 = add nsw i64 %.2119147, 4
  %exitcond172.not.3 = icmp eq i64 %134, %115
  br i1 %exitcond172.not.3, label %._crit_edge151, label %124, !llvm.loop !28

._crit_edge151:                                   ; preds = %.prol.loopexit186, %124, %109
  %.2.lcssa = phi double [ 0.000000e+00, %109 ], [ %.lcssa.unr, %.prol.loopexit186 ], [ %133, %124 ]
  %135 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %.2.lcssa, ptr noundef %8)
  %136 = tail call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.1155, double noundef %135, ptr noundef %8)
  %exitcond173.not = icmp eq i64 %113, %1
  br i1 %exitcond173.not, label %._crit_edge157, label %109, !llvm.loop !29

._crit_edge157:                                   ; preds = %._crit_edge151, %._crit_edge145.thread, %.preheader
  %.1.lcssa = phi double [ 0.000000e+00, %.preheader ], [ 0.000000e+00, %._crit_edge145.thread ], [ %136, %._crit_edge151 ]
  %137 = tail call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %.1.lcssa, double noundef 1.000000e+00)
  br i1 %137, label %138, label %.loopexit

138:                                              ; preds = %._crit_edge157
  %139 = tail call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %.1.lcssa, double noundef 0.000000e+00)
  br i1 %139, label %140, label %.loopexit

140:                                              ; preds = %138
  br i1 %7, label %141, label %142

141:                                              ; preds = %140
  tail call void @_ZN11alglib_impl5rmulvEldPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %1, double noundef %.1.lcssa, ptr noundef %6, ptr noundef %8)
  br label %142

142:                                              ; preds = %141, %140
  %143 = fdiv double 1.000000e+00, %.1.lcssa
  br i1 %.not.not140, label %.lr.ph167, label %.loopexit

.lr.ph167:                                        ; preds = %142
  %144 = getelementptr inbounds i8, ptr %0, i64 184
  %145 = getelementptr inbounds i8, ptr %0, i64 56
  %146 = getelementptr inbounds i8, ptr %2, i64 56
  %147 = getelementptr inbounds i8, ptr %3, i64 56
  br label %148

148:                                              ; preds = %.lr.ph167, %._crit_edge163
  %.2122165 = phi i64 [ 0, %.lr.ph167 ], [ %152, %._crit_edge163 ]
  %149 = load ptr, ptr %144, align 8, !tbaa !16
  %150 = getelementptr inbounds i64, ptr %149, i64 %.2122165
  %151 = load i64, ptr %150, align 8, !tbaa !17
  %152 = add nuw nsw i64 %.2122165, 1
  %153 = getelementptr inbounds i64, ptr %149, i64 %152
  %154 = load i64, ptr %153, align 8, !tbaa !17
  %.not.not128159 = icmp slt i64 %151, %154
  br i1 %.not.not128159, label %.lr.ph162.preheader, label %._crit_edge163

.lr.ph162.preheader:                              ; preds = %148
  %155 = sub i64 %154, %151
  %xtraiter190 = and i64 %155, 3
  %lcmp.mod191.not = icmp eq i64 %xtraiter190, 0
  br i1 %lcmp.mod191.not, label %.lr.ph162.prol.loopexit, label %.lr.ph162.prol

.lr.ph162.prol:                                   ; preds = %.lr.ph162.preheader, %.lr.ph162.prol
  %.3160.prol = phi i64 [ %160, %.lr.ph162.prol ], [ %151, %.lr.ph162.preheader ]
  %prol.iter192 = phi i64 [ %prol.iter192.next, %.lr.ph162.prol ], [ 0, %.lr.ph162.preheader ]
  %156 = load ptr, ptr %145, align 8, !tbaa !16
  %157 = getelementptr inbounds double, ptr %156, i64 %.3160.prol
  %158 = load double, ptr %157, align 8, !tbaa !18
  %159 = fmul double %143, %158
  store double %159, ptr %157, align 8, !tbaa !18
  %160 = add nsw i64 %.3160.prol, 1
  %prol.iter192.next = add i64 %prol.iter192, 1
  %prol.iter192.cmp.not = icmp eq i64 %prol.iter192.next, %xtraiter190
  br i1 %prol.iter192.cmp.not, label %.lr.ph162.prol.loopexit, label %.lr.ph162.prol, !llvm.loop !30

.lr.ph162.prol.loopexit:                          ; preds = %.lr.ph162.prol, %.lr.ph162.preheader
  %.3160.unr = phi i64 [ %151, %.lr.ph162.preheader ], [ %160, %.lr.ph162.prol ]
  %161 = sub i64 %151, %154
  %162 = icmp ugt i64 %161, -4
  br i1 %162, label %._crit_edge163, label %.lr.ph162

.lr.ph162:                                        ; preds = %.lr.ph162.prol.loopexit, %.lr.ph162
  %.3160 = phi i64 [ %182, %.lr.ph162 ], [ %.3160.unr, %.lr.ph162.prol.loopexit ]
  %163 = load ptr, ptr %145, align 8, !tbaa !16
  %164 = getelementptr inbounds double, ptr %163, i64 %.3160
  %165 = load double, ptr %164, align 8, !tbaa !18
  %166 = fmul double %143, %165
  store double %166, ptr %164, align 8, !tbaa !18
  %167 = load ptr, ptr %145, align 8, !tbaa !16
  %168 = getelementptr double, ptr %167, i64 %.3160
  %169 = getelementptr i8, ptr %168, i64 8
  %170 = load double, ptr %169, align 8, !tbaa !18
  %171 = fmul double %143, %170
  store double %171, ptr %169, align 8, !tbaa !18
  %172 = load ptr, ptr %145, align 8, !tbaa !16
  %173 = getelementptr double, ptr %172, i64 %.3160
  %174 = getelementptr i8, ptr %173, i64 16
  %175 = load double, ptr %174, align 8, !tbaa !18
  %176 = fmul double %143, %175
  store double %176, ptr %174, align 8, !tbaa !18
  %177 = load ptr, ptr %145, align 8, !tbaa !16
  %178 = getelementptr double, ptr %177, i64 %.3160
  %179 = getelementptr i8, ptr %178, i64 24
  %180 = load double, ptr %179, align 8, !tbaa !18
  %181 = fmul double %143, %180
  store double %181, ptr %179, align 8, !tbaa !18
  %182 = add nsw i64 %.3160, 4
  %exitcond174.not.3 = icmp eq i64 %182, %154
  br i1 %exitcond174.not.3, label %._crit_edge163, label %.lr.ph162, !llvm.loop !31

._crit_edge163:                                   ; preds = %.lr.ph162.prol.loopexit, %.lr.ph162, %148
  %183 = load ptr, ptr %146, align 8, !tbaa !16
  %184 = getelementptr inbounds double, ptr %183, i64 %.2122165
  %185 = load double, ptr %184, align 8, !tbaa !18
  %186 = fmul double %143, %185
  store double %186, ptr %184, align 8, !tbaa !18
  %187 = load ptr, ptr %147, align 8, !tbaa !16
  %188 = getelementptr inbounds double, ptr %187, i64 %.2122165
  %189 = load double, ptr %188, align 8, !tbaa !18
  %190 = fmul double %143, %189
  store double %190, ptr %188, align 8, !tbaa !18
  %exitcond175.not = icmp eq i64 %152, %1
  br i1 %exitcond175.not, label %.loopexit, label %148, !llvm.loop !32

.loopexit:                                        ; preds = %._crit_edge163, %._crit_edge145.thread, %142, %._crit_edge157, %138, %._crit_edge145
  ret void
}

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!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 = !{!6, !8, i64 328}
!15 = !{!6, !8, i64 336}
!16 = !{!9, !9, i64 0}
!17 = !{!8, !8, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !9, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.unroll.disable"}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !21}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}
!27 = distinct !{!27, !21}
!28 = distinct !{!28, !23}
!29 = distinct !{!29, !23}
!30 = distinct !{!30, !21}
!31 = distinct !{!31, !23}
!32 = distinct !{!32, !23}


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