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

@.str.501 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.502 = external hidden unnamed_addr constant [85 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_impl7ae_fabsEdPNS_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_impl8ae_fp_eqEdd(double noundef, double noundef) #1

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

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

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

31:                                               ; preds = %8
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %32, i32 0, i32 6
  %34 = load i64, ptr %33, align 8, !tbaa !17
  %35 = load i64, ptr %16, align 8, !tbaa !11
  %36 = icmp eq i64 %34, %35
  br i1 %36, label %37, label %43

37:                                               ; preds = %31
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %38, i32 0, i32 7
  %40 = load i64, ptr %39, align 8, !tbaa !18
  %41 = load i64, ptr %16, align 8, !tbaa !11
  %42 = icmp eq i64 %40, %41
  br label %43

43:                                               ; preds = %37, %31, %8
  %44 = phi i1 [ false, %31 ], [ false, %8 ], [ %42, %37 ]
  %45 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %44, ptr noundef @.str.501, ptr noundef %45)
  store double 0.000000e+00, ptr %22, align 8, !tbaa !19
  store i64 0, ptr %18, align 8, !tbaa !11
  br label %46

46:                                               ; preds = %128, %43
  %47 = load i64, ptr %18, align 8, !tbaa !11
  %48 = load i64, ptr %16, align 8, !tbaa !11
  %49 = sub nsw i64 %48, 1
  %50 = icmp sle i64 %47, %49
  br i1 %50, label %51, label %131

51:                                               ; preds = %46
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %52, i32 0, i32 3
  %54 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %53, i32 0, i32 4
  %55 = load ptr, ptr %54, align 8, !tbaa !21
  %56 = load i64, ptr %18, align 8, !tbaa !11
  %57 = getelementptr inbounds i64, ptr %55, i64 %56
  %58 = load i64, ptr %57, align 8, !tbaa !11
  %59 = add nsw i64 %58, 1
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %60, i32 0, i32 4
  %62 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %61, i32 0, i32 4
  %63 = load ptr, ptr %62, align 8, !tbaa !21
  %64 = load i64, ptr %18, align 8, !tbaa !11
  %65 = getelementptr inbounds i64, ptr %63, i64 %64
  %66 = load i64, ptr %65, align 8, !tbaa !11
  %67 = icmp eq i64 %59, %66
  %68 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %67, ptr noundef @.str.502, ptr noundef %68)
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %69, i32 0, i32 0
  %71 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %70, i32 0, i32 4
  %72 = load ptr, ptr %71, align 8, !tbaa !21
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %73, i32 0, i32 3
  %75 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %74, i32 0, i32 4
  %76 = load ptr, ptr %75, align 8, !tbaa !21
  %77 = load i64, ptr %18, align 8, !tbaa !11
  %78 = getelementptr inbounds i64, ptr %76, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !11
  %80 = getelementptr inbounds double, ptr %72, i64 %79
  %81 = load double, ptr %80, align 8, !tbaa !19
  store double %81, ptr %23, align 8, !tbaa !19
  store i64 0, ptr %19, align 8, !tbaa !11
  br label %82

82:                                               ; preds = %107, %51
  %83 = load i64, ptr %19, align 8, !tbaa !11
  %84 = load i64, ptr %14, align 8, !tbaa !11
  %85 = sub nsw i64 %84, 1
  %86 = icmp sle i64 %83, %85
  br i1 %86, label %87, label %110

