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

@.str.95 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.100 = 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_impl16rmatrixsolvefastEPKNS_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 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) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %11) #4
  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 64, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #4
  %17 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %17, 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)
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = 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 %18, ptr noundef %19, i1 noundef zeroext true)
  %20 = 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 %20, i1 noundef zeroext true)
  %21 = load i64, ptr %7, align 8, !tbaa !9
  %22 = icmp sgt i64 %21, 0
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %22, ptr noundef @.str.95, ptr noundef %23)
  %24 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %11, i32 0, i32 0
  %25 = load i64, ptr %24, align 8, !tbaa !11
  %26 = load i64, ptr %7, align 8, !tbaa !9
  %27 = icmp sge i64 %25, %26
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef @.str.96, ptr noundef %28)
  %29 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %11, i32 0, i32 1
  %30 = load i64, ptr %29, align 8, !tbaa !15
  %31 = load i64, ptr %7, align 8, !tbaa !9
  %32 = icmp sge i64 %30, %31
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %32, ptr noundef @.str.97, ptr noundef %33)
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %34, i32 0, i32 0
  %36 = load i64, ptr %35, align 8, !tbaa !16
  %37 = load i64, ptr %7, align 8, !tbaa !9
  %38 = icmp sge i64 %36, %37
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %38, ptr noundef @.str.98, ptr noundef %39)
  %40 = load i64, ptr %7, align 8, !tbaa !9
  %41 = load i64, ptr %7, align 8, !tbaa !9
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %11, i64 noundef %40, i64 noundef %41, ptr noundef %42)
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %43, ptr noundef @.str.99, ptr noundef %44)
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = load i64, ptr %7, align 8, !tbaa !9
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %45, i64 noundef %46, ptr noundef %47)
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %48, ptr noundef @.str.100, ptr noundef %49)
  store i8 1, ptr %15, align 1, !tbaa !18
  %50 = load i64, ptr %7, align 8, !tbaa !9
  %51 = load i64, ptr %7, align 8, !tbaa !9
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9rmatrixluEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %11, i64 noundef %50, i64 noundef %51, ptr noundef %14, ptr noundef %52)
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %53

53:                                               ; preds = %88, %4
  %54 = load i64, ptr %12, align 8, !tbaa !9
  %55 = load i64, ptr %7, align 8, !tbaa !9
  %56 = sub nsw i64 %55, 1
  %57 = icmp sle i64 %54, %56
  br i1 %57, label %58, label %91

58:                                               ; preds = %53
  %59 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %11, i32 0, i32 6
  %60 = load ptr, ptr %59, align 8, !tbaa !19
  %61 = load i64, ptr %12, align 8, !tbaa !9
  %62 = getelementptr inbounds ptr, ptr %60, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  %64 = load i64, ptr %12, align 8, !tbaa !9
  %65 = getelementptr inbounds double, ptr %63, i64 %64
  %66 = load double, ptr %65, align 8, !tbaa !20
  %67 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %66, double noundef 0.000000e+00)
  br i1 %67, label %68, label %87

68:                                               ; preds = %58
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %69

69:                                               ; preds = %80, %68
  %70 = load i64, ptr %13, align 8, !tbaa !9
  %71 = load i64, ptr %7, align 8, !tbaa !9
  %72 = sub nsw i64 %71, 1
  %73 = icmp sle i64 %70, %72
  br i1 %73, label %74, label %83

74:                                               ; preds = %69
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %75, i32 0, i32 4
  %77 = load ptr, ptr %76, align 8, !tbaa !19
  %78 = load i64, ptr %13, align 8, !tbaa !9
  %79 = getelementptr inbounds double, ptr %77, i64 %78
  store double 0.000000e+00, ptr %79, align 8, !tbaa !20
  br label %80

80:                                               ; preds = %74
  %81 = load i64, ptr %13, align 8, !tbaa !9
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %13, align 8, !tbaa !9
  br label %69, !llvm.loop !22

83:                                               ; preds = %69
  store i8 0, ptr %15, align 1, !tbaa !18
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %84)
  %85 = load i8, ptr %15, align 1, !tbaa !18, !range !24, !noundef !25
  %86 = trunc i8 %85 to i1
  store i1 %86, ptr %5, align 1
  store i32 1, ptr %16, align 4
  br label %98

87:                                               ; preds = %58
  br label %88

88:                                               ; preds = %87
  %89 = load i64, ptr %12, align 8, !tbaa !9
  %90 = add nsw i64 %89, 1
  store i64 %90, ptr %12, align 8, !tbaa !9
  br label %53, !llvm.loop !26

91:                                               ; preds = %53
  %92 = load i64, ptr %7, align 8, !tbaa !9
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_implL32directdensesolvers_rbasiclusolveEPKNS_9ae_matrixEPKNS_9ae_vectorElPS3_PNS_8ae_stateE(ptr noundef %11, ptr noundef %14, i64 noundef %92, ptr noundef %93, ptr noundef %94)
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %95)
  %96 = load i8, ptr %15, align 1, !tbaa !18, !range !24, !noundef !25
  %97 = trunc i8 %96 to i1
  store i1 %97, ptr %5, align 1
  store i32 1, ptr %16, align 4
  br label %98

