; 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::hqrndstate" = type { i64, i64, i64 }
%"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
define dso_local void @_ZN11alglib_impl18smatrixrndmultiplyEPNS_9ae_matrixElPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"struct.alglib_impl::ae_frame", align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca %"struct.alglib_impl::ae_vector", align 8
  %15 = alloca %"struct.alglib_impl::ae_vector", align 8
  %16 = alloca %"struct.alglib_impl::hqrndstate", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #4
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %17, ptr noundef %7)
  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 %15, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 24, i1 false)
  %18 = load ptr, ptr %6, 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 %18, i1 noundef zeroext true)
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %15, i64 noundef 0, i64 noundef 3, ptr noundef %19, i1 noundef zeroext true)
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef %16, ptr noundef %20, i1 noundef zeroext true)
  %21 = load i64, ptr %5, align 8, !tbaa !9
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %14, i64 noundef %21, ptr noundef %22)
  %23 = load i64, ptr %5, align 8, !tbaa !9
  %24 = add nsw i64 %23, 1
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %15, i64 noundef %24, ptr noundef %25)
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl14hqrndrandomizeEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef %16, ptr noundef %26)
  store i64 2, ptr %10, align 8, !tbaa !9
  br label %27

27:                                               ; preds = %97, %3
  %28 = load i64, ptr %10, align 8, !tbaa !9
  %29 = load i64, ptr %5, align 8, !tbaa !9
  %30 = icmp sle i64 %28, %29
  br i1 %30, label %31, label %100

31:                                               ; preds = %27
  br label %32

32:                                               ; preds = %68, %31
  store i64 1, ptr %11, align 8, !tbaa !9
  br label %33

33:                                               ; preds = %55, %32
  %34 = load i64, ptr %11, align 8, !tbaa !9
  %35 = load i64, ptr %10, align 8, !tbaa !9
  %36 = icmp sle i64 %34, %35
  br i1 %36, label %37, label %58

37:                                               ; preds = %33
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl12hqrndnormal2EPNS_10hqrndstateEPdS2_PNS_8ae_stateE(ptr noundef %16, ptr noundef %12, ptr noundef %13, ptr noundef %38)
  %39 = load double, ptr %12, align 8, !tbaa !11
  %40 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %41 = load ptr, ptr %40, align 8, !tbaa !13
  %42 = load i64, ptr %11, align 8, !tbaa !9
  %43 = getelementptr inbounds double, ptr %41, i64 %42
  store double %39, ptr %43, align 8, !tbaa !11
  %44 = load i64, ptr %11, align 8, !tbaa !9
  %45 = add nsw i64 %44, 1
  %46 = load i64, ptr %10, align 8, !tbaa !9
  %47 = icmp sle i64 %45, %46
  br i1 %47, label %48, label %55

48:                                               ; preds = %37
  %49 = load double, ptr %13, align 8, !tbaa !11
  %50 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %51 = load ptr, ptr %50, align 8, !tbaa !13
  %52 = load i64, ptr %11, align 8, !tbaa !9
  %53 = add nsw i64 %52, 1
  %54 = getelementptr inbounds double, ptr %51, i64 %53
  store double %49, ptr %54, align 8, !tbaa !11
  br label %55

55:                                               ; preds = %48, %37
  %56 = load i64, ptr %11, align 8, !tbaa !9
  %57 = add nsw i64 %56, 2
  store i64 %57, ptr %11, align 8, !tbaa !9
  br label %33, !llvm.loop !14

58:                                               ; preds = %33
  %59 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %60 = load ptr, ptr %59, align 8, !tbaa !13
  %61 = getelementptr inbounds double, ptr %60, i64 1
  %62 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %63 = load ptr, ptr %62, align 8, !tbaa !13
  %64 = getelementptr inbounds double, ptr %63, i64 1
  %65 = load i64, ptr %10, align 8, !tbaa !9
  %66 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 1, i64 noundef %65)
  %67 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %61, i64 noundef 1, ptr noundef %64, i64 noundef 1, i64 noundef %66)
  store double %67, ptr %9, align 8, !tbaa !11
  br label %68