87:                                               ; preds = %82
  %88 = load double, ptr %23, align 8, !tbaa !19
  %89 = load ptr, ptr %13, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %89, i32 0, i32 4
  %91 = load ptr, ptr %90, align 8, !tbaa !21
  %92 = load i64, ptr %19, align 8, !tbaa !11
  %93 = getelementptr inbounds double, ptr %91, i64 %92
  %94 = load double, ptr %93, align 8, !tbaa !19
  %95 = load ptr, ptr %12, align 8, !tbaa !5
  %96 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %95, i32 0, i32 6
  %97 = load ptr, ptr %96, align 8, !tbaa !21
  %98 = load i64, ptr %19, align 8, !tbaa !11
  %99 = getelementptr inbounds ptr, ptr %97, i64 %98
  %100 = load ptr, ptr %99, align 8, !tbaa !5
  %101 = load i64, ptr %18, align 8, !tbaa !11
  %102 = getelementptr inbounds double, ptr %100, i64 %101
  %103 = load double, ptr %102, align 8, !tbaa !19
  %104 = load ptr, ptr %17, align 8, !tbaa !5
  %105 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %103, ptr noundef %104)
  %106 = call double @llvm.fmuladd.f64(double %94, double %105, double %88)
  store double %106, ptr %23, align 8, !tbaa !19
  br label %107

107:                                              ; preds = %87
  %108 = load i64, ptr %19, align 8, !tbaa !11
  %109 = add nsw i64 %108, 1
  store i64 %109, ptr %19, align 8, !tbaa !11
  br label %82, !llvm.loop !22

110:                                              ; preds = %82
  %111 = load double, ptr %22, align 8, !tbaa !19
  %112 = load double, ptr %23, align 8, !tbaa !19
  %113 = load ptr, ptr %17, align 8, !tbaa !5
  %114 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %112, ptr noundef %113)
  %115 = load ptr, ptr %17, align 8, !tbaa !5
  %116 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %111, double noundef %114, ptr noundef %115)
  store double %116, ptr %22, align 8, !tbaa !19
  %117 = load double, ptr %22, align 8, !tbaa !19
  %118 = load ptr, ptr %15, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %118, i32 0, i32 4
  %120 = load ptr, ptr %119, align 8, !tbaa !21
  %121 = load i64, ptr %18, align 8, !tbaa !11
  %122 = getelementptr inbounds double, ptr %120, i64 %121
  %123 = load double, ptr %122, align 8, !tbaa !19
  %124 = load ptr, ptr %17, align 8, !tbaa !5
  %125 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %123, ptr noundef %124)
  %126 = load ptr, ptr %17, align 8, !tbaa !5
  %127 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %117, double noundef %125, ptr noundef %126)
  store double %127, ptr %22, align 8, !tbaa !19
  br label %128

128:                                              ; preds = %110
  %129 = load i64, ptr %18, align 8, !tbaa !11
  %130 = add nsw i64 %129, 1
  store i64 %130, ptr %18, align 8, !tbaa !11
  br label %46, !llvm.loop !24

131:                                              ; preds = %46
  %132 = load double, ptr %22, align 8, !tbaa !19
  store double %132, ptr %24, align 8, !tbaa !19
  %133 = load double, ptr %22, align 8, !tbaa !19
  %134 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %133, double noundef 0.000000e+00)
  br i1 %134, label %135, label %137

135:                                              ; preds = %131
  %136 = load double, ptr %24, align 8, !tbaa !19
  store double %136, ptr %9, align 8
  store i32 1, ptr %25, align 4
  br label %222

137:                                              ; preds = %131
  %138 = load double, ptr %22, align 8, !tbaa !19
  %139 = fdiv double 1.000000e+00, %138
  store double %139, ptr %23, align 8, !tbaa !19
  store i64 0, ptr %18, align 8, !tbaa !11
  br label %140

140:                                              ; preds = %200, %137
  %141 = load i64, ptr %18, align 8, !tbaa !11
  %142 = load i64, ptr %16, align 8, !tbaa !11
  %143 = sub nsw i64 %142, 1
  %144 = icmp sle i64 %141, %143
  br i1 %144, label %145, label %203

