; 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_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { 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.200 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.201 = external hidden unnamed_addr constant [5 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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl11cmatrixgemmElllNS_10ae_complexEPNS_9ae_matrixElllS2_lllS0_S2_llPNS_8ae_stateE(i64 noundef, i64 noundef, i64 noundef, double, double, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, double, double, ptr noundef, i64 noundef, i64 noundef, ptr 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) #3

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

43:                                               ; preds = %5
  %44 = load i64, ptr %8, align 8, !tbaa !9
  %45 = icmp sle i64 %44, 0
  br i1 %45, label %46, label %48

46:                                               ; preds = %43, %5
  %47 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %47)
  store i32 1, ptr %24, align 4
  br label %298

48:                                               ; preds = %43
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = call noundef i64 @_ZN11alglib_impl15matrixtilesizebEPNS_8ae_stateE(ptr noundef %49)
  %51 = sdiv i64 %50, 2
  store i64 %51, ptr %23, align 8, !tbaa !9
  %52 = load i64, ptr %7, align 8, !tbaa !9
  %53 = load i64, ptr %8, align 8, !tbaa !9
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %52, i64 noundef %53, ptr noundef %54)
  store i64 %55, ptr %15, align 8, !tbaa !9
  %56 = load i64, ptr %7, align 8, !tbaa !9
  %57 = load i64, ptr %8, align 8, !tbaa !9
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %56, i64 noundef %57, ptr noundef %58)
  %60 = add nsw i64 %59, 1
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %12, i64 noundef %60, ptr noundef %61)
  %62 = load i64, ptr %7, align 8, !tbaa !9
  %63 = load i64, ptr %8, align 8, !tbaa !9
  %64 = load ptr, ptr %10, align 8, !tbaa !5
  %65 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %62, i64 noundef %63, ptr noundef %64)
  %66 = add nsw i64 %65, 1
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %13, i64 noundef %66, ptr noundef %67)
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = load i64, ptr %15, align 8, !tbaa !9
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %68, i64 noundef %69, ptr noundef %70)
  %71 = load i64, ptr %15, align 8, !tbaa !9
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %14, i64 noundef %71, ptr noundef %72)
  %73 = load i64, ptr %23, align 8, !tbaa !9
  %74 = load i64, ptr %8, align 8, !tbaa !9
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %16, i64 noundef %73, i64 noundef %74, ptr noundef %75)
  %76 = load i64, ptr %23, align 8, !tbaa !9
  %77 = load i64, ptr %23, align 8, !tbaa !9
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %17, i64 noundef %76, i64 noundef %77, ptr noundef %78)
  %79 = load i64, ptr %7, align 8, !tbaa !9
  %80 = load i64, ptr %23, align 8, !tbaa !9
  %81 = mul nsw i64 2, %80
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %18, i64 noundef %79, i64 noundef %81, ptr noundef %82)
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %83

83:                                               ; preds = %292, %48
  %84 = load i64, ptr %19, align 8, !tbaa !9
  %85 = load i64, ptr %15, align 8, !tbaa !9
  %86 = icmp ne i64 %84, %85
  br i1 %86, label %87, label %296

87:                                               ; preds = %83
  %88 = load i64, ptr %15, align 8, !tbaa !9
  %89 = load i64, ptr %19, align 8, !tbaa !9
  %90 = sub nsw i64 %88, %89
  store i64 %90, ptr %20, align 8, !tbaa !9
  %91 = load i64, ptr %20, align 8, !tbaa !9
  %92 = load i64, ptr %23, align 8, !tbaa !9
  %93 = icmp sgt i64 %91, %92
  br i1 %93, label %94, label %96

94:                                               ; preds = %87
  %95 = load i64, ptr %23, align 8, !tbaa !9
  store i64 %95, ptr %20, align 8, !tbaa !9
  br label %96

