; 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.181 = external hidden unnamed_addr constant [42 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_impl8coalesceEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl17checklc2violationEPKNS_12sparsematrixEPKNS_9ae_vectorES5_S5_lS5_PdPlPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #3 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %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
  %26 = alloca i32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  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
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  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
  %27 = load ptr, ptr %16, align 8, !tbaa !5
  store double 0.000000e+00, ptr %27, align 8, !tbaa !11
  %28 = load ptr, ptr %17, align 8, !tbaa !5
  store i64 0, ptr %28, align 8, !tbaa !9
  %29 = load ptr, ptr %16, align 8, !tbaa !5
  store double 0.000000e+00, ptr %29, align 8, !tbaa !11
  %30 = load ptr, ptr %17, align 8, !tbaa !5
  store i64 -1, ptr %30, align 8, !tbaa !9
  %31 = load i64, ptr %14, align 8, !tbaa !9
  %32 = icmp eq i64 %31, 0
  br i1 %32, label %33, label %34

33:                                               ; preds = %9
  store i32 1, ptr %26, align 4
  br label %193

34:                                               ; preds = %9
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %35, i32 0, i32 5
  %37 = load i64, ptr %36, align 8, !tbaa !13
  %38 = icmp eq i64 %37, 1
  %39 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %38, ptr noundef @.str.181, ptr noundef %39)
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %40

40:                                               ; preds = %189, %34
  %41 = load i64, ptr %19, align 8, !tbaa !9
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %42, i32 0, i32 6
  %44 = load i64, ptr %43, align 8, !tbaa !18
  %45 = sub nsw i64 %44, 1
  %46 = icmp sle i64 %41, %45
  br i1 %46, label %47, label %192

47:                                               ; preds = %40
  store double 0.000000e+00, ptr %23, align 8, !tbaa !11
  store double 0.000000e+00, ptr %24, align 8, !tbaa !11
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %48, i32 0, i32 2
  %50 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %49, i32 0, i32 4
  %51 = load ptr, ptr %50, align 8, !tbaa !19
  %52 = load i64, ptr %19, align 8, !tbaa !9
  %53 = getelementptr inbounds i64, ptr %51, i64 %52
  %54 = load i64, ptr %53, align 8, !tbaa !9
  store i64 %54, ptr %21, align 8, !tbaa !9
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %55, i32 0, i32 2
  %57 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %56, i32 0, i32 4
  %58 = load ptr, ptr %57, align 8, !tbaa !19
  %59 = load i64, ptr %19, align 8, !tbaa !9
  %60 = add nsw i64 %59, 1
  %61 = getelementptr inbounds i64, ptr %58, i64 %60
  %62 = load i64, ptr %61, align 8, !tbaa !9
  %63 = sub nsw i64 %62, 1
  store i64 %63, ptr %22, align 8, !tbaa !9
  %64 = load i64, ptr %21, align 8, !tbaa !9
  store i64 %64, ptr %20, align 8, !tbaa !9
  br label %65

65:                                               ; preds = %96, %47
  %66 = load i64, ptr %20, align 8, !tbaa !9
  %67 = load i64, ptr %22, align 8, !tbaa !9
  %68 = icmp sle i64 %66, %67
  br i1 %68, label %69, label %99

69:                                               ; preds = %65
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %70, i32 0, i32 0
  %72 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %71, i32 0, i32 4
  %73 = load ptr, ptr %72, align 8, !tbaa !19
  %74 = load i64, ptr %20, align 8, !tbaa !9
  %75 = getelementptr inbounds double, ptr %73, i64 %74
  %76 = load double, ptr %75, align 8, !tbaa !11
  store double %76, ptr %25, align 8, !tbaa !11
  %77 = load double, ptr %23, align 8, !tbaa !11
  %78 = load double, ptr %25, align 8, !tbaa !11
  %79 = load ptr, ptr %15, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %79, i32 0, i32 4
  %81 = load ptr, ptr %80, align 8, !tbaa !19
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %82, i32 0, i32 1
  %84 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %83, i32 0, i32 4
  %85 = load ptr, ptr %84, align 8, !tbaa !19
  %86 = load i64, ptr %20, align 8, !tbaa !9
  %87 = getelementptr inbounds i64, ptr %85, i64 %86
  %88 = load i64, ptr %87, align 8, !tbaa !9
  %89 = getelementptr inbounds double, ptr %81, i64 %88
  %90 = load double, ptr %89, align 8, !tbaa !11
  %91 = call double @llvm.fmuladd.f64(double %78, double %90, double %77)
  store double %91, ptr %23, align 8, !tbaa !11
  %92 = load double, ptr %24, align 8, !tbaa !11
  %93 = load double, ptr %25, align 8, !tbaa !11
  %94 = load double, ptr %25, align 8, !tbaa !11
  %95 = call double @llvm.fmuladd.f64(double %93, double %94, double %92)
  store double %95, ptr %24, align 8, !tbaa !11
  br label %96

