; 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 }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = 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

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl33rmatrixinternalschurdecompositionEPNS_9ae_matrixElllPNS_9ae_vectorES3_S1_PlPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #3 {
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"struct.alglib_impl::ae_frame", align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %23 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %24 = alloca %"struct.alglib_impl::ae_vector", align 8
  %25 = alloca %"struct.alglib_impl::ae_vector", align 8
  %26 = alloca i32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store i64 %1, ptr %11, align 8, !tbaa !9
  store i64 %2, ptr %12, align 8, !tbaa !9
  store i64 %3, ptr %13, align 8, !tbaa !9
  store ptr %4, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  store ptr %8, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, 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 80, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %25) #4
  %27 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %27, ptr noundef %19)
  call void @llvm.memset.p0.i64(ptr align 8 %22, i8 0, i64 80, i1 false)
  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 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %25, i8 0, i64 64, i1 false)
  %28 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %28)
  %29 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %29)
  %30 = load ptr, ptr %17, align 8, !tbaa !5
  store i64 0, ptr %30, align 8, !tbaa !9
  %31 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %22, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %31, i1 noundef zeroext true)
  %32 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %23, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %32, i1 noundef zeroext true)
  %33 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %24, i64 noundef 0, i64 noundef 3, ptr noundef %33, i1 noundef zeroext true)
  %34 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %25, i64 noundef 0, i64 noundef 3, ptr noundef %34, i1 noundef zeroext true)
  %35 = load ptr, ptr %14, align 8, !tbaa !5
  %36 = load i64, ptr %11, align 8, !tbaa !9
  %37 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %35, i64 noundef %36, ptr noundef %37)
  %38 = load ptr, ptr %15, align 8, !tbaa !5
  %39 = load i64, ptr %11, align 8, !tbaa !9
  %40 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %38, i64 noundef %39, ptr noundef %40)
  %41 = load i64, ptr %13, align 8, !tbaa !9
  %42 = icmp eq i64 %41, 2
  br i1 %42, label %43, label %48

43:                                               ; preds = %9
  %44 = load ptr, ptr %16, align 8, !tbaa !5
  %45 = load i64, ptr %11, align 8, !tbaa !9
  %46 = load i64, ptr %11, align 8, !tbaa !9
  %47 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %44, i64 noundef %45, i64 noundef %46, ptr noundef %47)
  br label %48

48:                                               ; preds = %43, %9
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = load i64, ptr %11, align 8, !tbaa !9
  %51 = load i64, ptr %12, align 8, !tbaa !9
  %52 = load i64, ptr %13, align 8, !tbaa !9
  %53 = load ptr, ptr %14, align 8, !tbaa !5
  %54 = load ptr, ptr %15, align 8, !tbaa !5
  %55 = load ptr, ptr %16, align 8, !tbaa !5
  %56 = load ptr, ptr %17, align 8, !tbaa !5
  %57 = load ptr, ptr %18, align 8, !tbaa !5
  %58 = call noundef zeroext i1 @_ZN11alglib_impl36rmatrixinternalschurdecompositionmklEPNS_9ae_matrixElllPNS_9ae_vectorES3_S1_PlPNS_8ae_stateE(ptr noundef %49, i64 noundef %50, i64 noundef %51, i64 noundef %52, ptr noundef %53, ptr noundef %54, ptr noundef %55, ptr noundef %56, ptr noundef %57)
  br i1 %58, label %59, label %61

59:                                               ; preds = %48
  %60 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %60)
  store i32 1, ptr %26, align 4
  br label %278

61:                                               ; preds = %48
  %62 = load i64, ptr %11, align 8, !tbaa !9
  %63 = add nsw i64 %62, 1
  %64 = load i64, ptr %11, align 8, !tbaa !9
  %65 = add nsw i64 %64, 1
  %66 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %22, i64 noundef %63, i64 noundef %65, ptr noundef %66)
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %67

67:                                               ; preds = %101, %61
  %68 = load i64, ptr %20, align 8, !tbaa !9
  %69 = load i64, ptr %11, align 8, !tbaa !9
  %70 = sub nsw i64 %69, 1
  %71 = icmp sle i64 %68, %70
  br i1 %71, label %72, label %104

72:                                               ; preds = %67
  store i64 0, ptr %21, align 8, !tbaa !9
  br label %73

73:                                               ; preds = %97, %72
  %74 = load i64, ptr %21, align 8, !tbaa !9
  %75 = load i64, ptr %11, align 8, !tbaa !9
  %76 = sub nsw i64 %75, 1
  %77 = icmp sle i64 %74, %76
  br i1 %77, label %78, label %100

78:                                               ; preds = %73
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %79, i32 0, i32 6
  %81 = load ptr, ptr %80, align 8, !tbaa !11
  %82 = load i64, ptr %20, align 8, !tbaa !9
  %83 = getelementptr inbounds ptr, ptr %81, i64 %82
  %84 = load ptr, ptr %83, align 8, !tbaa !5
  %85 = load i64, ptr %21, align 8, !tbaa !9
  %86 = getelementptr inbounds double, ptr %84, i64 %85
  %87 = load double, ptr %86, align 8, !tbaa !12
  %88 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %22, i32 0, i32 6
  %89 = load ptr, ptr %88, align 8, !tbaa !11
  %90 = load i64, ptr %20, align 8, !tbaa !9
  %91 = add nsw i64 1, %90
  %92 = getelementptr inbounds ptr, ptr %89, i64 %91
  %93 = load ptr, ptr %92, align 8, !tbaa !5
  %94 = load i64, ptr %21, align 8, !tbaa !9
  %95 = add nsw i64 1, %94
  %96 = getelementptr inbounds double, ptr %93, i64 %95
  store double %87, ptr %96, align 8, !tbaa !12
  br label %97

