; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src (linalg)

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

; 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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl10smatrixevdEPNS_9ae_matrixEllbPNS_9ae_vectorES1_PNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i1 noundef zeroext, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl11smatrixgevdEPNS_9ae_matrixElbS1_bllPNS_9ae_vectorES1_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3, i1 noundef zeroext %4, i64 noundef %5, i64 noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) #2 {
  %11 = alloca i1, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i8, align 1
  %15 = alloca ptr, align 8
  %16 = alloca i8, align 1
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca %"struct.alglib_impl::ae_frame", align 8
  %23 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %24 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %25 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %26 = alloca i8, align 1
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  %32 = alloca i64, align 8
  %33 = alloca double, align 8
  %34 = alloca i8, align 1
  %35 = alloca i32, align 4
  store ptr %0, ptr %12, align 8, !tbaa !5
  store i64 %1, ptr %13, align 8, !tbaa !9
  %36 = zext i1 %2 to i8
  store i8 %36, ptr %14, align 1, !tbaa !11
  store ptr %3, ptr %15, align 8, !tbaa !5
  %37 = zext i1 %4 to i8
  store i8 %37, ptr %16, align 1, !tbaa !11
  store i64 %5, ptr %17, align 8, !tbaa !9
  store i64 %6, ptr %18, align 8, !tbaa !9
  store ptr %7, ptr %19, align 8, !tbaa !5
  store ptr %8, ptr %20, align 8, !tbaa !5
  store ptr %9, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #4
  %38 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %38, ptr noundef %22)
  call void @llvm.memset.p0.i64(ptr align 8 %23, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %24, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %25, i8 0, i64 80, i1 false)
  %39 = load ptr, ptr %12, align 8, !tbaa !5
  %40 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixES1_PNS_8ae_stateEb(ptr noundef %23, ptr noundef %39, ptr noundef %40, i1 noundef zeroext true)
  store ptr %23, ptr %12, align 8, !tbaa !5
  %41 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %41)
  %42 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %42)
  %43 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %24, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %43, i1 noundef zeroext true)
  %44 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %25, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %44, i1 noundef zeroext true)
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  %46 = load i64, ptr %13, align 8, !tbaa !9
  %47 = load i8, ptr %14, align 1, !tbaa !11, !range !13, !noundef !14
  %48 = trunc i8 %47 to i1
  %49 = load ptr, ptr %15, align 8, !tbaa !5
  %50 = load i8, ptr %16, align 1, !tbaa !11, !range !13, !noundef !14
  %51 = trunc i8 %50 to i1
  %52 = load i64, ptr %18, align 8, !tbaa !9
  %53 = load ptr, ptr %21, align 8, !tbaa !5
  %54 = call noundef zeroext i1 @_ZN11alglib_impl17smatrixgevdreduceEPNS_9ae_matrixElbS1_blS1_PbPNS_8ae_stateE(ptr noundef %45, i64 noundef %46, i1 noundef zeroext %48, ptr noundef %49, i1 noundef zeroext %51, i64 noundef %52, ptr noundef %24, ptr noundef %26, ptr noundef %53)
  %55 = zext i1 %54 to i8
  store i8 %55, ptr %34, align 1, !tbaa !11
  %56 = load i8, ptr %34, align 1, !tbaa !11, !range !13, !noundef !14
  %57 = trunc i8 %56 to i1
  br i1 %57, label %62, label %58

58:                                               ; preds = %10
  %59 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %59)
  %60 = load i8, ptr %34, align 1, !tbaa !11, !range !13, !noundef !14
  %61 = trunc i8 %60 to i1
  store i1 %61, ptr %11, align 1
  store i32 1, ptr %35, align 4
  br label %195

