; 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_complex" = type { double, double }
%"struct.alglib_impl::densesolverreport" = type { i64, double, double }

@.str.170 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.301 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.302 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.303 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.304 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.305 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.306 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.307 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.308 = 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_impl15hpdmatrixsolvemEPKNS_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 %"struct.alglib_impl::ae_complex", align 8
  %24 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i64 %1, ptr %10, align 8, !tbaa !9
  %25 = zext i1 %2 to i8
  store i8 %25, 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) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %26 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %26, ptr noundef %17)
  call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 80, i1 false)
  %27 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %27)
  %28 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZN11alglib_impl24_densesolverreport_clearEPv(ptr noundef %28)
  %29 = 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 4, ptr noundef %29, i1 noundef zeroext true)
  %30 = load i64, ptr %10, align 8, !tbaa !9
  %31 = icmp sgt i64 %30, 0
  %32 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %31, ptr noundef @.str.301, ptr noundef %32)
  %33 = load i64, ptr %13, align 8, !tbaa !9
  %34 = icmp sgt i64 %33, 0
  %35 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %34, ptr noundef @.str.302, ptr noundef %35)
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %36, i32 0, i32 0
  %38 = load i64, ptr %37, align 8, !tbaa !13
  %39 = load i64, ptr %10, align 8, !tbaa !9
  %40 = icmp sge i64 %38, %39
  %41 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %40, ptr noundef @.str.303, ptr noundef %41)
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %42, i32 0, i32 1
  %44 = load i64, ptr %43, align 8, !tbaa !16
  %45 = load i64, ptr %10, align 8, !tbaa !9
  %46 = icmp sge i64 %44, %45
  %47 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %46, ptr noundef @.str.304, ptr noundef %47)
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %48, i32 0, i32 0
  %50 = load i64, ptr %49, align 8, !tbaa !13
  %51 = load i64, ptr %10, align 8, !tbaa !9
  %52 = icmp sge i64 %50, %51
  %53 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %52, ptr noundef @.str.305, ptr noundef %53)
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %54, i32 0, i32 1
  %56 = load i64, ptr %55, align 8, !tbaa !16
  %57 = load i64, ptr %13, align 8, !tbaa !9
  %58 = icmp sge i64 %56, %57
  %59 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %58, ptr noundef @.str.306, ptr noundef %59)
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = load i64, ptr %10, align 8, !tbaa !9
  %62 = load i8, ptr %11, align 1, !tbaa !11, !range !17, !noundef !18
  %63 = trunc i8 %62 to i1
  %64 = load ptr, ptr %16, align 8, !tbaa !5
  %65 = call noundef zeroext i1 @_ZN11alglib_impl17isfinitectrmatrixEPKNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef %60, i64 noundef %61, i1 noundef zeroext %63, ptr noundef %64)
  %66 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %65, ptr noundef @.str.307, ptr noundef %66)
  %67 = load ptr, ptr %12, align 8, !tbaa !5
  %68 = load i64, ptr %10, align 8, !tbaa !9
  %69 = load i64, ptr %13, align 8, !tbaa !9
  %70 = load ptr, ptr %16, align 8, !tbaa !5
  %71 = call noundef zeroext i1 @_ZN11alglib_impl15isfinitecmatrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %67, i64 noundef %68, i64 noundef %69, ptr noundef %70)
  %72 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %71, ptr noundef @.str.308, ptr noundef %72)
  %73 = load i64, ptr %10, align 8, !tbaa !9
  %74 = load i64, ptr %10, align 8, !tbaa !9
  %75 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %18, i64 noundef %73, i64 noundef %74, ptr noundef %75)
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %76

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

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

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

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

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

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

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

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

123:                                              ; preds = %152, %118
  %124 = load i64, ptr %19, align 8, !tbaa !9
  %125 = load i64, ptr %10, align 8, !tbaa !9
  %126 = sub nsw i64 %125, 1
  %127 = icmp sle i64 %124, %126
  br i1 %127, label %128, label %155

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

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

134:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #5
  %135 = call { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef 0)
  %136 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %137 = extractvalue { double, double } %135, 0
  store double %137, ptr %136, align 8
  %138 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %139 = extractvalue { double, double } %135, 1
  store double %139, ptr %138, align 8
  %140 = load ptr, ptr %14, align 8, !tbaa !5
  %141 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %140, i32 0, i32 6
  %142 = load ptr, ptr %141, align 8, !tbaa !19
  %143 = load i64, ptr %19, align 8, !tbaa !9
  %144 = getelementptr inbounds ptr, ptr %142, i64 %143
  %145 = load ptr, ptr %144, align 8, !tbaa !5
  %146 = load i64, ptr %20, align 8, !tbaa !9
  %147 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %145, i64 %146
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %147, ptr align 8 %23, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  br label %148

148:                                              ; preds = %134
  %149 = load i64, ptr %20, align 8, !tbaa !9
  %150 = add nsw i64 %149, 1
  store i64 %150, ptr %20, align 8, !tbaa !9
  br label %129, !llvm.loop !25

151:                                              ; preds = %129
  br label %152

152:                                              ; preds = %151
  %153 = load i64, ptr %19, align 8, !tbaa !9
  %154 = add nsw i64 %153, 1
  store i64 %154, ptr %19, align 8, !tbaa !9
  br label %123, !llvm.loop !26

155:                                              ; preds = %123
  %156 = load ptr, ptr %15, align 8, !tbaa !5
  %157 = getelementptr inbounds %"struct.alglib_impl::densesolverreport", ptr %156, i32 0, i32 1
  store double 0.000000e+00, ptr %157, align 8, !tbaa !27
  %158 = load ptr, ptr %15, align 8, !tbaa !5
  %159 = getelementptr inbounds %"struct.alglib_impl::densesolverreport", ptr %158, i32 0, i32 2
  store double 0.000000e+00, ptr %159, align 8, !tbaa !29
  %160 = load ptr, ptr %15, align 8, !tbaa !5
  %161 = getelementptr inbounds %"struct.alglib_impl::densesolverreport", ptr %160, i32 0, i32 0
  store i64 -3, ptr %161, align 8, !tbaa !30
  %162 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %162)
  store i32 1, ptr %24, align 4
  br label %176

163:                                              ; preds = %112
  %164 = load ptr, ptr %15, align 8, !tbaa !5
  %165 = getelementptr inbounds %"struct.alglib_impl::densesolverreport", ptr %164, i32 0, i32 0
  store i64 1, ptr %165, align 8, !tbaa !30
  %166 = load i64, ptr %10, align 8, !tbaa !9
  %167 = load i8, ptr %11, align 1, !tbaa !11, !range !17, !noundef !18
  %168 = trunc i8 %167 to i1
  %169 = load ptr, ptr %9, align 8, !tbaa !5
  %170 = load ptr, ptr %12, align 8, !tbaa !5
  %171 = load i64, ptr %13, align 8, !tbaa !9
  %172 = load ptr, ptr %14, align 8, !tbaa !5
  %173 = load ptr, ptr %15, align 8, !tbaa !5
  %174 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_implL49directdensesolvers_hpdmatrixcholeskysolveinternalEPKNS_9ae_matrixElbS2_bS2_lPS0_PNS_17densesolverreportEPNS_8ae_stateE(ptr noundef %18, i64 noundef %166, i1 noundef zeroext %168, ptr noundef %169, i1 noundef zeroext true, ptr noundef %170, i64 noundef %171, ptr noundef %172, ptr noundef %173, ptr noundef %174)
  %175 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %175)
  store i32 0, ptr %24, align 4
  br label %176

176:                                              ; preds = %163, %155
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #5
  %177 = load i32, ptr %24, align 4
  switch i32 %177, label %179 [
    i32 0, label %178
    i32 1, label %178
  ]

178:                                              ; preds = %176, %176
  ret void

179:                                              ; preds = %176
  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 { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef) #2

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

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 void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) #2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL49directdensesolvers_hpdmatrixcholeskysolveinternalEPKNS_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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = !{i64 0, i64 8, !23, i64 8, i64 8, !23}
!23 = !{!24, !24, i64 0}
!24 = !{!"double", !7, i64 0}
!25 = distinct !{!25, !21}
!26 = distinct !{!26, !21}
!27 = !{!28, !24, i64 8}
!28 = !{!"_ZTSN11alglib_impl17densesolverreportE", !10, i64 0, !24, i64 8, !24, i64 16}
!29 = !{!28, !24, i64 16}
!30 = !{!28, !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 }
%"struct.alglib_impl::ae_complex" = type { double, double }