97:                                               ; preds = %78
  %98 = load i64, ptr %21, align 8, !tbaa !9
  %99 = add nsw i64 %98, 1
  store i64 %99, ptr %21, align 8, !tbaa !9
  br label %73, !llvm.loop !14

100:                                              ; preds = %73
  br label %101

101:                                              ; preds = %100
  %102 = load i64, ptr %20, align 8, !tbaa !9
  %103 = add nsw i64 %102, 1
  store i64 %103, ptr %20, align 8, !tbaa !9
  br label %67, !llvm.loop !16

104:                                              ; preds = %67
  %105 = load i64, ptr %13, align 8, !tbaa !9
  %106 = icmp eq i64 %105, 1
  br i1 %106, label %107, label %151

107:                                              ; preds = %104
  %108 = load i64, ptr %11, align 8, !tbaa !9
  %109 = add nsw i64 %108, 1
  %110 = load i64, ptr %11, align 8, !tbaa !9
  %111 = add nsw i64 %110, 1
  %112 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %23, i64 noundef %109, i64 noundef %111, ptr noundef %112)
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %113

113:                                              ; preds = %147, %107
  %114 = load i64, ptr %20, align 8, !tbaa !9
  %115 = load i64, ptr %11, align 8, !tbaa !9
  %116 = sub nsw i64 %115, 1
  %117 = icmp sle i64 %114, %116
  br i1 %117, label %118, label %150

118:                                              ; preds = %113
  store i64 0, ptr %21, align 8, !tbaa !9
  br label %119

119:                                              ; preds = %143, %118
  %120 = load i64, ptr %21, align 8, !tbaa !9
  %121 = load i64, ptr %11, align 8, !tbaa !9
  %122 = sub nsw i64 %121, 1
  %123 = icmp sle i64 %120, %122
  br i1 %123, label %124, label %146

124:                                              ; preds = %119
  %125 = load ptr, ptr %16, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %125, i32 0, i32 6
  %127 = load ptr, ptr %126, align 8, !tbaa !11
  %128 = load i64, ptr %20, align 8, !tbaa !9
  %129 = getelementptr inbounds ptr, ptr %127, i64 %128
  %130 = load ptr, ptr %129, align 8, !tbaa !5
  %131 = load i64, ptr %21, align 8, !tbaa !9
  %132 = getelementptr inbounds double, ptr %130, i64 %131
  %133 = load double, ptr %132, align 8, !tbaa !12
  %134 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %23, i32 0, i32 6
  %135 = load ptr, ptr %134, align 8, !tbaa !11
  %136 = load i64, ptr %20, align 8, !tbaa !9
  %137 = add nsw i64 1, %136
  %138 = getelementptr inbounds ptr, ptr %135, i64 %137
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  %140 = load i64, ptr %21, align 8, !tbaa !9
  %141 = add nsw i64 1, %140
  %142 = getelementptr inbounds double, ptr %139, i64 %141
  store double %133, ptr %142, align 8, !tbaa !12
  br label %143

143:                                              ; preds = %124
  %144 = load i64, ptr %21, align 8, !tbaa !9
  %145 = add nsw i64 %144, 1
  store i64 %145, ptr %21, align 8, !tbaa !9
  br label %119, !llvm.loop !17

146:                                              ; preds = %119
  br label %147

147:                                              ; preds = %146
  %148 = load i64, ptr %20, align 8, !tbaa !9
  %149 = add nsw i64 %148, 1
  store i64 %149, ptr %20, align 8, !tbaa !9
  br label %113, !llvm.loop !18

150:                                              ; preds = %113
  br label %151

151:                                              ; preds = %150, %104
  %152 = load i64, ptr %11, align 8, !tbaa !9
  %153 = load i64, ptr %12, align 8, !tbaa !9
  %154 = load i64, ptr %13, align 8, !tbaa !9
  %155 = load ptr, ptr %17, align 8, !tbaa !5
  %156 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl26internalschurdecompositionEPNS_9ae_matrixElllPNS_9ae_vectorES3_S1_PlPNS_8ae_stateE(ptr noundef %22, i64 noundef %152, i64 noundef %153, i64 noundef %154, ptr noundef %24, ptr noundef %25, ptr noundef %23, ptr noundef %155, ptr noundef %156)
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %157

157:                                              ; preds = %185, %151
  %158 = load i64, ptr %20, align 8, !tbaa !9
  %159 = load i64, ptr %11, align 8, !tbaa !9
  %160 = sub nsw i64 %159, 1
  %161 = icmp sle i64 %158, %160
  br i1 %161, label %162, label %188

162:                                              ; preds = %157
  %163 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %24, i32 0, i32 4
  %164 = load ptr, ptr %163, align 8, !tbaa !11
  %165 = load i64, ptr %20, align 8, !tbaa !9
  %166 = add nsw i64 %165, 1
  %167 = getelementptr inbounds double, ptr %164, i64 %166
  %168 = load double, ptr %167, align 8, !tbaa !12
  %169 = load ptr, ptr %14, align 8, !tbaa !5
  %170 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %169, i32 0, i32 4
  %171 = load ptr, ptr %170, align 8, !tbaa !11
  %172 = load i64, ptr %20, align 8, !tbaa !9
  %173 = getelementptr inbounds double, ptr %171, i64 %172
  store double %168, ptr %173, align 8, !tbaa !12
  %174 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %25, i32 0, i32 4
  %175 = load ptr, ptr %174, align 8, !tbaa !11
  %176 = load i64, ptr %20, align 8, !tbaa !9
  %177 = add nsw i64 %176, 1
  %178 = getelementptr inbounds double, ptr %175, i64 %177
  %179 = load double, ptr %178, align 8, !tbaa !12
  %180 = load ptr, ptr %15, align 8, !tbaa !5
  %181 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %180, i32 0, i32 4
  %182 = load ptr, ptr %181, align 8, !tbaa !11
  %183 = load i64, ptr %20, align 8, !tbaa !9
  %184 = getelementptr inbounds double, ptr %182, i64 %183
  store double %179, ptr %184, align 8, !tbaa !12
  br label %185