96:                                               ; preds = %94, %87
  %97 = load i64, ptr %8, align 8, !tbaa !9
  %98 = load i64, ptr %19, align 8, !tbaa !9
  %99 = sub nsw i64 %97, %98
  store i64 %99, ptr %21, align 8, !tbaa !9
  %100 = load i64, ptr %20, align 8, !tbaa !9
  %101 = load i64, ptr %21, align 8, !tbaa !9
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = load i64, ptr %19, align 8, !tbaa !9
  %104 = load i64, ptr %19, align 8, !tbaa !9
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl11cmatrixcopyEllPNS_9ae_matrixEllS1_llPNS_8ae_stateE(i64 noundef %100, i64 noundef %101, ptr noundef %102, i64 noundef %103, i64 noundef %104, ptr noundef %16, i64 noundef 0, i64 noundef 0, ptr noundef %105)
  %106 = load i64, ptr %20, align 8, !tbaa !9
  %107 = load i64, ptr %21, align 8, !tbaa !9
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_implL24ortfac_cmatrixlqbasecaseEPNS_9ae_matrixEllPNS_9ae_vectorES3_S3_PNS_8ae_stateE(ptr noundef %16, i64 noundef %106, i64 noundef %107, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %108)
  %109 = load i64, ptr %20, align 8, !tbaa !9
  %110 = load i64, ptr %21, align 8, !tbaa !9
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = load i64, ptr %19, align 8, !tbaa !9
  %113 = load i64, ptr %19, align 8, !tbaa !9
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl11cmatrixcopyEllPNS_9ae_matrixEllS1_llPNS_8ae_stateE(i64 noundef %109, i64 noundef %110, ptr noundef %16, i64 noundef 0, i64 noundef 0, ptr noundef %111, i64 noundef %112, i64 noundef %113, ptr noundef %114)
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %115, i32 0, i32 4
  %117 = load ptr, ptr %116, align 8, !tbaa !11
  %118 = load i64, ptr %19, align 8, !tbaa !9
  %119 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %117, i64 %118
  %120 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %121 = load ptr, ptr %120, align 8, !tbaa !11
  %122 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %121, i64 0
  %123 = load i64, ptr %19, align 8, !tbaa !9
  %124 = load i64, ptr %19, align 8, !tbaa !9
  %125 = load i64, ptr %20, align 8, !tbaa !9
  %126 = add nsw i64 %124, %125
  %127 = sub nsw i64 %126, 1
  %128 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %123, i64 noundef %127)
  call void @_ZN11alglib_impl10ae_v_cmoveEPNS_10ae_complexElPKS0_lPKcl(ptr noundef %119, i64 noundef 1, ptr noundef %122, i64 noundef 1, ptr noundef @.str.200, i64 noundef %128)
  %129 = load i64, ptr %19, align 8, !tbaa !9
  %130 = load i64, ptr %20, align 8, !tbaa !9
  %131 = add nsw i64 %129, %130
  %132 = load i64, ptr %7, align 8, !tbaa !9
  %133 = sub nsw i64 %132, 1
  %134 = icmp sle i64 %131, %133
  br i1 %134, label %135, label %292

135:                                              ; preds = %96
  %136 = load i64, ptr %7, align 8, !tbaa !9
  %137 = load i64, ptr %19, align 8, !tbaa !9
  %138 = sub nsw i64 %136, %137
  %139 = load i64, ptr %20, align 8, !tbaa !9
  %140 = sub nsw i64 %138, %139
  %141 = load i64, ptr %23, align 8, !tbaa !9
  %142 = mul nsw i64 2, %141
  %143 = icmp sge i64 %140, %142
  br i1 %143, label %144, label %238

