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

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

@.str.185 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.186 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.187 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.188 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.189 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.190 = external hidden unnamed_addr constant [53 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; 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) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl16cmatrixsolvefastEPKNS_9ae_matrixElPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3) #3 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.alglib_impl::ae_frame", align 8
  %11 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %"struct.alglib_impl::ae_vector", align 8
  %15 = alloca i8, align 1
  %16 = alloca %"struct.alglib_impl::ae_complex", align 8
  %17 = alloca %"struct.alglib_impl::ae_complex", align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i64 %1, ptr %7, align 8, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  %19 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %19, ptr noundef %10)
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 64, i1 false)
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef %11, ptr noundef %20, ptr noundef %21, i1 noundef zeroext true)
  %22 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %14, i64 noundef 0, i64 noundef 2, ptr noundef %22, i1 noundef zeroext true)
  %23 = load i64, ptr %7, align 8, !tbaa !9
  %24 = icmp sgt i64 %23, 0
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %24, ptr noundef @.str.185, ptr noundef %25)
  %26 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %11, i32 0, i32 0
  %27 = load i64, ptr %26, align 8, !tbaa !11
  %28 = load i64, ptr %7, align 8, !tbaa !9
  %29 = icmp sge i64 %27, %28
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %29, ptr noundef @.str.186, ptr noundef %30)
  %31 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %11, i32 0, i32 1
  %32 = load i64, ptr %31, align 8, !tbaa !15
  %33 = load i64, ptr %7, align 8, !tbaa !9
  %34 = icmp sge i64 %32, %33
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %34, ptr noundef @.str.187, ptr noundef %35)
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %36, i32 0, i32 0
  %38 = load i64, ptr %37, align 8, !tbaa !16
  %39 = load i64, ptr %7, align 8, !tbaa !9
  %40 = icmp sge i64 %38, %39
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %40, ptr noundef @.str.188, ptr noundef %41)
  %42 = load i64, ptr %7, align 8, !tbaa !9
  %43 = load i64, ptr %7, align 8, !tbaa !9
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = call noundef zeroext i1 @_ZN11alglib_impl15isfinitecmatrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %11, i64 noundef %42, i64 noundef %43, ptr noundef %44)
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %45, ptr noundef @.str.189, ptr noundef %46)
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = load i64, ptr %7, align 8, !tbaa !9
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  %50 = call noundef zeroext i1 @_ZN11alglib_impl15isfinitecvectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %47, i64 noundef %48, ptr noundef %49)
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %50, ptr noundef @.str.190, ptr noundef %51)
  %52 = load i64, ptr %7, align 8, !tbaa !9
  %53 = load i64, ptr %7, align 8, !tbaa !9
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9cmatrixluEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %11, i64 noundef %52, i64 noundef %53, ptr noundef %14, ptr noundef %54)
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %55

55:                                               ; preds = %98, %4
  %56 = load i64, ptr %12, align 8, !tbaa !9
  %57 = load i64, ptr %7, align 8, !tbaa !9
  %58 = sub nsw i64 %57, 1
  %59 = icmp sle i64 %56, %58
  br i1 %59, label %60, label %101

60:                                               ; preds = %55
  %61 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %11, i32 0, i32 6
  %62 = load ptr, ptr %61, align 8, !tbaa !18
  %63 = load i64, ptr %12, align 8, !tbaa !9
  %64 = getelementptr inbounds ptr, ptr %62, i64 %63
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  %66 = load i64, ptr %12, align 8, !tbaa !9
  %67 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %65, i64 %66
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %67, i64 16, i1 false), !tbaa.struct !19
  %68 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %69 = load double, ptr %68, align 8
  %70 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %71 = load double, ptr %70, align 8
  %72 = call noundef zeroext i1 @_ZN11alglib_impl9ae_c_eq_dENS_10ae_complexEd(double %69, double %71, double noundef 0.000000e+00)
  br i1 %72, label %73, label %97

73:                                               ; preds = %60
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %74

74:                                               ; preds = %90, %73
  %75 = load i64, ptr %13, align 8, !tbaa !9
  %76 = load i64, ptr %7, align 8, !tbaa !9
  %77 = sub nsw i64 %76, 1
  %78 = icmp sle i64 %75, %77
  br i1 %78, label %79, label %93

79:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  %80 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 0.000000e+00)
  %81 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %82 = extractvalue { double, double } %80, 0
  store double %82, ptr %81, align 8
  %83 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %84 = extractvalue { double, double } %80, 1
  store double %84, ptr %83, align 8
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %85, i32 0, i32 4
  %87 = load ptr, ptr %86, align 8, !tbaa !18
  %88 = load i64, ptr %13, align 8, !tbaa !9
  %89 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %87, i64 %88
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %89, ptr align 8 %17, i64 16, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  br label %90

