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

@.str.221 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl14rmatrixrndcondEldPNS_9ae_matrixEPNS_8ae_stateE(i64 noundef %0, double noundef %1, ptr noundef %2, ptr noundef %3) #3 {
  %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 sge i64 %19, 1
  br i1 %20, label %21, label %24

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

24:                                               ; preds = %21, %4
  %25 = phi i1 [ false, %4 ], [ %23, %21 ]
  %26 = load ptr, ptr %8, align 8, !tbaa !11
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %25, ptr noundef @.str.221, ptr noundef %26)
  %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 %46

33:                                               ; preds = %24
  %34 = load ptr, ptr %8, align 8, !tbaa !11
  %35 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef 2, ptr noundef %34)
  %36 = mul nsw i64 2, %35
  %37 = sub nsw i64 %36, 1
  %38 = sitofp i64 %37 to double
  %39 = load ptr, ptr %7, align 8, !tbaa !11
  %40 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %39, i32 0, i32 6
  %41 = load ptr, ptr %40, align 8, !tbaa !13
  %42 = getelementptr inbounds ptr, ptr %41, i64 0
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = getelementptr inbounds double, ptr %43, i64 0
  store double %38, ptr %44, align 8, !tbaa !9
  %45 = load ptr, ptr %8, align 8, !tbaa !11
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %45)
  store i32 1, ptr %15, align 4
  br label %138

46:                                               ; preds = %24
  %47 = load ptr, ptr %8, align 8, !tbaa !11
  call void @_ZN11alglib_impl14hqrndrandomizeEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef %14, ptr noundef %47)
  store double 0.000000e+00, ptr %12, align 8, !tbaa !9
  %48 = load double, ptr %6, align 8, !tbaa !9
  %49 = fdiv double 1.000000e+00, %48
  %50 = load ptr, ptr %8, align 8, !tbaa !11
  %51 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef %49, ptr noundef %50)
  store double %51, ptr %13, align 8, !tbaa !9
  store i64 0, ptr %10, align 8, !tbaa !5
  br label %52

52:                                               ; preds = %76, %46
  %53 = load i64, ptr %10, align 8, !tbaa !5
  %54 = load i64, ptr %5, align 8, !tbaa !5
  %55 = sub nsw i64 %54, 1
  %56 = icmp sle i64 %53, %55
  br i1 %56, label %57, label %79

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

58:                                               ; preds = %72, %57
  %59 = load i64, ptr %11, align 8, !tbaa !5
  %60 = load i64, ptr %5, align 8, !tbaa !5
  %61 = sub nsw i64 %60, 1
  %62 = icmp sle i64 %59, %61
  br i1 %62, label %63, label %75

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

72:                                               ; preds = %63
  %73 = load i64, ptr %11, align 8, !tbaa !5
  %74 = add nsw i64 %73, 1
  store i64 %74, ptr %11, align 8, !tbaa !5
  br label %58, !llvm.loop !14

75:                                               ; preds = %58
  br label %76

76:                                               ; preds = %75
  %77 = load i64, ptr %10, align 8, !tbaa !5
  %78 = add nsw i64 %77, 1
  store i64 %78, ptr %10, align 8, !tbaa !5
  br label %52, !llvm.loop !16

79:                                               ; preds = %52
  %80 = load double, ptr %12, align 8, !tbaa !9
  %81 = load ptr, ptr %8, align 8, !tbaa !11
  %82 = call noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef %80, ptr noundef %81)
  %83 = load ptr, ptr %7, align 8, !tbaa !11
  %84 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %83, i32 0, i32 6
  %85 = load ptr, ptr %84, align 8, !tbaa !13
  %86 = getelementptr inbounds ptr, ptr %85, i64 0
  %87 = load ptr, ptr %86, align 8, !tbaa !11
  %88 = getelementptr inbounds double, ptr %87, i64 0
  store double %82, ptr %88, align 8, !tbaa !9
  store i64 1, ptr %10, align 8, !tbaa !5
  br label %89

89:                                               ; preds = %112, %79
  %90 = load i64, ptr %10, align 8, !tbaa !5
  %91 = load i64, ptr %5, align 8, !tbaa !5
  %92 = sub nsw i64 %91, 2
  %93 = icmp sle i64 %90, %92
  br i1 %93, label %94, label %115

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

112:                                              ; preds = %94
  %113 = load i64, ptr %10, align 8, !tbaa !5
  %114 = add nsw i64 %113, 1
  store i64 %114, ptr %10, align 8, !tbaa !5
  br label %89, !llvm.loop !17