185:                                              ; preds = %162
  %186 = load i64, ptr %20, align 8, !tbaa !9
  %187 = add nsw i64 %186, 1
  store i64 %187, ptr %20, align 8, !tbaa !9
  br label %157, !llvm.loop !19

188:                                              ; preds = %157
  %189 = load i64, ptr %12, align 8, !tbaa !9
  %190 = icmp ne i64 %189, 0
  br i1 %190, label %191, label %230

191:                                              ; preds = %188
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %192

192:                                              ; preds = %226, %191
  %193 = load i64, ptr %20, align 8, !tbaa !9
  %194 = load i64, ptr %11, align 8, !tbaa !9
  %195 = sub nsw i64 %194, 1
  %196 = icmp sle i64 %193, %195
  br i1 %196, label %197, label %229

197:                                              ; preds = %192
  store i64 0, ptr %21, align 8, !tbaa !9
  br label %198

198:                                              ; preds = %222, %197
  %199 = load i64, ptr %21, align 8, !tbaa !9
  %200 = load i64, ptr %11, align 8, !tbaa !9
  %201 = sub nsw i64 %200, 1
  %202 = icmp sle i64 %199, %201
  br i1 %202, label %203, label %225

203:                                              ; preds = %198
  %204 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %22, i32 0, i32 6
  %205 = load ptr, ptr %204, align 8, !tbaa !11
  %206 = load i64, ptr %20, align 8, !tbaa !9
  %207 = add nsw i64 1, %206
  %208 = getelementptr inbounds ptr, ptr %205, i64 %207
  %209 = load ptr, ptr %208, align 8, !tbaa !5
  %210 = load i64, ptr %21, align 8, !tbaa !9
  %211 = add nsw i64 1, %210
  %212 = getelementptr inbounds double, ptr %209, i64 %211
  %213 = load double, ptr %212, align 8, !tbaa !12
  %214 = load ptr, ptr %10, align 8, !tbaa !5
  %215 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %214, i32 0, i32 6
  %216 = load ptr, ptr %215, align 8, !tbaa !11
  %217 = load i64, ptr %20, align 8, !tbaa !9
  %218 = getelementptr inbounds ptr, ptr %216, i64 %217
  %219 = load ptr, ptr %218, align 8, !tbaa !5
  %220 = load i64, ptr %21, align 8, !tbaa !9
  %221 = getelementptr inbounds double, ptr %219, i64 %220
  store double %213, ptr %221, align 8, !tbaa !12
  br label %222

222:                                              ; preds = %203
  %223 = load i64, ptr %21, align 8, !tbaa !9
  %224 = add nsw i64 %223, 1
  store i64 %224, ptr %21, align 8, !tbaa !9
  br label %198, !llvm.loop !20

225:                                              ; preds = %198
  br label %226

226:                                              ; preds = %225
  %227 = load i64, ptr %20, align 8, !tbaa !9
  %228 = add nsw i64 %227, 1
  store i64 %228, ptr %20, align 8, !tbaa !9
  br label %192, !llvm.loop !21

229:                                              ; preds = %192
  br label %230

230:                                              ; preds = %229, %188
  %231 = load i64, ptr %13, align 8, !tbaa !9
  %232 = icmp ne i64 %231, 0
  br i1 %232, label %233, label %276

233:                                              ; preds = %230
  %234 = load ptr, ptr %16, align 8, !tbaa !5
  %235 = load i64, ptr %11, align 8, !tbaa !9
  %236 = load i64, ptr %11, align 8, !tbaa !9
  %237 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %234, i64 noundef %235, i64 noundef %236, ptr noundef %237)
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %238

238:                                              ; preds = %272, %233
  %239 = load i64, ptr %20, align 8, !tbaa !9
  %240 = load i64, ptr %11, align 8, !tbaa !9
  %241 = sub nsw i64 %240, 1
  %242 = icmp sle i64 %239, %241
  br i1 %242, label %243, label %275

243:                                              ; preds = %238
  store i64 0, ptr %21, align 8, !tbaa !9
  br label %244

244:                                              ; preds = %268, %243
  %245 = load i64, ptr %21, align 8, !tbaa !9
  %246 = load i64, ptr %11, align 8, !tbaa !9
  %247 = sub nsw i64 %246, 1
  %248 = icmp sle i64 %245, %247
  br i1 %248, label %249, label %271

249:                                              ; preds = %244
  %250 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %23, i32 0, i32 6
  %251 = load ptr, ptr %250, align 8, !tbaa !11
  %252 = load i64, ptr %20, align 8, !tbaa !9
  %253 = add nsw i64 1, %252
  %254 = getelementptr inbounds ptr, ptr %251, i64 %253
  %255 = load ptr, ptr %254, align 8, !tbaa !5
  %256 = load i64, ptr %21, align 8, !tbaa !9
  %257 = add nsw i64 1, %256
  %258 = getelementptr inbounds double, ptr %255, i64 %257
  %259 = load double, ptr %258, align 8, !tbaa !12
  %260 = load ptr, ptr %16, align 8, !tbaa !5
  %261 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %260, i32 0, i32 6
  %262 = load ptr, ptr %261, align 8, !tbaa !11
  %263 = load i64, ptr %20, align 8, !tbaa !9
  %264 = getelementptr inbounds ptr, ptr %262, i64 %263
  %265 = load ptr, ptr %264, align 8, !tbaa !5
  %266 = load i64, ptr %21, align 8, !tbaa !9
  %267 = getelementptr inbounds double, ptr %265, i64 %266
  store double %259, ptr %267, align 8, !tbaa !12
  br label %268

