; LLVM IR from Dimandragon/non-parametric-dsp :: alglib-cpp/src/dataanalysis.ll (ZN11alglib_impl10filterlrmaEPNS_9ae_vectorEllPNS_8ae_stateE)

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

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

@.str.353 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.354 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.355 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.356 = external hidden unnamed_addr constant [16 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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl10filterlrmaEPNS_9ae_vectorEllPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.alglib_impl::ae_frame", align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %13 = alloca %"struct.alglib_impl::ae_vector", align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store i64 %2, ptr %7, align 8, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %22, ptr noundef %9)
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 64, i1 false)
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %12, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %23, i1 noundef zeroext true)
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %13, i64 noundef 0, i64 noundef 3, ptr noundef %24, i1 noundef zeroext true)
  %25 = load i64, ptr %6, align 8, !tbaa !9
  %26 = icmp sge i64 %25, 0
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %26, ptr noundef @.str.353, ptr noundef %27)
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %28, i32 0, i32 0
  %30 = load i64, ptr %29, align 8, !tbaa !11
  %31 = load i64, ptr %6, align 8, !tbaa !9
  %32 = icmp sge i64 %30, %31
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %32, ptr noundef @.str.354, ptr noundef %33)
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = load i64, ptr %6, align 8, !tbaa !9
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %34, i64 noundef %35, ptr noundef %36)
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %37, ptr noundef @.str.355, ptr noundef %38)
  %39 = load i64, ptr %7, align 8, !tbaa !9
  %40 = icmp sge i64 %39, 1
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %40, ptr noundef @.str.356, ptr noundef %41)
  %42 = load i64, ptr %6, align 8, !tbaa !9
  %43 = icmp sle i64 %42, 1
  br i1 %43, label %47, label %44

44:                                               ; preds = %4
  %45 = load i64, ptr %7, align 8, !tbaa !9
  %46 = icmp sle i64 %45, 2
  br i1 %46, label %47, label %49

47:                                               ; preds = %44, %4
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %48)
  store i32 1, ptr %21, align 4
  br label %123

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

54:                                               ; preds = %72, %49
  %55 = load i64, ptr %10, align 8, !tbaa !9
  %56 = load i64, ptr %7, align 8, !tbaa !9
  %57 = sub nsw i64 %56, 1
  %58 = icmp sle i64 %55, %57
  br i1 %58, label %59, label %75

59:                                               ; preds = %54
  %60 = load i64, ptr %10, align 8, !tbaa !9
  %61 = sitofp i64 %60 to double
  %62 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %12, i32 0, i32 6
  %63 = load ptr, ptr %62, align 8, !tbaa !15
  %64 = load i64, ptr %10, align 8, !tbaa !9
  %65 = getelementptr inbounds ptr, ptr %63, i64 %64
  %66 = load ptr, ptr %65, align 8, !tbaa !5
  %67 = getelementptr inbounds double, ptr %66, i64 0
  store double %61, ptr %67, align 8, !tbaa !16
  %68 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %13, i32 0, i32 4
  %69 = load ptr, ptr %68, align 8, !tbaa !15
  %70 = load i64, ptr %10, align 8, !tbaa !9
  %71 = getelementptr inbounds double, ptr %69, i64 %70
  store double 1.000000e+00, ptr %71, align 8, !tbaa !16
  br label %72

72:                                               ; preds = %59
  %73 = load i64, ptr %10, align 8, !tbaa !9
  %74 = add nsw i64 %73, 1
  store i64 %74, ptr %10, align 8, !tbaa !9
  br label %54, !llvm.loop !18

75:                                               ; preds = %54
  %76 = load i64, ptr %6, align 8, !tbaa !9
  %77 = sub nsw i64 %76, 1
  store i64 %77, ptr %10, align 8, !tbaa !9
  br label %78

78:                                               ; preds = %118, %75
  %79 = load i64, ptr %10, align 8, !tbaa !9
  %80 = icmp sge i64 %79, 2
  br i1 %80, label %81, label %121

