; 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::decisionforest" = type { i64, i64, i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::decisionforestbuffer" }
%"struct.alglib_impl::decisionforestbuffer" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }
%"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

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

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

32:                                               ; preds = %122, %4
  %33 = load i64, ptr %12, align 8, !tbaa !9
  %34 = load i64, ptr %7, align 8, !tbaa !9
  %35 = sub nsw i64 %34, 1
  %36 = icmp sle i64 %33, %35
  br i1 %36, label %37, label %125

37:                                               ; preds = %32
  %38 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %10, i32 0, i32 4
  %39 = load ptr, ptr %38, align 8, !tbaa !20
  %40 = getelementptr inbounds double, ptr %39, i64 0
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %41, i32 0, i32 6
  %43 = load ptr, ptr %42, align 8, !tbaa !20
  %44 = load i64, ptr %12, align 8, !tbaa !9
  %45 = getelementptr inbounds ptr, ptr %43, i64 %44
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  %47 = getelementptr inbounds double, ptr %46, i64 0
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.alglib_impl::decisionforest", ptr %48, i32 0, i32 0
  %50 = load i64, ptr %49, align 8, !tbaa !11
  %51 = sub nsw i64 %50, 1
  %52 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %51)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %40, i64 noundef 1, ptr noundef %47, i64 noundef 1, i64 noundef %52)
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9dfprocessEPNS_14decisionforestEPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef %53, ptr noundef %10, ptr noundef %11, ptr noundef %54)
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.alglib_impl::decisionforest", ptr %55, i32 0, i32 1
  %57 = load i64, ptr %56, align 8, !tbaa !17
  %58 = icmp sgt i64 %57, 1
  br i1 %58, label %59, label %121

59:                                               ; preds = %37
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %60, i32 0, i32 6
  %62 = load ptr, ptr %61, align 8, !tbaa !20
  %63 = load i64, ptr %12, align 8, !tbaa !9
  %64 = getelementptr inbounds ptr, ptr %62, i64 %63
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.alglib_impl::decisionforest", ptr %66, i32 0, i32 0
  %68 = load i64, ptr %67, align 8, !tbaa !11
  %69 = getelementptr inbounds double, ptr %65, i64 %68
  %70 = load double, ptr %69, align 8, !tbaa !18
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %70, ptr noundef %71)
  store i64 %72, ptr %14, align 8, !tbaa !9
  store i64 0, ptr %15, align 8, !tbaa !9
  store i64 1, ptr %13, align 8, !tbaa !9
  br label %73

73:                                               ; preds = %95, %59
  %74 = load i64, ptr %13, align 8, !tbaa !9
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.alglib_impl::decisionforest", ptr %75, i32 0, i32 1
  %77 = load i64, ptr %76, align 8, !tbaa !17
  %78 = sub nsw i64 %77, 1
  %79 = icmp sle i64 %74, %78
  br i1 %79, label %80, label %98

80:                                               ; preds = %73
  %81 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %11, i32 0, i32 4
  %82 = load ptr, ptr %81, align 8, !tbaa !20
  %83 = load i64, ptr %13, align 8, !tbaa !9
  %84 = getelementptr inbounds double, ptr %82, i64 %83
  %85 = load double, ptr %84, align 8, !tbaa !18
  %86 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %11, i32 0, i32 4
  %87 = load ptr, ptr %86, align 8, !tbaa !20
  %88 = load i64, ptr %15, align 8, !tbaa !9
  %89 = getelementptr inbounds double, ptr %87, i64 %88
  %90 = load double, ptr %89, align 8, !tbaa !18
  %91 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %85, double noundef %90)
  br i1 %91, label %92, label %94

92:                                               ; preds = %80
  %93 = load i64, ptr %13, align 8, !tbaa !9
  store i64 %93, ptr %15, align 8, !tbaa !9
  br label %94

94:                                               ; preds = %92, %80
  br label %95