96:                                               ; preds = %69
  %97 = load i64, ptr %20, align 8, !tbaa !9
  %98 = add nsw i64 %97, 1
  store i64 %98, ptr %20, align 8, !tbaa !9
  br label %65, !llvm.loop !20

99:                                               ; preds = %65
  %100 = load double, ptr %24, align 8, !tbaa !11
  %101 = load ptr, ptr %18, align 8, !tbaa !5
  %102 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %100, ptr noundef %101)
  %103 = load ptr, ptr %18, align 8, !tbaa !5
  %104 = call noundef double @_ZN11alglib_impl8coalesceEddPNS_8ae_stateE(double noundef %102, double noundef 1.000000e+00, ptr noundef %103)
  store double %104, ptr %24, align 8, !tbaa !11
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %105, i32 0, i32 4
  %107 = load ptr, ptr %106, align 8, !tbaa !19
  %108 = load i64, ptr %19, align 8, !tbaa !9
  %109 = getelementptr inbounds double, ptr %107, i64 %108
  %110 = load double, ptr %109, align 8, !tbaa !11
  %111 = load ptr, ptr %18, align 8, !tbaa !5
  %112 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %110, ptr noundef %111)
  br i1 %112, label %113, label %146

113:                                              ; preds = %99
  %114 = load ptr, ptr %11, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %114, i32 0, i32 4
  %116 = load ptr, ptr %115, align 8, !tbaa !19
  %117 = load i64, ptr %19, align 8, !tbaa !9
  %118 = getelementptr inbounds double, ptr %116, i64 %117
  %119 = load double, ptr %118, align 8, !tbaa !11
  %120 = load double, ptr %23, align 8, !tbaa !11
  %121 = fsub double %119, %120
  %122 = load double, ptr %24, align 8, !tbaa !11
  %123 = fdiv double %121, %122
  %124 = load ptr, ptr %16, align 8, !tbaa !5
  %125 = load double, ptr %124, align 8, !tbaa !11
  %126 = fcmp ogt double %123, %125
  br i1 %126, label %127, label %146

127:                                              ; preds = %113
  %128 = load ptr, ptr %11, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %128, i32 0, i32 4
  %130 = load ptr, ptr %129, align 8, !tbaa !19
  %131 = load i64, ptr %19, align 8, !tbaa !9
  %132 = getelementptr inbounds double, ptr %130, i64 %131
  %133 = load double, ptr %132, align 8, !tbaa !11
  %134 = load double, ptr %23, align 8, !tbaa !11
  %135 = fsub double %133, %134
  %136 = load double, ptr %24, align 8, !tbaa !11
  %137 = fdiv double %135, %136
  %138 = load ptr, ptr %16, align 8, !tbaa !5
  store double %137, ptr %138, align 8, !tbaa !11
  %139 = load ptr, ptr %13, align 8, !tbaa !5
  %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 %19, align 8, !tbaa !9
  %143 = getelementptr inbounds i64, ptr %141, i64 %142
  %144 = load i64, ptr %143, align 8, !tbaa !9
  %145 = load ptr, ptr %17, align 8, !tbaa !5
  store i64 %144, ptr %145, align 8, !tbaa !9
  br label %146

146:                                              ; preds = %127, %113, %99
  %147 = load ptr, ptr %12, align 8, !tbaa !5
  %148 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %147, i32 0, i32 4
  %149 = load ptr, ptr %148, align 8, !tbaa !19
  %150 = load i64, ptr %19, align 8, !tbaa !9
  %151 = getelementptr inbounds double, ptr %149, i64 %150
  %152 = load double, ptr %151, align 8, !tbaa !11
  %153 = load ptr, ptr %18, align 8, !tbaa !5
  %154 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %152, ptr noundef %153)
  br i1 %154, label %155, label %188