81:                                               ; preds = %78
  %82 = load i64, ptr %10, align 8, !tbaa !9
  %83 = add nsw i64 %82, 1
  %84 = load i64, ptr %7, align 8, !tbaa !9
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %83, i64 noundef %84, ptr noundef %85)
  store i64 %86, ptr %11, align 8, !tbaa !9
  %87 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %12, i32 0, i32 6
  %88 = load ptr, ptr %87, align 8, !tbaa !15
  %89 = getelementptr inbounds ptr, ptr %88, i64 0
  %90 = load ptr, ptr %89, align 8, !tbaa !5
  %91 = getelementptr inbounds double, ptr %90, i64 1
  %92 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %12, i32 0, i32 2
  %93 = load i64, ptr %92, align 8, !tbaa !20
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %94, i32 0, i32 4
  %96 = load ptr, ptr %95, align 8, !tbaa !15
  %97 = load i64, ptr %10, align 8, !tbaa !9
  %98 = load i64, ptr %11, align 8, !tbaa !9
  %99 = sub nsw i64 %97, %98
  %100 = add nsw i64 %99, 1
  %101 = getelementptr inbounds double, ptr %96, i64 %100
  %102 = load i64, ptr %11, align 8, !tbaa !9
  %103 = sub nsw i64 %102, 1
  %104 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %103)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %91, i64 noundef %93, ptr noundef %101, i64 noundef 1, i64 noundef %104)
  %105 = load i64, ptr %11, align 8, !tbaa !9
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl7lrlinesEPKNS_9ae_matrixEPKNS_9ae_vectorElPdS6_S6_S6_S6_S6_S6_PNS_8ae_stateE(ptr noundef %12, ptr noundef %13, i64 noundef %105, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %106)
  %107 = load double, ptr %14, align 8, !tbaa !16
  %108 = load double, ptr %15, align 8, !tbaa !16
  %109 = load i64, ptr %11, align 8, !tbaa !9
  %110 = sub nsw i64 %109, 1
  %111 = sitofp i64 %110 to double
  %112 = call double @llvm.fmuladd.f64(double %108, double %111, double %107)
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %113, i32 0, i32 4
  %115 = load ptr, ptr %114, align 8, !tbaa !15
  %116 = load i64, ptr %10, align 8, !tbaa !9
  %117 = getelementptr inbounds double, ptr %115, i64 %116
  store double %112, ptr %117, align 8, !tbaa !16
  br label %118

118:                                              ; preds = %81
  %119 = load i64, ptr %10, align 8, !tbaa !9
  %120 = add nsw i64 %119, -1
  store i64 %120, ptr %10, align 8, !tbaa !9
  br label %78, !llvm.loop !22

121:                                              ; preds = %78
  %122 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %122)
  store i32 0, ptr %21, align 4
  br label %123

123:                                              ; preds = %121, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  %124 = load i32, ptr %21, align 4
  switch i32 %124, label %126 [
    i32 0, label %125
    i32 1, label %125
  ]

125:                                              ; preds = %123, %123
  ret void

126:                                              ; preds = %123
  unreachable
}

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

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

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

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

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

declare noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl7lrlinesEPKNS_9ae_matrixEPKNS_9ae_vectorElPdS6_S6_S6_S6_S6_S6_PNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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, !10, i64 0}
!12 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!21, !10, i64 16}
!21 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !13, i64 32, !14, i64 40, !7, i64 72}
!22 = distinct !{!22, !19}


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

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

@.str.353 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.354 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.355 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.356 = external hidden unnamed_addr constant [16 x i8], align 1

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl10filterlrmaEPNS_9ae_vectorEllPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3) local_unnamed_addr #3 {
  %5 = alloca %"struct.alglib_impl::ae_frame", align 8
  %6 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %7 = alloca %"struct.alglib_impl::ae_vector", align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %3, ptr noundef nonnull %5)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %6, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %7, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %6, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %7, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  %15 = icmp sgt i64 %1, -1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef nonnull @.str.353, ptr noundef %3)
  %16 = load i64, ptr %0, align 8, !tbaa !5
  %17 = icmp sge i64 %16, %1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.354, ptr noundef %3)
  %18 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef %1, ptr noundef %3)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %18, ptr noundef nonnull @.str.355, ptr noundef %3)
  %19 = icmp sgt i64 %2, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef nonnull @.str.356, ptr noundef %3)
  %20 = icmp slt i64 %1, 2
  %21 = icmp slt i64 %2, 3
  %or.cond = or i1 %20, %21
  br i1 %or.cond, label %._crit_edge, label %.new

.new:                                             ; preds = %4
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %6, i64 noundef %2, i64 noundef 2, ptr noundef %3)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %2, ptr noundef %3)
  %22 = getelementptr inbounds i8, ptr %6, i64 72
  %23 = getelementptr inbounds i8, ptr %7, i64 56
  %xtraiter = and i64 %2, 1
  %unroll_iter = and i64 %2, 9223372036854775806
  br label %33

.preheader.unr-lcssa:                             ; preds = %33
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.preheader.epilog-lcssa