68:                                               ; preds = %58
  %69 = load double, ptr %9, align 8, !tbaa !11
  %70 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %69, double noundef 0.000000e+00)
  br i1 %70, label %32, label %71, !llvm.loop !16

71:                                               ; preds = %68
  %72 = load i64, ptr %10, align 8, !tbaa !9
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl18generatereflectionEPNS_9ae_vectorElPdPNS_8ae_stateE(ptr noundef %15, i64 noundef %72, ptr noundef %8, ptr noundef %73)
  %74 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %75 = load ptr, ptr %74, align 8, !tbaa !13
  %76 = getelementptr inbounds double, ptr %75, i64 1
  store double 1.000000e+00, ptr %76, align 8, !tbaa !11
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = load double, ptr %8, align 8, !tbaa !11
  %79 = load i64, ptr %5, align 8, !tbaa !9
  %80 = sub nsw i64 %79, 1
  %81 = load i64, ptr %5, align 8, !tbaa !9
  %82 = load i64, ptr %10, align 8, !tbaa !9
  %83 = sub nsw i64 %81, %82
  %84 = load i64, ptr %5, align 8, !tbaa !9
  %85 = sub nsw i64 %84, 1
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl27applyreflectionfromtherightEPNS_9ae_matrixEdPNS_9ae_vectorEllllS3_PNS_8ae_stateE(ptr noundef %77, double noundef %78, ptr noundef %15, i64 noundef 0, i64 noundef %80, i64 noundef %83, i64 noundef %85, ptr noundef %14, ptr noundef %86)
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = load double, ptr %8, align 8, !tbaa !11
  %89 = load i64, ptr %5, align 8, !tbaa !9
  %90 = load i64, ptr %10, align 8, !tbaa !9
  %91 = sub nsw i64 %89, %90
  %92 = load i64, ptr %5, align 8, !tbaa !9
  %93 = sub nsw i64 %92, 1
  %94 = load i64, ptr %5, align 8, !tbaa !9
  %95 = sub nsw i64 %94, 1
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl26applyreflectionfromtheleftEPNS_9ae_matrixEdPNS_9ae_vectorEllllS3_PNS_8ae_stateE(ptr noundef %87, double noundef %88, ptr noundef %15, i64 noundef %91, i64 noundef %93, i64 noundef 0, i64 noundef %95, ptr noundef %14, ptr noundef %96)
  br label %97

97:                                               ; preds = %71
  %98 = load i64, ptr %10, align 8, !tbaa !9
  %99 = add nsw i64 %98, 1
  store i64 %99, ptr %10, align 8, !tbaa !9
  br label %27, !llvm.loop !17

100:                                              ; preds = %27
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %101

101:                                              ; preds = %137, %100
  %102 = load i64, ptr %11, align 8, !tbaa !9
  %103 = load i64, ptr %5, align 8, !tbaa !9
  %104 = sub nsw i64 %103, 1
  %105 = icmp sle i64 %102, %104
  br i1 %105, label %106, label %140

106:                                              ; preds = %101
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = call noundef i64 @_ZN11alglib_impl13hqrnduniformiEPNS_10hqrndstateElPNS_8ae_stateE(ptr noundef %16, i64 noundef 2, ptr noundef %107)
  %109 = mul nsw i64 2, %108
  %110 = sub nsw i64 %109, 1
  %111 = sitofp i64 %110 to double
  store double %111, ptr %8, align 8, !tbaa !11
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %112, i32 0, i32 6
  %114 = load ptr, ptr %113, align 8, !tbaa !13
  %115 = getelementptr inbounds ptr, ptr %114, i64 0
  %116 = load ptr, ptr %115, align 8, !tbaa !5
  %117 = load i64, ptr %11, align 8, !tbaa !9
  %118 = getelementptr inbounds double, ptr %116, i64 %117
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %119, i32 0, i32 2
  %121 = load i64, ptr %120, align 8, !tbaa !18
  %122 = load i64, ptr %5, align 8, !tbaa !9
  %123 = sub nsw i64 %122, 1
  %124 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %123)
  %125 = load double, ptr %8, align 8, !tbaa !11
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %118, i64 noundef %121, i64 noundef %124, double noundef %125)
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %126, i32 0, i32 6
  %128 = load ptr, ptr %127, align 8, !tbaa !13
  %129 = load i64, ptr %11, align 8, !tbaa !9
  %130 = getelementptr inbounds ptr, ptr %128, i64 %129
  %131 = load ptr, ptr %130, align 8, !tbaa !5
  %132 = getelementptr inbounds double, ptr %131, i64 0
  %133 = load i64, ptr %5, align 8, !tbaa !9
  %134 = sub nsw i64 %133, 1
  %135 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %134)
  %136 = load double, ptr %8, align 8, !tbaa !11
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %132, i64 noundef 1, i64 noundef %135, double noundef %136)
  br label %137