115:                                              ; preds = %89
  %116 = load double, ptr %13, align 8, !tbaa !9
  %117 = load ptr, ptr %8, align 8, !tbaa !11
  %118 = call noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef %116, ptr noundef %117)
  %119 = load ptr, ptr %7, align 8, !tbaa !11
  %120 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %119, i32 0, i32 6
  %121 = load ptr, ptr %120, align 8, !tbaa !13
  %122 = load i64, ptr %5, align 8, !tbaa !5
  %123 = sub nsw i64 %122, 1
  %124 = getelementptr inbounds ptr, ptr %121, i64 %123
  %125 = load ptr, ptr %124, align 8, !tbaa !11
  %126 = load i64, ptr %5, align 8, !tbaa !5
  %127 = sub nsw i64 %126, 1
  %128 = getelementptr inbounds double, ptr %125, i64 %127
  store double %118, ptr %128, align 8, !tbaa !9
  %129 = load ptr, ptr %7, align 8, !tbaa !11
  %130 = load i64, ptr %5, align 8, !tbaa !5
  %131 = load i64, ptr %5, align 8, !tbaa !5
  %132 = load ptr, ptr %8, align 8, !tbaa !11
  call void @_ZN11alglib_impl31rmatrixrndorthogonalfromtheleftEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %129, i64 noundef %130, i64 noundef %131, ptr noundef %132)
  %133 = load ptr, ptr %7, align 8, !tbaa !11
  %134 = load i64, ptr %5, align 8, !tbaa !5
  %135 = load i64, ptr %5, align 8, !tbaa !5
  %136 = load ptr, ptr %8, align 8, !tbaa !11
  call void @_ZN11alglib_impl32rmatrixrndorthogonalfromtherightEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %133, i64 noundef %134, i64 noundef %135, ptr noundef %136)
  %137 = load ptr, ptr %8, align 8, !tbaa !11
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %137)
  store i32 0, ptr %15, align 4
  br label %138

138:                                              ; preds = %115, %33
  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
  %139 = load i32, ptr %15, align 4
  switch i32 %139, label %141 [
    i32 0, label %140
    i32 1, label %140
  ]

140:                                              ; preds = %138, %138
  ret void

141:                                              ; preds = %138
  unreachable
}

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

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

declare noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef, double noundef) #2

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) #2

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

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

declare noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef, ptr noundef) #2

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

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

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

declare noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(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 = { "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 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 #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 = !{!"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 }

@.str.221 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl14rmatrixrndcondEldPNS_9ae_matrixEPNS_8ae_stateE(i64 noundef %0, double noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #3 {
  %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 sgt i64 %0, 0
  br i1 %7, label %8, label %10

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

10:                                               ; preds = %8, %4
  %11 = phi i1 [ false, %4 ], [ %9, %8 ]
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %11, ptr noundef nonnull @.str.221, ptr noundef %3)
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %2, i64 noundef %0, i64 noundef %0, ptr noundef %3)
  %12 = icmp eq i64 %0, 1
  br i1 %12, label %13, label %21

13:                                               ; preds = %10
  %14 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef 2, ptr noundef %3)
  %15 = shl nsw i64 %14, 1
  %16 = add nsw i64 %15, -1
  %17 = sitofp i64 %16 to double
  %18 = getelementptr inbounds i8, ptr %2, i64 72
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = load ptr, ptr %19, align 8, !tbaa !8
  store double %17, ptr %20, align 8, !tbaa !10
  br label %70

21:                                               ; preds = %10
  call void @_ZN11alglib_impl14hqrndrandomizeEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef nonnull %6, ptr noundef %3)
  %22 = fdiv double 1.000000e+00, %1
  %23 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef %22, ptr noundef %3)
  br i1 %7, label %.preheader.lr.ph, label %._crit_edge62