62:                                               ; preds = %10
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = load i64, ptr %13, align 8, !tbaa !9
  %65 = load i64, ptr %17, align 8, !tbaa !9
  %66 = load i8, ptr %14, align 1, !tbaa !11, !range !13, !noundef !14
  %67 = trunc i8 %66 to i1
  %68 = load ptr, ptr %19, align 8, !tbaa !5
  %69 = load ptr, ptr %21, align 8, !tbaa !5
  %70 = call noundef zeroext i1 @_ZN11alglib_impl10smatrixevdEPNS_9ae_matrixEllbPNS_9ae_vectorES1_PNS_8ae_stateE(ptr noundef %63, i64 noundef %64, i64 noundef %65, i1 noundef zeroext %67, ptr noundef %68, ptr noundef %25, ptr noundef %69)
  %71 = zext i1 %70 to i8
  store i8 %71, ptr %34, align 1, !tbaa !11
  %72 = load i8, ptr %34, align 1, !tbaa !11, !range !13, !noundef !14
  %73 = trunc i8 %72 to i1
  br i1 %73, label %78, label %74

74:                                               ; preds = %62
  %75 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %75)
  %76 = load i8, ptr %34, align 1, !tbaa !11, !range !13, !noundef !14
  %77 = trunc i8 %76 to i1
  store i1 %77, ptr %11, align 1
  store i32 1, ptr %35, align 4
  br label %195

78:                                               ; preds = %62
  %79 = load i64, ptr %17, align 8, !tbaa !9
  %80 = icmp ne i64 %79, 0
  br i1 %80, label %81, label %191

81:                                               ; preds = %78
  %82 = load ptr, ptr %20, align 8, !tbaa !5
  %83 = load i64, ptr %13, align 8, !tbaa !9
  %84 = sub nsw i64 %83, 1
  %85 = add nsw i64 %84, 1
  %86 = load i64, ptr %13, align 8, !tbaa !9
  %87 = sub nsw i64 %86, 1
  %88 = add nsw i64 %87, 1
  %89 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %82, i64 noundef %85, i64 noundef %88, ptr noundef %89)
  store i64 0, ptr %32, align 8, !tbaa !9
  br label %90

90:                                               ; preds = %103, %81
  %91 = load i64, ptr %32, align 8, !tbaa !9
  %92 = load i64, ptr %13, align 8, !tbaa !9
  %93 = sub nsw i64 %92, 1
  %94 = icmp sle i64 %91, %93
  br i1 %94, label %95, label %106

95:                                               ; preds = %90
  %96 = load ptr, ptr %20, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %96, i32 0, i32 6
  %98 = load ptr, ptr %97, align 8, !tbaa !15
  %99 = getelementptr inbounds ptr, ptr %98, i64 0
  %100 = load ptr, ptr %99, align 8, !tbaa !5
  %101 = load i64, ptr %32, align 8, !tbaa !9
  %102 = getelementptr inbounds double, ptr %100, i64 %101
  store double 0.000000e+00, ptr %102, align 8, !tbaa !16
  br label %103

103:                                              ; preds = %95
  %104 = load i64, ptr %32, align 8, !tbaa !9
  %105 = add nsw i64 %104, 1
  store i64 %105, ptr %32, align 8, !tbaa !9
  br label %90, !llvm.loop !18

106:                                              ; preds = %90
  store i64 1, ptr %31, align 8, !tbaa !9
  br label %107

107:                                              ; preds = %129, %106
  %108 = load i64, ptr %31, align 8, !tbaa !9
  %109 = load i64, ptr %13, align 8, !tbaa !9
  %110 = sub nsw i64 %109, 1
  %111 = icmp sle i64 %108, %110
  br i1 %111, label %112, label %132

112:                                              ; preds = %107
  %113 = load ptr, ptr %20, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %113, i32 0, i32 6
  %115 = load ptr, ptr %114, align 8, !tbaa !15
  %116 = load i64, ptr %31, align 8, !tbaa !9
  %117 = getelementptr inbounds ptr, ptr %115, i64 %116
  %118 = load ptr, ptr %117, align 8, !tbaa !5
  %119 = getelementptr inbounds double, ptr %118, i64 0
  %120 = load ptr, ptr %20, align 8, !tbaa !5
  %121 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %120, i32 0, i32 6
  %122 = load ptr, ptr %121, align 8, !tbaa !15
  %123 = getelementptr inbounds ptr, ptr %122, i64 0
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  %125 = getelementptr inbounds double, ptr %124, i64 0
  %126 = load i64, ptr %13, align 8, !tbaa !9
  %127 = sub nsw i64 %126, 1
  %128 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %127)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %119, i64 noundef 1, ptr noundef %125, i64 noundef 1, i64 noundef %128)
  br label %129

