; 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.224 = 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_impl14smatrixrndcondEldPNS_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.224, 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 %139

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 = %118, %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 %121

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

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

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

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

141:                                              ; preds = %139, %139
  ret void

142:                                              ; preds = %139
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl18smatrixrndmultiplyEPNS_9ae_matrixElPNS_8ae_stateE(ptr 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

declare noundef i64 @_ZN11alglib_impl13hqrnduniformiEPNS_10hqrndstateElPNS_8ae_stateE(ptr noundef, i64 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.224 = 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_impl14smatrixrndcondEldPNS_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.224, 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 %75

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_edge58

.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
  %.057.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
  %.04955.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 %.057.us
  %28 = load ptr, ptr %27, align 8, !tbaa !8
  %29 = getelementptr inbounds double, ptr %28, i64 %.04955.us
  store double 0.000000e+00, ptr %29, align 8, !tbaa !10
  %30 = or disjoint i64 %.04955.us, 1
  %31 = load ptr, ptr %24, align 8, !tbaa !5
  %32 = getelementptr inbounds ptr, ptr %31, i64 %.057.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 %.04955.us, 2
  %36 = load ptr, ptr %24, align 8, !tbaa !5
  %37 = getelementptr inbounds ptr, ptr %36, i64 %.057.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 %.04955.us, 3
  %41 = load ptr, ptr %24, align 8, !tbaa !5
  %42 = getelementptr inbounds ptr, ptr %41, i64 %.057.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 %.04955.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
  %.04955.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
  %.04955.us.epil = phi i64 [ %50, %.epil.preheader ], [ %.04955.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 %.057.us
  %48 = load ptr, ptr %47, align 8, !tbaa !8
  %49 = getelementptr inbounds double, ptr %48, i64 %.04955.us.epil
  store double 0.000000e+00, ptr %49, align 8, !tbaa !10
  %50 = add nuw nsw i64 %.04955.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 %.057.us, 1
  %exitcond61.not = icmp eq i64 %51, %0
  br i1 %exitcond61.not, label %._crit_edge58, label %.preheader.us, !llvm.loop !16

._crit_edge58:                                    ; 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
  %.not59 = icmp slt i64 %0, 3
  br i1 %.not59, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %._crit_edge58, %.lr.ph
  %.160 = phi i64 [ %69, %.lr.ph ], [ 1, %._crit_edge58 ]
  %57 = call noundef i64 @_ZN11alglib_impl13hqrnduniformiEPNS_10hqrndstateElPNS_8ae_stateE(ptr noundef nonnull %6, i64 noundef 2, ptr noundef %3)
  %58 = shl nsw i64 %57, 1
  %59 = add nsw i64 %58, -1
  %60 = sitofp i64 %59 to double
  %61 = call noundef double @_ZN11alglib_impl13hqrnduniformrEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef nonnull %6, ptr noundef %3)
  %62 = call double @llvm.fmuladd.f64(double %61, double %23, double 0.000000e+00)
  %63 = call noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef %62, ptr noundef %3)
  %64 = fmul double %63, %60
  %65 = load ptr, ptr %54, align 8, !tbaa !5
  %66 = getelementptr inbounds ptr, ptr %65, i64 %.160
  %67 = load ptr, ptr %66, align 8, !tbaa !8
  %68 = getelementptr inbounds double, ptr %67, i64 %.160
  store double %64, ptr %68, align 8, !tbaa !10
  %69 = add nuw i64 %.160, 1
  %exitcond62.not = icmp eq i64 %69, %52
  br i1 %exitcond62.not, label %._crit_edge, label %.lr.ph, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph, %._crit_edge58
  %70 = call noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef %23, ptr noundef %3)
  %71 = load ptr, ptr %54, align 8, !tbaa !5
  %72 = getelementptr inbounds ptr, ptr %71, i64 %52
  %73 = load ptr, ptr %72, align 8, !tbaa !8
  %74 = getelementptr inbounds double, ptr %73, i64 %52
  store double %70, ptr %74, align 8, !tbaa !10
  call void @_ZN11alglib_impl18smatrixrndmultiplyEPNS_9ae_matrixElPNS_8ae_stateE(ptr noundef nonnull %2, i64 noundef %0, ptr noundef %3)
  br label %75

75:                                               ; 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_impl18smatrixrndmultiplyEPNS_9ae_matrixElPNS_8ae_stateE(ptr 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

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