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

@.str.335 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.336 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.337 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.338 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.339 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.340 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.341 = external hidden unnamed_addr constant [66 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: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl27hpdmatrixcholeskysolvemfastEPKNS_9ae_matrixElbPS0_lPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3, i64 noundef %4, ptr noundef %5) #2 {
  %7 = alloca i1, align 1
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i8, align 1
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i8, align 1
  %18 = alloca %"struct.alglib_impl::ae_complex", align 8
  %19 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i64 %1, ptr %9, align 8, !tbaa !9
  %20 = zext i1 %2 to i8
  store i8 %20, ptr %10, align 1, !tbaa !11
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i64 %4, ptr %12, align 8, !tbaa !9
  store ptr %5, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #4
  %21 = load i64, ptr %9, align 8, !tbaa !9
  %22 = icmp sgt i64 %21, 0
  %23 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %22, ptr noundef @.str.335, ptr noundef %23)
  %24 = load i64, ptr %12, align 8, !tbaa !9
  %25 = icmp sgt i64 %24, 0
  %26 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %25, ptr noundef @.str.336, ptr noundef %26)
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %27, i32 0, i32 0
  %29 = load i64, ptr %28, align 8, !tbaa !13
  %30 = load i64, ptr %9, align 8, !tbaa !9
  %31 = icmp sge i64 %29, %30
  %32 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %31, ptr noundef @.str.337, ptr noundef %32)
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %33, i32 0, i32 1
  %35 = load i64, ptr %34, align 8, !tbaa !16
  %36 = load i64, ptr %9, align 8, !tbaa !9
  %37 = icmp sge i64 %35, %36
  %38 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %37, ptr noundef @.str.338, ptr noundef %38)
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %39, i32 0, i32 0
  %41 = load i64, ptr %40, align 8, !tbaa !13
  %42 = load i64, ptr %9, align 8, !tbaa !9
  %43 = icmp sge i64 %41, %42
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %43, ptr noundef @.str.339, ptr noundef %44)
  %45 = load ptr, ptr %11, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %45, i32 0, i32 1
  %47 = load i64, ptr %46, align 8, !tbaa !16
  %48 = load i64, ptr %12, align 8, !tbaa !9
  %49 = icmp sge i64 %47, %48
  %50 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %49, ptr noundef @.str.340, ptr noundef %50)
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = load i64, ptr %9, align 8, !tbaa !9
  %53 = load i8, ptr %10, align 1, !tbaa !11, !range !17, !noundef !18
  %54 = trunc i8 %53 to i1
  %55 = load ptr, ptr %13, align 8, !tbaa !5
  %56 = call noundef zeroext i1 @_ZN11alglib_impl17isfinitectrmatrixEPKNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef %51, i64 noundef %52, i1 noundef zeroext %54, ptr noundef %55)
  %57 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %56, ptr noundef @.str.341, ptr noundef %57)
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = load i64, ptr %9, align 8, !tbaa !9
  %60 = load i64, ptr %12, align 8, !tbaa !9
  %61 = load ptr, ptr %13, align 8, !tbaa !5
  %62 = call noundef zeroext i1 @_ZN11alglib_impl15isfinitecmatrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %58, i64 noundef %59, i64 noundef %60, ptr noundef %61)
  %63 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %62, ptr noundef @.str.341, ptr noundef %63)
  store i8 1, ptr %17, align 1, !tbaa !11
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %64

64:                                               ; preds = %130, %6
  %65 = load i64, ptr %16, align 8, !tbaa !9
  %66 = load i64, ptr %9, align 8, !tbaa !9
  %67 = sub nsw i64 %66, 1
  %68 = icmp sle i64 %65, %67
  br i1 %68, label %69, label %133

69:                                               ; preds = %64
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %70, i32 0, i32 6
  %72 = load ptr, ptr %71, align 8, !tbaa !19
  %73 = load i64, ptr %16, align 8, !tbaa !9
  %74 = getelementptr inbounds ptr, ptr %72, i64 %73
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  %76 = load i64, ptr %16, align 8, !tbaa !9
  %77 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %75, i64 %76
  %78 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %77, i32 0, i32 0
  %79 = load double, ptr %78, align 8, !tbaa !20
  %80 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %79, double noundef 0.000000e+00)
  br i1 %80, label %81, label %129

81:                                               ; preds = %69
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %82, i32 0, i32 6
  %84 = load ptr, ptr %83, align 8, !tbaa !19
  %85 = load i64, ptr %16, align 8, !tbaa !9
  %86 = getelementptr inbounds ptr, ptr %84, i64 %85
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  %88 = load i64, ptr %16, align 8, !tbaa !9
  %89 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %87, i64 %88
  %90 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %89, i32 0, i32 1
  %91 = load double, ptr %90, align 8, !tbaa !23
  %92 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %91, double noundef 0.000000e+00)
  br i1 %92, label %93, label %129