129:                                              ; preds = %112
  %130 = load i64, ptr %31, align 8, !tbaa !9
  %131 = add nsw i64 %130, 1
  store i64 %131, ptr %31, align 8, !tbaa !9
  br label %107, !llvm.loop !20

132:                                              ; preds = %107
  %133 = load i8, ptr %26, align 1, !tbaa !11, !range !13, !noundef !14
  %134 = trunc i8 %133 to i1
  br i1 %134, label %135, label %138

135:                                              ; preds = %132
  store i64 0, ptr %27, align 8, !tbaa !9
  %136 = load i64, ptr %13, align 8, !tbaa !9
  %137 = sub nsw i64 %136, 1
  store i64 %137, ptr %28, align 8, !tbaa !9
  store i64 1, ptr %29, align 8, !tbaa !9
  store i64 0, ptr %30, align 8, !tbaa !9
  br label %139

138:                                              ; preds = %132
  store i64 0, ptr %27, align 8, !tbaa !9
  store i64 0, ptr %28, align 8, !tbaa !9
  store i64 0, ptr %29, align 8, !tbaa !9
  store i64 1, ptr %30, align 8, !tbaa !9
  br label %139

139:                                              ; preds = %138, %135
  store i64 0, ptr %31, align 8, !tbaa !9
  br label %140

140:                                              ; preds = %187, %139
  %141 = load i64, ptr %31, align 8, !tbaa !9
  %142 = load i64, ptr %13, align 8, !tbaa !9
  %143 = sub nsw i64 %142, 1
  %144 = icmp sle i64 %141, %143
  br i1 %144, label %145, label %190

145:                                              ; preds = %140
  %146 = load i64, ptr %27, align 8, !tbaa !9
  store i64 %146, ptr %32, align 8, !tbaa !9
  br label %147

147:                                              ; preds = %177, %145
  %148 = load i64, ptr %32, align 8, !tbaa !9
  %149 = load i64, ptr %28, align 8, !tbaa !9
  %150 = icmp sle i64 %148, %149
  br i1 %150, label %151, label %180

151:                                              ; preds = %147
  %152 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %24, i32 0, i32 6
  %153 = load ptr, ptr %152, align 8, !tbaa !15
  %154 = load i64, ptr %31, align 8, !tbaa !9
  %155 = getelementptr inbounds ptr, ptr %153, i64 %154
  %156 = load ptr, ptr %155, align 8, !tbaa !5
  %157 = load i64, ptr %32, align 8, !tbaa !9
  %158 = getelementptr inbounds double, ptr %156, i64 %157
  %159 = load double, ptr %158, align 8, !tbaa !16
  store double %159, ptr %33, align 8, !tbaa !16
  %160 = load ptr, ptr %20, align 8, !tbaa !5
  %161 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %160, i32 0, i32 6
  %162 = load ptr, ptr %161, align 8, !tbaa !15
  %163 = load i64, ptr %31, align 8, !tbaa !9
  %164 = getelementptr inbounds ptr, ptr %162, i64 %163
  %165 = load ptr, ptr %164, align 8, !tbaa !5
  %166 = getelementptr inbounds double, ptr %165, i64 0
  %167 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %25, i32 0, i32 6
  %168 = load ptr, ptr %167, align 8, !tbaa !15
  %169 = load i64, ptr %32, align 8, !tbaa !9
  %170 = getelementptr inbounds ptr, ptr %168, i64 %169
  %171 = load ptr, ptr %170, align 8, !tbaa !5
  %172 = getelementptr inbounds double, ptr %171, i64 0
  %173 = load i64, ptr %13, align 8, !tbaa !9
  %174 = sub nsw i64 %173, 1
  %175 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %174)
  %176 = load double, ptr %33, align 8, !tbaa !16
  call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %166, i64 noundef 1, ptr noundef %172, i64 noundef 1, i64 noundef %175, double noundef %176)
  br label %177