155:                                              ; preds = %146
  %156 = load double, ptr %23, align 8, !tbaa !11
  %157 = load ptr, ptr %12, align 8, !tbaa !5
  %158 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %157, i32 0, i32 4
  %159 = load ptr, ptr %158, align 8, !tbaa !19
  %160 = load i64, ptr %19, align 8, !tbaa !9
  %161 = getelementptr inbounds double, ptr %159, i64 %160
  %162 = load double, ptr %161, align 8, !tbaa !11
  %163 = fsub double %156, %162
  %164 = load double, ptr %24, align 8, !tbaa !11
  %165 = fdiv double %163, %164
  %166 = load ptr, ptr %16, align 8, !tbaa !5
  %167 = load double, ptr %166, align 8, !tbaa !11
  %168 = fcmp ogt double %165, %167
  br i1 %168, label %169, label %188

169:                                              ; preds = %155
  %170 = load double, ptr %23, align 8, !tbaa !11
  %171 = load ptr, ptr %12, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %171, i32 0, i32 4
  %173 = load ptr, ptr %172, align 8, !tbaa !19
  %174 = load i64, ptr %19, align 8, !tbaa !9
  %175 = getelementptr inbounds double, ptr %173, i64 %174
  %176 = load double, ptr %175, align 8, !tbaa !11
  %177 = fsub double %170, %176
  %178 = load double, ptr %24, align 8, !tbaa !11
  %179 = fdiv double %177, %178
  %180 = load ptr, ptr %16, align 8, !tbaa !5
  store double %179, ptr %180, align 8, !tbaa !11
  %181 = load ptr, ptr %13, align 8, !tbaa !5
  %182 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %181, i32 0, i32 4
  %183 = load ptr, ptr %182, align 8, !tbaa !19
  %184 = load i64, ptr %19, align 8, !tbaa !9
  %185 = getelementptr inbounds i64, ptr %183, i64 %184
  %186 = load i64, ptr %185, align 8, !tbaa !9
  %187 = load ptr, ptr %17, align 8, !tbaa !5
  store i64 %186, ptr %187, align 8, !tbaa !9
  br label %188

188:                                              ; preds = %169, %155, %146
  br label %189

189:                                              ; preds = %188
  %190 = load i64, ptr %19, align 8, !tbaa !9
  %191 = add nsw i64 %190, 1
  store i64 %191, ptr %19, align 8, !tbaa !9
  br label %40, !llvm.loop !22

192:                                              ; preds = %40
  store i32 0, ptr %26, align 4
  br label %193

193:                                              ; preds = %192, %33
  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
  %194 = load i32, ptr %26, align 4
  switch i32 %194, label %196 [
    i32 0, label %195
    i32 1, label %195
  ]

195:                                              ; preds = %193, %193
  ret void

196:                                              ; preds = %193
  unreachable
}

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double 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 = { 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 = !{!"double", !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, !16, i64 16, !17, i64 24, !7, i64 56}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!18 = !{!14, !10, i64 328}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}


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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl17checklc2violationEPKNS_12sparsematrixEPKNS_9ae_vectorES5_S5_lS5_PdPlPNS_8ae_stateE(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readonly %3, i64 noundef %4, ptr nocapture noundef readonly %5, ptr nocapture noundef %6, ptr nocapture noundef writeonly %7, ptr noundef %8) local_unnamed_addr #1 {
  store double 0.000000e+00, ptr %6, align 8, !tbaa !5
  store i64 -1, ptr %7, align 8, !tbaa !9
  %10 = icmp eq i64 %4, 0
  br i1 %10, label %.loopexit, label %11

11:                                               ; preds = %9
  %12 = getelementptr inbounds i8, ptr %0, i64 320
  %13 = load i64, ptr %12, align 8, !tbaa !11
  %14 = icmp eq i64 %13, 1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %14, ptr noundef nonnull @.str.181, ptr noundef %8)
  %15 = getelementptr inbounds i8, ptr %0, i64 328
  %16 = load i64, ptr %15, align 8, !tbaa !17
  %.not.not73 = icmp sgt i64 %16, 0
  br i1 %.not.not73, label %.lr.ph76, label %.loopexit