93:                                               ; preds = %81
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %94

94:                                               ; preds = %123, %93
  %95 = load i64, ptr %14, align 8, !tbaa !9
  %96 = load i64, ptr %9, align 8, !tbaa !9
  %97 = sub nsw i64 %96, 1
  %98 = icmp sle i64 %95, %97
  br i1 %98, label %99, label %126

99:                                               ; preds = %94
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %100

100:                                              ; preds = %119, %99
  %101 = load i64, ptr %15, align 8, !tbaa !9
  %102 = load i64, ptr %12, align 8, !tbaa !9
  %103 = sub nsw i64 %102, 1
  %104 = icmp sle i64 %101, %103
  br i1 %104, label %105, label %122

105:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #4
  %106 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 0.000000e+00)
  %107 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %108 = extractvalue { double, double } %106, 0
  store double %108, ptr %107, align 8
  %109 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %110 = extractvalue { double, double } %106, 1
  store double %110, ptr %109, align 8
  %111 = load ptr, ptr %11, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %111, i32 0, i32 6
  %113 = load ptr, ptr %112, align 8, !tbaa !19
  %114 = load i64, ptr %14, align 8, !tbaa !9
  %115 = getelementptr inbounds ptr, ptr %113, i64 %114
  %116 = load ptr, ptr %115, align 8, !tbaa !5
  %117 = load i64, ptr %15, align 8, !tbaa !9
  %118 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %116, i64 %117
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %118, ptr align 8 %18, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #4
  br label %119

119:                                              ; preds = %105
  %120 = load i64, ptr %15, align 8, !tbaa !9
  %121 = add nsw i64 %120, 1
  store i64 %121, ptr %15, align 8, !tbaa !9
  br label %100, !llvm.loop !26

122:                                              ; preds = %100
  br label %123

123:                                              ; preds = %122
  %124 = load i64, ptr %14, align 8, !tbaa !9
  %125 = add nsw i64 %124, 1
  store i64 %125, ptr %14, align 8, !tbaa !9
  br label %94, !llvm.loop !28

126:                                              ; preds = %94
  store i8 0, ptr %17, align 1, !tbaa !11
  %127 = load i8, ptr %17, align 1, !tbaa !11, !range !17, !noundef !18
  %128 = trunc i8 %127 to i1
  store i1 %128, ptr %7, align 1
  store i32 1, ptr %19, align 4
  br label %161

129:                                              ; preds = %81, %69
  br label %130

130:                                              ; preds = %129
  %131 = load i64, ptr %16, align 8, !tbaa !9
  %132 = add nsw i64 %131, 1
  store i64 %132, ptr %16, align 8, !tbaa !9
  br label %64, !llvm.loop !29

133:                                              ; preds = %64
  %134 = load i8, ptr %10, align 1, !tbaa !11, !range !17, !noundef !18
  %135 = trunc i8 %134 to i1
  br i1 %135, label %136, label %147

136:                                              ; preds = %133
  %137 = load i64, ptr %9, align 8, !tbaa !9
  %138 = load i64, ptr %12, align 8, !tbaa !9
  %139 = load ptr, ptr %8, align 8, !tbaa !5
  %140 = load ptr, ptr %11, align 8, !tbaa !5
  %141 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %137, i64 noundef %138, ptr noundef %139, i64 noundef 0, i64 noundef 0, i1 noundef zeroext true, i1 noundef zeroext false, i64 noundef 2, ptr noundef %140, i64 noundef 0, i64 noundef 0, ptr noundef %141)
  %142 = load i64, ptr %9, align 8, !tbaa !9
  %143 = load i64, ptr %12, align 8, !tbaa !9
  %144 = load ptr, ptr %8, align 8, !tbaa !5
  %145 = load ptr, ptr %11, align 8, !tbaa !5
  %146 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %142, i64 noundef %143, ptr noundef %144, i64 noundef 0, i64 noundef 0, i1 noundef zeroext true, i1 noundef zeroext false, i64 noundef 0, ptr noundef %145, i64 noundef 0, i64 noundef 0, ptr noundef %146)
  br label %158

