; 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.124 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.153 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.154 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.155 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.156 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.157 = external hidden unnamed_addr constant [54 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 void @_ZN11alglib_impl17rmatrixmixedsolveEPKNS_9ae_matrixES2_PKNS_9ae_vectorElS5_PS3_PNS_17densesolverreportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #3 {
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"struct.alglib_impl::ae_frame", align 8
  %18 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %19 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %20 = alloca i64, align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store i64 %3, ptr %12, align 8, !tbaa !9
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  store ptr %7, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %21 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %21, ptr noundef %17)
  call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 80, i1 false)
  %22 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %22)
  %23 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZN11alglib_impl24_densesolverreport_clearEPv(ptr noundef %23)
  %24 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %18, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %24, i1 noundef zeroext true)
  %25 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %19, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %25, i1 noundef zeroext true)
  %26 = load i64, ptr %12, align 8, !tbaa !9
  %27 = icmp sgt i64 %26, 0
  %28 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef @.str.148, ptr noundef %28)
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %29, i32 0, i32 0
  %31 = load i64, ptr %30, align 8, !tbaa !11
  %32 = load i64, ptr %12, align 8, !tbaa !9
  %33 = icmp sge i64 %31, %32
  %34 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %33, ptr noundef @.str.149, ptr noundef %34)
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %35, i32 0, i32 1
  %37 = load i64, ptr %36, align 8, !tbaa !15
  %38 = load i64, ptr %12, align 8, !tbaa !9
  %39 = icmp sge i64 %37, %38
  %40 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %39, ptr noundef @.str.150, ptr noundef %40)
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %41, i32 0, i32 0
  %43 = load i64, ptr %42, align 8, !tbaa !11
  %44 = load i64, ptr %12, align 8, !tbaa !9
  %45 = icmp sge i64 %43, %44
  %46 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %45, ptr noundef @.str.151, ptr noundef %46)
  %47 = load ptr, ptr %10, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %47, i32 0, i32 1
  %49 = load i64, ptr %48, align 8, !tbaa !15
  %50 = load i64, ptr %12, align 8, !tbaa !9
  %51 = icmp sge i64 %49, %50
  %52 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %51, ptr noundef @.str.152, ptr noundef %52)
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %53, i32 0, i32 0
  %55 = load i64, ptr %54, align 8, !tbaa !16
  %56 = load i64, ptr %12, align 8, !tbaa !9
  %57 = icmp sge i64 %55, %56
  %58 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %57, ptr noundef @.str.153, ptr noundef %58)
  %59 = load ptr, ptr %13, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %59, i32 0, i32 0
  %61 = load i64, ptr %60, align 8, !tbaa !16
  %62 = load i64, ptr %12, align 8, !tbaa !9
  %63 = icmp sge i64 %61, %62
  %64 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %63, ptr noundef @.str.154, ptr noundef %64)
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = load i64, ptr %12, align 8, !tbaa !9
  %67 = load i64, ptr %12, align 8, !tbaa !9
  %68 = load ptr, ptr %16, align 8, !tbaa !5
  %69 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %65, i64 noundef %66, i64 noundef %67, ptr noundef %68)
  %70 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %69, ptr noundef @.str.155, ptr noundef %70)
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = load i64, ptr %12, align 8, !tbaa !9
  %73 = load i64, ptr %12, align 8, !tbaa !9
  %74 = load ptr, ptr %16, align 8, !tbaa !5
  %75 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %71, i64 noundef %72, i64 noundef %73, ptr noundef %74)
  %76 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %75, ptr noundef @.str.156, ptr noundef %76)
  %77 = load ptr, ptr %13, align 8, !tbaa !5
  %78 = load i64, ptr %12, align 8, !tbaa !9
  %79 = load ptr, ptr %16, align 8, !tbaa !5
  %80 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %77, i64 noundef %78, ptr noundef %79)
  %81 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %80, ptr noundef @.str.157, ptr noundef %81)
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %82

82:                                               ; preds = %107, %8
  %83 = load i64, ptr %20, align 8, !tbaa !9
  %84 = load i64, ptr %12, align 8, !tbaa !9
  %85 = sub nsw i64 %84, 1
  %86 = icmp sle i64 %83, %85
  br i1 %86, label %87, label %110

87:                                               ; preds = %82
  %88 = load ptr, ptr %11, align 8, !tbaa !5
  %89 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %88, i32 0, i32 4
  %90 = load ptr, ptr %89, align 8, !tbaa !18
  %91 = load i64, ptr %20, align 8, !tbaa !9
  %92 = getelementptr inbounds i64, ptr %90, i64 %91
  %93 = load i64, ptr %92, align 8, !tbaa !9
  %94 = icmp sge i64 %93, 0
  br i1 %94, label %95, label %104

95:                                               ; preds = %87
  %96 = load ptr, ptr %11, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %96, i32 0, i32 4
  %98 = load ptr, ptr %97, align 8, !tbaa !18
  %99 = load i64, ptr %20, align 8, !tbaa !9
  %100 = getelementptr inbounds i64, ptr %98, i64 %99
  %101 = load i64, ptr %100, align 8, !tbaa !9
  %102 = load i64, ptr %12, align 8, !tbaa !9
  %103 = icmp slt i64 %101, %102
  br label %104

104:                                              ; preds = %95, %87
  %105 = phi i1 [ false, %87 ], [ %103, %95 ]
  %106 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %105, ptr noundef @.str.124, ptr noundef %106)
  br label %107

107:                                              ; preds = %104
  %108 = load i64, ptr %20, align 8, !tbaa !9
  %109 = add nsw i64 %108, 1
  store i64 %109, ptr %20, align 8, !tbaa !9
  br label %82, !llvm.loop !19

110:                                              ; preds = %82
  %111 = load i64, ptr %12, align 8, !tbaa !9
  %112 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %18, i64 noundef %111, i64 noundef 1, ptr noundef %112)
  %113 = load i64, ptr %12, align 8, !tbaa !9
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  %115 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rcopyvcElPKNS_9ae_vectorEPNS_9ae_matrixElPNS_8ae_stateE(i64 noundef %113, ptr noundef %114, ptr noundef %18, i64 noundef 0, ptr noundef %115)
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  %118 = load ptr, ptr %11, align 8, !tbaa !5
  %119 = load i64, ptr %12, align 8, !tbaa !9
  %120 = load ptr, ptr %15, align 8, !tbaa !5
  %121 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl18rmatrixmixedsolvemEPKNS_9ae_matrixES2_PKNS_9ae_vectorElS2_lPS0_PNS_17densesolverreportEPNS_8ae_stateE(ptr noundef %116, ptr noundef %117, ptr noundef %118, i64 noundef %119, ptr noundef %18, i64 noundef 1, ptr noundef %19, ptr noundef %120, ptr noundef %121)
  %122 = load ptr, ptr %14, align 8, !tbaa !5
  %123 = load i64, ptr %12, align 8, !tbaa !9
  %124 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %122, i64 noundef %123, ptr noundef %124)
  %125 = load i64, ptr %12, align 8, !tbaa !9
  %126 = load ptr, ptr %14, align 8, !tbaa !5
  %127 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rcopycvElPKNS_9ae_matrixElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %125, ptr noundef %19, i64 noundef 0, ptr noundef %126, ptr noundef %127)
  %128 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %128)
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #4
  ret void
}

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

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

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #2

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

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

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

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

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

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 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


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

@.str.124 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.153 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.154 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.155 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.156 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.157 = external hidden unnamed_addr constant [54 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 void @_ZN11alglib_impl17rmatrixmixedsolveEPKNS_9ae_matrixES2_PKNS_9ae_vectorElS5_PS3_PNS_17densesolverreportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) local_unnamed_addr #3 {
  %9 = alloca %"struct.alglib_impl::ae_frame", align 8
  %10 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %11 = alloca %"struct.alglib_impl::ae_matrix", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %11) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %7, ptr noundef nonnull %9)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %10, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %11, i8 0, i64 80, i1 false)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %5)
  call void @_ZN11alglib_impl24_densesolverreport_clearEPv(ptr noundef %6)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %10, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %11, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  %12 = icmp sgt i64 %3, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.148, ptr noundef %7)
  %13 = load i64, ptr %0, align 8, !tbaa !5
  %14 = icmp sge i64 %13, %3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %14, ptr noundef nonnull @.str.149, ptr noundef %7)
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = load i64, ptr %15, align 8, !tbaa !13
  %17 = icmp sge i64 %16, %3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.150, ptr noundef %7)
  %18 = load i64, ptr %1, align 8, !tbaa !5
  %19 = icmp sge i64 %18, %3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef nonnull @.str.151, ptr noundef %7)
  %20 = getelementptr inbounds i8, ptr %1, i64 8
  %21 = load i64, ptr %20, align 8, !tbaa !13
  %22 = icmp sge i64 %21, %3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %22, ptr noundef nonnull @.str.152, ptr noundef %7)
  %23 = load i64, ptr %2, align 8, !tbaa !14
  %24 = icmp sge i64 %23, %3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %24, ptr noundef nonnull @.str.153, ptr noundef %7)
  %25 = load i64, ptr %4, align 8, !tbaa !14
  %26 = icmp sge i64 %25, %3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %26, ptr noundef nonnull @.str.154, ptr noundef %7)
  %27 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef %3, i64 noundef %3, ptr noundef %7)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef nonnull @.str.155, ptr noundef %7)
  %28 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %1, i64 noundef %3, i64 noundef %3, ptr noundef %7)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %28, ptr noundef nonnull @.str.156, ptr noundef %7)
  %29 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef %3, ptr noundef %7)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %29, ptr noundef nonnull @.str.157, ptr noundef %7)
  br i1 %12, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %8
  %30 = getelementptr inbounds i8, ptr %2, i64 56
  br label %31

31:                                               ; preds = %.lr.ph, %31
  %.067 = phi i64 [ 0, %.lr.ph ], [ %35, %31 ]
  %32 = load ptr, ptr %30, align 8, !tbaa !16
  %33 = getelementptr inbounds i64, ptr %32, i64 %.067
  %34 = load i64, ptr %33, align 8, !tbaa !17
  %spec.select = icmp ult i64 %34, %3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %spec.select, ptr noundef nonnull @.str.124, ptr noundef %7)
  %35 = add nuw nsw i64 %.067, 1
  %exitcond.not = icmp eq i64 %35, %3
  br i1 %exitcond.not, label %._crit_edge, label %31, !llvm.loop !18

._crit_edge:                                      ; preds = %31, %8
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %3, i64 noundef 1, ptr noundef %7)
  call void @_ZN11alglib_impl7rcopyvcElPKNS_9ae_vectorEPNS_9ae_matrixElPNS_8ae_stateE(i64 noundef %3, ptr noundef nonnull %4, ptr noundef nonnull %10, i64 noundef 0, ptr noundef %7)
  call void @_ZN11alglib_impl18rmatrixmixedsolvemEPKNS_9ae_matrixES2_PKNS_9ae_vectorElS2_lPS0_PNS_17densesolverreportEPNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %2, i64 noundef %3, ptr noundef nonnull %10, i64 noundef 1, ptr noundef nonnull %11, ptr noundef %6, ptr noundef %7)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %5, i64 noundef %3, ptr noundef %7)
  call void @_ZN11alglib_impl7rcopycvElPKNS_9ae_matrixElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %3, ptr noundef nonnull %11, i64 noundef 0, ptr noundef %5, ptr noundef %7)
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %7)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  ret void
}

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

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

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) local_unnamed_addr #2

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

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

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_impl7rcopyvcElPKNS_9ae_vectorEPNS_9ae_matrixElPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

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 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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