90:                                               ; preds = %79
  %91 = load i64, ptr %13, align 8, !tbaa !9
  %92 = add nsw i64 %91, 1
  store i64 %92, ptr %13, align 8, !tbaa !9
  br label %74, !llvm.loop !22

93:                                               ; preds = %74
  store i8 0, ptr %15, align 1, !tbaa !24
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %94)
  %95 = load i8, ptr %15, align 1, !tbaa !24, !range !25, !noundef !26
  %96 = trunc i8 %95 to i1
  store i1 %96, ptr %5, align 1
  store i32 1, ptr %18, align 4
  br label %108

97:                                               ; preds = %60
  br label %98

98:                                               ; preds = %97
  %99 = load i64, ptr %12, align 8, !tbaa !9
  %100 = add nsw i64 %99, 1
  store i64 %100, ptr %12, align 8, !tbaa !9
  br label %55, !llvm.loop !27

101:                                              ; preds = %55
  %102 = load i64, ptr %7, align 8, !tbaa !9
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_implL32directdensesolvers_cbasiclusolveEPKNS_9ae_matrixEPKNS_9ae_vectorElPS3_PNS_8ae_stateE(ptr noundef %11, ptr noundef %14, i64 noundef %102, ptr noundef %103, ptr noundef %104)
  store i8 1, ptr %15, align 1, !tbaa !24
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %105)
  %106 = load i8, ptr %15, align 1, !tbaa !24, !range !25, !noundef !26
  %107 = trunc i8 %106 to i1
  store i1 %107, ptr %5, align 1
  store i32 1, ptr %18, align 4
  br label %108

108:                                              ; preds = %101, %93
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #5
  %109 = load i1, ptr %5, align 1
  ret i1 %109
}

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

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

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

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

declare noundef zeroext i1 @_ZN11alglib_impl9ae_c_eq_dENS_10ae_complexEd(double, double, double noundef) #2

declare { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef) #2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL32directdensesolvers_cbasiclusolveEPKNS_9ae_matrixEPKNS_9ae_vectorElPS3_PNS_8ae_stateE(ptr noundef, ptr noundef, i64 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 nounwind willreturn memory(argmem: readwrite) }
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_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !13, i64 32, !14, i64 40, !7, i64 72}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!12, !10, i64 8}
!16 = !{!17, !10, i64 0}
!17 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!18 = !{!7, !7, i64 0}
!19 = !{i64 0, i64 8, !20, i64 8, i64 8, !20}
!20 = !{!21, !21, i64 0}
!21 = !{!"double", !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!13, !13, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!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"

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

@.str.185 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.186 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.187 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.188 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.189 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.190 = external hidden unnamed_addr constant [53 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl16cmatrixsolvefastEPKNS_9ae_matrixElPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr 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
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #4
  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_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %6, ptr noundef %0, 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 2, ptr noundef %3, i1 noundef zeroext true)
  %8 = icmp sgt i64 %1, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %8, ptr noundef nonnull @.str.185, ptr noundef %3)
  %9 = load i64, ptr %6, align 8, !tbaa !5
  %10 = icmp sge i64 %9, %1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %10, ptr noundef nonnull @.str.186, ptr noundef %3)
  %11 = getelementptr inbounds i8, ptr %6, i64 8
  %12 = load i64, ptr %11, align 8, !tbaa !13
  %13 = icmp sge i64 %12, %1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %13, ptr noundef nonnull @.str.187, ptr noundef %3)
  %14 = load i64, ptr %2, align 8, !tbaa !14
  %15 = icmp sge i64 %14, %1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef nonnull @.str.188, ptr noundef %3)
  %16 = call noundef zeroext i1 @_ZN11alglib_impl15isfinitecmatrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %6, i64 noundef %1, i64 noundef %1, ptr noundef %3)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef nonnull @.str.189, ptr noundef %3)
  %17 = call noundef zeroext i1 @_ZN11alglib_impl15isfinitecvectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %2, i64 noundef %1, ptr noundef %3)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.190, ptr noundef %3)
  call void @_ZN11alglib_impl9cmatrixluEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %6, i64 noundef %1, i64 noundef %1, ptr noundef nonnull %7, ptr noundef %3)
  %.not.not48 = icmp slt i64 %1, 1
  br i1 %.not.not48, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %4
  %18 = getelementptr inbounds i8, ptr %6, i64 72
  %19 = load ptr, ptr %18, align 8, !tbaa !16
  %20 = load ptr, ptr %19, align 8, !tbaa !17
  %.sroa.01.0.copyload62 = load double, ptr %20, align 8, !tbaa !18
  %.sroa.2.0..sroa_idx63 = getelementptr inbounds i8, ptr %20, i64 8
  %.sroa.2.0.copyload64 = load double, ptr %.sroa.2.0..sroa_idx63, align 8, !tbaa !18
  %21 = call noundef zeroext i1 @_ZN11alglib_impl9ae_c_eq_dENS_10ae_complexEd(double %.sroa.01.0.copyload62, double %.sroa.2.0.copyload64, double noundef 0.000000e+00)
  br i1 %21, label %.lr.ph53, label %.lr.ph66