147:                                              ; preds = %133
  %148 = load i64, ptr %9, align 8, !tbaa !9
  %149 = load i64, ptr %12, align 8, !tbaa !9
  %150 = load ptr, ptr %8, align 8, !tbaa !5
  %151 = load ptr, ptr %11, align 8, !tbaa !5
  %152 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %148, i64 noundef %149, ptr noundef %150, i64 noundef 0, i64 noundef 0, i1 noundef zeroext false, i1 noundef zeroext false, i64 noundef 0, ptr noundef %151, i64 noundef 0, i64 noundef 0, ptr noundef %152)
  %153 = load i64, ptr %9, align 8, !tbaa !9
  %154 = load i64, ptr %12, align 8, !tbaa !9
  %155 = load ptr, ptr %8, align 8, !tbaa !5
  %156 = load ptr, ptr %11, align 8, !tbaa !5
  %157 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %153, i64 noundef %154, ptr noundef %155, i64 noundef 0, i64 noundef 0, i1 noundef zeroext false, i1 noundef zeroext false, i64 noundef 2, ptr noundef %156, i64 noundef 0, i64 noundef 0, ptr noundef %157)
  br label %158

158:                                              ; preds = %147, %136
  %159 = load i8, ptr %17, align 1, !tbaa !11, !range !17, !noundef !18
  %160 = trunc i8 %159 to i1
  store i1 %160, ptr %7, align 1
  store i32 1, ptr %19, align 4
  br label %161

161:                                              ; preds = %158, %126
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  %162 = load i1, ptr %7, align 1
  ret i1 %162
}

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

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

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

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

declare void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i1 noundef zeroext, i1 noundef zeroext, i64 noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl17isfinitectrmatrixEPKNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, 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 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }

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

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


; 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_complex" = type { double, double }

@.str.335 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.336 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.337 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.338 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.339 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.340 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.341 = external hidden unnamed_addr constant [66 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 uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl27hpdmatrixcholeskysolvemfastEPKNS_9ae_matrixElbPS0_lPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3, i64 noundef %4, ptr noundef %5) local_unnamed_addr #1 {
  %7 = icmp sgt i64 %1, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %7, ptr noundef nonnull @.str.335, ptr noundef %5)
  %8 = icmp sgt i64 %4, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %8, ptr noundef nonnull @.str.336, ptr noundef %5)
  %9 = load i64, ptr %0, align 8, !tbaa !5
  %10 = icmp sge i64 %9, %1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %10, ptr noundef nonnull @.str.337, ptr noundef %5)
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = load i64, ptr %11, align 8, !tbaa !13
  %13 = icmp sge i64 %12, %1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %13, ptr noundef nonnull @.str.338, ptr noundef %5)
  %14 = load i64, ptr %3, align 8, !tbaa !5
  %15 = icmp sge i64 %14, %1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef nonnull @.str.339, ptr noundef %5)
  %16 = getelementptr inbounds i8, ptr %3, i64 8
  %17 = load i64, ptr %16, align 8, !tbaa !13
  %18 = icmp sge i64 %17, %4
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %18, ptr noundef nonnull @.str.340, ptr noundef %5)
  %19 = tail call noundef zeroext i1 @_ZN11alglib_impl17isfinitectrmatrixEPKNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %5)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef nonnull @.str.341, ptr noundef %5)
  %20 = tail call noundef zeroext i1 @_ZN11alglib_impl15isfinitecmatrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %1, i64 noundef %4, ptr noundef %5)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %20, ptr noundef nonnull @.str.341, ptr noundef %5)
  %.not.not76 = icmp slt i64 %1, 1
  br i1 %.not.not76, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %6
  %21 = getelementptr inbounds i8, ptr %0, i64 72
  br label %22

22:                                               ; preds = %.lr.ph, %47
  %.not.not78 = phi i1 [ false, %.lr.ph ], [ %.not.not, %47 ]
  %.06877 = phi i64 [ 0, %.lr.ph ], [ %48, %47 ]
  %23 = load ptr, ptr %21, align 8, !tbaa !14
  %24 = getelementptr inbounds ptr, ptr %23, i64 %.06877
  %25 = load ptr, ptr %24, align 8, !tbaa !15
  %26 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %25, i64 %.06877
  %27 = load double, ptr %26, align 8, !tbaa !16
  %28 = tail call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %27, double noundef 0.000000e+00)
  br i1 %28, label %29, label %47

29:                                               ; preds = %22
  %30 = load ptr, ptr %21, align 8, !tbaa !14
  %31 = getelementptr inbounds ptr, ptr %30, i64 %.06877
  %32 = load ptr, ptr %31, align 8, !tbaa !15
  %33 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %32, i64 %.06877, i32 1
  %34 = load double, ptr %33, align 8, !tbaa !19
  %35 = tail call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %34, double noundef 0.000000e+00)
  br i1 %35, label %.preheader.lr.ph, label %47