268:                                              ; preds = %249
  %269 = load i64, ptr %21, align 8, !tbaa !9
  %270 = add nsw i64 %269, 1
  store i64 %270, ptr %21, align 8, !tbaa !9
  br label %244, !llvm.loop !22

271:                                              ; preds = %244
  br label %272

272:                                              ; preds = %271
  %273 = load i64, ptr %20, align 8, !tbaa !9
  %274 = add nsw i64 %273, 1
  store i64 %274, ptr %20, align 8, !tbaa !9
  br label %238, !llvm.loop !23

275:                                              ; preds = %238
  br label %276

276:                                              ; preds = %275, %230
  %277 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %277)
  store i32 0, ptr %26, align 4
  br label %278

278:                                              ; preds = %276, %59
  call void @llvm.lifetime.end.p0(i64 64, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 80, 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 32, ptr %19) #4
  %279 = load i32, ptr %26, align 4
  switch i32 %279, label %281 [
    i32 0, label %280
    i32 1, label %280
  ]

280:                                              ; preds = %278, %278
  ret void

281:                                              ; preds = %278
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl26internalschurdecompositionEPNS_9ae_matrixElllPNS_9ae_vectorES3_S1_PlPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, ptr 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 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}
!23 = distinct !{!23, !15}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl33rmatrixinternalschurdecompositionEPNS_9ae_matrixElllPNS_9ae_vectorES3_S1_PlPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) local_unnamed_addr #3 {
  %10 = alloca %"struct.alglib_impl::ae_frame", align 8
  %11 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %12 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %13 = alloca %"struct.alglib_impl::ae_vector", align 8
  %14 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %14) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %8, ptr noundef nonnull %10)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %11, i8 0, i64 80, i1 false)
  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(64) %13, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %14, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %4)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %5)
  store i64 0, ptr %7, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %11, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %8, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %12, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %8, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %13, i64 noundef 0, i64 noundef 3, ptr noundef %8, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %14, i64 noundef 0, i64 noundef 3, ptr noundef %8, i1 noundef zeroext true)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %4, i64 noundef %1, ptr noundef %8)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %5, i64 noundef %1, ptr noundef %8)
  %15 = icmp eq i64 %3, 2
  br i1 %15, label %16, label %17

16:                                               ; preds = %9
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %6, i64 noundef %1, i64 noundef %1, ptr noundef %8)
  br label %17

17:                                               ; preds = %16, %9
  %18 = call noundef zeroext i1 @_ZN11alglib_impl36rmatrixinternalschurdecompositionmklEPNS_9ae_matrixElllPNS_9ae_vectorES3_S1_PlPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %7, ptr noundef %8)
  br i1 %18, label %.loopexit, label %19

19:                                               ; preds = %17
  %20 = add nsw i64 %1, 1
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %20, i64 noundef %20, ptr noundef %8)
  %.not.not123 = icmp sgt i64 %1, 0
  br i1 %.not.not123, label %.preheader120.lr.ph, label %._crit_edge125.thread

.preheader120.lr.ph:                              ; preds = %19
  %21 = getelementptr inbounds i8, ptr %0, i64 72
  %22 = getelementptr inbounds i8, ptr %11, i64 72
  %23 = add nsw i64 %1, -1
  %xtraiter = and i64 %1, 1
  %24 = icmp eq i64 %23, 0
  %unroll_iter = and i64 %1, 9223372036854775806
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader120.us

.preheader120.us:                                 ; preds = %._crit_edge.us, %.preheader120.lr.ph
  %.0100124.us = phi i64 [ 0, %.preheader120.lr.ph ], [ %58, %._crit_edge.us ]
  br i1 %24, label %._crit_edge.us.unr-lcssa, label %.preheader120.us.new

.preheader120.us.new:                             ; preds = %.preheader120.us, %.preheader120.us.new
  %.0122.us = phi i64 [ %45, %.preheader120.us.new ], [ 0, %.preheader120.us ]
  %niter = phi i64 [ %niter.next.1, %.preheader120.us.new ], [ 0, %.preheader120.us ]
  %25 = load ptr, ptr %21, align 8, !tbaa !9
  %26 = getelementptr inbounds ptr, ptr %25, i64 %.0100124.us
  %27 = load ptr, ptr %26, align 8, !tbaa !10
  %28 = getelementptr inbounds double, ptr %27, i64 %.0122.us
  %29 = load double, ptr %28, align 8, !tbaa !12
  %30 = load ptr, ptr %22, align 8, !tbaa !9
  %31 = getelementptr inbounds ptr, ptr %30, i64 %.0100124.us
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  %33 = load ptr, ptr %32, align 8, !tbaa !10
  %34 = or disjoint i64 %.0122.us, 1
  %35 = getelementptr inbounds double, ptr %33, i64 %34
  store double %29, ptr %35, align 8, !tbaa !12
  %36 = load ptr, ptr %21, align 8, !tbaa !9
  %37 = getelementptr inbounds ptr, ptr %36, i64 %.0100124.us
  %38 = load ptr, ptr %37, align 8, !tbaa !10
  %39 = getelementptr inbounds double, ptr %38, i64 %34
  %40 = load double, ptr %39, align 8, !tbaa !12
  %41 = load ptr, ptr %22, align 8, !tbaa !9
  %42 = getelementptr inbounds ptr, ptr %41, i64 %.0100124.us
  %43 = getelementptr inbounds i8, ptr %42, i64 8
  %44 = load ptr, ptr %43, align 8, !tbaa !10
  %45 = add nuw nsw i64 %.0122.us, 2
  %46 = getelementptr inbounds double, ptr %44, i64 %45
  store double %40, ptr %46, align 8, !tbaa !12
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.us.unr-lcssa, label %.preheader120.us.new, !llvm.loop !14

