; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src (dataanalysis)

; 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.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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

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

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #2

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl11dsnormalizeEPNS_9ae_matrixEllPlPNS_9ae_vectorES4_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #3 {
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"struct.alglib_impl::ae_frame", align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca %"struct.alglib_impl::ae_vector", align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i64 %1, ptr %9, align 8, !tbaa !9
  store i64 %2, ptr %10, align 8, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %24 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %24, ptr noundef %15)
  call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 64, i1 false)
  %25 = load ptr, ptr %11, align 8, !tbaa !5
  store i64 0, ptr %25, align 8, !tbaa !9
  %26 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %26)
  %27 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %27)
  %28 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %18, i64 noundef 0, i64 noundef 3, ptr noundef %28, i1 noundef zeroext true)
  %29 = load i64, ptr %9, align 8, !tbaa !9
  %30 = icmp sle i64 %29, 0
  br i1 %30, label %34, label %31

31:                                               ; preds = %7
  %32 = load i64, ptr %10, align 8, !tbaa !9
  %33 = icmp slt i64 %32, 1
  br i1 %33, label %34, label %37

34:                                               ; preds = %31, %7
  %35 = load ptr, ptr %11, align 8, !tbaa !5
  store i64 -1, ptr %35, align 8, !tbaa !9
  %36 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %36)
  store i32 1, ptr %23, align 4
  br label %151

37:                                               ; preds = %31
  %38 = load ptr, ptr %11, align 8, !tbaa !5
  store i64 1, ptr %38, align 8, !tbaa !9
  %39 = load ptr, ptr %12, align 8, !tbaa !5
  %40 = load i64, ptr %10, align 8, !tbaa !9
  %41 = sub nsw i64 %40, 1
  %42 = add nsw i64 %41, 1
  %43 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %39, i64 noundef %42, ptr noundef %43)
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  %45 = load i64, ptr %10, align 8, !tbaa !9
  %46 = sub nsw i64 %45, 1
  %47 = add nsw i64 %46, 1
  %48 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %44, i64 noundef %47, ptr noundef %48)
  %49 = load i64, ptr %9, align 8, !tbaa !9
  %50 = sub nsw i64 %49, 1
  %51 = add nsw i64 %50, 1
  %52 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %18, i64 noundef %51, ptr noundef %52)
  store i64 0, ptr %17, align 8, !tbaa !9
  br label %53

53:                                               ; preds = %146, %37
  %54 = load i64, ptr %17, align 8, !tbaa !9
  %55 = load i64, ptr %10, align 8, !tbaa !9
  %56 = sub nsw i64 %55, 1
  %57 = icmp sle i64 %54, %56
  br i1 %57, label %58, label %149

58:                                               ; preds = %53
  %59 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %60 = load ptr, ptr %59, align 8, !tbaa !11
  %61 = getelementptr inbounds double, ptr %60, i64 0
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %62, i32 0, i32 6
  %64 = load ptr, ptr %63, align 8, !tbaa !11
  %65 = getelementptr inbounds ptr, ptr %64, i64 0
  %66 = load ptr, ptr %65, align 8, !tbaa !5
  %67 = load i64, ptr %17, align 8, !tbaa !9
  %68 = getelementptr inbounds double, ptr %66, i64 %67
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %69, i32 0, i32 2
  %71 = load i64, ptr %70, align 8, !tbaa !12
  %72 = load i64, ptr %9, align 8, !tbaa !9
  %73 = sub nsw i64 %72, 1
  %74 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %73)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %61, i64 noundef 1, ptr noundef %68, i64 noundef %71, i64 noundef %74)
  %75 = load i64, ptr %9, align 8, !tbaa !9
  %76 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl13samplemomentsEPNS_9ae_vectorElPdS2_S2_S2_PNS_8ae_stateE(ptr noundef %18, i64 noundef %75, ptr noundef %19, ptr noundef %20, ptr noundef %21, ptr noundef %22, ptr noundef %76)
  %77 = load double, ptr %19, align 8, !tbaa !16
  %78 = load ptr, ptr %12, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %78, i32 0, i32 4
  %80 = load ptr, ptr %79, align 8, !tbaa !11
  %81 = load i64, ptr %17, align 8, !tbaa !9
  %82 = getelementptr inbounds double, ptr %80, i64 %81
  store double %77, ptr %82, align 8, !tbaa !16
  %83 = load double, ptr %20, align 8, !tbaa !16
  %84 = load ptr, ptr %14, align 8, !tbaa !5
  %85 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %83, ptr noundef %84)
  %86 = load ptr, ptr %13, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %86, i32 0, i32 4
  %88 = load ptr, ptr %87, align 8, !tbaa !11
  %89 = load i64, ptr %17, align 8, !tbaa !9
  %90 = getelementptr inbounds double, ptr %88, i64 %89
  store double %85, ptr %90, align 8, !tbaa !16
  %91 = load ptr, ptr %13, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %91, i32 0, i32 4
  %93 = load ptr, ptr %92, align 8, !tbaa !11
  %94 = load i64, ptr %17, align 8, !tbaa !9
  %95 = getelementptr inbounds double, ptr %93, i64 %94
  %96 = load double, ptr %95, align 8, !tbaa !16
  %97 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %96, double noundef 0.000000e+00)
  br i1 %97, label %98, label %104