98:                                               ; preds = %91, %83
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 64, 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
  call void @llvm.lifetime.end.p0(i64 80, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #4
  %99 = load i1, ptr %5, align 1
  ret i1 %99
}

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, 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 void @_ZN11alglib_impl9rmatrixluEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL32directdensesolvers_rbasiclusolveEPKNS_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 = { 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 = !{!13, !13, i64 0}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"double", !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = distinct !{!26, !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 }

@.str.95 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.100 = 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_impl16rmatrixsolvefastEPKNS_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.95, 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.96, 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.97, 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.98, ptr noundef %3)
  %16 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_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.99, ptr noundef %3)
  %17 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_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.100, ptr noundef %3)
  call void @_ZN11alglib_impl9rmatrixluEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %6, i64 noundef %1, i64 noundef %1, ptr noundef nonnull %7, ptr noundef %3)
  %.not.not47 = icmp slt i64 %1, 1
  br i1 %.not.not47, 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
  %21 = load double, ptr %20, align 8, !tbaa !18
  %22 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %21, double noundef 0.000000e+00)
  br i1 %22, label %.lr.ph52, label %.lr.ph62

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

24:                                               ; preds = %.lr.ph62
  %25 = load ptr, ptr %18, align 8, !tbaa !16
  %26 = getelementptr inbounds ptr, ptr %25, i64 %23
  %27 = load ptr, ptr %26, align 8, !tbaa !17
  %28 = getelementptr inbounds double, ptr %27, i64 %23
  %29 = load double, ptr %28, align 8, !tbaa !18
  %30 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %29, double noundef 0.000000e+00)
  br i1 %30, label %.lr.ph52.loopexit, label %.lr.ph62, !llvm.loop !20

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

.lr.ph52:                                         ; preds = %.lr.ph52.loopexit, %.lr.ph
  %.not.not49.lcssa = phi i1 [ false, %.lr.ph ], [ %.not.not.le, %.lr.ph52.loopexit ]
  %31 = getelementptr inbounds i8, ptr %2, i64 56
  %xtraiter = and i64 %1, 3
  %32 = icmp ult i64 %1, 4
  br i1 %32, label %._crit_edge53.loopexit.unr-lcssa, label %.lr.ph52.new

.lr.ph52.new:                                     ; preds = %.lr.ph52
  %unroll_iter = and i64 %1, 9223372036854775804
  br label %33

33:                                               ; preds = %33, %.lr.ph52.new
  %.051 = phi i64 [ 0, %.lr.ph52.new ], [ %45, %33 ]
  %niter = phi i64 [ 0, %.lr.ph52.new ], [ %niter.next.3, %33 ]
  %34 = load ptr, ptr %31, align 8, !tbaa !16
  %35 = getelementptr inbounds double, ptr %34, i64 %.051
  store double 0.000000e+00, ptr %35, align 8, !tbaa !18
  %36 = or disjoint i64 %.051, 1
  %37 = load ptr, ptr %31, align 8, !tbaa !16
  %38 = getelementptr inbounds double, ptr %37, i64 %36
  store double 0.000000e+00, ptr %38, align 8, !tbaa !18
  %39 = or disjoint i64 %.051, 2
  %40 = load ptr, ptr %31, align 8, !tbaa !16
  %41 = getelementptr inbounds double, ptr %40, i64 %39
  store double 0.000000e+00, ptr %41, align 8, !tbaa !18
  %42 = or disjoint i64 %.051, 3
  %43 = load ptr, ptr %31, align 8, !tbaa !16
  %44 = getelementptr inbounds double, ptr %43, i64 %42
  store double 0.000000e+00, ptr %44, align 8, !tbaa !18
  %45 = add nuw nsw i64 %.051, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge53.loopexit.unr-lcssa, label %33, !llvm.loop !22

._crit_edge:                                      ; preds = %.lr.ph62, %4
  call void @_ZN11alglib_implL32directdensesolvers_rbasiclusolveEPKNS_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_edge53

._crit_edge53.loopexit.unr-lcssa:                 ; preds = %33, %.lr.ph52
  %.051.unr = phi i64 [ 0, %.lr.ph52 ], [ %45, %33 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge53, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge53.loopexit.unr-lcssa, %.epil.preheader
  %.051.epil = phi i64 [ %48, %.epil.preheader ], [ %.051.unr, %._crit_edge53.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge53.loopexit.unr-lcssa ]
  %46 = load ptr, ptr %31, align 8, !tbaa !16
  %47 = getelementptr inbounds double, ptr %46, i64 %.051.epil
  store double 0.000000e+00, ptr %47, align 8, !tbaa !18
  %48 = add nuw nsw i64 %.051.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge53, label %.epil.preheader, !llvm.loop !23

._crit_edge53:                                    ; preds = %._crit_edge53.loopexit.unr-lcssa, %.epil.preheader, %._crit_edge
  %.not.not46 = phi i1 [ true, %._crit_edge ], [ %.not.not49.lcssa, %.epil.preheader ], [ %.not.not49.lcssa, %._crit_edge53.loopexit.unr-lcssa ]
  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.not46
}

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 noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, 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 void @_ZN11alglib_impl9rmatrixluEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL32directdensesolvers_rbasiclusolveEPKNS_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}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.unroll.disable"}


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