145:                                              ; preds = %140
  %146 = load ptr, ptr %10, align 8, !tbaa !5
  %147 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %146, i32 0, i32 2
  %148 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %147, i32 0, i32 4
  %149 = load ptr, ptr %148, align 8, !tbaa !21
  %150 = load i64, ptr %18, align 8, !tbaa !11
  %151 = getelementptr inbounds i64, ptr %149, i64 %150
  %152 = load i64, ptr %151, align 8, !tbaa !11
  store i64 %152, ptr %20, align 8, !tbaa !11
  %153 = load ptr, ptr %10, align 8, !tbaa !5
  %154 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %153, i32 0, i32 2
  %155 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %154, i32 0, i32 4
  %156 = load ptr, ptr %155, align 8, !tbaa !21
  %157 = load i64, ptr %18, align 8, !tbaa !11
  %158 = add nsw i64 %157, 1
  %159 = getelementptr inbounds i64, ptr %156, i64 %158
  %160 = load i64, ptr %159, align 8, !tbaa !11
  %161 = sub nsw i64 %160, 1
  store i64 %161, ptr %21, align 8, !tbaa !11
  %162 = load i64, ptr %20, align 8, !tbaa !11
  store i64 %162, ptr %19, align 8, !tbaa !11
  br label %163

163:                                              ; preds = %183, %145
  %164 = load i64, ptr %19, align 8, !tbaa !11
  %165 = load i64, ptr %21, align 8, !tbaa !11
  %166 = icmp sle i64 %164, %165
  br i1 %166, label %167, label %186

167:                                              ; preds = %163
  %168 = load ptr, ptr %10, align 8, !tbaa !5
  %169 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %168, i32 0, i32 0
  %170 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %169, i32 0, i32 4
  %171 = load ptr, ptr %170, align 8, !tbaa !21
  %172 = load i64, ptr %19, align 8, !tbaa !11
  %173 = getelementptr inbounds double, ptr %171, i64 %172
  %174 = load double, ptr %173, align 8, !tbaa !19
  %175 = load double, ptr %23, align 8, !tbaa !19
  %176 = fmul double %174, %175
  %177 = load ptr, ptr %10, align 8, !tbaa !5
  %178 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %177, i32 0, i32 0
  %179 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %178, i32 0, i32 4
  %180 = load ptr, ptr %179, align 8, !tbaa !21
  %181 = load i64, ptr %19, align 8, !tbaa !11
  %182 = getelementptr inbounds double, ptr %180, i64 %181
  store double %176, ptr %182, align 8, !tbaa !19
  br label %183

183:                                              ; preds = %167
  %184 = load i64, ptr %19, align 8, !tbaa !11
  %185 = add nsw i64 %184, 1
  store i64 %185, ptr %19, align 8, !tbaa !11
  br label %163, !llvm.loop !25

186:                                              ; preds = %163
  %187 = load ptr, ptr %15, align 8, !tbaa !5
  %188 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %187, i32 0, i32 4
  %189 = load ptr, ptr %188, align 8, !tbaa !21
  %190 = load i64, ptr %18, align 8, !tbaa !11
  %191 = getelementptr inbounds double, ptr %189, i64 %190
  %192 = load double, ptr %191, align 8, !tbaa !19
  %193 = load double, ptr %23, align 8, !tbaa !19
  %194 = fmul double %192, %193
  %195 = load ptr, ptr %15, align 8, !tbaa !5
  %196 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %195, i32 0, i32 4
  %197 = load ptr, ptr %196, align 8, !tbaa !21
  %198 = load i64, ptr %18, align 8, !tbaa !11
  %199 = getelementptr inbounds double, ptr %197, i64 %198
  store double %194, ptr %199, align 8, !tbaa !19
  br label %200

200:                                              ; preds = %186
  %201 = load i64, ptr %18, align 8, !tbaa !11
  %202 = add nsw i64 %201, 1
  store i64 %202, ptr %18, align 8, !tbaa !11
  br label %140, !llvm.loop !26

203:                                              ; preds = %140
  store i64 0, ptr %19, align 8, !tbaa !11
  br label %204

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