@.str.170 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.301 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.302 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.303 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.304 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.305 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.306 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.307 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.308 = 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_impl15hpdmatrixsolvemEPKNS_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 4, 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.301, ptr noundef %7)
  %12 = icmp sgt i64 %4, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.302, 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.303, 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.304, 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.305, 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.306, ptr noundef %7)
  %23 = call noundef zeroext i1 @_ZN11alglib_impl17isfinitectrmatrixEPKNS_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.307, ptr noundef %7)
  %24 = call noundef zeroext i1 @_ZN11alglib_impl15isfinitecmatrixEPKNS_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.308, 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
  %.084.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 %.084.us
  %30 = load ptr, ptr %29, align 8, !tbaa !15
  %31 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %30, i64 %.084.us
  %32 = load ptr, ptr %27, align 8, !tbaa !14
  %33 = getelementptr inbounds ptr, ptr %32, i64 %.084.us
  %34 = load ptr, ptr %33, align 8, !tbaa !15
  %35 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %34, i64 %.084.us
  %36 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %.084.us, i64 noundef %25)
  call void @_ZN11alglib_impl10ae_v_cmoveEPNS_10ae_complexElPKS0_lPKcl(ptr noundef %31, i64 noundef 1, ptr noundef %35, i64 noundef 1, ptr noundef nonnull @.str.170, i64 noundef %36)
  %37 = add nuw nsw i64 %.084.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
  %.084 = 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 %.084
  %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 %.084
  %43 = load ptr, ptr %42, align 8, !tbaa !15
  %44 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %.084)
  call void @_ZN11alglib_impl10ae_v_cmoveEPNS_10ae_complexElPKS0_lPKcl(ptr noundef %40, i64 noundef 1, ptr noundef %43, i64 noundef 1, ptr noundef nonnull @.str.170, i64 noundef %44)
  %45 = add nuw nsw i64 %.084, 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_impl17hpdmatrixcholeskyEPNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %7)
  br i1 %46, label %60, 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, label %._crit_edge91

.preheader.us:                                    ; preds = %.preheader.lr.ph, %._crit_edge88.us
  %.190.us = phi i64 [ %58, %._crit_edge88.us ], [ 0, %.preheader.lr.ph ]
  br label %49

49:                                               ; preds = %.preheader.us, %49
  %.07686.us = phi i64 [ 0, %.preheader.us ], [ %57, %49 ]
  %50 = call { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef 0)
  %51 = extractvalue { double, double } %50, 0
  %52 = extractvalue { double, double } %50, 1
  %53 = load ptr, ptr %48, align 8, !tbaa !14
  %54 = getelementptr inbounds ptr, ptr %53, i64 %.190.us
  %55 = load ptr, ptr %54, align 8, !tbaa !15
  %56 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %55, i64 %.07686.us
  store double %51, ptr %56, align 8, !tbaa !18
  %.sroa.4.0..sroa_idx.us = getelementptr inbounds i8, ptr %56, i64 8
  store double %52, ptr %.sroa.4.0..sroa_idx.us, align 8, !tbaa !18
  %57 = add nuw nsw i64 %.07686.us, 1
  %exitcond95.not = icmp eq i64 %57, %4
  br i1 %exitcond95.not, label %._crit_edge88.us, label %49, !llvm.loop !20

._crit_edge88.us:                                 ; preds = %49
  %58 = add nuw nsw i64 %.190.us, 1
  %exitcond96.not = icmp eq i64 %58, %1
  br i1 %exitcond96.not, label %._crit_edge91, label %.preheader.us, !llvm.loop !21

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

60:                                               ; preds = %._crit_edge
  store i64 1, ptr %6, align 8, !tbaa !22
  call void @_ZN11alglib_implL49directdensesolvers_hpdmatrixcholeskysolveinternalEPKNS_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 %61

61:                                               ; preds = %60, %._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 { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 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 void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr 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_impl15isfinitecmatrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

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

declare noundef zeroext i1 @_ZN11alglib_impl17hpdmatrixcholeskyEPNS_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_hpdmatrixcholeskysolveinternalEPKNS_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, !17}
!22 = !{!23, !7, i64 0}
!23 = !{!"_ZTSN11alglib_impl17densesolverreportE", !7, i64 0, !19, i64 8, !19, i64 16}


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