144:                                              ; preds = %135
  %145 = load i64, ptr %21, align 8, !tbaa !9
  %146 = load i64, ptr %20, align 8, !tbaa !9
  %147 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_implL28ortfac_cmatrixblockreflectorEPNS_9ae_matrixEPNS_9ae_vectorEbllS1_S3_PNS_8ae_stateE(ptr noundef %16, ptr noundef %14, i1 noundef zeroext false, i64 noundef %145, i64 noundef %146, ptr noundef %17, ptr noundef %12, ptr noundef %147)
  %148 = load i64, ptr %7, align 8, !tbaa !9
  %149 = load i64, ptr %19, align 8, !tbaa !9
  %150 = sub nsw i64 %148, %149
  %151 = load i64, ptr %20, align 8, !tbaa !9
  %152 = sub nsw i64 %150, %151
  %153 = load i64, ptr %20, align 8, !tbaa !9
  %154 = load i64, ptr %21, align 8, !tbaa !9
  %155 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 1.000000e+00)
  %156 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %157 = extractvalue { double, double } %155, 0
  store double %157, ptr %156, align 8
  %158 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %159 = extractvalue { double, double } %155, 1
  store double %159, ptr %158, align 8
  %160 = load ptr, ptr %6, align 8, !tbaa !5
  %161 = load i64, ptr %19, align 8, !tbaa !9
  %162 = load i64, ptr %20, align 8, !tbaa !9
  %163 = add nsw i64 %161, %162
  %164 = load i64, ptr %19, align 8, !tbaa !9
  %165 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 0.000000e+00)
  %166 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %167 = extractvalue { double, double } %165, 0
  store double %167, ptr %166, align 8
  %168 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %169 = extractvalue { double, double } %165, 1
  store double %169, ptr %168, align 8
  %170 = load ptr, ptr %10, align 8, !tbaa !5
  %171 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %172 = load double, ptr %171, align 8
  %173 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %174 = load double, ptr %173, align 8
  %175 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %176 = load double, ptr %175, align 8
  %177 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %178 = load double, ptr %177, align 8
  call void @_ZN11alglib_impl11cmatrixgemmElllNS_10ae_complexEPNS_9ae_matrixElllS2_lllS0_S2_llPNS_8ae_stateE(i64 noundef %152, i64 noundef %153, i64 noundef %154, double %172, double %174, ptr noundef %160, i64 noundef %163, i64 noundef %164, i64 noundef 0, ptr noundef %16, i64 noundef 0, i64 noundef 0, i64 noundef 2, double %176, double %178, ptr noundef %18, i64 noundef 0, i64 noundef 0, ptr noundef %170)
  %179 = load i64, ptr %7, align 8, !tbaa !9
  %180 = load i64, ptr %19, align 8, !tbaa !9
  %181 = sub nsw i64 %179, %180
  %182 = load i64, ptr %20, align 8, !tbaa !9
  %183 = sub nsw i64 %181, %182
  %184 = load i64, ptr %20, align 8, !tbaa !9
  %185 = load i64, ptr %20, align 8, !tbaa !9
  %186 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 1.000000e+00)
  %187 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %188 = extractvalue { double, double } %186, 0
  store double %188, ptr %187, align 8
  %189 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %190 = extractvalue { double, double } %186, 1
  store double %190, ptr %189, align 8
  %191 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 0.000000e+00)
  %192 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %193 = extractvalue { double, double } %191, 0
  store double %193, ptr %192, align 8
  %194 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %195 = extractvalue { double, double } %191, 1
  store double %195, ptr %194, align 8
  %196 = load i64, ptr %20, align 8, !tbaa !9
  %197 = load ptr, ptr %10, align 8, !tbaa !5
  %198 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %199 = load double, ptr %198, align 8
  %200 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %201 = load double, ptr %200, align 8
  %202 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %203 = load double, ptr %202, align 8
  %204 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %205 = load double, ptr %204, align 8
  call void @_ZN11alglib_impl11cmatrixgemmElllNS_10ae_complexEPNS_9ae_matrixElllS2_lllS0_S2_llPNS_8ae_stateE(i64 noundef %183, i64 noundef %184, i64 noundef %185, double %199, double %201, ptr noundef %18, i64 noundef 0, i64 noundef 0, i64 noundef 0, ptr noundef %17, i64 noundef 0, i64 noundef 0, i64 noundef 0, double %203, double %205, ptr noundef %18, i64 noundef 0, i64 noundef %196, ptr noundef %197)
  %206 = load i64, ptr %7, align 8, !tbaa !9
  %207 = load i64, ptr %19, align 8, !tbaa !9
  %208 = sub nsw i64 %206, %207
  %209 = load i64, ptr %20, align 8, !tbaa !9
  %210 = sub nsw i64 %208, %209
  %211 = load i64, ptr %21, align 8, !tbaa !9
  %212 = load i64, ptr %20, align 8, !tbaa !9
  %213 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 1.000000e+00)
  %214 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %215 = extractvalue { double, double } %213, 0
  store double %215, ptr %214, align 8
  %216 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %217 = extractvalue { double, double } %213, 1
  store double %217, ptr %216, align 8
  %218 = load i64, ptr %20, align 8, !tbaa !9
  %219 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 1.000000e+00)
  %220 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %221 = extractvalue { double, double } %219, 0
  store double %221, ptr %220, align 8
  %222 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %223 = extractvalue { double, double } %219, 1
  store double %223, ptr %222, align 8
  %224 = load ptr, ptr %6, align 8, !tbaa !5
  %225 = load i64, ptr %19, align 8, !tbaa !9
  %226 = load i64, ptr %20, align 8, !tbaa !9
  %227 = add nsw i64 %225, %226
  %228 = load i64, ptr %19, align 8, !tbaa !9
  %229 = load ptr, ptr %10, align 8, !tbaa !5
  %230 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %231 = load double, ptr %230, align 8
  %232 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %233 = load double, ptr %232, align 8
  %234 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %235 = load double, ptr %234, align 8
  %236 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %237 = load double, ptr %236, align 8
  call void @_ZN11alglib_impl11cmatrixgemmElllNS_10ae_complexEPNS_9ae_matrixElllS2_lllS0_S2_llPNS_8ae_stateE(i64 noundef %210, i64 noundef %211, i64 noundef %212, double %231, double %233, ptr noundef %18, i64 noundef 0, i64 noundef %218, i64 noundef 0, ptr noundef %16, i64 noundef 0, i64 noundef 0, i64 noundef 0, double %235, double %237, ptr noundef %224, i64 noundef %227, i64 noundef %228, ptr noundef %229)
  br label %291