209:                                              ; preds = %204
  %210 = load i64, ptr %16, align 8, !tbaa !11
  %211 = load double, ptr %23, align 8, !tbaa !19
  %212 = load ptr, ptr %17, align 8, !tbaa !5
  %213 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %211, ptr noundef %212)
  %214 = load ptr, ptr %12, align 8, !tbaa !5
  %215 = load i64, ptr %19, align 8, !tbaa !11
  %216 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZN11alglib_impl5rmulrEldPNS_9ae_matrixElPNS_8ae_stateE(i64 noundef %210, double noundef %213, ptr noundef %214, i64 noundef %215, ptr noundef %216)
  br label %217

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

220:                                              ; preds = %204
  %221 = load double, ptr %24, align 8, !tbaa !19
  store double %221, ptr %9, align 8
  store i32 1, ptr %25, align 4
  br label %222

222:                                              ; preds = %220, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  %223 = load double, ptr %9, align 8
  ret double %223
}

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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !12, i64 320}
!14 = !{!"_ZTSN11alglib_impl12sparsematrixE", !15, i64 0, !15, i64 64, !15, i64 128, !15, i64 192, !15, i64 256, !12, i64 320, !12, i64 328, !12, i64 336, !12, i64 344, !12, i64 352, !12, i64 360}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !12, i64 0, !12, i64 8, !10, 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, !12, i64 328}
!18 = !{!14, !12, i64 336}
!19 = !{!20, !20, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = !{!7, !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!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.501 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.502 = external hidden unnamed_addr constant [85 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_impl7ae_fabsEdPNS_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_impl8ae_fp_eqEdd(double noundef, double noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN11alglib_impl24normalizesparseqpinplaceEPNS_12sparsematrixEbPNS_9ae_matrixEPNS_9ae_vectorElS5_lPNS_8ae_stateE(ptr nocapture noundef readonly %0, i1 noundef zeroext %1, ptr noundef %2, ptr nocapture noundef readonly %3, i64 noundef %4, ptr nocapture noundef readonly %5, i64 noundef %6, ptr noundef %7) local_unnamed_addr #2 {
  %9 = getelementptr inbounds i8, ptr %0, i64 320
  %10 = load i64, ptr %9, align 8, !tbaa !5
  %11 = icmp eq i64 %10, 1
  br i1 %11, label %12, label %20

12:                                               ; preds = %8
  %13 = getelementptr inbounds i8, ptr %0, i64 328
  %14 = load i64, ptr %13, align 8, !tbaa !14
  %15 = icmp eq i64 %14, %6
  br i1 %15, label %16, label %20

16:                                               ; preds = %12
  %17 = getelementptr inbounds i8, ptr %0, i64 336
  %18 = load i64, ptr %17, align 8, !tbaa !15
  %19 = icmp eq i64 %18, %6
  br label %20

20:                                               ; preds = %16, %12, %8
  %21 = phi i1 [ false, %12 ], [ false, %8 ], [ %19, %16 ]
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %21, ptr noundef nonnull @.str.501, ptr noundef %7)
  %.not.not84 = icmp sgt i64 %6, 0
  br i1 %.not.not84, label %.lr.ph88, label %._crit_edge89.thread

.lr.ph88:                                         ; preds = %20
  %22 = getelementptr inbounds i8, ptr %0, i64 248
  %23 = getelementptr inbounds i8, ptr %0, i64 312
  %24 = getelementptr inbounds i8, ptr %0, i64 56
  %.not.not8081 = icmp sgt i64 %4, 0
  %25 = getelementptr inbounds i8, ptr %3, i64 56
  %26 = getelementptr inbounds i8, ptr %2, i64 72
  %27 = getelementptr inbounds i8, ptr %5, i64 56
  br i1 %.not.not8081, label %.lr.ph.us, label %.lr.ph88.split

.lr.ph.us:                                        ; preds = %.lr.ph88, %._crit_edge.us
  %.07286.us = phi double [ %60, %._crit_edge.us ], [ 0.000000e+00, %.lr.ph88 ]
  %.07385.us = phi i64 [ %61, %._crit_edge.us ], [ 0, %.lr.ph88 ]
  %28 = load ptr, ptr %22, align 8, !tbaa !16
  %29 = getelementptr inbounds i64, ptr %28, i64 %.07385.us
  %30 = load i64, ptr %29, align 8, !tbaa !17
  %31 = add nsw i64 %30, 1
  %32 = load ptr, ptr %23, align 8, !tbaa !16
  %33 = getelementptr inbounds i64, ptr %32, i64 %.07385.us
  %34 = load i64, ptr %33, align 8, !tbaa !17
  %35 = icmp eq i64 %31, %34
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %35, ptr noundef nonnull @.str.502, ptr noundef %7)
  %36 = load ptr, ptr %24, align 8, !tbaa !16
  %37 = load ptr, ptr %22, align 8, !tbaa !16
  %38 = getelementptr inbounds i64, ptr %37, i64 %.07385.us
  %39 = load i64, ptr %38, align 8, !tbaa !17
  %40 = getelementptr inbounds double, ptr %36, i64 %39
  %41 = load double, ptr %40, align 8, !tbaa !18
  br label %42

42:                                               ; preds = %.lr.ph.us, %42
  %.07183.us = phi double [ %41, %.lr.ph.us ], [ %52, %42 ]
  %.07482.us = phi i64 [ 0, %.lr.ph.us ], [ %53, %42 ]
  %43 = load ptr, ptr %25, align 8, !tbaa !16
  %44 = getelementptr inbounds double, ptr %43, i64 %.07482.us
  %45 = load double, ptr %44, align 8, !tbaa !18
  %46 = load ptr, ptr %26, align 8, !tbaa !16
  %47 = getelementptr inbounds ptr, ptr %46, i64 %.07482.us
  %48 = load ptr, ptr %47, align 8, !tbaa !20
  %49 = getelementptr inbounds double, ptr %48, i64 %.07385.us
  %50 = load double, ptr %49, align 8, !tbaa !18
  %51 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %50, ptr noundef %7)
  %52 = tail call double @llvm.fmuladd.f64(double %45, double %51, double %.07183.us)
  %53 = add nuw nsw i64 %.07482.us, 1
  %exitcond103.not = icmp eq i64 %53, %4
  br i1 %exitcond103.not, label %._crit_edge.us, label %42, !llvm.loop !21

._crit_edge.us:                                   ; preds = %42
  %54 = tail call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %52, ptr noundef %7)
  %55 = tail call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.07286.us, double noundef %54, ptr noundef %7)
  %56 = load ptr, ptr %27, align 8, !tbaa !16
  %57 = getelementptr inbounds double, ptr %56, i64 %.07385.us
  %58 = load double, ptr %57, align 8, !tbaa !18
  %59 = tail call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %58, ptr noundef %7)
  %60 = tail call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %55, double noundef %59, ptr noundef %7)
  %61 = add nuw nsw i64 %.07385.us, 1
  %exitcond104.not = icmp eq i64 %61, %6
  br i1 %exitcond104.not, label %._crit_edge89, label %.lr.ph.us, !llvm.loop !23

