; 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::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_impl16spdmatrixrndcondEldPNS_9ae_matrixEPNS_8ae_stateE(i64 noundef %0, double noundef %1, ptr noundef %2, ptr noundef %3) #2 {
  %5 = alloca i64, align 8
  %6 = alloca double, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.alglib_impl::ae_frame", 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::hqrndstate", align 8
  %15 = alloca i32, align 4
  store i64 %0, ptr %5, align 8, !tbaa !5
  store double %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !11
  store ptr %3, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #5
  %16 = load ptr, ptr %8, align 8, !tbaa !11
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %16, ptr noundef %9)
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 24, i1 false)
  %17 = load ptr, ptr %7, align 8, !tbaa !11
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %17)
  %18 = load ptr, ptr %8, align 8, !tbaa !11
  call void @_ZN11alglib_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef %14, ptr noundef %18, i1 noundef zeroext true)
  %19 = load i64, ptr %5, align 8, !tbaa !5
  %20 = icmp sle i64 %19, 0
  br i1 %20, label %24, label %21

21:                                               ; preds = %4
  %22 = load double, ptr %6, align 8, !tbaa !9
  %23 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %22, double noundef 1.000000e+00)
  br i1 %23, label %24, label %26

24:                                               ; preds = %21, %4
  %25 = load ptr, ptr %8, align 8, !tbaa !11
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %25)
  store i32 1, ptr %15, align 4
  br label %128

26:                                               ; preds = %21
  %27 = load ptr, ptr %7, align 8, !tbaa !11
  %28 = load i64, ptr %5, align 8, !tbaa !5
  %29 = load i64, ptr %5, align 8, !tbaa !5
  %30 = load ptr, ptr %8, align 8, !tbaa !11
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %27, i64 noundef %28, i64 noundef %29, ptr noundef %30)
  %31 = load i64, ptr %5, align 8, !tbaa !5
  %32 = icmp eq i64 %31, 1
  br i1 %32, label %33, label %41

33:                                               ; preds = %26
  %34 = load ptr, ptr %7, align 8, !tbaa !11
  %35 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %34, i32 0, i32 6
  %36 = load ptr, ptr %35, align 8, !tbaa !13
  %37 = getelementptr inbounds ptr, ptr %36, i64 0
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = getelementptr inbounds double, ptr %38, i64 0
  store double 1.000000e+00, ptr %39, align 8, !tbaa !9
  %40 = load ptr, ptr %8, align 8, !tbaa !11
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %40)
  store i32 1, ptr %15, align 4
  br label %128

41:                                               ; preds = %26
  %42 = load ptr, ptr %8, align 8, !tbaa !11
  call void @_ZN11alglib_impl14hqrndrandomizeEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef %14, ptr noundef %42)
  store double 0.000000e+00, ptr %12, align 8, !tbaa !9
  %43 = load double, ptr %6, align 8, !tbaa !9
  %44 = fdiv double 1.000000e+00, %43
  %45 = load ptr, ptr %8, align 8, !tbaa !11
  %46 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef %44, ptr noundef %45)
  store double %46, ptr %13, align 8, !tbaa !9
  store i64 0, ptr %10, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %71, %41
  %48 = load i64, ptr %10, align 8, !tbaa !5
  %49 = load i64, ptr %5, align 8, !tbaa !5
  %50 = sub nsw i64 %49, 1
  %51 = icmp sle i64 %48, %50
  br i1 %51, label %52, label %74

52:                                               ; preds = %47
  store i64 0, ptr %11, align 8, !tbaa !5
  br label %53

53:                                               ; preds = %67, %52
  %54 = load i64, ptr %11, align 8, !tbaa !5
  %55 = load i64, ptr %5, align 8, !tbaa !5
  %56 = sub nsw i64 %55, 1
  %57 = icmp sle i64 %54, %56
  br i1 %57, label %58, label %70

58:                                               ; preds = %53
  %59 = load ptr, ptr %7, align 8, !tbaa !11
  %60 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %59, i32 0, i32 6
  %61 = load ptr, ptr %60, align 8, !tbaa !13
  %62 = load i64, ptr %10, align 8, !tbaa !5
  %63 = getelementptr inbounds ptr, ptr %61, i64 %62
  %64 = load ptr, ptr %63, align 8, !tbaa !11
  %65 = load i64, ptr %11, align 8, !tbaa !5
  %66 = getelementptr inbounds double, ptr %64, i64 %65
  store double 0.000000e+00, ptr %66, align 8, !tbaa !9
  br label %67