177:                                              ; preds = %151
  %178 = load i64, ptr %32, align 8, !tbaa !9
  %179 = add nsw i64 %178, 1
  store i64 %179, ptr %32, align 8, !tbaa !9
  br label %147, !llvm.loop !21

180:                                              ; preds = %147
  %181 = load i64, ptr %27, align 8, !tbaa !9
  %182 = load i64, ptr %29, align 8, !tbaa !9
  %183 = add nsw i64 %181, %182
  store i64 %183, ptr %27, align 8, !tbaa !9
  %184 = load i64, ptr %28, align 8, !tbaa !9
  %185 = load i64, ptr %30, align 8, !tbaa !9
  %186 = add nsw i64 %184, %185
  store i64 %186, ptr %28, align 8, !tbaa !9
  br label %187

187:                                              ; preds = %180
  %188 = load i64, ptr %31, align 8, !tbaa !9
  %189 = add nsw i64 %188, 1
  store i64 %189, ptr %31, align 8, !tbaa !9
  br label %140, !llvm.loop !22

190:                                              ; preds = %140
  br label %191

191:                                              ; preds = %190, %78
  %192 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %192)
  %193 = load i8, ptr %34, align 1, !tbaa !11, !range !13, !noundef !14
  %194 = trunc i8 %193 to i1
  store i1 %194, ptr %11, align 1
  store i32 1, ptr %35, align 4
  br label %195

195:                                              ; preds = %191, %74, %58
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #4
  %196 = load i1, ptr %11, align 1
  ret i1 %196
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl17smatrixgevdreduceEPNS_9ae_matrixElbS1_blS1_PbPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, ptr noundef, i1 noundef zeroext, i64 noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

declare void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, double noundef) #3

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #3

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #3

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

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

declare void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixES1_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #3

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) #3

declare void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}


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

; 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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl10smatrixevdEPNS_9ae_matrixEllbPNS_9ae_vectorES1_PNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i1 noundef zeroext, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl11smatrixgevdEPNS_9ae_matrixElbS1_bllPNS_9ae_vectorES1_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3, i1 noundef zeroext %4, i64 noundef %5, i64 noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) local_unnamed_addr #2 {
  %11 = alloca %"struct.alglib_impl::ae_frame", align 8
  %12 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %13 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %14 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %15 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %9, ptr noundef nonnull %11)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %12, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %13, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %14, i8 0, i64 80, i1 false)
  call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixES1_PNS_8ae_stateEb(ptr noundef nonnull %12, ptr noundef %0, ptr noundef %9, i1 noundef zeroext true)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %7)
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %8)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %13, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %9, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %14, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %9, i1 noundef zeroext true)
  %16 = call noundef zeroext i1 @_ZN11alglib_impl17smatrixgevdreduceEPNS_9ae_matrixElbS1_blS1_PbPNS_8ae_stateE(ptr noundef nonnull %12, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3, i1 noundef zeroext %4, i64 noundef %6, ptr noundef nonnull %13, ptr noundef nonnull %15, ptr noundef %9)
  br i1 %16, label %17, label %.loopexit

17:                                               ; preds = %10
  %18 = call noundef zeroext i1 @_ZN11alglib_impl10smatrixevdEPNS_9ae_matrixEllbPNS_9ae_vectorES1_PNS_8ae_stateE(ptr noundef nonnull %12, i64 noundef %1, i64 noundef %5, i1 noundef zeroext %2, ptr noundef %7, ptr noundef nonnull %14, ptr noundef %9)
  br i1 %18, label %19, label %.loopexit