238:                                              ; preds = %135
  store i64 0, ptr %22, align 8, !tbaa !9
  br label %239

239:                                              ; preds = %287, %238
  %240 = load i64, ptr %22, align 8, !tbaa !9
  %241 = load i64, ptr %20, align 8, !tbaa !9
  %242 = sub nsw i64 %241, 1
  %243 = icmp sle i64 %240, %242
  br i1 %243, label %244, label %290

244:                                              ; preds = %239
  %245 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %13, i32 0, i32 4
  %246 = load ptr, ptr %245, align 8, !tbaa !11
  %247 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %246, i64 1
  %248 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %16, i32 0, i32 6
  %249 = load ptr, ptr %248, align 8, !tbaa !11
  %250 = load i64, ptr %22, align 8, !tbaa !9
  %251 = getelementptr inbounds ptr, ptr %249, i64 %250
  %252 = load ptr, ptr %251, align 8, !tbaa !5
  %253 = load i64, ptr %22, align 8, !tbaa !9
  %254 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %252, i64 %253
  %255 = load i64, ptr %21, align 8, !tbaa !9
  %256 = load i64, ptr %22, align 8, !tbaa !9
  %257 = sub nsw i64 %255, %256
  %258 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 1, i64 noundef %257)
  call void @_ZN11alglib_impl10ae_v_cmoveEPNS_10ae_complexElPKS0_lPKcl(ptr noundef %247, i64 noundef 1, ptr noundef %254, i64 noundef 1, ptr noundef @.str.201, i64 noundef %258)
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #5
  %259 = call { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef 1)
  %260 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %261 = extractvalue { double, double } %259, 0
  store double %261, ptr %260, align 8
  %262 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %263 = extractvalue { double, double } %259, 1
  store double %263, ptr %262, align 8
  %264 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %13, i32 0, i32 4
  %265 = load ptr, ptr %264, align 8, !tbaa !11
  %266 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %265, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %266, ptr align 8 %31, i64 16, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #5
  %267 = load ptr, ptr %6, align 8, !tbaa !5
  %268 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %269 = load ptr, ptr %268, align 8, !tbaa !11
  %270 = load i64, ptr %22, align 8, !tbaa !9
  %271 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %269, i64 %270
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %32, ptr align 8 %271, i64 16, i1 false), !tbaa.struct !12
  %272 = load i64, ptr %19, align 8, !tbaa !9
  %273 = load i64, ptr %20, align 8, !tbaa !9
  %274 = add nsw i64 %272, %273
  %275 = load i64, ptr %7, align 8, !tbaa !9
  %276 = sub nsw i64 %275, 1
  %277 = load i64, ptr %19, align 8, !tbaa !9
  %278 = load i64, ptr %22, align 8, !tbaa !9
  %279 = add nsw i64 %277, %278
  %280 = load i64, ptr %8, align 8, !tbaa !9
  %281 = sub nsw i64 %280, 1
  %282 = load ptr, ptr %10, align 8, !tbaa !5
  %283 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %284 = load double, ptr %283, align 8
  %285 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %286 = load double, ptr %285, align 8
  call void @_ZN11alglib_impl34complexapplyreflectionfromtherightEPNS_9ae_matrixENS_10ae_complexEPNS_9ae_vectorEllllS4_PNS_8ae_stateE(ptr noundef %267, double %284, double %286, ptr noundef %13, i64 noundef %274, i64 noundef %276, i64 noundef %279, i64 noundef %281, ptr noundef %12, ptr noundef %282)
  br label %287