._crit_edge.us.unr-lcssa:                         ; preds = %.preheader120.us.new, %.preheader120.us
  %.0122.us.unr = phi i64 [ 0, %.preheader120.us ], [ %45, %.preheader120.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %._crit_edge.us.epilog-lcssa

._crit_edge.us.epilog-lcssa:                      ; preds = %._crit_edge.us.unr-lcssa
  %47 = load ptr, ptr %21, align 8, !tbaa !9
  %48 = getelementptr inbounds ptr, ptr %47, i64 %.0100124.us
  %49 = load ptr, ptr %48, align 8, !tbaa !10
  %50 = getelementptr inbounds double, ptr %49, i64 %.0122.us.unr
  %51 = load double, ptr %50, align 8, !tbaa !12
  %52 = load ptr, ptr %22, align 8, !tbaa !9
  %53 = getelementptr inbounds ptr, ptr %52, i64 %.0100124.us
  %54 = getelementptr inbounds i8, ptr %53, i64 8
  %55 = load ptr, ptr %54, align 8, !tbaa !10
  %56 = getelementptr double, ptr %55, i64 %.0122.us.unr
  %57 = getelementptr i8, ptr %56, i64 8
  store double %51, ptr %57, align 8, !tbaa !12
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %._crit_edge.us.unr-lcssa, %._crit_edge.us.epilog-lcssa
  %58 = add nuw nsw i64 %.0100124.us, 1
  %exitcond145.not = icmp eq i64 %58, %1
  br i1 %exitcond145.not, label %._crit_edge125, label %.preheader120.us, !llvm.loop !16

._crit_edge125:                                   ; preds = %._crit_edge.us
  %59 = icmp eq i64 %3, 1
  br i1 %59, label %61, label %.loopexit119

._crit_edge125.thread:                            ; preds = %19
  %60 = icmp eq i64 %3, 1
  br i1 %60, label %.thread, label %.loopexit119.thread

.thread:                                          ; preds = %._crit_edge125.thread
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %12, i64 noundef %20, i64 noundef %20, ptr noundef %8)
  br label %.loopexit119.thread

61:                                               ; preds = %._crit_edge125
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %12, i64 noundef %20, i64 noundef %20, ptr noundef %8)
  br i1 %.not.not123, label %.preheader118.lr.ph, label %.loopexit119.thread

.preheader118.lr.ph:                              ; preds = %61
  %62 = getelementptr inbounds i8, ptr %6, i64 72
  %63 = getelementptr inbounds i8, ptr %12, i64 72
  %xtraiter158 = and i64 %1, 1
  %64 = icmp eq i64 %23, 0
  %unroll_iter160 = and i64 %1, 9223372036854775806
  %lcmp.mod159.not = icmp eq i64 %xtraiter158, 0
  br label %.preheader118.us

.preheader118.us:                                 ; preds = %._crit_edge.us130, %.preheader118.lr.ph
  %.1101129.us = phi i64 [ 0, %.preheader118.lr.ph ], [ %98, %._crit_edge.us130 ]
  br i1 %64, label %._crit_edge.us130.unr-lcssa, label %.preheader118.us.new

.preheader118.us.new:                             ; preds = %.preheader118.us, %.preheader118.us.new
  %.1127.us = phi i64 [ %85, %.preheader118.us.new ], [ 0, %.preheader118.us ]
  %niter161 = phi i64 [ %niter161.next.1, %.preheader118.us.new ], [ 0, %.preheader118.us ]
  %65 = load ptr, ptr %62, align 8, !tbaa !9
  %66 = getelementptr inbounds ptr, ptr %65, i64 %.1101129.us
  %67 = load ptr, ptr %66, align 8, !tbaa !10
  %68 = getelementptr inbounds double, ptr %67, i64 %.1127.us
  %69 = load double, ptr %68, align 8, !tbaa !12
  %70 = load ptr, ptr %63, align 8, !tbaa !9
  %71 = getelementptr inbounds ptr, ptr %70, i64 %.1101129.us
  %72 = getelementptr inbounds i8, ptr %71, i64 8
  %73 = load ptr, ptr %72, align 8, !tbaa !10
  %74 = or disjoint i64 %.1127.us, 1
  %75 = getelementptr inbounds double, ptr %73, i64 %74
  store double %69, ptr %75, align 8, !tbaa !12
  %76 = load ptr, ptr %62, align 8, !tbaa !9
  %77 = getelementptr inbounds ptr, ptr %76, i64 %.1101129.us
  %78 = load ptr, ptr %77, align 8, !tbaa !10
  %79 = getelementptr inbounds double, ptr %78, i64 %74
  %80 = load double, ptr %79, align 8, !tbaa !12
  %81 = load ptr, ptr %63, align 8, !tbaa !9
  %82 = getelementptr inbounds ptr, ptr %81, i64 %.1101129.us
  %83 = getelementptr inbounds i8, ptr %82, i64 8
  %84 = load ptr, ptr %83, align 8, !tbaa !10
  %85 = add nuw nsw i64 %.1127.us, 2
  %86 = getelementptr inbounds double, ptr %84, i64 %85
  store double %80, ptr %86, align 8, !tbaa !12
  %niter161.next.1 = add i64 %niter161, 2
  %niter161.ncmp.1 = icmp eq i64 %niter161.next.1, %unroll_iter160
  br i1 %niter161.ncmp.1, label %._crit_edge.us130.unr-lcssa, label %.preheader118.us.new, !llvm.loop !17