67:                                               ; preds = %58
  %68 = load i64, ptr %11, align 8, !tbaa !5
  %69 = add nsw i64 %68, 1
  store i64 %69, ptr %11, align 8, !tbaa !5
  br label %53, !llvm.loop !14

70:                                               ; preds = %53
  br label %71

71:                                               ; preds = %70
  %72 = load i64, ptr %10, align 8, !tbaa !5
  %73 = add nsw i64 %72, 1
  store i64 %73, ptr %10, align 8, !tbaa !5
  br label %47, !llvm.loop !16

74:                                               ; preds = %47
  %75 = load double, ptr %12, align 8, !tbaa !9
  %76 = load ptr, ptr %8, align 8, !tbaa !11
  %77 = call noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef %75, ptr noundef %76)
  %78 = load ptr, ptr %7, align 8, !tbaa !11
  %79 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %78, i32 0, i32 6
  %80 = load ptr, ptr %79, align 8, !tbaa !13
  %81 = getelementptr inbounds ptr, ptr %80, i64 0
  %82 = load ptr, ptr %81, align 8, !tbaa !11
  %83 = getelementptr inbounds double, ptr %82, i64 0
  store double %77, ptr %83, align 8, !tbaa !9
  store i64 1, ptr %10, align 8, !tbaa !5
  br label %84

84:                                               ; preds = %107, %74
  %85 = load i64, ptr %10, align 8, !tbaa !5
  %86 = load i64, ptr %5, align 8, !tbaa !5
  %87 = sub nsw i64 %86, 2
  %88 = icmp sle i64 %85, %87
  br i1 %88, label %89, label %110

89:                                               ; preds = %84
  %90 = load ptr, ptr %8, align 8, !tbaa !11
  %91 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef %14, ptr noundef %90)
  %92 = load double, ptr %13, align 8, !tbaa !9
  %93 = load double, ptr %12, align 8, !tbaa !9
  %94 = fsub double %92, %93
  %95 = load double, ptr %12, align 8, !tbaa !9
  %96 = call double @llvm.fmuladd.f64(double %91, double %94, double %95)
  %97 = load ptr, ptr %8, align 8, !tbaa !11
  %98 = call noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef %96, ptr noundef %97)
  %99 = load ptr, ptr %7, align 8, !tbaa !11
  %100 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %99, i32 0, i32 6
  %101 = load ptr, ptr %100, align 8, !tbaa !13
  %102 = load i64, ptr %10, align 8, !tbaa !5
  %103 = getelementptr inbounds ptr, ptr %101, i64 %102
  %104 = load ptr, ptr %103, align 8, !tbaa !11
  %105 = load i64, ptr %10, align 8, !tbaa !5
  %106 = getelementptr inbounds double, ptr %104, i64 %105
  store double %98, ptr %106, align 8, !tbaa !9
  br label %107

107:                                              ; preds = %89
  %108 = load i64, ptr %10, align 8, !tbaa !5
  %109 = add nsw i64 %108, 1
  store i64 %109, ptr %10, align 8, !tbaa !5
  br label %84, !llvm.loop !17

110:                                              ; preds = %84
  %111 = load double, ptr %13, align 8, !tbaa !9
  %112 = load ptr, ptr %8, align 8, !tbaa !11
  %113 = call noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef %111, ptr noundef %112)
  %114 = load ptr, ptr %7, align 8, !tbaa !11
  %115 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %114, i32 0, i32 6
  %116 = load ptr, ptr %115, align 8, !tbaa !13
  %117 = load i64, ptr %5, align 8, !tbaa !5
  %118 = sub nsw i64 %117, 1
  %119 = getelementptr inbounds ptr, ptr %116, i64 %118
  %120 = load ptr, ptr %119, align 8, !tbaa !11
  %121 = load i64, ptr %5, align 8, !tbaa !5
  %122 = sub nsw i64 %121, 1
  %123 = getelementptr inbounds double, ptr %120, i64 %122
  store double %113, ptr %123, align 8, !tbaa !9
  %124 = load ptr, ptr %7, align 8, !tbaa !11
  %125 = load i64, ptr %5, align 8, !tbaa !5
  %126 = load ptr, ptr %8, align 8, !tbaa !11
  call void @_ZN11alglib_impl18smatrixrndmultiplyEPNS_9ae_matrixElPNS_8ae_stateE(ptr noundef %124, i64 noundef %125, ptr noundef %126)
  %127 = load ptr, ptr %8, align 8, !tbaa !11
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %127)
  store i32 0, ptr %15, align 4
  br label %128