.lr.ph76:                                         ; preds = %11
  %17 = getelementptr inbounds i8, ptr %0, i64 184
  %18 = getelementptr inbounds i8, ptr %0, i64 56
  %19 = getelementptr inbounds i8, ptr %5, i64 56
  %20 = getelementptr inbounds i8, ptr %0, i64 120
  %21 = getelementptr inbounds i8, ptr %1, i64 56
  %22 = getelementptr inbounds i8, ptr %3, i64 56
  %23 = getelementptr inbounds i8, ptr %2, i64 56
  br label %24

24:                                               ; preds = %.lr.ph76, %109
  %.074 = phi i64 [ 0, %.lr.ph76 ], [ %28, %109 ]
  %25 = load ptr, ptr %17, align 8, !tbaa !18
  %26 = getelementptr inbounds i64, ptr %25, i64 %.074
  %27 = load i64, ptr %26, align 8, !tbaa !9
  %28 = add nuw nsw i64 %.074, 1
  %29 = getelementptr inbounds i64, ptr %25, i64 %28
  %30 = load i64, ptr %29, align 8, !tbaa !9
  %.not.not6768 = icmp slt i64 %27, %30
  br i1 %.not.not6768, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %24
  %31 = load ptr, ptr %18, align 8, !tbaa !18
  %32 = load ptr, ptr %19, align 8, !tbaa !18
  %33 = load ptr, ptr %20, align 8, !tbaa !18
  %34 = sub i64 %30, %27
  %.neg = add i64 %27, 1
  %xtraiter = and i64 %34, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.prol.loopexit, label %.prol.loopexit.unr-lcssa

.prol.loopexit.unr-lcssa:                         ; preds = %.lr.ph
  %35 = getelementptr inbounds double, ptr %31, i64 %27
  %36 = load double, ptr %35, align 8, !tbaa !5
  %37 = getelementptr inbounds i64, ptr %33, i64 %27
  %38 = load i64, ptr %37, align 8, !tbaa !9
  %39 = getelementptr inbounds double, ptr %32, i64 %38
  %40 = load double, ptr %39, align 8, !tbaa !5
  %41 = insertelement <2 x double> poison, double %36, i64 0
  %42 = shufflevector <2 x double> %41, <2 x double> poison, <2 x i32> zeroinitializer
  %43 = insertelement <2 x double> %41, double %40, i64 1
  %44 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %42, <2 x double> %43, <2 x double> zeroinitializer)
  %45 = add nsw i64 %27, 1
  br label %.prol.loopexit

.prol.loopexit:                                   ; preds = %.prol.loopexit.unr-lcssa, %.lr.ph
  %.lcssa.unr = phi <2 x double> [ poison, %.lr.ph ], [ %44, %.prol.loopexit.unr-lcssa ]
  %.06469.unr = phi i64 [ %27, %.lr.ph ], [ %45, %.prol.loopexit.unr-lcssa ]
  %.unr = phi <2 x double> [ zeroinitializer, %.lr.ph ], [ %44, %.prol.loopexit.unr-lcssa ]
  %46 = icmp eq i64 %30, %.neg
  br i1 %46, label %._crit_edge, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.prol.loopexit, %.lr.ph.new
  %.06469 = phi i64 [ %69, %.lr.ph.new ], [ %.06469.unr, %.prol.loopexit ]
  %47 = phi <2 x double> [ %68, %.lr.ph.new ], [ %.unr, %.prol.loopexit ]
  %48 = getelementptr inbounds double, ptr %31, i64 %.06469
  %49 = load double, ptr %48, align 8, !tbaa !5
  %50 = getelementptr inbounds i64, ptr %33, i64 %.06469
  %51 = load i64, ptr %50, align 8, !tbaa !9
  %52 = getelementptr inbounds double, ptr %32, i64 %51
  %53 = load double, ptr %52, align 8, !tbaa !5
  %54 = insertelement <2 x double> poison, double %49, i64 0
  %55 = shufflevector <2 x double> %54, <2 x double> poison, <2 x i32> zeroinitializer
  %56 = insertelement <2 x double> %54, double %53, i64 1
  %57 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %55, <2 x double> %56, <2 x double> %47)
  %58 = add nsw i64 %.06469, 1
  %59 = getelementptr inbounds double, ptr %31, i64 %58
  %60 = load double, ptr %59, align 8, !tbaa !5
  %61 = getelementptr inbounds i64, ptr %33, i64 %58
  %62 = load i64, ptr %61, align 8, !tbaa !9
  %63 = getelementptr inbounds double, ptr %32, i64 %62
  %64 = load double, ptr %63, align 8, !tbaa !5
  %65 = insertelement <2 x double> poison, double %60, i64 0
  %66 = shufflevector <2 x double> %65, <2 x double> poison, <2 x i32> zeroinitializer
  %67 = insertelement <2 x double> %65, double %64, i64 1
  %68 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %66, <2 x double> %67, <2 x double> %57)
  %69 = add nsw i64 %.06469, 2
  %exitcond.not.1 = icmp eq i64 %69, %30
  br i1 %exitcond.not.1, label %._crit_edge, label %.lr.ph.new, !llvm.loop !19