287:                                              ; preds = %244
  %288 = load i64, ptr %22, align 8, !tbaa !9
  %289 = add nsw i64 %288, 1
  store i64 %289, ptr %22, align 8, !tbaa !9
  br label %239, !llvm.loop !15

290:                                              ; preds = %239
  br label %291

291:                                              ; preds = %290, %144
  br label %292

292:                                              ; preds = %291, %96
  %293 = load i64, ptr %19, align 8, !tbaa !9
  %294 = load i64, ptr %20, align 8, !tbaa !9
  %295 = add nsw i64 %293, %294
  store i64 %295, ptr %19, align 8, !tbaa !9
  br label %83, !llvm.loop !17

296:                                              ; preds = %83
  %297 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %297)
  store i32 0, ptr %24, align 4
  br label %298

298:                                              ; preds = %296, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  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 80, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  %299 = load i32, ptr %24, align 4
  switch i32 %299, label %301 [
    i32 0, label %300
    i32 1, label %300
  ]

300:                                              ; preds = %298, %298
  ret void

301:                                              ; preds = %298
  unreachable
}

declare noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) #4

declare noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) #4

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #4

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #4

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

declare { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef) #4

declare noundef i64 @_ZN11alglib_impl15matrixtilesizebEPNS_8ae_stateE(ptr noundef) #4

declare { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef) #4

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

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

declare void @_ZN11alglib_impl34complexapplyreflectionfromtherightEPNS_9ae_matrixENS_10ae_complexEPNS_9ae_vectorEllllS4_PNS_8ae_stateE(ptr noundef, double, double, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL28ortfac_cmatrixblockreflectorEPNS_9ae_matrixEPNS_9ae_vectorEbllS1_S3_PNS_8ae_stateE(ptr noundef, ptr noundef, i1 noundef zeroext, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL24ortfac_cmatrixlqbasecaseEPNS_9ae_matrixEllPNS_9ae_vectorES3_S3_PNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "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 #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 = !{!7, !7, i64 0}
!12 = !{i64 0, i64 8, !13, i64 8, i64 8, !13}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; 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_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { 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.200 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.201 = external hidden unnamed_addr constant [5 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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl11cmatrixgemmElllNS_10ae_complexEPNS_9ae_matrixElllS2_lllS0_S2_llPNS_8ae_stateE(i64 noundef, i64 noundef, i64 noundef, double, double, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, double, double, ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

15:                                               ; preds = %5
  %16 = call noundef i64 @_ZN11alglib_impl15matrixtilesizebEPNS_8ae_stateE(ptr noundef %4)
  %17 = sdiv i64 %16, 2
  %18 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %1, i64 noundef %2, ptr noundef %4)
  %19 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %1, i64 noundef %2, ptr noundef %4)
  %20 = add nsw i64 %19, 1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %20, ptr noundef %4)
  %21 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %1, i64 noundef %2, ptr noundef %4)
  %22 = add nsw i64 %21, 1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %22, ptr noundef %4)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %3, i64 noundef %18, ptr noundef %4)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %18, ptr noundef %4)
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %17, i64 noundef %2, ptr noundef %4)
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %17, i64 noundef %17, ptr noundef %4)
  %23 = shl nsw i64 %17, 1
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %12, i64 noundef %1, i64 noundef %23, ptr noundef %4)
  %.not151 = icmp eq i64 %18, 0
  br i1 %.not151, label %._crit_edge, label %.lr.ph153

.lr.ph153:                                        ; preds = %15
  %24 = getelementptr inbounds i8, ptr %3, i64 56
  %25 = getelementptr inbounds i8, ptr %9, i64 56
  %26 = add nsw i64 %1, -1
  %27 = getelementptr inbounds i8, ptr %8, i64 56
  %28 = getelementptr inbounds i8, ptr %10, i64 72
  %29 = add nsw i64 %2, -1
  br label %30