.preheader.epilog-lcssa:                          ; preds = %.preheader.unr-lcssa
  %24 = uitofp nneg i64 %47 to double
  %25 = load ptr, ptr %22, align 8, !tbaa !13
  %26 = getelementptr inbounds ptr, ptr %25, i64 %47
  %27 = load ptr, ptr %26, align 8, !tbaa !14
  store double %24, ptr %27, align 8, !tbaa !15
  %28 = load ptr, ptr %23, align 8, !tbaa !13
  %29 = getelementptr inbounds double, ptr %28, i64 %47
  store double 1.000000e+00, ptr %29, align 8, !tbaa !15
  br label %.preheader

.preheader:                                       ; preds = %.preheader.unr-lcssa, %.preheader.epilog-lcssa
  %30 = icmp sgt i64 %1, 2
  br i1 %30, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %31 = getelementptr inbounds i8, ptr %6, i64 16
  %32 = getelementptr inbounds i8, ptr %0, i64 56
  br label %48

33:                                               ; preds = %33, %.new
  %.045 = phi i64 [ 0, %.new ], [ %47, %33 ]
  %niter = phi i64 [ 0, %.new ], [ %niter.next.1, %33 ]
  %34 = uitofp nneg i64 %.045 to double
  %35 = load ptr, ptr %22, align 8, !tbaa !13
  %36 = getelementptr inbounds ptr, ptr %35, i64 %.045
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  store double %34, ptr %37, align 8, !tbaa !15
  %38 = load ptr, ptr %23, align 8, !tbaa !13
  %39 = getelementptr inbounds double, ptr %38, i64 %.045
  store double 1.000000e+00, ptr %39, align 8, !tbaa !15
  %40 = or disjoint i64 %.045, 1
  %41 = uitofp nneg i64 %40 to double
  %42 = load ptr, ptr %22, align 8, !tbaa !13
  %43 = getelementptr inbounds ptr, ptr %42, i64 %40
  %44 = load ptr, ptr %43, align 8, !tbaa !14
  store double %41, ptr %44, align 8, !tbaa !15
  %45 = load ptr, ptr %23, align 8, !tbaa !13
  %46 = getelementptr inbounds double, ptr %45, i64 %40
  store double 1.000000e+00, ptr %46, align 8, !tbaa !15
  %47 = add nuw nsw i64 %.045, 2
  %niter.next.1 = add nuw nsw i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader.unr-lcssa, label %33, !llvm.loop !17

48:                                               ; preds = %.lr.ph, %48
  %.1.in46 = phi i64 [ %1, %.lr.ph ], [ %.1, %48 ]
  %.1 = add nsw i64 %.1.in46, -1
  %49 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %.1.in46, i64 noundef %2, ptr noundef %3)
  %50 = load ptr, ptr %22, align 8, !tbaa !13
  %51 = load ptr, ptr %50, align 8, !tbaa !14
  %52 = getelementptr inbounds i8, ptr %51, i64 8
  %53 = load i64, ptr %31, align 8, !tbaa !19
  %54 = load ptr, ptr %32, align 8, !tbaa !13
  %55 = sub nsw i64 %.1, %49
  %56 = getelementptr double, ptr %54, i64 %55
  %57 = getelementptr i8, ptr %56, i64 8
  %58 = add nsw i64 %49, -1
  %59 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %58)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef nonnull %52, i64 noundef %53, ptr noundef %57, i64 noundef 1, i64 noundef %59)
  call void @_ZN11alglib_impl7lrlinesEPKNS_9ae_matrixEPKNS_9ae_vectorElPdS6_S6_S6_S6_S6_S6_PNS_8ae_stateE(ptr noundef nonnull %6, ptr noundef nonnull %7, i64 noundef %49, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef %3)
  %60 = load double, ptr %8, align 8, !tbaa !15
  %61 = load double, ptr %9, align 8, !tbaa !15
  %62 = sitofp i64 %58 to double
  %63 = call double @llvm.fmuladd.f64(double %61, double %62, double %60)
  %64 = load ptr, ptr %32, align 8, !tbaa !13
  %65 = getelementptr inbounds double, ptr %64, i64 %.1
  store double %63, ptr %65, align 8, !tbaa !15
  %66 = icmp ugt i64 %.1.in46, 3
  br i1 %66, label %48, label %._crit_edge, !llvm.loop !21

._crit_edge:                                      ; preds = %48, %.preheader, %4
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  ret void
}

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

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

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

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

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

declare noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl7lrlinesEPKNS_9ae_matrixEPKNS_9ae_vectorElPdS6_S6_S6_S6_S6_S6_PNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

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


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