137:                                              ; preds = %106
  %138 = load i64, ptr %11, align 8, !tbaa !9
  %139 = add nsw i64 %138, 1
  store i64 %139, ptr %11, align 8, !tbaa !9
  br label %101, !llvm.loop !22

140:                                              ; preds = %101
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %141

141:                                              ; preds = %173, %140
  %142 = load i64, ptr %11, align 8, !tbaa !9
  %143 = load i64, ptr %5, align 8, !tbaa !9
  %144 = sub nsw i64 %143, 2
  %145 = icmp sle i64 %142, %144
  br i1 %145, label %146, label %176

146:                                              ; preds = %141
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %147, i32 0, i32 6
  %149 = load ptr, ptr %148, align 8, !tbaa !13
  %150 = load i64, ptr %11, align 8, !tbaa !9
  %151 = add nsw i64 %150, 1
  %152 = getelementptr inbounds ptr, ptr %149, i64 %151
  %153 = load ptr, ptr %152, align 8, !tbaa !5
  %154 = load i64, ptr %11, align 8, !tbaa !9
  %155 = getelementptr inbounds double, ptr %153, i64 %154
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  %157 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %156, i32 0, i32 2
  %158 = load i64, ptr %157, align 8, !tbaa !18
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %159, i32 0, i32 6
  %161 = load ptr, ptr %160, align 8, !tbaa !13
  %162 = load i64, ptr %11, align 8, !tbaa !9
  %163 = getelementptr inbounds ptr, ptr %161, i64 %162
  %164 = load ptr, ptr %163, align 8, !tbaa !5
  %165 = load i64, ptr %11, align 8, !tbaa !9
  %166 = add nsw i64 %165, 1
  %167 = getelementptr inbounds double, ptr %164, i64 %166
  %168 = load i64, ptr %11, align 8, !tbaa !9
  %169 = add nsw i64 %168, 1
  %170 = load i64, ptr %5, align 8, !tbaa !9
  %171 = sub nsw i64 %170, 1
  %172 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %169, i64 noundef %171)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %155, i64 noundef %158, ptr noundef %167, i64 noundef 1, i64 noundef %172)
  br label %173

173:                                              ; preds = %146
  %174 = load i64, ptr %11, align 8, !tbaa !9
  %175 = add nsw i64 %174, 1
  store i64 %175, ptr %11, align 8, !tbaa !9
  br label %141, !llvm.loop !23

176:                                              ; preds = %141
  %177 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %177)
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #4
  ret void
}

declare noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef, double noundef) #3

declare noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 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

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

declare void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef, i64 noundef, i64 noundef, double 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl27applyreflectionfromtherightEPNS_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 void @_ZN11alglib_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) #3

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = !{!19, !10, i64 16}
!19 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !20, i64 32, !21, i64 40, !7, i64 72}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!22 = distinct !{!22, !15}
!23 = distinct !{!23, !15}


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

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