95:                                               ; preds = %94
  %96 = load i64, ptr %13, align 8, !tbaa !9
  %97 = add nsw i64 %96, 1
  store i64 %97, ptr %13, align 8, !tbaa !9
  br label %73, !llvm.loop !21

98:                                               ; preds = %73
  %99 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %11, i32 0, i32 4
  %100 = load ptr, ptr %99, align 8, !tbaa !20
  %101 = load i64, ptr %14, align 8, !tbaa !9
  %102 = getelementptr inbounds double, ptr %100, i64 %101
  %103 = load double, ptr %102, align 8, !tbaa !18
  %104 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %103, double noundef 0.000000e+00)
  br i1 %104, label %105, label %115

105:                                              ; preds = %98
  %106 = load double, ptr %16, align 8, !tbaa !18
  %107 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %11, i32 0, i32 4
  %108 = load ptr, ptr %107, align 8, !tbaa !20
  %109 = load i64, ptr %14, align 8, !tbaa !9
  %110 = getelementptr inbounds double, ptr %108, i64 %109
  %111 = load double, ptr %110, align 8, !tbaa !18
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef %111, ptr noundef %112)
  %114 = fsub double %106, %113
  store double %114, ptr %16, align 8, !tbaa !18
  br label %120

115:                                              ; preds = %98
  %116 = load double, ptr %16, align 8, !tbaa !18
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef 1.000000e-300, ptr noundef %117)
  %119 = fsub double %116, %118
  store double %119, ptr %16, align 8, !tbaa !18
  br label %120

120:                                              ; preds = %115, %105
  br label %121

121:                                              ; preds = %120, %37
  br label %122

122:                                              ; preds = %121
  %123 = load i64, ptr %12, align 8, !tbaa !9
  %124 = add nsw i64 %123, 1
  store i64 %124, ptr %12, align 8, !tbaa !9
  br label %32, !llvm.loop !23

125:                                              ; preds = %32
  %126 = load double, ptr %16, align 8, !tbaa !18
  %127 = load i64, ptr %7, align 8, !tbaa !9
  %128 = sitofp i64 %127 to double
  %129 = fdiv double %126, %128
  store double %129, ptr %16, align 8, !tbaa !18
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %130)
  %131 = load double, ptr %16, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #4
  ret double %131
}

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #3

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

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

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

declare noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef, ptr noundef) #3

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

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

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

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

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

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


; 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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN11alglib_impl7dfavgceEPNS_14decisionforestEPNS_9ae_matrixElPNS_8ae_stateE(ptr noundef %0, ptr nocapture noundef readonly %1, i64 noundef %2, ptr noundef %3) local_unnamed_addr #2 {
  %5 = alloca %"struct.alglib_impl::ae_frame", align 8
  %6 = alloca %"struct.alglib_impl::ae_vector", align 8
  %7 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #4
  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(64) %6, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %7, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %6, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %7, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  %8 = load i64, ptr %0, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %6, i64 noundef %8, ptr noundef %3)
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  %10 = load i64, ptr %9, align 8, !tbaa !15
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %10, ptr noundef %3)
  %.not.not43 = icmp sgt i64 %2, 0
  br i1 %.not.not43, label %.lr.ph47, label %._crit_edge48

.lr.ph47:                                         ; preds = %4
  %11 = getelementptr inbounds i8, ptr %6, i64 56
  %12 = getelementptr inbounds i8, ptr %1, i64 72
  %13 = getelementptr inbounds i8, ptr %7, i64 56
  br label %14

