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

; 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_impl11rmatrixcopyEllPNS_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_impl11rmatrixgemmEllldPNS_9ae_matrixElllS1_llldS1_llPNS_8ae_stateE(i64 noundef, i64 noundef, i64 noundef, double noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, double noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl9rmatrixqrEPNS_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
  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) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %25, 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)
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %26)
  %27 = 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 3, ptr noundef %27, i1 noundef zeroext true)
  %28 = 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 3, ptr noundef %28, i1 noundef zeroext true)
  %29 = 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 3, ptr noundef %29, i1 noundef zeroext true)
  %30 = 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 3, ptr noundef %30, i1 noundef zeroext true)
  %31 = 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 3, ptr noundef %31, i1 noundef zeroext true)
  %32 = 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 3, ptr noundef %32, i1 noundef zeroext true)
  %33 = load i64, ptr %7, align 8, !tbaa !9
  %34 = icmp sle i64 %33, 0
  br i1 %34, label %38, label %35

35:                                               ; preds = %5
  %36 = load i64, ptr %8, align 8, !tbaa !9
  %37 = icmp sle i64 %36, 0
  br i1 %37, label %38, label %40

38:                                               ; preds = %35, %5
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %39)
  store i32 1, ptr %24, align 4
  br label %235

40:                                               ; preds = %35
  %41 = load i64, ptr %7, align 8, !tbaa !9
  %42 = load i64, ptr %8, align 8, !tbaa !9
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %41, i64 noundef %42, ptr noundef %43)
  store i64 %44, ptr %15, align 8, !tbaa !9
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = call noundef i64 @_ZN11alglib_impl15matrixtilesizebEPNS_8ae_stateE(ptr noundef %45)
  store i64 %46, ptr %23, align 8, !tbaa !9
  %47 = load i64, ptr %7, align 8, !tbaa !9
  %48 = load i64, ptr %8, align 8, !tbaa !9
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %47, i64 noundef %48, ptr noundef %49)
  %51 = add nsw i64 %50, 1
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %12, i64 noundef %51, ptr noundef %52)
  %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_maxintEllPNS_8ae_stateE(i64 noundef %53, i64 noundef %54, ptr noundef %55)
  %57 = add nsw i64 %56, 1
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %13, i64 noundef %57, ptr noundef %58)
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = load i64, ptr %15, align 8, !tbaa !9
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %59, i64 noundef %60, ptr noundef %61)
  %62 = load i64, ptr %15, align 8, !tbaa !9
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %14, i64 noundef %62, ptr noundef %63)
  %64 = load i64, ptr %7, align 8, !tbaa !9
  %65 = load i64, ptr %23, align 8, !tbaa !9
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %16, i64 noundef %64, i64 noundef %65, ptr noundef %66)
  %67 = load i64, ptr %23, align 8, !tbaa !9
  %68 = load i64, ptr %23, align 8, !tbaa !9
  %69 = mul nsw i64 2, %68
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %17, i64 noundef %67, i64 noundef %69, ptr noundef %70)
  %71 = load i64, ptr %23, align 8, !tbaa !9
  %72 = mul nsw i64 2, %71
  %73 = load i64, ptr %8, align 8, !tbaa !9
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %18, i64 noundef %72, i64 noundef %73, ptr noundef %74)
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %75

75:                                               ; preds = %229, %40
  %76 = load i64, ptr %19, align 8, !tbaa !9
  %77 = load i64, ptr %15, align 8, !tbaa !9
  %78 = icmp ne i64 %76, %77
  br i1 %78, label %79, label %233

79:                                               ; preds = %75
  %80 = load i64, ptr %15, align 8, !tbaa !9
  %81 = load i64, ptr %19, align 8, !tbaa !9
  %82 = sub nsw i64 %80, %81
  store i64 %82, ptr %20, align 8, !tbaa !9
  %83 = load i64, ptr %20, align 8, !tbaa !9
  %84 = load i64, ptr %23, align 8, !tbaa !9
  %85 = icmp sgt i64 %83, %84
  br i1 %85, label %86, label %88