._crit_edge.us130.unr-lcssa:                      ; preds = %.preheader118.us.new, %.preheader118.us
  %.1127.us.unr = phi i64 [ 0, %.preheader118.us ], [ %85, %.preheader118.us.new ]
  br i1 %lcmp.mod159.not, label %._crit_edge.us130, label %._crit_edge.us130.epilog-lcssa

._crit_edge.us130.epilog-lcssa:                   ; preds = %._crit_edge.us130.unr-lcssa
  %87 = load ptr, ptr %62, align 8, !tbaa !9
  %88 = getelementptr inbounds ptr, ptr %87, i64 %.1101129.us
  %89 = load ptr, ptr %88, align 8, !tbaa !10
  %90 = getelementptr inbounds double, ptr %89, i64 %.1127.us.unr
  %91 = load double, ptr %90, align 8, !tbaa !12
  %92 = load ptr, ptr %63, align 8, !tbaa !9
  %93 = getelementptr inbounds ptr, ptr %92, i64 %.1101129.us
  %94 = getelementptr inbounds i8, ptr %93, i64 8
  %95 = load ptr, ptr %94, align 8, !tbaa !10
  %96 = getelementptr double, ptr %95, i64 %.1127.us.unr
  %97 = getelementptr i8, ptr %96, i64 8
  store double %91, ptr %97, align 8, !tbaa !12
  br label %._crit_edge.us130

._crit_edge.us130:                                ; preds = %._crit_edge.us130.unr-lcssa, %._crit_edge.us130.epilog-lcssa
  %98 = add nuw nsw i64 %.1101129.us, 1
  %exitcond147.not = icmp eq i64 %98, %1
  br i1 %exitcond147.not, label %.loopexit119, label %.preheader118.us, !llvm.loop !18

.loopexit119.thread:                              ; preds = %.thread, %._crit_edge125.thread, %61
  call void @_ZN11alglib_impl26internalschurdecompositionEPNS_9ae_matrixElllPNS_9ae_vectorES3_S1_PlPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %12, ptr noundef nonnull %7, ptr noundef %8)
  br label %.loopexit117.thread

.loopexit119:                                     ; preds = %._crit_edge.us130, %._crit_edge125
  call void @_ZN11alglib_impl26internalschurdecompositionEPNS_9ae_matrixElllPNS_9ae_vectorES3_S1_PlPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %12, ptr noundef nonnull %7, ptr noundef %8)
  br i1 %.not.not123, label %.lr.ph, label %.loopexit117.thread

.lr.ph:                                           ; preds = %.loopexit119
  %99 = getelementptr inbounds i8, ptr %13, i64 56
  %100 = getelementptr inbounds i8, ptr %4, i64 56
  %101 = getelementptr inbounds i8, ptr %14, i64 56
  %102 = getelementptr inbounds i8, ptr %5, i64 56
  %xtraiter163 = and i64 %1, 1
  %103 = icmp eq i64 %23, 0
  br i1 %103, label %._crit_edge.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter165 = and i64 %1, 9223372036854775806
  br label %104

104:                                              ; preds = %104, %.lr.ph.new
  %.2102132 = phi i64 [ 0, %.lr.ph.new ], [ %117, %104 ]
  %niter166 = phi i64 [ 0, %.lr.ph.new ], [ %niter166.next.1, %104 ]
  %105 = load ptr, ptr %99, align 8, !tbaa !9
  %106 = or disjoint i64 %.2102132, 1
  %107 = getelementptr inbounds double, ptr %105, i64 %106
  %108 = load double, ptr %107, align 8, !tbaa !12
  %109 = load ptr, ptr %100, align 8, !tbaa !9
  %110 = getelementptr inbounds double, ptr %109, i64 %.2102132
  store double %108, ptr %110, align 8, !tbaa !12
  %111 = load ptr, ptr %101, align 8, !tbaa !9
  %112 = getelementptr inbounds double, ptr %111, i64 %106
  %113 = load double, ptr %112, align 8, !tbaa !12
  %114 = load ptr, ptr %102, align 8, !tbaa !9
  %115 = getelementptr inbounds double, ptr %114, i64 %.2102132
  store double %113, ptr %115, align 8, !tbaa !12
  %116 = load ptr, ptr %99, align 8, !tbaa !9
  %117 = add nuw nsw i64 %.2102132, 2
  %118 = getelementptr inbounds double, ptr %116, i64 %117
  %119 = load double, ptr %118, align 8, !tbaa !12
  %120 = load ptr, ptr %100, align 8, !tbaa !9
  %121 = getelementptr inbounds double, ptr %120, i64 %106
  store double %119, ptr %121, align 8, !tbaa !12
  %122 = load ptr, ptr %101, align 8, !tbaa !9
  %123 = getelementptr inbounds double, ptr %122, i64 %117
  %124 = load double, ptr %123, align 8, !tbaa !12
  %125 = load ptr, ptr %102, align 8, !tbaa !9
  %126 = getelementptr inbounds double, ptr %125, i64 %106
  store double %124, ptr %126, align 8, !tbaa !12
  %niter166.next.1 = add i64 %niter166, 2
  %niter166.ncmp.1 = icmp eq i64 %niter166.next.1, %unroll_iter165
  br i1 %niter166.ncmp.1, label %._crit_edge.unr-lcssa, label %104, !llvm.loop !19

._crit_edge.unr-lcssa:                            ; preds = %104, %.lr.ph
  %.2102132.unr = phi i64 [ 0, %.lr.ph ], [ %117, %104 ]
  %lcmp.mod164.not = icmp eq i64 %xtraiter163, 0
  br i1 %lcmp.mod164.not, label %._crit_edge, label %._crit_edge.epilog-lcssa

