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

@.str.216 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.217 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.218 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.219 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.220 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.221 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.222 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.223 = external hidden unnamed_addr constant [55 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_impl18cmatrixlusolvefastEPKNS_9ae_matrixEPKNS_9ae_vectorElPS3_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4) #2 {
  %6 = alloca i1, align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i8, align 1
  %15 = alloca %"struct.alglib_impl::ae_complex", align 8
  %16 = alloca %"struct.alglib_impl::ae_complex", align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i64 %2, ptr %9, align 8, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #4
  %18 = load i64, ptr %9, align 8, !tbaa !9
  %19 = icmp sgt i64 %18, 0
  %20 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef @.str.216, ptr noundef %20)
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %21, i32 0, i32 0
  %23 = load i64, ptr %22, align 8, !tbaa !11
  %24 = load i64, ptr %9, align 8, !tbaa !9
  %25 = icmp sge i64 %23, %24
  %26 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %25, ptr noundef @.str.217, ptr noundef %26)
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %27, i32 0, i32 1
  %29 = load i64, ptr %28, align 8, !tbaa !15
  %30 = load i64, ptr %9, align 8, !tbaa !9
  %31 = icmp sge i64 %29, %30
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %31, ptr noundef @.str.218, ptr noundef %32)
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %33, i32 0, i32 0
  %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 %11, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %37, ptr noundef @.str.219, ptr noundef %38)
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %39, i32 0, i32 0
  %41 = load i64, ptr %40, align 8, !tbaa !16
  %42 = load i64, ptr %9, align 8, !tbaa !9
  %43 = icmp sge i64 %41, %42
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %43, ptr noundef @.str.220, ptr noundef %44)
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = load i64, ptr %9, align 8, !tbaa !9
  %47 = load i64, ptr %9, align 8, !tbaa !9
  %48 = load ptr, ptr %11, align 8, !tbaa !5
  %49 = call noundef zeroext i1 @_ZN11alglib_impl15isfinitecmatrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %45, i64 noundef %46, i64 noundef %47, ptr noundef %48)
  %50 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %49, ptr noundef @.str.221, ptr noundef %50)
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = load i64, ptr %9, align 8, !tbaa !9
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  %54 = call noundef zeroext i1 @_ZN11alglib_impl15isfinitecvectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %51, i64 noundef %52, ptr noundef %53)
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %54, ptr noundef @.str.222, ptr noundef %55)
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %56

56:                                               ; preds = %81, %5
  %57 = load i64, ptr %12, align 8, !tbaa !9
  %58 = load i64, ptr %9, align 8, !tbaa !9
  %59 = sub nsw i64 %58, 1
  %60 = icmp sle i64 %57, %59
  br i1 %60, label %61, label %84

61:                                               ; preds = %56
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %62, i32 0, i32 4
  %64 = load ptr, ptr %63, align 8, !tbaa !18
  %65 = load i64, ptr %12, align 8, !tbaa !9
  %66 = getelementptr inbounds i64, ptr %64, i64 %65
  %67 = load i64, ptr %66, align 8, !tbaa !9
  %68 = icmp sge i64 %67, 0
  br i1 %68, label %69, label %78

69:                                               ; preds = %61
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %70, i32 0, i32 4
  %72 = load ptr, ptr %71, align 8, !tbaa !18
  %73 = load i64, ptr %12, align 8, !tbaa !9
  %74 = getelementptr inbounds i64, ptr %72, i64 %73
  %75 = load i64, ptr %74, align 8, !tbaa !9
  %76 = load i64, ptr %9, align 8, !tbaa !9
  %77 = icmp slt i64 %75, %76
  br label %78

78:                                               ; preds = %69, %61
  %79 = phi i1 [ false, %61 ], [ %77, %69 ]
  %80 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %79, ptr noundef @.str.223, ptr noundef %80)
  br label %81

81:                                               ; preds = %78
  %82 = load i64, ptr %12, align 8, !tbaa !9
  %83 = add nsw i64 %82, 1
  store i64 %83, ptr %12, align 8, !tbaa !9
  br label %56, !llvm.loop !19

84:                                               ; preds = %56
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %85

85:                                               ; preds = %128, %84
  %86 = load i64, ptr %12, align 8, !tbaa !9
  %87 = load i64, ptr %9, align 8, !tbaa !9
  %88 = sub nsw i64 %87, 1
  %89 = icmp sle i64 %86, %88
  br i1 %89, label %90, label %131