86:                                               ; preds = %79
  %87 = load i64, ptr %23, align 8, !tbaa !9
  store i64 %87, ptr %20, align 8, !tbaa !9
  br label %88

88:                                               ; preds = %86, %79
  %89 = load i64, ptr %7, align 8, !tbaa !9
  %90 = load i64, ptr %19, align 8, !tbaa !9
  %91 = sub nsw i64 %89, %90
  store i64 %91, ptr %21, align 8, !tbaa !9
  %92 = load i64, ptr %21, align 8, !tbaa !9
  %93 = load i64, ptr %20, align 8, !tbaa !9
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = load i64, ptr %19, align 8, !tbaa !9
  %96 = load i64, ptr %19, align 8, !tbaa !9
  %97 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl11rmatrixcopyEllPNS_9ae_matrixEllS1_llPNS_8ae_stateE(i64 noundef %92, i64 noundef %93, ptr noundef %94, i64 noundef %95, i64 noundef %96, ptr noundef %16, i64 noundef 0, i64 noundef 0, ptr noundef %97)
  %98 = load i64, ptr %21, align 8, !tbaa !9
  %99 = load i64, ptr %20, align 8, !tbaa !9
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl17rmatrixqrbasecaseEPNS_9ae_matrixEllPNS_9ae_vectorES3_S3_PNS_8ae_stateE(ptr noundef %16, i64 noundef %98, i64 noundef %99, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %100)
  %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_impl11rmatrixcopyEllPNS_9ae_matrixEllS1_llPNS_8ae_stateE(i64 noundef %101, i64 noundef %102, ptr noundef %16, i64 noundef 0, i64 noundef 0, ptr noundef %103, i64 noundef %104, i64 noundef %105, ptr noundef %106)
  %107 = load ptr, ptr %9, align 8, !tbaa !5
  %108 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %107, i32 0, i32 4
  %109 = load ptr, ptr %108, align 8, !tbaa !11
  %110 = load i64, ptr %19, align 8, !tbaa !9
  %111 = getelementptr inbounds double, ptr %109, i64 %110
  %112 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %113 = load ptr, ptr %112, align 8, !tbaa !11
  %114 = getelementptr inbounds double, ptr %113, i64 0
  %115 = load i64, ptr %19, align 8, !tbaa !9
  %116 = load i64, ptr %19, align 8, !tbaa !9
  %117 = load i64, ptr %20, align 8, !tbaa !9
  %118 = add nsw i64 %116, %117
  %119 = sub nsw i64 %118, 1
  %120 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %115, i64 noundef %119)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %111, i64 noundef 1, ptr noundef %114, i64 noundef 1, i64 noundef %120)
  %121 = load i64, ptr %19, align 8, !tbaa !9
  %122 = load i64, ptr %20, align 8, !tbaa !9
  %123 = add nsw i64 %121, %122
  %124 = load i64, ptr %8, align 8, !tbaa !9
  %125 = sub nsw i64 %124, 1
  %126 = icmp sle i64 %123, %125
  br i1 %126, label %127, label %229

127:                                              ; preds = %88
  %128 = load i64, ptr %8, align 8, !tbaa !9
  %129 = load i64, ptr %19, align 8, !tbaa !9
  %130 = sub nsw i64 %128, %129
  %131 = load i64, ptr %20, align 8, !tbaa !9
  %132 = sub nsw i64 %130, %131
  %133 = load i64, ptr %23, align 8, !tbaa !9
  %134 = mul nsw i64 2, %133
  %135 = icmp sge i64 %132, %134
  br i1 %135, label %141, label %136