._crit_edge.epilog-lcssa:                         ; preds = %._crit_edge.unr-lcssa
  %127 = load ptr, ptr %99, align 8, !tbaa !9
  %128 = add nuw nsw i64 %.2102132.unr, 1
  %129 = getelementptr inbounds double, ptr %127, i64 %128
  %130 = load double, ptr %129, align 8, !tbaa !12
  %131 = load ptr, ptr %100, align 8, !tbaa !9
  %132 = getelementptr inbounds double, ptr %131, i64 %.2102132.unr
  store double %130, ptr %132, align 8, !tbaa !12
  %133 = load ptr, ptr %101, align 8, !tbaa !9
  %134 = getelementptr inbounds double, ptr %133, i64 %128
  %135 = load double, ptr %134, align 8, !tbaa !12
  %136 = load ptr, ptr %102, align 8, !tbaa !9
  %137 = getelementptr inbounds double, ptr %136, i64 %.2102132.unr
  store double %135, ptr %137, align 8, !tbaa !12
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.unr-lcssa, %._crit_edge.epilog-lcssa
  %.not = icmp ne i64 %2, 0
  %or.cond = and i1 %.not, %.not.not123
  br i1 %or.cond, label %.preheader115.lr.ph, label %.loopexit117

.preheader115.lr.ph:                              ; preds = %._crit_edge
  %138 = getelementptr inbounds i8, ptr %11, i64 72
  %139 = getelementptr inbounds i8, ptr %0, i64 72
  %xtraiter168 = and i64 %1, 1
  %140 = icmp eq i64 %23, 0
  %unroll_iter170 = and i64 %1, 9223372036854775806
  %lcmp.mod169.not = icmp eq i64 %xtraiter168, 0
  br label %.preheader115.us

.preheader115.us:                                 ; preds = %._crit_edge136.us, %.preheader115.lr.ph
  %.3103138.us = phi i64 [ 0, %.preheader115.lr.ph ], [ %174, %._crit_edge136.us ]
  br i1 %140, label %._crit_edge136.us.unr-lcssa, label %.preheader115.us.new

.preheader115.us.new:                             ; preds = %.preheader115.us, %.preheader115.us.new
  %.2134.us = phi i64 [ %156, %.preheader115.us.new ], [ 0, %.preheader115.us ]
  %niter171 = phi i64 [ %niter171.next.1, %.preheader115.us.new ], [ 0, %.preheader115.us ]
  %141 = load ptr, ptr %138, align 8, !tbaa !9
  %142 = getelementptr inbounds ptr, ptr %141, i64 %.3103138.us
  %143 = getelementptr inbounds i8, ptr %142, i64 8
  %144 = load ptr, ptr %143, align 8, !tbaa !10
  %145 = or disjoint i64 %.2134.us, 1
  %146 = getelementptr inbounds double, ptr %144, i64 %145
  %147 = load double, ptr %146, align 8, !tbaa !12
  %148 = load ptr, ptr %139, align 8, !tbaa !9
  %149 = getelementptr inbounds ptr, ptr %148, i64 %.3103138.us
  %150 = load ptr, ptr %149, align 8, !tbaa !10
  %151 = getelementptr inbounds double, ptr %150, i64 %.2134.us
  store double %147, ptr %151, align 8, !tbaa !12
  %152 = load ptr, ptr %138, align 8, !tbaa !9
  %153 = getelementptr inbounds ptr, ptr %152, i64 %.3103138.us
  %154 = getelementptr inbounds i8, ptr %153, i64 8
  %155 = load ptr, ptr %154, align 8, !tbaa !10
  %156 = add nuw nsw i64 %.2134.us, 2
  %157 = getelementptr inbounds double, ptr %155, i64 %156
  %158 = load double, ptr %157, align 8, !tbaa !12
  %159 = load ptr, ptr %139, align 8, !tbaa !9
  %160 = getelementptr inbounds ptr, ptr %159, i64 %.3103138.us
  %161 = load ptr, ptr %160, align 8, !tbaa !10
  %162 = getelementptr inbounds double, ptr %161, i64 %145
  store double %158, ptr %162, align 8, !tbaa !12
  %niter171.next.1 = add i64 %niter171, 2
  %niter171.ncmp.1 = icmp eq i64 %niter171.next.1, %unroll_iter170
  br i1 %niter171.ncmp.1, label %._crit_edge136.us.unr-lcssa, label %.preheader115.us.new, !llvm.loop !20

._crit_edge136.us.unr-lcssa:                      ; preds = %.preheader115.us.new, %.preheader115.us
  %.2134.us.unr = phi i64 [ 0, %.preheader115.us ], [ %156, %.preheader115.us.new ]
  br i1 %lcmp.mod169.not, label %._crit_edge136.us, label %._crit_edge136.us.epilog-lcssa

._crit_edge136.us.epilog-lcssa:                   ; preds = %._crit_edge136.us.unr-lcssa
  %163 = load ptr, ptr %138, align 8, !tbaa !9
  %164 = getelementptr inbounds ptr, ptr %163, i64 %.3103138.us
  %165 = getelementptr inbounds i8, ptr %164, i64 8
  %166 = load ptr, ptr %165, align 8, !tbaa !10
  %167 = getelementptr double, ptr %166, i64 %.2134.us.unr
  %168 = getelementptr i8, ptr %167, i64 8
  %169 = load double, ptr %168, align 8, !tbaa !12
  %170 = load ptr, ptr %139, align 8, !tbaa !9
  %171 = getelementptr inbounds ptr, ptr %170, i64 %.3103138.us
  %172 = load ptr, ptr %171, align 8, !tbaa !10
  %173 = getelementptr inbounds double, ptr %172, i64 %.2134.us.unr
  store double %169, ptr %173, align 8, !tbaa !12
  br label %._crit_edge136.us

._crit_edge136.us:                                ; preds = %._crit_edge136.us.unr-lcssa, %._crit_edge136.us.epilog-lcssa
  %174 = add nuw nsw i64 %.3103138.us, 1
  %exitcond150.not = icmp eq i64 %174, %1
  br i1 %exitcond150.not, label %.loopexit117, label %.preheader115.us, !llvm.loop !21