98:                                               ; preds = %58
  %99 = load ptr, ptr %13, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %99, i32 0, i32 4
  %101 = load ptr, ptr %100, align 8, !tbaa !11
  %102 = load i64, ptr %17, align 8, !tbaa !9
  %103 = getelementptr inbounds double, ptr %101, i64 %102
  store double 1.000000e+00, ptr %103, align 8, !tbaa !16
  br label %104

104:                                              ; preds = %98, %58
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %105

105:                                              ; preds = %142, %104
  %106 = load i64, ptr %16, align 8, !tbaa !9
  %107 = load i64, ptr %9, align 8, !tbaa !9
  %108 = sub nsw i64 %107, 1
  %109 = icmp sle i64 %106, %108
  br i1 %109, label %110, label %145

110:                                              ; preds = %105
  %111 = load ptr, ptr %8, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %111, i32 0, i32 6
  %113 = load ptr, ptr %112, align 8, !tbaa !11
  %114 = load i64, ptr %16, align 8, !tbaa !9
  %115 = getelementptr inbounds ptr, ptr %113, i64 %114
  %116 = load ptr, ptr %115, align 8, !tbaa !5
  %117 = load i64, ptr %17, align 8, !tbaa !9
  %118 = getelementptr inbounds double, ptr %116, i64 %117
  %119 = load double, ptr %118, align 8, !tbaa !16
  %120 = load ptr, ptr %12, align 8, !tbaa !5
  %121 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %120, i32 0, i32 4
  %122 = load ptr, ptr %121, align 8, !tbaa !11
  %123 = load i64, ptr %17, align 8, !tbaa !9
  %124 = getelementptr inbounds double, ptr %122, i64 %123
  %125 = load double, ptr %124, align 8, !tbaa !16
  %126 = fsub double %119, %125
  %127 = load ptr, ptr %13, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %127, i32 0, i32 4
  %129 = load ptr, ptr %128, align 8, !tbaa !11
  %130 = load i64, ptr %17, align 8, !tbaa !9
  %131 = getelementptr inbounds double, ptr %129, i64 %130
  %132 = load double, ptr %131, align 8, !tbaa !16
  %133 = fdiv double %126, %132
  %134 = load ptr, ptr %8, align 8, !tbaa !5
  %135 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %134, i32 0, i32 6
  %136 = load ptr, ptr %135, align 8, !tbaa !11
  %137 = load i64, ptr %16, align 8, !tbaa !9
  %138 = getelementptr inbounds ptr, ptr %136, i64 %137
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  %140 = load i64, ptr %17, align 8, !tbaa !9
  %141 = getelementptr inbounds double, ptr %139, i64 %140
  store double %133, ptr %141, align 8, !tbaa !16
  br label %142

142:                                              ; preds = %110
  %143 = load i64, ptr %16, align 8, !tbaa !9
  %144 = add nsw i64 %143, 1
  store i64 %144, ptr %16, align 8, !tbaa !9
  br label %105, !llvm.loop !18

145:                                              ; preds = %105
  br label %146

146:                                              ; preds = %145
  %147 = load i64, ptr %17, align 8, !tbaa !9
  %148 = add nsw i64 %147, 1
  store i64 %148, ptr %17, align 8, !tbaa !9
  br label %53, !llvm.loop !20