30:                                               ; preds = %.lr.ph153, %.loopexit
  %.0152 = phi i64 [ 0, %.lr.ph153 ], [ %36, %.loopexit ]
  %31 = sub nsw i64 %18, %.0152
  %spec.select = call i64 @llvm.smin.i64(i64 %31, i64 %17)
  %32 = sub nsw i64 %2, %.0152
  call void @_ZN11alglib_impl11cmatrixcopyEllPNS_9ae_matrixEllS1_llPNS_8ae_stateE(i64 noundef %spec.select, i64 noundef %32, ptr noundef %0, i64 noundef %.0152, i64 noundef %.0152, ptr noundef nonnull %10, i64 noundef 0, i64 noundef 0, ptr noundef %4)
  call void @_ZN11alglib_implL24ortfac_cmatrixlqbasecaseEPNS_9ae_matrixEllPNS_9ae_vectorES3_S3_PNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %spec.select, i64 noundef %32, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef %4)
  call void @_ZN11alglib_impl11cmatrixcopyEllPNS_9ae_matrixEllS1_llPNS_8ae_stateE(i64 noundef %spec.select, i64 noundef %32, ptr noundef nonnull %10, i64 noundef 0, i64 noundef 0, ptr noundef %0, i64 noundef %.0152, i64 noundef %.0152, ptr noundef %4)
  %33 = load ptr, ptr %24, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %33, i64 %.0152
  %35 = load ptr, ptr %25, align 8, !tbaa !5
  %36 = add nsw i64 %spec.select, %.0152
  %37 = add nsw i64 %36, -1
  %38 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %.0152, i64 noundef %37)
  call void @_ZN11alglib_impl10ae_v_cmoveEPNS_10ae_complexElPKS0_lPKcl(ptr noundef %34, i64 noundef 1, ptr noundef %35, i64 noundef 1, ptr noundef nonnull @.str.200, i64 noundef %38)
  %.not146.not = icmp slt i64 %36, %1
  br i1 %.not146.not, label %39, label %.loopexit

39:                                               ; preds = %30
  %40 = sub i64 %1, %36
  %.not147 = icmp slt i64 %40, %23
  br i1 %.not147, label %.preheader, label %41

.preheader:                                       ; preds = %39
  %.not148.not149 = icmp sgt i64 %spec.select, 0
  br i1 %.not148.not149, label %.lr.ph, label %.loopexit