136:                                              ; preds = %127
  %137 = load i64, ptr %21, align 8, !tbaa !9
  %138 = load i64, ptr %23, align 8, !tbaa !9
  %139 = mul nsw i64 4, %138
  %140 = icmp sge i64 %137, %139
  br i1 %140, label %141, label %181

141:                                              ; preds = %136, %127
  %142 = load i64, ptr %21, align 8, !tbaa !9
  %143 = load i64, ptr %20, align 8, !tbaa !9
  %144 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_implL28ortfac_rmatrixblockreflectorEPNS_9ae_matrixEPNS_9ae_vectorEbllS1_S3_PNS_8ae_stateE(ptr noundef %16, ptr noundef %14, i1 noundef zeroext true, i64 noundef %142, i64 noundef %143, ptr noundef %17, ptr noundef %12, ptr noundef %144)
  %145 = load i64, ptr %20, align 8, !tbaa !9
  %146 = load i64, ptr %8, align 8, !tbaa !9
  %147 = load i64, ptr %19, align 8, !tbaa !9
  %148 = sub nsw i64 %146, %147
  %149 = load i64, ptr %20, align 8, !tbaa !9
  %150 = sub nsw i64 %148, %149
  %151 = load i64, ptr %21, align 8, !tbaa !9
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = load i64, ptr %19, align 8, !tbaa !9
  %154 = load i64, ptr %19, align 8, !tbaa !9
  %155 = load i64, ptr %20, align 8, !tbaa !9
  %156 = add nsw i64 %154, %155
  %157 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl11rmatrixgemmEllldPNS_9ae_matrixElllS1_llldS1_llPNS_8ae_stateE(i64 noundef %145, i64 noundef %150, i64 noundef %151, double noundef 1.000000e+00, ptr noundef %16, i64 noundef 0, i64 noundef 0, i64 noundef 1, ptr noundef %152, i64 noundef %153, i64 noundef %156, i64 noundef 0, double noundef 0.000000e+00, ptr noundef %18, i64 noundef 0, i64 noundef 0, ptr noundef %157)
  %158 = load i64, ptr %20, align 8, !tbaa !9
  %159 = load i64, ptr %8, align 8, !tbaa !9
  %160 = load i64, ptr %19, align 8, !tbaa !9
  %161 = sub nsw i64 %159, %160
  %162 = load i64, ptr %20, align 8, !tbaa !9
  %163 = sub nsw i64 %161, %162
  %164 = load i64, ptr %20, align 8, !tbaa !9
  %165 = load i64, ptr %20, align 8, !tbaa !9
  %166 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl11rmatrixgemmEllldPNS_9ae_matrixElllS1_llldS1_llPNS_8ae_stateE(i64 noundef %158, i64 noundef %163, i64 noundef %164, double noundef 1.000000e+00, ptr noundef %17, i64 noundef 0, i64 noundef 0, i64 noundef 1, ptr noundef %18, i64 noundef 0, i64 noundef 0, i64 noundef 0, double noundef 0.000000e+00, ptr noundef %18, i64 noundef %165, i64 noundef 0, ptr noundef %166)
  %167 = load i64, ptr %21, align 8, !tbaa !9
  %168 = load i64, ptr %8, align 8, !tbaa !9
  %169 = load i64, ptr %19, align 8, !tbaa !9
  %170 = sub nsw i64 %168, %169
  %171 = load i64, ptr %20, align 8, !tbaa !9
  %172 = sub nsw i64 %170, %171
  %173 = load i64, ptr %20, align 8, !tbaa !9
  %174 = load i64, ptr %20, align 8, !tbaa !9
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  %176 = load i64, ptr %19, align 8, !tbaa !9
  %177 = load i64, ptr %19, align 8, !tbaa !9
  %178 = load i64, ptr %20, align 8, !tbaa !9
  %179 = add nsw i64 %177, %178
  %180 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl11rmatrixgemmEllldPNS_9ae_matrixElllS1_llldS1_llPNS_8ae_stateE(i64 noundef %167, i64 noundef %172, i64 noundef %173, double noundef 1.000000e+00, ptr noundef %16, i64 noundef 0, i64 noundef 0, i64 noundef 0, ptr noundef %18, i64 noundef %174, i64 noundef 0, i64 noundef 0, double noundef 1.000000e+00, ptr noundef %175, i64 noundef %176, i64 noundef %179, ptr noundef %180)
  br label %228

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