149:                                              ; preds = %53
  %150 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %150)
  store i32 0, ptr %23, align 4
  br label %151

151:                                              ; preds = %149, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #4
  %152 = load i32, ptr %23, align 4
  switch i32 %152, label %154 [
    i32 0, label %153
    i32 1, label %153
  ]

153:                                              ; preds = %151, %151
  ret void

154:                                              ; preds = %151
  unreachable
}

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 = { nounwind }

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

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


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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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

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

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) local_unnamed_addr #2

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 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 #2

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl11dsnormalizeEPNS_9ae_matrixEllPlPNS_9ae_vectorES4_PNS_8ae_stateE(ptr nocapture noundef readonly %0, i64 noundef %1, i64 noundef %2, ptr nocapture noundef writeonly %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #3 {
  %8 = alloca %"struct.alglib_impl::ae_frame", align 8
  %9 = alloca %"struct.alglib_impl::ae_vector", align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %6, ptr noundef nonnull %8)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %9, i8 0, i64 64, i1 false)
  store i64 0, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %4)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %5)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %9, i64 noundef 0, i64 noundef 3, ptr noundef %6, i1 noundef zeroext true)
  %14 = icmp slt i64 %1, 1
  %15 = icmp slt i64 %2, 1
  %or.cond = or i1 %14, %15
  br i1 %or.cond, label %16, label %.split.us

16:                                               ; preds = %7
  store i64 -1, ptr %3, align 8, !tbaa !5
  br label %.split58.us

.split.us:                                        ; preds = %7
  store i64 1, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %4, i64 noundef %2, ptr noundef %6)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %5, i64 noundef %2, ptr noundef %6)
  %17 = add nsw i64 %1, -1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %1, ptr noundef %6)
  %18 = getelementptr inbounds i8, ptr %9, i64 56
  %19 = getelementptr inbounds i8, ptr %0, i64 72
  %20 = getelementptr inbounds i8, ptr %0, i64 16
  %21 = getelementptr inbounds i8, ptr %4, i64 56
  %22 = getelementptr inbounds i8, ptr %5, i64 56
  %xtraiter = and i64 %1, 1
  %23 = icmp eq i64 %1, 1
  %unroll_iter = and i64 %1, 9223372036854775806
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %24

24:                                               ; preds = %._crit_edge.us, %.split.us
  %.056.us = phi i64 [ 0, %.split.us ], [ %86, %._crit_edge.us ]
  %25 = load ptr, ptr %18, align 8, !tbaa !9
  %26 = load ptr, ptr %19, align 8, !tbaa !9
  %27 = load ptr, ptr %26, align 8, !tbaa !10
  %28 = getelementptr inbounds double, ptr %27, i64 %.056.us
  %29 = load i64, ptr %20, align 8, !tbaa !12
  %30 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %17)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %25, i64 noundef 1, ptr noundef %28, i64 noundef %29, i64 noundef %30)
  call void @_ZN11alglib_impl13samplemomentsEPNS_9ae_vectorElPdS2_S2_S2_PNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %1, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef %6)
  %31 = load double, ptr %10, align 8, !tbaa !16
  %32 = load ptr, ptr %21, align 8, !tbaa !9
  %33 = getelementptr inbounds double, ptr %32, i64 %.056.us
  store double %31, ptr %33, align 8, !tbaa !16
  %34 = load double, ptr %11, align 8, !tbaa !16
  %35 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %34, ptr noundef %6)
  %36 = load ptr, ptr %22, align 8, !tbaa !9
  %37 = getelementptr inbounds double, ptr %36, i64 %.056.us
  store double %35, ptr %37, align 8, !tbaa !16
  %38 = load ptr, ptr %22, align 8, !tbaa !9
  %39 = getelementptr inbounds double, ptr %38, i64 %.056.us
  %40 = load double, ptr %39, align 8, !tbaa !16
  %41 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %40, double noundef 0.000000e+00)
  br i1 %41, label %42, label %.lr.ph.us.preheader

42:                                               ; preds = %24
  %43 = load ptr, ptr %22, align 8, !tbaa !9
  %44 = getelementptr inbounds double, ptr %43, i64 %.056.us
  store double 1.000000e+00, ptr %44, align 8, !tbaa !16
  br label %.lr.ph.us.preheader