128:                                              ; preds = %110, %33, %24
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  %129 = load i32, ptr %15, align 4
  switch i32 %129, label %131 [
    i32 0, label %130
    i32 1, label %130
  ]

130:                                              ; preds = %128, %128
  ret void

131:                                              ; preds = %128
  unreachable
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #4

declare noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef, double noundef) #4

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) #4

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

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

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

declare noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef, ptr noundef) #4

declare noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef, ptr noundef) #4

declare noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef, ptr noundef) #4

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 nosync nounwind speculatable willreturn memory(none) }
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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !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::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_impl16spdmatrixrndcondEldPNS_9ae_matrixEPNS_8ae_stateE(i64 noundef %0, double noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #2 {
  %5 = alloca %"struct.alglib_impl::ae_frame", align 8
  %6 = alloca %"struct.alglib_impl::hqrndstate", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %3, ptr noundef nonnull %5)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, i8 0, i64 24, i1 false)
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %2)
  call void @_ZN11alglib_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef nonnull %6, ptr noundef %3, i1 noundef zeroext true)
  %7 = icmp slt i64 %0, 1
  br i1 %7, label %64, label %8

8:                                                ; preds = %4
  %9 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %1, double noundef 1.000000e+00)
  br i1 %9, label %64, label %10

10:                                               ; preds = %8
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %2, i64 noundef %0, i64 noundef %0, ptr noundef %3)
  %11 = icmp eq i64 %0, 1
  br i1 %11, label %12, label %.preheader.lr.ph

12:                                               ; preds = %10
  %13 = getelementptr inbounds i8, ptr %2, i64 72
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = load ptr, ptr %14, align 8, !tbaa !8
  store double 1.000000e+00, ptr %15, align 8, !tbaa !10
  br label %64

.preheader.lr.ph:                                 ; preds = %10
  call void @_ZN11alglib_impl14hqrndrandomizeEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef nonnull %6, ptr noundef %3)
  %16 = fdiv double 1.000000e+00, %1
  %17 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef %16, ptr noundef %3)
  %18 = getelementptr inbounds i8, ptr %2, i64 72
  %xtraiter = and i64 %0, 3
  %19 = icmp ult i64 %0, 4
  %unroll_iter = and i64 %0, 9223372036854775804
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %._crit_edge.us, %.preheader.lr.ph
  %.055.us = phi i64 [ 0, %.preheader.lr.ph ], [ %45, %._crit_edge.us ]
  br i1 %19, label %._crit_edge.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %.04753.us = phi i64 [ %39, %.preheader.us.new ], [ 0, %.preheader.us ]
  %niter = phi i64 [ %niter.next.3, %.preheader.us.new ], [ 0, %.preheader.us ]
  %20 = load ptr, ptr %18, align 8, !tbaa !5
  %21 = getelementptr inbounds ptr, ptr %20, i64 %.055.us
  %22 = load ptr, ptr %21, align 8, !tbaa !8
  %23 = getelementptr inbounds double, ptr %22, i64 %.04753.us
  store double 0.000000e+00, ptr %23, align 8, !tbaa !10
  %24 = or disjoint i64 %.04753.us, 1
  %25 = load ptr, ptr %18, align 8, !tbaa !5
  %26 = getelementptr inbounds ptr, ptr %25, i64 %.055.us
  %27 = load ptr, ptr %26, align 8, !tbaa !8
  %28 = getelementptr inbounds double, ptr %27, i64 %24
  store double 0.000000e+00, ptr %28, align 8, !tbaa !10
  %29 = or disjoint i64 %.04753.us, 2
  %30 = load ptr, ptr %18, align 8, !tbaa !5
  %31 = getelementptr inbounds ptr, ptr %30, i64 %.055.us
  %32 = load ptr, ptr %31, align 8, !tbaa !8
  %33 = getelementptr inbounds double, ptr %32, i64 %29
  store double 0.000000e+00, ptr %33, align 8, !tbaa !10
  %34 = or disjoint i64 %.04753.us, 3
  %35 = load ptr, ptr %18, align 8, !tbaa !5
  %36 = getelementptr inbounds ptr, ptr %35, i64 %.055.us
  %37 = load ptr, ptr %36, align 8, !tbaa !8
  %38 = getelementptr inbounds double, ptr %37, i64 %34
  store double 0.000000e+00, ptr %38, align 8, !tbaa !10
  %39 = add nuw nsw i64 %.04753.us, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !12