._crit_edge:                                      ; preds = %.prol.loopexit, %.lr.ph.new, %24
  %70 = phi <2 x double> [ zeroinitializer, %24 ], [ %.lcssa.unr, %.prol.loopexit ], [ %68, %.lr.ph.new ]
  %71 = extractelement <2 x double> %70, i64 0
  %72 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %71, ptr noundef %8)
  %73 = tail call noundef double @_ZN11alglib_impl8coalesceEddPNS_8ae_stateE(double noundef %72, double noundef 1.000000e+00, ptr noundef %8)
  %74 = load ptr, ptr %21, align 8, !tbaa !18
  %75 = getelementptr inbounds double, ptr %74, i64 %.074
  %76 = load double, ptr %75, align 8, !tbaa !5
  %77 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %76, ptr noundef %8)
  br i1 %77, label %78, label %91

78:                                               ; preds = %._crit_edge
  %79 = load ptr, ptr %21, align 8, !tbaa !18
  %80 = getelementptr inbounds double, ptr %79, i64 %.074
  %81 = load double, ptr %80, align 8, !tbaa !5
  %82 = extractelement <2 x double> %70, i64 1
  %83 = fsub double %81, %82
  %84 = fdiv double %83, %73
  %85 = load double, ptr %6, align 8, !tbaa !5
  %86 = fcmp ogt double %84, %85
  br i1 %86, label %87, label %91

87:                                               ; preds = %78
  store double %84, ptr %6, align 8, !tbaa !5
  %88 = load ptr, ptr %22, align 8, !tbaa !18
  %89 = getelementptr inbounds i64, ptr %88, i64 %.074
  %90 = load i64, ptr %89, align 8, !tbaa !9
  store i64 %90, ptr %7, align 8, !tbaa !9
  br label %91

91:                                               ; preds = %87, %78, %._crit_edge
  %92 = load ptr, ptr %23, align 8, !tbaa !18
  %93 = getelementptr inbounds double, ptr %92, i64 %.074
  %94 = load double, ptr %93, align 8, !tbaa !5
  %95 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %94, ptr noundef %8)
  br i1 %95, label %96, label %109

96:                                               ; preds = %91
  %97 = load ptr, ptr %23, align 8, !tbaa !18
  %98 = getelementptr inbounds double, ptr %97, i64 %.074
  %99 = load double, ptr %98, align 8, !tbaa !5
  %100 = extractelement <2 x double> %70, i64 1
  %101 = fsub double %100, %99
  %102 = fdiv double %101, %73
  %103 = load double, ptr %6, align 8, !tbaa !5
  %104 = fcmp ogt double %102, %103
  br i1 %104, label %105, label %109

105:                                              ; preds = %96
  store double %102, ptr %6, align 8, !tbaa !5
  %106 = load ptr, ptr %22, align 8, !tbaa !18
  %107 = getelementptr inbounds i64, ptr %106, i64 %.074
  %108 = load i64, ptr %107, align 8, !tbaa !9
  store i64 %108, ptr %7, align 8, !tbaa !9
  br label %109

109:                                              ; preds = %91, %96, %105
  %110 = load i64, ptr %15, align 8, !tbaa !17
  %.not.not = icmp slt i64 %28, %110
  br i1 %.not.not, label %24, label %.loopexit, !llvm.loop !21

.loopexit:                                        ; preds = %109, %11, %9
  ret void
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #2

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

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 320}
!12 = !{!"_ZTSN11alglib_impl12sparsematrixE", !13, i64 0, !13, i64 64, !13, i64 128, !13, i64 192, !13, i64 256, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360}
!13 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !14, i64 16, !15, i64 24, !7, i64 56}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!12, !10, i64 328}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}


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