.preheader.lr.ph:                                 ; preds = %21
  %24 = getelementptr inbounds i8, ptr %2, i64 72
  %xtraiter = and i64 %0, 3
  %25 = 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
  %.061.us = phi i64 [ 0, %.preheader.lr.ph ], [ %51, %._crit_edge.us ]
  br i1 %25, label %._crit_edge.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %.05359.us = phi i64 [ %45, %.preheader.us.new ], [ 0, %.preheader.us ]
  %niter = phi i64 [ %niter.next.3, %.preheader.us.new ], [ 0, %.preheader.us ]
  %26 = load ptr, ptr %24, align 8, !tbaa !5
  %27 = getelementptr inbounds ptr, ptr %26, i64 %.061.us
  %28 = load ptr, ptr %27, align 8, !tbaa !8
  %29 = getelementptr inbounds double, ptr %28, i64 %.05359.us
  store double 0.000000e+00, ptr %29, align 8, !tbaa !10
  %30 = or disjoint i64 %.05359.us, 1
  %31 = load ptr, ptr %24, align 8, !tbaa !5
  %32 = getelementptr inbounds ptr, ptr %31, i64 %.061.us
  %33 = load ptr, ptr %32, align 8, !tbaa !8
  %34 = getelementptr inbounds double, ptr %33, i64 %30
  store double 0.000000e+00, ptr %34, align 8, !tbaa !10
  %35 = or disjoint i64 %.05359.us, 2
  %36 = load ptr, ptr %24, align 8, !tbaa !5
  %37 = getelementptr inbounds ptr, ptr %36, i64 %.061.us
  %38 = load ptr, ptr %37, align 8, !tbaa !8
  %39 = getelementptr inbounds double, ptr %38, i64 %35
  store double 0.000000e+00, ptr %39, align 8, !tbaa !10
  %40 = or disjoint i64 %.05359.us, 3
  %41 = load ptr, ptr %24, align 8, !tbaa !5
  %42 = getelementptr inbounds ptr, ptr %41, i64 %.061.us
  %43 = load ptr, ptr %42, align 8, !tbaa !8
  %44 = getelementptr inbounds double, ptr %43, i64 %40
  store double 0.000000e+00, ptr %44, align 8, !tbaa !10
  %45 = add nuw nsw i64 %.05359.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
  %.05359.us.unr = phi i64 [ 0, %.preheader.us ], [ %45, %.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
  %.05359.us.epil = phi i64 [ %50, %.epil.preheader ], [ %.05359.us.unr, %._crit_edge.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.us.unr-lcssa ]
  %46 = load ptr, ptr %24, align 8, !tbaa !5
  %47 = getelementptr inbounds ptr, ptr %46, i64 %.061.us
  %48 = load ptr, ptr %47, align 8, !tbaa !8
  %49 = getelementptr inbounds double, ptr %48, i64 %.05359.us.epil
  store double 0.000000e+00, ptr %49, align 8, !tbaa !10
  %50 = add nuw nsw i64 %.05359.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
  %51 = add nuw nsw i64 %.061.us, 1
  %exitcond65.not = icmp eq i64 %51, %0
  br i1 %exitcond65.not, label %._crit_edge62, label %.preheader.us, !llvm.loop !16

._crit_edge62:                                    ; preds = %._crit_edge.us, %21
  %52 = add i64 %0, -1
  %53 = call noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef 0.000000e+00, ptr noundef %3)
  %54 = getelementptr inbounds i8, ptr %2, i64 72
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = load ptr, ptr %55, align 8, !tbaa !8
  store double %53, ptr %56, align 8, !tbaa !10
  %.not63 = icmp slt i64 %0, 3
  br i1 %.not63, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %._crit_edge62, %.lr.ph
  %.164 = phi i64 [ %64, %.lr.ph ], [ 1, %._crit_edge62 ]
  %57 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef nonnull %6, ptr noundef %3)
  %58 = call double @llvm.fmuladd.f64(double %57, double %23, double 0.000000e+00)
  %59 = call noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef %58, ptr noundef %3)
  %60 = load ptr, ptr %54, align 8, !tbaa !5
  %61 = getelementptr inbounds ptr, ptr %60, i64 %.164
  %62 = load ptr, ptr %61, align 8, !tbaa !8
  %63 = getelementptr inbounds double, ptr %62, i64 %.164
  store double %59, ptr %63, align 8, !tbaa !10
  %64 = add nuw i64 %.164, 1
  %exitcond66.not = icmp eq i64 %64, %52
  br i1 %exitcond66.not, label %._crit_edge, label %.lr.ph, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph, %._crit_edge62
  %65 = call noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef %23, ptr noundef %3)
  %66 = load ptr, ptr %54, align 8, !tbaa !5
  %67 = getelementptr inbounds ptr, ptr %66, i64 %52
  %68 = load ptr, ptr %67, align 8, !tbaa !8
  %69 = getelementptr inbounds double, ptr %68, i64 %52
  store double %65, ptr %69, align 8, !tbaa !10
  call void @_ZN11alglib_impl31rmatrixrndorthogonalfromtheleftEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %2, i64 noundef %0, i64 noundef %0, ptr noundef %3)
  call void @_ZN11alglib_impl32rmatrixrndorthogonalfromtherightEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %2, i64 noundef %0, i64 noundef %0, ptr noundef %3)
  br label %70

70:                                               ; preds = %._crit_edge, %13
  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_impl32rmatrixrndorthogonalfromtherightEPNS_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_impl31rmatrixrndorthogonalfromtheleftEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef, double noundef) local_unnamed_addr #2

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) local_unnamed_addr #2

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

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

declare noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef, ptr noundef) local_unnamed_addr #2

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

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

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

declare noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "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 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}


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