._crit_edge.us.unr-lcssa:                         ; preds = %.preheader.us.new, %.preheader.us
  %.04753.us.unr = phi i64 [ 0, %.preheader.us ], [ %39, %.preheader.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us.unr-lcssa, %.epil.preheader
  %.04753.us.epil = phi i64 [ %44, %.epil.preheader ], [ %.04753.us.unr, %._crit_edge.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.us.unr-lcssa ]
  %40 = load ptr, ptr %18, align 8, !tbaa !5
  %41 = getelementptr inbounds ptr, ptr %40, i64 %.055.us
  %42 = load ptr, ptr %41, align 8, !tbaa !8
  %43 = getelementptr inbounds double, ptr %42, i64 %.04753.us.epil
  store double 0.000000e+00, ptr %43, align 8, !tbaa !10
  %44 = add nuw nsw i64 %.04753.us.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge.us, label %.epil.preheader, !llvm.loop !14

._crit_edge.us:                                   ; preds = %.epil.preheader, %._crit_edge.us.unr-lcssa
  %45 = add nuw nsw i64 %.055.us, 1
  %exitcond59.not = icmp eq i64 %45, %0
  br i1 %exitcond59.not, label %._crit_edge56, label %.preheader.us, !llvm.loop !16

._crit_edge56:                                    ; preds = %._crit_edge.us
  %46 = add nsw i64 %0, -1
  %47 = call noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef 0.000000e+00, ptr noundef %3)
  %48 = getelementptr inbounds i8, ptr %2, i64 72
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  %50 = load ptr, ptr %49, align 8, !tbaa !8
  store double %47, ptr %50, align 8, !tbaa !10
  %.not57 = icmp slt i64 %0, 3
  br i1 %.not57, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %._crit_edge56, %.lr.ph
  %.158 = phi i64 [ %58, %.lr.ph ], [ 1, %._crit_edge56 ]
  %51 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef nonnull %6, ptr noundef %3)
  %52 = call double @llvm.fmuladd.f64(double %51, double %17, double 0.000000e+00)
  %53 = call noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef %52, ptr noundef %3)
  %54 = load ptr, ptr %48, align 8, !tbaa !5
  %55 = getelementptr inbounds ptr, ptr %54, i64 %.158
  %56 = load ptr, ptr %55, align 8, !tbaa !8
  %57 = getelementptr inbounds double, ptr %56, i64 %.158
  store double %53, ptr %57, align 8, !tbaa !10
  %58 = add nuw i64 %.158, 1
  %exitcond60.not = icmp eq i64 %58, %46
  br i1 %exitcond60.not, label %._crit_edge, label %.lr.ph, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph, %._crit_edge56
  %59 = call noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef %17, ptr noundef %3)
  %60 = load ptr, ptr %48, align 8, !tbaa !5
  %61 = getelementptr inbounds ptr, ptr %60, i64 %46
  %62 = load ptr, ptr %61, align 8, !tbaa !8
  %63 = getelementptr inbounds double, ptr %62, i64 %46
  store double %59, ptr %63, align 8, !tbaa !10
  call void @_ZN11alglib_impl18smatrixrndmultiplyEPNS_9ae_matrixElPNS_8ae_stateE(ptr noundef nonnull %2, i64 noundef %0, ptr noundef %3)
  br label %64

64:                                               ; preds = %4, %8, %._crit_edge, %12
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %3)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  ret void
}

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #4

declare noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef, double noundef) local_unnamed_addr #4

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) local_unnamed_addr #4

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

declare void @_ZN11alglib_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #4

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

declare noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #4

declare noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #4

declare noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}


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