.preheader.lr.ph:                                 ; preds = %29
  %36 = getelementptr inbounds i8, ptr %3, i64 72
  br i1 %8, label %.preheader.us, label %.loopexit

.preheader.us:                                    ; preds = %.preheader.lr.ph, %._crit_edge82.us
  %.06784.us = phi i64 [ %46, %._crit_edge82.us ], [ 0, %.preheader.lr.ph ]
  br label %37

37:                                               ; preds = %.preheader.us, %37
  %.06980.us = phi i64 [ 0, %.preheader.us ], [ %45, %37 ]
  %38 = tail call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 0.000000e+00)
  %39 = extractvalue { double, double } %38, 0
  %40 = extractvalue { double, double } %38, 1
  %41 = load ptr, ptr %36, align 8, !tbaa !14
  %42 = getelementptr inbounds ptr, ptr %41, i64 %.06784.us
  %43 = load ptr, ptr %42, align 8, !tbaa !15
  %44 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %43, i64 %.06980.us
  store double %39, ptr %44, align 8, !tbaa !20
  %.sroa.4.0..sroa_idx.us = getelementptr inbounds i8, ptr %44, i64 8
  store double %40, ptr %.sroa.4.0..sroa_idx.us, align 8, !tbaa !20
  %45 = add nuw nsw i64 %.06980.us, 1
  %exitcond88.not = icmp eq i64 %45, %4
  br i1 %exitcond88.not, label %._crit_edge82.us, label %37, !llvm.loop !21

._crit_edge82.us:                                 ; preds = %37
  %46 = add nuw nsw i64 %.06784.us, 1
  %exitcond89.not = icmp eq i64 %46, %1
  br i1 %exitcond89.not, label %.loopexit, label %.preheader.us, !llvm.loop !23

47:                                               ; preds = %22, %29
  %48 = add nuw nsw i64 %.06877, 1
  %.not.not = icmp sge i64 %48, %1
  %exitcond = icmp eq i64 %48, %1
  br i1 %exitcond, label %._crit_edge, label %22, !llvm.loop !24

._crit_edge:                                      ; preds = %47, %6
  %.not.not.lcssa = phi i1 [ true, %6 ], [ %.not.not, %47 ]
  br i1 %2, label %49, label %50

49:                                               ; preds = %._crit_edge
  tail call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %1, i64 noundef %4, ptr noundef nonnull %0, i64 noundef 0, i64 noundef 0, i1 noundef zeroext true, i1 noundef zeroext false, i64 noundef 2, ptr noundef nonnull %3, i64 noundef 0, i64 noundef 0, ptr noundef %5)
  tail call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %1, i64 noundef %4, ptr noundef nonnull %0, i64 noundef 0, i64 noundef 0, i1 noundef zeroext true, i1 noundef zeroext false, i64 noundef 0, ptr noundef nonnull %3, i64 noundef 0, i64 noundef 0, ptr noundef %5)
  br label %.loopexit

50:                                               ; preds = %._crit_edge
  tail call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %1, i64 noundef %4, ptr noundef nonnull %0, i64 noundef 0, i64 noundef 0, i1 noundef zeroext false, i1 noundef zeroext false, i64 noundef 0, ptr noundef nonnull %3, i64 noundef 0, i64 noundef 0, ptr noundef %5)
  tail call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %1, i64 noundef %4, ptr noundef nonnull %0, i64 noundef 0, i64 noundef 0, i1 noundef zeroext false, i1 noundef zeroext false, i64 noundef 2, ptr noundef nonnull %3, i64 noundef 0, i64 noundef 0, ptr noundef %5)
  br label %.loopexit

.loopexit:                                        ; preds = %._crit_edge82.us, %.preheader.lr.ph, %49, %50
  %.not.not75 = phi i1 [ %.not.not.lcssa, %49 ], [ %.not.not.lcssa, %50 ], [ %.not.not78, %.preheader.lr.ph ], [ %.not.not78, %._crit_edge82.us ]
  ret i1 %.not.not75
}

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

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

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

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

declare noundef zeroext i1 @_ZN11alglib_impl17isfinitectrmatrixEPKNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, ptr noundef) local_unnamed_addr #0

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" }

!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 = !{!8, !8, i64 0}
!15 = !{!12, !12, i64 0}
!16 = !{!17, !18, i64 0}
!17 = !{!"_ZTSN11alglib_impl10ae_complexE", !18, i64 0, !18, i64 8}
!18 = !{!"double", !8, i64 0}
!19 = !{!17, !18, i64 8}
!20 = !{!18, !18, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}


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