; 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
define dso_local void @_ZN11alglib_impl18smatrixrndmultiplyEPNS_9ae_matrixElPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = alloca %"struct.alglib_impl::ae_frame", align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, 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::hqrndstate", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %2, ptr noundef nonnull %4)
  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(24) %10, i8 0, i64 24, i1 false)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %8, i64 noundef 0, i64 noundef 3, ptr noundef %2, 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 %2, i1 noundef zeroext true)
  call void @_ZN11alglib_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef nonnull %10, ptr noundef %2, i1 noundef zeroext true)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %1, ptr noundef %2)
  %11 = add i64 %1, 1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %11, ptr noundef %2)
  call void @_ZN11alglib_impl14hqrndrandomizeEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef %2)
  %.not72 = icmp slt i64 %1, 2
  br i1 %.not72, label %..preheader68_crit_edge, label %.preheader69.lr.ph

..preheader68_crit_edge:                          ; preds = %3
  %.pre = add i64 %1, -1
  br label %.preheader68

.preheader69.lr.ph:                               ; preds = %3
  %12 = getelementptr inbounds i8, ptr %9, i64 56
  %13 = add nsw i64 %1, -1
  br label %.preheader69

.preheader69:                                     ; preds = %.preheader69.lr.ph, %33
  %.05973 = phi i64 [ 2, %.preheader69.lr.ph ], [ %39, %33 ]
  br label %16

.preheader68:                                     ; preds = %33, %..preheader68_crit_edge
  %.pre-phi = phi i64 [ %.pre, %..preheader68_crit_edge ], [ %13, %33 ]
  %.not64.not74 = icmp sgt i64 %1, 0
  br i1 %.not64.not74, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader68
  %14 = getelementptr inbounds i8, ptr %0, i64 72
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  br label %42

16:                                               ; preds = %.backedge, %.preheader69
  %.071 = phi i64 [ 1, %.preheader69 ], [ %.071.be, %.backedge ]
  call void @_ZN11alglib_impl12hqrndnormal2EPNS_10hqrndstateEPdS2_PNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef %2)
  %17 = load double, ptr %6, align 8, !tbaa !5
  %18 = load ptr, ptr %12, align 8, !tbaa !9
  %19 = getelementptr inbounds double, ptr %18, i64 %.071
  store double %17, ptr %19, align 8, !tbaa !5
  %.not67.not = icmp ult i64 %.071, %.05973
  br i1 %.not67.not, label %20, label %25

20:                                               ; preds = %16
  %21 = load double, ptr %7, align 8, !tbaa !5
  %22 = load ptr, ptr %12, align 8, !tbaa !9
  %23 = getelementptr inbounds double, ptr %22, i64 %.071
  %24 = getelementptr inbounds i8, ptr %23, i64 8
  store double %21, ptr %24, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %20, %16
  %26 = add nuw nsw i64 %.071, 2
  %.not66 = icmp ugt i64 %26, %.05973
  br i1 %.not66, label %27, label %.backedge

.backedge:                                        ; preds = %25, %27
  %.071.be = phi i64 [ %26, %25 ], [ 1, %27 ]
  br label %16, !llvm.loop !10

27:                                               ; preds = %25
  %28 = load ptr, ptr %12, align 8, !tbaa !9
  %29 = getelementptr inbounds i8, ptr %28, i64 8
  %30 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 1, i64 noundef %.05973)
  %31 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef nonnull %29, i64 noundef 1, ptr noundef nonnull %29, i64 noundef 1, i64 noundef %30)
  %32 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %31, double noundef 0.000000e+00)
  br i1 %32, label %.backedge, label %33

33:                                               ; preds = %27
  call void @_ZN11alglib_impl18generatereflectionEPNS_9ae_vectorElPdPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %.05973, ptr noundef nonnull %5, ptr noundef %2)
  %34 = load ptr, ptr %12, align 8, !tbaa !9
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  store double 1.000000e+00, ptr %35, align 8, !tbaa !5
  %36 = load double, ptr %5, align 8, !tbaa !5
  %37 = sub nsw i64 %1, %.05973
  call void @_ZN11alglib_impl27applyreflectionfromtherightEPNS_9ae_matrixEdPNS_9ae_vectorEllllS3_PNS_8ae_stateE(ptr noundef %0, double noundef %36, ptr noundef nonnull %9, i64 noundef 0, i64 noundef %13, i64 noundef %37, i64 noundef %13, ptr noundef nonnull %8, ptr noundef %2)
  %38 = load double, ptr %5, align 8, !tbaa !5
  call void @_ZN11alglib_impl26applyreflectionfromtheleftEPNS_9ae_matrixEdPNS_9ae_vectorEllllS3_PNS_8ae_stateE(ptr noundef %0, double noundef %38, ptr noundef nonnull %9, i64 noundef %37, i64 noundef %13, i64 noundef 0, i64 noundef %13, ptr noundef nonnull %8, ptr noundef %2)
  %39 = add nuw i64 %.05973, 1
  %exitcond.not = icmp eq i64 %.05973, %1
  br i1 %exitcond.not, label %.preheader68, label %.preheader69, !llvm.loop !12