182:                                              ; preds = %224, %181
  %183 = load i64, ptr %22, align 8, !tbaa !9
  %184 = load i64, ptr %20, align 8, !tbaa !9
  %185 = sub nsw i64 %184, 1
  %186 = icmp sle i64 %183, %185
  br i1 %186, label %187, label %227

187:                                              ; preds = %182
  %188 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %13, i32 0, i32 4
  %189 = load ptr, ptr %188, align 8, !tbaa !11
  %190 = getelementptr inbounds double, ptr %189, i64 1
  %191 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %16, i32 0, i32 6
  %192 = load ptr, ptr %191, align 8, !tbaa !11
  %193 = load i64, ptr %22, align 8, !tbaa !9
  %194 = getelementptr inbounds ptr, ptr %192, i64 %193
  %195 = load ptr, ptr %194, align 8, !tbaa !5
  %196 = load i64, ptr %22, align 8, !tbaa !9
  %197 = getelementptr inbounds double, ptr %195, i64 %196
  %198 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %16, i32 0, i32 2
  %199 = load i64, ptr %198, align 8, !tbaa !12
  %200 = load i64, ptr %21, align 8, !tbaa !9
  %201 = load i64, ptr %22, align 8, !tbaa !9
  %202 = sub nsw i64 %200, %201
  %203 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 1, i64 noundef %202)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %190, i64 noundef 1, ptr noundef %197, i64 noundef %199, i64 noundef %203)
  %204 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %13, i32 0, i32 4
  %205 = load ptr, ptr %204, align 8, !tbaa !11
  %206 = getelementptr inbounds double, ptr %205, i64 1
  store double 1.000000e+00, ptr %206, align 8, !tbaa !16
  %207 = load ptr, ptr %6, align 8, !tbaa !5
  %208 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %209 = load ptr, ptr %208, align 8, !tbaa !11
  %210 = load i64, ptr %22, align 8, !tbaa !9
  %211 = getelementptr inbounds double, ptr %209, i64 %210
  %212 = load double, ptr %211, align 8, !tbaa !16
  %213 = load i64, ptr %19, align 8, !tbaa !9
  %214 = load i64, ptr %22, align 8, !tbaa !9
  %215 = add nsw i64 %213, %214
  %216 = load i64, ptr %7, align 8, !tbaa !9
  %217 = sub nsw i64 %216, 1
  %218 = load i64, ptr %19, align 8, !tbaa !9
  %219 = load i64, ptr %20, align 8, !tbaa !9
  %220 = add nsw i64 %218, %219
  %221 = load i64, ptr %8, align 8, !tbaa !9
  %222 = sub nsw i64 %221, 1
  %223 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl26applyreflectionfromtheleftEPNS_9ae_matrixEdPNS_9ae_vectorEllllS3_PNS_8ae_stateE(ptr noundef %207, double noundef %212, ptr noundef %13, i64 noundef %215, i64 noundef %217, i64 noundef %220, i64 noundef %222, ptr noundef %12, ptr noundef %223)
  br label %224

224:                                              ; preds = %187
  %225 = load i64, ptr %22, align 8, !tbaa !9
  %226 = add nsw i64 %225, 1
  store i64 %226, ptr %22, align 8, !tbaa !9
  br label %182, !llvm.loop !18

227:                                              ; preds = %182
  br label %228

228:                                              ; preds = %227, %141
  br label %229