90:                                               ; preds = %85
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %91, i32 0, i32 6
  %93 = load ptr, ptr %92, align 8, !tbaa !18
  %94 = load i64, ptr %12, align 8, !tbaa !9
  %95 = getelementptr inbounds ptr, ptr %93, i64 %94
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = load i64, ptr %12, align 8, !tbaa !9
  %98 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %96, i64 %97
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %98, i64 16, i1 false), !tbaa.struct !21
  %99 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %100 = load double, ptr %99, align 8
  %101 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %102 = load double, ptr %101, align 8
  %103 = call noundef zeroext i1 @_ZN11alglib_impl9ae_c_eq_dENS_10ae_complexEd(double %100, double %102, double noundef 0.000000e+00)
  br i1 %103, label %104, label %127

104:                                              ; preds = %90
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %105

105:                                              ; preds = %121, %104
  %106 = load i64, ptr %13, align 8, !tbaa !9
  %107 = load i64, ptr %9, align 8, !tbaa !9
  %108 = sub nsw i64 %107, 1
  %109 = icmp sle i64 %106, %108
  br i1 %109, label %110, label %124

110:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #4
  %111 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 0.000000e+00)
  %112 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %113 = extractvalue { double, double } %111, 0
  store double %113, ptr %112, align 8
  %114 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %115 = extractvalue { double, double } %111, 1
  store double %115, ptr %114, align 8
  %116 = load ptr, ptr %10, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %116, i32 0, i32 4
  %118 = load ptr, ptr %117, align 8, !tbaa !18
  %119 = load i64, ptr %13, align 8, !tbaa !9
  %120 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %118, i64 %119
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %120, ptr align 8 %16, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #4
  br label %121

121:                                              ; preds = %110
  %122 = load i64, ptr %13, align 8, !tbaa !9
  %123 = add nsw i64 %122, 1
  store i64 %123, ptr %13, align 8, !tbaa !9
  br label %105, !llvm.loop !24

124:                                              ; preds = %105
  store i8 0, ptr %14, align 1, !tbaa !25
  %125 = load i8, ptr %14, align 1, !tbaa !25, !range !26, !noundef !27
  %126 = trunc i8 %125 to i1
  store i1 %126, ptr %6, align 1
  store i32 1, ptr %17, align 4
  br label %139

127:                                              ; preds = %90
  br label %128

128:                                              ; preds = %127
  %129 = load i64, ptr %12, align 8, !tbaa !9
  %130 = add nsw i64 %129, 1
  store i64 %130, ptr %12, align 8, !tbaa !9
  br label %85, !llvm.loop !28

131:                                              ; preds = %85
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = load i64, ptr %9, align 8, !tbaa !9
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  %136 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN11alglib_implL32directdensesolvers_cbasiclusolveEPKNS_9ae_matrixEPKNS_9ae_vectorElPS3_PNS_8ae_stateE(ptr noundef %132, ptr noundef %133, i64 noundef %134, ptr noundef %135, ptr noundef %136)
  store i8 1, ptr %14, align 1, !tbaa !25
  %137 = load i8, ptr %14, align 1, !tbaa !25, !range !26, !noundef !27
  %138 = trunc i8 %137 to i1
  store i1 %138, ptr %6, align 1
  store i32 1, ptr %17, align 4
  br label %139

139:                                              ; preds = %131, %124
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %140 = load i1, ptr %6, align 1
  ret i1 %140
}

; 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 noundef zeroext i1 @_ZN11alglib_impl9ae_c_eq_dENS_10ae_complexEd(double, double, double noundef) #1

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

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

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

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, !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 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{i64 0, i64 8, !22, i64 8, i64 8, !22}
!22 = !{!23, !23, i64 0}
!23 = !{!"double", !7, i64 0}
!24 = distinct !{!24, !20}
!25 = !{!13, !13, i64 0}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = distinct !{!28, !20}


; 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.216 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.217 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.218 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.219 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.220 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.221 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.222 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.223 = external hidden unnamed_addr constant [55 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_impl18cmatrixlusolvefastEPKNS_9ae_matrixEPKNS_9ae_vectorElPS3_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 {
  %6 = icmp sgt i64 %2, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %6, ptr noundef nonnull @.str.216, ptr noundef %4)
  %7 = load i64, ptr %0, align 8, !tbaa !5
  %8 = icmp sge i64 %7, %2
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %8, ptr noundef nonnull @.str.217, ptr noundef %4)
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  %10 = load i64, ptr %9, align 8, !tbaa !13
  %11 = icmp sge i64 %10, %2
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %11, ptr noundef nonnull @.str.218, ptr noundef %4)
  %12 = load i64, ptr %1, align 8, !tbaa !14
  %13 = icmp sge i64 %12, %2
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %13, ptr noundef nonnull @.str.219, ptr noundef %4)
  %14 = load i64, ptr %3, align 8, !tbaa !14
  %15 = icmp sge i64 %14, %2
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef nonnull @.str.220, ptr noundef %4)
  %16 = tail call noundef zeroext i1 @_ZN11alglib_impl15isfinitecmatrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef %2, i64 noundef %2, ptr noundef %4)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef nonnull @.str.221, ptr noundef %4)
  %17 = tail call noundef zeroext i1 @_ZN11alglib_impl15isfinitecvectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %2, ptr noundef %4)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.222, ptr noundef %4)
  br i1 %6, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %5
  %18 = getelementptr inbounds i8, ptr %1, i64 56
  br label %23

