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

@.str.248 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.249 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.250 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.251 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.252 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.253 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.254 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.255 = external hidden unnamed_addr constant [52 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_impl15spdmatrixsolvemEPKNS_9ae_matrixElbS2_lPS0_PNS_17densesolverreportEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #3 {
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i64, 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 i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i64 %1, ptr %10, align 8, !tbaa !9
  %24 = zext i1 %2 to i8
  store i8 %24, ptr %11, align 1, !tbaa !11
  store ptr %3, ptr %12, align 8, !tbaa !5
  store i64 %4, ptr %13, align 8, !tbaa !9
  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 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %25 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %25, ptr noundef %17)
  call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 80, i1 false)
  %26 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %26)
  %27 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZN11alglib_impl24_densesolverreport_clearEPv(ptr noundef %27)
  %28 = 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 %28, i1 noundef zeroext true)
  %29 = load i64, ptr %10, align 8, !tbaa !9
  %30 = icmp sgt i64 %29, 0
  %31 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %30, ptr noundef @.str.248, ptr noundef %31)
  %32 = load i64, ptr %13, align 8, !tbaa !9
  %33 = icmp sgt i64 %32, 0
  %34 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %33, ptr noundef @.str.249, 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 0
  %37 = load i64, ptr %36, align 8, !tbaa !13
  %38 = load i64, ptr %10, 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.250, ptr noundef %40)
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %41, i32 0, i32 1
  %43 = load i64, ptr %42, align 8, !tbaa !16
  %44 = load i64, ptr %10, 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.251, ptr noundef %46)
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %47, i32 0, i32 0
  %49 = load i64, ptr %48, align 8, !tbaa !13
  %50 = load i64, ptr %10, 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.252, ptr noundef %52)
  %53 = load ptr, ptr %12, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %53, i32 0, i32 1
  %55 = load i64, ptr %54, align 8, !tbaa !16
  %56 = load i64, ptr %13, 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.253, ptr noundef %58)
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = load i64, ptr %10, align 8, !tbaa !9
  %61 = load i8, ptr %11, align 1, !tbaa !11, !range !17, !noundef !18
  %62 = trunc i8 %61 to i1
  %63 = load ptr, ptr %16, align 8, !tbaa !5
  %64 = call noundef zeroext i1 @_ZN11alglib_impl17isfinitertrmatrixEPKNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef %59, i64 noundef %60, i1 noundef zeroext %62, ptr noundef %63)
  %65 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %64, ptr noundef @.str.254, ptr noundef %65)
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = load i64, ptr %10, align 8, !tbaa !9
  %68 = load i64, ptr %13, align 8, !tbaa !9
  %69 = load ptr, ptr %16, align 8, !tbaa !5
  %70 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %66, i64 noundef %67, i64 noundef %68, ptr noundef %69)
  %71 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %70, ptr noundef @.str.255, ptr noundef %71)
  %72 = load i64, ptr %10, align 8, !tbaa !9
  %73 = load i64, ptr %10, align 8, !tbaa !9
  %74 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %18, i64 noundef %72, i64 noundef %73, ptr noundef %74)
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %75

75:                                               ; preds = %108, %8
  %76 = load i64, ptr %19, align 8, !tbaa !9
  %77 = load i64, ptr %10, align 8, !tbaa !9
  %78 = sub nsw i64 %77, 1
  %79 = icmp sle i64 %76, %78
  br i1 %79, label %80, label %111

80:                                               ; preds = %75
  %81 = load i8, ptr %11, align 1, !tbaa !11, !range !17, !noundef !18
  %82 = trunc i8 %81 to i1
  br i1 %82, label %83, label %87

83:                                               ; preds = %80
  %84 = load i64, ptr %19, align 8, !tbaa !9
  store i64 %84, ptr %21, align 8, !tbaa !9
  %85 = load i64, ptr %10, align 8, !tbaa !9
  %86 = sub nsw i64 %85, 1
  store i64 %86, ptr %22, align 8, !tbaa !9
  br label %89

87:                                               ; preds = %80
  store i64 0, ptr %21, align 8, !tbaa !9
  %88 = load i64, ptr %19, align 8, !tbaa !9
  store i64 %88, ptr %22, align 8, !tbaa !9
  br label %89

89:                                               ; preds = %87, %83
  %90 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %18, i32 0, i32 6
  %91 = load ptr, ptr %90, align 8, !tbaa !19
  %92 = load i64, ptr %19, align 8, !tbaa !9
  %93 = getelementptr inbounds ptr, ptr %91, i64 %92
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = load i64, ptr %21, align 8, !tbaa !9
  %96 = getelementptr inbounds double, ptr %94, i64 %95
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %97, i32 0, i32 6
  %99 = load ptr, ptr %98, align 8, !tbaa !19
  %100 = load i64, ptr %19, align 8, !tbaa !9
  %101 = getelementptr inbounds ptr, ptr %99, i64 %100
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  %103 = load i64, ptr %21, align 8, !tbaa !9
  %104 = getelementptr inbounds double, ptr %102, i64 %103
  %105 = load i64, ptr %21, align 8, !tbaa !9
  %106 = load i64, ptr %22, align 8, !tbaa !9
  %107 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %105, i64 noundef %106)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %96, i64 noundef 1, ptr noundef %104, i64 noundef 1, i64 noundef %107)
  br label %108

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

111:                                              ; preds = %75
  %112 = load i64, ptr %10, align 8, !tbaa !9
  %113 = load i8, ptr %11, align 1, !tbaa !11, !range !17, !noundef !18
  %114 = trunc i8 %113 to i1
  %115 = load ptr, ptr %16, align 8, !tbaa !5
  %116 = call noundef zeroext i1 @_ZN11alglib_impl17spdmatrixcholeskyEPNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef %18, i64 noundef %112, i1 noundef zeroext %114, ptr noundef %115)
  br i1 %116, label %157, label %117

117:                                              ; preds = %111
  %118 = load ptr, ptr %14, align 8, !tbaa !5
  %119 = load i64, ptr %10, align 8, !tbaa !9
  %120 = load i64, ptr %13, align 8, !tbaa !9
  %121 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %118, i64 noundef %119, i64 noundef %120, ptr noundef %121)
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %122

122:                                              ; preds = %146, %117
  %123 = load i64, ptr %19, align 8, !tbaa !9
  %124 = load i64, ptr %10, align 8, !tbaa !9
  %125 = sub nsw i64 %124, 1
  %126 = icmp sle i64 %123, %125
  br i1 %126, label %127, label %149

127:                                              ; preds = %122
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %128

128:                                              ; preds = %142, %127
  %129 = load i64, ptr %20, align 8, !tbaa !9
  %130 = load i64, ptr %13, align 8, !tbaa !9
  %131 = sub nsw i64 %130, 1
  %132 = icmp sle i64 %129, %131
  br i1 %132, label %133, label %145

133:                                              ; preds = %128
  %134 = load ptr, ptr %14, align 8, !tbaa !5
  %135 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %134, i32 0, i32 6
  %136 = load ptr, ptr %135, align 8, !tbaa !19
  %137 = load i64, ptr %19, align 8, !tbaa !9
  %138 = getelementptr inbounds ptr, ptr %136, i64 %137
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  %140 = load i64, ptr %20, align 8, !tbaa !9
  %141 = getelementptr inbounds double, ptr %139, i64 %140
  store double 0.000000e+00, ptr %141, align 8, !tbaa !22
  br label %142

142:                                              ; preds = %133
  %143 = load i64, ptr %20, align 8, !tbaa !9
  %144 = add nsw i64 %143, 1
  store i64 %144, ptr %20, align 8, !tbaa !9
  br label %128, !llvm.loop !24

145:                                              ; preds = %128
  br label %146

146:                                              ; preds = %145
  %147 = load i64, ptr %19, align 8, !tbaa !9
  %148 = add nsw i64 %147, 1
  store i64 %148, ptr %19, align 8, !tbaa !9
  br label %122, !llvm.loop !25

149:                                              ; preds = %122
  %150 = load ptr, ptr %15, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.alglib_impl::densesolverreport", ptr %150, i32 0, i32 1
  store double 0.000000e+00, ptr %151, align 8, !tbaa !26
  %152 = load ptr, ptr %15, align 8, !tbaa !5
  %153 = getelementptr inbounds %"struct.alglib_impl::densesolverreport", ptr %152, i32 0, i32 2
  store double 0.000000e+00, ptr %153, align 8, !tbaa !28
  %154 = load ptr, ptr %15, align 8, !tbaa !5
  %155 = getelementptr inbounds %"struct.alglib_impl::densesolverreport", ptr %154, i32 0, i32 0
  store i64 -3, ptr %155, align 8, !tbaa !29
  %156 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %156)
  store i32 1, ptr %23, align 4
  br label %170

157:                                              ; preds = %111
  %158 = load ptr, ptr %15, align 8, !tbaa !5
  %159 = getelementptr inbounds %"struct.alglib_impl::densesolverreport", ptr %158, i32 0, i32 0
  store i64 1, ptr %159, align 8, !tbaa !29
  %160 = load i64, ptr %10, align 8, !tbaa !9
  %161 = load i8, ptr %11, align 1, !tbaa !11, !range !17, !noundef !18
  %162 = trunc i8 %161 to i1
  %163 = load ptr, ptr %9, align 8, !tbaa !5
  %164 = load ptr, ptr %12, align 8, !tbaa !5
  %165 = load i64, ptr %13, align 8, !tbaa !9
  %166 = load ptr, ptr %14, align 8, !tbaa !5
  %167 = load ptr, ptr %15, align 8, !tbaa !5
  %168 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_implL49directdensesolvers_spdmatrixcholeskysolveinternalEPKNS_9ae_matrixElbS2_bS2_lPS0_PNS_17densesolverreportEPNS_8ae_stateE(ptr noundef %18, i64 noundef %160, i1 noundef zeroext %162, ptr noundef %163, i1 noundef zeroext true, ptr noundef %164, i64 noundef %165, ptr noundef %166, ptr noundef %167, ptr noundef %168)
  %169 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %169)
  store i32 0, ptr %23, align 4
  br label %170

170:                                              ; preds = %157, %149
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, 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
  %171 = load i32, ptr %23, align 4
  switch i32 %171, label %173 [
    i32 0, label %172
    i32 1, label %172
  ]

172:                                              ; preds = %170, %170
  ret void

173:                                              ; preds = %170
  unreachable
}

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

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

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) #2

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL49directdensesolvers_spdmatrixcholeskysolveinternalEPKNS_9ae_matrixElbS2_bS2_lPS0_PNS_17densesolverreportEPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, ptr noundef, i1 noundef zeroext, ptr noundef, i64 noundef, ptr 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, !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 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!23, !23, i64 0}
!23 = !{!"double", !7, i64 0}
!24 = distinct !{!24, !21}
!25 = distinct !{!25, !21}
!26 = !{!27, !23, i64 8}
!27 = !{!"_ZTSN11alglib_impl17densesolverreportE", !10, i64 0, !23, i64 8, !23, i64 16}
!28 = !{!27, !23, i64 16}
!29 = !{!27, !10, i64 0}


; 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.248 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.249 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.250 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.251 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.252 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.253 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.254 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.255 = external hidden unnamed_addr constant [52 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_impl15spdmatrixsolvemEPKNS_9ae_matrixElbS2_lPS0_PNS_17densesolverreportEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3, i64 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
  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 @_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 @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(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)
  %11 = icmp sgt i64 %1, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %11, ptr noundef nonnull @.str.248, ptr noundef %7)
  %12 = icmp sgt i64 %4, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.249, ptr noundef %7)
  %13 = load i64, ptr %0, align 8, !tbaa !5
  %14 = icmp sge i64 %13, %1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %14, ptr noundef nonnull @.str.250, 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, %1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.251, ptr noundef %7)
  %18 = load i64, ptr %3, align 8, !tbaa !5
  %19 = icmp sge i64 %18, %1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef nonnull @.str.252, ptr noundef %7)
  %20 = getelementptr inbounds i8, ptr %3, i64 8
  %21 = load i64, ptr %20, align 8, !tbaa !13
  %22 = icmp sge i64 %21, %4
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %22, ptr noundef nonnull @.str.253, ptr noundef %7)
  %23 = call noundef zeroext i1 @_ZN11alglib_impl17isfinitertrmatrixEPKNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %7)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %23, ptr noundef nonnull @.str.254, ptr noundef %7)
  %24 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %1, i64 noundef %4, ptr noundef %7)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %24, ptr noundef nonnull @.str.255, ptr noundef %7)
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %1, i64 noundef %1, ptr noundef %7)
  br i1 %11, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %8
  %25 = add nsw i64 %1, -1
  %26 = getelementptr inbounds i8, ptr %10, i64 72
  %27 = getelementptr inbounds i8, ptr %0, i64 72
  br i1 %2, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %.lr.ph.split.us
  %.07884.us = phi i64 [ %37, %.lr.ph.split.us ], [ 0, %.lr.ph ]
  %28 = load ptr, ptr %26, align 8, !tbaa !14
  %29 = getelementptr inbounds ptr, ptr %28, i64 %.07884.us
  %30 = load ptr, ptr %29, align 8, !tbaa !15
  %31 = getelementptr inbounds double, ptr %30, i64 %.07884.us
  %32 = load ptr, ptr %27, align 8, !tbaa !14
  %33 = getelementptr inbounds ptr, ptr %32, i64 %.07884.us
  %34 = load ptr, ptr %33, align 8, !tbaa !15
  %35 = getelementptr inbounds double, ptr %34, i64 %.07884.us
  %36 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %.07884.us, i64 noundef %25)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %31, i64 noundef 1, ptr noundef %35, i64 noundef 1, i64 noundef %36)
  %37 = add nuw nsw i64 %.07884.us, 1
  %exitcond94.not = icmp eq i64 %37, %1
  br i1 %exitcond94.not, label %._crit_edge, label %.lr.ph.split.us, !llvm.loop !16

.lr.ph.split:                                     ; preds = %.lr.ph, %.lr.ph.split
  %.07884 = phi i64 [ %45, %.lr.ph.split ], [ 0, %.lr.ph ]
  %38 = load ptr, ptr %26, align 8, !tbaa !14
  %39 = getelementptr inbounds ptr, ptr %38, i64 %.07884
  %40 = load ptr, ptr %39, align 8, !tbaa !15
  %41 = load ptr, ptr %27, align 8, !tbaa !14
  %42 = getelementptr inbounds ptr, ptr %41, i64 %.07884
  %43 = load ptr, ptr %42, align 8, !tbaa !15
  %44 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %.07884)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %40, i64 noundef 1, ptr noundef %43, i64 noundef 1, i64 noundef %44)
  %45 = add nuw nsw i64 %.07884, 1
  %exitcond.not = icmp eq i64 %45, %1
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.split, !llvm.loop !16

._crit_edge:                                      ; preds = %.lr.ph.split, %.lr.ph.split.us, %8
  %46 = call noundef zeroext i1 @_ZN11alglib_impl17spdmatrixcholeskyEPNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %7)
  br i1 %46, label %77, label %47

47:                                               ; preds = %._crit_edge
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %5, i64 noundef %1, i64 noundef %4, ptr noundef %7)
  br i1 %11, label %.preheader.lr.ph, label %._crit_edge91

.preheader.lr.ph:                                 ; preds = %47
  %48 = getelementptr inbounds i8, ptr %5, i64 72
  br i1 %12, label %.preheader.us.preheader, label %._crit_edge91

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %xtraiter = and i64 %4, 3
  %49 = icmp ult i64 %4, 4
  %unroll_iter = and i64 %4, 9223372036854775804
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge88.us
  %.190.us = phi i64 [ %75, %._crit_edge88.us ], [ 0, %.preheader.us.preheader ]
  br i1 %49, label %._crit_edge88.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %.07786.us = phi i64 [ %69, %.preheader.us.new ], [ 0, %.preheader.us ]
  %niter = phi i64 [ %niter.next.3, %.preheader.us.new ], [ 0, %.preheader.us ]
  %50 = load ptr, ptr %48, align 8, !tbaa !14
  %51 = getelementptr inbounds ptr, ptr %50, i64 %.190.us
  %52 = load ptr, ptr %51, align 8, !tbaa !15
  %53 = getelementptr inbounds double, ptr %52, i64 %.07786.us
  store double 0.000000e+00, ptr %53, align 8, !tbaa !18
  %54 = or disjoint i64 %.07786.us, 1
  %55 = load ptr, ptr %48, align 8, !tbaa !14
  %56 = getelementptr inbounds ptr, ptr %55, i64 %.190.us
  %57 = load ptr, ptr %56, align 8, !tbaa !15
  %58 = getelementptr inbounds double, ptr %57, i64 %54
  store double 0.000000e+00, ptr %58, align 8, !tbaa !18
  %59 = or disjoint i64 %.07786.us, 2
  %60 = load ptr, ptr %48, align 8, !tbaa !14
  %61 = getelementptr inbounds ptr, ptr %60, i64 %.190.us
  %62 = load ptr, ptr %61, align 8, !tbaa !15
  %63 = getelementptr inbounds double, ptr %62, i64 %59
  store double 0.000000e+00, ptr %63, align 8, !tbaa !18
  %64 = or disjoint i64 %.07786.us, 3
  %65 = load ptr, ptr %48, align 8, !tbaa !14
  %66 = getelementptr inbounds ptr, ptr %65, i64 %.190.us
  %67 = load ptr, ptr %66, align 8, !tbaa !15
  %68 = getelementptr inbounds double, ptr %67, i64 %64
  store double 0.000000e+00, ptr %68, align 8, !tbaa !18
  %69 = add nuw nsw i64 %.07786.us, 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_edge88.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !20

._crit_edge88.us.unr-lcssa:                       ; preds = %.preheader.us.new, %.preheader.us
  %.07786.us.unr = phi i64 [ 0, %.preheader.us ], [ %69, %.preheader.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge88.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge88.us.unr-lcssa, %.epil.preheader
  %.07786.us.epil = phi i64 [ %74, %.epil.preheader ], [ %.07786.us.unr, %._crit_edge88.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge88.us.unr-lcssa ]
  %70 = load ptr, ptr %48, align 8, !tbaa !14
  %71 = getelementptr inbounds ptr, ptr %70, i64 %.190.us
  %72 = load ptr, ptr %71, align 8, !tbaa !15
  %73 = getelementptr inbounds double, ptr %72, i64 %.07786.us.epil
  store double 0.000000e+00, ptr %73, align 8, !tbaa !18
  %74 = add nuw nsw i64 %.07786.us.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_edge88.us, label %.epil.preheader, !llvm.loop !21

._crit_edge88.us:                                 ; preds = %.epil.preheader, %._crit_edge88.us.unr-lcssa
  %75 = add nuw nsw i64 %.190.us, 1
  %exitcond96.not = icmp eq i64 %75, %1
  br i1 %exitcond96.not, label %._crit_edge91, label %.preheader.us, !llvm.loop !23

._crit_edge91:                                    ; preds = %._crit_edge88.us, %.preheader.lr.ph, %47
  %76 = getelementptr inbounds i8, ptr %6, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %76, i8 0, i64 16, i1 false)
  store i64 -3, ptr %6, align 8, !tbaa !24
  br label %78

77:                                               ; preds = %._crit_edge
  store i64 1, ptr %6, align 8, !tbaa !24
  call void @_ZN11alglib_implL49directdensesolvers_spdmatrixcholeskysolveinternalEPKNS_9ae_matrixElbS2_bS2_lPS0_PNS_17densesolverreportEPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %1, i1 noundef zeroext %2, ptr noundef nonnull %0, i1 noundef zeroext true, ptr noundef nonnull %3, i64 noundef %4, ptr noundef %5, ptr noundef nonnull %6, ptr noundef %7)
  br label %78

78:                                               ; preds = %77, %._crit_edge91
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %7)
  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
}

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

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

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL49directdensesolvers_spdmatrixcholeskysolveinternalEPKNS_9ae_matrixElbS2_bS2_lPS0_PNS_17densesolverreportEPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, ptr noundef, i1 noundef zeroext, ptr noundef, i64 noundef, ptr 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 = !{!8, !8, i64 0}
!15 = !{!12, !12, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !8, i64 0}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.unroll.disable"}
!23 = distinct !{!23, !17}
!24 = !{!25, !7, i64 0}
!25 = !{!"_ZTSN11alglib_impl17densesolverreportE", !7, i64 0, !19, i64 8, !19, i64 16}


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