229:                                              ; preds = %228, %88
  %230 = load i64, ptr %19, align 8, !tbaa !9
  %231 = load i64, ptr %20, align 8, !tbaa !9
  %232 = add nsw i64 %230, %231
  store i64 %232, ptr %19, align 8, !tbaa !9
  br label %75, !llvm.loop !20

233:                                              ; preds = %75
  %234 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %234)
  store i32 0, ptr %24, align 4
  br label %235

235:                                              ; preds = %233, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  %236 = load i32, ptr %24, align 4
  switch i32 %236, label %238 [
    i32 0, label %237
    i32 1, label %237
  ]

237:                                              ; preds = %235, %235
  ret void

238:                                              ; preds = %235
  unreachable
}

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

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

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #3

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #3

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

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

declare noundef i64 @_ZN11alglib_impl15matrixtilesizebEPNS_8ae_stateE(ptr noundef) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl17rmatrixqrbasecaseEPNS_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_rmatrixblockreflectorEPNS_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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !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 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


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

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_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 }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl9rmatrixqrEPNS_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 3, 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 3, 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 3, 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 3, 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 3, 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 3, 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_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %1, i64 noundef %2, ptr noundef %4)
  %17 = call noundef i64 @_ZN11alglib_impl15matrixtilesizebEPNS_8ae_stateE(ptr noundef %4)
  %18 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %1, i64 noundef %2, ptr noundef %4)
  %19 = add nsw i64 %18, 1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %19, ptr noundef %4)
  %20 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %1, i64 noundef %2, ptr noundef %4)
  %21 = add nsw i64 %20, 1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %21, ptr noundef %4)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %3, i64 noundef %16, ptr noundef %4)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %16, 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)
  %22 = shl nsw i64 %17, 1
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %17, i64 noundef %22, ptr noundef %4)
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %12, i64 noundef %22, i64 noundef %2, ptr noundef %4)
  %.not142 = icmp eq i64 %16, 0
  br i1 %.not142, label %._crit_edge, label %.lr.ph144

.lr.ph144:                                        ; preds = %15
  %23 = getelementptr inbounds i8, ptr %3, i64 56
  %24 = getelementptr inbounds i8, ptr %9, i64 56
  %25 = add nsw i64 %2, -1
  %26 = shl nsw i64 %17, 2
  %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.ph144, %.loopexit
  %.0143 = phi i64 [ 0, %.lr.ph144 ], [ %37, %.loopexit ]
  %32 = sub nsw i64 %16, %.0143
  %spec.select = call i64 @llvm.smin.i64(i64 %32, i64 %17)
  %33 = sub nsw i64 %1, %.0143
  call void @_ZN11alglib_impl11rmatrixcopyEllPNS_9ae_matrixEllS1_llPNS_8ae_stateE(i64 noundef %33, i64 noundef %spec.select, ptr noundef %0, i64 noundef %.0143, i64 noundef %.0143, ptr noundef nonnull %10, i64 noundef 0, i64 noundef 0, ptr noundef %4)
  call void @_ZN11alglib_impl17rmatrixqrbasecaseEPNS_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_impl11rmatrixcopyEllPNS_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 %.0143, i64 noundef %.0143, ptr noundef %4)
  %34 = load ptr, ptr %23, align 8, !tbaa !5
  %35 = getelementptr inbounds double, ptr %34, i64 %.0143
  %36 = load ptr, ptr %24, align 8, !tbaa !5
  %37 = add nsw i64 %spec.select, %.0143
  %38 = add nsw i64 %37, -1
  %39 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %.0143, i64 noundef %38)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %35, i64 noundef 1, ptr noundef %36, i64 noundef 1, i64 noundef %39)
  %.not135.not = icmp slt i64 %37, %2
  br i1 %.not135.not, label %40, label %.loopexit