.lr.ph65:                                         ; preds = %23
  %19 = getelementptr inbounds i8, ptr %0, i64 72
  %20 = load ptr, ptr %19, align 8, !tbaa !16
  %21 = load ptr, ptr %20, align 8, !tbaa !17
  %.sroa.01.0.copyload78 = load double, ptr %21, align 8, !tbaa !18
  %.sroa.2.0..sroa_idx79 = getelementptr inbounds i8, ptr %21, i64 8
  %.sroa.2.0.copyload80 = load double, ptr %.sroa.2.0..sroa_idx79, align 8, !tbaa !18
  %22 = tail call noundef zeroext i1 @_ZN11alglib_impl9ae_c_eq_dENS_10ae_complexEd(double %.sroa.01.0.copyload78, double %.sroa.2.0.copyload80, double noundef 0.000000e+00)
  br i1 %22, label %.lr.ph68, label %.lr.ph82

23:                                               ; preds = %.lr.ph, %23
  %.05161 = phi i64 [ 0, %.lr.ph ], [ %27, %23 ]
  %24 = load ptr, ptr %18, align 8, !tbaa !16
  %25 = getelementptr inbounds i64, ptr %24, i64 %.05161
  %26 = load i64, ptr %25, align 8, !tbaa !20
  %spec.select = icmp ult i64 %26, %2
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %spec.select, ptr noundef nonnull @.str.223, ptr noundef %4)
  %27 = add nuw nsw i64 %.05161, 1
  %exitcond.not = icmp eq i64 %27, %2
  br i1 %exitcond.not, label %.lr.ph65, label %23, !llvm.loop !21

.lr.ph82:                                         ; preds = %.lr.ph65, %29
  %.16381 = phi i64 [ %28, %29 ], [ 0, %.lr.ph65 ]
  %28 = add nuw nsw i64 %.16381, 1
  %exitcond71 = icmp eq i64 %28, %2
  br i1 %exitcond71, label %._crit_edge, label %29, !llvm.loop !23

29:                                               ; preds = %.lr.ph82
  %30 = load ptr, ptr %19, align 8, !tbaa !16
  %31 = getelementptr inbounds ptr, ptr %30, i64 %28
  %32 = load ptr, ptr %31, align 8, !tbaa !17
  %33 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %32, i64 %28
  %.sroa.01.0.copyload = load double, ptr %33, align 8, !tbaa !18
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %33, i64 8
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !18
  %34 = tail 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 %34, label %.lr.ph68.loopexit, label %.lr.ph82, !llvm.loop !23

.lr.ph68.loopexit:                                ; preds = %29
  %.not.not55.le = icmp sge i64 %28, %2
  br label %.lr.ph68

.lr.ph68:                                         ; preds = %.lr.ph68.loopexit, %.lr.ph65
  %.not.not5564.lcssa = phi i1 [ false, %.lr.ph65 ], [ %.not.not55.le, %.lr.ph68.loopexit ]
  %35 = getelementptr inbounds i8, ptr %3, i64 56
  br label %36

36:                                               ; preds = %.lr.ph68, %36
  %.05267 = phi i64 [ 0, %.lr.ph68 ], [ %42, %36 ]
  %37 = tail call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 0.000000e+00)
  %38 = extractvalue { double, double } %37, 0
  %39 = extractvalue { double, double } %37, 1
  %40 = load ptr, ptr %35, align 8, !tbaa !16
  %41 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %40, i64 %.05267
  store double %38, ptr %41, align 8, !tbaa !18
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %41, i64 8
  store double %39, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !18
  %42 = add nuw nsw i64 %.05267, 1
  %exitcond72.not = icmp eq i64 %42, %2
  br i1 %exitcond72.not, label %.loopexit, label %36, !llvm.loop !24

._crit_edge:                                      ; preds = %.lr.ph82, %5
  tail call void @_ZN11alglib_implL32directdensesolvers_cbasiclusolveEPKNS_9ae_matrixEPKNS_9ae_vectorElPS3_PNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef nonnull %1, i64 noundef %2, ptr noundef nonnull %3, ptr noundef %4)
  br label %.loopexit

.loopexit:                                        ; preds = %36, %._crit_edge
  %.not.not5559 = phi i1 [ true, %._crit_edge ], [ %.not.not5564.lcssa, %36 ]
  ret i1 %.not.not5559
}

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

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

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

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

; 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 #1

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 = !{!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 = !{!7, !7, 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,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass