; 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_impl10dfavgerrorEPNS_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 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
  %16 = load ptr, ptr %8, align 8, !tbaa !5
  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 %10, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 64, i1 false)
  %17 = 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 %17, i1 noundef zeroext true)
  %18 = 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 %18, i1 noundef zeroext true)
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.alglib_impl::decisionforest", ptr %19, i32 0, i32 0
  %21 = load i64, ptr %20, align 8, !tbaa !11
  %22 = sub nsw i64 %21, 1
  %23 = add nsw i64 %22, 1
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %10, i64 noundef %23, ptr noundef %24)
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.alglib_impl::decisionforest", ptr %25, i32 0, i32 1
  %27 = load i64, ptr %26, align 8, !tbaa !17
  %28 = sub nsw i64 %27, 1
  %29 = add nsw i64 %28, 1
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %11, i64 noundef %29, ptr noundef %30)
  store double 0.000000e+00, ptr %15, align 8, !tbaa !18
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %31

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

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

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

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

79:                                               ; preds = %72
  %80 = load i64, ptr %13, align 8, !tbaa !9
  %81 = load i64, ptr %14, align 8, !tbaa !9
  %82 = icmp eq i64 %80, %81
  br i1 %82, label %83, label %94

83:                                               ; preds = %79
  %84 = load double, ptr %15, align 8, !tbaa !18
  %85 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %11, i32 0, i32 4
  %86 = load ptr, ptr %85, align 8, !tbaa !20
  %87 = load i64, ptr %13, align 8, !tbaa !9
  %88 = getelementptr inbounds double, ptr %86, i64 %87
  %89 = load double, ptr %88, align 8, !tbaa !18
  %90 = fsub double %89, 1.000000e+00
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %90, ptr noundef %91)
  %93 = fadd double %84, %92
  store double %93, ptr %15, align 8, !tbaa !18
  br label %104

94:                                               ; preds = %79
  %95 = load double, ptr %15, align 8, !tbaa !18
  %96 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %11, i32 0, i32 4
  %97 = load ptr, ptr %96, align 8, !tbaa !20
  %98 = load i64, ptr %13, align 8, !tbaa !9
  %99 = getelementptr inbounds double, ptr %97, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !18
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %100, ptr noundef %101)
  %103 = fadd double %95, %102
  store double %103, ptr %15, align 8, !tbaa !18
  br label %104

104:                                              ; preds = %94, %83
  br label %105

105:                                              ; preds = %104
  %106 = load i64, ptr %13, align 8, !tbaa !9
  %107 = add nsw i64 %106, 1
  store i64 %107, ptr %13, align 8, !tbaa !9
  br label %72, !llvm.loop !21

108:                                              ; preds = %72
  br label %130

109:                                              ; preds = %36
  %110 = load double, ptr %15, align 8, !tbaa !18
  %111 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %11, i32 0, i32 4
  %112 = load ptr, ptr %111, align 8, !tbaa !20
  %113 = getelementptr inbounds double, ptr %112, i64 0
  %114 = load double, ptr %113, align 8, !tbaa !18
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %115, i32 0, i32 6
  %117 = load ptr, ptr %116, align 8, !tbaa !20
  %118 = load i64, ptr %12, align 8, !tbaa !9
  %119 = getelementptr inbounds ptr, ptr %117, i64 %118
  %120 = load ptr, ptr %119, align 8, !tbaa !5
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %"struct.alglib_impl::decisionforest", ptr %121, i32 0, i32 0
  %123 = load i64, ptr %122, align 8, !tbaa !11
  %124 = getelementptr inbounds double, ptr %120, i64 %123
  %125 = load double, ptr %124, align 8, !tbaa !18
  %126 = fsub double %114, %125
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %126, ptr noundef %127)
  %129 = fadd double %110, %128
  store double %129, ptr %15, align 8, !tbaa !18
  br label %130

130:                                              ; preds = %109, %108
  br label %131

131:                                              ; preds = %130
  %132 = load i64, ptr %12, align 8, !tbaa !9
  %133 = add nsw i64 %132, 1
  store i64 %133, ptr %12, align 8, !tbaa !9
  br label %31, !llvm.loop !23