19:                                               ; preds = %17
  %.not = icmp eq i64 %5, 0
  br i1 %.not, label %.loopexit, label %20

20:                                               ; preds = %19
  %21 = add nsw i64 %1, -1
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %8, i64 noundef %1, i64 noundef %1, ptr noundef %9)
  %.not77.not84 = icmp sgt i64 %1, 0
  br i1 %.not77.not84, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %20
  %22 = getelementptr inbounds i8, ptr %8, i64 72
  %xtraiter = and i64 %1, 3
  %23 = icmp ult i64 %1, 4
  br i1 %23, label %.preheader83.unr-lcssa, label %.lr.ph.new

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

.preheader83.unr-lcssa:                           ; preds = %29, %.lr.ph
  %.06485.unr = phi i64 [ 0, %.lr.ph ], [ %45, %29 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader83, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader83.unr-lcssa, %.epil.preheader
  %.06485.epil = phi i64 [ %27, %.epil.preheader ], [ %.06485.unr, %.preheader83.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader83.unr-lcssa ]
  %24 = load ptr, ptr %22, align 8, !tbaa !5
  %25 = load ptr, ptr %24, align 8, !tbaa !8
  %26 = getelementptr inbounds double, ptr %25, i64 %.06485.epil
  store double 0.000000e+00, ptr %26, align 8, !tbaa !10
  %27 = add nuw nsw i64 %.06485.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 %.preheader83, label %.epil.preheader, !llvm.loop !12

.preheader83:                                     ; preds = %.epil.preheader, %.preheader83.unr-lcssa
  %.not78.not86.not = icmp eq i64 %1, 1
  br i1 %.not78.not86.not, label %._crit_edge, label %.lr.ph88

.lr.ph88:                                         ; preds = %.preheader83
  %28 = getelementptr inbounds i8, ptr %8, i64 72
  br label %46

29:                                               ; preds = %29, %.lr.ph.new
  %.06485 = phi i64 [ 0, %.lr.ph.new ], [ %45, %29 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %29 ]
  %30 = load ptr, ptr %22, align 8, !tbaa !5
  %31 = load ptr, ptr %30, align 8, !tbaa !8
  %32 = getelementptr inbounds double, ptr %31, i64 %.06485
  store double 0.000000e+00, ptr %32, align 8, !tbaa !10
  %33 = or disjoint i64 %.06485, 1
  %34 = load ptr, ptr %22, align 8, !tbaa !5
  %35 = load ptr, ptr %34, align 8, !tbaa !8
  %36 = getelementptr inbounds double, ptr %35, i64 %33
  store double 0.000000e+00, ptr %36, align 8, !tbaa !10
  %37 = or disjoint i64 %.06485, 2
  %38 = load ptr, ptr %22, align 8, !tbaa !5
  %39 = load ptr, ptr %38, align 8, !tbaa !8
  %40 = getelementptr inbounds double, ptr %39, i64 %37
  store double 0.000000e+00, ptr %40, align 8, !tbaa !10
  %41 = or disjoint i64 %.06485, 3
  %42 = load ptr, ptr %22, align 8, !tbaa !5
  %43 = load ptr, ptr %42, align 8, !tbaa !8
  %44 = getelementptr inbounds double, ptr %43, i64 %41
  store double 0.000000e+00, ptr %44, align 8, !tbaa !10
  %45 = add nuw nsw i64 %.06485, 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 %.preheader83.unr-lcssa, label %29, !llvm.loop !14

46:                                               ; preds = %.lr.ph88, %46
  %.06587 = phi i64 [ 1, %.lr.ph88 ], [ %52, %46 ]
  %47 = load ptr, ptr %28, align 8, !tbaa !5
  %48 = getelementptr inbounds ptr, ptr %47, i64 %.06587
  %49 = load ptr, ptr %48, align 8, !tbaa !8
  %50 = load ptr, ptr %47, align 8, !tbaa !8
  %51 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %21)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %49, i64 noundef 1, ptr noundef %50, i64 noundef 1, i64 noundef %51)
  %52 = add nuw nsw i64 %.06587, 1
  %exitcond97.not = icmp eq i64 %52, %1
  br i1 %exitcond97.not, label %._crit_edge, label %46, !llvm.loop !16