.lr.ph88.split:                                   ; preds = %.lr.ph88, %.lr.ph88.split
  %.07286 = phi double [ %82, %.lr.ph88.split ], [ 0.000000e+00, %.lr.ph88 ]
  %.07385 = phi i64 [ %83, %.lr.ph88.split ], [ 0, %.lr.ph88 ]
  %62 = load ptr, ptr %22, align 8, !tbaa !16
  %63 = getelementptr inbounds i64, ptr %62, i64 %.07385
  %64 = load i64, ptr %63, align 8, !tbaa !17
  %65 = add nsw i64 %64, 1
  %66 = load ptr, ptr %23, align 8, !tbaa !16
  %67 = getelementptr inbounds i64, ptr %66, i64 %.07385
  %68 = load i64, ptr %67, align 8, !tbaa !17
  %69 = icmp eq i64 %65, %68
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %69, ptr noundef nonnull @.str.502, ptr noundef %7)
  %70 = load ptr, ptr %24, align 8, !tbaa !16
  %71 = load ptr, ptr %22, align 8, !tbaa !16
  %72 = getelementptr inbounds i64, ptr %71, i64 %.07385
  %73 = load i64, ptr %72, align 8, !tbaa !17
  %74 = getelementptr inbounds double, ptr %70, i64 %73
  %75 = load double, ptr %74, align 8, !tbaa !18
  %76 = tail call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %75, ptr noundef %7)
  %77 = tail call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.07286, double noundef %76, ptr noundef %7)
  %78 = load ptr, ptr %27, align 8, !tbaa !16
  %79 = getelementptr inbounds double, ptr %78, i64 %.07385
  %80 = load double, ptr %79, align 8, !tbaa !18
  %81 = tail call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %80, ptr noundef %7)
  %82 = tail call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %77, double noundef %81, ptr noundef %7)
  %83 = add nuw nsw i64 %.07385, 1
  %exitcond.not = icmp eq i64 %83, %6
  br i1 %exitcond.not, label %._crit_edge89, label %.lr.ph88.split, !llvm.loop !23