.loopexit117:                                     ; preds = %._crit_edge136.us, %._crit_edge
  %.not109 = icmp eq i64 %3, 0
  br i1 %.not109, label %.loopexit, label %175

.loopexit117.thread:                              ; preds = %.loopexit119, %.loopexit119.thread
  %.not109155 = icmp eq i64 %3, 0
  br i1 %.not109155, label %.loopexit, label %.thread156

.thread156:                                       ; preds = %.loopexit117.thread
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %6, i64 noundef %1, i64 noundef %1, ptr noundef %8)
  br label %.loopexit

175:                                              ; preds = %.loopexit117
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %6, i64 noundef %1, i64 noundef %1, ptr noundef %8)
  br i1 %.not.not123, label %.preheader.lr.ph, label %.loopexit

.preheader.lr.ph:                                 ; preds = %175
  %176 = getelementptr inbounds i8, ptr %12, i64 72
  %177 = getelementptr inbounds i8, ptr %6, i64 72
  %xtraiter173 = and i64 %1, 1
  %178 = icmp eq i64 %23, 0
  %unroll_iter175 = and i64 %1, 9223372036854775806
  %lcmp.mod174.not = icmp eq i64 %xtraiter173, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %._crit_edge142.us, %.preheader.lr.ph
  %.4144.us = phi i64 [ 0, %.preheader.lr.ph ], [ %212, %._crit_edge142.us ]
  br i1 %178, label %._crit_edge142.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %.3140.us = phi i64 [ %194, %.preheader.us.new ], [ 0, %.preheader.us ]
  %niter176 = phi i64 [ %niter176.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %179 = load ptr, ptr %176, align 8, !tbaa !9
  %180 = getelementptr inbounds ptr, ptr %179, i64 %.4144.us
  %181 = getelementptr inbounds i8, ptr %180, i64 8
  %182 = load ptr, ptr %181, align 8, !tbaa !10
  %183 = or disjoint i64 %.3140.us, 1
  %184 = getelementptr inbounds double, ptr %182, i64 %183
  %185 = load double, ptr %184, align 8, !tbaa !12
  %186 = load ptr, ptr %177, align 8, !tbaa !9
  %187 = getelementptr inbounds ptr, ptr %186, i64 %.4144.us
  %188 = load ptr, ptr %187, align 8, !tbaa !10
  %189 = getelementptr inbounds double, ptr %188, i64 %.3140.us
  store double %185, ptr %189, align 8, !tbaa !12
  %190 = load ptr, ptr %176, align 8, !tbaa !9
  %191 = getelementptr inbounds ptr, ptr %190, i64 %.4144.us
  %192 = getelementptr inbounds i8, ptr %191, i64 8
  %193 = load ptr, ptr %192, align 8, !tbaa !10
  %194 = add nuw nsw i64 %.3140.us, 2
  %195 = getelementptr inbounds double, ptr %193, i64 %194
  %196 = load double, ptr %195, align 8, !tbaa !12
  %197 = load ptr, ptr %177, align 8, !tbaa !9
  %198 = getelementptr inbounds ptr, ptr %197, i64 %.4144.us
  %199 = load ptr, ptr %198, align 8, !tbaa !10
  %200 = getelementptr inbounds double, ptr %199, i64 %183
  store double %196, ptr %200, align 8, !tbaa !12
  %niter176.next.1 = add i64 %niter176, 2
  %niter176.ncmp.1 = icmp eq i64 %niter176.next.1, %unroll_iter175
  br i1 %niter176.ncmp.1, label %._crit_edge142.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !22

._crit_edge142.us.unr-lcssa:                      ; preds = %.preheader.us.new, %.preheader.us
  %.3140.us.unr = phi i64 [ 0, %.preheader.us ], [ %194, %.preheader.us.new ]
  br i1 %lcmp.mod174.not, label %._crit_edge142.us, label %._crit_edge142.us.epilog-lcssa

._crit_edge142.us.epilog-lcssa:                   ; preds = %._crit_edge142.us.unr-lcssa
  %201 = load ptr, ptr %176, align 8, !tbaa !9
  %202 = getelementptr inbounds ptr, ptr %201, i64 %.4144.us
  %203 = getelementptr inbounds i8, ptr %202, i64 8
  %204 = load ptr, ptr %203, align 8, !tbaa !10
  %205 = getelementptr double, ptr %204, i64 %.3140.us.unr
  %206 = getelementptr i8, ptr %205, i64 8
  %207 = load double, ptr %206, align 8, !tbaa !12
  %208 = load ptr, ptr %177, align 8, !tbaa !9
  %209 = getelementptr inbounds ptr, ptr %208, i64 %.4144.us
  %210 = load ptr, ptr %209, align 8, !tbaa !10
  %211 = getelementptr inbounds double, ptr %210, i64 %.3140.us.unr
  store double %207, ptr %211, align 8, !tbaa !12
  br label %._crit_edge142.us

._crit_edge142.us:                                ; preds = %._crit_edge142.us.unr-lcssa, %._crit_edge142.us.epilog-lcssa
  %212 = add nuw nsw i64 %.4144.us, 1
  %exitcond152.not = icmp eq i64 %212, %1
  br i1 %exitcond152.not, label %.loopexit, label %.preheader.us, !llvm.loop !23

.loopexit:                                        ; preds = %._crit_edge142.us, %.loopexit117, %175, %.loopexit117.thread, %.thread156, %17
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %8)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl26internalschurdecompositionEPNS_9ae_matrixElllPNS_9ae_vectorES3_S1_PlPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, ptr 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, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}
!23 = distinct !{!23, !15}


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