._crit_edge:                                      ; preds = %46, %.preheader83
  %53 = load i8, ptr %15, align 1, !tbaa !17, !range !19, !noundef !20
  %54 = trunc nuw i8 %53 to i1
  %.81 = zext nneg i8 %53 to i64
  %not. = xor i1 %54, true
  %.82 = zext i1 %not. to i64
  br i1 %.not77.not84, label %.preheader.lr.ph, label %.loopexit

.preheader.lr.ph:                                 ; preds = %._crit_edge
  %. = select i1 %54, i64 %21, i64 0
  %55 = getelementptr inbounds i8, ptr %13, i64 72
  %56 = getelementptr inbounds i8, ptr %8, i64 72
  %57 = getelementptr inbounds i8, ptr %14, i64 72
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge92
  %.16696 = phi i64 [ 0, %.preheader.lr.ph ], [ %73, %._crit_edge92 ]
  %.17095 = phi i64 [ %., %.preheader.lr.ph ], [ %72, %._crit_edge92 ]
  %.17294 = phi i64 [ 0, %.preheader.lr.ph ], [ %71, %._crit_edge92 ]
  %.not8089 = icmp sgt i64 %.17294, %.17095
  br i1 %.not8089, label %._crit_edge92, label %.lr.ph91

.lr.ph91:                                         ; preds = %.preheader, %.lr.ph91
  %.190 = phi i64 [ %70, %.lr.ph91 ], [ %.17294, %.preheader ]
  %58 = load ptr, ptr %55, align 8, !tbaa !5
  %59 = getelementptr inbounds ptr, ptr %58, i64 %.16696
  %60 = load ptr, ptr %59, align 8, !tbaa !8
  %61 = getelementptr inbounds double, ptr %60, i64 %.190
  %62 = load double, ptr %61, align 8, !tbaa !10
  %63 = load ptr, ptr %56, align 8, !tbaa !5
  %64 = getelementptr inbounds ptr, ptr %63, i64 %.16696
  %65 = load ptr, ptr %64, align 8, !tbaa !8
  %66 = load ptr, ptr %57, align 8, !tbaa !5
  %67 = getelementptr inbounds ptr, ptr %66, i64 %.190
  %68 = load ptr, ptr %67, align 8, !tbaa !8
  %69 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %21)
  call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %65, i64 noundef 1, ptr noundef %68, i64 noundef 1, i64 noundef %69, double noundef %62)
  %70 = add nuw nsw i64 %.190, 1
  %.not80.not = icmp slt i64 %.190, %.17095
  br i1 %.not80.not, label %.lr.ph91, label %._crit_edge92, !llvm.loop !21

._crit_edge92:                                    ; preds = %.lr.ph91, %.preheader
  %71 = add nuw nsw i64 %.17294, %.81
  %72 = add nsw i64 %.17095, %.82
  %73 = add nuw nsw i64 %.16696, 1
  %exitcond98.not = icmp eq i64 %73, %1
  br i1 %exitcond98.not, label %.loopexit, label %.preheader, !llvm.loop !22

.loopexit:                                        ; preds = %._crit_edge92, %19, %._crit_edge, %20, %17, %10
  %.0 = phi i1 [ false, %10 ], [ false, %17 ], [ true, %20 ], [ true, %._crit_edge ], [ true, %19 ], [ true, %._crit_edge92 ]
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %9)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  ret i1 %.0
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl17smatrixgevdreduceEPNS_9ae_matrixElbS1_blS1_PbPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, ptr noundef, i1 noundef zeroext, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, double noundef) local_unnamed_addr #3

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) local_unnamed_addr #3

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

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 #3

declare void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixES1_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.unroll.disable"}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !6, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}


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