40:                                               ; preds = %31
  %41 = sub i64 %2, %37
  %.not136 = icmp slt i64 %41, %22
  %.not137 = icmp slt i64 %33, %26
  %or.cond139 = select i1 %.not136, i1 %.not137, i1 false
  br i1 %or.cond139, label %.preheader, label %42

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

42:                                               ; preds = %40
  call void @_ZN11alglib_implL28ortfac_rmatrixblockreflectorEPNS_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)
  call void @_ZN11alglib_impl11rmatrixgemmEllldPNS_9ae_matrixElllS1_llldS1_llPNS_8ae_stateE(i64 noundef %spec.select, i64 noundef %41, i64 noundef %33, double noundef 1.000000e+00, ptr noundef nonnull %10, i64 noundef 0, i64 noundef 0, i64 noundef 1, ptr noundef %0, i64 noundef %.0143, i64 noundef %37, i64 noundef 0, double noundef 0.000000e+00, ptr noundef nonnull %12, i64 noundef 0, i64 noundef 0, ptr noundef %4)
  call void @_ZN11alglib_impl11rmatrixgemmEllldPNS_9ae_matrixElllS1_llldS1_llPNS_8ae_stateE(i64 noundef %spec.select, i64 noundef %41, i64 noundef %spec.select, double noundef 1.000000e+00, ptr noundef nonnull %11, i64 noundef 0, i64 noundef 0, i64 noundef 1, ptr noundef nonnull %12, i64 noundef 0, i64 noundef 0, i64 noundef 0, double noundef 0.000000e+00, ptr noundef nonnull %12, i64 noundef %spec.select, i64 noundef 0, ptr noundef %4)
  call void @_ZN11alglib_impl11rmatrixgemmEllldPNS_9ae_matrixElllS1_llldS1_llPNS_8ae_stateE(i64 noundef %33, i64 noundef %41, i64 noundef %spec.select, double noundef 1.000000e+00, 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 noundef 1.000000e+00, ptr noundef %0, i64 noundef %.0143, i64 noundef %37, ptr noundef %4)
  br label %.loopexit

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.0125141 = phi i64 [ %58, %.lr.ph ], [ 0, %.preheader ]
  %43 = load ptr, ptr %27, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %43, i64 8
  %45 = load ptr, ptr %28, align 8, !tbaa !5
  %46 = getelementptr inbounds ptr, ptr %45, i64 %.0125141
  %47 = load ptr, ptr %46, align 8, !tbaa !8
  %48 = getelementptr inbounds double, ptr %47, i64 %.0125141
  %49 = load i64, ptr %29, align 8, !tbaa !10
  %50 = sub nsw i64 %33, %.0125141
  %51 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 1, i64 noundef %50)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef nonnull %44, i64 noundef 1, ptr noundef %48, i64 noundef %49, i64 noundef %51)
  %52 = load ptr, ptr %27, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %52, i64 8
  store double 1.000000e+00, ptr %53, align 8, !tbaa !15
  %54 = load ptr, ptr %24, align 8, !tbaa !5
  %55 = getelementptr inbounds double, ptr %54, i64 %.0125141
  %56 = load double, ptr %55, align 8, !tbaa !15
  %57 = add nsw i64 %.0125141, %.0143
  call void @_ZN11alglib_impl26applyreflectionfromtheleftEPNS_9ae_matrixEdPNS_9ae_vectorEllllS3_PNS_8ae_stateE(ptr noundef %0, double noundef %56, ptr noundef nonnull %8, i64 noundef %57, i64 noundef %30, i64 noundef %37, i64 noundef %25, ptr noundef nonnull %7, ptr noundef %4)
  %58 = add nuw nsw i64 %.0125141, 1
  %exitcond.not = icmp eq i64 %58, %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, %16
  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

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

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

declare noundef i64 @_ZN11alglib_impl15matrixtilesizebEPNS_8ae_stateE(ptr 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl17rmatrixqrbasecaseEPNS_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_rmatrixblockreflectorEPNS_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