.lr.ph.us.preheader:                              ; preds = %42, %24
  br i1 %23, label %._crit_edge.us.unr-lcssa, label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %.lr.ph.us
  %.05055.us = phi i64 [ %72, %.lr.ph.us ], [ 0, %.lr.ph.us.preheader ]
  %niter = phi i64 [ %niter.next.1, %.lr.ph.us ], [ 0, %.lr.ph.us.preheader ]
  %45 = load ptr, ptr %19, align 8, !tbaa !9
  %46 = getelementptr inbounds ptr, ptr %45, i64 %.05055.us
  %47 = load ptr, ptr %46, align 8, !tbaa !10
  %48 = getelementptr inbounds double, ptr %47, i64 %.056.us
  %49 = load double, ptr %48, align 8, !tbaa !16
  %50 = load ptr, ptr %21, align 8, !tbaa !9
  %51 = getelementptr inbounds double, ptr %50, i64 %.056.us
  %52 = load double, ptr %51, align 8, !tbaa !16
  %53 = fsub double %49, %52
  %54 = load ptr, ptr %22, align 8, !tbaa !9
  %55 = getelementptr inbounds double, ptr %54, i64 %.056.us
  %56 = load double, ptr %55, align 8, !tbaa !16
  %57 = fdiv double %53, %56
  store double %57, ptr %48, align 8, !tbaa !16
  %58 = or disjoint i64 %.05055.us, 1
  %59 = load ptr, ptr %19, align 8, !tbaa !9
  %60 = getelementptr inbounds ptr, ptr %59, i64 %58
  %61 = load ptr, ptr %60, align 8, !tbaa !10
  %62 = getelementptr inbounds double, ptr %61, i64 %.056.us
  %63 = load double, ptr %62, align 8, !tbaa !16
  %64 = load ptr, ptr %21, align 8, !tbaa !9
  %65 = getelementptr inbounds double, ptr %64, i64 %.056.us
  %66 = load double, ptr %65, align 8, !tbaa !16
  %67 = fsub double %63, %66
  %68 = load ptr, ptr %22, align 8, !tbaa !9
  %69 = getelementptr inbounds double, ptr %68, i64 %.056.us
  %70 = load double, ptr %69, align 8, !tbaa !16
  %71 = fdiv double %67, %70
  store double %71, ptr %62, align 8, !tbaa !16
  %72 = add nuw nsw i64 %.05055.us, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.us.unr-lcssa, label %.lr.ph.us, !llvm.loop !18

._crit_edge.us.unr-lcssa:                         ; preds = %.lr.ph.us, %.lr.ph.us.preheader
  %.05055.us.unr = phi i64 [ 0, %.lr.ph.us.preheader ], [ %72, %.lr.ph.us ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %.lr.ph.us.epil

.lr.ph.us.epil:                                   ; preds = %._crit_edge.us.unr-lcssa
  %73 = load ptr, ptr %19, align 8, !tbaa !9
  %74 = getelementptr inbounds ptr, ptr %73, i64 %.05055.us.unr
  %75 = load ptr, ptr %74, align 8, !tbaa !10
  %76 = getelementptr inbounds double, ptr %75, i64 %.056.us
  %77 = load double, ptr %76, align 8, !tbaa !16
  %78 = load ptr, ptr %21, align 8, !tbaa !9
  %79 = getelementptr inbounds double, ptr %78, i64 %.056.us
  %80 = load double, ptr %79, align 8, !tbaa !16
  %81 = fsub double %77, %80
  %82 = load ptr, ptr %22, align 8, !tbaa !9
  %83 = getelementptr inbounds double, ptr %82, i64 %.056.us
  %84 = load double, ptr %83, align 8, !tbaa !16
  %85 = fdiv double %81, %84
  store double %85, ptr %76, align 8, !tbaa !16
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %._crit_edge.us.unr-lcssa, %.lr.ph.us.epil
  %86 = add nuw nsw i64 %.056.us, 1
  %exitcond59.not = icmp eq i64 %86, %2
  br i1 %exitcond59.not, label %.split58.us, label %24, !llvm.loop !20

.split58.us:                                      ; preds = %._crit_edge.us, %16
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  ret void
}

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 = { 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !6, i64 16}
!13 = !{!"_ZTSN11alglib_impl9ae_matrixE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !14, i64 32, !15, i64 40, !7, i64 72}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


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