.lr.ph66:                                         ; preds = %.lr.ph, %23
  %.0424965 = phi i64 [ %22, %23 ], [ 0, %.lr.ph ]
  %22 = add nuw nsw i64 %.0424965, 1
  %exitcond = icmp eq i64 %22, %1
  br i1 %exitcond, label %._crit_edge, label %23, !llvm.loop !20

23:                                               ; preds = %.lr.ph66
  %24 = load ptr, ptr %18, align 8, !tbaa !16
  %25 = getelementptr inbounds ptr, ptr %24, i64 %22
  %26 = load ptr, ptr %25, align 8, !tbaa !17
  %27 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %26, i64 %22
  %.sroa.01.0.copyload = load double, ptr %27, align 8, !tbaa !18
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %27, i64 8
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !18
  %28 = call noundef zeroext i1 @_ZN11alglib_impl9ae_c_eq_dENS_10ae_complexEd(double %.sroa.01.0.copyload, double %.sroa.2.0.copyload, double noundef 0.000000e+00)
  br i1 %28, label %.lr.ph53.loopexit, label %.lr.ph66, !llvm.loop !20

.lr.ph53.loopexit:                                ; preds = %23
  %.not.not.le = icmp sge i64 %22, %1
  br label %.lr.ph53

.lr.ph53:                                         ; preds = %.lr.ph53.loopexit, %.lr.ph
  %.not.not50.lcssa = phi i1 [ false, %.lr.ph ], [ %.not.not.le, %.lr.ph53.loopexit ]
  %29 = getelementptr inbounds i8, ptr %2, i64 56
  br label %30

30:                                               ; preds = %.lr.ph53, %30
  %.04352 = phi i64 [ 0, %.lr.ph53 ], [ %36, %30 ]
  %31 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 0.000000e+00)
  %32 = extractvalue { double, double } %31, 0
  %33 = extractvalue { double, double } %31, 1
  %34 = load ptr, ptr %29, align 8, !tbaa !16
  %35 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %34, i64 %.04352
  store double %32, ptr %35, align 8, !tbaa !18
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %35, i64 8
  store double %33, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !18
  %36 = add nuw nsw i64 %.04352, 1
  %exitcond57.not = icmp eq i64 %36, %1
  br i1 %exitcond57.not, label %._crit_edge54, label %30, !llvm.loop !22

._crit_edge:                                      ; preds = %.lr.ph66, %4
  call void @_ZN11alglib_implL32directdensesolvers_cbasiclusolveEPKNS_9ae_matrixEPKNS_9ae_vectorElPS3_PNS_8ae_stateE(ptr noundef nonnull %6, ptr noundef nonnull %7, i64 noundef %1, ptr noundef nonnull %2, ptr noundef %3)
  br label %._crit_edge54

._crit_edge54:                                    ; preds = %30, %._crit_edge
  %.not.not47 = phi i1 [ true, %._crit_edge ], [ %.not.not50.lcssa, %30 ]
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %3)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  ret i1 %.not.not47
}

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) 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_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

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

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

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

declare noundef zeroext i1 @_ZN11alglib_impl9ae_c_eq_dENS_10ae_complexEd(double, double, double noundef) local_unnamed_addr #2

declare { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL32directdensesolvers_cbasiclusolveEPKNS_9ae_matrixEPKNS_9ae_vectorElPS3_PNS_8ae_stateE(ptr noundef, ptr noundef, i64 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 = { 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_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !11, i64 40, !8, i64 72}
!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 = !{!6, !7, i64 8}
!14 = !{!15, !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !8, i64 56}
!16 = !{!8, !8, i64 0}
!17 = !{!12, !12, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !8, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}


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