41:                                               ; preds = %39
  call void @_ZN11alglib_implL28ortfac_cmatrixblockreflectorEPNS_9ae_matrixEPNS_9ae_vectorEbllS1_S3_PNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %9, i1 noundef zeroext false, i64 noundef %32, i64 noundef %spec.select, ptr noundef nonnull %11, ptr noundef nonnull %7, ptr noundef %4)
  %42 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 1.000000e+00)
  %43 = extractvalue { double, double } %42, 0
  %44 = extractvalue { double, double } %42, 1
  %45 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 0.000000e+00)
  %46 = extractvalue { double, double } %45, 0
  %47 = extractvalue { double, double } %45, 1
  call void @_ZN11alglib_impl11cmatrixgemmElllNS_10ae_complexEPNS_9ae_matrixElllS2_lllS0_S2_llPNS_8ae_stateE(i64 noundef %40, i64 noundef %spec.select, i64 noundef %32, double %43, double %44, ptr noundef %0, i64 noundef %36, i64 noundef %.0152, i64 noundef 0, ptr noundef nonnull %10, i64 noundef 0, i64 noundef 0, i64 noundef 2, double %46, double %47, ptr noundef nonnull %12, i64 noundef 0, i64 noundef 0, ptr noundef %4)
  %48 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 1.000000e+00)
  %49 = extractvalue { double, double } %48, 0
  %50 = extractvalue { double, double } %48, 1
  %51 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 0.000000e+00)
  %52 = extractvalue { double, double } %51, 0
  %53 = extractvalue { double, double } %51, 1
  call void @_ZN11alglib_impl11cmatrixgemmElllNS_10ae_complexEPNS_9ae_matrixElllS2_lllS0_S2_llPNS_8ae_stateE(i64 noundef %40, i64 noundef %spec.select, i64 noundef %spec.select, double %49, double %50, ptr noundef nonnull %12, i64 noundef 0, i64 noundef 0, i64 noundef 0, ptr noundef nonnull %11, i64 noundef 0, i64 noundef 0, i64 noundef 0, double %52, double %53, ptr noundef nonnull %12, i64 noundef 0, i64 noundef %spec.select, ptr noundef %4)
  %54 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 1.000000e+00)
  %55 = extractvalue { double, double } %54, 0
  %56 = extractvalue { double, double } %54, 1
  %57 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 1.000000e+00)
  %58 = extractvalue { double, double } %57, 0
  %59 = extractvalue { double, double } %57, 1
  call void @_ZN11alglib_impl11cmatrixgemmElllNS_10ae_complexEPNS_9ae_matrixElllS2_lllS0_S2_llPNS_8ae_stateE(i64 noundef %40, i64 noundef %32, i64 noundef %spec.select, double %55, double %56, ptr noundef nonnull %12, i64 noundef 0, i64 noundef %spec.select, i64 noundef 0, ptr noundef nonnull %10, i64 noundef 0, i64 noundef 0, i64 noundef 0, double %58, double %59, ptr noundef %0, i64 noundef %36, i64 noundef %.0152, ptr noundef %4)
  br label %.loopexit

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.0137150 = phi i64 [ %76, %.lr.ph ], [ 0, %.preheader ]
  %60 = load ptr, ptr %27, align 8, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %60, i64 16
  %62 = load ptr, ptr %28, align 8, !tbaa !5
  %63 = getelementptr inbounds ptr, ptr %62, i64 %.0137150
  %64 = load ptr, ptr %63, align 8, !tbaa !8
  %65 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %64, i64 %.0137150
  %66 = sub nsw i64 %32, %.0137150
  %67 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 1, i64 noundef %66)
  call void @_ZN11alglib_impl10ae_v_cmoveEPNS_10ae_complexElPKS0_lPKcl(ptr noundef nonnull %61, i64 noundef 1, ptr noundef %65, i64 noundef 1, ptr noundef nonnull @.str.201, i64 noundef %67)
  %68 = call { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef 1)
  %69 = extractvalue { double, double } %68, 0
  %70 = extractvalue { double, double } %68, 1
  %71 = load ptr, ptr %27, align 8, !tbaa !5
  %72 = getelementptr inbounds i8, ptr %71, i64 16
  store double %69, ptr %72, align 8, !tbaa !10
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %71, i64 24
  store double %70, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !10
  %73 = load ptr, ptr %25, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %73, i64 %.0137150
  %.sroa.0.0.copyload = load double, ptr %74, align 8, !tbaa !10
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %74, i64 8
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !10
  %75 = add nsw i64 %.0137150, %.0152
  call void @_ZN11alglib_impl34complexapplyreflectionfromtherightEPNS_9ae_matrixENS_10ae_complexEPNS_9ae_vectorEllllS4_PNS_8ae_stateE(ptr noundef %0, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload, ptr noundef nonnull %8, i64 noundef %36, i64 noundef %26, i64 noundef %75, i64 noundef %29, ptr noundef nonnull %7, ptr noundef %4)
  %76 = add nuw nsw i64 %.0137150, 1
  %exitcond.not = icmp eq i64 %76, %spec.select
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !12

.loopexit:                                        ; preds = %.lr.ph, %.preheader, %41, %30
  %.not = icmp eq i64 %36, %18
  br i1 %.not, label %._crit_edge, label %30, !llvm.loop !14

._crit_edge:                                      ; preds = %.loopexit, %15, %5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %4)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  ret void
}

declare noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

declare noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 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_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 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_impl10ae_v_cmoveEPNS_10ae_complexElPKS0_lPKcl(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #3

declare { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef) local_unnamed_addr #3

declare noundef i64 @_ZN11alglib_impl15matrixtilesizebEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #3

declare { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double 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_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL28ortfac_cmatrixblockreflectorEPNS_9ae_matrixEPNS_9ae_vectorEbllS1_S3_PNS_8ae_stateE(ptr noundef, ptr noundef, i1 noundef zeroext, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL24ortfac_cmatrixlqbasecaseEPNS_9ae_matrixEllPNS_9ae_vectorES3_S3_PNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #4

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"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.mustprogress"}
!14 = distinct !{!14, !13}


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