14:                                               ; preds = %.lr.ph47, %51
  %.045 = phi double [ 0.000000e+00, %.lr.ph47 ], [ %.1, %51 ]
  %.03744 = phi i64 [ 0, %.lr.ph47 ], [ %52, %51 ]
  %15 = load ptr, ptr %11, align 8, !tbaa !16
  %16 = load ptr, ptr %12, align 8, !tbaa !16
  %17 = getelementptr inbounds ptr, ptr %16, i64 %.03744
  %18 = load ptr, ptr %17, align 8, !tbaa !17
  %19 = load i64, ptr %0, align 8, !tbaa !5
  %20 = add nsw i64 %19, -1
  %21 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %20)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %15, i64 noundef 1, ptr noundef %18, i64 noundef 1, i64 noundef %21)
  call void @_ZN11alglib_impl9dfprocessEPNS_14decisionforestEPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef %3)
  %22 = load i64, ptr %9, align 8, !tbaa !15
  %23 = icmp sgt i64 %22, 1
  br i1 %23, label %24, label %51

24:                                               ; preds = %14
  %25 = load ptr, ptr %12, align 8, !tbaa !16
  %26 = getelementptr inbounds ptr, ptr %25, i64 %.03744
  %27 = load ptr, ptr %26, align 8, !tbaa !17
  %28 = load i64, ptr %0, align 8, !tbaa !5
  %29 = getelementptr inbounds double, ptr %27, i64 %28
  %30 = load double, ptr %29, align 8, !tbaa !18
  %31 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %30, ptr noundef %3)
  %32 = load i64, ptr %9, align 8, !tbaa !15
  %.not.not3940 = icmp sgt i64 %32, 1
  br i1 %.not.not3940, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %24, %.lr.ph
  %.03542 = phi i64 [ %spec.select, %.lr.ph ], [ 0, %24 ]
  %.03841 = phi i64 [ %39, %.lr.ph ], [ 1, %24 ]
  %33 = load ptr, ptr %13, align 8, !tbaa !16
  %34 = getelementptr inbounds double, ptr %33, i64 %.03841
  %35 = load double, ptr %34, align 8, !tbaa !18
  %36 = getelementptr inbounds double, ptr %33, i64 %.03542
  %37 = load double, ptr %36, align 8, !tbaa !18
  %38 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %35, double noundef %37)
  %spec.select = select i1 %38, i64 %.03841, i64 %.03542
  %39 = add nuw nsw i64 %.03841, 1
  %40 = load i64, ptr %9, align 8, !tbaa !15
  %.not.not39 = icmp slt i64 %39, %40
  br i1 %.not.not39, label %.lr.ph, label %._crit_edge, !llvm.loop !20

._crit_edge:                                      ; preds = %.lr.ph, %24
  %41 = load ptr, ptr %13, align 8, !tbaa !16
  %42 = getelementptr inbounds double, ptr %41, i64 %31
  %43 = load double, ptr %42, align 8, !tbaa !18
  %44 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %43, double noundef 0.000000e+00)
  br i1 %44, label %45, label %.sink.split

45:                                               ; preds = %._crit_edge
  %46 = load ptr, ptr %13, align 8, !tbaa !16
  %47 = getelementptr inbounds double, ptr %46, i64 %31
  %48 = load double, ptr %47, align 8, !tbaa !18
  br label %.sink.split

.sink.split:                                      ; preds = %._crit_edge, %45
  %.sink49 = phi double [ %48, %45 ], [ 1.000000e-300, %._crit_edge ]
  %49 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef %.sink49, ptr noundef %3)
  %50 = fsub double %.045, %49
  br label %51

51:                                               ; preds = %.sink.split, %14
  %.1 = phi double [ %.045, %14 ], [ %50, %.sink.split ]
  %52 = add nuw nsw i64 %.03744, 1
  %exitcond.not = icmp eq i64 %52, %2
  br i1 %exitcond.not, label %._crit_edge48, label %14, !llvm.loop !22

._crit_edge48:                                    ; preds = %51, %4
  %.0.lcssa = phi double [ 0.000000e+00, %4 ], [ %.1, %51 ]
  %53 = sitofp i64 %2 to double
  %54 = fdiv double %.0.lcssa, %53
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %3)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  ret double %54
}

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #3

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

declare noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #3

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

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

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

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

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

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


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