._crit_edge89:                                    ; preds = %.lr.ph88.split, %._crit_edge.us
  %.072.lcssa = phi double [ %60, %._crit_edge.us ], [ %82, %.lr.ph88.split ]
  %84 = tail call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %.072.lcssa, double noundef 0.000000e+00)
  br i1 %84, label %.loopexit, label %86

._crit_edge89.thread:                             ; preds = %20
  %85 = tail call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef 0.000000e+00, double noundef 0.000000e+00)
  br i1 %85, label %.loopexit, label %.preheader

86:                                               ; preds = %._crit_edge89
  %87 = fdiv double 1.000000e+00, %.072.lcssa
  br i1 %.not.not84, label %.lr.ph96, label %.preheader

.lr.ph96:                                         ; preds = %86
  %88 = getelementptr inbounds i8, ptr %0, i64 184
  %89 = getelementptr inbounds i8, ptr %0, i64 56
  %90 = getelementptr inbounds i8, ptr %5, i64 56
  br label %92

.preheader:                                       ; preds = %._crit_edge, %._crit_edge89.thread, %86
  %91 = phi double [ %87, %86 ], [ 0x7FF0000000000000, %._crit_edge89.thread ], [ %87, %._crit_edge ]
  %.072.lcssa109112 = phi double [ %.072.lcssa, %86 ], [ 0.000000e+00, %._crit_edge89.thread ], [ %.072.lcssa, %._crit_edge ]
  %.not.not7897 = icmp sgt i64 %4, 0
  br i1 %.not.not7897, label %.lr.ph99, label %.loopexit