.preheader:                                       ; preds = %42
  br i1 %.not72, label %._crit_edge, label %.lr.ph78

.lr.ph78:                                         ; preds = %.preheader
  %40 = getelementptr inbounds i8, ptr %0, i64 72
  %41 = getelementptr inbounds i8, ptr %0, i64 16
  br label %59

42:                                               ; preds = %.lr.ph, %42
  %.175 = phi i64 [ 0, %.lr.ph ], [ %58, %42 ]
  %43 = call noundef i64 @_ZN11alglib_impl13hqrnduniformiEPNS_10hqrndstateElPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef 2, ptr noundef %2)
  %44 = shl nsw i64 %43, 1
  %45 = add nsw i64 %44, -1
  %46 = sitofp i64 %45 to double
  store double %46, ptr %5, align 8, !tbaa !5
  %47 = load ptr, ptr %14, align 8, !tbaa !9
  %48 = load ptr, ptr %47, align 8, !tbaa !13
  %49 = getelementptr inbounds double, ptr %48, i64 %.175
  %50 = load i64, ptr %15, align 8, !tbaa !15
  %51 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %.pre-phi)
  %52 = load double, ptr %5, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %49, i64 noundef %50, i64 noundef %51, double noundef %52)
  %53 = load ptr, ptr %14, align 8, !tbaa !9
  %54 = getelementptr inbounds ptr, ptr %53, i64 %.175
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  %56 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %.pre-phi)
  %57 = load double, ptr %5, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %55, i64 noundef 1, i64 noundef %56, double noundef %57)
  %58 = add nuw nsw i64 %.175, 1
  %exitcond79.not = icmp eq i64 %58, %1
  br i1 %exitcond79.not, label %.preheader, label %42, !llvm.loop !20

59:                                               ; preds = %.lr.ph78, %59
  %.277 = phi i64 [ 0, %.lr.ph78 ], [ %61, %59 ]
  %60 = load ptr, ptr %40, align 8, !tbaa !9
  %61 = add nuw nsw i64 %.277, 1
  %62 = getelementptr inbounds ptr, ptr %60, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !13
  %64 = getelementptr inbounds double, ptr %63, i64 %.277
  %65 = load i64, ptr %41, align 8, !tbaa !15
  %66 = getelementptr inbounds ptr, ptr %60, i64 %.277
  %67 = load ptr, ptr %66, align 8, !tbaa !13
  %68 = getelementptr inbounds double, ptr %67, i64 %61
  %69 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %61, i64 noundef %.pre-phi)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %64, i64 noundef %65, ptr noundef nonnull %68, i64 noundef 1, i64 noundef %69)
  %exitcond80.not = icmp eq i64 %61, %.pre-phi
  br i1 %exitcond80.not, label %._crit_edge, label %59, !llvm.loop !21

._crit_edge:                                      ; preds = %59, %.preheader68, %.preheader
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %2)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  ret void
}

declare noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef, double noundef) local_unnamed_addr #3

declare noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 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

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

declare void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef, i64 noundef, i64 noundef, double 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl27applyreflectionfromtherightEPNS_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 void @_ZN11alglib_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!16, !17, i64 16}
!16 = !{!"_ZTSN11alglib_impl9ae_matrixE", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !18, i64 32, !19, i64 40, !7, i64 72}
!17 = !{!"long", !7, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!20 = distinct !{!20, !11}
!21 = distinct !{!21, !11}


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