134:                                              ; preds = %31
  %135 = load double, ptr %15, align 8, !tbaa !18
  %136 = load i64, ptr %7, align 8, !tbaa !9
  %137 = load ptr, ptr %5, align 8, !tbaa !5
  %138 = getelementptr inbounds %"struct.alglib_impl::decisionforest", ptr %137, i32 0, i32 1
  %139 = load i64, ptr %138, align 8, !tbaa !17
  %140 = mul nsw i64 %136, %139
  %141 = sitofp i64 %140 to double
  %142 = fdiv double %135, %141
  store double %142, ptr %15, align 8, !tbaa !18
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %143)
  %144 = load double, ptr %15, align 8, !tbaa !18
  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 %144
}

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 double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef, ptr 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_impl10dfavgerrorEPNS_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.not46 = icmp sgt i64 %2, 0
  br i1 %.not.not46, label %.lr.ph49, label %._crit_edge

.lr.ph49:                                         ; 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.ph49, %.loopexit
  %.048 = phi double [ 0.000000e+00, %.lr.ph49 ], [ %.3, %.loopexit ]
  %.04047 = phi i64 [ 0, %.lr.ph49 ], [ %58, %.loopexit ]
  %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 %.04047
  %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 %46

24:                                               ; preds = %14
  %25 = load ptr, ptr %12, align 8, !tbaa !16
  %26 = getelementptr inbounds ptr, ptr %25, i64 %.04047
  %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.not4243 = icmp sgt i64 %32, 0
  br i1 %.not.not4243, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %24, %42
  %.145 = phi double [ %.2, %42 ], [ %.048, %24 ]
  %.04144 = phi i64 [ %44, %42 ], [ 0, %24 ]
  %33 = icmp eq i64 %.04144, %31
  %34 = load ptr, ptr %13, align 8, !tbaa !16
  br i1 %33, label %35, label %39

35:                                               ; preds = %.lr.ph
  %36 = getelementptr inbounds double, ptr %34, i64 %31
  %37 = load double, ptr %36, align 8, !tbaa !18
  %38 = fadd double %37, -1.000000e+00
  br label %42

39:                                               ; preds = %.lr.ph
  %40 = getelementptr inbounds double, ptr %34, i64 %.04144
  %41 = load double, ptr %40, align 8, !tbaa !18
  br label %42

42:                                               ; preds = %35, %39
  %.sink = phi double [ %38, %35 ], [ %41, %39 ]
  %43 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %.sink, ptr noundef %3)
  %.2 = fadd double %.145, %43
  %44 = add nuw nsw i64 %.04144, 1
  %45 = load i64, ptr %9, align 8, !tbaa !15
  %.not.not42 = icmp slt i64 %44, %45
  br i1 %.not.not42, label %.lr.ph, label %.loopexit, !llvm.loop !20

46:                                               ; preds = %14
  %47 = load ptr, ptr %13, align 8, !tbaa !16
  %48 = load double, ptr %47, align 8, !tbaa !18
  %49 = load ptr, ptr %12, align 8, !tbaa !16
  %50 = getelementptr inbounds ptr, ptr %49, i64 %.04047
  %51 = load ptr, ptr %50, align 8, !tbaa !17
  %52 = load i64, ptr %0, align 8, !tbaa !5
  %53 = getelementptr inbounds double, ptr %51, i64 %52
  %54 = load double, ptr %53, align 8, !tbaa !18
  %55 = fsub double %48, %54
  %56 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %55, ptr noundef %3)
  %57 = fadd double %.048, %56
  br label %.loopexit

.loopexit:                                        ; preds = %42, %24, %46
  %.3 = phi double [ %57, %46 ], [ %.048, %24 ], [ %.2, %42 ]
  %58 = add nuw nsw i64 %.04047, 1
  %exitcond.not = icmp eq i64 %58, %2
  br i1 %exitcond.not, label %._crit_edge, label %14, !llvm.loop !22

._crit_edge:                                      ; preds = %.loopexit, %4
  %.0.lcssa = phi double [ 0.000000e+00, %4 ], [ %.3, %.loopexit ]
  %59 = load i64, ptr %9, align 8, !tbaa !15
  %60 = mul nsw i64 %59, %2
  %61 = sitofp i64 %60 to double
  %62 = fdiv double %.0.lcssa, %61
  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 %62
}

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 double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef, ptr 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