; 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

; 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_impl9cmatrixqrEPNS_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
  %33 = 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
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %34, 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)
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %35)
  %36 = 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 %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 %13, 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_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %14, 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 %16, 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 %17, i64 noundef 0, i64 noundef 0, i64 noundef 4, ptr noundef %40, i1 noundef zeroext true)
  %41 = 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 %41, i1 noundef zeroext true)
  %42 = load i64, ptr %7, align 8, !tbaa !9
  %43 = icmp sle i64 %42, 0
  br i1 %43, label %47, label %44

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

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

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

84:                                               ; preds = %305, %49
  %85 = load i64, ptr %19, align 8, !tbaa !9
  %86 = load i64, ptr %15, align 8, !tbaa !9
  %87 = icmp ne i64 %85, %86
  br i1 %87, label %88, label %309

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

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

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

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

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

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

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

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

300:                                              ; preds = %245
  %301 = load i64, ptr %22, align 8, !tbaa !9
  %302 = add nsw i64 %301, 1
  store i64 %302, ptr %22, align 8, !tbaa !9
  br label %240, !llvm.loop !19

303:                                              ; preds = %240
  br label %304

304:                                              ; preds = %303, %145
  br label %305

305:                                              ; preds = %304, %97
  %306 = load i64, ptr %19, align 8, !tbaa !9
  %307 = load i64, ptr %20, align 8, !tbaa !9
  %308 = add nsw i64 %306, %307
  store i64 %308, ptr %19, align 8, !tbaa !9
  br label %84, !llvm.loop !21

309:                                              ; preds = %84
  %310 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %310)
  store i32 0, ptr %24, align 4
  br label %311

311:                                              ; preds = %309, %47
  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
  %312 = load i32, ptr %24, align 4
  switch i32 %312, label %314 [
    i32 0, label %313
    i32 1, label %313
  ]

313:                                              ; preds = %311, %311
  ret void

314:                                              ; preds = %311
  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_impl33complexapplyreflectionfromtheleftEPNS_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

declare { double, double } @_ZN11alglib_impl9ae_c_conjENS_10ae_complexEPNS_8ae_stateE(double, double, ptr noundef) #4

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

; 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

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 = !{!13, !10, i64 16}
!13 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !14, i64 32, !15, i64 40, !7, i64 72}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{i64 0, i64 8, !17, i64 8, i64 8, !17}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}


; 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

; 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_impl9cmatrixqrEPNS_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 %1, i64 noundef %17, 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 %23, i64 noundef %2, ptr noundef %4)
  %.not154 = icmp eq i64 %18, 0
  br i1 %.not154, label %._crit_edge, label %.lr.ph156

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

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

40:                                               ; preds = %31
  %41 = sub i64 %2, %37
  %.not150 = icmp slt i64 %41, %23
  br i1 %.not150, label %.preheader, label %42

.preheader:                                       ; preds = %40
  %.not151.not152 = icmp sgt i64 %spec.select, 0
  br i1 %.not151.not152, label %.lr.ph, label %.loopexit

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

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

.loopexit:                                        ; preds = %.lr.ph, %.preheader, %42, %31
  %.not = icmp eq i64 %37, %18
  br i1 %.not, label %._crit_edge, label %31, !llvm.loop !19

._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_impl33complexapplyreflectionfromtheleftEPNS_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

declare { double, double } @_ZN11alglib_impl9ae_c_conjENS_10ae_complexEPNS_8ae_stateE(double, double, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL24ortfac_cmatrixqrbasecaseEPNS_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: 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: 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, !12, i64 16}
!11 = !{!"_ZTSN11alglib_impl9ae_matrixE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !13, i64 32, !14, i64 40, !6, i64 72}
!12 = !{!"long", !6, i64 0}
!13 = !{!"bool", !6, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !6, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


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