92:                                               ; preds = %.lr.ph96, %._crit_edge
  %.194 = phi i64 [ 0, %.lr.ph96 ], [ %96, %._crit_edge ]
  %93 = load ptr, ptr %88, align 8, !tbaa !16
  %94 = getelementptr inbounds i64, ptr %93, i64 %.194
  %95 = load i64, ptr %94, align 8, !tbaa !17
  %96 = add nuw nsw i64 %.194, 1
  %97 = getelementptr inbounds i64, ptr %93, i64 %96
  %98 = load i64, ptr %97, align 8, !tbaa !17
  %.not.not7991 = icmp slt i64 %95, %98
  br i1 %.not.not7991, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %92
  %99 = sub i64 %98, %95
  %xtraiter = and i64 %99, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader, %.lr.ph.prol
  %.17592.prol = phi i64 [ %104, %.lr.ph.prol ], [ %95, %.lr.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader ]
  %100 = load ptr, ptr %89, align 8, !tbaa !16
  %101 = getelementptr inbounds double, ptr %100, i64 %.17592.prol
  %102 = load double, ptr %101, align 8, !tbaa !18
  %103 = fmul double %87, %102
  store double %103, ptr %101, align 8, !tbaa !18
  %104 = add nsw i64 %.17592.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 %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !24

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %.17592.unr = phi i64 [ %95, %.lr.ph.preheader ], [ %104, %.lr.ph.prol ]
  %105 = sub i64 %95, %98
  %106 = icmp ugt i64 %105, -4
  br i1 %106, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %.17592 = phi i64 [ %126, %.lr.ph ], [ %.17592.unr, %.lr.ph.prol.loopexit ]
  %107 = load ptr, ptr %89, align 8, !tbaa !16
  %108 = getelementptr inbounds double, ptr %107, i64 %.17592
  %109 = load double, ptr %108, align 8, !tbaa !18
  %110 = fmul double %87, %109
  store double %110, ptr %108, align 8, !tbaa !18
  %111 = load ptr, ptr %89, align 8, !tbaa !16
  %112 = getelementptr double, ptr %111, i64 %.17592
  %113 = getelementptr i8, ptr %112, i64 8
  %114 = load double, ptr %113, align 8, !tbaa !18
  %115 = fmul double %87, %114
  store double %115, ptr %113, align 8, !tbaa !18
  %116 = load ptr, ptr %89, align 8, !tbaa !16
  %117 = getelementptr double, ptr %116, i64 %.17592
  %118 = getelementptr i8, ptr %117, i64 16
  %119 = load double, ptr %118, align 8, !tbaa !18
  %120 = fmul double %87, %119
  store double %120, ptr %118, align 8, !tbaa !18
  %121 = load ptr, ptr %89, align 8, !tbaa !16
  %122 = getelementptr double, ptr %121, i64 %.17592
  %123 = getelementptr i8, ptr %122, i64 24
  %124 = load double, ptr %123, align 8, !tbaa !18
  %125 = fmul double %87, %124
  store double %125, ptr %123, align 8, !tbaa !18
  %126 = add nsw i64 %.17592, 4
  %exitcond105.not.3 = icmp eq i64 %126, %98
  br i1 %exitcond105.not.3, label %._crit_edge, label %.lr.ph, !llvm.loop !26

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %92
  %127 = load ptr, ptr %90, align 8, !tbaa !16
  %128 = getelementptr inbounds double, ptr %127, i64 %.194
  %129 = load double, ptr %128, align 8, !tbaa !18
  %130 = fmul double %87, %129
  store double %130, ptr %128, align 8, !tbaa !18
  %exitcond106.not = icmp eq i64 %96, %6
  br i1 %exitcond106.not, label %.preheader, label %92, !llvm.loop !27

.lr.ph99:                                         ; preds = %.preheader, %.lr.ph99
  %.298 = phi i64 [ %132, %.lr.ph99 ], [ 0, %.preheader ]
  %131 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %91, ptr noundef %7)
  tail call void @_ZN11alglib_impl5rmulrEldPNS_9ae_matrixElPNS_8ae_stateE(i64 noundef %6, double noundef %131, ptr noundef %2, i64 noundef %.298, ptr noundef %7)
  %132 = add nuw nsw i64 %.298, 1
  %exitcond107.not = icmp eq i64 %132, %4
  br i1 %exitcond107.not, label %.loopexit, label %.lr.ph99, !llvm.loop !28

.loopexit:                                        ; preds = %.lr.ph99, %._crit_edge89.thread, %.preheader, %._crit_edge89
  %.072.lcssa110 = phi double [ 0.000000e+00, %._crit_edge89.thread ], [ %.072.lcssa109112, %.preheader ], [ %.072.lcssa, %._crit_edge89 ], [ %.072.lcssa109112, %.lr.ph99 ]
  ret double %.072.lcssa110
}

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 = !{!13, !13, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.unroll.disable"}
!26 = distinct !{!26, !22}
!27 = distinct !{!27, !22}
!28 = distinct !{!28, !22}


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